@pisell/private-materials 6.1.4 → 6.1.6

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.
Files changed (92) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/render/default/view.js +3 -3
  7. package/build/lowcode/view.js +3 -3
  8. package/es/components/booking/addons/model.d.ts +10 -1
  9. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  10. package/es/components/booking/components/browserSelect/index.js +1 -1
  11. package/es/components/booking/forms/model.d.ts +10 -1
  12. package/es/components/booking/forms/model.js +5 -5
  13. package/es/components/booking/info/model.d.ts +10 -1
  14. package/es/components/booking/info/service/like/index.js +1 -1
  15. package/es/components/booking/info2/service/editService/index.js +28 -12
  16. package/es/components/booking/materiels/startTime/index.js +1 -1
  17. package/es/components/booking/model.d.ts +9 -1
  18. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  19. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  20. package/es/components/booking/notes/model.d.ts +10 -1
  21. package/es/components/booking/notes/model.js +5 -5
  22. package/es/components/booking/payments/model.d.ts +10 -1
  23. package/es/components/booking/payments/model.js +5 -5
  24. package/es/components/listComponent/index.js +5 -5
  25. package/es/components/pay/toC/model.d.ts +9 -1
  26. package/es/components/productExtension/card/index.js +3 -3
  27. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  28. package/es/components/productExtension/fields/Forms/index.js +12 -12
  29. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  30. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  31. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  32. package/es/components/productExtension/server.js +2 -2
  33. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  34. package/es/components/schedules/calendar/index.js +4 -4
  35. package/es/components/schedules/calendar/serve.js +2 -2
  36. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  37. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  38. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  39. package/es/components/schedules/components/ResourceList/index.js +1 -1
  40. package/es/components/schedules/components/Search/index.js +5 -5
  41. package/es/components/schedules/model.d.ts +9 -1
  42. package/es/components/schedules/model.js +5 -5
  43. package/es/components/schedules/openHours/index.js +1 -1
  44. package/es/components/schedules/openHours/serve.js +2 -2
  45. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  46. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  47. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  48. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  49. package/es/components/schedules/products/serve.js +2 -2
  50. package/es/components/schedules/products/utils.js +5 -5
  51. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  52. package/es/components/schedules/resources/detail/index.js +10 -10
  53. package/es/components/schedules/resources/list/index.js +2 -2
  54. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  55. package/es/components/schedules/resources/serve.js +2 -2
  56. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  57. package/es/components/schedules/utils.js +4 -4
  58. package/es/components/selectModal/index.js +2 -2
  59. package/es/components/ticketBooking/components/addServiceVariant/addService.js +178 -156
  60. package/es/components/wallet/Detail/model.d.ts +13 -1
  61. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  62. package/es/components/wallet/PointCard/model.d.ts +13 -1
  63. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  64. package/es/components/wallet/Voucher/model.d.ts +13 -1
  65. package/es/components/wallet/model.d.ts +9 -1
  66. package/es/hooks/useComponents.js +1 -1
  67. package/lib/components/booking/addons/model.d.ts +10 -1
  68. package/lib/components/booking/forms/model.d.ts +10 -1
  69. package/lib/components/booking/info/model.d.ts +10 -1
  70. package/lib/components/booking/info2/service/editService/index.js +20 -7
  71. package/lib/components/booking/model.d.ts +9 -1
  72. package/lib/components/booking/notes/model.d.ts +10 -1
  73. package/lib/components/booking/payments/model.d.ts +10 -1
  74. package/lib/components/pay/toC/model.d.ts +9 -1
  75. package/lib/components/schedules/model.d.ts +9 -1
  76. package/lib/components/schedules/utils.js +1 -1
  77. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +147 -126
  78. package/lib/components/wallet/Detail/model.d.ts +13 -1
  79. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  80. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  81. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  82. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  83. package/lib/components/wallet/model.d.ts +9 -1
  84. package/package.json +2 -2
  85. package/es/components/booking/components/drawer/index.d.ts +0 -19
  86. package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
  87. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  88. package/es/components/booking/materiels/duration/index.d.ts +0 -13
  89. package/lib/components/booking/components/drawer/index.d.ts +0 -19
  90. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
  91. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  92. package/lib/components/booking/materiels/duration/index.d.ts +0 -13
