@wavemaker/react-runtime 11.14.1-15.6409
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 +10177 -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,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getActionColumnSize = exports.createRowIndexColumn = exports.createEditingActionButtons = exports.createDefaultColumnProps = exports.createDataColumns = exports.createDataColumn = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _material = require("@mui/material");
|
|
11
|
+
var _lodashEs = require("lodash-es");
|
|
12
|
+
var _ = require(".");
|
|
13
|
+
var __jsx = _react["default"].createElement;
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
/**
|
|
17
|
+
* Creates row index column definition
|
|
18
|
+
*/
|
|
19
|
+
var createRowIndexColumn = exports.createRowIndexColumn = function createRowIndexColumn() {
|
|
20
|
+
return {
|
|
21
|
+
id: "rowIndex",
|
|
22
|
+
header: "S. No.",
|
|
23
|
+
size: 60,
|
|
24
|
+
minSize: 60,
|
|
25
|
+
maxSize: 60,
|
|
26
|
+
enableResizing: false,
|
|
27
|
+
cell: function cell(_ref) {
|
|
28
|
+
var row = _ref.row,
|
|
29
|
+
table = _ref.table;
|
|
30
|
+
// Get current page information for continuous numbering across pages
|
|
31
|
+
var pageIndex = table.getState().pagination.pageIndex;
|
|
32
|
+
var pageSize = table.getState().pagination.pageSize;
|
|
33
|
+
|
|
34
|
+
// Check if we're using manual pagination (server-side)
|
|
35
|
+
var isManualPagination = table.options.manualPagination;
|
|
36
|
+
var rowPositionOnPage;
|
|
37
|
+
if (isManualPagination) {
|
|
38
|
+
// For server-side pagination, use the row's index in the current data
|
|
39
|
+
rowPositionOnPage = row.index;
|
|
40
|
+
} else {
|
|
41
|
+
// For client-side pagination, find position within paginated rows
|
|
42
|
+
var paginationModel = table.getPaginationRowModel();
|
|
43
|
+
var currentPageRows = paginationModel.rows;
|
|
44
|
+
rowPositionOnPage = currentPageRows.findIndex(function (pageRow) {
|
|
45
|
+
return pageRow.id === row.id;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Calculate continuous row number across pages
|
|
50
|
+
var rowNumber = pageIndex * pageSize + rowPositionOnPage + 1;
|
|
51
|
+
return __jsx(_material.Box, {
|
|
52
|
+
"data-col-identifier": "rowIndex"
|
|
53
|
+
}, rowNumber);
|
|
54
|
+
},
|
|
55
|
+
enableSorting: false
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Creates data column definition from WmTableColumnProps
|
|
61
|
+
*/
|
|
62
|
+
var createDataColumn = exports.createDataColumn = function createDataColumn(wmColumn, renderCell) {
|
|
63
|
+
var _wmColumn$styles;
|
|
64
|
+
// Extract width from either width prop or styles prop
|
|
65
|
+
var columnSize;
|
|
66
|
+
if (wmColumn.width) {
|
|
67
|
+
columnSize = parseInt(wmColumn.width);
|
|
68
|
+
} else if ((_wmColumn$styles = wmColumn.styles) !== null && _wmColumn$styles !== void 0 && _wmColumn$styles.width) {
|
|
69
|
+
columnSize = (0, _.parseWidth)(wmColumn.styles.width);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
accessorKey: wmColumn.field,
|
|
73
|
+
// Use sortby field for sorting if provided, otherwise use the display field
|
|
74
|
+
// Supports nested properties like "department.store.employee"
|
|
75
|
+
accessorFn: wmColumn.sortby ? function (row) {
|
|
76
|
+
return (0, _lodashEs.get)(row, wmColumn.sortby || "");
|
|
77
|
+
} : undefined,
|
|
78
|
+
header: wmColumn.caption,
|
|
79
|
+
size: columnSize,
|
|
80
|
+
minSize: 50,
|
|
81
|
+
// Minimum column width in pixels
|
|
82
|
+
maxSize: columnSize,
|
|
83
|
+
// Set maxSize if we have a specific width to maintain the width
|
|
84
|
+
enableResizing: !columnSize,
|
|
85
|
+
// Disable resizing if width is specified
|
|
86
|
+
cell: function cell(_ref2) {
|
|
87
|
+
var row = _ref2.row;
|
|
88
|
+
return renderCell(wmColumn, row);
|
|
89
|
+
},
|
|
90
|
+
enableSorting: wmColumn.sortable,
|
|
91
|
+
// Pass column styles and properties through meta for TableCell styling and filtering
|
|
92
|
+
meta: _objectSpread(_objectSpread({
|
|
93
|
+
textAlign: wmColumn.textalignment,
|
|
94
|
+
backgroundColor: wmColumn.backgroundcolor,
|
|
95
|
+
className: wmColumn.colClass
|
|
96
|
+
}, wmColumn.styles), {}, {
|
|
97
|
+
// Include widget types for filter rendering
|
|
98
|
+
widgetType: wmColumn.widgetType,
|
|
99
|
+
editWidgetType: wmColumn.editWidgetType,
|
|
100
|
+
editinputtype: wmColumn.editinputtype,
|
|
101
|
+
// Include column type for filtering
|
|
102
|
+
type: wmColumn.type || wmColumn.columntype || "string",
|
|
103
|
+
searchable: wmColumn.searchable !== false
|
|
104
|
+
})
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Creates column definitions from table columns
|
|
110
|
+
*/
|
|
111
|
+
var createDataColumns = exports.createDataColumns = function createDataColumns(wmTableColumns, renderCell) {
|
|
112
|
+
var columns = [];
|
|
113
|
+
wmTableColumns.forEach(function (wmColumn) {
|
|
114
|
+
if (wmColumn.show) {
|
|
115
|
+
columns.push(createDataColumn(wmColumn, renderCell));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
return columns;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Creates save/cancel action buttons for editing mode
|
|
123
|
+
*/
|
|
124
|
+
var createEditingActionButtons = exports.createEditingActionButtons = function createEditingActionButtons() {
|
|
125
|
+
return [{
|
|
126
|
+
key: "save-edit",
|
|
127
|
+
name: "save-edit-row",
|
|
128
|
+
className: "save row-action-button btn app-button btn-transparent save-edit-row-button",
|
|
129
|
+
dataActionKey: "saveEdit",
|
|
130
|
+
displayName: "",
|
|
131
|
+
title: "Save",
|
|
132
|
+
iconclass: "wi wi-done",
|
|
133
|
+
action: "save",
|
|
134
|
+
show: true,
|
|
135
|
+
widgettype: "button"
|
|
136
|
+
}, {
|
|
137
|
+
key: "cancel-edit",
|
|
138
|
+
name: "cancel-edit-row",
|
|
139
|
+
className: "cancel row-action-button btn app-button btn-transparent cancel-edit-row-button",
|
|
140
|
+
dataActionKey: "cancelEdit",
|
|
141
|
+
displayName: "",
|
|
142
|
+
title: "Cancel",
|
|
143
|
+
iconclass: "wi wi-cancel",
|
|
144
|
+
action: "cancel",
|
|
145
|
+
show: true,
|
|
146
|
+
widgettype: "button"
|
|
147
|
+
}];
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Creates a default WmTableColumnProps object for dynamic column generation
|
|
152
|
+
* @param field - The field name for the column
|
|
153
|
+
* @param displayName - The display name/caption for the column
|
|
154
|
+
* @param type - The data type of the column
|
|
155
|
+
* @param index - The column index
|
|
156
|
+
* @returns A complete WmTableColumnProps object with sensible defaults
|
|
157
|
+
*/
|
|
158
|
+
var createDefaultColumnProps = exports.createDefaultColumnProps = function createDefaultColumnProps(field, displayName, type, index) {
|
|
159
|
+
return {
|
|
160
|
+
// Core properties
|
|
161
|
+
field: field,
|
|
162
|
+
binding: field,
|
|
163
|
+
caption: displayName,
|
|
164
|
+
displayName: displayName,
|
|
165
|
+
widgetType: "dynamic-text",
|
|
166
|
+
// Special type for dynamic columns to render raw text
|
|
167
|
+
editWidgetType: "WmText",
|
|
168
|
+
// Display settings
|
|
169
|
+
show: true,
|
|
170
|
+
pcdisplay: true,
|
|
171
|
+
mobiledisplay: true,
|
|
172
|
+
tabletdisplay: true,
|
|
173
|
+
// Positioning
|
|
174
|
+
index: index,
|
|
175
|
+
headerindex: index.toString(),
|
|
176
|
+
// Sorting and searching
|
|
177
|
+
sortable: true,
|
|
178
|
+
searchable: true,
|
|
179
|
+
showinfilter: true,
|
|
180
|
+
// Styling
|
|
181
|
+
textalignment: "left",
|
|
182
|
+
// width: "150px", // Fixed width to disable resizing for dynamic columns
|
|
183
|
+
|
|
184
|
+
// Data type properties
|
|
185
|
+
type: type,
|
|
186
|
+
columntype: type,
|
|
187
|
+
// Form field properties
|
|
188
|
+
required: false,
|
|
189
|
+
disabled: false,
|
|
190
|
+
readonly: false,
|
|
191
|
+
// Required props for compatibility
|
|
192
|
+
listener: null,
|
|
193
|
+
// Will be set by the component
|
|
194
|
+
name: field
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Get action column size based on edit mode
|
|
200
|
+
*/
|
|
201
|
+
var getActionColumnSize = exports.getActionColumnSize = function getActionColumnSize(editmode) {
|
|
202
|
+
return editmode === "quickedit" ? {
|
|
203
|
+
size: 80,
|
|
204
|
+
minSize: 60
|
|
205
|
+
} : {
|
|
206
|
+
size: 100,
|
|
207
|
+
minSize: 80
|
|
208
|
+
};
|
|
209
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createColumnsProxy = createColumnsProxy;
|
|
7
|
+
exports.keyMap = void 0;
|
|
8
|
+
var keyMap = exports.keyMap = {
|
|
9
|
+
caption: "header",
|
|
10
|
+
name: "accessorKey",
|
|
11
|
+
columnSize: "size",
|
|
12
|
+
sortable: "enableSorting",
|
|
13
|
+
textalignment: "meta.textAlign",
|
|
14
|
+
backgroundcolor: "meta.backgroundColor",
|
|
15
|
+
colClass: "meta.className",
|
|
16
|
+
style: "meta"
|
|
17
|
+
};
|
|
18
|
+
function createColumnsProxy(wmTableColumns, applyOverride, setColumnsVersion) {
|
|
19
|
+
var proxy = {};
|
|
20
|
+
wmTableColumns.forEach(function (col, idx) {
|
|
21
|
+
var key = col.field;
|
|
22
|
+
if (key) {
|
|
23
|
+
proxy[key] = new Proxy(col, {
|
|
24
|
+
get: function get(target, prop) {
|
|
25
|
+
return target[prop];
|
|
26
|
+
},
|
|
27
|
+
set: function set(target, prop, value) {
|
|
28
|
+
if (target[prop] !== value) {
|
|
29
|
+
var mapped = keyMap[prop];
|
|
30
|
+
if (mapped && mapped.includes(".")) {
|
|
31
|
+
mapped = mapped.split(".")[1];
|
|
32
|
+
}
|
|
33
|
+
var finalKey = mapped || prop;
|
|
34
|
+
applyOverride(idx, finalKey, value);
|
|
35
|
+
target[prop] = value;
|
|
36
|
+
if (setColumnsVersion) {
|
|
37
|
+
setColumnsVersion(function (v) {
|
|
38
|
+
return v + 1;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return proxy;
|
|
48
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.isDataColumn = exports.hasExplicitWidth = exports.distributeColumnWidths = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
/**
|
|
12
|
+
* Column types that should not participate in equal width distribution
|
|
13
|
+
* These columns have specific functional purposes and should use their default/fixed sizes
|
|
14
|
+
*/
|
|
15
|
+
var NON_DATA_COLUMN_IDS = ["radioSelect", "multiSelect", "rowIndex", "actions"];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Determines if a column is a data column that should participate in equal width distribution
|
|
19
|
+
*/
|
|
20
|
+
var isDataColumn = exports.isDataColumn = function isDataColumn(column) {
|
|
21
|
+
return !NON_DATA_COLUMN_IDS.includes(column.id || "");
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Determines if a column has an explicit width defined
|
|
26
|
+
*/
|
|
27
|
+
var hasExplicitWidth = exports.hasExplicitWidth = function hasExplicitWidth(column) {
|
|
28
|
+
return typeof column.size === "number" && column.size > 0;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Calculates equal width distribution for data columns without explicit widths.
|
|
33
|
+
*
|
|
34
|
+
* This function implements the logic to ensure that:
|
|
35
|
+
* 1. Non-data columns (S.No, Actions, MultiSelect, RadioSelect) take only minimum necessary width
|
|
36
|
+
* 2. Data columns without explicit widths automatically share remaining space equally
|
|
37
|
+
* 3. Data columns with explicit widths (via column.width or column.styles.width) maintain their specified size
|
|
38
|
+
*
|
|
39
|
+
* @param columns - Array of column definitions
|
|
40
|
+
* @param tableWidth - Total available table width (default: 1200px for calculations)
|
|
41
|
+
* @returns Modified column definitions with auto-sized data columns
|
|
42
|
+
*/
|
|
43
|
+
var distributeColumnWidths = exports.distributeColumnWidths = function distributeColumnWidths(columns) {
|
|
44
|
+
var tableWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1200;
|
|
45
|
+
// Calculate total width used by non-data columns and data columns with explicit widths
|
|
46
|
+
var usedWidth = 0;
|
|
47
|
+
var dataColumnsNeedingWidth = 0;
|
|
48
|
+
columns.forEach(function (column) {
|
|
49
|
+
if (!isDataColumn(column)) {
|
|
50
|
+
// Non-data column - use its default size
|
|
51
|
+
var size = column.size || getDefaultColumnSize(column.id || "");
|
|
52
|
+
usedWidth += size;
|
|
53
|
+
} else if (hasExplicitWidth(column)) {
|
|
54
|
+
// Data column with explicit width
|
|
55
|
+
usedWidth += column.size;
|
|
56
|
+
} else {
|
|
57
|
+
// Data column needing auto-sizing
|
|
58
|
+
dataColumnsNeedingWidth++;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Calculate width for auto-sized data columns
|
|
63
|
+
var autoColumnWidth = 150; // Default fallback width
|
|
64
|
+
if (dataColumnsNeedingWidth > 0) {
|
|
65
|
+
var remainingWidth = Math.max(tableWidth - usedWidth, dataColumnsNeedingWidth * 100);
|
|
66
|
+
autoColumnWidth = Math.floor(remainingWidth / dataColumnsNeedingWidth);
|
|
67
|
+
// Ensure minimum width
|
|
68
|
+
autoColumnWidth = Math.max(autoColumnWidth, 100);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Apply calculated widths to columns
|
|
72
|
+
return columns.map(function (column) {
|
|
73
|
+
if (isDataColumn(column) && !hasExplicitWidth(column)) {
|
|
74
|
+
return _objectSpread(_objectSpread({}, column), {}, {
|
|
75
|
+
size: autoColumnWidth,
|
|
76
|
+
minSize: 100,
|
|
77
|
+
// Ensure reasonable minimum for data columns
|
|
78
|
+
enableResizing: true // Allow resizing for auto-sized columns
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return column;
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get default size for non-data columns
|
|
87
|
+
*/
|
|
88
|
+
var getDefaultColumnSize = function getDefaultColumnSize(columnId) {
|
|
89
|
+
switch (columnId) {
|
|
90
|
+
case "radioSelect":
|
|
91
|
+
case "multiSelect":
|
|
92
|
+
case "rowIndex":
|
|
93
|
+
case "actions":
|
|
94
|
+
return 60;
|
|
95
|
+
default:
|
|
96
|
+
return 150;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TABLE_MESSAGES = exports.TABLE_DATA_STATES = exports.TABLE_CSS_CLASSES = exports.INTERACTIVE_TAG_NAMES = exports.INTERACTIVE_ROLES = exports.INTERACTIVE_DATA_ROLES = exports.INTERACTIVE_CLASSES = exports.DYNAMIC_COLUMNS_CONFIG = void 0;
|
|
7
|
+
// CSS Class Names Constants
|
|
8
|
+
var TABLE_CSS_CLASSES = exports.TABLE_CSS_CLASSES = {
|
|
9
|
+
tableRow: "app-datagrid-row",
|
|
10
|
+
headerCell: "app-datagrid-header-cell",
|
|
11
|
+
groupHeaderCell: "app-datagrid-group-header-cell",
|
|
12
|
+
tableCell: "app-datagrid-cell",
|
|
13
|
+
grid: "",
|
|
14
|
+
gridDefault: "table",
|
|
15
|
+
gridBody: "app-datagrid-body",
|
|
16
|
+
gridFooter: "app-datagrid-footer",
|
|
17
|
+
deleteRow: "danger",
|
|
18
|
+
ascIcon: "asc wi wi-long-arrow-up",
|
|
19
|
+
descIcon: "desc wi wi-long-arrow-down",
|
|
20
|
+
selectedColumn: "selected-column",
|
|
21
|
+
rowExpandIcon: "wi wi-minus-square",
|
|
22
|
+
rowCollapseIcon: "wi wi-plus-square",
|
|
23
|
+
gridRowExpansionClass: "table-row-expansion",
|
|
24
|
+
expandedRowClass: "expanded"
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// Data States Constants
|
|
28
|
+
var TABLE_DATA_STATES = exports.TABLE_DATA_STATES = {
|
|
29
|
+
loading: "Loading...",
|
|
30
|
+
ready: "",
|
|
31
|
+
error: "An error occurred in loading the data.",
|
|
32
|
+
nodata: "No data found."
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// Table Messages Constants
|
|
36
|
+
var TABLE_MESSAGES = exports.TABLE_MESSAGES = {
|
|
37
|
+
// Delete dialog messages
|
|
38
|
+
deleteConfirmTitle: "Delete Record",
|
|
39
|
+
deleteConfirmMessage: "Are you sure you want to delete this record?",
|
|
40
|
+
deleteOkText: "Ok",
|
|
41
|
+
deleteCancelText: "Cancel",
|
|
42
|
+
// Toast messages
|
|
43
|
+
deleteSuccess: "Record deleted successfully",
|
|
44
|
+
deleteError: "Failed to delete record",
|
|
45
|
+
insertSuccess: "Record added successfully",
|
|
46
|
+
updateSuccess: "Record updated successfully",
|
|
47
|
+
operationError: "An error occurred",
|
|
48
|
+
// Table states
|
|
49
|
+
noDataMessage: "No data found",
|
|
50
|
+
loadingMessage: "Loading...",
|
|
51
|
+
errorStateMessage: "An error occurred",
|
|
52
|
+
// Selection
|
|
53
|
+
radioSelectAriaLabel: "Select row",
|
|
54
|
+
multiSelectAriaLabel: "Select all rows"
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Interactive element classes and attributes that should prevent row selection
|
|
59
|
+
*/
|
|
60
|
+
var INTERACTIVE_CLASSES = exports.INTERACTIVE_CLASSES = [
|
|
61
|
+
// MUI base components
|
|
62
|
+
"MuiInputBase", "MuiSelect", "MuiButton", "MuiCheckbox", "MuiRadio", "MuiSlider", "MuiSwitch", "MuiTextField", "MuiAutocomplete", "MuiChip", "MuiRating", "MuiToggleButton",
|
|
63
|
+
// Date/time pickers
|
|
64
|
+
"MuiPickersDay", "MuiDatePicker", "MuiTimePicker", "MuiDateTimePicker", "MuiCalendarPicker", "MuiClockPicker",
|
|
65
|
+
// Color picker
|
|
66
|
+
"MuiColorPicker",
|
|
67
|
+
// Form controls
|
|
68
|
+
"MuiFormControl", "MuiFormGroup", "MuiFormControlLabel",
|
|
69
|
+
// WaveMaker specific widgets
|
|
70
|
+
"app-text", "app-textarea", "app-checkbox", "app-slider", "app-currency", "app-switch", "app-select", "app-checkboxset", "app-radioset", "app-date", "app-time", "app-timestamp", "app-rating", "app-datetime", "app-search", "app-chips", "app-colorpicker", "app-calendar", "app-editor"];
|
|
71
|
+
var INTERACTIVE_ROLES = exports.INTERACTIVE_ROLES = ["button", "textbox", "combobox", "listbox"];
|
|
72
|
+
var INTERACTIVE_DATA_ROLES = exports.INTERACTIVE_DATA_ROLES = ["input", "select", "date", "time", "color", "editor", "checkbox", "radio", "slider", "chips", "rating"];
|
|
73
|
+
var INTERACTIVE_TAG_NAMES = exports.INTERACTIVE_TAG_NAMES = ["INPUT", "BUTTON", "SELECT", "TEXTAREA", "A", "LABEL"];
|
|
74
|
+
|
|
75
|
+
// Dynamic Columns Constants
|
|
76
|
+
var DYNAMIC_COLUMNS_CONFIG = exports.DYNAMIC_COLUMNS_CONFIG = {
|
|
77
|
+
maxColumns: 10,
|
|
78
|
+
// Maximum number of columns to generate from data (matching Angular behavior)
|
|
79
|
+
sampleSize: 3 // Number of rows to sample for column detection
|
|
80
|
+
};
|