@pisell/materials 6.4.18 → 6.4.19

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 (186) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +3 -3
  3. package/build/lowcode/preview.js +8 -8
  4. package/build/lowcode/render/default/view.css +1 -1
  5. package/build/lowcode/render/default/view.js +15 -15
  6. package/build/lowcode/view.css +1 -1
  7. package/build/lowcode/view.js +15 -15
  8. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  9. package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -1
  10. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  11. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +2 -0
  12. package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  13. package/es/components/dataSourceComponents/fields/Upload/index.js +4 -3
  14. package/es/components/iconfont/index.d.ts +8 -0
  15. package/es/components/iconfont/index.js +1 -1
  16. package/es/components/pisellAdjustPrice/index.d.ts +0 -1
  17. package/es/components/pisellCardList/index.d.ts +103 -0
  18. package/es/components/pisellText/components/Editable/index.d.ts +29 -0
  19. package/es/components/pisellText/components/Editable/index.js +130 -0
  20. package/es/components/pisellText/components/Editable/index.less +40 -0
  21. package/es/components/pisellText/index.d.ts +9 -0
  22. package/es/components/pisellText/index.js +2 -0
  23. package/es/components/pisellWalletPassCard/index.d.ts +136 -0
  24. package/es/components/productCard/index.d.ts +7 -0
  25. package/es/components/productCard/utils.d.ts +31 -0
  26. package/es/components/productCard/utils.js +1 -8
  27. package/es/components/select/index.d.ts +9 -0
  28. package/es/components/select/index.js +4 -2
  29. package/es/components/sortableList/index.d.ts +11 -0
  30. package/es/components/sortableList/index.js +2 -1
  31. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  32. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
  33. package/es/components/table/Actions/component/ExportImport/index.js +55 -27
  34. package/es/components/table/Table/index.d.ts +4 -0
  35. package/es/components/table/Table/index.js +7 -3
  36. package/es/components/table/hooks/useTransColumns.d.ts +14 -0
  37. package/es/components/table/hooks/useTransColumns.js +1 -1
  38. package/es/components/table/index.d.ts +4 -0
  39. package/es/components/table/index.js +3 -1
  40. package/es/components/table/serve.d.ts +13 -0
  41. package/es/components/table/serve.js +8 -0
  42. package/es/components/tabs/index.d.ts +17 -0
  43. package/es/components/tabs/index.js +9 -0
  44. package/es/components/virtual-keyboard/Amount/index.d.ts +0 -1
  45. package/es/components/walletCard/index.d.ts +11 -11
  46. package/es/components/walletCard/index.js +51 -40
  47. package/es/index.d.ts +145 -0
  48. package/es/locales/en-US.d.ts +307 -0
  49. package/es/locales/en-US.js +2 -2
  50. package/es/locales/zh-CN.d.ts +302 -0
  51. package/es/locales/zh-CN.js +1 -1
  52. package/es/locales/zh-TW.d.ts +302 -0
  53. package/es/locales/zh-TW.js +1 -1
  54. package/es/typings.d.ts +7 -1
  55. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  56. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +1 -1
  57. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  58. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +2 -0
  59. package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  60. package/lib/components/dataSourceComponents/fields/Upload/index.js +2 -1
  61. package/lib/components/iconfont/index.d.ts +8 -0
  62. package/lib/components/iconfont/index.js +1 -1
  63. package/lib/components/pisellAdjustPrice/index.d.ts +0 -1
  64. package/lib/components/pisellCardList/index.d.ts +103 -0
  65. package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
  66. package/lib/components/pisellText/components/Editable/index.js +139 -0
  67. package/lib/components/pisellText/components/Editable/index.less +40 -0
  68. package/lib/components/pisellText/index.d.ts +9 -0
  69. package/lib/components/pisellText/index.js +2 -0
  70. package/lib/components/pisellWalletPassCard/index.d.ts +136 -0
  71. package/lib/components/productCard/index.d.ts +7 -0
  72. package/lib/components/productCard/utils.d.ts +31 -0
  73. package/lib/components/productCard/utils.js +1 -8
  74. package/lib/components/select/index.d.ts +9 -0
  75. package/lib/components/select/index.js +7 -2
  76. package/lib/components/sortableList/index.d.ts +11 -0
  77. package/lib/components/sortableList/index.js +2 -2
  78. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  79. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
  80. package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
  81. package/lib/components/table/Table/index.d.ts +4 -0
  82. package/lib/components/table/Table/index.js +8 -4
  83. package/lib/components/table/hooks/useTransColumns.d.ts +14 -0
  84. package/lib/components/table/hooks/useTransColumns.js +1 -1
  85. package/lib/components/table/index.d.ts +4 -0
  86. package/lib/components/table/index.js +3 -1
  87. package/lib/components/table/serve.d.ts +13 -0
  88. package/lib/components/table/serve.js +8 -0
  89. package/lib/components/tabs/index.d.ts +17 -0
  90. package/lib/components/tabs/index.js +5 -0
  91. package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -1
  92. package/lib/components/walletCard/index.d.ts +11 -11
  93. package/lib/components/walletCard/index.js +47 -29
  94. package/lib/index.d.ts +145 -0
  95. package/lib/locales/en-US.d.ts +307 -0
  96. package/lib/locales/en-US.js +2 -2
  97. package/lib/locales/zh-CN.d.ts +302 -0
  98. package/lib/locales/zh-CN.js +1 -1
  99. package/lib/locales/zh-TW.d.ts +302 -0
  100. package/lib/locales/zh-TW.js +1 -1
  101. package/lib/typings.d.ts +7 -1
  102. package/lowcode/pisell-text.editable/meta.ts +115 -0
  103. package/lowcode/pisell-text.editable/snippets.ts +15 -0
  104. package/lowcode/sortable-list/meta.ts +1 -1
  105. package/lowcode/wallet-card/meta.ts +16 -14
  106. package/package.json +2 -2
  107. package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
  108. package/es/components/auto-resize-text/index.d.ts +0 -6
  109. package/es/components/cardPro/index.d.ts +0 -4
  110. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  111. package/es/components/keyboard/index.d.ts +0 -22
  112. package/es/components/pisell-config-provider/context.d.ts +0 -22
  113. package/es/components/pisellAdjustPrice/status.d.ts +0 -32
  114. package/es/components/pisellAdjustPrice/type.d.ts +0 -22
  115. package/es/components/pisellCheckboxGroup/index.d.ts +0 -40
  116. package/es/components/pisellText/components/Amount/index.d.ts +0 -20
  117. package/es/components/pisellToast/index.d.ts +0 -17
  118. package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
  119. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
  120. package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
  121. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
  122. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -4
  123. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
  124. package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -4
  125. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -3
  126. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -11
  127. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
  128. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
  129. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -13
  130. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -4
  131. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
  132. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
  133. package/es/components/productCard/components/Action/index.d.ts +0 -4
  134. package/es/components/productCard/components/Header/index.d.ts +0 -4
  135. package/es/components/productCard/components/Sales/index.d.ts +0 -4
  136. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -14
  137. package/es/components/productCard/locales.d.ts +0 -84
  138. package/es/components/table/Table/AddFieldModal/index.d.ts +0 -4
  139. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  140. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
  141. package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  142. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  143. package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
  144. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  145. package/es/components/virtual-keyboard/index.d.ts +0 -25
  146. package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
  147. package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
  148. package/lib/components/auto-resize-text/index.d.ts +0 -6
  149. package/lib/components/cardPro/index.d.ts +0 -4
  150. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  151. package/lib/components/keyboard/index.d.ts +0 -22
  152. package/lib/components/pisell-config-provider/context.d.ts +0 -22
  153. package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
  154. package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
  155. package/lib/components/pisellCheckboxGroup/index.d.ts +0 -40
  156. package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
  157. package/lib/components/pisellToast/index.d.ts +0 -17
  158. package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
  159. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
  160. package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
  161. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
  162. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -4
  163. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
  164. package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -4
  165. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -3
  166. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -11
  167. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
  168. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
  169. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -13
  170. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -4
  171. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
  172. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
  173. package/lib/components/productCard/components/Action/index.d.ts +0 -4
  174. package/lib/components/productCard/components/Header/index.d.ts +0 -4
  175. package/lib/components/productCard/components/Sales/index.d.ts +0 -4
  176. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -14
  177. package/lib/components/productCard/locales.d.ts +0 -84
  178. package/lib/components/table/Table/AddFieldModal/index.d.ts +0 -4
  179. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  180. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
  181. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  182. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  183. package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
  184. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  185. package/lib/components/virtual-keyboard/index.d.ts +0 -25
  186. package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
