@aplus-frontend/ui 0.0.6 → 0.0.8

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 (103) hide show
  1. package/es/index.mjs +129 -119
  2. package/es/src/ap-field/checkbox/index.vue.mjs +8 -8
  3. package/es/src/ap-field/date/index.vue.d.ts +2 -2
  4. package/es/src/ap-field/date/index.vue.mjs +1 -1
  5. package/es/src/ap-field/date-range/index.vue.d.ts +6 -2
  6. package/es/src/ap-field/date-range/index.vue.mjs +46 -44
  7. package/es/src/ap-field/index.d.ts +8 -2
  8. package/es/src/ap-field/index.mjs +27 -16
  9. package/es/src/ap-field/interface.d.ts +29 -1
  10. package/es/src/ap-field/rate/index.vue.d.ts +64 -0
  11. package/es/src/ap-field/rate/index.vue.mjs +64 -0
  12. package/es/src/ap-field/rate/index.vue2.mjs +4 -0
  13. package/es/src/ap-field/segmented/index.vue.d.ts +54 -0
  14. package/es/src/ap-field/segmented/index.vue.mjs +81 -0
  15. package/es/src/ap-field/segmented/index.vue2.mjs +4 -0
  16. package/es/src/ap-field/select/index.vue.d.ts +2 -2
  17. package/es/src/ap-field/select/index.vue.mjs +4 -4
  18. package/es/src/ap-field/slider/index.vue.d.ts +64 -0
  19. package/es/src/ap-field/slider/index.vue.mjs +90 -0
  20. package/es/src/ap-field/slider/index.vue2.mjs +4 -0
  21. package/es/src/ap-field/switch/index.vue.mjs +7 -7
  22. package/es/src/ap-field/text/index.d.ts +8 -0
  23. package/es/src/ap-field/text/index.mjs +10 -0
  24. package/es/src/ap-field/text/index.vue.d.ts +2 -2
  25. package/es/src/ap-field/text/index.vue.mjs +2 -131
  26. package/es/src/ap-field/text/index.vue2.mjs +131 -2
  27. package/es/src/ap-field/text/input-password-props.d.ts +13 -0
  28. package/es/src/ap-field/text/password.vue.d.ts +74 -0
  29. package/es/src/ap-field/text/password.vue.mjs +152 -0
  30. package/es/src/ap-field/text/password.vue2.mjs +4 -0
  31. package/es/src/ap-field/text-area/index.vue.d.ts +3 -0
  32. package/es/src/ap-field/text-area/index.vue.mjs +1 -1
  33. package/es/src/ap-form/items/index.d.ts +2 -2
  34. package/es/src/ap-form/items/index.mjs +4 -1
  35. package/es/src/ap-form/items/interface.d.ts +6 -1
  36. package/es/src/ap-form/items/text/index.d.ts +8 -0
  37. package/es/src/ap-form/items/text/index.mjs +10 -0
  38. package/es/src/ap-form/items/text/index.vue.mjs +2 -93
  39. package/es/src/ap-form/items/text/index.vue2.mjs +93 -2
  40. package/es/src/ap-form/items/text/password.vue.d.ts +63 -0
  41. package/es/src/ap-form/items/text/password.vue.mjs +83 -0
  42. package/es/src/ap-form/items/text/password.vue2.mjs +4 -0
  43. package/es/src/ap-form/search-form/index.vue.mjs +53 -53
  44. package/es/src/ap-table/ap-table.vue.d.ts +2 -1
  45. package/es/src/ap-table/ap-table.vue.mjs +71 -70
  46. package/es/src/ap-table/constants.d.ts +4644 -1597
  47. package/es/src/ap-table/constants.mjs +40 -37
  48. package/es/src/ap-table/hooks/use-table-paging.mjs +14 -14
  49. package/es/src/ap-table/interface.d.ts +11 -3
  50. package/es/src/ap-table/utils.d.ts +1 -1
  51. package/es/src/index.mjs +112 -102
  52. package/lib/index.js +1 -1
  53. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  54. package/lib/src/ap-field/date/index.vue.d.ts +2 -2
  55. package/lib/src/ap-field/date/index.vue.js +1 -1
  56. package/lib/src/ap-field/date-range/index.vue.d.ts +6 -2
  57. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  58. package/lib/src/ap-field/index.d.ts +8 -2
  59. package/lib/src/ap-field/index.js +1 -1
  60. package/lib/src/ap-field/interface.d.ts +29 -1
  61. package/lib/src/ap-field/rate/index.vue.d.ts +64 -0
  62. package/lib/src/ap-field/rate/index.vue.js +1 -0
  63. package/lib/src/ap-field/rate/index.vue2.js +1 -0
  64. package/lib/src/ap-field/segmented/index.vue.d.ts +54 -0
  65. package/lib/src/ap-field/segmented/index.vue.js +1 -0
  66. package/lib/src/ap-field/segmented/index.vue2.js +1 -0
  67. package/lib/src/ap-field/select/index.vue.d.ts +2 -2
  68. package/lib/src/ap-field/select/index.vue.js +1 -1
  69. package/lib/src/ap-field/slider/index.vue.d.ts +64 -0
  70. package/lib/src/ap-field/slider/index.vue.js +1 -0
  71. package/lib/src/ap-field/slider/index.vue2.js +1 -0
  72. package/lib/src/ap-field/switch/index.vue.js +1 -1
  73. package/lib/src/ap-field/text/index.d.ts +8 -0
  74. package/lib/src/ap-field/text/index.js +1 -0
  75. package/lib/src/ap-field/text/index.vue.d.ts +2 -2
  76. package/lib/src/ap-field/text/index.vue.js +1 -1
  77. package/lib/src/ap-field/text/index.vue2.js +1 -1
  78. package/lib/src/ap-field/text/input-password-props.d.ts +13 -0
  79. package/lib/src/ap-field/text/password.vue.d.ts +74 -0
  80. package/lib/src/ap-field/text/password.vue.js +1 -0
  81. package/lib/src/ap-field/text/password.vue2.js +1 -0
  82. package/lib/src/ap-field/text-area/index.vue.d.ts +3 -0
  83. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  84. package/lib/src/ap-form/items/index.d.ts +2 -2
  85. package/lib/src/ap-form/items/index.js +1 -1
  86. package/lib/src/ap-form/items/interface.d.ts +6 -1
  87. package/lib/src/ap-form/items/text/index.d.ts +8 -0
  88. package/lib/src/ap-form/items/text/index.js +1 -0
  89. package/lib/src/ap-form/items/text/index.vue.js +1 -1
  90. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  91. package/lib/src/ap-form/items/text/password.vue.d.ts +63 -0
  92. package/lib/src/ap-form/items/text/password.vue.js +1 -0
  93. package/lib/src/ap-form/items/text/password.vue2.js +1 -0
  94. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  95. package/lib/src/ap-table/ap-table.vue.d.ts +2 -1
  96. package/lib/src/ap-table/ap-table.vue.js +1 -1
  97. package/lib/src/ap-table/constants.d.ts +4644 -1597
  98. package/lib/src/ap-table/constants.js +1 -1
  99. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  100. package/lib/src/ap-table/interface.d.ts +11 -3
  101. package/lib/src/ap-table/utils.d.ts +1 -1
  102. package/lib/src/index.js +1 -1
  103. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import "./text/index.vue2.mjs";
