@pisell/lowcode-renderer 1.0.104 → 1.0.106
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/README.md +2 -2
- package/es/ReactRenderer/index.d.ts +3 -0
- package/es/ReactRenderer/index.js +64 -31
- package/es/Render/index.d.ts +16 -20
- package/es/Render/index.js +243 -146
- package/es/Render/index.less +6 -6
- package/es/api/index.d.ts +7 -0
- package/es/api/index.js +6 -11
- package/es/api/report/URL.d.ts +39 -0
- package/es/api/report/URL.js +71 -42
- package/es/api/report/index.d.ts +5 -0
- package/es/api/report/index.js +112 -75
- package/es/api/utils/index.d.ts +2 -0
- package/es/api/utils/index.js +1 -5
- package/es/appHelper/index.d.ts +2 -0
- package/es/appHelper/index.js +26 -28
- package/es/appHelper/others.d.ts +1 -0
- package/es/appHelper/others.js +8 -10
- package/es/config/index.d.ts +15 -14
- package/es/config/index.js +14 -13
- package/es/index.d.ts +4 -3
- package/es/index.js +4 -8
- package/lib/ReactRenderer/index.d.ts +3 -0
- package/lib/ReactRenderer/index.js +75 -40
- package/lib/Render/index.d.ts +16 -20
- package/lib/Render/index.js +187 -152
- package/lib/Render/index.less +6 -6
- package/lib/api/index.d.ts +7 -0
- package/lib/api/index.js +37 -8
- package/lib/api/report/URL.d.ts +39 -0
- package/lib/api/report/URL.js +98 -40
- package/lib/api/report/index.d.ts +5 -0
- package/lib/api/report/index.js +116 -83
- package/lib/api/utils/index.d.ts +2 -0
- package/lib/api/utils/index.js +23 -4
- package/lib/appHelper/index.d.ts +2 -0
- package/lib/appHelper/index.js +58 -27
- package/lib/appHelper/others.d.ts +1 -0
- package/lib/appHelper/others.js +48 -17
- package/lib/config/index.d.ts +15 -14
- package/lib/config/index.js +46 -21
- package/lib/index.d.ts +4 -3
- package/lib/index.js +41 -9
- package/package.json +2 -2
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js +0 -28
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +0 -14
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +0 -27
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js +0 -15
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutPropertiesLoose.js +0 -13
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +0 -16
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +0 -11
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +0 -12
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js +0 -29
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +0 -14
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +0 -27
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js +0 -15
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutPropertiesLoose.js +0 -14
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +0 -16
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +0 -11
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +0 -18
- package/lib/_virtual/rolldown_runtime.js +0 -29
|
@@ -1,46 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
9
28
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_alilc_lowcode_renderer_core.adapter.setRuntime({
|
|
15
|
-
Component: react.Component,
|
|
16
|
-
PureComponent: react.PureComponent,
|
|
17
|
-
createContext: react.createContext,
|
|
18
|
-
createElement: react.createElement,
|
|
19
|
-
forwardRef: react.forwardRef,
|
|
20
|
-
findDOMNode: react_dom.default === null || react_dom.default === void 0 ? void 0 : react_dom.default.findDOMNode
|
|
29
|
+
// src/ReactRenderer/index.tsx
|
|
30
|
+
var ReactRenderer_exports = {};
|
|
31
|
+
__export(ReactRenderer_exports, {
|
|
32
|
+
default: () => ReactRenderer_default
|
|
21
33
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
module.exports = __toCommonJS(ReactRenderer_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_react_dom = __toESM(require("react-dom"));
|
|
37
|
+
var import_lowcode_renderer_core = require("@alilc/lowcode-renderer-core");
|
|
38
|
+
var import_config_provider = __toESM(require("@alifd/next/lib/config-provider"));
|
|
39
|
+
window.React = import_react.default;
|
|
40
|
+
window.ReactDom = import_react_dom.default;
|
|
41
|
+
window.ReactDOM = import_react_dom.default;
|
|
42
|
+
var _a;
|
|
43
|
+
import_lowcode_renderer_core.adapter.setRuntime({
|
|
44
|
+
Component: import_react.Component,
|
|
45
|
+
PureComponent: import_react.PureComponent,
|
|
46
|
+
createContext: import_react.createContext,
|
|
47
|
+
createElement: import_react.createElement,
|
|
48
|
+
forwardRef: import_react.forwardRef,
|
|
49
|
+
findDOMNode: (_a = import_react_dom.default) == null ? void 0 : _a.findDOMNode
|
|
29
50
|
});
|
|
30
|
-
|
|
51
|
+
import_lowcode_renderer_core.adapter.setRenderers({
|
|
52
|
+
PageRenderer: (0, import_lowcode_renderer_core.pageRendererFactory)(),
|
|
53
|
+
ComponentRenderer: (0, import_lowcode_renderer_core.componentRendererFactory)(),
|
|
54
|
+
BlockRenderer: (0, import_lowcode_renderer_core.blockRendererFactory)(),
|
|
55
|
+
AddonRenderer: (0, import_lowcode_renderer_core.addonRendererFactory)(),
|
|
56
|
+
TempRenderer: (0, import_lowcode_renderer_core.tempRendererFactory)(),
|
|
57
|
+
DivRenderer: (0, import_lowcode_renderer_core.blockRendererFactory)()
|
|
58
|
+
});
|
|
59
|
+
import_lowcode_renderer_core.adapter.setConfigProvider(import_config_provider.default);
|
|
31
60
|
function factory() {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
const Renderer = (0, import_lowcode_renderer_core.rendererFactory)();
|
|
62
|
+
return class ReactRenderer extends Renderer {
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
props;
|
|
65
|
+
context;
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
setState;
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
forceUpdate;
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
refs;
|
|
72
|
+
constructor(props, context) {
|
|
73
|
+
super(props, context);
|
|
74
|
+
}
|
|
75
|
+
isValidComponent(obj) {
|
|
76
|
+
var _a2;
|
|
77
|
+
return ((_a2 = obj == null ? void 0 : obj.prototype) == null ? void 0 : _a2.isReactComponent) || (obj == null ? void 0 : obj.prototype) instanceof import_react.Component;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
42
80
|
}
|
|
43
81
|
var ReactRenderer_default = factory();
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
exports.default = ReactRenderer_default;
|
package/lib/Render/index.d.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
declare const Render: (props: RenderProps) => react_jsx_runtime0.JSX.Element | null;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { Render };
|
|
1
|
+
import { IRendererAppHelper } from "@alilc/lowcode-renderer-core/lib/types";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
interface RenderProps {
|
|
4
|
+
packages: Record<string, any>;
|
|
5
|
+
projectSchema?: Record<string, any> | null;
|
|
6
|
+
className?: string;
|
|
7
|
+
appHelper?: IRendererAppHelper;
|
|
8
|
+
locale?: string;
|
|
9
|
+
isShowSkeleton?: boolean;
|
|
10
|
+
isLoadedAssets?: boolean;
|
|
11
|
+
loadingType?: "spin" | "skeleton";
|
|
12
|
+
isRender?: boolean;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
15
|
+
declare const Render: (props: RenderProps) => JSX.Element | null;
|
|
16
|
+
export default Render;
|
package/lib/Render/index.js
CHANGED
|
@@ -1,155 +1,190 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
28
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
29
|
+
// src/Render/index.tsx
|
|
30
|
+
var Render_exports = {};
|
|
31
|
+
__export(Render_exports, {
|
|
32
|
+
default: () => Render_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Render_exports);
|
|
35
|
+
var import_lowcode_plugin_inject = require("@alilc/lowcode-plugin-inject");
|
|
36
|
+
var import_lowcode_utils = require("@alilc/lowcode-utils");
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_lodash_es = require("lodash-es");
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_ReactRenderer = __toESM(require("../ReactRenderer"));
|
|
41
|
+
var import_appHelper = __toESM(require("../appHelper"));
|
|
42
|
+
var import_utils = require("@pisell/utils");
|
|
43
|
+
var import_index = require("./index.less");
|
|
44
|
+
var cacheDataMap = /* @__PURE__ */ new Map();
|
|
45
|
+
var assetPromiseCache = /* @__PURE__ */ new Map();
|
|
46
|
+
var Render = (props) => {
|
|
47
|
+
const {
|
|
48
|
+
packages,
|
|
49
|
+
projectSchema,
|
|
50
|
+
className,
|
|
51
|
+
appHelper: propsAppHelper,
|
|
52
|
+
locale,
|
|
53
|
+
isShowSkeleton = true,
|
|
54
|
+
isLoadedAssets,
|
|
55
|
+
loadingType = "skeleton",
|
|
56
|
+
isRender = true,
|
|
57
|
+
...others
|
|
58
|
+
} = props;
|
|
59
|
+
const schemaHash = (0, import_react.useMemo)(() => {
|
|
60
|
+
if (projectSchema) {
|
|
61
|
+
return (0, import_utils.generateUniqueIdByObj)(projectSchema);
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}, [projectSchema]);
|
|
65
|
+
const [data, setData] = (0, import_react.useState)(
|
|
66
|
+
schemaHash ? cacheDataMap.get(schemaHash) || {} : {}
|
|
67
|
+
);
|
|
68
|
+
const { schema, components, i18n = {}, projectDataSource = {} } = data;
|
|
69
|
+
(0, import_react.useEffect)(() => {
|
|
70
|
+
document.body.id = "body";
|
|
71
|
+
}, []);
|
|
72
|
+
(0, import_react.useEffect)(() => {
|
|
73
|
+
async function init() {
|
|
74
|
+
if (!projectSchema) return;
|
|
75
|
+
console.log(performance.now(), "init");
|
|
76
|
+
console.time("lowcode-init");
|
|
77
|
+
const {
|
|
78
|
+
componentsMap: componentsMapArray,
|
|
79
|
+
componentsTree,
|
|
80
|
+
i18n: i18n3,
|
|
81
|
+
dataSource: projectDataSource3
|
|
82
|
+
} = projectSchema;
|
|
83
|
+
const componentsMap = {};
|
|
84
|
+
const packagesMap = {};
|
|
85
|
+
componentsMapArray.forEach((component) => {
|
|
86
|
+
packagesMap[component.package] = true;
|
|
87
|
+
componentsMap[component.componentName] = component;
|
|
88
|
+
});
|
|
89
|
+
const pageSchema = componentsTree[0];
|
|
90
|
+
const libraryMap = {};
|
|
91
|
+
const libraryAsset = [];
|
|
92
|
+
packages.forEach(({ package: _package, library, urls, renderUrls }) => {
|
|
93
|
+
libraryMap[_package] = library;
|
|
94
|
+
if (renderUrls) {
|
|
95
|
+
libraryAsset.push(renderUrls);
|
|
96
|
+
} else if (urls) {
|
|
97
|
+
libraryAsset.push(urls);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
console.timeEnd("lowcode-init");
|
|
101
|
+
if (!isLoadedAssets) {
|
|
102
|
+
const assetKey = JSON.stringify(libraryAsset);
|
|
103
|
+
let loadingPromise = assetPromiseCache.get(assetKey);
|
|
104
|
+
if (!loadingPromise) {
|
|
105
|
+
loadingPromise = (async () => {
|
|
106
|
+
try {
|
|
107
|
+
const assetLoader = new import_lowcode_utils.AssetLoader();
|
|
108
|
+
await assetLoader.load(libraryAsset);
|
|
109
|
+
} catch (error) {
|
|
110
|
+
assetPromiseCache.delete(assetKey);
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
})();
|
|
114
|
+
assetPromiseCache.set(assetKey, loadingPromise);
|
|
115
|
+
}
|
|
116
|
+
await loadingPromise;
|
|
117
|
+
}
|
|
118
|
+
console.timeEnd("lowcode-isLoadedAssets");
|
|
119
|
+
console.time("lowcode-injectComponents");
|
|
120
|
+
const components3 = await (0, import_lowcode_plugin_inject.injectComponents)(
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
(0, import_lowcode_utils.buildComponents)(libraryMap, componentsMap)
|
|
123
|
+
);
|
|
124
|
+
console.timeEnd("lowcode-injectComponents");
|
|
125
|
+
const _data = {
|
|
126
|
+
schema: pageSchema,
|
|
127
|
+
components: components3,
|
|
128
|
+
i18n: i18n3,
|
|
129
|
+
projectDataSource: projectDataSource3
|
|
130
|
+
};
|
|
131
|
+
cacheDataMap.set(schemaHash, _data);
|
|
132
|
+
setData(_data);
|
|
133
|
+
}
|
|
134
|
+
const {
|
|
135
|
+
schema: schema2,
|
|
136
|
+
components: components2,
|
|
137
|
+
i18n: i18n2 = {},
|
|
138
|
+
projectDataSource: projectDataSource2 = {}
|
|
139
|
+
} = data;
|
|
140
|
+
if (!schema2 || !components2) {
|
|
141
|
+
init();
|
|
142
|
+
}
|
|
143
|
+
}, [data, projectSchema, schemaHash]);
|
|
144
|
+
(0, import_react.useEffect)(() => {
|
|
145
|
+
console.log(performance.now(), "schema components", schema, components);
|
|
146
|
+
}, [schema, components]);
|
|
147
|
+
if (!schema || !components) {
|
|
148
|
+
if (!isShowSkeleton) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
if (loadingType === "spin") {
|
|
152
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
style: {
|
|
156
|
+
height: "100%",
|
|
157
|
+
width: "100%",
|
|
158
|
+
display: "flex",
|
|
159
|
+
justifyContent: "center",
|
|
160
|
+
alignItems: "center"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Spin, null)
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: 20 } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }));
|
|
167
|
+
}
|
|
168
|
+
function customizer(objValue, srcValue) {
|
|
169
|
+
if ((0, import_lodash_es.isArray)(objValue)) {
|
|
170
|
+
return objValue.concat(srcValue || []);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (!isRender) return null;
|
|
174
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
175
|
+
import_ReactRenderer.default,
|
|
176
|
+
{
|
|
177
|
+
...others,
|
|
178
|
+
className: `lowcode-plugin-sample-preview-content ${className}`,
|
|
179
|
+
schema: {
|
|
180
|
+
...schema,
|
|
181
|
+
dataSource: (0, import_lodash_es.mergeWith)(schema.dataSource, projectDataSource, customizer)
|
|
182
|
+
},
|
|
183
|
+
appHelper: (0, import_lodash_es.mergeWith)((0, import_lodash_es.cloneDeep)(import_appHelper.default), propsAppHelper),
|
|
184
|
+
components,
|
|
185
|
+
messages: i18n,
|
|
186
|
+
locale
|
|
187
|
+
}
|
|
188
|
+
);
|
|
151
189
|
};
|
|
152
190
|
var Render_default = Render;
|
|
153
|
-
|
|
154
|
-
//#endregion
|
|
155
|
-
exports.default = Render_default;
|
package/lib/Render/index.less
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.lowcode-render-spin-wrap {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
1
|
+
.lowcode-render-spin-wrap {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
report: {
|
|
3
|
+
getReportList: (values: any, url: "REPORT_DETAILED_TRANSACTIONS" | "REPORT_DETAILED_PRODUCT_SALES" | "REPORT_DAILY_SUMMARY_BY_PAYMETHOD" | "REPORT_DAILY_SUMMARY_BY_ORDER" | "REPORT_DETAILED_ORDERS" | "REPORT_MONTH_SUMMARY_BY_ORDER" | "REPORT_WEEK_SUMMARY_BY_ORDER" | "REPORT_DASHBOARD" | "DAILY_SUMMARY_BY_PRODUCT" | "SALES_SUMMARY_BY_PRODUCT" | "TEAM_MEMBERS_COMMISSION_DETAIL" | "TEAM_SELF_COMMISSION_DETAIL" | "TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK" | "BOOKING_BY_CHECK_IN_OUT_DATE" | "SALES_SUMMARY_BY_CHANNEL" | "SALES_SUMMARY_BY_PAYMENT_METHOD" | "SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD" | "TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD") => Promise<any>;
|
|
4
|
+
};
|
|
5
|
+
utils: {};
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
package/lib/api/index.js
CHANGED
|
@@ -1,11 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
3
28
|
|
|
4
|
-
|
|
29
|
+
// src/api/index.ts
|
|
30
|
+
var api_exports = {};
|
|
31
|
+
__export(api_exports, {
|
|
32
|
+
default: () => api_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(api_exports);
|
|
35
|
+
var import_report = __toESM(require("./report"));
|
|
36
|
+
var import_utils = __toESM(require("./utils"));
|
|
5
37
|
var api_default = {
|
|
6
|
-
|
|
7
|
-
|
|
38
|
+
report: import_report.default,
|
|
39
|
+
utils: import_utils.default
|
|
8
40
|
};
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
exports.default = api_default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const REPORT_DETAILED_TRANSACTIONS = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/cc1bc2ac0f824122a51b1cc17f099789/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=6KPhYcHFqzW9dtDM32SVwiUifZpv1GgWZKIUHe9SJeg";
|
|
2
|
+
export declare const REPORT_DETAILED_PRODUCT_SALES = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/40bf1ebddfaf414fb43430843655ebee/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=3DkhPvWoEuTqU01_Tw4RX72xYzoGticn2pmUbMOrVVk";
|
|
3
|
+
export declare const REPORT_DAILY_SUMMARY_BY_PAYMETHOD = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/69ecf67d14dc4c5494ac6e58e4168b44/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=KumpRo7KaVI9t87xHdgck90RUhQzPNho4dj4ZjYIT8A";
|
|
4
|
+
export declare const REPORT_DAILY_SUMMARY_BY_ORDER = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/4c579e57f93143518bb0b51675681ba5/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=x6yfwsN5Ib4kg60YgUVBt0dedig0xmlHQmLnRPv8sU8";
|
|
5
|
+
export declare const REPORT_DETAILED_ORDERS = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/2a71808194724ce7966fc516cbea6889/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=C0fbm_bBHwow8vpcaITeFDQvRnLr89h4hn4NI700i-Y";
|
|
6
|
+
export declare const REPORT_MONTH_SUMMARY_BY_ORDER = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/bb93098ba15e48b5af16d8519f01c959/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=v1XnVmCCrr6b988OWEaAAuss_f_jo7QLRTdI-8e4P0s";
|
|
7
|
+
export declare const REPORT_WEEK_SUMMARY_BY_ORDER = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/74eb659a4c264b6ca85cfacd328443eb/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=o00TZeefc7pDLarU-_IATCAem44sz6xXo-Eq4YP9g6c";
|
|
8
|
+
export declare const REPORT_DASHBOARD = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/5f64fa8f8c614e29aee96f7def6453e2/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=fJ0yL-7Z6AGPOyMF7phBI_E8zGWwHZGsw9JzPPxbsx4";
|
|
9
|
+
export declare const DAILY_SUMMARY_BY_PRODUCT = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/405cc89013d04a529a214a3e7b1fff09/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=z5phYh9UN9xWqIwiSWoPwqjClMDUseXomHg-J3zUVcs";
|
|
10
|
+
export declare const SALES_SUMMARY_BY_PRODUCT = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/feb08c0d3c6042aa966be63d75ebd815/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=lUVv7NZM-pBSnEwHx6ICyWZ9hGj2rfqkxnk7_-TzsnY";
|
|
11
|
+
export declare const TEAM_MEMBERS_COMMISSION_DETAIL = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/4cd03307457146bbbbf49e946f7638ea/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=6YQKz5LIzGJ6VAwc9Eb9F8Jdk1gkfGmxXBcSHcgDxEE";
|
|
12
|
+
export declare const TEAM_SELF_COMMISSION_DETAIL = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/4cd03307457146bbbbf49e946f7638ea/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=6YQKz5LIzGJ6VAwc9Eb9F8Jdk1gkfGmxXBcSHcgDxEE";
|
|
13
|
+
export declare const TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/e5a7153200d140a7b77613f76dd4b6ed/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=8FV8G4gxpwfHDVGvC3D7iVPHm9z71P2MDGUeFV9E1g8";
|
|
14
|
+
export declare const BOOKING_BY_CHECK_IN_OUT_DATE = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/2773a0f0afdb4bd29e8a3d22fd6f0826/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=TB43rU-BGNhhPJW216Yna-dKXK3vupnDY8XpuqUaVbg";
|
|
15
|
+
export declare const SALES_SUMMARY_BY_CHANNEL = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/aafe09ada85d49a98082fc99560dd611/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=tX3d-muq_CuvlFLcGe59H_yQSfkPh4s_VzjpttDYSV0";
|
|
16
|
+
export declare const SALES_SUMMARY_BY_PAYMENT_METHOD = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/572b1d5cf9384971bdb03386d94c3ec6/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=nbz0iPpbg9yfD5h1RftEOzzoyRcZfqAYJcwuNVb0IKI";
|
|
17
|
+
export declare const SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/2cfbef5e3f68426f94c2b417b86cb798/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=D_0IA0Z-4g8eQJTtGyp9Fs_heC0tZxdMdqdCrm_I_io";
|
|
18
|
+
export declare const TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD = "https://default71c6456d7d904a51a050cb7bc314e8.83.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/de0349380f904e0ab4f08d0e507d678e/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=qYePNNR5GBJ-LPAN6-xuoevyMXqZCfVGs7XqoJB14pY";
|
|
19
|
+
declare const _default: {
|
|
20
|
+
REPORT_DETAILED_TRANSACTIONS: string;
|
|
21
|
+
REPORT_DETAILED_PRODUCT_SALES: string;
|
|
22
|
+
REPORT_DAILY_SUMMARY_BY_PAYMETHOD: string;
|
|
23
|
+
REPORT_DAILY_SUMMARY_BY_ORDER: string;
|
|
24
|
+
REPORT_DETAILED_ORDERS: string;
|
|
25
|
+
REPORT_MONTH_SUMMARY_BY_ORDER: string;
|
|
26
|
+
REPORT_WEEK_SUMMARY_BY_ORDER: string;
|
|
27
|
+
REPORT_DASHBOARD: string;
|
|
28
|
+
DAILY_SUMMARY_BY_PRODUCT: string;
|
|
29
|
+
SALES_SUMMARY_BY_PRODUCT: string;
|
|
30
|
+
TEAM_MEMBERS_COMMISSION_DETAIL: string;
|
|
31
|
+
TEAM_SELF_COMMISSION_DETAIL: string;
|
|
32
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK: string;
|
|
33
|
+
BOOKING_BY_CHECK_IN_OUT_DATE: string;
|
|
34
|
+
SALES_SUMMARY_BY_CHANNEL: string;
|
|
35
|
+
SALES_SUMMARY_BY_PAYMENT_METHOD: string;
|
|
36
|
+
SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD: string;
|
|
37
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD: string;
|
|
38
|
+
};
|
|
39
|
+
export default _default;
|