@pisell/private-materials 6.3.93 → 6.3.95

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 (136) 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 +2 -2
  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 +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  12. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  13. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  14. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  15. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  16. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  17. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  18. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  19. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  20. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  21. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +1 -3
  22. package/es/components/schedules/model.d.ts +1 -9
  23. package/es/hooks/useThemeTokens.d.ts +7 -0
  24. package/es/hooks/useThemeTokens.js +20 -0
  25. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  26. package/es/plus/skuOptionsSelection/components/NormalCard/index.js +3 -1
  27. package/es/plus/skuOptionsSelection/components/OptionsCard/index.js +3 -2
  28. package/es/plus/skuOptionsSelection/store/store.js +2 -1
  29. package/es/plus/skuOptionsSelection/types.d.ts +14 -0
  30. package/es/plus/skuOptionsSelection/types.js +4 -0
  31. package/es/plus/skuOptionsSelection/utils/transformBundleGroup.js +10 -1
  32. package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +10 -1
  33. package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +8 -2
  34. package/es/pro/Cards/components/SKUCard/index.d.ts +2 -56
  35. package/es/pro/Cards/components/SKUCard/index.js +51 -20
  36. package/es/pro/Cards/components/SKUCard/index.less +23 -2
  37. package/es/pro/Cards/components/SKUCard/locales.d.ts +12 -0
  38. package/es/pro/Cards/components/SKUCard/locales.js +11 -0
  39. package/es/pro/Cards/components/SKUCard/types.d.ts +73 -0
  40. package/es/pro/Cards/components/SKUCard/types.js +1 -0
  41. package/es/pro/NumericStepper/index.d.ts +5 -0
  42. package/es/pro/NumericStepper/index.js +8 -2
  43. package/es/pro/NumericStepper/index.less +1 -9
  44. package/es/pro/Selector/BatchSelectorDemo.js +2 -12
  45. package/es/pro/Selector/Selector.js +6 -4
  46. package/es/pro/Selector/SelectorGroup.d.ts +1 -1
  47. package/es/pro/Selector/SelectorGroup.js +5 -1
  48. package/es/pro/Selector/components/Card/index.js +9 -7
  49. package/es/pro/Selector/components/Card/index.less +24 -15
  50. package/es/pro/Selector/components/Indicator/index.js +1 -1
  51. package/es/pro/Selector/components/Indicator/index.less +12 -12
  52. package/es/pro/Selector/components/Media/index.d.ts +1 -1
  53. package/es/pro/Selector/components/Media/index.less +1 -1
  54. package/es/pro/Selector/selectorGroup.less +9 -1
  55. package/es/pro/Selector/types.d.ts +10 -0
  56. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  57. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  58. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  59. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  60. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  61. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  62. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  63. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  64. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  65. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  66. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +1 -3
  67. package/lib/components/schedules/model.d.ts +1 -9
  68. package/lib/hooks/useThemeTokens.d.ts +7 -0
  69. package/lib/hooks/useThemeTokens.js +40 -0
  70. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  71. package/lib/plus/skuOptionsSelection/components/NormalCard/index.js +8 -6
  72. package/lib/plus/skuOptionsSelection/components/OptionsCard/index.js +3 -2
  73. package/lib/plus/skuOptionsSelection/store/store.js +2 -1
  74. package/lib/plus/skuOptionsSelection/types.d.ts +14 -0
  75. package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.js +15 -9
  76. package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +9 -6
  77. package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +8 -7
  78. package/lib/pro/Cards/components/SKUCard/index.d.ts +2 -56
  79. package/lib/pro/Cards/components/SKUCard/index.js +60 -15
  80. package/lib/pro/Cards/components/SKUCard/index.less +23 -2
  81. package/lib/pro/Cards/components/SKUCard/locales.d.ts +12 -0
  82. package/lib/pro/Cards/components/SKUCard/locales.js +35 -0
  83. package/lib/pro/Cards/components/SKUCard/types.d.ts +73 -0
  84. package/lib/pro/Cards/components/SKUCard/types.js +17 -0
  85. package/lib/pro/NumericStepper/index.d.ts +5 -0
  86. package/lib/pro/NumericStepper/index.js +11 -3
  87. package/lib/pro/NumericStepper/index.less +1 -9
  88. package/lib/pro/Selector/BatchSelectorDemo.js +13 -19
  89. package/lib/pro/Selector/Selector.js +7 -1
  90. package/lib/pro/Selector/SelectorGroup.d.ts +1 -1
  91. package/lib/pro/Selector/SelectorGroup.js +7 -1
  92. package/lib/pro/Selector/components/Card/index.js +10 -7
  93. package/lib/pro/Selector/components/Card/index.less +24 -15
  94. package/lib/pro/Selector/components/Indicator/index.js +1 -1
  95. package/lib/pro/Selector/components/Indicator/index.less +12 -12
  96. package/lib/pro/Selector/components/Media/index.d.ts +1 -1
  97. package/lib/pro/Selector/components/Media/index.js +7 -4
  98. package/lib/pro/Selector/components/Media/index.less +1 -1
  99. package/lib/pro/Selector/selectorGroup.less +9 -1
  100. package/lib/pro/Selector/types.d.ts +10 -0
  101. package/lowcode/eco-cup-list/meta.ts +1 -1
  102. package/lowcode/eco-customer-list/meta.ts +1 -1
  103. package/lowcode/selector/meta.ts +15 -2
  104. package/lowcode/selector.group/meta.ts +15 -2
  105. package/lowcode/sku-options-selection/meta.ts +106 -2
  106. package/package.json +2 -2
  107. package/es/components/Sales/Summary/utils.d.ts +0 -58
  108. package/es/components/booking/components/voucher/utils.d.ts +0 -4
  109. package/es/components/booking/editBookingModal/utils.d.ts +0 -12
  110. package/es/components/ecocup/components/CupInfoCard/index.d.ts +0 -8
  111. package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +0 -5
  112. package/es/components/ecocup/components/CustomerCard/index.d.ts +0 -7
  113. package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +0 -32
  114. package/es/components/ecocup/cupProject/const.d.ts +0 -7
  115. package/es/components/eftpos/const.d.ts +0 -64
  116. package/es/components/eftpos/device.d.ts +0 -9
  117. package/es/components/eftpos/hooks.d.ts +0 -34
  118. package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
  119. package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
  120. package/es/pro/Login2.0/components/PhoneInput.d.ts +0 -53
  121. package/es/test/setup.d.ts +0 -1
  122. package/lib/components/Sales/Summary/utils.d.ts +0 -58
  123. package/lib/components/booking/components/voucher/utils.d.ts +0 -4
  124. package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
  125. package/lib/components/ecocup/components/CupInfoCard/index.d.ts +0 -8
  126. package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +0 -5
  127. package/lib/components/ecocup/components/CustomerCard/index.d.ts +0 -7
  128. package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +0 -32
  129. package/lib/components/ecocup/cupProject/const.d.ts +0 -7
  130. package/lib/components/eftpos/const.d.ts +0 -64
  131. package/lib/components/eftpos/device.d.ts +0 -9
  132. package/lib/components/eftpos/hooks.d.ts +0 -34
  133. package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
  134. package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
  135. package/lib/pro/Login2.0/components/PhoneInput.d.ts +0 -53
  136. package/lib/test/setup.d.ts +0 -1