1
+ import { ApFieldText as i } from "./text/index.mjs";
2
2
  import "./checkbox/index.vue2.mjs";
3
3
  import "./date/index.vue2.mjs";
4
4
  import "./number/index.vue2.mjs";
@@ -7,36 +7,47 @@ import "./switch/index.vue2.mjs";
7
7
  import "./text-area/index.vue2.mjs";
8
8
  import "./date-range/index.vue2.mjs";
9
9
  import "./select/index.vue2.mjs";
10
+ import "./slider/index.vue2.mjs";
11
+ import "./segmented/index.vue2.mjs";
12
+ import "./rate/index.vue2.mjs";
10
13
  import "./interface.mjs";
11
- import i from "./text/index.vue.mjs";
12
14
  import m from "./text-area/index.vue.mjs";
13
- import o from "./number/index.vue.mjs";
15
+ import e from "./number/index.vue.mjs";
14
16
  import r from "./date/index.vue.mjs";
15
- import t from "./date-range/index.vue.mjs";
16
- import e from "./radio/index.vue.mjs";
17
+ import o from "./date-range/index.vue.mjs";
18
+ import t from "./radio/index.vue.mjs";
17
19
  import p from "./checkbox/index.vue.mjs";
18
20
  import a from "./select/index.vue.mjs";
