@wavemaker/react-runtime 11.14.1-rc.236
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.js +32 -0
- package/actions/login-action.js +53 -0
- package/actions/logout-action.js +41 -0
- package/actions/navigation-action.js +145 -0
- package/actions/notification-action.js +147 -0
- package/actions/timer-action.js +164 -0
- package/actions/toast-provider.js +111 -0
- package/actions/toast.js +115 -0
- package/actions/toast.service.js +94 -0
- package/actions/types/index.js +11 -0
- package/components/advanced/carousel/index.js +456 -0
- package/components/advanced/carousel/props.js +5 -0
- package/components/advanced/carousel/template.js +72 -0
- package/components/advanced/login/index.js +307 -0
- package/components/advanced/login/props.js +5 -0
- package/components/advanced/marquee/index.js +158 -0
- package/components/advanced/marquee/props.js +5 -0
- package/components/basic/anchor/index.js +239 -0
- package/components/basic/anchor/props.js +5 -0
- package/components/basic/audio/index.js +61 -0
- package/components/basic/html/index.js +158 -0
- package/components/basic/icon/index.js +85 -0
- package/components/basic/iframe/iframe.utils.js +10 -0
- package/components/basic/iframe/index.js +95 -0
- package/components/basic/label/index.js +139 -0
- package/components/basic/message/index.js +120 -0
- package/components/basic/message/props.js +5 -0
- package/components/basic/picture/index.js +117 -0
- package/components/basic/picture/props.js +5 -0
- package/components/basic/progress-bar/index.js +168 -0
- package/components/basic/progress-bar/props.js +18 -0
- package/components/basic/progress-circle/index.js +196 -0
- package/components/basic/progress-circle/props.js +16 -0
- package/components/basic/richtexteditor/index.js +533 -0
- package/components/basic/richtexteditor/props.js +5 -0
- package/components/basic/search/index.js +1023 -0
- package/components/basic/search/props.js +5 -0
- package/components/basic/search/providers.js +350 -0
- package/components/basic/spinner/index.js +202 -0
- package/components/basic/spinner/props.js +12 -0
- package/components/basic/tile/index.js +91 -0
- package/components/basic/tree/Components/TreeNodeComponent.js +142 -0
- package/components/basic/tree/index.js +503 -0
- package/components/basic/tree/props.js +5 -0
- package/components/basic/tree/utils.js +154 -0
- package/components/basic/video/index.js +85 -0
- package/components/basic/video/props.js +5 -0
- package/components/chart/components/barColumnChart/index.js +132 -0
- package/components/chart/components/barColumnChart/props.js +5 -0
- package/components/chart/components/bubbleChart/index.js +176 -0
- package/components/chart/components/bubbleChart/props.js +5 -0
- package/components/chart/components/chartLegend/components/ClassicLegendItem.js +39 -0
- package/components/chart/components/chartLegend/components/FuriousLegendItem.js +81 -0
- package/components/chart/components/chartLegend/index.js +69 -0
- package/components/chart/components/chartLegend/props.js +5 -0
- package/components/chart/components/chartLegend/utils.js +31 -0
- package/components/chart/components/chartTooltip/index.js +53 -0
- package/components/chart/components/chartTooltip/styles.js +37 -0
- package/components/chart/components/chartTooltip/utils.js +23 -0
- package/components/chart/components/cumulativeLineChart/index.js +113 -0
- package/components/chart/components/cumulativeLineChart/props.js +5 -0
- package/components/chart/components/cumulativeLineChart/utils.js +34 -0
- package/components/chart/components/index.js +40 -0
- package/components/chart/components/lineAreaChart/index.js +140 -0
- package/components/chart/components/lineAreaChart/props.js +5 -0
- package/components/chart/components/noDataMessage/index.js +27 -0
- package/components/chart/components/pieDonutChart/index.js +171 -0
- package/components/chart/components/pieDonutChart/props.js +5 -0
- package/components/chart/constant.js +72 -0
- package/components/chart/index.js +930 -0
- package/components/chart/props.js +5 -0
- package/components/chart/utils.js +691 -0
- package/components/common/AppSpinner.js +36 -0
- package/components/common/app-spinner.js +26 -0
- package/components/common/index.js +12 -0
- package/components/constants.js +1208 -0
- package/components/container/accordion/accordion-pane/index.js +108 -0
- package/components/container/accordion/accordion-pane/props.js +11 -0
- package/components/container/accordion/index.js +232 -0
- package/components/container/accordion/props.js +13 -0
- package/components/container/alignment-utils.js +183 -0
- package/components/container/index.js +188 -0
- package/components/container/layout-grid/grid-column/index.js +34 -0
- package/components/container/layout-grid/grid-row/index.js +24 -0
- package/components/container/layout-grid/index.js +33 -0
- package/components/container/linear-layout/index.js +72 -0
- package/components/container/linear-layout/linear-layout-item/index.js +43 -0
- package/components/container/panel/components/panel-header/index.js +144 -0
- package/components/container/panel/components/panel-header/props.js +5 -0
- package/components/container/panel/hooks.js +144 -0
- package/components/container/panel/index.js +286 -0
- package/components/container/panel/props.js +5 -0
- package/components/container/props.js +5 -0
- package/components/container/tabs/index.js +379 -0
- package/components/container/tabs/props.js +20 -0
- package/components/container/tabs/tab-pane/index.js +42 -0
- package/components/container/tabs/tab-pane/props.js +5 -0
- package/components/container/wizard/WizardContext.js +16 -0
- package/components/container/wizard/components/StepComponents.js +100 -0
- package/components/container/wizard/components/WizardStep.js +89 -0
- package/components/container/wizard/index.js +710 -0
- package/components/container/wizard/props.js +5 -0
- package/components/container/wizard/utils.js +133 -0
- package/components/container/wizard/wizard-action/index.js +22 -0
- package/components/container/wizard/wizard-step/index.js +94 -0
- package/components/data/card/card-actions/index.js +24 -0
- package/components/data/card/card-content/index.js +38 -0
- package/components/data/card/card-footer/index.js +24 -0
- package/components/data/card/index.js +246 -0
- package/components/data/card/props.js +5 -0
- package/components/data/form/base-form/constant.js +39 -0
- package/components/data/form/base-form/index.js +460 -0
- package/components/data/form/base-form/props.js +29 -0
- package/components/data/form/base-form/utils.js +42 -0
- package/components/data/form/dynamic-fields/index.js +196 -0
- package/components/data/form/dynamic-fields/props.js +5 -0
- package/components/data/form/dynamic-fields/utils.js +237 -0
- package/components/data/form/form-action/index.js +71 -0
- package/components/data/form/form-body/index.js +26 -0
- package/components/data/form/form-context.js +34 -0
- package/components/data/form/form-controller/props.js +19 -0
- package/components/data/form/form-controller/validation-contrustor.js +313 -0
- package/components/data/form/form-controller/withFormController.js +320 -0
- package/components/data/form/form-field/base-field.js +138 -0
- package/components/data/form/form-field/index.js +36 -0
- package/components/data/form/form-field/props.js +5 -0
- package/components/data/form/form-footer/index.js +26 -0
- package/components/data/form/form-header/index.js +56 -0
- package/components/data/form/index.js +39 -0
- package/components/data/form/props.js +5 -0
- package/components/data/list/components/GroupHeader.js +35 -0
- package/components/data/list/components/GroupedListItems.js +98 -0
- package/components/data/list/components/ListContainer.js +27 -0
- package/components/data/list/components/ListDND.js +241 -0
- package/components/data/list/components/ListHeader.js +59 -0
- package/components/data/list/components/ListItem.js +148 -0
- package/components/data/list/components/ListItemWithTemplate.js +59 -0
- package/components/data/list/components/ListItems.js +231 -0
- package/components/data/list/components/ListPagination.js +165 -0
- package/components/data/list/components/LoadMoreButton.js +39 -0
- package/components/data/list/components/NoDataMessage.js +22 -0
- package/components/data/list/components/StandardListItems.js +84 -0
- package/components/data/list/components/index.js +119 -0
- package/components/data/list/components/props.js +5 -0
- package/components/data/list/hooks/index.js +75 -0
- package/components/data/list/hooks/props.js +5 -0
- package/components/data/list/hooks/useCurrentPageItems.js +48 -0
- package/components/data/list/hooks/useGroupedData.js +37 -0
- package/components/data/list/hooks/useListData.js +60 -0
- package/components/data/list/hooks/useListEffects.js +285 -0
- package/components/data/list/hooks/useListEventHandlers.js +291 -0
- package/components/data/list/hooks/useListPagination.js +168 -0
- package/components/data/list/hooks/useListState.js +98 -0
- package/components/data/list/hooks/useListStateManager.js +195 -0
- package/components/data/list/hooks/usePaginatedGroupedData.js +121 -0
- package/components/data/list/index.js +611 -0
- package/components/data/list/props.js +5 -0
- package/components/data/list/templates/media-template.js +53 -0
- package/components/data/list/utils/constants.js +81 -0
- package/components/data/list/utils/list-helpers.js +173 -0
- package/components/data/list/utils/list-widget-methods.js +114 -0
- package/components/data/live-filter/index.js +279 -0
- package/components/data/live-filter/props.js +12 -0
- package/components/data/live-form/index.js +93 -0
- package/components/data/live-form/props.js +16 -0
- package/components/data/pagination/components/BasicPagination.js +77 -0
- package/components/data/pagination/components/ClassicPagination.js +191 -0
- package/components/data/pagination/components/InlinePagination.js +99 -0
- package/components/data/pagination/components/LoadingComponent.js +31 -0
- package/components/data/pagination/components/PageSizeSelector.js +175 -0
- package/components/data/pagination/components/PagerNavigation.js +105 -0
- package/components/data/pagination/components/TotalRecords.js +52 -0
- package/components/data/pagination/components/index.js +47 -0
- package/components/data/pagination/components/props.js +5 -0
- package/components/data/pagination/hooks/index.js +19 -0
- package/components/data/pagination/hooks/props.js +5 -0
- package/components/data/pagination/hooks/useNavigationSize.js +44 -0
- package/components/data/pagination/hooks/usePagination.js +796 -0
- package/components/data/pagination/index.js +322 -0
- package/components/data/table/components/AddNewRow.js +190 -0
- package/components/data/table/components/EditableCell.js +91 -0
- package/components/data/table/components/FieldValidationError.js +24 -0
- package/components/data/table/components/RowExpansionButton.js +74 -0
- package/components/data/table/components/TableBody.js +279 -0
- package/components/data/table/components/TableFilters.js +325 -0
- package/components/data/table/components/TableFooterActions.js +48 -0
- package/components/data/table/components/TableHeader.js +174 -0
- package/components/data/table/components/TablePanelHeading.js +68 -0
- package/components/data/table/components/index.js +74 -0
- package/components/data/table/hooks/index.js +219 -0
- package/components/data/table/hooks/useCellState.js +117 -0
- package/components/data/table/hooks/useDynamicColumns.js +85 -0
- package/components/data/table/hooks/useEditingState.js +47 -0
- package/components/data/table/hooks/useFormWidget.js +184 -0
- package/components/data/table/hooks/usePaginationState.js +60 -0
- package/components/data/table/hooks/usePanelStructure.js +40 -0
- package/components/data/table/hooks/useResponsiveColumns.js +34 -0
- package/components/data/table/hooks/useRowExpansion.js +110 -0
- package/components/data/table/hooks/useRowHandlers.js +38 -0
- package/components/data/table/hooks/useRowSelection.js +213 -0
- package/components/data/table/hooks/useServerSideSorting.js +165 -0
- package/components/data/table/hooks/useTableColumns.js +263 -0
- package/components/data/table/hooks/useTableData.js +154 -0
- package/components/data/table/hooks/useTableEdit.js +467 -0
- package/components/data/table/hooks/useTableEffects.js +139 -0
- package/components/data/table/hooks/useTableFilter.js +389 -0
- package/components/data/table/hooks/useTableInitialization.js +103 -0
- package/components/data/table/hooks/useTableState.js +69 -0
- package/components/data/table/hooks/useTableStateManager.js +558 -0
- package/components/data/table/index.js +1295 -0
- package/components/data/table/live-table/index.js +232 -0
- package/components/data/table/props.js +5 -0
- package/components/data/table/table-action/index.js +78 -0
- package/components/data/table/table-column/index.js +35 -0
- package/components/data/table/table-row/index.js +49 -0
- package/components/data/table/table-row-action/index.js +74 -0
- package/components/data/table/utils/buildSelectionColumns.js +173 -0
- package/components/data/table/utils/columnBuilder.js +209 -0
- package/components/data/table/utils/columnProxy.js +48 -0
- package/components/data/table/utils/columnWidthDistribution.js +98 -0
- package/components/data/table/utils/constants.js +80 -0
- package/components/data/table/utils/crud-handlers.js +518 -0
- package/components/data/table/utils/dynamic-columns.js +118 -0
- package/components/data/table/utils/index.js +607 -0
- package/components/data/table/utils/renderDisplayCell.js +183 -0
- package/components/data/table/utils/selectionUtils.js +166 -0
- package/components/data/table/utils/table-helpers.js +100 -0
- package/components/data/table/utils/validation.js +124 -0
- package/components/data/types.js +113 -0
- package/components/data/utils/field-data-utils.js +66 -0
- package/components/data/utils/filter-field-util.js +81 -0
- package/components/data/utils/index.js +216 -0
- package/components/dialogs/alert-dialog/index.js +80 -0
- package/components/dialogs/confirm-dialog/index.js +105 -0
- package/components/dialogs/dialog/index.js +56 -0
- package/components/dialogs/dialog-actions/index.js +18 -0
- package/components/dialogs/dialog-body/index.js +21 -0
- package/components/dialogs/dialog-content/index.js +30 -0
- package/components/dialogs/dialog-header/index.js +93 -0
- package/components/dialogs/iframe-dialog/index.js +114 -0
- package/components/dialogs/index.js +129 -0
- package/components/dialogs/login-dialog/index.js +369 -0
- package/components/dialogs/login-dialog/props.js +5 -0
- package/components/dialogs/page-dialog/index.js +96 -0
- package/components/dialogs/withDialogWrapper.js +108 -0
- package/components/form/button/index.js +216 -0
- package/components/form/button-group/index.js +60 -0
- package/components/input/calendar/index.js +546 -0
- package/components/input/calendar/props.js +5 -0
- package/components/input/calendar/utils.js +340 -0
- package/components/input/chips/SortableChip/index.js +115 -0
- package/components/input/chips/SortableChip/props.js +5 -0
- package/components/input/chips/index.js +488 -0
- package/components/input/chips/props.js +5 -0
- package/components/input/chips/utils.js +259 -0
- package/components/input/color-picker/index.js +678 -0
- package/components/input/color-picker/props.js +5 -0
- package/components/input/composite/index.js +137 -0
- package/components/input/currency/index.js +263 -0
- package/components/input/currency/props.js +5 -0
- package/components/input/default/checkbox/index.js +230 -0
- package/components/input/default/checkbox/props.js +5 -0
- package/components/input/default/checkboxset/index.js +476 -0
- package/components/input/default/checkboxset/props.js +5 -0
- package/components/input/default/radioset/index.js +379 -0
- package/components/input/default/radioset/props.js +5 -0
- package/components/input/default/switch/index.js +490 -0
- package/components/input/default/switch/prop.js +5 -0
- package/components/input/epoch/date/components/DatePickerPopover.js +220 -0
- package/components/input/epoch/date/index.js +520 -0
- package/components/input/epoch/date/props.js +5 -0
- package/components/input/epoch/date/styled.js +70 -0
- package/components/input/epoch/date/utils.js +108 -0
- package/components/input/epoch/datetime/index.js +656 -0
- package/components/input/epoch/datetime/props.js +5 -0
- package/components/input/epoch/datetime/styled.js +90 -0
- package/components/input/epoch/datetime/utils.js +244 -0
- package/components/input/epoch/time/index.js +412 -0
- package/components/input/epoch/time/props.js +5 -0
- package/components/input/epoch/time/utils.js +209 -0
- package/components/input/fileupload/Utils.js +134 -0
- package/components/input/fileupload/components/ListItems.js +140 -0
- package/components/input/fileupload/components/MultiUpload.js +85 -0
- package/components/input/fileupload/components/SingleUpload.js +65 -0
- package/components/input/fileupload/index.js +170 -0
- package/components/input/fileupload/props.js +5 -0
- package/components/input/fileupload/useFileUpload.js +400 -0
- package/components/input/number/index.js +295 -0
- package/components/input/number/props.js +5 -0
- package/components/input/rating/index.js +368 -0
- package/components/input/rating/props.js +5 -0
- package/components/input/select/index.js +344 -0
- package/components/input/select/props.js +5 -0
- package/components/input/slider/index.js +167 -0
- package/components/input/slider/props.js +5 -0
- package/components/input/text/index.js +434 -0
- package/components/input/text/props.js +5 -0
- package/components/input/text/util.js +179 -0
- package/components/input/textarea/index.js +347 -0
- package/components/input/textarea/props.js +5 -0
- package/components/layout/footer/index.js +30 -0
- package/components/layout/header/index.js +30 -0
- package/components/layout/leftnav/index.js +44 -0
- package/components/layout/rightnav/index.js +32 -0
- package/components/layout/topnav/index.js +34 -0
- package/components/navbar/index.js +41 -0
- package/components/navbar/nav/index.js +102 -0
- package/components/navbar/nav/props.js +5 -0
- package/components/navbar/nav-item/index.js +44 -0
- package/components/navigation/breadcrumb/index.js +56 -0
- package/components/navigation/breadcrumb/props.js +5 -0
- package/components/navigation/menu/components/ListItems.js +66 -0
- package/components/navigation/menu/constants.js +101 -0
- package/components/navigation/menu/index.js +807 -0
- package/components/navigation/menu/props.js +5 -0
- package/components/navigation/popover/index.js +209 -0
- package/components/navigation/popover/props.js +15 -0
- package/components/page/content/index.js +28 -0
- package/components/page/error-boundary/index.js +108 -0
- package/components/page/index.js +137 -0
- package/components/page/page-content/index.js +23 -0
- package/components/page/partial/index.js +36 -0
- package/components/page/partial-container/index.js +48 -0
- package/components/page/props.js +5 -0
- package/components/page/toast-container/index.js +33 -0
- package/components/prefab/container/index.js +46 -0
- package/components/prefab/index.js +67 -0
- package/context/AppContext.js +25 -0
- package/context/AppSpinnerProvider.js +43 -0
- package/context/LocalizationProvider.js +79 -0
- package/context/PrefabContext.js +66 -0
- package/context/WidgetProvider.js +187 -0
- package/core/app-config.js +1 -0
- package/core/app.service.js +357 -0
- package/core/appVariablesStore.js +20 -0
- package/core/appstore.js +88 -0
- package/core/constants/currency-constant.js +1071 -0
- package/core/constants/events.js +34 -0
- package/core/constants/index.js +27 -0
- package/core/dialog.service.js +76 -0
- package/core/event-notifier.js +151 -0
- package/core/formatter/date-formatters.js +222 -0
- package/core/formatter/index.js +131 -0
- package/core/formatter/number-formatters.js +142 -0
- package/core/formatter/security-formatters.js +323 -0
- package/core/formatter/string-formatters.js +52 -0
- package/core/formatter/types.js +18 -0
- package/core/formatters.js +24 -0
- package/core/proxy-service.js +412 -0
- package/core/script-registry.js +63 -0
- package/core/security.service.js +11 -0
- package/core/util/common.js +33 -0
- package/core/util/dom.js +107 -0
- package/core/util/index.js +136 -0
- package/core/util/security.js +184 -0
- package/core/util/utils.js +189 -0
- package/core/widget-observer.js +98 -0
- package/higherOrder/BaseApp.js +430 -0
- package/higherOrder/BaseAppProps.js +5 -0
- package/higherOrder/BaseDateTime.js +251 -0
- package/higherOrder/BasePage.js +715 -0
- package/higherOrder/BasePartial.js +124 -0
- package/higherOrder/BasePrefab.js +145 -0
- package/higherOrder/DataNav.js +377 -0
- package/higherOrder/helper.js +43 -0
- package/higherOrder/props.js +5 -0
- package/higherOrder/withBaseWrapper.js +183 -0
- package/hooks/useAccess.js +308 -0
- package/hooks/useAppConfig.js +42 -0
- package/hooks/useAuth.js +562 -0
- package/hooks/useDataSourceSubscription.js +125 -0
- package/hooks/useDebounce.js +76 -0
- package/hooks/useDeviceVisibility.js +49 -0
- package/hooks/useHttp.js +338 -0
- package/libs/index.js +20 -0
- package/mui-config/theme-provider.js +17 -0
- package/mui-config/theme.js +371 -0
- package/package-lock.json +10183 -0
- package/package.json +95 -0
- package/store/index.js +33 -0
- package/store/middleware/navigationMiddleware.js +48 -0
- package/store/slices/appConfigSlice.js +103 -0
- package/store/slices/authSlice.js +508 -0
- package/store/slices/i18nSlice.js +206 -0
- package/types/index.js +15 -0
- package/utils/dataset-util.js +174 -0
- package/utils/eval-expression.js +32 -0
- package/utils/form-state.util.js +140 -0
- package/utils/form-utils.js +187 -0
- package/utils/format-util.js +260 -0
- package/utils/page-params-util.js +24 -0
- package/utils/resource-url.js +27 -0
- package/utils/state-persistance.js +343 -0
- package/utils/style-utils.js +73 -0
- package/utils/transformedDataset-utils.js +633 -0
- package/utils/widget-cleanup-util.js +84 -0
- package/utils/widgets.js +99 -0
- package/variables/base-variable.js +173 -0
- package/variables/constants.js +27 -0
- package/variables/live-variable.js +166 -0
- package/variables/model-variable.js +77 -0
- package/variables/service-variable.js +307 -0
|
@@ -0,0 +1,347 @@
|
|
|
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["default"] = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
14
|
+
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
15
|
+
var lodash = _interopRequireWildcard(require("lodash-es"));
|
|
16
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
17
|
+
var _withFormController = _interopRequireDefault(require("@wavemaker/react-runtime/components/data/form/form-controller/withFormController"));
|
|
18
|
+
var _delay = _interopRequireDefault(require("lodash/delay"));
|
|
19
|
+
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); }
|
|
20
|
+
var __jsx = _react["default"].createElement;
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
var DEFAULT_CLASS = "form-control app-textarea";
|
|
24
|
+
var WmTextarea = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
25
|
+
var name = props.name,
|
|
26
|
+
readonly = props.readonly,
|
|
27
|
+
required = props.required,
|
|
28
|
+
disabled = props.disabled,
|
|
29
|
+
maxchars = props.maxchars,
|
|
30
|
+
tabindex = props.tabindex,
|
|
31
|
+
placeholder = props.placeholder,
|
|
32
|
+
shortcutkey = props.shortcutkey,
|
|
33
|
+
autofocus = props.autofocus,
|
|
34
|
+
arialabel = props.arialabel,
|
|
35
|
+
_props$limitdisplayte = props.limitdisplaytext,
|
|
36
|
+
limitdisplaytext = _props$limitdisplayte === void 0 ? "" : _props$limitdisplayte,
|
|
37
|
+
_props$datavalue = props.datavalue,
|
|
38
|
+
datavalue = _props$datavalue === void 0 ? "" : _props$datavalue,
|
|
39
|
+
listener = props.listener,
|
|
40
|
+
onChange = props.onChange,
|
|
41
|
+
onBlur = props.onBlur,
|
|
42
|
+
onFocus = props.onFocus,
|
|
43
|
+
onKeydown = props.onKeydown,
|
|
44
|
+
onKeypress = props.onKeypress,
|
|
45
|
+
onKeyup = props.onKeyup,
|
|
46
|
+
className = props.className,
|
|
47
|
+
_props$styles = props.styles,
|
|
48
|
+
styles = _props$styles === void 0 ? {} : _props$styles,
|
|
49
|
+
_props$updatedelay = props.updatedelay,
|
|
50
|
+
updatedelay = _props$updatedelay === void 0 ? "0" : _props$updatedelay,
|
|
51
|
+
_props$updateon = props.updateon,
|
|
52
|
+
updateon = _props$updateon === void 0 ? "blur" : _props$updateon,
|
|
53
|
+
_props$regexp = props.regexp,
|
|
54
|
+
regexp = _props$regexp === void 0 ? ".*" : _props$regexp,
|
|
55
|
+
id = props.id;
|
|
56
|
+
|
|
57
|
+
// Track internal vs external updates
|
|
58
|
+
var valueRef = (0, _react.useRef)(datavalue);
|
|
59
|
+
var isInternalUpdate = (0, _react.useRef)(false);
|
|
60
|
+
var _useState = (0, _react.useState)(datavalue),
|
|
61
|
+
displayValue = _useState[0],
|
|
62
|
+
setDisplayValue = _useState[1];
|
|
63
|
+
var _useState2 = (0, _react.useState)({
|
|
64
|
+
show: false,
|
|
65
|
+
message: ""
|
|
66
|
+
}),
|
|
67
|
+
error = _useState2[0],
|
|
68
|
+
setError = _useState2[1];
|
|
69
|
+
var _useState3 = (0, _react.useState)(false),
|
|
70
|
+
isDirty = _useState3[0],
|
|
71
|
+
setIsDirty = _useState3[1];
|
|
72
|
+
var _useState4 = (0, _react.useState)(false),
|
|
73
|
+
isTouched = _useState4[0],
|
|
74
|
+
setIsTouched = _useState4[1];
|
|
75
|
+
var textareaRef = (0, _react.useRef)(null);
|
|
76
|
+
|
|
77
|
+
// Memoize validation function
|
|
78
|
+
var validateInput = (0, _react.useCallback)(function (inputValue) {
|
|
79
|
+
if (!inputValue.trim() && required) {
|
|
80
|
+
return {
|
|
81
|
+
isValid: false,
|
|
82
|
+
message: "This field is required"
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
if (regexp && inputValue && !new RegExp(regexp).test(inputValue)) {
|
|
86
|
+
return {
|
|
87
|
+
isValid: false,
|
|
88
|
+
message: "Invalid format"
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if (maxchars && inputValue.length > maxchars) {
|
|
92
|
+
return {
|
|
93
|
+
isValid: false,
|
|
94
|
+
message: "Maximum ".concat(maxchars, " characters allowed")
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
isValid: true,
|
|
99
|
+
message: ""
|
|
100
|
+
};
|
|
101
|
+
}, [required, regexp, maxchars]);
|
|
102
|
+
var updateValue = (0, _react.useCallback)(function (newValue, validation) {
|
|
103
|
+
if (validation.isValid) {
|
|
104
|
+
isInternalUpdate.current = true;
|
|
105
|
+
if (listener !== null && listener !== void 0 && listener.onChange) {
|
|
106
|
+
listener.onChange(props.fieldName || name, {
|
|
107
|
+
datavalue: newValue,
|
|
108
|
+
value: newValue,
|
|
109
|
+
charlength: newValue === null || newValue === void 0 ? void 0 : newValue.length
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (onChange) {
|
|
113
|
+
var syntheticEvent = {
|
|
114
|
+
target: {
|
|
115
|
+
value: newValue,
|
|
116
|
+
name: name
|
|
117
|
+
},
|
|
118
|
+
currentTarget: textareaRef.current
|
|
119
|
+
};
|
|
120
|
+
onChange(syntheticEvent, props, newValue, valueRef.current);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// We need this setTimeout to ensure external updates don't override
|
|
124
|
+
// our internal update immediately
|
|
125
|
+
setTimeout(function () {
|
|
126
|
+
isInternalUpdate.current = false;
|
|
127
|
+
}, 0);
|
|
128
|
+
}
|
|
129
|
+
}, [onChange, listener === null || listener === void 0 ? void 0 : listener.onChange]);
|
|
130
|
+
|
|
131
|
+
// Debounced update with stable reference
|
|
132
|
+
var debouncedUpdate = (0, _react.useCallback)(lodash.debounce(function (newValue) {
|
|
133
|
+
var validation = validateInput(newValue);
|
|
134
|
+
setError({
|
|
135
|
+
show: !validation.isValid,
|
|
136
|
+
message: validation.message
|
|
137
|
+
});
|
|
138
|
+
updateValue(newValue, validation);
|
|
139
|
+
}, parseInt(updatedelay || "10"), {
|
|
140
|
+
leading: parseInt(updatedelay) === 0
|
|
141
|
+
}), [updatedelay, validateInput, updateValue]);
|
|
142
|
+
var debouncedCharLengthUpdate = (0, _react.useCallback)(lodash.debounce(function (charLength) {
|
|
143
|
+
if (listener !== null && listener !== void 0 && listener.onChange) {
|
|
144
|
+
listener.onChange(props.fieldName || name, {
|
|
145
|
+
charlength: charLength
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}, 10), []);
|
|
149
|
+
|
|
150
|
+
// Handle external value changes without overriding user input
|
|
151
|
+
(0, _react.useEffect)(function () {
|
|
152
|
+
// Only update if this is an external change (not triggered by our own code)
|
|
153
|
+
if (datavalue !== valueRef.current && !isInternalUpdate.current) {
|
|
154
|
+
valueRef.current = datavalue;
|
|
155
|
+
setDisplayValue(datavalue);
|
|
156
|
+
if (isDirty) {
|
|
157
|
+
var validation = validateInput(datavalue);
|
|
158
|
+
setError({
|
|
159
|
+
show: !validation.isValid,
|
|
160
|
+
message: validation.message
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}, [datavalue, isDirty, validateInput]);
|
|
165
|
+
|
|
166
|
+
// Setup keyboard shortcut
|
|
167
|
+
(0, _react.useEffect)(function () {
|
|
168
|
+
if (!shortcutkey) return;
|
|
169
|
+
var handleGlobalKeyDown = function handleGlobalKeyDown(e) {
|
|
170
|
+
if (e.altKey && e.key.toLowerCase() === shortcutkey.toLowerCase()) {
|
|
171
|
+
var _textareaRef$current;
|
|
172
|
+
e.preventDefault();
|
|
173
|
+
(_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 || _textareaRef$current.focus();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
window.addEventListener("keydown", handleGlobalKeyDown);
|
|
177
|
+
return function () {
|
|
178
|
+
return window.removeEventListener("keydown", handleGlobalKeyDown);
|
|
179
|
+
};
|
|
180
|
+
}, [shortcutkey]);
|
|
181
|
+
var handleUpdateCharLength = (0, _react.useCallback)(function (charLength) {
|
|
182
|
+
// Only update char length when limitdisplaytext is not empty
|
|
183
|
+
if (listener !== null && listener !== void 0 && listener.onChange && limitdisplaytext !== "") {
|
|
184
|
+
debouncedCharLengthUpdate(charLength);
|
|
185
|
+
}
|
|
186
|
+
}, [limitdisplaytext, debouncedCharLengthUpdate]);
|
|
187
|
+
var handleInputChange = (0, _react.useCallback)(function (event) {
|
|
188
|
+
var newValue = event.target.value;
|
|
189
|
+
// Update ref immediately on change
|
|
190
|
+
valueRef.current = newValue;
|
|
191
|
+
setDisplayValue(newValue);
|
|
192
|
+
isInternalUpdate.current = true;
|
|
193
|
+
|
|
194
|
+
// Always update char length regardless of updateon mode
|
|
195
|
+
handleUpdateCharLength(newValue.length);
|
|
196
|
+
if (updateon === "keypress") {
|
|
197
|
+
debouncedUpdate(newValue);
|
|
198
|
+
}
|
|
199
|
+
if (onKeypress) {
|
|
200
|
+
var _listener$Widgets;
|
|
201
|
+
onKeypress(event, listener === null || listener === void 0 || (_listener$Widgets = listener.Widgets) === null || _listener$Widgets === void 0 ? void 0 : _listener$Widgets[name]);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Reset the flag after a small delay
|
|
205
|
+
setTimeout(function () {
|
|
206
|
+
isInternalUpdate.current = false;
|
|
207
|
+
}, 0);
|
|
208
|
+
}, []);
|
|
209
|
+
var handleBlur = (0, _react.useCallback)(function (event) {
|
|
210
|
+
if (readonly || disabled) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
// setIsDirty(true);
|
|
214
|
+
// Important: Update the flag before calling debouncedUpdate
|
|
215
|
+
isInternalUpdate.current = true;
|
|
216
|
+
var currentValue = valueRef.current;
|
|
217
|
+
if (updateon === "blur") {
|
|
218
|
+
// For immediate validation feedback
|
|
219
|
+
var _validation = validateInput(currentValue);
|
|
220
|
+
setError({
|
|
221
|
+
show: !_validation.isValid,
|
|
222
|
+
message: _validation.message
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
// Call the debounced update
|
|
226
|
+
debouncedUpdate(currentValue);
|
|
227
|
+
}
|
|
228
|
+
var validation = validateInput(currentValue);
|
|
229
|
+
if (!validation.isValid && required) {
|
|
230
|
+
setIsDirty(true);
|
|
231
|
+
} else {
|
|
232
|
+
setIsDirty(false);
|
|
233
|
+
}
|
|
234
|
+
if (onBlur) {
|
|
235
|
+
var _listener$Widgets2;
|
|
236
|
+
onBlur(event, listener === null || listener === void 0 || (_listener$Widgets2 = listener.Widgets) === null || _listener$Widgets2 === void 0 ? void 0 : _listener$Widgets2[name]);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Reset the flag after a small delay
|
|
240
|
+
setTimeout(function () {
|
|
241
|
+
isInternalUpdate.current = false;
|
|
242
|
+
}, 0);
|
|
243
|
+
}, [updateon, debouncedUpdate, onBlur, listener, name, validateInput, handleUpdateCharLength]);
|
|
244
|
+
var handleFocus = (0, _react.useCallback)(function (event) {
|
|
245
|
+
if (onFocus) {
|
|
246
|
+
var _listener$Widgets3;
|
|
247
|
+
onFocus(event, listener === null || listener === void 0 || (_listener$Widgets3 = listener.Widgets) === null || _listener$Widgets3 === void 0 ? void 0 : _listener$Widgets3[name]);
|
|
248
|
+
}
|
|
249
|
+
}, [onFocus, listener, name]);
|
|
250
|
+
var handleKeyDown = (0, _react.useCallback)(function (event) {
|
|
251
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
252
|
+
// Set flag before update
|
|
253
|
+
isInternalUpdate.current = true;
|
|
254
|
+
debouncedUpdate(valueRef.current);
|
|
255
|
+
}
|
|
256
|
+
if (onKeydown) {
|
|
257
|
+
(0, _delay["default"])(function () {
|
|
258
|
+
var _listener$Widgets4;
|
|
259
|
+
onKeydown(event, listener === null || listener === void 0 || (_listener$Widgets4 = listener.Widgets) === null || _listener$Widgets4 === void 0 ? void 0 : _listener$Widgets4[name]);
|
|
260
|
+
}, 0);
|
|
261
|
+
}
|
|
262
|
+
}, [debouncedUpdate, onKeydown, listener, name]);
|
|
263
|
+
var handleKeyUp = (0, _react.useCallback)(function (event) {
|
|
264
|
+
if (onKeyup) {
|
|
265
|
+
(0, _delay["default"])(function () {
|
|
266
|
+
var _listener$Widgets5;
|
|
267
|
+
onKeyup(event, listener === null || listener === void 0 || (_listener$Widgets5 = listener.Widgets) === null || _listener$Widgets5 === void 0 ? void 0 : _listener$Widgets5[name]);
|
|
268
|
+
}, 0);
|
|
269
|
+
}
|
|
270
|
+
}, [onKeyup, listener, name]);
|
|
271
|
+
var handleMouseEnter = function handleMouseEnter(event) {
|
|
272
|
+
setIsTouched(true);
|
|
273
|
+
if (props.onMouseEnter) {
|
|
274
|
+
props.onMouseEnter(event, props, displayValue, valueRef.current);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
var handleMouseLeave = function handleMouseLeave(event) {
|
|
278
|
+
setIsTouched(false);
|
|
279
|
+
if (props.onMouseLeave) {
|
|
280
|
+
props.onMouseLeave(event, props, displayValue, valueRef.current);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
var events = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
284
|
+
onChange: handleInputChange
|
|
285
|
+
}, onFocus ? {
|
|
286
|
+
onFocus: handleFocus
|
|
287
|
+
} : {}), onKeydown ? {
|
|
288
|
+
onKeyDown: handleKeyDown
|
|
289
|
+
} : {}), onKeyup ? {
|
|
290
|
+
onKeyUp: handleKeyUp
|
|
291
|
+
} : {}), updateon === "blur" || onBlur ? {
|
|
292
|
+
onBlur: handleBlur
|
|
293
|
+
} : {}), props.onMouseEnter ? {
|
|
294
|
+
onMouseEnter: handleMouseEnter
|
|
295
|
+
} : {}), props.onMouseLeave ? {
|
|
296
|
+
onMouseLeave: handleMouseLeave
|
|
297
|
+
} : {}), props.onClick ? {
|
|
298
|
+
onClick: props.onClick
|
|
299
|
+
} : {});
|
|
300
|
+
return __jsx(_react["default"].Fragment, null, __jsx(_TextField["default"], (0, _extends2["default"])({
|
|
301
|
+
multiline: true,
|
|
302
|
+
variant: "standard",
|
|
303
|
+
name: name,
|
|
304
|
+
title: props.hint,
|
|
305
|
+
id: id || name,
|
|
306
|
+
placeholder: placeholder || "Place your text here",
|
|
307
|
+
value: displayValue,
|
|
308
|
+
required: required,
|
|
309
|
+
disabled: disabled,
|
|
310
|
+
error: isDirty && error.show,
|
|
311
|
+
className: (0, _clsx["default"])("app-input-wrapper", isTouched ? "ng-touched" : "ng-untouched", isDirty && "ng-invalid"),
|
|
312
|
+
"aria-readonly": readonly,
|
|
313
|
+
slotProps: {
|
|
314
|
+
htmlInput: {
|
|
315
|
+
type: "textarea",
|
|
316
|
+
maxLength: maxchars,
|
|
317
|
+
readOnly: readonly,
|
|
318
|
+
tabIndex: tabindex,
|
|
319
|
+
accessKey: shortcutkey,
|
|
320
|
+
"aria-label": arialabel,
|
|
321
|
+
autoFocus: autofocus,
|
|
322
|
+
ref: textareaRef,
|
|
323
|
+
onKeyDown: handleKeyDown,
|
|
324
|
+
onKeyUp: handleKeyUp,
|
|
325
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className, isTouched ? "ng-touched" : "ng-untouched", isDirty && "ng-invalid"),
|
|
326
|
+
pattern: regexp,
|
|
327
|
+
style: _objectSpread({
|
|
328
|
+
height: "none",
|
|
329
|
+
resize: "both",
|
|
330
|
+
overflow: "auto"
|
|
331
|
+
}, styles)
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
sx: {
|
|
335
|
+
width: "100%"
|
|
336
|
+
}
|
|
337
|
+
}, events)), maxchars && __jsx(_Box["default"], {
|
|
338
|
+
className: "textarea-count"
|
|
339
|
+
}, limitdisplaytext.replaceAll("undefined", "".concat((displayValue === null || displayValue === void 0 ? void 0 : displayValue.length) || 0))));
|
|
340
|
+
}, function (prev, current) {
|
|
341
|
+
var keys = ["datavalue", "disabled", "required", "readonly", "placeholder", "maxchars", "tabindex", "shortcutkey", "autofocus", "arialabel", "limitdisplaytext"];
|
|
342
|
+
return keys.every(function (key) {
|
|
343
|
+
return prev[key] === current[key];
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
WmTextarea.displayName = "WmTextarea";
|
|
347
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)((0, _withFormController["default"])(WmTextarea));
|
|
@@ -0,0 +1,30 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _material = require("@mui/material");
|
|
10
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
12
|
+
var __jsx = _react["default"].createElement;
|
|
13
|
+
var DEFAULT_CLASS = "app-footer clearfix";
|
|
14
|
+
var Default_Styles = {
|
|
15
|
+
minWidth: "100%"
|
|
16
|
+
};
|
|
17
|
+
function WmFooter(props) {
|
|
18
|
+
var styles = props.styles,
|
|
19
|
+
children = props.children,
|
|
20
|
+
className = props.className,
|
|
21
|
+
id = props.id;
|
|
22
|
+
return __jsx(_material.Box, {
|
|
23
|
+
component: "div",
|
|
24
|
+
sx: styles,
|
|
25
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className),
|
|
26
|
+
id: id
|
|
27
|
+
}, children);
|
|
28
|
+
}
|
|
29
|
+
WmFooter.displayName = "WmFooter";
|
|
30
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmFooter);
|
|
@@ -0,0 +1,30 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
11
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
12
|
+
var __jsx = _react["default"].createElement;
|
|
13
|
+
var DEFAULT_CLASS = "app-header clearfix app-header-shrink";
|
|
14
|
+
function WmHeader(props) {
|
|
15
|
+
var styles = props.styles,
|
|
16
|
+
children = props.children,
|
|
17
|
+
className = props.className,
|
|
18
|
+
id = props.id;
|
|
19
|
+
return __jsx(_Box["default"], {
|
|
20
|
+
component: "header",
|
|
21
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className),
|
|
22
|
+
id: id,
|
|
23
|
+
style: styles
|
|
24
|
+
}, __jsx(_Box["default"], {
|
|
25
|
+
component: "div",
|
|
26
|
+
className: "app-header-container"
|
|
27
|
+
}, children));
|
|
28
|
+
}
|
|
29
|
+
WmHeader.displayName = "WmHeader";
|
|
30
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmHeader);
|
|
@@ -0,0 +1,44 @@
|
|
|
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["default"] = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
12
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
13
|
+
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); }
|
|
14
|
+
var __jsx = _react["default"].createElement;
|
|
15
|
+
var DEFAULT_CLASS = "app-nav-drawer app-left-panel left-panel-collapsed ";
|
|
16
|
+
function WmLeftPanel(props) {
|
|
17
|
+
var styles = props.styles,
|
|
18
|
+
children = props.children,
|
|
19
|
+
className = props.className,
|
|
20
|
+
_props$columnwidth = props.columnwidth,
|
|
21
|
+
columnwidth = _props$columnwidth === void 0 ? 2 : _props$columnwidth,
|
|
22
|
+
id = props.id,
|
|
23
|
+
navtype = props.navtype,
|
|
24
|
+
navheight = props.navheight,
|
|
25
|
+
onNavHeightChange = props.onNavHeightChange;
|
|
26
|
+
(0, _react.useEffect)(function () {
|
|
27
|
+
if (onNavHeightChange) {
|
|
28
|
+
onNavHeightChange(navheight === "full");
|
|
29
|
+
}
|
|
30
|
+
return function () {
|
|
31
|
+
if (onNavHeightChange) {
|
|
32
|
+
onNavHeightChange(false);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}, [navheight, onNavHeightChange]);
|
|
36
|
+
return __jsx(_Box["default"], {
|
|
37
|
+
id: id,
|
|
38
|
+
component: "div",
|
|
39
|
+
sx: styles,
|
|
40
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className, "col-sm-".concat(columnwidth, " app-nav-").concat(navtype))
|
|
41
|
+
}, children);
|
|
42
|
+
}
|
|
43
|
+
WmLeftPanel.displayName = "WmLeftPanel";
|
|
44
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmLeftPanel);
|
|
@@ -0,0 +1,32 @@
|
|
|
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["default"] = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
12
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
13
|
+
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); }
|
|
14
|
+
var __jsx = _react["default"].createElement;
|
|
15
|
+
var DEFAULT_CLASS = "app-right-panel";
|
|
16
|
+
var WmRightPanel = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
17
|
+
var styles = props.styles,
|
|
18
|
+
children = props.children,
|
|
19
|
+
className = props.className,
|
|
20
|
+
_props$columnwidth = props.columnwidth,
|
|
21
|
+
columnwidth = _props$columnwidth === void 0 ? 2 : _props$columnwidth,
|
|
22
|
+
id = props.id;
|
|
23
|
+
return __jsx(_Box["default"], {
|
|
24
|
+
id: id,
|
|
25
|
+
sx: styles,
|
|
26
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className, "col-sm-".concat(columnwidth))
|
|
27
|
+
}, children);
|
|
28
|
+
}, function () {
|
|
29
|
+
return true;
|
|
30
|
+
});
|
|
31
|
+
WmRightPanel.displayName = "WmRightPanel";
|
|
32
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmRightPanel);
|
|
@@ -0,0 +1,34 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
13
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
14
|
+
var _excluded = ["styles", "children", "className", "id"];
|
|
15
|
+
var __jsx = _react["default"].createElement;
|
|
16
|
+
var DEFAULT_CLASS = "app-top-nav";
|
|
17
|
+
function WmTopNav(props) {
|
|
18
|
+
var styles = props.styles,
|
|
19
|
+
children = props.children,
|
|
20
|
+
className = props.className,
|
|
21
|
+
id = props.id,
|
|
22
|
+
restProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
23
|
+
return __jsx(_Box["default"], (0, _extends2["default"])({
|
|
24
|
+
component: "section",
|
|
25
|
+
sx: styles,
|
|
26
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className),
|
|
27
|
+
id: id,
|
|
28
|
+
role: "navigation",
|
|
29
|
+
"aria-label": "Second level navigation",
|
|
30
|
+
"data-role": "page-topnav"
|
|
31
|
+
}, restProps), children);
|
|
32
|
+
}
|
|
33
|
+
WmTopNav.displayName = "WmTopNav";
|
|
34
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmTopNav);
|
|
@@ -0,0 +1,41 @@
|
|
|
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["default"] = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
14
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
15
|
+
var _excluded = ["className", "children", "styles", "id"];
|
|
16
|
+
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); }
|
|
17
|
+
var __jsx = _react["default"].createElement;
|
|
18
|
+
var DEFAULT_CLASS = "navbar navbar-default app-navbar";
|
|
19
|
+
var WmNavbar = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
20
|
+
var className = props.className,
|
|
21
|
+
children = props.children,
|
|
22
|
+
styles = props.styles,
|
|
23
|
+
id = props.id,
|
|
24
|
+
restProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
25
|
+
return __jsx(_Box["default"], (0, _extends2["default"])({
|
|
26
|
+
component: "nav",
|
|
27
|
+
sx: styles,
|
|
28
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className),
|
|
29
|
+
id: id
|
|
30
|
+
}, restProps), __jsx(_Box["default"], {
|
|
31
|
+
component: "div",
|
|
32
|
+
className: "container-fluid"
|
|
33
|
+
}, __jsx(_Box["default"], {
|
|
34
|
+
component: "div",
|
|
35
|
+
className: "collapse navbar-collapse"
|
|
36
|
+
}, children)));
|
|
37
|
+
}, function () {
|
|
38
|
+
return true;
|
|
39
|
+
});
|
|
40
|
+
WmNavbar.displayName = "WmNavbar";
|
|
41
|
+
var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)((0, _withBaseWrapper.withBaseWrapper)(WmNavbar));
|
|
@@ -0,0 +1,102 @@
|
|
|
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["default"] = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
|
+
var _List = _interopRequireDefault(require("@mui/material/List"));
|
|
13
|
+
var _navItem = require("@wavemaker/react-runtime/components/navbar/nav-item");
|
|
14
|
+
var _anchor = require("@wavemaker/react-runtime/components/basic/anchor");
|
|
15
|
+
var _withBaseWrapper = _interopRequireDefault(require("@wavemaker/react-runtime/higherOrder/withBaseWrapper"));
|
|
16
|
+
var _menu = _interopRequireDefault(require("@wavemaker/react-runtime/components/navigation/menu"));
|
|
17
|
+
var _constants = require("../../../core/constants");
|
|
18
|
+
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); }
|
|
19
|
+
var __jsx = _react["default"].createElement;
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
var NavClassTypes = {
|
|
23
|
+
pills: "nav-pills",
|
|
24
|
+
tabs: "nav-tabs",
|
|
25
|
+
navbar: "navbar-nav"
|
|
26
|
+
};
|
|
27
|
+
var DEFAULT_CLASS = "nav app-nav";
|
|
28
|
+
var WmNav = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
29
|
+
var _props$styles, _props$styles2;
|
|
30
|
+
var layout = props.layout,
|
|
31
|
+
_props$type = props.type,
|
|
32
|
+
type = _props$type === void 0 ? "navbar" : _props$type,
|
|
33
|
+
className = props.className,
|
|
34
|
+
children = props.children,
|
|
35
|
+
name = props.name,
|
|
36
|
+
styles = props.styles,
|
|
37
|
+
id = props.id;
|
|
38
|
+
var renderNavItem = function renderNavItem() {
|
|
39
|
+
if (props.dataset && props.dataset.length > 0) {
|
|
40
|
+
return props.dataset.map(function (item, index) {
|
|
41
|
+
var subActions = item["itemchildren"] || item["children"] || item["SubActions"];
|
|
42
|
+
var hasSubactions = Array.isArray(subActions) && subActions.length > 0;
|
|
43
|
+
var childComponent = hasSubactions ? __jsx(_menu["default"], {
|
|
44
|
+
name: "",
|
|
45
|
+
itemlabel: props.itemlabel,
|
|
46
|
+
listener: {},
|
|
47
|
+
iconclass: item[props.itemicon],
|
|
48
|
+
caption: item[props.itemlabel || "label"],
|
|
49
|
+
dataset: subActions,
|
|
50
|
+
type: "anchor",
|
|
51
|
+
onSelect: props.onSelect
|
|
52
|
+
}) : __jsx(_anchor.WmAnchor, {
|
|
53
|
+
name: "",
|
|
54
|
+
listener: {},
|
|
55
|
+
caption: item[props.itemlabel || "label"],
|
|
56
|
+
iconclass: item[props.itemicon],
|
|
57
|
+
iconposition: item[props.iconposition],
|
|
58
|
+
iconheight: item[props.iconheight],
|
|
59
|
+
iconwidth: item[props.iconwidth],
|
|
60
|
+
iconmargin: item[props.iconmargin],
|
|
61
|
+
hyperlink: (0, _constants.hyperLinkMofify)(item[props.itemlink || "link"]),
|
|
62
|
+
target: item[props.itemtarget],
|
|
63
|
+
action: item[props.itemaction],
|
|
64
|
+
badgevalue: item[props.itembadge],
|
|
65
|
+
children: item[props.itemchildren],
|
|
66
|
+
hint: item[props.itemhint]
|
|
67
|
+
});
|
|
68
|
+
return __jsx(_navItem.WmNavItem, {
|
|
69
|
+
key: index,
|
|
70
|
+
name: "",
|
|
71
|
+
listener: {},
|
|
72
|
+
className: hasSubactions ? "nav-".concat(type) : undefined,
|
|
73
|
+
hint: item[props.itemhint]
|
|
74
|
+
}, childComponent);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return children;
|
|
78
|
+
};
|
|
79
|
+
return __jsx(_List["default"], {
|
|
80
|
+
disablePadding: true,
|
|
81
|
+
sx: _objectSpread({
|
|
82
|
+
"&": {
|
|
83
|
+
width: ((_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.width) || "auto",
|
|
84
|
+
height: ((_props$styles2 = props.styles) === null || _props$styles2 === void 0 ? void 0 : _props$styles2.height) || "auto",
|
|
85
|
+
justifyContent: "normal"
|
|
86
|
+
},
|
|
87
|
+
" & .MuiListItem-root": {
|
|
88
|
+
width: "auto"
|
|
89
|
+
}
|
|
90
|
+
}, styles),
|
|
91
|
+
role: "navigation",
|
|
92
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className, "nav-".concat(layout, " ").concat(NavClassTypes[type])),
|
|
93
|
+
id: id
|
|
94
|
+
}, renderNavItem());
|
|
95
|
+
}, function (prev, current) {
|
|
96
|
+
var keys = ["layout", "type", "className", "styles", "children"];
|
|
97
|
+
return keys.every(function (key) {
|
|
98
|
+
return prev[key] === current[key];
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
WmNav.displayName = "WmNav";
|
|
102
|
+
var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)((0, _withBaseWrapper["default"])(WmNav));
|