@opengis/surveyor 0.0.14 → 0.0.16

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 (48) hide show
  1. package/dist/chunks/AppealStatusBadge-7KruOSVI.js +295 -0
  2. package/dist/chunks/ApplicationGeometryExportModal-DJbnKPm6.js +1245 -0
  3. package/dist/chunks/{BaseModal-SjP521X9.js → BaseModal-BJxKuONh.js} +1 -1
  4. package/dist/chunks/{RegistryFormModal-DhzEpxys.js → RegistryFormModal-BmBsUOF3.js} +1 -1
  5. package/dist/chunks/SurveyorTeleport-Cd6D92mo.js +30 -0
  6. package/dist/chunks/{applications-D6pHAQaK.js → applications-B6GAxopO.js} +16 -19
  7. package/dist/chunks/card-B113dNzv.js +1327 -0
  8. package/dist/chunks/card-COmcUdms.js +639 -0
  9. package/dist/chunks/{card-BBx1zR0E.js → card-Deae73xd.js} +2 -2
  10. package/dist/chunks/{certificates-DtfZTFN9.js → certificates-DHf1zGQs.js} +18 -8
  11. package/dist/chunks/{create-Cgeu7aKO.js → create-BVPqfJOb.js} +10 -10
  12. package/dist/chunks/{map-DkKsEnCM.js → map-BZi4eVl3.js} +893 -897
  13. package/dist/chunks/{map-layers-BmuIMLHa.js → map-layers-CKZK50de.js} +2 -2
  14. package/dist/chunks/{organizations-BO1dIl7v.js → organizations-DYGfYfHS.js} +2 -2
  15. package/dist/chunks/{requests-rWq8ok3C.js → requests-D1ix8U5f.js} +1 -1
  16. package/dist/chunks/requests-v1jHarHb.js +303 -0
  17. package/dist/chunks/{users-DOiQeVwn.js → users-frk3gmmd.js} +1 -1
  18. package/dist/index.css +1 -1
  19. package/dist/index.js +21 -21
  20. package/package.json +1 -1
  21. package/server/modules/surveyor/route.ts +13 -12
  22. package/server/modules/surveyor/services/applicationTile.ts +3 -3
  23. package/server/modules/surveyor/services/cancelApplication.ts +2 -1
  24. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +1 -1
  25. package/server/modules/surveyor/services/completeApplication.ts +1 -1
  26. package/server/modules/surveyor/services/identifyApplications.ts +2 -2
  27. package/server/modules/surveyor/services/issueSourceData.ts +1 -1
  28. package/server/modules/surveyor/services/registerSurveyor.ts +1 -1
  29. package/server/modules/surveyor/services/resendRegistration.ts +1 -1
  30. package/server/modules/surveyor/services/searchApplications.ts +2 -2
  31. package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +1 -1
  32. package/server/modules/surveyor/services/updateSurveyorStatus.ts +1 -1
  33. package/server/modules/surveyor/services/verifyApplication.ts +1 -1
  34. package/server/modules/surveyor/utils/shared.ts +28 -6
  35. package/server/resources/surveyor-admin/application_comments.ts +1 -1
  36. package/server/resources/surveyor-admin/application_status_history.ts +1 -1
  37. package/server/resources/surveyor-admin/applications.ts +12 -11
  38. package/server/resources/surveyor-admin/certificates.ts +26 -26
  39. package/server/resources/surveyor-admin/map_layers.ts +1 -1
  40. package/server/resources/surveyor-admin/organizations.ts +1 -1
  41. package/server/resources/surveyor-admin/surveyors.ts +1 -1
  42. package/server/suggests/index.ts +18 -1
  43. package/dist/chunks/AppealStatusBadge-Ct3EcB4_.js +0 -185
  44. package/dist/chunks/ApplicationHistorySection-D7KPV2cX.js +0 -788
  45. package/dist/chunks/SurveyorTeleport-CnSF0Ptl.js +0 -23
  46. package/dist/chunks/card-Bj4zFzbe.js +0 -1193
  47. package/dist/chunks/card-C-ohjNkC.js +0 -609
  48. package/dist/chunks/requests-BZ2jrt5J.js +0 -234
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./SurveyorTeleport-CnSF0Ptl.js";
2
+ import { t } from "./SurveyorTeleport-Cd6D92mo.js";
3
3
  import { Transition as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, withCtx as p, withModifiers as m } from "vue";
4
4
  //#region admin/src/components/ui/BaseModal.vue?vue&type=script&setup=true&lang.ts
