@opengis/gis 0.1.18 → 0.1.20

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.
@@ -24704,11 +24704,29 @@ function xb(u) {
24704
24704
  return u.startsWith("http") ? u : `${window.location.origin}${u}`;
24705
24705
  }
24706
24706
  function bb(u) {
24707
- const { id: d, sourceLayer: y, url: x, bounds: A, title: P, style: v, service: s, service_type: z, source_type: R, data: I } = u, O = xb(x), M = z || s || R || "vector";
24707
+ const {
24708
+ id: d,
24709
+ sourceLayer: y,
24710
+ url: x,
24711
+ bounds: A,
24712
+ title: P,
24713
+ style: v,
24714
+ service: s,
24715
+ service_type: z,
24716
+ source_type: R,
24717
+ data: I
24718
+ } = u, O = xb(x), M = z || s || R || "vector";
24708
24719
  switch (M) {
24709
24720
  case "vtile":
24710
24721
  case "vector":
24711
- return wb(d, y, O, A, P, v);
24722
+ return wb(
24723
+ d,
24724
+ y,
24725
+ O,
24726
+ A,
24727
+ P,
24728
+ v
24729
+ );
24712
24730
  case "raster":
24713
24731
  return Sb(d, O, A, P, v);
24714
24732
  case "geojson":
@@ -24729,14 +24747,14 @@ function zy(u) {
24729
24747
  }
24730
24748
  }
24731
24749
  function wb(u, d, y, x, A, P) {
24732
- const v = d || (y.match(/\/vtile\/([^/]+)/) || [])[1], s = {
24750
+ const v = d || (y.match(/\/vtile\/([^/]+)/) || [])[1] || u, s = {
24733
24751
  type: "vector",
24734
24752
  tiles: [y],
24735
24753
  ...x && { bounds: x }
24736
24754
  }, z = P || zy("polygon"), I = Dy(z).map((O, M) => ({
24737
24755
  ...O,
24738
24756
  id: `${u}-${M}`,
24739
- "source-layer": v || u,
24757
+ "source-layer": v,
24740
24758
  source: u
24741
24759
  }));
24742
24760
  return {
@@ -24830,13 +24848,19 @@ function Cb(u, d, y = "/icons/") {
24830
24848
  return By(u, A);
24831
24849
  }
24832
24850
  async function oa(u, d) {
24833
- const y = bb(d), x = kb(d.style);
24851
+ const y = bb(d);
24852
+ console.log("layer", y);
24853
+ const x = kb(d.style);
24834
24854
  x.length > 0 && await By(u, x), d.layout && d.layout["icon-image"] && await Cb(u, d.layout), u.getSource(y.id) || u.addSource(y.id, y.source);
24835
24855
  for (const A of y.layers)
24836
24856
  d.visible !== void 0 && (A.layout = {
24837
24857
  ...A.layout,
24838
24858
  visibility: d.visible ? "visible" : "none"
24839
- }), u.getLayer(A.id) ? u.setLayoutProperty(A.id, "visibility", d.visible ? "visible" : "none") : await u.addLayer(A);
24859
+ }), u.getLayer(A.id) ? u.setLayoutProperty(
24860
+ A.id,
24861
+ "visibility",
24862
+ d.visible ? "visible" : "none"
24863
+ ) : await u.addLayer(A);
24840
24864
  return y;
24841
24865
  }
24842
24866
  function gl(u, d) {
@@ -25083,7 +25107,8 @@ const Pb = { class: "w-full flex flex-col bg-white border border-stone-200 shado
25083
25107
  default: yr(() => [
25084
25108
  v[1] || (v[1] = ei(" Перейти на карту "))
25085
25109
  ]),
25086
- _: 1
25110
+ _: 1,
25111
+ __: [1]
25087
25112
  })
25088
25113
  ]),
