@pisell/private-materials 6.3.131 → 6.3.132

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 (75) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +6 -6
  6. package/build/lowcode/view.js +6 -6
  7. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  8. package/es/components/booking/info/service2/utils.d.ts +1 -1
  9. package/es/components/booking/utils.d.ts +2 -2
  10. package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +1 -1
  11. package/es/components/eftposPay/amount.d.ts +1 -1
  12. package/es/components/eftposPay/device.d.ts +1 -1
  13. package/es/components/eftposPay/hooks.d.ts +2 -2
  14. package/es/components/eftposPay/store/index.d.ts +5 -5
  15. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  16. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  17. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  18. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  19. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  20. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  21. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  22. package/es/components/venueBooking/components/Cart/index.js +7 -7
  23. package/es/components/venueBooking/components/Checkout/index.js +2 -12
  24. package/es/components/venueBooking/components/Content/index.js +8 -7
  25. package/es/components/venueBooking/components/Footer/index.js +2 -8
  26. package/es/components/venueBooking/components/Header/index.js +37 -16
  27. package/es/components/venueBooking/components/VenueSelection/components/TimeGrid.js +52 -8
  28. package/es/components/venueBooking/components/VenueSelection/index.js +1 -5
  29. package/es/components/venueBooking/context.js +46 -24
  30. package/es/components/venueBooking/hooks.d.ts +1 -0
  31. package/es/components/venueBooking/hooks.js +8 -2
  32. package/es/components/venueBooking/index.js +30 -2
  33. package/es/components/venueBooking/locales.d.ts +15 -0
  34. package/es/components/venueBooking/locales.js +20 -5
  35. package/es/components/venueBooking/utils.d.ts +8 -0
  36. package/es/components/venueBooking/utils.js +12 -2
  37. package/es/hooks/usePaymentLogger.d.ts +1 -0
  38. package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
  39. package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
  40. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  41. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  42. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  43. package/lib/components/booking/utils.d.ts +2 -2
  44. package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +1 -1
  45. package/lib/components/eftposPay/amount.d.ts +1 -1
  46. package/lib/components/eftposPay/device.d.ts +1 -1
  47. package/lib/components/eftposPay/hooks.d.ts +2 -2
  48. package/lib/components/eftposPay/store/index.d.ts +5 -5
  49. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  50. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  51. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  52. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  53. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  54. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  55. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  56. package/lib/components/venueBooking/components/Cart/index.js +3 -8
  57. package/lib/components/venueBooking/components/Checkout/index.js +1 -5
  58. package/lib/components/venueBooking/components/Content/index.js +20 -15
  59. package/lib/components/venueBooking/components/Footer/index.js +1 -9
  60. package/lib/components/venueBooking/components/Header/index.js +11 -5
  61. package/lib/components/venueBooking/components/VenueSelection/components/TimeGrid.js +21 -3
  62. package/lib/components/venueBooking/components/VenueSelection/index.js +1 -2
  63. package/lib/components/venueBooking/context.js +32 -20
  64. package/lib/components/venueBooking/hooks.d.ts +1 -0
  65. package/lib/components/venueBooking/hooks.js +6 -1
  66. package/lib/components/venueBooking/index.js +19 -1
  67. package/lib/components/venueBooking/locales.d.ts +15 -0
  68. package/lib/components/venueBooking/locales.js +20 -5
  69. package/lib/components/venueBooking/utils.d.ts +8 -0
  70. package/lib/components/venueBooking/utils.js +3 -2
  71. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  72. package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
  73. package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
  74. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  75. package/package.json +18 -18
@@ -16,6 +16,14 @@ export declare function pad(n: number): string;
16
16
  export declare function timeToMinutes(time: string): number;
17
17
  export declare function minutesToTime(minutes: number): string;
18
18
  export declare function isHourBoundary(slot: string): boolean;
19
+ /**
20
+ * 格式化小时列头
21
+ * 使用 i18n 模板 `pisell2.venue.time.hour.format`,支持 {suffix} / {hour} 两个占位符
22
+ * - en / pt: "{hour}{suffix}" → "6pm"
23
+ * - zh-CN / zh-TW: "{suffix}{hour}点/點" → "下午6点"
24
+ * - ja: "{suffix}{hour}時" → "午後6時"
25
+ * 未命中模板时回退到 "{hour}{suffix}" 兼容旧行为
26
+ */
19
27
  export declare function formatHourHeader(slot: string): string;
20
28
  /** 从 timeLabels 中提取整点小时(用于表头合并列) */
21
29
  export declare function buildHourGroups(timeLabels: string[]): string[];
@@ -118,9 +118,10 @@ function isHourBoundary(slot) {
118
118
  }
119
119
  function formatHourHeader(slot) {
120
120
  const [hour] = slot.split(":").map(Number);
121
- const suffix = hour >= 12 ? import_utils.locales.getText("pisell2.venue.time.pm") || "下午" : import_utils.locales.getText("pisell2.venue.time.am") || "上午";
121
+ const suffix = hour >= 12 ? import_utils.locales.getText("pisell2.venue.time.pm") || "pm" : import_utils.locales.getText("pisell2.venue.time.am") || "am";
122
122
  const hour12 = hour % 12 === 0 ? 12 : hour % 12;
123
- return `${hour12}${suffix}`;
123
+ const template = import_utils.locales.getText("pisell2.venue.time.hour.format") || "{hour}{suffix}";
124
+ return template.replace("{hour}", String(hour12)).replace("{suffix}", suffix);
124
125
  }
