@pisell/private-materials 6.4.71 → 6.4.72

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 (113) 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/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/booking/addons/model.d.ts +1 -10
  12. package/es/components/booking/components/footer/amount.js +25 -8
  13. package/es/components/booking/components/footer/utils.d.ts +7 -0
  14. package/es/components/booking/components/footer/utils.js +46 -22
  15. package/es/components/booking/forms/model.d.ts +1 -10
  16. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  17. package/es/components/booking/hooks/useQuotation.js +69 -21
  18. package/es/components/booking/info/model.d.ts +1 -10
  19. package/es/components/booking/info/service/Lists.js +1 -1
  20. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  21. package/es/components/booking/info/service/serve.d.ts +14 -0
  22. package/es/components/booking/info/service/serve.js +22 -1
  23. package/es/components/booking/info/service2/Group/utils.js +2 -0
  24. package/es/components/booking/info/service2/utils.d.ts +1 -33
  25. package/es/components/booking/info/service2/utils.js +75 -29
  26. package/es/components/booking/info/utils.js +5 -0
  27. package/es/components/booking/info2/service/addService/index.js +146 -89
  28. package/es/components/booking/info2/service/addService/utils.d.ts +9 -1
  29. package/es/components/booking/info2/service/addService/utils.js +78 -9
  30. package/es/components/booking/info2/service/editService/index.js +235 -55
  31. package/es/components/booking/info2/utilsByBooking.js +14 -5
  32. package/es/components/booking/model.d.ts +1 -9
  33. package/es/components/booking/notes/model.d.ts +1 -10
  34. package/es/components/booking/payments/model.d.ts +1 -10
  35. package/es/components/booking/utils.d.ts +9 -1
  36. package/es/components/booking/utils.js +23 -0
  37. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  38. package/es/components/eftposPay/hooks.d.ts +1 -1
  39. package/es/components/eftposPay/store/index.d.ts +2 -2
  40. package/es/components/pay/toC/model.d.ts +1 -9
  41. package/es/components/schedules/model.d.ts +1 -9
  42. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  43. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
  44. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  45. package/es/components/ticketBooking/components/addServiceVariant/addService.js +283 -138
  46. package/es/components/ticketBooking/components/ticketBooking/index.js +14 -11
  47. package/es/components/ticketBooking/utils/index.d.ts +6 -1
  48. package/es/components/ticketBooking/utils/index.js +21 -3
  49. package/es/components/wallet/Detail/model.d.ts +1 -13
  50. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  51. package/es/components/wallet/PointCard/model.d.ts +1 -13
  52. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  53. package/es/components/wallet/Voucher/model.d.ts +1 -13
  54. package/es/components/wallet/model.d.ts +1 -9
  55. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  56. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +355 -0
  57. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  58. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  59. package/es/pro/multiDayTimeSelect/index.js +1 -0
  60. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  61. package/es/pro/multiDayTimeSelect/types.js +1 -0
  62. package/lib/components/booking/addons/model.d.ts +1 -10
  63. package/lib/components/booking/components/footer/amount.js +23 -6
  64. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  65. package/lib/components/booking/components/footer/utils.js +23 -11
  66. package/lib/components/booking/forms/model.d.ts +1 -10
  67. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  68. package/lib/components/booking/hooks/useQuotation.js +45 -13
  69. package/lib/components/booking/info/model.d.ts +1 -10
  70. package/lib/components/booking/info/service/Lists.js +1 -1
  71. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  72. package/lib/components/booking/info/service/serve.d.ts +14 -0
  73. package/lib/components/booking/info/service/serve.js +5 -0
  74. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  75. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  76. package/lib/components/booking/info/service2/utils.js +24 -10
  77. package/lib/components/booking/info/utils.js +4 -0
  78. package/lib/components/booking/info2/service/addService/index.js +22 -3
  79. package/lib/components/booking/info2/service/addService/utils.d.ts +9 -1
  80. package/lib/components/booking/info2/service/addService/utils.js +47 -9
  81. package/lib/components/booking/info2/service/editService/index.js +191 -31
  82. package/lib/components/booking/info2/utilsByBooking.js +19 -8
  83. package/lib/components/booking/model.d.ts +1 -9
  84. package/lib/components/booking/notes/model.d.ts +1 -10
  85. package/lib/components/booking/payments/model.d.ts +1 -10
  86. package/lib/components/booking/utils.d.ts +9 -1
  87. package/lib/components/booking/utils.js +15 -0
  88. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  89. package/lib/components/eftposPay/hooks.d.ts +1 -1
  90. package/lib/components/eftposPay/store/index.d.ts +2 -2
  91. package/lib/components/pay/toC/model.d.ts +1 -9
  92. package/lib/components/schedules/model.d.ts +1 -9
  93. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  94. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  95. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  96. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +185 -119
  97. package/lib/components/ticketBooking/components/ticketBooking/index.js +0 -16
  98. package/lib/components/ticketBooking/utils/index.d.ts +6 -1
  99. package/lib/components/ticketBooking/utils/index.js +11 -1
  100. package/lib/components/wallet/Detail/model.d.ts +1 -13
  101. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  102. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  103. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  104. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  105. package/lib/components/wallet/model.d.ts +1 -9
  106. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  107. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
  108. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  109. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  110. package/lib/pro/multiDayTimeSelect/index.js +35 -0
  111. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  112. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  113. package/package.json +13 -13
