@opengis/surveyor 0.0.0-stage → 0.0.2

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 (139) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +188 -3
  3. package/dist/chunks/AppIcon-CIR6y5uE.js +85 -0
  4. package/dist/chunks/AppealDetailField-CI-1qhs3.js +58 -0
  5. package/dist/chunks/AppealStatusBadge-CSXnfarR.js +132 -0
  6. package/dist/chunks/AppealStatusBadge-DYBe9hqP.js +171 -0
  7. package/dist/chunks/ApplicationHistorySection-C0wwhwA4.js +769 -0
  8. package/dist/chunks/BaseModal-C7PVYz0m.js +85 -0
  9. package/dist/chunks/FormFilePicker-C3XQw50i.js +76 -0
  10. package/dist/chunks/MapLayerMenu-DjYCxEc3.js +145 -0
  11. package/dist/chunks/RegistryForm-CEUqFmsF.js +99 -0
  12. package/dist/chunks/RegistryFormModal-DfY4z_7r.js +85 -0
  13. package/dist/chunks/RegistryToolbar-BV4mYVAc.js +452 -0
  14. package/dist/chunks/UserAccessBadge-D8JfgGfN.js +44 -0
  15. package/dist/chunks/UserTypeBadge-YIwwoCho.js +188 -0
  16. package/dist/chunks/VerifiedBadge-Bba8WnuB.js +34 -0
  17. package/dist/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
  18. package/dist/chunks/account-types-Br7gx_D_.js +35 -0
  19. package/dist/chunks/account_types-DLL1w122.js +25 -0
  20. package/dist/chunks/appealMapLayers-CQMK3rrz.js +115 -0
  21. package/dist/chunks/application_status-BhNGiY2I.js +45 -0
  22. package/dist/chunks/applications-BB9JRcgl.js +132 -0
  23. package/dist/chunks/buildSchema-CccjX9TJ.js +37 -0
  24. package/dist/chunks/card-B-ftozcq.js +739 -0
  25. package/dist/chunks/card-BctFHFZe.js +538 -0
  26. package/dist/chunks/card-CKD1N0QD.js +330 -0
  27. package/dist/chunks/card-CiNZxAd5.js +297 -0
  28. package/dist/chunks/card-DUtDfwMk.js +607 -0
  29. package/dist/chunks/card-fL26_Gvc.js +1189 -0
  30. package/dist/chunks/certificates-BSd1i0un.js +424 -0
  31. package/dist/chunks/create-DxMC_IL1.js +1033 -0
  32. package/dist/chunks/filterQuery-CvfZrkTC.js +99 -0
  33. package/dist/chunks/form-Bh6i5n1U.js +315 -0
  34. package/dist/chunks/form-DDjELqZ9.js +89 -0
  35. package/dist/chunks/geometry-DyhIVRcw.js +67 -0
  36. package/dist/chunks/map-Z57iMvFb.js +2763 -0
  37. package/dist/chunks/map-layers-DnmkOEld.js +400 -0
  38. package/dist/chunks/mapLayersApi-CWoQ2be-.js +251 -0
  39. package/dist/chunks/organizations-BO1_JETm.js +476 -0
  40. package/dist/chunks/organizations-BbYipLwk.js +14 -0
  41. package/dist/chunks/profile-ByahbF4B.js +164 -0
  42. package/dist/chunks/profile-Dwwn_4Pr.js +243 -0
  43. package/dist/chunks/requests-BCin936Z.js +232 -0
  44. package/dist/chunks/requests-CFv5wwAN.js +530 -0
  45. package/dist/chunks/resendSurveyorRegistration-BHTTVIw1.js +27 -0
  46. package/dist/chunks/resources-2e8RFqWR.js +129 -0
  47. package/dist/chunks/rolldown-runtime-Dy4uBu1J.js +11 -0
  48. package/dist/chunks/surveyorAccount-C7UiiIYg.js +78 -0
  49. package/dist/chunks/users-DtTYsgMb.js +291 -0
  50. package/dist/chunks/work_types-Hwme-FEX.js +34 -0
  51. package/dist/index.css +3 -0
  52. package/dist/index.js +336 -0
  53. package/migrations/20260924120000_surveyor_schema.sql +450 -0
  54. package/migrations/20261008170000_address_lookup.sql +20 -0
  55. package/migrations/20261016120000_map_layers.sql +156 -0
  56. package/migrations/20261016150000_password_reset.sql +15 -0
  57. package/migrations/20261016170000_address_lookup_format.sql +37 -0
  58. package/migrations/20261016180000_settlement_lookup.sql +16 -0
  59. package/migrations/20261019170000_actor_lookup.sql +15 -0
  60. package/package.json +86 -6
  61. package/plugin.d.ts +15 -0
  62. package/plugin.js +8 -0
  63. package/server/app.ts +51 -0
  64. package/server/dictionaries/index.ts +17 -0
  65. package/server/dictionaries/surveyor/account_types.ts +12 -0
  66. package/server/dictionaries/surveyor/application_status.ts +16 -0
  67. package/server/dictionaries/surveyor/map_layer_components.ts +11 -0
  68. package/server/dictionaries/surveyor/map_layer_groups.ts +10 -0
  69. package/server/dictionaries/surveyor/map_layer_types.ts +11 -0
  70. package/server/dictionaries/surveyor/work_types.ts +15 -0
  71. package/server/dictionaries/surveyor/yes_no.ts +11 -0
  72. package/server/fastify.d.ts +12 -0
  73. package/server/index.ts +23 -0
  74. package/server/modules/surveyor/route.ts +410 -0
  75. package/server/modules/surveyor/schema.ts +439 -0
  76. package/server/modules/surveyor/services/applicationTile.ts +53 -0
  77. package/server/modules/surveyor/services/cancelApplication.ts +74 -0
  78. package/server/modules/surveyor/services/changeSurveyorPassword.ts +52 -0
  79. package/server/modules/surveyor/services/changeSurveyorPasswordByAdmin.ts +41 -0
  80. package/server/modules/surveyor/services/completeApplication.ts +46 -0
  81. package/server/modules/surveyor/services/completeSurveyorRegistration.ts +48 -0
  82. package/server/modules/surveyor/services/createApplication.ts +169 -0
  83. package/server/modules/surveyor/services/geometryExport.ts +34 -0
  84. package/server/modules/surveyor/services/geometryImport.ts +66 -0
  85. package/server/modules/surveyor/services/getSurveyorUser.ts +56 -0
  86. package/server/modules/surveyor/services/identifyApplications.ts +82 -0
  87. package/server/modules/surveyor/services/issueSourceData.ts +55 -0
  88. package/server/modules/surveyor/services/loginSurveyor.ts +67 -0
  89. package/server/modules/surveyor/services/mapLayers.ts +61 -0
  90. package/server/modules/surveyor/services/rasterExport.ts +15 -0
  91. package/server/modules/surveyor/services/registerSurveyor.ts +161 -0
  92. package/server/modules/surveyor/services/requestPasswordReset.ts +49 -0
  93. package/server/modules/surveyor/services/resendRegistration.ts +42 -0
  94. package/server/modules/surveyor/services/resetSurveyorPassword.ts +53 -0
  95. package/server/modules/surveyor/services/searchApplications.ts +63 -0
  96. package/server/modules/surveyor/services/submitSurvey.ts +70 -0
  97. package/server/modules/surveyor/services/updateSurveyorAccountStatus.ts +52 -0
  98. package/server/modules/surveyor/services/updateSurveyorStatus.ts +53 -0
  99. package/server/modules/surveyor/services/vectorExport.ts +86 -0
  100. package/server/modules/surveyor/services/verifyApplication.ts +59 -0
  101. package/server/modules/surveyor/utils/accessibleApplication.ts +37 -0
  102. package/server/modules/surveyor/utils/application.ts +68 -0
  103. package/server/modules/surveyor/utils/export.ts +39 -0
  104. package/server/modules/surveyor/utils/firstBoundary.ts +48 -0
  105. package/server/modules/surveyor/utils/mail.ts +161 -0
  106. package/server/modules/surveyor/utils/permissions.ts +29 -0
  107. package/server/modules/surveyor/utils/registration.ts +33 -0
  108. package/server/modules/surveyor/utils/shared.ts +305 -0
  109. package/server/modules/surveyor/utils/templates/ds.surveyor_admin_password.pt.hbs +79 -0
  110. package/server/modules/surveyor/utils/templates/ds.surveyor_password_reset.pt.hbs +79 -0
  111. package/server/modules/surveyor/utils/templates/ds.surveyor_registration.pt.hbs +80 -0
  112. package/server/modules/surveyor/utils/templates/ds.surveyor_send_mail.pt.hbs +79 -0
  113. package/server/modules/surveyor/utils/vectorLayer.ts +41 -0
  114. package/server/plugins/convertVector.ts +74 -0
  115. package/server/plugins/proto/convertVector.proto +21 -0
  116. package/server/plugins/swagger.ts +54 -0
  117. package/server/plugins/vite.dev.ts +52 -0
  118. package/server/plugins/vite.prod.ts +55 -0
  119. package/server/resources/helpers/actor_lookup.ts +5 -0
  120. package/server/resources/helpers/address_lookup.ts +8 -0
  121. package/server/resources/helpers/settlement_lookup.ts +7 -0
  122. package/server/resources/helpers/user_lookup.ts +5 -0
  123. package/server/resources/index.ts +30 -0
  124. package/server/resources/surveyor-admin/application_comments.ts +24 -0
  125. package/server/resources/surveyor-admin/application_status_history.ts +46 -0
  126. package/server/resources/surveyor-admin/applications.ts +125 -0
  127. package/server/resources/surveyor-admin/certificates.ts +87 -0
  128. package/server/resources/surveyor-admin/map_layers.ts +69 -0
  129. package/server/resources/surveyor-admin/organization_surveyors.ts +32 -0
  130. package/server/resources/surveyor-admin/organizations.ts +61 -0
  131. package/server/resources/surveyor-admin/surveyors.ts +71 -0
  132. package/server/resources/surveyor-user/application_status_history.ts +52 -0
  133. package/server/resources/surveyor-user/applications.ts +131 -0
  134. package/server/resources/surveyor-user/certificates.ts +67 -0
  135. package/server/resources/surveyor-user/organizations.ts +40 -0
  136. package/server/resources/surveyor-user/surveyors.ts +69 -0
  137. package/server/suggests/index.ts +17 -0
  138. package/server/tsconfig.json +3 -0
  139. package/surveyor-types.d.ts +30 -0
