@antdv-next1/pro-field 1.0.7 → 1.0.9

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.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @antdv-next1/pro-field
2
+
3
+ Rich field rendering component for Pro Components. Supports read-only and edit modes with 30+ built-in value types.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @antdv-next1/pro-field
9
+ # or
10
+ pnpm add @antdv-next1/pro-field
11
+ ```
12
+
13
+ ## Peer Dependencies
14
+
15
+ - `vue` >= 3.5.30
16
+ - `antdv-next` >= 1.3.6
17
+
18
+ ## Components
19
+
20
+ ### Main Components
21
+
22
+ | Component | Description |
23
+ |-----------|-------------|
24
+ | `ProField` | Unified field renderer with automatic value type mapping |
25
+ | `ProPureField` | Pure field renderer without form item wrapper |
26
+ | `ValueTypeToComponent` | Automatic value-type to component mapper |
27
+
28
+ ### Field Type Components
29
+
30
+ | Component | Value Type | Description |
31
+ |-----------|------------|-------------|
32
+ | `FieldText` | `text` | Plain text display / input |
33
+ | `FieldTextArea` | `textarea` | Multi-line text |
34
+ | `FieldPassword` | `password` | Password with visibility toggle |
35
+ | `FieldSelect` | `select` | Dropdown select |
36
+ | `FieldCheckbox` | `checkbox` | Checkbox input |
37
+ | `FieldRadio` | `radio` | Radio input |
38
+ | `FieldDigit` | `digit` | Numeric input |
39
+ | `FieldDigitRange` | `digitRange` | Numeric range input |
40
+ | `FieldMoney` | `money` | Currency display / input |
41
+ | `FieldPercent` | `percent` | Percentage display / input |
42
+ | `FieldProgress` | `progress` | Progress bar |
43
+ | `FieldRate` | `rate` | Star rating |
44
+ | `FieldSlider` | `slider` | Slider input |
45
+ | `FieldSwitch` | `switch` | Toggle switch |
46
+ | `FieldDatePicker` | `date` | Date picker |
47
+ | `FieldDateRangePicker` | `dateRange` | Date range picker |
48
+ | `FieldTimePicker` | `time` | Time picker |
49
+ | `FieldTimeRangePicker` | `timeRange` | Time range picker |
50
+ | `FieldFromNow` | `fromNow` | Relative time display |
51
+ | `FieldSecond` | `second` | Seconds display |
52
+ | `FieldCascader` | `cascader` | Cascading select |
53
+ | `FieldTreeSelect` | `treeSelect` | Tree select |
54
+ | `FieldColorPicker` | `colorPicker` | Color picker |
55
+ | `FieldImage` | `image` | Image display |
56
+ | `FieldCode` | `code` | Code block display |
57
+ | `FieldStatus` | `status` | Status badge |
58
+ | `FieldIndexColumn` | `indexColumn` | Index column |
59
+ | `FieldSegmented` | `segmented` | Segmented control |
60
+ | `FieldOptions` | `options` | Options group |
61
+
62
+ ## Usage
63
+
64
+ ```vue
65
+ <script setup lang="ts">
66
+ import { ProField } from '@antdv-next1/pro-field'
67
+ </script>
68
+
69
+ <template>
70
+ <!-- Read-only mode -->
71
+ <ProField :text="1000" mode="read" value-type="money" />
72
+
73
+ <!-- Edit mode -->
74
+ <ProField v-model:text="value" mode="edit" value-type="select" :field-props="{ options }" />
75
+ </template>
76
+ ```
77
+
78
+ ## Dependencies
79
+
80
+ - `@antdv-next1/pro-provider` — Theme and configuration context
81
+ - `@antdv-next1/pro-utils` — Shared utilities
82
+ - `swrv` — Stale-while-revalidate data fetching
83
+
84
+ ## License
85
+
86
+ [MIT](../../LICENSE)
@@ -35,6 +35,6 @@ declare const FieldCascader: _$vue.DefineSetupFnComponent<FieldCascaderProps, {}
35
35
  variant?: "outlined" | "borderless" | "filled";
36
36
  } & {
37
37
  id?: string;
38
- } & Omit<FieldSelectProps, "id" | "variant" | "text" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
38
+ } & Omit<FieldSelectProps, "text" | "fieldProps" | "light" | "label" | "id" | "variant" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
39
39
  //#endregion
40
40
  export { FieldCascaderProps, FieldCascaderRef, FieldCascader as default };
@@ -32,6 +32,6 @@ declare const FieldCheckbox: _$vue.DefineSetupFnComponent<FieldCheckBoxProps, {}
32
32
  options?: CheckboxGroupProps["options"];
33
33
  } & {
34
34
  id?: string;
35
- } & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
35
+ } & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
36
36
  //#endregion
37
37
  export { FieldCheckBoxProps, FieldCheckboxRef, FieldCheckbox as default };
@@ -22,14 +22,14 @@ type FieldDigitRangeProps = ProFieldFC<{
22
22
  }>;
23
23
  declare const FieldDigitRange: _$vue.DefineSetupFnComponent<FieldDigitRangeProps, {}, CustomSlotsType<{
24
24
  default?: () => VueNode;
25
- }>, _$_antdv_next1_pro_provider0.BaseProFieldFC<Omit<InputNumberProps, "defaultValue" | "value" | "onChange" | "placeholder"> & {
25
+ }>, _$_antdv_next1_pro_provider0.BaseProFieldFC<Omit<InputNumberProps, "value" | "onChange" | "placeholder" | "defaultValue"> & {
26
26
  id?: string;
27
27
  placeholder?: string[];
28
28
  value?: ValuePair;
29
29
  onChange?: (value?: ValuePair) => void;
30
30
  defaultValue?: ValuePair;
31
31
  intlProps?: Intl.NumberFormatOptions;
32
- }> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<Omit<InputNumberProps, "defaultValue" | "value" | "onChange" | "placeholder"> & {
32
+ }> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<Omit<InputNumberProps, "value" | "onChange" | "placeholder" | "defaultValue"> & {
33
33
  id?: string;
34
34
  placeholder?: string[];
35
35
  value?: ValuePair;
@@ -12,7 +12,7 @@ type FieldImageProps = ProFieldFC<{
12
12
  }, ImageProps | InputProps>;
13
13
  declare const FieldImage: _$vue.DefineSetupFnComponent<FieldImageProps, {}, CustomSlotsType<{
14
14
  default?: () => VueNode;
15
- }>, _$_antdv_next1_pro_provider0.BaseProFieldFC<ImageProps | InputProps> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<ImageProps | InputProps> & {
15
+ }>, _$_antdv_next1_pro_provider0.BaseProFieldFC<InputProps | ImageProps> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<InputProps | ImageProps> & {
16
16
  text: string;
17
17
  width?: number;
18
18
  placeholder?: string;
@@ -31,6 +31,6 @@ declare const FieldRadio: _$vue.DefineSetupFnComponent<FieldRadioProps, {}, Cust
31
31
  radioType?: RadioGroupProps["optionType"];
32
32
  } & {
33
33
  id?: string;
34
- } & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
34
+ } & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
35
35
  //#endregion
36
36
  export { FieldRadioProps, FieldRadio as default };
@@ -31,6 +31,6 @@ declare const FieldSegmented: _$vue.DefineSetupFnComponent<FieldSegmentedProps,
31
31
  emptyText?: VueNode$1;
32
32
  } & {
33
33
  id?: string;
34
- } & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
34
+ } & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
35
35
  //#endregion
36
36
  export { FieldSegmentedProps, FieldSegmented as default };
@@ -40,6 +40,6 @@ declare const FieldTreeSelect: _$vue.DefineSetupFnComponent<FieldTreeSelectProps
40
40
  fetchDataOnSearch?: boolean;
41
41
  } & {
42
42
  id?: string;
43
- } & TreeSelectProps<any, _$_v_c_tree_select0.DataNode> & Omit<FieldSelectProps, "id" | "variant" | "fieldProps" | "light" | "label" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
43
+ } & TreeSelectProps<any, _$_v_c_tree_select0.DataNode> & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "lightLabel" | "labelTrigger" | "plain"> & {}, _$vue.PublicProps>;
44
44
  //#endregion
45
45
  export { FieldTreeSelectProps, FieldTreeSelect as default };