19
- import s from "./switch/index.vue.mjs";
20
- const w = {
21
+ import f from "./switch/index.vue.mjs";
22
+ import s from "./slider/index.vue.mjs";
23
+ import _ from "./segmented/index.vue.mjs";
24
+ import d from "./rate/index.vue.mjs";
25
+ const B = {
21
26
  Text: i,
22
27
  TextArea: m,
23
- Number: o,
28
+ Number: e,
24
29
  Date: r,
25
- DateRange: t,
26
- Radio: e,
30
+ DateRange: o,
31
+ Radio: t,
27
32
  Checkbox: p,
28
33
  Select: a,
29
- Switch: s
34
+ Switch: f,
35
+ Slider: s,
36
+ Segmented: _,
37
+ Rate: d
30
38
  };
31
39
  export {
32
- w as ApField,
40
+ B as ApField,
33
41
  p as ApFieldCheckbox,
34
42
  r as ApFieldDate,
35
- t as ApFieldDateRange,
36
- o as ApFieldNumber,
37
- e as ApFieldRadio,
43
+ o as ApFieldDateRange,
44
+ e as ApFieldNumber,
45
+ t as ApFieldRadio,
46
+ d as ApFieldRate,
47
+ _ as ApFieldSegmented,
38
48
  a as ApFieldSelect,
39
- s as ApFieldSwitch,
49
+ s as ApFieldSlider,
50
+ f as ApFieldSwitch,
40
51
  i as ApFieldText,
41
52
  m as ApFieldTextArea
42
53
  };
@@ -1,9 +1,10 @@
1
- import { InputProps, CheckboxGroupProps, DatePickerProps, InputNumberProps, RadioGroupProps, SwitchProps, TextAreaProps, SelectProps, PopconfirmProps } from 'ant-design-vue';
1
+ import { InputProps, CheckboxGroupProps, DatePickerProps, InputNumberProps, RadioGroupProps, SwitchProps, TextAreaProps, SelectProps, PopconfirmProps, SliderProps, SegmentedProps, RateProps } from 'ant-design-vue';
2
2
  import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
3
3
  import { ApFormatPresetType } from './date/interface';
4
4
  import { RangeValue } from 'ant-design-vue/es/vc-picker/interface';
5
5
  import { RangePickerProps } from 'ant-design-vue/es/date-picker/dayjs';
6
6
  import { LiteralUnion } from '../type';
7
+ import { InputPasswordProps } from './text/input-password-props';
7
8
 
8
9
  export type FieldMode = 'read' | 'edit';
9
10
  export type BasicApFieldProps<FieldPropsType = any> = {
@@ -12,6 +13,13 @@ export type BasicApFieldProps<FieldPropsType = any> = {
12
13
  export type ApFieldTextProps = BasicApFieldProps<InputProps> & {
13
14
  emptyText?: string;
14
15
  };
16
+ export type ApFieldTextPasswordProps = BasicApFieldProps<InputPasswordProps> & {
17
+ emptyText?: string;
18
+ };
19
+ export type ApFieldTextPasswordExpose = {
20
+ focus: () => void;
21
+ blur: () => void;
22
+ };
15
23
  export type ApFieldTextExpose = {
16
24
  focus: (options?: InputFocusOptions) => void;
17
25
  blur: () => void;
@@ -86,3 +94,23 @@ export type ApFieldSelectSlots = {
86
94
  focus: () => void;
87
95
  blur: () => void;
88
96
  };
97
+ export type ApFieldSliderProps = BasicApFieldProps<SliderProps> & {
98
+ emptyText?: string;
99
+ defaultValue?: number | [number, number];
100
+ };
101
+ export type ApFieldSliderSlots = {
102
+ focus: () => void;
103
+ blur: () => void;
104
+ };
105
+ export type ApFieldSegmentedProps = BasicApFieldProps<SegmentedProps> & {
106
+ emptyText?: string;
107
+ defaultValue?: string | number;
108
+ request?: () => Promise<SegmentedProps['options']>;
109
+ };
110
+ export type ApFieldRateProps = BasicApFieldProps<RateProps> & {
111
+ defaultValue?: number;
112
+ };
113
+ export type ApFieldRateSlots = {
114
+ focus: () => void;
115
+ blur: () => void;
116
+ };
@@ -0,0 +1,64 @@
1
+ import { ApFieldRateProps, FieldMode } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ declare function focus(): void;
5
+ declare function blur(): void;
6
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldRateProps>, {
7
+ mode: string;
8
+ allowClear: boolean;
9
+ allowHalf: boolean;
10
+ autofocus: boolean;
11
+ count: number;
12
+ character: undefined;
13
+ disabled: boolean;
14
+ }>, {
15
+ focus: typeof focus;
16
+ blur: typeof blur;
17
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
18
+ "update:value": (...args: any[]) => void;
19
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldRateProps>, {
20
+ mode: string;
21
+ allowClear: boolean;
22
+ allowHalf: boolean;
23
+ autofocus: boolean;
24
+ count: number;
25
+ character: undefined;
26
+ disabled: boolean;
27
+ }>>> & {
28
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
29
+ }, {
30
+ disabled: boolean;
31
+ autofocus: boolean;
32
+ mode: FieldMode;
33
+ allowClear: boolean;
34
+ count: number;
35
+ allowHalf: boolean;
36
+ character: any;
37
+ }, {}>, Readonly<{
38
+ character: any;
39
+ }> & {
40
+ character: any;
41
+ }>;
42
+ export default _default;
43
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
44
+ type __VLS_TypePropsToRuntimeProps<T> = {
45
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
46
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
47
+ } : {
48
+ type: PropType<T[K]>;
49
+ required: true;
50
+ };
51
+ };
52
+ type __VLS_WithDefaults<P, D> = {
53
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
54
+ default: D[K];
55
+ }> : P[K];
56
+ };
57
+ type __VLS_Prettify<T> = {
58
+ [K in keyof T]: T[K];
59
+ } & {};
60
+ type __VLS_WithTemplateSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -0,0 +1,64 @@
1
+ import { defineComponent as v, ref as b, useSlots as h, computed as y, openBlock as B, createBlock as C, unref as o, mergeProps as _, createSlots as x, withCtx as g, renderSlot as k } from "vue";
2
+ import { omit as w } from "lodash-unified";
3
+ import "../../hooks/index.mjs";
4
+ import { Rate as R } from "ant-design-vue";
5
+ import { useControllableValue as V } from "../../hooks/useControllableValue.mjs";
6
+ const D = /* @__PURE__ */ v({
7
+ name: "ApFieldRate",
8
+ __name: "index",
9
+ props: {
10
+ mode: { default: "edit" },
11
+ prefixCls: {},
12
+ count: { default: 5 },
13
+ value: {},
14
+ allowHalf: { type: Boolean, default: !1 },
15
+ allowClear: { type: Boolean, default: !0 },
16
+ tooltips: {},
17
+ disabled: { type: Boolean, default: !1 },
18
+ character: { default: void 0 },
19
+ autofocus: { type: Boolean, default: !1 },
20
+ tabindex: {},
21
+ direction: {},
22
+ id: {},
23
+ onChange: {},
24
+ onHoverChange: {},
25
+ "onUpdate:value": {},
26
+ onFocus: {},
27
+ onBlur: {},
28
+ onKeydown: {},
29
+ defaultValue: {}
30
+ },
31
+ emits: ["update:value"],
32
+ setup(r, { expose: u, emit: n }) {
33
+ const a = r, l = b(), d = n, s = h(), { value: f, updateValue: c } = V(a, d), i = y(() => a.mode === "read" ? !0 : a.disabled);
34
+ function p() {
35
+ var e, t;
36
+ (t = (e = l.value) == null ? void 0 : e.focus) == null || t.call(e);
37
+ }
38
+ function m() {
39
+ var e, t;
40
+ (t = (e = l.value) == null ? void 0 : e.blur) == null || t.call(e);
41
+ }
42
+ return u({
43
+ focus: p,
44
+ blur: m
45
+ }), (e, t) => (B(), C(o(R), _(o(w)(a, ["mode", "defaultValue"]), {
46
+ value: o(f),
47
+ "onUpdate:value": o(c),
48
+ disabled: i.value,
49
+ ref_key: "rateRef",
50
+ ref: l
51
+ }), x({ _: 2 }, [
52
+ s.character ? {
53
+ name: "character",
54
+ fn: g(() => [
55
+ k(e.$slots, "character")
56
+ ]),
57
+ key: "0"
58
+ } : void 0
59
+ ]), 1040, ["value", "onUpdate:value", "disabled"]));
60
+ }
61
+ });
62
+ export {
63
+ D as default
64
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,54 @@
1
+ import { ApFieldSegmentedProps, FieldMode } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSegmentedProps>, {
5
+ mode: string;
6
+ emptyText: string;
7
+ block: undefined;
8
+ disabled: undefined;
9
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
+ "update:value": (...args: any[]) => void;
11
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSegmentedProps>, {
12
+ mode: string;
13
+ emptyText: string;
14
+ block: undefined;
15
+ disabled: undefined;
16
+ }>>> & {
17
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
18
+ }, {
19
+ disabled: boolean;
20
+ mode: FieldMode;
21
+ block: boolean;
22
+ emptyText: string;
23
+ }, {}>, {
24
+ label?(_: {
25
+ value: string | number;
26
+ disabled?: boolean | undefined;
27
+ payload?: any;
28
+ title?: string | undefined;
29
+ className?: string | undefined;
30
+ }): any;
31
+ }>;
32
+ export default _default;
33
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
34
+ type __VLS_TypePropsToRuntimeProps<T> = {
35
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
36
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
37
+ } : {
38
+ type: PropType<T[K]>;
39
+ required: true;
40
+ };
41
+ };
42
+ type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
44
+ default: D[K];
45
+ }> : P[K];
46
+ };
47
+ type __VLS_Prettify<T> = {
48
+ [K in keyof T]: T[K];
49
+ } & {};
50
+ type __VLS_WithTemplateSlots<T, S> = T & {
51
+ new (): {
52
+ $slots: S;
53
+ };
54
+ };
@@ -0,0 +1,81 @@
1
+ import { defineComponent as S, ref as c, useSlots as B, onMounted as U, computed as V, unref as o, createVNode as s, Fragment as a, openBlock as r, createBlock as m, createElementBlock as _, resolveDynamicComponent as h, mergeProps as N, withCtx as q, renderSlot as z, normalizeProps as F, guardReactiveProps as P } from "vue";
2
+ import { Spin as T, Segmented as R } from "ant-design-vue";
3
+ import { isFunction as v, isUndefined as w, isString as A, isNumber as D, omit as E } from "lodash-unified";
4
+ import "../../hooks/index.mjs";
5
+ import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
6
+ const J = /* @__PURE__ */ S({
7
+ name: "ApFieldSegmented",
8
+ __name: "index",
9
+ props: {
10
+ mode: {
11
+ default: "edit"
12
+ },
13
+ prefixCls: {},
14
+ options: {},
15
+ block: {
16
+ type: Boolean,
17
+ default: void 0
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ default: void 0
22
+ },
23
+ size: {},
24
+ value: {},
25
+ motionName: {},
26
+ onChange: {},
27
+ "onUpdate:value": {},
28
+ emptyText: {
29
+ default: "--"
30
+ },
31
+ defaultValue: {},
32
+ request: {}
33
+ },
34
+ emits: ["update:value"],
35
+ setup(y, {
36
+ emit: g
37
+ }) {
38
+ const e = y, i = c((e == null ? void 0 : e.options) || []), k = g, {
39
+ value: p,
40
+ updateValue: b
41
+ } = M(e, k), d = c(!1), x = B();
42
+ U(() => {
43
+ v(e.request) && (d.value = !0, e.request().then((t) => i.value = t).finally(() => {
44
+ d.value = !1;
45
+ }));
46
+ });
47
+ const C = V(() => {
48
+ var f;
49
+ const t = o(p);
50
+ if (w(t))
51
+ return s(a, null, [e.emptyText]);
52
+ const l = (f = o(i)) == null ? void 0 : f.find((u) => u === t || (u == null ? void 0 : u.value) === t);
53
+ if (A(l) || D(l))
54
+ return s(a, null, [l]);
55
+ const n = (l == null ? void 0 : l.label) || x.label;
56
+ return v(n) ? s(a, null, [n == null ? void 0 : n({
57
+ ...l
58
+ })]) : s(a, null, [n || e.emptyText]);
59
+ });
60
+ return (t, l) => d.value ? (r(), m(o(T), {
61
+ key: 0,
62
+ size: "small"
63
+ })) : (r(), _(a, {
64
+ key: 1
65
+ }, [t.mode === "read" ? (r(), m(h(C.value), {
66
+ key: 0
67
+ })) : (r(), m(o(R), N({
68
+ key: 1
69
+ }, o(E)(e, ["onUpdate:value", "value", "defaultValue", "options"]), {
70
+ value: o(p),
71
+ "onUpdate:value": o(b),
72
+ options: i.value
73
+ }), {
74
+ label: q((n) => [z(t.$slots, "label", F(P(n)))]),
75
+ _: 3
76
+ }, 16, ["value", "onUpdate:value", "options"]))], 64));
77
+ }
78
+ });
79
+ export {
80
+ J as default
81
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -26,7 +26,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
26
26
  autofocus: undefined;
27
27
  virtual: undefined;
28
28
  loading: undefined;
29
- allowClear: undefined;
29
+ allowClear: boolean;
30
30
  showSearch: undefined;
31
31
  defaultOpen: undefined;
32
32
  showArrow: undefined;
@@ -48,7 +48,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
48
48
  autofocus: undefined;
49
49
  virtual: undefined;
50
50
  loading: undefined;
51
- allowClear: undefined;
51
+ allowClear: boolean;
52
52
  showSearch: undefined;
53
53
  defaultOpen: undefined;
54
54
  showArrow: undefined;
@@ -1,4 +1,4 @@
1
- import { defineComponent as P, ref as c, onMounted as k, computed as p, unref as l, openBlock as m, createElementBlock as A, toDisplayString as O, createBlock as T, mergeProps as M, createSlots as N, renderList as _, withCtx as v, renderSlot as R, normalizeProps as q, guardReactiveProps as U, createVNode as D } from "vue";
1
+ import { defineComponent as P, ref as c, onMounted as k, computed as p, unref as l, openBlock as m, createElementBlock as A, toDisplayString as O, createBlock as T, mergeProps as M, createSlots as N, renderList as _, withCtx as v, renderSlot as q, normalizeProps as R, guardReactiveProps as U, createVNode as D } from "vue";
2
2
  import { debounce as L, isFunction as h, isArray as z, omit as K, isNil as H } from "lodash-unified";
3
3
  import { Select as $, Spin as j } from "ant-design-vue";
4
4
  import "../../hooks/index.mjs";
@@ -50,7 +50,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
50
50
  onDeselect: {},
51
51
  loading: { type: Boolean, default: void 0 },
52
52
  clearIcon: {},
53
- allowClear: { type: Boolean, default: void 0 },
53
+ allowClear: { type: Boolean, default: !0 },
54
54
  fieldNames: {},
55
55
  dropdownStyle: {},
56
56
  dropdownRender: {},
@@ -135,7 +135,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
135
135
  };
136
136
  return {
137
137
  ...E(
138
- K(e, ["mode", "value", "onUpdate:value", "onSearch"])
138
+ K(e, ["mode", "value", "onUpdate:value", "onSearch", "request"])
139
139
  ),
140
140
  ...t,
141
141
  filterOption: e.showSearch ? !1 : H(e == null ? void 0 : e.filterOption) ? S : e == null ? void 0 : e.filterOption
@@ -167,7 +167,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
167
167
  _(o.$slots, (i, u) => ({
168
168
  name: u,
169
169
  fn: v((s) => [
170
- R(o.$slots, u, q(U(s || {})))
170
+ q(o.$slots, u, R(U(s || {})))
171
171
  ])
172
172
  })),
173
173
  n.value ? {
@@ -0,0 +1,64 @@
1
+ import { ApFieldSliderProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ type ApFieldSliderSlots = {
5
+ default?: any;
6
+ mark?: (option: {
7
+ point: number;
8
+ label: any;
9
+ }) => any;
10
+ };
11
+ declare function focus(): void;
12
+ declare function blur(): void;
13
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSliderProps>, {
14
+ included: boolean;
15
+ min: number;
16
+ max: number;
17
+ step: number;
18
+ tooltipOpen: undefined;
19
+ tooltipVisible: undefined;
20
+ }>, {
21
+ focus: typeof focus;
22
+ blur: typeof blur;
23
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
24
+ "update:value": (...args: any[]) => void;
25
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSliderProps>, {
26
+ included: boolean;
27
+ min: number;
28
+ max: number;
29
+ step: number;
30
+ tooltipOpen: undefined;
31
+ tooltipVisible: undefined;
32
+ }>>> & {
33
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
34
+ }, {
35
+ min: number;
36
+ max: number;
37
+ step: number;
38
+ included: boolean;
39
+ tooltipOpen: boolean;
40
+ tooltipVisible: boolean;
41
+ }, {}>, Readonly<ApFieldSliderSlots> & ApFieldSliderSlots>;
42
+ export default _default;
43
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
44
+ type __VLS_TypePropsToRuntimeProps<T> = {
45
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
46
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
47
+ } : {
48
+ type: PropType<T[K]>;
49
+ required: true;
50
+ };
51
+ };
52
+ type __VLS_WithDefaults<P, D> = {
53
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
54
+ default: D[K];
55
+ }> : P[K];
56
+ };
57
+ type __VLS_Prettify<T> = {
58
+ [K in keyof T]: T[K];
59
+ } & {};
60
+ type __VLS_WithTemplateSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -0,0 +1,90 @@
1
+ import { defineComponent as x, useSlots as g, ref as k, computed as C, unref as o, openBlock as u, createElementBlock as S, Fragment as _, createTextVNode as P, toDisplayString as T, createBlock as V, mergeProps as b, createSlots as h, renderList as F, withCtx as R, renderSlot as U, normalizeProps as A, guardReactiveProps as $ } from "vue";
2
+ import { Slider as N } from "ant-design-vue";
3
+ import "../../hooks/index.mjs";
4
+ import { isNil as w, isArray as z, omit as D } from "lodash-unified";
5
+ import { useControllableValue as E } from "../../hooks/useControllableValue.mjs";
6
+ const I = /* @__PURE__ */ x({
7
+ name: "ApFieldSlider",
8
+ __name: "index",
9
+ props: {
10
+ mode: {},
11
+ id: {},
12
+ prefixCls: {},
13
+ tooltipPrefixCls: {},
14
+ range: {},
15
+ reverse: { type: Boolean },
16
+ min: { default: 0 },
17
+ max: { default: 100 },
18
+ step: { default: 1 },
19
+ marks: {},
20
+ dots: { type: Boolean },
21
+ value: {},
22
+ defaultValue: {},
23
+ included: { type: Boolean, default: !0 },
24
+ disabled: { type: Boolean },
25
+ vertical: { type: Boolean },
26
+ tipFormatter: {},
27
+ tooltipOpen: { type: Boolean, default: void 0 },
28
+ tooltipVisible: { type: Boolean, default: void 0 },
29
+ tooltipPlacement: {},
30
+ getTooltipPopupContainer: {},
31
+ autofocus: { type: Boolean },
32
+ handleStyle: {},
33
+ trackStyle: {},
34
+ onChange: {},
35
+ onAfterChange: {},
36
+ onFocus: {},
37
+ onBlur: {},
38
+ "onUpdate:value": {},
39
+ emptyText: {}
40
+ },
41
+ emits: ["update:value"],
42
+ setup(p, { expose: i, emit: s }) {
43
+ const d = g(), a = k(), l = p, m = s, { value: r, updateValue: f } = E(
44
+ l,
45
+ m
46
+ ), c = C(() => {
47
+ const e = o(r);
48
+ return w(e) ? l.emptyText : z(e) ? `${e[0]}-${e[1]}` : e;
49
+ });
50
+ function v() {
51
+ var e, t;
52
+ (t = (e = a.value) == null ? void 0 : e.focus) == null || t.call(e);
53
+ }
54
+ function y() {
55
+ var e, t;
56
+ (t = (e = a.value) == null ? void 0 : e.blur) == null || t.call(e);
57
+ }
58
+ return i({
59
+ focus: v,
60
+ blur: y
61
+ }), (e, t) => e.mode === "read" ? (u(), S(_, { key: 0 }, [
62
+ P(T(c.value), 1)
63
+ ], 64)) : (u(), V(o(N), b(
64
+ { key: 1 },
65
+ o(D)(l, [
66
+ "value",
67
+ "onUpdate:value",
68
+ "mode",
69
+ "emptyText",
70
+ "defaultValue"
71
+ ]),
72
+ {
73
+ value: o(r),
74
+ "onUpdate:value": o(f),
75
+ ref_key: "sliderRef",
76
+ ref: a
77
+ }
78
+ ), h({ _: 2 }, [
79
+ F(d, (L, n) => ({
80
+ name: n,
81
+ fn: R((B) => [
82
+ U(e.$slots, n, A($(B || {})))
83
+ ])
84
+ }))
85
+ ]), 1040, ["value", "onUpdate:value"]));
86
+ }
87
+ });
88
+ export {
89
+ I as default
90
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,10 +1,10 @@
1
- import { defineComponent as U, useSlots as z, ref as D, unref as o, computed as T, createVNode as u, Fragment as s, openBlock as h, createBlock as k, resolveDynamicComponent as $, createElementBlock as E, mergeProps as p, createSlots as g, renderList as V, withCtx as C, renderSlot as v, normalizeProps as B, guardReactiveProps as w } from "vue";
1
+ import { defineComponent as F, useSlots as U, ref as z, unref as o, computed as D, createVNode as u, Fragment as s, openBlock as h, createBlock as k, resolveDynamicComponent as T, createElementBlock as E, mergeProps as p, createSlots as g, renderList as V, withCtx as C, renderSlot as v, normalizeProps as B, guardReactiveProps as w } from "vue";
2
2
  import { Switch as A, Popconfirm as K } from "ant-design-vue";
3
3
  import "../../hooks/index.mjs";
4
4
  import { isNil as L, omit as P } from "lodash-unified";
5
5
  import { isDef as f } from "@fruits-chain/utils";
6
6
  import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
7
- const J = /* @__PURE__ */ U({
7
+ const J = /* @__PURE__ */ F({
8
8
  name: "ApFieldSwitch",
9
9
  __name: "index",
10
10
  props: {
@@ -50,12 +50,12 @@ const J = /* @__PURE__ */ U({
50
50
  setup(S, {
51
51
  emit: b
52
52
  }) {
53
- const c = z(), n = S, N = b, {
53
+ const c = U(), n = S, N = b, {
54
54
  value: l,
55
55
  updateValue: a
56
56
  } = M(n, N, {
57
57
  valuePropName: "checked"
58
- }), i = D(!1);
58
+ }), i = z(!1);
59
59
  async function y(e, r) {
60
60
  if (!f(n.confirm)) {
61
61
  if (!f(n.onAction)) {
@@ -78,12 +78,12 @@ const J = /* @__PURE__ */ U({
78
78
  }
79
79
  await n.onAction(e) && a(e);
80
80
  }
81
- const F = T(() => {
81
+ const $ = D(() => {
82
82
  var t, d;
83
83
  const e = o(l);
84
- return L(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((t = c.checkedChildren) == null ? void 0 : t.call(c)) || n.checkedValue]) : u(s, null, [n.unCheckedChildren || ((d = c.unCheckedChildren) == null ? void 0 : d.call(c)) || n.unCheckedValue]);
84
+ return L(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((t = c.checkedChildren) == null ? void 0 : t.call(c)) || `${n.checkedValue}`]) : u(s, null, [n.unCheckedChildren || ((d = c.unCheckedChildren) == null ? void 0 : d.call(c)) || `${n.unCheckedValue}`]);
85
85
  });
86
- return (e, r) => e.mode === "read" ? (h(), k($(F.value), {
86
+ return (e, r) => e.mode === "read" ? (h(), k(T($.value), {
87
87
  key: 0
88
88
  })) : (h(), E(s, {
89
89
  key: 1
@@ -0,0 +1,8 @@
1
+ import { default as _ApFieldText } from './index.vue';
2
+ import { default as ApFieldPassword } from './password.vue';
3
+
4
+ type ApFieldTextType = typeof _ApFieldText & {
5
+ Password: typeof ApFieldPassword;
6
+ };
7
+ declare const ApFieldText: ApFieldTextType;
8
+ export { ApFieldText, ApFieldPassword };
@@ -0,0 +1,10 @@
1
+ import "./index.vue.mjs";
2
+ import "./password.vue2.mjs";
3
+ import o from "./index.vue2.mjs";
4
+ import r from "./password.vue.mjs";
5
+ const i = o;
6
+ i.Password = r;
7
+ export {
8
+ r as ApFieldPassword,
9
+ i as ApFieldText
10
+ };