@pisell/private-materials 3.0.45 → 3.0.47
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 +2 -2
- package/build/lowcode/render/default/view.js +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/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/model.d.ts +2 -1
- package/es/components/booking/info/service/addService/index.js +14 -3
- package/es/components/booking/info/utils.js +2 -2
- 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/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/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/model.d.ts +2 -1
- package/lib/components/booking/info/service/addService/index.js +14 -3
- package/lib/components/booking/info/utils.js +2 -2
- 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/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/package.json +2 -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: {
|
|
@@ -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,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: {
|
|
@@ -30,6 +30,7 @@ import { getProductDetail } from "../serve";
|
|
|
30
30
|
import { getIsBundleOrCombination } from "../../utils";
|
|
31
31
|
import { formatProductListByCategory, getProductTotalPrice, request, getCacheParams, deleteCacheParams } from "../../../utils";
|
|
32
32
|
import { locales, getUniqueId } from "@pisell/utils";
|
|
33
|
+
import { useUpdateEffect } from "ahooks";
|
|
33
34
|
var shopList = [2886, 4422, 5538, 6930];
|
|
34
35
|
var getCacheResourceId = function getCacheResourceId() {
|
|
35
36
|
var serviceParams = getCacheParams();
|
|
@@ -217,8 +218,6 @@ var Info = function Info() {
|
|
|
217
218
|
};
|
|
218
219
|
}();
|
|
219
220
|
var handleSelectService = function handleSelectService() {
|
|
220
|
-
getServices();
|
|
221
|
-
setSearch("");
|
|
222
221
|
dispatch({
|
|
223
222
|
type: "setService",
|
|
224
223
|
payload: {
|
|
@@ -314,13 +313,24 @@ var Info = function Info() {
|
|
|
314
313
|
return;
|
|
315
314
|
}
|
|
316
315
|
// 如果弹窗打开,并且是创建, 则自动打开选择服务的弹窗
|
|
317
|
-
if (state.modalOpen && !state.bookingId) {
|
|
316
|
+
if (state.modalOpen && !state.bookingId && state.renderType !== 'eventBooking') {
|
|
318
317
|
handleSelectService();
|
|
319
318
|
}
|
|
320
319
|
}, [state.modalOpen, state.bookingId]);
|
|
321
320
|
var showAddButton = useMemo(function () {
|
|
322
321
|
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
323
322
|
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
323
|
+
useUpdateEffect(function () {
|
|
324
|
+
if (state.service.addModal) {
|
|
325
|
+
getServices();
|
|
326
|
+
setSearch("");
|
|
327
|
+
}
|
|
328
|
+
}, [state.service.addModal]);
|
|
329
|
+
useEffect(function () {
|
|
330
|
+
if (state.renderType === "eventBooking" && state.modalOpen) {
|
|
331
|
+
getServices();
|
|
332
|
+
}
|
|
333
|
+
}, [state.renderType, state.modalOpen]);
|
|
324
334
|
var addButton = useMemo(function () {
|
|
325
335
|
if (state.renderType === "eventBooking") {
|
|
326
336
|
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -346,6 +356,7 @@ var Info = function Info() {
|
|
|
346
356
|
}
|
|
347
357
|
});
|
|
348
358
|
}, [state.renderType, showAddButton, isService, state.service.value, loading]);
|
|
359
|
+
console.log(state.service.addModal, 'state.service.addModal');
|
|
349
360
|
return /*#__PURE__*/React.createElement(React.Fragment, null, ((_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : (_state$service3$cache = _state$service3.cacheItem) === null || _state$service3$cache === void 0 ? void 0 : _state$service3$cache.autoClose) && /*#__PURE__*/React.createElement(Skeleton, {
|
|
350
361
|
loading: true,
|
|
351
362
|
active: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// 商品是套餐或单规格多规格
|
|
2
2
|
export var getIsBundleOrCombination = function getIsBundleOrCombination(productDetail) {
|
|
3
|
-
var _productDetail$bundle
|
|
4
|
-
if (productDetail !== null && productDetail !== void 0 && (_productDetail$bundle = productDetail.bundle_group) !== null && _productDetail$bundle !== void 0 && _productDetail$bundle.length
|
|
3
|
+
var _productDetail$bundle;
|
|
4
|
+
if (productDetail !== null && productDetail !== void 0 && (_productDetail$bundle = productDetail.bundle_group) !== null && _productDetail$bundle !== void 0 && _productDetail$bundle.length) {
|
|
5
5
|
return true;
|
|
6
6
|
}
|
|
7
7
|
return false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -88,7 +89,7 @@ export declare const walkInData: {
|
|
|
88
89
|
id: number;
|
|
89
90
|
nickname: string;
|
|
90
91
|
};
|
|
91
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
92
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
92
93
|
state: FormState;
|
|
93
94
|
} & {
|
|
94
95
|
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,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: {
|
|
@@ -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,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: {
|
|
@@ -45,6 +45,7 @@ var import_serve = require("../serve");
|
|
|
45
45
|
var import_utils = require("../../utils");
|
|
46
46
|
var import_utils2 = require("../../../utils");
|
|
47
47
|
var import_utils3 = require("@pisell/utils");
|
|
48
|
+
var import_ahooks = require("ahooks");
|
|
48
49
|
var shopList = [2886, 4422, 5538, 6930];
|
|
49
50
|
var getCacheResourceId = () => {
|
|
50
51
|
const serviceParams = (0, import_utils2.getCacheParams)();
|
|
@@ -140,8 +141,6 @@ var Info = () => {
|
|
|
140
141
|
});
|
|
141
142
|
};
|
|
142
143
|
const handleSelectService = () => {
|
|
143
|
-
getServices();
|
|
144
|
-
setSearch("");
|
|
145
144
|
dispatch({
|
|
146
145
|
type: "setService",
|
|
147
146
|
payload: {
|
|
@@ -229,13 +228,24 @@ var Info = () => {
|
|
|
229
228
|
)) {
|
|
230
229
|
return;
|
|
231
230
|
}
|
|
232
|
-
if (state.modalOpen && !state.bookingId) {
|
|
231
|
+
if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking") {
|
|
233
232
|
handleSelectService();
|
|
234
233
|
}
|
|
235
234
|
}, [state.modalOpen, state.bookingId]);
|
|
236
235
|
const showAddButton = (0, import_react.useMemo)(() => {
|
|
237
236
|
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
238
237
|
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
238
|
+
(0, import_ahooks.useUpdateEffect)(() => {
|
|
239
|
+
if (state.service.addModal) {
|
|
240
|
+
getServices();
|
|
241
|
+
setSearch("");
|
|
242
|
+
}
|
|
243
|
+
}, [state.service.addModal]);
|
|
244
|
+
(0, import_react.useEffect)(() => {
|
|
245
|
+
if (state.renderType === "eventBooking" && state.modalOpen) {
|
|
246
|
+
getServices();
|
|
247
|
+
}
|
|
248
|
+
}, [state.renderType, state.modalOpen]);
|
|
239
249
|
const addButton = (0, import_react.useMemo)(() => {
|
|
240
250
|
if (state.renderType === "eventBooking") {
|
|
241
251
|
return isService ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }) : /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -265,6 +275,7 @@ var Info = () => {
|
|
|
265
275
|
state.service.value,
|
|
266
276
|
loading
|
|
267
277
|
]);
|
|
278
|
+
console.log(state.service.addModal, "state.service.addModal");
|
|
268
279
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = (_b = state.service) == null ? void 0 : _b.cacheItem) == null ? void 0 : _c.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
|
|
269
280
|
import_drawer.default,
|
|
270
281
|
{
|
|
@@ -23,8 +23,8 @@ __export(utils_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(utils_exports);
|
|
25
25
|
var getIsBundleOrCombination = (productDetail) => {
|
|
26
|
-
var _a
|
|
27
|
-
if ((
|
|
26
|
+
var _a;
|
|
27
|
+
if ((_a = productDetail == null ? void 0 : productDetail.bundle_group) == null ? void 0 : _a.length) {
|
|
28
28
|
return true;
|
|
29
29
|
}
|
|
30
30
|
return false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -88,7 +89,7 @@ export declare const walkInData: {
|
|
|
88
89
|
id: number;
|
|
89
90
|
nickname: string;
|
|
90
91
|
};
|
|
91
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
92
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
92
93
|
state: FormState;
|
|
93
94
|
} & {
|
|
94
95
|
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,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.47",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"ahooks": "^3.7.6",
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
|
-
"@pisell/utils": "1.0.24",
|
|
62
61
|
"@pisell/icon": "0.0.8",
|
|
62
|
+
"@pisell/utils": "1.0.24",
|
|
63
63
|
"@pisell/date-picker": "1.0.69"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|