25089
25114
  default: yr(() => [
@@ -25286,7 +25311,12 @@ const Pb = { class: "w-full flex flex-col bg-white border border-stone-200 shado
25286
25311
  const d = u, y = Ar(() => {
25287
25312
  var z;
25288
25313
  return ((z = d.config) == null ? void 0 : z.title) || "";
25289
- }), x = dr([]), A = Ar(() => d.config.layer.style.rules.some((z) => z.count !== void 0)), P = Ar(() => d.config.layer.style.rules.reduce((z, R) => z + (R.count || 0), 0)), v = (z) => !z || P.value === 0 ? 0 : Math.round(z / P.value * 100), s = () => {
25314
+ }), x = dr([]), A = Ar(() => d.config.layer.style.rules.some(
25315
+ (z) => z.count !== void 0
25316
+ )), P = Ar(() => d.config.layer.style.rules.reduce(
25317
+ (z, R) => z + (R.count || 0),
25318
+ 0
25319
+ )), v = (z) => !z || P.value === 0 ? 0 : Math.round(z / P.value * 100), s = () => {
25290
25320
  const R = d.config.layer.style.rules.filter(
25291
25321
  (I, O) => x.value[O]
25292
25322
  ).map((I) => I.id || I.value).join(",");
@@ -25300,7 +25330,9 @@ const Pb = { class: "w-full flex flex-col bg-white border border-stone-200 shado
25300
25330
  };
25301
25331
  return _l(() => {
25302
25332
  var z;
25303
- (z = d.config) != null && z.layer && (oa(d.map, d.config.layer), x.value = new Array(d.config.layer.style.rules.length).fill(!1));
25333
+ (z = d.config) != null && z.layer && (oa(d.map, d.config.layer), x.value = new Array(d.config.layer.style.rules.length).fill(
25334
+ !1
25335
+ ));
25304
25336
  }), (z, R) => (ze(), Ke("div", f1, [
25305
25337
  y.value ? (ze(), Ke("div", m1, [
25306
25338
  re("div", null, [
@@ -25314,7 +25346,10 @@ const Pb = { class: "w-full flex flex-col bg-white border border-stone-200 shado
25314
25346
  (ze(!0), Ke(lr, null, Qr(u.config.layer.style.rules, (I, O) => (ze(), Ke("div", {
25315
25347
  key: O,
25316
25348
  class: "flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",
25317
- style: aa({ width: `${v(I.count)}%`, backgroundColor: I.color }),
25349
+ style: aa({
25350
+ width: `${v(I.count)}%`,
25351
+ backgroundColor: I.color
25352
+ }),
25318
25353
  role: "progressbar",
25319
25354
  "aria-valuenow": v(I.count),
25320
25355
  "aria-valuemin": "0",
@@ -26934,7 +26969,7 @@ function Yw(u, d, y, x, A, P) {
26934
26969
  "aria-label": "Reset layers",
26935
26970
  onClick: d[0] || (d[0] = (...U) => P.clearSelectedLayers && P.clearSelectedLayers(...U))
26936
26971
  }, d[7] || (d[7] = [
26937
- ia('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-5b1a9326><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-5b1a9326></path><path d="M21 3v5h-5" data-v-5b1a9326></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-5b1a9326></path><path d="M8 16H3v5" data-v-5b1a9326></path></svg>', 1)
26972
+ ia('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-939430ce><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-939430ce></path><path d="M21 3v5h-5" data-v-939430ce></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-939430ce></path><path d="M8 16H3v5" data-v-939430ce></path></svg>', 1)
26938
26973
  ]))
26939
26974
  ]),
26940
26975
  re("div", Sw, [
@@ -27212,7 +27247,7 @@ function Yw(u, d, y, x, A, P) {
27212
27247
  ], 64))
27213
27248
  ]);
27214
27249
  }
27215
- const $w = /* @__PURE__ */ br(gw, [["render", Yw], ["__scopeId", "data-v-5b1a9326"]]);
27250
+ const $w = /* @__PURE__ */ br(gw, [["render", Yw], ["__scopeId", "data-v-939430ce"]]);
27216
27251
  var Zu = { exports: {} }, Ku = { exports: {} }, ns = {}, mn = {}, Xm;
27217
27252
  function _n() {
27218
27253
  if (Xm) return mn;
@@ -30854,7 +30889,8 @@ const B2 = { class: "w-full flex flex-col bg-white border border-stone-200 shado
30854
30889
  default: yr(() => [
30855
30890
  I[1] || (I[1] = ei(" Відкрити бокову панель "))
30856
30891
  ]),
30857
- _: 1
30892
+ _: 1,
30893
+ __: [1]
30858
30894
  })
30859
30895
  ]),
30860
30896
  _: 1
@@ -31046,7 +31082,8 @@ function dS(u, d, y, x, A, P) {
31046
31082
  default: yr(() => [
31047
31083
  d[0] || (d[0] = re("div", null, "Повернутися до початкових налаштувань", -1))
31048
31084
  ]),
31049
- _: 1
31085
+ _: 1,
31086
+ __: [0]
31050
31087
  })
31051
31088
  ]);
31052
31089
  }
@@ -31218,7 +31255,8 @@ function xS(u, d, y, x, A, P) {
31218
31255
  default: yr(() => [
31219
31256
  d[0] || (d[0] = re("div", null, "Надрукувати", -1))
31220
31257
  ]),
31221
- _: 1
31258
+ _: 1,
31259
+ __: [0]
31222
31260
  });
31223
31261
  }
31224
31262
  const bS = /* @__PURE__ */ br(vS, [["render", xS]]), wS = {
@@ -31273,7 +31311,8 @@ function SS(u, d, y, x, A, P) {
31273
31311
  default: yr(() => [
31274
31312
  d[1] || (d[1] = re("div", null, "Перемикач виду", -1))
31275
31313
  ]),
31276
- _: 1
31314
+ _: 1,
31315
+ __: [1]
31277
31316
  });
31278
31317
  }
31279
31318
  const AS = /* @__PURE__ */ br(wS, [["render", SS]]), kS = {}, TS = {
@@ -31493,7 +31532,8 @@ function HS(u, d, y, x, A, P) {
31493
31532
  default: yr(() => [
31494
31533
  d[7] || (d[7] = re("div", null, "Дізнатися геолокацію", -1))
31495
31534
  ]),
31496
- _: 1
31535
+ _: 1,
31536
+ __: [7]
31497
31537
  })
31498
31538
  ]);
31499
31539
  }
