@pisell/private-materials 6.11.125 → 6.11.126

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.
@@ -0,0 +1,320 @@
1
+ .pisell-booking-change-modal {
2
+ position: fixed;
3
+ inset: 0;
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ padding: 16px;
8
+ background: rgba(0, 0, 0, 0.45);
9
+ backdrop-filter: blur(8px);
10
+ opacity: 0;
11
+ transition: opacity 0.18s ease;
12
+
13
+ &.is-visible {
14
+ opacity: 1;
15
+ }
16
+
17
+ &.is-dark {
18
+ color: #ffffff;
19
+ }
20
+
21
+ &.is-light {
22
+ color: #0f172a;
23
+ }
24
+ }
25
+
26
+ .pisell-booking-change-modal__panel {
27
+ width: 100%;
28
+ max-width: 980px;
29
+ padding: 24px;
30
+ border: 1px solid #3f3f46;
31
+ border-radius: 24px;
32
+ background: #121217;
33
+ box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
34
+ transform: translateY(8px) scale(0.96);
35
+ transition: transform 0.18s ease, opacity 0.18s ease;
36
+ opacity: 0;
37
+ }
38
+
39
+ .pisell-booking-change-modal.is-visible .pisell-booking-change-modal__panel {
40
+ transform: translateY(0) scale(1);
41
+ opacity: 1;
42
+ }
43
+
44
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__panel {
45
+ border-color: #dbe2ea;
46
+ background: #ffffff;
47
+ box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
48
+ }
49
+
50
+ .pisell-booking-change-modal__title {
51
+ font-size: 22px;
52
+ font-weight: 600;
53
+ line-height: 1.3;
54
+ }
55
+
56
+ .pisell-booking-change-modal__description {
57
+ margin-top: 8px;
58
+ font-size: 14px;
59
+ line-height: 1.5;
60
+ color: #a1a1aa;
61
+ }
62
+
63
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__description {
64
+ color: #64748b;
65
+ }
66
+
67
+ .pisell-booking-change-modal__body {
68
+ display: flex;
69
+ flex-direction: column;
70
+ gap: 16px;
71
+ margin-top: 20px;
72
+ }
73
+
74
+ .pisell-booking-change-modal__card {
75
+ padding: 20px;
76
+ border: 1px solid #3f3f46;
77
+ border-radius: 24px;
78
+ background: #171820;
79
+ }
80
+
81
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__card {
82
+ border-color: #dbe2ea;
83
+ background: #f8fafc;
84
+ }
85
+
86
+ .pisell-booking-change-modal__customer {
87
+ display: flex;
88
+ gap: 16px;
89
+ align-items: flex-start;
90
+ justify-content: space-between;
91
+ }
92
+
93
+ .pisell-booking-change-modal__customer-info {
94
+ flex: 1;
95
+ min-width: 0;
96
+ }
97
+
98
+ .pisell-booking-change-modal__section-label {
99
+ font-size: 11px;
100
+ font-weight: 600;
101
+ line-height: 1.4;
102
+ letter-spacing: 0.14em;
103
+ text-transform: uppercase;
104
+ color: #71717a;
105
+ }
106
+
107
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__section-label {
108
+ color: #64748b;
109
+ }
110
+
111
+ .pisell-booking-change-modal__customer-name {
112
+ margin-top: 12px;
113
+ font-size: 20px;
114
+ font-weight: 600;
115
+ line-height: 1.4;
116
+ }
117
+
118
+ .pisell-booking-change-modal__customer-meta {
119
+ margin-top: 8px;
120
+ font-size: 14px;
121
+ line-height: 1.5;
122
+ color: #a1a1aa;
123
+ }
124
+
125
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__customer-meta {
126
+ color: #64748b;
127
+ }
128
+
129
+ .pisell-booking-change-modal__grid {
130
+ display: grid;
131
+ grid-template-columns: repeat(2, minmax(0, 1fr));
132
+ gap: 16px;
133
+ }
134
+
135
+ .pisell-booking-change-modal__field {
136
+ min-width: 0;
137
+ }
138
+
139
+ .pisell-booking-change-modal__field-label {
140
+ display: block;
141
+ margin-bottom: 8px;
142
+ font-size: 14px;
143
+ line-height: 1.5;
144
+ color: #a1a1aa;
145
+ }
146
+
147
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__field-label {
148
+ color: #64748b;
149
+ }
150
+
151
+ .pisell-booking-change-modal__control {
152
+ width: 100%;
153
+ min-height: 56px;
154
+ padding: 16px;
155
+ border: 1px solid #3f3f46;
156
+ border-radius: 18px;
157
+ outline: none;
158
+ background: #171820;
159
+ color: #ffffff;
160
+ transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
161
+
162
+ &:focus {
163
+ border-color: #8b5cf6;
164
+ box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
165
+ }
166
+
167
+ &:disabled {
168
+ cursor: not-allowed;
169
+ opacity: 0.7;
170
+ }
171
+ }
172
+
173
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__control {
174
+ border-color: #cbd5e1;
175
+ background: #ffffff;
176
+ color: #0f172a;
177
+ }
178
+
179
+ .pisell-booking-change-modal__compare-grid {
180
+ display: grid;
181
+ grid-template-columns: repeat(2, minmax(0, 1fr));
182
+ gap: 12px;
183
+ margin-top: 12px;
184
+ }
185
+
186
+ .pisell-booking-change-modal__compare-card {
187
+ padding: 16px;
188
+ border-radius: 18px;
189
+ background: #101117;
190
+ }
191
+
192
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-card {
193
+ background: #ffffff;
194
+ box-shadow: inset 0 0 0 1px #e2e8f0;
195
+ }
196
+
197
+ .pisell-booking-change-modal__compare-card.is-highlighted {
198
+ border: 1px solid rgba(139, 92, 246, 0.35);
199
+ background: rgba(139, 92, 246, 0.1);
200
+ }
201
+
202
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-card.is-highlighted {
203
+ border-color: #c4b5fd;
204
+ background: #f5f3ff;
205
+ }
206
+
207
+ .pisell-booking-change-modal__compare-title {
208
+ font-size: 12px;
209
+ line-height: 1.4;
210
+ color: #c4b5fd;
211
+ }
212
+
213
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-title {
214
+ color: #6d28d9;
215
+ }
216
+
217
+ .pisell-booking-change-modal__compare-value {
218
+ margin-top: 8px;
219
+ font-size: 14px;
220
+ line-height: 1.5;
221
+ color: #d4d4d8;
222
+ }
223
+
224
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-value {
225
+ color: #334155;
226
+ }
227
+
228
+ .pisell-booking-change-modal__error {
229
+ margin-top: 16px;
230
+ padding: 12px 16px;
231
+ border: 1px solid rgba(239, 68, 68, 0.3);
232
+ border-radius: 16px;
233
+ background: rgba(239, 68, 68, 0.1);
234
+ color: #fecaca;
235
+ font-size: 14px;
236
+ line-height: 1.5;
237
+ }
238
+
239
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__error {
240
+ color: #b91c1c;
241
+ background: #fef2f2;
242
+ }
243
+
244
+ .pisell-booking-change-modal__footer {
245
+ display: flex;
246
+ justify-content: flex-end;
247
+ gap: 12px;
248
+ margin-top: 24px;
249
+ }
250
+
251
+ .pisell-booking-change-modal__ghost-button,
252
+ .pisell-booking-change-modal__primary-button {
253
+ display: inline-flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ min-height: 48px;
257
+ padding: 12px 20px;
258
+ border-radius: 16px;
259
+ font-size: 14px;
260
+ font-weight: 600;
261
+ line-height: 1;
262
+ transition: all 0.16s ease;
263
+ }
264
+
265
+ .pisell-booking-change-modal__ghost-button {
266
+ border: 1px solid #3f3f46;
267
+ background: rgba(255, 255, 255, 0.05);
268
+ color: #d4d4d8;
269
+
270
+ &:hover:not(:disabled) {
271
+ background: rgba(255, 255, 255, 0.1);
272
+ }
273
+ }
274
+
275
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__ghost-button {
276
+ border-color: #cbd5e1;
277
+ background: #ffffff;
278
+ color: #334155;
279
+
280
+ &:hover:not(:disabled) {
281
+ background: #f8fafc;
282
+ }
283
+ }
284
+
285
+ .pisell-booking-change-modal__primary-button {
286
+ border: none;
287
+ background: #7c3aed;
288
+ color: #ffffff;
289
+
290
+ &:hover:not(:disabled) {
291
+ background: #8b5cf6;
292
+ }
293
+
294
+ &:disabled {
295
+ cursor: not-allowed;
296
+ background: #3f3f46;
297
+ color: #a1a1aa;
298
+ }
299
+ }
300
+
301
+ @media (max-width: 768px) {
302
+ .pisell-booking-change-modal__panel {
303
+ padding: 20px;
304
+ }
305
+
306
+ .pisell-booking-change-modal__grid,
307
+ .pisell-booking-change-modal__compare-grid {
308
+ grid-template-columns: minmax(0, 1fr);
309
+ }
310
+
311
+ .pisell-booking-change-modal__customer,
312
+ .pisell-booking-change-modal__footer {
313
+ flex-direction: column;
314
+ }
315
+
316
+ .pisell-booking-change-modal__ghost-button,
317
+ .pisell-booking-change-modal__primary-button {
318
+ width: 100%;
319
+ }
320
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.125",
3
+ "version": "6.11.126",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -68,7 +68,7 @@
68
68
  "react-resizable": "^3.0.5",
69
69
  "styled-components": "^6.0.0-rc.3",
70
70
  "@pisell/utils": "3.0.2",
71
- "@pisell/materials": "6.11.35",
71
+ "@pisell/materials": "6.11.36",
72
72
  "@pisell/icon": "0.0.11",
73
73
  "@pisell/date-picker": "3.0.8"
74
74
  },
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import 'dayjs/locale/zh-cn';
3
- import 'dayjs/locale/en';
4
- import 'dayjs/locale/zh-tw';
5
- import type { PisellReservationProps } from './types';
6
- import './PisellReservation.less';
7
- /**
8
- * 预约看板 Core:内置 Sales 预约列表 + 时间轴 + 平面图。
9
- * 页面壳 {@link PisellReservationBookingPage} / {@link PisellVenueControlPage} 通过 props 组合默认行为。
10
- */
11
- export declare const PisellReservationCore: React.FC<PisellReservationProps>;
@@ -1,51 +0,0 @@
1
- import { type Dayjs } from 'dayjs';
2
- /** 避免 `?? []` 每次 render 新数组引用,触发依赖 list 的 effect 死循环 */
3
- export declare const EMPTY_RESERVATION_LIST: unknown[];
4
- /** 营业日锚定:当日 02:00 — 次日 02:00(与时间轴默认一致) */
5
- export declare function bookingTimeWindowForAnchorDay(anchorDay: Dayjs): [Dayjs, Dayjs];
6
- /**
7
- * 日历跨日视口:从 rangeStart 所在自然日 02:00 到 rangeEnd 的次日 02:00(与单日营业窗首尾相接)。
8
- */
9
- export declare function bookingTimeWindowForCalendarRange(rangeStart: Date, rangeEnd: Date): [Dayjs, Dayjs];
10
- /**
11
- * 表格视图初始筛选项:与 Sales Monitor 一致——支付态 + **今日营业日窗口**(`bookingTimeWindowForAnchorDay`)。
12
- * 用户可在 QuickFilter 改日期;平面图仍用独立的 `floorDayBookingData` 与顶栏日程对齐。
13
- */
14
- export declare function getGridTableBookingSearchParams(): Record<string, unknown>;
15
- export interface UsePisellReservationBookingDataOptions {
16
- /** 列表单页条数;平面图按日合并台位时宜用大页 */
17
- listPageSize?: number;
18
- /** 初始筛选项;不传则与 Sales Monitor 一致(含当前营业日预约窗口) */
19
- getInitialSearchParams?: () => Record<string, unknown>;
20
- /**
21
- * 合并进每次请求的扁平参数(在 `filter.values` 展开之后),如平面图
22
- * `form_record_ids: number[]` 按当前资源桌筛选预约。
23
- */
24
- extraRequestParams?: Record<string, unknown>;
25
- /**
26
- * 是否启用列表 WebSocket 推送并用 `mutate` 覆盖当前数据(`osServer` + `subscriberId`)。
27
- * 表格全量/分页必须与接口 HTTP 结果一致,应设为 `false`:推送常为平面图子集(如仅绑定桌),
28
- * 会覆盖刚返回的整页列表,表现为「请求 50 条只显示几条且像平面图资源」。
29
- * 平面图合并用 booking 请求可保持默认 `true`。
30
- */
31
- subscribeRealtimePush?: boolean;
32
- }
33
- /** 内置列表数据 hook 返回结构(booking / resource 页共用) */
34
- export interface UsePisellReservationBookingDataResult {
35
- data: unknown[];
36
- loading: boolean;
37
- total: number;
38
- pagination: {
39
- pageNumber: number;
40
- pageSize: number;
41
- };
42
- onPageChange: (pageNumber: number, pageSize: number) => void;
43
- searchParams: Record<string, unknown>;
44
- onSearch: (params: Record<string, unknown>) => void;
45
- onReset: () => void;
46
- refresh: () => void;
47
- refreshAsync: () => Promise<unknown>;
48
- /** 函数式合并 searchParams 并重置到第一页(用于日程变更) */
49
- patchSearchParams: (updater: (prev: Record<string, unknown>) => Record<string, unknown>) => void;
50
- }
51
- export declare function usePisellReservationBookingData(enabled: boolean, options?: UsePisellReservationBookingDataOptions): UsePisellReservationBookingDataResult;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import 'dayjs/locale/zh-cn';
3
- import 'dayjs/locale/en';
4
- import 'dayjs/locale/zh-tw';
5
- import type { PisellReservationProps } from './types';
6
- import './PisellReservation.less';
7
- /**
8
- * 预约看板 Core:内置 Sales 预约列表 + 时间轴 + 平面图。
9
- * 页面壳 {@link PisellReservationBookingPage} / {@link PisellVenueControlPage} 通过 props 组合默认行为。
10
- */
11
- export declare const PisellReservationCore: React.FC<PisellReservationProps>;
@@ -1,51 +0,0 @@
1
- import { type Dayjs } from 'dayjs';
2
- /** 避免 `?? []` 每次 render 新数组引用,触发依赖 list 的 effect 死循环 */
3
- export declare const EMPTY_RESERVATION_LIST: unknown[];
4
- /** 营业日锚定:当日 02:00 — 次日 02:00(与时间轴默认一致) */
5
- export declare function bookingTimeWindowForAnchorDay(anchorDay: Dayjs): [Dayjs, Dayjs];
6
- /**
7
- * 日历跨日视口:从 rangeStart 所在自然日 02:00 到 rangeEnd 的次日 02:00(与单日营业窗首尾相接)。
8
- */
9
- export declare function bookingTimeWindowForCalendarRange(rangeStart: Date, rangeEnd: Date): [Dayjs, Dayjs];
10
- /**
11
- * 表格视图初始筛选项:与 Sales Monitor 一致——支付态 + **今日营业日窗口**(`bookingTimeWindowForAnchorDay`)。
12
- * 用户可在 QuickFilter 改日期;平面图仍用独立的 `floorDayBookingData` 与顶栏日程对齐。
13
- */
14
- export declare function getGridTableBookingSearchParams(): Record<string, unknown>;
15
- export interface UsePisellReservationBookingDataOptions {
16
- /** 列表单页条数;平面图按日合并台位时宜用大页 */
17
- listPageSize?: number;
18
- /** 初始筛选项;不传则与 Sales Monitor 一致(含当前营业日预约窗口) */
19
- getInitialSearchParams?: () => Record<string, unknown>;
20
- /**
21
- * 合并进每次请求的扁平参数(在 `filter.values` 展开之后),如平面图
22
- * `form_record_ids: number[]` 按当前资源桌筛选预约。
23
- */
24
- extraRequestParams?: Record<string, unknown>;
25
- /**
26
- * 是否启用列表 WebSocket 推送并用 `mutate` 覆盖当前数据(`osServer` + `subscriberId`)。
27
- * 表格全量/分页必须与接口 HTTP 结果一致,应设为 `false`:推送常为平面图子集(如仅绑定桌),
28
- * 会覆盖刚返回的整页列表,表现为「请求 50 条只显示几条且像平面图资源」。
29
- * 平面图合并用 booking 请求可保持默认 `true`。
30
- */
31
- subscribeRealtimePush?: boolean;
32
- }
33
- /** 内置列表数据 hook 返回结构(booking / resource 页共用) */
34
- export interface UsePisellReservationBookingDataResult {
35
- data: unknown[];
36
- loading: boolean;
37
- total: number;
38
- pagination: {
39
- pageNumber: number;
40
- pageSize: number;
41
- };
42
- onPageChange: (pageNumber: number, pageSize: number) => void;
43
- searchParams: Record<string, unknown>;
44
- onSearch: (params: Record<string, unknown>) => void;
45
- onReset: () => void;
46
- refresh: () => void;
47
- refreshAsync: () => Promise<unknown>;
48
- /** 函数式合并 searchParams 并重置到第一页(用于日程变更) */
49
- patchSearchParams: (updater: (prev: Record<string, unknown>) => Record<string, unknown>) => void;
50
- }
51
- export declare function usePisellReservationBookingData(enabled: boolean, options?: UsePisellReservationBookingDataOptions): UsePisellReservationBookingDataResult;