@opengis/gis 0.2.32 → 0.2.34

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.
@@ -36,9 +36,9 @@
36
36
  "ua": "Назва",
37
37
  "meta": "title",
38
38
  "name": "name",
39
- "link": "/registry/{id}",
40
39
  "format": "slot",
41
- "slot": "<a :href=\"'/registry/'+data?.register_id\"><p>{{data?.name}}</p><p class='text-xs text-gray-500'>{{data?.description}}</p></a>"
40
+ "slot": "<div><p>{{data?.name}}</p><p class='text-xs text-gray-500'>{{data?.description}}</p></div>",
41
+ "width": 400
42
42
  },
43
43
  {
44
44
  "ua": "Група сервісу",
@@ -140,4 +140,4 @@
140
140
  "type": "Check"
141
141
  }
142
142
  ]
143
- }
143
+ }
@@ -33,7 +33,8 @@
33
33
  "meta": "title",
34
34
  "name": "name",
35
35
  "format": "slot",
36
- "slot": "<a :href=\"'/services/'+data?.service_id\"><p>{{data?.name}}</p></a><p class='text-xs text-gray-500'>{{data?.description}}</p>"
36
+ "slot": "<div><p>{{data?.name}}</p></div><p class='text-xs text-gray-500'>{{data?.description}}</p>",
37
+ "width": 400
37
38
  },
38
39
  {
39
40
  "ua": "Група",
@@ -50,8 +51,9 @@
50
51
  {
51
52
  "ua": "Джерело",
52
53
  "name": "source_path",
53
- "width": 350,
54
- "format": "text"
54
+ "width": 100,
55
+ "slot" : "<span class='text-ellipsis'>{{data.source_path}}</span>",
56
+ "format": "slot"
55
57
  },
56
58
  {
57
59
  "ua": "Публічний",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/gis",
3
- "version": "0.2.32",
3
+ "version": "0.2.34",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "main": "./dist/index.js",
@@ -8,7 +8,7 @@ export default async function addCartocss(req, reply) {
8
8
  if (!config && !style) return reply.status(400).send({ message: 'config, style is empty', status: 400 });
9
9
 
10
10
  const selectCartocss = `select cartocss_id from gis.cartocss where cartocss_id='${id}'`;
11
- const { cartocss } = await pg.one(selectCartocss);
11
+ const cartocss = await pg.one(selectCartocss);
12
12
  if (!cartocss) return reply.status(404).send({ message: 'cartocss not found', status: 404 });
13
13
 
14
14
  const updateCartocss = `update gis.cartocss set config='${config}', style='${style}' where cartocss_id='${id}'`;
@@ -5,7 +5,7 @@ export default async function getCartocss(req, reply) {
5
5
  if (!id) return reply.status(400).send({ message: 'id is empty', status: 400 });
6
6
 
7
7
  const selectCartocss = `select cartocss_key,name,description,config,style,group_id,is_public,enabled from gis.cartocss where cartocss_id='${id}'`;
8
- const { cartocss } = await pg.one(selectCartocss);
8
+ const cartocss = await pg.one(selectCartocss).catch(() => null);
9
9
  if (!cartocss) return reply.status(404).send({ message: 'cartocss not found', status: 404 });
10
10
 
11
11
  return reply.status(200).send({ message: cartocss, status: 200 });
@@ -21,7 +21,7 @@ export default async function getMap({ params = {}, pg = pgClients.client }, rep
21
21
  const mapList = getTemplates('map').map(el => el[0]);
22
22
 
23
23
  const rows = pg.pk?.['gis.maps'] ? await pg.query(
24
- `SELECT map_id as id, * FROM gis.maps where ${params.id ? '$1 in (map_id,map_key)' : '1=1'}`,
24
+ `SELECT map_id as id, *, config as widgets FROM gis.maps where ${params.id ? '$1 in (map_id,map_key)' : '1=1'}`,
25
25
  [params.id].filter(Boolean),
26
26
  ).then(el => el.rows || []) : [];
27
27