@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,188 @@
|
|
|
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"] = exports.WmContainer = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
var _clsx2 = require("clsx");
|
|
13
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
14
|
+
var _alignmentUtils = require("./alignment-utils");
|
|
15
|
+
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); }
|
|
16
|
+
var __jsx = _react["default"].createElement;
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
var DEFAULT_CLASS = "app-container";
|
|
20
|
+
|
|
21
|
+
// Alignment matrix (assumes direction: 'row' as base)
|
|
22
|
+
var alignmentMatrix = {
|
|
23
|
+
"top-left": {
|
|
24
|
+
justifyContent: "flex-start",
|
|
25
|
+
alignItems: "flex-start"
|
|
26
|
+
},
|
|
27
|
+
"top-center": {
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
alignItems: "flex-start"
|
|
30
|
+
},
|
|
31
|
+
"top-right": {
|
|
32
|
+
justifyContent: "flex-end",
|
|
33
|
+
alignItems: "flex-start"
|
|
34
|
+
},
|
|
35
|
+
"middle-left": {
|
|
36
|
+
justifyContent: "flex-start",
|
|
37
|
+
alignItems: "center"
|
|
38
|
+
},
|
|
39
|
+
"middle-center": {
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
alignItems: "center"
|
|
42
|
+
},
|
|
43
|
+
"middle-right": {
|
|
44
|
+
justifyContent: "flex-end",
|
|
45
|
+
alignItems: "center"
|
|
46
|
+
},
|
|
47
|
+
"bottom-left": {
|
|
48
|
+
justifyContent: "flex-start",
|
|
49
|
+
alignItems: "flex-end"
|
|
50
|
+
},
|
|
51
|
+
"bottom-center": {
|
|
52
|
+
justifyContent: "center",
|
|
53
|
+
alignItems: "flex-end"
|
|
54
|
+
},
|
|
55
|
+
"bottom-right": {
|
|
56
|
+
justifyContent: "flex-end",
|
|
57
|
+
alignItems: "flex-end"
|
|
58
|
+
},
|
|
59
|
+
start: {
|
|
60
|
+
justifyContent: "space-between",
|
|
61
|
+
alignItems: "flex-start"
|
|
62
|
+
},
|
|
63
|
+
center: {
|
|
64
|
+
justifyContent: "space-between",
|
|
65
|
+
alignItems: "center"
|
|
66
|
+
},
|
|
67
|
+
end: {
|
|
68
|
+
justifyContent: "space-between",
|
|
69
|
+
alignItems: "flex-end"
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var WmContainer = exports.WmContainer = function WmContainer(props) {
|
|
73
|
+
var _clsx;
|
|
74
|
+
var className = props.className,
|
|
75
|
+
styles = props.styles,
|
|
76
|
+
children = props.children,
|
|
77
|
+
renderPartial = props.renderPartial,
|
|
78
|
+
id = props.id,
|
|
79
|
+
display = props.display,
|
|
80
|
+
_props$direction = props.direction,
|
|
81
|
+
direction = _props$direction === void 0 ? "row" : _props$direction,
|
|
82
|
+
_props$wrap = props.wrap,
|
|
83
|
+
wrap = _props$wrap === void 0 ? false : _props$wrap,
|
|
84
|
+
alignment = props.alignment,
|
|
85
|
+
gap = props.gap,
|
|
86
|
+
columngap = props.columngap;
|
|
87
|
+
var isLoaded = (0, _react.useRef)(false);
|
|
88
|
+
function handleClick(event) {
|
|
89
|
+
var _props$onClick;
|
|
90
|
+
props === null || props === void 0 || (_props$onClick = props.onClick) === null || _props$onClick === void 0 || _props$onClick.call(props, event, props);
|
|
91
|
+
}
|
|
92
|
+
function handleOnBlur(event) {
|
|
93
|
+
var _props$onBlur;
|
|
94
|
+
props === null || props === void 0 || (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, event, props);
|
|
95
|
+
}
|
|
96
|
+
function handleOnFocus(event) {
|
|
97
|
+
var _props$onFocus;
|
|
98
|
+
props === null || props === void 0 || (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event, props);
|
|
99
|
+
}
|
|
100
|
+
function handleMouseEnter(event) {
|
|
101
|
+
var _props$onMouseEnter;
|
|
102
|
+
props === null || props === void 0 || (_props$onMouseEnter = props.onMouseEnter) === null || _props$onMouseEnter === void 0 || _props$onMouseEnter.call(props, event, props);
|
|
103
|
+
}
|
|
104
|
+
function handleMouseLeave(event) {
|
|
105
|
+
var _props$onMouseLeave;
|
|
106
|
+
props === null || props === void 0 || (_props$onMouseLeave = props.onMouseLeave) === null || _props$onMouseLeave === void 0 || _props$onMouseLeave.call(props, event, props);
|
|
107
|
+
}
|
|
108
|
+
function handleMouseOver(event) {
|
|
109
|
+
var _props$onMouseOver;
|
|
110
|
+
props === null || props === void 0 || (_props$onMouseOver = props.onMouseOver) === null || _props$onMouseOver === void 0 || _props$onMouseOver.call(props, event, props);
|
|
111
|
+
}
|
|
112
|
+
function handleMouseOut(event) {
|
|
113
|
+
var _props$onMouseOut;
|
|
114
|
+
props === null || props === void 0 || (_props$onMouseOut = props.onMouseOut) === null || _props$onMouseOut === void 0 || _props$onMouseOut.call(props, event, props);
|
|
115
|
+
}
|
|
116
|
+
function handleDoubleClick(event) {
|
|
117
|
+
var _props$onDoubleClick;
|
|
118
|
+
props === null || props === void 0 || (_props$onDoubleClick = props.onDoubleClick) === null || _props$onDoubleClick === void 0 || _props$onDoubleClick.call(props, event, props);
|
|
119
|
+
}
|
|
120
|
+
function handleKeyDown(event) {
|
|
121
|
+
var _props$onKeydown;
|
|
122
|
+
props === null || props === void 0 || (_props$onKeydown = props.onKeydown) === null || _props$onKeydown === void 0 || _props$onKeydown.call(props, event, props);
|
|
123
|
+
}
|
|
124
|
+
function handleKeyUp(event) {
|
|
125
|
+
var _props$onKeyup;
|
|
126
|
+
props === null || props === void 0 || (_props$onKeyup = props.onKeyup) === null || _props$onKeyup === void 0 || _props$onKeyup.call(props, event, props);
|
|
127
|
+
}
|
|
128
|
+
var domEvents = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (props === null || props === void 0 ? void 0 : props.onBlur) && {
|
|
129
|
+
onBlur: handleOnBlur
|
|
130
|
+
}), (props === null || props === void 0 ? void 0 : props.onFocus) && {
|
|
131
|
+
onFocus: handleOnFocus
|
|
132
|
+
}), (props === null || props === void 0 ? void 0 : props.onMouseEnter) && {
|
|
133
|
+
onMouseEnter: handleMouseEnter
|
|
134
|
+
}), (props === null || props === void 0 ? void 0 : props.onMouseLeave) && {
|
|
135
|
+
onMouseLeave: handleMouseLeave
|
|
136
|
+
}), (props === null || props === void 0 ? void 0 : props.onDoubleClick) && {
|
|
137
|
+
onDoubleClick: handleDoubleClick
|
|
138
|
+
}), (props === null || props === void 0 ? void 0 : props.onKeydown) && {
|
|
139
|
+
onKeyDown: handleKeyDown
|
|
140
|
+
}), (props === null || props === void 0 ? void 0 : props.onKeyup) && {
|
|
141
|
+
onKeyUp: handleKeyUp
|
|
142
|
+
}), (props === null || props === void 0 ? void 0 : props.onClick) && {
|
|
143
|
+
onClick: handleClick
|
|
144
|
+
}), (props === null || props === void 0 ? void 0 : props.onMouseOver) && {
|
|
145
|
+
onMouseOver: handleMouseOver
|
|
146
|
+
}), (props === null || props === void 0 ? void 0 : props.onMouseOut) && {
|
|
147
|
+
onMouseOut: handleMouseOut
|
|
148
|
+
});
|
|
149
|
+
var customStyles = {};
|
|
150
|
+
if (styles !== null && styles !== void 0 && styles.backgroundImage) {
|
|
151
|
+
var _styles$backgroundIma;
|
|
152
|
+
customStyles.backgroundImage = "".concat(styles !== null && styles !== void 0 && (_styles$backgroundIma = styles.backgroundImage) !== null && _styles$backgroundIma !== void 0 && _styles$backgroundIma.includes("url(") ? styles === null || styles === void 0 ? void 0 : styles.backgroundImage : "url(" + (styles === null || styles === void 0 ? void 0 : styles.backgroundImage) + ")");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Memoize the computed styles for performance
|
|
156
|
+
var computedStyles = (0, _react.useMemo)(function () {
|
|
157
|
+
var base = alignment && alignmentMatrix[alignment];
|
|
158
|
+
if (!base) {
|
|
159
|
+
return _objectSpread(_objectSpread(_objectSpread({}, styles), customStyles), {}, {
|
|
160
|
+
display: display
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
var alignmentStyles = (0, _alignmentUtils.calculateAlignmentStyles)(alignmentMatrix, alignment, direction, wrap);
|
|
164
|
+
var spacingStyles = (0, _alignmentUtils.calculateSpacingStyles)(alignmentMatrix, gap, columngap, alignment, direction, wrap);
|
|
165
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, styles), customStyles), alignmentStyles), spacingStyles), {}, {
|
|
166
|
+
display: display || "flex"
|
|
167
|
+
});
|
|
168
|
+
}, [styles, customStyles, alignment, direction, wrap, gap, columngap, display]);
|
|
169
|
+
(0, _react.useEffect)(function () {
|
|
170
|
+
if (props !== null && props !== void 0 && props.onLoad && !isLoaded.current) {
|
|
171
|
+
var _props$onLoad;
|
|
172
|
+
props === null || props === void 0 || (_props$onLoad = props.onLoad) === null || _props$onLoad === void 0 || _props$onLoad.call(props, props);
|
|
173
|
+
isLoaded.current = true;
|
|
174
|
+
}
|
|
175
|
+
}, [props === null || props === void 0 ? void 0 : props.onLoad]);
|
|
176
|
+
return __jsx("div", (0, _extends2["default"])({
|
|
177
|
+
style: computedStyles,
|
|
178
|
+
className: (0, _clsx2.clsx)((_clsx = {}, (0, _defineProperty2["default"])(_clsx, className || "", Boolean(className)), (0, _defineProperty2["default"])(_clsx, DEFAULT_CLASS, true), _clsx)),
|
|
179
|
+
"data-widget-id": props["data-widget-id"],
|
|
180
|
+
id: id,
|
|
181
|
+
hidden: props.hidden
|
|
182
|
+
}, domEvents, {
|
|
183
|
+
name: props.name,
|
|
184
|
+
hidden: props.hidden
|
|
185
|
+
}), renderPartial ? renderPartial(props, props.onLoad) : children);
|
|
186
|
+
};
|
|
187
|
+
WmContainer.displayName = "WmContainer";
|
|
188
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmContainer);
|
|
@@ -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 _material = require("@mui/material");
|
|
13
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
14
|
+
var _excluded = ["columnwidth", "className", "children", "styles", "containerProps", "horizontalalign"];
|
|
15
|
+
var __jsx = _react["default"].createElement;
|
|
16
|
+
var DEFAULT_CLASS = "app-grid-column";
|
|
17
|
+
var WmGridColumn = function WmGridColumn(props) {
|
|
18
|
+
var columnwidth = props.columnwidth,
|
|
19
|
+
className = props.className,
|
|
20
|
+
children = props.children,
|
|
21
|
+
styles = props.styles,
|
|
22
|
+
containerProps = props.containerProps,
|
|
23
|
+
_props$horizontalalig = props.horizontalalign,
|
|
24
|
+
horizontalalign = _props$horizontalalig === void 0 ? "right" : _props$horizontalalig,
|
|
25
|
+
otherProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
26
|
+
return __jsx(_material.Container, (0, _extends2["default"])({
|
|
27
|
+
disableGutters: true,
|
|
28
|
+
maxWidth: false,
|
|
29
|
+
style: styles,
|
|
30
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className, columnwidth && "col-sm-".concat(columnwidth))
|
|
31
|
+
}, otherProps), children);
|
|
32
|
+
};
|
|
33
|
+
WmGridColumn.displayName = "WmGridColumn";
|
|
34
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmGridColumn);
|
|
@@ -0,0 +1,24 @@
|
|
|
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 _material = require("@mui/material");
|
|
11
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
12
|
+
var __jsx = _react["default"].createElement;
|
|
13
|
+
var DEFAULT_CLASS = "app-grid-row clearfix";
|
|
14
|
+
function WmGridRow(props) {
|
|
15
|
+
return __jsx(_material.Container, {
|
|
16
|
+
style: props.styles,
|
|
17
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, props.className)
|
|
18
|
+
// {...props}
|
|
19
|
+
// disableGutters
|
|
20
|
+
// maxWidth={false}
|
|
21
|
+
}, props.children);
|
|
22
|
+
}
|
|
23
|
+
WmGridRow.displayName = "WmGridRow";
|
|
24
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmGridRow);
|
|
@@ -0,0 +1,33 @@
|
|
|
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 _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
|
+
var _material = require("@mui/material");
|
|
14
|
+
var _withBaseWrapper = require("@wavemaker/react-runtime/higherOrder/withBaseWrapper");
|
|
15
|
+
var _excluded = ["styles", "className", "children"];
|
|
16
|
+
var __jsx = _react["default"].createElement;
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
var DEFAULT_CLASS = "app-grid-layout clearfix";
|
|
20
|
+
function WmLayoutGrid(props) {
|
|
21
|
+
var styles = props.styles,
|
|
22
|
+
className = props.className,
|
|
23
|
+
children = props.children,
|
|
24
|
+
restProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
25
|
+
return __jsx(_material.Container, (0, _extends2["default"])({
|
|
26
|
+
style: _objectSpread(_objectSpread({}, styles), {}, {
|
|
27
|
+
minWidth: "100%"
|
|
28
|
+
}),
|
|
29
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className)
|
|
30
|
+
}, restProps), children);
|
|
31
|
+
}
|
|
32
|
+
WmLayoutGrid.displayName = "WmLayoutGrid";
|
|
33
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmLayoutGrid);
|
|
@@ -0,0 +1,72 @@
|
|
|
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
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
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
var DEFAULT_CLASS = "app-linear-layout clearfix";
|
|
18
|
+
var hAlignValues = {
|
|
19
|
+
left: "flex-start",
|
|
20
|
+
right: "flex-end",
|
|
21
|
+
center: "center"
|
|
22
|
+
};
|
|
23
|
+
var vAlignValues = {
|
|
24
|
+
top: "flex-start",
|
|
25
|
+
bottom: "flex-end",
|
|
26
|
+
center: "center"
|
|
27
|
+
};
|
|
28
|
+
function WmLinearLayout(props) {
|
|
29
|
+
var styles = props.styles,
|
|
30
|
+
className = props.className,
|
|
31
|
+
children = props.children,
|
|
32
|
+
_props$direction = props.direction,
|
|
33
|
+
direction = _props$direction === void 0 ? "row" : _props$direction,
|
|
34
|
+
_props$horizontalalig = props.horizontalalign,
|
|
35
|
+
horizontalalign = _props$horizontalalig === void 0 ? "left" : _props$horizontalalig,
|
|
36
|
+
_props$verticalalign = props.verticalalign,
|
|
37
|
+
verticalalign = _props$verticalalign === void 0 ? "top" : _props$verticalalign,
|
|
38
|
+
spacing = props.spacing,
|
|
39
|
+
id = props.id,
|
|
40
|
+
name = props.name;
|
|
41
|
+
|
|
42
|
+
// Calculate flex styles based on direction and alignment
|
|
43
|
+
var computedStyles = (0, _react.useMemo)(function () {
|
|
44
|
+
var flexStyles = _objectSpread(_objectSpread({}, styles), {}, {
|
|
45
|
+
display: "flex",
|
|
46
|
+
flexDirection: direction
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Apply alignment based on direction
|
|
50
|
+
if (direction === "row" || direction === "row-reverse") {
|
|
51
|
+
flexStyles.justifyContent = hAlignValues[horizontalalign];
|
|
52
|
+
flexStyles.alignItems = vAlignValues[verticalalign];
|
|
53
|
+
} else if (direction === "column" || direction === "column-reverse") {
|
|
54
|
+
flexStyles.justifyContent = vAlignValues[verticalalign];
|
|
55
|
+
flexStyles.alignItems = hAlignValues[horizontalalign];
|
|
56
|
+
}
|
|
57
|
+
return flexStyles;
|
|
58
|
+
}, [styles, direction, horizontalalign, verticalalign]);
|
|
59
|
+
|
|
60
|
+
// Generate spacing class
|
|
61
|
+
var spacingClass = spacing ? "app-linear-layout-spacing-".concat(spacing) : "";
|
|
62
|
+
var directionClass = "app-linear-layout-direction-".concat(direction);
|
|
63
|
+
return __jsx("div", {
|
|
64
|
+
style: computedStyles,
|
|
65
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, directionClass, spacingClass, className),
|
|
66
|
+
"data-widget-id": props["data-widget-id"],
|
|
67
|
+
id: id,
|
|
68
|
+
name: name
|
|
69
|
+
}, children);
|
|
70
|
+
}
|
|
71
|
+
WmLinearLayout.displayName = "WmLinearLayout";
|
|
72
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmLinearLayout);
|
|
@@ -0,0 +1,43 @@
|
|
|
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
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
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
var DEFAULT_CLASS = "app-linear-layout-item clearfix";
|
|
18
|
+
function WmLinearLayoutItem(props) {
|
|
19
|
+
var styles = props.styles,
|
|
20
|
+
className = props.className,
|
|
21
|
+
children = props.children,
|
|
22
|
+
flexgrow = props.flexgrow,
|
|
23
|
+
id = props.id,
|
|
24
|
+
name = props.name;
|
|
25
|
+
|
|
26
|
+
// Calculate flex styles
|
|
27
|
+
var computedStyles = (0, _react.useMemo)(function () {
|
|
28
|
+
var flexStyles = _objectSpread({}, styles);
|
|
29
|
+
if (flexgrow !== undefined) {
|
|
30
|
+
flexStyles.flexGrow = flexgrow;
|
|
31
|
+
}
|
|
32
|
+
return flexStyles;
|
|
33
|
+
}, [styles, flexgrow]);
|
|
34
|
+
return __jsx("div", {
|
|
35
|
+
style: computedStyles,
|
|
36
|
+
className: (0, _clsx["default"])(DEFAULT_CLASS, className),
|
|
37
|
+
"data-widget-id": props["data-widget-id"],
|
|
38
|
+
id: id,
|
|
39
|
+
name: name
|
|
40
|
+
}, children);
|
|
41
|
+
}
|
|
42
|
+
WmLinearLayoutItem.displayName = "WmLinearLayoutItem";
|
|
43
|
+
var _default = exports["default"] = (0, _withBaseWrapper.withBaseWrapper)(WmLinearLayoutItem);
|
|
@@ -0,0 +1,144 @@
|
|
|
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 _dompurify = _interopRequireDefault(require("dompurify"));
|
|
11
|
+
var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
|
|
12
|
+
var _ExpandLess = _interopRequireDefault(require("@mui/icons-material/ExpandLess"));
|
|
13
|
+
var _Fullscreen = _interopRequireDefault(require("@mui/icons-material/Fullscreen"));
|
|
14
|
+
var _FullscreenExit = _interopRequireDefault(require("@mui/icons-material/FullscreenExit"));
|
|
15
|
+
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
16
|
+
var _HelpOutline = _interopRequireDefault(require("@mui/icons-material/HelpOutline"));
|
|
17
|
+
var _menu = _interopRequireDefault(require("@wavemaker/react-runtime/components/navigation/menu"));
|
|
18
|
+
var __jsx = _react["default"].createElement; // Icons
|
|
19
|
+
var PanelHeader = function PanelHeader(_ref) {
|
|
20
|
+
var _ref$title = _ref.title,
|
|
21
|
+
title = _ref$title === void 0 ? "Title" : _ref$title,
|
|
22
|
+
subheading = _ref.subheading,
|
|
23
|
+
_ref$iconclass = _ref.iconclass,
|
|
24
|
+
iconclass = _ref$iconclass === void 0 ? "wi wi-account-circle" : _ref$iconclass,
|
|
25
|
+
iconurl = _ref.iconurl,
|
|
26
|
+
iconwidth = _ref.iconwidth,
|
|
27
|
+
iconheight = _ref.iconheight,
|
|
28
|
+
iconmargin = _ref.iconmargin,
|
|
29
|
+
badgevalue = _ref.badgevalue,
|
|
30
|
+
_ref$badgetype = _ref.badgetype,
|
|
31
|
+
badgetype = _ref$badgetype === void 0 ? "default" : _ref$badgetype,
|
|
32
|
+
actions = _ref.actions,
|
|
33
|
+
helptext = _ref.helptext,
|
|
34
|
+
isExpanded = _ref.isExpanded,
|
|
35
|
+
isFullscreen = _ref.isFullscreen,
|
|
36
|
+
collapsible = _ref.collapsible,
|
|
37
|
+
enablefullscreen = _ref.enablefullscreen,
|
|
38
|
+
closable = _ref.closable,
|
|
39
|
+
itemlabel = _ref.itemlabel,
|
|
40
|
+
itemlink = _ref.itemlink,
|
|
41
|
+
itemicon = _ref.itemicon,
|
|
42
|
+
itemchildren = _ref.itemchildren,
|
|
43
|
+
listener = _ref.listener,
|
|
44
|
+
onToggleExpand = _ref.onToggleExpand,
|
|
45
|
+
onToggleFullScreen = _ref.onToggleFullScreen,
|
|
46
|
+
onToggleHelp = _ref.onToggleHelp,
|
|
47
|
+
onClose = _ref.onClose,
|
|
48
|
+
onActionsclick = _ref.onActionsclick;
|
|
49
|
+
var handleActionItemClick = function handleActionItemClick(event, item) {
|
|
50
|
+
onActionsclick === null || onActionsclick === void 0 || onActionsclick(event, item);
|
|
51
|
+
};
|
|
52
|
+
return __jsx(_material.Box, {
|
|
53
|
+
className: "panel-title"
|
|
54
|
+
}, __jsx(_material.Box, {
|
|
55
|
+
component: "a",
|
|
56
|
+
className: "panel-toggle",
|
|
57
|
+
onClick: onToggleExpand,
|
|
58
|
+
"aria-expanded": isExpanded
|
|
59
|
+
}, __jsx(_material.Box, {
|
|
60
|
+
className: "pull-left"
|
|
61
|
+
}, iconclass && !iconurl && __jsx(_material.Box, {
|
|
62
|
+
component: "i",
|
|
63
|
+
className: "app-icon panel-icon ".concat(iconclass)
|
|
64
|
+
}), iconurl && __jsx(_material.Box, {
|
|
65
|
+
component: "img",
|
|
66
|
+
"data-identifier": "img",
|
|
67
|
+
title: "iconurl",
|
|
68
|
+
alt: "Panel icon",
|
|
69
|
+
className: "panel-image-icon",
|
|
70
|
+
src: iconurl,
|
|
71
|
+
style: {
|
|
72
|
+
width: iconwidth || "auto",
|
|
73
|
+
height: iconheight || "auto",
|
|
74
|
+
margin: iconmargin || "0"
|
|
75
|
+
}
|
|
76
|
+
})), __jsx(_material.Box, {
|
|
77
|
+
className: "pull-left"
|
|
78
|
+
}, title && __jsx(_material.Box, {
|
|
79
|
+
className: "heading",
|
|
80
|
+
title: title,
|
|
81
|
+
dangerouslySetInnerHTML: {
|
|
82
|
+
__html: _dompurify["default"].sanitize(title)
|
|
83
|
+
}
|
|
84
|
+
}), subheading && __jsx(_material.Box, {
|
|
85
|
+
className: "description",
|
|
86
|
+
dangerouslySetInnerHTML: {
|
|
87
|
+
__html: _dompurify["default"].sanitize(subheading)
|
|
88
|
+
}
|
|
89
|
+
}))), __jsx(_material.Box, {
|
|
90
|
+
className: "panel-actions"
|
|
91
|
+
}, badgevalue && __jsx(_material.Box, {
|
|
92
|
+
component: "span",
|
|
93
|
+
className: "app-badge label label-".concat(badgetype),
|
|
94
|
+
color: badgetype === "default" ? "primary" : badgetype
|
|
95
|
+
}, badgevalue), actions && actions.length > 0 && __jsx(_menu["default"], {
|
|
96
|
+
type: "anchor",
|
|
97
|
+
dataset: actions,
|
|
98
|
+
itemicon: itemicon,
|
|
99
|
+
itemlabel: itemlabel,
|
|
100
|
+
itemlink: itemlink,
|
|
101
|
+
itemchildren: itemchildren,
|
|
102
|
+
panelPosition: "left",
|
|
103
|
+
iconclass: "wi wi-more-vert",
|
|
104
|
+
name: "panel-actions",
|
|
105
|
+
className: "icon-position-left dropdown-menu pull-right",
|
|
106
|
+
onActionsclick: handleActionItemClick,
|
|
107
|
+
listener: listener,
|
|
108
|
+
arialabel: "dropdown"
|
|
109
|
+
}), helptext && __jsx(_material.IconButton, {
|
|
110
|
+
"aria-label": "Help",
|
|
111
|
+
className: "app-icon panel-action wi",
|
|
112
|
+
title: "Help",
|
|
113
|
+
onClick: onToggleHelp
|
|
114
|
+
}, __jsx(_HelpOutline["default"], {
|
|
115
|
+
className: "wi-question"
|
|
116
|
+
})), collapsible && __jsx(_material.IconButton, {
|
|
117
|
+
"aria-label": "Collapse/Expand",
|
|
118
|
+
className: "app-icon panel-action wi",
|
|
119
|
+
title: "".concat(listener.appLocale.LABEL_COLLAPSE, "/").concat(listener.appLocale.LABEL_EXPAND),
|
|
120
|
+
onClick: onToggleExpand,
|
|
121
|
+
"aria-expanded": isExpanded
|
|
122
|
+
}, isExpanded ? __jsx(_ExpandLess["default"], {
|
|
123
|
+
className: "wi-minus"
|
|
124
|
+
}) : __jsx(_ExpandMore["default"], {
|
|
125
|
+
className: "wi-plus"
|
|
126
|
+
})), enablefullscreen && __jsx(_material.IconButton, {
|
|
127
|
+
"aria-label": isFullscreen ? "Exit Fullscreen" : "Fullscreen",
|
|
128
|
+
className: "app-icon panel-action wi",
|
|
129
|
+
title: isFullscreen ? "Exit Fullscreen" : "Fullscreen",
|
|
130
|
+
onClick: onToggleFullScreen
|
|
131
|
+
}, isFullscreen ? __jsx(_FullscreenExit["default"], {
|
|
132
|
+
className: "wi-fullscreen-exit"
|
|
133
|
+
}) : __jsx(_Fullscreen["default"], {
|
|
134
|
+
className: "wi-fullscreen"
|
|
135
|
+
})), closable && __jsx(_material.IconButton, {
|
|
136
|
+
"aria-label": "Close",
|
|
137
|
+
className: "app-icon panel-action",
|
|
138
|
+
title: "Close",
|
|
139
|
+
onClick: onClose
|
|
140
|
+
}, __jsx(_Close["default"], {
|
|
141
|
+
className: "wi wi-close"
|
|
142
|
+
}))));
|
|
143
|
+
};
|
|
144
|
+
var _default = exports["default"] = PanelHeader;
|