@@ -32253,7 +32293,8 @@ function xA(u, d, y, x, A, P) {
32253
32293
  default: yr(() => [
32254
32294
  d[2] || (d[2] = ei(" Приховати панель "))
32255
32295
  ]),
32256
- _: 1
32296
+ _: 1,
32297
+ __: [2]
32257
32298
  })
32258
32299
  ]),
32259
32300
  re("div", gA, [
@@ -32298,7 +32339,8 @@ function xA(u, d, y, x, A, P) {
32298
32339
  default: yr(() => [
32299
32340
  d[6] || (d[6] = re("div", null, "Виміряти довжину", -1))
32300
32341
  ]),
32301
- _: 1
32342
+ _: 1,
32343
+ __: [6]
32302
32344
  })
32303
32345
  ]);
32304
32346
  }
@@ -32599,7 +32641,8 @@ function zA(u, d, y, x, A, P) {
32599
32641
  default: yr(() => [
32600
32642
  d[1] || (d[1] = ei(" Приховати панель "))
32601
32643
  ]),
32602
- _: 1
32644
+ _: 1,
32645
+ __: [1]
32603
32646
  })
32604
32647
  ]),
32605
32648
  re("div", LA, [
@@ -32636,7 +32679,8 @@ function zA(u, d, y, x, A, P) {
32636
32679
  default: yr(() => [
32637
32680
  d[4] || (d[4] = re("div", null, "Виміряти площу", -1))
32638
32681
  ]),
32639
- _: 1
32682
+ _: 1,
32683
+ __: [4]
32640
32684
  })
32641
32685
  ]);
32642
32686
  }
@@ -33373,9 +33417,8 @@ const BA = /* @__PURE__ */ br(EA, [["render", zA], ["__scopeId", "data-v-024154e
33373
33417
  key: 0,
33374
33418
  map: y.value,
33375
33419
  activeTool: I.value,
33376
- setActiveTool: Un,
33377
- ref_for: !0
33378
- }, Ft === "home" ? { initialView: cn.value } : {}, { onCardValuesId: ai }), null, 16, ["map", "activeTool"])) : Yt("", !0)
33420
+ setActiveTool: Un
33421
+ }, { ref_for: !0 }, Ft === "home" ? { initialView: cn.value } : {}, { onCardValuesId: ai }), null, 16, ["map", "activeTool"])) : Yt("", !0)
33379
33422
  ], 64))), 128))
33380
33423
  ])) : Yt("", !0)
