@wavemaker-ai/react-runtime 1.0.0-rc.317 → 1.0.0-rc.319

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 (163) hide show
  1. package/components/advanced/carousel/index.d.ts +2 -0
  2. package/components/advanced/carousel/template.d.ts +2 -0
  3. package/components/advanced/login/index.d.ts +2 -0
  4. package/components/advanced/marquee/index.d.ts +2 -0
  5. package/components/auth/RoleAuthGuard.js +1 -0
  6. package/components/basic/anchor/index.d.ts +2 -0
  7. package/components/basic/anchor/index.js +1 -1
  8. package/components/basic/audio/index.d.ts +2 -0
  9. package/components/basic/html/index.d.ts +2 -0
  10. package/components/basic/icon/index.d.ts +2 -0
  11. package/components/basic/iframe/index.d.ts +2 -0
  12. package/components/basic/label/index.d.ts +2 -0
  13. package/components/basic/label/index.js +17 -3
  14. package/components/basic/picture/index.d.ts +2 -0
  15. package/components/basic/picture/index.js +20 -1
  16. package/components/basic/progress-bar/index.d.ts +2 -0
  17. package/components/basic/progress-circle/index.d.ts +2 -0
  18. package/components/basic/progress-circle/index.js +2 -1
  19. package/components/basic/richtexteditor/index.d.ts +4 -0
  20. package/components/basic/richtexteditor/index.js +16 -15
  21. package/components/basic/search/index.d.ts +4 -0
  22. package/components/basic/spinner/index.d.ts +2 -0
  23. package/components/basic/tile/index.d.ts +2 -0
  24. package/components/basic/tree/index.d.ts +2 -0
  25. package/components/basic/video/index.d.ts +2 -0
  26. package/components/chart/index.d.ts +2 -0
  27. package/components/common/index.d.ts +2 -0
  28. package/components/common/index.js +5 -1
  29. package/components/common/wm-skeleton.d.ts +95 -0
  30. package/components/common/wm-skeleton.js +346 -0
  31. package/components/container/accordion/accordion-pane/index.d.ts +2 -0
  32. package/components/container/accordion/index.d.ts +4 -0
  33. package/components/container/accordion/index.js +23 -1
  34. package/components/container/accordion/props.d.ts +10 -0
  35. package/components/container/index.d.ts +2 -0
  36. package/components/container/index.js +2 -4
  37. package/components/container/layout-grid/grid-column/index.d.ts +2 -0
  38. package/components/container/layout-grid/grid-row/index.d.ts +2 -0
  39. package/components/container/layout-grid/index.d.ts +2 -0
  40. package/components/container/linear-layout/index.d.ts +2 -0
  41. package/components/container/linear-layout/linear-layout-item/index.d.ts +2 -0
  42. package/components/container/panel/index.d.ts +2 -0
  43. package/components/container/repeat-template/index.d.ts +2 -0
  44. package/components/container/tabs/index.d.ts +4 -0
  45. package/components/container/tabs/index.js +23 -1
  46. package/components/container/tabs/props.d.ts +10 -0
  47. package/components/container/tabs/tab-pane/index.d.ts +2 -0
  48. package/components/container/wizard/index.d.ts +8 -0
  49. package/components/container/wizard/index.js +27 -3
  50. package/components/container/wizard/props.d.ts +10 -0
  51. package/components/container/wizard/wizard-step/index.d.ts +2 -0
  52. package/components/data/card/card-actions/index.d.ts +2 -0
  53. package/components/data/card/card-content/index.d.ts +2 -0
  54. package/components/data/card/card-footer/index.d.ts +2 -0
  55. package/components/data/card/index.d.ts +2 -0
  56. package/components/data/card/index.js +12 -6
  57. package/components/data/form/base-form/hooks/useFormOperations.d.ts +1 -1
  58. package/components/data/form/base-form/hooks/useFormOperations.js +3 -3
  59. package/components/data/form/base-form/index.js +30 -25
  60. package/components/data/form/base-form/props.d.ts +1 -1
  61. package/components/data/form/dynamic-fields/index.js +3 -0
  62. package/components/data/form/form-action/index.d.ts +4 -0
  63. package/components/data/form/form-controller/hooks/index.js +2 -1
  64. package/components/data/form/form-controller/withFormController.js +11 -16
  65. package/components/data/form/form-field/base-field.js +0 -5
  66. package/components/data/form/form-field/index.js +99 -13
  67. package/components/data/form/form-field/props.d.ts +8 -0
  68. package/components/data/form/index.js +13 -0
  69. package/components/data/list/index.d.ts +7 -0
  70. package/components/data/list/index.js +18 -0
  71. package/components/data/list/props.d.ts +7 -0
  72. package/components/data/table/components/RowCells.js +4 -1
  73. package/components/data/table/hooks/useDynamicColumns.js +3 -1
  74. package/components/data/table/hooks/useResponsiveColumns.d.ts +2 -0
  75. package/components/data/table/index.d.ts +8 -0
  76. package/components/data/table/index.js +15 -0
  77. package/components/data/table/live-table/index.d.ts +2 -0
  78. package/components/data/table/props.d.ts +10 -0
  79. package/components/data/table/table-action/index.d.ts +2 -0
  80. package/components/data/table/table-column/index.d.ts +2 -0
  81. package/components/data/table/table-row/index.d.ts +2 -0
  82. package/components/data/table/table-row-action/index.d.ts +2 -0
  83. package/components/data/table/utils/index.d.ts +2 -0
  84. package/components/data/table/utils/index.js +17 -3
  85. package/components/dialogs/alert-dialog/index.d.ts +4 -0
  86. package/components/dialogs/confirm-dialog/index.d.ts +4 -0
  87. package/components/dialogs/dialog/index.d.ts +4 -0
  88. package/components/dialogs/dialog-actions/index.d.ts +2 -0
  89. package/components/dialogs/dialog-body/index.d.ts +2 -0
  90. package/components/dialogs/dialog-content/index.d.ts +2 -0
  91. package/components/dialogs/dialog-header/index.d.ts +2 -0
  92. package/components/dialogs/iframe-dialog/index.d.ts +4 -0
  93. package/components/dialogs/login-dialog/index.d.ts +4 -0
  94. package/components/dialogs/page-dialog/index.d.ts +4 -0
  95. package/components/form/button/index.d.ts +2 -0
  96. package/components/form/button/index.js +10 -1
  97. package/components/form/button-group/index.d.ts +2 -0
  98. package/components/input/calendar/index.d.ts +4 -0
  99. package/components/input/calendar/index.js +2 -1
  100. package/components/input/chips/index.d.ts +4 -0
  101. package/components/input/color-picker/index.d.ts +4 -0
  102. package/components/input/color-picker/index.js +18 -7
  103. package/components/input/composite/index.d.ts +2 -0
  104. package/components/input/currency/index.d.ts +4 -0
  105. package/components/input/default/checkbox/index.d.ts +4 -0
  106. package/components/input/default/checkboxset/index.d.ts +4 -0
  107. package/components/input/default/checkboxset/index.js +7 -5
  108. package/components/input/default/radioset/index.d.ts +4 -0
  109. package/components/input/default/radioset/index.js +2 -1
  110. package/components/input/default/switch/index.d.ts +4 -0
  111. package/components/input/default/switch/index.js +17 -13
  112. package/components/input/epoch/date/index.d.ts +2 -0
  113. package/components/input/epoch/date/index.js +30 -14
  114. package/components/input/epoch/datetime/index.d.ts +2 -0
  115. package/components/input/epoch/datetime/index.js +12 -8
  116. package/components/input/epoch/time/index.d.ts +2 -0
  117. package/components/input/epoch/time/index.js +21 -15
  118. package/components/input/fileupload/index.d.ts +2 -0
  119. package/components/input/number/index.d.ts +4 -0
  120. package/components/input/number/index.js +4 -3
  121. package/components/input/rating/index.d.ts +4 -0
  122. package/components/input/select/index.d.ts +4 -0
  123. package/components/input/slider/index.d.ts +4 -0
  124. package/components/input/slider/index.js +4 -2
  125. package/components/input/text/index.d.ts +4 -0
  126. package/components/input/text/index.js +16 -8
  127. package/components/input/textarea/index.d.ts +4 -0
  128. package/components/input/upload/index.d.ts +4 -0
  129. package/components/input/upload/index.js +6 -4
  130. package/components/navbar/index.d.ts +2 -0
  131. package/components/navbar/nav/index.d.ts +2 -0
  132. package/components/navbar/nav-item/index.d.ts +2 -0
  133. package/components/navigation/breadcrumb/index.d.ts +2 -0
  134. package/components/navigation/menu/index.d.ts +2 -0
  135. package/components/navigation/menu/index.js +2 -2
  136. package/components/navigation/popover/index.d.ts +2 -0
  137. package/components/page/partial/index.d.ts +2 -0
  138. package/context/AppContext.d.ts +2 -0
  139. package/context/AppContext.js +20 -1
  140. package/context/WidgetProvider.js +0 -3
  141. package/core/proxy-service.d.ts +2 -0
  142. package/core/proxy-service.js +25 -0
  143. package/higherOrder/BaseApp.js +1 -3
  144. package/higherOrder/BaseAppProps.d.ts +1 -1
  145. package/higherOrder/BasePage.js +4 -2
  146. package/higherOrder/props.d.ts +10 -0
  147. package/higherOrder/withBaseWrapper.js +3 -0
  148. package/hooks/useAuth.js +3 -0
  149. package/hooks/useLayoutSize.d.ts +6 -0
  150. package/hooks/useLayoutSize.js +12 -0
  151. package/package-lock.json +225 -199
  152. package/package.json +3 -3
  153. package/runtime-dynamic/components/use-dynamic-component.js +6 -11
  154. package/runtime-dynamic/main.js +1 -3
  155. package/runtime-dynamic/services/component-ref-provider.d.ts +1 -1
  156. package/runtime-dynamic/services/component-ref-provider.js +14 -11
  157. package/runtime-dynamic/services/resource-manager.js +10 -4
  158. package/runtime-dynamic/services/script-executor.js +4 -1
  159. package/runtime-dynamic/services/variable-registry.js +3 -0
  160. package/utils/attr.js +0 -1
  161. package/utils/format-util.js +2 -3
  162. package/utils/form-state.util.d.ts +0 -62
  163. package/utils/form-state.util.js +0 -109
