@antdv-next1/pro-field 1.0.12 → 1.0.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.
@@ -14,7 +14,7 @@ type ProFieldProps = RenderProps & {
14
14
  };
15
15
  declare const _ProField: _$vue.DefineSetupFnComponent<ProFieldProps, {}, CustomSlotsType<{
16
16
  default?: () => VueNode$1;
17
- }>, Omit<ProFieldFCRenderProps, "text" | "placeholder"> & ProRenderFieldPropsType<any> & {
17
+ }>, Omit<ProFieldFCRenderProps, "placeholder" | "text"> & ProRenderFieldPropsType<any> & {
18
18
  id?: string;
19
19
  request?: _$_antdv_next1_pro_utils0.ProFieldRequestData;
20
20
  emptyText?: VueNode$1;
@@ -8,7 +8,7 @@ import { CustomSlotsType, VueNode as VueNode$1 } from "@v-c/util/dist/type";
8
8
  //#region src/ProPureField.d.ts
9
9
  declare const ProPureField: _$vue.DefineSetupFnComponent<ProFieldProps, {}, CustomSlotsType<{
10
10
  default?: () => VueNode$1;
11
- }>, Omit<ProFieldFCRenderProps, "text" | "placeholder"> & ProRenderFieldPropsType<any> & {
11
+ }>, Omit<ProFieldFCRenderProps, "placeholder" | "text"> & ProRenderFieldPropsType<any> & {
12
12
  id?: string;
13
13
  request?: _$_antdv_next1_pro_utils0.ProFieldRequestData;
14
14
  emptyText?: VueNode$1;
@@ -128,7 +128,10 @@ const ProPureField = /* @__PURE__ */ defineComponent((props, { attrs, expose })
128
128
  type: Function,
129
129
  required: false
130
130
  },
131
- fieldProps: { required: false },
131
+ fieldProps: {
132
+ type: Object,
133
+ required: false
134
+ },
132
135
  light: {
133
136
  type: Boolean,
134
137
  required: false,
@@ -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, "text" | "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
38
+ } & Omit<FieldSelectProps, "text" | "fieldProps" | "light" | "label" | "variant" | "id" | "labelTrigger" | "lightLabel" | "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, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
35
+ } & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "variant" | "id" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
36
36
  //#endregion
37
37
  export { FieldCheckBoxProps, FieldCheckboxRef, FieldCheckbox as default };
@@ -13,7 +13,7 @@ const FieldCheckbox = /* @__PURE__ */ defineComponent((props, { expose, attrs })
13
13
  const formItemInputContext = useFormItemInputContext();
14
14
  const layoutClassName = computed(() => config.value.getPrefixCls("pro-field-checkbox"));
15
15
  const [loading, options, fetchData] = useFieldFetchData(props);
16
- const { wrapSSR, hashId } = useStyle$1(layoutClassName);
16
+ const { hashId } = useStyle$1(layoutClassName);
17
17
  const { token } = useToken();
18
18
  const checkBoxRef = shallowRef(null);
19
19
  expose({ fetchData: (keyWord) => fetchData(keyWord) });
@@ -40,13 +40,13 @@ const FieldCheckbox = /* @__PURE__ */ defineComponent((props, { expose, attrs })
40
40
  } }, [dom]);
41
41
  }
