@pisell/materials 6.11.10 → 6.11.12

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 (229) 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 +7 -7
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +21 -21
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +18 -18
  11. package/es/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +7 -0
  12. package/es/components/PisellProcedure/PisellProcedure.d.ts +22 -0
  13. package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
  14. package/es/components/PisellProcedure/components/ProcedureBody.d.ts +41 -0
  15. package/es/components/PisellProcedure/components/ProcedureFooter.d.ts +38 -0
  16. package/es/components/PisellProcedure/components/ProcedureHeader.d.ts +34 -0
  17. package/es/components/PisellProcedure/components/index.d.ts +12 -0
  18. package/es/components/PisellProcedure/index.d.ts +5 -0
  19. package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
  20. package/es/components/PisellSuperTabs/hooks/index.d.ts +1 -0
  21. package/es/components/PisellSuperTabs/hooks/useTabsState.d.ts +7 -0
  22. package/es/components/PisellSuperTabs/index.d.ts +3 -0
  23. package/es/components/PisellSuperTabs/types.d.ts +212 -0
  24. package/es/components/PisellTabbar/constants.d.ts +47 -0
  25. package/es/components/PisellTabbar/hooks/index.d.ts +2 -0
  26. package/es/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
  27. package/es/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
  28. package/es/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  29. package/es/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  30. package/es/components/PisellTabbar/types.d.ts +90 -0
  31. package/es/components/PisellTabbar/utils/index.d.ts +69 -0
  32. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  33. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
  34. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  35. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
  36. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  37. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  38. package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
  39. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
  40. package/es/components/dataSourceComponents/fields/index.d.ts +15 -15
  41. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
  42. package/es/components/drag-sort-tree/TreeItem/index.d.ts +19 -0
  43. package/es/components/pisellAdjustPrice/status.d.ts +32 -0
  44. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +0 -2
  45. package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +5 -5
  46. package/es/components/pisellGridPro/index.d.ts +4 -0
  47. package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
  48. package/es/components/pisellLookup/components/LookupTrigger.js +16 -13
  49. package/es/components/pisellMetricCard/PisellMetricCard.stories.d.ts +17 -0
  50. package/es/components/pisellMetricCard/components/index.d.ts +7 -0
  51. package/es/components/pisellMetricCard/index.d.ts +6 -0
  52. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +15 -7
  53. package/es/components/pisellRecordBoard/PisellRecordBoard.js +47 -14
  54. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +8 -0
  55. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +482 -249
  56. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +121 -16
  57. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +38 -0
  58. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +4 -2
  59. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +92 -13
  60. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +7 -3
  61. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -1
  62. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +9 -3
  63. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +6 -2
  64. package/es/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +21 -0
  65. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +112 -15
  66. package/es/components/pisellSingleSelect/PisellSingleSelect.less +15 -0
  67. package/es/components/pisellSort/index.d.ts +4 -0
  68. package/es/components/pisellStatisticList/index.d.ts +22 -0
  69. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +2 -2
  70. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.d.ts +61 -0
  71. package/es/components/pisellTimeRangeDisplay/index.d.ts +3 -0
  72. package/es/components/productCard/cartSkuCard/components/Gift/index.d.ts +5 -0
  73. package/es/components/productCard/cartSkuCard/components/Gift/index.js +60 -0
  74. package/es/components/productCard/cartSkuCard/components/Gift/index.less +84 -0
  75. package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
  76. package/es/components/productCard/cartSkuCard/components/Gift/types.js +1 -0
  77. package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
  78. package/es/components/productCard/cartSkuCard/components/Promotion/index.js +24 -0
  79. package/es/components/productCard/cartSkuCard/components/Promotion/index.less +16 -0
  80. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +4 -0
  81. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +41 -6
  82. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +66 -1
  83. package/es/components/productCard/cartSkuCard/components/packages/index.js +1 -0
  84. package/es/components/productCard/cartSkuCard/index.d.ts +1 -1
  85. package/es/components/productCard/cartSkuCard/index.js +44 -7
  86. package/es/components/productCard/cartSkuCard/locales.d.ts +178 -0
  87. package/es/components/productCard/cartSkuCard/locales.js +30 -5
  88. package/es/components/productCard/components/Header/EditButton/index.d.ts +1 -1
  89. package/es/components/productCard/components/Header/EditButton/index.js +3 -1
  90. package/es/components/productCard/status.d.ts +32 -0
  91. package/es/components/productCard/status.js +3 -0
  92. package/es/components/productCard/types.d.ts +95 -0
  93. package/es/components/select/index.d.ts +9 -0
  94. package/es/components/select/index.less +18 -2
  95. package/es/components/table/Table/fields/image/index.d.ts +1 -0
  96. package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
  97. package/es/components/table/Table/fields/select/Edit/index.d.ts +4 -0
  98. package/es/components/table/Table/utils.d.ts +1 -1
  99. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  100. package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  101. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  102. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
  103. package/es/components/virtualInput/BaseVirtualInput/index.less +2 -2
  104. package/es/components/virtualInput/index.js +6 -2
  105. package/es/hooks/useThemeTokens.js +20 -0
  106. package/es/index.d.ts +1 -0
  107. package/es/locales/en-US.d.ts +2 -0
  108. package/es/locales/en-US.js +2 -0
  109. package/es/locales/ja.d.ts +2 -0
  110. package/es/locales/ja.js +2 -0
  111. package/es/locales/pt.d.ts +2 -0
  112. package/es/locales/pt.js +2 -0
  113. package/es/locales/zh-CN.d.ts +2 -0
  114. package/es/locales/zh-CN.js +2 -0
  115. package/es/locales/zh-TW.d.ts +2 -0
  116. package/es/locales/zh-TW.js +2 -0
  117. package/lib/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +7 -0
  118. package/lib/components/PisellProcedure/PisellProcedure.d.ts +22 -0
  119. package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
  120. package/lib/components/PisellProcedure/components/ProcedureBody.d.ts +41 -0
  121. package/lib/components/PisellProcedure/components/ProcedureFooter.d.ts +38 -0
  122. package/lib/components/PisellProcedure/components/ProcedureHeader.d.ts +34 -0
  123. package/lib/components/PisellProcedure/components/index.d.ts +12 -0
  124. package/lib/components/PisellProcedure/index.d.ts +5 -0
  125. package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
  126. package/lib/components/PisellSuperTabs/hooks/index.d.ts +1 -0
  127. package/lib/components/PisellSuperTabs/hooks/useTabsState.d.ts +7 -0
  128. package/lib/components/PisellSuperTabs/index.d.ts +3 -0
  129. package/lib/components/PisellSuperTabs/types.d.ts +212 -0
  130. package/lib/components/PisellTabbar/constants.d.ts +47 -0
  131. package/lib/components/PisellTabbar/hooks/index.d.ts +2 -0
  132. package/lib/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
  133. package/lib/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
  134. package/lib/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  135. package/lib/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  136. package/lib/components/PisellTabbar/types.d.ts +90 -0
  137. package/lib/components/PisellTabbar/utils/index.d.ts +69 -0
  138. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  139. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
  140. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  141. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
  142. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  143. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  144. package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
  145. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
  146. package/lib/components/dataSourceComponents/fields/index.d.ts +15 -15
  147. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
  148. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +19 -0
  149. package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
  150. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +0 -2
  151. package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +3 -3
  152. package/lib/components/pisellGridPro/index.d.ts +4 -0
  153. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
  154. package/lib/components/pisellLookup/components/LookupTrigger.js +8 -8
  155. package/lib/components/pisellMetricCard/PisellMetricCard.stories.d.ts +17 -0
  156. package/lib/components/pisellMetricCard/components/index.d.ts +7 -0
  157. package/lib/components/pisellMetricCard/index.d.ts +6 -0
  158. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +15 -7
  159. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +39 -9
  160. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +8 -0
  161. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +159 -0
  162. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +94 -9
  163. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +38 -0
  164. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +4 -2
  165. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +88 -3
  166. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +6 -2
  167. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -1
  168. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +9 -1
  169. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +3 -2
  170. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +21 -0
  171. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +60 -0
  172. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +15 -0
  173. package/lib/components/pisellSort/index.d.ts +4 -0
  174. package/lib/components/pisellStatisticList/index.d.ts +22 -0
  175. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +1 -1
  176. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.d.ts +61 -0
  177. package/lib/components/pisellTimeRangeDisplay/index.d.ts +3 -0
  178. package/lib/components/productCard/cartSkuCard/components/Gift/index.d.ts +5 -0
  179. package/lib/components/productCard/cartSkuCard/components/Gift/index.js +62 -0
  180. package/lib/components/productCard/cartSkuCard/components/Gift/index.less +84 -0
  181. package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
  182. package/lib/components/productCard/cartSkuCard/components/Gift/types.js +17 -0
  183. package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
  184. package/lib/components/productCard/cartSkuCard/components/Promotion/index.js +63 -0
  185. package/lib/components/productCard/cartSkuCard/components/Promotion/index.less +16 -0
  186. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +4 -0
  187. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +20 -3
  188. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +66 -1
  189. package/lib/components/productCard/cartSkuCard/components/packages/index.js +1 -1
  190. package/lib/components/productCard/cartSkuCard/index.d.ts +1 -1
  191. package/lib/components/productCard/cartSkuCard/index.js +42 -6
  192. package/lib/components/productCard/cartSkuCard/locales.d.ts +178 -0
  193. package/lib/components/productCard/cartSkuCard/locales.js +20 -5
  194. package/lib/components/productCard/components/Header/EditButton/index.d.ts +1 -1
  195. package/lib/components/productCard/components/Header/EditButton/index.js +2 -1
  196. package/lib/components/productCard/status.d.ts +32 -0
  197. package/lib/components/productCard/status.js +3 -0
  198. package/lib/components/productCard/types.d.ts +95 -0
  199. package/lib/components/select/index.d.ts +9 -0
  200. package/lib/components/select/index.less +18 -2
  201. package/lib/components/table/Table/fields/image/index.d.ts +1 -0
  202. package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
  203. package/lib/components/table/Table/fields/select/Edit/index.d.ts +4 -0
  204. package/lib/components/table/Table/utils.d.ts +1 -1
  205. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  206. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  207. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  208. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
  209. package/lib/components/virtualInput/BaseVirtualInput/index.less +2 -2
  210. package/lib/components/virtualInput/index.js +7 -1
  211. package/lib/hooks/useThemeTokens.js +40 -0
  212. package/lib/index.d.ts +1 -0
  213. package/lib/locales/en-US.d.ts +2 -0
  214. package/lib/locales/en-US.js +2 -0
  215. package/lib/locales/ja.d.ts +2 -0
  216. package/lib/locales/ja.js +2 -0
  217. package/lib/locales/pt.d.ts +2 -0
  218. package/lib/locales/pt.js +2 -0
  219. package/lib/locales/zh-CN.d.ts +2 -0
  220. package/lib/locales/zh-CN.js +2 -0
  221. package/lib/locales/zh-TW.d.ts +2 -0
  222. package/lib/locales/zh-TW.js +2 -0
  223. package/package.json +3 -3
  224. package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  225. package/es/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  226. package/es/components/virtualInput/index.d.ts +0 -24
  227. package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  228. package/lib/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  229. package/lib/components/virtualInput/index.d.ts +0 -24
