@opengis/form 0.0.50 → 0.0.51

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":"AAi2BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAuqCnE,wBAQG"}
1
+ {"version":3,"file":"vs-input-select.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/vs-input-select.vue"],"names":[],"mappings":"AAm2BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAyqCnE,wBAQG"}
package/dist/index.js CHANGED
@@ -1007,7 +1007,7 @@ function wo(o, e) {
1007
1007
  l("path", { d: "M12 5v14" }, null, -1)
1008
1008
  ]));
1009
1009
  }
1010
- const Re = /* @__PURE__ */ X(yo, [["render", wo]]), ko = {}, _o = {
1010
+ const He = /* @__PURE__ */ X(yo, [["render", wo]]), ko = {}, _o = {
1011
1011
  xmlns: "http://www.w3.org/2000/svg",
1012
1012
  class: "icon icon-tabler icon-tabler-file-text",
1013
1013
  width: "44",
@@ -1281,7 +1281,7 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1281
1281
  c.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1282
1282
  ])
1283
1283
  }, [
1284
- A(Re, { class: "w-6 h-6" })
1284
+ A(He, { class: "w-6 h-6" })
1285
1285
  ], 2)
1286
1286
  ])) : D("", !0),
1287
1287
  c.multiple ? D("", !0) : (i(), d("div", {
@@ -1289,7 +1289,7 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1289
1289
  onClick: p[4] || (p[4] = (f) => s.value?.click()),
1290
1290
  class: E([c.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1291
1291
  }, [
1292
- A(Re, { class: "w-6 h-6" })
1292
+ A(He, { class: "w-6 h-6" })
1293
1293
  ], 2))
1294
1294
  ]));
1295
1295
  }
@@ -1897,7 +1897,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1897
1897
  const P = h ? h[C] : null;
1898
1898
  N.value[g] = P ?? null;
1899
1899
  });
1900
- }, ce = B(() => t.parent ? N?.value?.[t.parent] ?? null : null), Ve = async (h) => {
1900
+ }, ce = B(() => t.parent ? N?.value?.[t.parent]?.toString() ?? null : null), Ve = async (h) => {
1901
1901
  if (!t.data) {
1902
1902
  let g = t.options ?? [];
1903
1903
  if (h?.trim()) {
@@ -1911,11 +1911,11 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1911
1911
  }
1912
1912
  try {
1913
1913
  const g = t.host ?? "", C = t.prefix ?? "api", P = t.api ?? `/${C}/suggest/${t.data}`, ae = `${g}${P}`, fe = new URLSearchParams();
1914
- return fe.set("json", "1"), h && fe.set("key", h), ce.value !== void 0 && ce.value !== null && ce.value !== "" && fe.set("parent", String(ce.value)), (await fetch(`${ae}?${fe.toString()}`).then((Ae) => Ae.json()))?.data ?? [];
1914
+ return fe.set("json", "1"), h && fe.set("key", h), ce.value !== void 0 && ce.value !== null && ce.value !== "" && fe.set("parent", ce.value), (await fetch(`${ae}?${fe.toString()}`).then((Ae) => Ae.json()))?.data ?? [];
1915
1915
  } catch {
1916
1916
  return [];
1917
1917
  }
1918
- }, Ne = async () => {
1918
+ }, Oe = async () => {
1919
1919
  t.data ? q.value = await Ve(T.value) : q.value = t.options ? [...t.options] : [];
1920
1920
  }, qe = async (h) => {
1921
1921
  if (h == null) return null;
@@ -1928,17 +1928,17 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1928
1928
  const fe = await qe(ae);
1929
1929
  fe && q.value.push(fe);
1930
1930
  }, Promise.resolve());
