@opengis/form 0.0.28 → 0.0.29
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vs-input-select.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/vs-input-select.vue"],"names":[],"mappings":"AAqyBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"vs-input-select.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/vs-input-select.vue"],"names":[],"mappings":"AAqyBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;AAukCnE,wBAQG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vs-compact-form-layout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layouts/vs-compact-form-layout.vue"],"names":[],"mappings":"AA8DA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,KAAK,WAAW,GAAG,YAAY,CAAC;AA8ChC,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"vs-compact-form-layout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layouts/vs-compact-form-layout.vue"],"names":[],"mappings":"AA8DA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,KAAK,WAAW,GAAG,YAAY,CAAC;AA8ChC,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;;;;;;;;;;;AAoFF,wBAQG"}
|
package/dist/index.js
CHANGED
|
@@ -2131,9 +2131,9 @@ const Yo = /* @__PURE__ */ H(Wo, [["render", Xo]]), ea = { class: "flex flex-col
|
|
|
2131
2131
|
ref_for: !0,
|
|
2132
2132
|
ref: (re) => R.value[N] = re,
|
|
2133
2133
|
class: V([
|
|
2134
|
-
"flex px-3 py-2 cursor-default select-none hover:bg-blue-
|
|
2135
|
-
S.value === N ? "bg-blue-
|
|
2136
|
-
ee(_.id) ? "
|
|
2134
|
+
"flex px-3 py-2 cursor-default select-none text-gray-900 hover:bg-blue-100",
|
|
2135
|
+
S.value === N ? "bg-blue-100" : "",
|
|
2136
|
+
ee(_.id) ? "bg-blue-50" : "bg-white"
|
|
2137
2137
|
]),
|
|
2138
2138
|
"aria-disabled": ee(_.id) ? "true" : "false",
|
|
2139
2139
|
role: "option",
|
|
@@ -2478,7 +2478,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2478
2478
|
width: "14",
|
|
2479
2479
|
height: "14"
|
|
2480
2480
|
}),
|
|
2481
|
-
M[4] || (M[4] = fe(" Імпортувати "))
|
|
2481
|
+
M[4] || (M[4] = fe(" Імпортувати ", -1))
|
|
2482
2482
|
]),
|
|
2483
2483
|
l("button", {
|
|
2484
2484
|
onClick: E,
|
|
@@ -2490,7 +2490,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2490
2490
|
width: "14",
|
|
2491
2491
|
height: "14"
|
|
2492
2492
|
}),
|
|
2493
|
-
M[5] || (M[5] = fe(" Експортувати "))
|
|
2493
|
+
M[5] || (M[5] = fe(" Експортувати ", -1))
|
|
2494
2494
|
])
|
|
2495
2495
|
])
|
|
2496
2496
|
])
|
|
@@ -2502,7 +2502,7 @@ const $s = /* @__PURE__ */ H(ws, [["render", _s]]), Cs = { class: "vs-datatable
|
|
|
2502
2502
|
class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2503
2503
|
}, [
|
|
2504
2504
|
B(Fe),
|
|
2505
|
-
M[6] || (M[6] = fe(" Додати "))
|
|
2505
|
+
M[6] || (M[6] = fe(" Додати ", -1))
|
|
2506
2506
|
])
|
|
2507
2507
|
]),
|
|
2508
2508
|
l("div", Fs, [
|
|
@@ -3387,19 +3387,19 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3387
3387
|
l("div", ar, [
|
|
3388
3388
|
S.value ? (i(), d("div", sr, [
|
|
3389
3389
|
l("div", nr, [
|
|
3390
|
-
k[7] || (k[7] = fe(" Тип: ")),
|
|
3390
|
+
k[7] || (k[7] = fe(" Тип: ", -1)),
|
|
3391
3391
|
l("span", rr, T(S.value.type), 1)
|
|
3392
3392
|
]),
|
|
3393
3393
|
l("div", ir, [
|
|
3394
3394
|
l("div", ur, [
|
|
3395
|
-
k[8] || (k[8] = fe(" Центр: ")),
|
|
3395
|
+
k[8] || (k[8] = fe(" Центр: ", -1)),
|
|
3396
3396
|
l("b", null, T(S.value.center.lat.toFixed(5)) + ", " + T(S.value.center.lng.toFixed(5)), 1)
|
|
3397
3397
|
]),
|
|
3398
3398
|
S.value.areaKm2 !== null ? (i(), d("div", dr, [
|
|
3399
|
-
k[9] || (k[9] = fe(" Площа: ")),
|
|
3399
|
+
k[9] || (k[9] = fe(" Площа: ", -1)),
|
|
3400
3400
|
l("b", null, T(S.value.areaKm2.toFixed(1)) + "км²", 1)
|
|
3401
3401
|
])) : (i(), d("div", cr, k[10] || (k[10] = [
|
|
3402
|
-
fe(" Площа: "),
|
|
3402
|
+
fe(" Площа: ", -1),
|
|
3403
3403
|
l("b", null, "—", -1)
|
|
3404
3404
|
]))),
|
|
3405
3405
|
l("button", {
|
|
@@ -3884,7 +3884,7 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3884
3884
|
class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
|
|
3885
3885
|
}, T(s.button), 1));
|
|
3886
3886
|
}
|
|
3887
|
-
}),
|
|
3887
|
+
}), wt = /* @__PURE__ */ F({
|
|
3888
3888
|
__name: "vs-compact-form-layout",
|
|
3889
3889
|
props: /* @__PURE__ */ Z({
|
|
3890
3890
|
item: { default: {} },
|
|
@@ -3916,13 +3916,15 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3916
3916
|
label: e.item.label
|
|
3917
3917
|
}, {
|
|
3918
3918
|
default: Le(() => [
|
|
3919
|
-
l("div",
|
|
3919
|
+
l("div", {
|
|
3920
|
+
class: V(["flex w-full", `${e.item.type}-component`])
|
|
3921
|
+
}, [
|
|
3920
3922
|
(i(), ae(Be(s.value), Ee(a.value, {
|
|
3921
3923
|
modelValue: t.value,
|
|
3922
3924
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => t.value = v)
|
|
3923
3925
|
}), null, 16, ["modelValue"])),
|
|
3924
3926
|
u.item.behavior?.api && u.item.behavior?.button ? (i(), ae(Gr, Ee({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
|
|
3925
|
-
])
|
|
3927
|
+
], 2)
|
|
3926
3928
|
]),
|
|
3927
3929
|
_: 1
|
|
3928
3930
|
}, 8, ["ua", "error", "item", "label"]));
|
|
@@ -3930,23 +3932,23 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3930
3932
|
}), kt = {
|
|
3931
3933
|
required: "Це поле є обов’язковим",
|
|
3932
3934
|
email: "Неправильний email"
|
|
3933
|
-
},
|
|
3935
|
+
}, Jr = (o) => o ? !1 : kt.required, Kr = (o) => !o && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) ? kt.email : !1, Zr = (o, e) => {
|
|
3934
3936
|
const t = e.pattern ?? e.regexp;
|
|
3935
3937
|
return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
|
|
3936
|
-
},
|
|
3938
|
+
}, Wr = (o, e) => !1, Qr = (o, e) => {
|
|
3937
3939
|
switch (typeof e == "string" ? e : e.type) {
|
|
3938
3940
|
case "required":
|
|
3939
|
-
return
|
|
3941
|
+
return Jr(o);
|
|
3940
3942
|
case "email":
|
|
3941
|
-
return
|
|
3943
|
+
return Kr(o);
|
|
3942
3944
|
case "regexp":
|
|
3943
|
-
return
|
|
3945
|
+
return Zr(o, e);
|
|
3944
3946
|
case "custom":
|
|
3945
|
-
return
|
|
3947
|
+
return Wr();
|
|
3946
3948
|
default:
|
|
3947
3949
|
return !1;
|
|
3948
3950
|
}
|
|
3949
|
-
},
|
|
3951
|
+
}, Xr = {
|
|
3950
3952
|
autocomplete: "select",
|
|
3951
3953
|
combobox: "select",
|
|
3952
3954
|
datepicker: "date",
|
|
@@ -3960,9 +3962,9 @@ const wn = /* @__PURE__ */ H(bn, [["render", xn]]), kn = { class: "form-geom__se
|
|
|
3960
3962
|
};
|
|
3961
3963
|
function ct(o) {
|
|
3962
3964
|
const e = o.toLowerCase();
|
|
3963
|
-
return
|
|
3965
|
+
return Xr[e] || e;
|
|
3964
3966
|
}
|
|
3965
|
-
function
|
|
3967
|
+
function Yr(o) {
|
|
3966
3968
|
if (Array.isArray(o)) {
|
|
3967
3969
|
const t = [];
|
|
3968
3970
|
return o.forEach((n) => {
|
|
@@ -3982,8 +3984,8 @@ function ei(o) {
|
|
|
3982
3984
|
t[1].type.includes("list") && (n.multiple = !0), t[1].data && (n.api = `/api/suggest/${t[1].data}`), e.push(n);
|
|
3983
3985
|
}), e;
|
|
3984
3986
|
}
|
|
3985
|
-
function
|
|
3986
|
-
const t =
|
|
3987
|
+
function ei(o, e) {
|
|
3988
|
+
const t = Yr(e), n = x({});
|
|
3987
3989
|
function s(c) {
|
|
3988
3990
|
const v = c?.conditions;
|
|
3989
3991
|
if (!v) return !0;
|
|
@@ -3997,7 +3999,7 @@ function ti(o, e) {
|
|
|
3997
3999
|
return;
|
|
3998
4000
|
}
|
|
3999
4001
|
p.rules.forEach((w) => {
|
|
4000
|
-
const b =
|
|
4002
|
+
const b = Qr(o.value[p.name], w);
|
|
4001
4003
|
b ? n.value[p.name] = b : delete n.value[p.name];
|
|
4002
4004
|
});
|
|
4003
4005
|
}
|
|
@@ -4033,7 +4035,7 @@ const De = /* @__PURE__ */ F({
|
|
|
4033
4035
|
validate: c,
|
|
4034
4036
|
reset: v,
|
|
4035
4037
|
visibleSchema: p
|
|
4036
|
-
} =
|
|
4038
|
+
} = ei(a, s.schema), w = () => {
|
|
4037
4039
|
n("update:modelValue", a.value), c(), n("handle-submit", a.value);
|
|
4038
4040
|
};
|
|
4039
4041
|
e({
|
|
@@ -4068,7 +4070,7 @@ const De = /* @__PURE__ */ F({
|
|
|
4068
4070
|
}, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
|
|
4069
4071
|
], 34));
|
|
4070
4072
|
}
|
|
4071
|
-
}),
|
|
4073
|
+
}), ti = { class: "relative" }, li = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, oi = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, ai = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, si = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, ni = { class: "p-4 mim-h-0 h-full overflow-auto" }, ri = /* @__PURE__ */ F({
|
|
4072
4074
|
__name: "modal-edit",
|
|
4073
4075
|
props: {
|
|
4074
4076
|
schema: {},
|
|
@@ -4138,11 +4140,11 @@ const De = /* @__PURE__ */ F({
|
|
|
4138
4140
|
const w = await fetch(`/api/form/${u.value}`).then((b) => b.json());
|
|
4139
4141
|
s.value = w.schema, w.data ? r.value = w.data : c.value = "add";
|
|
4140
4142
|
}
|
|
4141
|
-
}), (w, b) => (i(), d("div",
|
|
4142
|
-
l("div",
|
|
4143
|
-
l("div",
|
|
4144
|
-
l("div",
|
|
4145
|
-
l("h3",
|
|
4143
|
+
}), (w, b) => (i(), d("div", ti, [
|
|
4144
|
+
l("div", li, [
|
|
4145
|
+
l("div", oi, [
|
|
4146
|
+
l("div", ai, [
|
|
4147
|
+
l("h3", si, T(c.value === "add" ? "Додати" : "Змінити"), 1),
|
|
4146
4148
|
l("button", {
|
|
4147
4149
|
onClick: p,
|
|
4148
4150
|
type: "button",
|
|
@@ -4166,7 +4168,7 @@ const De = /* @__PURE__ */ F({
|
|
|
4166
4168
|
], -1)
|
|
4167
4169
|
]))
|
|
4168
4170
|
]),
|
|
4169
|
-
l("div",
|
|
4171
|
+
l("div", ni, [
|
|
4170
4172
|
s.value ? (i(), ae(De, {
|
|
4171
4173
|
key: 0,
|
|
4172
4174
|
schema: s.value,
|
|
@@ -4199,7 +4201,7 @@ const De = /* @__PURE__ */ F({
|
|
|
4199
4201
|
visible: !0,
|
|
4200
4202
|
size: "medium",
|
|
4201
4203
|
closeClickBack: !0,
|
|
4202
|
-
content:
|
|
4204
|
+
content: ri,
|
|
4203
4205
|
contentProps: {
|
|
4204
4206
|
...o,
|
|
4205
4207
|
onClose: () => {
|
|
@@ -4217,7 +4219,7 @@ De.install = function(e) {
|
|
|
4217
4219
|
}), e.provide("form", pt), window.v3plugin || (window.v3plugin = {});
|
|
4218
4220
|
};
|
|
4219
4221
|
export {
|
|
4220
|
-
|
|
4222
|
+
ri as ModalEdit,
|
|
4221
4223
|
De as VForm,
|
|
4222
4224
|
ql as VsInputCheckbox,
|
|
4223
4225
|
Rr as VsInputColor,
|