@@ -0,0 +1,42 @@
1
+ import { ExpandState, LevelType } from '../types';
2
+ /**
3
+ * useExpand Hook 参数
4
+ */
5
+ interface UseExpandProps {
6
+ /** 初始展开状态 */
7
+ initialExpand?: Partial<ExpandState>;
8
+ }
9
+ /**
10
+ * useExpand Hook 返回值
11
+ */
12
+ interface UseExpandReturn {
13
+ /** 展开状态 */
14
+ expand: ExpandState;
15
+ /** 设置展开状态 */
16
+ setExpand: (state: ExpandState) => void;
17
+ /** 切换指定层级的展开状态 */
18
+ toggleExpand: (level: LevelType) => void;
19
+ /** 获取指定层级的展开状态 */
20
+ getExpand: (level: LevelType) => boolean;
21
+ closeAll: () => void;
22
+ }
23
+ /**
24
+ * Tabbar 展开状态管理 Hook
25
+ * 用于管理多层级的展开/收起状态
26
+ *
27
+ * @param props - Hook 配置参数
28
+ * @returns 展开状态和操作方法
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * const { expand, toggleExpand, getExpand } = useExpand({
33
+ * initialExpand: { level1: false }
34
+ * });
35
+ *
36
+ * <button onClick={() => toggleExpand('level1')}>
37
+ * {getExpand('level1') ? '收起' : '展开'}
38
+ * </button>
39
+ * ```
40
+ */
41
+ declare const useExpand: (props?: UseExpandProps) => UseExpandReturn;
42
+ export default useExpand;
@@ -0,0 +1,10 @@
1
+ import { TabbarLevelConfig, LevelType } from '../../types';
2
+ export { getExpandConfig, DEFAULT_ITEMS } from '../../constants';
3
+ /**
4
+ * 默认层级配置
5
+ */
6
+ export declare const DEFAULT_LEVEL_CONFIG: Record<LevelType, TabbarLevelConfig>;
7
+ /**
8
+ * 获取层级对应的添加项配置
9
+ */
10
+ export declare const LEVEL_ADD_ITEMS: Record<LevelType, ('all' | 'search' | 'expand')[]>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * PisellTabbar 工具函数
3
+ */
4
+ import { TabbarDataSource } from '../../../types';
5
+ /**
6
+ * 向数据源添加特殊项(如 all、search、expand 按钮)
7
+ *
8
+ * @param dataSource - 原始数据源
9
+ * @param keys - 要添加的特殊项 key 数组
10
+ * @returns 添加了特殊项的新数据源
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * const newData = addDataSourceItemsByKey(categoryData, ['expand', 'all']);
15
+ * // 返回: [expandItem, allItem, ...categoryData]
16
+ * ```
17
+ */
18
+ export declare const addDataSourceItemsByKey: (dataSource: TabbarDataSource[], keys: ('all' | 'search' | 'expand')[]) => TabbarDataSource[];
19
+ /**
20
+ * 获取默认激活的 key 数组
21
+ *
22
+ * @param dataSource - 数据源
23
+ * @param rowKey - 用作唯一标识的字段名
24
+ * @returns 默认激活的 key 数组(多层级)
25
+ *
26
+ * @description
27
+ * 默认选中第一项,如果第一项有子级,同时选中第一个子级
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * const defaultKeys = getDefaultActiveKey(categoryData, 'id');
32
+ * // 返回: [1, 0] (第一层级的第一项ID,第二层级的第一项ID)
33
+ * ```
34
+ */
35
+ export declare const getDefaultActiveKey: (dataSource: TabbarDataSource[], rowKey: string) => (string | number)[];
@@ -0,0 +1,90 @@
1
+ import { CSSProperties } from 'react';
2
+ /**
3
+ * Tabbar 数据源项类型
4
+ */
5
+ export interface TabbarDataSource {
6
+ /** 唯一标识 */
7
+ id: string | number;
8
+ /** 店铺ID */
9
+ shop_id?: number;
10
+ /** 父级ID */
11
+ parent_id?: number;
12
+ /** 显示名称 */
13
+ name: string;
14
+ /** URL slug */
15
+ slug?: string;
16
+ /** 图标 URL 或图标名称 */
17
+ icon?: string;
18
+ /** 子级数据 */
19
+ children?: TabbarDataSource[];
20
+ /** 自定义点击事件标识 */
21
+ customClick?: boolean;
22
+ /** 唯一 key */
23
+ key?: string;
24
+ }
25
+ /**
26
+ * 层级配置
27
+ */
28
+ export interface TabbarLevelConfig {
29
+ /** SuperTabs 背景色 */
30
+ superTabsBg: string;
31
+ /** 卡片宽度 */
32
+ cardWidth: number;
33
+ /** 卡片高度 */
34
+ cardHeight: number;
35
+ /** 左侧缩进 */
36
+ paddingLeft?: number;
37
+ }
38
+ /**
39
+ * 展开配置
40
+ */
41
+ export interface ExpandConfig {
42
+ /** 激活状态配置 */
43
+ active: {
44
+ icon: string;
45
+ text: string;
46
+ };
47
+ /** 未激活状态配置 */
48
+ inactive: {
49
+ icon: string;
50
+ text: string;
51
+ };
52
+ }
53
+ /**
54
+ * 展开状态
55
+ */
56
+ export interface ExpandState {
57
+ level1: boolean;
58
+ level2: boolean;
59
+ level3: boolean;
60
+ }
61
+ /**
62
+ * 层级类型
63
+ */
64
+ export declare type LevelType = 'level1' | 'level2' | 'level3';
65
+ /**
66
+ * PisellTabbar 组件属性
67
+ */
68
+ export interface PisellTabbarProps {
69
+ /** 数据源 */
70
+ dataSource?: TabbarDataSource[];
71
+ /** 当前选中的值(多层级 key 数组) */
72
+ value?: (string | number)[];
73
+ /** 值变化回调 */
74
+ onChange?: (value: (string | number)[]) => void;
75
+ /** 自定义类名 */
76
+ className?: string;
77
+ /** 自定义样式 */
78
+ style?: CSSProperties;
79
+ /** 层级配置(可按层级自定义) */
80
+ levelConfig?: Partial<Record<LevelType, Partial<TabbarLevelConfig>>>;
81
+ /** 展开配置 */
82
+ expandConfig?: ExpandConfig;
83
+ /** 最大层级数 */
84
+ maxLevel?: 1 | 2 | 3;
85
+ onSearch?: (value: string) => void;
86
+ __designMode?: boolean;
87
+ }
88
+ export interface PisellTabbarRef {
89
+ closeSearchMode: () => void;
90
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * PisellTabbar 工具函数
3
+ */
4
+ import { TabbarDataSource } from '../types';
5
+ /**
6
+ * 默认的特殊项配置
7
+ */
8
+ export declare const defaultItems: {
9
+ all: {
10
+ id: number;
11
+ shop_id: number;
12
+ parent_id: number;
13
+ name: any;
14
+ slug: string;
15
+ icon: string;
16
+ };
17
+ search: {
18
+ id: number;
19
+ shop_id: number;
20
+ parent_id: number;
21
+ name: any;
22
+ text: any;
23
+ slug: string;
24
+ key: string;
25
+ icon: string;
26
+ customClick: boolean;
27
+ };
28
+ expand: {
29
+ id: number;
30
+ shop_id: number;
31
+ parent_id: number;
32
+ key: string;
33
+ icon: string;
34
+ name: string;
35
+ slug: string;
36
+ customClick: boolean;
37
+ };
38
+ };
39
+ /**
40
+ * 向数据源添加特殊项(如 all、search、expand 按钮)
41
+ *
42
+ * @param dataSource - 原始数据源
43
+ * @param keys - 要添加的特殊项 key 数组
44
+ * @returns 添加了特殊项的新数据源
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * const newData = addDataSourceItemsByKey(categoryData, ['expand', 'all']);
49
+ * // 返回: [expandItem, allItem, ...categoryData]
50
+ * ```
51
+ */
52
+ export declare const addDataSourceItemsByKey: (dataSource: TabbarDataSource[], keys: ('all' | 'search' | 'expand')[]) => TabbarDataSource[];
53
+ /**
54
+ * 获取默认激活的 key 数组
55
+ *
56
+ * @param dataSource - 数据源
57
+ * @param rowKey - 用作唯一标识的字段名
58
+ * @returns 默认激活的 key 数组(多层级)
59
+ *
60
+ * @description
61
+ * 默认选中第一项,如果第一项有子级,同时选中第一个子级
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * const defaultKeys = getDefaultActiveKey(categoryData, 'id');
66
+ * // 返回: [1, 0] (第一层级的第一项ID,第二层级的第一项ID)
67
+ * ```
68
+ */
69
+ export declare const getDefaultActiveKey: (dataSource: TabbarDataSource[], rowKey: string) => (string | number)[];
@@ -44,7 +44,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
44
44
  }) => React.JSX.Element;
