@pisell/materials 6.11.13 → 6.11.14

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 (147) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +7 -0
  8. package/es/components/PisellSteps/PisellSteps.d.ts +14 -0
  9. package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
  10. package/es/components/PisellSuperTabs/hooks/index.d.ts +1 -0
  11. package/es/components/PisellSuperTabs/hooks/useTabsState.d.ts +7 -0
  12. package/es/components/PisellSuperTabs/index.d.ts +3 -0
  13. package/es/components/PisellSuperTabs/types.d.ts +212 -0
  14. package/es/components/PisellTabbar/constants.d.ts +47 -0
  15. package/es/components/PisellTabbar/hooks/index.d.ts +2 -0
  16. package/es/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
  17. package/es/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
  18. package/es/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  19. package/es/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  20. package/es/components/PisellTabbar/types.d.ts +90 -0
  21. package/es/components/PisellTabbar/utils/index.d.ts +69 -0
  22. package/es/components/cardPro/index.d.ts +4 -0
  23. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  24. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  25. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  26. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
  27. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  28. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  29. package/es/components/dataSourceComponents/fields/index.d.ts +4 -4
  30. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
  31. package/es/components/iconfont/index.d.ts +8 -0
  32. package/es/components/pisell-config-provider/context.d.ts +22 -0
  33. package/es/components/pisellAdjustPrice/type.d.ts +22 -0
  34. package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  35. package/es/components/pisellDatePicker/index.d.ts +1 -0
  36. package/es/components/pisellEmpty/index.d.ts +19 -0
  37. package/es/components/pisellLookup/PisellLookup.d.ts +4 -0
  38. package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
  39. package/es/components/pisellStatisticList/index.d.ts +22 -0
  40. package/es/components/pisellToast/squareToast/index.d.ts +15 -0
  41. package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
  42. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  43. package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
  44. package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
  45. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  46. package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
  47. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  48. package/es/components/productCard/cartSkuCard/components/holders/index.js +1 -1
  49. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  50. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +9 -0
  51. package/es/components/productCard/cartSkuCard/index.d.ts +11 -0
  52. package/es/components/productCard/cartSkuCard/locales.d.ts +178 -0
  53. package/es/components/productCard/components/Action/index.d.ts +4 -0
  54. package/es/components/productCard/locales.d.ts +138 -0
  55. package/es/components/productCard/status.d.ts +32 -0
  56. package/es/components/productCard/types.d.ts +95 -0
  57. package/es/components/select/index.d.ts +9 -0
  58. package/es/components/table/Table/fields/select/Edit/index.d.ts +4 -0
  59. package/es/components/table/Table/utils.d.ts +1 -1
  60. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
  61. package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
  62. package/es/locales/en-US.d.ts +384 -0
  63. package/es/locales/index.d.ts +1 -0
  64. package/es/locales/ja.d.ts +348 -0
  65. package/es/locales/pt.d.ts +348 -0
  66. package/es/locales/zh-CN.d.ts +379 -0
  67. package/es/locales/zh-TW.d.ts +379 -0
  68. package/lib/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +7 -0
  69. package/lib/components/PisellSteps/PisellSteps.d.ts +14 -0
  70. package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
  71. package/lib/components/PisellSuperTabs/hooks/index.d.ts +1 -0
  72. package/lib/components/PisellSuperTabs/hooks/useTabsState.d.ts +7 -0
  73. package/lib/components/PisellSuperTabs/index.d.ts +3 -0
  74. package/lib/components/PisellSuperTabs/types.d.ts +212 -0
  75. package/lib/components/PisellTabbar/constants.d.ts +47 -0
  76. package/lib/components/PisellTabbar/hooks/index.d.ts +2 -0
  77. package/lib/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
  78. package/lib/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
  79. package/lib/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  80. package/lib/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  81. package/lib/components/PisellTabbar/types.d.ts +90 -0
  82. package/lib/components/PisellTabbar/utils/index.d.ts +69 -0
  83. package/lib/components/cardPro/index.d.ts +4 -0
  84. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  85. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  86. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  87. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
  88. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  89. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  90. package/lib/components/dataSourceComponents/fields/index.d.ts +4 -4
  91. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
  92. package/lib/components/iconfont/index.d.ts +8 -0
  93. package/lib/components/pisell-config-provider/context.d.ts +22 -0
  94. package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
  95. package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  96. package/lib/components/pisellDatePicker/index.d.ts +1 -0
  97. package/lib/components/pisellEmpty/index.d.ts +19 -0
  98. package/lib/components/pisellLookup/PisellLookup.d.ts +4 -0
  99. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
  100. package/lib/components/pisellStatisticList/index.d.ts +22 -0
  101. package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
  102. package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
  103. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  104. package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
  105. package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
  106. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  107. package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
  108. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  109. package/lib/components/productCard/cartSkuCard/components/holders/index.js +1 -1
  110. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  111. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +9 -0
  112. package/lib/components/productCard/cartSkuCard/index.d.ts +11 -0
  113. package/lib/components/productCard/cartSkuCard/locales.d.ts +178 -0
  114. package/lib/components/productCard/components/Action/index.d.ts +4 -0
  115. package/lib/components/productCard/locales.d.ts +138 -0
  116. package/lib/components/productCard/status.d.ts +32 -0
  117. package/lib/components/productCard/types.d.ts +95 -0
  118. package/lib/components/select/index.d.ts +9 -0
  119. package/lib/components/table/Table/fields/select/Edit/index.d.ts +4 -0
  120. package/lib/components/table/Table/utils.d.ts +1 -1
  121. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
  122. package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
  123. package/lib/locales/en-US.d.ts +384 -0
  124. package/lib/locales/index.d.ts +1 -0
  125. package/lib/locales/ja.d.ts +348 -0
  126. package/lib/locales/pt.d.ts +348 -0
  127. package/lib/locales/zh-CN.d.ts +379 -0
  128. package/lib/locales/zh-TW.d.ts +379 -0
  129. package/package.json +3 -3
  130. package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +0 -24
  131. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -8
  132. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +0 -8
  133. package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +0 -10
  134. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +0 -11
  135. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +0 -16
  136. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
  137. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -4
  138. package/es/components/sort/index.d.ts +0 -5
  139. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +0 -24
  140. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -8
  141. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +0 -8
  142. package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +0 -10
  143. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +0 -11
  144. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +0 -16
  145. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
  146. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -4
  147. package/lib/components/sort/index.d.ts +0 -5