42
42
  if (mode === "edit") {
43
- const dom = wrapSSR(createVNode(CheckboxGroup, mergeProps({ "ref": checkBoxRef }, omit(attrs, ["lightProps"]), rest.fieldProps, {
43
+ const dom = createVNode(CheckboxGroup, mergeProps({ "ref": checkBoxRef }, omit(attrs, ["lightProps"]), rest.fieldProps, {
44
44
  "class": classNames(rest.fieldProps?.class, hashId.value, `${layoutClassName.value}-${layout}`, {
45
45
  [`${layoutClassName.value}-error`]: formItemInputContext.value.status === "error",
46
46
  [`${layoutClassName.value}-warning`]: formItemInputContext.value.status === "warning"
47
47
  }),
48
48
  "options": options.value
49
- }), null));
49
+ }), null);
50
50
  if (formItemRender) return createVNode(Fragment, null, [formItemRender(rest.text, {
51
51
  mode,
52
52
  ...rest,
@@ -16,15 +16,15 @@ type FieldCodeProps = ProFieldFC<{
16
16
  } | HTMLAttributes>;
17
17
  declare const FieldCode: _$vue.DefineSetupFnComponent<FieldCodeProps, {}, CustomSlotsType<{
18
18
  default?: () => VueNode;
19
- }>, _$_antdv_next1_pro_provider0.BaseProFieldFC<(InputProps & {
19
+ }>, _$_antdv_next1_pro_provider0.BaseProFieldFC<HTMLAttributes | (InputProps & {
20
20
  style?: CSSProperties;
21
21
  }) | (TextAreaProps & {
22
22
  style?: CSSProperties;
23
- }) | HTMLAttributes> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<(InputProps & {
23
+ })> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<HTMLAttributes | (InputProps & {
24
24
  style?: CSSProperties;
25
25
  }) | (TextAreaProps & {
26
26
  style?: CSSProperties;
27
- }) | HTMLAttributes> & {
27
+ })> & {
28
28
  text: string;
29
29
  language?: "json" | "text";
30
30
  } & {
@@ -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, "placeholder" | "value" | "onChange" | "defaultValue"> & {
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, "placeholder" | "value" | "onChange" | "defaultValue"> & {
32
+ }> & _$_antdv_next1_pro_provider0.ProRenderFieldPropsType<Omit<InputNumberProps, "value" | "onChange" | "placeholder" | "defaultValue"> & {
33
33
  id?: string;
34
34
  placeholder?: string[];
35
35
  value?: ValuePair;
@@ -6,11 +6,11 @@ import { useConfig } from "antdv-next/dist/config-provider/context";
6
6
  const FieldIndexColumn = /* @__PURE__ */ defineComponent((props) => {
7
7
  const config = useConfig();
8
8
  const prefixCls = computed(() => config.value.getPrefixCls("pro-field-index-column"));
9
- const { wrapSSR, hashId } = useStyle(prefixCls);
10
- return () => wrapSSR(createVNode("div", { "class": classNames(prefixCls.value, hashId.value, {
9
+ const { hashId } = useStyle(prefixCls);
10
+ return () => createVNode("div", { "class": classNames(prefixCls.value, hashId.value, {
11
11
  [`${prefixCls.value}-border`]: props.border,
12
12
  "top-three": Number(props.children) > 3
13
- }) }, [props.children]));
13
+ }) }, [props.children]);
14
14
  }, {
15
15
  props: {
16
16
  border: {
@@ -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, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
34
+ } & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "variant" | "id" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
35
35
  //#endregion
36
36
  export { FieldRadioProps, FieldRadio as default };
@@ -13,7 +13,7 @@ const FieldRadio = /* @__PURE__ */ defineComponent((props, { expose, attrs }) =>
13
13
  const layoutClassName = computed(() => config.value.getPrefixCls("pro-field-radio"));
14
14
  const [loading, options, fetchData] = useFieldFetchData(props);
15
15
  const radioRef = ref();
16
- const { wrapSSR, hashId } = useStyle(layoutClassName);
16
+ const { hashId } = useStyle(layoutClassName);
17
17
  expose({ fetchData: (keyWord) => fetchData(keyWord) });
18
18
  return () => {
19
19
  const { mode, render, formItemRender, options: propsOptions, request, params, debounceTime, defaultKeyWords, radioType, ...rest } = props;
@@ -33,13 +33,13 @@ const FieldRadio = /* @__PURE__ */ defineComponent((props, { expose, attrs }) =>
33
33
  return dom;
34
34
  }
35
35
  if (props.mode === "edit") {
36
- const dom = wrapSSR(createVNode(RadioGroup, mergeProps({ "ref": radioRef }, attrs, { "optionType": radioType }, rest.fieldProps, {
36
+ const dom = createVNode(RadioGroup, mergeProps({ "ref": radioRef }, attrs, { "optionType": radioType }, rest.fieldProps, {
37
37
  "class": classNames(rest.fieldProps?.class, {
38
38
  [`${layoutClassName.value}-error`]: formItemInputContext.value.status === "error",
39
39
  [`${layoutClassName.value}-warning`]: formItemInputContext.value.status === "warning"
40
40
  }, hashId.value, `${layoutClassName.value}-${props.fieldProps?.layout || "horizontal"}`),
41
41
  "options": options.value
42
- }), null));
42
+ }), null);
43
43
  if (formItemRender) return createVNode(Fragment, null, [formItemRender(rest.text, {
44
44
  mode,
45
45
  ...rest,
@@ -31,6 +31,6 @@ declare const FieldSegmented: _$vue.DefineSetupFnComponent<FieldSegmentedProps,
31
31
  emptyText?: VueNode$1;
32
32
  } & {
33
33
  id?: string;
34
- } & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
34
+ } & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "variant" | "id" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
35
35
  //#endregion
36
36
  export { FieldSegmentedProps, FieldSegmented as default };
@@ -1,12 +1,13 @@
1
1
  import { useStyle } from "./style/index.js";
2
2
  import { computed, createVNode, defineComponent, h } from "vue";
3
+ import { classNames } from "@v-c/util";
3
4
  import { useConfig } from "antdv-next/dist/config-provider/context";
4
5
  //#region src/components/Select/Highlight/index.tsx
5
6
  const Highlight = /* @__PURE__ */ defineComponent((props) => {
6
7
  const config = useConfig();
7
8
  const lightCls = computed(() => config.value.getPrefixCls("pro-select-item-option-content-light"));
8
9
  const optionCls = computed(() => config.value.getPrefixCls("pro-select-item-option-content"));
9
- const { wrapSSR } = useStyle(lightCls, optionCls);
10
+ const { hashId } = useStyle(lightCls, optionCls);
10
11
  const matchKeywordsRE = computed(() => new RegExp(props.words?.map((word) => word.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&")).join("|"), "gi"));
11
12
  const elements = computed(() => {
12
13
  let matchText = props.label;
@@ -24,10 +25,10 @@ const Highlight = /* @__PURE__ */ defineComponent((props) => {
24
25
  }
25
26
  return vnodes;
26
27
  });
27
- return () => wrapSSR(createVNode("div", {
28
+ return () => createVNode("div", {
28
29
  "title": props.label,
29
- "class": optionCls.value
30
- }, [elements.value]));
30
+ "class": classNames(optionCls.value, hashId.value)
31
+ }, [elements.value]);
31
32
  }, {
32
33
  props: {
33
34
  label: {
@@ -23,7 +23,7 @@ const LightSelect = /* @__PURE__ */ defineComponent((props, { attrs }) => {
23
23
  const baseClassName = computed(() => `${prefixCls.value}-field-select-light-select`);
24
24
  const [open, setOpen] = useState(props.open || false);
25
25
  const [keyword, setKeyword] = useState("");
26
- const { wrapSSR, hashId } = useStyle(baseClassName);
26
+ const { hashId } = useStyle(baseClassName);
27
27
  const fieldNames = computed(() => ({
28
28
  label: props.fieldNames?.label || "label",
29
29
  value: props.fieldNames?.value || "value"
@@ -46,7 +46,7 @@ const LightSelect = /* @__PURE__ */ defineComponent((props, { attrs }) => {
46
46
  return () => {
47
47
  const { label, prefixCls: customizePrefixCls, onChange, value, mode, defaultValue, labelVariant, size, showSearch, "onUpdate:value": onUpdateValue, disabled, options, allowClear, labelInValue, fieldNames = {}, lightLabel, labelTrigger, optionLabelProp = "", valueMaxLength = 41, fetchDataOnSearch = false, fetchData, variant = "outlined", searchPlaceholder, ...restProps } = props;
48
48
  const { placeholder = label } = props;
49
- return wrapSSR(createVNode("div", {
49
+ return createVNode("div", {
50
50
  "class": classNames(baseClassName.value, attrs.class, hashId.value, { [`${baseClassName.value}-searchable`]: showSearch }, `${baseClassName.value}-container-${restProps.placement || "bottomLeft"}`),
51
51
  "onClick": (e) => {
52
52
  if (disabled) return;
@@ -122,7 +122,7 @@ const LightSelect = /* @__PURE__ */ defineComponent((props, { attrs }) => {
122
122
  },
123
123
  "ref": lightLabel,
124
124
  "valueMaxLength": valueMaxLength
125
- }, null)]));
125
+ }, null)]);
126
126
  };
127
127
  }, {
128
128
  props: {
@@ -6,10 +6,10 @@ import { useConfig } from "antdv-next/dist/config-provider/context";
6
6
  const FieldTextAreaReadonly = /* @__PURE__ */ defineComponent((props) => {
7
7
  const config = useConfig();
8
8
  const readonlyClassName = computed(() => config.value.getPrefixCls("pro-field-readonly-textarea"));
9
- const { wrapSSR, hashId } = useStyle(readonlyClassName);
9
+ const { hashId } = useStyle(readonlyClassName);
10
10
  return () => {
11
11
  const { text } = props;
12
- return wrapSSR(createVNode("span", { "class": classNames(hashId.value, readonlyClassName.value) }, [text ?? "-"]));
12
+ return createVNode("span", { "class": classNames(hashId.value, readonlyClassName.value) }, [text ?? "-"]);
13
13
  };
14
14
  }, {
15
15
  name: "FieldTextAreaReadonly",
@@ -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, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
43
+ } & TreeSelectProps<any, _$_v_c_tree_select0.DataNode> & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "variant" | "id" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
44
44
  //#endregion
45
45
  export { FieldTreeSelectProps, FieldTreeSelect as default };