33381
33424
  ], 512), [
@@ -33522,7 +33565,7 @@ const Qy = /* @__PURE__ */ br(jA, [["render", KA]]), GA = {
33522
33565
  }, $A = ["href"], ek = {
33523
33566
  key: 1,
33524
33567
  class: "text-foreground font-medium truncate"
33525
- }, tk = { class: "flex flex-col md:flex-row gap-4 justify-end" }, rk = { class: "container" }, ik = {
33568
+ }, tk = { class: "flex flex-col md:flex-row gap-4 justify-start" }, rk = { class: "container" }, ik = {
33526
33569
  key: 0,
33527
33570
  class: "space-y-4"
33528
33571
  }, nk = { class: "my-5 pr-2" }, sk = { class: "paginationWrapper relative flex justify-center" }, ok = {
@@ -34053,7 +34096,7 @@ const _T = /* @__PURE__ */ br(nT, [["render", yT]]), vT = {
34053
34096
  }, kT = ["href"], TT = {
34054
34097
  key: 1,
34055
34098
  class: "text-foreground font-medium truncate"
34056
- }, CT = { class: "flex flex-col md:flex-row gap-4 justify-end" }, PT = { class: "container" }, ET = {
34099
+ }, CT = { class: "flex flex-col md:flex-row gap-4 justify-start" }, PT = { class: "container" }, ET = {
34057
34100
  key: 0,
34058
34101
  class: "space-y-4"
34059
34102
  }, IT = { class: "my-5 pr-2" }, MT = { class: "paginationWrapper relative flex justify-center" }, LT = {
@@ -34201,7 +34244,5 @@ const VT = /* @__PURE__ */ br(OT, [["render", FT]]), oC = {
34201
34244
  }
34202
34245
  };
34203
34246
  export {
34204
- lk as RegistryList,
34205
- DT as RegistryListCustom,
34206
34247
  oC as default
34207
34248
  };
@@ -47,6 +47,9 @@
47
47
  <th class="py-2 last:min-w-[60px] last:max-w-[60px] last:bg-white last:sticky last:right-0">
48
48
  Приховати поле в карточці
49
49
  </th>
50
+ <th class="py-2 last:min-w-[60px] last:max-w-[60px] last:bg-white last:sticky last:right-0">
51
+ Експорт даних колонки
52
+ </th>
50
53
  </tr>
51
54
  </thead>
52
55
  <tbody class="divide-y divide-gray-200">
@@ -70,6 +73,9 @@
70
73
  <td class="py-2 pr-5 last:sticky last:right-0 ">
71
74
  {{{badge hidden_card data='yes_no'}}}
72
75
  </td>
76
+ <td class="py-2 pr-5 last:sticky last:right-0 ">
77
+ {{{badge is_export data='yes_no'}}}
78
+ </td>
73
79
  </tr>
74
80
  {{/each}}
75
81
  </tbody>
@@ -49,6 +49,9 @@
49
49
  <th class="py-2 last:min-w-[60px] last:max-w-[60px] last:bg-white last:sticky last:right-0">
50
50
  Приховати поле в карточці
51
51
  </th>
52
+ <th class="py-2 last:min-w-[60px] last:max-w-[60px] last:bg-white last:sticky last:right-0">
53
+ Експорт даних колонки
54
+ </th>
52
55
  </tr>
53
56
  </thead>
54
57
  <tbody class="divide-y divide-gray-200">
@@ -72,6 +75,9 @@
72
75
  <td class="py-2 pr-5 last:sticky last:right-0 ">
73
76
  {{{badge hidden_card data='yes_no'}}}
74
77
  </td>
78
+ <td class="py-2 pr-5 last:sticky last:right-0 ">
79
+ {{{badge is_export data='yes_no'}}}
80
+ </td>
75
81
  </tr>
76
82
  {{/each}}
77
83
  </tbody>
@@ -58,10 +58,7 @@
58
58
  "image": {
59
59
  "ua": "Фото",
60
60
  "col": 12,
61
- "type": "Dropzone",
62
- "validators": [
63
- "required"
64
- ]
61
+ "type": "Dropzone"
65
62
  }
66
63
  }
67
64
  }
@@ -200,6 +200,13 @@
200
200
  "ua": "Приховати поле в карточці об'єкта",
201
201
  "i": "Чи приховати поле при перегляді карточки об'єктів",
202
202
  "col": 6
203
+ },
204
+ {
205
+ "key": "is_export",
206
+ "type": "Switcher",
207
+ "ua": "Експорт даних колонки",
208
+ "i": "Чи експортувати колонку при експорті?",
209
+ "col": 6
203
210
  }
204
211
  ]
205
212
  },
@@ -66,6 +66,13 @@
66
66
  "ua": "Приховати поле в карточці об'єкта",
67
67
  "i": "Чи приховати поле при перегляді карточки об'єктів",
68
68
  "col": 6
69
+ },
70
+ {
71
+ "key": "is_export",
72
+ "type": "Switcher",
73
+ "ua": "Експорт даних колонки",
74
+ "i": "Чи експортувати колонку при експорті?",
75
+ "col": 6
69
76
  }
70
77
  ],
71
78
  "validators": [
@@ -218,6 +218,13 @@
218
218
  "ua": "Приховати поле в карточці об'єкта",
219
219
  "i": "Чи приховати поле при перегляді карточки об'єктів",
220
220
  "col": 6
221
+ },
222
+ {
223
+ "key": "is_export",
224
+ "type": "Switcher",
225
+ "ua": "Експорт даних колонки",
226
+ "i": "Чи експортувати колонку при експорті?",
227
+ "col": 6
221
228
  }
222
229
  ]