5
5
  var h = /*@__PURE__*/ c({
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./BaseModal-SjP521X9.js";
2
+ import { t } from "./BaseModal-BJxKuONh.js";
3
3
  import { t as n } from "./RegistryForm-BlK1lExt.js";
4
4
  import { createBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, openBlock as s, ref as c, toDisplayString as l, withCtx as u } from "vue";
5
5
  //#region admin/src/components/registry/RegistryFormModal.vue?vue&type=script&setup=true&lang.ts
@@ -0,0 +1,30 @@
1
+ import { i as e } from "./dom-BSjFG3O0.js";
2
+ import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
+ import { Teleport as n, createBlock as r, defineComponent as i, onMounted as a, openBlock as o, ref as s, renderSlot as c } from "vue";
4
+ //#region shared/surveyor/SurveyorTeleport.vue?vue&type=script&setup=true&lang.ts
5
+ var l = /*@__PURE__*/ i({
6
+ __name: "SurveyorTeleport",
7
+ setup(t, { expose: n }) {
8
+ n();
9
+ let r = s(e());
10
+ a(() => {
11
+ document.getElementById("surveyor-portal") || (r.value = "body");
12
+ });
13
+ let i = { target: r };
14
+ return Object.defineProperty(i, "__isScriptSetup", {
15
+ enumerable: !1,
16
+ value: !0
17
+ }), i;
18
+ }
19
+ });
20
+ //#endregion
21
+ //#region shared/surveyor/SurveyorTeleport.vue
22
+ function u(e, t, i, a, s, l) {
23
+ return o(), r(n, {
24
+ defer: "",
25
+ to: a.target
26
+ }, [c(e.$slots, "default")], 8, ["to"]);
27
+ }
28
+ var d = /*#__PURE__*/ t(l, [["render", u], ["__file", "C:/softpro/surveyor/shared/surveyor/SurveyorTeleport.vue"]]);
29
+ //#endregion
30
+ export { d as t };
@@ -52,36 +52,33 @@ async function s(e) {
52
52
  function c(e) {
53
53
  return t(`/api/file/${encodeURIComponent(e)}?download=true`);
54
54
  }
55
- function l(e) {
56
- return t(`/api/surveyor/applications/${encodeURIComponent(e)}/export/geometry`);
57
- }
58
- function u(t, n) {
55
+ function l(t, n) {
59
56
  try {
60
57
  let e = JSON.parse(t);
61
58
  if (e.detail) return e.detail;
62
59
  } catch {}
63
60
  return e(t, n);
64
61
  }
65
- async function d(e) {
62
+ async function u(e) {
66
63
  let n = await fetch(t("/api/surveyor/applications"), {
67
64
  method: "POST",
68
65
  credentials: "include",
69
66
  headers: { "Content-Type": "application/json" },
70
67
  body: JSON.stringify(e)
71
68
  });
72
- if (!n.ok) throw Error(u(await n.text(), n.status));
69
+ if (!n.ok) throw Error(l(await n.text(), n.status));
73
70
  return n.json();
74
71
  }
75
- var f = 52428800, p = /* @__PURE__ */ new Set([
72
+ var d = 52428800, f = /* @__PURE__ */ new Set([
76
73
  "zip",
77
74
  "geojson",
78
75
  "json"
79
76
  ]);
80
- function m(e) {
77
+ function p(e) {
81
78
  let t = e.split(/[/\\]/).pop() ?? e, n = t.lastIndexOf(".");
82
79
  return n >= 0 ? t.slice(n + 1).toLowerCase() : "";
83
80
  }
84
- function h(e) {
81
+ function m(e) {
85
82
  return new Promise((t, n) => {
86
83
  let r = new FileReader();
87
84
  r.onload = () => {
@@ -94,12 +91,12 @@ function h(e) {
94
91
  }, r.onerror = () => n(/* @__PURE__ */ Error("Не вдалося прочитати файл")), r.readAsDataURL(e);
95
92
  });
96
93
  }
97
- async function g(e) {
98
- let r = m(e.name);
99
- if (!p.has(r)) throw Error("Підтримуються файли ZIP (Shapefile) та GeoJSON");
94
+ async function h(e) {
95
+ let r = p(e.name);
96
+ if (!f.has(r)) throw Error("Підтримуються файли ZIP (Shapefile) та GeoJSON");
100
97
  if (!e.size) throw Error("Файл порожній");
101
- if (e.size > f) throw Error("Файл перевищує ліміт 50 МіБ");
102
- let i = await h(e), a = await fetch(t("/api/surveyor/import/geometry"), {
98
+ if (e.size > d) throw Error("Файл перевищує ліміт 50 МіБ");
99
+ let i = await m(e), a = await fetch(t("/api/surveyor/import/geometry"), {
103
100
  method: "POST",
104
101
  credentials: "include",
105
102
  headers: { "Content-Type": "application/json" },
@@ -108,7 +105,7 @@ async function g(e) {
108
105
  filename: e.name
109
106
  })
110
107
  });
111
- if (!a.ok) throw Error(u(await a.text(), a.status));
108
+ if (!a.ok) throw Error(l(await a.text(), a.status));
112
109
  let o = n(await a.json());
113
110
  if (!o || o.type !== "Polygon") throw Error("Файл не містить полігональну геометрію");
114
111
  return {
@@ -116,17 +113,17 @@ async function g(e) {
116
113
  coordinates: o.coordinates
117
114
  };
118
115
  }
119
- function _(e) {
116
+ function g(e) {
120
117
  if (e.length < 3) return [];
121
118
  let t = e.map(([e, t]) => [e, t]), [n, r] = t[0], [i, a] = t[t.length - 1];
122
119
  return (n !== i || r !== a) && t.push([n, r]), t;
123
120
  }
124
- function v(e) {
125
- let t = _(e);
121
+ function _(e) {
122
+ let t = g(e);
126
123
  return t.length < 4 ? null : {
127
124
  type: "Polygon",
128
125
  coordinates: [t]
129
126
  };
130
127
  }
131
128
  //#endregion
132
- export { s as a, d as i, l as n, i as o, v as r, g as s, c as t };
129
+ export { i as a, s as i, _ as n, h as o, u as r, c as t };