45
45
  export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
46
46
  options?: any;
47
- optionSourceType?: "custom" | "default" | "api" | undefined;
47
+ optionSourceType?: "default" | "api" | "custom" | undefined;
48
48
  labelField: string;
49
49
  valueField: string;
50
50
  extraParams?: Record<string, any> | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const useDrawerState: (operationContent?: {
2
3
  [key: string]: import("react").ReactNode;
3
4
  } | undefined) => any;
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
22
+ title: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
23
23
  pagination: {
24
24
  total: number;
25
25
  current: number;
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
28
28
  showSizeChanger: boolean;
29
29
  };
30
30
  columns: import("./useColumns").Column[];
31
- subTitle: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
31
+ subTitle: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
32
32
  buttons: any[] | null;
33
33
  filter: {
34
34
  dom: any;
@@ -52,7 +52,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
52
52
  show: boolean;
53
53
  title: string;
54
54
  width: number;
55
- align: "center" | "left" | "right";
55
+ align: "left" | "right" | "center";
56
56
  fixed: false | "left" | "right";
57
57
  type: "link" | "button";
58
58
  items: OperationItem[];
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 获取nocobase数据列表
3
+ */
4
+ export declare const getCountryDataList: () => Promise<any>;
5
+ export interface Country {
6
+ id: number;
7
+ name: {
8
+ en: string;
9
+ 'zh-CN': string;
10
+ 'zh-HK': string;
11
+ 'ja': string;
12
+ 'pt': string;
13
+ original: string;
14
+ };
15
+ code: string;
16
+ calling_code: string;
17
+ currency_code: string;
18
+ sort: number;
19
+ status: string;
20
+ created_at: string;
21
+ updated_at: string;
22
+ prefix: string;
23
+ }
24
+ export declare const useCountries: () => {
25
+ data: Country[];
26
+ };
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "xzero" | "saas";
5
+ rootDomain: "saas" | "custom" | "xzero";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
3
3
  options?: any;
4
- optionSourceType?: "custom" | "default" | "api" | undefined;
4
+ optionSourceType?: "default" | "api" | "custom" | undefined;
5
5
  labelField: string;
6
6
  valueField: string;
7
7
  extraParams?: Record<string, any> | undefined;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { TranslationProps } from './type';
3
+ import './index.less';
4
+ declare const Translation: React.FC<TranslationProps>;
5
+ export default Translation;
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { ModeType } from "../../dataSourceForm/type";
3
+ export interface TranslationValue {
4
+ en: string;
5
+ 'zh-CN': string;
6
+ 'zh-HK': string;
7
+ 'ja': string;
8
+ 'pt': string;
9
+ original: string;
10
+ }
11
+ export interface TranslationProps {
12
+ renderMode: ModeType;
13
+ value?: TranslationValue;
14
+ onChange?: (value: TranslationValue) => void;
15
+ disabled?: boolean;
16
+ placeholder?: string;
17
+ className?: string;
18
+ type?: 'text' | 'textarea';
19
+ maxLength?: number;
20
+ inputStyle?: React.CSSProperties;
21
+ }
@@ -20,7 +20,7 @@ declare const formFieldMap: {
20
20
  Subdomain: import("react").FC<import("antd").InputProps & {
21
21
  onChange: (value: string) => void;
22
22
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
23
- rootDomain: "custom" | "xzero" | "saas";
23
+ rootDomain: "saas" | "custom" | "xzero";
24
24
  customDomain?: string | undefined;
25
25
  value?: string | undefined;
26
26
  tenantId: string;
@@ -35,7 +35,7 @@ declare const formFieldMap: {
35
35
  };
36
36
  FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
37
37
  options?: any;
38
- optionSourceType?: "custom" | "default" | "api" | undefined;
38
+ optionSourceType?: "default" | "api" | "custom" | undefined;
39
39
  labelField: string;
40
40
  valueField: string;
41
41
  extraParams?: Record<string, any> | undefined;
@@ -61,11 +61,20 @@ declare const formFieldMap: {
61
61
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
62
62
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
63
63
  };
64
- declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
64
+ declare const getFieldComponent: (fieldComponent: string) => ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
65
+ options?: any;
66
+ optionSourceType?: "default" | "api" | "custom" | undefined;
67
+ labelField: string;
68
+ valueField: string;
69
+ extraParams?: Record<string, any> | undefined;
70
+ } & {
71
+ dataSource?: any;
72
+ extraParams?: Record<string, any> | undefined;
73
+ }) => import("react").JSX.Element) | (import("react").FC<{}> & {
65
74
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
66
75
  } & {
67
76
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
68
- }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
77
+ }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
69
78
  JSON: import("react").FC<any>;
