@pisell/private-materials 3.0.14 → 3.0.16
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- 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/TabProduct/tabs/index.less +4 -1
- package/es/components/booking/components/footer/index.js +6 -3
- 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/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/index.js +14 -6
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/info/notes/index.d.ts +3 -0
- package/es/components/booking/info/notes/index.js +83 -0
- package/es/components/booking/info/service/addService/index.js +101 -11
- package/es/components/booking/info/service/serve.d.ts +1 -0
- package/es/components/booking/info/service/serve.js +21 -0
- package/es/components/booking/info/utils.d.ts +1 -0
- package/es/components/booking/info/utils.js +8 -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/booking/utils.d.ts +15 -0
- package/es/components/booking/utils.js +22 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +39 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.less +62 -0
- package/es/components/productExtension/fields/SelectProducts/index.js +11 -3
- package/es/components/productExtension/fields/SelectResourcesTable/index.js +23 -20
- package/es/components/productExtension/index.js +2 -1
- package/es/components/productExtension/locales.js +5 -5
- 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/TabProduct/tabs/index.less +4 -1
- package/lib/components/booking/components/footer/index.js +5 -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 +2 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/index.js +21 -9
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/info/notes/index.d.ts +3 -0
- package/lib/components/booking/info/notes/index.js +111 -0
- package/lib/components/booking/info/service/addService/index.js +53 -0
- package/lib/components/booking/info/service/serve.d.ts +1 -0
- package/lib/components/booking/info/service/serve.js +30 -0
- package/lib/components/booking/info/utils.d.ts +1 -0
- package/lib/components/booking/info/utils.js +35 -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/booking/utils.d.ts +15 -0
- package/lib/components/booking/utils.js +14 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +79 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.less +62 -0
- package/lib/components/productExtension/fields/SelectProducts/index.js +17 -2
- package/lib/components/productExtension/fields/SelectResourcesTable/index.js +19 -20
- package/lib/components/productExtension/index.js +2 -1
- package/lib/components/productExtension/locales.js +5 -5
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/package.json +3 -3
|
@@ -42,10 +42,62 @@ var import_antd = require("antd");
|
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
43
|
var import_utils = require("../../../utils");
|
|
44
44
|
var import_utils2 = require("@pisell/utils");
|
|
45
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
46
|
+
var import_serve = require("../serve");
|
|
47
|
+
var import_utils3 = require("../../utils");
|
|
45
48
|
var Info = () => {
|
|
46
49
|
var _a;
|
|
47
50
|
const [search, setSearch] = (0, import_react.useState)("");
|
|
48
51
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
52
|
+
const context = (0, import_useEngineContext.default)();
|
|
53
|
+
import_utils.request.setRequest(context.appHelper.utils.request);
|
|
54
|
+
const setDefaultService = async (list) => {
|
|
55
|
+
if (state.renderType !== "eventBooking") {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (state.bookingId) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (list.length !== 1) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
let _list = [...state.service.value];
|
|
65
|
+
if (_list.length !== 0) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
let product = list[0];
|
|
69
|
+
const detail = await (0, import_serve.getProductDetail)(product.id, {
|
|
70
|
+
schedule_date: state.date.value.format("YYYY-MM-DD")
|
|
71
|
+
});
|
|
72
|
+
const isBundleOrCombination = (0, import_utils3.getIsBundleOrCombination)(detail.data);
|
|
73
|
+
if (isBundleOrCombination)
|
|
74
|
+
return;
|
|
75
|
+
let _item = {
|
|
76
|
+
...product,
|
|
77
|
+
product_id: product.id,
|
|
78
|
+
_id: (0, import_utils2.getUniqueId)(),
|
|
79
|
+
_extend: {
|
|
80
|
+
start_date: state.date.value,
|
|
81
|
+
startDate: state.date.value,
|
|
82
|
+
endDate: state.date.value,
|
|
83
|
+
start_time: "00:00:00",
|
|
84
|
+
duration: 10,
|
|
85
|
+
quantity: 1,
|
|
86
|
+
price: product.price,
|
|
87
|
+
total: product.price,
|
|
88
|
+
origin_total: product.price,
|
|
89
|
+
product_name: product.title
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
_list.push(_item);
|
|
93
|
+
dispatch({
|
|
94
|
+
type: "setService",
|
|
95
|
+
payload: {
|
|
96
|
+
value: _list,
|
|
97
|
+
edit: true
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
};
|
|
49
101
|
const getServices = async () => {
|
|
50
102
|
var _a2;
|
|
51
103
|
let data = await state.apis.getServices({
|
|
@@ -61,6 +113,7 @@ var Info = () => {
|
|
|
61
113
|
open_quotation: 1,
|
|
62
114
|
with_schedule: 0
|
|
63
115
|
});
|
|
116
|
+
setDefaultService(data == null ? void 0 : data.list);
|
|
64
117
|
dispatch({
|
|
65
118
|
type: "setService",
|
|
66
119
|
payload: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProductDetail: (id: string, params: any) => Promise<any>;
|
|
@@ -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/info/service/serve.ts
|
|
20
|
+
var serve_exports = {};
|
|
21
|
+
__export(serve_exports, {
|
|
22
|
+
getProductDetail: () => getProductDetail
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(serve_exports);
|
|
25
|
+
var import_utils = require("../../utils");
|
|
26
|
+
var getProductDetail = async (id, params) => import_utils.request.getRequest().get(`/shop/product/query/${id}`, params);
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
getProductDetail
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getIsBundleOrCombination: (productDetail: any) => boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
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/info/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
getIsBundleOrCombination: () => getIsBundleOrCombination
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var getIsBundleOrCombination = (productDetail) => {
|
|
26
|
+
var _a, _b, _c;
|
|
27
|
+
if (((_a = productDetail == null ? void 0 : productDetail.bundle_group) == null ? void 0 : _a.length) || ((_b = productDetail == null ? void 0 : productDetail.option_group) == null ? void 0 : _b.length) || ((_c = productDetail == null ? void 0 : productDetail.variant) == null ? void 0 : _c.length)) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
getIsBundleOrCombination
|
|
35
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -86,7 +87,7 @@ export declare const walkInData: {
|
|
|
86
87
|
id: number;
|
|
87
88
|
nickname: string;
|
|
88
89
|
};
|
|
89
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
90
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
90
91
|
state: FormState;
|
|
91
92
|
} & {
|
|
92
93
|
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: {
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
+
declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
|
|
3
|
+
declare class Request {
|
|
4
|
+
private request;
|
|
5
|
+
constructor();
|
|
6
|
+
setRequest(val: any): void;
|
|
7
|
+
getRequest(): {
|
|
8
|
+
get: RType;
|
|
9
|
+
post: RType;
|
|
10
|
+
put: RType;
|
|
11
|
+
remove: RType;
|
|
12
|
+
custom: RType;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const request: Request;
|
|
2
16
|
export declare const getDiscountTime: (service_times: number) => string;
|
|
3
17
|
export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
|
|
4
18
|
timeSlices: {
|
|
@@ -95,3 +109,4 @@ export declare const getDuration: (duration: number | {
|
|
|
95
109
|
value: number;
|
|
96
110
|
} | "flexible";
|
|
97
111
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
112
|
+
export {};
|
|
@@ -46,12 +46,25 @@ __export(utils_exports, {
|
|
|
46
46
|
getServiceTimes: () => getServiceTimes,
|
|
47
47
|
getShopOpeningHours: () => getShopOpeningHours,
|
|
48
48
|
isWalkIn: () => isWalkIn,
|
|
49
|
+
request: () => request,
|
|
49
50
|
sliceDayIntoFiveMinutes: () => sliceDayIntoFiveMinutes
|
|
50
51
|
});
|
|
51
52
|
module.exports = __toCommonJS(utils_exports);
|
|
52
53
|
var import_dayjs = __toESM(require("dayjs"));
|
|
53
54
|
var import_utils = require("@pisell/utils");
|
|
54
55
|
var import_lodash = require("lodash");
|
|
56
|
+
var Request = class {
|
|
57
|
+
constructor() {
|
|
58
|
+
this.request = {};
|
|
59
|
+
}
|
|
60
|
+
setRequest(val) {
|
|
61
|
+
this.request = val;
|
|
62
|
+
}
|
|
63
|
+
getRequest() {
|
|
64
|
+
return this.request;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var request = new Request();
|
|
55
68
|
var getDiscountTime = (service_times) => {
|
|
56
69
|
if (!service_times) {
|
|
57
70
|
return "";
|
|
@@ -457,5 +470,6 @@ var isWalkIn = (customer_id) => {
|
|
|
457
470
|
getServiceTimes,
|
|
458
471
|
getShopOpeningHours,
|
|
459
472
|
isWalkIn,
|
|
473
|
+
request,
|
|
460
474
|
sliceDayIntoFiveMinutes
|
|
461
475
|
});
|
|
@@ -0,0 +1,79 @@
|
|
|
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/productExtension/fields/SelectProducts/ProductItemPreview/index.tsx
|
|
30
|
+
var ProductItemPreview_exports = {};
|
|
31
|
+
__export(ProductItemPreview_exports, {
|
|
32
|
+
default: () => ProductItemPreview_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ProductItemPreview_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var ProductItemPreview = ({
|
|
41
|
+
item = {},
|
|
42
|
+
onClick,
|
|
43
|
+
onRemove,
|
|
44
|
+
amountSymbol = "$",
|
|
45
|
+
style,
|
|
46
|
+
className
|
|
47
|
+
}) => {
|
|
48
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
style,
|
|
52
|
+
className: (0, import_classnames.default)("product-item-card-preview", className),
|
|
53
|
+
onClick: () => {
|
|
54
|
+
onClick(item);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
item.cover ? /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
"img",
|
|
59
|
+
{
|
|
60
|
+
src: import_utils.image.ali(item.cover, 100),
|
|
61
|
+
className: "product-item-card-preview-cover"
|
|
62
|
+
}
|
|
63
|
+
) : null,
|
|
64
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-preview-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-preview-title" }, item.title)),
|
|
65
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: "product-item-card-preview-close-wrap",
|
|
69
|
+
onClick: (e) => {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
e.stopPropagation();
|
|
72
|
+
onRemove == null ? void 0 : onRemove(item);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
/* @__PURE__ */ import_react.default.createElement(import_XClose.default, { className: "product-item-card-preview-close" })
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
var ProductItemPreview_default = ProductItemPreview;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.product-item-card-preview {
|
|
2
|
+
padding: 16px;
|
|
3
|
+
position: relative;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 12px;
|
|
7
|
+
|
|
8
|
+
&::before {
|
|
9
|
+
content: "";
|
|
10
|
+
position: absolute;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
left: 50%;
|
|
13
|
+
transform: translate(-50%, -50%);
|
|
14
|
+
width: calc(100% - 40px);
|
|
15
|
+
height: 1px;
|
|
16
|
+
background: #F1F1F1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:last-child {
|
|
20
|
+
&::before {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.product-item-card-preview-cover {
|
|
26
|
+
width: 40px;
|
|
27
|
+
height: 40px;
|
|
28
|
+
border-radius: 8px;
|
|
29
|
+
object-fit: cover;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.product-item-card-preview-content {
|
|
33
|
+
flex: 1;
|
|
34
|
+
|
|
35
|
+
.product-item-card-preview-title {
|
|
36
|
+
color: var(--text-text-1, #1B1B1B);
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
line-height: 20px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.product-item-card-preview-close-wrap {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
width: 40px;
|
|
52
|
+
height: 40px;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
|
|
55
|
+
.product-item-card-close {
|
|
56
|
+
font-size: 30px;
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
}
|
|
@@ -37,6 +37,7 @@ var import_ahooks = require("ahooks");
|
|
|
37
37
|
var import_selectModal = __toESM(require("../../../selectModal"));
|
|
38
38
|
var import_server = require("./server");
|
|
39
39
|
var import_ProductItem = __toESM(require("./ProductItem"));
|
|
40
|
+
var import_ProductItemPreview = __toESM(require("./ProductItemPreview"));
|
|
40
41
|
var import_index = require("./index.less");
|
|
41
42
|
var import_utils = require("@pisell/utils");
|
|
42
43
|
var SelectProducts = ({ value, onChange }) => {
|
|
@@ -62,9 +63,15 @@ var SelectProducts = ({ value, onChange }) => {
|
|
|
62
63
|
skip: 1,
|
|
63
64
|
num: 500,
|
|
64
65
|
with: ["category"],
|
|
65
|
-
open_quotation: 1
|
|
66
|
+
open_quotation: 1,
|
|
67
|
+
exclude_extension_type: ["event_item"]
|
|
66
68
|
});
|
|
67
69
|
}, []);
|
|
70
|
+
const onRemove = (item) => {
|
|
71
|
+
onChange == null ? void 0 : onChange(
|
|
72
|
+
(value || []).filter((d) => (d.id || d.product_id) !== item.id)
|
|
73
|
+
);
|
|
74
|
+
};
|
|
68
75
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
69
76
|
import_selectModal.default,
|
|
70
77
|
{
|
|
@@ -83,7 +90,15 @@ var SelectProducts = ({ value, onChange }) => {
|
|
|
83
90
|
},
|
|
84
91
|
dataSource: _getProductList.data,
|
|
85
92
|
renderValueItem: (item, onSelect) => {
|
|
86
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
93
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
94
|
+
import_ProductItemPreview.default,
|
|
95
|
+
{
|
|
96
|
+
key: item == null ? void 0 : item.id,
|
|
97
|
+
item,
|
|
98
|
+
onClick: onSelect,
|
|
99
|
+
onRemove
|
|
100
|
+
}
|
|
101
|
+
);
|
|
87
102
|
},
|
|
88
103
|
renderOptionItem: (item, onSelect) => {
|
|
89
104
|
return /* @__PURE__ */ import_react.default.createElement(import_ProductItem.default, { key: item == null ? void 0 : item.id, item, onClick: onSelect });
|
|
@@ -49,7 +49,7 @@ var SelectResourcesTable = ({ value, onChange }) => {
|
|
|
49
49
|
const [data, setData] = (0, import_react.useState)([]);
|
|
50
50
|
const _getData = async () => {
|
|
51
51
|
let _getFormTypes = (0, import_server.getFormTypes)(
|
|
52
|
-
{ type: "manual", num: 500, skip: 1 },
|
|
52
|
+
{ type: "manual", num: 500, skip: 1, status: "published" },
|
|
53
53
|
{ useCache: true }
|
|
54
54
|
);
|
|
55
55
|
let _getAllResource = (0, import_server.getAllResource)(
|
|
@@ -111,25 +111,24 @@ var SelectResourcesTable = ({ value, onChange }) => {
|
|
|
111
111
|
data,
|
|
112
112
|
width: 100
|
|
113
113
|
},
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
},
|
|
114
|
+
// {
|
|
115
|
+
// title: locales.getText("pisell2.text.product-extension.open"),
|
|
116
|
+
// dataIndex: "open",
|
|
117
|
+
// width: 80,
|
|
118
|
+
// render: (text: any, record: any, index: number) => {
|
|
119
|
+
// let cur = value?.find((d: any) => d.form_id === record.form_id);
|
|
120
|
+
// let bol = !!(cur?.form_record_ids || []).length;
|
|
121
|
+
// return (
|
|
122
|
+
// <Switch
|
|
123
|
+
// disabled={!bol}
|
|
124
|
+
// checked={bol}
|
|
125
|
+
// onChange={(e) => {
|
|
126
|
+
// _onChange([], record.id);
|
|
127
|
+
// }}
|
|
128
|
+
// />
|
|
129
|
+
// );
|
|
130
|
+
// },
|
|
131
|
+
// },
|
|
133
132
|
{
|
|
134
133
|
title: import_utils.locales.getText("pisell2.text.product-extension.options"),
|
|
135
134
|
dataIndex: "form_id",
|
|
@@ -25,8 +25,8 @@ module.exports = __toCommonJS(locales_exports);
|
|
|
25
25
|
var locales_default = {
|
|
26
26
|
"en": {
|
|
27
27
|
"pisell2.text.product-extension.please-select": "Please select",
|
|
28
|
-
"pisell2.text.product-extension.cut-off-time": "Cut-off
|
|
29
|
-
"pisell2.text.product-extension.cut-off-time.desc": "
|
|
28
|
+
"pisell2.text.product-extension.cut-off-time": "Cut-off Time",
|
|
29
|
+
"pisell2.text.product-extension.cut-off-time.desc": "Use this setting to prevent last minute events. For example: you can prevent same day booking (set 1 day) or prevent events less than 6 hours away.",
|
|
30
30
|
"pisell2.text.product-extension.future-day": "Future Day",
|
|
31
31
|
"pisell2.text.product-extension.future-day.hint": "The maximum number of days in the future that customers can book",
|
|
32
32
|
"pisell2.text.product-extension.days": "Days",
|
|
@@ -36,12 +36,12 @@ var locales_default = {
|
|
|
36
36
|
"pisell2.text.product-extension.add-other-product": "Add Other Product",
|
|
37
37
|
"pisell2.text.product-extension.resource-type": "Resource Type",
|
|
38
38
|
"pisell2.text.product-extension.open": "Open",
|
|
39
|
-
"pisell2.text.product-extension.options": "
|
|
39
|
+
"pisell2.text.product-extension.options": "Items"
|
|
40
40
|
},
|
|
41
41
|
"zh-CN": {
|
|
42
42
|
"pisell2.text.product-extension.please-select": "请选择",
|
|
43
43
|
"pisell2.text.product-extension.cut-off-time": "截止时间",
|
|
44
|
-
"pisell2.text.product-extension.cut-off-time.desc": "
|
|
44
|
+
"pisell2.text.product-extension.cut-off-time.desc": "使用此设置可防止最后一分钟的事件。 例如:您可以阻止当天预订(设置为 1 天)或阻止距离不到 6 小时的活动。",
|
|
45
45
|
"pisell2.text.product-extension.future-day": "预定天数",
|
|
46
46
|
"pisell2.text.product-extension.future-day.hint": "客户未来最多可预订天数",
|
|
47
47
|
"pisell2.text.product-extension.days": "天",
|
|
@@ -56,7 +56,7 @@ var locales_default = {
|
|
|
56
56
|
"zh-HK": {
|
|
57
57
|
"pisell2.text.product-extension.please-select": "請選擇",
|
|
58
58
|
"pisell2.text.product-extension.cut-off-time": "截止时间",
|
|
59
|
-
"pisell2.text.product-extension.cut-off-time.desc": "
|
|
59
|
+
"pisell2.text.product-extension.cut-off-time.desc": "使用此設置可防止最後一分鐘的事件。例如:您可以阻止當天預訂(設置為 1 天)或阻止距離不到 6 小時的活動。",
|
|
60
60
|
"pisell2.text.product-extension.future-day": "預定天數",
|
|
61
61
|
"pisell2.text.product-extension.future-day.hint": "客戶未來最多可預訂天數",
|
|
62
62
|
"pisell2.text.product-extension.days": "天",
|
|
@@ -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.16",
|
|
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.23",
|
|
62
|
-
"@pisell/
|
|
63
|
-
"@pisell/
|
|
62
|
+
"@pisell/icon": "0.0.8",
|
|
63
|
+
"@pisell/date-picker": "1.0.68"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": "^18.0.0",
|