@pisell/private-materials 3.0.77 → 3.0.79
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 +1 -2
- package/es/components/booking/components/customSelect/index.js +8 -2
- 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 +1 -2
- 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 +1 -2
- package/es/components/booking/model.d.ts +1 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -2
- 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 +1 -2
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/customSelect/index.js +7 -2
- 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 +1 -2
- 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 +1 -2
- package/lib/components/booking/model.d.ts +1 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -2
- 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 +1 -2
- package/package.json +3 -3
|
@@ -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) => JSX.Element;
|
|
2
2
|
export default Booking;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
2
|
export declare const walkInData: {
|
|
4
3
|
id: number;
|
|
5
4
|
nickname: string;
|
|
6
5
|
};
|
|
7
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
8
7
|
state: FormState;
|
|
9
8
|
} & {
|
|
10
9
|
dispatch: (params: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -94,7 +93,7 @@ export declare const walkInData: {
|
|
|
94
93
|
id: number;
|
|
95
94
|
nickname: string;
|
|
96
95
|
};
|
|
97
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
96
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
98
97
|
state: FormState;
|
|
99
98
|
} & {
|
|
100
99
|
dispatch: (params: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
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,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,7 +68,7 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
71
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
73
72
|
state: FormState;
|
|
74
73
|
} & {
|
|
75
74
|
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.79",
|
|
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/utils": "1.0.25",
|
|
62
|
-
"@pisell/
|
|
63
|
-
"@pisell/
|
|
62
|
+
"@pisell/icon": "0.0.8",
|
|
63
|
+
"@pisell/date-picker": "1.0.74"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": "^18.0.0",
|