@wavemaker-ai/react-runtime 1.0.0-rc.314 → 1.0.0-rc.319
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/navigation-action.d.ts +1 -0
- package/actions/navigation-action.js +34 -9
- package/components/advanced/carousel/index.d.ts +2 -0
- package/components/advanced/carousel/template.d.ts +2 -0
- package/components/advanced/login/index.d.ts +2 -0
- package/components/advanced/marquee/index.d.ts +2 -0
- package/components/auth/RoleAuthGuard.d.ts +6 -0
- package/components/auth/RoleAuthGuard.js +66 -0
- package/components/basic/anchor/index.d.ts +2 -0
- package/components/basic/anchor/index.js +1 -1
- package/components/basic/audio/index.d.ts +2 -0
- package/components/basic/html/index.d.ts +2 -0
- package/components/basic/icon/index.d.ts +2 -0
- package/components/basic/iframe/index.d.ts +2 -0
- package/components/basic/label/index.d.ts +2 -0
- package/components/basic/label/index.js +17 -3
- package/components/basic/picture/index.d.ts +2 -0
- package/components/basic/picture/index.js +20 -1
- package/components/basic/progress-bar/index.d.ts +2 -0
- package/components/basic/progress-circle/index.d.ts +2 -0
- package/components/basic/progress-circle/index.js +2 -1
- package/components/basic/richtexteditor/index.d.ts +4 -0
- package/components/basic/richtexteditor/index.js +16 -15
- package/components/basic/search/index.d.ts +4 -0
- package/components/basic/search/index.js +2 -1
- package/components/basic/search/providers.js +2 -2
- package/components/basic/spinner/index.d.ts +2 -0
- package/components/basic/tile/index.d.ts +2 -0
- package/components/basic/tree/Components/TreeNodeComponent.d.ts +1 -1
- package/components/basic/tree/Components/TreeNodeComponent.js +14 -8
- package/components/basic/tree/hooks/useTreePersistedState.d.ts +3 -0
- package/components/basic/tree/hooks/useTreePersistedState.js +38 -0
- package/components/basic/tree/index.d.ts +3 -0
- package/components/basic/tree/index.js +105 -30
- package/components/basic/tree/props.d.ts +18 -1
- package/components/basic/tree/utils.d.ts +16 -1
- package/components/basic/tree/utils.js +111 -0
- package/components/basic/video/index.d.ts +2 -0
- package/components/chart/index.d.ts +2 -0
- package/components/chart/src/dataUtils.js +1 -1
- package/components/common/customTemplate/useCustomTemplate.js +1 -1
- package/components/common/index.d.ts +2 -0
- package/components/common/index.js +5 -1
- package/components/common/wm-skeleton.d.ts +95 -0
- package/components/common/wm-skeleton.js +346 -0
- package/components/container/accordion/accordion-pane/index.d.ts +2 -0
- package/components/container/accordion/index.d.ts +4 -0
- package/components/container/accordion/index.js +23 -1
- package/components/container/accordion/props.d.ts +10 -0
- package/components/container/index.d.ts +2 -0
- package/components/container/index.js +2 -4
- package/components/container/layout-grid/grid-column/index.d.ts +2 -0
- package/components/container/layout-grid/grid-column/index.js +2 -1
- package/components/container/layout-grid/grid-row/index.d.ts +2 -0
- package/components/container/layout-grid/index.d.ts +2 -0
- package/components/container/linear-layout/index.d.ts +2 -0
- package/components/container/linear-layout/linear-layout-item/index.d.ts +2 -0
- package/components/container/panel/index.d.ts +2 -0
- package/components/container/repeat-template/index.d.ts +2 -0
- package/components/container/tabs/index.d.ts +4 -0
- package/components/container/tabs/index.js +23 -1
- package/components/container/tabs/props.d.ts +10 -0
- package/components/container/tabs/tab-pane/index.d.ts +2 -0
- package/components/container/wizard/index.d.ts +8 -0
- package/components/container/wizard/index.js +27 -3
- package/components/container/wizard/props.d.ts +10 -0
- package/components/container/wizard/wizard-step/index.d.ts +2 -0
- package/components/data/card/card-actions/index.d.ts +2 -0
- package/components/data/card/card-content/index.d.ts +2 -0
- package/components/data/card/card-footer/index.d.ts +2 -0
- package/components/data/card/index.d.ts +2 -0
- package/components/data/card/index.js +12 -6
- package/components/data/form/base-form/hooks/useFormOperations.d.ts +1 -1
- package/components/data/form/base-form/hooks/useFormOperations.js +3 -3
- package/components/data/form/base-form/index.js +33 -26
- package/components/data/form/base-form/props.d.ts +1 -1
- package/components/data/form/dynamic-fields/index.js +3 -0
- package/components/data/form/form-action/index.d.ts +4 -0
- package/components/data/form/form-controller/hooks/index.js +2 -1
- package/components/data/form/form-controller/withFormController.js +14 -23
- package/components/data/form/form-field/base-field.js +0 -5
- package/components/data/form/form-field/index.js +99 -13
- package/components/data/form/form-field/props.d.ts +8 -0
- package/components/data/form/index.js +13 -0
- package/components/data/list/index.d.ts +7 -0
- package/components/data/list/index.js +18 -0
- package/components/data/list/props.d.ts +7 -0
- package/components/data/pagination/hooks/usePagination.js +0 -1
- package/components/data/table/components/RowCells.js +4 -1
- package/components/data/table/hooks/useDynamicColumns.js +3 -1
- package/components/data/table/hooks/useResponsiveColumns.d.ts +2 -0
- package/components/data/table/index.d.ts +8 -0
- package/components/data/table/index.js +20 -2
- package/components/data/table/live-table/index.d.ts +2 -0
- package/components/data/table/props.d.ts +10 -0
- package/components/data/table/table-action/index.d.ts +2 -0
- package/components/data/table/table-column/index.d.ts +2 -0
- package/components/data/table/table-row/index.d.ts +2 -0
- package/components/data/table/table-row-action/index.d.ts +2 -0
- package/components/data/table/utils/columnBuilder.d.ts +1 -1
- package/components/data/table/utils/columnBuilder.js +7 -4
- package/components/data/table/utils/crud-handlers.js +10 -10
- package/components/data/table/utils/index.d.ts +11 -8
- package/components/data/table/utils/index.js +90 -12
- package/components/dialogs/alert-dialog/index.d.ts +4 -0
- package/components/dialogs/confirm-dialog/index.d.ts +4 -0
- package/components/dialogs/dialog/index.d.ts +4 -0
- package/components/dialogs/dialog-actions/index.d.ts +2 -0
- package/components/dialogs/dialog-body/index.d.ts +2 -0
- package/components/dialogs/dialog-content/index.d.ts +2 -0
- package/components/dialogs/dialog-header/index.d.ts +2 -0
- package/components/dialogs/iframe-dialog/index.d.ts +4 -0
- package/components/dialogs/login-dialog/index.d.ts +4 -0
- package/components/dialogs/page-dialog/index.d.ts +4 -0
- package/components/form/button/index.d.ts +2 -0
- package/components/form/button/index.js +10 -1
- package/components/form/button-group/index.d.ts +2 -0
- package/components/input/calendar/index.d.ts +4 -0
- package/components/input/calendar/index.js +2 -1
- package/components/input/chips/index.d.ts +4 -0
- package/components/input/color-picker/index.d.ts +4 -0
- package/components/input/color-picker/index.js +18 -7
- package/components/input/composite/index.d.ts +2 -0
- package/components/input/currency/index.d.ts +4 -0
- package/components/input/default/checkbox/index.d.ts +4 -0
- package/components/input/default/checkboxset/index.d.ts +4 -0
- package/components/input/default/checkboxset/index.js +7 -5
- package/components/input/default/radioset/index.d.ts +4 -0
- package/components/input/default/radioset/index.js +2 -1
- package/components/input/default/switch/index.d.ts +4 -0
- package/components/input/default/switch/index.js +17 -13
- package/components/input/epoch/date/index.d.ts +2 -0
- package/components/input/epoch/date/index.js +30 -14
- package/components/input/epoch/datetime/index.d.ts +2 -0
- package/components/input/epoch/datetime/index.js +12 -8
- package/components/input/epoch/time/index.d.ts +2 -0
- package/components/input/epoch/time/index.js +21 -15
- package/components/input/fileupload/index.d.ts +2 -0
- package/components/input/number/index.d.ts +4 -0
- package/components/input/number/index.js +4 -3
- package/components/input/rating/index.d.ts +4 -0
- package/components/input/select/index.d.ts +4 -0
- package/components/input/slider/index.d.ts +4 -0
- package/components/input/slider/index.js +4 -2
- package/components/input/text/index.d.ts +4 -0
- package/components/input/text/index.js +16 -8
- package/components/input/textarea/index.d.ts +4 -0
- package/components/input/upload/index.d.ts +4 -0
- package/components/input/upload/index.js +6 -4
- package/components/layout/leftnav/index.js +21 -2
- package/components/layout/leftnav/props.d.ts +9 -0
- package/components/layout/leftnav/utils/page-class-util.d.ts +9 -0
- package/components/layout/leftnav/utils/page-class-util.js +28 -0
- package/components/navbar/index.d.ts +2 -0
- package/components/navbar/nav/index.d.ts +2 -0
- package/components/navbar/nav-item/index.d.ts +2 -0
- package/components/navigation/breadcrumb/index.d.ts +2 -0
- package/components/navigation/menu/index.d.ts +2 -0
- package/components/navigation/menu/index.js +2 -2
- package/components/navigation/popover/index.d.ts +2 -0
- package/components/navigation/popover/index.js +1 -0
- package/components/page/index.js +22 -6
- package/components/page/page-context.d.ts +4 -0
- package/components/page/page-context.js +5 -0
- package/components/page/partial/index.d.ts +2 -0
- package/components/page/partial-container/index.js +1 -4
- package/context/AppContext.d.ts +2 -0
- package/context/AppContext.js +20 -1
- package/context/WidgetProvider.js +0 -3
- package/core/proxy-service.d.ts +2 -0
- package/core/proxy-service.js +25 -0
- package/higherOrder/BaseApp.js +5 -6
- package/higherOrder/BaseAppProps.d.ts +1 -0
- package/higherOrder/BasePage.js +4 -12
- package/higherOrder/props.d.ts +10 -0
- package/higherOrder/withBaseWrapper.js +3 -0
- package/hooks/useAuth.js +3 -0
- package/hooks/useDataSourceSubscription.js +1 -1
- package/hooks/useHttp.js +0 -4
- package/hooks/useLayoutSize.d.ts +6 -0
- package/hooks/useLayoutSize.js +12 -0
- package/package-lock.json +229 -203
- package/package.json +3 -3
- package/runtime-dynamic/app-initializer.js +1 -1
- package/runtime-dynamic/components/use-dynamic-component.js +12 -31
- package/runtime-dynamic/factories/build-base-page-like-component.d.ts +1 -1
- package/runtime-dynamic/factories/dynamic-component.js +9 -1
- package/runtime-dynamic/factories/prefab-factory.d.ts +1 -1
- package/runtime-dynamic/factories/utils.d.ts +1 -1
- package/runtime-dynamic/main.js +1 -3
- package/runtime-dynamic/services/component-ref-provider.d.ts +19 -4
- package/runtime-dynamic/services/component-ref-provider.js +18 -38
- package/runtime-dynamic/services/index.d.ts +2 -3
- package/runtime-dynamic/services/index.js +1 -18
- package/runtime-dynamic/services/resource-manager.d.ts +2 -3
- package/runtime-dynamic/services/resource-manager.js +13 -17
- package/runtime-dynamic/services/script-executor.js +5 -8
- package/runtime-dynamic/services/variable-registry.js +3 -4
- package/utils/attr.js +1 -9
- package/utils/custom-expression/index.js +4 -1
- package/utils/custom-expression/parser.js +4 -2
- package/utils/format-util.js +2 -3
- package/utils/state-persistance.d.ts +1 -1
- package/runtime-dynamic/services/cache.d.ts +0 -29
- package/runtime-dynamic/services/cache.js +0 -51
- package/utils/form-state.util.d.ts +0 -62
- package/utils/form-state.util.js +0 -109
|
@@ -38,6 +38,8 @@ export interface TableGroup {
|
|
|
38
38
|
styles?: React.CSSProperties;
|
|
39
39
|
}
|
|
40
40
|
export type TableStructureItem = TableGroup | WmTableColumnProps;
|
|
41
|
+
/** Resolve displayName from a React element, including memo/withBaseWrapper layers */
|
|
42
|
+
export declare function getChildComponentDisplayName(child: any): string;
|
|
41
43
|
export declare const parseTableColumns: (children: React.ReactNode, dataset: any) => WmTableColumnProps[];
|
|
42
44
|
export declare const getAggregateFunctions: (dataset: any[], binding: string) => Record<string, Function>;
|
|
43
45
|
export declare const parseTableStructureWithGroups: (children: React.ReactNode) => TableStructureItem[];
|
|
@@ -94,11 +96,12 @@ export declare const INTERNAL_PROPERTIES: string[];
|
|
|
94
96
|
export declare const cleanRowData: (data: any) => any;
|
|
95
97
|
export declare const parseWidth: (width: string | number, fallbackSize?: number) => number;
|
|
96
98
|
export declare const getColClass: (colClass: string, rowData: any, columnName: string) => string;
|
|
97
|
-
export
|
|
98
|
-
export
|
|
99
|
-
export
|
|
100
|
-
export
|
|
101
|
-
export
|
|
102
|
-
export
|
|
103
|
-
export
|
|
104
|
-
export
|
|
99
|
+
export { TABLE_CSS_CLASSES, TABLE_DATA_STATES, TABLE_MESSAGES, INTERACTIVE_CLASSES, INTERACTIVE_ROLES, INTERACTIVE_DATA_ROLES, INTERACTIVE_TAG_NAMES, DYNAMIC_COLUMNS_CONFIG, UNSUPPORTED_STATE_PERSISTENCE_TYPES, } from "./constants";
|
|
100
|
+
export { renderDisplayCell } from "./renderDisplayCell";
|
|
101
|
+
export { buildSelectionColumns } from "./buildSelectionColumns";
|
|
102
|
+
export { validateField, resetValidationState, updateValidationErrors } from "./validation";
|
|
103
|
+
export { hasInteractiveClass, hasInteractiveAttributes, isInteractiveElement, getRowIdsFromDataset, rowExistsInDataset, selectionStateHelpers, } from "./selectionUtils";
|
|
104
|
+
export { createRowIndexColumn, createDataColumn, createDataColumns, createEditingActionButtons, createDefaultColumnProps, getActionColumnSize, } from "./columnBuilder";
|
|
105
|
+
export { isDataColumn, hasExplicitWidth, distributeColumnWidths } from "./columnWidthDistribution";
|
|
106
|
+
export type { TableSearchFilter, FilterFieldObject, FilterFieldsObject, TableSortState, TableStateData, } from "./table-helpers";
|
|
107
|
+
export { saveTableState, getTableState, clearTableState, convertFilterArrayToObject, convertFilterObjectToArray, } from "./table-helpers";
|
|
@@ -186,6 +186,16 @@ function transformExpression(exp) {
|
|
|
186
186
|
}
|
|
187
187
|
return exp;
|
|
188
188
|
}
|
|
189
|
+
function getChildComponentDisplayName(child) {
|
|
190
|
+
if (!(child == null ? void 0 : child.type)) return "";
|
|
191
|
+
const type = child.type;
|
|
192
|
+
const name = type.displayName || type.name || "";
|
|
193
|
+
const inner = type.type || type.render;
|
|
194
|
+
if (inner) {
|
|
195
|
+
return inner.displayName || inner.name || name;
|
|
196
|
+
}
|
|
197
|
+
return name;
|
|
198
|
+
}
|
|
189
199
|
const parseTableColumns = (children, dataset) => {
|
|
190
200
|
const columns = [];
|
|
191
201
|
React.Children.forEach(children, (child) => {
|
|
@@ -249,6 +259,7 @@ const parseTableStructureWithGroups = (children) => {
|
|
|
249
259
|
React.Children.forEach(children, (child) => {
|
|
250
260
|
if (!child || !child.props) return;
|
|
251
261
|
const childName = get(child, "props.name", "");
|
|
262
|
+
const displayName = getChildComponentDisplayName(child);
|
|
252
263
|
if (childName.includes("group")) {
|
|
253
264
|
const props = get(child, "props", {});
|
|
254
265
|
const group = {
|
|
@@ -264,7 +275,7 @@ const parseTableStructureWithGroups = (children) => {
|
|
|
264
275
|
// Recursive for nested groups
|
|
265
276
|
};
|
|
266
277
|
structure.push(group);
|
|
267
|
-
} else if (childName.includes("wm_table_column") || childName.includes("col_")) {
|
|
278
|
+
} else if (childName.includes("wm_table_column") || childName.includes("col_") || (displayName == null ? void 0 : displayName.includes("WmTableColumn"))) {
|
|
268
279
|
const props = get(child, "props", {});
|
|
269
280
|
const column = __spreadValues({
|
|
270
281
|
field: get(props, "binding"),
|
|
@@ -303,7 +314,8 @@ const flattenTableStructure = (structure) => {
|
|
|
303
314
|
const parseTableRowActions = (children) => {
|
|
304
315
|
const actions = [];
|
|
305
316
|
React.Children.forEach(children, (child) => {
|
|
306
|
-
|
|
317
|
+
var _a;
|
|
318
|
+
if (child && child.props && child.props.name && (child.props.name.includes("wm_table_row_action") || ((_a = child.type) == null ? void 0 : _a.displayName) === "WmTableRowAction")) {
|
|
307
319
|
const props = get(child, "props", {});
|
|
308
320
|
const actionProps = assign({}, props);
|
|
309
321
|
if (child.key) {
|
|
@@ -317,7 +329,8 @@ const parseTableRowActions = (children) => {
|
|
|
317
329
|
const parseTableActions = (children) => {
|
|
318
330
|
const actions = [];
|
|
319
331
|
React.Children.forEach(children, (child) => {
|
|
320
|
-
|
|
332
|
+
var _a;
|
|
333
|
+
if (child && child.props && child.props.name && (child.props.name.includes("wm_table_action") || ((_a = child.type) == null ? void 0 : _a.displayName) === "WmTableAction")) {
|
|
321
334
|
const props = get(child, "props", {});
|
|
322
335
|
const actionProps = assign({}, props);
|
|
323
336
|
if (child.key) {
|
|
@@ -590,40 +603,105 @@ const getColClass = (colClass, rowData, columnName) => {
|
|
|
590
603
|
return "";
|
|
591
604
|
}
|
|
592
605
|
};
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
606
|
+
import {
|
|
607
|
+
TABLE_CSS_CLASSES as TABLE_CSS_CLASSES2,
|
|
608
|
+
TABLE_DATA_STATES,
|
|
609
|
+
TABLE_MESSAGES,
|
|
610
|
+
INTERACTIVE_CLASSES,
|
|
611
|
+
INTERACTIVE_ROLES,
|
|
612
|
+
INTERACTIVE_DATA_ROLES,
|
|
613
|
+
INTERACTIVE_TAG_NAMES,
|
|
614
|
+
DYNAMIC_COLUMNS_CONFIG,
|
|
615
|
+
UNSUPPORTED_STATE_PERSISTENCE_TYPES
|
|
616
|
+
} from "./constants";
|
|
617
|
+
import { renderDisplayCell } from "./renderDisplayCell";
|
|
618
|
+
import { buildSelectionColumns } from "./buildSelectionColumns";
|
|
619
|
+
import { validateField, resetValidationState, updateValidationErrors } from "./validation";
|
|
620
|
+
import {
|
|
621
|
+
hasInteractiveClass,
|
|
622
|
+
hasInteractiveAttributes,
|
|
623
|
+
isInteractiveElement,
|
|
624
|
+
getRowIdsFromDataset,
|
|
625
|
+
rowExistsInDataset,
|
|
626
|
+
selectionStateHelpers
|
|
627
|
+
} from "./selectionUtils";
|
|
628
|
+
import {
|
|
629
|
+
createRowIndexColumn,
|
|
630
|
+
createDataColumn,
|
|
631
|
+
createDataColumns,
|
|
632
|
+
createEditingActionButtons,
|
|
633
|
+
createDefaultColumnProps,
|
|
634
|
+
getActionColumnSize
|
|
635
|
+
} from "./columnBuilder";
|
|
636
|
+
import { isDataColumn, hasExplicitWidth, distributeColumnWidths } from "./columnWidthDistribution";
|
|
637
|
+
import {
|
|
638
|
+
saveTableState,
|
|
639
|
+
getTableState,
|
|
640
|
+
clearTableState,
|
|
641
|
+
convertFilterArrayToObject,
|
|
642
|
+
convertFilterObjectToArray
|
|
643
|
+
} from "./table-helpers";
|
|
601
644
|
export {
|
|
645
|
+
DYNAMIC_COLUMNS_CONFIG,
|
|
646
|
+
INTERACTIVE_CLASSES,
|
|
647
|
+
INTERACTIVE_DATA_ROLES,
|
|
648
|
+
INTERACTIVE_ROLES,
|
|
649
|
+
INTERACTIVE_TAG_NAMES,
|
|
602
650
|
INTERNAL_PROPERTIES,
|
|
651
|
+
TABLE_CSS_CLASSES2 as TABLE_CSS_CLASSES,
|
|
652
|
+
TABLE_DATA_STATES,
|
|
653
|
+
TABLE_MESSAGES,
|
|
654
|
+
UNSUPPORTED_STATE_PERSISTENCE_TYPES,
|
|
603
655
|
addUniqueRowIds,
|
|
656
|
+
buildSelectionColumns,
|
|
604
657
|
cleanRowData,
|
|
658
|
+
clearTableState,
|
|
659
|
+
convertFilterArrayToObject,
|
|
660
|
+
convertFilterObjectToArray,
|
|
661
|
+
createDataColumn,
|
|
662
|
+
createDataColumns,
|
|
663
|
+
createDefaultColumnProps,
|
|
664
|
+
createEditingActionButtons,
|
|
665
|
+
createRowIndexColumn,
|
|
666
|
+
distributeColumnWidths,
|
|
605
667
|
extractDataArray,
|
|
606
668
|
flattenTableStructure,
|
|
607
669
|
getActionButtonClass,
|
|
670
|
+
getActionColumnSize,
|
|
608
671
|
getAggregateFunctions,
|
|
609
672
|
getBooleanDataset,
|
|
610
673
|
getButtonClasses,
|
|
674
|
+
getChildComponentDisplayName,
|
|
611
675
|
getColClass,
|
|
676
|
+
getRowIdsFromDataset,
|
|
612
677
|
getSpacingClasses,
|
|
613
678
|
getTableActionButtonClass,
|
|
679
|
+
getTableState,
|
|
614
680
|
getWidgetMappingForType,
|
|
615
681
|
handleNewRowNavigation,
|
|
682
|
+
hasExplicitWidth,
|
|
683
|
+
hasInteractiveAttributes,
|
|
684
|
+
hasInteractiveClass,
|
|
616
685
|
isAddNewAction,
|
|
617
686
|
isColumnVisibleForViewport,
|
|
687
|
+
isDataColumn,
|
|
618
688
|
isDeleteAction,
|
|
619
689
|
isEditAction,
|
|
690
|
+
isInteractiveElement,
|
|
620
691
|
parseTableActions,
|
|
621
692
|
parseTableColumns,
|
|
622
693
|
parseTableRowActions,
|
|
623
694
|
parseTableRowExpansion,
|
|
624
695
|
parseTableStructureWithGroups,
|
|
625
696
|
parseWidth,
|
|
697
|
+
renderDisplayCell,
|
|
698
|
+
resetValidationState,
|
|
699
|
+
rowExistsInDataset,
|
|
700
|
+
saveTableState,
|
|
701
|
+
selectionStateHelpers,
|
|
626
702
|
shouldShowPagination,
|
|
627
703
|
shouldShowPanelHeading,
|
|
628
|
-
|
|
704
|
+
updateValidationErrors,
|
|
705
|
+
validateEditingFields,
|
|
706
|
+
validateField
|
|
629
707
|
};
|
|
@@ -69,6 +69,8 @@ declare const WmAlertDialogStandalone: {
|
|
|
69
69
|
updateon?: string;
|
|
70
70
|
dataset?: any;
|
|
71
71
|
prefabName?: string;
|
|
72
|
+
loading?: boolean;
|
|
73
|
+
showSkeleton?: boolean;
|
|
72
74
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
73
75
|
displayName: string;
|
|
74
76
|
};
|
|
@@ -152,6 +154,8 @@ declare const _default: {
|
|
|
152
154
|
updateon?: string;
|
|
153
155
|
dataset?: any;
|
|
154
156
|
prefabName?: string;
|
|
157
|
+
loading?: boolean;
|
|
158
|
+
showSkeleton?: boolean;
|
|
155
159
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
156
160
|
displayName: string;
|
|
157
161
|
};
|
|
@@ -70,6 +70,8 @@ declare const WmConfirmDialogStandalone: {
|
|
|
70
70
|
updateon?: string;
|
|
71
71
|
dataset?: any;
|
|
72
72
|
prefabName?: string;
|
|
73
|
+
loading?: boolean;
|
|
74
|
+
showSkeleton?: boolean;
|
|
73
75
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
74
76
|
displayName: string;
|
|
75
77
|
};
|
|
@@ -154,6 +156,8 @@ declare const _default: {
|
|
|
154
156
|
updateon?: string;
|
|
155
157
|
dataset?: any;
|
|
156
158
|
prefabName?: string;
|
|
159
|
+
loading?: boolean;
|
|
160
|
+
showSkeleton?: boolean;
|
|
157
161
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
158
162
|
displayName: string;
|
|
159
163
|
};
|
|
@@ -74,6 +74,8 @@ declare const WmDialogStandalone: {
|
|
|
74
74
|
updateon?: string;
|
|
75
75
|
dataset?: any;
|
|
76
76
|
prefabName?: string;
|
|
77
|
+
loading?: boolean;
|
|
78
|
+
showSkeleton?: boolean;
|
|
77
79
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
78
80
|
displayName: string;
|
|
79
81
|
};
|
|
@@ -164,6 +166,8 @@ declare const _default: {
|
|
|
164
166
|
updateon?: string;
|
|
165
167
|
dataset?: any;
|
|
166
168
|
prefabName?: string;
|
|
169
|
+
loading?: boolean;
|
|
170
|
+
showSkeleton?: boolean;
|
|
167
171
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
168
172
|
displayName: string;
|
|
169
173
|
};
|
|
@@ -79,6 +79,8 @@ declare const WmIframeDialogStandalone: {
|
|
|
79
79
|
updateon?: string;
|
|
80
80
|
dataset?: any;
|
|
81
81
|
prefabName?: string;
|
|
82
|
+
loading?: boolean;
|
|
83
|
+
showSkeleton?: boolean;
|
|
82
84
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
83
85
|
displayName: string;
|
|
84
86
|
};
|
|
@@ -172,6 +174,8 @@ declare const _default: {
|
|
|
172
174
|
updateon?: string;
|
|
173
175
|
dataset?: any;
|
|
174
176
|
prefabName?: string;
|
|
177
|
+
loading?: boolean;
|
|
178
|
+
showSkeleton?: boolean;
|
|
175
179
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
176
180
|
displayName: string;
|
|
177
181
|
};
|
|
@@ -76,6 +76,8 @@ declare const WmLoginDialogStandalone: {
|
|
|
76
76
|
updateon?: string;
|
|
77
77
|
dataset?: any;
|
|
78
78
|
prefabName?: string;
|
|
79
|
+
loading?: boolean;
|
|
80
|
+
showSkeleton?: boolean;
|
|
79
81
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
80
82
|
displayName: string;
|
|
81
83
|
};
|
|
@@ -157,6 +159,8 @@ declare const _default: {
|
|
|
157
159
|
updateon?: string;
|
|
158
160
|
dataset?: any;
|
|
159
161
|
prefabName?: string;
|
|
162
|
+
loading?: boolean;
|
|
163
|
+
showSkeleton?: boolean;
|
|
160
164
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
161
165
|
displayName: string;
|
|
162
166
|
};
|
|
@@ -71,6 +71,8 @@ declare const WmPageDialogStandalone: {
|
|
|
71
71
|
formfield?: boolean;
|
|
72
72
|
updateon?: string;
|
|
73
73
|
dataset?: any;
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
showSkeleton?: boolean;
|
|
74
76
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
75
77
|
displayName: string;
|
|
76
78
|
};
|
|
@@ -156,6 +158,8 @@ declare const _default: {
|
|
|
156
158
|
formfield?: boolean;
|
|
157
159
|
updateon?: string;
|
|
158
160
|
dataset?: any;
|
|
161
|
+
loading?: boolean;
|
|
162
|
+
showSkeleton?: boolean;
|
|
159
163
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
160
164
|
displayName: string;
|
|
161
165
|
};
|
|
@@ -37,6 +37,11 @@ import Box from "@mui/material/Box";
|
|
|
37
37
|
import Button from "@mui/material/Button";
|
|
38
38
|
import Badge from "@mui/material/Badge";
|
|
39
39
|
import { withBaseWrapper } from "../../../higherOrder/withBaseWrapper";
|
|
40
|
+
import {
|
|
41
|
+
WmSkeleton,
|
|
42
|
+
SKELETON_REGISTRY,
|
|
43
|
+
shouldShowSkeleton
|
|
44
|
+
} from "../../common/wm-skeleton";
|
|
40
45
|
import { prefixPrefabResourceUrl } from "../../../utils/resource-url";
|
|
41
46
|
import { removeInvalidAttributes } from "../../../utils/attr";
|
|
42
47
|
const DEFAULT_CLASS = "btn app-button";
|
|
@@ -174,6 +179,8 @@ const WmButton = memo(
|
|
|
174
179
|
}
|
|
175
180
|
};
|
|
176
181
|
const EVENTS = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, onBlur && { onBlur: handleOnBlur }), onFocus && { onFocus: handleOnFocus }), onMouseEnter && { onMouseEnter: handleMouseEnter }), onMouseLeave && { onMouseLeave: handleMouseLeave }), onDoubleClick && { onDoubleClick: handleDoubleClick }), onKeydown && { onKeyDown: handleKeyDown }), onKeyup && { onKeyUp: handleKeyUp }), onClick && { onClick: handleClick }), onKeypress && { onKeyPress: handleKeyPress }), { onMouseDown: handleMouseDown });
|
|
182
|
+
if (shouldShowSkeleton(props.loading, props.showSkeleton))
|
|
183
|
+
return /* @__PURE__ */ jsx(WmSkeleton, __spreadProps(__spreadValues({}, SKELETON_REGISTRY["WmButton"]), { className, styles }));
|
|
177
184
|
return /* @__PURE__ */ jsxs(
|
|
178
185
|
Button,
|
|
179
186
|
__spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
@@ -293,7 +300,9 @@ const WmButton = memo(
|
|
|
293
300
|
"onClick",
|
|
294
301
|
"show",
|
|
295
302
|
"styles",
|
|
296
|
-
"className"
|
|
303
|
+
"className",
|
|
304
|
+
"loading",
|
|
305
|
+
"showSkeleton"
|
|
297
306
|
];
|
|
298
307
|
return keys.every((key) => prev[key] === current[key]);
|
|
299
308
|
}
|
|
@@ -66,6 +66,8 @@ export declare const WmCalendar: React.ForwardRefExoticComponent<Omit<{
|
|
|
66
66
|
formfield?: boolean;
|
|
67
67
|
updateon?: string;
|
|
68
68
|
prefabName?: string;
|
|
69
|
+
loading?: boolean;
|
|
70
|
+
showSkeleton?: boolean;
|
|
69
71
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
70
72
|
/**
|
|
71
73
|
* The WmCalendar component provides an interactive calendar with event support, day/week/month views.
|
|
@@ -126,5 +128,7 @@ declare const _default: React.ComponentType<{
|
|
|
126
128
|
updateon?: string;
|
|
127
129
|
dataset?: any;
|
|
128
130
|
prefabName?: string;
|
|
131
|
+
loading?: boolean;
|
|
132
|
+
showSkeleton?: boolean;
|
|
129
133
|
}>;
|
|
130
134
|
export default _default;
|
|
@@ -137,13 +137,14 @@ const WmCalendar = forwardRef((props, ref) => {
|
|
|
137
137
|
}, [calendartype, controls]);
|
|
138
138
|
const invokeCallback = useCallback(
|
|
139
139
|
(eventName, eventData) => {
|
|
140
|
+
var _a2;
|
|
140
141
|
const { $start, $end, $view, $data, $event, $newData, $oldData, $delta, $revertFunc, $ui } = eventData;
|
|
141
142
|
switch (eventName) {
|
|
142
143
|
case "select":
|
|
143
144
|
onSelect == null ? void 0 : onSelect($start, $end, $view, $data);
|
|
144
145
|
break;
|
|
145
146
|
case "beforerender":
|
|
146
|
-
onBeforerender == null ? void 0 : onBeforerender(eventData, listener == null ? void 0 : listener.Widgets[name]);
|
|
147
|
+
onBeforerender == null ? void 0 : onBeforerender(eventData, (_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name]);
|
|
147
148
|
break;
|
|
148
149
|
case "eventdrop":
|
|
149
150
|
onEventdrop == null ? void 0 : onEventdrop($event, $newData, $oldData, $delta, $revertFunc, $ui, $view);
|
|
@@ -99,6 +99,8 @@ declare const WmChipsStandalone: React.ComponentType<import("../../data/form/for
|
|
|
99
99
|
formfield?: boolean;
|
|
100
100
|
updateon?: string;
|
|
101
101
|
prefabName?: string;
|
|
102
|
+
loading?: boolean;
|
|
103
|
+
showSkeleton?: boolean;
|
|
102
104
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
103
105
|
export { WmChipsStandalone as WmChips };
|
|
104
106
|
/**
|
|
@@ -220,5 +222,7 @@ declare const _default: React.ComponentType<{
|
|
|
220
222
|
formfield?: boolean;
|
|
221
223
|
updateon?: string;
|
|
222
224
|
prefabName?: string;
|
|
225
|
+
loading?: boolean;
|
|
226
|
+
showSkeleton?: boolean;
|
|
223
227
|
}>;
|
|
224
228
|
export default _default;
|
|
@@ -62,6 +62,8 @@ declare const WmColorPickerStandalone: React.ComponentType<import("../../data/fo
|
|
|
62
62
|
updateon?: string;
|
|
63
63
|
dataset?: any;
|
|
64
64
|
prefabName?: string;
|
|
65
|
+
loading?: boolean;
|
|
66
|
+
showSkeleton?: boolean;
|
|
65
67
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
66
68
|
export { WmColorPickerStandalone as WmColorPicker };
|
|
67
69
|
/**
|
|
@@ -147,5 +149,7 @@ declare const _default: React.ComponentType<{
|
|
|
147
149
|
updateon?: string;
|
|
148
150
|
dataset?: any;
|
|
149
151
|
prefabName?: string;
|
|
152
|
+
loading?: boolean;
|
|
153
|
+
showSkeleton?: boolean;
|
|
150
154
|
}>;
|
|
151
155
|
export default _default;
|
|
@@ -298,6 +298,7 @@ const WmColorPicker = memo(
|
|
|
298
298
|
);
|
|
299
299
|
const handleInputChange = useCallback(
|
|
300
300
|
(event) => {
|
|
301
|
+
var _a2;
|
|
301
302
|
const newValue = event.target.value;
|
|
302
303
|
setInputValue(newValue);
|
|
303
304
|
if (newValue === "") {
|
|
@@ -311,7 +312,7 @@ const WmColorPicker = memo(
|
|
|
311
312
|
if (onChange && name) {
|
|
312
313
|
onChange(
|
|
313
314
|
event,
|
|
314
|
-
listener == null ? void 0 : listener.Widgets[name],
|
|
315
|
+
(_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name],
|
|
315
316
|
newValue,
|
|
316
317
|
colorValue
|
|
317
318
|
);
|
|
@@ -321,6 +322,7 @@ const WmColorPicker = memo(
|
|
|
321
322
|
);
|
|
322
323
|
const handleInputBlur = useCallback(
|
|
323
324
|
(event) => {
|
|
325
|
+
var _a2;
|
|
324
326
|
if (autoclose !== AUTOCLOSE_TYPE.NEVER && !isInteractingWithPicker && pickerRef.current && !pickerRef.current.contains(event.relatedTarget)) {
|
|
325
327
|
setIsOpen(false);
|
|
326
328
|
handleFloatingLabel("close");
|
|
@@ -333,15 +335,16 @@ const WmColorPicker = memo(
|
|
|
333
335
|
}
|
|
334
336
|
}
|
|
335
337
|
if (onBlur) {
|
|
336
|
-
onBlur(event, listener == null ? void 0 : listener.Widgets[name]);
|
|
338
|
+
onBlur(event, (_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name]);
|
|
337
339
|
}
|
|
338
340
|
},
|
|
339
341
|
[autoclose, isInteractingWithPicker, inputValue, validateAndSetColor, setInputValue, onBlur]
|
|
340
342
|
);
|
|
341
343
|
const handleInputFocus = useCallback(
|
|
342
344
|
(event) => {
|
|
345
|
+
var _a2;
|
|
343
346
|
if (onFocus) {
|
|
344
|
-
onFocus(event, listener == null ? void 0 : listener.Widgets[name]);
|
|
347
|
+
onFocus(event, (_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name]);
|
|
345
348
|
}
|
|
346
349
|
openPicker();
|
|
347
350
|
handleFloatingLabel("open");
|
|
@@ -350,10 +353,11 @@ const WmColorPicker = memo(
|
|
|
350
353
|
);
|
|
351
354
|
const handleInputClick = useCallback(
|
|
352
355
|
(event) => {
|
|
356
|
+
var _a2;
|
|
353
357
|
event.stopPropagation();
|
|
354
358
|
if (!isReadonlyOrDisabled) {
|
|
355
359
|
if (onClick && name) {
|
|
356
|
-
onClick(event, listener == null ? void 0 : listener.Widgets[name]);
|
|
360
|
+
onClick(event, (_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name]);
|
|
357
361
|
}
|
|
358
362
|
openPicker();
|
|
359
363
|
handleFloatingLabel("open");
|
|
@@ -372,6 +376,7 @@ const WmColorPicker = memo(
|
|
|
372
376
|
);
|
|
373
377
|
const handleColorChange = useCallback(
|
|
374
378
|
(color, event) => {
|
|
379
|
+
var _a2;
|
|
375
380
|
const { r, g, b, a } = color.rgb;
|
|
376
381
|
const rgbaColor = { r, g, b, a };
|
|
377
382
|
setColorValue(rgbaColor);
|
|
@@ -395,7 +400,7 @@ const WmColorPicker = memo(
|
|
|
395
400
|
if (onChange) {
|
|
396
401
|
onChange(
|
|
397
402
|
customEvent,
|
|
398
|
-
listener == null ? void 0 : listener.Widgets[name],
|
|
403
|
+
(_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name],
|
|
399
404
|
newValue,
|
|
400
405
|
inputValue
|
|
401
406
|
);
|
|
@@ -548,8 +553,14 @@ const WmColorPicker = memo(
|
|
|
548
553
|
onBlur: handleInputBlur,
|
|
549
554
|
onFocus: handleInputFocus,
|
|
550
555
|
onClick: handleInputClick,
|
|
551
|
-
onMouseEnter: (event) =>
|
|
552
|
-
|
|
556
|
+
onMouseEnter: (event) => {
|
|
557
|
+
var _a2;
|
|
558
|
+
return onMouseEnter && onMouseEnter(event, (_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name]);
|
|
559
|
+
},
|
|
560
|
+
onMouseLeave: (event) => {
|
|
561
|
+
var _a2;
|
|
562
|
+
return onMouseLeave && onMouseLeave(event, (_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name]);
|
|
563
|
+
},
|
|
553
564
|
"aria-label": arialabel,
|
|
554
565
|
"aria-readonly": readonly
|
|
555
566
|
}
|
|
@@ -74,6 +74,8 @@ declare const WmCurrencyStandalone: React.ComponentType<import("../../data/form/
|
|
|
74
74
|
formfield?: boolean;
|
|
75
75
|
dataset?: any;
|
|
76
76
|
prefabName?: string;
|
|
77
|
+
loading?: boolean;
|
|
78
|
+
showSkeleton?: boolean;
|
|
77
79
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
78
80
|
export { WmCurrencyStandalone as WmCurrency };
|
|
79
81
|
/**
|
|
@@ -171,5 +173,7 @@ declare const _default: React.ComponentType<{
|
|
|
171
173
|
formfield?: boolean;
|
|
172
174
|
dataset?: any;
|
|
173
175
|
prefabName?: string;
|
|
176
|
+
loading?: boolean;
|
|
177
|
+
showSkeleton?: boolean;
|
|
174
178
|
}>;
|
|
175
179
|
export default _default;
|
|
@@ -62,6 +62,8 @@ declare const WmCheckboxStandalone: React.ComponentType<import("../../../data/fo
|
|
|
62
62
|
updateon?: string;
|
|
63
63
|
dataset?: any;
|
|
64
64
|
prefabName?: string;
|
|
65
|
+
loading?: boolean;
|
|
66
|
+
showSkeleton?: boolean;
|
|
65
67
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
66
68
|
export { WmCheckboxStandalone as WmCheckbox };
|
|
67
69
|
/**
|
|
@@ -146,5 +148,7 @@ declare const _default: React.ComponentType<{
|
|
|
146
148
|
updateon?: string;
|
|
147
149
|
dataset?: any;
|
|
148
150
|
prefabName?: string;
|
|
151
|
+
loading?: boolean;
|
|
152
|
+
showSkeleton?: boolean;
|
|
149
153
|
}>;
|
|
150
154
|
export default _default;
|
|
@@ -84,6 +84,8 @@ declare const WmCheckboxsetStandalone: React.ComponentType<import("../../../data
|
|
|
84
84
|
formfield?: boolean;
|
|
85
85
|
updateon?: string;
|
|
86
86
|
prefabName?: string;
|
|
87
|
+
loading?: boolean;
|
|
88
|
+
showSkeleton?: boolean;
|
|
87
89
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
88
90
|
export { WmCheckboxsetStandalone as WmCheckboxset };
|
|
89
91
|
/**
|
|
@@ -189,5 +191,7 @@ declare const _default: React.ComponentType<{
|
|
|
189
191
|
formfield?: boolean;
|
|
190
192
|
updateon?: string;
|
|
191
193
|
prefabName?: string;
|
|
194
|
+
loading?: boolean;
|
|
195
|
+
showSkeleton?: boolean;
|
|
192
196
|
}>;
|
|
193
197
|
export default _default;
|
|
@@ -228,7 +228,7 @@ const WmCheckboxset = memo(
|
|
|
228
228
|
}, []);
|
|
229
229
|
const handleCheckboxChange = useCallback(
|
|
230
230
|
(event, key, dataObject) => {
|
|
231
|
-
var _a;
|
|
231
|
+
var _a, _b, _c;
|
|
232
232
|
if (disabled || readonly) return;
|
|
233
233
|
const currentSelectedKeys = Array.isArray(localSelectedKeys) ? localSelectedKeys : [];
|
|
234
234
|
const isCurrentlySelected = currentSelectedKeys.some((k) => {
|
|
@@ -282,10 +282,10 @@ const WmCheckboxset = memo(
|
|
|
282
282
|
onchange(newKeys);
|
|
283
283
|
}
|
|
284
284
|
if (onChange && name) {
|
|
285
|
-
onChange(event, listener == null ? void 0 : listener.Widgets[name], newKeys, currentSelectedKeys);
|
|
285
|
+
onChange(event, (_b = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _b[name], newKeys, currentSelectedKeys);
|
|
286
286
|
}
|
|
287
287
|
if (onClick && name) {
|
|
288
|
-
onClick(event, listener == null ? void 0 : listener.Widgets[name]);
|
|
288
|
+
onClick(event, (_c = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _c[name]);
|
|
289
289
|
}
|
|
290
290
|
if (listener == null ? void 0 : listener.onChange) {
|
|
291
291
|
const displayValues = getCheckboxsetDisplayValues(
|
|
@@ -462,13 +462,15 @@ const WmCheckboxset = memo(
|
|
|
462
462
|
return /* @__PURE__ */ jsx(List, { className: clsx(DEFAULT_CLASS, itemclass, listclass), sx: styles, children: /* @__PURE__ */ jsx(ListItem, { children: /* @__PURE__ */ jsx(ListItemText, { primary: "No items to display" }) }) });
|
|
463
463
|
}
|
|
464
464
|
const handleMouseEnter = (event) => {
|
|
465
|
+
var _a;
|
|
465
466
|
if (onMouseEnter) {
|
|
466
|
-
onMouseEnter(event, listener == null ? void 0 : listener.Widgets[name]);
|
|
467
|
+
onMouseEnter(event, (_a = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a[name]);
|
|
467
468
|
}
|
|
468
469
|
};
|
|
469
470
|
const handleMouseLeave = (event) => {
|
|
471
|
+
var _a;
|
|
470
472
|
if (onMouseLeave) {
|
|
471
|
-
onMouseLeave(event, listener == null ? void 0 : listener.Widgets[name]);
|
|
473
|
+
onMouseLeave(event, (_a = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a[name]);
|
|
472
474
|
}
|
|
473
475
|
};
|
|
474
476
|
return /* @__PURE__ */ jsxs(
|