@wavemaker-ai/react-runtime 1.0.0-rc.309 → 1.0.0-rc.647469

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 (315) hide show
  1. package/actions/navigation-action.js +5 -23
  2. package/components/advanced/carousel/index.d.ts +0 -1
  3. package/components/advanced/carousel/index.js +1 -2
  4. package/components/advanced/carousel/template.d.ts +0 -1
  5. package/components/advanced/carousel/template.js +1 -2
  6. package/components/advanced/login/index.d.ts +0 -1
  7. package/components/advanced/marquee/index.d.ts +0 -1
  8. package/components/advanced/marquee/index.js +1 -2
  9. package/components/basic/anchor/index.d.ts +0 -1
  10. package/components/basic/anchor/index.js +3 -4
  11. package/components/basic/audio/index.d.ts +0 -1
  12. package/components/basic/audio/index.js +2 -3
  13. package/components/basic/html/index.d.ts +0 -1
  14. package/components/basic/icon/index.d.ts +0 -1
  15. package/components/basic/icon/index.js +7 -4
  16. package/components/basic/iframe/iframe.utils.d.ts +1 -1
  17. package/components/basic/iframe/iframe.utils.js +4 -8
  18. package/components/basic/iframe/index.d.ts +0 -1
  19. package/components/basic/label/index.d.ts +0 -1
  20. package/components/basic/label/index.js +2 -3
  21. package/components/basic/message/index.js +1 -1
  22. package/components/basic/picture/index.d.ts +0 -1
  23. package/components/basic/picture/index.js +4 -3
  24. package/components/basic/progress-bar/index.d.ts +0 -1
  25. package/components/basic/progress-bar/index.js +1 -2
  26. package/components/basic/progress-circle/index.d.ts +0 -1
  27. package/components/basic/richtexteditor/index.d.ts +0 -2
  28. package/components/basic/search/index.d.ts +0 -3
  29. package/components/basic/search/index.js +4 -7
  30. package/components/basic/search/props.d.ts +0 -2
  31. package/components/basic/spinner/index.d.ts +0 -1
  32. package/components/basic/tile/index.d.ts +0 -1
  33. package/components/basic/tile/index.js +1 -2
  34. package/components/basic/tree/Components/TreeNodeComponent.js +5 -9
  35. package/components/basic/tree/index.d.ts +0 -1
  36. package/components/basic/tree/index.js +3 -14
  37. package/components/basic/tree/utils.d.ts +0 -2
  38. package/components/basic/tree/utils.js +1 -11
  39. package/components/basic/video/index.d.ts +0 -1
  40. package/components/basic/video/index.js +23 -40
  41. package/components/chart/index.d.ts +0 -1
  42. package/components/common/AppSpinner.js +5 -2
  43. package/components/container/accordion/accordion-pane/index.d.ts +0 -1
  44. package/components/container/accordion/accordion-pane/index.js +4 -1
  45. package/components/container/accordion/index.d.ts +0 -1
  46. package/components/container/index.d.ts +0 -3
  47. package/components/container/index.js +1 -6
  48. package/components/container/layout-grid/grid-column/index.d.ts +0 -1
  49. package/components/container/layout-grid/grid-row/index.d.ts +0 -1
  50. package/components/container/layout-grid/index.d.ts +0 -1
  51. package/components/container/layout-grid/index.js +8 -4
  52. package/components/container/linear-layout/index.d.ts +0 -1
  53. package/components/container/linear-layout/linear-layout-item/index.d.ts +0 -1
  54. package/components/container/panel/components/panel-header/index.js +6 -11
  55. package/components/container/panel/components/panel-header/props.d.ts +0 -5
  56. package/components/container/panel/index.d.ts +0 -1
  57. package/components/container/panel/index.js +1 -2
  58. package/components/container/props.d.ts +0 -2
  59. package/components/container/repeat-template/index.d.ts +1 -22
  60. package/components/container/repeat-template/index.js +1 -2
  61. package/components/container/tabs/index.d.ts +1 -3
  62. package/components/container/tabs/index.js +51 -102
  63. package/components/container/tabs/props.d.ts +0 -12
  64. package/components/container/tabs/tab-pane/index.d.ts +0 -1
  65. package/components/container/tabs/tab-pane/index.js +11 -28
  66. package/components/container/wizard/index.d.ts +0 -2
  67. package/components/container/wizard/wizard-step/index.d.ts +0 -1
  68. package/components/container/wizard/wizard-step/index.js +2 -2
  69. package/components/data/card/card-actions/index.d.ts +0 -1
  70. package/components/data/card/card-actions/index.js +5 -3
  71. package/components/data/card/card-content/index.d.ts +0 -1
  72. package/components/data/card/card-content/index.js +13 -3
  73. package/components/data/card/card-footer/index.d.ts +0 -1
  74. package/components/data/card/card-footer/index.js +5 -3
  75. package/components/data/card/index.d.ts +0 -1
  76. package/components/data/card/index.js +14 -3
  77. package/components/data/form/dynamic-fields/index.js +1 -7
  78. package/components/data/form/dynamic-fields/props.d.ts +0 -1
  79. package/components/data/form/form-action/index.d.ts +0 -2
  80. package/components/data/form/form-body/index.js +1 -2
  81. package/components/data/form/form-field/base-field.js +3 -4
  82. package/components/data/form/form-footer/index.js +1 -2
  83. package/components/data/list/components/ListItemWithTemplate.js +2 -4
  84. package/components/data/list/hooks/props.d.ts +2 -2
  85. package/components/data/list/hooks/useListEventHandlers.js +6 -6
  86. package/components/data/list/index.d.ts +0 -2
  87. package/components/data/list/index.js +4 -3
  88. package/components/data/list/props.d.ts +1 -2
  89. package/components/data/list/utils/list-widget-methods.d.ts +1 -2
  90. package/components/data/table/components/RowCells.d.ts +2 -16
  91. package/components/data/table/components/RowCells.js +24 -38
  92. package/components/data/table/components/TableBody.js +3 -11
  93. package/components/data/table/components/TableDataRow.d.ts +0 -3
  94. package/components/data/table/components/TableDataRow.js +3 -11
  95. package/components/data/table/components/TableHeader.js +4 -1
  96. package/components/data/table/hooks/index.d.ts +0 -1
  97. package/components/data/table/hooks/index.js +0 -12
  98. package/components/data/table/hooks/useDynamicColumns.js +1 -1
  99. package/components/data/table/hooks/useResponsiveColumns.d.ts +0 -1
  100. package/components/data/table/hooks/useRowSelection.d.ts +1 -1
  101. package/components/data/table/hooks/useRowSelection.js +5 -26
  102. package/components/data/table/hooks/useTableInitialization.js +1 -2
  103. package/components/data/table/index.d.ts +0 -4
  104. package/components/data/table/index.js +12 -77
  105. package/components/data/table/live-table/index.d.ts +0 -1
  106. package/components/data/table/props.d.ts +0 -7
  107. package/components/data/table/table-action/index.d.ts +0 -1
  108. package/components/data/table/table-column/index.d.ts +0 -1
  109. package/components/data/table/table-row/index.d.ts +0 -1
  110. package/components/data/table/table-row-action/index.d.ts +0 -1
  111. package/components/data/table/utils/buildSelectionColumns.js +1 -7
  112. package/components/data/table/utils/columnBuilder.js +1 -1
  113. package/components/data/table/utils/index.js +2 -2
  114. package/components/data/table/utils/renderDisplayCell.js +1 -1
  115. package/components/dialogs/alert-dialog/index.d.ts +0 -2
  116. package/components/dialogs/confirm-dialog/index.d.ts +0 -2
  117. package/components/dialogs/dialog/index.d.ts +0 -2
  118. package/components/dialogs/dialog/index.js +4 -2
  119. package/components/dialogs/dialog-actions/index.d.ts +0 -1
  120. package/components/dialogs/dialog-body/index.d.ts +0 -1
  121. package/components/dialogs/dialog-content/index.d.ts +0 -1
  122. package/components/dialogs/dialog-header/index.d.ts +0 -1
  123. package/components/dialogs/iframe-dialog/index.d.ts +0 -2
  124. package/components/dialogs/login-dialog/index.d.ts +0 -2
  125. package/components/dialogs/page-dialog/index.d.ts +0 -2
  126. package/components/form/button/index.d.ts +0 -1
  127. package/components/form/button/index.js +3 -4
  128. package/components/form/button-group/index.d.ts +0 -1
  129. package/components/form/button-group/index.js +1 -2
  130. package/components/input/calendar/index.d.ts +0 -2
  131. package/components/input/chips/index.d.ts +0 -2
  132. package/components/input/color-picker/index.d.ts +0 -2
  133. package/components/input/composite/index.d.ts +0 -1
  134. package/components/input/currency/index.d.ts +0 -2
  135. package/components/input/default/checkbox/index.d.ts +0 -2
  136. package/components/input/default/checkboxset/index.d.ts +0 -2
  137. package/components/input/default/radioset/index.d.ts +0 -2
  138. package/components/input/default/switch/index.d.ts +0 -2
  139. package/components/input/epoch/date/components/DatePickerPopover.js +29 -11
  140. package/components/input/epoch/date/index.d.ts +0 -1
  141. package/components/input/epoch/datetime/index.d.ts +0 -1
  142. package/components/input/epoch/datetime/index.js +25 -10
  143. package/components/input/epoch/datetime/styled.d.ts +78 -0
  144. package/components/input/epoch/datetime/styled.js +90 -0
  145. package/components/input/epoch/time/index.d.ts +0 -1
  146. package/components/input/epoch/time/index.js +1 -1
  147. package/components/input/epoch/time/utils.d.ts +17 -0
  148. package/components/input/epoch/time/utils.js +18 -1
  149. package/components/input/fileupload/index.d.ts +0 -1
  150. package/components/input/number/index.d.ts +0 -2
  151. package/components/input/rating/index.d.ts +0 -2
  152. package/components/input/rating/index.js +17 -14
  153. package/components/input/select/index.d.ts +0 -2
  154. package/components/input/select/index.js +4 -1
  155. package/components/input/slider/index.d.ts +0 -2
  156. package/components/input/slider/index.js +12 -13
  157. package/components/input/text/index.d.ts +0 -2
  158. package/components/input/text/index.js +14 -3
  159. package/components/input/textarea/index.d.ts +0 -2
  160. package/components/input/textarea/index.js +10 -7
  161. package/components/input/upload/index.d.ts +0 -2
  162. package/components/input/upload/index.js +5 -3
  163. package/components/layout/footer/index.js +1 -2
  164. package/components/layout/footer/props.d.ts +0 -1
  165. package/components/layout/header/index.js +1 -2
  166. package/components/layout/header/props.d.ts +0 -1
  167. package/components/layout/leftnav/index.js +1 -2
  168. package/components/layout/leftnav/props.d.ts +0 -1
  169. package/components/layout/rightnav/index.js +1 -2
  170. package/components/layout/rightnav/props.d.ts +0 -1
  171. package/components/layout/topnav/index.js +1 -2
  172. package/components/layout/topnav/props.d.ts +0 -1
  173. package/components/navbar/index.d.ts +0 -1
  174. package/components/navbar/index.js +1 -2
  175. package/components/navbar/nav/index.d.ts +0 -1
  176. package/components/navbar/nav-item/index.d.ts +0 -1
  177. package/components/navbar/nav-item/index.js +1 -2
  178. package/components/navigation/breadcrumb/index.d.ts +0 -1
  179. package/components/navigation/menu/index.d.ts +0 -1
  180. package/components/navigation/menu/index.js +4 -5
  181. package/components/navigation/popover/index.d.ts +1 -2
  182. package/components/navigation/popover/index.js +1 -1
  183. package/components/page/error-boundary/index.js +5 -5
  184. package/components/page/index.js +9 -13
  185. package/components/page/partial/index.d.ts +0 -1
  186. package/components/prefab/container/index.js +1 -2
  187. package/context/WidgetProvider.js +2 -2
  188. package/core/app.service.js +35 -40
  189. package/core/constants/events.js +0 -6
  190. package/core/constants/index.d.ts +1 -9
  191. package/core/constants/index.js +5 -32
  192. package/core/formatter/date-formatters.d.ts +1 -1
  193. package/core/formatter/date-formatters.js +13 -38
  194. package/core/formatter/types.d.ts +1 -1
  195. package/core/proxy-service.js +5 -15
  196. package/core/util/index.js +2 -3
  197. package/higherOrder/BaseApp.js +2 -2
  198. package/higherOrder/BasePage.d.ts +17 -0
  199. package/higherOrder/BasePage.js +104 -53
  200. package/higherOrder/BasePrefab.js +59 -69
  201. package/higherOrder/props.d.ts +0 -1
  202. package/higherOrder/withBaseWrapper.js +4 -3
  203. package/hooks/useAccess.js +0 -13
  204. package/mui-config/theme.js +4 -1
  205. package/package-lock.json +605 -2630
  206. package/package.json +4 -23
  207. package/store/middleware/navigationMiddleware.js +1 -1
  208. package/store/slices/appConfigSlice.js +8 -10
  209. package/store/slices/authSlice.js +32 -46
  210. package/tsconfig.declaration.tsbuildinfo +1 -1
  211. package/types/index.d.ts +0 -1
  212. package/utils/attr.js +14 -71
  213. package/utils/lib-error-skipper.d.ts +26 -4
  214. package/utils/lib-error-skipper.js +165 -41
  215. package/utils/style-utils.d.ts +0 -6
  216. package/utils/style-utils.js +1 -10
  217. package/variables/metadata.service.js +3 -2
  218. package/variables/model-variable.js +7 -10
  219. package/variables/service-variable.d.ts +0 -1
  220. package/variables/service-variable.js +6 -26
  221. package/actions/base-action.d.ts +0 -7
  222. package/actions/login-action.d.ts +0 -11
  223. package/actions/logout-action.d.ts +0 -10
  224. package/actions/navigation-action.d.ts +0 -35
  225. package/actions/notification-action.d.ts +0 -20
  226. package/actions/timer-action.d.ts +0 -27
  227. package/components/data/table/hooks/useCustomExpressionColumns.d.ts +0 -16
  228. package/components/data/table/hooks/useCustomExpressionColumns.js +0 -88
  229. package/core/security.service.d.ts +0 -12
  230. package/mui-config/theme-provider.d.ts +0 -3
  231. package/mui-config/theme.d.ts +0 -2
  232. package/runtime-dynamic/App.d.ts +0 -7
  233. package/runtime-dynamic/App.js +0 -144
  234. package/runtime-dynamic/app-initializer.d.ts +0 -15
  235. package/runtime-dynamic/app-initializer.js +0 -447
  236. package/runtime-dynamic/components/ErrorBoundary.d.ts +0 -18
  237. package/runtime-dynamic/components/ErrorBoundary.js +0 -93
  238. package/runtime-dynamic/components/PageWrapper.d.ts +0 -1
  239. package/runtime-dynamic/components/PageWrapper.js +0 -43
  240. package/runtime-dynamic/components/PrefabPreview.d.ts +0 -1
  241. package/runtime-dynamic/components/PrefabPreview.js +0 -84
  242. package/runtime-dynamic/components/partial-content.d.ts +0 -15
  243. package/runtime-dynamic/components/partial-content.js +0 -50
  244. package/runtime-dynamic/components/prefab-content.d.ts +0 -10
  245. package/runtime-dynamic/components/prefab-content.js +0 -31
  246. package/runtime-dynamic/components/use-dynamic-component.d.ts +0 -10
  247. package/runtime-dynamic/components/use-dynamic-component.js +0 -165
  248. package/runtime-dynamic/factories/build-base-page-like-component.d.ts +0 -8
  249. package/runtime-dynamic/factories/build-base-page-like-component.js +0 -59
  250. package/runtime-dynamic/factories/prefab-factory.d.ts +0 -3
  251. package/runtime-dynamic/factories/prefab-factory.js +0 -82
  252. package/runtime-dynamic/factories/startup-info.d.ts +0 -6
  253. package/runtime-dynamic/factories/startup-info.js +0 -28
  254. package/runtime-dynamic/factories/utils.d.ts +0 -23
  255. package/runtime-dynamic/factories/utils.js +0 -131
  256. package/runtime-dynamic/index.d.ts +0 -14
  257. package/runtime-dynamic/index.js +0 -191
  258. package/runtime-dynamic/main.d.ts +0 -2
  259. package/runtime-dynamic/main.js +0 -84
  260. package/runtime-dynamic/preview-mode.d.ts +0 -15
  261. package/runtime-dynamic/preview-mode.js +0 -31
  262. package/runtime-dynamic/preview-navigation.d.ts +0 -6
  263. package/runtime-dynamic/preview-navigation.js +0 -38
  264. package/runtime-dynamic/preview-resource-base.d.ts +0 -12
  265. package/runtime-dynamic/preview-resource-base.js +0 -65
  266. package/runtime-dynamic/registry/component-registry.d.ts +0 -3
  267. package/runtime-dynamic/registry/component-registry.js +0 -353
  268. package/runtime-dynamic/registry/custom-widget-registry.d.ts +0 -7
  269. package/runtime-dynamic/registry/custom-widget-registry.js +0 -18
  270. package/runtime-dynamic/registry/index.d.ts +0 -2
  271. package/runtime-dynamic/registry/index.js +0 -63
  272. package/runtime-dynamic/registry/store.d.ts +0 -9
  273. package/runtime-dynamic/registry/store.js +0 -26
  274. package/runtime-dynamic/routes.d.ts +0 -2
  275. package/runtime-dynamic/routes.js +0 -107
  276. package/runtime-dynamic/services/app-extension-provider.d.ts +0 -1
  277. package/runtime-dynamic/services/app-extension-provider.js +0 -45
  278. package/runtime-dynamic/services/cache.d.ts +0 -29
  279. package/runtime-dynamic/services/cache.js +0 -57
  280. package/runtime-dynamic/services/component-ref-provider.d.ts +0 -12
  281. package/runtime-dynamic/services/component-ref-provider.js +0 -149
  282. package/runtime-dynamic/services/css-scoping.d.ts +0 -2
  283. package/runtime-dynamic/services/css-scoping.js +0 -53
  284. package/runtime-dynamic/services/fragment-url.d.ts +0 -16
  285. package/runtime-dynamic/services/fragment-url.js +0 -74
  286. package/runtime-dynamic/services/index.d.ts +0 -10
  287. package/runtime-dynamic/services/index.js +0 -152
  288. package/runtime-dynamic/services/markup-transpiler.d.ts +0 -12
  289. package/runtime-dynamic/services/markup-transpiler.js +0 -250
  290. package/runtime-dynamic/services/prefab-resources.d.ts +0 -18
  291. package/runtime-dynamic/services/prefab-resources.js +0 -159
  292. package/runtime-dynamic/services/resource-manager.d.ts +0 -2
  293. package/runtime-dynamic/services/resource-manager.js +0 -66
  294. package/runtime-dynamic/services/script-executor.d.ts +0 -8
  295. package/runtime-dynamic/services/script-executor.js +0 -90
  296. package/runtime-dynamic/services/variable-factory.d.ts +0 -2
  297. package/runtime-dynamic/services/variable-factory.js +0 -260
  298. package/runtime-dynamic/services/variable-registry.d.ts +0 -12
  299. package/runtime-dynamic/services/variable-registry.js +0 -118
  300. package/runtime-dynamic/services/variable-transpiler.d.ts +0 -5
  301. package/runtime-dynamic/services/variable-transpiler.js +0 -159
  302. package/runtime-dynamic/shims/next-image.d.ts +0 -35
  303. package/runtime-dynamic/shims/next-image.js +0 -60
  304. package/runtime-dynamic/shims/next-link.d.ts +0 -25
  305. package/runtime-dynamic/shims/next-link.js +0 -33
  306. package/runtime-dynamic/shims/next-navigation.d.ts +0 -16
  307. package/runtime-dynamic/shims/next-navigation.js +0 -52
  308. package/runtime-dynamic/utils/index.d.ts +0 -9
  309. package/runtime-dynamic/utils/index.js +0 -40
  310. package/utils/custom-expression/index.d.ts +0 -43
  311. package/utils/custom-expression/index.js +0 -161
  312. package/utils/custom-expression/parser.d.ts +0 -15
  313. package/utils/custom-expression/parser.js +0 -208
  314. package/utils/layoutsize-util.d.ts +0 -1
  315. package/utils/layoutsize-util.js +0 -57
