@wavemaker-ai/react-runtime 1.0.0-rc.319 → 1.0.0-rc.324
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 +16 -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/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/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/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-field/index.js +5 -4
- 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 +5 -1
- 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/useListEventHandlers.js +3 -2
- package/components/data/list/index.d.ts +5 -1
- package/components/data/list/index.js +17 -4
- package/components/data/list/props.d.ts +14 -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 +1 -1
- package/components/data/table/components/TableDataRow.js +16 -3
- package/components/data/table/components/TableHeader.js +1 -1
- package/components/data/table/components/TablePanelHeading.js +14 -2
- package/components/data/table/hooks/useResponsiveColumns.d.ts +1 -0
- package/components/data/table/hooks/useTableColumns.js +2 -2
- package/components/data/table/hooks/useTableData.js +30 -1
- package/components/data/table/index.d.ts +4 -0
- package/components/data/table/index.js +47 -30
- package/components/data/table/live-table/index.d.ts +1 -0
- package/components/data/table/props.d.ts +11 -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 +97 -71
- package/components/data/table/utils/columnBuilder.d.ts +13 -0
- package/components/data/table/utils/columnBuilder.js +27 -18
- package/components/data/table/utils/columnWidthDistribution.d.ts +1 -1
- package/components/data/table/utils/columnWidthDistribution.js +4 -1
- package/components/data/table/utils/constants.d.ts +1 -1
- package/components/data/table/utils/constants.js +1 -1
- 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-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/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/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 +9 -4
- 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 +8 -2
- package/components/page/partial/index.d.ts +1 -0
- 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.js +1 -1
- package/core/util/index.d.ts +2 -0
- package/core/util/index.js +29 -0
- package/higherOrder/BasePage.js +81 -26
- package/higherOrder/props.d.ts +1 -0
- package/higherOrder/useActivePageReactivity.d.ts +21 -0
- package/higherOrder/useActivePageReactivity.js +57 -0
- package/higherOrder/withBaseWrapper.js +2 -0
- package/higherOrder/withRenderLogger.d.ts +15 -0
- package/higherOrder/withRenderLogger.js +53 -0
- package/hooks/useAuth.js +7 -1
- package/package-lock.json +219 -198
- package/package.json +4 -3
- package/runtime-dynamic/factories/dynamic-component.js +18 -5
- package/runtime-dynamic/factories/utils.js +7 -1
- package/runtime-dynamic/services/compile-render.js +2 -1
- 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/svg-icon.d.ts +27 -0
- package/utils/svg-icon.js +75 -0
|
@@ -17,10 +17,30 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { jsx } from "react/jsx-runtime";
|
|
20
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
21
21
|
import { Box } from "@mui/material";
|
|
22
22
|
import { get } from "lodash-es";
|
|
23
23
|
import { parseWidth } from ".";
|
|
24
|
+
function RowIndexCell({ row, table }) {
|
|
25
|
+
const { pageIndex, pageSize } = table.getState().pagination;
|
|
26
|
+
const isManualPagination = table.options.manualPagination;
|
|
27
|
+
let rowPositionOnPage;
|
|
28
|
+
if (isManualPagination) {
|
|
29
|
+
rowPositionOnPage = row.index;
|
|
30
|
+
} else {
|
|
31
|
+
const currentPageRows = table.getPaginationRowModel().rows;
|
|
32
|
+
rowPositionOnPage = currentPageRows.findIndex((pageRow) => pageRow.id === row.id);
|
|
33
|
+
}
|
|
34
|
+
const rowNumber = pageIndex * pageSize + rowPositionOnPage + 1;
|
|
35
|
+
return /* @__PURE__ */ jsx(Box, { "data-col-identifier": "rowIndex", children: rowNumber });
|
|
36
|
+
}
|
|
37
|
+
RowIndexCell.displayName = "RowIndexCell";
|
|
38
|
+
function DataCell(ctx) {
|
|
39
|
+
var _a;
|
|
40
|
+
const { wmColumn, renderCell } = (_a = ctx.column.columnDef.meta) == null ? void 0 : _a._cell;
|
|
41
|
+
return /* @__PURE__ */ jsx(Fragment, { children: renderCell(wmColumn, ctx.row) });
|
|
42
|
+
}
|
|
43
|
+
DataCell.displayName = "DataCell";
|
|
24
44
|
const createRowIndexColumn = () => ({
|
|
25
45
|
id: "rowIndex",
|
|
26
46
|
header: "S. No.",
|
|
@@ -28,21 +48,7 @@ const createRowIndexColumn = () => ({
|
|
|
28
48
|
minSize: 70,
|
|
29
49
|
maxSize: 70,
|
|
30
50
|
enableResizing: false,
|
|
31
|
-
cell:
|
|
32
|
-
const pageIndex = table.getState().pagination.pageIndex;
|
|
33
|
-
const pageSize = table.getState().pagination.pageSize;
|
|
34
|
-
const isManualPagination = table.options.manualPagination;
|
|
35
|
-
let rowPositionOnPage;
|
|
36
|
-
if (isManualPagination) {
|
|
37
|
-
rowPositionOnPage = row.index;
|
|
38
|
-
} else {
|
|
39
|
-
const paginationModel = table.getPaginationRowModel();
|
|
40
|
-
const currentPageRows = paginationModel.rows;
|
|
41
|
-
rowPositionOnPage = currentPageRows.findIndex((pageRow) => pageRow.id === row.id);
|
|
42
|
-
}
|
|
43
|
-
const rowNumber = pageIndex * pageSize + rowPositionOnPage + 1;
|
|
44
|
-
return /* @__PURE__ */ jsx(Box, { "data-col-identifier": "rowIndex", children: rowNumber });
|
|
45
|
-
},
|
|
51
|
+
cell: RowIndexCell,
|
|
46
52
|
enableSorting: false
|
|
47
53
|
});
|
|
48
54
|
const createDataColumn = (wmColumn, renderCell, index = 0) => {
|
|
@@ -69,7 +75,7 @@ const createDataColumn = (wmColumn, renderCell, index = 0) => {
|
|
|
69
75
|
// Only set maxSize for auto-sized columns
|
|
70
76
|
enableResizing: true,
|
|
71
77
|
// Enable resizing for all data columns
|
|
72
|
-
cell:
|
|
78
|
+
cell: DataCell,
|
|
73
79
|
enableSorting: wmColumn.sortable,
|
|
74
80
|
// Pass column styles and properties through meta for TableCell styling and filtering
|
|
75
81
|
meta: __spreadProps(__spreadValues({
|
|
@@ -86,7 +92,10 @@ const createDataColumn = (wmColumn, renderCell, index = 0) => {
|
|
|
86
92
|
type: wmColumn.type || wmColumn.columntype || "string",
|
|
87
93
|
searchable: wmColumn.searchable !== false,
|
|
88
94
|
// Custom cell renderer for optimized rendering in MemoizedRowCells
|
|
89
|
-
renderCellContent: wmColumn == null ? void 0 : wmColumn.renderCellContent
|
|
95
|
+
renderCellContent: wmColumn == null ? void 0 : wmColumn.renderCellContent,
|
|
96
|
+
// DataCell reads renderCell + wmColumn from here at render time.
|
|
97
|
+
// Namespaced under _cell so RowCells can exclude it from the style spread.
|
|
98
|
+
_cell: { wmColumn, renderCell }
|
|
90
99
|
})
|
|
91
100
|
});
|
|
92
101
|
};
|
|
@@ -16,7 +16,7 @@ export declare const hasExplicitWidth: (column: ColumnDef<any>) => boolean;
|
|
|
16
16
|
* 3. Data columns with explicit widths (via column.width or column.styles.width) maintain their specified size
|
|
17
17
|
*
|
|
18
18
|
* @param columns - Array of column definitions
|
|
19
|
-
* @param tableWidth - Total available table width (
|
|
19
|
+
* @param tableWidth - Total available table width in pixels (must be > 0 to distribute)
|
|
20
20
|
* @returns Modified column definitions with auto-sized data columns
|
|
21
21
|
*/
|
|
22
22
|
export declare const distributeColumnWidths: (columns: ColumnDef<any>[], tableWidth?: number) => ColumnDef<any>[];
|
|
@@ -24,7 +24,10 @@ const isDataColumn = (column) => {
|
|
|
24
24
|
const hasExplicitWidth = (column) => {
|
|
25
25
|
return typeof column.size === "number" && column.size > 0;
|
|
26
26
|
};
|
|
27
|
-
const distributeColumnWidths = (columns, tableWidth
|
|
27
|
+
const distributeColumnWidths = (columns, tableWidth) => {
|
|
28
|
+
if (!tableWidth || tableWidth <= 0) {
|
|
29
|
+
return columns;
|
|
30
|
+
}
|
|
28
31
|
let usedWidth = 0;
|
|
29
32
|
let dataColumnsNeedingWidth = 0;
|
|
30
33
|
columns.forEach((column) => {
|
|
@@ -46,7 +46,7 @@ export declare const INTERACTIVE_ROLES: readonly ["button", "textbox", "combobox
|
|
|
46
46
|
export declare const INTERACTIVE_DATA_ROLES: readonly ["input", "select", "date", "time", "color", "editor", "checkbox", "radio", "slider", "chips", "rating"];
|
|
47
47
|
export declare const INTERACTIVE_TAG_NAMES: readonly ["INPUT", "BUTTON", "SELECT", "TEXTAREA", "A", "LABEL"];
|
|
48
48
|
export declare const DYNAMIC_COLUMNS_CONFIG: {
|
|
49
|
-
readonly maxColumns:
|
|
49
|
+
readonly maxColumns: 20;
|
|
50
50
|
readonly sampleSize: 3;
|
|
51
51
|
};
|
|
52
52
|
export declare const UNSUPPORTED_STATE_PERSISTENCE_TYPES: readonly string[];
|
|
@@ -113,7 +113,7 @@ const INTERACTIVE_TAG_NAMES = [
|
|
|
113
113
|
"LABEL"
|
|
114
114
|
];
|
|
115
115
|
const DYNAMIC_COLUMNS_CONFIG = {
|
|
116
|
-
maxColumns:
|
|
116
|
+
maxColumns: 20,
|
|
117
117
|
// Maximum number of columns to generate from data (matching Angular behavior)
|
|
118
118
|
sampleSize: 3
|
|
119
119
|
// Number of rows to sample for column detection
|
|
@@ -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
|
};
|
|
@@ -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;
|
|
@@ -185,6 +185,34 @@ function createChipItemWithStructure(itemToAdd) {
|
|
|
185
185
|
iscustom: itemToAdd.iscustom || false
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
+
function resolveItemToAdd(selectedValue, datasetItems, datafield) {
|
|
189
|
+
var _a, _b, _c, _d, _e, _f;
|
|
190
|
+
if (typeof selectedValue === "string") {
|
|
191
|
+
return selectedValue;
|
|
192
|
+
}
|
|
193
|
+
const asDataSetItem = selectedValue;
|
|
194
|
+
const dataObj = (_a = asDataSetItem.dataObject) != null ? _a : selectedValue;
|
|
195
|
+
const found = datasetItems.find((item) => isEqual(item.dataObject, dataObj));
|
|
196
|
+
if (found) {
|
|
197
|
+
return found;
|
|
198
|
+
}
|
|
199
|
+
if (datafield !== "All Fields" && isObject(dataObj)) {
|
|
200
|
+
const rec = dataObj;
|
|
201
|
+
if (Object.prototype.hasOwnProperty.call(rec, datafield)) {
|
|
202
|
+
const raw = (_c = (_b = asDataSetItem.displayValue) != null ? _b : asDataSetItem.label) != null ? _c : rec[datafield];
|
|
203
|
+
const displayText = raw != null ? String(raw) : "";
|
|
204
|
+
return {
|
|
205
|
+
key: (_d = asDataSetItem.key) != null ? _d : String(rec[datafield]),
|
|
206
|
+
value: rec[datafield],
|
|
207
|
+
label: String((_e = asDataSetItem.label) != null ? _e : displayText),
|
|
208
|
+
displayValue: displayText,
|
|
209
|
+
displayImage: (_f = asDataSetItem.displayImage) != null ? _f : null,
|
|
210
|
+
dataObject: dataObj
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return asDataSetItem;
|
|
215
|
+
}
|
|
188
216
|
function validateAddItem(newItem, chipsList, maxsize, datafield) {
|
|
189
217
|
var _a, _b;
|
|
190
218
|
if (maxsize && chipsList.length >= maxsize) {
|
|
@@ -293,6 +321,7 @@ export {
|
|
|
293
321
|
performAddItem,
|
|
294
322
|
performRemoveItem,
|
|
295
323
|
processDataset,
|
|
324
|
+
resolveItemToAdd,
|
|
296
325
|
updateChipsListAndTriggerEvents,
|
|
297
326
|
updateMaxSize,
|
|
298
327
|
validateAddItem,
|
|
@@ -64,6 +64,7 @@ declare const WmColorPickerStandalone: React.ComponentType<import("../../data/fo
|
|
|
64
64
|
prefabName?: string;
|
|
65
65
|
loading?: boolean;
|
|
66
66
|
showSkeleton?: boolean;
|
|
67
|
+
widget?: string;
|
|
67
68
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
68
69
|
export { WmColorPickerStandalone as WmColorPicker };
|
|
69
70
|
/**
|
|
@@ -151,5 +152,6 @@ declare const _default: React.ComponentType<{
|
|
|
151
152
|
prefabName?: string;
|
|
152
153
|
loading?: boolean;
|
|
153
154
|
showSkeleton?: boolean;
|
|
155
|
+
widget?: string;
|
|
154
156
|
}>;
|
|
155
157
|
export default _default;
|
|
@@ -76,6 +76,7 @@ declare const WmCurrencyStandalone: React.ComponentType<import("../../data/form/
|
|
|
76
76
|
prefabName?: string;
|
|
77
77
|
loading?: boolean;
|
|
78
78
|
showSkeleton?: boolean;
|
|
79
|
+
widget?: string;
|
|
79
80
|
} & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
|
|
80
81
|
export { WmCurrencyStandalone as WmCurrency };
|
|
81
82
|
/**
|
|
@@ -175,5 +176,6 @@ declare const _default: React.ComponentType<{
|
|
|
175
176
|
prefabName?: string;
|
|
176
177
|
loading?: boolean;
|
|
177
178
|
showSkeleton?: boolean;
|
|
179
|
+
widget?: string;
|
|
178
180
|
}>;
|
|
179
181
|
export default _default;
|