@wavemaker-ai/react-runtime 1.0.0-rc.309
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/actions/base-action.d.ts +7 -0
- package/actions/base-action.js +30 -0
- package/actions/login-action.d.ts +11 -0
- package/actions/login-action.js +54 -0
- package/actions/logout-action.d.ts +10 -0
- package/actions/logout-action.js +39 -0
- package/actions/navigation-action.d.ts +35 -0
- package/actions/navigation-action.js +381 -0
- package/actions/notification-action.d.ts +20 -0
- package/actions/notification-action.js +164 -0
- package/actions/timer-action.d.ts +27 -0
- package/actions/timer-action.js +162 -0
- package/actions/toast-provider.d.ts +12 -0
- package/actions/toast-provider.js +111 -0
- package/actions/toast.d.ts +7 -0
- package/actions/toast.js +117 -0
- package/actions/toast.service.d.ts +17 -0
- package/actions/toast.service.js +93 -0
- package/actions/types/index.d.ts +26 -0
- package/actions/types/index.js +11 -0
- package/components/advanced/carousel/index.d.ts +72 -0
- package/components/advanced/carousel/index.js +467 -0
- package/components/advanced/carousel/props.d.ts +40 -0
- package/components/advanced/carousel/props.js +5 -0
- package/components/advanced/carousel/template.d.ts +72 -0
- package/components/advanced/carousel/template.js +83 -0
- package/components/advanced/login/index.d.ts +75 -0
- package/components/advanced/login/index.js +317 -0
- package/components/advanced/login/props.d.ts +41 -0
- package/components/advanced/login/props.js +5 -0
- package/components/advanced/marquee/index.d.ts +68 -0
- package/components/advanced/marquee/index.js +169 -0
- package/components/advanced/marquee/props.d.ts +32 -0
- package/components/advanced/marquee/props.js +5 -0
- package/components/basic/anchor/index.d.ts +83 -0
- package/components/basic/anchor/index.js +255 -0
- package/components/basic/anchor/props.d.ts +76 -0
- package/components/basic/anchor/props.js +5 -0
- package/components/basic/audio/index.d.ts +72 -0
- package/components/basic/audio/index.js +73 -0
- package/components/basic/audio/props.d.ts +48 -0
- package/components/basic/audio/props.js +5 -0
- package/components/basic/html/index.d.ts +69 -0
- package/components/basic/html/index.js +224 -0
- package/components/basic/html/props.d.ts +32 -0
- package/components/basic/html/props.js +5 -0
- package/components/basic/html/utils.d.ts +4 -0
- package/components/basic/html/utils.js +36 -0
- package/components/basic/icon/index.d.ts +71 -0
- package/components/basic/icon/index.js +93 -0
- package/components/basic/icon/props.d.ts +46 -0
- package/components/basic/icon/props.js +5 -0
- package/components/basic/iframe/iframe.utils.d.ts +2 -0
- package/components/basic/iframe/iframe.utils.js +17 -0
- package/components/basic/iframe/index.d.ts +67 -0
- package/components/basic/iframe/index.js +111 -0
- package/components/basic/iframe/props.d.ts +27 -0
- package/components/basic/iframe/props.js +5 -0
- package/components/basic/label/index.d.ts +72 -0
- package/components/basic/label/index.js +145 -0
- package/components/basic/label/props.d.ts +54 -0
- package/components/basic/label/props.js +5 -0
- package/components/basic/message/index.d.ts +18 -0
- package/components/basic/message/index.js +146 -0
- package/components/basic/message/props.d.ts +51 -0
- package/components/basic/message/props.js +5 -0
- package/components/basic/picture/index.d.ts +75 -0
- package/components/basic/picture/index.js +131 -0
- package/components/basic/picture/props.d.ts +57 -0
- package/components/basic/picture/props.js +5 -0
- package/components/basic/progress-bar/index.d.ts +73 -0
- package/components/basic/progress-bar/index.js +183 -0
- package/components/basic/progress-bar/props.d.ts +66 -0
- package/components/basic/progress-bar/props.js +41 -0
- package/components/basic/progress-circle/index.d.ts +78 -0
- package/components/basic/progress-circle/index.js +197 -0
- package/components/basic/progress-circle/props.d.ts +80 -0
- package/components/basic/progress-circle/props.js +39 -0
- package/components/basic/richtexteditor/index.d.ts +143 -0
- package/components/basic/richtexteditor/index.js +513 -0
- package/components/basic/richtexteditor/props.d.ts +89 -0
- package/components/basic/richtexteditor/props.js +5 -0
- package/components/basic/search/index.d.ts +178 -0
- package/components/basic/search/index.js +1257 -0
- package/components/basic/search/props.d.ts +233 -0
- package/components/basic/search/props.js +5 -0
- package/components/basic/search/providers.d.ts +53 -0
- package/components/basic/search/providers.js +415 -0
- package/components/basic/spinner/index.d.ts +74 -0
- package/components/basic/spinner/index.js +205 -0
- package/components/basic/spinner/props.d.ts +63 -0
- package/components/basic/spinner/props.js +27 -0
- package/components/basic/tile/index.d.ts +68 -0
- package/components/basic/tile/index.js +104 -0
- package/components/basic/tile/props.d.ts +11 -0
- package/components/basic/tile/props.js +5 -0
- package/components/basic/tree/Components/TreeNodeComponent.d.ts +4 -0
- package/components/basic/tree/Components/TreeNodeComponent.js +174 -0
- package/components/basic/tree/hooks/useTreePartialNodeApi.d.ts +17 -0
- package/components/basic/tree/hooks/useTreePartialNodeApi.js +157 -0
- package/components/basic/tree/index.d.ts +83 -0
- package/components/basic/tree/index.js +529 -0
- package/components/basic/tree/props.d.ts +127 -0
- package/components/basic/tree/props.js +5 -0
- package/components/basic/tree/utils.d.ts +39 -0
- package/components/basic/tree/utils.js +272 -0
- package/components/basic/video/index.d.ts +79 -0
- package/components/basic/video/index.js +108 -0
- package/components/basic/video/props.d.ts +77 -0
- package/components/basic/video/props.js +5 -0
- package/components/chart/index.d.ts +129 -0
- package/components/chart/index.js +58 -0
- package/components/chart/props.d.ts +188 -0
- package/components/chart/props.js +81 -0
- package/components/chart/src/ChartRenderer.d.ts +14 -0
- package/components/chart/src/ChartRenderer.js +226 -0
- package/components/chart/src/chart.d.ts +4 -0
- package/components/chart/src/chart.js +284 -0
- package/components/chart/src/chartStyles.generated.d.ts +7 -0
- package/components/chart/src/chartStyles.generated.js +14 -0
- package/components/chart/src/chartUtils.d.ts +26 -0
- package/components/chart/src/chartUtils.js +461 -0
- package/components/chart/src/constants.d.ts +28 -0
- package/components/chart/src/constants.js +139 -0
- package/components/chart/src/css.d.js +1 -0
- package/components/chart/src/d3Setup.d.ts +11 -0
- package/components/chart/src/d3Setup.js +37 -0
- package/components/chart/src/dataUtils.d.ts +79 -0
- package/components/chart/src/dataUtils.js +612 -0
- package/components/chart/src/formatUtils.d.ts +5 -0
- package/components/chart/src/formatUtils.js +63 -0
- package/components/chart/src/index.d.ts +3 -0
- package/components/chart/src/index.js +25 -0
- package/components/chart/src/nvd3Source.generated.d.ts +6 -0
- package/components/chart/src/nvd3Source.generated.js +13 -0
- package/components/chart/src/pieDonutResponsiveLayout.d.ts +30 -0
- package/components/chart/src/pieDonutResponsiveLayout.js +155 -0
- package/components/chart/src/types.d.ts +115 -0
- package/components/chart/src/types.js +5 -0
- package/components/common/AppSpinner.d.ts +9 -0
- package/components/common/AppSpinner.js +36 -0
- package/components/common/app-spinner.d.ts +5 -0
- package/components/common/app-spinner.js +26 -0
- package/components/common/index.d.ts +1 -0
- package/components/common/index.js +12 -0
- package/components/constants.d.ts +1135 -0
- package/components/constants.js +1211 -0
- package/components/container/accordion/accordion-pane/index.d.ts +81 -0
- package/components/container/accordion/accordion-pane/index.js +126 -0
- package/components/container/accordion/accordion-pane/props.d.ts +88 -0
- package/components/container/accordion/accordion-pane/props.js +24 -0
- package/components/container/accordion/index.d.ts +76 -0
- package/components/container/accordion/index.js +254 -0
- package/components/container/accordion/props.d.ts +57 -0
- package/components/container/accordion/props.js +21 -0
- package/components/container/index.d.ts +84 -0
- package/components/container/index.js +178 -0
- package/components/container/layout-grid/grid-column/index.d.ts +70 -0
- package/components/container/layout-grid/grid-column/index.js +45 -0
- package/components/container/layout-grid/grid-column/props.d.ts +27 -0
- package/components/container/layout-grid/grid-column/props.js +5 -0
- package/components/container/layout-grid/grid-row/index.d.ts +66 -0
- package/components/container/layout-grid/grid-row/index.js +31 -0
- package/components/container/layout-grid/grid-row/props.d.ts +6 -0
- package/components/container/layout-grid/grid-row/props.js +5 -0
- package/components/container/layout-grid/index.d.ts +68 -0
- package/components/container/layout-grid/index.js +40 -0
- package/components/container/layout-grid/props.d.ts +6 -0
- package/components/container/layout-grid/props.js +5 -0
- package/components/container/linear-layout/index.d.ts +67 -0
- package/components/container/linear-layout/index.js +83 -0
- package/components/container/linear-layout/linear-layout-item/index.d.ts +64 -0
- package/components/container/linear-layout/linear-layout-item/index.js +54 -0
- package/components/container/linear-layout/linear-layout-item/props.d.ts +14 -0
- package/components/container/linear-layout/linear-layout-item/props.js +5 -0
- package/components/container/linear-layout/props.d.ts +41 -0
- package/components/container/linear-layout/props.js +5 -0
- package/components/container/panel/components/panel-content/index.d.ts +8 -0
- package/components/container/panel/components/panel-content/index.js +18 -0
- package/components/container/panel/components/panel-header/index.d.ts +4 -0
- package/components/container/panel/components/panel-header/index.js +149 -0
- package/components/container/panel/components/panel-header/props.d.ts +50 -0
- package/components/container/panel/components/panel-header/props.js +5 -0
- package/components/container/panel/hooks.d.ts +22 -0
- package/components/container/panel/hooks.js +144 -0
- package/components/container/panel/index.d.ts +118 -0
- package/components/container/panel/index.js +307 -0
- package/components/container/panel/props.d.ts +158 -0
- package/components/container/panel/props.js +5 -0
- package/components/container/props.d.ts +72 -0
- package/components/container/props.js +5 -0
- package/components/container/repeat-template/index.d.ts +82 -0
- package/components/container/repeat-template/index.js +45 -0
- package/components/container/repeat-template/props.d.ts +6 -0
- package/components/container/repeat-template/props.js +5 -0
- package/components/container/tabs/index.d.ts +84 -0
- package/components/container/tabs/index.js +556 -0
- package/components/container/tabs/props.d.ts +104 -0
- package/components/container/tabs/props.js +40 -0
- package/components/container/tabs/tab-pane/index.d.ts +91 -0
- package/components/container/tabs/tab-pane/index.js +131 -0
- package/components/container/tabs/tab-pane/props.d.ts +84 -0
- package/components/container/tabs/tab-pane/props.js +5 -0
- package/components/container/tabs/utils.d.ts +17 -0
- package/components/container/tabs/utils.js +51 -0
- package/components/container/wizard/WizardContext.d.ts +4 -0
- package/components/container/wizard/WizardContext.js +16 -0
- package/components/container/wizard/components/StepComponents.d.ts +16 -0
- package/components/container/wizard/components/StepComponents.js +101 -0
- package/components/container/wizard/components/WizardStep.d.ts +5 -0
- package/components/container/wizard/components/WizardStep.js +96 -0
- package/components/container/wizard/index.d.ts +166 -0
- package/components/container/wizard/index.js +967 -0
- package/components/container/wizard/props.d.ts +281 -0
- package/components/container/wizard/props.js +5 -0
- package/components/container/wizard/utils.d.ts +12 -0
- package/components/container/wizard/utils.js +178 -0
- package/components/container/wizard/wizard-action/index.d.ts +18 -0
- package/components/container/wizard/wizard-action/index.js +97 -0
- package/components/container/wizard/wizard-step/index.d.ts +63 -0
- package/components/container/wizard/wizard-step/index.js +124 -0
- package/components/data/card/card-actions/index.d.ts +67 -0
- package/components/data/card/card-actions/index.js +32 -0
- package/components/data/card/card-content/index.d.ts +67 -0
- package/components/data/card/card-content/index.js +38 -0
- package/components/data/card/card-footer/index.d.ts +67 -0
- package/components/data/card/card-footer/index.js +32 -0
- package/components/data/card/index.d.ts +89 -0
- package/components/data/card/index.js +247 -0
- package/components/data/card/props.d.ts +131 -0
- package/components/data/card/props.js +5 -0
- package/components/data/form/base-form/constant.d.ts +33 -0
- package/components/data/form/base-form/constant.js +39 -0
- package/components/data/form/base-form/hooks/index.d.ts +7 -0
- package/components/data/form/base-form/hooks/index.js +77 -0
- package/components/data/form/base-form/hooks/useFormDataSync.d.ts +16 -0
- package/components/data/form/base-form/hooks/useFormDataSync.js +238 -0
- package/components/data/form/base-form/hooks/useFormOperations.d.ts +13 -0
- package/components/data/form/base-form/hooks/useFormOperations.js +175 -0
- package/components/data/form/base-form/hooks/useFormSubmission.d.ts +11 -0
- package/components/data/form/base-form/hooks/useFormSubmission.js +291 -0
- package/components/data/form/base-form/hooks/useFormValidation.d.ts +11 -0
- package/components/data/form/base-form/hooks/useFormValidation.js +176 -0
- package/components/data/form/base-form/hooks/useParentFormRelationship.d.ts +12 -0
- package/components/data/form/base-form/hooks/useParentFormRelationship.js +127 -0
- package/components/data/form/base-form/index.d.ts +3 -0
- package/components/data/form/base-form/index.js +802 -0
- package/components/data/form/base-form/props.d.ts +297 -0
- package/components/data/form/base-form/props.js +180 -0
- package/components/data/form/base-form/utils.d.ts +75 -0
- package/components/data/form/base-form/utils.js +411 -0
- package/components/data/form/dynamic-fields/constant.d.ts +1 -0
- package/components/data/form/dynamic-fields/constant.js +53 -0
- package/components/data/form/dynamic-fields/index.d.ts +2 -0
- package/components/data/form/dynamic-fields/index.js +167 -0
- package/components/data/form/dynamic-fields/props.d.ts +70 -0
- package/components/data/form/dynamic-fields/props.js +5 -0
- package/components/data/form/dynamic-fields/utils.d.ts +46 -0
- package/components/data/form/dynamic-fields/utils.js +272 -0
- package/components/data/form/form-action/index.d.ts +137 -0
- package/components/data/form/form-action/index.js +94 -0
- package/components/data/form/form-body/index.d.ts +5 -0
- package/components/data/form/form-body/index.js +28 -0
- package/components/data/form/form-context.d.ts +91 -0
- package/components/data/form/form-context.js +65 -0
- package/components/data/form/form-controller/hooks/index.d.ts +7 -0
- package/components/data/form/form-controller/hooks/index.js +132 -0
- package/components/data/form/form-controller/props.d.ts +139 -0
- package/components/data/form/form-controller/props.js +19 -0
- package/components/data/form/form-controller/utils.d.ts +5 -0
- package/components/data/form/form-controller/utils.js +135 -0
- package/components/data/form/form-controller/validation-contrustor.d.ts +3 -0
- package/components/data/form/form-controller/validation-contrustor.js +573 -0
- package/components/data/form/form-controller/withFormController.d.ts +3 -0
- package/components/data/form/form-controller/withFormController.js +309 -0
- package/components/data/form/form-dynamic-section/index.d.ts +5 -0
- package/components/data/form/form-dynamic-section/index.js +46 -0
- package/components/data/form/form-dynamic-section/props.d.ts +5 -0
- package/components/data/form/form-dynamic-section/props.js +5 -0
- package/components/data/form/form-field/base-field.d.ts +3 -0
- package/components/data/form/form-field/base-field.js +172 -0
- package/components/data/form/form-field/index.d.ts +14 -0
- package/components/data/form/form-field/index.js +87 -0
- package/components/data/form/form-field/props.d.ts +206 -0
- package/components/data/form/form-field/props.js +5 -0
- package/components/data/form/form-footer/index.d.ts +6 -0
- package/components/data/form/form-footer/index.js +27 -0
- package/components/data/form/form-header/index.d.ts +12 -0
- package/components/data/form/form-header/index.js +61 -0
- package/components/data/form/index.d.ts +4 -0
- package/components/data/form/index.js +76 -0
- package/components/data/form/props.d.ts +130 -0
- package/components/data/form/props.js +5 -0
- package/components/data/list/components/GroupHeader.d.ts +6 -0
- package/components/data/list/components/GroupHeader.js +35 -0
- package/components/data/list/components/GroupedListItems.d.ts +6 -0
- package/components/data/list/components/GroupedListItems.js +108 -0
- package/components/data/list/components/ListContainer.d.ts +6 -0
- package/components/data/list/components/ListContainer.js +27 -0
- package/components/data/list/components/ListDND.d.ts +39 -0
- package/components/data/list/components/ListDND.js +246 -0
- package/components/data/list/components/ListHeader.d.ts +7 -0
- package/components/data/list/components/ListHeader.js +50 -0
- package/components/data/list/components/ListItem.d.ts +18 -0
- package/components/data/list/components/ListItem.js +166 -0
- package/components/data/list/components/ListItemWithTemplate.d.ts +6 -0
- package/components/data/list/components/ListItemWithTemplate.js +113 -0
- package/components/data/list/components/ListItems.d.ts +7 -0
- package/components/data/list/components/ListItems.js +231 -0
- package/components/data/list/components/ListPagination.d.ts +7 -0
- package/components/data/list/components/ListPagination.js +183 -0
- package/components/data/list/components/LoadMoreButton.d.ts +6 -0
- package/components/data/list/components/LoadMoreButton.js +35 -0
- package/components/data/list/components/NoDataMessage.d.ts +6 -0
- package/components/data/list/components/NoDataMessage.js +22 -0
- package/components/data/list/components/StandardListItems.d.ts +6 -0
- package/components/data/list/components/StandardListItems.js +88 -0
- package/components/data/list/components/index.d.ts +12 -0
- package/components/data/list/components/index.js +119 -0
- package/components/data/list/components/props.d.ts +245 -0
- package/components/data/list/components/props.js +5 -0
- package/components/data/list/hooks/index.d.ts +11 -0
- package/components/data/list/hooks/index.js +75 -0
- package/components/data/list/hooks/props.d.ts +89 -0
- package/components/data/list/hooks/props.js +5 -0
- package/components/data/list/hooks/useCurrentPageItems.d.ts +6 -0
- package/components/data/list/hooks/useCurrentPageItems.js +48 -0
- package/components/data/list/hooks/useGroupedData.d.ts +9 -0
- package/components/data/list/hooks/useGroupedData.js +37 -0
- package/components/data/list/hooks/useListData.d.ts +9 -0
- package/components/data/list/hooks/useListData.js +60 -0
- package/components/data/list/hooks/useListEffects.d.ts +67 -0
- package/components/data/list/hooks/useListEffects.js +355 -0
- package/components/data/list/hooks/useListEventHandlers.d.ts +9 -0
- package/components/data/list/hooks/useListEventHandlers.js +323 -0
- package/components/data/list/hooks/useListPagination.d.ts +8 -0
- package/components/data/list/hooks/useListPagination.js +163 -0
- package/components/data/list/hooks/useListState.d.ts +28 -0
- package/components/data/list/hooks/useListState.js +114 -0
- package/components/data/list/hooks/useListStateManager.d.ts +26 -0
- package/components/data/list/hooks/useListStateManager.js +195 -0
- package/components/data/list/hooks/usePaginatedGroupedData.d.ts +6 -0
- package/components/data/list/hooks/usePaginatedGroupedData.js +134 -0
- package/components/data/list/index.d.ts +174 -0
- package/components/data/list/index.js +691 -0
- package/components/data/list/props.d.ts +405 -0
- package/components/data/list/props.js +5 -0
- package/components/data/list/templates/media-template.d.ts +2 -0
- package/components/data/list/templates/media-template.js +50 -0
- package/components/data/list/utils/constants.d.ts +52 -0
- package/components/data/list/utils/constants.js +82 -0
- package/components/data/list/utils/list-helpers.d.ts +41 -0
- package/components/data/list/utils/list-helpers.js +187 -0
- package/components/data/list/utils/list-widget-methods.d.ts +4 -0
- package/components/data/list/utils/list-widget-methods.js +159 -0
- package/components/data/list/utils/widget-instance-utils.d.ts +33 -0
- package/components/data/list/utils/widget-instance-utils.js +83 -0
- package/components/data/live-filter/index.d.ts +15 -0
- package/components/data/live-filter/index.js +304 -0
- package/components/data/live-filter/props.d.ts +96 -0
- package/components/data/live-filter/props.js +16 -0
- package/components/data/live-form/index.d.ts +15 -0
- package/components/data/live-form/index.js +143 -0
- package/components/data/live-form/props.d.ts +50 -0
- package/components/data/live-form/props.js +20 -0
- package/components/data/pagination/components/BasicPagination.d.ts +3 -0
- package/components/data/pagination/components/BasicPagination.js +133 -0
- package/components/data/pagination/components/ClassicPagination.d.ts +3 -0
- package/components/data/pagination/components/ClassicPagination.js +191 -0
- package/components/data/pagination/components/InlinePagination.d.ts +11 -0
- package/components/data/pagination/components/InlinePagination.js +99 -0
- package/components/data/pagination/components/LoadingComponent.d.ts +3 -0
- package/components/data/pagination/components/LoadingComponent.js +31 -0
- package/components/data/pagination/components/PageSizeSelector.d.ts +3 -0
- package/components/data/pagination/components/PageSizeSelector.js +188 -0
- package/components/data/pagination/components/PagerNavigation.d.ts +3 -0
- package/components/data/pagination/components/PagerNavigation.js +105 -0
- package/components/data/pagination/components/TotalRecords.d.ts +3 -0
- package/components/data/pagination/components/TotalRecords.js +48 -0
- package/components/data/pagination/components/index.d.ts +6 -0
- package/components/data/pagination/components/index.js +47 -0
- package/components/data/pagination/components/props.d.ts +54 -0
- package/components/data/pagination/components/props.js +5 -0
- package/components/data/pagination/hooks/index.d.ts +2 -0
- package/components/data/pagination/hooks/index.js +19 -0
- package/components/data/pagination/hooks/props.d.ts +232 -0
- package/components/data/pagination/hooks/props.js +5 -0
- package/components/data/pagination/hooks/useNavigationSize.d.ts +5 -0
- package/components/data/pagination/hooks/useNavigationSize.js +44 -0
- package/components/data/pagination/hooks/usePagination.d.ts +35 -0
- package/components/data/pagination/hooks/usePagination.js +1095 -0
- package/components/data/pagination/index.d.ts +13 -0
- package/components/data/pagination/index.js +454 -0
- package/components/data/table/components/AddNewRow.d.ts +3 -0
- package/components/data/table/components/AddNewRow.js +194 -0
- package/components/data/table/components/EditableCell.d.ts +4 -0
- package/components/data/table/components/EditableCell.js +92 -0
- package/components/data/table/components/FieldValidationError.d.ts +4 -0
- package/components/data/table/components/FieldValidationError.js +24 -0
- package/components/data/table/components/RowCells.d.ts +29 -0
- package/components/data/table/components/RowCells.js +81 -0
- package/components/data/table/components/RowExpansionButton.d.ts +4 -0
- package/components/data/table/components/RowExpansionButton.js +74 -0
- package/components/data/table/components/SummaryCell.d.ts +3 -0
- package/components/data/table/components/SummaryCell.js +111 -0
- package/components/data/table/components/SummaryRow.d.ts +3 -0
- package/components/data/table/components/SummaryRow.js +54 -0
- package/components/data/table/components/SummaryRowFooter.d.ts +3 -0
- package/components/data/table/components/SummaryRowFooter.js +46 -0
- package/components/data/table/components/TableBody.d.ts +3 -0
- package/components/data/table/components/TableBody.js +278 -0
- package/components/data/table/components/TableDataRow.d.ts +27 -0
- package/components/data/table/components/TableDataRow.js +119 -0
- package/components/data/table/components/TableFilters.d.ts +24 -0
- package/components/data/table/components/TableFilters.js +429 -0
- package/components/data/table/components/TableFooterActions.d.ts +3 -0
- package/components/data/table/components/TableFooterActions.js +48 -0
- package/components/data/table/components/TableHeader.d.ts +3 -0
- package/components/data/table/components/TableHeader.js +450 -0
- package/components/data/table/components/TablePanelHeading.d.ts +3 -0
- package/components/data/table/components/TablePanelHeading.js +202 -0
- package/components/data/table/components/index.d.ts +12 -0
- package/components/data/table/components/index.js +95 -0
- package/components/data/table/hooks/index.d.ts +19 -0
- package/components/data/table/hooks/index.js +231 -0
- package/components/data/table/hooks/use-edited-rows.d.ts +16 -0
- package/components/data/table/hooks/use-edited-rows.js +141 -0
- package/components/data/table/hooks/useCellState.d.ts +10 -0
- package/components/data/table/hooks/useCellState.js +110 -0
- package/components/data/table/hooks/useCustomExpressionColumns.d.ts +16 -0
- package/components/data/table/hooks/useCustomExpressionColumns.js +88 -0
- package/components/data/table/hooks/useDynamicColumns.d.ts +34 -0
- package/components/data/table/hooks/useDynamicColumns.js +105 -0
- package/components/data/table/hooks/useEditingState.d.ts +5 -0
- package/components/data/table/hooks/useEditingState.js +47 -0
- package/components/data/table/hooks/useFormWidget.d.ts +2 -0
- package/components/data/table/hooks/useFormWidget.js +190 -0
- package/components/data/table/hooks/usePaginationState.d.ts +6 -0
- package/components/data/table/hooks/usePaginationState.js +81 -0
- package/components/data/table/hooks/usePanelStructure.d.ts +2 -0
- package/components/data/table/hooks/usePanelStructure.js +43 -0
- package/components/data/table/hooks/useResponsiveColumns.d.ts +84 -0
- package/components/data/table/hooks/useResponsiveColumns.js +34 -0
- package/components/data/table/hooks/useRowExpansion.d.ts +5 -0
- package/components/data/table/hooks/useRowExpansion.js +140 -0
- package/components/data/table/hooks/useRowHandlers.d.ts +5 -0
- package/components/data/table/hooks/useRowHandlers.js +72 -0
- package/components/data/table/hooks/useRowSelection.d.ts +2 -0
- package/components/data/table/hooks/useRowSelection.js +428 -0
- package/components/data/table/hooks/useServerSideSorting.d.ts +26 -0
- package/components/data/table/hooks/useServerSideSorting.js +203 -0
- package/components/data/table/hooks/useTableColumns.d.ts +2 -0
- package/components/data/table/hooks/useTableColumns.js +360 -0
- package/components/data/table/hooks/useTableData.d.ts +2 -0
- package/components/data/table/hooks/useTableData.js +199 -0
- package/components/data/table/hooks/useTableEdit.d.ts +4 -0
- package/components/data/table/hooks/useTableEdit.js +651 -0
- package/components/data/table/hooks/useTableEffects.d.ts +25 -0
- package/components/data/table/hooks/useTableEffects.js +157 -0
- package/components/data/table/hooks/useTableFilter.d.ts +26 -0
- package/components/data/table/hooks/useTableFilter.js +389 -0
- package/components/data/table/hooks/useTableInitialization.d.ts +5 -0
- package/components/data/table/hooks/useTableInitialization.js +105 -0
- package/components/data/table/hooks/useTableState.d.ts +2 -0
- package/components/data/table/hooks/useTableState.js +75 -0
- package/components/data/table/hooks/useTableStateManager.d.ts +38 -0
- package/components/data/table/hooks/useTableStateManager.js +633 -0
- package/components/data/table/index.d.ts +287 -0
- package/components/data/table/index.js +1830 -0
- package/components/data/table/live-table/index.d.ts +75 -0
- package/components/data/table/live-table/index.js +283 -0
- package/components/data/table/props.d.ts +1368 -0
- package/components/data/table/props.js +5 -0
- package/components/data/table/table-action/index.d.ts +65 -0
- package/components/data/table/table-action/index.js +94 -0
- package/components/data/table/table-column/index.d.ts +65 -0
- package/components/data/table/table-column/index.js +44 -0
- package/components/data/table/table-group/index.d.ts +13 -0
- package/components/data/table/table-group/index.js +26 -0
- package/components/data/table/table-row/index.d.ts +65 -0
- package/components/data/table/table-row/index.js +58 -0
- package/components/data/table/table-row-action/index.d.ts +69 -0
- package/components/data/table/table-row-action/index.js +95 -0
- package/components/data/table/utils/buildSelectionColumns.d.ts +3 -0
- package/components/data/table/utils/buildSelectionColumns.js +161 -0
- package/components/data/table/utils/columnBuilder.d.ts +35 -0
- package/components/data/table/utils/columnBuilder.js +225 -0
- package/components/data/table/utils/columnProxy.d.ts +21 -0
- package/components/data/table/utils/columnProxy.js +117 -0
- package/components/data/table/utils/columnWidthDistribution.d.ts +22 -0
- package/components/data/table/utils/columnWidthDistribution.js +98 -0
- package/components/data/table/utils/constants.d.ts +52 -0
- package/components/data/table/utils/constants.js +84 -0
- package/components/data/table/utils/crud-handlers.d.ts +11 -0
- package/components/data/table/utils/crud-handlers.js +523 -0
- package/components/data/table/utils/dynamic-columns.d.ts +38 -0
- package/components/data/table/utils/dynamic-columns.js +222 -0
- package/components/data/table/utils/groupHeaderUtils.d.ts +18 -0
- package/components/data/table/utils/groupHeaderUtils.js +102 -0
- package/components/data/table/utils/index.d.ts +101 -0
- package/components/data/table/utils/index.js +849 -0
- package/components/data/table/utils/renderDisplayCell.d.ts +11 -0
- package/components/data/table/utils/renderDisplayCell.js +183 -0
- package/components/data/table/utils/script-page-size-broadcast.d.ts +2 -0
- package/components/data/table/utils/script-page-size-broadcast.js +45 -0
- package/components/data/table/utils/selectionUtils.d.ts +37 -0
- package/components/data/table/utils/selectionUtils.js +165 -0
- package/components/data/table/utils/table-helpers.d.ts +62 -0
- package/components/data/table/utils/table-helpers.js +100 -0
- package/components/data/table/utils/validation.d.ts +13 -0
- package/components/data/table/utils/validation.js +125 -0
- package/components/data/types.d.ts +104 -0
- package/components/data/types.js +113 -0
- package/components/data/utils/field-data-utils.d.ts +7 -0
- package/components/data/utils/field-data-utils.js +66 -0
- package/components/data/utils/filter-field-util.d.ts +13 -0
- package/components/data/utils/filter-field-util.js +81 -0
- package/components/data/utils/index.d.ts +90 -0
- package/components/data/utils/index.js +216 -0
- package/components/dialogs/alert-dialog/index.d.ts +158 -0
- package/components/dialogs/alert-dialog/index.js +90 -0
- package/components/dialogs/alert-dialog/props.d.ts +43 -0
- package/components/dialogs/alert-dialog/props.js +5 -0
- package/components/dialogs/confirm-dialog/index.d.ts +160 -0
- package/components/dialogs/confirm-dialog/index.js +115 -0
- package/components/dialogs/confirm-dialog/props.d.ts +47 -0
- package/components/dialogs/confirm-dialog/props.js +5 -0
- package/components/dialogs/dialog/index.d.ts +170 -0
- package/components/dialogs/dialog/index.js +73 -0
- package/components/dialogs/dialog/props.d.ts +66 -0
- package/components/dialogs/dialog/props.js +5 -0
- package/components/dialogs/dialog-actions/index.d.ts +67 -0
- package/components/dialogs/dialog-actions/index.js +28 -0
- package/components/dialogs/dialog-actions/props.d.ts +14 -0
- package/components/dialogs/dialog-actions/props.js +5 -0
- package/components/dialogs/dialog-body/index.d.ts +66 -0
- package/components/dialogs/dialog-body/index.js +32 -0
- package/components/dialogs/dialog-body/props.d.ts +15 -0
- package/components/dialogs/dialog-body/props.js +5 -0
- package/components/dialogs/dialog-content/index.d.ts +69 -0
- package/components/dialogs/dialog-content/index.js +43 -0
- package/components/dialogs/dialog-content/props.d.ts +27 -0
- package/components/dialogs/dialog-content/props.js +5 -0
- package/components/dialogs/dialog-header/index.d.ts +84 -0
- package/components/dialogs/dialog-header/index.js +104 -0
- package/components/dialogs/dialog-header/props.d.ts +73 -0
- package/components/dialogs/dialog-header/props.js +5 -0
- package/components/dialogs/iframe-dialog/index.d.ts +178 -0
- package/components/dialogs/iframe-dialog/index.js +131 -0
- package/components/dialogs/iframe-dialog/props.d.ts +83 -0
- package/components/dialogs/iframe-dialog/props.js +5 -0
- package/components/dialogs/index.d.ts +4 -0
- package/components/dialogs/index.js +139 -0
- package/components/dialogs/login-dialog/index.d.ts +163 -0
- package/components/dialogs/login-dialog/index.js +370 -0
- package/components/dialogs/login-dialog/props.d.ts +98 -0
- package/components/dialogs/login-dialog/props.js +5 -0
- package/components/dialogs/page-dialog/index.d.ts +162 -0
- package/components/dialogs/page-dialog/index.js +105 -0
- package/components/dialogs/page-dialog/props.d.ts +59 -0
- package/components/dialogs/page-dialog/props.js +5 -0
- package/components/dialogs/props.d.ts +41 -0
- package/components/dialogs/props.js +5 -0
- package/components/dialogs/withDialogWrapper.d.ts +59 -0
- package/components/dialogs/withDialogWrapper.js +124 -0
- package/components/form/button/index.d.ts +77 -0
- package/components/form/button/index.js +255 -0
- package/components/form/button/props.d.ts +71 -0
- package/components/form/button/props.js +5 -0
- package/components/form/button-group/index.d.ts +69 -0
- package/components/form/button-group/index.js +74 -0
- package/components/form/button-group/props.d.ts +24 -0
- package/components/form/button-group/props.js +5 -0
- package/components/input/calendar/index.d.ts +130 -0
- package/components/input/calendar/index.js +566 -0
- package/components/input/calendar/props.d.ts +105 -0
- package/components/input/calendar/props.js +5 -0
- package/components/input/calendar/utils.d.ts +51 -0
- package/components/input/calendar/utils.js +336 -0
- package/components/input/chips/SortableChip/index.d.ts +4 -0
- package/components/input/chips/SortableChip/index.js +115 -0
- package/components/input/chips/SortableChip/props.d.ts +16 -0
- package/components/input/chips/SortableChip/props.js +5 -0
- package/components/input/chips/index.d.ts +224 -0
- package/components/input/chips/index.js +583 -0
- package/components/input/chips/props.d.ts +232 -0
- package/components/input/chips/props.js +5 -0
- package/components/input/chips/utils.d.ts +22 -0
- package/components/input/chips/utils.js +292 -0
- package/components/input/color-picker/index.d.ts +151 -0
- package/components/input/color-picker/index.js +689 -0
- package/components/input/color-picker/props.d.ts +131 -0
- package/components/input/color-picker/props.js +5 -0
- package/components/input/composite/index.d.ts +69 -0
- package/components/input/composite/index.js +147 -0
- package/components/input/composite/props.d.ts +23 -0
- package/components/input/composite/props.js +5 -0
- package/components/input/currency/index.d.ts +175 -0
- package/components/input/currency/index.js +265 -0
- package/components/input/currency/props.d.ts +154 -0
- package/components/input/currency/props.js +5 -0
- package/components/input/default/checkbox/index.d.ts +150 -0
- package/components/input/default/checkbox/index.js +253 -0
- package/components/input/default/checkbox/props.d.ts +78 -0
- package/components/input/default/checkbox/props.js +5 -0
- package/components/input/default/checkboxset/index.d.ts +191 -0
- package/components/input/default/checkboxset/index.js +478 -0
- package/components/input/default/checkboxset/props.d.ts +199 -0
- package/components/input/default/checkboxset/props.js +5 -0
- package/components/input/default/checkboxset/utils.d.ts +2 -0
- package/components/input/default/checkboxset/utils.js +30 -0
- package/components/input/default/radioset/index.d.ts +182 -0
- package/components/input/default/radioset/index.js +364 -0
- package/components/input/default/radioset/props.d.ts +172 -0
- package/components/input/default/radioset/props.js +5 -0
- package/components/input/default/switch/index.d.ts +174 -0
- package/components/input/default/switch/index.js +519 -0
- package/components/input/default/switch/prop.d.ts +153 -0
- package/components/input/default/switch/prop.js +5 -0
- package/components/input/epoch/date/components/DatePickerPopover.d.ts +4 -0
- package/components/input/epoch/date/components/DatePickerPopover.js +218 -0
- package/components/input/epoch/date/index.d.ts +86 -0
- package/components/input/epoch/date/index.js +606 -0
- package/components/input/epoch/date/props.d.ts +274 -0
- package/components/input/epoch/date/props.js +5 -0
- package/components/input/epoch/date/styled.d.ts +3 -0
- package/components/input/epoch/date/styled.js +70 -0
- package/components/input/epoch/date/utils.d.ts +20 -0
- package/components/input/epoch/date/utils.js +201 -0
- package/components/input/epoch/datetime/index.d.ts +86 -0
- package/components/input/epoch/datetime/index.js +717 -0
- package/components/input/epoch/datetime/props.d.ts +212 -0
- package/components/input/epoch/datetime/props.js +5 -0
- package/components/input/epoch/datetime/utils.d.ts +20 -0
- package/components/input/epoch/datetime/utils.js +283 -0
- package/components/input/epoch/time/index.d.ts +86 -0
- package/components/input/epoch/time/index.js +478 -0
- package/components/input/epoch/time/props.d.ts +155 -0
- package/components/input/epoch/time/props.js +5 -0
- package/components/input/epoch/time/utils.d.ts +24 -0
- package/components/input/epoch/time/utils.js +240 -0
- package/components/input/fileupload/Utils.d.ts +14 -0
- package/components/input/fileupload/Utils.js +139 -0
- package/components/input/fileupload/components/ListItems.d.ts +11 -0
- package/components/input/fileupload/components/ListItems.js +135 -0
- package/components/input/fileupload/components/MultiUpload.d.ts +4 -0
- package/components/input/fileupload/components/MultiUpload.js +78 -0
- package/components/input/fileupload/components/SingleUpload.d.ts +4 -0
- package/components/input/fileupload/components/SingleUpload.js +58 -0
- package/components/input/fileupload/index.d.ts +92 -0
- package/components/input/fileupload/index.js +179 -0
- package/components/input/fileupload/props.d.ts +320 -0
- package/components/input/fileupload/props.js +5 -0
- package/components/input/fileupload/useFileUpload.d.ts +36 -0
- package/components/input/fileupload/useFileUpload.js +414 -0
- package/components/input/number/index.d.ts +164 -0
- package/components/input/number/index.js +406 -0
- package/components/input/number/props.d.ts +119 -0
- package/components/input/number/props.js +5 -0
- package/components/input/rating/index.d.ts +208 -0
- package/components/input/rating/index.js +461 -0
- package/components/input/rating/props.d.ts +195 -0
- package/components/input/rating/props.js +5 -0
- package/components/input/select/index.d.ts +173 -0
- package/components/input/select/index.js +492 -0
- package/components/input/select/props.d.ts +134 -0
- package/components/input/select/props.js +5 -0
- package/components/input/slider/index.d.ts +162 -0
- package/components/input/slider/index.js +337 -0
- package/components/input/slider/props.d.ts +101 -0
- package/components/input/slider/props.js +5 -0
- package/components/input/text/index.d.ts +177 -0
- package/components/input/text/index.js +499 -0
- package/components/input/text/props.d.ts +141 -0
- package/components/input/text/props.js +5 -0
- package/components/input/text/util.d.ts +42 -0
- package/components/input/text/util.js +334 -0
- package/components/input/textarea/index.d.ts +151 -0
- package/components/input/textarea/index.js +366 -0
- package/components/input/textarea/props.d.ts +85 -0
- package/components/input/textarea/props.js +5 -0
- package/components/input/upload/index.d.ts +142 -0
- package/components/input/upload/index.js +133 -0
- package/components/input/upload/props.d.ts +61 -0
- package/components/input/upload/props.js +5 -0
- package/components/input/util/index.d.ts +1 -0
- package/components/input/util/index.js +11 -0
- package/components/layout/footer/index.d.ts +15 -0
- package/components/layout/footer/index.js +37 -0
- package/components/layout/footer/props.d.ts +8 -0
- package/components/layout/footer/props.js +5 -0
- package/components/layout/header/index.d.ts +15 -0
- package/components/layout/header/index.js +40 -0
- package/components/layout/header/props.d.ts +8 -0
- package/components/layout/header/props.js +5 -0
- package/components/layout/leftnav/index.d.ts +15 -0
- package/components/layout/leftnav/index.js +54 -0
- package/components/layout/leftnav/props.d.ts +25 -0
- package/components/layout/leftnav/props.js +5 -0
- package/components/layout/rightnav/index.d.ts +15 -0
- package/components/layout/rightnav/index.js +38 -0
- package/components/layout/rightnav/props.d.ts +13 -0
- package/components/layout/rightnav/props.js +5 -0
- package/components/layout/topnav/index.d.ts +15 -0
- package/components/layout/topnav/index.js +40 -0
- package/components/layout/topnav/props.d.ts +8 -0
- package/components/layout/topnav/props.js +5 -0
- package/components/navbar/index.d.ts +70 -0
- package/components/navbar/index.js +101 -0
- package/components/navbar/nav/index.d.ts +90 -0
- package/components/navbar/nav/index.js +244 -0
- package/components/navbar/nav/props.d.ts +56 -0
- package/components/navbar/nav/props.js +5 -0
- package/components/navbar/nav-item/index.d.ts +63 -0
- package/components/navbar/nav-item/index.js +66 -0
- package/components/navbar/nav-item/props.d.ts +29 -0
- package/components/navbar/nav-item/props.js +5 -0
- package/components/navigation/breadcrumb/index.d.ts +66 -0
- package/components/navigation/breadcrumb/index.js +67 -0
- package/components/navigation/breadcrumb/props.d.ts +6 -0
- package/components/navigation/breadcrumb/props.js +5 -0
- package/components/navigation/menu/components/ListItems.d.ts +23 -0
- package/components/navigation/menu/components/ListItems.js +71 -0
- package/components/navigation/menu/constants.d.ts +53 -0
- package/components/navigation/menu/constants.js +102 -0
- package/components/navigation/menu/hooks/useHoverState.hook.d.ts +17 -0
- package/components/navigation/menu/hooks/useHoverState.hook.js +48 -0
- package/components/navigation/menu/hooks/useKeyboardMovements.hook.d.ts +12 -0
- package/components/navigation/menu/hooks/useKeyboardMovements.hook.js +37 -0
- package/components/navigation/menu/hooks/useTransformedDataset.hook.d.ts +5 -0
- package/components/navigation/menu/hooks/useTransformedDataset.hook.js +15 -0
- package/components/navigation/menu/index.d.ts +105 -0
- package/components/navigation/menu/index.js +1031 -0
- package/components/navigation/menu/props.d.ts +74 -0
- package/components/navigation/menu/props.js +5 -0
- package/components/navigation/menu/utils/action-task.d.ts +1 -0
- package/components/navigation/menu/utils/action-task.js +14 -0
- package/components/navigation/menu/utils/role-filter.d.ts +9 -0
- package/components/navigation/menu/utils/role-filter.js +76 -0
- package/components/navigation/popover/index.d.ts +97 -0
- package/components/navigation/popover/index.js +310 -0
- package/components/navigation/popover/props.d.ts +28 -0
- package/components/navigation/popover/props.js +13 -0
- package/components/page/content/index.d.ts +15 -0
- package/components/page/content/index.js +35 -0
- package/components/page/content/props.d.ts +6 -0
- package/components/page/content/props.js +5 -0
- package/components/page/error-boundary/index.d.ts +13 -0
- package/components/page/error-boundary/index.js +119 -0
- package/components/page/error-boundary/props.d.ts +30 -0
- package/components/page/error-boundary/props.js +5 -0
- package/components/page/index.d.ts +15 -0
- package/components/page/index.js +151 -0
- package/components/page/page-content/index.d.ts +15 -0
- package/components/page/page-content/index.js +34 -0
- package/components/page/page-content/props.d.ts +16 -0
- package/components/page/page-content/props.js +5 -0
- package/components/page/partial/index.d.ts +61 -0
- package/components/page/partial/index.js +46 -0
- package/components/page/partial/props.d.ts +6 -0
- package/components/page/partial/props.js +5 -0
- package/components/page/partial-container/index.d.ts +13 -0
- package/components/page/partial-container/index.js +112 -0
- package/components/page/partial-container/props.d.ts +38 -0
- package/components/page/partial-container/props.js +5 -0
- package/components/page/props.d.ts +33 -0
- package/components/page/props.js +5 -0
- package/components/page/toast-container/index.d.ts +13 -0
- package/components/page/toast-container/index.js +43 -0
- package/components/page/toast-container/props.d.ts +8 -0
- package/components/page/toast-container/props.js +5 -0
- package/components/prefab/container/index.d.ts +12 -0
- package/components/prefab/container/index.js +64 -0
- package/components/prefab/container/props.d.ts +23 -0
- package/components/prefab/container/props.js +5 -0
- package/components/prefab/index.d.ts +12 -0
- package/components/prefab/index.js +69 -0
- package/components/prefab/props.d.ts +18 -0
- package/components/prefab/props.js +5 -0
- package/context/AppContext.d.ts +9 -0
- package/context/AppContext.js +25 -0
- package/context/AppSpinnerProvider.d.ts +15 -0
- package/context/AppSpinnerProvider.js +43 -0
- package/context/LayoutProvider.d.ts +7 -0
- package/context/LayoutProvider.js +66 -0
- package/context/LocalizationProvider.d.ts +4 -0
- package/context/LocalizationProvider.js +80 -0
- package/context/PrefabContext.d.ts +15 -0
- package/context/PrefabContext.js +195 -0
- package/context/WidgetProvider.d.ts +19 -0
- package/context/WidgetProvider.js +274 -0
- package/core/app-config.js +1 -0
- package/core/app.service.d.ts +19 -0
- package/core/app.service.js +366 -0
- package/core/appVariablesStore.d.ts +5 -0
- package/core/appVariablesStore.js +23 -0
- package/core/appstore.d.ts +35 -0
- package/core/appstore.js +88 -0
- package/core/constants/currency-constant.d.ts +11 -0
- package/core/constants/currency-constant.js +1071 -0
- package/core/constants/events.d.ts +24 -0
- package/core/constants/events.js +63 -0
- package/core/constants/index.d.ts +10 -0
- package/core/constants/index.js +49 -0
- package/core/dialog.service.d.ts +31 -0
- package/core/dialog.service.js +75 -0
- package/core/event-notifier.d.ts +20 -0
- package/core/event-notifier.js +150 -0
- package/core/formatter/array-formatters.d.ts +4 -0
- package/core/formatter/array-formatters.js +33 -0
- package/core/formatter/date-formatters.d.ts +9 -0
- package/core/formatter/date-formatters.js +245 -0
- package/core/formatter/index.d.ts +19 -0
- package/core/formatter/index.js +133 -0
- package/core/formatter/number-formatters.d.ts +20 -0
- package/core/formatter/number-formatters.js +181 -0
- package/core/formatter/security-formatters.d.ts +25 -0
- package/core/formatter/security-formatters.js +321 -0
- package/core/formatter/string-formatters.d.ts +10 -0
- package/core/formatter/string-formatters.js +49 -0
- package/core/formatter/types.d.ts +33 -0
- package/core/formatter/types.js +18 -0
- package/core/formatters.d.ts +3 -0
- package/core/formatters.js +24 -0
- package/core/proxy-service.d.ts +6 -0
- package/core/proxy-service.js +571 -0
- package/core/script-registry.d.ts +23 -0
- package/core/script-registry.js +149 -0
- package/core/security.service.d.ts +12 -0
- package/core/security.service.js +11 -0
- package/core/util/compare.d.ts +1 -0
- package/core/util/compare.js +36 -0
- package/core/util/dom.d.ts +4 -0
- package/core/util/dom.js +107 -0
- package/core/util/index.d.ts +65 -0
- package/core/util/index.js +191 -0
- package/core/util/safe-is-equal.js +156 -0
- package/core/util/security.d.ts +64 -0
- package/core/util/security.js +183 -0
- package/core/util/utils.d.ts +34 -0
- package/core/util/utils.js +228 -0
- package/core/widget-observer.d.ts +3 -0
- package/core/widget-observer.js +98 -0
- package/higherOrder/BaseApp.d.ts +13 -0
- package/higherOrder/BaseApp.js +614 -0
- package/higherOrder/BaseAppProps.d.ts +37 -0
- package/higherOrder/BaseAppProps.js +5 -0
- package/higherOrder/BaseDateTime.d.ts +62 -0
- package/higherOrder/BaseDateTime.js +268 -0
- package/higherOrder/BasePage.d.ts +10 -0
- package/higherOrder/BasePage.js +909 -0
- package/higherOrder/BasePartial.d.ts +7 -0
- package/higherOrder/BasePartial.js +125 -0
- package/higherOrder/BasePrefab.d.ts +17 -0
- package/higherOrder/BasePrefab.js +234 -0
- package/higherOrder/DataNav.d.ts +53 -0
- package/higherOrder/DataNav.js +461 -0
- package/higherOrder/helper.d.ts +32 -0
- package/higherOrder/helper.js +81 -0
- package/higherOrder/props.d.ts +116 -0
- package/higherOrder/props.js +5 -0
- package/higherOrder/withBaseWrapper.d.ts +5 -0
- package/higherOrder/withBaseWrapper.js +218 -0
- package/higherOrder/withStandalone.d.ts +11 -0
- package/higherOrder/withStandalone.js +29 -0
- package/hooks/useAccess.d.ts +18 -0
- package/hooks/useAccess.js +321 -0
- package/hooks/useAppConfig.d.ts +3 -0
- package/hooks/useAppConfig.js +42 -0
- package/hooks/useAuth.d.ts +55 -0
- package/hooks/useAuth.js +568 -0
- package/hooks/useDataSourceSubscription.d.ts +15 -0
- package/hooks/useDataSourceSubscription.js +125 -0
- package/hooks/useDebounce.d.ts +21 -0
- package/hooks/useDebounce.js +76 -0
- package/hooks/useDeviceVisibility.d.ts +4 -0
- package/hooks/useDeviceVisibility.js +49 -0
- package/hooks/useHttp.d.ts +57 -0
- package/hooks/useHttp.js +531 -0
- package/libs/index.js +13 -0
- package/libs/prefab/index.js +20 -0
- package/mui-config/theme-provider.d.ts +3 -0
- package/mui-config/theme-provider.js +17 -0
- package/mui-config/theme.d.ts +2 -0
- package/mui-config/theme.js +364 -0
- package/package-lock.json +16455 -0
- package/package.json +135 -0
- package/providers/AppProviders.js +27 -0
- package/runtime-dynamic/App.d.ts +7 -0
- package/runtime-dynamic/App.js +144 -0
- package/runtime-dynamic/app-initializer.d.ts +15 -0
- package/runtime-dynamic/app-initializer.js +447 -0
- package/runtime-dynamic/components/ErrorBoundary.d.ts +18 -0
- package/runtime-dynamic/components/ErrorBoundary.js +93 -0
- package/runtime-dynamic/components/PageWrapper.d.ts +1 -0
- package/runtime-dynamic/components/PageWrapper.js +43 -0
- package/runtime-dynamic/components/PrefabPreview.d.ts +1 -0
- package/runtime-dynamic/components/PrefabPreview.js +84 -0
- package/runtime-dynamic/components/partial-content.d.ts +15 -0
- package/runtime-dynamic/components/partial-content.js +50 -0
- package/runtime-dynamic/components/prefab-content.d.ts +10 -0
- package/runtime-dynamic/components/prefab-content.js +31 -0
- package/runtime-dynamic/components/use-dynamic-component.d.ts +10 -0
- package/runtime-dynamic/components/use-dynamic-component.js +165 -0
- package/runtime-dynamic/factories/build-base-page-like-component.d.ts +8 -0
- package/runtime-dynamic/factories/build-base-page-like-component.js +59 -0
- package/runtime-dynamic/factories/prefab-factory.d.ts +3 -0
- package/runtime-dynamic/factories/prefab-factory.js +82 -0
- package/runtime-dynamic/factories/startup-info.d.ts +6 -0
- package/runtime-dynamic/factories/startup-info.js +28 -0
- package/runtime-dynamic/factories/utils.d.ts +23 -0
- package/runtime-dynamic/factories/utils.js +131 -0
- package/runtime-dynamic/index.d.ts +14 -0
- package/runtime-dynamic/index.js +191 -0
- package/runtime-dynamic/main.d.ts +2 -0
- package/runtime-dynamic/main.js +84 -0
- package/runtime-dynamic/preview-mode.d.ts +15 -0
- package/runtime-dynamic/preview-mode.js +31 -0
- package/runtime-dynamic/preview-navigation.d.ts +6 -0
- package/runtime-dynamic/preview-navigation.js +38 -0
- package/runtime-dynamic/preview-resource-base.d.ts +12 -0
- package/runtime-dynamic/preview-resource-base.js +65 -0
- package/runtime-dynamic/registry/component-registry.d.ts +3 -0
- package/runtime-dynamic/registry/component-registry.js +353 -0
- package/runtime-dynamic/registry/custom-widget-registry.d.ts +7 -0
- package/runtime-dynamic/registry/custom-widget-registry.js +18 -0
- package/runtime-dynamic/registry/index.d.ts +2 -0
- package/runtime-dynamic/registry/index.js +63 -0
- package/runtime-dynamic/registry/store.d.ts +9 -0
- package/runtime-dynamic/registry/store.js +26 -0
- package/runtime-dynamic/routes.d.ts +2 -0
- package/runtime-dynamic/routes.js +107 -0
- package/runtime-dynamic/services/app-extension-provider.d.ts +1 -0
- package/runtime-dynamic/services/app-extension-provider.js +45 -0
- package/runtime-dynamic/services/cache.d.ts +29 -0
- package/runtime-dynamic/services/cache.js +57 -0
- package/runtime-dynamic/services/component-ref-provider.d.ts +12 -0
- package/runtime-dynamic/services/component-ref-provider.js +149 -0
- package/runtime-dynamic/services/css-scoping.d.ts +2 -0
- package/runtime-dynamic/services/css-scoping.js +53 -0
- package/runtime-dynamic/services/fragment-url.d.ts +16 -0
- package/runtime-dynamic/services/fragment-url.js +74 -0
- package/runtime-dynamic/services/index.d.ts +10 -0
- package/runtime-dynamic/services/index.js +152 -0
- package/runtime-dynamic/services/markup-transpiler.d.ts +12 -0
- package/runtime-dynamic/services/markup-transpiler.js +250 -0
- package/runtime-dynamic/services/prefab-resources.d.ts +18 -0
- package/runtime-dynamic/services/prefab-resources.js +159 -0
- package/runtime-dynamic/services/resource-manager.d.ts +2 -0
- package/runtime-dynamic/services/resource-manager.js +66 -0
- package/runtime-dynamic/services/script-executor.d.ts +8 -0
- package/runtime-dynamic/services/script-executor.js +90 -0
- package/runtime-dynamic/services/variable-factory.d.ts +2 -0
- package/runtime-dynamic/services/variable-factory.js +260 -0
- package/runtime-dynamic/services/variable-registry.d.ts +12 -0
- package/runtime-dynamic/services/variable-registry.js +118 -0
- package/runtime-dynamic/services/variable-transpiler.d.ts +5 -0
- package/runtime-dynamic/services/variable-transpiler.js +159 -0
- package/runtime-dynamic/shims/next-image.d.ts +35 -0
- package/runtime-dynamic/shims/next-image.js +60 -0
- package/runtime-dynamic/shims/next-link.d.ts +25 -0
- package/runtime-dynamic/shims/next-link.js +33 -0
- package/runtime-dynamic/shims/next-navigation.d.ts +16 -0
- package/runtime-dynamic/shims/next-navigation.js +52 -0
- package/runtime-dynamic/utils/index.d.ts +9 -0
- package/runtime-dynamic/utils/index.js +40 -0
- package/store/bindActions/i18nActions.d.ts +7 -0
- package/store/bindActions/i18nActions.js +18 -0
- package/store/index.d.ts +18 -0
- package/store/index.js +40 -0
- package/store/middleware/navigationMiddleware.d.ts +10 -0
- package/store/middleware/navigationMiddleware.js +48 -0
- package/store/middleware/pendingTabNavigationIntentMiddleware.d.ts +6 -0
- package/store/middleware/pendingTabNavigationIntentMiddleware.js +25 -0
- package/store/slices/appConfigSlice.d.ts +21 -0
- package/store/slices/appConfigSlice.js +105 -0
- package/store/slices/authSlice.d.ts +54 -0
- package/store/slices/authSlice.js +526 -0
- package/store/slices/i18nSlice.d.ts +25 -0
- package/store/slices/i18nSlice.js +206 -0
- package/store/slices/navigationSlice.d.ts +7 -0
- package/store/slices/navigationSlice.js +35 -0
- package/store/viewport.service.d.ts +45 -0
- package/store/viewport.service.js +255 -0
- package/tsconfig.declaration.tsbuildinfo +1 -0
- package/types/global.d.js +3 -0
- package/types/index.d.ts +64 -0
- package/types/index.js +15 -0
- package/utils/attr.d.ts +1 -0
- package/utils/attr.js +92 -0
- package/utils/custom-expression/index.d.ts +43 -0
- package/utils/custom-expression/index.js +161 -0
- package/utils/custom-expression/parser.d.ts +15 -0
- package/utils/custom-expression/parser.js +208 -0
- package/utils/dataset-util.d.ts +31 -0
- package/utils/dataset-util.js +173 -0
- package/utils/eval-expression.js +32 -0
- package/utils/form-state.util.d.ts +62 -0
- package/utils/form-state.util.js +167 -0
- package/utils/form-utils.d.ts +84 -0
- package/utils/form-utils.js +232 -0
- package/utils/format-util.d.ts +25 -0
- package/utils/format-util.js +300 -0
- package/utils/layoutsize-util.d.ts +1 -0
- package/utils/layoutsize-util.js +57 -0
- package/utils/lib-error-skipper.d.ts +11 -0
- package/utils/lib-error-skipper.js +75 -0
- package/utils/page-params-util.d.ts +20 -0
- package/utils/page-params-util.js +56 -0
- package/utils/pending-tab-navigation-intent.d.ts +4 -0
- package/utils/pending-tab-navigation-intent.js +25 -0
- package/utils/resource-url.d.ts +1 -0
- package/utils/resource-url.js +27 -0
- package/utils/state-persistance.d.ts +27 -0
- package/utils/state-persistance.js +411 -0
- package/utils/style-utils.d.ts +28 -0
- package/utils/style-utils.js +92 -0
- package/utils/transformedDataset-utils.d.ts +67 -0
- package/utils/transformedDataset-utils.js +645 -0
- package/utils/widget-cleanup-util.d.ts +32 -0
- package/utils/widget-cleanup-util.js +109 -0
- package/utils/widgets.d.ts +3 -0
- package/utils/widgets.js +97 -0
- package/variables/base-variable.d.ts +61 -0
- package/variables/base-variable.js +180 -0
- package/variables/constants.d.ts +21 -0
- package/variables/constants.js +27 -0
- package/variables/crud-variable.d.ts +39 -0
- package/variables/crud-variable.js +227 -0
- package/variables/live-variable.d.ts +58 -0
- package/variables/live-variable.js +226 -0
- package/variables/metadata.service.d.ts +24 -0
- package/variables/metadata.service.js +122 -0
- package/variables/model-variable.d.ts +12 -0
- package/variables/model-variable.js +86 -0
- package/variables/service-variable.d.ts +41 -0
- package/variables/service-variable.js +356 -0
- package/wm-namespace.d.ts +11 -0
- package/wm-namespace.js +14 -0
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports["default"] = exports.BaseApp = void 0;
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _cloneDeep = _interopRequireDefault(require("lodash-es/cloneDeep"));
|
|
16
|
+
var _get2 = _interopRequireDefault(require("lodash-es/get"));
|
|
17
|
+
var _variables = require("@wavemaker-ai/variables");
|
|
18
|
+
var _store = require("../store");
|
|
19
|
+
var _useAuth2 = require("../hooks/useAuth");
|
|
20
|
+
var _i18nSlice = require("../store/slices/i18nSlice");
|
|
21
|
+
var _appstore = _interopRequireDefault(require("../core/appstore"));
|
|
22
|
+
var _appVariablesStore = require("../core/appVariablesStore");
|
|
23
|
+
var _AppContext = _interopRequireDefault(require("../context/AppContext"));
|
|
24
|
+
var _eventNotifier = _interopRequireDefault(require("../core/event-notifier"));
|
|
25
|
+
var _dialog = _interopRequireDefault(require("../core/dialog.service"));
|
|
26
|
+
var _app = require("../core/app.service");
|
|
27
|
+
var _proxyService = require("../core/proxy-service");
|
|
28
|
+
var _helper = require("./helper");
|
|
29
|
+
var _authSlice = require("../store/slices/authSlice");
|
|
30
|
+
var _AppSpinnerProvider = _interopRequireDefault(require("../context/AppSpinnerProvider"));
|
|
31
|
+
var _LayoutProvider = _interopRequireDefault(require("../context/LayoutProvider"));
|
|
32
|
+
var _formatter = _interopRequireDefault(require("../core/formatter"));
|
|
33
|
+
var _utils = require("../core/util/utils");
|
|
34
|
+
var _metadata = require("../variables/metadata.service");
|
|
35
|
+
var _i18nActions = require("../store/bindActions/i18nActions");
|
|
36
|
+
var _container = require("../components/container");
|
|
37
|
+
var _partialContainer = _interopRequireDefault(require("../components/page/partial-container"));
|
|
38
|
+
var _ref, _ref$wm; // @ts-ignore
|
|
39
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
40
|
+
var __jsx = _react["default"].createElement;
|
|
41
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
42
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
43
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
44
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
45
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
46
|
+
// Add global declaration for wm property
|
|
47
|
+
|
|
48
|
+
(_ref$wm = (_ref = global).wm) !== null && _ref$wm !== void 0 ? _ref$wm : _ref.wm = {};
|
|
49
|
+
|
|
50
|
+
// HOC function that wraps the app component
|
|
51
|
+
var BaseApp = exports.BaseApp = function BaseApp(WrappedComponent, addAppScript, getAppVariables) {
|
|
52
|
+
var appInfo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
53
|
+
var AppContextComponent = function AppContextComponent(props) {
|
|
54
|
+
var _info$appConfig;
|
|
55
|
+
var dispatch = (0, _store.useAppDispatch)();
|
|
56
|
+
var authContext = (0, _useAuth2.useAuth)();
|
|
57
|
+
var i18n = (0, _store.useAppSelector)(function (state) {
|
|
58
|
+
return state.i18n;
|
|
59
|
+
});
|
|
60
|
+
var info = (0, _store.useAppSelector)(function (state) {
|
|
61
|
+
return state.info;
|
|
62
|
+
});
|
|
63
|
+
var i18nService = _appstore["default"].I18nService.get();
|
|
64
|
+
var _useState = (0, _react.useState)(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _helper.BaseAppInitialState), {}, {
|
|
65
|
+
updateActivePage: updateActivePage,
|
|
66
|
+
changeLocale: changeLocale,
|
|
67
|
+
selectedLocale: i18n.selectedLocale || "en",
|
|
68
|
+
localeFormats: {
|
|
69
|
+
date: i18n.dateFormat,
|
|
70
|
+
time: i18n.timeFormat,
|
|
71
|
+
currency: i18n.currencyCode
|
|
72
|
+
},
|
|
73
|
+
baseUrl: (info === null || info === void 0 || (_info$appConfig = info.appConfig) === null || _info$appConfig === void 0 ? void 0 : _info$appConfig.url) || "",
|
|
74
|
+
appConfig: _objectSpread(_objectSpread({}, info === null || info === void 0 ? void 0 : info.appConfig), {}, {
|
|
75
|
+
SecurityService: authContext,
|
|
76
|
+
loggedInUser: (0, _cloneDeep["default"])(authContext === null || authContext === void 0 ? void 0 : authContext.loggedInUser) || _authSlice.defaultUserState
|
|
77
|
+
}),
|
|
78
|
+
serviceDefinitions: (0, _cloneDeep["default"])((info === null || info === void 0 ? void 0 : info.serviceDefs) || {}),
|
|
79
|
+
notifyApp: notifyApp,
|
|
80
|
+
notify: notify,
|
|
81
|
+
eval: evaluateExpression,
|
|
82
|
+
openActionDialog: openActionDialog,
|
|
83
|
+
executeStartAppOperations: executeStartAppOperations,
|
|
84
|
+
importModule: _helper.importModule,
|
|
85
|
+
Widgets: {},
|
|
86
|
+
subscribe: subscribe,
|
|
87
|
+
targetPlatform: "WEB",
|
|
88
|
+
hasOwnObjectProperty: _utils.hasOwnObjectProperty,
|
|
89
|
+
formatters: _formatter["default"]
|
|
90
|
+
}, appInfo), _i18nActions.i18nService), i18nService)),
|
|
91
|
+
appContext = _useState[0],
|
|
92
|
+
setAppContext = _useState[1];
|
|
93
|
+
var appProxyRef = (0, _react.useRef)(null);
|
|
94
|
+
var isInitializedRef = (0, _react.useRef)(false);
|
|
95
|
+
var serviceErrorSubscriptionRef = (0, _react.useRef)(null);
|
|
96
|
+
var isVariablesExecutedRef = (0, _react.useRef)(false);
|
|
97
|
+
var registrationTimeoutRef = (0, _react.useRef)(null);
|
|
98
|
+
var pendingWidgetRegistrations = (0, _react.useRef)({});
|
|
99
|
+
var subscribersRef = (0, _react.useRef)(new Map());
|
|
100
|
+
(0, _react.useEffect)(function () {
|
|
101
|
+
var definitions = (0, _cloneDeep["default"])((info === null || info === void 0 ? void 0 : info.serviceDefs) || {});
|
|
102
|
+
if (appProxyRef.current) {
|
|
103
|
+
appProxyRef.current.serviceDefinitions = definitions;
|
|
104
|
+
}
|
|
105
|
+
setAppContext(function (prev) {
|
|
106
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
107
|
+
serviceDefinitions: definitions
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}, [info === null || info === void 0 ? void 0 : info.serviceDefs]);
|
|
111
|
+
|
|
112
|
+
// Sync appConfig.loggedInUser and SecurityService when auth state changes
|
|
113
|
+
var authLoggedInUser = (0, _store.useAppSelector)(function (state) {
|
|
114
|
+
return state.auth.loggedInUser;
|
|
115
|
+
});
|
|
116
|
+
(0, _react.useEffect)(function () {
|
|
117
|
+
var _ref2, _appProxyRef$current$, _appProxyRef$current;
|
|
118
|
+
var loggedInUser = (0, _cloneDeep["default"])(authContext === null || authContext === void 0 ? void 0 : authContext.loggedInUser) || _authSlice.defaultUserState;
|
|
119
|
+
var newAppConfig = _objectSpread(_objectSpread({}, (_ref2 = (_appProxyRef$current$ = (_appProxyRef$current = appProxyRef.current) === null || _appProxyRef$current === void 0 ? void 0 : _appProxyRef$current.appConfig) !== null && _appProxyRef$current$ !== void 0 ? _appProxyRef$current$ : info === null || info === void 0 ? void 0 : info.appConfig) !== null && _ref2 !== void 0 ? _ref2 : {}), {}, {
|
|
120
|
+
SecurityService: authContext,
|
|
121
|
+
loggedInUser: loggedInUser
|
|
122
|
+
});
|
|
123
|
+
if (appProxyRef.current) {
|
|
124
|
+
var _appProxyRef$current$2;
|
|
125
|
+
appProxyRef.current.appConfig = newAppConfig;
|
|
126
|
+
// Refresh app-level loggedInUser variable
|
|
127
|
+
var loggedInUserVar = (_appProxyRef$current$2 = appProxyRef.current.Variables) === null || _appProxyRef$current$2 === void 0 ? void 0 : _appProxyRef$current$2.loggedInUser;
|
|
128
|
+
if (loggedInUserVar !== null && loggedInUserVar !== void 0 && loggedInUserVar.invokeOnParamChange) {
|
|
129
|
+
loggedInUserVar.invokeOnParamChange();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
setAppContext(function (prev) {
|
|
133
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
134
|
+
appConfig: _objectSpread(_objectSpread({}, prev.appConfig), {}, {
|
|
135
|
+
SecurityService: authContext,
|
|
136
|
+
loggedInUser: loggedInUser
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}, [authLoggedInUser]);
|
|
141
|
+
var _useAuth = (0, _useAuth2.useAuth)(),
|
|
142
|
+
securityConfig = _useAuth.securityConfig;
|
|
143
|
+
(0, _react.useEffect)(function () {
|
|
144
|
+
var securityService = _objectSpread(_objectSpread({}, authContext), {}, {
|
|
145
|
+
securityConfig: securityConfig,
|
|
146
|
+
get: function get() {
|
|
147
|
+
return securityConfig;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
(0, _variables.wmSetDependency)("security", securityService);
|
|
151
|
+
}, [authContext, securityConfig]);
|
|
152
|
+
(0, _react.useEffect)(function () {
|
|
153
|
+
var localeFormats = {
|
|
154
|
+
date: i18n.dateFormat,
|
|
155
|
+
time: i18n.timeFormat,
|
|
156
|
+
currency: i18n.currencyCode
|
|
157
|
+
};
|
|
158
|
+
if (appProxyRef.current) {
|
|
159
|
+
appProxyRef.current.localeFormats = localeFormats;
|
|
160
|
+
}
|
|
161
|
+
setAppContext(function (prev) {
|
|
162
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
163
|
+
localeFormats: localeFormats
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
}, [i18n.dateFormat, i18n.timeFormat, i18n.currencyCode]);
|
|
167
|
+
|
|
168
|
+
// Set up service error listener using EventNotifier (outside useEffect)
|
|
169
|
+
(0, _react.useEffect)(function () {
|
|
170
|
+
var unsubscribe = _eventNotifier["default"].ROOT.subscribe("SERVICE_ERROR", function (variable, error, options) {
|
|
171
|
+
var _options$xhrObj, _options$xhrObj2;
|
|
172
|
+
// if error is 401, show login dialog
|
|
173
|
+
if ((options === null || options === void 0 || (_options$xhrObj = options.xhrObj) === null || _options$xhrObj === void 0 ? void 0 : _options$xhrObj.status) === 401) {
|
|
174
|
+
(0, _app.handle401)();
|
|
175
|
+
}
|
|
176
|
+
if ((options === null || options === void 0 || (_options$xhrObj2 = options.xhrObj) === null || _options$xhrObj2 === void 0 ? void 0 : _options$xhrObj2.code) === "ERR_CANCELED") {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
notifyApp(error, "error", false);
|
|
180
|
+
});
|
|
181
|
+
serviceErrorSubscriptionRef.current = unsubscribe;
|
|
182
|
+
// Cleanup function
|
|
183
|
+
return function () {
|
|
184
|
+
if (serviceErrorSubscriptionRef.current) {
|
|
185
|
+
serviceErrorSubscriptionRef.current();
|
|
186
|
+
}
|
|
187
|
+
// Clear any pending widget registration timeout
|
|
188
|
+
if (registrationTimeoutRef.current) {
|
|
189
|
+
clearTimeout(registrationTimeoutRef.current);
|
|
190
|
+
registrationTimeoutRef.current = null;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
}, []);
|
|
194
|
+
|
|
195
|
+
// Initialize app once
|
|
196
|
+
(0, _react.useEffect)(function () {
|
|
197
|
+
if (!(info !== null && info !== void 0 && info.serviceDefs)) return;
|
|
198
|
+
if (isInitializedRef.current) return;
|
|
199
|
+
isInitializedRef.current = true;
|
|
200
|
+
|
|
201
|
+
// initialize app
|
|
202
|
+
initializeApp();
|
|
203
|
+
// Cleanup function
|
|
204
|
+
return function () {
|
|
205
|
+
// Clean up service error subscription
|
|
206
|
+
if (serviceErrorSubscriptionRef.current) {
|
|
207
|
+
serviceErrorSubscriptionRef.current();
|
|
208
|
+
}
|
|
209
|
+
// Clear any pending widget registration timeout
|
|
210
|
+
if (registrationTimeoutRef.current) {
|
|
211
|
+
clearTimeout(registrationTimeoutRef.current);
|
|
212
|
+
registrationTimeoutRef.current = null;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
}, [info === null || info === void 0 ? void 0 : info.serviceDefs]);
|
|
216
|
+
function openActionDialog(notification, title) {
|
|
217
|
+
setAppContext(function (prev) {
|
|
218
|
+
if (title) {
|
|
219
|
+
var _prev$Widgets, _prev$Widgets$open;
|
|
220
|
+
prev === null || prev === void 0 || (_prev$Widgets = prev.Widgets) === null || _prev$Widgets === void 0 || (_prev$Widgets = _prev$Widgets[title]) === null || _prev$Widgets === void 0 || (_prev$Widgets$open = _prev$Widgets.open) === null || _prev$Widgets$open === void 0 || _prev$Widgets$open.call(_prev$Widgets);
|
|
221
|
+
}
|
|
222
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
223
|
+
notification: notification
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function executeStartAppOperations() {
|
|
228
|
+
return _executeStartAppOperations.apply(this, arguments);
|
|
229
|
+
}
|
|
230
|
+
function _executeStartAppOperations() {
|
|
231
|
+
_executeStartAppOperations = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
232
|
+
var startUpVariables, appVariables, variablePromises;
|
|
233
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
234
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
235
|
+
case 0:
|
|
236
|
+
if (!isVariablesExecutedRef.current) {
|
|
237
|
+
_context7.next = 2;
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
return _context7.abrupt("return");
|
|
241
|
+
case 2:
|
|
242
|
+
isVariablesExecutedRef.current = true;
|
|
243
|
+
startUpVariables = appInfo.startUpVariables || [];
|
|
244
|
+
appVariables = appProxyRef.current.Variables; // Execute startup variables
|
|
245
|
+
variablePromises = startUpVariables.map(/*#__PURE__*/function () {
|
|
246
|
+
var _ref8 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(varName) {
|
|
247
|
+
var variable;
|
|
248
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
249
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
250
|
+
case 0:
|
|
251
|
+
variable = appVariables[varName];
|
|
252
|
+
if (!(variable && variable.invoke && typeof variable.invoke === "function")) {
|
|
253
|
+
_context6.next = 12;
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
_context6.prev = 2;
|
|
257
|
+
_context6.next = 5;
|
|
258
|
+
return variable.invoke();
|
|
259
|
+
case 5:
|
|
260
|
+
return _context6.abrupt("return", _context6.sent);
|
|
261
|
+
case 8:
|
|
262
|
+
_context6.prev = 8;
|
|
263
|
+
_context6.t0 = _context6["catch"](2);
|
|
264
|
+
console.warn("Error invoking startup variable ".concat(varName, ":"), _context6.t0);
|
|
265
|
+
return _context6.abrupt("return", null);
|
|
266
|
+
case 12:
|
|
267
|
+
return _context6.abrupt("return", Promise.resolve());
|
|
268
|
+
case 13:
|
|
269
|
+
case "end":
|
|
270
|
+
return _context6.stop();
|
|
271
|
+
}
|
|
272
|
+
}, _callee6, null, [[2, 8]]);
|
|
273
|
+
}));
|
|
274
|
+
return function (_x2) {
|
|
275
|
+
return _ref8.apply(this, arguments);
|
|
276
|
+
};
|
|
277
|
+
}());
|
|
278
|
+
_context7.prev = 6;
|
|
279
|
+
_context7.next = 9;
|
|
280
|
+
return Promise.allSettled(variablePromises);
|
|
281
|
+
case 9:
|
|
282
|
+
if (!(appProxyRef.current.onAppVariablesReady && typeof appProxyRef.current.onAppVariablesReady === "function")) {
|
|
283
|
+
_context7.next = 12;
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
_context7.next = 12;
|
|
287
|
+
return appProxyRef.current.onAppVariablesReady();
|
|
288
|
+
case 12:
|
|
289
|
+
setTimeout(function () {
|
|
290
|
+
var _appProxyRef$current3;
|
|
291
|
+
notify("app-variables-data-loaded", {
|
|
292
|
+
pageName: (_appProxyRef$current3 = appProxyRef.current) === null || _appProxyRef$current3 === void 0 ? void 0 : _appProxyRef$current3.activePageName
|
|
293
|
+
});
|
|
294
|
+
}, 0);
|
|
295
|
+
_context7.next = 18;
|
|
296
|
+
break;
|
|
297
|
+
case 15:
|
|
298
|
+
_context7.prev = 15;
|
|
299
|
+
_context7.t0 = _context7["catch"](6);
|
|
300
|
+
console.error("Error during app startup operations:", _context7.t0);
|
|
301
|
+
case 18:
|
|
302
|
+
case "end":
|
|
303
|
+
return _context7.stop();
|
|
304
|
+
}
|
|
305
|
+
}, _callee7, null, [[6, 15]]);
|
|
306
|
+
}));
|
|
307
|
+
return _executeStartAppOperations.apply(this, arguments);
|
|
308
|
+
}
|
|
309
|
+
var initializeApp = /*#__PURE__*/function () {
|
|
310
|
+
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
311
|
+
var appProxy, appVariables, _get, APP_VARIABLES, executeAppStartup, executeAppBeforeStartup;
|
|
312
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
313
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
314
|
+
case 0:
|
|
315
|
+
_context3.prev = 0;
|
|
316
|
+
appProxy = (0, _proxyService.createStateProxy)(appContext, [], setAppContext);
|
|
317
|
+
appProxy.serviceDefinitions = (0, _cloneDeep["default"])((info === null || info === void 0 ? void 0 : info.serviceDefs) || {});
|
|
318
|
+
appProxyRef.current = appProxy;
|
|
319
|
+
|
|
320
|
+
// Get app variables
|
|
321
|
+
appVariables = {
|
|
322
|
+
Variables: {},
|
|
323
|
+
Actions: {}
|
|
324
|
+
};
|
|
325
|
+
if (getAppVariables && typeof getAppVariables === "function") {
|
|
326
|
+
appVariables = getAppVariables(appProxy);
|
|
327
|
+
} else {
|
|
328
|
+
// Fallback to appstore
|
|
329
|
+
APP_VARIABLES = (_get = _appstore["default"].get("AppConfig")) === null || _get === void 0 ? void 0 : _get.appVariables;
|
|
330
|
+
if (APP_VARIABLES) {
|
|
331
|
+
appVariables = (0, _appVariablesStore.getAppVariablesInstance)(appProxy, APP_VARIABLES);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Set variables and actions in app proxy
|
|
336
|
+
appProxy.Variables = appVariables.Variables;
|
|
337
|
+
appProxy.Actions = appVariables.Actions;
|
|
338
|
+
|
|
339
|
+
// Initialize app script and register callbacks
|
|
340
|
+
if (addAppScript && typeof addAppScript === "function") {
|
|
341
|
+
addAppScript(appProxy);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Execute app startup operations
|
|
345
|
+
executeAppStartup = /*#__PURE__*/function () {
|
|
346
|
+
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
347
|
+
var startUpActions, _iterator, _step, actionName, action;
|
|
348
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
349
|
+
while (1) switch (_context.prev = _context.next) {
|
|
350
|
+
case 0:
|
|
351
|
+
startUpActions = appInfo.startUpActions || []; // Execute startup actions
|
|
352
|
+
_iterator = _createForOfIteratorHelper(startUpActions);
|
|
353
|
+
try {
|
|
354
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
355
|
+
actionName = _step.value;
|
|
356
|
+
action = appVariables.Actions[actionName];
|
|
357
|
+
if (action && action.invoke && typeof action.invoke === "function") {
|
|
358
|
+
try {
|
|
359
|
+
action.invoke();
|
|
360
|
+
} catch (error) {
|
|
361
|
+
console.warn("Error invoking startup action ".concat(actionName, ":"), error);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
} catch (err) {
|
|
366
|
+
_iterator.e(err);
|
|
367
|
+
} finally {
|
|
368
|
+
_iterator.f();
|
|
369
|
+
}
|
|
370
|
+
case 3:
|
|
371
|
+
case "end":
|
|
372
|
+
return _context.stop();
|
|
373
|
+
}
|
|
374
|
+
}, _callee);
|
|
375
|
+
}));
|
|
376
|
+
return function executeAppStartup() {
|
|
377
|
+
return _ref4.apply(this, arguments);
|
|
378
|
+
};
|
|
379
|
+
}();
|
|
380
|
+
executeAppBeforeStartup = /*#__PURE__*/function () {
|
|
381
|
+
var _ref5 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
382
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
383
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
384
|
+
case 0:
|
|
385
|
+
_context2.t0 = appProxy.hasOwnProperty("onBeforeAppReady");
|
|
386
|
+
if (!_context2.t0) {
|
|
387
|
+
_context2.next = 4;
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
_context2.next = 4;
|
|
391
|
+
return appProxy.onBeforeAppReady();
|
|
392
|
+
case 4:
|
|
393
|
+
return _context2.abrupt("return", Promise.resolve());
|
|
394
|
+
case 5:
|
|
395
|
+
case "end":
|
|
396
|
+
return _context2.stop();
|
|
397
|
+
}
|
|
398
|
+
}, _callee2);
|
|
399
|
+
}));
|
|
400
|
+
return function executeAppBeforeStartup() {
|
|
401
|
+
return _ref5.apply(this, arguments);
|
|
402
|
+
};
|
|
403
|
+
}(); // onBeforeAppReady should call before calling anything
|
|
404
|
+
_context3.next = 13;
|
|
405
|
+
return executeAppBeforeStartup();
|
|
406
|
+
case 13:
|
|
407
|
+
_context3.next = 15;
|
|
408
|
+
return executeAppStartup();
|
|
409
|
+
case 15:
|
|
410
|
+
// Initialize DialogService in appstore
|
|
411
|
+
_appstore["default"].DialogService.set(_dialog["default"]);
|
|
412
|
+
|
|
413
|
+
// Set app as ready and update context
|
|
414
|
+
setAppContext(function (prev) {
|
|
415
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
416
|
+
Variables: appVariables.Variables,
|
|
417
|
+
Actions: appVariables.Actions,
|
|
418
|
+
appProxy: appProxy,
|
|
419
|
+
isAppReady: true
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
_context3.next = 23;
|
|
423
|
+
break;
|
|
424
|
+
case 19:
|
|
425
|
+
_context3.prev = 19;
|
|
426
|
+
_context3.t0 = _context3["catch"](0);
|
|
427
|
+
console.error("Error initializing app:", _context3.t0);
|
|
428
|
+
setAppContext(function (prev) {
|
|
429
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
430
|
+
isAppReady: true
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
case 23:
|
|
434
|
+
case "end":
|
|
435
|
+
return _context3.stop();
|
|
436
|
+
}
|
|
437
|
+
}, _callee3, null, [[0, 19]]);
|
|
438
|
+
}));
|
|
439
|
+
return function initializeApp() {
|
|
440
|
+
return _ref3.apply(this, arguments);
|
|
441
|
+
};
|
|
442
|
+
}();
|
|
443
|
+
function evaluateExpression(fn) {
|
|
444
|
+
var failOnError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
445
|
+
try {
|
|
446
|
+
return fn.call(appContext);
|
|
447
|
+
} catch (e) {
|
|
448
|
+
if (failOnError) {
|
|
449
|
+
throw e;
|
|
450
|
+
} else {
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
function updateActivePage(pageName) {
|
|
456
|
+
if (appProxyRef.current) {
|
|
457
|
+
var _appProxyRef$current2;
|
|
458
|
+
appProxyRef.current.lastActivePage = (_appProxyRef$current2 = appProxyRef.current) === null || _appProxyRef$current2 === void 0 ? void 0 : _appProxyRef$current2.activePageName;
|
|
459
|
+
appProxyRef.current.activePageName = pageName;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
function subscribe(eventName, callback) {
|
|
463
|
+
if (!eventName || typeof callback !== "function") {
|
|
464
|
+
return function () {};
|
|
465
|
+
}
|
|
466
|
+
if (!subscribersRef.current.has(eventName)) {
|
|
467
|
+
subscribersRef.current.set(eventName, new Set());
|
|
468
|
+
}
|
|
469
|
+
var subscribers = subscribersRef.current.get(eventName);
|
|
470
|
+
subscribers.add(callback);
|
|
471
|
+
return function () {
|
|
472
|
+
var subs = subscribersRef.current.get(eventName);
|
|
473
|
+
if (subs) {
|
|
474
|
+
subs["delete"](callback);
|
|
475
|
+
if (subs.size === 0) {
|
|
476
|
+
subscribersRef.current["delete"](eventName);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
function notify(eventName, value) {
|
|
482
|
+
if (!eventName) {
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
var subscribers = subscribersRef.current.get(eventName);
|
|
486
|
+
if (subscribers && subscribers.size > 0) {
|
|
487
|
+
subscribers.forEach(function (callback) {
|
|
488
|
+
try {
|
|
489
|
+
callback(value);
|
|
490
|
+
} catch (error) {
|
|
491
|
+
console.error("Error in subscriber callback for ".concat(eventName, ":"), error);
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
// Change locale function
|
|
497
|
+
function changeLocale(locale) {
|
|
498
|
+
dispatch((0, _i18nSlice.setSelectedLocaleAndLoadBundle)({
|
|
499
|
+
locale: locale
|
|
500
|
+
}));
|
|
501
|
+
}
|
|
502
|
+
function notifyApp(message, type, showTypeLabel) {
|
|
503
|
+
// App-level notification
|
|
504
|
+
var notificationAction = (0, _get2["default"])(appContext, "Actions.appNotification");
|
|
505
|
+
if (notificationAction) {
|
|
506
|
+
var appNotification = notificationAction.config.paramProvider();
|
|
507
|
+
var newParams = function newParams() {
|
|
508
|
+
return {
|
|
509
|
+
text: message || "Success",
|
|
510
|
+
content: "inline",
|
|
511
|
+
"class": type || "Success",
|
|
512
|
+
duration: appNotification.duration || 3000,
|
|
513
|
+
toasterPosition: appNotification.toasterPosition || "bottom right",
|
|
514
|
+
showTypeLabel: showTypeLabel !== null && showTypeLabel !== void 0 ? showTypeLabel : false
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
notificationAction.config.paramProvider = newParams;
|
|
518
|
+
notificationAction.invoke();
|
|
519
|
+
} else {
|
|
520
|
+
console.warn('The default Action "appNotification" doesn\'t exist in the app. App notified following error:\n ', message);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
var renderCommonComponents = function renderCommonComponents() {
|
|
524
|
+
return __jsx(_container.WmContainer, {
|
|
525
|
+
hidden: true,
|
|
526
|
+
content: "Common",
|
|
527
|
+
"data-widget-id": "common-container",
|
|
528
|
+
className: "app-container-default",
|
|
529
|
+
renderPartial: function renderPartial(props, onLoad) {
|
|
530
|
+
return __jsx(_partialContainer["default"], {
|
|
531
|
+
onRender: function onRender(commonComponent) {
|
|
532
|
+
appProxyRef.current.Common = commonComponent;
|
|
533
|
+
},
|
|
534
|
+
onLoad: onLoad,
|
|
535
|
+
"data-widget-id": "common-partial-container",
|
|
536
|
+
content: props.content,
|
|
537
|
+
partialName: "commonPartialContainer",
|
|
538
|
+
listener: props.listener
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
};
|
|
543
|
+
var _useState2 = (0, _react.useState)([]),
|
|
544
|
+
sessionFailureRequests = _useState2[0],
|
|
545
|
+
setSessionFailureRequests = _useState2[1];
|
|
546
|
+
var pushToSessionFailureRequests = function pushToSessionFailureRequests(callback) {
|
|
547
|
+
setSessionFailureRequests(function (prev) {
|
|
548
|
+
return [].concat((0, _toConsumableArray2["default"])(prev), [callback]);
|
|
549
|
+
});
|
|
550
|
+
};
|
|
551
|
+
var executeSessionFailureRequests = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
552
|
+
var sessionFailureRequestPromises;
|
|
553
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
554
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
555
|
+
case 0:
|
|
556
|
+
sessionFailureRequestPromises = sessionFailureRequests.map(/*#__PURE__*/function () {
|
|
557
|
+
var _ref7 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4(callback) {
|
|
558
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
559
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
560
|
+
case 0:
|
|
561
|
+
_context4.prev = 0;
|
|
562
|
+
_context4.next = 3;
|
|
563
|
+
return callback();
|
|
564
|
+
case 3:
|
|
565
|
+
return _context4.abrupt("return", _context4.sent);
|
|
566
|
+
case 6:
|
|
567
|
+
_context4.prev = 6;
|
|
568
|
+
_context4.t0 = _context4["catch"](0);
|
|
569
|
+
console.warn("Error invoking session failure request:", _context4.t0);
|
|
570
|
+
return _context4.abrupt("return", null);
|
|
571
|
+
case 10:
|
|
572
|
+
case "end":
|
|
573
|
+
return _context4.stop();
|
|
574
|
+
}
|
|
575
|
+
}, _callee4, null, [[0, 6]]);
|
|
576
|
+
}));
|
|
577
|
+
return function (_x) {
|
|
578
|
+
return _ref7.apply(this, arguments);
|
|
579
|
+
};
|
|
580
|
+
}());
|
|
581
|
+
_context5.next = 3;
|
|
582
|
+
return Promise.allSettled(sessionFailureRequestPromises);
|
|
583
|
+
case 3:
|
|
584
|
+
setSessionFailureRequests([]);
|
|
585
|
+
case 4:
|
|
586
|
+
case "end":
|
|
587
|
+
return _context5.stop();
|
|
588
|
+
}
|
|
589
|
+
}, _callee5);
|
|
590
|
+
})), [sessionFailureRequests]);
|
|
591
|
+
if (appProxyRef.current) {
|
|
592
|
+
appProxyRef.current.executeSessionFailureRequests = executeSessionFailureRequests;
|
|
593
|
+
}
|
|
594
|
+
(0, _react.useEffect)(function () {
|
|
595
|
+
_metadata.metadataService.setMetadata(appContext === null || appContext === void 0 ? void 0 : appContext.serviceDefinitions);
|
|
596
|
+
(0, _variables.wmSetDependency)("metadata", _metadata.metadataService);
|
|
597
|
+
(0, _variables.wmSetDependency)("appManager", {
|
|
598
|
+
notify: notify,
|
|
599
|
+
pushToSessionFailureRequests: pushToSessionFailureRequests,
|
|
600
|
+
executeSessionFailureRequests: executeSessionFailureRequests,
|
|
601
|
+
handle401: _app.handle401
|
|
602
|
+
});
|
|
603
|
+
}, [appContext === null || appContext === void 0 ? void 0 : appContext.serviceDefinitions]);
|
|
604
|
+
return __jsx(_AppContext["default"].Provider, {
|
|
605
|
+
value: {
|
|
606
|
+
state: appContext,
|
|
607
|
+
proxy: appProxyRef.current
|
|
608
|
+
}
|
|
609
|
+
}, __jsx(_AppSpinnerProvider["default"], null, __jsx(_LayoutProvider["default"], null, __jsx(WrappedComponent, props), renderCommonComponents())));
|
|
610
|
+
};
|
|
611
|
+
AppContextComponent.displayName = "BaseApp(".concat(WrappedComponent.displayName || WrappedComponent.name || "Component", ")");
|
|
612
|
+
return AppContextComponent;
|
|
613
|
+
};
|
|
614
|
+
var _default = exports["default"] = BaseApp;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ProxyTarget } from "@wavemaker-ai/react-runtime/types";
|
|
2
|
+
/** Same shape as locale JSON `formats` for App/page proxies. */
|
|
3
|
+
export type LocaleFormatsProxy = {
|
|
4
|
+
date: string;
|
|
5
|
+
time: string;
|
|
6
|
+
currency: string;
|
|
7
|
+
};
|
|
8
|
+
type notify = (message: string, type: string, title?: any) => void;
|
|
9
|
+
export interface BaseAppProps {
|
|
10
|
+
Variables: Record<string, any>;
|
|
11
|
+
Actions: Record<string, any>;
|
|
12
|
+
isAppReady: boolean;
|
|
13
|
+
changeLocale: (locale: string) => void;
|
|
14
|
+
selectedLocale: string;
|
|
15
|
+
/** Locale bundle–style formats; synced from Redux `i18n`. */
|
|
16
|
+
localeFormats: LocaleFormatsProxy;
|
|
17
|
+
getDependency: (name: string) => any;
|
|
18
|
+
serviceDefinitions: Record<string, any>;
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
appConfig: any;
|
|
21
|
+
reload: () => void;
|
|
22
|
+
notifyApp: notify;
|
|
23
|
+
notify: (id: string, data: Record<string, unknown>) => void;
|
|
24
|
+
notification: Record<string, any> | null;
|
|
25
|
+
Common: Record<string, any>;
|
|
26
|
+
onPageReady: (activePageName: string, activePageScrope: any, activePageEl: any) => void;
|
|
27
|
+
openActionDialog: (notification: any, title?: string) => void;
|
|
28
|
+
eval: (fn: Function, failOnError?: boolean) => any;
|
|
29
|
+
getCurrentMonth: () => string;
|
|
30
|
+
updateActivePage: (pageName: string) => void;
|
|
31
|
+
executeStartAppOperations: () => Promise<any>;
|
|
32
|
+
importModule?: (moduleName: string) => any;
|
|
33
|
+
Widgets?: Record<string, ProxyTarget>;
|
|
34
|
+
subscribe: (eventName: string, callback: Function) => () => void;
|
|
35
|
+
autoUpdateVariables: string[];
|
|
36
|
+
}
|
|
37
|
+
export default BaseAppProps;
|