package/types/index.d.ts CHANGED
@@ -10,7 +10,6 @@ export interface PageContextState {
10
10
  Variables: Record<string, VariableState>;
11
11
  Actions: Record<string, any>;
12
12
  onReady: () => void;
13
- pageReady: () => void;
14
13
  serviceDefinitions: Record<string, any>;
15
14
  baseUrl: string;
16
15
  [key: string]: any;
package/utils/attr.js CHANGED
@@ -6,87 +6,30 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.removeInvalidAttributes = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
- var INTERNAL_ATTRIBUTES = new Set(["clearSearch", "conditionalclass", "conditionalstyle", "dataset", "destroy", "eventCallback", "formfield", "forwardedRef", "inbound", "iswidget", "listener", "onHeaderclick", "onHeaderClick", "onLoad", "onDestroy", "onNavHeightChange", "onRender", "outbound", "prefab", "ref", "showindevice", "styles", "viewParent"]);
10
- var SAFE_ATTRIBUTES = new Set(["accessKey", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "capture", "cellPadding", "cellSpacing", "charSet", "className", "cols", "colSpan", "content", "contentEditable", "controls", "coords", "crossOrigin", "dateTime", "default", "defaultChecked", "defaultValue", "dir", "disabled", "download", "draggable", "encType", "form", "height", "hidden", "hint", "href", "hrefLang", "htmlFor", "id", "inputMode", "label", "lang", "list", "max", "maxLength", "media", "method", "min", "minLength", "multiple", "name", "noValidate", "pattern", "placeholder", "readOnly", "rel", "required", "role", "rows", "rowSpan", "selected", "slot", "spellCheck", "src", "step", "style", "tabIndex", "target", "title", "translate", "type", "value", "width"]);
11
- var VALID_DOM_EVENT_HANDLERS = new Set(["onAbort", "onAnimationEnd", "onAnimationIteration", "onAnimationStart", "onAuxClick", "onBeforeInput", "onBlur", "onCanPlay", "onCanPlayThrough", "onChange", "onClick", "onCompositionEnd", "onCompositionStart", "onCompositionUpdate", "onContextMenu", "onCopy", "onCut", "onDoubleClick", "onDrag", "onDragEnd", "onDragEnter", "onDragExit", "onDragLeave", "onDragOver", "onDragStart", "onDrop", "onDurationChange", "onEmptied", "onEncrypted", "onEnded", "onError", "onFocus", "onGotPointerCapture", "onInput", "onInvalid", "onKeyDown", "onKeyPress", "onKeyUp", "onLoad", "onLoadedData", "onLoadedMetadata", "onLoadStart", "onLostPointerCapture", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseOut", "onMouseOver", "onMouseUp", "onPaste", "onPause", "onPlay", "onPlaying", "onPointerCancel", "onPointerDown", "onPointerEnter", "onPointerLeave", "onPointerMove", "onPointerOut", "onPointerOver", "onPointerUp", "onProgress", "onRateChange", "onReset", "onScroll", "onSeeked", "onSeeking", "onSelect", "onStalled", "onSubmit", "onSuspend", "onTimeUpdate", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "onTransitionEnd", "onVolumeChange", "onWaiting", "onWheel"]);
12
-
13
- // Maps lowercase HTML attribute names to their React camelCase equivalents.
14
- // Lowercase attributes that appear here are normalized on the way out; those
15
- // NOT in this map but still all-lowercase are passed through as-is (custom /
16
- // data-like attributes handled elsewhere).
17
- var LOWERCASE_TO_REACT_ATTR = {
18
- autocomplete: "autoComplete",
19
- autocapitalize: "autoCapitalize",
20
- autocorrect: "autoCorrect",
21
- autofocus: "autoFocus",
22
- accesskey: "accessKey",
23
- classname: "className",
24
- colspan: "colSpan",
25
- contenteditable: "contentEditable",
26
- crossorigin: "crossOrigin",
27
- datetime: "dateTime",
28
- defaultchecked: "defaultChecked",
29
- defaultvalue: "defaultValue",
30
- enctype: "encType",
31
- hreflang: "hrefLang",
32
- htmlfor: "htmlFor",
33
- inputmode: "inputMode",
34
- maxlength: "maxLength",
35
- minlength: "minLength",
36
- novalidate: "noValidate",
37
- readonly: "readOnly",
38
- rowspan: "rowSpan",
39
- spellcheck: "spellCheck",
40
- tabindex: "tabIndex"
41
- };
42
- var isLowercaseAttribute = function isLowercaseAttribute(key) {
43
- return key === key.toLowerCase();
44
- };
45
- var isSafeAttributeName = function isSafeAttributeName(key) {
46
- return SAFE_ATTRIBUTES.has(key) || key.startsWith("aria-") || key.startsWith("data-") || isLowercaseAttribute(key) || VALID_DOM_EVENT_HANDLERS.has(key);
47
- };
48
- var isObjectLikeString = function isObjectLikeString(value) {
49
- var trimmed = value.trim();
50
- if (/^\[object\s*,?\s*object\]$/i.test(trimmed)) {
51
- return true;
52
- }
53
- if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) {
54
- try {
55
- var parsed = JSON.parse(trimmed);
56
- return (0, _typeof2["default"])(parsed) === "object" && parsed !== null;
57
- } catch (e) {
58
- return false;
59
- }
60
- }
61
- return false;
62
- };
63
- var shouldStringifyBooleanAttribute = function shouldStringifyBooleanAttribute(key, value) {
64
- return typeof value === "boolean" && isLowercaseAttribute(key) && !SAFE_ATTRIBUTES.has(key) && !key.startsWith("aria-") && !key.startsWith("data-");
65
- };
66
9
  var removeInvalidAttributes = exports.removeInvalidAttributes = function removeInvalidAttributes(attributes, explicitRemoveAttributes) {
67
10
  var filteredAttributes = {};
68
11
  Object.keys(attributes).forEach(function (key) {
69
- var _LOWERCASE_TO_REACT_A;
70
- if (explicitRemoveAttributes !== null && explicitRemoveAttributes !== void 0 && explicitRemoveAttributes.includes(key) || INTERNAL_ATTRIBUTES.has(key) || !isSafeAttributeName(key)) {
12
+ if (explicitRemoveAttributes !== null && explicitRemoveAttributes !== void 0 && explicitRemoveAttributes.includes(key)) {
71
13
  return;
72
14
  }
73
15
  var value = attributes[key];
74
16
  if (Array.isArray(value) || (0, _typeof2["default"])(value) === "object" && value !== null) {
75
17
  return;
76
18
  }
77
- if (typeof value === "function" && !VALID_DOM_EVENT_HANDLERS.has(key)) {
78
- return;
79
- }
80
- if (typeof value === "string" && value.trim() === "") {
81
- return;
82
- }
83
- if (typeof value === "string" && isObjectLikeString(value)) {
84
- return;
19
+ if (typeof value === "string") {
20
+ var trimmed = value.trim();
21
+ if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) {
22
+ try {
23
+ var parsed = JSON.parse(value);
24
+ if ((0, _typeof2["default"])(parsed) === "object" && parsed !== null) {
25
+ return;
26
+ }
27
+ } catch (e) {
28
+ // invalid json, ignore
29
+ }
30
+ }
85
31
  }
86
- // Normalize lowercase HTML attribute names to their React camelCase form
87
- // to prevent "Invalid DOM property" warnings (e.g. autocomplete → autoComplete).
88
- var normalizedKey = (_LOWERCASE_TO_REACT_A = LOWERCASE_TO_REACT_ATTR[key]) !== null && _LOWERCASE_TO_REACT_A !== void 0 ? _LOWERCASE_TO_REACT_A : key;
89
- filteredAttributes[normalizedKey] = shouldStringifyBooleanAttribute(normalizedKey, value) ? value.toString() : value;
32
+ filteredAttributes[key] = value;
90
33
  });
91
34
  return filteredAttributes;
92
35
  };
@@ -1,11 +1,33 @@
1
1
  /**
2
- * Wraps page/prefab script methods with error handling that detects
3
- * unsupported library usage (e.g. jQuery) and surfaces all other errors
4
- * with full context instead of swallowing them.
2
+ * Utility to wrap all methods in a script object with jQuery error handling
3
+ * This prevents jQuery usage from breaking the React application
4
+ */
5
+ /**
6
+ * Configuration for unsupported libraries
7
+ */
8
+ interface LibraryConfig {
9
+ identifiers: string[];
10
+ errorMessage: string;
11
+ notificationMessage: string;
12
+ }
13
+ interface UnsupportedLibraries {
14
+ [key: string]: LibraryConfig;
15
+ }
16
+ /**
17
+ * Checks if an error is related to jQuery usage
18
+ * @param error - The error object to check
19
+ * @returns true if the error is jQuery-related
5
20
  */
6
21
  export declare const isJQueryError: (error: any) => boolean;
7
22
  interface AppContext {
8
23
  notifyApp?: (message: string, type: string) => void;
9
24
  }
10
- export declare const wrapWithThirdPartyErrorGuard: (pageProxy: Record<string, any>, appContext: AppContext | null | undefined, componentName: string) => void;
25
+ /**
26
+ * Wraps all methods with unsupported library error handling
27
+ * @param pageProxy - The page/prefab proxy object
28
+ * @param appContext - App context for notifications
29
+ * @param componentName - Name of component for logging
30
+ * @param libraryConfig - Optional: specific libraries to check (default: all)
31
+ */
32
+ export declare const wrapWithThirdPartyErrorGuard: (pageProxy: Record<string, any>, appContext: AppContext | null | undefined, componentName: string, libraryConfig?: UnsupportedLibraries) => void;
11
33
  export {};
@@ -6,70 +6,194 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.wrapWithThirdPartyErrorGuard = exports.isJQueryError = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
10
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
11
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
9
12
  /**
10
- * Wraps page/prefab script methods with error handling that detects
11
- * unsupported library usage (e.g. jQuery) and surfaces all other errors
12
- * with full context instead of swallowing them.
13
+ * Utility to wrap all methods in a script object with jQuery error handling
14
+ * This prevents jQuery usage from breaking the React application
15
+ */
16
+
17
+ /**
18
+ * Configuration for unsupported libraries
13
19
  */
14
20
 
15
21
  var UNSUPPORTED_LIBRARIES = {
16
22
  jquery: {
23
+ // Use specific jQuery patterns - avoid matching Wavemaker vars like $index, $data
17
24
  identifiers: ["jQuery", "$(", "$."],
18
25
  errorMessage: "jQuery is not supported in React App",
19
26
  notificationMessage: "jQuery functionality is not supported. Check console for details."
20
27
  }
28
+ // Add more libraries here in future
21
29
  };
30
+
31
+ /**
32
+ * Result of unsupported library detection
33
+ */
34
+
35
+ /**
36
+ * Detects if an error is related to any unsupported library
37
+ * @param error - The error object to check
38
+ * @returns Object with isUnsupported flag and library info
39
+ */
22
40
  function detectUnsupportedLibrary(error) {
23
- if (!(error !== null && error !== void 0 && error.stack)) return null;
24
- var haystack = "".concat(error.message || "", "\n").concat(error.stack);
41
+ if (!error || !error.stack) {
42
+ return {
43
+ isUnsupported: false,
44
+ library: null
45
+ };
46
+ }
47
+ var errorMessage = error.message || "";
48
+ var stackTrace = String(error.stack);
49
+
50
+ // Check each configured library
25
51
  for (var _i = 0, _Object$entries = Object.entries(UNSUPPORTED_LIBRARIES); _i < _Object$entries.length; _i++) {
26
52
  var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2),
27
- name = _Object$entries$_i[0],
53
+ libraryName = _Object$entries$_i[0],
28
54
  config = _Object$entries$_i[1];
29
- if (config.identifiers.some(function (id) {
30
- return haystack.includes(id);
55
+ var identifiers = config.identifiers;
56
+
57
+ // Check if error message contains library identifiers
58
+ if (identifiers.some(function (identifier) {
59
+ return errorMessage.includes(identifier);
31
60
  })) {
32
61
  return {
33
- library: name,
62
+ isUnsupported: true,
63
+ library: libraryName,
34
64
  config: config
35
65
  };
36
66
  }
67
+
68
+ // Check if stack trace contains library identifiers
69
+ var stackLines = stackTrace.split("\n");
70
+ var _iterator = _createForOfIteratorHelper(stackLines),
71
+ _step;
72
+ try {
73
+ var _loop = function _loop() {
74
+ var line = _step.value;
75
+ if (identifiers.some(function (identifier) {
76
+ return line.includes(identifier);
77
+ })) {
78
+ return {
79
+ v: {
80
+ isUnsupported: true,
81
+ library: libraryName,
82
+ config: config
83
+ }
84
+ };
85
+ }
86
+ },
87
+ _ret;
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ _ret = _loop();
90
+ if (_ret) return _ret.v;
91
+ }
92
+ } catch (err) {
93
+ _iterator.e(err);
94
+ } finally {
95
+ _iterator.f();
96
+ }
37
97
  }
38
- return null;
98
+ return {
99
+ isUnsupported: false,
100
+ library: null
101
+ };
39
102
  }
103
+
104
+ /**
105
+ * Checks if an error is related to jQuery usage
106
+ * @param error - The error object to check
107
+ * @returns true if the error is jQuery-related
108
+ */
40
109
  var isJQueryError = exports.isJQueryError = function isJQueryError(error) {
41
- var _detectUnsupportedLib;
42
- return ((_detectUnsupportedLib = detectUnsupportedLibrary(error)) === null || _detectUnsupportedLib === void 0 ? void 0 : _detectUnsupportedLib.library) === "jquery";
110
+ if (!(error !== null && error !== void 0 && error.stack)) return false;
111
+
112
+ // Use specific jQuery patterns - avoid matching Wavemaker vars like $index, $data
113
+ var UnSupportedFunctionality = ["jQuery", "$(", "$."];
114
+
115
+ // Check if error message contains jQuery references
116
+ if (error.message && UnSupportedFunctionality.some(function (func) {
117
+ return error.message.includes(func);
118
+ })) {
119
+ return true;
120
+ }
121
+
122
+ // Check stack trace for jQuery references
123
+ var stackLines = error.stack.split("\n");
124
+ var _iterator2 = _createForOfIteratorHelper(stackLines),
125
+ _step2;
126
+ try {
127
+ var _loop2 = function _loop2() {
128
+ var line = _step2.value;
129
+ if (UnSupportedFunctionality.some(function (func) {
130
+ return line.includes(func);
131
+ })) {
132
+ return {
133
+ v: true
134
+ };
135
+ }
136
+ },
137
+ _ret2;
138
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
139
+ _ret2 = _loop2();
140
+ if (_ret2) return _ret2.v;
141
+ }
142
+ } catch (err) {
143
+ _iterator2.e(err);
144
+ } finally {
145
+ _iterator2.f();
146
+ }
147
+ return false;
43
148
  };
44
- var SKIP_PROPERTIES = new Set(["Variables", "Actions", "Widgets", "App", "pageParams", "serviceDefinitions", "baseUrl", "appConfig", "notification", "toaster", "onContentReady", "onChange", "cleanup", "eval", "appLocale", "executeStartup", "formatters", "type", "componentName", "componentType", "prefabname", "onPropertyChange"]);
149
+ /**
150
+ * Wraps all methods with unsupported library error handling
151
+ * @param pageProxy - The page/prefab proxy object
152
+ * @param appContext - App context for notifications
153
+ * @param componentName - Name of component for logging
154
+ * @param libraryConfig - Optional: specific libraries to check (default: all)
155
+ */
45
156
  var wrapWithThirdPartyErrorGuard = exports.wrapWithThirdPartyErrorGuard = function wrapWithThirdPartyErrorGuard(pageProxy, appContext, componentName) {
46
- var _loop = function _loop() {
47
- var methodName = _Object$keys[_i2];
48
- if (typeof pageProxy[methodName] !== "function" || SKIP_PROPERTIES.has(methodName)) return 1; // continue
49
- var originalMethod = pageProxy[methodName];
50
- pageProxy[methodName] = function () {
51
- try {
52
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
53
- args[_key] = arguments[_key];
54
- }
55
- return originalMethod.apply(this, args);
56
- } catch (error) {
57
- var detection = detectUnsupportedLibrary(error);
58
- if (detection) {
59
- var _appContext$notifyApp;
60
- console.error("[".concat(detection.library.toUpperCase(), "] ").concat(componentName, ".").concat(methodName, "(): ").concat(detection.config.errorMessage), error);
61
- appContext === null || appContext === void 0 || (_appContext$notifyApp = appContext.notifyApp) === null || _appContext$notifyApp === void 0 || _appContext$notifyApp.call(appContext, detection.config.notificationMessage, "Error");
62
- return undefined;
157
+ var libraryConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : UNSUPPORTED_LIBRARIES;
158
+ var skipProperties = ["Variables", "Actions", "Widgets", "App", "pageParams", "serviceDefinitions", "baseUrl", "appConfig", "notification", "toaster", "onContentReady", "onChange", "cleanup", "eval", "appLocale", "executeStartup", "formatters", "type", "componentName", "componentType", "prefabname", "onPropertyChange"];
159
+ Object.keys(pageProxy).forEach(function (methodName) {
160
+ if (typeof pageProxy[methodName] === "function" && !skipProperties.includes(methodName)) {
161
+ var originalMethod = pageProxy[methodName];
162
+ pageProxy[methodName] = function () {
163
+ try {
164
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
165
+ args[_key] = arguments[_key];
166
+ }
167
+ return originalMethod.apply(this, args);
168
+ } catch (error) {
169
+ // Detect which unsupported library caused the error
170
+ var detection = detectUnsupportedLibrary(error);
171
+ if (detection.isUnsupported && detection.library && detection.config) {
172
+ var library = detection.library;
173
+ var config = detection.config;
174
+
175
+ // Log detailed error
176
+ console.error("[".concat(library.toUpperCase(), " ERROR] in ").concat(componentName, ".").concat(methodName, "()"), "\n".concat(config.errorMessage), "\nError:", error);
177
+
178
+ // Show user notification
179
+ if (appContext !== null && appContext !== void 0 && appContext.notifyApp) {
180
+ appContext.notifyApp(config.notificationMessage, "Error");
181
+ }
182
+
183
+ // Return undefined to prevent further errors
184
+ return undefined;
185
+ } else {
186
+ // Not an unsupported library error - log normally
187
+ console.log("Error in ".concat(componentName, ".").concat(methodName, "():"));
188
+ }
63
189
  }
64
- console.error("[script] ".concat(componentName, ".").concat(methodName, "():"), error);
65
- }
66
- };
67
- Object.defineProperty(pageProxy[methodName], "name", {
68
- value: "wrapped_".concat(methodName),
69
- writable: false
70
- });
71
- };
72
- for (var _i2 = 0, _Object$keys = Object.keys(pageProxy); _i2 < _Object$keys.length; _i2++) {
73
- if (_loop()) continue;
74
- }
190
+ };
191
+
192
+ // Preserve function name for debugging
193
+ Object.defineProperty(pageProxy[methodName], "name", {
194
+ value: "wrapped_".concat(methodName),
195
+ writable: false
196
+ });
197
+ }
198
+ });
75
199
  };
@@ -20,9 +20,3 @@ export declare const mergeStyleObjects: (...styleObjects: any[]) => Record<strin
20
20
  */
21
21
  export declare const isValidStyleObject: (value: any) => boolean;
22
22
  export declare const filterAutoLayoutClasses: (layoutClassName: string | undefined, prefixesToGet: string[], mode?: "include" | "exclude") => string;
23
- /**
24
- * Normalizes a React style length (width, height, margin, etc.): numbers become pixel
25
- * values (`${n}px`), matching common React `style` behavior; strings pass through
26
- * (e.g. `100%`, `2rem`, `10px`).
27
- */
28
- export declare const toCssLength: (value: string | number) => string;
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.toCssLength = exports.sanitizeStyleObject = exports.mergeStyleObjects = exports.isValidStyleObject = exports.filterAutoLayoutClasses = void 0;
7
+ exports.sanitizeStyleObject = exports.mergeStyleObjects = exports.isValidStyleObject = exports.filterAutoLayoutClasses = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
@@ -80,13 +80,4 @@ var filterAutoLayoutClasses = exports.filterAutoLayoutClasses = function filterA
80
80
  });