@@ -0,0 +1,47 @@
1
+ import { TabbarLevelConfig, ExpandConfig, LevelType } from './types';
2
+ /**
3
+ * 默认层级配置
4
+ */
5
+ export declare const DEFAULT_LEVEL_CONFIG: Record<LevelType, TabbarLevelConfig>;
6
+ /**
7
+ * 获取展开配置
8
+ */
9
+ export declare const getExpandConfig: () => ExpandConfig;
10
+ /**
11
+ * 默认数据项配置
12
+ */
13
+ export declare const DEFAULT_ITEMS: {
14
+ all: {
15
+ id: string;
16
+ shop_id: number;
17
+ parent_id: number;
18
+ name: any;
19
+ slug: string;
20
+ icon: string;
21
+ };
22
+ search: {
23
+ id: string;
24
+ shop_id: number;
25
+ parent_id: number;
26
+ name: any;
27
+ text: any;
28
+ slug: string;
29
+ key: string;
30
+ icon: string;
31
+ customClick: boolean;
32
+ };
33
+ expand: {
34
+ id: string;
35
+ shop_id: number;
36
+ parent_id: number;
37
+ key: string;
38
+ icon: string;
39
+ name: string;
40
+ slug: string;
41
+ customClick: boolean;
42
+ };
43
+ };
44
+ /**
45
+ * 获取层级对应的添加项配置
46
+ */
47
+ export declare const LEVEL_ADD_ITEMS: Record<LevelType, ('all' | 'search' | 'expand')[]>;
@@ -0,0 +1,2 @@
1
+ export { default as useActiveKey } from './useActiveKey';
2
+ export { default as useExpand } from './useExpand';
@@ -0,0 +1,55 @@
1
+ /**
2
+ * useActiveKey Hook 参数
3
+ */
4
+ interface UseActiveKeyProps {
5
+ /** 初始激活的 key 数组(对应多层级) */
6
+ initialActiveKey?: (string | number)[];
7
+ /** key 变化回调 */
8
+ onChange?: (value: (string | number)[]) => void;
9
+ }
10
+ /**
11
+ * useActiveKey Hook 返回值
12
+ */
13
+ interface UseActiveKeyReturn {
14
+ /** 当前激活的 key 数组 */
15
+ activeKey: (string | number)[];
16
+ /** 设置指定层级的激活 key */
17
+ setActiveKey: (level: number, key: string | number, cKey?: string | number) => void;
18
+ /** 获取指定层级的激活 key */
19
+ getActiveKey: (level: number) => string | number;
20
+ /** 内部设置方法(用于同步外部值) */
21
+ _setActiveKey: (value: (string | number)[]) => void;
22
+ /** 设置缓存key */
23
+ setCacheActiveKey: (val: (string | number)[]) => void;
24
+ /** 重置value为缓存key */
25
+ resetActiveKey: () => void;
26
+ /** 获取缓存key */
27
+ getCacheActiveKey: () => (string | number)[];
28
+ }
29
+ /**
30
+ * Tabbar 激活状态管理 Hook
31
+ *
32
+ * 用于管理多层级 Tabbar 的激活状态,支持级联选择
33
+ *
34
+ * @param props - Hook 配置参数
35
+ * @returns 激活状态和操作方法
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * const { activeKey, setActiveKey, getActiveKey } = useActiveKey({
40
+ * initialActiveKey: [1, 10],
41
+ * onChange: (value) => console.log('当前选中:', value)
42
+ * });
43
+ *
44
+ * // 设置第 0 层级的 key,并清除后续层级
45
+ * setActiveKey(0, '2');
46
+ *
47
+ * // 设置第 0 层级的 key,并同时设置第 1 层级
48
+ * setActiveKey(0, '2', '20');
49
+ *
50
+ * // 获取第 0 层级的 key
51
+ * const level0Key = getActiveKey(0);
52
+ * ```
53
+ */
54
+ declare const useActiveKey: (props: UseActiveKeyProps) => UseActiveKeyReturn;
55
+ export default useActiveKey;
@@ -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)[];
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: (props: any) => React.JSX.Element;
4
+ export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const useDataSourceKey: () => {
2
3
  dataSourceKey: string | undefined;
3
4
  dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
22
+ title: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => 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 | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
31
+ subTitle: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
32
32
  buttons: any[] | null;
33
33
  filter: {
34
34
  dom: any;
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
72
72
  useCustomAction: boolean;
73
73
  actionType: string;
74
74
  openMode: "modal" | "drawer";
75
- openContentSize: "small" | "middle" | "large";
75
+ openContentSize: "small" | "large" | "middle";
76
76
  openTitle: string;
77
77
  key: string;
78
78
  } | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DataSourceTableProps } from '../type';
