@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.
Files changed (215) hide show
  1. package/components/advanced/carousel/index.d.ts +1 -0
  2. package/components/advanced/carousel/template.d.ts +1 -0
  3. package/components/advanced/login/index.d.ts +1 -0
  4. package/components/advanced/marquee/index.d.ts +1 -0
  5. package/components/basic/anchor/index.d.ts +1 -0
  6. package/components/basic/anchor/index.js +3 -5
  7. package/components/basic/audio/index.d.ts +1 -0
  8. package/components/basic/html/index.d.ts +1 -0
  9. package/components/basic/icon/index.d.ts +1 -0
  10. package/components/basic/iframe/index.d.ts +1 -0
  11. package/components/basic/label/index.d.ts +1 -0
  12. package/components/basic/picture/index.d.ts +1 -0
  13. package/components/basic/progress-bar/index.d.ts +1 -0
  14. package/components/basic/progress-circle/index.d.ts +1 -0
  15. package/components/basic/richtexteditor/index.d.ts +3 -0
  16. package/components/basic/search/index.js +5 -4
  17. package/components/basic/search/utils.d.ts +1 -0
  18. package/components/basic/search/utils.js +9 -0
  19. package/components/basic/spinner/index.d.ts +1 -0
  20. package/components/basic/tile/index.d.ts +1 -0
  21. package/components/basic/tree/index.d.ts +1 -0
  22. package/components/basic/video/index.d.ts +1 -0
  23. package/components/chart/index.d.ts +1 -0
  24. package/components/common/index.d.ts +2 -0
  25. package/components/common/index.js +2 -0
  26. package/components/common/partial-content-wrapper.d.ts +15 -0
  27. package/components/common/partial-content-wrapper.js +11 -0
  28. package/components/container/accordion/accordion-pane/index.d.ts +1 -0
  29. package/components/container/accordion/index.d.ts +1 -0
  30. package/components/container/index.d.ts +4 -0
  31. package/components/container/index.js +38 -11
  32. package/components/container/layout-grid/grid-column/index.d.ts +1 -0
  33. package/components/container/layout-grid/grid-row/index.d.ts +1 -0
  34. package/components/container/layout-grid/index.d.ts +1 -0
  35. package/components/container/layout-grid/index.js +1 -1
  36. package/components/container/linear-layout/index.d.ts +1 -0
  37. package/components/container/linear-layout/linear-layout-item/index.d.ts +1 -0
  38. package/components/container/panel/index.d.ts +1 -0
  39. package/components/container/props.d.ts +1 -0
  40. package/components/container/repeat-template/index.d.ts +1 -0
  41. package/components/container/repeat-template/index.js +1 -1
  42. package/components/container/tabs/index.d.ts +1 -0
  43. package/components/container/tabs/index.js +12 -8
  44. package/components/container/tabs/tab-pane/index.d.ts +1 -0
  45. package/components/container/tabs/tab-pane/index.js +2 -2
  46. package/components/container/wizard/index.d.ts +2 -0
  47. package/components/container/wizard/index.js +92 -43
  48. package/components/container/wizard/props.d.ts +2 -2
  49. package/components/container/wizard/wizard-step/index.d.ts +1 -0
  50. package/components/data/card/card-actions/index.d.ts +1 -0
  51. package/components/data/card/card-content/index.d.ts +1 -0
  52. package/components/data/card/card-footer/index.d.ts +1 -0
  53. package/components/data/card/index.d.ts +1 -0
  54. package/components/data/form/base-form/hooks/useFormOperations.d.ts +1 -1
  55. package/components/data/form/base-form/hooks/useFormOperations.js +5 -2
  56. package/components/data/form/base-form/index.js +10 -14
  57. package/components/data/form/base-form/props.d.ts +1 -0
  58. package/components/data/form/dynamic-fields/WmxDynamicFormField.js +9 -23
  59. package/components/data/form/form-action/index.d.ts +2 -0
  60. package/components/data/form/form-controller/props.d.ts +2 -0
  61. package/components/data/form/form-controller/utils.js +3 -2
  62. package/components/data/form/form-controller/validation-contrustor.js +112 -1
  63. package/components/data/form/form-controller/withFormController.js +16 -3
  64. package/components/data/form/form-field/index.js +38 -11
  65. package/components/data/form/form-field/props.d.ts +8 -2
  66. package/components/data/list/components/ListItemWithTemplate.js +1 -1
  67. package/components/data/list/index.d.ts +2 -0
  68. package/components/data/list/index.js +5 -10
  69. package/components/data/pagination/hooks/usePagination.js +6 -6
  70. package/components/data/table/components/EditableCell.js +47 -24
  71. package/components/data/table/components/FieldValidationError.js +1 -1
  72. package/components/data/table/components/RowExpansionButton.js +5 -1
  73. package/components/data/table/components/TableBody.js +2 -0
  74. package/components/data/table/components/TableHeader.js +12 -4
  75. package/components/data/table/hooks/useFormWidget.js +13 -2
  76. package/components/data/table/hooks/usePanelStructure.js +6 -1
  77. package/components/data/table/hooks/useResponsiveColumns.d.ts +1 -0
  78. package/components/data/table/hooks/useRowHandlers.js +1 -1
  79. package/components/data/table/hooks/useRowSelection.js +65 -4
  80. package/components/data/table/hooks/useTableData.js +10 -2
  81. package/components/data/table/hooks/useTableEdit.d.ts +1 -1
  82. package/components/data/table/hooks/useTableEdit.js +115 -75
  83. package/components/data/table/hooks/useTableEditForms.d.ts +25 -0
  84. package/components/data/table/hooks/useTableEditForms.js +30 -0
  85. package/components/data/table/index.d.ts +2 -0
  86. package/components/data/table/index.js +82 -45
  87. package/components/data/table/live-table/index.d.ts +1 -0
  88. package/components/data/table/props.d.ts +43 -23
  89. package/components/data/table/table-action/index.d.ts +1 -0
  90. package/components/data/table/table-column/index.d.ts +1 -0
  91. package/components/data/table/table-row/index.d.ts +1 -0
  92. package/components/data/table/table-row-action/index.d.ts +1 -0
  93. package/components/data/table/utils/buildSelectionColumns.js +19 -24
  94. package/components/data/table/utils/columnProxy.d.ts +7 -1
  95. package/components/data/table/utils/columnProxy.js +21 -1
  96. package/components/data/table/utils/columnValidation.d.ts +19 -0
  97. package/components/data/table/utils/columnValidation.js +76 -0
  98. package/components/data/table/utils/constants.d.ts +2 -0
  99. package/components/data/table/utils/constants.js +2 -0
  100. package/components/data/table/utils/crud-handlers.js +3 -1
  101. package/components/data/table/utils/expansionColumn.js +1 -1
  102. package/components/data/table/utils/index.d.ts +14 -15
  103. package/components/data/table/utils/index.js +18 -85
  104. package/components/data/table/utils/selectionUtils.d.ts +12 -0
  105. package/components/data/table/utils/selectionUtils.js +23 -5
  106. package/components/dialogs/alert-dialog/index.d.ts +2 -0
  107. package/components/dialogs/confirm-dialog/index.d.ts +2 -0
  108. package/components/dialogs/dialog/index.d.ts +2 -0
  109. package/components/dialogs/dialog-actions/index.d.ts +1 -0
  110. package/components/dialogs/dialog-body/index.d.ts +1 -0
  111. package/components/dialogs/dialog-content/index.d.ts +1 -0
  112. package/components/dialogs/dialog-header/index.d.ts +1 -0
  113. package/components/dialogs/iframe-dialog/index.d.ts +2 -0
  114. package/components/dialogs/login-dialog/index.d.ts +2 -0
  115. package/components/dialogs/page-dialog/index.d.ts +2 -0
  116. package/components/dialogs/withDialogWrapper.js +12 -2
  117. package/components/form/button/index.d.ts +1 -0
  118. package/components/form/button-group/index.d.ts +1 -0
  119. package/components/input/calendar/index.d.ts +2 -0
  120. package/components/input/chips/index.d.ts +3 -0
  121. package/components/input/color-picker/index.d.ts +3 -0
  122. package/components/input/composite/index.d.ts +1 -0
  123. package/components/input/composite/index.js +32 -6
  124. package/components/input/currency/index.d.ts +1 -0
  125. package/components/input/default/checkbox/index.d.ts +3 -0
  126. package/components/input/default/checkboxset/index.d.ts +3 -0
  127. package/components/input/default/radioset/index.d.ts +3 -0
  128. package/components/input/default/switch/index.d.ts +3 -0
  129. package/components/input/epoch/date/index.d.ts +1 -0
  130. package/components/input/epoch/datetime/index.d.ts +1 -0
  131. package/components/input/epoch/datetime/index.js +13 -3
  132. package/components/input/epoch/time/index.d.ts +1 -0
  133. package/components/input/fileupload/index.d.ts +1 -0
  134. package/components/input/fileupload/index.js +2 -1
  135. package/components/input/number/index.d.ts +3 -0
  136. package/components/input/rating/index.d.ts +3 -0
  137. package/components/input/select/index.d.ts +1 -0
  138. package/components/input/slider/index.d.ts +3 -0
  139. package/components/input/text/index.d.ts +3 -0
  140. package/components/input/text/index.js +9 -2
  141. package/components/input/textarea/index.d.ts +3 -0
  142. package/components/input/upload/index.d.ts +3 -0
  143. package/components/layout/footer/index.js +4 -2
  144. package/components/layout/footer/props.d.ts +1 -0
  145. package/components/layout/header/index.js +29 -3
  146. package/components/layout/header/props.d.ts +1 -0
  147. package/components/layout/leftnav/index.js +22 -6
  148. package/components/layout/leftnav/props.d.ts +1 -0
  149. package/components/layout/leftnav/utils/page-class-util.d.ts +1 -0
  150. package/components/layout/leftnav/utils/page-class-util.js +4 -3
  151. package/components/layout/rightnav/index.js +4 -2
  152. package/components/layout/rightnav/props.d.ts +1 -0
  153. package/components/layout/topnav/index.js +4 -2
  154. package/components/layout/topnav/props.d.ts +1 -0
  155. package/components/navbar/index.d.ts +1 -0
  156. package/components/navbar/index.js +32 -7
  157. package/components/navbar/nav-item/index.d.ts +1 -0
  158. package/components/navigation/breadcrumb/index.d.ts +1 -0
  159. package/components/navigation/menu/index.d.ts +1 -0
  160. package/components/navigation/menu/index.js +19 -11
  161. package/components/navigation/menu/props.d.ts +1 -0
  162. package/components/navigation/popover/index.d.ts +1 -0
  163. package/components/navigation/popover/index.js +15 -3
  164. package/components/page/index.js +60 -19
  165. package/components/page/page-context.d.ts +4 -0
  166. package/components/page/partial/index.d.ts +1 -0
  167. package/context/PopoverContext.d.ts +5 -0
  168. package/context/PopoverContext.js +5 -0
  169. package/context/WidgetProvider.js +9 -2
  170. package/core/proxy-service.d.ts +2 -0
  171. package/core/proxy-service.js +132 -22
  172. package/higherOrder/BaseApp.js +3 -2
  173. package/higherOrder/BasePage.js +4 -10
  174. package/higherOrder/props.d.ts +1 -0
  175. package/higherOrder/useActivePageReactivity.js +1 -4
  176. package/higherOrder/withBaseWrapper.js +12 -3
  177. package/hooks/useHttp.d.ts +14 -4
  178. package/hooks/useHttp.js +47 -9
  179. package/package-lock.json +332 -325
  180. package/package.json +3 -3
  181. package/runtime-dynamic/App.js +21 -2
  182. package/runtime-dynamic/app-initializer.js +8 -1
  183. package/runtime-dynamic/components/PageWrapper.js +1 -1
  184. package/runtime-dynamic/components/PrefabPreview.js +1 -1
  185. package/runtime-dynamic/components/partial-content.js +17 -1
  186. package/runtime-dynamic/factories/build-base-page-like-component.js +11 -7
  187. package/runtime-dynamic/factories/dynamic-component.js +5 -10
  188. package/runtime-dynamic/main.d.ts +1 -0
  189. package/runtime-dynamic/main.js +9 -1
  190. package/runtime-dynamic/routes.js +17 -8
  191. package/runtime-dynamic/services/compile-render.js +7 -0
  192. package/runtime-dynamic/services/css-scoping.d.ts +1 -1
  193. package/runtime-dynamic/services/css-scoping.js +2 -2
  194. package/runtime-dynamic/services/variable-factory.js +2 -1
  195. package/runtime-dynamic/services/variable-transpiler.js +4 -1
  196. package/runtime-dynamic/wmx-shared.d.ts +40 -0
  197. package/runtime-dynamic/wmx-shared.js +33 -0
  198. package/utils/page-params-util.js +22 -1
  199. package/utils/partial-host-util.d.ts +40 -0
  200. package/utils/partial-host-util.js +41 -0
  201. package/utils/style-utils.js +1 -1
  202. package/utils/wmx.utils.d.ts +0 -1
  203. package/utils/wmx.utils.js +0 -25
  204. package/variables/crud-variable.d.ts +10 -0
  205. package/variables/crud-variable.js +53 -2
  206. package/variables/live-variable.d.ts +1 -0
  207. package/variables/live-variable.js +2 -1
  208. package/variables/model-variable.d.ts +2 -0
  209. package/variables/model-variable.js +14 -0
  210. package/variables/operation-params.d.ts +29 -0
  211. package/variables/operation-params.js +69 -0
  212. package/variables/service-variable.d.ts +9 -0
  213. package/variables/service-variable.js +21 -2
  214. package/components/data/table/utils/validation.d.ts +0 -13
  215. 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-left": iconposition === "left",
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")[];
@@ -33,6 +33,7 @@ declare const _default: React.ComponentType<{
33
33
  padding?: string;
34
34
  margin?: 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")[];
@@ -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;
@@ -0,0 +1,9 @@
1
+ import DOMPurify from "dompurify";
2
+ function toPlainText(value) {
3
+ if (value == null) return value;
4
+ const str = String(value);
5
+ return /<[^>]+>/.test(str) ? DOMPurify.sanitize(str, { ALLOWED_TAGS: [] }) : str;
6
+ }
7
+ export {
8
+ toPlainText
9
+ };
@@ -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")[];
@@ -90,6 +90,7 @@ declare const _default: React.ComponentType<{
90
90
  padding?: string;
91
91
  margin?: string;
92
92
  className?: string;
93
+ class?: string;
93
94
  conditionalstyle?: React.CSSProperties;
94
95
  conditionalclass?: string;
95
96
  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 { normalizeBackgroundImage } from "../../utils/style-utils";
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
- viewParent.Widgets[props.name || partialName] = widget || props;
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
- return /* @__PURE__ */ jsx(
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, "wm-layout-grid-root", className)
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")[];
@@ -64,6 +64,7 @@ export interface ContainerPropsBase {
64
64
  layoutClassName?: string;
65
65
  layoutWidth?: string;
66
66
  layoutHeight?: string;
67
+ class?: string;
67
68
  }
68
69
  /**
69
70
  * Combined props for the WmContainer component, including base WaveMaker props.
@@ -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")[];
@@ -41,7 +41,7 @@ const WmRepeatTemplate = memo(
41
41
  "div",
42
42
  __spreadProps(__spreadValues({
43
43
  className: "app-repeat-item",
44
- hidden: !show
44
+ hidden: show === false || show === "false"
45
45
  }, removeInvalidAttributes(restProps)), {
46
46
  children
47
47
  })
@@ -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")[];