@pisell/materials 1.0.1051 → 1.0.1053

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 (169) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +13 -13
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +13 -13
  11. package/es/components/PisellCards/index.d.ts +6 -6
  12. package/es/components/appVersionControl/index.js +1 -1
  13. package/es/components/calendar/index.d.ts +2 -2
  14. package/es/components/checkbox/index.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +3 -3
  16. package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
  17. package/es/components/dataSourceComponents/dataSourceForm/index.js +1 -1
  18. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +2 -2
  19. package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
  20. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  21. package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +16 -0
  22. package/es/components/dataSourceComponents/dataSourceSubForm/index.js +329 -0
  23. package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
  24. package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +538 -0
  25. package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
  26. package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +121 -0
  27. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +1 -1
  28. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +1 -1
  29. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -1
  30. package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
  31. package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +3 -3
  32. package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +1 -1
  33. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +1 -1
  34. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +1 -1
  35. package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +2 -2
  36. package/es/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
  37. package/es/components/dataSourceComponents/fields/RecordListWrapper/README.md +247 -0
  38. package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +39 -0
  39. package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +84 -0
  40. package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +17 -0
  41. package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +9 -0
  42. package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +91 -0
  43. package/es/components/dataSourceComponents/fields/Select/WithMode.js +1 -1
  44. package/es/components/dataSourceComponents/fields/Select/index.d.ts +3 -3
  45. package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
  46. package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +75 -0
  47. package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +55 -0
  48. package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +13 -0
  49. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +19 -0
  50. package/es/components/dataSourceComponents/fields/Tabs/index.js +10 -0
  51. package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +36 -0
  52. package/es/components/dataSourceComponents/fields/index.js +5 -1
  53. package/es/components/dataSourceComponents/fields/utils.js +3 -0
  54. package/es/components/dataSourceComponents/hooks/useActions.js +1 -1
  55. package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
  56. package/es/components/date-picker/index.d.ts +2 -2
  57. package/es/components/input/index.d.ts +2 -2
  58. package/es/components/pisell-config-provider/context.d.ts +2 -2
  59. package/es/components/pisellDataSourceContainer/type.d.ts +1 -1
  60. package/es/components/pisellDatePicker/index.d.ts +2 -2
  61. package/es/components/pisellInput/components/Copy/index.js +1 -1
  62. package/es/components/pisellModal/index.d.ts +6 -6
  63. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +15 -7
  64. package/es/components/pisellQuickFilter/index.d.ts +2 -2
  65. package/es/components/pisellRecordBoard/PisellRecordBoard.js +10 -3
  66. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +3 -1
  67. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +4 -2
  68. package/es/components/pisellRecordBoard/types.d.ts +4 -0
  69. package/es/components/pisellSingleSelect/PisellSingleSelect.less +15 -0
  70. package/es/components/pisellWalletPassCard/index.js +1 -1
  71. package/es/components/radio/index.d.ts +2 -2
  72. package/es/components/section-footers/index.d.ts +2 -2
  73. package/es/components/select/index.less +18 -2
  74. package/es/components/skeleton/index.d.ts +2 -2
  75. package/es/components/table/Actions/component/ExportImport/index.js +1 -1
  76. package/es/components/table/Table/fields/select/Edit/index.js +1 -1
  77. package/es/components/table/Table/tableConfig/SortRow/index.js +1 -1
  78. package/es/components/table/Table/tableConfig/body/CellProvider/index.js +1 -1
  79. package/es/components/time-picker/index.d.ts +2 -2
  80. package/es/components/typography/index.d.ts +2 -2
  81. package/es/components/upload/index.d.ts +2 -2
  82. package/es/index.d.ts +5 -1
  83. package/es/index.js +8 -5
  84. package/lib/components/PisellCards/index.d.ts +6 -6
  85. package/lib/components/PisellFields/index.d.ts +12 -12
  86. package/lib/components/PisellLayouts/index.d.ts +9 -9
  87. package/lib/components/PisellMetrics/index.d.ts +4 -4
  88. package/lib/components/appVersionControl/index.js +4 -4
  89. package/lib/components/calendar/index.d.ts +2 -2
  90. package/lib/components/checkbox/index.d.ts +2 -2
  91. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +3 -3
  92. package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
  93. package/lib/components/dataSourceComponents/dataSourceForm/index.js +1 -1
  94. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +2 -2
  95. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
  96. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  97. package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +16 -0
  98. package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +332 -0
  99. package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
  100. package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +538 -0
  101. package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
  102. package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +121 -0
  103. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +1 -1
  104. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +1 -1
  105. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -1
  106. package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
  107. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +3 -3
  108. package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +1 -1
  109. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +1 -1
  110. package/lib/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
  111. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +1 -1
  112. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +2 -2
  113. package/lib/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
  114. package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +2 -2
  115. package/lib/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
  116. package/lib/components/dataSourceComponents/fields/RecordListWrapper/README.md +247 -0
  117. package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +41 -0
  118. package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +86 -0
  119. package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +17 -0
  120. package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +9 -0
  121. package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +91 -0
  122. package/lib/components/dataSourceComponents/fields/Select/WithMode.js +1 -1
  123. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  124. package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
  125. package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +78 -0
  126. package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +55 -0
  127. package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +13 -0
  128. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +19 -0
  129. package/lib/components/dataSourceComponents/fields/Tabs/index.js +10 -0
  130. package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +35 -0
  131. package/lib/components/dataSourceComponents/fields/index.js +37 -33
  132. package/lib/components/dataSourceComponents/fields/utils.js +3 -0
  133. package/lib/components/dataSourceComponents/hooks/useActions.js +1 -1
  134. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
  135. package/lib/components/date-picker/index.d.ts +2 -2
  136. package/lib/components/input/index.d.ts +2 -2
  137. package/lib/components/pisell-config-provider/context.d.ts +2 -2
  138. package/lib/components/pisellDataSourceContainer/components/Pagination/index.d.ts +2 -2
  139. package/lib/components/pisellDataSourceContainer/components/Table/index.d.ts +2 -2
  140. package/lib/components/pisellDataSourceContainer/type.d.ts +1 -1
  141. package/lib/components/pisellDatePicker/index.d.ts +2 -2
  142. package/lib/components/pisellInput/components/Copy/index.js +1 -1
  143. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +15 -7
  144. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +10 -3
  145. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +3 -1
  146. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +4 -2
  147. package/lib/components/pisellRecordBoard/types.d.ts +4 -0
  148. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +15 -0
  149. package/lib/components/pisellWalletPassCard/index.js +1 -1
  150. package/lib/components/radio/index.d.ts +2 -2
  151. package/lib/components/section-footers/index.d.ts +2 -2
  152. package/lib/components/select/index.less +18 -2
  153. package/lib/components/skeleton/index.d.ts +2 -2
  154. package/lib/components/table/Actions/component/ExportImport/index.js +1 -1
  155. package/lib/components/table/Table/fields/select/Edit/index.js +1 -1
  156. package/lib/components/table/Table/tableConfig/SortRow/index.js +1 -1
  157. package/lib/components/table/Table/tableConfig/body/CellProvider/index.js +1 -1
  158. package/lib/components/time-picker/index.d.ts +2 -2
  159. package/lib/components/upload/index.d.ts +2 -2
  160. package/lib/index.d.ts +5 -1
  161. package/lib/index.js +256 -250
  162. package/lowcode/data-source-form/constants.ts +3 -0
  163. package/lowcode/data-source-form/utils.ts +19 -5
  164. package/lowcode/data-source-sub-form/meta.ts +274 -0
  165. package/lowcode/data-source-sub-form/snippets.ts +135 -0
  166. package/lowcode/form-item-record-list-wrapper/meta.ts +246 -0
  167. package/lowcode/form-item-record-list-wrapper/snippets.ts +24 -0
  168. package/lowcode/form-item-tabs/meta.ts +172 -0
  169. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ import { RecordListWrapperProps } from "./type.js";