@@ -275,7 +275,8 @@ const LoginMeta: ComponentMetadata = {
275
275
  },
276
276
  setter: 'NumberSetter',
277
277
  defaultValue: 2,
278
- description: '设置文本最大展示行数,超出部分省略,默认2行',
278
+ description:
279
+ '设置文本最大展示行数,超出部分省略,默认2行',
279
280
  },
280
281
  ],
281
282
  },
@@ -447,6 +448,102 @@ const LoginMeta: ComponentMetadata = {
447
448
  },
448
449
  },
449
450
  },
451
+ /**
452
+ * Disabled文本配置
453
+ */
454
+ {
455
+ name: 'disabledText',
456
+ title: {
457
+ label: {
458
+ type: 'i18n',
459
+ 'en-US': 'Disabled Text Config',
460
+ 'zh-CN': 'Disabled文本配置',
461
+ },
462
+ },
463
+ setter: {
464
+ componentName: 'ObjectSetter',
465
+ props: {
466
+ config: {
467
+ items: [
468
+ {
469
+ name: 'visible',
470
+ title: {
471
+ label: {
472
+ type: 'i18n',
473
+ 'en-US': 'Visible',
474
+ 'zh-CN': '是否显示',
475
+ },
476
+ },
477
+ setter: 'BoolSetter',
478
+ },
479
+ {
480
+ name: 'text',
481
+ title: {
482
+ label: {
483
+ type: 'i18n',
484
+ 'en-US': 'Text',
485
+ 'zh-CN': '文本',
486
+ },
487
+ },
488
+ setter: {
489
+ componentName: 'PisellI18nSetter',
490
+ },
491
+ },
492
+ {
493
+ name: 'fontSize',
494
+ title: {
495
+ label: {
496
+ type: 'i18n',
497
+ 'en-US': 'Font Size',
498
+ 'zh-CN': '字体大小',
499
+ },
500
+ },
501
+ setter: 'NumberSetter',
502
+ },
503
+ {
504
+ name: 'color',
505
+ title: {
506
+ label: {
507
+ type: 'i18n',
508
+ 'en-US': 'Color',
509
+ 'zh-CN': '颜色',
510
+ },
511
+ },
512
+ setter: 'ColorSetter',
513
+ },
514
+ {
515
+ name: 'fontWeight',
516
+ title: {
517
+ label: {
518
+ type: 'i18n',
519
+ 'en-US': 'Font Weight',
520
+ 'zh-CN': '字体粗细',
521
+ },
522
+ },
523
+ setter: {
524
+ componentName: 'SelectSetter',
525
+ props: {
526
+ options: [
527
+ { title: '正常', value: 'normal' },
528
+ { title: '粗体', value: 'bold' },
529
+ { title: '100', value: 100 },
530
+ { title: '200', value: 200 },
531
+ { title: '300', value: 300 },
532
+ { title: '400', value: 400 },
533
+ { title: '500', value: 500 },
534
+ { title: '600', value: 600 },
535
+ { title: '700', value: 700 },
536
+ { title: '800', value: 800 },
537
+ { title: '900', value: 900 },
538
+ ],
539
+ },
540
+ },
541
+ },
542
+ ],
543
+ },
544
+ },
545
+ },
546
+ },
450
547
  ],