@@ -0,0 +1,85 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { Teleport as t, 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";
3
+ //#region admin/src/components/ui/BaseModal.vue?vue&type=script&setup=true&lang.ts
4
+ var h = /*@__PURE__*/ c({
5
+ __name: "BaseModal",
6
+ props: {
7
+ modelValue: {
8
+ type: Boolean,
9
+ required: !0
10
+ },
11
+ title: {
12
+ type: String,
13
+ required: !0
14
+ },
15
+ width: {
16
+ type: String,
17
+ required: !1,
18
+ default: "max-w-lg"
19
+ }
20
+ },
21
+ emits: ["update:modelValue"],
22
+ setup(e, { expose: t, emit: n }) {
23
+ t();
24
+ let r = n;
25
+ function i() {
26
+ r("update:modelValue", !1);
27
+ }
28
+ let a = {
29
+ emit: r,
30
+ close: i
31
+ };
32
+ return Object.defineProperty(a, "__isScriptSetup", {
33
+ enumerable: !1,
34
+ value: !0
35
+ }), a;
36
+ }
37
+ }), g = { class: "flex items-center justify-between border-b border-slate-100 px-6 py-4" }, _ = { class: "text-lg font-semibold text-slate-900" }, v = { class: "min-h-0 flex-1 overflow-y-auto px-6 py-5" }, y = {
38
+ key: 0,
39
+ class: "shrink-0 border-t border-slate-100 px-6 py-4"
40
+ };
41
+ function b(e, c, h, b, x, S) {
42
+ return u(), r(t, { to: "body" }, [s(n, { name: "fade" }, {
43
+ default: p(() => [h.modelValue ? (u(), a("div", {
44
+ key: 0,
45
+ class: "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/40 p-4",
46
+ onClick: m(b.close, ["self"])
47
+ }, [s(n, {
48
+ name: "pop",
49
+ appear: ""
50
+ }, {
51
+ default: p(() => [h.modelValue ? (u(), a("div", {
52
+ key: 0,
53
+ class: l(["flex max-h-[90vh] w-full flex-col overflow-hidden rounded-2xl bg-white shadow-xl", h.width])
54
+ }, [
55
+ o("div", g, [o("h3", _, f(h.title), 1), o("button", {
56
+ type: "button",
57
+ class: "rounded-lg p-1.5 text-slate-400 hover:bg-slate-100 hover:text-slate-600",
58
+ "aria-label": "Закрити",
59
+ onClick: b.close
60
+ }, [...c[0] ||= [o("svg", {
61
+ class: "h-[18px] w-[18px]",
62
+ fill: "none",
63
+ viewBox: "0 0 24 24",
64
+ stroke: "currentColor",
65
+ "stroke-width": "2"
66
+ }, [o("path", {
67
+ "stroke-linecap": "round",
68
+ "stroke-linejoin": "round",
69
+ d: "M6 18L18 6M6 6l12 12"
70
+ })], -1)]])]),
71
+ o("div", v, [d(e.$slots, "default", {}, void 0, !0)]),
72
+ e.$slots.footer ? (u(), a("div", y, [d(e.$slots, "footer", {}, void 0, !0)])) : i("", !0)
73
+ ], 2)) : i("", !0)]),
74
+ _: 3
75
+ })])) : i("", !0)]),
76
+ _: 3
77
+ })]);
78
+ }
79
+ var x = /*#__PURE__*/ e(h, [
80
+ ["render", b],
81
+ ["__scopeId", "data-v-637bdb40"],
82
+ ["__file", "D:/Softpro/surveyor/admin/src/components/ui/BaseModal.vue"]
83
+ ]);
84
+ //#endregion
85
+ export { x as t };
@@ -0,0 +1,76 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { o as t } from "./profile-ByahbF4B.js";
3
+ import { createElementBlock as n, createElementVNode as r, createTextVNode as i, createVNode as a, defineComponent as o, openBlock as s, ref as c, toDisplayString as l, watch as u } from "vue";
4
+ //#region cabinet/src/components/ui/FormFilePicker.vue?vue&type=script&setup=true&lang.ts
5
+ var d = /*@__PURE__*/ o({
6
+ __name: "FormFilePicker",
7
+ props: {
8
+ fileName: {
9
+ type: String,
10
+ required: !1
11
+ },
12
+ accept: {
13
+ type: String,
14
+ required: !1
15
+ },
16
+ buttonLabel: {
17
+ type: String,
18
+ required: !1
19
+ }
20
+ },
21
+ emits: ["change"],
22
+ setup(e, { expose: n, emit: r }) {
23
+ n();
24
+ let i = e, a = r, o = c(null);
25
+ function s() {
26
+ o.value?.click();
27
+ }
28
+ function l(e) {
29
+ let t = e.target.files?.[0] ?? null;
30
+ a("change", t);
31
+ }
32
+ u(() => i.fileName, (e) => {
33
+ !e && o.value && (o.value.value = "");
34
+ });
35
+ let d = {
36
+ props: i,
37
+ emit: a,
38
+ inputRef: o,
39
+ openPicker: s,
40
+ onInputChange: l,
41
+ AppIcon: t
42
+ };
43
+ return Object.defineProperty(d, "__isScriptSetup", {
44
+ enumerable: !1,
45
+ value: !0
46
+ }), d;
47
+ }
48
+ }), f = { class: "rounded-xl border border-dashed border-gray-200 bg-gray-50/80 px-4 py-3 transition-colors hover:border-gray-300" }, p = { class: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between" }, m = { class: "flex min-w-0 flex-1 items-center gap-3" }, h = { class: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-white text-gray-400 shadow-sm ring-1 ring-gray-100" }, g = { class: "min-w-0" }, _ = {
49
+ key: 0,
50
+ class: "truncate text-sm font-medium text-gray-800"
51
+ }, v = {
52
+ key: 1,
53
+ class: "text-sm text-gray-400"
54
+ }, y = ["accept"];
55
+ function b(e, t, o, c, u, d) {
56
+ return s(), n("div", f, [r("div", p, [r("div", m, [r("span", h, [a(c.AppIcon, {
57
+ name: "file-text",
58
+ class: "h-[18px] w-[18px]"
59
+ })]), r("div", g, [o.fileName ? (s(), n("p", _, l(o.fileName), 1)) : (s(), n("p", v, "Файл не обрано"))])]), r("button", {
60
+ type: "button",
61
+ class: "inline-flex shrink-0 items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm transition-colors hover:border-[#2663EB]/40 hover:bg-[#EFF4FE] hover:text-[#2663EB]",
62
+ onClick: c.openPicker
63
+ }, [a(c.AppIcon, {
64
+ name: "upload",
65
+ class: "h-4 w-4 text-[#2663EB]"
66
+ }), i(" " + l(o.buttonLabel ?? "Обрати файл"), 1)])]), r("input", {
67
+ ref: "inputRef",
68
+ type: "file",
69
+ class: "hidden",
70
+ accept: o.accept,
71
+ onChange: c.onInputChange
72
+ }, null, 40, y)]);
73
+ }
74
+ var x = /*#__PURE__*/ e(d, [["render", b], ["__file", "D:/Softpro/surveyor/cabinet/src/components/ui/FormFilePicker.vue"]]);
75
+ //#endregion
76
+ export { x as t };
@@ -0,0 +1,145 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { d as t } from "./appealMapLayers-CQMK3rrz.js";
3
+ import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, onMounted as u, onUnmounted as d, openBlock as f, ref as p, renderList as m, toDisplayString as h } from "vue";
4
+ //#region shared/map/components/MapLayerMenu.vue?vue&type=script&setup=true&lang.ts
5
+ var g = /*@__PURE__*/ s({
6
+ __name: "MapLayerMenu",
7
+ props: {
8
+ baseId: {
9
+ type: String,
10
+ required: !0
11
+ },
12
+ activeOverlayIds: {
13
+ type: Array,
14
+ required: !0
15
+ },
16
+ baseLayers: {
17
+ type: Array,
18
+ required: !0
19
+ },
20
+ overlays: {
21
+ type: Array,
22
+ required: !0
23
+ },
24
+ placement: {
25
+ type: String,
26
+ required: !1,
27
+ default: "start"
28
+ }
29
+ },
30
+ emits: ["selectBase", "toggleOverlay"],
31
+ setup(e, { expose: n, emit: r }) {
32
+ n();
33
+ let i = r, a = p(!1), o = p(null);
34
+ function s(e) {
35
+ let t = o.value;
36
+ a.value && t && (e.target instanceof Node && t.contains(e.target) || (a.value = !1));
37
+ }
38
+ function c(e) {
39
+ e.key === "Escape" && (a.value = !1);
40
+ }
41
+ u(() => {
42
+ document.addEventListener("pointerdown", s), document.addEventListener("keydown", c);
43
+ }), d(() => {
44
+ document.removeEventListener("pointerdown", s), document.removeEventListener("keydown", c);
45
+ });
46
+ let l = {
47
+ emit: i,
48
+ open: a,
49
+ rootRef: o,
50
+ onPointerDown: s,
51
+ onKeyDown: c,
52
+ get overlayHasTiles() {
53
+ return t;
54
+ }
55
+ };
56
+ return Object.defineProperty(l, "__isScriptSetup", {
57
+ enumerable: !1,
58
+ value: !0
59
+ }), l;
60
+ }
61
+ }), _ = ["aria-expanded"], v = ["checked", "onChange"], y = [
62
+ "checked",
63
+ "disabled",
64
+ "onChange"
65
+ ], b = { class: "min-w-0" }, x = { class: "block text-xs text-slate-700" }, S = {
66
+ key: 0,
67
+ class: "block text-[10px] text-slate-400"
68
+ };
69
+ function C(e, t, s, u, d, p) {
70
+ return f(), i("div", {
71
+ ref: "rootRef",
72
+ class: c(["absolute top-3 z-20", s.placement === "end" ? "right-3" : "left-3"])
73
+ }, [a("button", {
74
+ type: "button",
75
+ class: "cursor-pointer flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs font-medium text-slate-700 shadow-card transition-colors hover:bg-slate-50",
76
+ "aria-expanded": u.open,
77
+ "aria-controls": "appeal-map-layers",
78
+ onClick: t[0] ||= (e) => u.open = !u.open
79
+ }, [...t[1] ||= [a("svg", {
80
+ class: "h-3.5 w-3.5",
81
+ fill: "none",
82
+ viewBox: "0 0 24 24",
83
+ stroke: "currentColor",
84
+ "stroke-width": "2",
85
+ "aria-hidden": "true"
86
+ }, [
87
+ a("path", {
88
+ "stroke-linecap": "round",
89
+ "stroke-linejoin": "round",
90
+ d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"
91
+ }),
92
+ a("path", {
93
+ "stroke-linecap": "round",
94
+ "stroke-linejoin": "round",
95
+ d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"
96
+ }),
97
+ a("path", {
98
+ "stroke-linecap": "round",
99
+ "stroke-linejoin": "round",
100
+ d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"
101
+ })
102
+ ], -1), o(" Шари ", -1)]], 8, _), u.open ? (f(), i("div", {
103
+ key: 0,
104
+ id: "appeal-map-layers",
105
+ class: c(["absolute top-full z-20 mt-1 max-h-[280px] min-w-[220px] overflow-y-auto rounded-xl border border-slate-200 bg-white p-3 shadow-lg", s.placement === "end" ? "right-0" : "left-0"])
106
+ }, [
107
+ t[4] ||= a("p", { class: "mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-slate-400" }, "Базові", -1),
108
+ (f(!0), i(n, null, m(s.baseLayers, (e) => (f(), i("label", {
109
+ key: e.id,
110
+ class: "flex cursor-pointer items-center gap-2 rounded-md py-1 pl-0.5 pr-1 hover:bg-slate-50"
111
+ }, [a("input", {
112
+ type: "radio",
113
+ name: "appeal-basemap",
114
+ class: "h-3.5 w-3.5 accent-brand-600",
115
+ checked: s.baseId === e.id,
116
+ onChange: (t) => u.emit("selectBase", e.id)
117
+ }, null, 40, v), a("span", { class: c(["text-xs", s.baseId === e.id ? "font-medium text-slate-800" : "text-slate-700"]) }, h(e.label), 3)]))), 128)),
118
+ s.overlays.length ? (f(), i(n, { key: 0 }, [
119
+ t[2] ||= a("div", { class: "my-2 h-px bg-slate-100" }, null, -1),
120
+ t[3] ||= a("p", { class: "mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-slate-400" }, "Додаткові", -1),
121
+ (f(!0), i(n, null, m(s.overlays, (e) => (f(), i("label", {
122
+ key: e.id,
123
+ class: c(["flex items-center gap-2 rounded-md py-1 pl-0.5 pr-1", u.overlayHasTiles(e) ? "cursor-pointer hover:bg-slate-50" : "cursor-not-allowed opacity-50"])
124
+ }, [
125
+ a("input", {
126
+ type: "checkbox",
127
+ class: "h-3.5 w-3.5 rounded accent-brand-600 disabled:cursor-not-allowed",
128
+ checked: s.activeOverlayIds.includes(e.id),
129
+ disabled: !u.overlayHasTiles(e),
130
+ onChange: (t) => u.emit("toggleOverlay", e.id)
131
+ }, null, 40, y),
132
+ e.legendColor ? (f(), i("span", {
133
+ key: 0,
134
+ class: "h-2.5 w-2.5 shrink-0 rounded-sm",
135
+ style: l({ backgroundColor: e.legendColor }),
136
+ "aria-hidden": "true"
137
+ }, null, 4)) : r("", !0),
138
+ a("span", b, [a("span", x, h(e.label), 1), u.overlayHasTiles(e) ? r("", !0) : (f(), i("span", S, " Джерело не налаштовано "))])
139
+ ], 2))), 128))
140
+ ], 64)) : r("", !0)
141
+ ], 2)) : r("", !0)], 2);
142
+ }
143
+ var w = /*#__PURE__*/ e(g, [["render", C], ["__file", "D:/Softpro/surveyor/shared/map/components/MapLayerMenu.vue"]]);
144
+ //#endregion
145
+ export { w as t };
@@ -0,0 +1,99 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { n as t } from "./buildSchema-CccjX9TJ.js";
3
+ import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, openBlock as c, ref as l, toDisplayString as u, watch as d } from "vue";
4
+ import { VForm as f } from "@opengis/form";
5
+ //#region admin/src/components/registry/RegistryForm.vue?vue&type=script&setup=true&lang.ts
6
+ var p = /*@__PURE__*/ s({
7
+ __name: "RegistryForm",
8
+ props: {
9
+ config: {
10
+ type: Object,
11
+ required: !0
12
+ },
13
+ record: {
14
+ type: [Object, null],
15
+ required: !1,
16
+ default: null
17
+ },
18
+ hideActions: {
19
+ type: Boolean,
20
+ required: !1,
21
+ default: !1
22
+ }
23
+ },
24
+ emits: ["saved", "cancel"],
25
+ setup(e, { expose: r, emit: i }) {
26
+ let a = e, o = i, s = l({}), c = l({}), u = l([]), p = l(""), m = n(() => !!a.record);
27
+ function h() {
28
+ p.value = "";
29
+ let e = a.record ? a.config.recordToValues?.(a.record) ?? { ...a.record } : a.config.emptyValues?.() ?? {}, n = a.record ? String(a.record.id ?? "") : void 0;
30
+ u.value = t(a.config, {}, e, n), c.value = e;
31
+ }
32
+ d(() => [a.record, a.config.resource], () => h(), { immediate: !0 });
33
+ async function g() {
34
+ if (await s.value?.validate?.()) return;
35
+ p.value = "";
36
+ let e = Object.fromEntries(Object.keys(a.config.fields).filter((e) => e in c.value).map((e) => [e, c.value[e]]));
37
+ try {
38
+ let t = a.config.save ? await a.config.save(a.record ? String(a.record.id ?? "") : void 0, e, a.record) : e;
39
+ o("saved", t);
40
+ } catch (e) {
41
+ p.value = e instanceof Error ? e.message : "Помилка збереження";
42
+ }
43
+ }
44
+ r({ submit: g });
45
+ let _ = {
46
+ props: a,
47
+ emit: o,
48
+ formRef: s,
49
+ formValues: c,
50
+ formSchema: u,
51
+ error: p,
52
+ isEdit: m,
53
+ init: h,
54
+ submit: g,
55
+ get VsForm() {
56
+ return f;
57
+ }
58
+ };
59
+ return Object.defineProperty(_, "__isScriptSetup", {
60
+ enumerable: !1,
61
+ value: !0
62
+ }), _;
63
+ }
64
+ }), m = { class: "registry-form space-y-4" }, h = {
65
+ key: 0,
66
+ class: "text-xs text-danger-700"
67
+ }, g = {
68
+ key: 1,
69
+ class: "flex justify-end gap-3 border-t border-slate-100 pt-3"
70
+ };
71
+ function _(e, t, n, s, l, d) {
72
+ return c(), i("div", m, [
73
+ o(s.VsForm, {
74
+ modelValue: s.formValues,
75
+ "onUpdate:modelValue": t[0] ||= (e) => s.formValues = e,
76
+ form: s.formRef,
77
+ "onUpdate:form": t[1] ||= (e) => s.formRef = e,
78
+ schema: s.formSchema,
79
+ style: { primaryColor: "blue" }
80
+ }, null, 8, [
81
+ "modelValue",
82
+ "form",
83
+ "schema"
84
+ ]),
85
+ s.error ? (c(), i("p", h, u(s.error), 1)) : r("", !0),
86
+ n.hideActions ? r("", !0) : (c(), i("div", g, [a("button", {
87
+ type: "button",
88
+ class: "rounded-lg px-4 py-2 text-sm font-medium text-slate-600 hover:bg-slate-100",
89
+ onClick: t[2] ||= (e) => s.emit("cancel")
90
+ }, " Скасувати "), a("button", {
91
+ type: "button",
92
+ class: "rounded-lg bg-brand-600 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-700",
93
+ onClick: s.submit
94
+ }, u(s.isEdit ? "Зберегти" : "Створити"), 1)]))
95
+ ]);
96
+ }
97
+ var v = /*#__PURE__*/ e(p, [["render", _], ["__file", "D:/Softpro/surveyor/admin/src/components/registry/RegistryForm.vue"]]);
98
+ //#endregion
99
+ export { v as t };
@@ -0,0 +1,85 @@
1
+ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
+ import { t } from "./BaseModal-C7PVYz0m.js";
3
+ import { t as n } from "./RegistryForm-CEUqFmsF.js";
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
+ //#region admin/src/components/registry/RegistryFormModal.vue?vue&type=script&setup=true&lang.ts
6
+ var d = /*@__PURE__*/ o({
7
+ __name: "RegistryFormModal",
8
+ props: {
9
+ modelValue: {
10
+ type: Boolean,
11
+ required: !0
12
+ },
13
+ title: {
14
+ type: String,
15
+ required: !0
16
+ },
17
+ config: {
18
+ type: Object,
19
+ required: !0
20
+ },
21
+ record: {
22
+ type: [Object, null],
23
+ required: !1,
24
+ default: null
25
+ },
26
+ width: {
27
+ type: String,
28
+ required: !1,
29
+ default: "max-w-2xl"
30
+ }
31
+ },
32
+ emits: ["update:modelValue", "saved"],
33
+ setup(e, { expose: r, emit: i }) {
34
+ r();
35
+ let a = i, o = c(null);
36
+ function s(e) {
37
+ a("saved", e), a("update:modelValue", !1);
38
+ }
39
+ let l = {
40
+ emit: a,
41
+ formRef: o,
42
+ onSaved: s,
43
+ BaseModal: t,
44
+ RegistryForm: n
45
+ };
46
+ return Object.defineProperty(l, "__isScriptSetup", {
47
+ enumerable: !1,
48
+ value: !0
49
+ }), l;
50
+ }
51
+ }), f = { class: "flex justify-end gap-3" };
52
+ function p(e, t, n, o, c, d) {
53
+ return s(), r(o.BaseModal, {
54
+ "model-value": n.modelValue,
55
+ title: n.title,
56
+ width: n.width,
57
+ "onUpdate:modelValue": t[3] ||= (e) => o.emit("update:modelValue", e)
58
+ }, {
59
+ footer: u(() => [i("div", f, [i("button", {
60
+ type: "button",
61
+ class: "rounded-lg px-4 py-2.5 text-sm font-medium text-slate-600 hover:bg-slate-100",
62
+ onClick: t[1] ||= (e) => o.emit("update:modelValue", !1)
63
+ }, " Скасувати "), i("button", {
64
+ type: "button",
65
+ class: "rounded-lg bg-brand-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-700",
66
+ onClick: t[2] ||= (e) => o.formRef?.submit()
67
+ }, l(n.record ? "Зберегти" : "Створити"), 1)])]),
68
+ default: u(() => [a(o.RegistryForm, {
69
+ ref: "formRef",
70
+ config: n.config,
71
+ record: n.record,
72
+ "hide-actions": "",
73
+ onSaved: o.onSaved,
74
+ onCancel: t[0] ||= (e) => o.emit("update:modelValue", !1)
75
+ }, null, 8, ["config", "record"])]),
76
+ _: 1
77
+ }, 8, [
78
+ "model-value",
79
+ "title",
80
+ "width"
81
+ ]);
82
+ }
83
+ var m = /*#__PURE__*/ e(d, [["render", p], ["__file", "D:/Softpro/surveyor/admin/src/components/registry/RegistryFormModal.vue"]]);
84
+ //#endregion
85
+ export { m as t };