70
79
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
71
80
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
@@ -78,7 +87,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
78
87
  Subdomain: import("react").FC<import("antd").InputProps & {
79
88
  onChange: (value: string) => void;
80
89
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
81
- rootDomain: "custom" | "xzero" | "saas";
90
+ rootDomain: "saas" | "custom" | "xzero";
82
91
  customDomain?: string | undefined;
83
92
  value?: string | undefined;
84
93
  tenantId: string;
@@ -89,16 +98,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
89
98
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
90
99
  } & {
91
100
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
92
- }) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
93
- options?: any;
94
- optionSourceType?: "custom" | "default" | "api" | undefined;
95
- labelField: string;
96
- valueField: string;
97
- extraParams?: Record<string, any> | undefined;
98
- } & {
99
- dataSource?: any;
100
- extraParams?: Record<string, any> | undefined;
101
- }) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
101
+ }) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
102
102
  onChange: (value: string) => void;
103
103
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
104
104
  export { getFieldComponent, formFieldMap };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export interface VariablesContextType {
3
+ children?: React.ReactNode;
4
+ variables?: Record<string, any>;
5
+ registerVariable?: (value: Record<string, any>) => void;
6
+ parseVariable?: (str: string, localVariables?: Record<string, any>) => any;
7
+ registerValueVariable?: (componentId: string, value: Record<string, any>) => void;
8
+ registerFunctionVariable?: (componentId: string, value: Record<string, any>) => void;
9
+ subscribeVariables?: (listener: (allVariables: Record<string, any>, updateVariables: Record<string, any>) => void) => () => void;
10
+ config?: {
11
+ disabledHistoryListener?: boolean;
12
+ };
13
+ }
14
+ export declare const VariablesContext: import("react").Context<VariablesContextType>;
15
+ export default VariablesContext;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { ValueProps, SortType } from '../types';
4
+ declare type IdType = string | number;
5
+ declare type TreeItemProps = {
6
+ id: string | number;
7
+ key: string | number;
8
+ item: ValueProps | any;
9
+ depth: number;
10
+ lists: any[];
11
+ childrenProps?: SortType;
12
+ sensors?: any;
13
+ expandedKeys?: IdType[];
14
+ setExpandedKeys?: any;
15
+ onSelectKeys?: (ids: IdType) => void;
16
+ onChange?: (value: any[]) => void;
17
+ };
18
+ declare const TreeItem: (props: TreeItemProps) => React.JSX.Element;
19
+ export default TreeItem;
@@ -0,0 +1,32 @@
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
+ };
@@ -71,10 +71,8 @@ export var PisellDateTimeDisplay = function PisellDateTimeDisplay(props) {
71
71
  style = props.style;
72
72
  var context = useEngineContext();
73
73
  var resolvedLocale = locale || (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en';
74
- console.log('resolvedLocale', resolvedLocale);
75
74
  // 多语言格式:formatByLocale 优先,否则用内置 DATETIME_DISPLAY_FORMATS;再与单项 props 合并(单项优先)
76
75
  var localeKey = getDayjsLocale(resolvedLocale);
77
- console.log('localeKey', localeKey);
78
76
  var baseLocale = localeKey.split('-')[0];
79
77
  var presetSource = formatByLocale !== null && formatByLocale !== void 0 ? formatByLocale : DATETIME_DISPLAY_FORMATS;
80
78
  var preset = (_ref = (_presetSource$localeK = presetSource[localeKey]) !== null && _presetSource$localeK !== void 0 ? _presetSource$localeK : presetSource[baseLocale]) !== null && _ref !== void 0 ? _ref : {};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * PisellDateTimeDisplay 按语言预设的格式
3
- * - zh-cn:完整日期 - 时间 星期(如 2025-12-31 - 2:00 周四)、相对日今天/昨天/明天
4
- * - en:时间 星期, 日期(如 2:00 Sat, 21 Mar, 2026)、相对日 Today/Yesterday/Tomorrow
3
+ * - zh-cn:完整日期 - 时间 星期(如 2025-12-31 - 2:00 周四);默认不展示相对日,可传 dateFormat.showRelativeDay: true 开启
4
+ * - en:时间 星期, 日期(如 2:00 Sat, 21 Mar, 2026);默认不展示相对日,可传 dateFormat.showRelativeDay: true 开启
5
5
  */
6
6
  export var DATETIME_DISPLAY_FORMATS = {
7
7
  'zh-cn': {
@@ -10,7 +10,7 @@ export var DATETIME_DISPLAY_FORMATS = {
10
10
  showYear: true,
11
11
  separator: '-',
12
12
  showChineseUnit: false,
13
- showRelativeDay: true
13
+ showRelativeDay: false
14
14
  },
15
15
  timeFormat: {
16
16
  use12Hour: false,
@@ -35,7 +35,7 @@ export var DATETIME_DISPLAY_FORMATS = {
35
35
  showYear: true,
36
36
  separator: '-',
37
37
  showChineseUnit: false,
38
- showRelativeDay: true
38
+ showRelativeDay: false
39
39
  },
40
40
  timeFormat: {
41
41
  use12Hour: false,
@@ -58,7 +58,7 @@ export var DATETIME_DISPLAY_FORMATS = {
58
58
  order: 'DMY',
59
59
  shortMonth: true,
60
60
  showYear: true,
61
- showRelativeDay: true,
61
+ showRelativeDay: false,
62
62
  useCommaBeforeYear: true
63
63
  },
64
64
  timeFormat: {
@@ -0,0 +1,4 @@
1
+ import { GridProProps } from './GridPro';
2
+ export type { GridProProps };
3
+ declare const PisellGridPro: any;
4
+ export default PisellGridPro;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { LookupTriggerProps, LookupTriggerRef } from '../types';
3
+ export declare const LookupTrigger: React.ForwardRefExoticComponent<LookupTriggerProps & React.RefAttributes<LookupTriggerRef>>;
@@ -114,9 +114,8 @@ var LookupTriggerComponent = /*#__PURE__*/forwardRef(function (props, ref) {
114
114
  */
115
115
  var getAppScanBarcodePlugin = function getAppScanBarcodePlugin() {
116
116
  if (getApp) {
117
- var _app$getPlugin;
118
117
  var app = getApp();
119
- var scanBarcode = app === null || app === void 0 || (_app$getPlugin = app.getPlugin('scan')) === null || _app$getPlugin === void 0 ? void 0 : _app$getPlugin.scanBarcode;
118
+ var scanBarcode = app === null || app === void 0 ? void 0 : app.getPlugin('webScan');
120
119
  if (scanBarcode) {
121
120
  return scanBarcode;
122
121
  }
@@ -134,19 +133,23 @@ var LookupTriggerComponent = /*#__PURE__*/forwardRef(function (props, ref) {
134
133
  var app = getApp();
135
134
  try {
136
135
  var scanBarcode = getAppScanBarcodePlugin();
137
- scanBarcode({
138
- hint: 17
136
+ scanBarcode.scan({
137
+ type: "capacitor",
138
+ params: {
139
+ hint: 17
140
+ }
139
141
  }).then(function (res) {
140
- return onScan === null || onScan === void 0 ? void 0 : onScan(res === null || res === void 0 ? void 0 : res.ScanResult);
141
- }).catch(function (err) {
142
- app.logger.addLog({
143
- type: 'info',
144
- title: '扫码失败',
145
- metadata: {
146
- err: err
147
- }
148
- });
142
+ onScan === null || onScan === void 0 || onScan(res);
149
143
  });
144
+ // scanBarcode({ hint: 17 })
145
+ // .then((res: { ScanResult: string }) => onScan?.(res?.ScanResult))
146
+ // .catch((err: any) => {
147
+ // app.logger.addLog({
148
+ // type: 'info',
149
+ // title: '扫码失败',
150
+ // metadata: { err },
151
+ // });
152
+ // });
150
153
  } catch (err) {
151
154
  app.logger.addLog({
152
155
  type: 'error',
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import PisellMetricCard from './PisellMetricCard';
3
+ declare const meta: Meta<typeof PisellMetricCard>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof PisellMetricCard>;
6
+ export declare const Basic: Story;
7
+ export declare const WithCurrency: Story;
8
+ export declare const PositiveTrend: Story;
9
+ export declare const NegativeTrend: Story;
10
+ export declare const WithGrouping: Story;
11
+ export declare const WithPrecision: Story;
12
+ export declare const Complete: Story;
13
+ export declare const WithTag: Story;
14
+ export declare const CustomStyle: Story;
15
+ export declare const Loading: Story;
16
+ export declare const EmptyValue: Story;
17
+ export declare const MultipleCards: Story;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 子组件导出
3
+ */
4
+ export { default as TrendIcon } from './TrendIcon';
5
+ export { default as MetricValue } from './MetricValue';
6
+ export { default as MetricTitle } from './MetricTitle';
7
+ export { default as MetricComparison } from './MetricComparison';