@@ -0,0 +1,115 @@
1
+ import snippets from './snippets';
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: 'PisellText.Editable',
6
+ title: '可编辑文本',
7
+ category: '数据输入',
8
+ docUrl: '',
9
+ screenshot: '',
10
+ devMode: 'proCode',
11
+ npm: {
12
+ package: '@pisell/materials',
13
+ version: '1.0.1',
14
+ exportName: 'PisellText',
15
+ main: 'src/index.tsx',
16
+ destructuring: true,
17
+ subName: 'Editable',
18
+ },
19
+ props: [
20
+ {
21
+ name: 'value',
22
+ title: {
23
+ label: '文本内容',
24
+ tip: '文本内容,支持字符串或多语言对象'
25
+ },
26
+ propType: {
27
+ type: 'oneOfType',
28
+ value: ['string', 'object']
29
+ },
30
+ setter: {
31
+ componentName: 'MixedSetter',
32
+ props: {
33
+ setters: [
34
+ 'StringSetter',
35
+ 'JsonSetter'
36
+ ]
37
+ }
38
+ },
39
+ },
40
+ {
41
+ name: 'editable',
42
+ title: {
43
+ label: '启用编辑',
44
+ tip: '启用编辑功能,支持布尔值或详细配置对象',
45
+ },
46
+ propType: {
47
+ type: 'oneOfType',
48
+ value: ['bool', 'object']
49
+ },
50
+ setter: {
51
+ componentName: 'MixedSetter',
52
+ props: {
53
+ setters: [
54
+ 'BoolSetter',
55
+ {
56
+ componentName: 'ObjectSetter',
57
+ props: {
58
+ config: {
59
+ items: [
60
+ {
61
+ name: 'disabled',
62
+ title: { label: '禁用编辑', tip: '是否禁用编辑功能' },
63
+ propType: 'bool',
64
+ setter: 'BoolSetter',
65
+ defaultValue: false,
66
+ },
67
+ {
68
+ name: 'maxLength',
69
+ title: { label: '最大长度', tip: '编辑时的最大字符长度' },
70
+ propType: 'number',
71
+ setter: 'NumberSetter',
72
+ }
73
+ ]
74
+ }
75
+ }
76
+ }
77
+ ]
78
+ }
79
+ },
80
+ defaultValue: false,
81
+ },
82
+ {
83
+ name: 'size',
84
+ title: { label: '尺寸', tip: '输入框尺寸' },
85
+ propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
86
+ setter: [
87
+ {
88
+ componentName: 'RadioGroupSetter',
89
+ props: {
90
+ options: [
91
+ { title: 'Large', value: 'large' },
92
+ { title: 'Middle', value: 'middle' },
93
+ { title: 'Small', value: 'small' },
94
+ ]
95
+ }
96
+ },
97
+ 'VariableSetter'
98
+ ],
99
+ defaultValue: 'middle',
100
+ },
101
+ {
102
+ name: 'className',
103
+ title: { label: '类名', tip: '自定义CSS类名' },
104
+ propType: 'string',
105
+ setter: 'StringSetter',
106
+ },
107
+ ],
108
+ configure: {
109
+ supports: {
110
+ style: true,
111
+ className: true,
112
+ events: ['onChange'],
113
+ }
114
+ },
115
+ };
@@ -0,0 +1,15 @@
1
+ export default [
2
+ {
3
+ title: '可编辑文本',
4
+ schema: {
5
+ componentName: 'PisellText.Editable',
6
+ props: {
7
+ value: '可编辑的文本内容',
8
+ editable: {
9
+ maxLength: 50,
10
+ disabled: false,
11
+ },
12
+ },
13
+ },
14
+ },
15
+ ];
@@ -70,7 +70,7 @@ export default {
70
70
  title: '渲染函数插槽',
71
71
  initialValue: {
72
72
  type: 'JSSlot',
73
- params: ['item'],
73
+ params: ['item', 'index'],
74
74
  value: [
75
75
  {
76
76
  componentName: 'Button',
@@ -220,28 +220,30 @@ export default {
220
220
  'zh-CN': '是否显示二维码/条形码图标。类型: boolean',
221
221
  },
222
222
  },
223
- setter: 'BoolSetter',
224
- defaultValue: true,
223
+ setter: "BoolSetter",
224
+ defaultValue: true
225
225
  },
226
226
  {
227
- name: 'showViewPin',
227
+ name: "codeType",
228
228
  title: {
229
229
  label: {
230
230
  type: 'i18n',
231
- 'en-US': 'View PIN',
232
- 'zh-CN': '查看PIN',
231
+ 'en-US': 'Code Type',
232
+ 'zh-CN': '条码类型'
233
233
  },
234
- tip: {
235
- type: 'i18n',
236
- 'en-US':
237
- 'If open, you need to configure the "onViewPinClick" event. Type: boolean',
238
- 'zh-CN': '如果打开需要配置"onViewPinClick"事件。类型: boolean',
234
+ },
235
+ setter: {
236
+ componentName: 'RadioGroupSetter',
237
+ props: {
238
+ options: [
239
+ { title: '条形码', value: 'barCode' },
240
+ { title: '二维码', value: 'qrCode' },
241
+ ],
239
242
  },
240
243
  },
241
- setter: 'BoolSetter',
242
- defaultValue: false,
243
- },
244
- ],
244
+ defaultValue: 'qrCode',
245
+ }
246
+ ]
245
247
  },