@@ -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,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;
@@ -27,8 +27,8 @@ __export(utils_exports, {
27
27
  module.exports = __toCommonJS(utils_exports);
28
28
  var import_utils = require("@pisell/utils");
29
29
  var Request = class {
30
- request = {};
31
30
  constructor() {
31
+ this.request = {};
32
32
  }
33
33
  setRequest(val) {
34
34
  this.request = val;
@@ -205,15 +205,161 @@ var AddSerivce = (props) => {
205
205
  };
206
206
  const handleSelectProduct = (0, import_ahooks.useMemoizedFn)(
207
207
  (item, type = "select") => {
208
+ console.log("点击了加入购物车");
208
209
  const isSession = (0, import_utils2.isSessionProduct)(item);
209
210
  const isEject = (0, import_utils2.getIsEject)(item, type);
210
211
  const isOnlySession = (0, import_utils2.getIsOnlySession)(item);
211
212
  let lock = false;
213
+ let cacheValues = null;
212
214
  if (isEject) {
213
215
  setCurrentProduct(item);
214
216
  } else {
215
217
  setCurrentProduct(null);
218
+ cacheValues = {
219
+ bundle: [],
220
+ key: item.id,
221
+ option: [],
222
+ product_id: item.id,
223
+ product_variant_id: 0,
224
+ quantity: 1,
225
+ rowKey: item.id,
226
+ session: null,
227
+ unique: "08974625397"
228
+ };
216
229
  }
230
+ const callback = async (e, extension_type, detail) => {
231
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
232
+ console.timeEnd("打开弹窗");
233
+ console.log("点击了加入购物车 ---弹窗", e);
234
+ setCurrentProduct(null);
235
+ if (lock) {
236
+ return;
237
+ }
238
+ lock = true;
239
+ setTimeout(() => {
240
+ lock = false;
241
+ }, 2e3);
242
+ if (!isBooking4) {
243
+ const data = await createBookingData({
244
+ product: { ...detail || item, _params: e }
245
+ });
246
+ createBooking({ booking: data });
247
+ return;
248
+ }
249
+ const _detail = detail || item;
250
+ const other = JSON.parse(JSON.stringify(e));
251
+ other.session = e.session;
252
+ let cacheItem = {
253
+ ..._detail,
254
+ product_id: item.id,
255
+ _id: (0, import_utils.getUniqueId)(),
256
+ _key: e.key,
257
+ _extend: {
258
+ start_date: state.date.value,
259
+ quantity: (e == null ? void 0 : e.quantity) || 1,
260
+ price: _detail.price,
261
+ product_name: item.title,
262
+ other
263
+ },
264
+ new: 1
265
+ };
266
+ let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
267
+ cacheItem._extend.total = _total;
268
+ cacheItem._extend.origin_total = _total;
269
+ const _isEdit = !!state.service.cacheItem;
270
+ if (_isEdit) {
271
+ cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
272
+ cacheItem.new = 0;
273
+ }
274
+ if (renderMode === "current") {
275
+ cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
276
+ }
277
+ cacheItem = (0, import_utils3.getProductExtend)({
278
+ cacheItem,
279
+ state,
280
+ isDisabledTime: true
281
+ });
282
+ if (state.renderType === "eventBooking") {
283
+ cacheItem.autoClose = false;
284
+ }
285
+ if (cacheItem.autoClose) {
286
+ cacheItem.autoClose = false;
287
+ cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
288
+ let { list: _list, quantity } = (0, import_utils6.addService)(
289
+ [...state.service.value],
290
+ cacheItem,
291
+ state
292
+ );
293
+ (_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
294
+ Toast,
295
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
296
+ quantity || 1
297
+ )))
298
+ );
299
+ (0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
300
+ try {
301
+ if (((_g2 = (_f2 = (_e2 = (_d2 = (_c2 = context.appHelper.utils.store) == null ? void 0 : _c2.getState) == null ? void 0 : _d2.call(_c2)) == null ? void 0 : _e2.global) == null ? void 0 : _f2.globalConfig) == null ? void 0 : _g2.id) === 2155) {
302
+ const val = _list == null ? void 0 : _list.map((s) => {
303
+ return {
304
+ product_id: s == null ? void 0 : s.product_id,
305
+ detailId: s == null ? void 0 : s.id,
306
+ detailProductId: s == null ? void 0 : s.product_id,
307
+ product_name: s == null ? void 0 : s.title,
308
+ price: s == null ? void 0 : s.price,
309
+ _id: s == null ? void 0 : s._id,
310
+ _key: s == null ? void 0 : s._key,
311
+ _serviceKey: s == null ? void 0 : s._serviceKey
312
+ };
313
+ });
314
+ const sendData = {
315
+ product_id: item == null ? void 0 : item.id,
316
+ detailId: _detail == null ? void 0 : _detail.id,
317
+ detailProductId: _detail == null ? void 0 : _detail.product_id,
318
+ product_name: item == null ? void 0 : item.title,
319
+ price: _detail == null ? void 0 : _detail.price,
320
+ serviceVal: val
321
+ };
322
+ (0, import_utils.sendWarningLog)({
323
+ title: "addService",
324
+ content: [
325
+ { key: "添加数据", value: JSON.stringify(sendData) },
326
+ {
327
+ key: "日期",
328
+ value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
329
+ }
330
+ ]
331
+ });
332
+ }
333
+ } catch (error) {
334
+ }
335
+ dispatch({
336
+ type: "setService",
337
+ payload: {
338
+ addModal: false,
339
+ value: _list,
340
+ edit: true,
341
+ changeService: false
342
+ }
343
+ });
344
+ } else {
345
+ openBookingEditModal();
346
+ dispatch({
347
+ type: "setService",
348
+ payload: {
349
+ editModal: true,
350
+ cacheItem,
351
+ addModal: !cacheItem.autoClose,
352
+ changeService: false
353
+ }
354
+ });
355
+ onEdit == null ? void 0 : onEdit(cacheItem);
356
+ }
357
+ };
358
+ if (cacheValues) {
359
+ callback(cacheValues, "", item);
360
+ return;
361
+ }
362
+ console.time("打开弹窗");
217
363
  state.action({
218
364
  type: "pisell1.handleOpenProductModal",
219
365
  data: {
@@ -234,132 +380,7 @@ var AddSerivce = (props) => {
234
380
  onCancel: () => {
235
381
  setCurrentProduct(null);
236
382
  },
237
- callback: async (e, extension_type, detail) => {
238
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
239
- setCurrentProduct(null);
240
- if (lock) {
241
- return;
242
- }
243
- lock = true;
244
- setTimeout(() => {
245
- lock = false;
246
- }, 2e3);
247
- if (!isBooking4) {
248
- const data = await createBookingData({
249
- product: { ...detail || item, _params: e }
250
- });
251
- createBooking({ booking: data });
252
- return;
253
- }
254
- const _detail = detail || item;
255
- const other = JSON.parse(JSON.stringify(e));
256
- other.session = e.session;
257
- let cacheItem = {
258
- ..._detail,
259
- product_id: item.id,
260
- _id: (0, import_utils.getUniqueId)(),
261
- _key: e.key,
262
- _extend: {
263
- start_date: state.date.value,
264
- quantity: (e == null ? void 0 : e.quantity) || 1,
265
- price: _detail.price,
266
- product_name: item.title,
267
- other
268
- },
269
- new: 1
270
- };
271
- let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
272
- cacheItem._extend.total = _total;
273
- cacheItem._extend.origin_total = _total;
274
- const _isEdit = !!state.service.cacheItem;
275
- if (_isEdit) {
276
- cacheItem._id = (_a2 = state.service.cacheItem) == null ? void 0 : _a2._id;
277
- cacheItem.new = 0;
278
- }
279
- if (renderMode === "current") {
280
- cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
281
- }
282
- cacheItem = (0, import_utils3.getProductExtend)({
283
- cacheItem,
284
- state,
285
- isDisabledTime: true
286
- });
287
- if (state.renderType === "eventBooking") {
288
- cacheItem.autoClose = false;
289
- }
290
- if (cacheItem.autoClose) {
291
- cacheItem.autoClose = false;
292
- cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
293
- let { list: _list, quantity } = (0, import_utils6.addService)(
294
- [...state.service.value],
295
- cacheItem,
296
- state
297
- );
298
- (_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
299
- Toast,
300
- /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
301
- quantity || 1
302
- )))
303
- );
304
- (0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
305
- try {
306
- if (((_g2 = (_f2 = (_e2 = (_d2 = (_c2 = context.appHelper.utils.store) == null ? void 0 : _c2.getState) == null ? void 0 : _d2.call(_c2)) == null ? void 0 : _e2.global) == null ? void 0 : _f2.globalConfig) == null ? void 0 : _g2.id) === 2155) {
307
- const val = _list == null ? void 0 : _list.map((s) => {
308
- return {
309
- product_id: s == null ? void 0 : s.product_id,
310
- detailId: s == null ? void 0 : s.id,
311
- detailProductId: s == null ? void 0 : s.product_id,
312
- product_name: s == null ? void 0 : s.title,
313
- price: s == null ? void 0 : s.price,
314
- _id: s == null ? void 0 : s._id,
315
- _key: s == null ? void 0 : s._key,
316
- _serviceKey: s == null ? void 0 : s._serviceKey
317
- };
318
- });
319
- const sendData = {
320
- product_id: item == null ? void 0 : item.id,
321
- detailId: _detail == null ? void 0 : _detail.id,
322
- detailProductId: _detail == null ? void 0 : _detail.product_id,
323
- product_name: item == null ? void 0 : item.title,
324
- price: _detail == null ? void 0 : _detail.price,
325
- serviceVal: val
326
- };
327
- (0, import_utils.sendWarningLog)({
328
- title: "addService",
329
- content: [
330
- { key: "添加数据", value: JSON.stringify(sendData) },
331
- {
332
- key: "日期",
333
- value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
334
- }
335
- ]
336
- });
337
- }
338
- } catch (error) {
339
- }
340
- dispatch({
341
- type: "setService",
342
- payload: {
343
- addModal: false,
344
- value: _list,
345
- edit: true,
346
- changeService: false
347
- }
348
- });
349
- } else {
350
- openBookingEditModal();
351
- dispatch({
352
- type: "setService",
353
- payload: {
354
- editModal: true,
355
- cacheItem,
356
- addModal: !cacheItem.autoClose,
357
- changeService: false
358
- }
359
- });
360
- onEdit == null ? void 0 : onEdit(cacheItem);
361
- }
362
- }
383
+ callback
363
384
  });
364
385
  }
365
386
  );
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ addWalletCard: any;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ walletDetailState: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,14 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ setup?: 'menu' | 'list' | 'detail' | string;
5
+ }
6
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
+ state: RechargeState;
8
+ } & {
9
+ dispatch: (params: {
10
+ type: string;
11
+ payload: any;
12
+ }) => void;
13
+ }>;
14
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,29 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ selectedGiftOptionId: string | null;
4
+ cardList: Array<{
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ }>;
9
+ selectedItem: {
10
+ id?: string;
11
+ gift_price?: number;
12
+ price?: number;
13
+ name?: string;
14
+ variant_id?: string;
15
+ };
16
+ productId?: string;
17
+ detailId?: string;
18
+ total: string | number;
19
+ rechargeModalOpen: boolean;
20
+ }
21
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
+ state: RechargeState;
23
+ } & {
24
+ dispatch: (params: {
25
+ type: string;
26
+ payload: any;
27
+ }) => void;
28
+ }>;
29
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: 0;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from './serve';
2
3
  export interface WalletCardItemProps {
3
4
  id: string;
@@ -26,4 +27,11 @@ export interface WalletListProps {
26
27
  currentSearchListItemCode?: string;
27
28
  [key: string]: any;
28
29
  }
29
- export declare const Provider: any, Context: any;
30
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
+ global_wallet: WalletListProps;
32
+ } & {
33
+ dispatch: (params: {
34
+ type: string;
35
+ payload: any;
36
+ }) => void;
37
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.1.4",
3
+ "version": "6.1.6",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,9 +59,9 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
+ "@pisell/date-picker": "3.0.2",
62
63
  "@pisell/utils": "3.0.0",
63
64
  "@pisell/icon": "0.0.11",
64
- "@pisell/date-picker": "3.0.2",
65
65
  "@pisell/materials": "6.1.1"
66
66
  },