125
126
  function buildHourGroups(timeLabels) {
126
127
  return timeLabels.filter((slot) => slot.endsWith(":00"));
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface LogData {
2
3
  key: string;
3
4
  value: any;
@@ -20,7 +20,7 @@ export declare const getFilterButtonList: () => ({
20
20
  }[];
21
21
  minInputNumberProps?: undefined;
22
22
  maxInputNumberProps?: undefined;
23
- readonly component?: undefined;
23
+ component?: undefined;
24
24
  isSearchServer?: undefined;
25
25
  showSearch?: undefined;
26
26
  showTime?: undefined;
@@ -46,7 +46,7 @@ export declare const getFilterButtonList: () => ({
46
46
  mode?: undefined;
47
47
  maxTagCount?: undefined;
48
48
  options?: undefined;
49
- readonly component?: undefined;
49
+ component?: undefined;
50
50
  isSearchServer?: undefined;
51
51
  showSearch?: undefined;
52
52
  showTime?: undefined;
@@ -91,7 +91,7 @@ export declare const getFilterButtonList: () => ({
91
91
  options: () => Promise<any>;
92
92
  minInputNumberProps?: undefined;
93
93
  maxInputNumberProps?: undefined;
94
- readonly component?: undefined;
94
+ component?: undefined;
95
95
  isSearchServer?: undefined;
96
96
  showSearch?: undefined;
97
97
  showTime?: undefined;
@@ -111,7 +111,7 @@ export declare const getFilterButtonList: () => ({
111
111
  options?: undefined;
112
112
  minInputNumberProps?: undefined;
113
113
  maxInputNumberProps?: undefined;
114
- readonly component?: undefined;
114
+ component?: undefined;
115
115
  isSearchServer?: undefined;
116
116
  showSearch?: undefined;
117
117
  showTime?: undefined;
@@ -133,7 +133,7 @@ export declare const getFilterButtonList: () => ({
133
133
  maxTagCount?: undefined;
134
134
  minInputNumberProps?: undefined;
135
135
  maxInputNumberProps?: undefined;
136
- readonly component?: undefined;
136
+ component?: undefined;
137
137
  showTime?: undefined;
138
138
  };
139
139
  sort?: undefined;
@@ -152,7 +152,7 @@ export declare const getFilterButtonList: () => ({
152
152
  options?: undefined;
153
153
  minInputNumberProps?: undefined;
154
154
  maxInputNumberProps?: undefined;
155
- readonly component?: undefined;
155
+ component?: undefined;
156
156
  isSearchServer?: undefined;
157
157
  showSearch?: undefined;
158
158
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface UseSalesGridDataParams {
2
3
  perspective: 'monitor' | 'handle';
3
4
  extParams?: {
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
3
3
  value?: string;
4
4
  onChange?: (val: string) => void;
5
5
  }
6
- export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
6
+ export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
7
7
  declare const ImageUpload: React.FC<ImageUploadProps>;
8
8
  export default ImageUpload;
package/package.json CHANGED
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.3.131",
3
+ "version": "6.3.132",
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
+ "test": "vitest",
10
+ "test:run": "vitest run",
11
+ "test:coverage": "vitest run --coverage",
12
+ "test:ui": "vitest --ui",
13
+ "storybook": "storybook dev -p 6006",
14
+ "build-storybook": "storybook build"
15
+ },
4
16
  "main": "./lib/index.js",
5
17
  "module": "./es/index.js",
6
18
  "types": "./lib/index.d.ts",
@@ -61,6 +73,10 @@
61
73
  ],
62
74
  "dependencies": {
63
75
  "antd": "5.10.1",
76
+ "@pisell/utils": "workspace:*",
77
+ "@pisell/materials": "workspace:*",
78
+ "@pisell/icon": "workspace:*",
79
+ "@pisell/date-picker": "workspace:*",
64
80
  "@ant-design/icons": "^5.6.1",
65
81
  "@dnd-kit/core": "^6.0.8",
66
82
  "@dnd-kit/modifiers": "^6.0.1",
@@ -75,11 +91,7 @@
75
91
  "rc-virtual-list": "^3.11.3",
76
92
  "react-infinite-scroll-component": "^6.1.0",
77
93
  "react-resizable": "^3.0.5",
78
- "styled-components": "^6.0.0-rc.3",
79
- "@pisell/utils": "3.0.5",
80
- "@pisell/icon": "0.0.11",
81
- "@pisell/date-picker": "3.0.8",
82
- "@pisell/materials": "6.3.34"
94
+ "styled-components": "^6.0.0-rc.3"
83
95
  },
84
96
  "peerDependencies": {
85
97
  "react": "^18.0.0",
@@ -87,17 +99,5 @@
87
99
  },
88
100
  "componentConfig": {
89
101
  "materialSchema": "https://unpkg.com/@pisell/materials@1.0.1/build/lowcode/assets-prod.json"
90
- },
91
- "scripts": {
92
- "dev": "father dev",
93
- "build": "father build",
94
- "lowcode:dev": "build-scripts start --config ./build.lowcode.js",
95
- "lowcode:build": " build-scripts build --config ./build.lowcode.js",
96
- "test": "vitest",
97
- "test:run": "vitest run",
98
- "test:coverage": "vitest run --coverage",
99
- "test:ui": "vitest --ui",
100
- "storybook": "storybook dev -p 6006",
101
- "build-storybook": "storybook build"
102
102
  }
103
103
  }