2
+ import { WithFormItemProps, WithModeProps } from "../../dataSourceForm/utils.js";
3
+ import React from "react";
4
+
5
+ //#region src/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts
6
+ declare const RecordListWrapperWithDataSource: (props: RecordListWrapperProps & WithModeProps & WithFormItemProps & {
7
+ options?: any;
8
+ optionSourceType?: "custom" | "api" | "default" | undefined;
9
+ labelField: string;
10
+ valueField: string;
11
+ extraParams?: Record<string, any> | undefined;
12
+ } & {
13
+ dataSource?: any;
14
+ extraParams?: Record<string, any> | undefined;
15
+ }) => React.JSX.Element;
16
+ //#endregion
17
+ export { RecordListWrapperWithDataSource };
@@ -0,0 +1,9 @@
1
+ const require_utils = require('../../dataSourceForm/utils.js');
2
+ const require_WithMode = require('./WithMode.js');
3
+
4
+ //#region src/components/dataSourceComponents/fields/RecordListWrapper/index.tsx
5
+ const RecordListWrapperWithDataSource = require_utils.withDataSource(require_utils.withOptions(require_utils.withFormItem(require_WithMode.default)));
6
+ var RecordListWrapper_default = RecordListWrapperWithDataSource;
7
+
8
+ //#endregion
9
+ exports.default = RecordListWrapper_default;
@@ -0,0 +1,91 @@
1
+ import { ModeType } from "../../dataSourceForm/type.js";
2
+ import React from "react";
3
+
4
+ //#region src/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts
5
+ interface RecordListWrapperOption {
6
+ label?: React.ReactNode;
7
+ value: string | number;
8
+ }
9
+ interface RecordListWrapperFieldSchema {
10
+ name: string;
11
+ label?: React.ReactNode;
12
+ component?: string;
13
+ componentName?: string;
14
+ type?: string;
15
+ /** 接口类型,用于映射到具体组件(如 Select、Input 等) */
16
+ interface?: string;
17
+ options?: RecordListWrapperOption[];
18
+ props?: Record<string, any>;
19
+ /** 子字段(用于嵌套结构,如 Input.JSON) */
20
+ children?: RecordListWrapperFieldSchema[];
21
+ _children?: RecordListWrapperFieldSchema[];
22
+ schema?: Record<string, any>;
23
+ uiSchema?: {
24
+ title?: React.ReactNode;
25
+ enum?: RecordListWrapperOption[];
26
+ 'x-component'?: string;
27
+ 'x-component-props'?: Record<string, any>;
28
+ 'x-read-pretty'?: boolean;
29
+ 'x-validator'?: string;
30
+ 'x-display'?: 'visible' | 'hidden' | 'none';
31
+ 'x-pattern'?: 'editable' | 'disabled' | 'readPretty';
32
+ 'x-data-source'?: {
33
+ type?: string;
34
+ options?: Array<{
35
+ id?: string;
36
+ label: string | Record<string, any>;
37
+ value: string;
38
+ color?: string;
39
+ }>;
40
+ labelField?: string;
41
+ valueField?: string;
42
+ dataSource?: any;
43
+ extraParams?: Record<string, any>;
44
+ };
45
+ 'x-record-schema'?: RecordListWrapperSchema | RecordListWrapperFieldSchema[] | string;
46
+ default?: any;
47
+ type?: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
48
+ };
49
+ }
50
+ interface RecordListWrapperSchema {
51
+ fields?: RecordListWrapperFieldSchema[];
52
+ properties?: Record<string, any>;
53
+ children?: RecordListWrapperFieldSchema[];
54
+ }
55
+ /**
56
+ * @title RecordListWrapper 组件 Props
57
+ * @description
58
+ * 值结构为 Map:key 是 xDataSource option 的 value,value 是该 option 对应的表单字段值。
59
+ * 例如:{ "5": { "code": "xxx", "type": "yyy" }, "3": { "code": "aaa" } }
60
+ */
61
+ interface RecordListWrapperProps {
62
+ renderMode: ModeType;
63
+ /**
64
+ * 值: Map 结构
65
+ * - key: xDataSource option 的 value
66
+ * - value: 该 option 对应的 xRecordSchema 字段值对象
67
+ */
68
+ value?: Record<string, Record<string, any>>;
69
+ onChange?: (value: Record<string, Record<string, any>>) => void;
70
+ /** xDataSource 选项列表,驱动 tabs 导航和 records 结构 */
71
+ options?: RecordListWrapperOption[];
72
+ /**
73
+ * 上部插槽:用户可在低代码平台拖入自定义导航组件。
74
+ * RecordListWrapper 会通过 cloneElement 注入 options、value(activeKey)、onChange。
75
+ */
76
+ topSlot?: React.ReactNode;
77
+ slot?: React.ReactNode;
78
+ /** xRecordSchema:定义每条记录的子字段结构 */
79
+ xRecordSchema?: string | RecordListWrapperSchema | RecordListWrapperFieldSchema[];
80
+ /** 容器 children:低代码引擎渲染的子组件节点 */
81
+ children?: React.ReactNode;
82
+ /** 低代码设计模式标识 */
83
+ __designMode?: string;
84
+ /**
85
+ * 默认激活的 Tab key,外部传入时优先于 options[0].value
86
+ */
87
+ defaultValue?: string;
88
+ [key: string]: any;
89
+ }
90
+ //#endregion
91
+ export { RecordListWrapperProps };
@@ -1,5 +1,5 @@
1
- const require_index = require('../../../select/index.js');
2
1
  const require_utils = require('../../dataSourceForm/utils.js');