67
67
  "peerDependencies": {
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { DrawerProps } from 'antd';
3
- import './index.less';
4
- export interface PisellDrawerProps extends DrawerProps {
5
- header?: React.ReactNode;
6
- titleNoWrap?: boolean;
7
- hideScrollBar?: boolean;
8
- showGoBack?: boolean;
9
- }
10
- /**
11
- * @title: 自定义抽屉
12
- * @description:
13
- * @param {PisellDrawerProps} props
14
- * @return {*}
15
- * @Author: zhiwei.Wang
16
- * @Date: 2024-01-30 16:51
17
- */
18
- declare const Drawer: (props: PisellDrawerProps) => JSX.Element;
19
- export default Drawer;
@@ -1,98 +0,0 @@
1
- import dayjs from 'dayjs';
2
- export declare const getUsableTime: (cacheItem: any) => any;
3
- export declare const getDurationProps: ({ cacheItem, useStartTime, currentResource, slice, }: any) => {
4
- startDate: dayjs.Dayjs;
5
- usableTime: any;
6
- duration: string | number | {
7
- type: string;
8
- value: number;
9
- };
10
- locale: string;
11
- slice: any;
12
- selectProps: {
13
- size: string;
14
- };
15
- };
16
- /**
17
- * @title: 灵活时长选项
18
- * @description:
19
- * @param {*} useMemo
20
- * @return {*}
21
- * @Author: zhiwei.Wang
22
- * @Date: 2024-02-23 10:10
23
- */
24
- export declare const getFlexibleOption: ({ cacheItem, useStartTime, currentResource, slice, durationProps, }: any) => {
25
- label: any;
26
- value: any;
27
- } | null;
28
- export declare const getTimeSlices: ({ state }: any) => {
29
- timeSlices: {
30
- label: string;
31
- value: string;
32
- }[];
33
- };
34
- /**
35
- * @title: 时间切片
36
- * @description:
37
- * @return {*}
38
- * @Author: zhiwei.Wang
39
- * @Date: 2024-01-09 13:37
40
- */
41
- export declare const getTimeObj: ({ cacheItem, useStartTime, currentResource, state, useDuration, durationProps, }: any) => {
42
- timeSlices: {
43
- label: string;
44
- value: string;
45
- }[];
46
- durationSlicesBasedOnTime: {
47
- label: string;
48
- value: number;
49
- }[];
50
- };
51
- /**
52
- * @title: 获取资源列表
53
- * @description:
54
- * @return {*}
55
- * @Author: zhiwei.Wang
56
- * @Date: 2024-01-09 13:38
57
- */
58
- export declare const formatResources: ({ cacheItem, resourcesOrigin, id }: any) => {
59
- list: any;
60
- maps: any;
61
- };
62
- export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
63
- /**
64
- * @title: 设置默认容量
65
- * @description:
66
- * @param {any} param1
67
- * @return {*}
68
- * @Author: zhiwei.Wang
69
- * @Date: 2024-09-19 20:26
70
- */
71
- export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any;
72
- /**
73
- * @title: 将商品内关联的资源id还原成数据
74
- * @description:
75
- * @param {any} resourcesOriginMap
76
- * @param {any} cacheItem
77
- * @return {*}
78
- * @Author: zhiwei.Wang
79
- * @Date: 2024-09-19 20:23
80
- */
81
- export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
82
- /**
83
- * @title: 预生成服务的 extend
84
- * @description:
85
- * @param {any} param1
86
- * @return {*}
87
- * @Author: zhiwei.Wang
88
- * @Date: 2024-06-01 13:25
89
- */
90
- export declare const getProductExtend: ({ cacheItem, state, isDisabledTime }: any) => any;
91
- /**
92
- * @title: 格式化服务列表
93
- * @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
94
- * 使用with resourceRelation后 返回的resource_relation是实时数据
95
- * 这里做一次转换
96
- * @param list
97
- */
98
- export declare const transServiceList: (list: any[]) => any[];
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default _default;
@@ -1,13 +0,0 @@
1
- import { SelectProps } from 'antd';
2
- interface DurationProps extends SelectProps {
3
- locale?: string;
4
- slice?: number;
5
- selectProps?: SelectProps;
6
- timeObjChange?: any;
7
- duration?: any;
8
- usableTime?: any;
9
- startDate?: any;
10
- timeObj?: any;
11
- }
12
- declare const Duration: (props: DurationProps) => JSX.Element;
13
- export default Duration;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { DrawerProps } from 'antd';
3
- import './index.less';
4
- export interface PisellDrawerProps extends DrawerProps {
5
- header?: React.ReactNode;
6
- titleNoWrap?: boolean;
7
- hideScrollBar?: boolean;
8
- showGoBack?: boolean;
9
- }
10
- /**
11
- * @title: 自定义抽屉
12
- * @description:
13
- * @param {PisellDrawerProps} props
14
- * @return {*}
15
- * @Author: zhiwei.Wang
16
- * @Date: 2024-01-30 16:51
17
- */
18
- declare const Drawer: (props: PisellDrawerProps) => JSX.Element;
19
- export default Drawer;