81
81
  return mode === "include" ? matches : !matches;
82
82
  }).join(" ");
83
- };
84
-
85
- /**
86
- * Normalizes a React style length (width, height, margin, etc.): numbers become pixel
87
- * values (`${n}px`), matching common React `style` behavior; strings pass through
88
- * (e.g. `100%`, `2rem`, `10px`).
89
- */
90
- var toCssLength = exports.toCssLength = function toCssLength(value) {
91
- return typeof value === "number" ? "".concat(value, "px") : String(value);
92
83
  };
@@ -33,7 +33,7 @@ var MetadataService = exports.MetadataService = /*#__PURE__*/function () {
33
33
  _ref,
34
34
  _WM_APP_PROPERTIES,
35
35
  _this = this;
36
- var state, appConfig, baseUrl, isPreview, serviceDefSources, url, serviceDefFileName;
36
+ var state, appConfig, baseUrl, isPreview, serviceDefSources, url, serviceDefFileName, previewPath;
37
37
  return _regenerator["default"].wrap(function _callee$(_context) {
38
38
  while (1) switch (_context.prev = _context.next) {
39
39
  case 0:
@@ -44,7 +44,8 @@ var MetadataService = exports.MetadataService = /*#__PURE__*/function () {
44
44
  serviceDefSources = ((_WM_APP_PROPERTIES = window._WM_APP_PROPERTIES) === null || _WM_APP_PROPERTIES === void 0 ? void 0 : _WM_APP_PROPERTIES.serviceDefSources) || "DYNAMIC";
45
45
  serviceDefFileName = prefabName ? "".concat(prefabName, "-prefab-servicedefs.json") : "app-servicedefs.json";
46
46
  if (isPreview || serviceDefSources === "DYNAMIC") {
47
- url = prefabName && prefabName !== "__self__" ? "".concat(baseUrl, "/services/prefabs/").concat(prefabName, "/servicedefs") : "".concat(baseUrl, "/services/servicedefs");
47
+ previewPath = prefabName ? "prefabs/".concat(prefabName) : "";
48
+ url = "".concat(baseUrl, "/services/").concat(previewPath, "/servicedefs");
48
49
  } else {
49
50
  url = "".concat(baseUrl, "/services/servicedefs/").concat(serviceDefFileName);
50
51
  }
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.ModelVariable = void 0;
8
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
10
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
@@ -25,12 +24,13 @@ var ModelVariable = exports.ModelVariable = /*#__PURE__*/function (_ref) {
25
24
  function ModelVariable(config) {
26
25
  var _this;
27
26
  (0, _classCallCheck2["default"])(this, ModelVariable);
28
- var initialData = config.paramProvider();
27
+ // Initialize with empty dataset first
29
28
  var variable = {
30
29
  name: config.name,
31
- dataSet: initialData != null ? initialData : config.isList ? [] : {
30
+ dataSet: config.paramProvider() || {
32
31
  dataValue: ""
33
32
  },
33
+ // Default empty value
34
34
  isList: config.isList,
35
35
  twoWayBinding: config.twoWayBinding
36
36
  };
@@ -49,15 +49,12 @@ var ModelVariable = exports.ModelVariable = /*#__PURE__*/function (_ref) {
49
49
  value: function invoke(params, onSuccess, onError) {
50
50
  var result;
51
51
  try {
52
- var provided = this.config.paramProvider();
53
- if (Array.isArray(provided)) {
54
- this.dataSet = provided;
55
- } else if (this.dataSet && provided) {
56
- this.dataSet = Array.isArray(this.dataSet) ? provided : _objectSpread(_objectSpread({}, this.dataSet), provided);
52
+ if (this.dataSet && this.config.paramProvider()) {
53
+ this.dataSet = _objectSpread(_objectSpread({}, this.dataSet), this.config.paramProvider());
57
54
  } else if (this.dataSet && Object.keys(this.dataSet).length !== 0) {
58
- this.dataSet = Array.isArray(this.dataSet) ? (0, _toConsumableArray2["default"])(this.dataSet) : _objectSpread({}, this.dataSet);
55
+ this.dataSet = _objectSpread({}, this.dataSet);
59
56
  } else {
60
- this.dataSet = provided;
57
+ this.dataSet = this.config.paramProvider();
61
58
  }
62
59
  this.notify(_baseVariable.VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);
63
60
  result = _superPropGet(ModelVariable, "execute", this, 3)([params, function () {}]);
@@ -27,7 +27,6 @@ export declare class ServiceVariable extends ServiceVariable_base {
27
27
  private dateFormatter;
28
28
  private lastParams;
29
29
  private lastParamProviderValues;
30
- private dataBindingRequestBody;
31
30
  constructor(config: ServiceVariableConfig);
32
31
  private updateFirstAndLastRecord;
33
32
  private setupEventHandlers;
@@ -61,7 +61,6 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ref) {
61
61
  spinnerMessage: config.spinnerMessage,
62
62
  spinnerContext: config.spinnerContext,
63
63
  onSuccess: function onSuccess(context, args) {
64
- _this.dataBindingRequestBody(args, _this.lastInvokedParams);
65
64
  _this.notify(_baseVariable.VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);
66
65
  _this.notify(_baseVariable.VariableEvents.SUCCESS, [args.variable, args.data, args.options]);
67
66
  _this.updateFirstAndLastRecord(args.data);
@@ -114,22 +113,6 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ref) {
114
113
  // Method to update firstRecord and lastRecord from the current dataset
115
114
  (0, _inherits2["default"])(ServiceVariable, _ref);
116
115
  return (0, _createClass2["default"])(ServiceVariable, [{
117
- key: "dataBindingRequestBody",
118
- value: function dataBindingRequestBody(args, invokedParams) {
119
- var _invokedParams$Reques;
120
- var v = args === null || args === void 0 ? void 0 : args.variable;
121
- if (!v) return;
122
- v.dataBinding = v.dataBinding || {};
123
-
124
- // Keep both casings for compatibility with app scripts and Angular runtime expectations.
125
- // Prefer existing values, otherwise fallback to the request payload used for invocation.
126
- var existingBody = v.dataBinding.RequestBody;
127
- var payload = (_invokedParams$Reques = invokedParams === null || invokedParams === void 0 ? void 0 : invokedParams.RequestBody) !== null && _invokedParams$Reques !== void 0 ? _invokedParams$Reques : invokedParams;
128
- if (existingBody === undefined && payload !== undefined) {
129
- v.dataBinding.RequestBody = payload;
130
- }
131
- }
132
- }, {
133
116
  key: "updateFirstAndLastRecord",
134
117
  value: function updateFirstAndLastRecord(data) {
135
118
  try {
@@ -281,17 +264,14 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ref) {
281
264
  }, {
282
265
  key: "invoke",
283
266
  value: function invoke(options, onSuccess, onError) {
284
- // Build request params locally never mutate this.params, this.dataBinding, or options.inputFields
285
- var inputFields = (0, _lodashEs.merge)({}, this.config.paramProvider(), this.dataBinding, this.params);
267
+ this.params = (0, _lodashEs.merge)({}, this.config.paramProvider(), this.params);
268
+ this.params = (0, _util.deepCopy)({}, this.params, this.dataBinding);
286
269
  if (options) {
287
- var _options$inputFields;
288
- var overrides = (_options$inputFields = options.inputFields) !== null && _options$inputFields !== void 0 ? _options$inputFields : options;
289
- inputFields = (0, _lodashEs.merge)({}, inputFields, overrides);
290
- } else {
291
- options = {};
270
+ this.params = (0, _util.deepCopy)({}, this.params, options.inputFields ? options.inputFields : options);
292
271
  }
293
- options.inputFields = inputFields;
294
- this.lastInvokedParams = inputFields;
272
+ options = options || {};
273
+ options.inputFields = this.params;
274
+ this.lastInvokedParams = this.params;
295
275
 
296
276
  // Normalize orderBy option
297
277
  if (!options.orderBy) {
@@ -1,7 +0,0 @@
1
- import { BaseVariable, VariableConfig } from "@wavemaker-ai/react-runtime/variables/base-variable";
2
- export interface ActionConfig extends VariableConfig {
3
- }
4
- export declare class BaseAction<T extends ActionConfig> extends BaseVariable<T> {
5
- constructor(config: T);
6
- setData(dataSet: any): void;
7
- }
@@ -1,11 +0,0 @@
1
- import { ActionConfig, BaseAction } from "./base-action";
2
- import { SecurityService } from "@wavemaker-ai/react-runtime/core/security.service";
3
- export interface LoginActionConfig extends ActionConfig {
4
- securityService: () => SecurityService;
5
- baseURL: String;
6
- useDefaultSuccessHandler: boolean;
7
- }
8
- export declare class LoginAction extends BaseAction<LoginActionConfig> {
9
- constructor(config: LoginActionConfig);
10
- invoke(options: any, successcb?: Function, errorcb?: Function): any;
11
- }
@@ -1,10 +0,0 @@
1
- import { ActionConfig, BaseAction } from "./base-action";
2
- import { SecurityService } from "@wavemaker-ai/react-runtime/core/security.service";
3
- export interface LogoutActionConfig extends ActionConfig {
4
- securityService: () => SecurityService;
5
- baseURL: String;
6
- }
7
- export declare class LogoutAction extends BaseAction<LogoutActionConfig> {
8
- constructor(config: LogoutActionConfig);
9
- invoke(options: any, successcb?: Function, errorcb?: Function): any;
10
- }
@@ -1,35 +0,0 @@
1
- import { ActionConfig, BaseAction } from "./base-action";
2
- export declare const __resetNavigationPageParamHistoryForTests: () => void;
3
- export declare const __getPageQueryParamHistorySizeForTests: () => number;
4
- export interface NavigationParams {
5
- pageName?: string;
6
- tabName?: string;
7
- accordionName?: string;
8
- [key: string]: any;
9
- }
10
- export interface NavigationActionConfig extends ActionConfig {
11
- appConfig: any;
12
- operation: string;
13
- _context: any;
14
- }
15
- export declare class NavigationAction extends BaseAction<NavigationActionConfig> {
16
- constructor(config: NavigationActionConfig);
17
- invoke(params?: Record<string, unknown>, onSuccess?: Function, onError?: Function): Promise<NavigationAction>;
18
- navigate(params?: {}, onSuccess?: Function, onError?: Function): Promise<NavigationAction>;
19
- private handleGoToPreviousPage;
20
- private handleGotoTab;
21
- private findTabWidget;
22
- private handleGotoAccordion;
23
- private getAppRelativePath;
24
- private parseSearch;
25
- private normalizePageName;
26
- private getCurrentPageInfo;
27
- private rememberPageQueryParams;
28
- private resolveQueryParams;
29
- /**
30
- * Returns true if the current URL matches the target path and query params.
31
- * When true, we skip router.push.
32
- */
33
- private isSamePageAsCurrent;
34
- private handleGotoPage;
35
- }
@@ -1,20 +0,0 @@
1
- import { ActionConfig, BaseAction } from "./base-action";
2
- import React from "react";
3
- export interface NotificationActionConfig extends ActionConfig {
4
- showDialog: Function;
5
- onOk?: Function;
6
- onCancel?: Function;
7
- onClose?: Function;
8
- operation: string;
9
- partialContent?: React.ReactNode;
10
- toasterService?: () => any;
11
- }
12
- export declare class NotificationAction extends BaseAction<NotificationActionConfig> {
13
- constructor(config: NotificationActionConfig);
14
- notify(event: string, args: any[], emitToParent?: boolean): void;
15
- notify(params?: any, onSuccess?: Function, onError?: Function): Promise<any>;
16
- private prepareToastOptions;
17
- invoke(params?: any, onSuccess?: Function, onError?: Function): Promise<any>;
18
- private showToast;
19
- getMessage(): void;
20
- }