1931
- }, Oe = async () => {
1932
- s.value || (m.value = !0, await Ne(), await Ie(() => {
1931
+ }, De = async () => {
1932
+ s.value || (m.value = !0, await Oe(), await Ie(() => {
1933
1933
  Me(), H.value?.focus(), Z.value.length ? R.value = 0 : R.value = -1;
1934
1934
  }));
1935
1935
  }, $e = () => {
1936
1936
  m.value = !1, R.value = -1;
1937
1937
  }, b = async (h) => {
1938
1938
  if (s.value) return;
1939
- !m.value ? await Oe() : $e();
1939
+ !m.value ? await De() : $e();
1940
1940
  }, k = async () => {
1941
- m.value ? H.value?.focus() : await Oe();
1941
+ m.value ? H.value?.focus() : await De();
1942
1942
  }, Y = () => {
1943
1943
  n.value ? (x.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null)), oe(null), T.value = "", Ie(() => H.value?.focus());
1944
1944
  }, O = (h) => {
@@ -1970,25 +1970,25 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1970
1970
  }, Me = () => {
1971
1971
  if (!c.value) return;
1972
1972
  const h = c.value.getBoundingClientRect(), g = window.innerHeight || document.documentElement.clientHeight, C = window.innerWidth || document.documentElement.clientWidth, P = 8, ae = 8, fe = t.maxHeight || 300, Ee = g - h.bottom - ae - P, Ae = h.top - ae - P, Ze = Ee >= Ae, lt = Math.max(C - P * 2, 0);
1973
- let { width: De } = h;
1974
- lt > 0 && De > lt && (De = lt);
1975
- let { left: Ue } = h;
1976
- Ue + De + P > C && (Ue = C - De - P), Ue = Math.max(Ue, P);
1973
+ let { width: Ue } = h;
1974
+ lt > 0 && Ue > lt && (Ue = lt);
1975
+ let { left: Pe } = h;
1976
+ Pe + Ue + P > C && (Pe = C - Ue - P), Pe = Math.max(Pe, P);
1977
1977
  const Ht = Math.min(
1978
1978
  fe,
1979
1979
  Math.max(Ze ? Ee : Ae, 50)
1980
1980
  );
1981
1981
  I.value = Ze ? "bottom" : "top", v.value = {
1982
1982
  position: "fixed",
1983
- left: `${Ue}px`,
1984
- width: `${De}px`,
1983
+ left: `${Pe}px`,
1984
+ width: `${Ue}px`,
1985
1985
  minWidth: "300px",
1986
1986
  maxHeight: `${Ht}px`,
1987
1987
  transform: Ze ? "none" : "translateY(-100%)",
1988
1988
  top: Ze ? `${h.bottom + ae}px` : `${h.top - ae}px`
1989
1989
  };
1990
1990
  }, je = async (h) => {
1991
- s.value || !m.value && (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), await Oe());
1991
+ s.value || !m.value && (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), await De());
1992
1992
  }, Tt = (h) => {
1993
1993
  if (!m.value) return;
1994
1994
  const { key: g } = h;
@@ -2034,7 +2034,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2034
2034
  ie(r, () => {
2035
2035
  We();
2036
2036
  }), ke(async () => {
2037
- addEventListener("keydown", rt), addEventListener("scroll", ut, !0), addEventListener("resize", dt), document.addEventListener("click", it, !0), c.value && Se(c.value).addEventListener("scroll", ct, !0), t.options?.length ? q.value = [...t.options] : t.data && (q.value = await Ve("")), await We();
2037
+ addEventListener("keydown", rt), addEventListener("scroll", ut, !0), addEventListener("resize", dt), document.addEventListener("click", it, !0), c.value && Se(c.value).addEventListener("scroll", ct, !0), t.options?.length && !t.data ? q.value = [...t.options] : t.data && (q.value = await Ve("")), await We();
2038
2038
  }), Ye(() => {
2039
2039
  removeEventListener("keydown", rt), removeEventListener("scroll", ut, !0), removeEventListener("resize", dt), document.removeEventListener("click", it, !0), c.value && Se(c.value).removeEventListener("scroll", ct, !0);
2040
2040
  });
@@ -2072,9 +2072,9 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2072
2072
  }), ie(() => t.options, (h) => {
2073
2073
  !t.data && h?.length && (q.value = [...h], We());
2074
2074
  }, { immediate: !0 }), ie(() => t.parent ?? t.parentValue, () => {
2075
- t.data && Ne();
2075
+ t.data && Oe();
2076
2076
  }), ie(ce, async () => {
2077
- t.data && (n.value ? (x.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null)));
2077
+ t.data && (n.value ? (x.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null)), await Oe());
2078
2078
  }), (h, g) => (i(), d(se, null, [
2079
2079
  A(ee(Lt), {
2080
2080
  visible: Ge.value,
@@ -2085,7 +2085,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2085
2085
  teleport: h.teleport
2086
2086
  }, {
2087
2087
  default: Be(() => [
2088
- A(He, {
2088
+ A(Ne, {
2089
2089
  schema: pt.value,
2090
2090
  modelValue: tt.value,
2091
2091
  "onUpdate:modelValue": g[0] || (g[0] = (C) => tt.value = C),
@@ -2317,7 +2317,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2317
2317
  disabled: s.value,
2318
2318
  type: "button"
2319
2319
  }, [
2320
- A(Re, {
2320
+ A(He, {
2321
2321
  width: "16",
2322
2322
  height: "16"
2323
2323
  }),
@@ -2669,7 +2669,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2669
2669
  onClick: te,
2670
2670
  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"
2671
2671
  }, [
2672
- A(Re),
2672
+ A(He),
2673
2673
  j[6] || (j[6] = ge(" Додати ", -1))
2674
2674
  ])
2675
2675
  ]),
@@ -2781,7 +2781,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2781
2781
  onClose: le
2782
2782
  }, {
2783
2783
  default: Be(() => [
2784
- A(He, {
2784
+ A(Ne, {
2785
2785
  schema: e.colModel,
2786
2786
  values: _.value,
2787
2787
  "onUpdate:values": j[1] || (j[1] = ($) => _.value = $),
@@ -2913,29 +2913,29 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2913
2913
  }
2914
2914
  }
2915
2915
  };
2916
- function Pe(o) {
2916
+ function Re(o) {
2917
2917
  return o ? o.type === "Polygon" ? {
2918
2918
  type: "MultiPolygon",
2919
2919
  coordinates: [o.coordinates]
2920
2920
  } : o.type === "Feature" ? {
2921
2921
  ...o,
2922
- geometry: Pe(o.geometry)
2922
+ geometry: Re(o.geometry)
2923
2923
  } : o.type === "FeatureCollection" ? {
2924
2924
  ...o,
2925
- features: (o.features || []).map((e) => Pe(e)).filter(Boolean)
2925
+ features: (o.features || []).map((e) => Re(e)).filter(Boolean)
2926
2926
  } : o : null;
2927
2927
  }
2928
2928
  function Bs(o) {
2929
- return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Pe(o) : o.geom ? {
2929
+ return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Re(o) : o.geom ? {
2930
2930
  type: "Feature",
2931
- geometry: Pe({
2931
+ geometry: Re({
2932
2932
  type: o.geom.type,
2933
2933
  coordinates: o.geom.coordinates
2934
2934
  }),
2935
2935
  properties: {}
2936
2936
  } : o.type && o.coordinates ? {
2937
2937
  type: "Feature",
2938
- geometry: Pe(o),
2938
+ geometry: Re(o),
2939
2939
  properties: {}
2940
2940
  } : null : null;
2941
2941
  }
@@ -3350,7 +3350,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3350
3350
  c.value && (c.value.removeEventListener("wheel", k), c.value.removeEventListener("touchstart", Y)), p && p.off("wheel"), clearTimeout(b);
3351
3351
  };
3352
3352
  }
3353
- const K = w(null), T = w(6), H = w(0), I = w(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), v = w(null), x = Oe();
3353
+ const K = w(null), T = w(6), H = w(0), I = w(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), v = w(null), x = De();
3354
3354
  let V;
3355
3355
  const _ = w("topo100");
3356
3356
  function F(b) {
@@ -3505,7 +3505,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3505
3505
  const b = f.toGeoJSON(), k = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), Y = URL.createObjectURL(k), O = document.createElement("a");
3506
3506
  O.href = Y, O.download = "data.geojson", O.click(), URL.revokeObjectURL(Y);
3507
3507
  }
3508
- function Ne(b) {
3508
+ function Oe(b) {
3509
3509
  const k = b.target, Y = k.files?.[0];
3510
3510
  if (!Y) return;
3511
3511
  const O = new FileReader();
@@ -3544,7 +3544,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3544
3544
  }), H.value = f.getLayers().length, $(), M();
3545
3545
  }
3546
3546
  );
3547
- function Oe() {
3547
+ function De() {
3548
3548
  return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((b, k) => Object.assign(b, { key: `b${k}`, preview: b.preview || b.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((b, k) => ({ ...b, [k.key]: k }), {}) : {
3549
3549
  topo100: {
3550
3550
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
@@ -3611,7 +3611,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3611
3611
  ref_key: "importRef",
3612
3612
  ref: S,
3613
3613
  type: "file",
3614
- onChange: Ne,
3614
+ onChange: Oe,
3615
3615
  accept: ".json,.geojson",
3616
3616
  class: "hidden"
3617
3617
  }, null, 544)
@@ -4030,7 +4030,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4030
4030
  disabled: S.value,
4031
4031
  class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
4032
4032
  }, [
4033
- A(Re, {
4033
+ A(He, {
4034
4034
  height: "14",
4035
4035
  width: "14"
4036
4036
  }),
@@ -4535,7 +4535,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4535
4535
  "data-orientation": "horizontal",
4536
4536
  role: "none",
4537
4537
  class: "mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"
4538
- }, He = /* @__PURE__ */ U({
4538
+ }, Ne = /* @__PURE__ */ U({
4539
4539
  __name: "vs-compact-form",
4540
4540
  props: /* @__PURE__ */ re({
4541
4541
  schema: { default: () => [] },
@@ -4747,7 +4747,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4747
4747
  ]))
4748
4748
  ]),
4749
4749
  l("div", Fi, [
4750
- n.value ? (i(), me(He, {
4750
+ n.value ? (i(), me(Ne, {
4751
4751
  key: 0,
4752
4752
  schema: n.value,
4753
4753
  values: s.value,
@@ -4791,14 +4791,14 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4791
4791
  }
4792
4792
  });
4793
4793
  });
4794
- He.install = function(e) {
4795
- e.component("VForm", He), Object.assign(e.config.globalProperties, {
4794
+ Ne.install = function(e) {
4795
+ e.component("VForm", Ne), Object.assign(e.config.globalProperties, {
4796
4796
  $form: $t
4797
4797
  }), e.provide("form", $t), window.v3plugin || (window.v3plugin = {});
4798
4798
  };
4799
4799
  export {
4800
4800
  Oi as ModalEdit,
4801
- He as VForm,
4801
+ Ne as VForm,
4802
4802
  pi as VsInputArray,
4803
4803
  vo as VsInputCheckbox,
4804
4804
  ri as VsInputColor,
@@ -4819,7 +4819,7 @@ export {
4819
4819
  Hr as VsInputTag,
4820
4820
  Je as VsInputText,
4821
4821
  ka as VsInputTextarea,
4822
- He as default,
4822
+ Ne as default,
4823
4823
  fi as inputs,
4824
4824
  Ls as vsInputDatatable,
4825
4825
  Ir as vsInputMap