2
+ const require_index = require('../../../select/index.js');
3
3
  const require_ReadPretty = require('./ReadPretty.js');
4
4
 
5
5
  //#region src/components/dataSourceComponents/fields/Select/WithMode.ts
@@ -6,7 +6,7 @@ import * as antd_es_select0 from "antd/es/select";
6
6
  //#region src/components/dataSourceComponents/fields/Select/index.d.ts
7
7
  declare const SelectWithDataSource: (props: antd1.SelectProps<any, antd_es_select0.DefaultOptionType> & WithModeProps & WithFormItemProps & {
8
8
  options?: any;
9
- optionSourceType?: "default" | "custom" | "api" | undefined;
9
+ optionSourceType?: "custom" | "api" | "default" | undefined;
10
10
  labelField: string;
11
11
  valueField: string;
12
12
  extraParams?: Record<string, any> | undefined;
@@ -0,0 +1,16 @@
1
+ const require_utils = require('../../dataSourceForm/utils.js');
2
+ const require_useValueMap = require('../../hooks/useValueMap.js');
3
+
4
+ //#region src/components/dataSourceComponents/fields/Tabs/ReadPretty.tsx
5
+ /**
6
+ * Tabs 只读展示组件
7
+ *
8
+ * @description 在 view / tableView 模式下展示选中的标签名称文本。
9
+ */
10
+ const TabsReadPretty = ({ value, options, renderMode }) => {
11
+ return require_utils.renderValueWithMap(value, require_useValueMap.default(options || []), renderMode);
12
+ };
13
+ var ReadPretty_default = TabsReadPretty;
14
+
15
+ //#endregion
16
+ exports.default = ReadPretty_default;
@@ -0,0 +1,78 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ let react = require("react");
3
+ react = require_rolldown_runtime.__toESM(react);
4
+ let classnames = require("classnames");
5
+ classnames = require_rolldown_runtime.__toESM(classnames);
6
+ require("./Tabs.less");
7
+
8
+ //#region src/components/dataSourceComponents/fields/Tabs/Tabs.tsx
9
+ /**
10
+ * Tabs 胶囊风格选项卡组件
11
+ *
12
+ * @description 提供类似 Segmented 控件的胶囊风格选项卡,支持受控与非受控模式。
13
+ * 用于表单中替代 Radio.Group,展示更为直观的标签页切换交互。
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <Tabs
18
+ * value={current}
19
+ * options={[
20
+ * { label: '校区', value: 'campus' },
21
+ * { label: '场地', value: 'venue' },
22
+ * ]}
23
+ * onChange={(val) => setCurrent(val)}
24
+ * />
25
+ * ```
26
+ */
27
+ const Tabs = ({ value, defaultValue, options = [], disabled = false, onChange, className, style }) => {
28
+ /** 内部选中值,支持受控与非受控 */
29
+ const [internalValue, setInternalValue] = react.default.useState(defaultValue);
30
+ /** 最终使用的选中值:受控优先 */
31
+ const selectedValue = value !== void 0 ? value : internalValue;
32
+ /**
33
+ * 处理选项点击
34
+ */
35
+ const handleSelect = (option) => {
36
+ if (disabled || option.disabled) return;
37
+ const newValue = option.value;
38
+ if (value === void 0) setInternalValue(newValue);
39
+ onChange === null || onChange === void 0 || onChange(newValue);
40
+ };
41
+ const tabItems = (0, react.useMemo)(() => {
42
+ return options.map((option) => {
43
+ const isActive = selectedValue === option.value;
44
+ const isDisabled = disabled || option.disabled;
45
+ return /* @__PURE__ */ react.default.createElement("div", {
46
+ key: option.value,
47
+ className: (0, classnames.default)("pisell-form-tabs-item", {
48
+ "pisell-form-tabs-item--active": isActive,
49
+ "pisell-form-tabs-item--disabled": isDisabled
50
+ }),
51
+ onClick: () => handleSelect(option),
52
+ role: "tab",
53
+ "aria-selected": isActive,
54
+ "aria-disabled": isDisabled,
55
+ tabIndex: isDisabled ? -1 : 0,
56
+ onKeyDown: (e) => {
57
+ if (e.key === "Enter" || e.key === " ") {
58
+ e.preventDefault();
59
+ handleSelect(option);
60
+ }
61
+ }
62
+ }, /* @__PURE__ */ react.default.createElement("span", { className: "pisell-form-tabs-item-label" }, option.label));
63
+ });
64
+ }, [
65
+ options,
66
+ selectedValue,
67
+ disabled
68
+ ]);
69
+ return /* @__PURE__ */ react.default.createElement("div", {
70
+ className: (0, classnames.default)("pisell-form-tabs", className),
71
+ style,
72
+ role: "tablist"
73
+ }, tabItems);
74
+ };
75
+ var Tabs_default = Tabs;
76
+
77
+ //#endregion
78
+ exports.default = Tabs_default;
@@ -0,0 +1,55 @@
1
+ .pisell-form-tabs {
2
+ height: 40px;
3
+ width: 100%;
4
+ display: flex;
5
+ align-items: center;
6
+ background-color: #f5f5f5;
7
+ border-radius: 8px;
8
+ padding: 2px;
9
+ gap: 2px;
10
+ flex-wrap: wrap;
11
+ box-sizing: border-box;
12
+ color: rgba(0, 0, 0, .65);
13
+ background-color: rgba(0, 0, 0, .04);
14
+
15
+ &-item {
16
+ min-height: 36px;
17
+ min-width: 90px;
18
+ display: inline-flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ padding: 0 12px;
22
+ border-radius: 6px;
23
+ cursor: pointer;
24
+ transition: background-color 0.2s ease, box-shadow 0.2s ease,
25
+ color 0.2s ease;
26
+ user-select: none;
27
+ white-space: nowrap;
28
+ flex: 0 0 auto;
29
+ outline: none;
30
+
31
+ &-label {
32
+ font-size: 14px;
33
+ color: rgba(0, 0, 0, 0.65);
34
+ font-weight: 400;
35
+ }
36
+
37
+ &:hover:not(&--active):not(&--disabled) {
38
+ background-color: rgba(0, 0, 0, 0.06);
39
+ }
40
+
41
+ &--active {
42
+ background-color: #ffffff;
43
+
44
+ .pisell-form-tabs-item-label {
45
+ color: #262626;
46
+ font-weight: 500;
47
+ }
48
+ }
49
+
50
+ &--disabled {
51
+ cursor: not-allowed;
52
+ opacity: 0.4;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,13 @@
1
+ const require_utils = require('../../dataSourceForm/utils.js');
2
+ const require_Tabs = require('./Tabs.js');
3
+ const require_ReadPretty = require('./ReadPretty.js');
4
+
5
+ //#region src/components/dataSourceComponents/fields/Tabs/WithMode.tsx
6
+ /**
7
+ * TabsWithMode
8
+ */
9
+ const TabsWithMode = require_utils.withMode(require_Tabs.default, require_ReadPretty.default);
10
+ var WithMode_default = TabsWithMode;
11
+
12
+ //#endregion
13
+ exports.default = WithMode_default;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { WithFormItemProps, WithModeProps } from "../../dataSourceForm/utils.js";
3
+ import { TabsProps } from "./type.js";
4
+ import * as react26 from "react";
5
+
6
+ //#region src/components/dataSourceComponents/fields/Tabs/index.d.ts
7
+ /** 包装 DataSource 层(提供数据源上下文) */
8
+ declare const FormItemTabs: (props: TabsProps & WithModeProps & WithFormItemProps & {
9
+ options?: any;
10
+ optionSourceType?: "custom" | "api" | "default" | undefined;
11
+ labelField: string;
12
+ valueField: string;
13
+ extraParams?: Record<string, any> | undefined;
14
+ } & {
15
+ dataSource?: any;
16
+ extraParams?: Record<string, any> | undefined;
17
+ }) => react26.JSX.Element;
18
+ //#endregion
19
+ export { FormItemTabs };
@@ -0,0 +1,10 @@
1
+ const require_utils = require('../../dataSourceForm/utils.js');
2
+ const require_WithMode = require('./WithMode.js');
3
+
4
+ //#region src/components/dataSourceComponents/fields/Tabs/index.tsx
5
+ /** 包装 DataSource 层(提供数据源上下文) */
6
+ const FormItemTabs = require_utils.withDataSource(require_utils.withOptions(require_utils.withFormItem(require_WithMode.default)));
7
+ var Tabs_default = FormItemTabs;
8
+
9
+ //#endregion
10
+ exports.default = Tabs_default;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+
3
+ //#region src/components/dataSourceComponents/fields/Tabs/type.d.ts
4
+ /**
5
+ * Tabs 选项配置
6
+ */
7
+ interface TabOption {
8
+ /** 选项显示文本 */
9
+ label: React.ReactNode;
10
+ /** 选项对应的值 */
11
+ value: string | number;
12
+ /** 是否禁用该选项 */
13
+ disabled?: boolean;
14
+ }
15
+ /**
16
+ * Tabs 基础 Props(编辑态组件使用,不含 renderMode)
17
+ */
18
+ interface TabsProps {
19
+ /** 当前选中的值(受控) */
20
+ value?: string | number;
21
+ /** 默认选中的值(非受控) */
22
+ defaultValue?: string | number;
23
+ /** 选项列表 */
24
+ options?: TabOption[];
25
+ /** 是否禁用整个组件 */
26
+ disabled?: boolean;
27
+ /** 选中值变化时的回调 */
28
+ onChange?: (value: string | number) => void;
29
+ /** 自定义类名 */
30
+ className?: string;
31
+ /** 自定义样式 */
32
+ style?: React.CSSProperties;
33
+ }
34
+ //#endregion
35
+ export { TabsProps };
@@ -1,39 +1,43 @@
1
- const require_index = require('./Input/index.js');
2
- const require_index$1 = require('./Checkbox/index.js');
3
- const require_index$2 = require('./ColorPicker/index.js');
4
- const require_index$3 = require('./DatePicker/index.js');
5
- const require_index$4 = require('./Radio/index.js');
6
- const require_index$5 = require('./Select/index.js');
7
- const require_index$6 = require('./InputNumber/index.js');
8
- const require_index$7 = require('./TimePicker/index.js');
9
- const require_index$8 = require('./DateRangePicker/index.js');
10
- const require_index$9 = require('./Upload/index.js');
11
- const require_index$10 = require('./Translation/index.js');
12
- const require_index$11 = require('./IconSelect/index.js');
1
+ const require_index = require('./RecordListWrapper/index.js');
2
+ const require_index$1 = require('./Tabs/index.js');
3
+ const require_index$2 = require('./Input/index.js');
4
+ const require_index$3 = require('./Checkbox/index.js');
5
+ const require_index$4 = require('./ColorPicker/index.js');
6
+ const require_index$5 = require('./DatePicker/index.js');
7
+ const require_index$6 = require('./Radio/index.js');
8
+ const require_index$7 = require('./Select/index.js');
9
+ const require_index$8 = require('./InputNumber/index.js');
10
+ const require_index$9 = require('./TimePicker/index.js');
11
+ const require_index$10 = require('./DateRangePicker/index.js');
12
+ const require_index$11 = require('./Upload/index.js');
13
+ const require_index$12 = require('./Translation/index.js');
14
+ const require_index$13 = require('./IconSelect/index.js');
13
15
 
14
16
  //#region src/components/dataSourceComponents/fields/index.ts
15
17
  const formFieldMap = {
16
- FormItemCheckbox: require_index$1.default,
17
- FormItemColorPicker: require_index$2.default,
18
- FormItemDatePicker: require_index$3.default,
19
- FormItemInput: require_index.default,
20
- FormItemRadio: require_index$4.default,
21
- FormItemSelect: require_index$5.default,
22
- FormItemInputNumber: require_index$6.default,
23
- FormItemPercent: require_index$6.default,
24
- FormItemTimePicker: require_index$7.default,
25
- "FormItemInput.JSON": require_index.default.JSON,
26
- "FormItemInput.Phone": require_index.default.Phone,
27
- "FormItemInput.Mobile": require_index.default.Mobile,
28
- "FormItemInput.Email": require_index.default.Email,
29
- "FormItemInput.URL": require_index.default.URL,
30
- "FormItemInput.Password": require_index.default.Password,
31
- "FormItemRadio.Group": require_index$4.default.Group,
32
- "FormItemCheckbox.Group": require_index$1.default.Group,
33
- FormItemDateRangePicker: require_index$8.default,
34
- FormItemUpload: require_index$9.default,
35
- FormItemTranslation: require_index$10.default,
36
- FormItemIconSelect: require_index$11.default
18
+ FormItemCheckbox: require_index$3.default,
19
+ FormItemColorPicker: require_index$4.default,
20
+ FormItemDatePicker: require_index$5.default,
21
+ FormItemInput: require_index$2.default,
22
+ FormItemRadio: require_index$6.default,
23
+ FormItemSelect: require_index$7.default,
24
+ FormItemInputNumber: require_index$8.default,
25
+ FormItemPercent: require_index$8.default,
26
+ FormItemTimePicker: require_index$9.default,
27
+ "FormItemInput.JSON": require_index$2.default.JSON,
28
+ "FormItemInput.Phone": require_index$2.default.Phone,
29
+ "FormItemInput.Mobile": require_index$2.default.Mobile,
30
+ "FormItemInput.Email": require_index$2.default.Email,
31
+ "FormItemInput.URL": require_index$2.default.URL,
32
+ "FormItemInput.Password": require_index$2.default.Password,
33
+ "FormItemRadio.Group": require_index$6.default.Group,
34
+ "FormItemCheckbox.Group": require_index$3.default.Group,
35
+ FormItemDateRangePicker: require_index$10.default,
36
+ FormItemUpload: require_index$11.default,
37
+ FormItemTranslation: require_index$12.default,
38
+ FormItemIconSelect: require_index$13.default,
39
+ FormItemRecordListWrapper: require_index.default,
40
+ FormItemTabs: require_index$1.default
37
41
  };
38
42
  const getFieldComponent = (fieldComponent) => {
39
43
  return formFieldMap[fieldComponent];
@@ -59,6 +59,9 @@ const formFieldFilterFuncMap = {
59
59
  },
60
60
  "Checkbox.Group": (value) => {
61
61
  return { $anyOf: Array.isArray(value) ? value : [value] };
62
+ },
63
+ RecordListWrapper: () => {
64
+ return null;
62
65
  }
63
66
  };
64
67
 
@@ -3,12 +3,12 @@ const require_index = require('../../../locales/index.js');
3
3
  const require_objectSpread2 = require('../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
4
4
  const require_useEngineContext = require('../../../hooks/useEngineContext.js');
5
5
  const require_asyncToGenerator = require('../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js');
6
- const require_useDataSource = require('./useDataSource.js');
7
6
  const require_index$1 = require('../../pisellToast/index.js');
8
7
  const require_useFormat = require('../dataSourceTable/hooks/useFormat.js');
9
8
  const require_serve = require('../dataSourceForm/serve.js');
10
9
  const require_useVariables = require('./useVariables.js');
11
10
  const require_useParseActionsVariable = require('./useParseActionsVariable.js');
11
+ const require_useDataSource = require('./useDataSource.js');
12
12
  let react = require("react");
13
13
  let ahooks = require("ahooks");
14
14
 
@@ -1,8 +1,8 @@
1
1
  const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
2
  const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
3
3
  const require_DataSourceContext = require('./DataSourceContext.js');
4
- const require_useDataSource = require('../../hooks/useDataSource.js');
5
4
  const require_useVariables = require('../../hooks/useVariables.js');
5
+ const require_useDataSource = require('../../hooks/useDataSource.js');
6
6
  const require_useActions = require('../../hooks/useActions.js');
7
7
  const require_useSetRequest = require('../../../../hooks/useSetRequest.js');
8
8
  let react = require("react");
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react25 from "react";
2
+ import * as react27 from "react";
3
3
 
4
4
  //#region src/components/date-picker/index.d.ts
5
- declare const DatePicker: (props: any) => react25.JSX.Element;
5
+ declare const DatePicker: (props: any) => react27.JSX.Element;
6
6
  //#endregion
7
7
  export { DatePicker };
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
- import * as react31 from "react";
2
+ import * as react28 from "react";
3
3
  import { InputProps, InputRef } from "antd";
4
4
  import * as antd_es_input0 from "antd/es/input";
5
5
  import * as antd_es_input_TextArea0 from "antd/es/input/TextArea";
6
6
 
7
7
  //#region src/components/input/index.d.ts
8
- declare const OriginalGroup: react31.FC<antd_es_input0.GroupProps>, OriginalTextArea: react31.ForwardRefExoticComponent<antd_es_input0.TextAreaProps & react31.RefAttributes<antd_es_input_TextArea0.TextAreaRef>>, OriginalPassword: react31.ForwardRefExoticComponent<antd_es_input0.PasswordProps & react31.RefAttributes<InputRef>>, OriginalSearch: react31.ForwardRefExoticComponent<antd_es_input0.SearchProps & react31.RefAttributes<InputRef>>;
8
+ declare const OriginalGroup: react28.FC<antd_es_input0.GroupProps>, OriginalTextArea: react28.ForwardRefExoticComponent<antd_es_input0.TextAreaProps & react28.RefAttributes<antd_es_input_TextArea0.TextAreaRef>>, OriginalPassword: react28.ForwardRefExoticComponent<antd_es_input0.PasswordProps & react28.RefAttributes<InputRef>>, OriginalSearch: react28.ForwardRefExoticComponent<antd_es_input0.SearchProps & react28.RefAttributes<InputRef>>;
9
9
  type CompoundedComponent = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>> & {
10
10
  Group: typeof OriginalGroup;
11
11
  Search: typeof OriginalSearch;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import * as react46 from "react";
2
+ import * as react47 from "react";
3
3
 
4
4
  //#region src/components/pisell-config-provider/context.d.ts
5
5
  interface PisellContextType {
@@ -11,7 +11,7 @@ interface PisellContextType {
11
11
  /** 获取货币符号 */
12
12
  getSymbolic?: () => string;
13
13
  }
14
- declare const PisellContext: react46.Context<PisellContextType>;
14
+ declare const PisellContext: react47.Context<PisellContextType>;
15
15
  /**
16
16
  * provider外获取当前全局配置
17
17
  */
@@ -1,9 +1,9 @@
1
1
  import { DataSourceContainerContextType } from "../../type.js";
2
2
  import React from "react";
3
- import * as antd19 from "antd";
3
+ import * as antd18 from "antd";
4
4
 
5
5
  //#region src/components/pisellDataSourceContainer/components/Pagination/index.d.ts
6
- declare const _default: React.ForwardRefExoticComponent<Omit<Partial<antd19.PaginationProps> & DataSourceContainerContextType & React.RefAttributes<unknown> & {
6
+ declare const _default: React.ForwardRefExoticComponent<Omit<Partial<antd18.PaginationProps> & DataSourceContainerContextType & React.RefAttributes<unknown> & {
7
7
  refId?: string | undefined;
8
8
  }, "ref"> & React.RefAttributes<any>>;
9
9
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { DataSourceContainerContextType } from "../../type.js";
2
2
  import React from "react";
3
- import * as antd18 from "antd";
3
+ import * as antd24 from "antd";
4
4
 
5
5
  //#region src/components/pisellDataSourceContainer/components/Table/index.d.ts
6
- declare const _default: React.ForwardRefExoticComponent<Omit<Partial<antd18.TableProps<any>> & DataSourceContainerContextType & {
6
+ declare const _default: React.ForwardRefExoticComponent<Omit<Partial<antd24.TableProps<any>> & DataSourceContainerContextType & {
7
7
  scopeId?: string | undefined;
8
8
  __id?: string | undefined;
9
9
  } & React.RefAttributes<unknown> & {
@@ -1,6 +1,6 @@
1
+ import { DataSourceContextProps, DataSourceContextType } from "../dataSourceComponents/provider/dataSource/DataSourceContext.js";
1
2
  import { SortListProps } from "../sort/types.js";
2
3
  import { FilterItemProps } from "../filter/types.js";
3
- import { DataSourceContextProps, DataSourceContextType } from "../dataSourceComponents/provider/dataSource/DataSourceContext.js";
4
4
  import { FilterListProps } from "../filter/components/FilterButton/types.js";
5
5
  import { FormInstance, PaginationProps, TableProps, TabsProps } from "antd";
6
6
  import { Result } from "ahooks/es/useRequest/src/types";
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react43 from "react";
2
+ import * as react44 from "react";
3
3
 
4
4
  //#region src/components/pisellDatePicker/index.d.ts
5
- declare const PisellDatePicker: (props: any) => react43.JSX.Element;
5
+ declare const PisellDatePicker: (props: any) => react44.JSX.Element;
6
6
  //#endregion
7
7
  export { PisellDatePicker };
@@ -2,8 +2,8 @@ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.
2
2
  const require_index = require('../../../../locales/index.js');
3
3
  const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
4
4
  const require_index$1 = require('../../../icon/index.js');
5
- const require_index$2 = require('../../../input/index.js');
6
5
  const require_asyncToGenerator = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js');
6
+ const require_index$2 = require('../../../input/index.js');
7
7
  let react = require("react");
8
8
  react = require_rolldown_runtime.__toESM(react);
9
9
  let _pisell_utils = require("@pisell/utils");
@@ -7,6 +7,21 @@
7
7
  height: 48px !important;
8
8
  width: 100%;
9
9
 
10
+ .pisell-lowcode-select-clear {
11
+ color: #667085;
12
+ display: inline-flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ min-width: 44px;
16
+ min-height: 44px;
17
+ margin: -22px -8px;
18
+ padding: 10px 8px;
19
+
20
+ &:hover {
21
+ color: #344054;
22
+ }
23
+ }
24
+
10
25
  // Select 触发器(Figma 设计规范,与 SingleSelect / Input 体系一致)
11
26
  .pisell-lowcode-select:not(.pisell-lowcode-select-disabled):not(.pisell-lowcode-select-customize-input) {
12
27
  .pisell-lowcode-select-selector {
@@ -51,13 +66,6 @@
51
66
  color: #667085;
52
67
  }
53
68
 
54
- .pisell-lowcode-select-clear {
55
- color: #667085;
56
-
57
- &:hover {
58
- color: #344054;
59
- }
60
- }
61
69
 
62
70
  // 多选标签(选择后展示的 item)高度 36px
63
71
  .pisell-lowcode-select-selection-item {