@pisell/lowcode-renderer 1.0.103 → 1.0.104
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/ReactRenderer/index.js +31 -64
- package/es/Render/index.d.ts +17 -13
- package/es/Render/index.js +145 -242
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js +28 -0
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +14 -0
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +27 -0
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js +15 -0
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutPropertiesLoose.js +13 -0
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +16 -0
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +11 -0
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +12 -0
- package/es/api/index.js +11 -6
- package/es/api/report/URL.js +42 -71
- package/es/api/report/index.js +75 -112
- package/es/api/utils/index.js +5 -1
- package/es/appHelper/index.js +28 -26
- package/es/appHelper/others.js +10 -8
- package/es/config/index.d.ts +12 -13
- package/es/config/index.js +13 -14
- package/es/index.d.ts +3 -4
- package/es/index.js +8 -4
- package/lib/ReactRenderer/index.js +40 -75
- package/lib/Render/index.d.ts +16 -12
- package/lib/Render/index.js +152 -187
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js +29 -0
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +14 -0
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +27 -0
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js +15 -0
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutPropertiesLoose.js +14 -0
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +16 -0
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +11 -0
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +18 -0
- package/lib/_virtual/rolldown_runtime.js +29 -0
- package/lib/api/index.js +8 -37
- package/lib/api/report/URL.js +40 -98
- package/lib/api/report/index.js +83 -116
- package/lib/api/utils/index.js +4 -23
- package/lib/appHelper/index.js +27 -58
- package/lib/appHelper/others.js +17 -48
- package/lib/config/index.d.ts +12 -13
- package/lib/config/index.js +21 -46
- package/lib/index.d.ts +3 -4
- package/lib/index.js +9 -41
- package/package.json +2 -2
- package/es/ReactRenderer/index.d.ts +0 -3
- package/es/api/index.d.ts +0 -7
- package/es/api/report/URL.d.ts +0 -39
- package/es/api/report/index.d.ts +0 -5
- package/es/api/utils/index.d.ts +0 -2
- package/es/appHelper/index.d.ts +0 -2
- package/es/appHelper/others.d.ts +0 -1
- package/lib/ReactRenderer/index.d.ts +0 -3
- package/lib/api/index.d.ts +0 -7
- package/lib/api/report/URL.d.ts +0 -39
- package/lib/api/report/index.d.ts +0 -5
- package/lib/api/utils/index.d.ts +0 -2
- package/lib/appHelper/index.d.ts +0 -2
- package/lib/appHelper/others.d.ts +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { _defineProperty } from "./defineProperty.js";
|
|
2
|
+
|
|
3
|
+
//#region \0@oxc-project+runtime@0.108.0/helpers/objectSpread2.js
|
|
4
|
+
function ownKeys(e, r) {
|
|
5
|
+
var t = Object.keys(e);
|
|
6
|
+
if (Object.getOwnPropertySymbols) {
|
|
7
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
8
|
+
r && (o = o.filter(function(r$1) {
|
|
9
|
+
return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
|
|
10
|
+
})), t.push.apply(t, o);
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
function _objectSpread2(e) {
|
|
15
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
16
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
17
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
|
|
18
|
+
_defineProperty(e, r$1, t[r$1]);
|
|
19
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
|
|
20
|
+
Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return e;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { _objectSpread2 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _objectWithoutPropertiesLoose } from "./objectWithoutPropertiesLoose.js";
|
|
2
|
+
|
|
3
|
+
//#region \0@oxc-project+runtime@0.108.0/helpers/objectWithoutProperties.js
|
|
4
|
+
function _objectWithoutProperties(e, t) {
|
|
5
|
+
if (null == e) return {};
|
|
6
|
+
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
|
7
|
+
if (Object.getOwnPropertySymbols) {
|
|
8
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
9
|
+
for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
10
|
+
}
|
|
11
|
+
return i;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { _objectWithoutProperties };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0@oxc-project+runtime@0.108.0/helpers/objectWithoutPropertiesLoose.js
|
|
2
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
3
|
+
if (null == r) return {};
|
|
4
|
+
var t = {};
|
|
5
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
6
|
+
if (e.includes(n)) continue;
|
|
7
|
+
t[n] = r[n];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { _objectWithoutPropertiesLoose };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { _typeof } from "./typeof.js";
|
|
2
|
+
|
|
3
|
+
//#region \0@oxc-project+runtime@0.108.0/helpers/toPrimitive.js
|
|
4
|
+
function toPrimitive(t, r) {
|
|
5
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
6
|
+
var e = t[Symbol.toPrimitive];
|
|
7
|
+
if (void 0 !== e) {
|
|
8
|
+
var i = e.call(t, r || "default");
|
|
9
|
+
if ("object" != _typeof(i)) return i;
|
|
10
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
11
|
+
}
|
|
12
|
+
return ("string" === r ? String : Number)(t);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { toPrimitive };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { _typeof } from "./typeof.js";
|
|
2
|
+
import { toPrimitive } from "./toPrimitive.js";
|
|
3
|
+
|
|
4
|
+
//#region \0@oxc-project+runtime@0.108.0/helpers/toPropertyKey.js
|
|
5
|
+
function toPropertyKey(t) {
|
|
6
|
+
var i = toPrimitive(t, "string");
|
|
7
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { toPropertyKey };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region \0@oxc-project+runtime@0.108.0/helpers/typeof.js
|
|
2
|
+
function _typeof(o) {
|
|
3
|
+
"@babel/helpers - typeof";
|
|
4
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
5
|
+
return typeof o$1;
|
|
6
|
+
} : function(o$1) {
|
|
7
|
+
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
8
|
+
}, _typeof(o);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { _typeof };
|
package/es/api/index.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import report_default from "./report/index.js";
|
|
2
|
+
import utils_default from "./utils/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/api/index.ts
|
|
5
|
+
var api_default = {
|
|
6
|
+
report: report_default,
|
|
7
|
+
utils: utils_default
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { api_default as default };
|
package/es/api/report/URL.js
CHANGED
|
@@ -1,71 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
export
|
|
43
|
-
|
|
44
|
-
// sales_summary_by_payment_method
|
|
45
|
-
export 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";
|
|
46
|
-
|
|
47
|
-
// sales_summary_by_channel_payment_method
|
|
48
|
-
export 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";
|
|
49
|
-
|
|
50
|
-
// team_members_commission_summary_by_period
|
|
51
|
-
export 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";
|
|
52
|
-
export default {
|
|
53
|
-
REPORT_DETAILED_TRANSACTIONS: REPORT_DETAILED_TRANSACTIONS,
|
|
54
|
-
REPORT_DETAILED_PRODUCT_SALES: REPORT_DETAILED_PRODUCT_SALES,
|
|
55
|
-
REPORT_DAILY_SUMMARY_BY_PAYMETHOD: REPORT_DAILY_SUMMARY_BY_PAYMETHOD,
|
|
56
|
-
REPORT_DAILY_SUMMARY_BY_ORDER: REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
57
|
-
REPORT_DETAILED_ORDERS: REPORT_DETAILED_ORDERS,
|
|
58
|
-
REPORT_MONTH_SUMMARY_BY_ORDER: REPORT_MONTH_SUMMARY_BY_ORDER,
|
|
59
|
-
REPORT_WEEK_SUMMARY_BY_ORDER: REPORT_WEEK_SUMMARY_BY_ORDER,
|
|
60
|
-
REPORT_DASHBOARD: REPORT_DASHBOARD,
|
|
61
|
-
DAILY_SUMMARY_BY_PRODUCT: DAILY_SUMMARY_BY_PRODUCT,
|
|
62
|
-
SALES_SUMMARY_BY_PRODUCT: SALES_SUMMARY_BY_PRODUCT,
|
|
63
|
-
TEAM_MEMBERS_COMMISSION_DETAIL: TEAM_MEMBERS_COMMISSION_DETAIL,
|
|
64
|
-
TEAM_SELF_COMMISSION_DETAIL: TEAM_SELF_COMMISSION_DETAIL,
|
|
65
|
-
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK: TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK,
|
|
66
|
-
BOOKING_BY_CHECK_IN_OUT_DATE: BOOKING_BY_CHECK_IN_OUT_DATE,
|
|
67
|
-
SALES_SUMMARY_BY_CHANNEL: SALES_SUMMARY_BY_CHANNEL,
|
|
68
|
-
SALES_SUMMARY_BY_PAYMENT_METHOD: SALES_SUMMARY_BY_PAYMENT_METHOD,
|
|
69
|
-
SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD: SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD,
|
|
70
|
-
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD: TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD
|
|
71
|
-
};
|
|
1
|
+
//#region src/api/report/URL.ts
|
|
2
|
+
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";
|
|
3
|
+
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";
|
|
4
|
+
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";
|
|
5
|
+
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";
|
|
6
|
+
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";
|
|
7
|
+
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";
|
|
8
|
+
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";
|
|
9
|
+
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";
|
|
10
|
+
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";
|
|
11
|
+
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";
|
|
12
|
+
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";
|
|
13
|
+
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";
|
|
14
|
+
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";
|
|
15
|
+
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";
|
|
16
|
+
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";
|
|
17
|
+
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";
|
|
18
|
+
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";
|
|
19
|
+
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";
|
|
20
|
+
var URL_default = {
|
|
21
|
+
REPORT_DETAILED_TRANSACTIONS,
|
|
22
|
+
REPORT_DETAILED_PRODUCT_SALES,
|
|
23
|
+
REPORT_DAILY_SUMMARY_BY_PAYMETHOD,
|
|
24
|
+
REPORT_DAILY_SUMMARY_BY_ORDER,
|
|
25
|
+
REPORT_DETAILED_ORDERS,
|
|
26
|
+
REPORT_MONTH_SUMMARY_BY_ORDER,
|
|
27
|
+
REPORT_WEEK_SUMMARY_BY_ORDER,
|
|
28
|
+
REPORT_DASHBOARD,
|
|
29
|
+
DAILY_SUMMARY_BY_PRODUCT,
|
|
30
|
+
SALES_SUMMARY_BY_PRODUCT,
|
|
31
|
+
TEAM_MEMBERS_COMMISSION_DETAIL,
|
|
32
|
+
TEAM_SELF_COMMISSION_DETAIL,
|
|
33
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK,
|
|
34
|
+
BOOKING_BY_CHECK_IN_OUT_DATE,
|
|
35
|
+
SALES_SUMMARY_BY_CHANNEL,
|
|
36
|
+
SALES_SUMMARY_BY_PAYMENT_METHOD,
|
|
37
|
+
SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD,
|
|
38
|
+
TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { URL_default as default };
|
package/es/api/report/index.js
CHANGED
|
@@ -1,120 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
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; }
|
|
7
|
-
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) { _defineProperty(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; }
|
|
8
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
1
|
+
import { getAccount, getShopConfig, injectedConfig } from "../../config/index.js";
|
|
2
|
+
import URL_default from "./URL.js";
|
|
3
|
+
import { _objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js";
|
|
4
|
+
import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js";
|
|
5
|
+
import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js";
|
|
13
6
|
import dayjs from "dayjs";
|
|
14
7
|
import utc from "dayjs/plugin/utc";
|
|
15
8
|
import timezone from "dayjs/plugin/timezone";
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
|
|
10
|
+
//#region src/api/report/index.ts
|
|
11
|
+
const _excluded = ["date", "exportFile"];
|
|
18
12
|
dayjs.extend(utc);
|
|
19
13
|
dayjs.extend(timezone);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
const includeTimeZoneUrl = [
|
|
15
|
+
"REPORT_DASHBOARD",
|
|
16
|
+
"TEAM_MEMBERS_COMMISSION_DETAIL",
|
|
17
|
+
"TEAM_SELF_COMMISSION_DETAIL",
|
|
18
|
+
"TEAM_MEMBERS_COMMISSION_SUMMARY_BY_WEEK",
|
|
19
|
+
"BOOKING_BY_CHECK_IN_OUT_DATE",
|
|
20
|
+
"SALES_SUMMARY_BY_CHANNEL",
|
|
21
|
+
"SALES_SUMMARY_BY_PAYMENT_METHOD",
|
|
22
|
+
"SALES_SUMMARY_BY_CHANNEL_PAYMENT_METHOD",
|
|
23
|
+
"TEAM_MEMBERS_COMMISSION_SUMMARY_BY_PERIOD"
|
|
24
|
+
];
|
|
25
|
+
const getTimeDiff = (timezone$1) => {
|
|
26
|
+
return dayjs().tz(timezone$1).utcOffset() / 60;
|
|
27
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
|
-
console.log(id, timezone, start_at, end_at, values, "getReportList");
|
|
67
|
-
|
|
68
|
-
// 转换时间戳
|
|
69
|
-
start_at = dayjs.tz(start_at.format('YYYY-MM-DD HH:mm:ss'), timezone).unix();
|
|
70
|
-
end_at = dayjs.tz(end_at.format('YYYY-MM-DD HH:mm:ss'), timezone).unix();
|
|
71
|
-
|
|
72
|
-
// 获取服务器
|
|
73
|
-
var server = 'au';
|
|
74
|
-
if (typeof window !== 'undefined' && (_window = window) !== null && _window !== void 0 && (_window = _window.__APP_CONFIG__) !== null && _window !== void 0 && _window.server) {
|
|
75
|
-
var _window2;
|
|
76
|
-
server = ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.__APP_CONFIG__) === null || _window2 === void 0 ? void 0 : _window2.server) || 'au';
|
|
77
|
-
}
|
|
78
|
-
console.log(id, timezone, start_at, end_at, values, url, timezoneObj, server, others, "getReportList");
|
|
79
|
-
return _objectSpread(_objectSpread({
|
|
80
|
-
shop_id: id,
|
|
81
|
-
start_at: start_at,
|
|
82
|
-
end_at: end_at
|
|
83
|
-
}, timezoneObj), {}, {
|
|
84
|
-
local_timezone: getTimeDiff(dayjs.tz.guess()),
|
|
85
|
-
exportFile: exportFile,
|
|
86
|
-
server: server
|
|
87
|
-
}, others);
|
|
28
|
+
const getParams = (values, url) => {
|
|
29
|
+
var _window;
|
|
30
|
+
let { id, timezone: timezone$1 } = getShopConfig();
|
|
31
|
+
let timezoneObj = {};
|
|
32
|
+
if (includeTimeZoneUrl.includes(url)) timezoneObj = { timezone: getTimeDiff(timezone$1) };
|
|
33
|
+
let _ref = values || {}, { date, exportFile } = _ref, others = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
if (url === "TEAM_SELF_COMMISSION_DETAIL") {
|
|
35
|
+
const { id: id$1 } = getAccount() || {};
|
|
36
|
+
if (id$1) others["form_record_id"] = id$1;
|
|
37
|
+
}
|
|
38
|
+
let start_at = 0;
|
|
39
|
+
let end_at = 0;
|
|
40
|
+
if (date && Array.isArray(date) && date[0]) {
|
|
41
|
+
start_at = dayjs(date[0]);
|
|
42
|
+
end_at = dayjs(date[1]);
|
|
43
|
+
} else {
|
|
44
|
+
start_at = dayjs().startOf("day");
|
|
45
|
+
end_at = start_at.endOf("day");
|
|
46
|
+
}
|
|
47
|
+
console.log(id, timezone$1, start_at, end_at, values, "getReportList");
|
|
48
|
+
start_at = dayjs.tz(start_at.format("YYYY-MM-DD HH:mm:ss"), timezone$1).unix();
|
|
49
|
+
end_at = dayjs.tz(end_at.format("YYYY-MM-DD HH:mm:ss"), timezone$1).unix();
|
|
50
|
+
let server = "au";
|
|
51
|
+
if (typeof window !== "undefined" && ((_window = window) === null || _window === void 0 || (_window = _window.__APP_CONFIG__) === null || _window === void 0 ? void 0 : _window.server)) {
|
|
52
|
+
var _window2;
|
|
53
|
+
server = ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.__APP_CONFIG__) === null || _window2 === void 0 ? void 0 : _window2.server) || "au";
|
|
54
|
+
}
|
|
55
|
+
console.log(id, timezone$1, start_at, end_at, values, url, timezoneObj, server, others, "getReportList");
|
|
56
|
+
return _objectSpread2(_objectSpread2({
|
|
57
|
+
shop_id: id,
|
|
58
|
+
start_at,
|
|
59
|
+
end_at
|
|
60
|
+
}, timezoneObj), {}, {
|
|
61
|
+
local_timezone: getTimeDiff(dayjs.tz.guess()),
|
|
62
|
+
exportFile,
|
|
63
|
+
server
|
|
64
|
+
}, others);
|
|
88
65
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
third: true
|
|
104
|
-
});
|
|
105
|
-
case 3:
|
|
106
|
-
data = _context.sent;
|
|
107
|
-
return _context.abrupt("return", data);
|
|
108
|
-
case 5:
|
|
109
|
-
case "end":
|
|
110
|
-
return _context.stop();
|
|
111
|
-
}
|
|
112
|
-
}, _callee);
|
|
113
|
-
}));
|
|
114
|
-
return function getReportList(_x, _x2) {
|
|
115
|
-
return _ref3.apply(this, arguments);
|
|
116
|
-
};
|
|
66
|
+
const getReportList = function() {
|
|
67
|
+
var _ref2 = _asyncToGenerator(function* (values, url) {
|
|
68
|
+
const params = getParams(values, url);
|
|
69
|
+
return yield injectedConfig.request.custom(URL_default[url || "REPORT_DETAILED_TRANSACTIONS"] || url, {
|
|
70
|
+
method: "post",
|
|
71
|
+
data: params,
|
|
72
|
+
headers: { "Content-Type": "application/json; charset=utf-8" },
|
|
73
|
+
third: true
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
return function getReportList(_x, _x2) {
|
|
77
|
+
return _ref2.apply(this, arguments);
|
|
78
|
+
};
|
|
117
79
|
}();
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
80
|
+
var report_default = { getReportList };
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { report_default as default };
|
package/es/api/utils/index.js
CHANGED
package/es/appHelper/index.js
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { getTimezone } from "./others.js";
|
|
2
|
+
import api_default from "../api/index.js";
|
|
3
|
+
import { ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, EscPosPrinter, columnWidthWithAlignment, dataManager, formatAmount, isAndroid, isIos, isMobile, preparing, webPayment, webPrint } from "@pisell/utils";
|
|
4
|
+
|
|
5
|
+
//#region src/appHelper/index.ts
|
|
6
|
+
const appHelper = { utils: {
|
|
7
|
+
api: api_default,
|
|
8
|
+
isMobile,
|
|
9
|
+
isIos,
|
|
10
|
+
isAndroid,
|
|
11
|
+
getTimezone,
|
|
12
|
+
printerApi: {
|
|
13
|
+
EscPosPrinter,
|
|
14
|
+
ALIGN_LEFT,
|
|
15
|
+
ALIGN_CENTER,
|
|
16
|
+
ALIGN_RIGHT,
|
|
17
|
+
columnWidthWithAlignment,
|
|
18
|
+
preparing
|
|
19
|
+
},
|
|
20
|
+
formatAmount,
|
|
21
|
+
webPrint,
|
|
22
|
+
dataManager,
|
|
23
|
+
webPayment
|
|
24
|
+
} };
|
|
25
|
+
var appHelper_default = appHelper;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { appHelper_default as default };
|
package/es/appHelper/others.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { getShopConfig } from "../config/index.js";
|
|
1
2
|
import dayjs from "dayjs";
|
|
2
3
|
import utc from "dayjs/plugin/utc";
|
|
3
4
|
import timezone from "dayjs/plugin/timezone";
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
//#region src/appHelper/others.ts
|
|
5
7
|
dayjs.extend(utc);
|
|
6
8
|
dayjs.extend(timezone);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
9
|
+
const getTimezone = () => {
|
|
10
|
+
let { timezone: timezone$1 } = getShopConfig();
|
|
11
|
+
return dayjs().tz(timezone$1).utcOffset() / 60;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { getTimezone };
|
package/es/config/index.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/config/index.d.ts
|
|
2
|
+
type ShopConfigType = {
|
|
3
|
+
timezone: string;
|
|
4
|
+
id: number;
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
type InjectedConfigType = {
|
|
8
|
+
shopConfig: ShopConfigType | (() => ShopConfigType);
|
|
9
|
+
account: any;
|
|
10
|
+
request: any;
|
|
10
11
|
};
|
|
11
|
-
declare
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare const getAccount: () => any;
|
|
15
|
-
export { injectedConfig, getShopConfig };
|
|
12
|
+
declare const injectConfig: (context: InjectedConfigType) => void;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { injectConfig };
|
package/es/config/index.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/config/index.ts
|
|
2
|
+
let injectedConfig = {};
|
|
3
|
+
const injectConfig = (context) => {
|
|
4
|
+
injectedConfig = context;
|
|
4
5
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
return injectedConfig.shopConfig;
|
|
6
|
+
const getShopConfig = () => {
|
|
7
|
+
if (typeof injectedConfig.shopConfig === "function") return injectedConfig.shopConfig();
|
|
8
|
+
return injectedConfig.shopConfig;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
return injectedConfig.account;
|
|
10
|
+
const getAccount = () => {
|
|
11
|
+
if (typeof injectedConfig.account === "function") return injectedConfig.account();
|
|
12
|
+
return injectedConfig.account;
|
|
16
13
|
};
|
|
17
|
-
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { getAccount, getShopConfig, injectConfig, injectedConfig };
|