@pisell/lowcode-renderer 1.0.104 → 1.0.105
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
package/lib/api/report/URL.js
CHANGED
|
@@ -1,43 +1,101 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
18
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
// src/api/report/URL.ts
|
|
20
|
+
var URL_exports = {};
|
|
21
|
+
__export(URL_exports, {
|
|
22
|
+
BOOKING_BY_CHECK_IN_OUT_DATE: () => BOOKING_BY_CHECK_IN_OUT_DATE,
|
|
23
|
+
DAILY_SUMMARY_BY_PRODUCT: () => DAILY_SUMMARY_BY_PRODUCT,
|
|
24
|
+
REPORT_DAILY_SUMMARY_BY_ORDER: () => REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
25
|
+
REPORT_DAILY_SUMMARY_BY_PAYMETHOD: () => REPORT_DAILY_SUMMARY_BY_PAYMETHOD,
|
|
26
|
+
REPORT_DASHBOARD: () => REPORT_DASHBOARD,
|
|
27
|
+
REPORT_DETAILED_ORDERS: () => REPORT_DETAILED_ORDERS,
|
|
28
|
+
REPORT_DETAILED_PRODUCT_SALES: () => REPORT_DETAILED_PRODUCT_SALES,
|
|
29
|
+
REPORT_DETAILED_TRANSACTIONS: () => REPORT_DETAILED_TRANSACTIONS,
|
|
30
|
+
REPORT_MONTH_SUMMARY_BY_ORDER: () => REPORT_MONTH_SUMMARY_BY_ORDER,
|
|
31
|
+
REPORT_WEEK_SUMMARY_BY_ORDER: () => REPORT_WEEK_SUMMARY_BY_ORDER,
|
|
32
|
+
SALES_SUMMARY_BY_CHANNEL: () => SALES_SUMMARY_BY_CHANNEL,
|
|
33
|
+
SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD: () => SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD,
|
|
34
|
+
SALES_SUMMARY_BY_PAYMENT_METHOD: () => SALES_SUMMARY_BY_PAYMENT_METHOD,
|
|
35
|
+
SALES_SUMMARY_BY_PRODUCT: () => SALES_SUMMARY_BY_PRODUCT,
|
|
36
|
+
TEAM_MEMBERS_COMMISSION_DETAIL: () => TEAM_MEMBERS_COMMISSION_DETAIL,
|
|
37
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD: () => TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD,
|
|
38
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK: () => TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK,
|
|
39
|
+
TEAM_SELF_COMMISSION_DETAIL: () => TEAM_SELF_COMMISSION_DETAIL,
|
|
40
|
+
default: () => URL_default
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(URL_exports);
|
|
43
|
+
var 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";
|
|
44
|
+
var 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";
|
|
45
|
+
var 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";
|
|
46
|
+
var 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";
|
|
47
|
+
var 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";
|
|
48
|
+
var 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";
|
|
49
|
+
var 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";
|
|
50
|
+
var 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";
|
|
51
|
+
var 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";
|
|
52
|
+
var 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";
|
|
53
|
+
var 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";
|
|
54
|
+
var 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";
|
|
55
|
+
var 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";
|
|
56
|
+
var 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";
|
|
57
|
+
var 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";
|
|
58
|
+
var 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";
|
|
59
|
+
var 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";
|
|
60
|
+
var 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";
|
|
21
61
|
var URL_default = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
62
|
+
REPORT_DETAILED_TRANSACTIONS,
|
|
63
|
+
REPORT_DETAILED_PRODUCT_SALES,
|
|
64
|
+
REPORT_DAILY_SUMMARY_BY_PAYMETHOD,
|
|
65
|
+
REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
66
|
+
REPORT_DETAILED_ORDERS,
|
|
67
|
+
REPORT_MONTH_SUMMARY_BY_ORDER,
|
|
68
|
+
REPORT_WEEK_SUMMARY_BY_ORDER,
|
|
69
|
+
REPORT_DASHBOARD,
|
|
70
|
+
DAILY_SUMMARY_BY_PRODUCT,
|
|
71
|
+
SALES_SUMMARY_BY_PRODUCT,
|
|
72
|
+
TEAM_MEMBERS_COMMISSION_DETAIL,
|
|
73
|
+
TEAM_SELF_COMMISSION_DETAIL,
|
|
74
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK,
|
|
75
|
+
BOOKING_BY_CHECK_IN_OUT_DATE,
|
|
76
|
+
SALES_SUMMARY_BY_CHANNEL,
|
|
77
|
+
SALES_SUMMARY_BY_PAYMENT_METHOD,
|
|
78
|
+
SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD,
|
|
79
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD
|
|
40
80
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
BOOKING_BY_CHECK_IN_OUT_DATE,
|
|
84
|
+
DAILY_SUMMARY_BY_PRODUCT,
|
|
85
|
+
REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
86
|
+
REPORT_DAILY_SUMMARY_BY_PAYMETHOD,
|
|
87
|
+
REPORT_DASHBOARD,
|
|
88
|
+
REPORT_DETAILED_ORDERS,
|
|
89
|
+
REPORT_DETAILED_PRODUCT_SALES,
|
|
90
|
+
REPORT_DETAILED_TRANSACTIONS,
|
|
91
|
+
REPORT_MONTH_SUMMARY_BY_ORDER,
|
|
92
|
+
REPORT_WEEK_SUMMARY_BY_ORDER,
|
|
93
|
+
SALES_SUMMARY_BY_CHANNEL,
|
|
94
|
+
SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD,
|
|
95
|
+
SALES_SUMMARY_BY_PAYMENT_METHOD,
|
|
96
|
+
SALES_SUMMARY_BY_PRODUCT,
|
|
97
|
+
TEAM_MEMBERS_COMMISSION_DETAIL,
|
|
98
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD,
|
|
99
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK,
|
|
100
|
+
TEAM_SELF_COMMISSION_DETAIL
|
|
101
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
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" | "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";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
getReportList: (values: any, url: UrlItem) => Promise<any>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
package/lib/api/report/index.js
CHANGED
|
@@ -1,87 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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);
|
|
13
28
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
// src/api/report/index.ts
|
|
30
|
+
var report_exports = {};
|
|
31
|
+
__export(report_exports, {
|
|
32
|
+
default: () => report_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(report_exports);
|
|
35
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
+
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
37
|
+
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
|
38
|
+
var import_URL = __toESM(require("./URL"));
|
|
39
|
+
var import_config = require("../../config");
|
|
40
|
+
import_dayjs.default.extend(import_utc.default);
|
|
41
|
+
import_dayjs.default.extend(import_timezone.default);
|
|
42
|
+
var includeTimeZoneUrl = [
|
|
43
|
+
"REPORT_DASHBOARD",
|
|
44
|
+
"TEAM_MEMBERS_COMMISSION_DETAIL",
|
|
45
|
+
"TEAM_SELF_COMMISSION_DETAIL",
|
|
46
|
+
"TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK",
|
|
47
|
+
"BOOKING_BY_CHECK_IN_OUT_DATE",
|
|
48
|
+
"SALES_SUMMARY_BY_CHANNEL",
|
|
49
|
+
"SALES_SUMMARY_BY_PAYMENT_METHOD",
|
|
50
|
+
"SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD",
|
|
51
|
+
"TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD"
|
|
28
52
|
];
|
|
29
|
-
|
|
30
|
-
|
|
53
|
+
var getTimeDiff = (timezone2) => {
|
|
54
|
+
const now = (0, import_dayjs.default)().tz(timezone2);
|
|
55
|
+
const diff = now.utcOffset() / 60;
|
|
56
|
+
return diff;
|
|
31
57
|
};
|
|
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
|
-
|
|
58
|
+
var getParams = (values, url) => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
let { id, timezone: timezone2 } = (0, import_config.getShopConfig)();
|
|
61
|
+
let timezoneObj = {};
|
|
62
|
+
if (includeTimeZoneUrl.includes(url)) {
|
|
63
|
+
timezoneObj = {
|
|
64
|
+
timezone: getTimeDiff(timezone2)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
let { date, exportFile, ...others } = values || {};
|
|
68
|
+
if (url === "TEAM_SELF_COMMISSION_DETAIL") {
|
|
69
|
+
const { id: id2 } = (0, import_config.getAccount)() || {};
|
|
70
|
+
if (id2) {
|
|
71
|
+
others["form_record_id"] = id2;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
let start_at = 0;
|
|
75
|
+
let end_at = 0;
|
|
76
|
+
if (date && Array.isArray(date) && date[0]) {
|
|
77
|
+
start_at = (0, import_dayjs.default)(date[0]);
|
|
78
|
+
end_at = (0, import_dayjs.default)(date[1]);
|
|
79
|
+
} else {
|
|
80
|
+
start_at = (0, import_dayjs.default)().startOf("day");
|
|
81
|
+
end_at = start_at.endOf("day");
|
|
82
|
+
}
|
|
83
|
+
console.log(id, timezone2, start_at, end_at, values, "getReportList");
|
|
84
|
+
start_at = import_dayjs.default.tz(start_at.format("YYYY-MM-DD HH:mm:ss"), timezone2).unix();
|
|
85
|
+
end_at = import_dayjs.default.tz(end_at.format("YYYY-MM-DD HH:mm:ss"), timezone2).unix();
|
|
86
|
+
let server = "au";
|
|
87
|
+
if (typeof window !== "undefined" && ((_a = window == null ? void 0 : window.__APP_CONFIG__) == null ? void 0 : _a.server)) {
|
|
88
|
+
server = ((_b = window == null ? void 0 : window.__APP_CONFIG__) == null ? void 0 : _b.server) || "au";
|
|
89
|
+
}
|
|
90
|
+
console.log(id, timezone2, start_at, end_at, values, url, timezoneObj, server, others, "getReportList");
|
|
91
|
+
return {
|
|
92
|
+
shop_id: id,
|
|
93
|
+
start_at,
|
|
94
|
+
end_at,
|
|
95
|
+
...timezoneObj,
|
|
96
|
+
local_timezone: getTimeDiff(import_dayjs.default.tz.guess()),
|
|
97
|
+
exportFile,
|
|
98
|
+
server,
|
|
99
|
+
...others
|
|
100
|
+
// email: 'nick.li@pisell.com',
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
var getReportList = async (values, url) => {
|
|
104
|
+
const params = getParams(values, url);
|
|
105
|
+
const data = await import_config.injectedConfig.request.custom(
|
|
106
|
+
import_URL.default[url || "REPORT_DETAILED_TRANSACTIONS"] || url,
|
|
107
|
+
{
|
|
108
|
+
method: "post",
|
|
109
|
+
data: params,
|
|
110
|
+
headers: {
|
|
111
|
+
"Content-Type": "application/json; charset=utf-8"
|
|
112
|
+
},
|
|
113
|
+
third: true
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
return data;
|
|
117
|
+
};
|
|
118
|
+
var report_default = {
|
|
119
|
+
getReportList
|
|
69
120
|
};
|
|
70
|
-
const getReportList = function() {
|
|
71
|
-
var _ref2 = require_asyncToGenerator._asyncToGenerator(function* (values, url) {
|
|
72
|
-
const params = getParams(values, url);
|
|
73
|
-
return yield require_index.injectedConfig.request.custom(require_URL.default[url || "REPORT_DETAILED_TRANSACTIONS"] || url, {
|
|
74
|
-
method: "post",
|
|
75
|
-
data: params,
|
|
76
|
-
headers: { "Content-Type": "application/json; charset=utf-8" },
|
|
77
|
-
third: true
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
return function getReportList(_x, _x2) {
|
|
81
|
-
return _ref2.apply(this, arguments);
|
|
82
|
-
};
|
|
83
|
-
}();
|
|
84
|
-
var report_default = { getReportList };
|
|
85
|
-
|
|
86
|
-
//#endregion
|
|
87
|
-
exports.default = report_default;
|
package/lib/api/utils/index.js
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
18
|
|
|
2
|
-
|
|
19
|
+
// src/api/utils/index.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
default: () => utils_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
3
25
|
var utils_default = {};
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
|
-
exports.default = utils_default;
|
package/lib/appHelper/index.js
CHANGED
|
@@ -1,29 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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);
|
|
5
28
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
// src/appHelper/index.ts
|
|
30
|
+
var appHelper_exports = {};
|
|
31
|
+
__export(appHelper_exports, {
|
|
32
|
+
default: () => appHelper_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(appHelper_exports);
|
|
35
|
+
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_others = require("./others");
|
|
37
|
+
var import_api = __toESM(require("../api"));
|
|
38
|
+
var printerApi = {
|
|
39
|
+
EscPosPrinter: import_utils.EscPosPrinter,
|
|
40
|
+
ALIGN_LEFT: import_utils.ALIGN_LEFT,
|
|
41
|
+
ALIGN_CENTER: import_utils.ALIGN_CENTER,
|
|
42
|
+
ALIGN_RIGHT: import_utils.ALIGN_RIGHT,
|
|
43
|
+
columnWidthWithAlignment: import_utils.columnWidthWithAlignment,
|
|
44
|
+
preparing: import_utils.preparing
|
|
45
|
+
};
|
|
46
|
+
var appHelper = {
|
|
47
|
+
utils: {
|
|
48
|
+
api: import_api.default,
|
|
49
|
+
isMobile: import_utils.isMobile,
|
|
50
|
+
isIos: import_utils.isIos,
|
|
51
|
+
isAndroid: import_utils.isAndroid,
|
|
52
|
+
getTimezone: import_others.getTimezone,
|
|
53
|
+
printerApi,
|
|
54
|
+
formatAmount: import_utils.formatAmount,
|
|
55
|
+
webPrint: import_utils.webPrint,
|
|
56
|
+
dataManager: import_utils.dataManager,
|
|
57
|
+
webPayment: import_utils.webPayment
|
|
58
|
+
}
|
|
59
|
+
};
|
|
26
60
|
var appHelper_default = appHelper;
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
exports.default = appHelper_default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTimezone: () => number;
|
package/lib/appHelper/others.js
CHANGED
|
@@ -1,19 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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;
|
|
16
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);
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
|
|
29
|
+
// src/appHelper/others.ts
|
|
30
|
+
var others_exports = {};
|
|
31
|
+
__export(others_exports, {
|
|
32
|
+
getTimezone: () => getTimezone
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(others_exports);
|
|
35
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
+
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
37
|
+
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
|
38
|
+
var import_config = require("../config");
|
|
39
|
+
import_dayjs.default.extend(import_utc.default);
|
|
40
|
+
import_dayjs.default.extend(import_timezone.default);
|
|
41
|
+
var getTimezone = () => {
|
|
42
|
+
let { timezone: timezone2 } = (0, import_config.getShopConfig)();
|
|
43
|
+
const now = (0, import_dayjs.default)().tz(timezone2);
|
|
44
|
+
const diff = now.utcOffset() / 60;
|
|
45
|
+
return diff;
|
|
46
|
+
};
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
getTimezone
|
|
50
|
+
});
|
package/lib/config/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare const injectConfig: (context: InjectedConfigType) => void;
|
|
13
|
-
|
|
14
|
-
export
|
|
1
|
+
declare type ShopConfigType = {
|
|
2
|
+
timezone: string;
|
|
3
|
+
id: number;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
declare type InjectedConfigType = {
|
|
7
|
+
shopConfig: ShopConfigType | (() => ShopConfigType);
|
|
8
|
+
account: any;
|
|
9
|
+
request: any;
|
|
10
|
+
};
|
|
11
|
+
declare let injectedConfig: InjectedConfigType;
|
|
12
|
+
export declare const injectConfig: (context: InjectedConfigType) => void;
|
|
13
|
+
declare const getShopConfig: () => ShopConfigType;
|
|
14
|
+
export declare const getAccount: () => any;
|
|
15
|
+
export { injectedConfig, getShopConfig };
|