@@ -68,5 +68,7 @@ declare const _default: React.ComponentType<{
68
68
  formfield?: boolean;
69
69
  updateon?: string;
70
70
  prefabName?: string;
71
+ loading?: boolean;
72
+ showSkeleton?: boolean;
71
73
  }>;
72
74
  export default _default;
@@ -68,5 +68,7 @@ declare const _default: React.ComponentType<{
68
68
  updateon?: string;
69
69
  dataset?: any;
70
70
  prefabName?: string;
71
+ loading?: boolean;
72
+ showSkeleton?: boolean;
71
73
  }>;
72
74
  export default _default;
@@ -71,5 +71,7 @@ declare const _default: React.ComponentType<{
71
71
  updateon?: string;
72
72
  dataset?: any;
73
73
  prefabName?: string;
74
+ loading?: boolean;
75
+ showSkeleton?: boolean;
74
76
  }>;
75
77
  export default _default;
@@ -64,5 +64,7 @@ declare const _default: React.ComponentType<{
64
64
  updateon?: string;
65
65
  dataset?: any;
66
66
  prefabName?: string;
67
+ loading?: boolean;
68
+ showSkeleton?: boolean;
67
69
  }>;
68
70
  export default _default;
@@ -34,6 +34,7 @@ function RoleAuthGuard({ children }) {
34
34
  useEffect(() => {
35
35
  var _a, _b, _c;
36
36
  if (isSecurityEnabled === void 0) {
37
+ setHasAccess(true);
37
38
  return;
38
39
  }
39
40
  if (!isSecurityEnabled) {
@@ -79,5 +79,7 @@ declare const _default: import("react").ComponentType<{
79
79
  updateon?: string;
80
80
  dataset?: any;
81
81
  prefabName?: string;
82
+ loading?: boolean;
83
+ showSkeleton?: boolean;
82
84
  }>;
83
85
  export default _default;
@@ -227,7 +227,7 @@ const WmAnchor = (props) => {
227
227
  ),
228
228
  iconclass && /* @__PURE__ */ jsx("i", { className: clsx("app-icon", "wm-anchor-icon-media", iconclass), "aria-hidden": "true" }),
229
229
  caption && /* @__PURE__ */ jsxs(Fragment, { children: [
230
- /* @__PURE__ */ jsx(Box, { component: "span", className: "sr-only", children: `${caption} ${(_b = listener == null ? void 0 : listener.appLocale) == null ? void 0 : _b.LABEL_ICON}` }),
230
+ iconclass && /* @__PURE__ */ jsx(Box, { component: "span", className: "sr-only", children: `${caption} ${(_b = listener == null ? void 0 : listener.appLocale) == null ? void 0 : _b.LABEL_ICON}` }),
231
231
  /* @__PURE__ */ jsx(Box, { component: "span", className: "anchor-caption", children: caption })
232
232
  ] }),
233
233
  badgevalue && /* @__PURE__ */ jsx(
@@ -68,5 +68,7 @@ declare const _default: React.ComponentType<{
68
68
  formfield?: boolean;
69
69
  updateon?: string;
70
70
  dataset?: any;
71
+ loading?: boolean;
72
+ showSkeleton?: boolean;
71
73
  }>;
72
74
  export default _default;
@@ -65,5 +65,7 @@ declare const _default: React.ComponentType<{
65
65
  updateon?: string;
66
66
  dataset?: any;
67
67
  prefabName?: string;
68
+ loading?: boolean;
69
+ showSkeleton?: boolean;
68
70
  }>;
69
71
  export default _default;
@@ -67,5 +67,7 @@ declare const _default: React.ComponentType<{
67
67
  updateon?: string;
68
68
  dataset?: any;
69
69
  prefabName?: string;
70
+ loading?: boolean;
71
+ showSkeleton?: boolean;
70
72
  }>;
71
73
  export default _default;
@@ -63,5 +63,7 @@ declare const _default: React.ComponentType<{
63
63
  updateon?: string;
64
64
  dataset?: any;
65
65
  prefabName?: string;
66
+ loading?: boolean;
67
+ showSkeleton?: boolean;
66
68
  }>;
67
69
  export default _default;
@@ -68,5 +68,7 @@ declare const _default: React.ComponentType<{
68
68
  updateon?: string;
69
69
  dataset?: any;
70
70
  prefabName?: string;
71
+ loading?: boolean;
72
+ showSkeleton?: boolean;
71
73
  }>;
72
74
  export default _default;
@@ -36,6 +36,11 @@ import DOMPurify from "dompurify";
36
36
  import Box from "@mui/material/Box";
37
37
  import { withBaseWrapper } from "../../../higherOrder/withBaseWrapper";
38
38
  import { removeInvalidAttributes } from "../../../utils/attr";
39
+ import {
40
+ WmSkeleton,
41
+ SKELETON_REGISTRY,
42
+ shouldShowSkeleton
43
+ } from "../../common/wm-skeleton";
39
44
  const DEFAULT_CLASS = "app-label";
40
45
  const containsHTML = (text) => {
41
46
  return /<[^>]*>/g.test(text);
@@ -71,7 +76,9 @@ const WmLabel = memo(
71
76
  onClick,
72
77
  listener,
73
78
  variant = "default:p",
74
- viewParent
79
+ viewParent,
80
+ loading,
81
+ showSkeleton
75
82
  } = _a, rest = __objRest(_a, [
76
83
  "required",
77
84
  "trustAs",
@@ -85,8 +92,13 @@ const WmLabel = memo(
85
92
  "onClick",
86
93
  "listener",
87
94
  "variant",
88
- "viewParent"
95
+ "viewParent",
96
+ "loading",
97
+ "showSkeleton"
89
98
  ]);
99
+ if (shouldShowSkeleton(loading, showSkeleton)) {
100
+ return /* @__PURE__ */ jsx(WmSkeleton, __spreadProps(__spreadValues({}, SKELETON_REGISTRY["WmLabel"]), { className, styles }));
101
+ }
90
102
  const hasCaptionProp = Object.prototype.hasOwnProperty.call(props, "caption");
91
103
  const safeCaption = hasCaptionProp ? caption : "Label";
92
104
  const captionString = (_c = typeof safeCaption === "string" ? safeCaption : (_b = JSON.stringify(safeCaption)) != null ? _b : "") == null ? void 0 : _c.replace(/&nbsp;|undefined|null/gi, " ");
@@ -154,7 +166,9 @@ const WmLabel = memo(
154
166
  "styles",
155
167
  "className",
156
168
  "hint",
157
- "hidden"
169
+ "hidden",
170
+ "loading",
171
+ "showSkeleton"
158
172
  ];
159
173
  return keys.every((key) => prev[key] === current[key]);
160
174
  }
@@ -71,5 +71,7 @@ declare const _default: React.ComponentType<{
71
71
  formfield?: boolean;
72
72
  updateon?: string;
73
73
  dataset?: any;
74
+ loading?: boolean;
75
+ showSkeleton?: boolean;
74
76
  }>;
75
77
  export default _default;
@@ -33,6 +33,11 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
33
33
  import { memo, useEffect, useState } from "react";
34
34
  import clsx from "clsx";
35
35
  import { withBaseWrapper } from "../../../higherOrder/withBaseWrapper";
36
+ import {
37
+ WmSkeleton,
38
+ SKELETON_REGISTRY,
39
+ shouldShowSkeleton
40
+ } from "../../common/wm-skeleton";
36
41
  import { prefixPrefabResourceUrl } from "../../../utils/resource-url";
37
42
  import { removeInvalidAttributes } from "../../../utils/attr";
38
43
  const DEFAULT_CLASS = "app-picture";
@@ -118,6 +123,14 @@ const WmPicture = memo(
118
123
  const onMouseLeaveHandler = (event) => {
119
124
  onMouseLeave && onMouseLeave(event, props);
120
125
  };
126
+ if (shouldShowSkeleton(props.loading, props.showSkeleton))
127
+ return /* @__PURE__ */ jsx(
128
+ WmSkeleton,
129
+ __spreadProps(__spreadValues({}, SKELETON_REGISTRY["WmPicture"]), {
130
+ className: props.className,
131
+ styles: props.styles
132
+ })
133
+ );
121
134
  return /* @__PURE__ */ jsxs(Fragment, { children: [
122
135
  /* @__PURE__ */ jsx(
123
136
  "img",
@@ -148,7 +161,13 @@ const WmPicture = memo(
148
161
  ] });
149
162
  },
150
163
  (prev, current) => {
151
- const keysToCompare = ["picturesource", "imgSource", "show"];
164
+ const keysToCompare = [
165
+ "picturesource",
166
+ "imgSource",
167
+ "show",
168
+ "loading",
169
+ "showSkeleton"
170
+ ];
152
171
  return keysToCompare.every((key) => prev[key] === current[key]);
153
172
  }
154
173
  );
@@ -69,5 +69,7 @@ declare const _default: React.ComponentType<{
69
69
  updateon?: string;
70
70
  dataset?: any;
71
71
  prefabName?: string;
72
+ loading?: boolean;
73
+ showSkeleton?: boolean;
72
74
  }>;
73
75
  export default _default;
@@ -74,5 +74,7 @@ declare const _default: React.ComponentType<{
74
74
  updateon?: string;
75
75
  dataset?: any;
76
76
  prefabName?: string;
77
+ loading?: boolean;
78
+ showSkeleton?: boolean;
77
79
  }>;
78
80
  export default _default;
@@ -65,11 +65,12 @@ const WmProgressCircle = (props) => {
65
65
  };
66
66
  }, [datavalue, minvalue, maxvalue, type, displayformat, props.strokeWidth, props.radius]);
67
67
  useEffect(() => {
68
+ var _a;
68
69
  if (listener && name) {
69
70
  listener.onChange(name, {
70
71
  percentagevalue: percentageValue
71
72
  });
72
- onBeforerender == null ? void 0 : onBeforerender(listener, listener == null ? void 0 : listener.Widgets[name]);
73
+ onBeforerender == null ? void 0 : onBeforerender(listener, (_a = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a[name]);
73
74
  }
74
75
  }, [percentageValue]);
75
76
  useEffect(() => {
@@ -57,6 +57,8 @@ declare const WmRichTextEditorStandalone: React.ComponentType<import("../../data
57
57
  updateon?: string;
58
58
  dataset?: any;
59
59
  prefabName?: string;
60
+ loading?: boolean;
61
+ showSkeleton?: boolean;
60
62
  } & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
61
63
  export { WmRichTextEditorStandalone as WmRichtexteditor };
62
64
  /**
@@ -139,5 +141,7 @@ declare const _default: React.ComponentType<{
139
141
  updateon?: string;
140
142
  dataset?: any;
141
143
  prefabName?: string;
144
+ loading?: boolean;
145
+ showSkeleton?: boolean;
142
146
  }>;
143
147
  export default _default;
@@ -50,6 +50,7 @@ const EditorPlaceholder = ({
50
50
  }
51
51
  );
52
52
  const WmRichTextEditorBase = (props) => {
53
+ var _a;
53
54
  const {
54
55
  name,
55
56
  className,
@@ -88,7 +89,7 @@ const WmRichTextEditorBase = (props) => {
88
89
  const lastValueRef = useRef(actualValue || "");
89
90
  const isMountedRef = useRef(true);
90
91
  const internalValueRef = useRef(actualValue || "");
91
- const widgetInstance = listener == null ? void 0 : listener.Widgets[name || ""];
92
+ const widgetInstance = (_a = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _a[name || ""];
92
93
  const editorOptions = useMemo(
93
94
  () => ({
94
95
  toolbar: true,
@@ -165,7 +166,7 @@ const WmRichTextEditorBase = (props) => {
165
166
  }, []);
166
167
  const handleEditorChange = useCallback(
167
168
  (newContent, isFromUser = true) => {
168
- var _a, _b;
169
+ var _a2, _b;
169
170
  if (!isMountedRef.current || isInternalChange) {
170
171
  return;
171
172
  }
@@ -184,7 +185,7 @@ const WmRichTextEditorBase = (props) => {
184
185
  value: sanitizedContent,
185
186
  name
186
187
  },
187
- currentTarget: (_b = (_a = editorRef.current) == null ? void 0 : _a.editor) == null ? void 0 : _b.workplace
188
+ currentTarget: (_b = (_a2 = editorRef.current) == null ? void 0 : _a2.editor) == null ? void 0 : _b.workplace
188
189
  };
189
190
  onChange(syntheticEvent, widgetInstance, newContent, sanitizedContent);
190
191
  }
@@ -204,8 +205,8 @@ const WmRichTextEditorBase = (props) => {
204
205
  );
205
206
  const performEditorOperation = useCallback(
206
207
  (operation, value) => {
207
- var _a;
208
- if (!isEditorLoaded || !((_a = editorRef.current) == null ? void 0 : _a.editor)) {
208
+ var _a2;
209
+ if (!isEditorLoaded || !((_a2 = editorRef.current) == null ? void 0 : _a2.editor)) {
209
210
  setOperationStack((prev) => [...prev, { type: operation, value }]);
210
211
  return;
211
212
  }
@@ -270,13 +271,13 @@ const WmRichTextEditorBase = (props) => {
270
271
  [isEditorLoaded, sanitizeHtml]
271
272
  );
272
273
  useEffect(() => {
273
- var _a, _b;
274
+ var _a2, _b;
274
275
  if (onBeforerender) {
275
276
  const syntheticEvent = {
276
277
  target: {
277
278
  value: ""
278
279
  },
279
- currentTarget: (_b = (_a = editorRef.current) == null ? void 0 : _a.editor) == null ? void 0 : _b.workplace
280
+ currentTarget: (_b = (_a2 = editorRef.current) == null ? void 0 : _a2.editor) == null ? void 0 : _b.workplace
280
281
  };
281
282
  onBeforerender(syntheticEvent, widgetInstance);
282
283
  }
@@ -284,7 +285,7 @@ const WmRichTextEditorBase = (props) => {
284
285
  const debouncedHandleOnChange = useMemo(
285
286
  () => lodash.debounce(
286
287
  (newContent) => {
287
- var _a, _b;
288
+ var _a2, _b;
288
289
  const sanitizedContent = sanitizeHtml(newContent);
289
290
  const tempDiv = document.createElement("div");
290
291
  tempDiv.innerHTML = newContent;
@@ -302,7 +303,7 @@ const WmRichTextEditorBase = (props) => {
302
303
  value: new_text_content,
303
304
  name
304
305
  },
305
- currentTarget: (_b = (_a = editorRef.current) == null ? void 0 : _a.editor) == null ? void 0 : _b.workplace
306
+ currentTarget: (_b = (_a2 = editorRef.current) == null ? void 0 : _a2.editor) == null ? void 0 : _b.workplace
306
307
  };
307
308
  onChange(syntheticEvent, widgetInstance, new_text_content, old_text_context);
308
309
  }
@@ -325,9 +326,9 @@ const WmRichTextEditorBase = (props) => {
325
326
  };
326
327
  }, [debouncedHandleOnChange]);
327
328
  const handleEditorInit = useCallback(() => {
328
- var _a;
329
+ var _a2;
329
330
  setIsEditorLoaded(true);
330
- if ((_a = editorRef.current) == null ? void 0 : _a.editor) {
331
+ if ((_a2 = editorRef.current) == null ? void 0 : _a2.editor) {
331
332
  if (content !== void 0 && content !== null) {
332
333
  editorRef.current.editor.value = content == null ? void 0 : content.toString();
333
334
  }
@@ -483,8 +484,8 @@ const WmRichTextEditorBase = (props) => {
483
484
  }
484
485
  }, [datavalue]);
485
486
  useEffect(() => {
486
- var _a;
487
- if (((_a = editorRef.current) == null ? void 0 : _a.editor) && isEditorLoaded) {
487
+ var _a2;
488
+ if (((_a2 = editorRef.current) == null ? void 0 : _a2.editor) && isEditorLoaded) {
488
489
  if (readonly || disabled) {
489
490
  performEditorOperation("disable");
490
491
  } else {
@@ -505,9 +506,9 @@ const WmRichTextEditorBase = (props) => {
505
506
  useEffect(() => {
506
507
  isMountedRef.current = true;
507
508
  return () => {
508
- var _a, _b, _c;
509
+ var _a2, _b, _c;
509
510
  isMountedRef.current = false;
510
- if ((_a = editorRef.current) == null ? void 0 : _a.editor) {
511
+ if ((_a2 = editorRef.current) == null ? void 0 : _a2.editor) {
511
512
  try {
512
513
  (_c = (_b = editorRef == null ? void 0 : editorRef.current) == null ? void 0 : _b.editor) == null ? void 0 : _c.destruct();
513
514
  } catch (error) {
@@ -112,6 +112,8 @@ declare const WmSearchStandalone: React.ComponentType<import("../../data/form/fo
112
112
  updateon?: string;
113
113
  dataset?: any;
114
114
  prefabName?: string;
115
+ loading?: boolean;
116
+ showSkeleton?: boolean;
115
117
  }, "ref"> & React.RefAttributes<any> & import("@wavemaker-ai/react-runtime/higherOrder/withStandalone").WithStandaloneProps>;
116
118
  export { WmSearchStandalone as WmSearch };
117
119
  /**
@@ -174,5 +176,7 @@ declare const _default: React.NamedExoticComponent<import("../../data/form/form-
174
176
  updateon?: string;
175
177
  dataset?: any;
176
178
  prefabName?: string;
179
+ loading?: boolean;
180
+ showSkeleton?: boolean;
177
181
  }>;
178
182
  export default _default;
@@ -70,5 +70,7 @@ declare const _default: React.ComponentType<{
70
70
  updateon?: string;
71
71
  dataset?: any;
72
72
  prefabName?: string;
73
+ loading?: boolean;
74
+ showSkeleton?: boolean;
73
75
  }>;
74
76
  export default _default;
@@ -64,5 +64,7 @@ declare const _default: React.ComponentType<{
64
64
  updateon?: string;
65
65
  dataset?: any;
66
66
  prefabName?: string;
67
+ loading?: boolean;
68
+ showSkeleton?: boolean;
67
69
  }>;
68
70
  export default _default;
@@ -80,5 +80,7 @@ declare const _default: React.ComponentType<{
80
80
  updateon?: string;
81
81
  dataset?: any;
82
82
  prefabName?: string;
83
+ loading?: boolean;
84
+ showSkeleton?: boolean;
83
85
  }>;
84
86
  export default _default;
@@ -75,5 +75,7 @@ declare const _default: React.ComponentType<{
75
75
  formfield?: boolean;
76
76
  updateon?: string;
77
77
  dataset?: any;
78
+ loading?: boolean;
79
+ showSkeleton?: boolean;
78
80
  }>;
79
81
  export default _default;
@@ -125,5 +125,7 @@ declare const _default: React.ComponentType<{
125
125
  formfield?: boolean;
126
126
  updateon?: string;
127
127
  prefabName?: string;
128
+ loading?: boolean;
129
+ showSkeleton?: boolean;
128
130
  }>;
129
131
  export default _default;
@@ -1 +1,3 @@
1
1
  export { AppSpinner } from "./AppSpinner";
2
+ export { WmSkeleton, SKELETON_REGISTRY, shouldShowSkeleton } from "./wm-skeleton";
3
+ export type { WmSkeletonProps, SkeletonConfig } from "./wm-skeleton";
@@ -1,4 +1,8 @@
1
1
  import { AppSpinner } from "./AppSpinner";
2
+ import { WmSkeleton, SKELETON_REGISTRY, shouldShowSkeleton } from "./wm-skeleton";
2
3
  export {
3
- AppSpinner
4
+ AppSpinner,
5
+ SKELETON_REGISTRY,
6
+ WmSkeleton,
7
+ shouldShowSkeleton
4
8
  };
@@ -0,0 +1,95 @@
1
+ import { CSSProperties } from "react";
2
+ import { SkeletonProps } from "@mui/material/Skeleton";
3
+ export type SkeletonLayout = "table" | "list" | "form" | "tabs" | "wizard" | "accordion";
4
+ export interface WmSkeletonProps {
5
+ /** Selects a multi-element layout. Omit to render a single MUI `Skeleton`. */
6
+ type?: SkeletonLayout;
7
+ /** MUI Skeleton variant — only used when `type` is omitted. @default "rectangular" */
8
+ variant?: SkeletonProps["variant"];
9
+ width?: number | string;
10
+ height?: number | string;
11
+ /** @default "pulse" */
12
+ animation?: SkeletonProps["animation"];
13
+ /** Row count for `table`/`list` (default 5), tab/step/pane count for `tabs`/`wizard`/`accordion` (default 4), or field count for `form` (default 4). */
14
+ rows?: number;
15
+ /** Column count for `type="table"` (default 4) or content line count for `tabs`/`wizard`/`accordion` (default 3). */
16
+ columns?: number;
17
+ className?: string;
18
+ styles?: CSSProperties;
19
+ }
20
+ export type SkeletonConfig = Pick<WmSkeletonProps, "type" | "variant" | "width" | "height" | "animation" | "rows" | "columns">;
21
+ /** Default row/column counts per layout type — single source of truth. */
22
+ export declare const LAYOUT_DEFAULTS: {
23
+ table: {
24
+ rows: number;
25
+ columns: number;
26
+ };
27
+ list: {
28
+ rows: number;
29
+ };
30
+ form: {
31
+ rows: number;
32
+ };
33
+ tabs: {
34
+ rows: number;
35
+ columns: number;
36
+ };
37
+ wizard: {
38
+ rows: number;
39
+ columns: number;
40
+ };
41
+ accordion: {
42
+ rows: number;
43
+ columns: number;
44
+ };
45
+ };
46
+ /** Show skeleton while `loading` is true. Opt out only with explicit `showSkeleton={false}`. */
47
+ export declare const shouldShowSkeleton: (loading?: boolean | string, showSkeleton?: boolean) => boolean;
48
+ export declare const SKELETON_REGISTRY: {
49
+ WmButton: {
50
+ variant: "rounded";
51
+ height: number;
52
+ width: number;
53
+ };
54
+ WmLabel: {
55
+ variant: "text";
56
+ width: number;
57
+ };
58
+ WmPicture: {
59
+ variant: "rectangular";
60
+ height: number;
61
+ width: number;
62
+ };
63
+ WmTable: {
64
+ rows: number;
65
+ columns: number;
66
+ type: "table";
67
+ };
68
+ WmList: {
69
+ rows: number;
70
+ type: "list";
71
+ };
72
+ WmForm: {
73
+ rows: number;
74
+ type: "form";
75
+ };
76
+ WmTabs: {
77
+ rows: number;
78
+ columns: number;
79
+ type: "tabs";
80
+ };
81
+ WmWizard: {
82
+ rows: number;
83
+ columns: number;
84
+ type: "wizard";
85
+ };
86
+ WmAccordion: {
87
+ rows: number;
88
+ columns: number;
89
+ type: "accordion";
90
+ };
91
+ };
92
+ /** Derived from the registry — never needs manual updates. */
93
+ export type SkeletonRegistryKey = keyof typeof SKELETON_REGISTRY;
94
+ export declare const WmSkeleton: ({ type, variant, height, animation, ...layoutProps }: WmSkeletonProps) => import("react/jsx-runtime").JSX.Element;
95
+ export default WmSkeleton;