@wavemaker-ai/react-runtime 1.0.0-rc.647684 → 12.0.0-rc.335
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/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 +3 -5
- 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/iframe/index.d.ts +1 -0
- package/components/basic/label/index.d.ts +1 -0
- package/components/basic/picture/index.d.ts +1 -0
- 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 +3 -0
- package/components/basic/search/index.js +5 -4
- package/components/basic/search/utils.d.ts +1 -0
- package/components/basic/search/utils.js +9 -0
- package/components/basic/spinner/index.d.ts +1 -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 +1 -0
- package/components/common/index.d.ts +2 -0
- package/components/common/index.js +2 -0
- package/components/common/partial-content-wrapper.d.ts +15 -0
- package/components/common/partial-content-wrapper.js +11 -0
- package/components/container/accordion/accordion-pane/index.d.ts +1 -0
- package/components/container/accordion/index.d.ts +1 -0
- package/components/container/index.d.ts +4 -0
- package/components/container/index.js +38 -11
- 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/layout-grid/index.js +1 -1
- 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/index.d.ts +1 -0
- package/components/container/props.d.ts +1 -0
- package/components/container/repeat-template/index.d.ts +1 -0
- package/components/container/repeat-template/index.js +1 -1
- package/components/container/tabs/index.d.ts +1 -0
- package/components/container/tabs/index.js +12 -8
- package/components/container/tabs/tab-pane/index.d.ts +1 -0
- package/components/container/tabs/tab-pane/index.js +2 -2
- package/components/container/wizard/index.d.ts +2 -0
- package/components/container/wizard/index.js +92 -43
- package/components/container/wizard/props.d.ts +2 -2
- package/components/container/wizard/wizard-step/index.d.ts +1 -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/form/base-form/hooks/useFormOperations.d.ts +1 -1
- package/components/data/form/base-form/hooks/useFormOperations.js +5 -2
- package/components/data/form/base-form/index.js +10 -14
- package/components/data/form/base-form/props.d.ts +1 -0
- package/components/data/form/dynamic-fields/WmxDynamicFormField.js +9 -23
- package/components/data/form/form-action/index.d.ts +2 -0
- package/components/data/form/form-controller/props.d.ts +2 -0
- package/components/data/form/form-controller/utils.js +3 -2
- package/components/data/form/form-controller/validation-contrustor.js +112 -1
- package/components/data/form/form-controller/withFormController.js +16 -3
- package/components/data/form/form-field/index.js +38 -11
- package/components/data/form/form-field/props.d.ts +8 -2
- package/components/data/list/components/ListItemWithTemplate.js +1 -1
- package/components/data/list/index.d.ts +2 -0
- package/components/data/list/index.js +5 -10
- package/components/data/pagination/hooks/usePagination.js +6 -6
- package/components/data/table/components/EditableCell.js +47 -24
- package/components/data/table/components/FieldValidationError.js +1 -1
- package/components/data/table/components/RowExpansionButton.js +5 -1
- package/components/data/table/components/TableBody.js +2 -0
- package/components/data/table/components/TableHeader.js +12 -4
- package/components/data/table/hooks/useFormWidget.js +13 -2
- package/components/data/table/hooks/usePanelStructure.js +6 -1
- package/components/data/table/hooks/useResponsiveColumns.d.ts +1 -0
- package/components/data/table/hooks/useRowHandlers.js +1 -1
- package/components/data/table/hooks/useRowSelection.js +65 -4
- package/components/data/table/hooks/useTableData.js +10 -2
- package/components/data/table/hooks/useTableEdit.d.ts +1 -1
- package/components/data/table/hooks/useTableEdit.js +115 -75
- package/components/data/table/hooks/useTableEditForms.d.ts +25 -0
- package/components/data/table/hooks/useTableEditForms.js +30 -0
- package/components/data/table/index.d.ts +2 -0
- package/components/data/table/index.js +82 -45
- package/components/data/table/live-table/index.d.ts +1 -0
- package/components/data/table/props.d.ts +43 -23
- 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.js +19 -24
- package/components/data/table/utils/columnProxy.d.ts +7 -1
- package/components/data/table/utils/columnProxy.js +21 -1
- package/components/data/table/utils/columnValidation.d.ts +19 -0
- package/components/data/table/utils/columnValidation.js +76 -0
- package/components/data/table/utils/constants.d.ts +2 -0
- package/components/data/table/utils/constants.js +2 -0
- package/components/data/table/utils/crud-handlers.js +3 -1
- package/components/data/table/utils/expansionColumn.js +1 -1
- package/components/data/table/utils/index.d.ts +14 -15
- package/components/data/table/utils/index.js +18 -85
- package/components/data/table/utils/selectionUtils.d.ts +12 -0
- package/components/data/table/utils/selectionUtils.js +23 -5
- 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/iframe-dialog/index.d.ts +2 -0
- package/components/dialogs/login-dialog/index.d.ts +2 -0
- package/components/dialogs/page-dialog/index.d.ts +2 -0
- package/components/dialogs/withDialogWrapper.js +12 -2
- package/components/form/button/index.d.ts +1 -0
- 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 +3 -0
- package/components/input/color-picker/index.d.ts +3 -0
- package/components/input/composite/index.d.ts +1 -0
- package/components/input/composite/index.js +32 -6
- package/components/input/currency/index.d.ts +1 -0
- package/components/input/default/checkbox/index.d.ts +3 -0
- package/components/input/default/checkboxset/index.d.ts +3 -0
- package/components/input/default/radioset/index.d.ts +3 -0
- package/components/input/default/switch/index.d.ts +3 -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/datetime/index.js +13 -3
- package/components/input/epoch/time/index.d.ts +1 -0
- package/components/input/fileupload/index.d.ts +1 -0
- package/components/input/fileupload/index.js +2 -1
- package/components/input/number/index.d.ts +3 -0
- package/components/input/rating/index.d.ts +3 -0
- package/components/input/select/index.d.ts +1 -0
- package/components/input/slider/index.d.ts +3 -0
- package/components/input/text/index.d.ts +3 -0
- package/components/input/text/index.js +9 -2
- package/components/input/textarea/index.d.ts +3 -0
- package/components/input/upload/index.d.ts +3 -0
- package/components/layout/footer/index.js +4 -2
- package/components/layout/footer/props.d.ts +1 -0
- package/components/layout/header/index.js +29 -3
- package/components/layout/header/props.d.ts +1 -0
- package/components/layout/leftnav/index.js +22 -6
- package/components/layout/leftnav/props.d.ts +1 -0
- package/components/layout/leftnav/utils/page-class-util.d.ts +1 -0
- package/components/layout/leftnav/utils/page-class-util.js +4 -3
- package/components/layout/rightnav/index.js +4 -2
- package/components/layout/rightnav/props.d.ts +1 -0
- package/components/layout/topnav/index.js +4 -2
- package/components/layout/topnav/props.d.ts +1 -0
- package/components/navbar/index.d.ts +1 -0
- package/components/navbar/index.js +32 -7
- 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 +1 -0
- package/components/navigation/menu/index.js +19 -11
- package/components/navigation/menu/props.d.ts +1 -0
- package/components/navigation/popover/index.d.ts +1 -0
- package/components/navigation/popover/index.js +15 -3
- package/components/page/index.js +60 -19
- package/components/page/page-context.d.ts +4 -0
- package/components/page/partial/index.d.ts +1 -0
- package/context/PopoverContext.d.ts +5 -0
- package/context/PopoverContext.js +5 -0
- package/context/WidgetProvider.js +9 -2
- package/core/proxy-service.d.ts +2 -0
- package/core/proxy-service.js +132 -22
- package/higherOrder/BaseApp.js +3 -2
- package/higherOrder/BasePage.js +4 -10
- package/higherOrder/props.d.ts +1 -0
- package/higherOrder/useActivePageReactivity.js +1 -4
- package/higherOrder/withBaseWrapper.js +12 -3
- package/hooks/useHttp.d.ts +14 -4
- package/hooks/useHttp.js +47 -9
- package/package-lock.json +332 -325
- package/package.json +3 -3
- package/runtime-dynamic/App.js +21 -2
- package/runtime-dynamic/app-initializer.js +8 -1
- package/runtime-dynamic/components/PageWrapper.js +1 -1
- package/runtime-dynamic/components/PrefabPreview.js +1 -1
- package/runtime-dynamic/components/partial-content.js +17 -1
- package/runtime-dynamic/factories/build-base-page-like-component.js +11 -7
- package/runtime-dynamic/factories/dynamic-component.js +5 -10
- package/runtime-dynamic/main.d.ts +1 -0
- package/runtime-dynamic/main.js +9 -1
- package/runtime-dynamic/routes.js +17 -8
- package/runtime-dynamic/services/compile-render.js +7 -0
- package/runtime-dynamic/services/css-scoping.d.ts +1 -1
- package/runtime-dynamic/services/css-scoping.js +2 -2
- package/runtime-dynamic/services/variable-factory.js +2 -1
- package/runtime-dynamic/services/variable-transpiler.js +4 -1
- package/runtime-dynamic/wmx-shared.d.ts +40 -0
- package/runtime-dynamic/wmx-shared.js +33 -0
- package/utils/page-params-util.js +22 -1
- package/utils/partial-host-util.d.ts +40 -0
- package/utils/partial-host-util.js +41 -0
- package/utils/style-utils.js +1 -1
- package/utils/wmx.utils.d.ts +0 -1
- package/utils/wmx.utils.js +0 -25
- package/variables/crud-variable.d.ts +10 -0
- package/variables/crud-variable.js +53 -2
- package/variables/live-variable.d.ts +1 -0
- package/variables/live-variable.js +2 -1
- package/variables/model-variable.d.ts +2 -0
- package/variables/model-variable.js +14 -0
- package/variables/operation-params.d.ts +29 -0
- package/variables/operation-params.js +69 -0
- package/variables/service-variable.d.ts +9 -0
- package/variables/service-variable.js +21 -2
- package/components/data/table/utils/validation.d.ts +0 -13
- package/components/data/table/utils/validation.js +0 -82
|
@@ -30,6 +30,7 @@ declare const _default: React.ComponentType<{
|
|
|
30
30
|
width?: number | string;
|
|
31
31
|
height?: number | string;
|
|
32
32
|
className?: string;
|
|
33
|
+
class?: string;
|
|
33
34
|
conditionalstyle?: React.CSSProperties;
|
|
34
35
|
conditionalclass?: string;
|
|
35
36
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -29,6 +29,7 @@ declare const _default: React.ComponentType<{
|
|
|
29
29
|
width?: number | string;
|
|
30
30
|
height?: number | string;
|
|
31
31
|
className?: string;
|
|
32
|
+
class?: string;
|
|
32
33
|
conditionalstyle?: React.CSSProperties;
|
|
33
34
|
conditionalclass?: string;
|
|
34
35
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -33,6 +33,7 @@ declare const _default: React.ComponentType<{
|
|
|
33
33
|
width?: number | string;
|
|
34
34
|
height?: number | string;
|
|
35
35
|
className?: string;
|
|
36
|
+
class?: string;
|
|
36
37
|
conditionalstyle?: React.CSSProperties;
|
|
37
38
|
conditionalclass?: string;
|
|
38
39
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -25,6 +25,7 @@ declare const _default: React.ComponentType<{
|
|
|
25
25
|
width?: number | string;
|
|
26
26
|
height?: number | string;
|
|
27
27
|
className?: string;
|
|
28
|
+
class?: string;
|
|
28
29
|
conditionalstyle?: React.CSSProperties;
|
|
29
30
|
conditionalclass?: string;
|
|
30
31
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -40,6 +40,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
40
40
|
width?: number | string;
|
|
41
41
|
height?: number | string;
|
|
42
42
|
className?: string;
|
|
43
|
+
class?: string;
|
|
43
44
|
conditionalstyle?: import("react").CSSProperties;
|
|
44
45
|
conditionalclass?: string;
|
|
45
46
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -107,7 +107,7 @@ const WmAnchor = (props) => {
|
|
|
107
107
|
}, [onClick, path]);
|
|
108
108
|
const processedHyperlink = useMemo(() => {
|
|
109
109
|
if (!hyperlink) return "#";
|
|
110
|
-
let processedLink = hyperlink;
|
|
110
|
+
let processedLink = String(hyperlink);
|
|
111
111
|
if (encodeurl === "true") {
|
|
112
112
|
processedLink = encodeURIComponent(processedLink);
|
|
113
113
|
}
|
|
@@ -118,7 +118,7 @@ const WmAnchor = (props) => {
|
|
|
118
118
|
}, [hyperlink, encodeurl]);
|
|
119
119
|
const doesHyperlinkMatchCurrentPath = useMemo(() => {
|
|
120
120
|
if (!hyperlink) return false;
|
|
121
|
-
let processedLink = hyperlink;
|
|
121
|
+
let processedLink = String(hyperlink);
|
|
122
122
|
if (processedLink.startsWith("www.")) {
|
|
123
123
|
processedLink = `//${processedLink}`;
|
|
124
124
|
}
|
|
@@ -200,9 +200,7 @@ const WmAnchor = (props) => {
|
|
|
200
200
|
className: clsx(DEFAULT_CLASS, "wm-anchor-link", {
|
|
201
201
|
[className || ""]: Boolean(className),
|
|
202
202
|
active: isActive,
|
|
203
|
-
"wm-anchor-icon-
|
|
204
|
-
"wm-anchor-icon-top": iconposition === "top",
|
|
205
|
-
"wm-anchor-icon-right": iconposition === "right"
|
|
203
|
+
"wm-anchor-icon-top": iconposition === "top"
|
|
206
204
|
}),
|
|
207
205
|
onContextMenu: handleContextMenu,
|
|
208
206
|
accessKey: shortcutkey,
|
|
@@ -30,6 +30,7 @@ declare const _default: React.ComponentType<{
|
|
|
30
30
|
width?: number | string;
|
|
31
31
|
height?: number | string;
|
|
32
32
|
className?: string;
|
|
33
|
+
class?: string;
|
|
33
34
|
conditionalstyle?: React.CSSProperties;
|
|
34
35
|
conditionalclass?: string;
|
|
35
36
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -26,6 +26,7 @@ declare const _default: React.ComponentType<{
|
|
|
26
26
|
width?: number | string;
|
|
27
27
|
height?: number | string;
|
|
28
28
|
className?: string;
|
|
29
|
+
class?: string;
|
|
29
30
|
conditionalstyle?: React.CSSProperties;
|
|
30
31
|
conditionalclass?: string;
|
|
31
32
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -27,6 +27,7 @@ declare const _default: React.ComponentType<{
|
|
|
27
27
|
width?: number | string;
|
|
28
28
|
height?: number | string;
|
|
29
29
|
className?: string;
|
|
30
|
+
class?: string;
|
|
30
31
|
conditionalstyle?: React.CSSProperties;
|
|
31
32
|
conditionalclass?: string;
|
|
32
33
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -23,6 +23,7 @@ declare const _default: React.ComponentType<{
|
|
|
23
23
|
width?: number | string;
|
|
24
24
|
height?: number | string;
|
|
25
25
|
className?: string;
|
|
26
|
+
class?: string;
|
|
26
27
|
conditionalstyle?: React.CSSProperties;
|
|
27
28
|
conditionalclass?: string;
|
|
28
29
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -29,6 +29,7 @@ declare const _default: React.ComponentType<{
|
|
|
29
29
|
width?: number | string;
|
|
30
30
|
height?: number | string;
|
|
31
31
|
className?: string;
|
|
32
|
+
class?: string;
|
|
32
33
|
conditionalstyle?: React.CSSProperties;
|
|
33
34
|
conditionalclass?: string;
|
|
34
35
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -30,6 +30,7 @@ declare const _default: React.ComponentType<{
|
|
|
30
30
|
width?: number | string;
|
|
31
31
|
height?: number | string;
|
|
32
32
|
className?: string;
|
|
33
|
+
class?: string;
|
|
33
34
|
conditionalstyle?: React.CSSProperties;
|
|
34
35
|
conditionalclass?: string;
|
|
35
36
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -35,6 +35,7 @@ declare const _default: React.ComponentType<{
|
|
|
35
35
|
width?: number | string;
|
|
36
36
|
height?: number | string;
|
|
37
37
|
className?: string;
|
|
38
|
+
class?: string;
|
|
38
39
|
conditionalstyle?: React.CSSProperties;
|
|
39
40
|
conditionalclass?: string;
|
|
40
41
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -18,6 +18,7 @@ declare const WmRichTextEditorStandalone: React.ComponentType<import("../../data
|
|
|
18
18
|
width?: number | string;
|
|
19
19
|
height?: number | string;
|
|
20
20
|
className?: string;
|
|
21
|
+
class?: string;
|
|
21
22
|
conditionalstyle?: React.CSSProperties;
|
|
22
23
|
conditionalclass?: string;
|
|
23
24
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -77,6 +78,7 @@ declare const _default: React.ComponentType<{
|
|
|
77
78
|
standalone?: boolean;
|
|
78
79
|
formRef?: any;
|
|
79
80
|
formKey?: string;
|
|
81
|
+
hideValidationMessage?: boolean;
|
|
80
82
|
name: string;
|
|
81
83
|
datavalue?: any;
|
|
82
84
|
defaultvalue?: any;
|
|
@@ -107,6 +109,7 @@ declare const _default: React.ComponentType<{
|
|
|
107
109
|
width?: number | string;
|
|
108
110
|
height?: number | string;
|
|
109
111
|
className?: string;
|
|
112
|
+
class?: string;
|
|
110
113
|
conditionalstyle?: React.CSSProperties;
|
|
111
114
|
conditionalclass?: string;
|
|
112
115
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
CustomTemplateCaption,
|
|
56
56
|
useCustomTemplate
|
|
57
57
|
} from "../../common/customTemplate";
|
|
58
|
+
import { toPlainText } from "./utils";
|
|
58
59
|
const DEFAULT_CLASS = "app-search input-group";
|
|
59
60
|
const Search = React.forwardRef((props, ref) => {
|
|
60
61
|
const _a = props, {
|
|
@@ -303,7 +304,7 @@ const Search = React.forwardRef((props, ref) => {
|
|
|
303
304
|
const value2 = Array.isArray(datavalue) ? datavalue[0] : datavalue;
|
|
304
305
|
if (value2) {
|
|
305
306
|
const key = searchkey.split(",")[0] || searchkey;
|
|
306
|
-
const item = (getDisplayExpression == null ? void 0 : getDisplayExpression(value2)) || value2[key];
|
|
307
|
+
const item = toPlainText(getDisplayExpression == null ? void 0 : getDisplayExpression(value2)) || value2[key];
|
|
307
308
|
if (item) {
|
|
308
309
|
setQuery(item);
|
|
309
310
|
handleQueryChange(item);
|
|
@@ -313,7 +314,7 @@ const Search = React.forwardRef((props, ref) => {
|
|
|
313
314
|
} else if (datafield !== "All Fields" && datafield) {
|
|
314
315
|
let findItem = normalizedData == null ? void 0 : normalizedData.find((item) => item.value === datavalue);
|
|
315
316
|
if (findItem) {
|
|
316
|
-
let displayValue2 = (getDisplayExpression == null ? void 0 : getDisplayExpression(getSelectedItem(findItem))) || findItem.label;
|
|
317
|
+
let displayValue2 = toPlainText(getDisplayExpression == null ? void 0 : getDisplayExpression(getSelectedItem(findItem))) || findItem.label;
|
|
317
318
|
setQuery(displayValue2);
|
|
318
319
|
handleQueryChange(displayValue2);
|
|
319
320
|
handleUpdateDatavalue(findItem);
|
|
@@ -342,7 +343,7 @@ const Search = React.forwardRef((props, ref) => {
|
|
|
342
343
|
if (!key) return;
|
|
343
344
|
const findItem = response.find((item) => item[key] == value2);
|
|
344
345
|
if (findItem && Object.keys(findItem).length > 0) {
|
|
345
|
-
let displayValue2 = (getDisplayExpression == null ? void 0 : getDisplayExpression(getSelectedItem(findItem))) || findItem[key];
|
|
346
|
+
let displayValue2 = toPlainText(getDisplayExpression == null ? void 0 : getDisplayExpression(getSelectedItem(findItem))) || findItem[key];
|
|
346
347
|
setQuery(displayValue2);
|
|
347
348
|
handleQueryChange(displayValue2);
|
|
348
349
|
}
|
|
@@ -816,7 +817,7 @@ const Search = React.forwardRef((props, ref) => {
|
|
|
816
817
|
try {
|
|
817
818
|
const item = JSON.parse(itemData);
|
|
818
819
|
const selectedItem2 = getSelectedItem(item);
|
|
819
|
-
const displayVal = (getDisplayExpression == null ? void 0 : getDisplayExpression(selectedItem2)) || item.displayValue || item.label;
|
|
820
|
+
const displayVal = toPlainText(getDisplayExpression == null ? void 0 : getDisplayExpression(selectedItem2)) || item.displayValue || item.label;
|
|
820
821
|
if (props.isSearchInChips) {
|
|
821
822
|
setQuery("");
|
|
822
823
|
handleQueryChange("");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toPlainText(value: any): any;
|
|
@@ -32,6 +32,7 @@ declare const _default: React.ComponentType<{
|
|
|
32
32
|
width?: number | string;
|
|
33
33
|
height?: number | string;
|
|
34
34
|
className?: string;
|
|
35
|
+
class?: string;
|
|
35
36
|
conditionalstyle?: React.CSSProperties;
|
|
36
37
|
conditionalclass?: string;
|
|
37
38
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -25,6 +25,7 @@ declare const _default: React.ComponentType<{
|
|
|
25
25
|
width?: number | string;
|
|
26
26
|
height?: number | string;
|
|
27
27
|
className?: string;
|
|
28
|
+
class?: string;
|
|
28
29
|
conditionalstyle?: React.CSSProperties;
|
|
29
30
|
conditionalclass?: string;
|
|
30
31
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -40,6 +40,7 @@ declare const _default: React.ComponentType<{
|
|
|
40
40
|
width?: number | string;
|
|
41
41
|
height?: number | string;
|
|
42
42
|
className?: string;
|
|
43
|
+
class?: string;
|
|
43
44
|
conditionalstyle?: React.CSSProperties;
|
|
44
45
|
conditionalclass?: string;
|
|
45
46
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -37,6 +37,7 @@ declare const _default: React.ComponentType<{
|
|
|
37
37
|
width?: number | string;
|
|
38
38
|
height?: number | string;
|
|
39
39
|
className?: string;
|
|
40
|
+
class?: string;
|
|
40
41
|
conditionalstyle?: React.CSSProperties;
|
|
41
42
|
conditionalclass?: string;
|
|
42
43
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -3,3 +3,5 @@ export { WmSkeleton, SKELETON_REGISTRY, shouldShowSkeleton, useShouldShowSkeleto
|
|
|
3
3
|
export type { WmSkeletonProps, SkeletonConfig } from "./wm-skeleton";
|
|
4
4
|
export { WmAppIcon } from "./WmAppIcon";
|
|
5
5
|
export type { WmAppIconProps } from "./WmAppIcon/props";
|
|
6
|
+
export { PartialContentWrapper } from "./partial-content-wrapper";
|
|
7
|
+
export type { PartialContentWrapperProps } from "./partial-content-wrapper";
|
|
@@ -6,8 +6,10 @@ import {
|
|
|
6
6
|
useShouldShowSkeleton
|
|
7
7
|
} from "./wm-skeleton";
|
|
8
8
|
import { WmAppIcon } from "./WmAppIcon";
|
|
9
|
+
import { PartialContentWrapper } from "./partial-content-wrapper";
|
|
9
10
|
export {
|
|
10
11
|
AppSpinner,
|
|
12
|
+
PartialContentWrapper,
|
|
11
13
|
SKELETON_REGISTRY,
|
|
12
14
|
WmAppIcon,
|
|
13
15
|
WmSkeleton,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface PartialContentWrapperProps {
|
|
3
|
+
content?: string;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Wraps a layout region's rendered partial in an `app-partial-{content}` div,
|
|
8
|
+
* matching the DOM produced by WmPartialContainer in preview so CSS scoped to
|
|
9
|
+
* that class (e.g. `.app-partial-header`) also applies in codegen builds.
|
|
10
|
+
* Used by the header/leftnav/rightnav/topnav/footer layout regions only.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PartialContentWrapper: {
|
|
13
|
+
({ content, children }: PartialContentWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
const PartialContentWrapper = ({ content, children }) => {
|
|
3
|
+
if (!content) {
|
|
4
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
5
|
+
}
|
|
6
|
+
return /* @__PURE__ */ jsx("div", { className: `app-partial-${content.toLowerCase()}`, children });
|
|
7
|
+
};
|
|
8
|
+
PartialContentWrapper.displayName = "PartialContentWrapper";
|
|
9
|
+
export {
|
|
10
|
+
PartialContentWrapper
|
|
11
|
+
};
|
|
@@ -40,6 +40,7 @@ declare const _default: React.ComponentType<{
|
|
|
40
40
|
width?: number | string;
|
|
41
41
|
height?: number | string;
|
|
42
42
|
className?: string;
|
|
43
|
+
class?: string;
|
|
43
44
|
conditionalstyle?: React.CSSProperties;
|
|
44
45
|
conditionalclass?: string;
|
|
45
46
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -35,6 +35,7 @@ declare const _default: React.ComponentType<{
|
|
|
35
35
|
width?: number | string;
|
|
36
36
|
height?: number | string;
|
|
37
37
|
className?: string;
|
|
38
|
+
class?: string;
|
|
38
39
|
conditionalstyle?: React.CSSProperties;
|
|
39
40
|
conditionalclass?: string;
|
|
40
41
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { WmContainerProps } from "./props";
|
|
3
|
+
export declare const WmContainerContext: React.Context<{
|
|
4
|
+
registerPartial: (partialName: string, widget: any) => void;
|
|
5
|
+
}>;
|
|
3
6
|
export declare const WmContainer: {
|
|
4
7
|
(props: WmContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
8
|
displayName: string;
|
|
@@ -31,6 +34,7 @@ declare const _default: React.ComponentType<{
|
|
|
31
34
|
layoutClassName?: string;
|
|
32
35
|
layoutWidth?: string;
|
|
33
36
|
layoutHeight?: string;
|
|
37
|
+
class?: string;
|
|
34
38
|
standalone?: boolean;
|
|
35
39
|
ref?: React.RefObject<HTMLElement> | React.RefObject<null>;
|
|
36
40
|
animation?: string;
|
|
@@ -35,14 +35,20 @@ import {
|
|
|
35
35
|
useRef,
|
|
36
36
|
useMemo,
|
|
37
37
|
useCallback,
|
|
38
|
-
useState
|
|
38
|
+
useState,
|
|
39
|
+
createContext
|
|
39
40
|
} from "react";
|
|
40
41
|
import { clsx } from "clsx";
|
|
41
42
|
import { withBaseWrapper } from "../../higherOrder/withBaseWrapper";
|
|
42
43
|
import { useLayoutSize } from "../../hooks/useLayoutSize";
|
|
43
44
|
import { removeInvalidAttributes } from "../../utils/attr";
|
|
44
|
-
import {
|
|
45
|
+
import {
|
|
46
|
+
normalizeBackgroundImage,
|
|
47
|
+
sanitizeStyleObject
|
|
48
|
+
} from "../../utils/style-utils";
|
|
49
|
+
import { publishPartialNamespaces, toHostWidgetProps } from "../../utils/partial-host-util";
|
|
45
50
|
const DEFAULT_CLASS = "app-container";
|
|
51
|
+
const WmContainerContext = createContext(void 0);
|
|
46
52
|
const WmContainer = (props) => {
|
|
47
53
|
var _c, _d, _e;
|
|
48
54
|
const _a = props, { listener } = _a, restPartialProps = __objRest(_a, ["listener"]);
|
|
@@ -97,7 +103,8 @@ const WmContainer = (props) => {
|
|
|
97
103
|
content,
|
|
98
104
|
overflow,
|
|
99
105
|
display,
|
|
100
|
-
layoutClassName
|
|
106
|
+
layoutClassName,
|
|
107
|
+
class: classOverride
|
|
101
108
|
} = _b, rest = __objRest(_b, [
|
|
102
109
|
"className",
|
|
103
110
|
"styles",
|
|
@@ -149,7 +156,8 @@ const WmContainer = (props) => {
|
|
|
149
156
|
"content",
|
|
150
157
|
"overflow",
|
|
151
158
|
"display",
|
|
152
|
-
"layoutClassName"
|
|
159
|
+
"layoutClassName",
|
|
160
|
+
"class"
|
|
153
161
|
]);
|
|
154
162
|
const isLoaded = useRef(false);
|
|
155
163
|
const widget_instance = (_c = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _c[name];
|
|
@@ -157,6 +165,7 @@ const WmContainer = (props) => {
|
|
|
157
165
|
const [partialHostKey, setPartialHostKey] = useState(void 0);
|
|
158
166
|
const hostWidgetState = partialHostKey ? (_d = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _d[partialHostKey] : void 0;
|
|
159
167
|
const hostShouldHide = ((_e = hostWidgetState == null ? void 0 : hostWidgetState.show) == null ? void 0 : _e.toString()) === "false";
|
|
168
|
+
const registeredPartialRef = useRef(false);
|
|
160
169
|
const containerStyles = useMemo(() => {
|
|
161
170
|
if (!(styles == null ? void 0 : styles.backgroundImage)) {
|
|
162
171
|
return styles;
|
|
@@ -206,7 +215,15 @@ const WmContainer = (props) => {
|
|
|
206
215
|
const handleOnLoad = useCallback(
|
|
207
216
|
(widget, partialName) => {
|
|
208
217
|
if (viewParent && viewParent.Widgets && !isLoaded.current) {
|
|
209
|
-
|
|
218
|
+
const hostKey = props.name || partialName;
|
|
219
|
+
if (!widget || prefab) {
|
|
220
|
+
viewParent.Widgets[hostKey] = widget || props;
|
|
221
|
+
} else {
|
|
222
|
+
if (!props.name) {
|
|
223
|
+
viewParent.Widgets[hostKey] = toHostWidgetProps(props);
|
|
224
|
+
}
|
|
225
|
+
publishPartialNamespaces(viewParent.Widgets[hostKey], widget);
|
|
226
|
+
}
|
|
210
227
|
isLoaded.current = true;
|
|
211
228
|
onLoad == null ? void 0 : onLoad(widget || props);
|
|
212
229
|
if (!props.name && partialName) {
|
|
@@ -214,20 +231,29 @@ const WmContainer = (props) => {
|
|
|
214
231
|
}
|
|
215
232
|
}
|
|
216
233
|
},
|
|
217
|
-
[onLoad, props.name]
|
|
234
|
+
[onLoad, props.name, prefab]
|
|
218
235
|
);
|
|
219
236
|
useEffect(() => {
|
|
220
237
|
if (!content && onLoad && !isLoaded.current) {
|
|
221
238
|
handleOnLoad(widget_instance || props);
|
|
222
239
|
}
|
|
223
240
|
}, []);
|
|
224
|
-
const classNames = (className == null ? void 0 : className.split(" ")) || [];
|
|
225
|
-
|
|
241
|
+
const classNames = classOverride || (className == null ? void 0 : className.split(" ")) || [];
|
|
242
|
+
const handleRegisterPartial = useCallback(
|
|
243
|
+
(partialName, widget) => {
|
|
244
|
+
if (viewParent && viewParent.Widgets && !registeredPartialRef.current) {
|
|
245
|
+
viewParent.Widgets[partialName] = widget || props;
|
|
246
|
+
registeredPartialRef.current = true;
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
[viewParent]
|
|
250
|
+
);
|
|
251
|
+
return /* @__PURE__ */ jsx(WmContainerContext.Provider, { value: { registerPartial: handleRegisterPartial }, children: /* @__PURE__ */ jsx(
|
|
226
252
|
"div",
|
|
227
253
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
228
254
|
className: clsx(
|
|
229
255
|
{
|
|
230
|
-
[className || ""]: Boolean(className),
|
|
256
|
+
[classOverride || className || ""]: Boolean(className),
|
|
231
257
|
[DEFAULT_CLASS]: !["form-elements", "dynamic-form-container"].some(
|
|
232
258
|
(cls) => classNames == null ? void 0 : classNames.includes(cls)
|
|
233
259
|
)
|
|
@@ -238,16 +264,17 @@ const WmContainer = (props) => {
|
|
|
238
264
|
id,
|
|
239
265
|
hidden: props.hidden || hostShouldHide
|
|
240
266
|
}, removeInvalidAttributes(rest)), domEvents), { name }), {
|
|
241
|
-
style: __spreadValues(__spreadValues({}, containerStyles), conditionalstyle),
|
|
267
|
+
style: __spreadValues(__spreadValues({}, sanitizeStyleObject(containerStyles)), sanitizeStyleObject(conditionalstyle)),
|
|
242
268
|
ref: containerRef
|
|
243
269
|
}), direction ? { direction } : {}), {
|
|
244
270
|
children: renderPartial ? renderPartial(restPartialProps, handleOnLoad) : children
|
|
245
271
|
})
|
|
246
|
-
);
|
|
272
|
+
) });
|
|
247
273
|
};
|
|
248
274
|
WmContainer.displayName = "WmContainer";
|
|
249
275
|
var container_default = withBaseWrapper(WmContainer);
|
|
250
276
|
export {
|
|
251
277
|
WmContainer,
|
|
278
|
+
WmContainerContext,
|
|
252
279
|
container_default as default
|
|
253
280
|
};
|
|
@@ -26,6 +26,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
26
26
|
width?: number | string;
|
|
27
27
|
height?: number | string;
|
|
28
28
|
className?: string;
|
|
29
|
+
class?: string;
|
|
29
30
|
conditionalstyle?: import("react").CSSProperties;
|
|
30
31
|
conditionalclass?: string;
|
|
31
32
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -22,6 +22,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
22
22
|
width?: number | string;
|
|
23
23
|
height?: number | string;
|
|
24
24
|
className?: string;
|
|
25
|
+
class?: string;
|
|
25
26
|
conditionalstyle?: import("react").CSSProperties;
|
|
26
27
|
conditionalclass?: string;
|
|
27
28
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -24,6 +24,7 @@ declare const _default: React.ComponentType<{
|
|
|
24
24
|
width?: number | string;
|
|
25
25
|
height?: number | string;
|
|
26
26
|
className?: string;
|
|
27
|
+
class?: string;
|
|
27
28
|
conditionalstyle?: React.CSSProperties;
|
|
28
29
|
conditionalclass?: string;
|
|
29
30
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -41,7 +41,7 @@ const WmLayoutgrid = (props) => {
|
|
|
41
41
|
Container,
|
|
42
42
|
__spreadProps(__spreadValues({
|
|
43
43
|
style: styles,
|
|
44
|
-
className: clsx(DEFAULT_CLASS,
|
|
44
|
+
className: clsx(DEFAULT_CLASS, className)
|
|
45
45
|
}, removeInvalidAttributes(restProps)), {
|
|
46
46
|
maxWidth: false,
|
|
47
47
|
children
|
|
@@ -23,6 +23,7 @@ declare const _default: React.ComponentType<{
|
|
|
23
23
|
width?: number | string;
|
|
24
24
|
height?: number | string;
|
|
25
25
|
className?: string;
|
|
26
|
+
class?: string;
|
|
26
27
|
conditionalstyle?: React.CSSProperties;
|
|
27
28
|
conditionalclass?: string;
|
|
28
29
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -20,6 +20,7 @@ declare const _default: React.ComponentType<{
|
|
|
20
20
|
width?: number | string;
|
|
21
21
|
height?: number | string;
|
|
22
22
|
className?: string;
|
|
23
|
+
class?: string;
|
|
23
24
|
conditionalstyle?: React.CSSProperties;
|
|
24
25
|
conditionalclass?: string;
|
|
25
26
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -74,6 +74,7 @@ declare const _default: React.ComponentType<{
|
|
|
74
74
|
margin?: string;
|
|
75
75
|
width?: number | string;
|
|
76
76
|
className?: string;
|
|
77
|
+
class?: string;
|
|
77
78
|
conditionalstyle?: React.CSSProperties;
|
|
78
79
|
conditionalclass?: string;
|
|
79
80
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -18,6 +18,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
18
18
|
width?: number | string;
|
|
19
19
|
height?: number | string;
|
|
20
20
|
className?: string;
|
|
21
|
+
class?: string;
|
|
21
22
|
conditionalstyle?: import("react").CSSProperties;
|
|
22
23
|
conditionalclass?: string;
|
|
23
24
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -43,6 +43,7 @@ declare const _default: React.ComponentType<{
|
|
|
43
43
|
width?: number | string;
|
|
44
44
|
height?: number | string;
|
|
45
45
|
className?: string;
|
|
46
|
+
class?: string;
|
|
46
47
|
conditionalstyle?: React.CSSProperties;
|
|
47
48
|
conditionalclass?: string;
|
|
48
49
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|