@pisell/private-materials 3.0.76 → 3.0.78
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/customSelect/index.js +8 -2
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +18 -2
- package/es/components/booking/components/footer/index.js +7 -1
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/forms/serve.d.ts +9 -0
- package/es/components/booking/forms/serve.js +25 -0
- package/es/components/booking/forms/single/RenderValueById.d.ts +6 -0
- package/es/components/booking/forms/single/RenderValueById.js +79 -0
- package/es/components/booking/forms/single/index.js +27 -0
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/booking/model.d.ts +2 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.js +22 -10
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/customSelect/index.js +7 -2
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +11 -2
- package/lib/components/booking/components/footer/index.js +5 -0
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/forms/serve.d.ts +9 -0
- package/lib/components/booking/forms/serve.js +30 -0
- package/lib/components/booking/forms/single/RenderValueById.d.ts +6 -0
- package/lib/components/booking/forms/single/RenderValueById.js +106 -0
- package/lib/components/booking/forms/single/index.js +12 -0
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/booking/model.d.ts +2 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.js +16 -6
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/package.json +3 -3
|
@@ -734,6 +734,11 @@ var Footer = (props) => {
|
|
|
734
734
|
state.bookingId ? /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-label" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, import_utils.locales.getText("pisell1.text.tax")), /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { fontSize: 14 } }, taxText)), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.tax, 2, (state == null ? void 0 : state.amountSymbol) || "$"))) : null,
|
|
735
735
|
state.bookingId ? /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-label" }, import_utils.locales.getText("pisell2.text.order-discount")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.shopDiscount, 2, (state == null ? void 0 : state.amountSymbol) || "$"))) : null,
|
|
736
736
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label order-total-item-label-bold" }, import_utils.locales.getText("pisell1.text.total")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.expectAmount, 2, (state == null ? void 0 : state.amountSymbol) || "$"))),
|
|
737
|
+
!!total.roundingAmount && /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, import_utils.locales.getText("pisell1.text.rounding")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(
|
|
738
|
+
total.roundingAmount,
|
|
739
|
+
2,
|
|
740
|
+
(state == null ? void 0 : state.amountSymbol) || "$"
|
|
741
|
+
))),
|
|
737
742
|
state.bookingId ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-border" }), /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label order-total-item-label-bold" }, import_utils.locales.getText("pisell2.text.amount-paid-on-order")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(
|
|
738
743
|
total.orderPaidAmount,
|
|
739
744
|
2,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -0,0 +1,30 @@
|
|
|
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);
|
|
18
|
+
|
|
19
|
+
// src/components/booking/forms/serve.ts
|
|
20
|
+
var serve_exports = {};
|
|
21
|
+
__export(serve_exports, {
|
|
22
|
+
getFormData: () => getFormData
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(serve_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var getFormData = async (params) => import_utils.request.getRequest().get(`/shop/form/data/v1`, params);
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
getFormData
|
|
30
|
+
});
|
|
@@ -0,0 +1,106 @@
|
|
|
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);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/forms/single/RenderValueById.tsx
|
|
30
|
+
var RenderValueById_exports = {};
|
|
31
|
+
__export(RenderValueById_exports, {
|
|
32
|
+
default: () => RenderValueById_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(RenderValueById_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_ahooks = require("ahooks");
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
40
|
+
var import_serve = require("../serve");
|
|
41
|
+
var RenderValueById = (props) => {
|
|
42
|
+
var _a, _b, _c, _d, _e, _f;
|
|
43
|
+
const { field, value: propsValue } = props;
|
|
44
|
+
const { appHelper } = (0, import_useEngineContext.default)();
|
|
45
|
+
const _getFormData = (0, import_ahooks.useRequest)(import_serve.getFormData, {
|
|
46
|
+
manual: true,
|
|
47
|
+
cacheKey: `formOption-${(_a = field.setting) == null ? void 0 : _a.linkedTable}`,
|
|
48
|
+
staleTime: 500,
|
|
49
|
+
cacheTime: 5e3
|
|
50
|
+
});
|
|
51
|
+
const value = (0, import_react.useMemo)(() => {
|
|
52
|
+
let v = propsValue;
|
|
53
|
+
if (field.filed_type === "form_to_form") {
|
|
54
|
+
if ((0, import_utils.isArr)(propsValue)) {
|
|
55
|
+
v = propsValue;
|
|
56
|
+
} else if (propsValue == null ? void 0 : propsValue.form_ids) {
|
|
57
|
+
v = propsValue.form_ids;
|
|
58
|
+
} else {
|
|
59
|
+
v = propsValue;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return v;
|
|
63
|
+
}, [propsValue]);
|
|
64
|
+
(0, import_react.useEffect)(() => {
|
|
65
|
+
var _a2, _b2;
|
|
66
|
+
if (field.filed_type === "form_to_form" && ((_a2 = field.setting) == null ? void 0 : _a2.linkedTable)) {
|
|
67
|
+
_getFormData.run({
|
|
68
|
+
form_record_ids: value,
|
|
69
|
+
form_id: (_b2 = field.setting) == null ? void 0 : _b2.linkedTable,
|
|
70
|
+
skip: 1,
|
|
71
|
+
num: 999
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}, [field.filed_type, value]);
|
|
75
|
+
const options = (0, import_react.useMemo)(() => {
|
|
76
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
77
|
+
if (field.filed_type === "form_to_form" && ((_a2 = field == null ? void 0 : field.setting) == null ? void 0 : _a2.linkedTable)) {
|
|
78
|
+
return ((_d2 = (_c2 = (_b2 = _getFormData.data) == null ? void 0 : _b2.data) == null ? void 0 : _c2.list) == null ? void 0 : _d2.map((item) => ({
|
|
79
|
+
title: item.main_field,
|
|
80
|
+
id: item.form_record_id
|
|
81
|
+
}))) || [];
|
|
82
|
+
}
|
|
83
|
+
return (_e2 = field == null ? void 0 : field.setting) == null ? void 0 : _e2.customTypeList;
|
|
84
|
+
}, [field.filed_type, (_b = field == null ? void 0 : field.setting) == null ? void 0 : _b.customTypeList, _getFormData.data]);
|
|
85
|
+
if ((0, import_utils.isArr)(value)) {
|
|
86
|
+
let _list = options == null ? void 0 : options.filter((i) => {
|
|
87
|
+
return value == null ? void 0 : value.includes((i == null ? void 0 : i.id) || i.value);
|
|
88
|
+
});
|
|
89
|
+
let _str = (_list == null ? void 0 : _list.map((i) => {
|
|
90
|
+
var _a2;
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, null, (_a2 = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a2.translationShop((i == null ? void 0 : i.title) || (i == null ? void 0 : i.label)));
|
|
92
|
+
})) || "-";
|
|
93
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, _str || "-");
|
|
94
|
+
}
|
|
95
|
+
if (!(0, import_utils.isUndefined)(value)) {
|
|
96
|
+
if ((field == null ? void 0 : field.filed_type) === "select" && !((_c = field == null ? void 0 : field.setting) == null ? void 0 : _c.version)) {
|
|
97
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, value || "-");
|
|
98
|
+
}
|
|
99
|
+
let _item = options == null ? void 0 : options.filter((i) => (i == null ? void 0 : i.id) == value);
|
|
100
|
+
return ((_f = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _f.translationShop(
|
|
101
|
+
((_d = _item == null ? void 0 : _item[0]) == null ? void 0 : _d.title) || ((_e = _item == null ? void 0 : _item[0]) == null ? void 0 : _e.label)
|
|
102
|
+
)) || "-";
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
};
|
|
106
|
+
var RenderValueById_default = RenderValueById;
|
|
@@ -39,6 +39,9 @@ var import_antd = require("antd");
|
|
|
39
39
|
var import_customSelect = __toESM(require("../../components/customSelect"));
|
|
40
40
|
var import_collapsibleList = __toESM(require("../../components/collapsibleList"));
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
|
+
var import_RenderValueById = __toESM(require("./RenderValueById"));
|
|
43
|
+
var import_useComponents = __toESM(require("../../../../hooks/useComponents"));
|
|
44
|
+
var queryValueById = ["checkbox", "radioButton", "select", "form_to_form"];
|
|
42
45
|
var Single = ({
|
|
43
46
|
value,
|
|
44
47
|
onChange,
|
|
@@ -53,6 +56,9 @@ var Single = ({
|
|
|
53
56
|
watch
|
|
54
57
|
}) => {
|
|
55
58
|
var _a, _b;
|
|
59
|
+
const [HumanBodySelector] = (0, import_useComponents.default)({
|
|
60
|
+
components: ["HumanBodySelector"]
|
|
61
|
+
});
|
|
56
62
|
const renderFieldValue = (fieldData, field) => {
|
|
57
63
|
const val = fieldData[field.key];
|
|
58
64
|
if (field.filed_type === "attachment") {
|
|
@@ -101,6 +107,12 @@ var Single = ({
|
|
|
101
107
|
return `(+${val.country_calling_code}) ${val.phone}`;
|
|
102
108
|
}
|
|
103
109
|
}
|
|
110
|
+
if (field.filed_type === "body_hotspot_image") {
|
|
111
|
+
return HumanBodySelector ? /* @__PURE__ */ import_react.default.createElement(HumanBodySelector, { value: val, disable: true }) : val;
|
|
112
|
+
}
|
|
113
|
+
if (queryValueById.includes(field == null ? void 0 : field.filed_type)) {
|
|
114
|
+
return /* @__PURE__ */ import_react.default.createElement(import_RenderValueById.default, { field, value: val });
|
|
115
|
+
}
|
|
104
116
|
return val || "-";
|
|
105
117
|
};
|
|
106
118
|
const renderItem = (0, import_react.useCallback)(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => any;
|
|
2
2
|
export default Booking;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
3
|
export declare const walkInData: {
|
|
3
4
|
id: number;
|
|
4
5
|
nickname: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
7
8
|
state: FormState;
|
|
8
9
|
} & {
|
|
9
10
|
dispatch: (params: {
|
|
@@ -96,6 +96,7 @@ declare const _default: {
|
|
|
96
96
|
'pisell1.text.subtotal': string;
|
|
97
97
|
'pisell1.text.tax': string;
|
|
98
98
|
'pisell1.text.total': string;
|
|
99
|
+
'pisell1.text.rounding': string;
|
|
99
100
|
'pisell1.text.payment-fee': string;
|
|
100
101
|
'pisell1.text.tomorrow': string;
|
|
101
102
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
@@ -259,6 +260,7 @@ declare const _default: {
|
|
|
259
260
|
'pisell1.text.subtotal': string;
|
|
260
261
|
'pisell1.text.tax': string;
|
|
261
262
|
'pisell1.text.total': string;
|
|
263
|
+
'pisell1.text.rounding': string;
|
|
262
264
|
'pisell1.text.payment-fee': string;
|
|
263
265
|
'pisell1.text.tomorrow': string;
|
|
264
266
|
'pisell1.text.no-addons': string;
|
|
@@ -417,6 +419,7 @@ declare const _default: {
|
|
|
417
419
|
'pisell1.text.subtotal': string;
|
|
418
420
|
'pisell1.text.tax': string;
|
|
419
421
|
'pisell1.text.total': string;
|
|
422
|
+
'pisell1.text.rounding': string;
|
|
420
423
|
'pisell1.text.payment-fee': string;
|
|
421
424
|
'pisell1.text.tomorrow': string;
|
|
422
425
|
'pisell1.text.no-addons': string;
|
|
@@ -129,6 +129,7 @@ var locales_default = {
|
|
|
129
129
|
"pisell1.text.subtotal": "Subtotal",
|
|
130
130
|
"pisell1.text.tax": "Tax",
|
|
131
131
|
"pisell1.text.total": "Total",
|
|
132
|
+
"pisell1.text.rounding": "Rounding",
|
|
132
133
|
"pisell1.text.payment-fee": "Payment fee",
|
|
133
134
|
"pisell1.text.tomorrow": "Tomorrow ",
|
|
134
135
|
"pisell1.text.resource-error-message-1": (x, y) => `${x} doesn't provide ${y}, but your team member can still book appointments.`,
|
|
@@ -306,6 +307,7 @@ var locales_default = {
|
|
|
306
307
|
"pisell1.text.subtotal": "小计",
|
|
307
308
|
"pisell1.text.tax": "税费",
|
|
308
309
|
"pisell1.text.total": "总计",
|
|
310
|
+
"pisell1.text.rounding": "舍入",
|
|
309
311
|
"pisell1.text.payment-fee": "支付手续费",
|
|
310
312
|
"pisell1.text.tomorrow": "明天",
|
|
311
313
|
"pisell1.text.no-addons": "没有添加商品",
|
|
@@ -478,6 +480,7 @@ var locales_default = {
|
|
|
478
480
|
"pisell1.text.subtotal": "小計",
|
|
479
481
|
"pisell1.text.tax": "稅費",
|
|
480
482
|
"pisell1.text.total": "總計",
|
|
483
|
+
"pisell1.text.rounding": "舍入",
|
|
481
484
|
"pisell1.text.payment-fee": "支付手續費",
|
|
482
485
|
"pisell1.text.tomorrow": "明天",
|
|
483
486
|
"pisell1.text.no-addons": "没有添加商品",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -93,7 +94,7 @@ export declare const walkInData: {
|
|
|
93
94
|
id: number;
|
|
94
95
|
nickname: string;
|
|
95
96
|
};
|
|
96
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
97
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
97
98
|
state: FormState;
|
|
98
99
|
} & {
|
|
99
100
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -81,14 +81,24 @@ var SelectResourcesTable = ({ value, onChange }) => {
|
|
|
81
81
|
};
|
|
82
82
|
const _dataSource = (0, import_react.useMemo)(() => {
|
|
83
83
|
if (value) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
let sortOrder = {};
|
|
85
|
+
let arr1Copy = data.slice();
|
|
86
|
+
value.forEach((item, index) => {
|
|
87
|
+
sortOrder[item.form_id] = index;
|
|
88
|
+
});
|
|
89
|
+
arr1Copy.sort((a, b) => {
|
|
90
|
+
if (sortOrder[a.form_id] !== void 0 && sortOrder[b.form_id] !== void 0) {
|
|
91
|
+
return sortOrder[a.form_id] - sortOrder[b.form_id];
|
|
92
|
+
}
|
|
93
|
+
if (sortOrder[a.form_id] !== void 0) {
|
|
94
|
+
return -1;
|
|
95
|
+
}
|
|
96
|
+
if (sortOrder[b.form_id] !== void 0) {
|
|
97
|
+
return 1;
|
|
89
98
|
}
|
|
90
|
-
return
|
|
99
|
+
return 0;
|
|
91
100
|
});
|
|
101
|
+
return arr1Copy;
|
|
92
102
|
}
|
|
93
103
|
return data;
|
|
94
104
|
}, [data, value]);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,7 +69,7 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
72
73
|
state: FormState;
|
|
73
74
|
} & {
|
|
74
75
|
dispatch: (params: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.78",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"@pisell/icon": "0.0.8",
|
|
62
|
-
"@pisell/
|
|
63
|
-
"@pisell/
|
|
62
|
+
"@pisell/utils": "1.0.25",
|
|
63
|
+
"@pisell/date-picker": "1.0.74"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": "^18.0.0",
|