@pisell/lowcode-renderer 1.0.2 → 1.0.4
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/es/Render/index.js +1 -2
- package/es/api/report/URL.d.ts +2 -0
- package/es/api/report/URL.js +3 -1
- package/es/api/report/index.d.ts +1 -1
- package/es/api/report/index.js +5 -5
- package/lib/Render/index.js +4 -5
- package/lib/api/report/URL.d.ts +2 -0
- package/lib/api/report/URL.js +5 -1
- package/lib/api/report/index.d.ts +1 -1
- package/lib/api/report/index.js +11 -8
- package/package.json +3 -2
package/es/Render/index.js
CHANGED
|
@@ -16,8 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
import { injectComponents } from "@alilc/lowcode-plugin-inject";
|
|
17
17
|
import { AssetLoader, buildComponents } from "@alilc/lowcode-utils";
|
|
18
18
|
import { Skeleton } from "antd";
|
|
19
|
-
import isArray from "lodash
|
|
20
|
-
import mergeWith from "lodash/mergeWith";
|
|
19
|
+
import { isArray, mergeWith } from "lodash-es";
|
|
21
20
|
import { useEffect, useState } from "react";
|
|
22
21
|
import ReactRenderer from "../ReactRenderer";
|
|
23
22
|
import appHelper from "../appHelper";
|
package/es/api/report/URL.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const REPORT_DAILY_SUMMARY_BY_ORDER = "https://prod-28.australias
|
|
|
5
5
|
export declare const REPORT_DETAILED_ORDERS = "https://prod-22.australiasoutheast.logic.azure.com:443/workflows/2a71808194724ce7966fc516cbea6889/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=7GtvCsK-jcsx4lszeJm295X3uCBLP4MF2EjAwLWbSAw";
|
|
6
6
|
export declare const REPORT_MONTH_SUMMARY_BY_ORDER = "https://prod-19.australiasoutheast.logic.azure.com:443/workflows/bb93098ba15e48b5af16d8519f01c959/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=1duBNlZz70C_w8lJakWIG5E8xhTcxiyCeBP2q5xWISQ";
|
|
7
7
|
export declare const REPORT_WEEK_SUMMARY_BY_ORDER = "https://prod-12.australiasoutheast.logic.azure.com:443/workflows/74eb659a4c264b6ca85cfacd328443eb/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=-7pJxhJ3j5XF-4-Ghz25b-VUnxS-BnBjPDK-Lbp_DLM";
|
|
8
|
+
export declare const REPORT_DASHBOARD = "https://prod-28.australiasoutheast.logic.azure.com:443/workflows/5f64fa8f8c614e29aee96f7def6453e2/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=NL5FLwVokSOtki9LhbMyGlEoEgE1R_lCT7G5kWIdWEM";
|
|
8
9
|
declare const _default: {
|
|
9
10
|
REPORT_DETAILED_TRANSACTIONS: string;
|
|
10
11
|
REPORT_DETAILED_PRODUCT_SALES: string;
|
|
@@ -13,5 +14,6 @@ declare const _default: {
|
|
|
13
14
|
REPORT_DETAILED_ORDERS: string;
|
|
14
15
|
REPORT_MONTH_SUMMARY_BY_ORDER: string;
|
|
15
16
|
REPORT_WEEK_SUMMARY_BY_ORDER: string;
|
|
17
|
+
REPORT_DASHBOARD: string;
|
|
16
18
|
};
|
|
17
19
|
export default _default;
|
package/es/api/report/URL.js
CHANGED
|
@@ -18,6 +18,7 @@ export var REPORT_MONTH_SUMMARY_BY_ORDER = 'https://prod-19.australiasoutheast.l
|
|
|
18
18
|
|
|
19
19
|
// week_summary_by_order
|
|
20
20
|
export var REPORT_WEEK_SUMMARY_BY_ORDER = 'https://prod-12.australiasoutheast.logic.azure.com:443/workflows/74eb659a4c264b6ca85cfacd328443eb/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=-7pJxhJ3j5XF-4-Ghz25b-VUnxS-BnBjPDK-Lbp_DLM';
|
|
21
|
+
export var REPORT_DASHBOARD = 'https://prod-28.australiasoutheast.logic.azure.com:443/workflows/5f64fa8f8c614e29aee96f7def6453e2/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=NL5FLwVokSOtki9LhbMyGlEoEgE1R_lCT7G5kWIdWEM';
|
|
21
22
|
export default {
|
|
22
23
|
REPORT_DETAILED_TRANSACTIONS: REPORT_DETAILED_TRANSACTIONS,
|
|
23
24
|
REPORT_DETAILED_PRODUCT_SALES: REPORT_DETAILED_PRODUCT_SALES,
|
|
@@ -25,5 +26,6 @@ export default {
|
|
|
25
26
|
REPORT_DAILY_SUMMARY_BY_ORDER: REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
26
27
|
REPORT_DETAILED_ORDERS: REPORT_DETAILED_ORDERS,
|
|
27
28
|
REPORT_MONTH_SUMMARY_BY_ORDER: REPORT_MONTH_SUMMARY_BY_ORDER,
|
|
28
|
-
REPORT_WEEK_SUMMARY_BY_ORDER: REPORT_WEEK_SUMMARY_BY_ORDER
|
|
29
|
+
REPORT_WEEK_SUMMARY_BY_ORDER: REPORT_WEEK_SUMMARY_BY_ORDER,
|
|
30
|
+
REPORT_DASHBOARD: REPORT_DASHBOARD
|
|
29
31
|
};
|
package/es/api/report/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type UrlItem =
|
|
1
|
+
declare type UrlItem = "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";
|
|
2
2
|
declare const _default: {
|
|
3
3
|
getReportList: (values: any, url: UrlItem) => Promise<any>;
|
|
4
4
|
};
|
package/es/api/report/index.js
CHANGED
|
@@ -19,8 +19,8 @@ var getParams = function getParams(values) {
|
|
|
19
19
|
end_at = injectedConfig.dayjs(date[1]);
|
|
20
20
|
} else {
|
|
21
21
|
// 获取当天时间
|
|
22
|
-
start_at = injectedConfig.dayjs().startOf(
|
|
23
|
-
end_at = start_at.endOf(
|
|
22
|
+
start_at = injectedConfig.dayjs().startOf("day");
|
|
23
|
+
end_at = start_at.endOf("day");
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// 转换时间戳
|
|
@@ -42,11 +42,11 @@ var getReportList = /*#__PURE__*/function () {
|
|
|
42
42
|
case 0:
|
|
43
43
|
params = getParams(values);
|
|
44
44
|
_context.next = 3;
|
|
45
|
-
return injectedConfig.request.custom(urls[url ||
|
|
46
|
-
method:
|
|
45
|
+
return injectedConfig.request.custom(urls[url || "REPORT_DETAILED_TRANSACTIONS"], {
|
|
46
|
+
method: "post",
|
|
47
47
|
data: params,
|
|
48
48
|
headers: {
|
|
49
|
-
|
|
49
|
+
"Content-Type": "application/json; charset=utf-8"
|
|
50
50
|
},
|
|
51
51
|
third: true
|
|
52
52
|
});
|
package/lib/Render/index.js
CHANGED
|
@@ -35,8 +35,7 @@ module.exports = __toCommonJS(Render_exports);
|
|
|
35
35
|
var import_lowcode_plugin_inject = require("@alilc/lowcode-plugin-inject");
|
|
36
36
|
var import_lowcode_utils = require("@alilc/lowcode-utils");
|
|
37
37
|
var import_antd = require("antd");
|
|
38
|
-
var
|
|
39
|
-
var import_mergeWith = __toESM(require("lodash/mergeWith"));
|
|
38
|
+
var import_lodash_es = require("lodash-es");
|
|
40
39
|
var import_react = require("react");
|
|
41
40
|
var import_ReactRenderer = __toESM(require("../ReactRenderer"));
|
|
42
41
|
var import_appHelper = __toESM(require("../appHelper"));
|
|
@@ -102,7 +101,7 @@ var Render = (props) => {
|
|
|
102
101
|
return /* @__PURE__ */ React.createElement("div", { style: { padding: 20 } }, /* @__PURE__ */ React.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }));
|
|
103
102
|
}
|
|
104
103
|
function customizer(objValue, srcValue) {
|
|
105
|
-
if ((0,
|
|
104
|
+
if ((0, import_lodash_es.isArray)(objValue)) {
|
|
106
105
|
return objValue.concat(srcValue || []);
|
|
107
106
|
}
|
|
108
107
|
}
|
|
@@ -112,9 +111,9 @@ var Render = (props) => {
|
|
|
112
111
|
className: `lowcode-plugin-sample-preview-content ${className}`,
|
|
113
112
|
schema: {
|
|
114
113
|
...schema,
|
|
115
|
-
dataSource: (0,
|
|
114
|
+
dataSource: (0, import_lodash_es.mergeWith)(schema.dataSource, projectDataSource, customizer)
|
|
116
115
|
},
|
|
117
|
-
appHelper: (0,
|
|
116
|
+
appHelper: (0, import_lodash_es.mergeWith)(import_appHelper.default, propsAppHelper),
|
|
118
117
|
components
|
|
119
118
|
}
|
|
120
119
|
);
|
package/lib/api/report/URL.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const REPORT_DAILY_SUMMARY_BY_ORDER = "https://prod-28.australias
|
|
|
5
5
|
export declare const REPORT_DETAILED_ORDERS = "https://prod-22.australiasoutheast.logic.azure.com:443/workflows/2a71808194724ce7966fc516cbea6889/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=7GtvCsK-jcsx4lszeJm295X3uCBLP4MF2EjAwLWbSAw";
|
|
6
6
|
export declare const REPORT_MONTH_SUMMARY_BY_ORDER = "https://prod-19.australiasoutheast.logic.azure.com:443/workflows/bb93098ba15e48b5af16d8519f01c959/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=1duBNlZz70C_w8lJakWIG5E8xhTcxiyCeBP2q5xWISQ";
|
|
7
7
|
export declare const REPORT_WEEK_SUMMARY_BY_ORDER = "https://prod-12.australiasoutheast.logic.azure.com:443/workflows/74eb659a4c264b6ca85cfacd328443eb/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=-7pJxhJ3j5XF-4-Ghz25b-VUnxS-BnBjPDK-Lbp_DLM";
|
|
8
|
+
export declare const REPORT_DASHBOARD = "https://prod-28.australiasoutheast.logic.azure.com:443/workflows/5f64fa8f8c614e29aee96f7def6453e2/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=NL5FLwVokSOtki9LhbMyGlEoEgE1R_lCT7G5kWIdWEM";
|
|
8
9
|
declare const _default: {
|
|
9
10
|
REPORT_DETAILED_TRANSACTIONS: string;
|
|
10
11
|
REPORT_DETAILED_PRODUCT_SALES: string;
|
|
@@ -13,5 +14,6 @@ declare const _default: {
|
|
|
13
14
|
REPORT_DETAILED_ORDERS: string;
|
|
14
15
|
REPORT_MONTH_SUMMARY_BY_ORDER: string;
|
|
15
16
|
REPORT_WEEK_SUMMARY_BY_ORDER: string;
|
|
17
|
+
REPORT_DASHBOARD: string;
|
|
16
18
|
};
|
|
17
19
|
export default _default;
|
package/lib/api/report/URL.js
CHANGED
|
@@ -21,6 +21,7 @@ var URL_exports = {};
|
|
|
21
21
|
__export(URL_exports, {
|
|
22
22
|
REPORT_DAILY_SUMMARY_BY_ORDER: () => REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
23
23
|
REPORT_DAILY_SUMMARY_BY_PAYMETHOD: () => REPORT_DAILY_SUMMARY_BY_PAYMETHOD,
|
|
24
|
+
REPORT_DASHBOARD: () => REPORT_DASHBOARD,
|
|
24
25
|
REPORT_DETAILED_ORDERS: () => REPORT_DETAILED_ORDERS,
|
|
25
26
|
REPORT_DETAILED_PRODUCT_SALES: () => REPORT_DETAILED_PRODUCT_SALES,
|
|
26
27
|
REPORT_DETAILED_TRANSACTIONS: () => REPORT_DETAILED_TRANSACTIONS,
|
|
@@ -36,6 +37,7 @@ var REPORT_DAILY_SUMMARY_BY_ORDER = "https://prod-28.australiasoutheast.logic.az
|
|
|
36
37
|
var REPORT_DETAILED_ORDERS = "https://prod-22.australiasoutheast.logic.azure.com:443/workflows/2a71808194724ce7966fc516cbea6889/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=7GtvCsK-jcsx4lszeJm295X3uCBLP4MF2EjAwLWbSAw";
|
|
37
38
|
var REPORT_MONTH_SUMMARY_BY_ORDER = "https://prod-19.australiasoutheast.logic.azure.com:443/workflows/bb93098ba15e48b5af16d8519f01c959/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=1duBNlZz70C_w8lJakWIG5E8xhTcxiyCeBP2q5xWISQ";
|
|
38
39
|
var REPORT_WEEK_SUMMARY_BY_ORDER = "https://prod-12.australiasoutheast.logic.azure.com:443/workflows/74eb659a4c264b6ca85cfacd328443eb/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=-7pJxhJ3j5XF-4-Ghz25b-VUnxS-BnBjPDK-Lbp_DLM";
|
|
40
|
+
var REPORT_DASHBOARD = "https://prod-28.australiasoutheast.logic.azure.com:443/workflows/5f64fa8f8c614e29aee96f7def6453e2/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=NL5FLwVokSOtki9LhbMyGlEoEgE1R_lCT7G5kWIdWEM";
|
|
39
41
|
var URL_default = {
|
|
40
42
|
REPORT_DETAILED_TRANSACTIONS,
|
|
41
43
|
REPORT_DETAILED_PRODUCT_SALES,
|
|
@@ -43,12 +45,14 @@ var URL_default = {
|
|
|
43
45
|
REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
44
46
|
REPORT_DETAILED_ORDERS,
|
|
45
47
|
REPORT_MONTH_SUMMARY_BY_ORDER,
|
|
46
|
-
REPORT_WEEK_SUMMARY_BY_ORDER
|
|
48
|
+
REPORT_WEEK_SUMMARY_BY_ORDER,
|
|
49
|
+
REPORT_DASHBOARD
|
|
47
50
|
};
|
|
48
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
49
52
|
0 && (module.exports = {
|
|
50
53
|
REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
51
54
|
REPORT_DAILY_SUMMARY_BY_PAYMETHOD,
|
|
55
|
+
REPORT_DASHBOARD,
|
|
52
56
|
REPORT_DETAILED_ORDERS,
|
|
53
57
|
REPORT_DETAILED_PRODUCT_SALES,
|
|
54
58
|
REPORT_DETAILED_TRANSACTIONS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type UrlItem =
|
|
1
|
+
declare type UrlItem = "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";
|
|
2
2
|
declare const _default: {
|
|
3
3
|
getReportList: (values: any, url: UrlItem) => Promise<any>;
|
|
4
4
|
};
|
package/lib/api/report/index.js
CHANGED
|
@@ -57,14 +57,17 @@ var getParams = (values) => {
|
|
|
57
57
|
};
|
|
58
58
|
var getReportList = async (values, url) => {
|
|
59
59
|
const params = getParams(values);
|
|
60
|
-
const data = await import_config.injectedConfig.request.custom(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
const data = await import_config.injectedConfig.request.custom(
|
|
61
|
+
import_URL.default[url || "REPORT_DETAILED_TRANSACTIONS"],
|
|
62
|
+
{
|
|
63
|
+
method: "post",
|
|
64
|
+
data: params,
|
|
65
|
+
headers: {
|
|
66
|
+
"Content-Type": "application/json; charset=utf-8"
|
|
67
|
+
},
|
|
68
|
+
third: true
|
|
69
|
+
}
|
|
70
|
+
);
|
|
68
71
|
return data;
|
|
69
72
|
};
|
|
70
73
|
var report_default = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/lowcode-renderer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"sideEffects": false,
|
|
4
5
|
"main": "./lib/index.js",
|
|
5
6
|
"module": "./es/index.js",
|
|
6
7
|
"types": "./lib/index.d.ts",
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
"@alilc/lowcode-renderer-core": "^1.1.7",
|
|
16
17
|
"antd": "^5.6.4",
|
|
17
18
|
"@alifd/next": "^1.25.44",
|
|
18
|
-
"lodash": "^4.17.21"
|
|
19
|
+
"lodash-es": "^4.17.21"
|
|
19
20
|
},
|
|
20
21
|
"peerDependencies": {
|
|
21
22
|
"react": ">=16.9.0",
|