@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
@@ -29,6 +29,7 @@ export declare const WmCalendar: React.ForwardRefExoticComponent<Omit<{
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")[];
@@ -89,6 +90,7 @@ declare const _default: React.ComponentType<{
89
90
  width?: number | string;
90
91
  height?: number | string;
91
92
  className?: string;
93
+ class?: string;
92
94
  conditionalstyle?: React.CSSProperties;
93
95
  conditionalclass?: string;
94
96
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -62,6 +62,7 @@ declare const WmChipsStandalone: React.ComponentType<import("../../data/form/for
62
62
  width?: number | string;
63
63
  height?: number | string;
64
64
  className?: string;
65
+ class?: string;
65
66
  conditionalstyle?: React.CSSProperties;
66
67
  conditionalclass?: string;
67
68
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -118,6 +119,7 @@ declare const _default: React.ComponentType<{
118
119
  standalone?: boolean;
119
120
  formRef?: any;
120
121
  formKey?: string;
122
+ hideValidationMessage?: boolean;
121
123
  name: string;
122
124
  datavalue?: any;
123
125
  defaultvalue?: any;
@@ -188,6 +190,7 @@ declare const _default: React.ComponentType<{
188
190
  width?: number | string;
189
191
  height?: number | string;
190
192
  className?: string;
193
+ class?: string;
191
194
  conditionalstyle?: React.CSSProperties;
192
195
  conditionalclass?: string;
193
196
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -29,6 +29,7 @@ declare const WmColorPickerStandalone: React.ComponentType<import("../../data/fo
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")[];
@@ -81,6 +82,7 @@ declare const _default: React.ComponentType<{
81
82
  standalone?: boolean;
82
83
  formRef?: any;
83
84
  formKey?: string;
85
+ hideValidationMessage?: boolean;
84
86
  name: string;
85
87
  datavalue: any;
86
88
  defaultvalue?: any;
@@ -118,6 +120,7 @@ declare const _default: React.ComponentType<{
118
120
  width?: number | string;
119
121
  height?: number | string;
120
122
  className?: string;
123
+ class?: string;
121
124
  conditionalstyle?: React.CSSProperties;
122
125
  conditionalclass?: string;
123
126
  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")[];
@@ -10,6 +10,7 @@ const CAPTION_POSITION = {
10
10
  top: "caption-top",
11
11
  floating: "caption-floating"
12
12
  };
13
+ const getPlaceholderOption = (input) => input instanceof HTMLSelectElement ? input.querySelector("#placeholderOption") : null;
13
14
  function WmComposite(props) {
14
15
  const { children, styles, className, captionposition = "left", id, required } = props;
15
16
  const containerRef = useRef(null);
@@ -17,6 +18,11 @@ function WmComposite(props) {
17
18
  const hasInputValue = useCallback(
18
19
  (input) => {
19
20
  var _a;
21
+ if (input instanceof HTMLSelectElement) {
22
+ return Array.from(input.selectedOptions).some(
23
+ (option) => option.id !== "placeholderOption" && Boolean(option.value.trim())
24
+ );
25
+ }
20
26
  return Boolean((_a = input.value) == null ? void 0 : _a.trim());
21
27
  },
22
28
  []
@@ -32,7 +38,12 @@ function WmComposite(props) {
32
38
  const target = event.target;
33
39
  const originalPlaceholder = target.getAttribute("data-original-placeholder");
34
40
  if (originalPlaceholder) {
35
- target.setAttribute("placeholder", originalPlaceholder);
41
+ const placeholderOption = getPlaceholderOption(target);
42
+ if (placeholderOption) {
43
+ placeholderOption.textContent = originalPlaceholder;
44
+ } else {
45
+ target.setAttribute("placeholder", originalPlaceholder);
46
+ }
36
47
  }
37
48
  },
38
49
  [isFloating, toggleFloatActive]
@@ -42,21 +53,31 @@ function WmComposite(props) {
42
53
  if (!isFloating) return;
43
54
  const target = event.target;
44
55
  toggleFloatActive(hasInputValue(target));
45
- target.setAttribute("placeholder", "");
56
+ const placeholderOption = getPlaceholderOption(target);
57
+ if (placeholderOption) {
58
+ placeholderOption.textContent = "";
59
+ } else {
60
+ target.setAttribute("placeholder", "");
61
+ }
46
62
  },
47
63
  [isFloating, toggleFloatActive, hasInputValue]
48
64
  );
49
65
  useEffect(() => {
50
66
  if (!isFloating || !containerRef.current) return;
51
67
  const container = containerRef.current;
52
- const INPUT_SELECTOR = "input, select, textarea";
68
+ const INPUT_SELECTOR = 'input, select, textarea:not([aria-hidden="true"])';
53
69
  const inputElements = container.querySelectorAll(INPUT_SELECTOR);
54
70
  if (inputElements.length === 0) return;
55
71
  inputElements.forEach((input) => {
56
- const originalPlaceholder = input.getAttribute("placeholder");
72
+ const placeholderOption = getPlaceholderOption(input);
73
+ const originalPlaceholder = (placeholderOption == null ? void 0 : placeholderOption.textContent) || input.getAttribute("placeholder");
57
74
  if (originalPlaceholder) {
58
75
  input.setAttribute("data-original-placeholder", originalPlaceholder);
59
- input.setAttribute("placeholder", "");
76
+ if (placeholderOption) {
77
+ placeholderOption.textContent = "";
78
+ } else {
79
+ input.setAttribute("placeholder", "");
80
+ }
60
81
  }
61
82
  if (hasInputValue(input)) {
62
83
  toggleFloatActive(true);
@@ -68,7 +89,12 @@ function WmComposite(props) {
68
89
  inputElements.forEach((input) => {
69
90
  const originalPlaceholder = input.getAttribute("data-original-placeholder");
70
91
  if (originalPlaceholder) {
71
- input.setAttribute("placeholder", originalPlaceholder);
92
+ const placeholderOption = getPlaceholderOption(input);
93
+ if (placeholderOption) {
94
+ placeholderOption.textContent = originalPlaceholder;
95
+ } else {
96
+ input.setAttribute("placeholder", originalPlaceholder);
97
+ }
72
98
  input.removeAttribute("data-original-placeholder");
73
99
  }
74
100
  input.removeEventListener("focus", handleFocus);
@@ -93,6 +93,7 @@ declare const _default: React.ComponentType<{
93
93
  standalone?: boolean;
94
94
  formRef?: any;
95
95
  formKey?: string;
96
+ hideValidationMessage?: boolean;
96
97
  name: string;
97
98
  datavalue?: any;
98
99
  defaultvalue?: any;
@@ -28,6 +28,7 @@ declare const WmCheckboxStandalone: React.ComponentType<import("../../../data/fo
28
28
  width?: number | string;
29
29
  height?: number | string;
30
30
  className?: string;
31
+ class?: string;
31
32
  conditionalstyle?: React.CSSProperties;
32
33
  conditionalclass?: string;
33
34
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -83,6 +84,7 @@ declare const _default: React.ComponentType<{
83
84
  standalone?: boolean;
84
85
  formRef?: any;
85
86
  formKey?: string;
87
+ hideValidationMessage?: boolean;
86
88
  name: string;
87
89
  datavalue?: any;
88
90
  defaultvalue?: any;
@@ -119,6 +121,7 @@ declare const _default: React.ComponentType<{
119
121
  width?: number | string;
120
122
  height?: number | string;
121
123
  className?: string;
124
+ class?: string;
122
125
  conditionalstyle?: React.CSSProperties;
123
126
  conditionalclass?: string;
124
127
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -50,6 +50,7 @@ declare const WmCheckboxsetStandalone: React.ComponentType<import("../../../data
50
50
  padding?: string;
51
51
  margin?: string;
52
52
  className?: string;
53
+ class?: string;
53
54
  conditionalstyle?: React.CSSProperties;
54
55
  conditionalclass?: string;
55
56
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -103,6 +104,7 @@ declare const _default: React.ComponentType<{
103
104
  standalone?: boolean;
104
105
  formRef?: any;
105
106
  formKey?: string;
107
+ hideValidationMessage?: boolean;
106
108
  name: string;
107
109
  datavalue?: any;
108
110
  defaultvalue?: any;
@@ -160,6 +162,7 @@ declare const _default: React.ComponentType<{
160
162
  padding?: string;
161
163
  margin?: string;
162
164
  className?: string;
165
+ class?: string;
163
166
  conditionalstyle?: React.CSSProperties;
164
167
  conditionalclass?: string;
165
168
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -43,6 +43,7 @@ declare const WmRadiosetStandalone: React.ComponentType<import("../../../data/fo
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")[];
@@ -98,6 +99,7 @@ declare const _default: React.ComponentType<{
98
99
  standalone?: boolean;
99
100
  formRef?: any;
100
101
  formKey?: string;
102
+ hideValidationMessage?: boolean;
101
103
  name: string;
102
104
  datavalue?: any;
103
105
  defaultvalue?: any;
@@ -149,6 +151,7 @@ declare const _default: React.ComponentType<{
149
151
  width?: number | string;
150
152
  height?: number | string;
151
153
  className?: string;
154
+ class?: string;
152
155
  conditionalstyle?: React.CSSProperties;
153
156
  conditionalclass?: string;
154
157
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -43,6 +43,7 @@ declare const WmSwitchStandalone: React.ComponentType<import("../../../data/form
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")[];
@@ -95,6 +96,7 @@ declare const _default: React.ComponentType<{
95
96
  standalone?: boolean;
96
97
  formRef?: any;
97
98
  formKey?: string;
99
+ hideValidationMessage?: boolean;
98
100
  name: string;
99
101
  datavalue?: any;
100
102
  defaultvalue?: any;
@@ -145,6 +147,7 @@ declare const _default: React.ComponentType<{
145
147
  width?: number | string;
146
148
  height?: number | string;
147
149
  className?: string;
150
+ class?: string;
148
151
  conditionalstyle?: React.CSSProperties;
149
152
  conditionalclass?: string;
150
153
  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")[];
@@ -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")[];
@@ -122,9 +122,11 @@ const WmDateTime = memo(
122
122
  const [datePickerView, setDatePickerView] = useState("day");
123
123
  const [isCurrentMonth, setIsCurrentMonth] = useState(true);
124
124
  const [validationFailureMessage, setValidationFailureMessage] = useState("");
125
+ const [isDirty, setIsDirty] = useState(false);
125
126
  const inputRef = useRef(null);
126
127
  const onBeforeloadExecutedRef = useRef(false);
127
128
  const anchorRef = useRef(null);
129
+ const showValidationError = isDirty && Boolean(validationFailureMessage || invalidFormat || dateNotInRange);
128
130
  const isReadOnly = useMemo(
129
131
  () => readonly || isCurrentDate || dataentrymode !== "undefined" && dataentrymode !== "default",
130
132
  [readonly, dataentrymode, isCurrentDate]
@@ -241,6 +243,7 @@ const WmDateTime = memo(
241
243
  );
242
244
  const handleDateSelection = useCallback(
243
245
  (date) => {
246
+ setIsDirty(true);
244
247
  if (!date) {
245
248
  handleFinalDateChange(null);
246
249
  setIsDateOpen(false);
@@ -300,6 +303,7 @@ const WmDateTime = memo(
300
303
  }, []);
301
304
  const handleTimeSelection = useCallback(
302
305
  (time) => {
306
+ setIsDirty(true);
303
307
  if (!time || !tempDateValue) return;
304
308
  const combinedDateTime = moment(tempDateValue).hour(moment(time).hour()).minute(moment(time).minute()).second(moment(time).second()).toDate();
305
309
  setLocalDateValue(combinedDateTime);
@@ -328,6 +332,7 @@ const WmDateTime = memo(
328
332
  (event) => {
329
333
  var _a2, _b2;
330
334
  if (dataentrymode === "picker") return;
335
+ setIsDirty(true);
331
336
  const value = event.target.value;
332
337
  setDisplayValue(value);
333
338
  if (!value) {
@@ -433,11 +438,13 @@ const WmDateTime = memo(
433
438
  [excludedDaysArray, excludedDatesArray]
434
439
  );
435
440
  const handleToday = useCallback(() => {
441
+ setIsDirty(true);
436
442
  const today = moment().toDate();
437
443
  handleFinalDateChange(today);
438
444
  setIsTimeOpen(true);
439
445
  }, [handleFinalDateChange]);
440
446
  const handleClear = useCallback(() => {
447
+ setIsDirty(true);
441
448
  handleFinalDateChange(null);
442
449
  }, [handleFinalDateChange]);
443
450
  useEffect(() => {
@@ -565,6 +572,7 @@ const WmDateTime = memo(
565
572
  onBlur: (event) => {
566
573
  var _a2;
567
574
  if (readonly) return;
575
+ setIsDirty(true);
568
576
  onBlur && name && onBlur(event, (_a2 = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a2[name]);
569
577
  },
570
578
  onChange: handleInputChange,
@@ -578,18 +586,20 @@ const WmDateTime = memo(
578
586
  },
579
587
  autoFocus: autofocus,
580
588
  required,
581
- error: Boolean(validationFailureMessage || invalidFormat || dateNotInRange),
582
- helperText: validationFailureMessage || (invalidFormat ? validationmessage || "Invalid date format" : dateNotInRange ? validationmessage || "Date not in valid range" : ""),
589
+ error: showValidationError,
590
+ helperText: showValidationError ? validationFailureMessage || (invalidFormat ? validationmessage || "Invalid date format" : dateNotInRange ? validationmessage || "Date not in valid range" : "") : "",
583
591
  InputProps: {
584
592
  readOnly: isReadOnly,
585
593
  placeholder: floatinglabel ? void 0 : placeholder
586
594
  },
587
595
  InputLabelProps: {
588
596
  shrink: floatinglabel ? void 0 : false,
589
- className: floatinglabel ? "wm-datetime-input-label" : void 0
597
+ className: floatinglabel ? "wm-datetime-input-label" : void 0,
598
+ sx: floatinglabel ? { ".app-composite-widget.caption-floating &": { display: "none" } } : void 0
590
599
  },
591
600
  inputProps: __spreadValues(__spreadValues({
592
601
  accessKey: shortcutkey,
602
+ "aria-label": arialabel || floatinglabel,
593
603
  "aria-invalid": invalidFormat || dateNotInRange,
594
604
  className: "form-control app-textbox display-input wm-datetime-html-input"
595
605
  }, disabled ? { disabled: true } : {}), readonly ? { readOnly: true } : {}),
@@ -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")[];
@@ -52,6 +52,7 @@ declare const _default: React.ComponentType<{
52
52
  width?: number | string;
53
53
  height?: number | string;
54
54
  className?: string;
55
+ class?: string;
55
56
  conditionalstyle?: React.CSSProperties;
56
57
  conditionalclass?: string;
57
58
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -250,7 +250,8 @@ const WmFileUpload = memo(
250
250
  "onDelete",
251
251
  "onBeforedelete",
252
252
  "onError",
253
- "hidden"
253
+ "hidden",
254
+ "className"
254
255
  ];
255
256
  const propsChanged = keysToCheck.some((key) => prevProps[key] !== nextProps[key]);
256
257
  const filesChanged = prevProps.datasource !== nextProps.datasource || prevProps.deletedatasource !== nextProps.deletedatasource;
@@ -35,6 +35,7 @@ declare const WmNumberStandalone: React.ComponentType<import("../../data/form/fo
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")[];
@@ -88,6 +89,7 @@ declare const _default: React.ComponentType<{
88
89
  standalone?: boolean;
89
90
  formRef?: any;
90
91
  formKey?: string;
92
+ hideValidationMessage?: boolean;
91
93
  name: string;
92
94
  datavalue?: any;
93
95
  defaultvalue?: any;
@@ -132,6 +134,7 @@ declare const _default: React.ComponentType<{
132
134
  width?: number | string;
133
135
  height?: number | string;
134
136
  className?: string;
137
+ class?: string;
135
138
  conditionalstyle?: React.CSSProperties;
136
139
  conditionalclass?: string;
137
140
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -56,6 +56,7 @@ declare const WmRatingStandalone: React.ComponentType<import("../../data/form/fo
56
56
  width?: number | string;
57
57
  height?: number | string;
58
58
  className?: string;
59
+ class?: string;
59
60
  conditionalstyle?: React.CSSProperties;
60
61
  conditionalclass?: string;
61
62
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -112,6 +113,7 @@ declare const _default: React.ComponentType<{
112
113
  standalone?: boolean;
113
114
  formRef?: any;
114
115
  formKey?: string;
116
+ hideValidationMessage?: boolean;
115
117
  name: string;
116
118
  datavalue?: any;
117
119
  defaultvalue?: any;
@@ -176,6 +178,7 @@ declare const _default: React.ComponentType<{
176
178
  width?: number | string;
177
179
  height?: number | string;
178
180
  className?: string;
181
+ class?: string;
179
182
  conditionalstyle?: React.CSSProperties;
180
183
  conditionalclass?: string;
181
184
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -92,6 +92,7 @@ declare const _default: React.ComponentType<{
92
92
  standalone?: boolean;
93
93
  formRef?: any;
94
94
  formKey?: string;
95
+ hideValidationMessage?: boolean;
95
96
  name: string;
96
97
  datavalue?: any;
97
98
  defaultvalue?: any;
@@ -30,6 +30,7 @@ declare const WmSliderStandalone: React.ComponentType<import("../../data/form/fo
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")[];
@@ -88,6 +89,7 @@ declare const _default: React.ComponentType<{
88
89
  standalone?: boolean;
89
90
  formRef?: any;
90
91
  formKey?: string;
92
+ hideValidationMessage?: boolean;
91
93
  name: string;
92
94
  datavalue?: any;
93
95
  defaultvalue?: any;
@@ -129,6 +131,7 @@ declare const _default: React.ComponentType<{
129
131
  width?: number | string;
130
132
  height?: number | string;
131
133
  className?: string;
134
+ class?: string;
132
135
  conditionalstyle?: React.CSSProperties;
133
136
  conditionalclass?: string;
134
137
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -41,6 +41,7 @@ declare const WmTextStandalone: import("react").ComponentType<import("../../data
41
41
  width?: number | string;
42
42
  height?: number | string;
43
43
  className?: string;
44
+ class?: string;
44
45
  conditionalstyle?: import("react").CSSProperties;
45
46
  conditionalclass?: string;
46
47
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -97,6 +98,7 @@ declare const _default: import("react").ComponentType<{
97
98
  standalone?: boolean;
98
99
  formRef?: any;
99
100
  formKey?: string;
101
+ hideValidationMessage?: boolean;
100
102
  name: string;
101
103
  datavalue?: any;
102
104
  defaultvalue?: any;
@@ -146,6 +148,7 @@ declare const _default: import("react").ComponentType<{
146
148
  width?: number | string;
147
149
  height?: number | string;
148
150
  className?: string;
151
+ class?: string;
149
152
  conditionalstyle?: import("react").CSSProperties;
150
153
  conditionalclass?: string;
151
154
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -84,11 +84,13 @@ const WmText = memo(
84
84
  const [isTouched, setIsTouched] = useState(false);
85
85
  const [isAutofilled, setIsAutofilled] = useState(false);
86
86
  const ref = useRef(null);
87
+ const wrapperRef = useRef(null);
87
88
  const cursorPositionRef = useRef(0);
88
89
  const displayError = error || isDirty && showError;
89
90
  const isInternalChange = useRef(false);
90
91
  const prevValueRef = useRef(datavalue);
91
92
  useEffect(() => {
93
+ var _a, _b, _c;
92
94
  const normalizedValue = sanitizeInputValue(datavalue);
93
95
  if (!isInternalChange.current && normalizedValue !== rawValue) {
94
96
  setRawValue(normalizedValue);
@@ -100,6 +102,12 @@ const WmText = memo(
100
102
  if (datavalue === "" || datavalue === null || datavalue === void 0) {
101
103
  setIsAutofilled(false);
102
104
  }
105
+ const type_attr = (_a = wrapperRef.current) == null ? void 0 : _a.getAttribute("type");
106
+ if (type && !type_attr) {
107
+ (_b = wrapperRef.current) == null ? void 0 : _b.setAttribute("type", type);
108
+ } else {
109
+ (_c = wrapperRef.current) == null ? void 0 : _c.removeAttribute("type");
110
+ }
103
111
  }, [datavalue]);
104
112
  const validateInput = useCallback(
105
113
  (value) => {
@@ -360,6 +368,7 @@ const WmText = memo(
360
368
  return /* @__PURE__ */ jsx(
361
369
  TextField,
362
370
  __spreadProps(__spreadValues({}, events), {
371
+ ref: wrapperRef,
363
372
  hidden: props.hidden,
364
373
  title: hint || "Text Input",
365
374
  name,
@@ -399,7 +408,6 @@ const WmText = memo(
399
408
  name: "leadingIcon",
400
409
  className: "btn-leading-icon",
401
410
  onClick: handleLeadingIconClick,
402
- "aria-hidden": "true",
403
411
  tabIndex: -1,
404
412
  children: /* @__PURE__ */ jsx(
405
413
  WmAppIcon,
@@ -418,7 +426,6 @@ const WmText = memo(
418
426
  name: "trailingIcon",
419
427
  className: "btn-trailing-icon",
420
428
  onClick: handleTrailingIconClick,
421
- "aria-hidden": "true",
422
429
  tabIndex: -1,
423
430
  children: /* @__PURE__ */ jsx(
424
431
  WmAppIcon,
@@ -27,6 +27,7 @@ declare const WmTextareaStandalone: React.ComponentType<import("../../data/form/
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")[];
@@ -82,6 +83,7 @@ declare const _default: React.ComponentType<{
82
83
  standalone?: boolean;
83
84
  formRef?: any;
84
85
  formKey?: string;
86
+ hideValidationMessage?: boolean;
85
87
  name: string;
86
88
  datavalue?: any;
87
89
  defaultvalue?: any;
@@ -117,6 +119,7 @@ declare const _default: React.ComponentType<{
117
119
  width?: number | string;
118
120
  height?: number | string;
119
121
  className?: string;
122
+ class?: string;
120
123
  conditionalstyle?: React.CSSProperties;
121
124
  conditionalclass?: string;
122
125
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -21,6 +21,7 @@ declare const WithForm: React.NamedExoticComponent<import("../../data/form/form-
21
21
  width?: number | string;
22
22
  height?: number | string;
23
23
  className?: string;
24
+ class?: string;
24
25
  conditionalstyle?: React.CSSProperties;
25
26
  conditionalclass?: string;
26
27
  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;
@@ -106,6 +108,7 @@ declare const _default: React.ComponentType<{
106
108
  width?: number | string;
107
109
  height?: number | string;
108
110
  className?: string;
111
+ class?: string;
109
112
  conditionalstyle?: React.CSSProperties;
110
113
  conditionalclass?: string;
111
114
  showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
@@ -1,10 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import { Box } from "@mui/material";
4
+ import { PartialContentWrapper } from "../../common";
4
5
  const DEFAULT_CLASS = "app-footer clearfix";
5
6
  const WmFooter = (props) => {
6
- const { styles, children, render, className, id } = props;
7
- return /* @__PURE__ */ jsx(Box, { component: "div", sx: styles, className: clsx(DEFAULT_CLASS, className), id, children: render ? render(props) : children });
7
+ const { styles, children, render, className, id, content } = props;
8
+ const rendered = render ? render(props) : children;
9
+ return /* @__PURE__ */ jsx(Box, { component: "div", sx: styles, className: clsx(DEFAULT_CLASS, className), id, children: /* @__PURE__ */ jsx(PartialContentWrapper, { content, children: rendered }) });
8
10
  };
9
11
  WmFooter.displayName = "WmFooter";
10
12
  var footer_default = WmFooter;
@@ -3,6 +3,7 @@ export interface FooterProps {
3
3
  className?: string;
4
4
  styles?: React.CSSProperties;
5
5
  id?: string;
6
+ content?: string;
6
7
  render?: (props: Record<string, any>) => React.ReactNode;
7
8
  }
8
9
  export type WmFooterProps = FooterProps;
@@ -1,10 +1,36 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useContext } from "react";
2
3
  import clsx from "clsx";
3
4
  import Box from "@mui/material/Box";
5
+ import IconButton from "@mui/material/IconButton";
6
+ import { PartialContentWrapper } from "../../common";
7
+ import { PageLayoutContext } from "../../page/page-context";
4
8
  const DEFAULT_CLASS = "app-header clearfix app-header-shrink";
5
9
  const WmHeader = (props) => {
6
- const { styles, children, render, className, id } = props;
7
- return /* @__PURE__ */ jsx(Box, { component: "header", className: clsx(DEFAULT_CLASS, className), id, sx: styles, children: /* @__PURE__ */ jsx(Box, { component: "div", className: "app-header-container", children: render ? render(props) : children }) });
10
+ const { styles, children, render, className, id, content } = props;
11
+ const {
12
+ hasLeftPanel,
13
+ leftPanelExpanded = false,
14
+ toggleLeftPanel
15
+ } = useContext(PageLayoutContext);
16
+ const rendered = render ? render(props) : children;
17
+ const handleLeftNavToggle = (event) => {
18
+ event.stopPropagation();
19
+ toggleLeftPanel == null ? void 0 : toggleLeftPanel();
20
+ };
21
+ return /* @__PURE__ */ jsxs(Box, { component: "header", className: clsx(DEFAULT_CLASS, className), id, sx: styles, children: [
22
+ hasLeftPanel && /* @__PURE__ */ jsx(Box, { component: "div", className: "app-header-menu", "data-role": "page-left-panel-icon", children: /* @__PURE__ */ jsx(
23
+ IconButton,
24
+ {
25
+ className: "app-header-action btn-text",
26
+ "aria-expanded": leftPanelExpanded,
27
+ "aria-label": "Expand Left navigation",
28
+ onClick: handleLeftNavToggle,
29
+ children: /* @__PURE__ */ jsx("i", { className: "wi wi-menu", "aria-hidden": "true" })
30
+ }
31
+ ) }),
32
+ /* @__PURE__ */ jsx(Box, { component: "div", className: "app-header-container", children: /* @__PURE__ */ jsx(PartialContentWrapper, { content, children: rendered }) })
33
+ ] });
8
34
  };
9
35
  WmHeader.displayName = "WmHeader";
10
36
  var header_default = WmHeader;