@opengis/bi 1.0.54 → 1.1.1

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.
package/dist/style.css CHANGED
@@ -4,4 +4,4 @@
4
4
  License: ~ MIT (or more permissive) [via base16-schemes-source]
5
5
  Maintainer: @highlightjs/core-team
6
6
  Version: 2021.09.0
7
- */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#c7ccd1;background:#1c2023}.hljs ::selection,.hljs::selection{background-color:#565e65;color:#c7ccd1}.hljs-comment{color:#747c84}.hljs-tag{color:#adb3ba}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#c7ccd1}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#c7ae95}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#c7c795}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#aec795}.hljs-strong{font-weight:700;color:#aec795}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#95c7ae}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#95aec7}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#ae95c7}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#c795ae}.hljs-emphasis{color:#c795ae;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#c79595}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}.custom-scrollbar[data-v-88ce3ea2]{overflow-y:auto;overflow-x:clip}.custom-scrollbar[data-v-88ce3ea2]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-88ce3ea2]::-webkit-scrollbar-thumb{background-color:#e0e0e0;border-radius:10px}.custom-scrollbar[data-v-88ce3ea2]::-webkit-scrollbar-track{background-color:#f1f1f1}.text-widget h1{font-size:18px}.text-widget h2{font-size:14px}.map__settings{display:flex;padding:3px 1px;background:#fff;position:absolute;right:0;bottom:15px;height:30px;align-items:center;font-weight:100;text-align:center}.map__settings-item{display:flex;white-space:nowrap;padding:0 2px;font-size:10px;font-weight:400}.map__settings-attribution{padding:0}.map__settings-menu{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:15px!important;position:absolute;background-color:#fff;bottom:60px;right:90px;width:260px}.map__settings-menu-item{display:flex;align-items:center;color:#2c2c2c;margin-bottom:5px;font-size:12px;justify-content:space-between;height:28px}.map__settings-menu-item-text{height:28px;line-height:28px;background-color:#fff;background-image:none;border-radius:4px;border:1px solid #dcdfe6;-webkit-box-sizing:border-box;box-sizing:border-box;color:#606266;display:inline-block;font-size:12px;height:40px;line-height:40px;outline:0;padding:0 10px}.map__settings-menu-item--checktext{color:#000!important;font-size:12px;display:inline-block;padding-left:10px;line-height:19px;cursor:pointer}.checked{color:#409eff!important}.vs-map-slot-layers{position:absolute;display:none;bottom:10px;left:15px}.vs-map-slot-layers__layer{width:50px;height:50px;background-color:#fff;box-shadow:0 0 7px #434c5626;padding:5px;border-radius:5px;margin-top:10px;margin-right:10px;cursor:pointer;transition:all .3s}.vs-map-slot-layers__layer:hover{background-color:#eee}.vs-map-slot-layers__image{width:100%;border-radius:5px;object-fit:contain}.focused{background-color:#1989fa!important}.maplibregl-popup-content{padding:0}
7
+ */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#c7ccd1;background:#1c2023}.hljs ::selection,.hljs::selection{background-color:#565e65;color:#c7ccd1}.hljs-comment{color:#747c84}.hljs-tag{color:#adb3ba}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#c7ccd1}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#c7ae95}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#c7c795}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#aec795}.hljs-strong{font-weight:700;color:#aec795}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#95c7ae}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#95aec7}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#ae95c7}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#c795ae}.hljs-emphasis{color:#c795ae;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#c79595}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}.custom-scrollbar[data-v-89cc241e]{overflow-y:auto;overflow-x:clip}.custom-scrollbar[data-v-89cc241e]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-89cc241e]::-webkit-scrollbar-thumb{background-color:#e0e0e0;border-radius:10px}.custom-scrollbar[data-v-89cc241e]::-webkit-scrollbar-track{background-color:#f1f1f1}.text-widget h1{font-size:18px}.text-widget h2{font-size:14px}.map__settings{display:flex;padding:3px 1px;background:#fff;position:absolute;right:0;bottom:15px;height:30px;align-items:center;font-weight:100;text-align:center}.map__settings-item{display:flex;white-space:nowrap;padding:0 2px;font-size:10px;font-weight:400}.map__settings-attribution{padding:0}.map__settings-menu{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:15px!important;position:absolute;background-color:#fff;bottom:60px;right:90px;width:260px}.map__settings-menu-item{display:flex;align-items:center;color:#2c2c2c;margin-bottom:5px;font-size:12px;justify-content:space-between;height:28px}.map__settings-menu-item-text{height:28px;line-height:28px;background-color:#fff;background-image:none;border-radius:4px;border:1px solid #dcdfe6;-webkit-box-sizing:border-box;box-sizing:border-box;color:#606266;display:inline-block;font-size:12px;height:40px;line-height:40px;outline:0;padding:0 10px}.map__settings-menu-item--checktext{color:#000!important;font-size:12px;display:inline-block;padding-left:10px;line-height:19px;cursor:pointer}.checked{color:#409eff!important}.vs-map-slot-layers{position:absolute;display:none;bottom:10px;left:15px}.vs-map-slot-layers__layer{width:50px;height:50px;background-color:#fff;box-shadow:0 0 7px #434c5626;padding:5px;border-radius:5px;margin-top:10px;margin-right:10px;cursor:pointer;transition:all .3s}.vs-map-slot-layers__layer:hover{background-color:#eee}.vs-map-slot-layers__image{width:100%;border-radius:5px;object-fit:contain}.focused{background-color:#1989fa!important}.maplibregl-popup-content{padding:0}
@@ -1,4 +1,4 @@
1
- import { _ as n, c, a as h, b as l, d as o, i as d } from "./import-file-C1w6i79j.js";
1
+ import { _ as n, c, a as h, b as l, d as o, i as d } from "./import-file-ZfIxjCYO.js";
2
2
  import { openBlock as p, createElementBlock as u } from "vue";
