@wavemaker/react-runtime 11.14.1-rc.241 → 11.14.2-1.6423
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/navigation-action.js +5 -3
- package/actions/notification-action.js +6 -3
- package/components/basic/anchor/index.js +6 -7
- package/components/basic/label/index.js +2 -2
- package/components/basic/search/index.js +7 -3
- package/components/chart/components/barColumnChart/index.js +2 -4
- package/components/chart/components/pieDonutChart/index.js +3 -1
- package/components/chart/hooks/useBarYAxisExtras.js +52 -0
- package/components/chart/hooks/useXAxisConfig.js +98 -0
- package/components/chart/index.js +72 -39
- package/components/chart/utils.js +23 -12
- package/components/container/index.js +6 -7
- package/components/container/panel/components/panel-header/index.js +3 -2
- package/components/container/panel/index.js +13 -9
- package/components/container/tabs/index.js +1 -0
- package/components/container/tabs/tab-pane/index.js +39 -3
- package/components/container/wizard/index.js +187 -57
- package/components/container/wizard/utils.js +1 -1
- package/components/container/wizard/wizard-action/index.js +9 -4
- package/components/container/wizard/wizard-step/index.js +21 -8
- package/components/data/form/base-form/index.js +51 -11
- package/components/data/form/form-controller/withFormController.js +7 -10
- package/components/data/list/components/GroupedListItems.js +5 -1
- package/components/data/list/components/ListItemWithTemplate.js +4 -1
- package/components/data/list/hooks/useListEffects.js +34 -14
- package/components/data/list/hooks/useListEventHandlers.js +18 -2
- package/components/data/list/hooks/useListState.js +15 -2
- package/components/data/list/index.js +1 -0
- package/components/data/list/utils/list-helpers.js +3 -5
- package/components/data/list/utils/list-widget-methods.js +1 -1
- package/components/data/live-filter/index.js +6 -5
- package/components/data/live-form/index.js +24 -14
- package/components/data/table/components/TableBody.js +5 -21
- package/components/data/table/components/TableHeader.js +5 -1
- package/components/data/table/index.js +21 -5
- package/components/data/utils/field-data-utils.js +1 -1
- package/components/dialogs/index.js +14 -16
- package/components/input/currency/index.js +11 -7
- package/components/input/default/checkbox/index.js +2 -3
- package/components/input/default/checkboxset/index.js +2 -22
- package/components/input/default/radioset/index.js +5 -4
- package/components/input/epoch/datetime/index.js +6 -2
- package/components/input/epoch/time/index.js +2 -1
- package/components/input/number/index.js +2 -2
- package/components/input/text/util.js +2 -0
- package/components/input/textarea/index.js +22 -24
- package/components/layout/leftnav/index.js +1 -1
- package/components/navbar/nav/index.js +97 -7
- package/components/navbar/nav-item/index.js +5 -2
- package/components/navigation/menu/index.js +73 -12
- package/components/navigation/popover/index.js +2 -0
- package/components/page/error-boundary/index.js +1 -0
- package/components/prefab/container/index.js +10 -3
- package/context/LocalizationProvider.js +1 -0
- package/context/PrefabContext.js +138 -13
- package/context/WidgetProvider.js +2 -2
- package/core/constants/events.js +12 -6
- package/core/constants/index.js +6 -11
- package/core/formatter/number-formatters.js +1 -1
- package/core/proxy-service.js +72 -36
- package/core/util/utils.js +23 -4
- package/higherOrder/BaseApp.js +60 -18
- package/higherOrder/BasePage.js +99 -77
- package/higherOrder/BasePrefab.js +13 -5
- package/higherOrder/withBaseWrapper.js +3 -3
- package/hooks/useDataSourceSubscription.js +1 -1
- package/hooks/useHttp.js +20 -13
- package/mui-config/theme.js +3 -0
- package/package-lock.json +781 -669
- package/package.json +3 -3
- package/store/index.js +5 -1
- package/utils/lib-error-skipper.js +196 -0
- package/variables/service-variable.js +17 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/react-runtime",
|
|
3
|
-
"version": "11.14.1
|
|
3
|
+
"version": "11.14.2-1.6423",
|
|
4
4
|
"description": "React runtime package for Wavemaker",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@mui/icons-material": "6.3.1",
|
|
46
46
|
"@mui/material": "6.3.1",
|
|
47
47
|
"@mui/x-date-pickers": "^8.5.3",
|
|
48
|
-
"@reduxjs/toolkit": "
|
|
48
|
+
"@reduxjs/toolkit": "2.9.1",
|
|
49
49
|
"@tanstack/react-table": "^8.21.3",
|
|
50
50
|
"axios": "^1.7.9",
|
|
51
51
|
"dompurify": "^3.2.3",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@types/react": "^19",
|
|
79
79
|
"@types/react-color": "^3.0.13",
|
|
80
80
|
"@types/react-dom": "^19",
|
|
81
|
-
"@wavemaker/variables": "11.14.1
|
|
81
|
+
"@wavemaker/variables": "11.14.2-1.6423",
|
|
82
82
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
83
83
|
"eslint": "^9",
|
|
84
84
|
"eslint-config-next": "15.1.4",
|
package/store/index.js
CHANGED
|
@@ -28,6 +28,10 @@ var store = exports.store = (0, _toolkit.configureStore)({
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
// Only setup listeners on the client side (not during SSR)
|
|
33
|
+
if (typeof window !== "undefined") {
|
|
34
|
+
(0, _query.setupListeners)(store.dispatch);
|
|
35
|
+
}
|
|
32
36
|
var useAppDispatch = exports.useAppDispatch = _reactRedux.useDispatch;
|
|
33
37
|
var useAppSelector = exports.useAppSelector = _reactRedux.useSelector;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.wrapWithThirdPartyErrorGuard = exports.isJQueryError = void 0;
|
|
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; }
|
|
12
|
+
/**
|
|
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
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var UNSUPPORTED_LIBRARIES = {
|
|
22
|
+
jquery: {
|
|
23
|
+
identifiers: ["jQuery", "$"],
|
|
24
|
+
errorMessage: "jQuery is not supported in React App",
|
|
25
|
+
notificationMessage: "jQuery functionality is not supported. Check console for details."
|
|
26
|
+
}
|
|
27
|
+
// Add more libraries here in future
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Result of unsupported library detection
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Detects if an error is related to any unsupported library
|
|
36
|
+
* @param error - The error object to check
|
|
37
|
+
* @returns Object with isUnsupported flag and library info
|
|
38
|
+
*/
|
|
39
|
+
function detectUnsupportedLibrary(error) {
|
|
40
|
+
if (!error || !error.stack) {
|
|
41
|
+
return {
|
|
42
|
+
isUnsupported: false,
|
|
43
|
+
library: null
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var errorMessage = error.message || "";
|
|
47
|
+
var stackTrace = String(error.stack);
|
|
48
|
+
|
|
49
|
+
// Check each configured library
|
|
50
|
+
for (var _i = 0, _Object$entries = Object.entries(UNSUPPORTED_LIBRARIES); _i < _Object$entries.length; _i++) {
|
|
51
|
+
var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2),
|
|
52
|
+
libraryName = _Object$entries$_i[0],
|
|
53
|
+
config = _Object$entries$_i[1];
|
|
54
|
+
var identifiers = config.identifiers;
|
|
55
|
+
|
|
56
|
+
// Check if error message contains library identifiers
|
|
57
|
+
if (identifiers.some(function (identifier) {
|
|
58
|
+
return errorMessage.includes(identifier);
|
|
59
|
+
})) {
|
|
60
|
+
return {
|
|
61
|
+
isUnsupported: true,
|
|
62
|
+
library: libraryName,
|
|
63
|
+
config: config
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Check if stack trace contains library identifiers
|
|
68
|
+
var stackLines = stackTrace.split("\n");
|
|
69
|
+
var _iterator = _createForOfIteratorHelper(stackLines),
|
|
70
|
+
_step;
|
|
71
|
+
try {
|
|
72
|
+
var _loop = function _loop() {
|
|
73
|
+
var line = _step.value;
|
|
74
|
+
if (identifiers.some(function (identifier) {
|
|
75
|
+
return line.includes(identifier);
|
|
76
|
+
})) {
|
|
77
|
+
return {
|
|
78
|
+
v: {
|
|
79
|
+
isUnsupported: true,
|
|
80
|
+
library: libraryName,
|
|
81
|
+
config: config
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
_ret;
|
|
87
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
88
|
+
_ret = _loop();
|
|
89
|
+
if (_ret) return _ret.v;
|
|
90
|
+
}
|
|
91
|
+
} catch (err) {
|
|
92
|
+
_iterator.e(err);
|
|
93
|
+
} finally {
|
|
94
|
+
_iterator.f();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
isUnsupported: false,
|
|
99
|
+
library: null
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Checks if an error is related to jQuery usage
|
|
105
|
+
* @param error - The error object to check
|
|
106
|
+
* @returns true if the error is jQuery-related
|
|
107
|
+
*/
|
|
108
|
+
var isJQueryError = exports.isJQueryError = function isJQueryError(error) {
|
|
109
|
+
if (!(error !== null && error !== void 0 && error.stack)) return false;
|
|
110
|
+
var UnSupportedFunctionality = ["jQuery", "$"];
|
|
111
|
+
|
|
112
|
+
// Check if error message contains jQuery references
|
|
113
|
+
if (error.message && UnSupportedFunctionality.some(function (func) {
|
|
114
|
+
return error.message.includes(func);
|
|
115
|
+
})) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Check stack trace for jQuery references
|
|
120
|
+
var stackLines = error.stack.split("\n");
|
|
121
|
+
var _iterator2 = _createForOfIteratorHelper(stackLines),
|
|
122
|
+
_step2;
|
|
123
|
+
try {
|
|
124
|
+
var _loop2 = function _loop2() {
|
|
125
|
+
var line = _step2.value;
|
|
126
|
+
if (UnSupportedFunctionality.some(function (func) {
|
|
127
|
+
return line.includes(func);
|
|
128
|
+
})) {
|
|
129
|
+
return {
|
|
130
|
+
v: true
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
_ret2;
|
|
135
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
136
|
+
_ret2 = _loop2();
|
|
137
|
+
if (_ret2) return _ret2.v;
|
|
138
|
+
}
|
|
139
|
+
} catch (err) {
|
|
140
|
+
_iterator2.e(err);
|
|
141
|
+
} finally {
|
|
142
|
+
_iterator2.f();
|
|
143
|
+
}
|
|
144
|
+
return false;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Wraps all methods with unsupported library error handling
|
|
148
|
+
* @param pageProxy - The page/prefab proxy object
|
|
149
|
+
* @param appContext - App context for notifications
|
|
150
|
+
* @param componentName - Name of component for logging
|
|
151
|
+
* @param libraryConfig - Optional: specific libraries to check (default: all)
|
|
152
|
+
*/
|
|
153
|
+
var wrapWithThirdPartyErrorGuard = exports.wrapWithThirdPartyErrorGuard = function wrapWithThirdPartyErrorGuard(pageProxy, appContext, componentName) {
|
|
154
|
+
var libraryConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : UNSUPPORTED_LIBRARIES;
|
|
155
|
+
var skipProperties = ["Variables", "Actions", "Widgets", "App", "pageParams", "serviceDefinitions", "baseUrl", "appConfig", "notification", "toaster", "onContentReady", "onChange", "cleanup", "eval", "appLocale", "executeStartup", "formatters", "type", "componentName", "componentType", "prefabname", "onPropertyChange"];
|
|
156
|
+
Object.keys(pageProxy).forEach(function (methodName) {
|
|
157
|
+
if (typeof pageProxy[methodName] === "function" && !skipProperties.includes(methodName)) {
|
|
158
|
+
var originalMethod = pageProxy[methodName];
|
|
159
|
+
pageProxy[methodName] = function () {
|
|
160
|
+
try {
|
|
161
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
162
|
+
args[_key] = arguments[_key];
|
|
163
|
+
}
|
|
164
|
+
return originalMethod.apply(this, args);
|
|
165
|
+
} catch (error) {
|
|
166
|
+
// Detect which unsupported library caused the error
|
|
167
|
+
var detection = detectUnsupportedLibrary(error);
|
|
168
|
+
if (detection.isUnsupported && detection.library && detection.config) {
|
|
169
|
+
var library = detection.library;
|
|
170
|
+
var config = detection.config;
|
|
171
|
+
|
|
172
|
+
// Log detailed error
|
|
173
|
+
console.error("[".concat(library.toUpperCase(), " ERROR] in ").concat(componentName, ".").concat(methodName, "()"), "\n".concat(config.errorMessage), "\nError:", error);
|
|
174
|
+
|
|
175
|
+
// Show user notification
|
|
176
|
+
if (appContext !== null && appContext !== void 0 && appContext.notifyApp) {
|
|
177
|
+
appContext.notifyApp(config.notificationMessage, "Error");
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Return undefined to prevent further errors
|
|
181
|
+
return undefined;
|
|
182
|
+
} else {
|
|
183
|
+
// Not an unsupported library error - log normally
|
|
184
|
+
console.log("Error in ".concat(componentName, ".").concat(methodName, "():"));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// Preserve function name for debugging
|
|
190
|
+
Object.defineProperty(pageProxy[methodName], "name", {
|
|
191
|
+
value: "wrapped_".concat(methodName),
|
|
192
|
+
writable: false
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
};
|
|
@@ -89,6 +89,7 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ServiceV
|
|
|
89
89
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "cancelTokenSource", void 0);
|
|
90
90
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "initialized", false);
|
|
91
91
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "params", undefined);
|
|
92
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "lastInvokedParams", undefined);
|
|
92
93
|
_this.setupEventHandlers(config);
|
|
93
94
|
return _this;
|
|
94
95
|
}
|
|
@@ -164,18 +165,20 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ServiceV
|
|
|
164
165
|
value: function () {
|
|
165
166
|
var _invokeOnParamChange = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
166
167
|
var _this2 = this;
|
|
167
|
-
var
|
|
168
|
+
var latest, last;
|
|
168
169
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
169
170
|
while (1) switch (_context3.prev = _context3.next) {
|
|
170
171
|
case 0:
|
|
171
|
-
|
|
172
|
-
|
|
172
|
+
latest = (0, _lodashEs.merge)({}, this.config.paramProvider(), this.params || {}, this.dataBinding);
|
|
173
|
+
last = this.lastInvokedParams || {};
|
|
173
174
|
if (!(!(0, _lodashEs.isEqual)(last, latest) && latest !== undefined && !(0, _lodashEs.isEmpty)(latest))) {
|
|
174
|
-
_context3.next =
|
|
175
|
+
_context3.next = 12;
|
|
175
176
|
break;
|
|
176
177
|
}
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
// Update lastInvokedParams to reflect the merged values
|
|
179
|
+
this.lastInvokedParams = (0, _common.deepCopy)({}, latest);
|
|
180
|
+
_context3.prev = 4;
|
|
181
|
+
_context3.next = 7;
|
|
179
182
|
return new Promise(function (resolve, reject) {
|
|
180
183
|
_this2.invoke(latest, function (data) {
|
|
181
184
|
return resolve(data);
|
|
@@ -183,20 +186,20 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ServiceV
|
|
|
183
186
|
return reject(error);
|
|
184
187
|
});
|
|
185
188
|
});
|
|
186
|
-
case
|
|
187
|
-
_context3.next =
|
|
189
|
+
case 7:
|
|
190
|
+
_context3.next = 12;
|
|
188
191
|
break;
|
|
189
|
-
case
|
|
190
|
-
_context3.prev =
|
|
191
|
-
_context3.t0 = _context3["catch"](
|
|
192
|
+
case 9:
|
|
193
|
+
_context3.prev = 9;
|
|
194
|
+
_context3.t0 = _context3["catch"](4);
|
|
192
195
|
console.error("Error in invokeOnParamChange:", _context3.t0);
|
|
193
|
-
case 11:
|
|
194
|
-
return _context3.abrupt("return", this);
|
|
195
196
|
case 12:
|
|
197
|
+
return _context3.abrupt("return", this);
|
|
198
|
+
case 13:
|
|
196
199
|
case "end":
|
|
197
200
|
return _context3.stop();
|
|
198
201
|
}
|
|
199
|
-
}, _callee3, this, [[
|
|
202
|
+
}, _callee3, this, [[4, 9]]);
|
|
200
203
|
}));
|
|
201
204
|
function invokeOnParamChange() {
|
|
202
205
|
return _invokeOnParamChange.apply(this, arguments);
|