451
548
  },
452
549
  },
@@ -476,7 +573,7 @@ const snippets: Snippet[] = [
476
573
  dataSource: defaultDataSource,
477
574
  value: {},
478
575
  config: {
479
- checkStock: true,
576
+ overSold: false,
480
577
  },
481
578
  customScrollParent: '',
482
579
  customConfig: {
@@ -497,6 +594,13 @@ const snippets: Snippet[] = [
497
594
  image: {
498
595
  visible: true,
499
596
  },
597
+ disabledText: {
598
+ visible: true,
599
+ text: '',
600
+ fontSize: 16,
601
+ color: '#000000',
602
+ fontWeight: 700,
603
+ },
500
604
  },
501
605
  },
502
606
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.3.93",
3
+ "version": "6.3.95",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -77,8 +77,8 @@
77
77
  "react-resizable": "^3.0.5",
78
78
  "styled-components": "^6.0.0-rc.3",
79
79
  "@pisell/utils": "3.0.5",
80
- "@pisell/materials": "6.3.25",
81
80
  "@pisell/icon": "0.0.11",
81
+ "@pisell/materials": "6.3.26",
82
82
  "@pisell/date-picker": "3.0.8"
83
83
  },
84
84
  "peerDependencies": {
@@ -1,58 +0,0 @@
1
- interface CartItem {
2
- price: number | string;
3
- quantity?: number;
4
- [k: string]: any;
5
- }
6
- interface PriceDetail {
7
- subtotal: string;
8
- total: string;
9
- taxTitle?: string;
10
- totalTaxFee?: string;
11
- isPriceIncludeTax?: 0 | 1;
12
- taxRate?: number;
13
- surcharge?: any;
14
- deposit?: {
15
- total: string;
16
- protocols: any[];
17
- hasDeposit: boolean;
18
- };
19
- }
20
- /**
21
- * 计算商品小计(不含其他费用)
22
- * @param items - 购物车商品数组
23
- * @returns 商品总价字符串,保留2位小数
24
- */
25
- export declare const calculateSubtotal: (items: CartItem[]) => string;
26
- /**
27
- * @description: 将购物车数据格式化成summaryModule需要的格式
28
- * @param {any} items 购物车数据
29
- * @return {*}
30
- */
31
- export declare const formatCartsToSummaryModule: (items: any[]) => any[];
32
- /**
33
- * @title: 单个商品的税费
34
- * @description:
35
- * 单个商品的税费 = 商品销售单价(折扣后) * 税率 * is_charge_tax /( 1+ 税率 * is_price_include_tax)
36
- * $taxFee = $price * $taxRate * $isChargeTax / (1 + $taxRate * $isPriceIncludeTax);
37
- * @return {*}
38
- * @Author: xiangfeng.xue
39
- */
40
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[], summaryModule: any) => any;
41
- /**
42
- * 计算所有价格明细
43
- * @param items - 购物车商品数组
44
- * @param options - 其他费用配置
45
- * @returns 价格明细对象
46
- */
47
- export declare const calculatePriceDetails: (shopInfo: any, items: CartItem[], summaryModule: any) => PriceDetail;
48
- /**
49
- * @title: 计算定金
50
- * @param items - 购物车商品数组
51
- * @returns 定金字符串,保留2位小数
52
- */
53
- export declare const calculateDeposit: (items: CartItem[]) => {
54
- total: string;
55
- protocols: any[];
56
- hasDeposit: never;
57
- } | undefined;
58
- export {};
@@ -1,4 +0,0 @@
1
- export declare const getServiceAddons: (list: any[]) => {
2
- serviceList: any[];
3
- addonsList: any[];
4
- };
@@ -1,12 +0,0 @@
1
- export interface ResourceItem {
2
- [key: string]: any;
3
- }
4
- /**
5
- * @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
6
- * @description:
7
- * @param {object} resource
8
- * @return {*}
9
- * @Author: jinglin.tan
10
- */
11
- export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
12
- export declare const formatValues: (data: any, values: any) => any;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IProps {
4
- type: 'rentInfo' | 'markInfo' | 'belongInfo';
5
- data: Record<string, any>;
6
- }
7
- declare const CupInfoCard: (props: IProps) => React.JSX.Element;
8
- export default CupInfoCard;
@@ -1,5 +0,0 @@
1
- import { ECupActionType } from '../../types';
2
- export declare const useCupAction: () => {
3
- run: (this: unknown, cupId: string, action: ECupActionType) => Promise<boolean>;
4
- loading: boolean;
5
- };
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- import { ICustomer } from '../../types';
4
- interface IProps extends ICustomer {
5
- }
6
- declare const CustomerCard: (props: IProps) => React.JSX.Element | null;
7
- export default CustomerCard;
@@ -1,32 +0,0 @@
1
- interface GetCupListsParams {
2
- type?: 'partner' | 'eco';
3
- with?: string[];
4
- skip?: number;
5
- num?: number;
6
- search?: string;
7
- operated_at_start?: string;
8
- operated_at_end?: string;
9
- order_by?: string;
10
- sort?: 'asc' | 'desc';
11
- partner_shop_id?: number;
12
- }
13
- interface GetStatisticsParams {
14
- started_at?: string;
15
- ended_at?: string;
16
- type?: 'eco' | 'normal';
17
- partner_shop_id?: number;
18
- }
19
- export declare const useCupListsApi: () => {
20
- loading: boolean;
21
- data: any;
22
- run: (params: GetCupListsParams) => Promise<void>;
23
- };
24
- export declare const useStatisticsApi: () => {
25
- data: any;
26
- getStatics: (params: GetStatisticsParams) => Promise<void>;
27
- };
28
- export declare const useEcoShopListsApi: () => {
29
- data: any;
30
- getEcoShopLists: (params?: any) => Promise<void>;
31
- };
32
- export {};
@@ -1,7 +0,0 @@
1
- export declare const CUP_PROJECT_FOOTER_BUTTONS: {
2
- key: string;
3
- icon: string;
4
- type: string;
5
- size: string;
6
- languageKey: string;
7
- }[];
@@ -1,64 +0,0 @@
1
- export declare enum Eftpos {
2
- Payo = "payo",
3
- Tyro = "tyro",
4
- Windcave = "windcave",
5
- Stripe = "stripe"
6
- }
7
- export declare enum DeviceEnum {
8
- /** 新增 */
9
- Add = "add",
10
- /** 编辑 */
11
- Edit = "edit",
12
- /** 重新链接 */
13
- Repair = "repair"
14
- }
15
- export declare type DeviceStatus = `${DeviceEnum}`;
16
- /** 设备配置信息 */
17
- export interface DeviceProp {
18
- /** 设备id */
19
- id?: string | number;
20
- /** 设备名称 */
21
- name: string;
22
- /** 设备类型(厂商) */
23
- type: Eftpos.Tyro;
24
- /** 设备状态 */
25
- status: "unpaired" | "paired";
26
- /** 设备设置(商户配置) */
27
- setting: {
28
- [key: string]: unknown;
29
- } | null;
30
- /** 设备设置(第三方配置) */
31
- connection: {
32
- [key: string]: unknown;
33
- } | null;
34
- [key: string]: unknown;
35
- }
36
- /**
37
- * @title: 获取表单结果数据
38
- * @description: 获取表单结果数据
39
- * @param {any} list 表单配置信息
40
- * @return {*} 表单结果信息
41
- * @Author: hongbing.wang
42
- * @Date: 2024-08-19 11:10
43
- */
44
- export declare const getDefaultValue: (list: any) => any;
45
- /**
46
- * @title: 构建通用表单配置信息,构建动态表单
47
- * @description:
48
- * @param {any} field : array 字段信息 value 结果信息,name 上级字段信息用于嵌套, getComm : 获取字段组件配置信息
49
- * @return form 表单配置信息
50
- * @Author: hongbing.wang
51
- * @Date: 2024-08-19 11:11
52
- */
53
- export declare function getCommByFields({ field, value, name, getComm, }: {
54
- field: (string | {
55
- name: string;
56
- children: string[];
57
- })[];
58
- value?: any;
59
- name?: string[];
60
- getComm: (params: {
61
- field: string;
62
- value?: unknown;
63
- }, record?: any) => any;
64
- }): Promise<any>;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { DeviceProp } from './const';
3
- interface DeviceProps {
4
- formItemList: any[];
5
- onSave: (device: DeviceProp) => void;
6
- children?: React.ReactNode;
7
- }
8
- declare const Device: (props: DeviceProps) => React.JSX.Element;
9
- export default Device;
@@ -1,34 +0,0 @@
1
- /// <reference types="react" />
2
- import { Eftpos } from './const';
3
- /**
4
- * @title: tyro 设备连接
5
- * @Author: hongbing.wang
6
- * @Date: 2024-08-20 13:23
7
- */
8
- export declare const usePairTerminalo: (type: Eftpos, params: {
9
- url?: string;
10
- version?: string;
11
- }) => ({ mid, tid, apiKey, posProductData, }: {
12
- mid: string;
13
- tid: string;
14
- apiKey: string;
15
- posProductData: {
16
- posProductVendor: string;
17
- posProductName: string;
18
- posProductVersion: string;
19
- siteReference: string;
20
- };
21
- }, cb: (...agrn: unknown[]) => void) => Promise<void>;
22
- /**
23
- * @title: 获取 Tyro 资源
24
- * @description:
25
- * @param {Eftpos} type 类型
26
- * @param {string} url 链接
27
- * @return {*}
28
- * @Author: hongbing.wang
29
- * @Date: 2024-08-19 18:36
30
- */
31
- export declare const useTyro: (params: {
32
- url?: string;
33
- version?: string;
34
- }) => readonly [import("react").MutableRefObject<any>, boolean];
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- interface IconItem {
3
- name: string;
4
- icon: React.ComponentType;
5
- }
6
- export declare const icons: IconItem[];
7
- export declare const iconMap: Record<string, React.ComponentType>;
8
- export {};
@@ -1,2 +0,0 @@
1
- import { MenuProps } from 'antd';
2
- export declare const items: MenuProps['items'];
@@ -1,53 +0,0 @@
1
- import React from 'react';
2
- import './PhoneInput.less';
3
- /** 国家/地区配置(后端返回格式) */
4
- export interface CountryOption {
5
- /** 国家/地区名称 */
6
- name: string;
7
- /** 国家/地区代码 */
8
- code: string;
9
- /** 区号(不带+号) */
10
- calling_code: string;
11
- /** 货币代码 */
12
- currency_code: string;
13
- }
14
- /** 手机号对象格式 */
15
- export interface PhoneValueObject {
16
- /** 手机号(不含区号) */
17
- phone: string;
18
- /** 国家区号(不带+号) */
19
- country_calling_code: string;
20
- }
21
- /** 值格式类型 */
22
- export declare type ValueFormat = 'string' | 'object';
23
- /** 手机号输入组件属性 */
24
- export interface PhoneInputProps {
25
- /** 完整的手机号值(包含区号),格式:+86138****,或 +1555****(字符串模式) */
26
- value?: string | PhoneValueObject;
27
- /** 值变化回调 */
28
- onChange?: (value: string | PhoneValueObject) => void;
29
- /** Placeholder */
30
- placeholder?: string;
31
- /** 大小 */
32
- size?: 'large' | 'middle' | 'small';
33
- /** 是否禁用 */
34
- disabled?: boolean;
35
- /** 自定义类名 */
36
- className?: string;
37
- /** 可用的国家/地区列表 */
38
- countries?: CountryOption[];
39
- /** 默认国家/地区代码 */
40
- defaultCountry?: string;
41
- /** 值格式:'string' 返回 "+8613800138000",'object' 返回 { phone: "13800138000", country_calling_code: "86" } */
42
- valueFormat?: ValueFormat;
43
- /** 键盘按键事件回调 */
44
- onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
45
- }
46
- /**
47
- * 手机号输入组件
48
- *
49
- * 支持国际区号选择和手机号输入
50
- * 值格式:+区号+手机号,例如:+8613800138000 或 +15551234567
51
- */
52
- declare function PhoneInput({ value, onChange, placeholder, onKeyDown, size, disabled, className, countries, defaultCountry, valueFormat, }: PhoneInputProps): React.JSX.Element;
53
- export default PhoneInput;
@@ -1 +0,0 @@
1
- import '@testing-library/jest-dom/vitest';
@@ -1,58 +0,0 @@
1
- interface CartItem {
2
- price: number | string;
3
- quantity?: number;
4
- [k: string]: any;
5
- }
6
- interface PriceDetail {
7
- subtotal: string;
8
- total: string;
9
- taxTitle?: string;
10
- totalTaxFee?: string;
11
- isPriceIncludeTax?: 0 | 1;
12
- taxRate?: number;
13
- surcharge?: any;
14
- deposit?: {
15
- total: string;
16
- protocols: any[];
17
- hasDeposit: boolean;
18
- };
19
- }
20
- /**
21
- * 计算商品小计(不含其他费用)
22
- * @param items - 购物车商品数组
23
- * @returns 商品总价字符串,保留2位小数
24
- */
25
- export declare const calculateSubtotal: (items: CartItem[]) => string;
26
- /**
27
- * @description: 将购物车数据格式化成summaryModule需要的格式
28
- * @param {any} items 购物车数据
29
- * @return {*}
30
- */
31
- export declare const formatCartsToSummaryModule: (items: any[]) => any[];
32
- /**
33
- * @title: 单个商品的税费
34
- * @description:
35
- * 单个商品的税费 = 商品销售单价(折扣后) * 税率 * is_charge_tax /( 1+ 税率 * is_price_include_tax)
36
- * $taxFee = $price * $taxRate * $isChargeTax / (1 + $taxRate * $isPriceIncludeTax);
37
- * @return {*}
38
- * @Author: xiangfeng.xue
39
- */
40
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[], summaryModule: any) => any;
41
- /**
42
- * 计算所有价格明细
43
- * @param items - 购物车商品数组
44
- * @param options - 其他费用配置
45
- * @returns 价格明细对象
46
- */
47
- export declare const calculatePriceDetails: (shopInfo: any, items: CartItem[], summaryModule: any) => PriceDetail;
48
- /**
49
- * @title: 计算定金
50
- * @param items - 购物车商品数组
51
- * @returns 定金字符串,保留2位小数
52
- */
53
- export declare const calculateDeposit: (items: CartItem[]) => {
54
- total: string;
55
- protocols: any[];
56
- hasDeposit: never;
57
- } | undefined;
58
- export {};
@@ -1,4 +0,0 @@
1
- export declare const getServiceAddons: (list: any[]) => {
2
- serviceList: any[];
3
- addonsList: any[];
4
- };
@@ -1,12 +0,0 @@
1
- export interface ResourceItem {
2
- [key: string]: any;
3
- }
4
- /**
5
- * @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
6
- * @description:
7
- * @param {object} resource
8
- * @return {*}
9
- * @Author: jinglin.tan
10
- */
11
- export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
12
- export declare const formatValues: (data: any, values: any) => any;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IProps {
4
- type: 'rentInfo' | 'markInfo' | 'belongInfo';
5
- data: Record<string, any>;
6
- }
7
- declare const CupInfoCard: (props: IProps) => React.JSX.Element;
8
- export default CupInfoCard;
@@ -1,5 +0,0 @@
1
- import { ECupActionType } from '../../types';
2
- export declare const useCupAction: () => {
3
- run: (this: unknown, cupId: string, action: ECupActionType) => Promise<boolean>;
4
- loading: boolean;
5
- };
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- import { ICustomer } from '../../types';
4
- interface IProps extends ICustomer {
5
- }
6
- declare const CustomerCard: (props: IProps) => React.JSX.Element | null;
7
- export default CustomerCard;
@@ -1,32 +0,0 @@
1
- interface GetCupListsParams {
2
- type?: 'partner' | 'eco';
3
- with?: string[];
4
- skip?: number;
5
- num?: number;
6
- search?: string;
7
- operated_at_start?: string;
8
- operated_at_end?: string;
9
- order_by?: string;
10
- sort?: 'asc' | 'desc';
11
- partner_shop_id?: number;
12
- }
13
- interface GetStatisticsParams {
14
- started_at?: string;
15
- ended_at?: string;
16
- type?: 'eco' | 'normal';
17
- partner_shop_id?: number;
18
- }
19
- export declare const useCupListsApi: () => {
20
- loading: boolean;
21
- data: any;
22
- run: (params: GetCupListsParams) => Promise<void>;
23
- };
24
- export declare const useStatisticsApi: () => {
25
- data: any;
26
- getStatics: (params: GetStatisticsParams) => Promise<void>;
27
- };
28
- export declare const useEcoShopListsApi: () => {
29
- data: any;
30
- getEcoShopLists: (params?: any) => Promise<void>;
31
- };
32
- export {};
@@ -1,7 +0,0 @@
1
- export declare const CUP_PROJECT_FOOTER_BUTTONS: {
2
- key: string;
3
- icon: string;
4
- type: string;
5
- size: string;
6
- languageKey: string;
7
- }[];