3
3
  const m = {
4
4
  name: "VsFunnelBar",
@@ -1,4 +1,4 @@
1
- import { _ as en, h as Vp, j as Np } from "./import-file-C1w6i79j.js";
1
+ import { _ as en, h as Vp, j as Np } from "./import-file-ZfIxjCYO.js";
2
2
  import { openBlock as br, createElementBlock as wr, createElementVNode as Vt, createStaticVNode as jp, withDirectives as Up, toDisplayString as rh, vShow as $p, Fragment as Uu, renderList as $u, normalizeClass as qp, resolveComponent as Zp, createVNode as Gp } from "vue";
3
3
  const Hp = {}, Xp = {
4
4
  class: "shrink-0 size-3",
@@ -1,5 +1,5 @@
1
- import { l as L, c as $, p as T, V as B, a as H, b as O, d as F, m as S, e as N } from "./vs-list-CPymZkNl.js";
2
- import { _ as C, c as P } from "./import-file-C1w6i79j.js";
1
+ import { l as L, c as $, p as T, V as B, a as H, b as O, d as F, m as S, e as N } from "./vs-list-B2mp3dCt.js";
2
+ import { _ as C, c as P } from "./import-file-ZfIxjCYO.js";
3
3
  import { resolveComponent as u, openBlock as i, createElementBlock as c, Fragment as w, createElementVNode as l, createVNode as x, createBlock as E, Teleport as R, toDisplayString as f, createCommentVNode as m, renderList as k, normalizeStyle as I, normalizeClass as V } from "vue";
4
4
  const A = {
5
5
  components: { legendIcon: L, closeIcon: $ },
@@ -1,5 +1,5 @@
1
- import { l as G, c as A, p as R, e as P, V as Z, b as q, d as D, a as K, m as H } from "./vs-list-CPymZkNl.js";
2
- import { _ as V, c as W, V as J, I as Q, e as U, g as X } from "./import-file-C1w6i79j.js";
1
+ import { l as G, c as A, p as R, e as P, V as Z, b as q, d as D, a as K, m as H } from "./vs-list-B2mp3dCt.js";
2
+ import { _ as V, c as W, V as J, I as Q, e as U, g as X } from "./import-file-ZfIxjCYO.js";
3
3
  import { openBlock as p, createElementBlock as m, createElementVNode as n, normalizeClass as I, Fragment as N, renderList as O, toDisplayString as F, normalizeStyle as Y, createCommentVNode as S, resolveComponent as g, createBlock as z, resolveDynamicComponent as j, withDirectives as M, createVNode as w, vShow as C } from "vue";
4
4
  const $ = {
5
5
  components: { legendIcon: G, closeIcon: A },
@@ -1,4 +1,4 @@
1
- import { _ as c, c as o, f as n } from "./import-file-C1w6i79j.js";
1
+ import { _ as c, c as o, f as n } from "./import-file-ZfIxjCYO.js";
2
2
  import { openBlock as i, createElementBlock as m, toDisplayString as s } from "vue";
3
3
  const u = {
4
4
  name: "VsNumber",
@@ -1,4 +1,4 @@
1
- import { _ as m, c as f, a as _, b } from "./import-file-C1w6i79j.js";
1
+ import { _ as m, c as f, a as _, b } from "./import-file-ZfIxjCYO.js";
2
2
  import { openBlock as a, createElementBlock as r, createElementVNode as s, Fragment as n, renderList as c, toDisplayString as d } from "vue";
3
3
  const x = {
4
4
  name: "VsTable",
@@ -1,4 +1,4 @@
1
- import { _ as o, c as s, m as i } from "./import-file-C1w6i79j.js";
1
+ import { _ as o, c as s, m as i } from "./import-file-ZfIxjCYO.js";
2
2
  import { openBlock as r, createElementBlock as n, createCommentVNode as a } from "vue";
3
3
  const c = {
4
4
  name: "VsText",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/bi",
3
- "version": "1.0.54",
3
+ "version": "1.1.1",
4
4
  "description": "BI data visualization module",
5
5
  "main": "dist/bi.js",
6
6
  "browser": "dist/bi.umd.cjs",
@@ -43,17 +43,17 @@
43
43
  "@highlightjs/vue-plugin": "github:highlightjs/vue-plugin",
44
44
  "@jspreadsheet-ce/vue": "^5.0.0",
45
45
  "@mapbox/sphericalmercator": "^1.2.0",
46
- "@opengis/fastify-auth": "^1.0.76",
47
- "@opengis/fastify-file": "^1.0.46",
48
- "@opengis/fastify-table": "^1.2.84",
46
+ "@opengis/fastify-auth": "1.1.0",
47
+ "@opengis/fastify-file": "1.1.1",
48
+ "@opengis/fastify-table": "1.4.1",
49
49
  "@opengis/v3-core": "^0.3.93",
50
50
  "@opengis/v3-filter": "^0.0.71",
51
51
  "@turf/turf": "^7.1.0",
52
52
  "axios": "^1.3.1",
53
53
  "cross-env": "^7.0.3",
54
54
  "echarts": "^5.5.1",
55
- "fastify": "^4.26.1",
56
- "fastify-plugin": "^4.0.0",
55
+ "fastify": "5.3.3",
56
+ "fastify-plugin": "5.0.1",
57
57
  "highlight.js": "^11.10.0",
58
58
  "js-yaml": "^4.1.0",
59
59
  "maplibre-gl": "^4.7.1",
@@ -3,14 +3,17 @@ import dashboardList from './controllers/dashboard.list.js';
3
3
  import dashboardImport from './controllers/dashboard.import.js';
4
4
 
5
5
  const biSchema = {
6
- querystring: {
7
- widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
8
- dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
9
- list: { type: 'string', pattern: '^([\\d])$' },
10
- sql: { type: 'string', pattern: '^([\\d])$' },
11
- },
12
- params: {
13
- id: { type: 'string', pattern: '^([\\d\\w]+)$' },
6
+ type: 'object',
7
+ properties: {
8
+ querystring: {
9
+ widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
10
+ dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
11
+ list: { type: 'string', pattern: '^([\\d])$' },
12
+ sql: { type: 'string', pattern: '^([\\d])$' },
13
+ },
14
+ params: {
15
+ id: { type: 'string', pattern: '^([\\d\\w]+)$' },
16
+ },
14
17
  },
15
18
  };
16
19
 
@@ -1,20 +1,21 @@
1
- import config from '../../../config.js';
2
-
3
1
  import data from './controllers/data.js';
4
2
 
5
3
  const biSchema = {
6
- querystring: {
7
- widget: { type: 'string', pattern: '^([\\d\\w_]+)$' },
8
- dashboard: { type: 'string', pattern: '^([\\d\\w_]+)$' },
9
- sql: { type: 'string', pattern: '^([\\d])$' },
10
- // metric: { type: 'string', pattern: '^([\\d\\w_]+)$' },
11
- x: { type: 'string', pattern: '^([\\d\\w_]+)$' },
12
- granularity: { type: 'string', pattern: '^(week|month|quarter|year)$' },
13
- groupby: { type: 'string', pattern: '^([\\d\\w_]+)$' },
14
- filterCustom: { type: 'string', pattern: '^([\\d\\w_,]+)$' },
15
- },
16
- params: {
17
- id: { type: 'string', pattern: '^([\\d\\w]+)$' },
4
+ type: 'object',
5
+ properties: {
6
+ querystring: {
7
+ widget: { type: 'string', pattern: '^([\\d\\w_]+)$' },
8
+ dashboard: { type: 'string', pattern: '^([\\d\\w_]+)$' },
9
+ sql: { type: 'string', pattern: '^([\\d])$' },
10
+ // metric: { type: 'string', pattern: '^([\\d\\w_]+)$' },
11
+ x: { type: 'string', pattern: '^([\\d\\w_]+)$' },
12
+ granularity: { type: 'string', pattern: '^(week|month|quarter|year)$' },
13
+ groupby: { type: 'string', pattern: '^([\\d\\w_]+)$' },
14
+ filterCustom: { type: 'string', pattern: '^([\\d\\w_,]+)$' },
15
+ },
16
+ params: {
17
+ id: { type: 'string', pattern: '^([\\d\\w]+)$' },
18
+ },
18
19
  },
19
20
  };
20
21
 
@@ -7,15 +7,18 @@ import dashboardAdd from './controllers/dashboard.add.js';
7
7
  import dashboardDelete from './controllers/dashboard.delete.js';
8
8
 
9
9
  const biSchema = {
10
- querystring: {
11
- widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
12
- dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
13
- list: { type: 'string', pattern: '^([\\d])$' },
14
- sql: { type: 'string', pattern: '^([\\d])$' },
15
- },
16
- params: {
17
- name: { type: 'string', pattern: '^([\\d\\w]+)$' },
18
- widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
10
+ type: 'object',
11
+ properties: {
12
+ querystring: {
13
+ widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
14
+ dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
15
+ list: { type: 'string', pattern: '^([\\d])$' },
16
+ sql: { type: 'string', pattern: '^([\\d])$' },
17
+ },
18
+ params: {
19
+ name: { type: 'string', pattern: '^([\\d\\w]+)$' },
20
+ widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
21
+ },
19
22
  },
20
23
  };
21
24
 
@@ -7,13 +7,16 @@ import clusterVtile from './controllers/clusterVtile.js';
7
7
  import heatmap from './controllers/heatmap.js';
8
8
 
9
9
  const biSchema = {
10
- querystring: {
11
- widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
12
- dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
13
- sql: { type: 'string', pattern: '^([\\d])$' },
14
- },
15
- params: {
16
- id: { type: 'string', pattern: '^([\\d\\w]+)$' },
10
+ type: 'object',
11
+ properties: {
12
+ querystring: {
13
+ widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
14
+ dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
15
+ sql: { type: 'string', pattern: '^([\\d])$' },
16
+ },
17
+ params: {
18
+ id: { type: 'string', pattern: '^([\\d\\w]+)$' },
19
+ },
17
20
  },
18
21
  };
19
22
 
@@ -37,8 +37,8 @@ async function getWidget({ pg: pg1 = pgClients.client, dashboard, widget }) {
37
37
  || dashboardWidgets?.find(el => el.name === widget)
38
38
  : await getTemplate('widget', widget);
39
39
 
40
- if (typeof widgetData === 'string' || (widgetData?.type === 'text' && typeof widgetData?.data?.text === 'string')) {
41
- const html = mdToHTML(widgetData?.data?.text || widgetData);
40
+ if (typeof widgetData === 'string' || typeof widgetData?.html === 'string' || (widgetData?.type === 'text' && typeof widgetData?.data?.text === 'string')) {
41
+ const html = widgetData?.html || mdToHTML(widgetData?.data?.text || widgetData);
42
42
  return { source: html, status: 200 };
43
43
  }
44
44