2
3
  declare type Params = {
3
4
  pagination?: {
@@ -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" | "saas" | "xzero";
5
+ rootDomain: "custom" | "xzero" | "saas";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
15
15
  metadata?: MediaMetadata;
16
16
  }) => Record<string, any>;
17
17
  export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
18
- export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
18
+ export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
@@ -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" | "saas" | "xzero";
23
+ rootDomain: "custom" | "xzero" | "saas";
24
24
  customDomain?: string | undefined;
25
25
  value?: string | undefined;
26
26
  tenantId: string;
@@ -61,7 +61,7 @@ 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<{}> & {
64
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
65
65
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
66
66
  } & {
67
67
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -78,7 +78,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
78
78
  Subdomain: import("react").FC<import("antd").InputProps & {
79
79
  onChange: (value: string) => void;
80
80
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
81
- rootDomain: "custom" | "saas" | "xzero";
81
+ rootDomain: "custom" | "xzero" | "saas";
82
82
  customDomain?: string | undefined;
83
83
  value?: string | undefined;
84
84
  tenantId: string;
@@ -98,7 +98,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
98
98
  } & {
99
99
  dataSource?: any;
100
100
  extraParams?: Record<string, any> | undefined;
101
- }) => import("react").JSX.Element) | 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 & {
101
+ }) => import("react").JSX.Element) | 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,8 @@
1
+ import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
2
+ import React from 'react';
3
+ interface IconFontProps extends IconComponentProps {
4
+ type: string;
5
+ onClick?: React.MouseEventHandler<HTMLSpanElement>;
6
+ }
7
+ declare const IconFont: React.FC<IconFontProps>;
8
+ export default IconFont;
@@ -0,0 +1,22 @@
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;
@@ -0,0 +1,22 @@
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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const useDataSourceKey: () => {
2
3
  dataSourceKey: string | undefined;
3
4
  dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const PisellDatePicker: (props: any) => import("react").JSX.Element;
2
3
  export default PisellDatePicker;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { EmptyProps } from 'antd';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ import './index.less';
5
+ export interface PisellEmptyProps extends EmptyProps {
6
+ /** 平台 */
7
+ platform?: PisellContextType['platform'];
8
+ /** 额外内容描述 */
9
+ extraDescription?: React.ReactNode;
10
+ /** 额外内容描述 */
11
+ icon?: React.ReactNode;
12
+ /** 自定义底部额外操作区域 */
13
+ footer?: React.ReactNode;
14
+ [key: string]: any;
15
+ /** 最大宽度 */
16
+ maxWidth?: number;
17
+ }
18
+ declare const PisellEmpty: (props: PisellEmptyProps) => React.JSX.Element;
19
+ export default PisellEmpty;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { PisellLookupProps, PisellLookupRef } from './types';
3
+ import './PisellLookup.less';
4
+ export declare const PisellLookup: React.ForwardRefExoticComponent<PisellLookupProps & React.RefAttributes<PisellLookupRef>>;
@@ -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>>;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface PisellStatisticListProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ isHasBorder?: boolean;
5
+ backgroundColors?: string[];
6
+ labelColor?: string;
7
+ valueColor?: string;
8
+ data: {
9
+ label: string;
10
+ value: string;
11
+ isLink?: boolean;
12
+ link?: string;
13
+ tip?: string;
14
+ onClick?: () => void;
15
+ children?: {
16
+ label: string;
17
+ value: string;
18
+ }[];
19
+ }[];
20
+ }
21
+ declare const PisellStatisticList: (props: PisellStatisticListProps) => React.JSX.Element;
22
+ export default PisellStatisticList;
@@ -0,0 +1,15 @@
1
+ import { clear, show, success, info, loading, fail, hide } from './methods';
2
+ import './index.less';
3
+ interface ToastInstance {
4
+ show: typeof show;
5
+ clear: typeof clear;
6
+ success: typeof success;
7
+ info: typeof info;
8
+ loading: typeof loading;
9
+ fail: typeof fail;
10
+ error: typeof fail;
11
+ hide: typeof hide;
12
+ }
13
+ declare const Toast: ToastInstance;
14
+ export declare const useToast: () => ToastInstance;
15
+ export default Toast;
@@ -0,0 +1,13 @@
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 };