@elliemae/pui-app-sdk 2.17.0 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/analytics/appdynamics.js +34 -30
- package/dist/cjs/analytics/index.js +32 -26
- package/dist/cjs/analytics/page-view-event.js +42 -29
- package/dist/cjs/analytics/user-session-event.js +34 -27
- package/dist/cjs/analytics/user-wait-event.js +31 -17
- package/dist/cjs/analytics/web-analytics.js +16 -19
- package/dist/cjs/api/auth/index.js +41 -39
- package/dist/cjs/api/helpers.js +33 -99
- package/dist/cjs/api/users/index.js +28 -16
- package/dist/cjs/communication/http-client/index.js +44 -48
- package/dist/cjs/communication/http-client/request-interceptor.js +28 -12
- package/dist/cjs/communication/http-client/response-interceptor.js +41 -38
- package/dist/cjs/communication/http-client/retry-axios.js +68 -122
- package/dist/cjs/communication/http-client/retry.js +42 -36
- package/dist/cjs/communication/http-client/tests/index.test-disable.js +48 -56
- package/dist/cjs/data/auth/actions.js +17 -26
- package/dist/cjs/data/auth/reducer.js +30 -18
- package/dist/cjs/data/breakpoint/index.js +38 -32
- package/dist/cjs/data/error/index.js +33 -18
- package/dist/cjs/data/live-message/index.js +34 -25
- package/dist/cjs/data/logout/actions.js +12 -9
- package/dist/cjs/data/navigation-prompt/actions.js +12 -9
- package/dist/cjs/data/react-redux.js +29 -13
- package/dist/cjs/data/reducers.js +35 -23
- package/dist/cjs/data/saga.js +12 -9
- package/dist/cjs/data/store.js +53 -60
- package/dist/cjs/data/wait-message/actions.js +14 -13
- package/dist/cjs/data/wait-message/reducer.js +32 -24
- package/dist/cjs/index.js +189 -809
- package/dist/cjs/route/index.js +37 -32
- package/dist/cjs/route/page-view.js +30 -22
- package/dist/cjs/route/private-route/index.js +52 -60
- package/dist/cjs/sideeffect/auth/index.js +42 -30
- package/dist/cjs/sideeffect/error-toast/index.js +39 -26
- package/dist/cjs/sideeffect/wait-message/index.js +45 -29
- package/dist/cjs/typings/custom.d.js +0 -1
- package/dist/cjs/typings/elliemae.d.js +0 -1
- package/dist/cjs/typings/styled.d.js +19 -3
- package/dist/cjs/utils/app-config/config.js +33 -33
- package/dist/cjs/utils/app-config/index.js +42 -44
- package/dist/cjs/utils/app-host-integration/react.js +27 -14
- package/dist/cjs/utils/auth/helper.js +30 -18
- package/dist/cjs/utils/auth/index.js +76 -116
- package/dist/cjs/utils/await.js +3 -0
- package/dist/cjs/utils/constants.js +22 -21
- package/dist/cjs/utils/font-size.js +13 -14
- package/dist/cjs/utils/guest-with-service.js +11 -12
- package/dist/cjs/utils/helpers.js +15 -19
- package/dist/cjs/utils/history.js +29 -12
- package/dist/cjs/utils/log-records.js +38 -35
- package/dist/cjs/utils/micro-frontend/console-logger.js +39 -23
- package/dist/cjs/utils/micro-frontend/guest.js +80 -128
- package/dist/cjs/utils/micro-frontend/host.js +84 -124
- package/dist/cjs/utils/micro-frontend/index.js +60 -61
- package/dist/cjs/utils/micro-frontend/types.js +3 -5
- package/dist/cjs/utils/redact-pii.js +15 -17
- package/dist/cjs/utils/service-worker.js +36 -21
- package/dist/cjs/utils/session.js +64 -70
- package/dist/cjs/utils/storybook/main.js +32 -25
- package/dist/cjs/utils/storybook/manager.js +31 -16
- package/dist/cjs/utils/storybook/middleware.js +3 -7
- package/dist/cjs/utils/storybook/preview.js +57 -48
- package/dist/cjs/utils/storybook/theme.js +30 -14
- package/dist/cjs/utils/storybook/vite.js +6 -0
- package/dist/cjs/utils/storybook/webpack.js +13 -0
- package/dist/cjs/utils/testing/index.js +38 -50
- package/dist/cjs/utils/testing/render-with-redux.js +34 -27
- package/dist/cjs/utils/testing/render-with-router-redux.js +40 -37
- package/dist/cjs/utils/testing/render-with-router.js +34 -28
- package/dist/cjs/utils/testing/render-with-state-addons.js +40 -36
- package/dist/cjs/utils/types.js +3 -0
- package/dist/cjs/utils/url.js +12 -13
- package/dist/cjs/utils/web-storage.js +40 -30
- package/dist/cjs/utils/window.js +36 -28
- package/dist/cjs/view/app-root/hosted-app.js +35 -32
- package/dist/cjs/view/app-root/index.js +57 -62
- package/dist/cjs/view/app-root/stand-alone-app.js +38 -37
- package/dist/cjs/view/app-root/style.js +50 -12
- package/dist/cjs/view/error-boundary/default-error-template.js +10 -15
- package/dist/cjs/view/error-boundary/index.js +41 -43
- package/dist/cjs/view/error-toast/index.js +42 -32
- package/dist/cjs/view/fetch-host-app-data/index.js +34 -26
- package/dist/cjs/view/fetch-host-app-data/store.js +31 -24
- package/dist/cjs/view/fields/check-box/index.js +34 -39
- package/dist/cjs/view/fields/combo-box/index.js +37 -31
- package/dist/cjs/view/fields/connect-form.js +30 -15
- package/dist/cjs/view/fields/date-input/index.js +34 -26
- package/dist/cjs/view/fields/date-picker/index.js +34 -26
- package/dist/cjs/view/fields/form-item-layout/index.js +36 -30
- package/dist/cjs/view/fields/input-mask/index.js +35 -41
- package/dist/cjs/view/fields/large-text-box/index.js +34 -26
- package/dist/cjs/view/fields/radio/index.js +34 -30
- package/dist/cjs/view/fields/radio-group/index.js +32 -27
- package/dist/cjs/view/fields/text-box/index.js +34 -26
- package/dist/cjs/view/fields/watch-value.js +41 -35
- package/dist/cjs/view/form/index.js +41 -34
- package/dist/cjs/view/form/personal-info-section.js +56 -80
- package/dist/cjs/view/form/submit-button/index.js +34 -23
- package/dist/cjs/view/guest-unload-handlers/index.js +33 -22
- package/dist/cjs/view/header/center-region/index.js +61 -38
- package/dist/cjs/view/header/index.js +41 -35
- package/dist/cjs/view/header/logo-region/index.js +31 -23
- package/dist/cjs/view/header/nav-region/index.js +44 -30
- package/dist/cjs/view/header/nav-region/notification/index.js +28 -18
- package/dist/cjs/view/header/nav-region/user/index.js +28 -18
- package/dist/cjs/view/host-binding-events/index.js +10 -11
- package/dist/cjs/view/intro.stories.mdx +1 -1
- package/dist/cjs/view/live-message/index.js +33 -34
- package/dist/cjs/view/loadable/index.js +33 -27
- package/dist/cjs/view/login/index.js +36 -30
- package/dist/cjs/view/media-breakpoint/index.js +43 -34
- package/dist/cjs/view/message-to-host-app/index.js +31 -20
- package/dist/cjs/view/micro-app/app-factory/index.js +98 -134
- package/dist/cjs/view/micro-app/const.js +10 -7
- package/dist/cjs/view/micro-app/index.js +37 -27
- package/dist/cjs/view/micro-app/resources/manifest.js +41 -34
- package/dist/cjs/view/micro-app/resources/script.js +56 -53
- package/dist/cjs/view/micro-app/resources/style.js +44 -38
- package/dist/cjs/view/micro-app/types.js +3 -5
- package/dist/cjs/view/micro-app/use-app-will-render.js +58 -50
- package/dist/cjs/view/micro-app/utils.js +32 -21
- package/dist/cjs/view/micro-iframe-app/app.js +37 -39
- package/dist/cjs/view/micro-iframe-app/iframe/const.js +10 -7
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +51 -47
- package/dist/cjs/view/micro-iframe-app/index.js +36 -24
- package/dist/cjs/view/micro-iframe-app/types.js +3 -5
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +40 -36
- package/dist/cjs/view/modals/error/index.js +35 -28
- package/dist/cjs/view/modals/navigation-prompt/index.js +38 -37
- package/dist/cjs/view/modals/session-expiry/customHooks.js +40 -35
- package/dist/cjs/view/modals/session-expiry/index.js +45 -50
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +32 -18
- package/dist/cjs/view/modals/wait-message/index.js +50 -53
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +33 -21
- package/dist/cjs/view/render-with-delay/index.js +30 -19
- package/dist/cjs/view/render-with-host-data/index.js +35 -30
- package/dist/cjs/view/session-timeout/index.js +44 -35
- package/dist/cjs/view/storybook/decorator.js +32 -21
- package/dist/cjs/view/use-previous.js +29 -13
- package/dist/cjs/view/useMediaBreakpoints/index.js +34 -19
- package/dist/cjs/view/visually-hidden/index.js +41 -21
- package/dist/cjs/view/window-size/index.js +34 -22
- package/dist/es/analytics/appdynamics.js +14 -15
- package/dist/es/analytics/index.js +11 -17
- package/dist/es/analytics/page-view-event.js +20 -20
- package/dist/es/analytics/user-session-event.js +13 -15
- package/dist/es/analytics/user-wait-event.js +10 -6
- package/dist/es/analytics/web-analytics.js +12 -10
- package/dist/es/api/auth/index.js +22 -27
- package/dist/es/api/helpers.js +8 -81
- package/dist/es/api/users/index.js +7 -8
- package/dist/es/communication/http-client/index.js +24 -30
- package/dist/es/communication/http-client/request-interceptor.js +6 -3
- package/dist/es/communication/http-client/response-interceptor.js +20 -21
- package/dist/es/communication/http-client/retry-axios.js +45 -105
- package/dist/es/communication/http-client/retry.js +22 -25
- package/dist/es/communication/http-client/tests/index.test-disable.js +28 -47
- package/dist/es/data/auth/actions.js +13 -19
- package/dist/es/data/auth/reducer.js +9 -7
- package/dist/es/data/breakpoint/index.js +19 -21
- package/dist/es/data/error/index.js +11 -9
- package/dist/es/data/live-message/index.js +12 -16
- package/dist/es/data/logout/actions.js +9 -5
- package/dist/es/data/navigation-prompt/actions.js +9 -5
- package/dist/es/data/react-redux.js +7 -3
- package/dist/es/data/reducers.js +10 -7
- package/dist/es/data/saga.js +8 -5
- package/dist/es/data/store.js +27 -44
- package/dist/es/data/wait-message/actions.js +11 -9
- package/dist/es/data/wait-message/reducer.js +10 -10
- package/dist/es/index.js +183 -84
- package/dist/es/route/index.js +16 -19
- package/dist/es/route/page-view.js +9 -9
- package/dist/es/route/private-route/index.js +30 -38
- package/dist/es/sideeffect/auth/index.js +27 -14
- package/dist/es/sideeffect/error-toast/index.js +15 -14
- package/dist/es/sideeffect/wait-message/index.js +18 -14
- package/dist/es/typings/styled.d.js +1 -1
- package/dist/es/utils/app-config/config.js +11 -9
- package/dist/es/utils/app-config/index.js +21 -31
- package/dist/es/utils/app-host-integration/react.js +8 -6
- package/dist/es/utils/auth/helper.js +8 -4
- package/dist/es/utils/auth/index.js +59 -83
- package/dist/es/utils/constants.js +18 -13
- package/dist/es/utils/font-size.js +7 -3
- package/dist/es/utils/guest-with-service.js +6 -7
- package/dist/es/utils/helpers.js +10 -6
- package/dist/es/utils/history.js +7 -3
- package/dist/es/utils/log-records.js +34 -31
- package/dist/es/utils/micro-frontend/console-logger.js +17 -13
- package/dist/es/utils/micro-frontend/guest.js +52 -108
- package/dist/es/utils/micro-frontend/host.js +53 -89
- package/dist/es/utils/micro-frontend/index.js +39 -37
- package/dist/es/utils/micro-frontend/types.js +0 -1
- package/dist/es/utils/redact-pii.js +10 -11
- package/dist/es/utils/service-worker.js +14 -11
- package/dist/es/utils/session.js +47 -48
- package/dist/es/utils/storybook/manager.js +8 -5
- package/dist/es/utils/storybook/preview.js +30 -26
- package/dist/es/utils/storybook/theme.js +9 -6
- package/dist/es/utils/testing/index.js +14 -21
- package/dist/es/utils/testing/render-with-redux.js +13 -13
- package/dist/es/utils/testing/render-with-router-redux.js +19 -21
- package/dist/es/utils/testing/render-with-router.js +14 -16
- package/dist/es/utils/testing/render-with-state-addons.js +18 -18
- package/dist/es/utils/url.js +7 -3
- package/dist/es/utils/web-storage.js +21 -17
- package/dist/es/utils/window.js +18 -18
- package/dist/es/view/app-root/hosted-app.js +13 -17
- package/dist/es/view/app-root/index.js +34 -39
- package/dist/es/view/app-root/stand-alone-app.js +17 -19
- package/dist/es/view/app-root/style.js +30 -5
- package/dist/es/view/error-boundary/default-error-template.js +4 -5
- package/dist/es/view/error-boundary/index.js +20 -27
- package/dist/es/view/error-toast/index.js +21 -16
- package/dist/es/view/fetch-host-app-data/index.js +13 -13
- package/dist/es/view/fetch-host-app-data/store.js +10 -7
- package/dist/es/view/fields/check-box/index.js +16 -18
- package/dist/es/view/fields/combo-box/index.js +19 -19
- package/dist/es/view/fields/connect-form.js +8 -6
- package/dist/es/view/fields/date-input/index.js +16 -14
- package/dist/es/view/fields/date-picker/index.js +16 -14
- package/dist/es/view/fields/form-item-layout/index.js +15 -16
- package/dist/es/view/fields/input-mask/index.js +20 -14
- package/dist/es/view/fields/large-text-box/index.js +16 -14
- package/dist/es/view/fields/radio/index.js +16 -18
- package/dist/es/view/fields/radio-group/index.js +14 -15
- package/dist/es/view/fields/text-box/index.js +16 -14
- package/dist/es/view/fields/watch-value.js +19 -24
- package/dist/es/view/form/index.js +22 -22
- package/dist/es/view/form/personal-info-section.js +31 -52
- package/dist/es/view/form/submit-button/index.js +12 -10
- package/dist/es/view/guest-unload-handlers/index.js +11 -10
- package/dist/es/view/header/center-region/index.js +40 -23
- package/dist/es/view/header/index.js +19 -19
- package/dist/es/view/header/logo-region/index.js +8 -9
- package/dist/es/view/header/nav-region/index.js +22 -15
- package/dist/es/view/header/nav-region/notification/index.js +5 -6
- package/dist/es/view/header/nav-region/user/index.js +5 -6
- package/dist/es/view/host-binding-events/index.js +7 -3
- package/dist/es/view/intro.stories.mdx +1 -1
- package/dist/es/view/live-message/index.js +13 -23
- package/dist/es/view/loadable/index.js +12 -15
- package/dist/es/view/login/index.js +14 -18
- package/dist/es/view/media-breakpoint/index.js +19 -17
- package/dist/es/view/message-to-host-app/index.js +11 -10
- package/dist/es/view/micro-app/app-factory/index.js +67 -86
- package/dist/es/view/micro-app/const.js +4 -1
- package/dist/es/view/micro-app/index.js +13 -11
- package/dist/es/view/micro-app/resources/manifest.js +19 -19
- package/dist/es/view/micro-app/resources/script.js +36 -36
- package/dist/es/view/micro-app/resources/style.js +23 -22
- package/dist/es/view/micro-app/types.js +0 -1
- package/dist/es/view/micro-app/use-app-will-render.js +32 -28
- package/dist/es/view/micro-app/utils.js +12 -14
- package/dist/es/view/micro-iframe-app/app.js +15 -22
- package/dist/es/view/micro-iframe-app/iframe/const.js +4 -1
- package/dist/es/view/micro-iframe-app/iframe/index.js +27 -32
- package/dist/es/view/micro-iframe-app/index.js +11 -12
- package/dist/es/view/micro-iframe-app/types.js +0 -1
- package/dist/es/view/micro-iframe-app/use-frame-loaded.js +16 -21
- package/dist/es/view/modals/error/index.js +12 -10
- package/dist/es/view/modals/navigation-prompt/index.js +12 -16
- package/dist/es/view/modals/session-expiry/customHooks.js +13 -15
- package/dist/es/view/modals/session-expiry/index.js +16 -24
- package/dist/es/view/modals/wait-message/html-wait-message.js +10 -10
- package/dist/es/view/modals/wait-message/index.js +31 -39
- package/dist/es/view/modals/wait-message/wait-message-launcher.js +9 -8
- package/dist/es/view/render-with-delay/index.js +7 -10
- package/dist/es/view/render-with-host-data/index.js +11 -15
- package/dist/es/view/session-timeout/index.js +21 -12
- package/dist/es/view/storybook/decorator.js +9 -7
- package/dist/es/view/use-previous.js +6 -3
- package/dist/es/view/useMediaBreakpoints/index.js +11 -9
- package/dist/es/view/visually-hidden/index.js +19 -10
- package/dist/es/view/window-size/index.js +12 -11
- package/dist/types/utils/storybook/main.d.cts +41 -0
- package/dist/types/utils/storybook/{middleware.d.ts → middleware.d.cts} +0 -0
- package/dist/types/utils/storybook/preview.d.ts +2 -2
- package/dist/types/utils/storybook/vite.d.cts +4 -0
- package/dist/types/utils/storybook/webpack.d.cts +8 -0
- package/dist/types/utils/window.d.ts +1 -1
- package/dist/types/view/visually-hidden/index.d.ts +1 -3
- package/package.json +6 -4
- package/dist/cjs/api/users/index.endpoint.js +0 -14
- package/dist/cjs/communication/http-client/tests/hello.endpoint.js +0 -14
- package/dist/cjs/communication/http-client/tests/private.endpoint.js +0 -14
- package/dist/cjs/view/error-toast/index.stories.js +0 -128
- package/dist/cjs/view/fields/check-box/index.stories.js +0 -64
- package/dist/cjs/view/fields/check-box/set-value.stories.js +0 -83
- package/dist/cjs/view/fields/combo-box/index.stories.js +0 -65
- package/dist/cjs/view/fields/date-input/index.stories.js +0 -53
- package/dist/cjs/view/fields/date-input/index1.stories.js +0 -53
- package/dist/cjs/view/fields/date-picker/index.stories.js +0 -53
- package/dist/cjs/view/fields/form-item-layout/index.stories.js +0 -43
- package/dist/cjs/view/fields/input-mask/index.stories.js +0 -52
- package/dist/cjs/view/fields/large-text-box/index.stories.js +0 -47
- package/dist/cjs/view/fields/radio/index.stories.js +0 -60
- package/dist/cjs/view/fields/radio/set-value.stories.js +0 -81
- package/dist/cjs/view/fields/radio-group/index.stories.js +0 -85
- package/dist/cjs/view/fields/text-box/index.stories.js +0 -48
- package/dist/cjs/view/form/index.stories.js +0 -71
- package/dist/cjs/view/form/usecases.stories.js +0 -59
- package/dist/cjs/view/header/index.stories.js +0 -24
- package/dist/cjs/view/live-message/index.stories.js +0 -53
- package/dist/cjs/view/media-breakpoint/index.stories.js +0 -24
- package/dist/cjs/view/modals/error/index.stories.js +0 -36
- package/dist/cjs/view/modals/navigation-prompt/index.stories.js +0 -32
- package/dist/cjs/view/modals/session-expiry/index.stories.js +0 -30
- package/dist/cjs/view/modals/wait-message/index.stories.js +0 -47
- package/dist/cjs/view/session-timeout/index.stories.js +0 -28
- package/dist/es/api/users/index.endpoint.js +0 -14
- package/dist/es/communication/http-client/tests/hello.endpoint.js +0 -14
- package/dist/es/communication/http-client/tests/private.endpoint.js +0 -14
- package/dist/es/utils/storybook/main.js +0 -38
- package/dist/es/utils/storybook/middleware.js +0 -9
- package/dist/es/view/error-toast/index.stories.js +0 -108
- package/dist/es/view/fields/check-box/index.stories.js +0 -47
- package/dist/es/view/fields/check-box/set-value.stories.js +0 -65
- package/dist/es/view/fields/combo-box/index.stories.js +0 -48
- package/dist/es/view/fields/date-input/index.stories.js +0 -35
- package/dist/es/view/fields/date-input/index1.stories.js +0 -35
- package/dist/es/view/fields/date-picker/index.stories.js +0 -35
- package/dist/es/view/fields/form-item-layout/index.stories.js +0 -27
- package/dist/es/view/fields/input-mask/index.stories.js +0 -35
- package/dist/es/view/fields/large-text-box/index.stories.js +0 -30
- package/dist/es/view/fields/radio/index.stories.js +0 -43
- package/dist/es/view/fields/radio/set-value.stories.js +0 -63
- package/dist/es/view/fields/radio-group/index.stories.js +0 -68
- package/dist/es/view/fields/text-box/index.stories.js +0 -31
- package/dist/es/view/form/index.stories.js +0 -56
- package/dist/es/view/form/usecases.stories.js +0 -43
- package/dist/es/view/header/index.stories.js +0 -14
- package/dist/es/view/live-message/index.stories.js +0 -32
- package/dist/es/view/media-breakpoint/index.stories.js +0 -10
- package/dist/es/view/modals/error/index.stories.js +0 -21
- package/dist/es/view/modals/navigation-prompt/index.stories.js +0 -18
- package/dist/es/view/modals/session-expiry/index.stories.js +0 -18
- package/dist/es/view/modals/wait-message/index.stories.js +0 -33
- package/dist/es/view/session-timeout/index.stories.js +0 -13
- package/dist/types/utils/storybook/main.d.ts +0 -30
- package/dist/types/view/fields/date-input/index1.stories.d.ts +0 -24
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
__markAsModule(target);
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, module2, desc) => {
|
|
14
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(module2))
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __toModule = (module2) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
|
+
};
|
|
24
|
+
__export(exports, {
|
|
25
|
+
getAppDynamicsUserData: () => getAppDynamicsUserData,
|
|
26
|
+
setAppDynamicsUserData: () => setAppDynamicsUserData
|
|
5
27
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var brum = _interopRequireWildcard(require("@elliemae/pui-user-monitoring"));
|
|
9
|
-
|
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
|
|
12
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
|
|
28
|
+
var brum = __toModule(require("@elliemae/pui-user-monitoring"));
|
|
14
29
|
let userData = {
|
|
15
|
-
envName:
|
|
16
|
-
appId:
|
|
17
|
-
instanceId:
|
|
18
|
-
userId:
|
|
30
|
+
envName: "localhost",
|
|
31
|
+
appId: "",
|
|
32
|
+
instanceId: "",
|
|
33
|
+
userId: ""
|
|
19
34
|
};
|
|
20
|
-
|
|
21
35
|
const getAppDynamicsUserData = () => userData;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const setAppDynamicsUserData = params => {
|
|
26
|
-
userData = { ...userData,
|
|
27
|
-
...params
|
|
28
|
-
};
|
|
29
|
-
|
|
36
|
+
const setAppDynamicsUserData = (params) => {
|
|
37
|
+
userData = { ...userData, ...params };
|
|
30
38
|
if (brum) {
|
|
31
|
-
brum.setCustomUserData(() => ({
|
|
32
|
-
userData
|
|
33
|
-
}));
|
|
39
|
+
brum.setCustomUserData(() => ({ userData }));
|
|
34
40
|
}
|
|
35
41
|
};
|
|
36
|
-
|
|
37
|
-
exports.setAppDynamicsUserData = setAppDynamicsUserData;
|
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
__markAsModule(target);
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, module2, desc) => {
|
|
14
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(module2))
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __toModule = (module2) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
|
+
};
|
|
24
|
+
__export(exports, {
|
|
25
|
+
sendBAEvent: () => sendBAEvent
|
|
5
26
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _redactPii = require("../utils/redact-pii.js");
|
|
13
|
-
|
|
14
|
-
const sendBAEventToSelf = data => {
|
|
15
|
-
const redactedData = (0, _redactPii.redactPii)(data);
|
|
27
|
+
var import_guest = __toModule(require("../utils/micro-frontend/guest"));
|
|
28
|
+
var import_web_analytics = __toModule(require("./web-analytics"));
|
|
29
|
+
var import_redact_pii = __toModule(require("../utils/redact-pii"));
|
|
30
|
+
const sendBAEventToSelf = (data) => {
|
|
31
|
+
const redactedData = (0, import_redact_pii.redactPii)(data);
|
|
16
32
|
window.gtmDataLayer = window.gtmDataLayer || [];
|
|
17
33
|
window.gtmDataLayer.push(redactedData);
|
|
18
34
|
};
|
|
19
|
-
|
|
20
35
|
const sendBAEvent = ({
|
|
21
36
|
data,
|
|
22
37
|
self = true
|
|
23
38
|
}) => {
|
|
24
|
-
const eventData = { ...(0,
|
|
25
|
-
...data
|
|
26
|
-
};
|
|
27
|
-
|
|
39
|
+
const eventData = { ...(0, import_web_analytics.getBAEventParameters)(), ...data };
|
|
28
40
|
if (!self) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
32
|
-
const sendEvent = (_CMicroAppGuest$getIn = _guest.CMicroAppGuest.getInstance()) === null || _CMicroAppGuest$getIn === void 0 ? void 0 : (_CMicroAppGuest$getIn2 = _CMicroAppGuest$getIn.getHost()) === null || _CMicroAppGuest$getIn2 === void 0 ? void 0 : _CMicroAppGuest$getIn2.sendBAEvent;
|
|
33
|
-
|
|
41
|
+
const sendEvent = import_guest.CMicroAppGuest.getInstance()?.getHost()?.sendBAEvent;
|
|
34
42
|
if (sendEvent) {
|
|
35
43
|
sendEvent(eventData);
|
|
36
44
|
} else {
|
|
@@ -40,5 +48,3 @@ const sendBAEvent = ({
|
|
|
40
48
|
sendBAEventToSelf(eventData);
|
|
41
49
|
}
|
|
42
50
|
};
|
|
43
|
-
|
|
44
|
-
exports.sendBAEvent = sendBAEvent;
|
|
@@ -1,32 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
__markAsModule(target);
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, module2, desc) => {
|
|
14
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(module2))
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __toModule = (module2) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
|
+
};
|
|
24
|
+
__export(exports, {
|
|
25
|
+
pageViewEvent: () => pageViewEvent
|
|
5
26
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
} =
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
-
href: guestPageUrl
|
|
23
|
-
} = window.location;
|
|
24
|
-
const {
|
|
25
|
-
title: guestPageTitle
|
|
26
|
-
} = document;
|
|
27
|
-
(0, _index.sendBAEvent)({
|
|
27
|
+
var import__ = __toModule(require("."));
|
|
28
|
+
const getWindow = () => {
|
|
29
|
+
try {
|
|
30
|
+
window.top?.document;
|
|
31
|
+
return window.top || window.self;
|
|
32
|
+
} catch (e) {
|
|
33
|
+
return window.self;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const pageViewEvent = ({ pageTitle }) => {
|
|
37
|
+
const pageWindow = getWindow();
|
|
38
|
+
const { pathname, href } = pageWindow.location;
|
|
39
|
+
const { title } = pageWindow.document;
|
|
40
|
+
const { pathname: guestPagePath, href: guestPageUrl } = window.location;
|
|
41
|
+
const { title: guestPageTitle } = document;
|
|
42
|
+
(0, import__.sendBAEvent)({
|
|
28
43
|
data: {
|
|
29
|
-
event:
|
|
44
|
+
event: "pageView",
|
|
30
45
|
pageUrl: href,
|
|
31
46
|
pagePath: pathname,
|
|
32
47
|
pageTitle: title,
|
|
@@ -36,5 +51,3 @@ const pageViewEvent = ({
|
|
|
36
51
|
}
|
|
37
52
|
});
|
|
38
53
|
};
|
|
39
|
-
|
|
40
|
-
exports.pageViewEvent = pageViewEvent;
|
|
@@ -1,41 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
__markAsModule(target);
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, module2, desc) => {
|
|
14
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(module2))
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __toModule = (module2) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
|
+
};
|
|
24
|
+
__export(exports, {
|
|
25
|
+
loginEvent: () => loginEvent,
|
|
26
|
+
logoutEvent: () => logoutEvent
|
|
5
27
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _index = require("./index.js");
|
|
9
|
-
|
|
10
|
-
var _webAnalytics = require("./web-analytics.js");
|
|
11
|
-
|
|
28
|
+
var import__ = __toModule(require("."));
|
|
29
|
+
var import_web_analytics = __toModule(require("./web-analytics"));
|
|
12
30
|
const loginEvent = ({
|
|
13
31
|
instanceId,
|
|
14
32
|
userId
|
|
15
33
|
}) => {
|
|
16
|
-
(0,
|
|
17
|
-
|
|
18
|
-
userId
|
|
19
|
-
});
|
|
20
|
-
(0, _index.sendBAEvent)({
|
|
34
|
+
(0, import_web_analytics.updateBAEventParameters)({ instanceId, userId });
|
|
35
|
+
(0, import__.sendBAEvent)({
|
|
21
36
|
data: {
|
|
22
|
-
event:
|
|
37
|
+
event: "login"
|
|
23
38
|
}
|
|
24
39
|
});
|
|
25
40
|
};
|
|
26
|
-
|
|
27
|
-
exports.loginEvent = loginEvent;
|
|
28
|
-
|
|
29
41
|
const logoutEvent = () => {
|
|
30
|
-
(0,
|
|
42
|
+
(0, import__.sendBAEvent)({
|
|
31
43
|
data: {
|
|
32
|
-
event:
|
|
44
|
+
event: "logout"
|
|
33
45
|
}
|
|
34
46
|
});
|
|
35
|
-
(0,
|
|
36
|
-
instanceId: '',
|
|
37
|
-
userId: ''
|
|
38
|
-
});
|
|
47
|
+
(0, import_web_analytics.updateBAEventParameters)({ instanceId: "", userId: "" });
|
|
39
48
|
};
|
|
40
|
-
|
|
41
|
-
exports.logoutEvent = logoutEvent;
|
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
__markAsModule(target);
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, module2, desc) => {
|
|
14
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(module2))
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __toModule = (module2) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
|
+
};
|
|
24
|
+
__export(exports, {
|
|
25
|
+
waitEndEvent: () => waitEndEvent,
|
|
26
|
+
waitStartEvent: () => waitStartEvent
|
|
5
27
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _index = require("./index.js");
|
|
9
|
-
|
|
10
|
-
const waitStartEvent = () => (0, _index.sendBAEvent)({
|
|
28
|
+
var import__ = __toModule(require("."));
|
|
29
|
+
const waitStartEvent = () => (0, import__.sendBAEvent)({
|
|
11
30
|
data: {
|
|
12
|
-
event:
|
|
31
|
+
event: "pageInteractionEnabled"
|
|
13
32
|
}
|
|
14
33
|
});
|
|
15
|
-
|
|
16
|
-
exports.waitStartEvent = waitStartEvent;
|
|
17
|
-
|
|
18
|
-
const waitEndEvent = () => (0, _index.sendBAEvent)({
|
|
34
|
+
const waitEndEvent = () => (0, import__.sendBAEvent)({
|
|
19
35
|
data: {
|
|
20
|
-
event:
|
|
36
|
+
event: "pageInteractionDisabled"
|
|
21
37
|
}
|
|
22
38
|
});
|
|
23
|
-
|
|
24
|
-
exports.waitEndEvent = waitEndEvent;
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
3
|
+
var __export = (target, all) => {
|
|
4
|
+
__markAsModule(target);
|
|
5
|
+
for (var name in all)
|
|
6
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
7
|
+
};
|
|
8
|
+
__export(exports, {
|
|
9
|
+
getBAEventParameters: () => getBAEventParameters,
|
|
10
|
+
updateBAEventParameters: () => updateBAEventParameters
|
|
5
11
|
});
|
|
6
|
-
exports.updateBAEventParameters = exports.getBAEventParameters = void 0;
|
|
7
12
|
let baEventParameters = {
|
|
8
|
-
envName:
|
|
9
|
-
appId:
|
|
10
|
-
instanceId:
|
|
11
|
-
userId:
|
|
13
|
+
envName: "localhost",
|
|
14
|
+
appId: "",
|
|
15
|
+
instanceId: "",
|
|
16
|
+
userId: ""
|
|
12
17
|
};
|
|
13
|
-
|
|
14
18
|
const getBAEventParameters = () => baEventParameters;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const updateBAEventParameters = params => {
|
|
19
|
-
baEventParameters = { ...baEventParameters,
|
|
20
|
-
...params
|
|
21
|
-
};
|
|
19
|
+
const updateBAEventParameters = (params) => {
|
|
20
|
+
baEventParameters = { ...baEventParameters, ...params };
|
|
22
21
|
};
|
|
23
|
-
|
|
24
|
-
exports.updateBAEventParameters = updateBAEventParameters;
|
|
@@ -1,56 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
__markAsModule(target);
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, module2, desc) => {
|
|
14
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(module2))
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __toModule = (module2) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
|
+
};
|
|
24
|
+
__export(exports, {
|
|
25
|
+
getToken: () => getToken,
|
|
26
|
+
introspectToken: () => introspectToken,
|
|
27
|
+
revokeToken: () => revokeToken
|
|
5
28
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _index = require("../../communication/http-client/index.js");
|
|
9
|
-
|
|
29
|
+
var import_http_client = __toModule(require("../../communication/http-client"));
|
|
10
30
|
const getToken = async ({
|
|
11
31
|
clientId,
|
|
12
32
|
redirectUri,
|
|
13
33
|
idpCode
|
|
14
34
|
}) => {
|
|
15
35
|
const params = new URLSearchParams();
|
|
16
|
-
params.append(
|
|
17
|
-
params.append(
|
|
18
|
-
params.append(
|
|
19
|
-
params.append(
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
-
} = await (0, _index.getHTTPClient)().post('/oauth2/v1/token', params);
|
|
23
|
-
return {
|
|
24
|
-
tokenType: data.token_type,
|
|
25
|
-
accessToken: data.access_token
|
|
26
|
-
};
|
|
36
|
+
params.append("grant_type", "authorization_code");
|
|
37
|
+
params.append("client_id", clientId);
|
|
38
|
+
params.append("redirect_uri", redirectUri);
|
|
39
|
+
params.append("code", idpCode);
|
|
40
|
+
const { data } = await (0, import_http_client.getHTTPClient)().post("/oauth2/v1/token", params);
|
|
41
|
+
return { tokenType: data.token_type, accessToken: data.access_token };
|
|
27
42
|
};
|
|
28
|
-
|
|
29
|
-
exports.getToken = getToken;
|
|
30
|
-
|
|
31
|
-
const revokeToken = async ({
|
|
32
|
-
clientId,
|
|
33
|
-
token
|
|
34
|
-
}) => {
|
|
43
|
+
const revokeToken = async ({ clientId, token }) => {
|
|
35
44
|
const params = new URLSearchParams();
|
|
36
|
-
params.append(
|
|
37
|
-
params.append(
|
|
38
|
-
await (0,
|
|
45
|
+
params.append("token", token);
|
|
46
|
+
params.append("client_id", clientId);
|
|
47
|
+
await (0, import_http_client.getHTTPClient)().post("/oauth2/v1/token/revocation", params);
|
|
39
48
|
};
|
|
40
|
-
|
|
41
|
-
exports.revokeToken = revokeToken;
|
|
42
|
-
|
|
43
49
|
const introspectToken = async ({
|
|
44
50
|
clientId,
|
|
45
51
|
accessToken
|
|
46
52
|
}) => {
|
|
47
53
|
const params = new URLSearchParams();
|
|
48
|
-
params.append(
|
|
49
|
-
params.append(
|
|
50
|
-
const {
|
|
51
|
-
data
|
|
52
|
-
} = await (0, _index.getHTTPClient)().post('/oauth2/v1/token/introspection', params);
|
|
54
|
+
params.append("token", accessToken);
|
|
55
|
+
params.append("client_id", clientId);
|
|
56
|
+
const { data } = await (0, import_http_client.getHTTPClient)().post("/oauth2/v1/token/introspection", params);
|
|
53
57
|
return data;
|
|
54
58
|
};
|
|
55
|
-
|
|
56
|
-
exports.introspectToken = introspectToken;
|
package/dist/cjs/api/helpers.js
CHANGED
|
@@ -1,101 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
__markAsModule(target);
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, module2, desc) => {
|
|
14
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(module2))
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __toModule = (module2) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
|
+
};
|
|
24
|
+
__export(exports, {
|
|
25
|
+
getApiActionCreator: () => getApiActionCreator,
|
|
26
|
+
getSelectField: () => getSelectField
|
|
7
27
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @function
|
|
16
|
-
* @description Creates API Redux Action Creators
|
|
17
|
-
* ## Examples
|
|
18
|
-
* ```javascript
|
|
19
|
-
* import { getApiActionCreator } from '@elliemae/pui-app-sdk';
|
|
20
|
-
* const loansActionCreator = getApiActionCreator('loans');
|
|
21
|
-
*
|
|
22
|
-
* export const loans = {
|
|
23
|
-
* ...loansActionCreator('create'),
|
|
24
|
-
* ...loansActionCreator('get'),
|
|
25
|
-
* ...loansActionCreator('save'),
|
|
26
|
-
* };
|
|
27
|
-
*
|
|
28
|
-
* const loansSlice = createSlice({
|
|
29
|
-
* name: 'loans',
|
|
30
|
-
* initialState: [],
|
|
31
|
-
* reducers: {
|
|
32
|
-
* getSuccess: (state, { payload }) => {
|
|
33
|
-
* state.push(...payload);
|
|
34
|
-
* },
|
|
35
|
-
* saveSuccess: (state, { payload }) => {
|
|
36
|
-
* state.push(payload);
|
|
37
|
-
* },
|
|
38
|
-
* },
|
|
39
|
-
* });
|
|
40
|
-
* ```
|
|
41
|
-
* @param {string} api API name for which Redux Action Creators are required
|
|
42
|
-
* @returns {Function} Redux Action Creators util function
|
|
43
|
-
*/
|
|
44
|
-
const getApiActionCreator = api => operation => ({
|
|
45
|
-
[operation]: (0, _toolkit.createAction)(`${api}/${operation}`),
|
|
46
|
-
[`${operation}Success`]: (0, _toolkit.createAction)(`${api}/${operation}Success`),
|
|
47
|
-
[`${operation}Error`]: (0, _toolkit.createAction)(`${api}/${operation}Error`)
|
|
28
|
+
var import_toolkit = __toModule(require("@reduxjs/toolkit"));
|
|
29
|
+
var import_lodash = __toModule(require("lodash"));
|
|
30
|
+
const getApiActionCreator = (api) => (operation) => ({
|
|
31
|
+
[operation]: (0, import_toolkit.createAction)(`${api}/${operation}`),
|
|
32
|
+
[`${operation}Success`]: (0, import_toolkit.createAction)(`${api}/${operation}Success`),
|
|
33
|
+
[`${operation}Error`]: (0, import_toolkit.createAction)(`${api}/${operation}Error`)
|
|
48
34
|
});
|
|
49
|
-
|
|
50
|
-
* Why use this? It will prevent unnecessary rerenders hence improving performance, it also reduces the amount of code needed to select data from the store
|
|
51
|
-
* hence making it easier and keeping your codebase smaller and easier to maintain.
|
|
52
|
-
*
|
|
53
|
-
* For this to work as expected, ensure you always select ONLY what you need. Don't select state objects that contain fields that you won't use, if you do so
|
|
54
|
-
* then everytime any of those gets updated it will trigger a rerender even though you're not actually using that field.
|
|
55
|
-
*
|
|
56
|
-
* @description Generic Redux State Selector Helper.
|
|
57
|
-
* ### Example
|
|
58
|
-
* ```javascript
|
|
59
|
-
* // reducer.js
|
|
60
|
-
* import { getSelectField } from 'elliemae/pui-app-sdk';
|
|
61
|
-
*
|
|
62
|
-
* const name = 'someState';
|
|
63
|
-
* export selectSomeState = getSelectField(name);
|
|
64
|
-
*
|
|
65
|
-
* // use-some-state.js hook. NOTE: You can create a hook for each main state
|
|
66
|
-
* import { selectSomeState } from 'slices/some-slice';
|
|
67
|
-
* import { useSelector, shallowEqual } from 'react-redux';
|
|
68
|
-
*
|
|
69
|
-
* export const useSelectSomeState = (fieldName, defaultValue) => useSelector(selectSomeState(fieldName, defaultValue), shallowEqual);
|
|
70
|
-
*
|
|
71
|
-
* // some-component.js
|
|
72
|
-
* import { useSelectSomeState } from 'custom-hooks/state-selectors.js'
|
|
73
|
-
*
|
|
74
|
-
* export const SomeComponent = () => {
|
|
75
|
-
* const someField = useSelectSomeState('someField');
|
|
76
|
-
* ...
|
|
77
|
-
* }
|
|
78
|
-
* export const SomeOtherComponent = () => {
|
|
79
|
-
* const someSubField = useSelectSomeState('someField.someSubField');
|
|
80
|
-
* ...
|
|
81
|
-
* }
|
|
82
|
-
* export const AnotherComponent = () => {
|
|
83
|
-
* const [firstField, secondField, thirdField] = useSelectSomeState(['firstField', 'secondField', 'thirdField']);
|
|
84
|
-
* ...
|
|
85
|
-
* }
|
|
86
|
-
*
|
|
87
|
-
* ```
|
|
88
|
-
* @param {string} stateName the redux store's state name of the state you want to access.
|
|
89
|
-
* @returns {Function} A *selectField* function that returns a selector function to be used inside a *useSelector* hook or a *select* side effect
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
/* eslint-disable prettier/prettier */
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
exports.getApiActionCreator = getApiActionCreator;
|
|
96
|
-
|
|
97
|
-
const getSelectField = stateName => (fieldName = '', defaultValue) => (state = {}, stateValue = (0, _get2.default)(state, stateName)) => Array.isArray(fieldName) ? fieldName.map((field, i) => (0, _get2.default)(stateValue, field, Array.isArray(defaultValue) ? defaultValue[i] : defaultValue)) : (0, _get2.default)(stateValue, fieldName, defaultValue);
|
|
98
|
-
/* eslint-enable prettier/prettier */
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
exports.getSelectField = getSelectField;
|
|
35
|
+
const getSelectField = (stateName) => (fieldName = "", defaultValue) => (state = {}, stateValue = (0, import_lodash.get)(state, stateName)) => Array.isArray(fieldName) ? fieldName.map((field, i) => (0, import_lodash.get)(stateValue, field, Array.isArray(defaultValue) ? defaultValue[i] : defaultValue)) : (0, import_lodash.get)(stateValue, fieldName, defaultValue);
|