246
248
  {
247
249
  name: 'guest',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.4.18",
3
+ "version": "6.4.19",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,7 +59,7 @@
59
59
  "@use-gesture/react": "^10.3.1",
60
60
  "@zxing/library": "0.21.2",
61
61
  "ahooks": "^3.7.6",
62
- "antd": "^5.6.3",
62
+ "antd": "5.6.3",
63
63
  "antd-img-crop": "^4.23.0",
64
64
  "classnames": "^2.3.2",
65
65
  "crypto-js": "^4.2.0",
@@ -1,20 +0,0 @@
1
- export declare type Options = {
2
- mode?: 'oneline' | 'multiline' | 'box' | 'boxoneline' | undefined;
3
- minFontSizePx?: number | undefined;
4
- maxFontSizePx?: number | undefined;
5
- fontSizePrecisionPx?: number | undefined;
6
- scrollToEnd?: boolean | undefined;
7
- };
8
- export declare function updateTextSize({ innerEl, containerEl, mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, }: Options & {
9
- innerEl: HTMLElement;
10
- containerEl: HTMLElement;
11
- }): void;
12
- declare type DisconnectableFunction = {
13
- (): void;
14
- disconnect: () => void;
15
- };
16
- export declare function autoTextSize({ innerEl, containerEl, mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, }: Options & {
17
- innerEl: HTMLElement;
18
- containerEl: HTMLElement;
19
- }): DisconnectableFunction;
20
- export {};
@@ -1,6 +0,0 @@
1
- import React, { DetailedHTMLProps, HTMLAttributes, ReactElement, ReactHTML } from 'react';
2
- import { Options } from './auto-text-size-standalone';
3
- export default function AutoResizeText({ mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, as: Comp, children, ...rest }: Options & {
4
- as?: keyof ReactHTML | React.ComponentType<any>;
5
- children?: React.ReactNode;
6
- } & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>): ReactElement;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- declare const _default: (props: any) => JSX.Element;
4
- export default _default;
@@ -1,18 +0,0 @@
1
- import './index.less';
2
- import { ValueProps, SortType } from '../types';
3
- declare type IdType = string | number;
4
- declare type TreeItemProps = {
5
- id: string | number;
6
- key: string | number;
7
- item: ValueProps | any;
8
- depth: number;
9
- lists: any[];
10
- childrenProps?: SortType;
11
- sensors?: any;
12
- expandedKeys?: IdType[];
13
- setExpandedKeys?: any;
14
- onSelectKeys?: (ids: IdType) => void;
15
- onChange?: (value: any[]) => void;
16
- };
17
- declare const TreeItem: (props: TreeItemProps) => JSX.Element;
18
- export default TreeItem;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export declare type ItemValue = string | number;
4
- export interface Item {
5
- value: ItemValue;
6
- label: React.ReactNode;
7
- disabled: boolean;
8
- type: 'text' | 'primary';
9
- style?: React.CSSProperties;
10
- size?: number;
11
- }
12
- export interface KeyboardProps {
13
- id?: string;
14
- className?: string;
15
- style?: React.CSSProperties;
16
- onChange?: (value?: ItemValue) => void;
17
- items?: Item[];
18
- rightItems?: Item[];
19
- keydown?: boolean;
20
- }
21
- declare const _default: React.MemoExoticComponent<(props: KeyboardProps) => JSX.Element>;
22
- export default _default;
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- export interface PisellContextType {
3
- platform: 'h5' | 'pc' | 'ipad';
4
- /** 货币符号 */
5
- symbol?: string;
6
- /** 当前语言环境 */
7
- locale?: string;
8
- /** 获取货币符号 */
9
- getSymbolic?: () => string;
10
- }
11
- export declare const PisellContext: import("react").Context<PisellContextType>;
12
- /**
13
- * provider外获取当前全局配置
14
- */
15
- declare class GlobalConfig {
16
- private config;
17
- constructor();
18
- setConfig(config: PisellContextType): void;
19
- getConfig(): PisellContextType;
20
- }
21
- export declare const globalConfig: GlobalConfig;
22
- export default PisellContext;
@@ -1,32 +0,0 @@
1
- export declare const defaultConfig: {
2
- dark: {
3
- backgroundColor: string;
4
- containerBackgroundColor: string;
5
- buttonBackgroundColor: string;
6
- textColor: string;
7
- resetButtonBackgroundColor: string;
8
- resetButtonTextColor: string;
9
- isDoneButtonFollowTheme: boolean;
10
- doneButtonBackgroundColor: string;
11
- doneButtonTextColor: string;
12
- isShowMainText: boolean;
13
- mainTextColor: string;
14
- isShowSubText: boolean;
15
- subTextColor: string;
16
- };
17
- light: {
18
- backgroundColor: string;
19
- containerBackgroundColor: string;
20
- buttonBackgroundColor: string;
21
- textColor: string;
22
- resetButtonBackgroundColor: string;
23
- resetButtonTextColor: string;
24
- isDoneButtonFollowTheme: boolean;
25
- doneButtonBackgroundColor: string;
26
- doneButtonTextColor: string;
27
- isShowMainText: boolean;
28
- mainTextColor: string;
29
- isShowSubText: boolean;
30
- subTextColor: string;
31
- };
32
- };
@@ -1,22 +0,0 @@
1
- export interface PisellAdjustPriceProps {
2
- value?: number;
3
- originValue: number;
4
- defaultValue?: number;
5
- onChange?: (val: number) => void;
6
- selectType?: 'light' | 'dark';
7
- backgroundColor?: string;
8
- containerBackgroundColor?: string;
9
- buttonBackgroundColor?: string;
10
- textColor?: string;
11
- resetButtonBackgroundColor?: string;
12
- resetButtonTextColor?: string;
13
- isDoneButtonFollowTheme?: boolean;
14
- doneButtonBackgroundColor?: string;
15
- doneButtonTextColor?: string;
16
- isShowMainText?: boolean;
17
- mainTextColor?: string;
18
- isShowSubText?: boolean;
19
- subTextColor?: string;
20
- resetText?: string;
21
- doneText?: string;
22
- }
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import { PisellContextType } from '../pisell-config-provider/context';
3
- import './index.less';
4
- export interface PisellCheckboxGroupOption {
5
- label: string;
6
- value: string;
7
- disabled?: boolean;
8
- error?: boolean;
9
- [key: string]: any;
10
- }
11
- declare type PisellCheckboxGroupValue = string | string[] | any;
12
- export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
13
- platform?: PisellContextType['platform'];
14
- direction?: 'horizontal' | 'vertical';
15
- fullWidth?: boolean;
16
- gap?: number;
17
- padding?: number;
18
- options: PisellCheckboxGroupOption[];
19
- onChange?: (value: PisellCheckboxGroupValue, item: PisellCheckboxGroupOption) => void;
20
- value?: PisellCheckboxGroupValue;
21
- renderOption?: (option: PisellCheckboxGroupOption, active: boolean, index: number) => React.ReactNode;
22
- rowKey?: string;
23
- mode?: 'multiple' | 'single';
24
- iconPosition?: 'left' | 'right' | 'hide';
25
- optionClassName?: string;
26
- optionActiveClassName?: string;
27
- onChangeDebounce?: boolean;
28
- onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: PisellCheckboxGroupOption) => void;
29
- showActiveBackground?: boolean;
30
- }
31
- /**
32
- * @title: PisellCheckboxGroup
33
- * @description: 选中组件
34
- * @param {PisellCheckboxGroupProps} props
35
- * @return {*}
36
- * @Author: zhiwei.Wang
37
- * @Date: 2024-08-16 10:34
38
- */
39
- declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
40
- export default PisellCheckboxGroup;
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { PisellContextType } from '../../../pisell-config-provider/context';
3
- export interface AmountProps extends React.HTMLAttributes<HTMLSpanElement> {
4
- /** 平台 */
5
- platform?: PisellContextType['platform'];
6
- /** 当前数值 */
7
- value?: number | string;
8
- /** 小数点后位数 默认是小数点后2位 */
9
- precision?: number;
10
- /** 显示货币符号 指的是 ¥$ 等货币符号等显隐,默认是展示 */
11
- showCurrencySymbol?: boolean;
12
- /** 千分位 指的是长金额的千分位逗号隔开,比如“123, 245, 315” 这种展现形式,默认是关闭 */
13
- useThousandsSeparator?: boolean;
14
- /** 整数位隐藏小数 指的是如果价格为整数,后面的".00" 将被省略以节省页面空间 */
15
- hideDecimalForWholeNumbers?: boolean;
16
- /** 货币符号 */
17
- symbol?: string;
18
- }
19
- declare const Amount: (props: AmountProps) => JSX.Element;
20
- export default Amount;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface PisellToastProps {
4
- /** 提示内容 */
5
- content: React.ReactNode;
6
- /** 自动关闭的延时,单位秒。设为 0 时不自动关闭 */
7
- duration?: number;
8
- /** 是否展示action */
9
- showAction?: boolean;
10
- /** action文案 */
11
- actionText?: string;
12
- /** 关闭时触发的回调函数 */
13
- onClose?: () => void;
14
- }
15
- declare const PisellToast: (props: PisellToastProps) => void;
16
- export { useToast } from './squareToast';
17
- export default PisellToast;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { ToastProps } from './toast';
3
- interface ToastInstance {
4
- close: () => void;
5
- }
6
- declare const show: (configOrContent: Partial<ToastProps> | React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
7
- declare const clear: () => void;
8
- declare const success: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
9
- declare const info: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
10
- declare const loading: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
11
- declare const fail: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
12
- declare const hide: () => void;
13
- export { show, clear, success, info, loading, fail, hide };
@@ -1,29 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { Root } from 'react-dom/client';
3
- import React from 'react';
4
- declare type ImperativeProps = {
5
- open?: boolean;
6
- onCancel?: () => void;
7
- afterClose?: () => void;
8
- };
9
- declare type TargetElement = ReactElement<ImperativeProps>;
10
- export declare type ImperativeHandler = {
11
- close: () => void;
12
- replace: (element: TargetElement) => void;
13
- isRendered?: () => boolean;
14
- };
15
- export declare type UnmountType = () => Promise<void>;
16
- export declare type RenderType = (node: React.ReactElement, container: Element | DocumentFragment) => UnmountType;
17
- declare const MARK = "__pisell_react_root__";
18
- declare type ContainerType = (Element | DocumentFragment) & {
19
- [MARK]?: Root;
20
- };
21
- export declare function render(node: React.ReactElement, container: ContainerType): void;
22
- export declare function unmount(container: ContainerType): Promise<void>;
23
- /**
24
- * @deprecated 设置 React 渲染函数以兼容使用。
25
- */
26
- export declare function unstableSetRender(render?: RenderType): RenderType;
27
- export declare function renderToBody(element: ReactElement): UnmountType;
28
- export declare function renderImperatively(element: TargetElement): ImperativeHandler;
29
- export {};
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export declare type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
4
- export interface ToastProps {
5
- /** Toast 类型 */
6
- icon?: ToastType | React.ReactNode;
7
- /** 显示的内容,支持文本或 React 节点 */
8
- content: React.ReactNode;
9
- /** 是否显示 */
10
- open?: boolean;
11
- /** 自动关闭时间,单位毫秒,0 表示不自动关闭 */
12
- duration?: number;
13
- /** 关闭 */
14
- onCancel?: () => void;
15
- /** 关闭后回调 */
16
- afterClose?: () => void;
17
- /** 自定义样式类名 */
18
- className?: string;
19
- /** 自定义样式 */
20
- style?: React.CSSProperties;
21
- /** 是否显示遮罩 */
22
- mask?: boolean;
23
- }
24
- declare const Toast: React.FC<ToastProps>;
25
- export default Toast;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- declare const Footer: ({ item, hideDivider, type, isOnlyTotal }: any) => JSX.Element;
4
- export default Footer;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
4
- export default MultiDay;
@@ -1,14 +0,0 @@
1
- interface InputItem {
2
- start_date: string;
3
- end_date: string;
4
- total: number;
5
- num: number;
6
- }
7
- interface OutputItem {
8
- start_date: string;
9
- end_date: string;
10
- total: number;
11
- num: number;
12
- }
13
- export declare function formatDateRanges(list: InputItem[]): OutputItem[];
14
- export {};
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- declare const Note: (props: any) => JSX.Element | null;
4
- export default Note;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const DiscountReason: (props: any) => JSX.Element;
3
- export default DiscountReason;
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- interface IProps {
4
- isShowImage?: boolean;
5
- dataSource: {
6
- bundle?: any[];
7
- symbol?: string;
8
- };
9
- }
10
- declare const Packages: ({ isShowImage, dataSource }: IProps) => JSX.Element | null;
11
- export default Packages;
@@ -1,20 +0,0 @@
1
- /**
2
- * @title: 金额是否是负
3
- * @description:
4
- * @param {string} type
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-11-22 10:01
8
- */
9
- export declare const minusSign: (item: any, type?: string) => "" | "-";
10
- /**
11
- * @title: 金额格式化
12
- * @description:
13
- * @param {number} price
14
- * @param {string} amountSymbol
15
- * @param {number} digit
16
- * @return {*}
17
- * @Author: WangHan
18
- * @Date: 2024-11-22 10:58
19
- */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- declare const Resources: (props: any) => JSX.Element | null;
4
- export default Resources;
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- interface IProps {
4
- hideDivider?: boolean;
5
- dataSource: {
6
- symbol?: string;
7
- relation_products?: any[];
8
- bundle?: any[];
9
- };
10
- isShowImage?: boolean;
11
- }
12
- declare const Sales: ({ hideDivider, dataSource, isShowImage }: IProps) => JSX.Element | null;
13
- export default Sales;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- declare const Specs: (props: any) => JSX.Element | null;
4
- export default Specs;
@@ -1,46 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import React from 'react';
3
- declare type NativeProps<S extends string = never> = {
4
- className?: string;
5
- style?: React.CSSProperties & Partial<Record<S, string>>;
6
- };
7
- declare type PropagationEvent = 'click';
8
- import './index.less';
9
- declare type SideType = 'left' | 'right';
10
- export declare type SwipeActionRef = {
11
- close: () => void;
12
- show: (side?: SideType) => void;
13
- };
14
- declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
15
- export declare type Action = {
16
- key: string | number;
17
- text: ReactNode;
18
- color?: ActionColor | string;
19
- onClick?: (e: React.MouseEvent) => void;
20
- style?: React.CSSProperties;
21
- };
22
- export declare type SwipeActionProps = {
23
- rightActions?: Action[];
24
- leftActions?: Action[];
25
- onAction?: (action: Action, e: React.MouseEvent) => void;
26
- closeOnTouchOutside?: boolean;
27
- closeOnAction?: boolean;
28
- children: ReactNode;
29
- stopPropagation?: PropagationEvent[];
30
- onActionsReveal?: (side: SideType) => void;
31
- onClose?: () => void;
32
- escapeDom?: string;
33
- } & NativeProps<'--background'>;
34
- export declare const SwipeAction: React.ForwardRefExoticComponent<{
35
- rightActions?: Action[] | undefined;
36
- leftActions?: Action[] | undefined;
37
- onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
38
- closeOnTouchOutside?: boolean | undefined;
39
- closeOnAction?: boolean | undefined;
40
- children: ReactNode;
41
- stopPropagation?: "click"[] | undefined;
42
- onActionsReveal?: ((side: SideType) => void) | undefined;
43
- onClose?: (() => void) | undefined;
44
- escapeDom?: string | undefined;
45
- } & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
46
- export {};