@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.
- package/actions/navigation-action.js +5 -23
- package/components/advanced/carousel/index.d.ts +0 -1
- package/components/advanced/carousel/index.js +1 -2
- package/components/advanced/carousel/template.d.ts +0 -1
- package/components/advanced/carousel/template.js +1 -2
- package/components/advanced/login/index.d.ts +0 -1
- package/components/advanced/marquee/index.d.ts +0 -1
- package/components/advanced/marquee/index.js +1 -2
- package/components/basic/anchor/index.d.ts +0 -1
- package/components/basic/anchor/index.js +3 -4
- package/components/basic/audio/index.d.ts +0 -1
- package/components/basic/audio/index.js +2 -3
- package/components/basic/html/index.d.ts +0 -1
- package/components/basic/icon/index.d.ts +0 -1
- package/components/basic/icon/index.js +7 -4
- package/components/basic/iframe/iframe.utils.d.ts +1 -1
- package/components/basic/iframe/iframe.utils.js +4 -8
- package/components/basic/iframe/index.d.ts +0 -1
- package/components/basic/label/index.d.ts +0 -1
- package/components/basic/label/index.js +2 -3
- package/components/basic/message/index.js +1 -1
- package/components/basic/picture/index.d.ts +0 -1
- package/components/basic/picture/index.js +4 -3
- package/components/basic/progress-bar/index.d.ts +0 -1
- package/components/basic/progress-bar/index.js +1 -2
- package/components/basic/progress-circle/index.d.ts +0 -1
- package/components/basic/richtexteditor/index.d.ts +0 -2
- package/components/basic/search/index.d.ts +0 -3
- package/components/basic/search/index.js +4 -7
- package/components/basic/search/props.d.ts +0 -2
- package/components/basic/spinner/index.d.ts +0 -1
- package/components/basic/tile/index.d.ts +0 -1
- package/components/basic/tile/index.js +1 -2
- package/components/basic/tree/Components/TreeNodeComponent.js +5 -9
- package/components/basic/tree/index.d.ts +0 -1
- package/components/basic/tree/index.js +3 -14
- package/components/basic/tree/utils.d.ts +0 -2
- package/components/basic/tree/utils.js +1 -11
- package/components/basic/video/index.d.ts +0 -1
- package/components/basic/video/index.js +23 -40
- package/components/chart/index.d.ts +0 -1
- package/components/common/AppSpinner.js +5 -2
- package/components/container/accordion/accordion-pane/index.d.ts +0 -1
- package/components/container/accordion/accordion-pane/index.js +4 -1
- package/components/container/accordion/index.d.ts +0 -1
- package/components/container/index.d.ts +0 -3
- package/components/container/index.js +1 -6
- package/components/container/layout-grid/grid-column/index.d.ts +0 -1
- package/components/container/layout-grid/grid-row/index.d.ts +0 -1
- package/components/container/layout-grid/index.d.ts +0 -1
- package/components/container/layout-grid/index.js +8 -4
- package/components/container/linear-layout/index.d.ts +0 -1
- package/components/container/linear-layout/linear-layout-item/index.d.ts +0 -1
- package/components/container/panel/components/panel-header/index.js +6 -11
- package/components/container/panel/components/panel-header/props.d.ts +0 -5
- package/components/container/panel/index.d.ts +0 -1
- package/components/container/panel/index.js +1 -2
- package/components/container/props.d.ts +0 -2
- package/components/container/repeat-template/index.d.ts +1 -22
- package/components/container/repeat-template/index.js +1 -2
- package/components/container/tabs/index.d.ts +1 -3
- package/components/container/tabs/index.js +51 -102
- package/components/container/tabs/props.d.ts +0 -12
- package/components/container/tabs/tab-pane/index.d.ts +0 -1
- package/components/container/tabs/tab-pane/index.js +11 -28
- package/components/container/wizard/index.d.ts +0 -2
- package/components/container/wizard/wizard-step/index.d.ts +0 -1
- package/components/container/wizard/wizard-step/index.js +2 -2
- package/components/data/card/card-actions/index.d.ts +0 -1
- package/components/data/card/card-actions/index.js +5 -3
- package/components/data/card/card-content/index.d.ts +0 -1
- package/components/data/card/card-content/index.js +13 -3
- package/components/data/card/card-footer/index.d.ts +0 -1
- package/components/data/card/card-footer/index.js +5 -3
- package/components/data/card/index.d.ts +0 -1
- package/components/data/card/index.js +14 -3
- package/components/data/form/dynamic-fields/index.js +1 -7
- package/components/data/form/dynamic-fields/props.d.ts +0 -1
- package/components/data/form/form-action/index.d.ts +0 -2
- package/components/data/form/form-body/index.js +1 -2
- package/components/data/form/form-field/base-field.js +3 -4
- package/components/data/form/form-footer/index.js +1 -2
- package/components/data/list/components/ListItemWithTemplate.js +2 -4
- 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 +0 -2
- package/components/data/list/index.js +4 -3
- package/components/data/list/props.d.ts +1 -2
- package/components/data/list/utils/list-widget-methods.d.ts +1 -2
- package/components/data/table/components/RowCells.d.ts +2 -16
- package/components/data/table/components/RowCells.js +24 -38
- package/components/data/table/components/TableBody.js +3 -11
- package/components/data/table/components/TableDataRow.d.ts +0 -3
- package/components/data/table/components/TableDataRow.js +3 -11
- package/components/data/table/components/TableHeader.js +4 -1
- package/components/data/table/hooks/index.d.ts +0 -1
- package/components/data/table/hooks/index.js +0 -12
- package/components/data/table/hooks/useDynamicColumns.js +1 -1
- package/components/data/table/hooks/useResponsiveColumns.d.ts +0 -1
- package/components/data/table/hooks/useRowSelection.d.ts +1 -1
- package/components/data/table/hooks/useRowSelection.js +5 -26
- package/components/data/table/hooks/useTableInitialization.js +1 -2
- package/components/data/table/index.d.ts +0 -4
- package/components/data/table/index.js +12 -77
- package/components/data/table/live-table/index.d.ts +0 -1
- package/components/data/table/props.d.ts +0 -7
- package/components/data/table/table-action/index.d.ts +0 -1
- package/components/data/table/table-column/index.d.ts +0 -1
- package/components/data/table/table-row/index.d.ts +0 -1
- package/components/data/table/table-row-action/index.d.ts +0 -1
- package/components/data/table/utils/buildSelectionColumns.js +1 -7
- 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 +0 -2
- package/components/dialogs/confirm-dialog/index.d.ts +0 -2
- package/components/dialogs/dialog/index.d.ts +0 -2
- package/components/dialogs/dialog/index.js +4 -2
- package/components/dialogs/dialog-actions/index.d.ts +0 -1
- package/components/dialogs/dialog-body/index.d.ts +0 -1
- package/components/dialogs/dialog-content/index.d.ts +0 -1
- package/components/dialogs/dialog-header/index.d.ts +0 -1
- package/components/dialogs/iframe-dialog/index.d.ts +0 -2
- package/components/dialogs/login-dialog/index.d.ts +0 -2
- package/components/dialogs/page-dialog/index.d.ts +0 -2
- package/components/form/button/index.d.ts +0 -1
- package/components/form/button/index.js +3 -4
- package/components/form/button-group/index.d.ts +0 -1
- package/components/form/button-group/index.js +1 -2
- package/components/input/calendar/index.d.ts +0 -2
- package/components/input/chips/index.d.ts +0 -2
- package/components/input/color-picker/index.d.ts +0 -2
- package/components/input/composite/index.d.ts +0 -1
- package/components/input/currency/index.d.ts +0 -2
- package/components/input/default/checkbox/index.d.ts +0 -2
- package/components/input/default/checkboxset/index.d.ts +0 -2
- package/components/input/default/radioset/index.d.ts +0 -2
- package/components/input/default/switch/index.d.ts +0 -2
- package/components/input/epoch/date/components/DatePickerPopover.js +29 -11
- package/components/input/epoch/date/index.d.ts +0 -1
- package/components/input/epoch/datetime/index.d.ts +0 -1
- package/components/input/epoch/datetime/index.js +25 -10
- package/components/input/epoch/datetime/styled.d.ts +78 -0
- package/components/input/epoch/datetime/styled.js +90 -0
- package/components/input/epoch/time/index.d.ts +0 -1
- package/components/input/epoch/time/index.js +1 -1
- package/components/input/epoch/time/utils.d.ts +17 -0
- package/components/input/epoch/time/utils.js +18 -1
- package/components/input/fileupload/index.d.ts +0 -1
- package/components/input/number/index.d.ts +0 -2
- package/components/input/rating/index.d.ts +0 -2
- package/components/input/rating/index.js +17 -14
- package/components/input/select/index.d.ts +0 -2
- package/components/input/select/index.js +4 -1
- package/components/input/slider/index.d.ts +0 -2
- package/components/input/slider/index.js +12 -13
- package/components/input/text/index.d.ts +0 -2
- package/components/input/text/index.js +14 -3
- package/components/input/textarea/index.d.ts +0 -2
- package/components/input/textarea/index.js +10 -7
- package/components/input/upload/index.d.ts +0 -2
- package/components/input/upload/index.js +5 -3
- package/components/layout/footer/index.js +1 -2
- package/components/layout/footer/props.d.ts +0 -1
- package/components/layout/header/index.js +1 -2
- package/components/layout/header/props.d.ts +0 -1
- package/components/layout/leftnav/index.js +1 -2
- package/components/layout/leftnav/props.d.ts +0 -1
- package/components/layout/rightnav/index.js +1 -2
- package/components/layout/rightnav/props.d.ts +0 -1
- package/components/layout/topnav/index.js +1 -2
- package/components/layout/topnav/props.d.ts +0 -1
- package/components/navbar/index.d.ts +0 -1
- package/components/navbar/index.js +1 -2
- package/components/navbar/nav/index.d.ts +0 -1
- package/components/navbar/nav-item/index.d.ts +0 -1
- package/components/navbar/nav-item/index.js +1 -2
- package/components/navigation/breadcrumb/index.d.ts +0 -1
- package/components/navigation/menu/index.d.ts +0 -1
- package/components/navigation/menu/index.js +4 -5
- package/components/navigation/popover/index.d.ts +1 -2
- package/components/navigation/popover/index.js +1 -1
- package/components/page/error-boundary/index.js +5 -5
- package/components/page/index.js +9 -13
- package/components/page/partial/index.d.ts +0 -1
- package/components/prefab/container/index.js +1 -2
- package/context/WidgetProvider.js +2 -2
- package/core/app.service.js +35 -40
- package/core/constants/events.js +0 -6
- package/core/constants/index.d.ts +1 -9
- package/core/constants/index.js +5 -32
- package/core/formatter/date-formatters.d.ts +1 -1
- package/core/formatter/date-formatters.js +13 -38
- package/core/formatter/types.d.ts +1 -1
- package/core/proxy-service.js +5 -15
- package/core/util/index.js +2 -3
- package/higherOrder/BaseApp.js +2 -2
- package/higherOrder/BasePage.d.ts +17 -0
- package/higherOrder/BasePage.js +104 -53
- package/higherOrder/BasePrefab.js +59 -69
- package/higherOrder/props.d.ts +0 -1
- package/higherOrder/withBaseWrapper.js +4 -3
- package/hooks/useAccess.js +0 -13
- package/mui-config/theme.js +4 -1
- package/package-lock.json +605 -2630
- package/package.json +4 -23
- package/store/middleware/navigationMiddleware.js +1 -1
- package/store/slices/appConfigSlice.js +8 -10
- package/store/slices/authSlice.js +32 -46
- package/tsconfig.declaration.tsbuildinfo +1 -1
- package/types/index.d.ts +0 -1
- package/utils/attr.js +14 -71
- package/utils/lib-error-skipper.d.ts +26 -4
- package/utils/lib-error-skipper.js +165 -41
- package/utils/style-utils.d.ts +0 -6
- package/utils/style-utils.js +1 -10
- package/variables/metadata.service.js +3 -2
- package/variables/model-variable.js +7 -10
- package/variables/service-variable.d.ts +0 -1
- package/variables/service-variable.js +6 -26
- package/actions/base-action.d.ts +0 -7
- package/actions/login-action.d.ts +0 -11
- package/actions/logout-action.d.ts +0 -10
- package/actions/navigation-action.d.ts +0 -35
- package/actions/notification-action.d.ts +0 -20
- package/actions/timer-action.d.ts +0 -27
- package/components/data/table/hooks/useCustomExpressionColumns.d.ts +0 -16
- package/components/data/table/hooks/useCustomExpressionColumns.js +0 -88
- package/core/security.service.d.ts +0 -12
- package/mui-config/theme-provider.d.ts +0 -3
- package/mui-config/theme.d.ts +0 -2
- package/runtime-dynamic/App.d.ts +0 -7
- package/runtime-dynamic/App.js +0 -144
- package/runtime-dynamic/app-initializer.d.ts +0 -15
- package/runtime-dynamic/app-initializer.js +0 -447
- package/runtime-dynamic/components/ErrorBoundary.d.ts +0 -18
- package/runtime-dynamic/components/ErrorBoundary.js +0 -93
- package/runtime-dynamic/components/PageWrapper.d.ts +0 -1
- package/runtime-dynamic/components/PageWrapper.js +0 -43
- package/runtime-dynamic/components/PrefabPreview.d.ts +0 -1
- package/runtime-dynamic/components/PrefabPreview.js +0 -84
- package/runtime-dynamic/components/partial-content.d.ts +0 -15
- package/runtime-dynamic/components/partial-content.js +0 -50
- package/runtime-dynamic/components/prefab-content.d.ts +0 -10
- package/runtime-dynamic/components/prefab-content.js +0 -31
- package/runtime-dynamic/components/use-dynamic-component.d.ts +0 -10
- package/runtime-dynamic/components/use-dynamic-component.js +0 -165
- package/runtime-dynamic/factories/build-base-page-like-component.d.ts +0 -8
- package/runtime-dynamic/factories/build-base-page-like-component.js +0 -59
- package/runtime-dynamic/factories/prefab-factory.d.ts +0 -3
- package/runtime-dynamic/factories/prefab-factory.js +0 -82
- package/runtime-dynamic/factories/startup-info.d.ts +0 -6
- package/runtime-dynamic/factories/startup-info.js +0 -28
- package/runtime-dynamic/factories/utils.d.ts +0 -23
- package/runtime-dynamic/factories/utils.js +0 -131
- package/runtime-dynamic/index.d.ts +0 -14
- package/runtime-dynamic/index.js +0 -191
- package/runtime-dynamic/main.d.ts +0 -2
- package/runtime-dynamic/main.js +0 -84
- package/runtime-dynamic/preview-mode.d.ts +0 -15
- package/runtime-dynamic/preview-mode.js +0 -31
- package/runtime-dynamic/preview-navigation.d.ts +0 -6
- package/runtime-dynamic/preview-navigation.js +0 -38
- package/runtime-dynamic/preview-resource-base.d.ts +0 -12
- package/runtime-dynamic/preview-resource-base.js +0 -65
- package/runtime-dynamic/registry/component-registry.d.ts +0 -3
- package/runtime-dynamic/registry/component-registry.js +0 -353
- package/runtime-dynamic/registry/custom-widget-registry.d.ts +0 -7
- package/runtime-dynamic/registry/custom-widget-registry.js +0 -18
- package/runtime-dynamic/registry/index.d.ts +0 -2
- package/runtime-dynamic/registry/index.js +0 -63
- package/runtime-dynamic/registry/store.d.ts +0 -9
- package/runtime-dynamic/registry/store.js +0 -26
- package/runtime-dynamic/routes.d.ts +0 -2
- package/runtime-dynamic/routes.js +0 -107
- package/runtime-dynamic/services/app-extension-provider.d.ts +0 -1
- package/runtime-dynamic/services/app-extension-provider.js +0 -45
- package/runtime-dynamic/services/cache.d.ts +0 -29
- package/runtime-dynamic/services/cache.js +0 -57
- package/runtime-dynamic/services/component-ref-provider.d.ts +0 -12
- package/runtime-dynamic/services/component-ref-provider.js +0 -149
- package/runtime-dynamic/services/css-scoping.d.ts +0 -2
- package/runtime-dynamic/services/css-scoping.js +0 -53
- package/runtime-dynamic/services/fragment-url.d.ts +0 -16
- package/runtime-dynamic/services/fragment-url.js +0 -74
- package/runtime-dynamic/services/index.d.ts +0 -10
- package/runtime-dynamic/services/index.js +0 -152
- package/runtime-dynamic/services/markup-transpiler.d.ts +0 -12
- package/runtime-dynamic/services/markup-transpiler.js +0 -250
- package/runtime-dynamic/services/prefab-resources.d.ts +0 -18
- package/runtime-dynamic/services/prefab-resources.js +0 -159
- package/runtime-dynamic/services/resource-manager.d.ts +0 -2
- package/runtime-dynamic/services/resource-manager.js +0 -66
- package/runtime-dynamic/services/script-executor.d.ts +0 -8
- package/runtime-dynamic/services/script-executor.js +0 -90
- package/runtime-dynamic/services/variable-factory.d.ts +0 -2
- package/runtime-dynamic/services/variable-factory.js +0 -260
- package/runtime-dynamic/services/variable-registry.d.ts +0 -12
- package/runtime-dynamic/services/variable-registry.js +0 -118
- package/runtime-dynamic/services/variable-transpiler.d.ts +0 -5
- package/runtime-dynamic/services/variable-transpiler.js +0 -159
- package/runtime-dynamic/shims/next-image.d.ts +0 -35
- package/runtime-dynamic/shims/next-image.js +0 -60
- package/runtime-dynamic/shims/next-link.d.ts +0 -25
- package/runtime-dynamic/shims/next-link.js +0 -33
- package/runtime-dynamic/shims/next-navigation.d.ts +0 -16
- package/runtime-dynamic/shims/next-navigation.js +0 -52
- package/runtime-dynamic/utils/index.d.ts +0 -9
- package/runtime-dynamic/utils/index.js +0 -40
- package/utils/custom-expression/index.d.ts +0 -43
- package/utils/custom-expression/index.js +0 -161
- package/utils/custom-expression/parser.d.ts +0 -15
- package/utils/custom-expression/parser.js +0 -208
- package/utils/layoutsize-util.d.ts +0 -1
- package/utils/layoutsize-util.js +0 -57
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ActionConfig, BaseAction } from "./base-action";
|
|
2
|
-
export interface TimerActionConfig extends ActionConfig {
|
|
3
|
-
repeating: boolean;
|
|
4
|
-
delay: number;
|
|
5
|
-
_context: any;
|
|
6
|
-
}
|
|
7
|
-
export declare class TimerAction extends BaseAction<TimerActionConfig> {
|
|
8
|
-
private _timerId;
|
|
9
|
-
private _isActive;
|
|
10
|
-
private _onSuccess?;
|
|
11
|
-
private _onError?;
|
|
12
|
-
constructor(config: TimerActionConfig);
|
|
13
|
-
invoke(params?: Record<string, any>, onSuccess?: Function, onError?: Function): Promise<TimerAction>;
|
|
14
|
-
/**
|
|
15
|
-
* Starts the timer based on configuration
|
|
16
|
-
*/
|
|
17
|
-
private startTimer;
|
|
18
|
-
cancel(): void;
|
|
19
|
-
pause(): void;
|
|
20
|
-
resume(): void;
|
|
21
|
-
trigger(): Promise<TimerAction>;
|
|
22
|
-
/**
|
|
23
|
-
* Checks if the timer is currently active
|
|
24
|
-
*/
|
|
25
|
-
isActive(): boolean;
|
|
26
|
-
destroy(): void;
|
|
27
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type MutableRefObject } from "react";
|
|
2
|
-
import { type CustomExpressionColumnSource, type CustomExpressionComponent } from "@/utils/custom-expression";
|
|
3
|
-
export type UseCustomExpressionColumnsArgs = {
|
|
4
|
-
columnSource: CustomExpressionColumnSource;
|
|
5
|
-
listenerRef: MutableRefObject<unknown>;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Syncs parsed `customExpression` column renderers with the table column proxy:
|
|
9
|
-
* signature dedupe, stale async-merge guard, revision bumps for memoized cells.
|
|
10
|
-
*/
|
|
11
|
-
export declare function useCustomExpressionColumns({ columnSource, listenerRef, }: UseCustomExpressionColumnsArgs): {
|
|
12
|
-
customColumns: Record<string, CustomExpressionComponent>;
|
|
13
|
-
customColumnsRevision: number;
|
|
14
|
-
customExpressionSignature: string;
|
|
15
|
-
mergeParsedCustomColumns: () => Promise<void>;
|
|
16
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.useCustomExpressionColumns = useCustomExpressionColumns;
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
-
var _react = require("react");
|
|
12
|
-
var _customExpression = require("../../../../utils/custom-expression");
|
|
13
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
/**
|
|
16
|
-
* Syncs parsed `customExpression` column renderers with the table column proxy:
|
|
17
|
-
* signature dedupe, stale async-merge guard, revision bumps for memoized cells.
|
|
18
|
-
*/
|
|
19
|
-
function useCustomExpressionColumns(_ref) {
|
|
20
|
-
var columnSource = _ref.columnSource,
|
|
21
|
-
listenerRef = _ref.listenerRef;
|
|
22
|
-
var mergeGenerationRef = (0, _react.useRef)(0);
|
|
23
|
-
var lastMergedSignatureRef = (0, _react.useRef)(null);
|
|
24
|
-
var _useState = (0, _react.useState)({}),
|
|
25
|
-
customColumns = _useState[0],
|
|
26
|
-
setCustomColumns = _useState[1];
|
|
27
|
-
var _useState2 = (0, _react.useState)(0),
|
|
28
|
-
customColumnsRevision = _useState2[0],
|
|
29
|
-
setCustomColumnsRevision = _useState2[1];
|
|
30
|
-
var customExpressionSignature = (0, _react.useMemo)(function () {
|
|
31
|
-
return (0, _customExpression.buildCustomExpressionSignature)(columnSource);
|
|
32
|
-
}, [columnSource]);
|
|
33
|
-
var mergeParsedCustomColumns = (0, _react.useCallback)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
34
|
-
var customExprKeys, sig, mergeGen, newColumns;
|
|
35
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
36
|
-
while (1) switch (_context.prev = _context.next) {
|
|
37
|
-
case 0:
|
|
38
|
-
customExprKeys = Object.keys(columnSource).filter(function (key) {
|
|
39
|
-
return columnSource[key].customExpression;
|
|
40
|
-
});
|
|
41
|
-
if (!(customExprKeys.length === 0)) {
|
|
42
|
-
_context.next = 4;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
lastMergedSignatureRef.current = null;
|
|
46
|
-
return _context.abrupt("return");
|
|
47
|
-
case 4:
|
|
48
|
-
sig = customExpressionSignature;
|
|
49
|
-
if (!(lastMergedSignatureRef.current === sig)) {
|
|
50
|
-
_context.next = 7;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
return _context.abrupt("return");
|
|
54
|
-
case 7:
|
|
55
|
-
mergeGen = ++mergeGenerationRef.current;
|
|
56
|
-
_context.next = 10;
|
|
57
|
-
return (0, _customExpression.buildCustomExpressionComponentsMap)({
|
|
58
|
-
columnSource: columnSource,
|
|
59
|
-
listener: listenerRef.current
|
|
60
|
-
});
|
|
61
|
-
case 10:
|
|
62
|
-
newColumns = _context.sent;
|
|
63
|
-
if (!(mergeGen !== mergeGenerationRef.current)) {
|
|
64
|
-
_context.next = 13;
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
return _context.abrupt("return");
|
|
68
|
-
case 13:
|
|
69
|
-
lastMergedSignatureRef.current = sig;
|
|
70
|
-
setCustomColumns(function (prev) {
|
|
71
|
-
return _objectSpread(_objectSpread({}, prev), newColumns);
|
|
72
|
-
});
|
|
73
|
-
setCustomColumnsRevision(function (r) {
|
|
74
|
-
return r + 1;
|
|
75
|
-
});
|
|
76
|
-
case 16:
|
|
77
|
-
case "end":
|
|
78
|
-
return _context.stop();
|
|
79
|
-
}
|
|
80
|
-
}, _callee);
|
|
81
|
-
})), [columnSource, customExpressionSignature, listenerRef]);
|
|
82
|
-
return {
|
|
83
|
-
customColumns: customColumns,
|
|
84
|
-
customColumnsRevision: customColumnsRevision,
|
|
85
|
-
customExpressionSignature: customExpressionSignature,
|
|
86
|
-
mergeParsedCustomColumns: mergeParsedCustomColumns
|
|
87
|
-
};
|
|
88
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface SecurityOptions {
|
|
3
|
-
}
|
|
4
|
-
export interface SecurityService {
|
|
5
|
-
isLoggedIn: Boolean;
|
|
6
|
-
loggedInUser: any;
|
|
7
|
-
login: (options: SecurityOptions, success?: any, failure?: any) => any;
|
|
8
|
-
logout: (options: any, success?: any, failure?: any) => any;
|
|
9
|
-
navigateToLandingPage: (data: any) => any;
|
|
10
|
-
}
|
|
11
|
-
export declare const SecurityProvider: React.Provider<SecurityService>;
|
|
12
|
-
export declare const SecurityConsumer: React.Consumer<SecurityService>;
|
package/mui-config/theme.d.ts
DELETED
package/runtime-dynamic/App.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createAppRouter } from "./routes";
|
|
2
|
-
/**
|
|
3
|
-
* Must run after `initializeApp()` so Redux `appConfig.appProperties` (wmProperties)
|
|
4
|
-
* exists before `createAppRouter` reads prefab vs application routes.
|
|
5
|
-
*/
|
|
6
|
-
export declare function initPreviewRuntimeRouter(router: ReturnType<typeof createAppRouter>): void;
|
|
7
|
-
export declare function App(): import("react/jsx-runtime").JSX.Element;
|
package/runtime-dynamic/App.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.App = App;
|
|
8
|
-
exports.initPreviewRuntimeRouter = initPreviewRuntimeRouter;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _reactRedux = require("react-redux");
|
|
12
|
-
var _reactRouterDom = require("react-router-dom");
|
|
13
|
-
var _store = require("@wavemaker-ai/react-runtime/store");
|
|
14
|
-
var _BaseApp = require("@wavemaker-ai/react-runtime/higherOrder/BaseApp");
|
|
15
|
-
var _appstore = _interopRequireDefault(require("@wavemaker-ai/react-runtime/core/appstore"));
|
|
16
|
-
var _formatters = _interopRequireDefault(require("@wavemaker-ai/react-runtime/core/formatters"));
|
|
17
|
-
var _util = require("@wavemaker-ai/react-runtime/core/util");
|
|
18
|
-
var _LocalizationProvider = _interopRequireDefault(require("@wavemaker-ai/react-runtime/context/LocalizationProvider"));
|
|
19
|
-
var _themeProvider = require("@wavemaker-ai/react-runtime/mui-config/theme-provider");
|
|
20
|
-
var _toastProvider = require("@wavemaker-ai/react-runtime/actions/toast-provider");
|
|
21
|
-
var _navigationMiddleware = require("@wavemaker-ai/react-runtime/store/middleware/navigationMiddleware");
|
|
22
|
-
var _transpiler = require("@wavemaker-ai/react-codegen/transpiler");
|
|
23
|
-
var _appInitializer = require("./app-initializer");
|
|
24
|
-
var _startupInfo = require("./factories/startup-info");
|
|
25
|
-
var _variableTranspiler = require("./services/variable-transpiler");
|
|
26
|
-
var _previewMode = require("./preview-mode");
|
|
27
|
-
var _previewNavigation = require("./preview-navigation");
|
|
28
|
-
var __jsx = _react["default"].createElement;
|
|
29
|
-
// `AppConfig.partials` is set in `initializeApp` → `syncAppstoreCommonPartial` once
|
|
30
|
-
// `appProperties.type` is known (Common partial only for application preview).
|
|
31
|
-
_appstore["default"].set("CONSTANTS", {
|
|
32
|
-
VALIDATOR: _util.VALIDATOR,
|
|
33
|
-
MATCH_MODES: _util.MATCH_MODES
|
|
34
|
-
});
|
|
35
|
-
_appstore["default"].set("formatters", _formatters["default"]);
|
|
36
|
-
var formattersRegistered = false;
|
|
37
|
-
var AppInner = function AppInner(_ref) {
|
|
38
|
-
var children = _ref.children;
|
|
39
|
-
if (!formattersRegistered) {
|
|
40
|
-
var customFmt = (0, _appInitializer.getCustomFormatters)();
|
|
41
|
-
Object.keys(customFmt).forEach(function (k) {
|
|
42
|
-
_formatters["default"].set("custom.".concat(k), customFmt[k]);
|
|
43
|
-
});
|
|
44
|
-
formattersRegistered = true;
|
|
45
|
-
}
|
|
46
|
-
return __jsx(_react["default"].Fragment, null, children);
|
|
47
|
-
};
|
|
48
|
-
function addAppScript(app) {
|
|
49
|
-
var scriptFn = (0, _appInitializer.getAppScript)();
|
|
50
|
-
if (scriptFn) {
|
|
51
|
-
scriptFn(app);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
var cachedGetAppVariables = null;
|
|
55
|
-
/** Rebuild app-variable factory when switching prefab vs application preview (same bundle is one mode). */
|
|
56
|
-
var cachedGetAppVariablesPrefabMode = null;
|
|
57
|
-
function getAppVariables(appProxy) {
|
|
58
|
-
var rawJson = (0, _appInitializer.getAppVariablesJson)();
|
|
59
|
-
if (!rawJson || Object.keys(rawJson).length === 0) {
|
|
60
|
-
return {
|
|
61
|
-
Variables: {},
|
|
62
|
-
Actions: {}
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
var isPrefabPreview = (0, _previewMode.isRuntimePreviewPrefab)();
|
|
66
|
-
if (!cachedGetAppVariables || cachedGetAppVariablesPrefabMode !== isPrefabPreview) {
|
|
67
|
-
cachedGetAppVariablesPrefabMode = isPrefabPreview;
|
|
68
|
-
var appUrl = (0, _appInitializer.getProjectConfig)().deployUrl || "./";
|
|
69
|
-
var transpiledVars = (0, _transpiler.transpileVariableDefinitions)(rawJson, appUrl, "App");
|
|
70
|
-
var variablesCode = (0, _transpiler.serializeVariablesToCode)(transpiledVars, "App", {
|
|
71
|
-
isPrefabApp: isPrefabPreview,
|
|
72
|
-
isPrefabScope: false,
|
|
73
|
-
addEntityProvider: false
|
|
74
|
-
});
|
|
75
|
-
cachedGetAppVariables = (0, _variableTranspiler.transpileAndBuildGetVariables)(variablesCode, rawJson);
|
|
76
|
-
}
|
|
77
|
-
return cachedGetAppVariables(appProxy);
|
|
78
|
-
}
|
|
79
|
-
var cachedAppStartupInfo = null;
|
|
80
|
-
function getAppStartupInfo() {
|
|
81
|
-
if (!cachedAppStartupInfo) {
|
|
82
|
-
cachedAppStartupInfo = (0, _startupInfo.buildStartupInfo)((0, _appInitializer.getAppVariablesJson)());
|
|
83
|
-
}
|
|
84
|
-
return cachedAppStartupInfo;
|
|
85
|
-
}
|
|
86
|
-
var WmApp = (0, _BaseApp.BaseApp)(AppInner, addAppScript, getAppVariables, {
|
|
87
|
-
componentName: "App",
|
|
88
|
-
get startUpVariables() {
|
|
89
|
-
return getAppStartupInfo().startUpVariables;
|
|
90
|
-
},
|
|
91
|
-
get startUpActions() {
|
|
92
|
-
return getAppStartupInfo().startUpActions;
|
|
93
|
-
},
|
|
94
|
-
get autoUpdateVariables() {
|
|
95
|
-
return getAppStartupInfo().autoUpdateVariables;
|
|
96
|
-
},
|
|
97
|
-
type: "App"
|
|
98
|
-
});
|
|
99
|
-
var previewRouter = null;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Must run after `initializeApp()` so Redux `appConfig.appProperties` (wmProperties)
|
|
103
|
-
* exists before `createAppRouter` reads prefab vs application routes.
|
|
104
|
-
*/
|
|
105
|
-
function initPreviewRuntimeRouter(router) {
|
|
106
|
-
previewRouter = router;
|
|
107
|
-
function navigateWithSearchParams(path, options) {
|
|
108
|
-
var _toPreviewRouterPath$ = (0, _previewNavigation.toPreviewRouterPath)(path).split("?"),
|
|
109
|
-
_toPreviewRouterPath$2 = (0, _slicedToArray2["default"])(_toPreviewRouterPath$, 2),
|
|
110
|
-
pathname = _toPreviewRouterPath$2[0],
|
|
111
|
-
search = _toPreviewRouterPath$2[1];
|
|
112
|
-
var navigationPayload = {
|
|
113
|
-
pathname: pathname || "/",
|
|
114
|
-
search: search ? "?".concat(search) : ""
|
|
115
|
-
};
|
|
116
|
-
router.navigate(navigationPayload, options);
|
|
117
|
-
}
|
|
118
|
-
(0, _navigationMiddleware.setRouter)({
|
|
119
|
-
push: function push(path) {
|
|
120
|
-
return navigateWithSearchParams(path);
|
|
121
|
-
},
|
|
122
|
-
replace: function replace(path) {
|
|
123
|
-
return navigateWithSearchParams(path, {
|
|
124
|
-
replace: true
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
back: function back() {
|
|
128
|
-
return router.navigate(-1);
|
|
129
|
-
},
|
|
130
|
-
forward: function forward() {
|
|
131
|
-
return router.navigate(1);
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
function App() {
|
|
136
|
-
if (!previewRouter) {
|
|
137
|
-
throw new Error("initPreviewRuntimeRouter() must be called after initializeApp() and before render.");
|
|
138
|
-
}
|
|
139
|
-
return __jsx(_reactRedux.Provider, {
|
|
140
|
-
store: _store.store
|
|
141
|
-
}, __jsx(_LocalizationProvider["default"], null, __jsx(_themeProvider.WmThemeProvider, null, __jsx(_toastProvider.ToastProvider, null, __jsx(WmApp, null, __jsx(_reactRouterDom.RouterProvider, {
|
|
142
|
-
router: previewRouter
|
|
143
|
-
}))))));
|
|
144
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface ProjectConfig {
|
|
2
|
-
cdnUrl: string;
|
|
3
|
-
apiUrl: string;
|
|
4
|
-
deployUrl: string;
|
|
5
|
-
/** Mirrors Angular `initializeProjectDetails` in `runtime-dynamic` `app.config.ts` (`_WM_APP_PROJECT.isPreview`). */
|
|
6
|
-
isPreview: boolean;
|
|
7
|
-
fontConfig?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function getProjectConfig(): ProjectConfig;
|
|
10
|
-
export declare function getAppScript(): ((app: unknown) => void) | null;
|
|
11
|
-
export declare function getAppVariablesJson(): Record<string, unknown>;
|
|
12
|
-
export declare function getPartialNames(): string[];
|
|
13
|
-
export declare function getCustomFormatters(): Record<string, any>;
|
|
14
|
-
export declare function initializeApp(): Promise<void>;
|
|
15
|
-
export {};
|