@@ -1,13 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,29 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
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
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from './serve';
3
2
  export interface WalletCardItemProps {
4
3
  id: string;
@@ -27,11 +26,4 @@ export interface WalletListProps {
27
26
  currentSearchListItemCode?: string;
28
27
  [key: string]: any;
29
28
  }
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
- }>;
29
+ export declare const Provider: any, Context: any;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { MultiDayTimeSelectProps, MultiDayTimeSelectValue } from './types';
3
+ import './MultiDayTimeSelect.less';
4
+ export interface MultiDayTimeSelectRef {
5
+ validate: () => Promise<void>;
6
+ getValue: () => MultiDayTimeSelectValue | null;
7
+ }
8
+ declare const MultiDayTimeSelect: React.ForwardRefExoticComponent<MultiDayTimeSelectProps & React.RefAttributes<MultiDayTimeSelectRef>>;
9
+ export default MultiDayTimeSelect;
@@ -0,0 +1,304 @@
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/pro/multiDayTimeSelect/MultiDayTimeSelect.tsx
30
+ var MultiDayTimeSelect_exports = {};
31
+ __export(MultiDayTimeSelect_exports, {
32
+ default: () => MultiDayTimeSelect_default
33
+ });
34
+ module.exports = __toCommonJS(MultiDayTimeSelect_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_icons = require("@ant-design/icons");
37
+ var import_dayjs = __toESM(require("dayjs"));
38
+ var import_materials = require("@pisell/materials");
39
+ var import_antd = require("antd");
40
+ var import_utils = require("@pisell/utils");
41
+ var import_MultiDayTimeSelect = require("./MultiDayTimeSelect.less");
42
+ var RangePicker = import_materials.DatePicker.RangePicker;
43
+ var MultiDayTimeSelect = (0, import_react.forwardRef)(({
44
+ maxDays = 30,
45
+ defaultStartDate,
46
+ separateStartEnd = false,
47
+ value,
48
+ onChange,
49
+ locale = "en",
50
+ disabled = false,
51
+ startDateLabel,
52
+ endDateLabel,
53
+ durationLabel
54
+ }, ref) => {
55
+ const [form] = import_antd.Form.useForm();
56
+ const [internalValue, setInternalValue] = (0, import_react.useState)(null);
57
+ (0, import_react.useImperativeHandle)(ref, () => ({
58
+ validate: async () => {
59
+ await form.validateFields();
60
+ },
61
+ getValue: () => internalValue
62
+ }));
63
+ const formatLocale = (0, import_react.useMemo)(() => {
64
+ const isEn = locale === "en" || locale === "en-US";
65
+ return isEn ? "DD/MM/YYYY" : "YYYY-MM-DD";
66
+ }, [locale]);
67
+ const durationOptions = (0, import_react.useMemo)(() => {
68
+ const options = [];
69
+ for (let i = 1; i <= maxDays; i++) {
70
+ options.push({
71
+ label: `${i} ${i === 1 ? locale === "en" ? "day" : "天" : locale === "en" ? "days" : "天"}`,
72
+ value: i
73
+ });
74
+ }
75
+ return options;
76
+ }, [maxDays, locale]);
77
+ (0, import_react.useEffect)(() => {
78
+ if (value) {
79
+ setInternalValue(value);
80
+ form.setFieldsValue({
81
+ dateRange: separateStartEnd ? void 0 : [value.startDate, value.endDate],
82
+ startDate: separateStartEnd ? value.startDate : void 0,
83
+ endDate: separateStartEnd ? value.endDate : void 0,
84
+ duration: value.duration
85
+ });
86
+ } else {
87
+ const startDate = defaultStartDate || (0, import_dayjs.default)();
88
+ const endDate = startDate.add(1, "day");
89
+ const initialValue = {
90
+ startDate,
91
+ endDate,
92
+ duration: 1
93
+ };
94
+ setInternalValue(initialValue);
95
+ form.setFieldsValue({
96
+ dateRange: separateStartEnd ? void 0 : [startDate, endDate],
97
+ startDate: separateStartEnd ? startDate : void 0,
98
+ endDate: separateStartEnd ? endDate : void 0,
99
+ duration: 1
100
+ });
101
+ onChange == null ? void 0 : onChange(initialValue);
102
+ }
103
+ }, [value, defaultStartDate, separateStartEnd, form, onChange]);
104
+ const updateValue = (newValue) => {
105
+ setInternalValue(newValue);
106
+ onChange == null ? void 0 : onChange(newValue);
107
+ };
108
+ const handleDateRangeChange = (dates) => {
109
+ if (dates && dates[0] && dates[1]) {
110
+ const days = dates[1].diff(dates[0], "day");
111
+ let finalEndDate = dates[1];
112
+ let finalDuration = days;
113
+ if (days > maxDays) {
114
+ const endTime = {
115
+ hour: dates[1].hour(),
116
+ minute: dates[1].minute(),
117
+ second: dates[1].second(),
118
+ millisecond: dates[1].millisecond()
119
+ };
120
+ finalEndDate = dates[0].add(maxDays, "day");
121
+ finalEndDate = finalEndDate.hour(endTime.hour).minute(endTime.minute).second(endTime.second).millisecond(endTime.millisecond);
122
+ finalDuration = maxDays;
123
+ }
124
+ if (days > 0) {
125
+ const newValue = {
126
+ startDate: dates[0],
127
+ endDate: finalEndDate,
128
+ duration: finalDuration
129
+ };
130
+ updateValue(newValue);
131
+ form.setFieldsValue({
132
+ dateRange: [dates[0], finalEndDate],
133
+ duration: finalDuration
134
+ });
135
+ }
136
+ }
137
+ };
138
+ const handleStartDateChange = (date) => {
139
+ if (date && internalValue) {
140
+ const currentEndDate = internalValue.endDate;
141
+ const endTime = {
142
+ hour: currentEndDate.hour(),
143
+ minute: currentEndDate.minute(),
144
+ second: currentEndDate.second(),
145
+ millisecond: currentEndDate.millisecond()
146
+ };
147
+ const targetDuration = Math.min(internalValue.duration, maxDays);
148
+ let newEndDate = date.add(targetDuration, "day");
149
+ const finalEndDate = newEndDate.hour(endTime.hour).minute(endTime.minute).second(endTime.second).millisecond(endTime.millisecond);
150
+ const newValue = {
151
+ startDate: date,
152
+ endDate: finalEndDate,
153
+ duration: targetDuration
154
+ };
155
+ updateValue(newValue);
156
+ form.setFieldsValue({
157
+ endDate: finalEndDate,
158
+ duration: targetDuration
159
+ });
160
+ }
161
+ };
162
+ const handleEndDateChange = (date) => {
163
+ if (date && internalValue) {
164
+ const days = date.diff(internalValue.startDate, "day");
165
+ let finalEndDate = date;
166
+ let finalDuration = days;
167
+ if (days > maxDays) {
168
+ const endTime = {
169
+ hour: date.hour(),
170
+ minute: date.minute(),
171
+ second: date.second(),
172
+ millisecond: date.millisecond()
173
+ };
174
+ finalEndDate = internalValue.startDate.add(maxDays, "day");
175
+ finalEndDate = finalEndDate.hour(endTime.hour).minute(endTime.minute).second(endTime.second).millisecond(endTime.millisecond);
176
+ finalDuration = maxDays;
177
+ }
178
+ if (days > 0) {
179
+ const newValue = {
180
+ startDate: internalValue.startDate,
181
+ endDate: finalEndDate,
182
+ duration: finalDuration
183
+ };
184
+ updateValue(newValue);
185
+ form.setFieldsValue({
186
+ endDate: finalEndDate,
187
+ duration: finalDuration
188
+ });
189
+ }
190
+ }
191
+ };
192
+ const handleDurationChange = (durationValue) => {
193
+ if (internalValue) {
194
+ const newEndDate = internalValue.startDate.add(durationValue, "day");
195
+ const newValue = {
196
+ startDate: internalValue.startDate,
197
+ endDate: newEndDate,
198
+ duration: durationValue
199
+ };
200
+ updateValue(newValue);
201
+ if (separateStartEnd) {
202
+ form.setFieldsValue({ endDate: newEndDate });
203
+ } else {
204
+ form.setFieldsValue({ dateRange: [internalValue.startDate, newEndDate] });
205
+ }
206
+ }
207
+ };
208
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form, layout: "vertical", className: "multi-day-time-select-form" }, separateStartEnd ? /* @__PURE__ */ import_react.default.createElement("div", { className: "multi-day-time-select-row" }, /* @__PURE__ */ import_react.default.createElement(
209
+ import_antd.Form.Item,
210
+ {
211
+ label: startDateLabel || import_utils.locales.getText("pisell2.text.start_date"),
212
+ name: "startDate",
213
+ rules: [{ required: true, message: startDateLabel || import_utils.locales.getText("pisell2.text.start_date") }],
214
+ style: { flex: 1 }
215
+ },
216
+ /* @__PURE__ */ import_react.default.createElement(import_materials.Page, null, /* @__PURE__ */ import_react.default.createElement(
217
+ import_materials.DatePicker,
218
+ {
219
+ inputReadOnly: true,
220
+ allowClear: false,
221
+ size: "large",
222
+ style: { width: "100%", padding: 0 },
223
+ suffixIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CalendarOutlined, null),
224
+ value: internalValue == null ? void 0 : internalValue.startDate,
225
+ onChange: handleStartDateChange,
226
+ format: formatLocale,
227
+ isHideCustomSelect: true,
228
+ disabled
229
+ }
230
+ ))
231
+ ), /* @__PURE__ */ import_react.default.createElement(
232
+ import_antd.Form.Item,
233
+ {
234
+ label: endDateLabel || import_utils.locales.getText("pisell2.text.end_date"),
235
+ name: "endDate",
236
+ rules: [{ required: true, message: endDateLabel || import_utils.locales.getText("pisell2.text.end_date") }],
237
+ style: { flex: 1 }
238
+ },
239
+ /* @__PURE__ */ import_react.default.createElement(import_materials.Page, null, /* @__PURE__ */ import_react.default.createElement(
240
+ import_materials.DatePicker,
241
+ {
242
+ inputReadOnly: true,
243
+ allowClear: false,
244
+ size: "large",
245
+ style: { width: "100%", padding: 0 },
246
+ suffixIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CalendarOutlined, null),
247
+ value: internalValue == null ? void 0 : internalValue.endDate,
248
+ onChange: handleEndDateChange,
249
+ format: formatLocale,
250
+ isHideCustomSelect: true,
251
+ disabled,
252
+ disabledDate: (current) => {
253
+ if (internalValue == null ? void 0 : internalValue.startDate) {
254
+ return current.isSameOrBefore(internalValue.startDate, "day");
255
+ }
256
+ return false;
257
+ }
258
+ }
259
+ ))
260
+ )) : /* @__PURE__ */ import_react.default.createElement("div", { className: "multi-day-time-select-row" }, /* @__PURE__ */ import_react.default.createElement(
261
+ import_antd.Form.Item,
262
+ {
263
+ label: startDateLabel || import_utils.locales.getText("pisell2.text.start_date"),
264
+ name: "dateRange",
265
+ rules: [{ required: true, message: startDateLabel || import_utils.locales.getText("pisell2.text.start_date") }],
266
+ style: { flex: 1 }
267
+ },
268
+ /* @__PURE__ */ import_react.default.createElement(import_materials.Page, null, /* @__PURE__ */ import_react.default.createElement(
269
+ RangePicker,
270
+ {
271
+ inputReadOnly: true,
272
+ allowClear: false,
273
+ size: "large",
274
+ style: { width: "100%", padding: 0 },
275
+ suffixIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CalendarOutlined, null),
276
+ value: internalValue ? [internalValue.startDate, internalValue.endDate] : null,
277
+ onChange: handleDateRangeChange,
278
+ format: formatLocale,
279
+ isHideCustomSelect: true,
280
+ endDateDays: 1,
281
+ disabled
282
+ }
283
+ ))
284
+ )), /* @__PURE__ */ import_react.default.createElement(
285
+ import_antd.Form.Item,
286
+ {
287
+ label: durationLabel || import_utils.locales.getText("pisell2.text.duration"),
288
+ name: "duration",
289
+ rules: [{ required: true, message: durationLabel || import_utils.locales.getText("pisell2.text.duration") }]
290
+ },
291
+ /* @__PURE__ */ import_react.default.createElement(
292
+ import_antd.Select,
293
+ {
294
+ size: "large",
295
+ value: internalValue == null ? void 0 : internalValue.duration,
296
+ onChange: handleDurationChange,
297
+ options: durationOptions,
298
+ disabled
299
+ }
300
+ )
301
+ ));
302
+ });
303
+ MultiDayTimeSelect.displayName = "MultiDayTimeSelect";
304
+ var MultiDayTimeSelect_default = MultiDayTimeSelect;
@@ -0,0 +1,8 @@
1
+ .multi-day-time-select-form {
2
+ margin-top: 12px;
3
+ .multi-day-time-select-row {
4
+ display: flex;
5
+ gap: 16px;
6
+ }
7
+ }
8
+
@@ -0,0 +1,3 @@
1
+ export { default } from './MultiDayTimeSelect';
2
+ export type { MultiDayTimeSelectRef } from './MultiDayTimeSelect';
3
+ export type { MultiDayTimeSelectProps, MultiDayTimeSelectValue } from './types';
@@ -0,0 +1,35 @@
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/pro/multiDayTimeSelect/index.tsx
30
+ var multiDayTimeSelect_exports = {};
31
+ __export(multiDayTimeSelect_exports, {
32
+ default: () => import_MultiDayTimeSelect.default
33
+ });
34
+ module.exports = __toCommonJS(multiDayTimeSelect_exports);
35
+ var import_MultiDayTimeSelect = __toESM(require("./MultiDayTimeSelect"));
@@ -0,0 +1,28 @@
1
+ import { Dayjs } from 'dayjs';
2
+ export interface MultiDayTimeSelectValue {
3
+ startDate: Dayjs;
4
+ endDate: Dayjs;
5
+ duration: number;
6
+ }
7
+ export interface MultiDayTimeSelectProps {
8
+ /** 最大天数,默认30天 */
9
+ maxDays?: number;
10
+ /** 默认开始时间 */
11
+ defaultStartDate?: Dayjs;
12
+ /** 开始时间和结束时间是否分离,false使用RangePicker,true使用两个独立的DatePicker */
13
+ separateStartEnd?: boolean;
14
+ /** 受控值 */
15
+ value?: MultiDayTimeSelectValue;
16
+ /** 值变化回调 */
17
+ onChange?: (value: MultiDayTimeSelectValue) => void;
18
+ /** 语言环境 */
19
+ locale?: string;
20
+ /** 是否禁用 */
21
+ disabled?: boolean;
22
+ /** 开始日期标签 */
23
+ startDateLabel?: string;
24
+ /** 结束日期标签 */
25
+ endDateLabel?: string;
26
+ /** 时长标签 */
27
+ durationLabel?: string;
28
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/pro/multiDayTimeSelect/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
package/package.json CHANGED
@@ -1,12 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.4.71",
4
- "scripts": {
5
- "dev": "father dev",
6
- "build": "father build",
7
- "lowcode:dev": "build-scripts start --config ./build.lowcode.js",
8
- "lowcode:build": " build-scripts build --config ./build.lowcode.js"
9
- },
3
+ "version": "6.4.72",
10
4
  "main": "./lib/index.js",
11
5
  "module": "./es/index.js",
12
6
  "types": "./lib/index.d.ts",
@@ -56,10 +50,6 @@
56
50
  "@dnd-kit/modifiers": "^6.0.1",
57
51
  "@dnd-kit/sortable": "^7.0.2",
58
52
  "@dnd-kit/utilities": "^3.2.1",
59
- "@pisell/date-picker": "workspace:*",
60
- "@pisell/icon": "workspace:*",
61
- "@pisell/materials": "workspace:*",
62
- "@pisell/utils": "workspace:*",
63
53
  "ahooks": "^3.7.6",
64
54
  "antd": "^5.6.3",
65
55
  "classnames": "^2.3.2",
@@ -70,7 +60,11 @@
70
60
  "react-resizable": "^3.0.5",
71
61
  "styled-components": "^6.0.0-rc.3",
72
62
  "@react-spring/web": "^9.6.1",
73
- "@use-gesture/react": "^10.3.1"
63
+ "@use-gesture/react": "^10.3.1",
64
+ "@pisell/date-picker": "3.0.7",
65
+ "@pisell/materials": "6.4.18",
66
+ "@pisell/utils": "3.0.2",
67
+ "@pisell/icon": "0.0.11"
74
68
  },
75
69
  "peerDependencies": {
76
70
  "react": "^18.0.0",
@@ -78,5 +72,11 @@
78
72
  },
79
73
  "componentConfig": {
80
74
  "materialSchema": "https://unpkg.com/@pisell/materials@1.0.1/build/lowcode/assets-prod.json"
75
+ },
76
+ "scripts": {
77
+ "dev": "father dev",
78
+ "build": "father build",
79
+ "lowcode:dev": "build-scripts start --config ./build.lowcode.js",
80
+ "lowcode:build": " build-scripts build --config ./build.lowcode.js"
81
81
  }
82
- }
82
+ }