@wavemaker-ai/react-runtime 1.0.0-rc.647469 → 1.0.0-rc.647499
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/base-action.d.ts +7 -0
- package/actions/login-action.d.ts +11 -0
- package/actions/logout-action.d.ts +10 -0
- package/actions/navigation-action.d.ts +35 -0
- package/actions/navigation-action.js +23 -5
- package/actions/notification-action.d.ts +20 -0
- package/actions/timer-action.d.ts +27 -0
- package/components/advanced/carousel/index.d.ts +1 -0
- package/components/advanced/carousel/index.js +2 -1
- package/components/advanced/carousel/template.d.ts +1 -0
- package/components/advanced/carousel/template.js +2 -1
- package/components/advanced/login/index.d.ts +1 -0
- package/components/advanced/marquee/index.d.ts +1 -0
- package/components/advanced/marquee/index.js +2 -1
- package/components/basic/anchor/index.d.ts +1 -0
- package/components/basic/anchor/index.js +4 -3
- package/components/basic/audio/index.d.ts +1 -0
- package/components/basic/audio/index.js +3 -2
- package/components/basic/html/index.d.ts +1 -0
- package/components/basic/icon/index.d.ts +1 -0
- package/components/basic/icon/index.js +4 -7
- package/components/basic/iframe/iframe.utils.d.ts +1 -1
- package/components/basic/iframe/iframe.utils.js +8 -4
- package/components/basic/iframe/index.d.ts +1 -0
- package/components/basic/label/index.d.ts +1 -0
- package/components/basic/label/index.js +3 -2
- package/components/basic/message/index.js +1 -1
- package/components/basic/picture/index.d.ts +1 -0
- package/components/basic/picture/index.js +3 -4
- package/components/basic/progress-bar/index.d.ts +1 -0
- package/components/basic/progress-bar/index.js +2 -1
- package/components/basic/progress-circle/index.d.ts +1 -0
- package/components/basic/richtexteditor/index.d.ts +2 -0
- package/components/basic/search/index.d.ts +3 -0
- package/components/basic/search/index.js +7 -4
- package/components/basic/search/props.d.ts +2 -0
- package/components/basic/spinner/index.d.ts +1 -0
- package/components/basic/tile/index.d.ts +1 -0
- package/components/basic/tile/index.js +2 -1
- package/components/basic/tree/Components/TreeNodeComponent.js +9 -5
- package/components/basic/tree/index.d.ts +1 -0
- package/components/basic/tree/index.js +14 -3
- package/components/basic/tree/utils.d.ts +2 -0
- package/components/basic/tree/utils.js +11 -1
- package/components/basic/video/index.d.ts +1 -0
- package/components/basic/video/index.js +40 -23
- package/components/chart/index.d.ts +1 -0
- package/components/common/AppSpinner.js +2 -5
- package/components/container/accordion/accordion-pane/index.d.ts +1 -0
- package/components/container/accordion/accordion-pane/index.js +1 -4
- package/components/container/accordion/index.d.ts +1 -0
- package/components/container/index.d.ts +3 -0
- package/components/container/index.js +6 -1
- package/components/container/layout-grid/grid-column/index.d.ts +1 -0
- package/components/container/layout-grid/grid-row/index.d.ts +1 -0
- package/components/container/layout-grid/index.d.ts +1 -0
- package/components/container/layout-grid/index.js +4 -8
- package/components/container/linear-layout/index.d.ts +1 -0
- package/components/container/linear-layout/linear-layout-item/index.d.ts +1 -0
- package/components/container/panel/components/panel-header/index.js +11 -6
- package/components/container/panel/components/panel-header/props.d.ts +5 -0
- package/components/container/panel/index.d.ts +1 -0
- package/components/container/panel/index.js +2 -1
- package/components/container/props.d.ts +2 -0
- package/components/container/repeat-template/index.d.ts +22 -1
- package/components/container/repeat-template/index.js +2 -1
- package/components/container/tabs/index.d.ts +3 -1
- package/components/container/tabs/index.js +102 -51
- package/components/container/tabs/props.d.ts +12 -0
- package/components/container/tabs/tab-pane/index.d.ts +1 -0
- package/components/container/tabs/tab-pane/index.js +28 -11
- package/components/container/wizard/index.d.ts +2 -0
- package/components/container/wizard/wizard-step/index.d.ts +1 -0
- package/components/container/wizard/wizard-step/index.js +2 -2
- package/components/data/card/card-actions/index.d.ts +1 -0
- package/components/data/card/card-actions/index.js +3 -5
- package/components/data/card/card-content/index.d.ts +1 -0
- package/components/data/card/card-content/index.js +3 -13
- package/components/data/card/card-footer/index.d.ts +1 -0
- package/components/data/card/card-footer/index.js +3 -5
- package/components/data/card/index.d.ts +1 -0
- package/components/data/card/index.js +3 -14
- package/components/data/form/dynamic-fields/index.js +7 -1
- package/components/data/form/dynamic-fields/props.d.ts +1 -0
- package/components/data/form/form-action/index.d.ts +2 -0
- package/components/data/form/form-body/index.js +2 -1
- package/components/data/form/form-field/base-field.js +4 -3
- package/components/data/form/form-footer/index.js +2 -1
- package/components/data/list/components/ListItemWithTemplate.js +4 -2
- package/components/data/list/hooks/props.d.ts +2 -2
- package/components/data/list/hooks/useListEventHandlers.js +6 -6
- package/components/data/list/index.d.ts +2 -0
- package/components/data/list/index.js +3 -4
- package/components/data/list/props.d.ts +2 -1
- package/components/data/list/utils/list-widget-methods.d.ts +2 -1
- package/components/data/table/components/RowCells.d.ts +16 -2
- package/components/data/table/components/RowCells.js +38 -24
- package/components/data/table/components/TableBody.js +11 -3
- package/components/data/table/components/TableDataRow.d.ts +3 -0
- package/components/data/table/components/TableDataRow.js +11 -3
- package/components/data/table/components/TableHeader.js +1 -4
- package/components/data/table/hooks/index.d.ts +1 -0
- package/components/data/table/hooks/index.js +12 -0
- package/components/data/table/hooks/useCustomExpressionColumns.d.ts +16 -0
- package/components/data/table/hooks/useCustomExpressionColumns.js +88 -0
- package/components/data/table/hooks/useDynamicColumns.js +1 -1
- package/components/data/table/hooks/useResponsiveColumns.d.ts +1 -0
- package/components/data/table/hooks/useRowSelection.d.ts +1 -1
- package/components/data/table/hooks/useRowSelection.js +26 -5
- package/components/data/table/hooks/useTableInitialization.js +2 -1
- package/components/data/table/index.d.ts +4 -0
- package/components/data/table/index.js +77 -12
- package/components/data/table/live-table/index.d.ts +1 -0
- package/components/data/table/props.d.ts +7 -0
- package/components/data/table/table-action/index.d.ts +1 -0
- package/components/data/table/table-column/index.d.ts +1 -0
- package/components/data/table/table-row/index.d.ts +1 -0
- package/components/data/table/table-row-action/index.d.ts +1 -0
- package/components/data/table/utils/buildSelectionColumns.js +7 -1
- package/components/data/table/utils/columnBuilder.js +1 -1
- package/components/data/table/utils/index.js +2 -2
- package/components/data/table/utils/renderDisplayCell.js +1 -1
- package/components/dialogs/alert-dialog/index.d.ts +2 -0
- package/components/dialogs/confirm-dialog/index.d.ts +2 -0
- package/components/dialogs/dialog/index.d.ts +2 -0
- package/components/dialogs/dialog/index.js +2 -4
- package/components/dialogs/dialog-actions/index.d.ts +1 -0
- package/components/dialogs/dialog-body/index.d.ts +1 -0
- package/components/dialogs/dialog-content/index.d.ts +1 -0
- package/components/dialogs/dialog-header/index.d.ts +1 -0
- package/components/dialogs/iframe-dialog/index.d.ts +2 -0
- package/components/dialogs/login-dialog/index.d.ts +2 -0
- package/components/dialogs/page-dialog/index.d.ts +2 -0
- package/components/form/button/index.d.ts +1 -0
- package/components/form/button/index.js +4 -3
- package/components/form/button-group/index.d.ts +1 -0
- package/components/form/button-group/index.js +2 -1
- package/components/input/calendar/index.d.ts +2 -0
- package/components/input/chips/index.d.ts +2 -0
- package/components/input/color-picker/index.d.ts +2 -0
- package/components/input/composite/index.d.ts +1 -0
- package/components/input/currency/index.d.ts +2 -0
- package/components/input/default/checkbox/index.d.ts +2 -0
- package/components/input/default/checkboxset/index.d.ts +2 -0
- package/components/input/default/radioset/index.d.ts +2 -0
- package/components/input/default/switch/index.d.ts +2 -0
- package/components/input/epoch/date/components/DatePickerPopover.js +11 -29
- package/components/input/epoch/date/index.d.ts +1 -0
- package/components/input/epoch/datetime/index.d.ts +1 -0
- package/components/input/epoch/datetime/index.js +10 -25
- package/components/input/epoch/time/index.d.ts +1 -0
- package/components/input/epoch/time/index.js +1 -1
- package/components/input/epoch/time/utils.d.ts +0 -17
- package/components/input/epoch/time/utils.js +1 -18
- package/components/input/fileupload/index.d.ts +1 -0
- package/components/input/number/index.d.ts +2 -0
- package/components/input/rating/index.d.ts +2 -0
- package/components/input/rating/index.js +14 -17
- package/components/input/select/index.d.ts +2 -0
- package/components/input/select/index.js +1 -4
- package/components/input/slider/index.d.ts +2 -0
- package/components/input/slider/index.js +13 -12
- package/components/input/text/index.d.ts +2 -0
- package/components/input/text/index.js +3 -14
- package/components/input/textarea/index.d.ts +2 -0
- package/components/input/textarea/index.js +7 -10
- package/components/input/upload/index.d.ts +2 -0
- package/components/input/upload/index.js +3 -5
- package/components/layout/footer/index.js +2 -1
- package/components/layout/footer/props.d.ts +1 -0
- package/components/layout/header/index.js +2 -1
- package/components/layout/header/props.d.ts +1 -0
- package/components/layout/leftnav/index.js +2 -1
- package/components/layout/leftnav/props.d.ts +1 -0
- package/components/layout/rightnav/index.js +2 -1
- package/components/layout/rightnav/props.d.ts +1 -0
- package/components/layout/topnav/index.js +2 -1
- package/components/layout/topnav/props.d.ts +1 -0
- package/components/navbar/index.d.ts +1 -0
- package/components/navbar/index.js +2 -1
- package/components/navbar/nav/index.d.ts +1 -0
- package/components/navbar/nav-item/index.d.ts +1 -0
- package/components/navbar/nav-item/index.js +2 -1
- package/components/navigation/breadcrumb/index.d.ts +1 -0
- package/components/navigation/menu/index.d.ts +1 -0
- package/components/navigation/menu/index.js +5 -4
- package/components/navigation/popover/index.d.ts +2 -1
- package/components/navigation/popover/index.js +1 -1
- package/components/page/error-boundary/index.js +5 -5
- package/components/page/index.js +13 -9
- package/components/page/partial/index.d.ts +1 -0
- package/components/prefab/container/index.js +2 -1
- package/context/WidgetProvider.js +2 -2
- package/core/app.service.js +40 -35
- package/core/constants/events.js +6 -0
- package/core/constants/index.d.ts +9 -1
- package/core/constants/index.js +32 -5
- package/core/formatter/date-formatters.d.ts +1 -1
- package/core/formatter/date-formatters.js +38 -13
- package/core/formatter/types.d.ts +1 -1
- package/core/proxy-service.js +15 -5
- package/core/security.service.d.ts +12 -0
- package/core/util/index.js +3 -2
- package/higherOrder/BaseApp.js +2 -2
- package/higherOrder/BasePage.d.ts +0 -17
- package/higherOrder/BasePage.js +53 -104
- package/higherOrder/BasePrefab.js +69 -59
- package/higherOrder/props.d.ts +1 -0
- package/higherOrder/withBaseWrapper.js +3 -4
- package/hooks/useAccess.js +13 -0
- package/mui-config/theme-provider.d.ts +3 -0
- package/mui-config/theme.d.ts +2 -0
- package/mui-config/theme.js +1 -4
- package/package-lock.json +2640 -615
- package/package.json +23 -4
- package/runtime-dynamic/App.d.ts +7 -0
- package/runtime-dynamic/App.js +144 -0
- package/runtime-dynamic/app-initializer.d.ts +15 -0
- package/runtime-dynamic/app-initializer.js +447 -0
- package/runtime-dynamic/components/ErrorBoundary.d.ts +18 -0
- package/runtime-dynamic/components/ErrorBoundary.js +93 -0
- package/runtime-dynamic/components/PageWrapper.d.ts +1 -0
- package/runtime-dynamic/components/PageWrapper.js +43 -0
- package/runtime-dynamic/components/PrefabPreview.d.ts +1 -0
- package/runtime-dynamic/components/PrefabPreview.js +84 -0
- package/runtime-dynamic/components/partial-content.d.ts +15 -0
- package/runtime-dynamic/components/partial-content.js +50 -0
- package/runtime-dynamic/components/prefab-content.d.ts +10 -0
- package/runtime-dynamic/components/prefab-content.js +31 -0
- package/runtime-dynamic/components/use-dynamic-component.d.ts +10 -0
- package/runtime-dynamic/components/use-dynamic-component.js +165 -0
- package/runtime-dynamic/factories/build-base-page-like-component.d.ts +8 -0
- package/runtime-dynamic/factories/build-base-page-like-component.js +59 -0
- package/runtime-dynamic/factories/prefab-factory.d.ts +3 -0
- package/runtime-dynamic/factories/prefab-factory.js +82 -0
- package/runtime-dynamic/factories/startup-info.d.ts +6 -0
- package/runtime-dynamic/factories/startup-info.js +28 -0
- package/runtime-dynamic/factories/utils.d.ts +23 -0
- package/runtime-dynamic/factories/utils.js +131 -0
- package/runtime-dynamic/index.d.ts +14 -0
- package/runtime-dynamic/index.js +191 -0
- package/runtime-dynamic/main.d.ts +2 -0
- package/runtime-dynamic/main.js +84 -0
- package/runtime-dynamic/preview-mode.d.ts +15 -0
- package/runtime-dynamic/preview-mode.js +31 -0
- package/runtime-dynamic/preview-navigation.d.ts +6 -0
- package/runtime-dynamic/preview-navigation.js +38 -0
- package/runtime-dynamic/preview-resource-base.d.ts +12 -0
- package/runtime-dynamic/preview-resource-base.js +65 -0
- package/runtime-dynamic/registry/component-registry.d.ts +3 -0
- package/runtime-dynamic/registry/component-registry.js +353 -0
- package/runtime-dynamic/registry/custom-widget-registry.d.ts +7 -0
- package/runtime-dynamic/registry/custom-widget-registry.js +18 -0
- package/runtime-dynamic/registry/index.d.ts +2 -0
- package/runtime-dynamic/registry/index.js +63 -0
- package/runtime-dynamic/registry/store.d.ts +9 -0
- package/runtime-dynamic/registry/store.js +26 -0
- package/runtime-dynamic/routes.d.ts +2 -0
- package/runtime-dynamic/routes.js +107 -0
- package/runtime-dynamic/services/app-extension-provider.d.ts +1 -0
- package/runtime-dynamic/services/app-extension-provider.js +45 -0
- package/runtime-dynamic/services/cache.d.ts +29 -0
- package/runtime-dynamic/services/cache.js +57 -0
- package/runtime-dynamic/services/component-ref-provider.d.ts +12 -0
- package/runtime-dynamic/services/component-ref-provider.js +149 -0
- package/runtime-dynamic/services/css-scoping.d.ts +2 -0
- package/runtime-dynamic/services/css-scoping.js +53 -0
- package/runtime-dynamic/services/fragment-url.d.ts +16 -0
- package/runtime-dynamic/services/fragment-url.js +74 -0
- package/runtime-dynamic/services/index.d.ts +10 -0
- package/runtime-dynamic/services/index.js +152 -0
- package/runtime-dynamic/services/markup-transpiler.d.ts +12 -0
- package/runtime-dynamic/services/markup-transpiler.js +250 -0
- package/runtime-dynamic/services/prefab-resources.d.ts +18 -0
- package/runtime-dynamic/services/prefab-resources.js +159 -0
- package/runtime-dynamic/services/resource-manager.d.ts +2 -0
- package/runtime-dynamic/services/resource-manager.js +66 -0
- package/runtime-dynamic/services/script-executor.d.ts +8 -0
- package/runtime-dynamic/services/script-executor.js +90 -0
- package/runtime-dynamic/services/variable-factory.d.ts +2 -0
- package/runtime-dynamic/services/variable-factory.js +260 -0
- package/runtime-dynamic/services/variable-registry.d.ts +12 -0
- package/runtime-dynamic/services/variable-registry.js +118 -0
- package/runtime-dynamic/services/variable-transpiler.d.ts +5 -0
- package/runtime-dynamic/services/variable-transpiler.js +159 -0
- package/runtime-dynamic/shims/next-image.d.ts +35 -0
- package/runtime-dynamic/shims/next-image.js +60 -0
- package/runtime-dynamic/shims/next-link.d.ts +25 -0
- package/runtime-dynamic/shims/next-link.js +33 -0
- package/runtime-dynamic/shims/next-navigation.d.ts +16 -0
- package/runtime-dynamic/shims/next-navigation.js +52 -0
- package/runtime-dynamic/utils/index.d.ts +9 -0
- package/runtime-dynamic/utils/index.js +40 -0
- package/store/middleware/navigationMiddleware.js +1 -1
- package/store/slices/appConfigSlice.js +10 -8
- package/store/slices/authSlice.js +46 -32
- package/tsconfig.declaration.tsbuildinfo +1 -1
- package/types/index.d.ts +1 -0
- package/utils/attr.js +71 -14
- package/utils/custom-expression/index.d.ts +43 -0
- package/utils/custom-expression/index.js +161 -0
- package/utils/custom-expression/parser.d.ts +15 -0
- package/utils/custom-expression/parser.js +208 -0
- package/utils/layoutsize-util.d.ts +1 -0
- package/utils/layoutsize-util.js +57 -0
- package/utils/lib-error-skipper.d.ts +4 -26
- package/utils/lib-error-skipper.js +41 -165
- package/utils/style-utils.d.ts +6 -0
- package/utils/style-utils.js +10 -1
- package/variables/metadata.service.js +2 -3
- package/variables/model-variable.js +10 -7
- package/variables/service-variable.d.ts +1 -0
- package/variables/service-variable.js +26 -6
- package/components/input/epoch/datetime/styled.d.ts +0 -78
- package/components/input/epoch/datetime/styled.js +0 -90
|
@@ -6,194 +6,70 @@ 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; }
|
|
12
9
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Configuration for unsupported libraries
|
|
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.
|
|
19
13
|
*/
|
|
20
14
|
|
|
21
15
|
var UNSUPPORTED_LIBRARIES = {
|
|
22
16
|
jquery: {
|
|
23
|
-
// Use specific jQuery patterns - avoid matching Wavemaker vars like $index, $data
|
|
24
17
|
identifiers: ["jQuery", "$(", "$."],
|
|
25
18
|
errorMessage: "jQuery is not supported in React App",
|
|
26
19
|
notificationMessage: "jQuery functionality is not supported. Check console for details."
|
|
27
20
|
}
|
|
28
|
-
// Add more libraries here in future
|
|
29
21
|
};
|
|
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
|
-
*/
|
|
40
22
|
function detectUnsupportedLibrary(error) {
|
|
41
|
-
if (!error
|
|
42
|
-
|
|
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
|
|
23
|
+
if (!(error !== null && error !== void 0 && error.stack)) return null;
|
|
24
|
+
var haystack = "".concat(error.message || "", "\n").concat(error.stack);
|
|
51
25
|
for (var _i = 0, _Object$entries = Object.entries(UNSUPPORTED_LIBRARIES); _i < _Object$entries.length; _i++) {
|
|
52
26
|
var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2),
|
|
53
|
-
|
|
27
|
+
name = _Object$entries$_i[0],
|
|
54
28
|
config = _Object$entries$_i[1];
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// Check if error message contains library identifiers
|
|
58
|
-
if (identifiers.some(function (identifier) {
|
|
59
|
-
return errorMessage.includes(identifier);
|
|
29
|
+
if (config.identifiers.some(function (id) {
|
|
30
|
+
return haystack.includes(id);
|
|
60
31
|
})) {
|
|
61
32
|
return {
|
|
62
|
-
|
|
63
|
-
library: libraryName,
|
|
33
|
+
library: name,
|
|
64
34
|
config: config
|
|
65
35
|
};
|
|
66
36
|
}
|
|
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
|
-
}
|
|
97
37
|
}
|
|
98
|
-
return
|
|
99
|
-
isUnsupported: false,
|
|
100
|
-
library: null
|
|
101
|
-
};
|
|
38
|
+
return null;
|
|
102
39
|
}
|
|
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
|
-
*/
|
|
109
40
|
var isJQueryError = exports.isJQueryError = function isJQueryError(error) {
|
|
110
|
-
|
|
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;
|
|
41
|
+
var _detectUnsupportedLib;
|
|
42
|
+
return ((_detectUnsupportedLib = detectUnsupportedLibrary(error)) === null || _detectUnsupportedLib === void 0 ? void 0 : _detectUnsupportedLib.library) === "jquery";
|
|
148
43
|
};
|
|
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
|
-
*/
|
|
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"]);
|
|
156
45
|
var wrapWithThirdPartyErrorGuard = exports.wrapWithThirdPartyErrorGuard = function wrapWithThirdPartyErrorGuard(pageProxy, appContext, componentName) {
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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
|
-
}
|
|
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];
|
|
189
54
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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;
|
|
63
|
+
}
|
|
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
|
+
}
|
|
199
75
|
};
|
package/utils/style-utils.d.ts
CHANGED
|
@@ -20,3 +20,9 @@ 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;
|
package/utils/style-utils.js
CHANGED
|
@@ -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.sanitizeStyleObject = exports.mergeStyleObjects = exports.isValidStyleObject = exports.filterAutoLayoutClasses = void 0;
|
|
7
|
+
exports.toCssLength = 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,4 +80,13 @@ 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);
|
|
83
92
|
};
|
|
@@ -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;
|
|
37
37
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
38
38
|
while (1) switch (_context.prev = _context.next) {
|
|
39
39
|
case 0:
|
|
@@ -44,8 +44,7 @@ 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
|
-
|
|
48
|
-
url = "".concat(baseUrl, "/services/").concat(previewPath, "/servicedefs");
|
|
47
|
+
url = prefabName && prefabName !== "__self__" ? "".concat(baseUrl, "/services/prefabs/").concat(prefabName, "/servicedefs") : "".concat(baseUrl, "/services/servicedefs");
|
|
49
48
|
} else {
|
|
50
49
|
url = "".concat(baseUrl, "/services/servicedefs/").concat(serviceDefFileName);
|
|
51
50
|
}
|
|
@@ -5,6 +5,7 @@ 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"));
|
|
8
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -24,13 +25,12 @@ var ModelVariable = exports.ModelVariable = /*#__PURE__*/function (_ref) {
|
|
|
24
25
|
function ModelVariable(config) {
|
|
25
26
|
var _this;
|
|
26
27
|
(0, _classCallCheck2["default"])(this, ModelVariable);
|
|
27
|
-
|
|
28
|
+
var initialData = config.paramProvider();
|
|
28
29
|
var variable = {
|
|
29
30
|
name: config.name,
|
|
30
|
-
dataSet: config.
|
|
31
|
+
dataSet: initialData != null ? initialData : config.isList ? [] : {
|
|
31
32
|
dataValue: ""
|
|
32
33
|
},
|
|
33
|
-
// Default empty value
|
|
34
34
|
isList: config.isList,
|
|
35
35
|
twoWayBinding: config.twoWayBinding
|
|
36
36
|
};
|
|
@@ -49,12 +49,15 @@ var ModelVariable = exports.ModelVariable = /*#__PURE__*/function (_ref) {
|
|
|
49
49
|
value: function invoke(params, onSuccess, onError) {
|
|
50
50
|
var result;
|
|
51
51
|
try {
|
|
52
|
-
|
|
53
|
-
|
|
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);
|
|
54
57
|
} else if (this.dataSet && Object.keys(this.dataSet).length !== 0) {
|
|
55
|
-
this.dataSet = _objectSpread({}, this.dataSet);
|
|
58
|
+
this.dataSet = Array.isArray(this.dataSet) ? (0, _toConsumableArray2["default"])(this.dataSet) : _objectSpread({}, this.dataSet);
|
|
56
59
|
} else {
|
|
57
|
-
this.dataSet =
|
|
60
|
+
this.dataSet = provided;
|
|
58
61
|
}
|
|
59
62
|
this.notify(_baseVariable.VariableEvents.BEFORE_INVOKE, [this, this.dataSet]);
|
|
60
63
|
result = _superPropGet(ModelVariable, "execute", this, 3)([params, function () {}]);
|
|
@@ -27,6 +27,7 @@ export declare class ServiceVariable extends ServiceVariable_base {
|
|
|
27
27
|
private dateFormatter;
|
|
28
28
|
private lastParams;
|
|
29
29
|
private lastParamProviderValues;
|
|
30
|
+
private dataBindingRequestBody;
|
|
30
31
|
constructor(config: ServiceVariableConfig);
|
|
31
32
|
private updateFirstAndLastRecord;
|
|
32
33
|
private setupEventHandlers;
|
|
@@ -61,6 +61,7 @@ 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);
|
|
64
65
|
_this.notify(_baseVariable.VariableEvents.AFTER_INVOKE, [args.variable, args.data, args.options]);
|
|
65
66
|
_this.notify(_baseVariable.VariableEvents.SUCCESS, [args.variable, args.data, args.options]);
|
|
66
67
|
_this.updateFirstAndLastRecord(args.data);
|
|
@@ -113,6 +114,22 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ref) {
|
|
|
113
114
|
// Method to update firstRecord and lastRecord from the current dataset
|
|
114
115
|
(0, _inherits2["default"])(ServiceVariable, _ref);
|
|
115
116
|
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
|
+
}, {
|
|
116
133
|
key: "updateFirstAndLastRecord",
|
|
117
134
|
value: function updateFirstAndLastRecord(data) {
|
|
118
135
|
try {
|
|
@@ -264,14 +281,17 @@ var ServiceVariable = exports.ServiceVariable = /*#__PURE__*/function (_ref) {
|
|
|
264
281
|
}, {
|
|
265
282
|
key: "invoke",
|
|
266
283
|
value: function invoke(options, onSuccess, onError) {
|
|
267
|
-
|
|
268
|
-
|
|
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);
|
|
269
286
|
if (options) {
|
|
270
|
-
|
|
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 = {};
|
|
271
292
|
}
|
|
272
|
-
options =
|
|
273
|
-
|
|
274
|
-
this.lastInvokedParams = this.params;
|
|
293
|
+
options.inputFields = inputFields;
|
|
294
|
+
this.lastInvokedParams = inputFields;
|
|
275
295
|
|
|
276
296
|
// Normalize orderBy option
|
|
277
297
|
if (!options.orderBy) {
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
export declare const datePickerSx: (showweeks: boolean) => {
|
|
2
|
-
"& .MuiPaper-root": {
|
|
3
|
-
background: string;
|
|
4
|
-
padding: string;
|
|
5
|
-
borderRadius: string;
|
|
6
|
-
};
|
|
7
|
-
"& .MuiDateCalendar-root": {
|
|
8
|
-
width: string;
|
|
9
|
-
};
|
|
10
|
-
"& .MuiDayCalendar-header": {
|
|
11
|
-
justifyContent: string;
|
|
12
|
-
};
|
|
13
|
-
"& .MuiDayCalendar-weekNumber": {
|
|
14
|
-
marginTop: string;
|
|
15
|
-
textAlign: string;
|
|
16
|
-
};
|
|
17
|
-
"& .MuiDayCalendar-slideTransition": {
|
|
18
|
-
minHeight: string;
|
|
19
|
-
};
|
|
20
|
-
"& .MuiDayCalendar-weekNumberLabel": {
|
|
21
|
-
width: string;
|
|
22
|
-
padding: string;
|
|
23
|
-
};
|
|
24
|
-
"& .MuiTypography-caption": {
|
|
25
|
-
padding: string;
|
|
26
|
-
};
|
|
27
|
-
"& .MuiYearCalendar-root": {
|
|
28
|
-
width: string;
|
|
29
|
-
};
|
|
30
|
-
"& .MuiPickersDay-root.Mui-selected": {
|
|
31
|
-
backgroundColor: string;
|
|
32
|
-
color: string;
|
|
33
|
-
fontWeight: string;
|
|
34
|
-
};
|
|
35
|
-
"& .MuiMonthCalendar-button.Mui-selected": {
|
|
36
|
-
backgroundColor: string;
|
|
37
|
-
color: string;
|
|
38
|
-
fontWeight: string;
|
|
39
|
-
};
|
|
40
|
-
"& .MuiPickersDay-root.Mui-selected:hover": {
|
|
41
|
-
backgroundColor: string;
|
|
42
|
-
color: string;
|
|
43
|
-
};
|
|
44
|
-
"& .MuiYearCalendar-button.Mui-selected": {
|
|
45
|
-
backgroundColor: string;
|
|
46
|
-
color: string;
|
|
47
|
-
fontWeight: string;
|
|
48
|
-
};
|
|
49
|
-
"& .MuiPickersDay-today": {
|
|
50
|
-
backgroundColor: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export declare const timePickerSx: () => {
|
|
54
|
-
"& .css-1y6l765-MuiPickersLayout-root": {
|
|
55
|
-
display: string;
|
|
56
|
-
};
|
|
57
|
-
"& .MuiPaper-root": {
|
|
58
|
-
background: string;
|
|
59
|
-
padding: string;
|
|
60
|
-
borderRadius: string;
|
|
61
|
-
};
|
|
62
|
-
"& .Mui-selected": {
|
|
63
|
-
backgroundColor: string;
|
|
64
|
-
color: string;
|
|
65
|
-
};
|
|
66
|
-
"& .Mui-selected:hover": {
|
|
67
|
-
backgroundColor: string;
|
|
68
|
-
color: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export declare const buttonStyles: () => {
|
|
72
|
-
"& .MuiButton-root": {
|
|
73
|
-
"--wm-btn-color": string;
|
|
74
|
-
"--wm-btn-state-layer-color": string;
|
|
75
|
-
background: string;
|
|
76
|
-
border: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.timePickerSx = exports.datePickerSx = exports.buttonStyles = void 0;
|
|
7
|
-
var datePickerSx = exports.datePickerSx = function datePickerSx(showweeks) {
|
|
8
|
-
return {
|
|
9
|
-
"& .MuiPaper-root": {
|
|
10
|
-
background: "var(--wm-datepicker-background)",
|
|
11
|
-
padding: "var(--wm-datepicker-padding)",
|
|
12
|
-
borderRadius: "var(--wm-datepicker-border-radius)"
|
|
13
|
-
},
|
|
14
|
-
"& .MuiDateCalendar-root": {
|
|
15
|
-
width: showweeks ? "420px" : "370px"
|
|
16
|
-
},
|
|
17
|
-
"& .MuiDayCalendar-header": {
|
|
18
|
-
justifyContent: "space-evenly"
|
|
19
|
-
},
|
|
20
|
-
"& .MuiDayCalendar-weekNumber": {
|
|
21
|
-
marginTop: "10px",
|
|
22
|
-
textAlign: "center"
|
|
23
|
-
},
|
|
24
|
-
"& .MuiDayCalendar-slideTransition": {
|
|
25
|
-
minHeight: "260px"
|
|
26
|
-
},
|
|
27
|
-
"& .MuiDayCalendar-weekNumberLabel": {
|
|
28
|
-
width: "32px !important",
|
|
29
|
-
padding: "0px 0px !important"
|
|
30
|
-
},
|
|
31
|
-
"& .MuiTypography-caption": {
|
|
32
|
-
padding: "0px 24px"
|
|
33
|
-
},
|
|
34
|
-
"& .MuiYearCalendar-root": {
|
|
35
|
-
width: "auto"
|
|
36
|
-
},
|
|
37
|
-
"& .MuiPickersDay-root.Mui-selected": {
|
|
38
|
-
backgroundColor: "var(--wm-btn-secondary-background) !important",
|
|
39
|
-
color: "var(--wm-btn-secondary-color)",
|
|
40
|
-
fontWeight: "bold"
|
|
41
|
-
},
|
|
42
|
-
"& .MuiMonthCalendar-button.Mui-selected": {
|
|
43
|
-
backgroundColor: "var(--wm-btn-secondary-background) !important",
|
|
44
|
-
color: "var(--wm-btn-secondary-color)",
|
|
45
|
-
fontWeight: "bold"
|
|
46
|
-
},
|
|
47
|
-
"& .MuiPickersDay-root.Mui-selected:hover": {
|
|
48
|
-
backgroundColor: "var(--wm-btn-secondary-background)",
|
|
49
|
-
color: "var(--wm-btn-secondary-color)"
|
|
50
|
-
},
|
|
51
|
-
"& .MuiYearCalendar-button.Mui-selected": {
|
|
52
|
-
backgroundColor: "var(--wm-btn-secondary-background) !important",
|
|
53
|
-
color: "var(--wm-btn-secondary-color)",
|
|
54
|
-
fontWeight: "bold"
|
|
55
|
-
},
|
|
56
|
-
"& .MuiPickersDay-today": {
|
|
57
|
-
backgroundColor: "transparent !important"
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
var timePickerSx = exports.timePickerSx = function timePickerSx() {
|
|
62
|
-
return {
|
|
63
|
-
"& .css-1y6l765-MuiPickersLayout-root": {
|
|
64
|
-
display: "inline-block"
|
|
65
|
-
},
|
|
66
|
-
"& .MuiPaper-root": {
|
|
67
|
-
background: "var(--wm-timepicker-background)",
|
|
68
|
-
padding: "var(--wm-timepicker-padding)",
|
|
69
|
-
borderRadius: "var(--wm-timepicker-border-radius)"
|
|
70
|
-
},
|
|
71
|
-
"& .Mui-selected": {
|
|
72
|
-
backgroundColor: "var(--wm-btn-secondary-background) !important",
|
|
73
|
-
color: "var(--wm-btn-secondary-color) !important"
|
|
74
|
-
},
|
|
75
|
-
"& .Mui-selected:hover": {
|
|
76
|
-
backgroundColor: "var(--wm-btn-secondary-background) !important",
|
|
77
|
-
color: "var(--wm-btn-secondary-color) !important"
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
var buttonStyles = exports.buttonStyles = function buttonStyles() {
|
|
82
|
-
return {
|
|
83
|
-
"& .MuiButton-root": {
|
|
84
|
-
"--wm-btn-color": "var(--wm-color-primary)",
|
|
85
|
-
"--wm-btn-state-layer-color": "var(--wm-color-primary)",
|
|
86
|
-
background: "none",
|
|
87
|
-
border: "none"
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
};
|