@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,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.createVariablesFromJson = createVariablesFromJson;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
12
|
+
var _variableRegistry = require("./variable-registry");
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
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; } } }; }
|
|
16
|
+
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; } }
|
|
17
|
+
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; }
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// Event handler wiring
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
var EVENT_HANDLER_REGEX = /^(\w+)\(([^)]*)\)$/;
|
|
23
|
+
var RETURN_VALUE_HANDLERS = new Set(["onBeforeUpdate", "onBeforeDatasetReady", "onOnline", "onOffline"]);
|
|
24
|
+
var EVENT_HANDLER_KEYS = new Set(["onSuccess", "onError", "onBeforeUpdate", "onCanUpdate", "onResult", "onBeforeDatasetReady", "onOnline", "onOffline", "onTimerFire"]);
|
|
25
|
+
function wireEventHandlers(config, scopeProxy) {
|
|
26
|
+
var _iterator = _createForOfIteratorHelper(EVENT_HANDLER_KEYS),
|
|
27
|
+
_step;
|
|
28
|
+
try {
|
|
29
|
+
var _loop = function _loop() {
|
|
30
|
+
var key = _step.value;
|
|
31
|
+
var value = config[key];
|
|
32
|
+
if (typeof value !== "string") return 0; // continue
|
|
33
|
+
var match = value.match(EVENT_HANDLER_REGEX);
|
|
34
|
+
if (!match) {
|
|
35
|
+
delete config[key];
|
|
36
|
+
return 0; // continue
|
|
37
|
+
}
|
|
38
|
+
var methodName = match[1];
|
|
39
|
+
var shouldReturn = RETURN_VALUE_HANDLERS.has(key);
|
|
40
|
+
config[key] = function () {
|
|
41
|
+
var fn = scopeProxy === null || scopeProxy === void 0 ? void 0 : scopeProxy[methodName];
|
|
42
|
+
if (typeof fn === "function") {
|
|
43
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
|
+
args[_key] = arguments[_key];
|
|
45
|
+
}
|
|
46
|
+
var result = fn.call.apply(fn, [scopeProxy].concat(args));
|
|
47
|
+
if (shouldReturn) return result;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
_ret;
|
|
52
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
53
|
+
_ret = _loop();
|
|
54
|
+
if (_ret === 0) continue;
|
|
55
|
+
}
|
|
56
|
+
} catch (err) {
|
|
57
|
+
_iterator.e(err);
|
|
58
|
+
} finally {
|
|
59
|
+
_iterator.f();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// isStaticParams — mirrors codegen's isStaticParamsVariable
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
|
|
67
|
+
function isStaticParams(variable) {
|
|
68
|
+
var db = variable.dataBinding;
|
|
69
|
+
if (!db) return true;
|
|
70
|
+
var entryIsStatic = function entryIsStatic(entry) {
|
|
71
|
+
var v = Array.isArray(entry.value) ? entry.value[0] : entry.value;
|
|
72
|
+
return !v || !(typeof v === "string" && v.startsWith("bind:"));
|
|
73
|
+
};
|
|
74
|
+
if (Array.isArray(db)) return db.every(entryIsStatic);
|
|
75
|
+
if (db && (0, _typeof2["default"])(db) === "object") {
|
|
76
|
+
return Object.values(db).every(function (opBindings) {
|
|
77
|
+
return Array.isArray(opBindings) ? opBindings.every(entryIsStatic) : true;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// paramProvider builder
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
|
|
87
|
+
function buildParamProvider(variable) {
|
|
88
|
+
var dataSet = variable.dataSet;
|
|
89
|
+
if (variable.isList && Array.isArray(dataSet)) {
|
|
90
|
+
return function () {
|
|
91
|
+
return (0, _toConsumableArray2["default"])(dataSet);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
var params = {};
|
|
95
|
+
var dataBinding = variable.dataBinding;
|
|
96
|
+
if (Array.isArray(dataBinding)) {
|
|
97
|
+
var _iterator2 = _createForOfIteratorHelper(dataBinding),
|
|
98
|
+
_step2;
|
|
99
|
+
try {
|
|
100
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
101
|
+
var binding = _step2.value;
|
|
102
|
+
if (binding.target) params[binding.target] = binding.value;
|
|
103
|
+
}
|
|
104
|
+
} catch (err) {
|
|
105
|
+
_iterator2.e(err);
|
|
106
|
+
} finally {
|
|
107
|
+
_iterator2.f();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (dataSet && !Array.isArray(dataSet) && (0, _typeof2["default"])(dataSet) === "object") {
|
|
111
|
+
for (var _i = 0, _Object$entries = Object.entries(dataSet); _i < _Object$entries.length; _i++) {
|
|
112
|
+
var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2),
|
|
113
|
+
key = _Object$entries$_i[0],
|
|
114
|
+
value = _Object$entries$_i[1];
|
|
115
|
+
if (!(key in params)) params[key] = value;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (variable.pageName && !params["pageName"]) {
|
|
119
|
+
params["pageName"] = variable.pageName;
|
|
120
|
+
}
|
|
121
|
+
return function () {
|
|
122
|
+
return _objectSpread({}, params);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ---------------------------------------------------------------------------
|
|
127
|
+
// Per-category config enhancers (DRY replacement for if-chains)
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
|
|
130
|
+
var NAVIGATION_CATEGORIES = new Set(["wm.NavigationAction", "wm.NavigationVariable"]);
|
|
131
|
+
var NOTIFICATION_CATEGORIES = new Set(["wm.NotificationAction", "wm.NotificationVariable"]);
|
|
132
|
+
var AUTH_CATEGORIES = new Set(["wm.LoginAction", "wm.LoginVariable", "wm.LogoutAction", "wm.LogoutVariable"]);
|
|
133
|
+
var enhanceNavigation = function enhanceNavigation(config, _variable, scopeProxy) {
|
|
134
|
+
config.appConfig = scopeProxy.appConfig;
|
|
135
|
+
};
|
|
136
|
+
var enhanceNotification = function enhanceNotification(config, variable, scopeProxy) {
|
|
137
|
+
config.toasterService = function () {
|
|
138
|
+
return scopeProxy.toaster;
|
|
139
|
+
};
|
|
140
|
+
config.onOk = config.onOk || function () {};
|
|
141
|
+
config.onClose = config.onClose || function () {};
|
|
142
|
+
var operation = variable.operation;
|
|
143
|
+
if (operation === "alert" || operation === "confirm") {
|
|
144
|
+
var widgetName = "Common".concat(operation.charAt(0).toUpperCase() + operation.slice(1), "Dialog");
|
|
145
|
+
config.showDialog = function (options) {
|
|
146
|
+
var _scopeProxy$App, _scopeProxy$App$openA;
|
|
147
|
+
scopeProxy === null || scopeProxy === void 0 || (_scopeProxy$App = scopeProxy.App) === null || _scopeProxy$App === void 0 || (_scopeProxy$App$openA = _scopeProxy$App.openActionDialog) === null || _scopeProxy$App$openA === void 0 || _scopeProxy$App$openA.call(_scopeProxy$App, options, widgetName);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
var dataBindings = variable.dataBinding;
|
|
151
|
+
var pageBinding = dataBindings === null || dataBindings === void 0 ? void 0 : dataBindings.find(function (b) {
|
|
152
|
+
return b.target === "page";
|
|
153
|
+
});
|
|
154
|
+
if (pageBinding !== null && pageBinding !== void 0 && pageBinding.value) {
|
|
155
|
+
var partialName = pageBinding.value.charAt(0).toUpperCase() + pageBinding.value.slice(1);
|
|
156
|
+
config.partialContent = {
|
|
157
|
+
component: (0, _variableRegistry.createLazyPartial)(partialName)
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
var enhanceAuth = function enhanceAuth(config, variable, scopeProxy) {
|
|
162
|
+
var _scopeProxy$appConfig, _variable$useDefaultS;
|
|
163
|
+
config.baseURL = (_scopeProxy$appConfig = scopeProxy.appConfig) === null || _scopeProxy$appConfig === void 0 ? void 0 : _scopeProxy$appConfig.url;
|
|
164
|
+
config.securityService = function () {
|
|
165
|
+
var _scopeProxy$appConfig2;
|
|
166
|
+
return (_scopeProxy$appConfig2 = scopeProxy.appConfig) === null || _scopeProxy$appConfig2 === void 0 ? void 0 : _scopeProxy$appConfig2.SecurityService;
|
|
167
|
+
};
|
|
168
|
+
config.useDefaultSuccessHandler = (_variable$useDefaultS = variable.useDefaultSuccessHandler) !== null && _variable$useDefaultS !== void 0 ? _variable$useDefaultS : true;
|
|
169
|
+
};
|
|
170
|
+
var enhanceServiceVariable = function enhanceServiceVariable(config, variable, scopeProxy) {
|
|
171
|
+
var _config$isStaticParam;
|
|
172
|
+
config.baseUrl = scopeProxy.baseUrl + "/services";
|
|
173
|
+
config.getServiceInfo = function () {
|
|
174
|
+
var _scopeProxy$serviceDe;
|
|
175
|
+
return (_scopeProxy$serviceDe = scopeProxy.serviceDefinitions) === null || _scopeProxy$serviceDe === void 0 || (_scopeProxy$serviceDe = _scopeProxy$serviceDe[variable.operationId]) === null || _scopeProxy$serviceDe === void 0 ? void 0 : _scopeProxy$serviceDe.wmServiceOperationInfo;
|
|
176
|
+
};
|
|
177
|
+
(_config$isStaticParam = config.isStaticParams) !== null && _config$isStaticParam !== void 0 ? _config$isStaticParam : config.isStaticParams = isStaticParams(variable);
|
|
178
|
+
};
|
|
179
|
+
var enhanceLiveVariable = function enhanceLiveVariable(config, variable, scopeProxy) {
|
|
180
|
+
var _config$isStaticParam2;
|
|
181
|
+
if (!config.operation) config.operation = "read";
|
|
182
|
+
if (!config.propertiesMap) config.propertiesMap = {
|
|
183
|
+
columns: []
|
|
184
|
+
};
|
|
185
|
+
if (!config.relatedTables) config.relatedTables = [];
|
|
186
|
+
config.baseUrl = scopeProxy.baseUrl;
|
|
187
|
+
(_config$isStaticParam2 = config.isStaticParams) !== null && _config$isStaticParam2 !== void 0 ? _config$isStaticParam2 : config.isStaticParams = isStaticParams(variable);
|
|
188
|
+
};
|
|
189
|
+
var enhanceCrudVariable = function enhanceCrudVariable(config, variable, scopeProxy) {
|
|
190
|
+
var _config$isStaticParam3;
|
|
191
|
+
config.baseUrl = scopeProxy.baseUrl;
|
|
192
|
+
(_config$isStaticParam3 = config.isStaticParams) !== null && _config$isStaticParam3 !== void 0 ? _config$isStaticParam3 : config.isStaticParams = isStaticParams(variable);
|
|
193
|
+
};
|
|
194
|
+
function getEnhancer(category) {
|
|
195
|
+
if (NAVIGATION_CATEGORIES.has(category)) return enhanceNavigation;
|
|
196
|
+
if (NOTIFICATION_CATEGORIES.has(category)) return enhanceNotification;
|
|
197
|
+
if (AUTH_CATEGORIES.has(category)) return enhanceAuth;
|
|
198
|
+
switch (category) {
|
|
199
|
+
case "wm.ServiceVariable":
|
|
200
|
+
return enhanceServiceVariable;
|
|
201
|
+
case "wm.LiveVariable":
|
|
202
|
+
return enhanceLiveVariable;
|
|
203
|
+
case "wm.CrudVariable":
|
|
204
|
+
return enhanceCrudVariable;
|
|
205
|
+
default:
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// ---------------------------------------------------------------------------
|
|
211
|
+
// Config builder
|
|
212
|
+
// ---------------------------------------------------------------------------
|
|
213
|
+
|
|
214
|
+
function buildInstanceConfig(variable, scopeProxy) {
|
|
215
|
+
var config = _objectSpread(_objectSpread({}, variable), {}, {
|
|
216
|
+
_context: scopeProxy,
|
|
217
|
+
paramProvider: variable.name === "loggedInUser" ? function () {
|
|
218
|
+
var _scopeProxy$appConfig3;
|
|
219
|
+
return (_scopeProxy$appConfig3 = scopeProxy.appConfig) === null || _scopeProxy$appConfig3 === void 0 ? void 0 : _scopeProxy$appConfig3.loggedInUser;
|
|
220
|
+
} : buildParamProvider(variable)
|
|
221
|
+
});
|
|
222
|
+
wireEventHandlers(config, scopeProxy);
|
|
223
|
+
var enhancer = getEnhancer(variable.category);
|
|
224
|
+
if (enhancer) enhancer(config, variable, scopeProxy);
|
|
225
|
+
return config;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ---------------------------------------------------------------------------
|
|
229
|
+
// Public API
|
|
230
|
+
// ---------------------------------------------------------------------------
|
|
231
|
+
|
|
232
|
+
function createVariablesFromJson(rawVariables, scopeProxy) {
|
|
233
|
+
if (!rawVariables || Object.keys(rawVariables).length === 0) return _variableRegistry.EMPTY_RESULT;
|
|
234
|
+
var Variables = {};
|
|
235
|
+
var Actions = {};
|
|
236
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(rawVariables); _i2 < _Object$entries2.length; _i2++) {
|
|
237
|
+
var _Object$entries2$_i = (0, _slicedToArray2["default"])(_Object$entries2[_i2], 2),
|
|
238
|
+
key = _Object$entries2$_i[0],
|
|
239
|
+
value = _Object$entries2$_i[1];
|
|
240
|
+
var _variable2 = value;
|
|
241
|
+
var category = _variable2.category;
|
|
242
|
+
var Ctor = _variableRegistry.CATEGORY_TO_CONSTRUCTOR[category];
|
|
243
|
+
if (!Ctor) continue;
|
|
244
|
+
try {
|
|
245
|
+
var _config = buildInstanceConfig(_variable2, scopeProxy);
|
|
246
|
+
var instance = new Ctor(_config);
|
|
247
|
+
if (_variableRegistry.ACTION_CATEGORIES.has(category)) {
|
|
248
|
+
Actions[key] = instance;
|
|
249
|
+
} else {
|
|
250
|
+
Variables[key] = instance;
|
|
251
|
+
}
|
|
252
|
+
} catch (err) {
|
|
253
|
+
console.error("[variable-factory] Failed to create \"".concat(key, "\" (").concat(category, "):"), err);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
Variables: Variables,
|
|
258
|
+
Actions: Actions
|
|
259
|
+
};
|
|
260
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type ConstructorClass = new (config: any) => any;
|
|
3
|
+
export declare const CATEGORY_TO_CONSTRUCTOR: Record<string, ConstructorClass>;
|
|
4
|
+
export declare const ACTION_CATEGORIES: Set<string>;
|
|
5
|
+
export declare const SCOPE_MAP: Record<string, unknown>;
|
|
6
|
+
export interface VariablesResult {
|
|
7
|
+
Variables: Record<string, unknown>;
|
|
8
|
+
Actions: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export declare const EMPTY_RESULT: VariablesResult;
|
|
11
|
+
export declare function createLazyPartial(partialName: string): React.LazyExoticComponent<React.ComponentType<any>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SCOPE_MAP = exports.EMPTY_RESULT = exports.CATEGORY_TO_CONSTRUCTOR = exports.ACTION_CATEGORIES = void 0;
|
|
9
|
+
exports.createLazyPartial = createLazyPartial;
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _modelVariable = require("@wavemaker-ai/react-runtime/variables/model-variable");
|
|
14
|
+
var _serviceVariable = require("@wavemaker-ai/react-runtime/variables/service-variable");
|
|
15
|
+
var _liveVariable = _interopRequireDefault(require("@wavemaker-ai/react-runtime/variables/live-variable"));
|
|
16
|
+
var _crudVariable = _interopRequireDefault(require("@wavemaker-ai/react-runtime/variables/crud-variable"));
|
|
17
|
+
var _navigationAction = require("@wavemaker-ai/react-runtime/actions/navigation-action");
|
|
18
|
+
var _notificationAction = require("@wavemaker-ai/react-runtime/actions/notification-action");
|
|
19
|
+
var _timerAction = require("@wavemaker-ai/react-runtime/actions/timer-action");
|
|
20
|
+
var _loginAction = require("@wavemaker-ai/react-runtime/actions/login-action");
|
|
21
|
+
var _logoutAction = require("@wavemaker-ai/react-runtime/actions/logout-action");
|
|
22
|
+
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); }
|
|
23
|
+
var CATEGORY_TO_CONSTRUCTOR = exports.CATEGORY_TO_CONSTRUCTOR = {
|
|
24
|
+
"wm.Variable": _modelVariable.ModelVariable,
|
|
25
|
+
"wm.ServiceVariable": _serviceVariable.ServiceVariable,
|
|
26
|
+
"wm.LiveVariable": _liveVariable["default"],
|
|
27
|
+
"wm.CrudVariable": _crudVariable["default"],
|
|
28
|
+
"wm.NavigationAction": _navigationAction.NavigationAction,
|
|
29
|
+
"wm.NavigationVariable": _navigationAction.NavigationAction,
|
|
30
|
+
"wm.NotificationAction": _notificationAction.NotificationAction,
|
|
31
|
+
"wm.NotificationVariable": _notificationAction.NotificationAction,
|
|
32
|
+
"wm.TimerAction": _timerAction.TimerAction,
|
|
33
|
+
"wm.TimerVariable": _timerAction.TimerAction,
|
|
34
|
+
"wm.LoginAction": _loginAction.LoginAction,
|
|
35
|
+
"wm.LoginVariable": _loginAction.LoginAction,
|
|
36
|
+
"wm.LogoutAction": _logoutAction.LogoutAction,
|
|
37
|
+
"wm.LogoutVariable": _logoutAction.LogoutAction
|
|
38
|
+
};
|
|
39
|
+
var ACTION_CATEGORIES = exports.ACTION_CATEGORIES = new Set(["wm.NavigationAction", "wm.NavigationVariable", "wm.NotificationAction", "wm.NotificationVariable", "wm.TimerAction", "wm.TimerVariable", "wm.LoginAction", "wm.LoginVariable", "wm.LogoutAction", "wm.LogoutVariable"]);
|
|
40
|
+
var SCOPE_MAP = exports.SCOPE_MAP = {
|
|
41
|
+
React: _react["default"],
|
|
42
|
+
ModelVariable: _modelVariable.ModelVariable,
|
|
43
|
+
ServiceVariable: _serviceVariable.ServiceVariable,
|
|
44
|
+
LiveVariable: _liveVariable["default"],
|
|
45
|
+
CrudVariable: _crudVariable["default"],
|
|
46
|
+
NavigationAction: _navigationAction.NavigationAction,
|
|
47
|
+
NotificationAction: _notificationAction.NotificationAction,
|
|
48
|
+
TimerAction: _timerAction.TimerAction,
|
|
49
|
+
LoginAction: _loginAction.LoginAction,
|
|
50
|
+
LogoutAction: _logoutAction.LogoutAction
|
|
51
|
+
};
|
|
52
|
+
var EMPTY_RESULT = exports.EMPTY_RESULT = {
|
|
53
|
+
Variables: {},
|
|
54
|
+
Actions: {}
|
|
55
|
+
};
|
|
56
|
+
function createLazyPartial(partialName) {
|
|
57
|
+
return /*#__PURE__*/(0, _react.lazy)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
58
|
+
var _yield$import, getComponentFromCache, setComponentInCache, _yield$import2, FType, _yield$import3, getComponentRef, _yield$import4, buildBasePageLikeComponent, cached, fragment, Built;
|
|
59
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
60
|
+
while (1) switch (_context.prev = _context.next) {
|
|
61
|
+
case 0:
|
|
62
|
+
_context.next = 2;
|
|
63
|
+
return Promise.resolve().then(function () {
|
|
64
|
+
return _interopRequireWildcard(require("@wavemaker-ai/react-runtime/runtime-dynamic/services/cache"));
|
|
65
|
+
});
|
|
66
|
+
case 2:
|
|
67
|
+
_yield$import = _context.sent;
|
|
68
|
+
getComponentFromCache = _yield$import.getComponentFromCache;
|
|
69
|
+
setComponentInCache = _yield$import.setComponentInCache;
|
|
70
|
+
_context.next = 7;
|
|
71
|
+
return Promise.resolve().then(function () {
|
|
72
|
+
return _interopRequireWildcard(require("@wavemaker-ai/react-runtime/runtime-dynamic/services/fragment-url"));
|
|
73
|
+
});
|
|
74
|
+
case 7:
|
|
75
|
+
_yield$import2 = _context.sent;
|
|
76
|
+
FType = _yield$import2.ComponentType;
|
|
77
|
+
_context.next = 11;
|
|
78
|
+
return Promise.resolve().then(function () {
|
|
79
|
+
return _interopRequireWildcard(require("@wavemaker-ai/react-runtime/runtime-dynamic/services/component-ref-provider"));
|
|
80
|
+
});
|
|
81
|
+
case 11:
|
|
82
|
+
_yield$import3 = _context.sent;
|
|
83
|
+
getComponentRef = _yield$import3.getComponentRef;
|
|
84
|
+
_context.next = 15;
|
|
85
|
+
return Promise.resolve().then(function () {
|
|
86
|
+
return _interopRequireWildcard(require("@wavemaker-ai/react-runtime/runtime-dynamic/factories/build-base-page-like-component"));
|
|
87
|
+
});
|
|
88
|
+
case 15:
|
|
89
|
+
_yield$import4 = _context.sent;
|
|
90
|
+
buildBasePageLikeComponent = _yield$import4.buildBasePageLikeComponent;
|
|
91
|
+
cached = getComponentFromCache(FType.PARTIAL, partialName);
|
|
92
|
+
if (!cached) {
|
|
93
|
+
_context.next = 20;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
return _context.abrupt("return", {
|
|
97
|
+
"default": cached
|
|
98
|
+
});
|
|
99
|
+
case 20:
|
|
100
|
+
_context.next = 22;
|
|
101
|
+
return getComponentRef(partialName, FType.PARTIAL);
|
|
102
|
+
case 22:
|
|
103
|
+
fragment = _context.sent;
|
|
104
|
+
_context.next = 25;
|
|
105
|
+
return buildBasePageLikeComponent("partial", partialName, fragment);
|
|
106
|
+
case 25:
|
|
107
|
+
Built = _context.sent;
|
|
108
|
+
setComponentInCache(FType.PARTIAL, partialName, Built);
|
|
109
|
+
return _context.abrupt("return", {
|
|
110
|
+
"default": Built
|
|
111
|
+
});
|
|
112
|
+
case 28:
|
|
113
|
+
case "end":
|
|
114
|
+
return _context.stop();
|
|
115
|
+
}
|
|
116
|
+
}, _callee);
|
|
117
|
+
})));
|
|
118
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type VariablesResult } from "./variable-registry";
|
|
2
|
+
type GetVariablesFn = (pageProxy: unknown) => VariablesResult;
|
|
3
|
+
export declare function clearVariablesCache(): void;
|
|
4
|
+
export declare function transpileAndBuildGetVariables(variablesCodeString: string, rawVariables: Record<string, unknown>): GetVariablesFn;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.clearVariablesCache = clearVariablesCache;
|
|
8
|
+
exports.transpileAndBuildGetVariables = transpileAndBuildGetVariables;
|
|
9
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct"));
|
|
12
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
+
var _sucrase = require("sucrase");
|
|
14
|
+
var _variableRegistry = require("./variable-registry");
|
|
15
|
+
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; } } }; }
|
|
16
|
+
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; } }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Entity provider shims (injects getEntityPropertyMap / getEntityRelatedTables)
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
function buildEntityProviderShims(rawVariables) {
|
|
25
|
+
var entityMap = new Map();
|
|
26
|
+
for (var _i = 0, _Object$values = Object.values(rawVariables || {}); _i < _Object$values.length; _i++) {
|
|
27
|
+
var config = _Object$values[_i];
|
|
28
|
+
var v = config;
|
|
29
|
+
if (!v.liveSource || !v.type || !v.propertiesMap) continue;
|
|
30
|
+
var key = "".concat(v.liveSource, "::").concat(v.type);
|
|
31
|
+
if (!entityMap.has(key)) {
|
|
32
|
+
entityMap.set(key, {
|
|
33
|
+
propertiesMap: v.propertiesMap,
|
|
34
|
+
relatedTables: v.relatedTables || []
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
getEntityPropertyMap: function getEntityPropertyMap(liveSource, entityName) {
|
|
40
|
+
var _entityMap$get;
|
|
41
|
+
return (_entityMap$get = entityMap.get("".concat(liveSource, "::").concat(entityName))) === null || _entityMap$get === void 0 ? void 0 : _entityMap$get.propertiesMap;
|
|
42
|
+
},
|
|
43
|
+
getEntityRelatedTables: function getEntityRelatedTables(liveSource, entityName) {
|
|
44
|
+
var _entityMap$get2;
|
|
45
|
+
return (_entityMap$get2 = entityMap.get("".concat(liveSource, "::").concat(entityName))) === null || _entityMap$get2 === void 0 ? void 0 : _entityMap$get2.relatedTables;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// Code preprocessing
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
var IMPORT_STATEMENT_REGEX = /import\s+[\s\S]*?\s+from\s+['"][^'"]+['"];?/g;
|
|
55
|
+
var EXPORT_DEFAULT_REGEX = /^\s*export\s+default\s+/m;
|
|
56
|
+
var PARTIAL_IMPORT_REGEX = /import\s+(\w+)\s+from\s+['"]@\/app\/components\/[^'"]+['"];?/g;
|
|
57
|
+
function extractPartialImports(code) {
|
|
58
|
+
var names = [];
|
|
59
|
+
var match;
|
|
60
|
+
while ((match = PARTIAL_IMPORT_REGEX.exec(code)) !== null) {
|
|
61
|
+
names.push(match[1]);
|
|
62
|
+
}
|
|
63
|
+
PARTIAL_IMPORT_REGEX.lastIndex = 0;
|
|
64
|
+
return names;
|
|
65
|
+
}
|
|
66
|
+
function preprocessVariablesCode(code) {
|
|
67
|
+
return code.replace(IMPORT_STATEMENT_REGEX, "").replace(EXPORT_DEFAULT_REGEX, "return ");
|
|
68
|
+
}
|
|
69
|
+
function compileTypeScript(code) {
|
|
70
|
+
var wrapped = "function __variableFactory__() {\n".concat(code, "\n}");
|
|
71
|
+
var result = (0, _sucrase.transform)(wrapped, {
|
|
72
|
+
transforms: ["typescript"]
|
|
73
|
+
});
|
|
74
|
+
return "".concat(result.code, "\nreturn __variableFactory__();");
|
|
75
|
+
}
|
|
76
|
+
function tryCompileVariableFactory(preprocessed) {
|
|
77
|
+
try {
|
|
78
|
+
return compileTypeScript(preprocessed);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
console.error("[variable-transpiler] Compilation failed:", err);
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function tryConstructVariableFactory(scopeNames, compiled) {
|
|
85
|
+
try {
|
|
86
|
+
return (0, _construct2["default"])(Function, (0, _toConsumableArray2["default"])(scopeNames).concat([compiled]));
|
|
87
|
+
} catch (err) {
|
|
88
|
+
console.error("[variable-transpiler] Function construction failed:", err);
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// Cache
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
var variablesCache = new Map();
|
|
98
|
+
function clearVariablesCache() {
|
|
99
|
+
variablesCache.clear();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// Public API
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
function transpileAndBuildGetVariables(variablesCodeString, rawVariables) {
|
|
107
|
+
if (!(variablesCodeString !== null && variablesCodeString !== void 0 && variablesCodeString.trim())) return function () {
|
|
108
|
+
return _variableRegistry.EMPTY_RESULT;
|
|
109
|
+
};
|
|
110
|
+
var cached = variablesCache.get(variablesCodeString);
|
|
111
|
+
if (cached) return cached;
|
|
112
|
+
var _buildEntityProviderS = buildEntityProviderShims(rawVariables),
|
|
113
|
+
getEntityPropertyMap = _buildEntityProviderS.getEntityPropertyMap,
|
|
114
|
+
getEntityRelatedTables = _buildEntityProviderS.getEntityRelatedTables;
|
|
115
|
+
var scopeWithShims = _objectSpread(_objectSpread({}, _variableRegistry.SCOPE_MAP), {}, {
|
|
116
|
+
getEntityPropertyMap: getEntityPropertyMap,
|
|
117
|
+
getEntityRelatedTables: getEntityRelatedTables
|
|
118
|
+
});
|
|
119
|
+
var _iterator = _createForOfIteratorHelper(extractPartialImports(variablesCodeString)),
|
|
120
|
+
_step;
|
|
121
|
+
try {
|
|
122
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
123
|
+
var name = _step.value;
|
|
124
|
+
scopeWithShims[name] = (0, _variableRegistry.createLazyPartial)(name);
|
|
125
|
+
}
|
|
126
|
+
} catch (err) {
|
|
127
|
+
_iterator.e(err);
|
|
128
|
+
} finally {
|
|
129
|
+
_iterator.f();
|
|
130
|
+
}
|
|
131
|
+
var scopeNames = Object.keys(scopeWithShims);
|
|
132
|
+
var scopeValues = Object.values(scopeWithShims);
|
|
133
|
+
var preprocessed = preprocessVariablesCode(variablesCodeString);
|
|
134
|
+
var compiled = tryCompileVariableFactory(preprocessed);
|
|
135
|
+
if (!compiled) return function () {
|
|
136
|
+
return _variableRegistry.EMPTY_RESULT;
|
|
137
|
+
};
|
|
138
|
+
var factoryBuilder = tryConstructVariableFactory(scopeNames, compiled);
|
|
139
|
+
if (!factoryBuilder) return function () {
|
|
140
|
+
return _variableRegistry.EMPTY_RESULT;
|
|
141
|
+
};
|
|
142
|
+
var getVariablesFn;
|
|
143
|
+
try {
|
|
144
|
+
getVariablesFn = factoryBuilder.apply(void 0, scopeValues);
|
|
145
|
+
} catch (err) {
|
|
146
|
+
console.error("[variable-transpiler] Factory execution failed:", err);
|
|
147
|
+
return function () {
|
|
148
|
+
return _variableRegistry.EMPTY_RESULT;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
if (typeof getVariablesFn !== "function") {
|
|
152
|
+
console.error("[variable-transpiler] Expected a function, got:", (0, _typeof2["default"])(getVariablesFn));
|
|
153
|
+
return function () {
|
|
154
|
+
return _variableRegistry.EMPTY_RESULT;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
variablesCache.set(variablesCodeString, getVariablesFn);
|
|
158
|
+
return getVariablesFn;
|
|
159
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shim for next/image in the dynamic preview runtime (non-Next.js).
|
|
3
|
+
* Renders a standard <img> element with the same props.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
interface ImageSrc {
|
|
7
|
+
src: string;
|
|
8
|
+
height?: number;
|
|
9
|
+
width?: number;
|
|
10
|
+
}
|
|
11
|
+
interface ImageProps {
|
|
12
|
+
src: string | ImageSrc;
|
|
13
|
+
alt?: string;
|
|
14
|
+
width?: number | string;
|
|
15
|
+
height?: number | string;
|
|
16
|
+
fill?: boolean;
|
|
17
|
+
loader?: (params: {
|
|
18
|
+
src: string;
|
|
19
|
+
width: number;
|
|
20
|
+
quality?: number;
|
|
21
|
+
}) => string;
|
|
22
|
+
quality?: number;
|
|
23
|
+
priority?: boolean;
|
|
24
|
+
loading?: "lazy" | "eager";
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
blurDataURL?: string;
|
|
27
|
+
unoptimized?: boolean;
|
|
28
|
+
onLoad?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
29
|
+
onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
className?: string;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
declare function NextImage({ src, alt, width, height, fill, loader: _loader, quality: _quality, priority, loading, placeholder: _placeholder, blurDataURL: _blurDataURL, unoptimized: _unoptimized, ...rest }: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export default NextImage;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _excluded = ["src", "alt", "width", "height", "fill", "loader", "quality", "priority", "loading", "placeholder", "blurDataURL", "unoptimized"];
|
|
13
|
+
/**
|
|
14
|
+
* Shim for next/image in the dynamic preview runtime (non-Next.js).
|
|
15
|
+
* Renders a standard <img> element with the same props.
|
|
16
|
+
*/
|
|
17
|
+
var __jsx = _react["default"].createElement;
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
function NextImage(_ref) {
|
|
21
|
+
var src = _ref.src,
|
|
22
|
+
_ref$alt = _ref.alt,
|
|
23
|
+
alt = _ref$alt === void 0 ? "" : _ref$alt,
|
|
24
|
+
width = _ref.width,
|
|
25
|
+
height = _ref.height,
|
|
26
|
+
fill = _ref.fill,
|
|
27
|
+
_loader = _ref.loader,
|
|
28
|
+
_quality = _ref.quality,
|
|
29
|
+
priority = _ref.priority,
|
|
30
|
+
loading = _ref.loading,
|
|
31
|
+
_placeholder = _ref.placeholder,
|
|
32
|
+
_blurDataURL = _ref.blurDataURL,
|
|
33
|
+
_unoptimized = _ref.unoptimized,
|
|
34
|
+
rest = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
35
|
+
var imgSrc = (0, _typeof2["default"])(src) === "object" ? src.src : src;
|
|
36
|
+
var imgWidth = width !== null && width !== void 0 ? width : (0, _typeof2["default"])(src) === "object" ? src.width : undefined;
|
|
37
|
+
var imgHeight = height !== null && height !== void 0 ? height : (0, _typeof2["default"])(src) === "object" ? src.height : undefined;
|
|
38
|
+
var resolvedStyle = _objectSpread({}, rest.style || {});
|
|
39
|
+
if (fill) {
|
|
40
|
+
resolvedStyle.position = "absolute";
|
|
41
|
+
resolvedStyle.width = "100%";
|
|
42
|
+
resolvedStyle.height = "100%";
|
|
43
|
+
resolvedStyle.objectFit = resolvedStyle.objectFit || "cover";
|
|
44
|
+
}
|
|
45
|
+
return (
|
|
46
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
47
|
+
__jsx("img", {
|
|
48
|
+
src: imgSrc,
|
|
49
|
+
alt: alt,
|
|
50
|
+
width: fill ? undefined : imgWidth,
|
|
51
|
+
height: fill ? undefined : imgHeight,
|
|
52
|
+
loading: priority ? "eager" : loading || "lazy",
|
|
53
|
+
style: resolvedStyle,
|
|
54
|
+
className: rest.className,
|
|
55
|
+
onLoad: rest.onLoad,
|
|
56
|
+
onError: rest.onError
|
|
57
|
+
})
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
var _default = exports["default"] = NextImage;
|