@elliemae/pui-app-sdk 4.0.0-beta.4 → 4.0.0
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/README.md +6 -2
- package/dist/cjs/analytics/appdynamics.js +6 -16
- package/dist/cjs/analytics/index.js +2 -15
- package/dist/cjs/analytics/page-view-event.js +1 -0
- package/dist/cjs/analytics/user-session-event.js +1 -0
- package/dist/cjs/analytics/user-wait-event.js +1 -0
- package/dist/cjs/analytics/web-analytics.js +2 -15
- package/dist/cjs/api/auth/index.js +9 -2
- package/dist/cjs/api/helpers.js +8 -1
- package/dist/cjs/api/users/index.js +4 -1
- package/dist/cjs/communication/http-client/index.js +14 -43
- package/dist/cjs/communication/http-client/request-interceptor.js +1 -0
- package/dist/cjs/communication/http-client/response-interceptor.js +5 -1
- package/dist/cjs/communication/http-client/retry-axios.js +5 -1
- package/dist/cjs/communication/http-client/retry.js +1 -0
- package/dist/cjs/data/auth/actions.js +1 -0
- package/dist/cjs/data/auth/reducer.js +15 -8
- package/dist/cjs/data/breakpoint/index.js +5 -1
- package/dist/cjs/data/error/index.js +1 -0
- package/dist/cjs/data/index.js +2 -0
- package/dist/cjs/data/live-message/index.js +1 -0
- package/dist/cjs/data/logout/actions.js +1 -0
- package/dist/cjs/data/navigation-prompt/actions.js +1 -0
- package/dist/cjs/data/react-redux.js +1 -0
- package/dist/cjs/data/reducers.js +5 -17
- package/dist/cjs/data/saga.js +1 -0
- package/dist/cjs/data/store.js +11 -2
- package/dist/cjs/data/wait-message/actions.js +1 -0
- package/dist/cjs/data/wait-message/reducer.js +5 -1
- package/dist/cjs/data/webpack-hmr.js +1 -0
- package/dist/cjs/index.js +13 -1
- package/dist/cjs/micro-frontend.js +1 -0
- package/dist/cjs/sideeffect/auth/index.js +7 -21
- package/dist/cjs/sideeffect/error-toast/index.js +7 -20
- package/dist/cjs/sideeffect/wait-message/index.js +13 -23
- package/dist/cjs/utils/app-config/config.js +5 -1
- package/dist/cjs/utils/app-config/index.js +12 -4
- package/dist/cjs/utils/app-host-integration/react.js +1 -0
- package/dist/cjs/utils/auth/helper.js +5 -1
- package/dist/cjs/utils/auth/index.js +13 -25
- package/dist/cjs/utils/await.js +1 -0
- package/dist/cjs/utils/constants.js +1 -0
- package/dist/cjs/utils/font-size.js +1 -0
- package/dist/cjs/utils/guest-with-service.js +1 -0
- package/dist/cjs/utils/helpers.js +2 -1
- package/dist/cjs/utils/history.js +1 -0
- package/dist/cjs/utils/log-records.js +1 -0
- package/dist/cjs/utils/micro-frontend/console-logger.js +1 -0
- package/dist/cjs/utils/micro-frontend/guest.js +17 -18
- package/dist/cjs/utils/micro-frontend/host.js +14 -2
- package/dist/cjs/utils/micro-frontend/index.js +28 -10
- package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +55 -0
- package/dist/cjs/utils/micro-frontend/types.js +1 -0
- package/dist/cjs/utils/redact-pii.js +9 -2
- package/dist/cjs/utils/service-worker.js +4 -2
- package/dist/cjs/utils/session.js +15 -4
- package/dist/cjs/utils/storybook/cjs/main.js +1 -0
- package/dist/cjs/utils/storybook/cjs/middleware.js +1 -0
- package/dist/cjs/utils/storybook/cjs/vite.js +1 -0
- package/dist/cjs/utils/storybook/cjs/webpack.js +2 -4
- package/dist/cjs/utils/storybook/manager.js +1 -0
- package/dist/cjs/utils/storybook/preview.js +2 -1
- package/dist/cjs/utils/storybook/theme.js +10 -39
- package/dist/cjs/utils/testing/index.js +7 -22
- package/dist/cjs/utils/testing/render-with-redux.js +7 -24
- package/dist/cjs/utils/testing/render-with-router-redux.js +12 -26
- package/dist/cjs/utils/testing/render-with-router.js +9 -26
- package/dist/cjs/utils/testing/render-with-state-addons.js +15 -45
- package/dist/cjs/utils/types.js +1 -0
- package/dist/cjs/utils/url.js +1 -0
- package/dist/cjs/utils/web-storage.js +5 -1
- package/dist/cjs/utils/window.js +9 -2
- package/dist/cjs/view/app-root/hosted-app.js +14 -3
- package/dist/cjs/view/app-root/index.js +29 -31
- package/dist/cjs/view/app-root/stand-alone-app.js +18 -3
- package/dist/cjs/view/app-root/style.js +1 -0
- package/dist/cjs/view/app-router.js +7 -37
- package/dist/cjs/view/breakpoint/use-breakpoint.js +10 -5
- package/dist/cjs/view/breakpoint/use-media-query-list.js +4 -1
- package/dist/cjs/view/error-boundary/default-error-template.js +12 -5
- package/dist/cjs/view/error-boundary/index.js +10 -21
- package/dist/cjs/view/error-toast/index.js +11 -23
- package/dist/cjs/view/fetch-host-app-data/index.js +5 -1
- package/dist/cjs/view/fetch-host-app-data/store.js +2 -15
- package/dist/cjs/view/fields/autocomplete/index.js +47 -0
- package/dist/cjs/view/fields/check-box/index.js +11 -46
- package/dist/cjs/view/fields/combo-box/index.js +19 -57
- package/dist/cjs/view/fields/combo-box-v3/index.js +42 -0
- package/dist/cjs/view/fields/connect-form.js +4 -15
- package/dist/cjs/view/fields/date-input/index.js +16 -47
- package/dist/cjs/view/fields/date-picker/index.js +20 -45
- package/dist/cjs/view/fields/date-range-picker/index.js +63 -0
- package/dist/cjs/view/fields/date-time-picker/index.js +42 -0
- package/dist/cjs/view/fields/form-item-layout/index.js +10 -38
- package/dist/cjs/view/fields/form-layout-block-item/index.js +14 -44
- package/dist/cjs/view/fields/input-mask/index.js +28 -47
- package/dist/cjs/view/fields/input-text/index.js +40 -0
- package/dist/cjs/view/fields/large-text-box/index.js +16 -47
- package/dist/cjs/view/fields/radio/index.js +18 -56
- package/dist/cjs/view/fields/radio-group/index.js +11 -46
- package/dist/cjs/view/fields/text-box/index.js +16 -47
- package/dist/cjs/view/fields/toggle/index.js +43 -0
- package/dist/cjs/view/fields/watch-value.js +26 -3
- package/dist/cjs/view/form/index.js +14 -19
- package/dist/cjs/view/form/personal-info-section.js +55 -47
- package/dist/cjs/view/form/submit-button/index.js +6 -37
- package/dist/cjs/view/guest-unload-handlers/index.js +1 -0
- package/dist/cjs/view/host-binding-events/index.js +1 -0
- package/dist/cjs/view/live-message/index.js +3 -5
- package/dist/cjs/view/loadable/index.js +9 -22
- package/dist/cjs/view/login/index.js +15 -3
- package/dist/cjs/view/message-to-host-app/index.js +1 -0
- package/dist/cjs/view/micro-app/app-factory/index.js +11 -21
- package/dist/cjs/view/micro-app/const.js +1 -0
- package/dist/cjs/view/micro-app/index.js +7 -3
- package/dist/cjs/view/micro-app/resources/manifest.js +11 -3
- package/dist/cjs/view/micro-app/resources/script.js +8 -2
- package/dist/cjs/view/micro-app/resources/style.js +8 -2
- package/dist/cjs/view/micro-app/types.js +1 -0
- package/dist/cjs/view/micro-app/use-app-will-render.js +38 -44
- package/dist/cjs/view/micro-app/utils.js +1 -0
- package/dist/cjs/view/micro-iframe-app/app.js +24 -47
- package/dist/cjs/view/micro-iframe-app/iframe/const.js +1 -0
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +23 -32
- package/dist/cjs/view/micro-iframe-app/index.js +6 -37
- package/dist/cjs/view/micro-iframe-app/types.js +1 -0
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +1 -0
- package/dist/cjs/view/modals/error/index.js +22 -12
- package/dist/cjs/view/modals/navigation-prompt/index.js +47 -27
- package/dist/cjs/view/modals/session-expiry/customHooks.js +7 -2
- package/dist/cjs/view/modals/session-expiry/index.js +58 -35
- package/dist/cjs/view/modals/wait-message/index.js +26 -58
- package/dist/cjs/view/modals/wait-message/use-html-wait-message.js +1 -0
- package/dist/cjs/view/modals/wait-message/wait-message-launcher.js +1 -0
- package/dist/cjs/view/page.js +16 -3
- package/dist/cjs/view/render-with-delay/index.js +5 -5
- package/dist/cjs/view/render-with-host-data/index.js +3 -5
- package/dist/cjs/view/require-auth.js +22 -9
- package/dist/cjs/view/session-timeout/index.js +16 -14
- package/dist/cjs/view/storybook/decorator.js +6 -7
- package/dist/cjs/view/use-previous.js +1 -0
- package/dist/cjs/view/use-window-size-change.js +1 -0
- package/dist/cjs/view/visually-hidden/index.js +12 -19
- package/dist/esm/analytics/appdynamics.js +1 -17
- package/dist/esm/analytics/index.js +1 -17
- package/dist/esm/analytics/web-analytics.js +1 -17
- package/dist/esm/api/auth/index.js +8 -2
- package/dist/esm/api/helpers.js +7 -1
- package/dist/esm/api/users/index.js +3 -1
- package/dist/esm/communication/http-client/index.js +9 -44
- package/dist/esm/data/auth/reducer.js +10 -7
- package/dist/esm/data/index.js +6 -1
- package/dist/esm/data/reducers.js +4 -19
- package/dist/esm/data/store.js +6 -1
- package/dist/esm/index.js +14 -1
- package/dist/esm/sideeffect/auth/index.js +6 -23
- package/dist/esm/sideeffect/error-toast/index.js +6 -22
- package/dist/esm/sideeffect/wait-message/index.js +12 -25
- package/dist/esm/utils/app-config/index.js +7 -3
- package/dist/esm/utils/auth/index.js +12 -27
- package/dist/esm/utils/helpers.js +1 -1
- package/dist/esm/utils/micro-frontend/guest.js +12 -17
- package/dist/esm/utils/micro-frontend/host.js +13 -2
- package/dist/esm/utils/micro-frontend/index.js +23 -9
- package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +29 -0
- package/dist/esm/utils/redact-pii.js +8 -2
- package/dist/esm/utils/service-worker.js +3 -2
- package/dist/esm/utils/session.js +14 -4
- package/dist/esm/utils/storybook/preview.js +1 -1
- package/dist/esm/utils/storybook/theme.js +9 -41
- package/dist/esm/utils/testing/index.js +6 -21
- package/dist/esm/utils/testing/render-with-redux.js +6 -23
- package/dist/esm/utils/testing/render-with-router-redux.js +11 -25
- package/dist/esm/utils/testing/render-with-router.js +8 -25
- package/dist/esm/utils/testing/render-with-state-addons.js +14 -44
- package/dist/esm/utils/window.js +8 -2
- package/dist/esm/view/app-root/hosted-app.js +9 -2
- package/dist/esm/view/app-root/index.js +28 -30
- package/dist/esm/view/app-root/stand-alone-app.js +13 -2
- package/dist/esm/view/app-router.js +6 -36
- package/dist/esm/view/breakpoint/use-breakpoint.js +9 -5
- package/dist/esm/view/breakpoint/use-media-query-list.js +3 -1
- package/dist/esm/view/error-boundary/default-error-template.js +11 -2
- package/dist/esm/view/error-boundary/index.js +5 -22
- package/dist/esm/view/error-toast/index.js +10 -22
- package/dist/esm/view/fetch-host-app-data/store.js +1 -17
- package/dist/esm/view/fields/autocomplete/index.js +27 -0
- package/dist/esm/view/fields/check-box/index.js +10 -45
- package/dist/esm/view/fields/combo-box/index.js +18 -56
- package/dist/esm/view/fields/combo-box-v3/index.js +24 -0
- package/dist/esm/view/fields/connect-form.js +3 -17
- package/dist/esm/view/fields/date-input/index.js +15 -46
- package/dist/esm/view/fields/date-picker/index.js +15 -46
- package/dist/esm/view/fields/date-range-picker/index.js +45 -0
- package/dist/esm/view/fields/date-time-picker/index.js +24 -0
- package/dist/esm/view/fields/form-item-layout/index.js +9 -37
- package/dist/esm/view/fields/form-layout-block-item/index.js +13 -43
- package/dist/esm/view/fields/input-mask/index.js +27 -46
- package/dist/esm/view/fields/input-text/index.js +22 -0
- package/dist/esm/view/fields/large-text-box/index.js +15 -46
- package/dist/esm/view/fields/radio/index.js +17 -55
- package/dist/esm/view/fields/radio-group/index.js +10 -45
- package/dist/esm/view/fields/text-box/index.js +15 -46
- package/dist/esm/view/fields/toggle/index.js +25 -0
- package/dist/esm/view/fields/watch-value.js +21 -2
- package/dist/esm/view/form/index.js +9 -20
- package/dist/esm/view/form/personal-info-section.js +50 -46
- package/dist/esm/view/form/submit-button/index.js +5 -36
- package/dist/esm/view/live-message/index.js +2 -2
- package/dist/esm/view/loadable/index.js +8 -21
- package/dist/esm/view/login/index.js +15 -4
- package/dist/esm/view/micro-app/app-factory/index.js +10 -23
- package/dist/esm/view/micro-app/index.js +2 -2
- package/dist/esm/view/micro-app/resources/manifest.js +10 -3
- package/dist/esm/view/micro-app/resources/script.js +7 -2
- package/dist/esm/view/micro-app/resources/style.js +7 -2
- package/dist/esm/view/micro-app/use-app-will-render.js +37 -46
- package/dist/esm/view/micro-iframe-app/app.js +19 -48
- package/dist/esm/view/micro-iframe-app/iframe/index.js +18 -33
- package/dist/esm/view/micro-iframe-app/index.js +5 -36
- package/dist/esm/view/modals/error/index.js +21 -9
- package/dist/esm/view/modals/navigation-prompt/index.js +46 -24
- package/dist/esm/view/modals/session-expiry/customHooks.js +6 -2
- package/dist/esm/view/modals/session-expiry/index.js +57 -32
- package/dist/esm/view/modals/wait-message/index.js +25 -57
- package/dist/esm/view/page.js +11 -2
- package/dist/esm/view/render-with-delay/index.js +4 -2
- package/dist/esm/view/render-with-host-data/index.js +2 -2
- package/dist/esm/view/require-auth.js +18 -9
- package/dist/esm/view/session-timeout/index.js +15 -11
- package/dist/esm/view/storybook/decorator.js +5 -4
- package/dist/esm/view/visually-hidden/index.js +7 -20
- package/dist/types/__mocks__/@elliemae/em-ssf-guest.d.ts +6 -0
- package/dist/types/{analytics → lib/analytics}/appdynamics.d.ts +0 -0
- package/dist/types/{analytics → lib/analytics}/index.d.ts +0 -0
- package/dist/types/{analytics → lib/analytics}/page-view-event.d.ts +0 -0
- package/dist/types/{analytics → lib/analytics}/user-session-event.d.ts +0 -0
- package/dist/types/{analytics → lib/analytics}/user-wait-event.d.ts +0 -0
- package/dist/types/{analytics → lib/analytics}/web-analytics.d.ts +0 -0
- package/dist/types/{api → lib/api}/auth/index.d.ts +0 -0
- package/dist/types/{api → lib/api}/helpers.d.ts +0 -0
- package/dist/types/{api → lib/api}/users/index.d.ts +0 -0
- package/dist/types/{api → lib/api}/users/index.endpoint.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/index.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/request-interceptor.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/response-interceptor.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/retry-axios.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/retry.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/tests/hello.endpoint.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/tests/index.test.d.ts +0 -0
- package/dist/types/{communication → lib/communication}/http-client/tests/private.endpoint.d.ts +0 -0
- package/dist/types/{data → lib/data}/auth/actions.d.ts +0 -0
- package/dist/types/{data → lib/data}/auth/reducer.d.ts +0 -0
- package/dist/types/{data → lib/data}/breakpoint/index.d.ts +0 -0
- package/dist/types/{data → lib/data}/error/index.d.ts +0 -0
- package/dist/types/{data → lib/data}/index.d.ts +1 -1
- package/dist/types/{data → lib/data}/live-message/index.d.ts +0 -0
- package/dist/types/{data → lib/data}/logout/actions.d.ts +0 -0
- package/dist/types/{data → lib/data}/navigation-prompt/actions.d.ts +0 -0
- package/dist/types/{data → lib/data}/react-redux.d.ts +0 -0
- package/dist/types/{data → lib/data}/reducers.d.ts +0 -0
- package/dist/types/{data → lib/data}/saga.d.ts +0 -0
- package/dist/types/{data → lib/data}/store.d.ts +1 -1
- package/dist/types/{data → lib/data}/tests/store.test.d.ts +0 -0
- package/dist/types/{data → lib/data}/wait-message/actions.d.ts +0 -0
- package/dist/types/{data → lib/data}/wait-message/reducer.d.ts +0 -0
- package/dist/types/{data → lib/data}/webpack-hmr.d.ts +0 -0
- package/dist/types/{index.d.ts → lib/index.d.ts} +6 -3
- package/dist/types/{micro-frontend.d.ts → lib/micro-frontend.d.ts} +0 -0
- package/dist/types/{sideeffect → lib/sideeffect}/auth/index.d.ts +0 -0
- package/dist/types/{sideeffect → lib/sideeffect}/error-toast/index.d.ts +0 -0
- package/dist/types/{sideeffect → lib/sideeffect}/wait-message/index.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/app-config/config.d.ts +0 -0
- package/dist/types/lib/utils/app-config/index.d.ts +1 -0
- package/dist/types/{utils → lib/utils}/app-host-integration/react.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/auth/helper.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/auth/index.d.ts +3 -1
- package/dist/types/{utils → lib/utils}/await.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/constants.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/font-size.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/guest-with-service.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/helpers.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/history.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/log-records.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/micro-frontend/console-logger.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/micro-frontend/guest.d.ts +1 -1
- package/dist/types/{utils → lib/utils}/micro-frontend/host.d.ts +3 -1
- package/dist/types/{utils → lib/utils}/micro-frontend/index.d.ts +0 -0
- package/dist/types/lib/utils/micro-frontend/ssfguest-adapter.d.ts +7 -0
- package/dist/types/lib/utils/micro-frontend/tests/guest-ssf-host.test.d.ts +1 -0
- package/dist/types/lib/utils/micro-frontend/tests/guest.test.d.ts +1 -0
- package/dist/types/{utils → lib/utils}/micro-frontend/types.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/redact-pii.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/service-worker.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/session.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/storybook/cjs/main.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/storybook/cjs/middleware.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/storybook/cjs/vite.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/storybook/cjs/webpack.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/storybook/manager.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/storybook/preview.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/storybook/theme.d.ts +0 -0
- package/dist/types/lib/utils/testing/index.d.ts +4 -0
- package/dist/types/{utils → lib/utils}/testing/render-with-redux.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/testing/render-with-router-redux.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/testing/render-with-router.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/testing/render-with-state-addons.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/types.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/url.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/web-storage.d.ts +0 -0
- package/dist/types/{utils → lib/utils}/window.d.ts +0 -0
- package/dist/types/{view → lib/view}/app-root/hosted-app.d.ts +0 -0
- package/dist/types/{view → lib/view}/app-root/index.d.ts +2 -1
- package/dist/types/{view → lib/view}/app-root/stand-alone-app.d.ts +0 -0
- package/dist/types/{view → lib/view}/app-root/style.d.ts +0 -0
- package/dist/types/{view → lib/view}/app-router.d.ts +1 -1
- package/dist/types/{view → lib/view}/breakpoint/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/breakpoint/use-breakpoint.d.ts +0 -0
- package/dist/types/{view → lib/view}/breakpoint/use-media-query-list.d.ts +0 -0
- package/dist/types/{view → lib/view}/error-boundary/default-error-template.d.ts +0 -0
- package/dist/types/{view → lib/view}/error-boundary/index.d.ts +2 -1
- package/dist/types/{view → lib/view}/error-toast/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/error-toast/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fetch-host-app-data/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fetch-host-app-data/store.d.ts +0 -0
- package/dist/types/lib/view/fields/autocomplete/index.d.ts +13 -0
- package/dist/types/lib/view/fields/autocomplete/index.stories.d.ts +5 -0
- package/dist/types/{view → lib/view}/fields/check-box/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/check-box/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/check-box/set-value.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/combo-box/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/combo-box/index.stories.d.ts +0 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.d.ts +9 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.stories.d.ts +5 -0
- package/dist/types/{view → lib/view}/fields/connect-form.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/date-input/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/date-input/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/date-picker/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/date-picker/index.stories.d.ts +0 -0
- package/dist/types/lib/view/fields/date-range-picker/index.d.ts +9 -0
- package/dist/types/lib/view/fields/date-range-picker/index.stories.d.ts +7 -0
- package/dist/types/lib/view/fields/date-time-picker/index.d.ts +9 -0
- package/dist/types/lib/view/fields/date-time-picker/index.stories.d.ts +7 -0
- package/dist/types/{view → lib/view}/fields/form-item-layout/index.d.ts +1 -1
- package/dist/types/{view → lib/view}/fields/form-item-layout/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/form-layout-block-item/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/form-layout-block-item/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/input-mask/index.d.ts +3 -1
- package/dist/types/{view → lib/view}/fields/input-mask/index.stories.d.ts +0 -0
- package/dist/types/lib/view/fields/input-text/index.d.ts +9 -0
- package/dist/types/lib/view/fields/input-text/index.stories.d.ts +7 -0
- package/dist/types/{view → lib/view}/fields/large-text-box/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/large-text-box/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/radio/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/radio/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/radio/set-value.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/radio-group/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/radio-group/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/text-box/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/fields/text-box/index.stories.d.ts +0 -0
- package/dist/types/lib/view/fields/toggle/index.d.ts +9 -0
- package/dist/types/lib/view/fields/toggle/index.stories.d.ts +7 -0
- package/dist/types/{view → lib/view}/fields/watch-value.d.ts +0 -0
- package/dist/types/{view → lib/view}/form/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/form/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/form/personal-info-section.d.ts +0 -0
- package/dist/types/{view → lib/view}/form/submit-button/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/form/usecases.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/guest-unload-handlers/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/host-binding-events/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/live-message/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/live-message/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/loadable/index.d.ts +0 -0
- package/dist/types/lib/view/login/index.d.ts +9 -0
- package/dist/types/{view → lib/view}/message-to-host-app/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/app-factory/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/const.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/resources/manifest.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/resources/script.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/resources/style.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/types.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/use-app-will-render.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-app/utils.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-iframe-app/app.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-iframe-app/iframe/const.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-iframe-app/iframe/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-iframe-app/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-iframe-app/types.d.ts +0 -0
- package/dist/types/{view → lib/view}/micro-iframe-app/use-frame-loaded.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/error/index.d.ts +2 -0
- package/dist/types/{view → lib/view}/modals/error/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/navigation-prompt/index.d.ts +1 -1
- package/dist/types/{view → lib/view}/modals/navigation-prompt/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/session-expiry/customHooks.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/session-expiry/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/session-expiry/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/wait-message/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/wait-message/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/wait-message/use-html-wait-message.d.ts +0 -0
- package/dist/types/{view → lib/view}/modals/wait-message/wait-message-launcher.d.ts +0 -0
- package/dist/types/{view → lib/view}/page.d.ts +0 -0
- package/dist/types/{view → lib/view}/render-with-delay/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/render-with-host-data/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/require-auth.d.ts +0 -0
- package/dist/types/{view → lib/view}/session-timeout/index.d.ts +0 -0
- package/dist/types/{view → lib/view}/session-timeout/index.stories.d.ts +0 -0
- package/dist/types/{view → lib/view}/storybook/decorator.d.ts +0 -0
- package/dist/types/{view → lib/view}/use-previous.d.ts +0 -0
- package/dist/types/{view → lib/view}/use-window-size-change.d.ts +0 -0
- package/dist/types/{view → lib/view}/visually-hidden/index.d.ts +0 -0
- package/package.json +57 -52
- package/dist/types/utils/app-config/index.d.ts +0 -1
- package/dist/types/utils/testing/index.d.ts +0 -4
- package/dist/types/view/login/index.d.ts +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -16,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
17
|
}
|
|
17
18
|
return to;
|
|
18
19
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
20
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
25
|
var personal_info_section_exports = {};
|
|
22
26
|
__export(personal_info_section_exports, {
|
|
@@ -26,62 +30,66 @@ __export(personal_info_section_exports, {
|
|
|
26
30
|
State: () => State
|
|
27
31
|
});
|
|
28
32
|
module.exports = __toCommonJS(personal_info_section_exports);
|
|
29
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
34
|
var import_moment = __toESM(require("moment"));
|
|
31
35
|
var import_text_box = require("../fields/text-box/index.js");
|
|
32
36
|
var import_combo_box = require("../fields/combo-box/index.js");
|
|
33
37
|
var import_date_input = require("../fields/date-input/index.js");
|
|
34
38
|
var import_form_layout_block_item = require("../fields/form-layout-block-item/index.js");
|
|
35
|
-
const FirstName = () => /* @__PURE__ */
|
|
39
|
+
const FirstName = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
36
40
|
label: "First Name",
|
|
37
41
|
inputID: "firstname",
|
|
38
|
-
required: true
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
48
|
-
|
|
42
|
+
required: true,
|
|
43
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text_box.TextBox, {
|
|
44
|
+
id: "firstname",
|
|
45
|
+
name: "firstname",
|
|
46
|
+
rules: {
|
|
47
|
+
required: { value: true, message: "First Name is required" },
|
|
48
|
+
minLength: { value: 2, message: "Minimum 2 characters" },
|
|
49
|
+
maxLength: { value: 50, message: "Maximum 50 characters" }
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
const DOB = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
49
54
|
label: "Date of Birth",
|
|
50
55
|
inputID: "dob",
|
|
51
|
-
required: true
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})
|
|
60
|
-
|
|
56
|
+
required: true,
|
|
57
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_date_input.DateInput, {
|
|
58
|
+
id: "dob",
|
|
59
|
+
name: "dob",
|
|
60
|
+
rules: {
|
|
61
|
+
required: { value: true, message: "Date of Birth is required" },
|
|
62
|
+
validate: (value) => (0, import_moment.default)() > value || "Date of Birth can not be greater than current date"
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
const State = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
61
67
|
label: "State",
|
|
62
68
|
inputID: "state",
|
|
63
|
-
required: true
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
|
|
69
|
+
required: true,
|
|
70
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_combo_box.ComboBox, {
|
|
71
|
+
id: "state",
|
|
72
|
+
name: "state",
|
|
73
|
+
rules: { required: { value: true, message: "State is required" } },
|
|
74
|
+
options: [
|
|
75
|
+
{ value: "ca", label: "California" },
|
|
76
|
+
{ value: "nj", label: "New Jersey" }
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
const MaritalStatus = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_layout_block_item.FormLayoutBlockItem, {
|
|
74
81
|
label: "Marital Status",
|
|
75
82
|
inputID: "marital_status",
|
|
76
|
-
required: true
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
83
|
+
required: true,
|
|
84
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_combo_box.ComboBox, {
|
|
85
|
+
id: "marital_status",
|
|
86
|
+
name: "marital_status",
|
|
87
|
+
rules: {
|
|
88
|
+
required: { value: true, message: "Marital Status is required" }
|
|
89
|
+
},
|
|
90
|
+
options: [
|
|
91
|
+
{ value: "married", label: "Married" },
|
|
92
|
+
{ value: "single", label: "Single" }
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
});
|
|
@@ -1,38 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
6
|
var __export = (target, all) => {
|
|
37
7
|
for (var name in all)
|
|
38
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -45,24 +15,23 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
45
15
|
}
|
|
46
16
|
return to;
|
|
47
17
|
};
|
|
48
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
49
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
50
19
|
var submit_button_exports = {};
|
|
51
20
|
__export(submit_button_exports, {
|
|
52
21
|
FormSubmitButton: () => FormSubmitButton
|
|
53
22
|
});
|
|
54
23
|
module.exports = __toCommonJS(submit_button_exports);
|
|
55
|
-
var
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
56
25
|
var import_react_hook_form = require("react-hook-form");
|
|
57
26
|
var import_ds_button = require("@elliemae/ds-button");
|
|
58
|
-
const FormSubmitButton = (
|
|
59
|
-
var rest = __objRest(_a, []);
|
|
27
|
+
const FormSubmitButton = ({ ...rest }) => {
|
|
60
28
|
const {
|
|
61
29
|
formState,
|
|
62
30
|
formProps: { mode }
|
|
63
31
|
} = (0, import_react_hook_form.useFormContext)();
|
|
64
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButtonV2, {
|
|
33
|
+
...rest,
|
|
65
34
|
type: "submit",
|
|
66
35
|
disabled: mode !== "onSubmit" && (!formState.isDirty || formState.isDirty && !formState.isValid)
|
|
67
|
-
})
|
|
36
|
+
});
|
|
68
37
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
@@ -16,21 +15,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
15
|
}
|
|
17
16
|
return to;
|
|
18
17
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
19
|
var live_message_exports = {};
|
|
22
20
|
__export(live_message_exports, {
|
|
23
21
|
LiveMessage: () => LiveMessage
|
|
24
22
|
});
|
|
25
23
|
module.exports = __toCommonJS(live_message_exports);
|
|
26
|
-
var
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
25
|
var import_react_aria_live = require("react-aria-live");
|
|
28
26
|
var import_react_redux = require("../../data/react-redux.js");
|
|
29
27
|
const LiveMessage = () => {
|
|
30
28
|
const message = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.message);
|
|
31
29
|
const id = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.id);
|
|
32
30
|
const ariaLive = (0, import_react_redux.useAppSelector)((state) => state.liveMessage?.ariaLive);
|
|
33
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_aria_live.LiveMessage, {
|
|
34
32
|
message,
|
|
35
33
|
"aria-live": ariaLive,
|
|
36
34
|
id
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
6
|
var __export = (target, all) => {
|
|
22
7
|
for (var name in all)
|
|
23
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -30,19 +15,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
30
15
|
}
|
|
31
16
|
return to;
|
|
32
17
|
};
|
|
33
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
19
|
var loadable_exports = {};
|
|
36
20
|
__export(loadable_exports, {
|
|
37
21
|
loadable: () => loadable
|
|
38
22
|
});
|
|
39
23
|
module.exports = __toCommonJS(loadable_exports);
|
|
40
|
-
var
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
25
|
var import_react = require("react");
|
|
42
26
|
var import_wait_message_launcher = require("../modals/wait-message/wait-message-launcher.js");
|
|
43
|
-
const loadable = (importFunc, fallback = /* @__PURE__ */
|
|
27
|
+
const loadable = (importFunc, fallback = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wait_message_launcher.WaitMessageLauncher, {})) => {
|
|
44
28
|
const LazyComponent = (0, import_react.lazy)(importFunc);
|
|
45
|
-
return (props) => /* @__PURE__ */
|
|
46
|
-
fallback
|
|
47
|
-
|
|
29
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, {
|
|
30
|
+
fallback,
|
|
31
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LazyComponent, {
|
|
32
|
+
...props
|
|
33
|
+
})
|
|
34
|
+
});
|
|
48
35
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -20,17 +21,28 @@ __export(login_exports, {
|
|
|
20
21
|
Login: () => Login
|
|
21
22
|
});
|
|
22
23
|
module.exports = __toCommonJS(login_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
23
25
|
var import_react = require("react");
|
|
24
26
|
var import_react_redux = require("../../data/react-redux.js");
|
|
25
27
|
var import_auth = require("../../utils/auth/index.js");
|
|
26
28
|
var import_actions = require("../../data/auth/actions.js");
|
|
27
|
-
const Login = ({
|
|
29
|
+
const Login = ({
|
|
30
|
+
clientId,
|
|
31
|
+
scope,
|
|
32
|
+
responseType,
|
|
33
|
+
children
|
|
34
|
+
}) => {
|
|
35
|
+
const [userAuthorized, setUserAuthorized] = (0, import_react.useState)(false);
|
|
28
36
|
const dispatch = (0, import_react_redux.useAppDispatch)();
|
|
29
37
|
(0, import_react.useEffect)(() => {
|
|
30
|
-
(0, import_auth.login)({ clientId, scope, responseType }).then(() => {
|
|
38
|
+
(0, import_auth.login)({ clientId, scope, responseType }).then(({ authorized }) => {
|
|
39
|
+
if (authorized)
|
|
40
|
+
setUserAuthorized(true);
|
|
31
41
|
dispatch({ type: import_actions.LOGIN_SUCCESS });
|
|
32
42
|
}).catch(() => {
|
|
33
43
|
});
|
|
34
44
|
}, [dispatch, clientId, scope, responseType]);
|
|
35
|
-
return
|
|
45
|
+
return userAuthorized ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
46
|
+
children
|
|
47
|
+
}) : null;
|
|
36
48
|
};
|
|
@@ -1,24 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
6
|
var __export = (target, all) => {
|
|
23
7
|
for (var name in all)
|
|
24
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -64,7 +48,9 @@ const initApplication = async ({
|
|
|
64
48
|
const app = (window.emui || {})[id] || {};
|
|
65
49
|
const { init } = app;
|
|
66
50
|
if (!init || typeof init !== "function")
|
|
67
|
-
throw new Error(
|
|
51
|
+
throw new Error(
|
|
52
|
+
`Application ${name} with id ${id} doesn't expose init method.`
|
|
53
|
+
);
|
|
68
54
|
const prevState = await import_web_storage.persistentStorage.get(`state-${id}`);
|
|
69
55
|
return init({
|
|
70
56
|
host: import_host.CMicroAppHost.getInstance(),
|
|
@@ -82,7 +68,9 @@ const mountApp = async ({ id, name }) => {
|
|
|
82
68
|
const app = (window.emui || {})[id] || {};
|
|
83
69
|
const { mount } = app;
|
|
84
70
|
if (!mount || typeof mount !== "function")
|
|
85
|
-
throw new Error(
|
|
71
|
+
throw new Error(
|
|
72
|
+
`Application ${name} with id ${id} doesn't expose mount method.`
|
|
73
|
+
);
|
|
86
74
|
return mount({
|
|
87
75
|
containerId: `${import_const.APP_CONTAINER_ID_PREFIX}${id}`,
|
|
88
76
|
hostBreakpoint: (0, import_window.getCurrentBreakpoint)(),
|
|
@@ -97,7 +85,9 @@ const unmountApp = async ({ id, name }) => {
|
|
|
97
85
|
if (!unmount)
|
|
98
86
|
return null;
|
|
99
87
|
if (typeof unmount !== "function")
|
|
100
|
-
throw new Error(
|
|
88
|
+
throw new Error(
|
|
89
|
+
`unmount failed for application ${name} with id ${id}. unmount is not a valid function`
|
|
90
|
+
);
|
|
101
91
|
const currentState = await unmount({
|
|
102
92
|
containerId: `${import_const.APP_CONTAINER_ID_PREFIX}${id}`
|
|
103
93
|
});
|
|
@@ -117,7 +107,7 @@ const addAppToActiveAppList = (id, elementIds) => {
|
|
|
117
107
|
};
|
|
118
108
|
const waitAndInitApplication = (appConfig, requests) => Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
|
|
119
109
|
const logRecord = import_log_records.logRecords.APP_INIT_FAILED(appConfig.id, err.message);
|
|
120
|
-
(0, import_micro_frontend.getLogger)().error(
|
|
110
|
+
(0, import_micro_frontend.getLogger)().error({ ...logRecord, exception: err });
|
|
121
111
|
throw new Error(logRecord.msg);
|
|
122
112
|
});
|
|
123
113
|
const removeAssetsFromDOM = (id, documentEle = document) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -16,14 +17,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
17
|
}
|
|
17
18
|
return to;
|
|
18
19
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
20
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
25
|
var micro_app_exports = {};
|
|
22
26
|
__export(micro_app_exports, {
|
|
23
27
|
MicroApp: () => MicroApp
|
|
24
28
|
});
|
|
25
29
|
module.exports = __toCommonJS(micro_app_exports);
|
|
26
|
-
var
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
31
|
var import_react = require("react");
|
|
28
32
|
var import_styled_components = __toESM(require("styled-components"));
|
|
29
33
|
var import_const = require("./const.js");
|
|
@@ -34,7 +38,7 @@ const Div = import_styled_components.default.div`
|
|
|
34
38
|
`;
|
|
35
39
|
const MicroApp = (0, import_react.memo)((props) => {
|
|
36
40
|
(0, import_use_app_will_render.useAppWillRender)(props);
|
|
37
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Div, {
|
|
38
42
|
id: `${import_const.APP_CONTAINER_ID_PREFIX}${props.id}`
|
|
39
43
|
});
|
|
40
44
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -31,9 +32,16 @@ const getAppManifest = async ({
|
|
|
31
32
|
manifestPath
|
|
32
33
|
}) => {
|
|
33
34
|
if (!hostUrl || !manifestPath)
|
|
34
|
-
throw new Error(
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
throw new Error(
|
|
36
|
+
"Unable to get app manifest. hostUrl and manifestPath are required."
|
|
37
|
+
);
|
|
38
|
+
const url = new URL(
|
|
39
|
+
`${manifestPath.replace(/\/?$/, "/")}manifest.json`,
|
|
40
|
+
hostUrl
|
|
41
|
+
);
|
|
42
|
+
const response = await (0, import_http_client.getHTTPClient)().get(
|
|
43
|
+
(0, import_url.removeDoubleSlash)(url.href)
|
|
44
|
+
);
|
|
37
45
|
const { headers } = response;
|
|
38
46
|
if (headers["content-type"] && headers["content-type"].includes("application/json"))
|
|
39
47
|
return response.data;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -30,13 +31,18 @@ const HEAD_SCRIPTS = /(?:emuiDiagnostics|global|global-prod|emuiUserMonitoring)(
|
|
|
30
31
|
const isHeadScript = (scriptSrc) => HEAD_SCRIPTS.test(scriptSrc);
|
|
31
32
|
const addScriptToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
|
|
32
33
|
if (!hostUrl || !manifestPath)
|
|
33
|
-
throw new Error(
|
|
34
|
+
throw new Error(
|
|
35
|
+
"Unable to add scripts to DOM. hostUrl and manifestPath are required."
|
|
36
|
+
);
|
|
34
37
|
return new Promise((resolve, reject) => {
|
|
35
38
|
const ele = documentEle.createElement("script");
|
|
36
39
|
if (!ele)
|
|
37
40
|
reject(new Error("Unable to insert Application scripts."));
|
|
38
41
|
ele.id = `${APP_SCRIPT_ID_PREFIX}${name}-${index}`;
|
|
39
|
-
const url = new URL(
|
|
42
|
+
const url = new URL(
|
|
43
|
+
`${manifestPath.replace(/\/?$/, "/")}${fileName}`,
|
|
44
|
+
hostUrl
|
|
45
|
+
);
|
|
40
46
|
ele.src = (0, import_url.removeDoubleSlash)(url.href);
|
|
41
47
|
ele.onload = resolve.bind(null, ele.id);
|
|
42
48
|
ele.onerror = reject.bind(null, ele.id);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -27,14 +28,19 @@ var import_url = require("../../../utils/url.js");
|
|
|
27
28
|
const APP_STYLE_ID_PREFIX = "emui-style-";
|
|
28
29
|
const addStylesToDOM = ({ name, hostUrl, documentEle, manifestPath }, fileName, index) => {
|
|
29
30
|
if (!hostUrl || !manifestPath)
|
|
30
|
-
throw new Error(
|
|
31
|
+
throw new Error(
|
|
32
|
+
"Unable to add styles to DOM. hostUrl and manifestPath are required."
|
|
33
|
+
);
|
|
31
34
|
return new Promise((resolve, reject) => {
|
|
32
35
|
const ele = documentEle.createElement("link");
|
|
33
36
|
if (!ele)
|
|
34
37
|
reject(new Error("Unable to insert Application styles."));
|
|
35
38
|
ele.id = `${APP_STYLE_ID_PREFIX}${name}-${index}`;
|
|
36
39
|
ele.rel = "stylesheet";
|
|
37
|
-
const url = new URL(
|
|
40
|
+
const url = new URL(
|
|
41
|
+
`${manifestPath.replace(/\/?$/, "/")}${fileName}`,
|
|
42
|
+
hostUrl
|
|
43
|
+
);
|
|
38
44
|
ele.href = (0, import_url.removeDoubleSlash)(url.href);
|
|
39
45
|
ele.onload = resolve.bind(null, ele.id);
|
|
40
46
|
documentEle.head.appendChild(ele);
|
|
@@ -1,24 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
6
|
var __export = (target, all) => {
|
|
23
7
|
for (var name in all)
|
|
24
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -54,33 +38,43 @@ const useAppWillRender = ({
|
|
|
54
38
|
}) => {
|
|
55
39
|
const dispatch = import_react_redux.useDispatch ? (0, import_react_redux.useDispatch)() : null;
|
|
56
40
|
const ref = (0, import_react.useRef)(Promise.resolve());
|
|
57
|
-
const getConfig = (0, import_react.useCallback)(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
41
|
+
const getConfig = (0, import_react.useCallback)(
|
|
42
|
+
() => (0, import_micro_frontend.getMicroFrontEndAppConfig)({
|
|
43
|
+
id
|
|
44
|
+
}),
|
|
45
|
+
[id]
|
|
46
|
+
);
|
|
47
|
+
const unload = (0, import_react.useCallback)(
|
|
48
|
+
async (appConfig, loadFailed = false) => {
|
|
49
|
+
await (0, import_app_factory.unmountApp)(appConfig);
|
|
50
|
+
(0, import_app_factory.unloadApp)(appConfig);
|
|
51
|
+
if (!loadFailed && onUnloadComplete)
|
|
52
|
+
onUnloadComplete();
|
|
53
|
+
},
|
|
54
|
+
[]
|
|
55
|
+
);
|
|
56
|
+
const load = (0, import_react.useCallback)(
|
|
57
|
+
async (appConfig) => {
|
|
58
|
+
if (dispatch)
|
|
59
|
+
dispatch(import_actions.waitMessage.open());
|
|
60
|
+
try {
|
|
61
|
+
if (ref.current)
|
|
62
|
+
await ref.current;
|
|
63
|
+
await (0, import_app_factory.loadApp)(appConfig);
|
|
64
|
+
await (0, import_app_factory.mountApp)(appConfig);
|
|
65
|
+
} catch (ex) {
|
|
66
|
+
(0, import_micro_frontend.getLogger)().error({
|
|
67
|
+
...import_log_records.logRecords.APP_CONFIG_LOAD_FAILED,
|
|
68
|
+
exception: ex
|
|
69
|
+
});
|
|
70
|
+
await unload(appConfig, true);
|
|
71
|
+
throw ex;
|
|
72
|
+
}
|
|
73
|
+
if (dispatch)
|
|
74
|
+
dispatch(import_actions.waitMessage.close());
|
|
75
|
+
},
|
|
76
|
+
[dispatch, unload]
|
|
77
|
+
);
|
|
84
78
|
(0, import_react.useLayoutEffect)(() => {
|
|
85
79
|
if (!documentEle)
|
|
86
80
|
return () => {
|