@aplus-frontend/ui 7.14.4 → 7.15.0
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/es/src/ap-field/checkbox/index.vue.d.ts +3 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +37 -31
- package/es/src/ap-field/date/index.vue.d.ts +1086 -6
- package/es/src/ap-field/date/index.vue.mjs +63 -57
- package/es/src/ap-field/date-range/index.vue.d.ts +1155 -4
- package/es/src/ap-field/date-range/index.vue.mjs +70 -63
- package/es/src/ap-field/interface.d.ts +25 -27
- package/es/src/ap-field/number/index.vue.d.ts +1 -1
- package/es/src/ap-field/radio/index.vue.d.ts +1 -2
- package/es/src/ap-field/radio/index.vue.mjs +36 -41
- package/es/src/ap-field/rate/index.vue.d.ts +1 -1
- package/es/src/ap-field/second/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.d.ts +5 -4
- package/es/src/ap-field/select/index.vue.mjs +126 -112
- package/es/src/ap-field/select/read.vue2.mjs +4 -3
- package/es/src/ap-field/slider/index.vue.d.ts +1 -1
- package/es/src/ap-field/switch/index.vue.d.ts +232 -4
- package/es/src/ap-field/switch/index.vue.mjs +48 -42
- package/es/src/ap-field/text/password.vue.d.ts +1 -1
- package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/es/src/ap-form/item-group/index.vue.d.ts +2 -4
- package/es/src/ap-form/item-group/index.vue.mjs +37 -42
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
- package/es/src/ap-form/items/checkbox/index.vue.mjs +20 -14
- package/es/src/ap-form/items/date/index.vue.d.ts +1497 -5
- package/es/src/ap-form/items/date/index.vue.mjs +25 -19
- package/es/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
- package/es/src/ap-form/items/date-range/index.vue.mjs +25 -19
- package/es/src/ap-form/items/number/index.vue.d.ts +4 -4
- package/es/src/ap-form/items/radio/index.vue.d.ts +5 -10
- package/es/src/ap-form/items/radio/index.vue.mjs +14 -20
- package/es/src/ap-form/items/select/index.vue.d.ts +18 -12
- package/es/src/ap-form/items/switch/index.vue.d.ts +436 -5
- package/es/src/ap-form/items/switch/index.vue.mjs +24 -17
- package/es/src/ap-form/items/text/password.vue.d.ts +5 -5
- package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/es/src/ap-table/constants.d.ts +1923 -112
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +36 -36
- package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +28 -27
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +78 -81
- package/es/src/config-provider/config-provider-props.d.ts +3 -1
- package/es/src/config-provider/config-provider.d.ts +7 -28
- package/es/src/config-provider/hooks/use-global-config.d.ts +3 -10
- package/es/src/config-provider/index.d.ts +13 -55
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/checkbox/index.vue.d.ts +3 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +1086 -6
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +1155 -4
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +25 -27
- package/lib/src/ap-field/number/index.vue.d.ts +1 -1
- package/lib/src/ap-field/radio/index.vue.d.ts +1 -2
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
- package/lib/src/ap-field/second/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +5 -4
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +1 -1
- package/lib/src/ap-field/switch/index.vue.d.ts +232 -4
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/lib/src/ap-form/item-group/index.vue.d.ts +2 -4
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +1497 -5
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +4 -4
- package/lib/src/ap-form/items/radio/index.vue.d.ts +5 -10
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +18 -12
- package/lib/src/ap-form/items/switch/index.vue.d.ts +436 -5
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +5 -5
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/lib/src/ap-table/constants.d.ts +1923 -112
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-button-group/ApButtonGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +3 -1
- package/lib/src/config-provider/config-provider.d.ts +7 -28
- package/lib/src/config-provider/hooks/use-global-config.d.ts +3 -10
- package/lib/src/config-provider/index.d.ts +13 -55
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InputGroup as
|
|
3
|
-
import { getTimeFormatToZone as
|
|
1
|
+
import { defineComponent as j, ref as I, computed as r, unref as t, createElementBlock as B, createBlock as h, openBlock as i, Fragment as g, createTextVNode as b, toDisplayString as P, normalizeStyle as U, withCtx as s, createVNode as w, createCommentVNode as H, isRef as K, renderList as C, mergeProps as W, createSlots as $, renderSlot as G, normalizeProps as L, guardReactiveProps as Y } from "vue";
|
|
2
|
+
import { InputGroup as Z, FormItemRest as q, Select as J, SelectOption as Q, DatePicker as X } from "@aplus-frontend/antdv";
|
|
3
|
+
import { getTimeFormatToZone as ee } from "@aplus-frontend/utils";
|
|
4
4
|
import u from "dayjs";
|
|
5
|
-
import { isNil as
|
|
5
|
+
import { isNil as O, omit as oe } from "lodash-unified";
|
|
6
6
|
import "../../hooks/index.mjs";
|
|
7
|
-
import { useDateTimezone as
|
|
8
|
-
import { useDefaultPlaceholder as
|
|
9
|
-
import { ApFieldDatePresetFormats as
|
|
10
|
-
import { formatDayWithTimezone as
|
|
11
|
-
import { useControllableValue as
|
|
12
|
-
const
|
|
7
|
+
import { useDateTimezone as te } from "../hooks/use-date-timezone.mjs";
|
|
8
|
+
import { useDefaultPlaceholder as ae } from "../hooks/use-default-placeholder.mjs";
|
|
9
|
+
import { ApFieldDatePresetFormats as ne, PRESET_FORMAT_MAP as S, PRESET_FORMAT_PICK_MAP as le, PRESET_FORMAT_TIME_MAP as re } from "./constant.mjs";
|
|
10
|
+
import { formatDayWithTimezone as ue } from "./helper.mjs";
|
|
11
|
+
import { useControllableValue as de } from "../../hooks/useControllableValue.mjs";
|
|
12
|
+
const ge = /* @__PURE__ */ j({
|
|
13
13
|
name: "ApFieldDate",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -92,23 +92,23 @@ const he = /* @__PURE__ */ E({
|
|
|
92
92
|
timezone: {}
|
|
93
93
|
},
|
|
94
94
|
emits: ["update:value"],
|
|
95
|
-
setup(
|
|
96
|
-
const e =
|
|
95
|
+
setup(T, { expose: F, emit: R }) {
|
|
96
|
+
const e = T, _ = R, f = I(), { value: c, updateValue: k } = de(
|
|
97
97
|
e,
|
|
98
|
-
|
|
99
|
-
),
|
|
100
|
-
() =>
|
|
101
|
-
),
|
|
102
|
-
() => l.value ?
|
|
103
|
-
),
|
|
104
|
-
if (
|
|
98
|
+
_
|
|
99
|
+
), A = ae("Date", e), { currentTimezone: d } = te(e), l = r(
|
|
100
|
+
() => ne.indexOf(e.format) > -1
|
|
101
|
+
), M = r(() => e.shownFormat ? e.shownFormat : l.value ? S[e.format] : e.format), m = r(
|
|
102
|
+
() => l.value ? S[e.format] : e.format
|
|
103
|
+
), v = r(() => {
|
|
104
|
+
if (O(t(c)))
|
|
105
105
|
return;
|
|
106
|
-
let o = u(t(
|
|
107
|
-
return e.timezone && (o = u(
|
|
108
|
-
}),
|
|
109
|
-
const o = t(l) ?
|
|
106
|
+
let o = u(t(c));
|
|
107
|
+
return e.timezone && (o = u(ee(t(c), d.value))), o;
|
|
108
|
+
}), D = r(() => t(l) ? e.picker ?? le[e.format] : e.picker), x = r(() => {
|
|
109
|
+
const o = t(l) ? re[e.format] : {};
|
|
110
110
|
return {
|
|
111
|
-
...
|
|
111
|
+
...oe(e, [
|
|
112
112
|
"value",
|
|
113
113
|
"defaultValue",
|
|
114
114
|
"onChange",
|
|
@@ -117,89 +117,95 @@ const he = /* @__PURE__ */ E({
|
|
|
117
117
|
"onUpdate:value",
|
|
118
118
|
"mode"
|
|
119
119
|
]),
|
|
120
|
-
placeholder: t(
|
|
120
|
+
placeholder: t(A),
|
|
121
121
|
...o
|
|
122
122
|
};
|
|
123
|
-
}),
|
|
124
|
-
function
|
|
125
|
-
if (
|
|
126
|
-
|
|
123
|
+
}), y = (o, n, a = !0) => ue(d.value)(o, n, a);
|
|
124
|
+
function V(o) {
|
|
125
|
+
if (O(o)) {
|
|
126
|
+
k(null);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
const n = u(o);
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
k(
|
|
131
|
+
y(
|
|
132
132
|
n,
|
|
133
133
|
t(l) ? t(m) : void 0,
|
|
134
134
|
e.formatBegins
|
|
135
135
|
)
|
|
136
136
|
);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
const a = u(o), p = o ?
|
|
138
|
+
function z(o, n) {
|
|
139
|
+
const a = u(o), p = o ? y(
|
|
140
140
|
a,
|
|
141
141
|
t(l) ? t(m) : void 0,
|
|
142
142
|
e.formatBegins
|
|
143
143
|
) : null;
|
|
144
144
|
e.onChange?.(p, n);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
const n = u(o), a = o ?
|
|
146
|
+
function E(o) {
|
|
147
|
+
const n = u(o), a = o ? y(
|
|
148
148
|
n,
|
|
149
149
|
t(l) ? t(m) : void 0,
|
|
150
150
|
e.formatBegins
|
|
151
151
|
) : null;
|
|
152
152
|
e.onOk?.(a);
|
|
153
153
|
}
|
|
154
|
-
return (
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
return F({
|
|
155
|
+
focus: () => f.value?.focus(),
|
|
156
|
+
blur: () => f.value?.blur()
|
|
157
|
+
}), (o, n) => o.mode === "read" ? (i(), B(g, { key: 0 }, [
|
|
158
|
+
b(P(v.value ? t(u)(v.value).format(m.value) : o.emptyText), 1)
|
|
159
|
+
], 64)) : (i(), h(t(Z), {
|
|
157
160
|
key: 1,
|
|
158
161
|
compact: "",
|
|
159
|
-
style:
|
|
162
|
+
style: U({
|
|
160
163
|
display: Array.isArray(e.timezone) && e.timezone.length ? "flex" : "block"
|
|
161
164
|
})
|
|
162
165
|
}, {
|
|
163
166
|
default: s(() => [
|
|
164
|
-
|
|
167
|
+
w(t(q), null, {
|
|
165
168
|
default: s(() => [
|
|
166
|
-
Array.isArray(e.timezone) && e.timezone.length ? (i(),
|
|
169
|
+
Array.isArray(e.timezone) && e.timezone.length ? (i(), h(t(J), {
|
|
167
170
|
key: 0,
|
|
168
171
|
value: t(d),
|
|
169
|
-
"onUpdate:value": n[0] || (n[0] = (a) =>
|
|
172
|
+
"onUpdate:value": n[0] || (n[0] = (a) => K(d) ? d.value = a : null),
|
|
170
173
|
"default-active-first-option": "",
|
|
171
174
|
"dropdown-match-select-width": !1,
|
|
172
175
|
style: { "max-width": "50%" },
|
|
173
176
|
disabled: o.disabled
|
|
174
177
|
}, {
|
|
175
178
|
default: s(() => [
|
|
176
|
-
(i(!0), B(g, null,
|
|
179
|
+
(i(!0), B(g, null, C(e.timezone, (a) => (i(), h(t(Q), {
|
|
177
180
|
key: a?.value,
|
|
178
181
|
value: a?.value
|
|
179
182
|
}, {
|
|
180
183
|
default: s(() => [
|
|
181
|
-
|
|
184
|
+
b(P(a?.label ?? a?.value), 1)
|
|
182
185
|
]),
|
|
183
186
|
_: 2
|
|
184
187
|
}, 1032, ["value"]))), 128))
|
|
185
188
|
]),
|
|
186
189
|
_: 1
|
|
187
|
-
}, 8, ["value", "disabled"])) :
|
|
190
|
+
}, 8, ["value", "disabled"])) : H("", !0)
|
|
188
191
|
]),
|
|
189
192
|
_: 1
|
|
190
193
|
}),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
w(t(X), W({
|
|
195
|
+
ref_key: "datePickerRef",
|
|
196
|
+
ref: f
|
|
197
|
+
}, x.value, {
|
|
198
|
+
value: v.value,
|
|
199
|
+
format: M.value,
|
|
200
|
+
picker: D.value,
|
|
201
|
+
"onUpdate:value": V,
|
|
202
|
+
onChange: z,
|
|
203
|
+
onOk: E
|
|
204
|
+
}), $({ _: 2 }, [
|
|
205
|
+
C(o.$slots, (a, p) => ({
|
|
200
206
|
name: p,
|
|
201
|
-
fn: s((
|
|
202
|
-
|
|
207
|
+
fn: s((N) => [
|
|
208
|
+
G(o.$slots, p, L(Y(N || {})))
|
|
203
209
|
])
|
|
204
210
|
}))
|
|
205
211
|
]), 1040, ["value", "format", "picker"])
|
|
@@ -209,5 +215,5 @@ const he = /* @__PURE__ */ E({
|
|
|
209
215
|
}
|
|
210
216
|
});
|
|
211
217
|
export {
|
|
212
|
-
|
|
218
|
+
ge as default
|
|
213
219
|
};
|