Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Unanswered
JavaScript Event Hooks in UUX Payload

I was directed to this boilerplate code for registering post-login and logoff event hooks. I am interested in knowing what other events are available to subscribe to using this boilerplate. For instance, is it possible to listen for when the user navigates to different pages?

// Everything below here can be ignored, just registration boilerplate

var _uux_payload_registered = false;

var register = function () {
    if (window.Ngam && !_uux_payload_registered) {
        // this is a bunch of backwards compatibility afordances to make sure the hook registers
        var loginFlow = Ngam.__container__.lookup('service:loginFlow');
        var loginController = Ngam.__container__.lookup('controller:login');
        var loginFlowReq = loginController && loginController.get('loginFlowRequirements');
        if (loginFlow && loginFlow.authenticatedStatus === 200) {
            postLoginHook(loginFlow);
        } else if (loginFlowReq && loginFlowReq.authenticatedStatus === 200) {
            postLoginHook(loginFlowReq);
        } else {
            Ngam.__container__.lookup('controller:application').get('notificationCenter').on('POST_LOGIN', postLoginHook);
        }
        Ngam.__container__.lookup('controller:application').get('notificationCenter').on('BEFORE_LOGOFF', afterLogoffHook);
        _uux_payload_registered = true;
    }
};

window.addEventListener('load', register);
ready(register);
setTimeout(function () {
    register();
});

if (window.Ngam) {
    register();
}
1

Hey Jared,

Any uses of Ngam.__container__.lookup are things we try to avoid because they are reaching into the internals of the application and, depending on your usage, put the integrity of the application at risk. As such, we do not publicly publish or document the full extent of what you can do with these lookups. If there is something you are specifically looking to do, we suggest opening a support ticket so we can walk you through it privately.

— Kristopher Van Houten   3 years ago
0

Thank you, Kristopher!

— Jared Feldman   3 years ago
Votes Newest

Answers

169 Views
0 Answers
3 years ago
3 years ago
Tags