223
230
  },
@@ -294,6 +301,10 @@
294
301
  "ua": "Стилізація у форматі yml",
295
302
  "type": "Ace",
296
303
  "syntax": "yml"
304
+ },
305
+ "card": {
306
+ "ua": "Шаблон картки",
307
+ "type": "Text"
297
308
  }
298
309
  }
299
310
  }
@@ -57,6 +57,13 @@
57
57
  "ua": "Приховати поле в карточці об'єкта",
58
58
  "i": "Чи приховати поле при перегляді карточки об'єктів",
59
59
  "col": 6
60
+ },
61
+ {
62
+ "key": "is_export",
63
+ "type": "Switcher",
64
+ "ua": "Експорт даних колонки",
65
+ "i": "Чи експортувати колонку при експорті?",
66
+ "col": 6
60
67
  }
61
68
  ],
62
69
  "validators": [
@@ -18,7 +18,7 @@
18
18
  "title": "name",
19
19
  "search": "name,description"
20
20
  },
21
- "title":"Реєстри",
21
+ "title": "Реєстри",
22
22
  "form": "gis.registers.form",
23
23
  "columns": [
24
24
  {
@@ -63,13 +63,9 @@
63
63
  "filterList": [
64
64
  {
65
65
  "label": "Назва",
66
- "id": "name",
67
- "type": "Text"
68
- },
69
- {
70
- "label": "Держатель",
71
- "id": "holder",
72
- "type": "Text"
66
+ "id": "search",
67
+ "type": "Text",
68
+ "columns": "name,holder"
73
69
  }
74
70
  ]
75
- }
71
+ }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@opengis/gis",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
- "main": "import-file.js",
6
+ "main": "dist/import-file.js",
7
7
  "files": [
8
8
  "dist/*",
9
9
  "module/*",
@@ -16,9 +16,11 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "dev": "node server",
19
+ "build-lib": "vite build ",
19
20
  "build": "vite build && vite build admin",
20
21
  "preview": "vite preview",
21
- "prod": "set NODE_ENV=production&& node server",
22
+ "prod": "export NODE_ENV=production&& node server",
23
+ "prodw": "set NODE_ENV=production&& node server",
22
24
  "docs:install": "npm install --prefix ./docs",
23
25
  "docs:dev": "npm run --prefix ./docs docs:dev",
24
26
  "docs:build": "npm run --prefix ./docs docs:build",
@@ -42,10 +44,12 @@
42
44
  "monaco-editor": "^0.52.2",
43
45
  "vue": "^3.5.13",
44
46
  "vue-router": "4.5.1",
45
- "vue3-smooth-dnd": "0.0.6"
47
+ "vue3-smooth-dnd": "0.0.6",
48
+ "yaml": "^2.8.0"
46
49
  },
47
50
  "devDependencies": {
48
51
  "@vitejs/plugin-vue": "^5.2.3",
52
+ "dotenv": "^16.5.0",
49
53
  "eslint": "8.49.0",
50
54
  "eslint-config-airbnb": "19.0.4",
51
55
  "sass-embedded": "1.86.3",
@@ -39,8 +39,6 @@ export async function handleRegistryRequest({ settings, query, object_id, offset
39
39
 
40
40
  await attachClassifiers(row, classifiers);
41
41
 
42
- return row;
43
-
44
42
  return {
45
43
  row,
46
44
  columns: columnsInfo,
@@ -18,13 +18,17 @@ export default async function mapCatalog({ pg = pgClients.client }, reply) {
18
18
  const { rows: services = [] } = pg.pk?.['gis.services']
19
19
  ? await pg.query(`select
20
20
  service_id as id, name, service_type, service_url as url,
21
- source_type, source_path, style, layers,
21
+ source_type, source_path, geometry_column, style, layers,
22
22
  st_asgeojson(bbox)::json->'coordinates' as bbox,
23
- st_asgeojson(center)::json->'coordinates' as center
23
+ st_asgeojson(center)::json->'coordinates' as center,
24
+ popup, card, filters
24
25
  from gis.services where is_active and is_public`
25
26
  )
26
27
  : {};
27
28
 
29
+ const bboxq = services.filter(el => el.source_path && pg?.pk?.[el.source_path] && !el.bbox).map(el => `update gis.services set bbox = (select st_extent(${el.geometry_column || 'geom'})::geometry from ${el.source_path}) where service_id='${el.id}'`).join(';');
30
+ await pg.query(bboxq).catch(err => console.error(err.toString()));
31
+
28
32
  services.filter(row => row.style).map(row => {
29
33
  row.style = yml2json(row.style);
30
34
  });