@wavemaker-ai/react-runtime 1.0.0-rc.322 → 1.0.0-rc.326
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/login-action.js +1 -1
- package/components/advanced/carousel/index.d.ts +1 -0
- package/components/advanced/carousel/template.d.ts +1 -0
- package/components/advanced/login/index.d.ts +1 -0
- package/components/advanced/marquee/index.d.ts +1 -0
- package/components/basic/anchor/index.d.ts +1 -0
- package/components/basic/anchor/index.js +19 -14
- package/components/basic/audio/index.d.ts +1 -0
- package/components/basic/html/index.d.ts +1 -0
- package/components/basic/icon/index.d.ts +1 -0
- package/components/basic/icon/index.js +13 -16
- package/components/basic/iframe/index.d.ts +1 -0
- package/components/basic/label/index.d.ts +1 -0
- package/components/basic/label/index.js +5 -3
- package/components/basic/label/props.d.ts +1 -1
- package/components/basic/picture/index.d.ts +1 -0
- package/components/basic/picture/index.js +3 -2
- package/components/basic/progress-bar/index.d.ts +1 -0
- package/components/basic/progress-circle/index.d.ts +1 -0
- package/components/basic/richtexteditor/index.d.ts +2 -0
- package/components/basic/search/index.d.ts +6 -0
- package/components/basic/search/index.js +69 -9
- package/components/basic/search/props.d.ts +4 -0
- package/components/basic/spinner/index.d.ts +2 -0
- package/components/basic/spinner/index.js +11 -9
- package/components/basic/spinner/props.d.ts +5 -0
- package/components/basic/tile/index.d.ts +1 -0
- package/components/basic/tree/index.d.ts +1 -0
- package/components/basic/video/index.d.ts +1 -0
- package/components/chart/index.d.ts +2 -0
- package/components/chart/props.d.ts +1 -0
- package/components/chart/src/chart.js +12 -1
- package/components/chart/src/types.d.ts +2 -0
- package/components/common/WmAppIcon/index.d.ts +15 -0
- package/components/common/WmAppIcon/index.js +130 -0
- package/components/common/WmAppIcon/props.d.ts +17 -0
- package/components/common/WmAppIcon/props.js +0 -0
- package/components/common/index.d.ts +3 -1
- package/components/common/index.js +10 -2
- package/components/common/wm-skeleton.d.ts +7 -0
- package/components/common/wm-skeleton.js +11 -1
- package/components/container/accordion/accordion-pane/index.d.ts +2 -0
- package/components/container/accordion/accordion-pane/index.js +10 -1
- package/components/container/accordion/accordion-pane/props.d.ts +1 -0
- package/components/container/accordion/index.d.ts +1 -0
- package/components/container/accordion/index.js +2 -2
- package/components/container/index.d.ts +1 -0
- package/components/container/index.js +6 -1
- package/components/container/layout-grid/grid-column/index.d.ts +1 -0
- package/components/container/layout-grid/grid-row/index.d.ts +1 -0
- package/components/container/layout-grid/grid-row/index.js +1 -1
- package/components/container/layout-grid/index.d.ts +1 -0
- package/components/container/linear-layout/index.d.ts +1 -0
- package/components/container/linear-layout/linear-layout-item/index.d.ts +1 -0
- package/components/container/panel/components/panel-header/index.js +16 -16
- package/components/container/panel/index.d.ts +1 -0
- package/components/container/repeat-template/index.d.ts +1 -0
- package/components/container/tabs/index.d.ts +1 -0
- package/components/container/tabs/index.js +18 -18
- package/components/container/tabs/props.d.ts +1 -0
- package/components/container/tabs/tab-pane/index.d.ts +2 -0
- package/components/container/tabs/tab-pane/index.js +2 -0
- package/components/container/tabs/tab-pane/props.d.ts +1 -0
- package/components/container/wizard/components/StepComponents.js +14 -6
- package/components/container/wizard/index.d.ts +2 -0
- package/components/container/wizard/index.js +2 -2
- package/components/container/wizard/props.d.ts +4 -0
- package/components/container/wizard/wizard-step/index.d.ts +1 -0
- package/components/container/wizard/wizard-step/index.js +6 -0
- package/components/data/card/card-actions/index.d.ts +1 -0
- package/components/data/card/card-content/index.d.ts +1 -0
- package/components/data/card/card-footer/index.d.ts +1 -0
- package/components/data/card/index.d.ts +1 -0
- package/components/data/card/index.js +13 -6
- package/components/data/form/base-form/hooks/useFormSubmission.d.ts +1 -1
- package/components/data/form/base-form/hooks/useFormSubmission.js +3 -1
- package/components/data/form/base-form/index.js +11 -14
- package/components/data/form/base-form/props.d.ts +3 -0
- package/components/data/form/dynamic-fields/index.js +1 -0
- package/components/data/form/form-action/index.d.ts +2 -0
- package/components/data/form/form-action/index.js +6 -4
- package/components/data/form/form-controller/withFormController.js +19 -2
- package/components/data/form/form-field/base-field.js +8 -5
- package/components/data/form/form-field/index.js +14 -9
- package/components/data/form/form-field/props.d.ts +1 -0
- package/components/data/form/form-header/index.d.ts +1 -1
- package/components/data/form/form-header/index.js +10 -1
- package/components/data/form/index.js +5 -3
- package/components/data/form/props.d.ts +1 -0
- package/components/data/list/components/ListHeader.js +19 -3
- package/components/data/list/components/ListItemWithTemplate.js +10 -3
- package/components/data/list/components/ListItems.d.ts +1 -1
- package/components/data/list/components/ListItems.js +5 -1
- package/components/data/list/components/LoadMoreButton.js +14 -2
- package/components/data/list/components/StandardListItems.js +1 -1
- package/components/data/list/components/props.d.ts +11 -5
- package/components/data/list/hooks/props.d.ts +2 -2
- package/components/data/list/hooks/useListEffects.js +1 -1
- package/components/data/list/hooks/useListEventHandlers.js +3 -2
- package/components/data/list/index.d.ts +5 -1
- package/components/data/list/index.js +28 -7
- package/components/data/list/props.d.ts +14 -2
- package/components/data/list/utils/constants.d.ts +0 -1
- package/components/data/list/utils/constants.js +0 -2
- package/components/data/list/utils/list-helpers.d.ts +5 -1
- package/components/data/list/utils/list-helpers.js +10 -0
- package/components/data/pagination/components/PageSizeSelector.js +49 -155
- package/components/data/pagination/hooks/usePagination.js +24 -1
- package/components/data/table/components/RowCells.js +18 -4
- package/components/data/table/components/TableBody.js +5 -3
- package/components/data/table/components/TableDataRow.js +16 -3
- package/components/data/table/components/TableHeader.js +10 -8
- package/components/data/table/components/TablePanelHeading.js +15 -3
- package/components/data/table/hooks/useDynamicColumns.js +1 -1
- package/components/data/table/hooks/useResponsiveColumns.d.ts +1 -0
- package/components/data/table/hooks/useRowExpansion.js +41 -31
- package/components/data/table/hooks/useRowHandlers.js +0 -1
- package/components/data/table/hooks/useServerSideSorting.js +0 -1
- package/components/data/table/hooks/useTableColumns.js +17 -9
- package/components/data/table/hooks/useTableData.js +30 -2
- package/components/data/table/hooks/useTableEdit.js +0 -1
- package/components/data/table/index.d.ts +4 -0
- package/components/data/table/index.js +93 -47
- package/components/data/table/live-table/index.d.ts +1 -0
- package/components/data/table/live-table/index.js +0 -1
- package/components/data/table/props.d.ts +15 -2
- package/components/data/table/table-action/index.d.ts +1 -0
- package/components/data/table/table-column/index.d.ts +1 -0
- package/components/data/table/table-row/index.d.ts +1 -0
- package/components/data/table/table-row-action/index.d.ts +1 -0
- package/components/data/table/utils/buildSelectionColumns.d.ts +1 -1
- package/components/data/table/utils/buildSelectionColumns.js +95 -71
- package/components/data/table/utils/columnBuilder.d.ts +29 -2
- package/components/data/table/utils/columnBuilder.js +40 -26
- package/components/data/table/utils/columnWidthDistribution.d.ts +1 -1
- package/components/data/table/utils/columnWidthDistribution.js +14 -1
- package/components/data/table/utils/constants.d.ts +0 -4
- package/components/data/table/utils/constants.js +0 -7
- package/components/data/table/utils/dynamic-columns.d.ts +1 -1
- package/components/data/table/utils/dynamic-columns.js +3 -8
- package/components/data/table/utils/expansionColumn.d.ts +23 -0
- package/components/data/table/utils/expansionColumn.js +56 -0
- package/components/data/table/utils/index.d.ts +14 -2
- package/components/data/table/utils/index.js +45 -19
- package/components/dialogs/alert-dialog/index.d.ts +2 -0
- package/components/dialogs/confirm-dialog/index.d.ts +2 -0
- package/components/dialogs/dialog/index.d.ts +2 -0
- package/components/dialogs/dialog/index.js +3 -2
- package/components/dialogs/dialog-actions/index.d.ts +1 -0
- package/components/dialogs/dialog-body/index.d.ts +1 -0
- package/components/dialogs/dialog-content/index.d.ts +1 -0
- package/components/dialogs/dialog-header/index.d.ts +1 -0
- package/components/dialogs/dialog-header/index.js +11 -12
- package/components/dialogs/iframe-dialog/index.d.ts +2 -0
- package/components/dialogs/login-dialog/index.d.ts +4 -0
- package/components/dialogs/login-dialog/index.js +2 -1
- package/components/dialogs/login-dialog/props.d.ts +1 -0
- package/components/dialogs/page-dialog/index.d.ts +4 -0
- package/components/dialogs/page-dialog/index.js +2 -1
- package/components/dialogs/page-dialog/props.d.ts +1 -0
- package/components/form/button/index.d.ts +1 -0
- package/components/form/button/index.js +29 -33
- package/components/form/button-group/index.d.ts +1 -0
- package/components/input/calendar/index.d.ts +2 -0
- package/components/input/chips/index.d.ts +2 -0
- package/components/input/chips/index.js +9 -3
- package/components/input/chips/utils.d.ts +5 -0
- package/components/input/chips/utils.js +29 -0
- package/components/input/color-picker/index.d.ts +2 -0
- package/components/input/composite/index.d.ts +1 -0
- package/components/input/composite/index.js +1 -0
- package/components/input/currency/index.d.ts +2 -0
- package/components/input/default/checkbox/index.d.ts +6 -0
- package/components/input/default/checkbox/index.js +48 -18
- package/components/input/default/checkbox/props.d.ts +8 -0
- package/components/input/default/checkboxset/index.d.ts +2 -0
- package/components/input/default/radioset/index.d.ts +2 -0
- package/components/input/default/radioset/index.js +2 -1
- package/components/input/default/switch/index.d.ts +6 -0
- package/components/input/default/switch/index.js +36 -9
- package/components/input/default/switch/prop.d.ts +2 -0
- package/components/input/epoch/date/index.d.ts +1 -0
- package/components/input/epoch/datetime/index.d.ts +1 -0
- package/components/input/epoch/time/index.d.ts +1 -0
- package/components/input/fileupload/components/ListItems.d.ts +5 -1
- package/components/input/fileupload/components/ListItems.js +27 -5
- package/components/input/fileupload/components/MultiUpload.js +12 -1
- package/components/input/fileupload/components/SingleUpload.js +12 -1
- package/components/input/fileupload/index.d.ts +3 -0
- package/components/input/fileupload/index.js +11 -0
- package/components/input/fileupload/props.d.ts +10 -0
- package/components/input/number/index.d.ts +2 -0
- package/components/input/rating/index.d.ts +6 -0
- package/components/input/rating/index.js +10 -5
- package/components/input/rating/props.d.ts +8 -0
- package/components/input/select/index.d.ts +2 -0
- package/components/input/select/index.js +1 -2
- package/components/input/slider/index.d.ts +6 -0
- package/components/input/slider/index.js +19 -2
- package/components/input/slider/props.d.ts +2 -0
- package/components/input/text/index.d.ts +7 -1
- package/components/input/text/index.js +25 -6
- package/components/input/text/props.d.ts +8 -0
- package/components/input/textarea/index.d.ts +2 -0
- package/components/input/textarea/index.js +10 -5
- package/components/input/textarea/util.d.ts +1 -0
- package/components/input/textarea/util.js +17 -0
- package/components/input/upload/index.d.ts +2 -0
- package/components/navbar/index.d.ts +7 -0
- package/components/navbar/index.js +21 -7
- package/components/navbar/nav/index.d.ts +1 -0
- package/components/navbar/nav-item/index.d.ts +1 -0
- package/components/navigation/breadcrumb/index.d.ts +1 -0
- package/components/navigation/menu/index.d.ts +3 -1
- package/components/navigation/menu/index.js +22 -4
- package/components/navigation/menu/props.d.ts +1 -0
- package/components/navigation/popover/index.d.ts +1 -0
- package/components/navigation/popover/index.js +23 -9
- package/components/page/index.js +1 -1
- package/components/page/page-content/index.js +6 -2
- package/components/page/partial/index.d.ts +1 -0
- package/components/page/partial-container/index.js +2 -1
- package/components/prefab/index.js +3 -2
- package/components/prefab/props.d.ts +1 -0
- package/context/WidgetProvider.js +2 -1
- package/core/appstore.d.ts +10 -0
- package/core/appstore.js +9 -1
- package/core/constants/events.d.ts +3 -0
- package/core/constants/events.js +13 -1
- package/core/proxy-service.d.ts +1 -0
- package/core/proxy-service.js +54 -3
- package/core/util/index.d.ts +2 -0
- package/core/util/index.js +32 -1
- package/higherOrder/BasePage.js +106 -30
- package/higherOrder/props.d.ts +1 -0
- package/higherOrder/useActivePageReactivity.d.ts +21 -0
- package/higherOrder/useActivePageReactivity.js +57 -0
- package/higherOrder/withBaseWrapper.js +11 -7
- package/higherOrder/withRenderLogger.d.ts +15 -0
- package/higherOrder/withRenderLogger.js +53 -0
- package/hooks/useAuth.js +7 -1
- package/package-lock.json +273 -263
- package/package.json +4 -3
- package/runtime-dynamic/components/partial-content.js +3 -1
- package/runtime-dynamic/factories/dynamic-component.js +44 -8
- package/runtime-dynamic/factories/utils.js +7 -1
- package/runtime-dynamic/services/compile-render.js +2 -1
- package/runtime-dynamic/services/css-scoping.d.ts +2 -0
- package/runtime-dynamic/services/css-scoping.js +39 -20
- package/store/slices/i18nSlice.d.ts +2 -0
- package/store/slices/i18nSlice.js +3 -1
- package/types/index.d.ts +6 -0
- package/utils/attr.js +4 -1
- package/utils/custom-expression/parser.js +11 -8
- package/utils/svg-icon.d.ts +27 -0
- package/utils/svg-icon.js +75 -0
- package/utils/transformedDataset-utils.d.ts +3 -3
- package/utils/transformedDataset-utils.js +1 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { type CSSProperties } from "react";
|
|
2
2
|
import { WmTableColumnProps, WmTableRowActionProps, WmTableRowProps, WmTableActionProps, ValidationResult } from "../props";
|
|
3
3
|
declare const formWidgets: readonly ["WmText", "WmTextarea", "WmCheckbox", "WmSlider", "WmCurrency", "WmSwitch", "WmSelect", "WmCheckboxSet", "WmRadioSet", "WmDate", "WmTime", "WmTimestamp", "WmRating", "WmDatetime", "WmSearch", "WmChips", "WmColorPicker"];
|
|
4
4
|
type FormWidgetType = (typeof formWidgets)[number];
|
|
@@ -46,6 +46,8 @@ export declare const parseTableStructureWithGroups: (children: React.ReactNode)
|
|
|
46
46
|
export declare const flattenTableStructure: (structure: TableStructureItem[]) => WmTableColumnProps[];
|
|
47
47
|
export declare const parseTableRowActions: (children: React.ReactNode) => WmTableRowActionProps[];
|
|
48
48
|
export declare const parseTableActions: (children: React.ReactNode) => WmTableActionProps[];
|
|
49
|
+
/** Resolve row-bound expansion props. Uses precomputed map first, then tableRowProps(rowData) fallback. */
|
|
50
|
+
export declare const getRowExpansionConfig: (config: WmTableRowProps | null, rowId: string, rowData?: any) => WmTableRowProps | null;
|
|
49
51
|
export declare const parseTableRowExpansion: (children: React.ReactNode) => WmTableRowProps | null;
|
|
50
52
|
export declare const isEditAction: (actionKey: string) => boolean;
|
|
51
53
|
export declare const isDeleteAction: (actionKey: string) => boolean;
|
|
@@ -95,8 +97,18 @@ export declare const INTERNAL_PROPERTIES: string[];
|
|
|
95
97
|
*/
|
|
96
98
|
export declare const cleanRowData: (data: any) => any;
|
|
97
99
|
export declare const parseWidth: (width: string | number, fallbackSize?: number) => number;
|
|
100
|
+
/**
|
|
101
|
+
* Angular datatable.js hides show:false columns via jQuery `.hide()` / `.show()`
|
|
102
|
+
* (sets element.style.display = "none"), not by removing th/td from the DOM.
|
|
103
|
+
* setColGroupWidths also hides the matching `<col>` ($headerCol.hide()).
|
|
104
|
+
*/
|
|
105
|
+
export declare function isColumnDomHidden(meta?: Record<string, unknown>): boolean;
|
|
106
|
+
/** Angular setColGroupWidths: jQuery `.hide()` plus width 0 on col for table-layout:fixed. */
|
|
107
|
+
export declare function getDomHiddenColStyle(meta?: Record<string, unknown>): CSSProperties | undefined;
|
|
108
|
+
/** Inline style for hidden th/td — display:none and zero box so flex sizing cannot leak width. */
|
|
109
|
+
export declare function getDomHiddenCellStyle(meta?: Record<string, unknown>): CSSProperties | undefined;
|
|
98
110
|
export declare const getColClass: (colClass: string, rowData: any, columnName: string) => string;
|
|
99
|
-
export { TABLE_CSS_CLASSES, TABLE_DATA_STATES, TABLE_MESSAGES, INTERACTIVE_CLASSES, INTERACTIVE_ROLES, INTERACTIVE_DATA_ROLES, INTERACTIVE_TAG_NAMES,
|
|
111
|
+
export { TABLE_CSS_CLASSES, TABLE_DATA_STATES, TABLE_MESSAGES, INTERACTIVE_CLASSES, INTERACTIVE_ROLES, INTERACTIVE_DATA_ROLES, INTERACTIVE_TAG_NAMES, UNSUPPORTED_STATE_PERSISTENCE_TYPES, } from "./constants";
|
|
100
112
|
export { renderDisplayCell } from "./renderDisplayCell";
|
|
101
113
|
export { buildSelectionColumns } from "./buildSelectionColumns";
|
|
102
114
|
export { validateField, resetValidationState, updateValidationErrors } from "./validation";
|
|
@@ -311,26 +311,17 @@ const flattenTableStructure = (structure) => {
|
|
|
311
311
|
});
|
|
312
312
|
return columns;
|
|
313
313
|
};
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
const actionProps = assign({}, props);
|
|
321
|
-
if (child.key) {
|
|
322
|
-
actionProps.key = child.key;
|
|
323
|
-
}
|
|
324
|
-
actions.push(actionProps);
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
return actions;
|
|
314
|
+
const isTableChildOfType = (child, namePattern, componentToken) => {
|
|
315
|
+
var _a;
|
|
316
|
+
if (!((_a = child == null ? void 0 : child.props) == null ? void 0 : _a.name)) return false;
|
|
317
|
+
const propName = child.props.name;
|
|
318
|
+
const displayName = getChildComponentDisplayName(child);
|
|
319
|
+
return propName.includes(namePattern) || displayName.includes(componentToken);
|
|
328
320
|
};
|
|
329
|
-
const
|
|
321
|
+
const parseTableChildActions = (children, namePattern, componentToken) => {
|
|
330
322
|
const actions = [];
|
|
331
323
|
React.Children.forEach(children, (child) => {
|
|
332
|
-
|
|
333
|
-
if (child && child.props && child.props.name && (child.props.name.includes("wm_table_action") || ((_a = child.type) == null ? void 0 : _a.displayName) === "WmTableAction")) {
|
|
324
|
+
if (isTableChildOfType(child, namePattern, componentToken)) {
|
|
334
325
|
const props = get(child, "props", {});
|
|
335
326
|
const actionProps = assign({}, props);
|
|
336
327
|
if (child.key) {
|
|
@@ -341,6 +332,8 @@ const parseTableActions = (children) => {
|
|
|
341
332
|
});
|
|
342
333
|
return actions;
|
|
343
334
|
};
|
|
335
|
+
const parseTableRowActions = (children) => parseTableChildActions(children, "wm_table_row_action", "WmTableRowAction");
|
|
336
|
+
const parseTableActions = (children) => parseTableChildActions(children, "wm_table_action", "WmTableAction");
|
|
344
337
|
function isTableRowComponent(child) {
|
|
345
338
|
if (!(child == null ? void 0 : child.type)) return false;
|
|
346
339
|
const name = child.type.displayName || child.type.name || "";
|
|
@@ -353,6 +346,11 @@ function isTableRowComponent(child) {
|
|
|
353
346
|
}
|
|
354
347
|
return false;
|
|
355
348
|
}
|
|
349
|
+
const getRowExpansionConfig = (config, rowId, rowData) => {
|
|
350
|
+
if (!config) return null;
|
|
351
|
+
const overrides = typeof config.tableRowProps === "function" && rowData !== void 0 ? config.tableRowProps(rowData) : {};
|
|
352
|
+
return __spreadValues(__spreadValues({}, config), overrides);
|
|
353
|
+
};
|
|
356
354
|
const parseTableRowExpansion = (children) => {
|
|
357
355
|
let rowExpansionConfig = null;
|
|
358
356
|
React.Children.forEach(children, (child) => {
|
|
@@ -570,6 +568,32 @@ const parseWidth = (width, fallbackSize = 150) => {
|
|
|
570
568
|
}
|
|
571
569
|
return columnSize;
|
|
572
570
|
};
|
|
571
|
+
function isColumnDomHidden(meta) {
|
|
572
|
+
return !!(meta == null ? void 0 : meta.domHidden);
|
|
573
|
+
}
|
|
574
|
+
function getDomHiddenColStyle(meta) {
|
|
575
|
+
if (!isColumnDomHidden(meta)) {
|
|
576
|
+
return void 0;
|
|
577
|
+
}
|
|
578
|
+
return {
|
|
579
|
+
display: "none",
|
|
580
|
+
width: 0,
|
|
581
|
+
minWidth: 0,
|
|
582
|
+
maxWidth: 0
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
function getDomHiddenCellStyle(meta) {
|
|
586
|
+
if (!isColumnDomHidden(meta)) {
|
|
587
|
+
return void 0;
|
|
588
|
+
}
|
|
589
|
+
return {
|
|
590
|
+
display: "none",
|
|
591
|
+
width: 0,
|
|
592
|
+
minWidth: 0,
|
|
593
|
+
maxWidth: 0,
|
|
594
|
+
padding: 0
|
|
595
|
+
};
|
|
596
|
+
}
|
|
573
597
|
const getColClass = (colClass, rowData, columnName) => {
|
|
574
598
|
if (!colClass || typeof colClass !== "string") {
|
|
575
599
|
return "";
|
|
@@ -611,7 +635,6 @@ import {
|
|
|
611
635
|
INTERACTIVE_ROLES,
|
|
612
636
|
INTERACTIVE_DATA_ROLES,
|
|
613
637
|
INTERACTIVE_TAG_NAMES,
|
|
614
|
-
DYNAMIC_COLUMNS_CONFIG,
|
|
615
638
|
UNSUPPORTED_STATE_PERSISTENCE_TYPES
|
|
616
639
|
} from "./constants";
|
|
617
640
|
import { renderDisplayCell } from "./renderDisplayCell";
|
|
@@ -642,7 +665,6 @@ import {
|
|
|
642
665
|
convertFilterObjectToArray
|
|
643
666
|
} from "./table-helpers";
|
|
644
667
|
export {
|
|
645
|
-
DYNAMIC_COLUMNS_CONFIG,
|
|
646
668
|
INTERACTIVE_CLASSES,
|
|
647
669
|
INTERACTIVE_DATA_ROLES,
|
|
648
670
|
INTERACTIVE_ROLES,
|
|
@@ -673,6 +695,9 @@ export {
|
|
|
673
695
|
getButtonClasses,
|
|
674
696
|
getChildComponentDisplayName,
|
|
675
697
|
getColClass,
|
|
698
|
+
getDomHiddenCellStyle,
|
|
699
|
+
getDomHiddenColStyle,
|
|
700
|
+
getRowExpansionConfig,
|
|
676
701
|
getRowIdsFromDataset,
|
|
677
702
|
getSpacingClasses,
|
|
678
703
|
getTableActionButtonClass,
|
|
@@ -683,6 +708,7 @@ export {
|
|
|
683
708
|
hasInteractiveAttributes,
|
|
684
709
|
hasInteractiveClass,
|
|
685
710
|
isAddNewAction,
|
|
711
|
+
isColumnDomHidden,
|
|
686
712
|
isColumnVisibleForViewport,
|
|
687
713
|
isDataColumn,
|
|
688
714
|
isDeleteAction,
|
|
@@ -71,6 +71,7 @@ declare const WmAlertDialogStandalone: {
|
|
|
71
71
|
prefabName?: string;
|
|
72
72
|
loading?: boolean;
|
|
73
73
|
showSkeleton?: boolean;
|
|
74
|
+
widget?: string;
|
|
74
75
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
75
76
|
displayName: string;
|
|
76
77
|
};
|
|
@@ -156,6 +157,7 @@ declare const _default: {
|
|
|
156
157
|
prefabName?: string;
|
|
157
158
|
loading?: boolean;
|
|
158
159
|
showSkeleton?: boolean;
|
|
160
|
+
widget?: string;
|
|
159
161
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
160
162
|
displayName: string;
|
|
161
163
|
};
|
|
@@ -72,6 +72,7 @@ declare const WmConfirmDialogStandalone: {
|
|
|
72
72
|
prefabName?: string;
|
|
73
73
|
loading?: boolean;
|
|
74
74
|
showSkeleton?: boolean;
|
|
75
|
+
widget?: string;
|
|
75
76
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
76
77
|
displayName: string;
|
|
77
78
|
};
|
|
@@ -158,6 +159,7 @@ declare const _default: {
|
|
|
158
159
|
prefabName?: string;
|
|
159
160
|
loading?: boolean;
|
|
160
161
|
showSkeleton?: boolean;
|
|
162
|
+
widget?: string;
|
|
161
163
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
162
164
|
displayName: string;
|
|
163
165
|
};
|
|
@@ -76,6 +76,7 @@ declare const WmDialogStandalone: {
|
|
|
76
76
|
prefabName?: string;
|
|
77
77
|
loading?: boolean;
|
|
78
78
|
showSkeleton?: boolean;
|
|
79
|
+
widget?: string;
|
|
79
80
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
80
81
|
displayName: string;
|
|
81
82
|
};
|
|
@@ -168,6 +169,7 @@ declare const _default: {
|
|
|
168
169
|
prefabName?: string;
|
|
169
170
|
loading?: boolean;
|
|
170
171
|
showSkeleton?: boolean;
|
|
172
|
+
widget?: string;
|
|
171
173
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
172
174
|
displayName: string;
|
|
173
175
|
};
|
|
@@ -18,13 +18,14 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
-
import { memo } from "react";
|
|
21
|
+
import { memo, Suspense } from "react";
|
|
22
22
|
import clsx from "clsx";
|
|
23
23
|
import withBaseWrapper from "../../../higherOrder/withBaseWrapper";
|
|
24
24
|
import Dialog from "..";
|
|
25
25
|
import BaseDialog from "../withDialogWrapper";
|
|
26
26
|
import { WmDialogHeader } from "../dialog-header";
|
|
27
27
|
import { WmDialogContent } from "../dialog-content";
|
|
28
|
+
import { WmSpinner } from "../../basic/spinner";
|
|
28
29
|
const WmDialog = memo(
|
|
29
30
|
(props) => {
|
|
30
31
|
var _a;
|
|
@@ -65,7 +66,7 @@ const WmDialog = memo(
|
|
|
65
66
|
closable: props.closable
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
|
-
props.children
|
|
69
|
+
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(WmSpinner, { show: true, name: "dialog" }), children: props.children })
|
|
69
70
|
] }))
|
|
70
71
|
})
|
|
71
72
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconButton, Typography, Box } from "@mui/material";
|
|
3
3
|
import withBaseWrapper from "../../../higherOrder/withBaseWrapper";
|
|
4
|
+
import { WmAppIcon } from "../../common/WmAppIcon";
|
|
4
5
|
const DEFAULT_ICON_DIMENSIONS = "21px";
|
|
5
6
|
const DEFAULT_CLASS = "app-dialog-header modal-header";
|
|
6
7
|
const WmDialogHeader = (props) => {
|
|
@@ -40,19 +41,17 @@ const WmDialogHeader = (props) => {
|
|
|
40
41
|
sx: { display: "flex", alignItems: "center" },
|
|
41
42
|
className: "app-dialog-title modal-title",
|
|
42
43
|
children: [
|
|
43
|
-
isDialog ? iconurl && iconurl !== "" ? /* @__PURE__ */ jsx(
|
|
44
|
-
|
|
44
|
+
isDialog ? iconclass && iconclass.trim() !== "" || iconurl && iconurl !== "" ? /* @__PURE__ */ jsx(
|
|
45
|
+
WmAppIcon,
|
|
45
46
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
className: iconclass,
|
|
55
|
-
style: { width: iconwidth, height: iconheight, margin: iconmargin }
|
|
47
|
+
iconclass,
|
|
48
|
+
iconurl,
|
|
49
|
+
prefabName: props.prefabName,
|
|
50
|
+
iconStyle: {
|
|
51
|
+
width: iconwidth,
|
|
52
|
+
height: iconheight,
|
|
53
|
+
margin: iconmargin
|
|
54
|
+
}
|
|
56
55
|
}
|
|
57
56
|
) : null : /* @__PURE__ */ jsx(Fragment, {}),
|
|
58
57
|
/* @__PURE__ */ jsx(Box, { component: "span", className: "dialog-heading", id: props.titleid, children: heading }),
|
|
@@ -81,6 +81,7 @@ declare const WmIframeDialogStandalone: {
|
|
|
81
81
|
prefabName?: string;
|
|
82
82
|
loading?: boolean;
|
|
83
83
|
showSkeleton?: boolean;
|
|
84
|
+
widget?: string;
|
|
84
85
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
85
86
|
displayName: string;
|
|
86
87
|
};
|
|
@@ -176,6 +177,7 @@ declare const _default: {
|
|
|
176
177
|
prefabName?: string;
|
|
177
178
|
loading?: boolean;
|
|
178
179
|
showSkeleton?: boolean;
|
|
180
|
+
widget?: string;
|
|
179
181
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
180
182
|
displayName: string;
|
|
181
183
|
};
|
|
@@ -17,6 +17,7 @@ declare const WmLoginDialogStandalone: {
|
|
|
17
17
|
sheet?: boolean;
|
|
18
18
|
invokeEventCallback?: (eventName: string, data?: any) => void;
|
|
19
19
|
appLocale?: any;
|
|
20
|
+
iconurl?: string;
|
|
20
21
|
isopen?: boolean;
|
|
21
22
|
close?: (event?: React.SyntheticEvent) => void;
|
|
22
23
|
openDialog?: (event?: React.SyntheticEvent) => void;
|
|
@@ -78,6 +79,7 @@ declare const WmLoginDialogStandalone: {
|
|
|
78
79
|
prefabName?: string;
|
|
79
80
|
loading?: boolean;
|
|
80
81
|
showSkeleton?: boolean;
|
|
82
|
+
widget?: string;
|
|
81
83
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
82
84
|
displayName: string;
|
|
83
85
|
};
|
|
@@ -100,6 +102,7 @@ declare const _default: {
|
|
|
100
102
|
sheet?: boolean;
|
|
101
103
|
invokeEventCallback?: (eventName: string, data?: any) => void;
|
|
102
104
|
appLocale?: any;
|
|
105
|
+
iconurl?: string;
|
|
103
106
|
isopen?: boolean;
|
|
104
107
|
close?: (event?: React.SyntheticEvent) => void;
|
|
105
108
|
openDialog?: (event?: React.SyntheticEvent) => void;
|
|
@@ -161,6 +164,7 @@ declare const _default: {
|
|
|
161
164
|
prefabName?: string;
|
|
162
165
|
loading?: boolean;
|
|
163
166
|
showSkeleton?: boolean;
|
|
167
|
+
widget?: string;
|
|
164
168
|
} & import("../withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
165
169
|
displayName: string;
|
|
166
170
|
};
|
|
@@ -267,7 +267,8 @@ const WmLoginDialog = (props) => {
|
|
|
267
267
|
heading: title,
|
|
268
268
|
iconclass,
|
|
269
269
|
onClose: close != null ? close : (() => {
|
|
270
|
-
})
|
|
270
|
+
}),
|
|
271
|
+
iconurl: props.iconurl
|
|
271
272
|
}
|
|
272
273
|
),
|
|
273
274
|
/* @__PURE__ */ jsx(WmDialogBody, { name: `${name}_body`, listener, children: /* @__PURE__ */ jsxs(
|
|
@@ -13,6 +13,7 @@ declare const WmPageDialogStandalone: {
|
|
|
13
13
|
onClose?: (event?: React.SyntheticEvent | {}) => void;
|
|
14
14
|
onOkClick?: (event?: React.SyntheticEvent) => void;
|
|
15
15
|
onOk?: (event?: React.SyntheticEvent) => void;
|
|
16
|
+
iconurl?: string;
|
|
16
17
|
isopen?: boolean;
|
|
17
18
|
close?: (event?: React.SyntheticEvent) => void;
|
|
18
19
|
openDialog?: (event?: React.SyntheticEvent) => void;
|
|
@@ -73,6 +74,7 @@ declare const WmPageDialogStandalone: {
|
|
|
73
74
|
dataset?: any;
|
|
74
75
|
loading?: boolean;
|
|
75
76
|
showSkeleton?: boolean;
|
|
77
|
+
widget?: string;
|
|
76
78
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
77
79
|
displayName: string;
|
|
78
80
|
};
|
|
@@ -100,6 +102,7 @@ declare const _default: {
|
|
|
100
102
|
onClose?: (event?: React.SyntheticEvent | {}) => void;
|
|
101
103
|
onOkClick?: (event?: React.SyntheticEvent) => void;
|
|
102
104
|
onOk?: (event?: React.SyntheticEvent) => void;
|
|
105
|
+
iconurl?: string;
|
|
103
106
|
isopen?: boolean;
|
|
104
107
|
close?: (event?: React.SyntheticEvent) => void;
|
|
105
108
|
openDialog?: (event?: React.SyntheticEvent) => void;
|
|
@@ -160,6 +163,7 @@ declare const _default: {
|
|
|
160
163
|
dataset?: any;
|
|
161
164
|
loading?: boolean;
|
|
162
165
|
showSkeleton?: boolean;
|
|
166
|
+
widget?: string;
|
|
163
167
|
} & import("@wavemaker-ai/react-runtime/components/dialogs/withDialogWrapper").BaseDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
164
168
|
displayName: string;
|
|
165
169
|
};
|
|
@@ -76,7 +76,8 @@ const WmPageDialog = (props) => {
|
|
|
76
76
|
onClose: handleClose,
|
|
77
77
|
closable: props.closable,
|
|
78
78
|
name: "",
|
|
79
|
-
listener: {}
|
|
79
|
+
listener: {},
|
|
80
|
+
iconurl: props.iconurl
|
|
80
81
|
}
|
|
81
82
|
),
|
|
82
83
|
/* @__PURE__ */ jsx(WmDialogBody, { name: "", listener: {}, children: props.content && /* @__PURE__ */ jsx(
|
|
@@ -29,10 +29,9 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import {
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
33
|
import { memo, useEffect, useRef } from "react";
|
|
34
34
|
import clsx from "clsx";
|
|
35
|
-
import Image from "next/image";
|
|
36
35
|
import Box from "@mui/material/Box";
|
|
37
36
|
import Button from "@mui/material/Button";
|
|
38
37
|
import Badge from "@mui/material/Badge";
|
|
@@ -40,9 +39,9 @@ import { withBaseWrapper } from "../../../higherOrder/withBaseWrapper";
|
|
|
40
39
|
import {
|
|
41
40
|
WmSkeleton,
|
|
42
41
|
SKELETON_REGISTRY,
|
|
43
|
-
|
|
42
|
+
useShouldShowSkeleton
|
|
44
43
|
} from "../../common/wm-skeleton";
|
|
45
|
-
import {
|
|
44
|
+
import { WmAppIcon } from "../../common/WmAppIcon";
|
|
46
45
|
import { removeInvalidAttributes } from "../../../utils/attr";
|
|
47
46
|
const DEFAULT_CLASS = "btn app-button";
|
|
48
47
|
const WmButton = memo(
|
|
@@ -107,6 +106,7 @@ const WmButton = memo(
|
|
|
107
106
|
]);
|
|
108
107
|
const safeCaption = (caption == null ? void 0 : caption.toString().replace(/undefined|null/g, "")) || "";
|
|
109
108
|
const btnRef = useRef(null);
|
|
109
|
+
const showSkeleton = useShouldShowSkeleton(props.loading, props.showSkeleton);
|
|
110
110
|
useEffect(() => {
|
|
111
111
|
if (!shortcutkey) return;
|
|
112
112
|
const handleGlobalKeyDown = (e) => {
|
|
@@ -179,7 +179,7 @@ const WmButton = memo(
|
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
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 (
|
|
182
|
+
if (showSkeleton)
|
|
183
183
|
return /* @__PURE__ */ jsx(WmSkeleton, __spreadProps(__spreadValues({}, SKELETON_REGISTRY["WmButton"]), { className, styles }));
|
|
184
184
|
return /* @__PURE__ */ jsxs(
|
|
185
185
|
Button,
|
|
@@ -207,41 +207,37 @@ const WmButton = memo(
|
|
|
207
207
|
show: show == null ? void 0 : show.toString()
|
|
208
208
|
}), removeInvalidAttributes(restProps)), EVENTS), {
|
|
209
209
|
children: [
|
|
210
|
+
iconclass && /* @__PURE__ */ jsx(
|
|
211
|
+
WmAppIcon,
|
|
212
|
+
{
|
|
213
|
+
iconclass,
|
|
214
|
+
prefabName: props.prefabName,
|
|
215
|
+
iconStyle: {
|
|
216
|
+
width: iconwidth || "auto",
|
|
217
|
+
height: iconheight || "auto",
|
|
218
|
+
margin: iconmargin || "0 4",
|
|
219
|
+
fontSize: iconwidth
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
),
|
|
210
223
|
iconurl && /* @__PURE__ */ jsx(
|
|
211
|
-
|
|
224
|
+
WmAppIcon,
|
|
212
225
|
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
width: parseInt(iconwidth || "24", 10),
|
|
218
|
-
height: parseInt(iconheight || "24", 10),
|
|
219
|
-
style: {
|
|
226
|
+
iconurl,
|
|
227
|
+
prefabName: props.prefabName,
|
|
228
|
+
defaultClasses: "button-image-icon",
|
|
229
|
+
iconStyle: {
|
|
220
230
|
width: iconwidth,
|
|
221
231
|
height: iconheight || "auto",
|
|
222
|
-
margin: iconmargin || "0 4"
|
|
232
|
+
margin: iconmargin || "0 4",
|
|
233
|
+
fontSize: iconwidth
|
|
223
234
|
}
|
|
224
235
|
}
|
|
225
236
|
),
|
|
226
|
-
iconclass && /* @__PURE__ */ jsxs(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
className: clsx("app-icon", iconclass),
|
|
231
|
-
"aria-hidden": "true",
|
|
232
|
-
style: {
|
|
233
|
-
width: iconwidth || "auto",
|
|
234
|
-
height: iconheight || "auto",
|
|
235
|
-
margin: iconmargin || "0 4",
|
|
236
|
-
fontSize: iconheight || "24"
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
),
|
|
240
|
-
/* @__PURE__ */ jsxs(Box, { component: "span", className: "sr-only", children: [
|
|
241
|
-
safeCaption,
|
|
242
|
-
" ",
|
|
243
|
-
(_b = listener == null ? void 0 : listener.appLocale) == null ? void 0 : _b.LABEL_ICON
|
|
244
|
-
] })
|
|
237
|
+
(iconclass || iconurl) && /* @__PURE__ */ jsxs(Box, { component: "span", className: "sr-only", children: [
|
|
238
|
+
safeCaption,
|
|
239
|
+
" ",
|
|
240
|
+
(_b = listener == null ? void 0 : listener.appLocale) == null ? void 0 : _b.LABEL_ICON
|
|
245
241
|
] }),
|
|
246
242
|
/* @__PURE__ */ jsx(
|
|
247
243
|
Box,
|
|
@@ -68,6 +68,7 @@ export declare const WmCalendar: React.ForwardRefExoticComponent<Omit<{
|
|
|
68
68
|
prefabName?: string;
|
|
69
69
|
loading?: boolean;
|
|
70
70
|
showSkeleton?: boolean;
|
|
71
|
+
widget?: string;
|
|
71
72
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
72
73
|
/**
|
|
73
74
|
* The WmCalendar component provides an interactive calendar with event support, day/week/month views.
|
|
@@ -130,5 +131,6 @@ declare const _default: React.ComponentType<{
|
|
|
130
131
|
prefabName?: string;
|
|
131
132
|
loading?: boolean;
|
|
132
133
|
showSkeleton?: boolean;
|
|
134
|
+
widget?: string;
|
|
133
135
|
}>;
|
|
134
136
|
export default _default;
|
|
@@ -101,6 +101,7 @@ declare const WmChipsStandalone: React.ComponentType<import("../../data/form/for
|
|
|
101
101
|
prefabName?: string;
|
|
102
102
|
loading?: boolean;
|
|
103
103
|
showSkeleton?: boolean;
|
|
104
|
+
widget?: string;
|
|
104
105
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
105
106
|
export { WmChipsStandalone as WmChips };
|
|
106
107
|
/**
|
|
@@ -224,5 +225,6 @@ declare const _default: React.ComponentType<{
|
|
|
224
225
|
prefabName?: string;
|
|
225
226
|
loading?: boolean;
|
|
226
227
|
showSkeleton?: boolean;
|
|
228
|
+
widget?: string;
|
|
227
229
|
}>;
|
|
228
230
|
export default _default;
|
|
@@ -28,7 +28,13 @@ import { debounce, isEqual, trim, find, slice } from "lodash";
|
|
|
28
28
|
import { WmSearch } from "../../basic/search";
|
|
29
29
|
import { withBaseWrapper } from "../../../higherOrder/withBaseWrapper";
|
|
30
30
|
import SortableChip from "./SortableChip";
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
generateStableKey,
|
|
33
|
+
processDataset,
|
|
34
|
+
performAddItem,
|
|
35
|
+
performRemoveItem,
|
|
36
|
+
resolveItemToAdd
|
|
37
|
+
} from "./utils";
|
|
32
38
|
import withFormController from "../../data/form/form-controller/withFormController";
|
|
33
39
|
import { DEFAULT_CHIPS_DATASET } from "../../constants";
|
|
34
40
|
import withStandalone from "../../../higherOrder/withStandalone";
|
|
@@ -346,12 +352,12 @@ const WmChips = React.memo(
|
|
|
346
352
|
const handleSearchSelect = useCallback(
|
|
347
353
|
(event, widget, selectedValue) => {
|
|
348
354
|
if (selectedValue) {
|
|
349
|
-
addItem(selectedValue
|
|
355
|
+
addItem(resolveItemToAdd(selectedValue, datasetItems, datafield));
|
|
350
356
|
setSearchQuery("");
|
|
351
357
|
backspaceArmedRef.current = false;
|
|
352
358
|
}
|
|
353
359
|
},
|
|
354
|
-
[addItem]
|
|
360
|
+
[addItem, datasetItems, datafield]
|
|
355
361
|
);
|
|
356
362
|
const handleSearchSubmit = useCallback(
|
|
357
363
|
(event, widget) => {
|
|
@@ -16,6 +16,11 @@ export declare function updateChipsListAndTriggerEvents(newChipsList: ChipItem[]
|
|
|
16
16
|
export declare function validateBeforeOperation(listener: any, name: string, beforeHandler: any, event: any, item: any): boolean;
|
|
17
17
|
export declare function createChipItem(itemToAdd: DataSetItem | string, generateUniqueKey: () => string, datafield: string, displayfield: string, createCustomDataModel: (val: string) => any): DataSetItem;
|
|
18
18
|
export declare function createChipItemWithStructure(itemToAdd: DataSetItem): ChipItem;
|
|
19
|
+
/**
|
|
20
|
+
* Resolves a search selection to a DataSetItem with the correct `value` for the datafield.
|
|
21
|
+
* may pass either that item or the raw `dataObject` via `getSelectedItem`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveItemToAdd(selectedValue: DataSetItem | string | Record<string, unknown>, datasetItems: DataSetItem[], datafield: string): DataSetItem | string;
|
|
19
24
|
export declare function validateAddItem(newItem: DataSetItem | string, chipsList: ChipItem[], maxsize: number, datafield: string): boolean;
|
|
20
25
|
export declare function validateSearchInput(query: string, allowonlyselect: boolean, maxsize: number, chipsList: ChipItem[]): boolean;
|
|
21
26
|
export declare function performAddItem(newItem: DataSetItem | string, chipsList: ChipItem[], modelByValue: any[], setChipsList: (chips: ChipItem[]) => void, setModelByValue: (model: any[]) => void, setSearchQuery: (query: string) => void, updateMaxSizeFn: (length: number) => void, listener: any, name: string, datafield: string, displayfield: string, createCustomDataModel: (val: string) => any, generateUniqueKey: () => string, maxsize: number, onBeforeadd?: any, onChange?: any, onAdd?: any, props?: any): boolean;
|