@opengis/bi 1.0.11 → 1.0.12

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 (88) hide show
  1. package/dist/assets/charts/bar.png +0 -0
  2. package/dist/assets/charts/funnel.png +0 -0
  3. package/dist/assets/charts/no_data.jpg +0 -0
  4. package/dist/assets/charts/number.png +0 -0
  5. package/dist/assets/charts/pie.png +0 -0
  6. package/dist/assets/charts/progress.png +0 -0
  7. package/dist/assets/charts/stat.png +0 -0
  8. package/dist/assets/images/bar.png +0 -0
  9. package/dist/assets/images/funnel.png +0 -0
  10. package/dist/assets/images/no_data.jpg +0 -0
  11. package/dist/assets/images/number.png +0 -0
  12. package/dist/assets/images/pie.png +0 -0
  13. package/dist/assets/images/progress.png +0 -0
  14. package/dist/assets/images/stat.png +0 -0
  15. package/dist/bi.js +1 -1
  16. package/dist/bi.umd.cjs +723 -113
  17. package/dist/{import-file-D6RYWvi_.js → import-file-Db7C78fp.js} +43157 -43204
  18. package/dist/style.css +1 -1
  19. package/dist/vs-calendar-Ddl6WRL3.js +96 -0
  20. package/dist/vs-funnel-bar-GbisTylf.js +92 -0
  21. package/dist/vs-heatmap-CPiim0yg.js +83 -0
  22. package/dist/vs-map-DuBKvlTI.js +19422 -0
  23. package/dist/vs-number-CR1H0JTM.js +39 -0
  24. package/dist/{vs-text-UyIWGqQO.js → vs-text-C3RkizPQ.js} +60 -60
  25. package/package.json +7 -5
  26. package/server/routes/dashboard/controllers/dashboard.js +20 -1
  27. package/server/routes/data/controllers/data.js +31 -19
  28. package/server/routes/data/controllers/util/chartSQL.js +8 -7
  29. package/server/routes/data/controllers/util/normalizeData.js +10 -4
  30. package/server/routes/edit/controllers/dashboard.add.js +5 -1
  31. package/server/routes/edit/controllers/dashboard.edit.js +5 -1
  32. package/server/routes/edit/controllers/widget.add.js +23 -7
  33. package/server/routes/edit/controllers/widget.del.js +1 -1
  34. package/server/routes/edit/controllers/widget.edit.js +8 -5
  35. package/server/routes/map/controllers/cluster.js +90 -0
  36. package/server/routes/map/controllers/clusterVtile.js +144 -0
  37. package/server/routes/map/controllers/geojson.js +1 -1
  38. package/server/routes/map/controllers/map.js +63 -0
  39. package/server/routes/map/controllers/vtile.js +1 -1
  40. package/server/routes/map/index.mjs +7 -4
  41. package/server/templates/cls/demo.parcel.object_type.json +12 -0
  42. package/server/templates/dashboard/demo/funnel.yml +18 -0
  43. package/server/templates/dashboard/demo/heatmap.yml +18 -0
  44. package/server/templates/dashboard/demo/index.yml +58 -0
  45. package/server/templates/dashboard/demo/line.yml +19 -0
  46. package/server/templates/dashboard/demo/map.yml +13 -0
  47. package/server/templates/dashboard/demo/pivot.yml +18 -0
  48. package/server/templates/dashboard/demo/progress.yml +15 -0
  49. package/server/templates/dashboard/demo/quarterly_revenue.yml +17 -0
  50. package/server/templates/dashboard/demo/quarterly_revenue_by_product_line.yml +19 -0
  51. package/server/templates/dashboard/demo/stat.yml +15 -0
  52. package/server/templates/dashboard/demo/total_products_sold.yml +9 -0
  53. package/server/templates/dashboard/demo/total_products_sold_by_product_line.yml +12 -0
  54. package/server/templates/dashboard/demo/total_revenue.yml +10 -0
  55. package/server/templates/dashboard/demo/total_revenue_by_product_line.yml +20 -0
  56. package/server/templates/dashboard/demo/vehicle_sales_info.md +17 -0
  57. package/server/templates/dashboard/demo/waterfall.yml +19 -0
  58. package/server/templates/dashboard/erobota/bar_area.yml +3 -1
  59. package/server/templates/dashboard/erobota/bar_culture.yml +1 -1
  60. package/server/templates/dashboard/erobota/bar_grand.yml +3 -2
  61. package/server/templates/dashboard/erobota/count_grand.yml +1 -1
  62. package/server/templates/dashboard/erobota/index.yml +14 -12
  63. package/server/templates/dashboard/erobota/list_culture.yml +1 -1
  64. package/server/templates/dashboard/erobota/list_grant.yml +1 -1
  65. package/server/templates/dashboard/erobota/map.yml +1 -1
  66. package/server/templates/dashboard/erobota/pie_area.yml +1 -1
  67. package/server/templates/dashboard/erobota/pie_grant.yml +1 -1
  68. package/server/templates/dashboard/erobota/total_area.yml +1 -1
  69. package/server/templates/dashboard/erobota/total_grand.yml +1 -1
  70. package/server/templates/dashboard/map/index.yml +6 -0
  71. package/server/templates/dashboard/map/map.yml +13 -0
  72. package/server/templates/dashboard/map/mapCluster.yml +16 -0
  73. package/server/templates/dashboard/sales/index.yml +4 -3
  74. package/server/templates/dashboard/sales/quarterly_revenue.yml +1 -3
  75. package/server/templates/dashboard/sales/quarterly_revenue_by_product_line.yml +1 -1
  76. package/server/templates/dashboard/sales/total_products_sold.yml +1 -1
  77. package/server/templates/dashboard/sales/total_products_sold_by_product_line.yml +2 -1
  78. package/server/templates/dashboard/sales/total_revenue.yml +1 -1
  79. package/server/templates/dashboard/sales/total_revenue_by_product_line.yml +4 -1
  80. package/server/templates/dashboard/test3/quarterly_revenue.yml +1 -1
  81. package/server/templates/dashboard/test3/widget1.yml +1 -1
  82. package/server/templates/widget/calendar.yml +14 -0
  83. package/server/templates/widget/map.yml +15 -0
  84. package/server/templates/widget/mapCluster.yml +16 -0
  85. package/server/templates/widget/negative.yml +18 -0
  86. package/server/templates/widget/negative_profi_expense.yml +23 -0
  87. package/server/templates/widget/negative_type.yml +24 -0
  88. package/dist/vs-number-DKF5ptAP.js +0 -34
@@ -0,0 +1,20 @@
1
+ type: pie
2
+ title: Total Revenue (By Product Line)
3
+
4
+ data:
5
+ table: demo.cleaned_sales_data # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Групування
9
+ - name: sales
10
+ operator: sum
11
+ title: sales
12
+ x: product_line
13
+
14
+ style:
15
+ donut: true
16
+ innerRadius: 30
17
+ outerRadius: 70
18
+ show_label: true
19
+ label:
20
+ position: top
@@ -0,0 +1,17 @@
1
+ # 🚗 Vehicle Sales Dashboard 🏍
2
+
3
+ This example dashboard provides insight into the business operations of vehicle seller. The dataset powering this dashboard can be found here on Kaggle.
4
+
5
+ ## Timeline
6
+ The dataset contains data on all orders from the 2003 and 2004 fiscal years, and some orders from 2005.
7
+
8
+ ## Products Sold
9
+ This shop mainly sells the following products:
10
+
11
+ - 🚗 Classic Cars
12
+ - 🏎️ Vintage Cars
13
+ - 🏍️ Motorcycles
14
+ - 🚚 Trucks & Buses 🚌
15
+ - 🛩️ Planes
16
+ - 🚢 Ships
17
+ - 🚈 Trains
@@ -0,0 +1,19 @@
1
+ type: bar
2
+ title: Waterfall
3
+
4
+ data:
5
+ table: demo.cleaned_sales_data # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Групування
9
+ - name: sales
10
+ operator: sum
11
+ title: sales
12
+
13
+ x: order_date
14
+ granularity: quarter
15
+ orderby: year
16
+
17
+ controls:
18
+ style:
19
+ waterfall: true
@@ -1,5 +1,5 @@
1
1
  type: bar
2
- text: Quarterly Revenue (By Product Line)
2
+ title: Quarterly Revenue (By Product Line)
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -15,3 +15,5 @@ data:
15
15
  controls:
16
16
  style:
17
17
  stack: true
18
+ x_axis:
19
+ rotate: 20
@@ -1,5 +1,5 @@
1
1
  type: bar
2
- text: Розподіл культур за регіонами
2
+ title: Розподіл культур за регіонами
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object_culture # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: bar
2
- text: Сума виплачених грантів
2
+ title: Сума виплачених грантів
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -15,4 +15,5 @@ data:
15
15
 
16
16
  controls:
17
17
  style:
18
-
18
+ x_axis:
19
+ rotate: 20
@@ -1,5 +1,5 @@
1
1
  type: number
2
- text: Кількість грантів
2
+ title: Кількість грантів
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -3,24 +3,22 @@ description: Ініціатива реалізована в межах Прог
3
3
  table_name: demo.parcel
4
4
  panels:
5
5
  - type: column
6
- col: 4
6
+ col: 3
7
7
  widgets:
8
8
  - total_area
9
+ - total_grand
9
10
 
10
- - widget: total_grand
11
- col: 4
12
-
13
- - widget: count_grand
14
- col: 4
11
+ # - widget: count_grand
12
+ # col: 4
15
13
 
16
14
  - widget: pie_area
17
- col: 4
15
+ col: 3
18
16
 
19
17
  - widget: bar_area
20
- col: 8
18
+ col: 6
21
19
 
22
20
  - widget: pie_grant
23
- col: 4
21
+ col: 3
24
22
 
25
23
  - widget: bar_grand
26
24
  col: 8
@@ -34,9 +32,6 @@ panels:
34
32
  - widget: list_grant
35
33
  col: 6
36
34
 
37
-
38
-
39
-
40
35
  style:
41
36
  color:
42
37
  stack: true # only for bar
@@ -45,3 +40,10 @@ style:
45
40
  number_format: smart_date # d3 format number
46
41
  label: fff
47
42
  tooltip: 333
43
+ filters:
44
+ - { id: object_type, type: Check, title: Тип об'єкту, data: demo.parcel.object_type }
45
+ - { id: grant_sum, type: Range, title: Сума гранту }
46
+ - { id: grant_date, type: Date, title: Дата отримання гранту }
47
+ - { id: obj_area, type: Range, title: Площа під об'єкт }
48
+ - { id: all_area, type: Range, title: Площа під загальне використання }
49
+ - { id: cad_num_total, type: Range, title: Кількість земельних ділянок } # фільтри
@@ -1,5 +1,5 @@
1
1
  type: listbar
2
- text: Розподіл за культурами. га
2
+ title: Розподіл за культурами. га
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object_culture # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: listbar
2
- text: Сума виплачених грантів, тис. грн
2
+ title: Сума виплачених грантів, тис. грн
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -1,4 +1,4 @@
1
1
  type: map
2
- text: Регіональний розподіл
2
+ title: Регіональний розподіл
3
3
 
4
4
  data:
@@ -1,5 +1,5 @@
1
1
  type: pie
2
- text: Площа, га
2
+ title: Площа, га
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: pie
2
- text: Виплата грантів
2
+ title: Виплата грантів
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: number
2
- text: Площа, га
2
+ title: Площа, га
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: number
2
- text: Сума грантів, тис. грн
2
+ title: Сума грантів, тис. грн
3
3
 
4
4
  data:
5
5
  table: demo.parcel_object # Назва таблиці
@@ -0,0 +1,6 @@
1
+ title: Карти тест карт
2
+ description: тест карт
3
+ table_name: demo.parcel
4
+ panels:
5
+ - widget: map
6
+ - widget: mapCluster
@@ -0,0 +1,13 @@
1
+ type: map
2
+ text: Регіональний розподіл
3
+
4
+ data:
5
+ table: demo.parcel_object_culture # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Розмір точки
9
+ - obj_area
10
+ color: object_type # color
11
+ clusterZoom: 15
12
+ columns: # додаткові колонки
13
+ - obj_area
@@ -0,0 +1,16 @@
1
+ type: mapCluster
2
+ text: Регіональний розподіл
3
+
4
+ data:
5
+ table: demo.parcel_object # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Fill color by sum value
9
+ - obj_area
10
+ cluster: region # region, community, table
11
+ clusterTable:
12
+ name: ato_new.region
13
+ title: name_ua
14
+ clusterZoom: 15
15
+ columns: # додаткові колонки
16
+ - obj_area
@@ -23,12 +23,13 @@ panels:
23
23
  col: 3
24
24
 
25
25
  grid: # сітка якщо є
26
- - { "x": 0, "y": 0, "w": 2, "h": 2, "i": 0, widget: "quarterly_revenue" }
27
- - { "x": 1, "y": 0, "w": 2, "h": 2, "i": 0, widget: "total_revenue" }
26
+ - { 'x': 0, 'y': 0, 'w': 2, 'h': 2, 'i': 0, widget: 'quarterly_revenue' }
27
+ - { 'x': 1, 'y': 0, 'w': 2, 'h': 2, 'i': 0, widget: 'total_revenue' }
28
28
 
29
29
  widgets: null # самі віджети
30
30
 
31
- filters: null # фільтри
31
+ filters:
32
+ - { id: order_date, type: Date, title: Дата замовлення } # фільтри
32
33
 
33
34
  style:
34
35
  color:
@@ -1,5 +1,5 @@
1
1
  type: bar
2
- text: Quarterly Revenue
2
+ title: Quarterly Revenue
3
3
 
4
4
  data:
5
5
  table: demo.cleaned_sales_data # Назва таблиці
@@ -15,5 +15,3 @@ data:
15
15
  orderby: year
16
16
 
17
17
  controls:
18
- style:
19
- horizontal: false
@@ -1,5 +1,5 @@
1
1
  type: bar
2
- text: Quarterly Revenue (By Product Line)
2
+ title: Quarterly Revenue (By Product Line)
3
3
 
4
4
  data:
5
5
  table: demo.cleaned_sales_data # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: number
2
- text: Total Products Sold
2
+ title: Total Products Sold
3
3
 
4
4
  data:
5
5
  table: demo.cleaned_sales_data # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: listbar
2
- text: Total Products Sold (By Product Line)
2
+ title: Total Products Sold (By Product Line)
3
3
 
4
4
  data:
5
5
  table: demo.cleaned_sales_data # Назва таблиці
@@ -10,3 +10,4 @@ data:
10
10
  operator: sum
11
11
  title: quantity_sold
12
12
  x: product_line
13
+ order1: metric desc
@@ -1,5 +1,5 @@
1
1
  type: number
2
- text: Total Revenue
2
+ title: Total Revenue
3
3
 
4
4
  data:
5
5
  table: demo.cleaned_sales_data # Назва таблиці
@@ -1,5 +1,5 @@
1
1
  type: pie
2
- text: Total Revenue (By Product Line)
2
+ title: Total Revenue (By Product Line)
3
3
 
4
4
  data:
5
5
  table: demo.cleaned_sales_data # Назва таблиці
@@ -15,3 +15,6 @@ style:
15
15
  donut: true
16
16
  innerRadius: 30
17
17
  outerRadius: 70
18
+ show_label: true
19
+ label:
20
+ position: top
@@ -1,5 +1,5 @@
1
1
  type: bar
2
- text: Quarterly Revenue
2
+ title: Quarterly Revenue
3
3
 
4
4
  data:
5
5
  table: demo.cleaned_sales_data # Назва таблиці
@@ -1,8 +1,8 @@
1
1
  type: number
2
- text: Widget1
3
2
 
4
3
  data:
5
4
  table: demo.cleaned_sales_data # Назва таблиці
6
5
  query: 1=1 # Запит
7
6
  metrics: sales
8
7
  controls:
8
+ title: Widget1
@@ -0,0 +1,14 @@
1
+ type: calendar
2
+ text: Календар
3
+
4
+ data:
5
+ table: demo.cleaned_sales_data # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Групування
9
+ - name: sales
10
+ operator: sum
11
+ title: sales
12
+
13
+ x: order_date
14
+ granularity: day
@@ -0,0 +1,15 @@
1
+ type: map
2
+ text: Регіональний розподіл
3
+
4
+ data:
5
+ table: demo.parcel_object # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Розмір точки
9
+ - obj_area
10
+ color: object_type # color
11
+ clusterZoom: 15
12
+ columns: # додаткові колонки
13
+ - obj_area
14
+ x:
15
+ - name: obj_area
@@ -0,0 +1,16 @@
1
+ type: mapCluster
2
+ text: Регіональний розподіл
3
+
4
+ data:
5
+ table: demo.parcel_object # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Fill color by sum value
9
+ - obj_area
10
+ cluster: region # region, community, table
11
+ clusterTable:
12
+ name: ato_new.region
13
+ title: name_ua
14
+ clusterZoom: 15
15
+ columns: # додаткові колонки
16
+ - obj_area
@@ -0,0 +1,18 @@
1
+ type: bar
2
+ text: Порівняння садів і теплиць
3
+
4
+ data:
5
+ table: demo.parcel_object # Назва таблиці
6
+ query: 1=1 # Запит
7
+
8
+ metrics: # Групування
9
+ - name: grant_sum
10
+ filter: object_type = 1
11
+ title: Сади
12
+ - name: grant_sum
13
+ filter: object_type = 2
14
+ title: Теплиці
15
+ negative: true
16
+
17
+ x: order_date
18
+ granularity: year
@@ -0,0 +1,23 @@
1
+ type: bar
2
+ text: Порівняння садів і теплиць
3
+
4
+ data:
5
+ table:
6
+ - name: profit # Дохід
7
+ x: order_date
8
+ - name: expense # Розхід
9
+ x: order_date
10
+ query: 1=1 # Запит
11
+
12
+ metrics: # Групування
13
+ - name: amount
14
+ table: profit
15
+ filter: object_type = 1
16
+ title: Сади
17
+ - name: amount
18
+ table: expense
19
+ filter: object_type = 2
20
+ title: Теплиці
21
+ negative: true
22
+
23
+ granularity: year
@@ -0,0 +1,24 @@
1
+ type: bar
2
+ text: Порівняння садів і теплиць
3
+
4
+ data:
5
+ table:
6
+ - name: profit # Дохід
7
+ x: order_date
8
+ - name: expense # Розхід
9
+ x: order_date
10
+ query: 1=1 # Запит
11
+
12
+ metrics: # Групування
13
+ - name: amount
14
+ table: profit
15
+ filter: object_type = 1
16
+ title: Сади
17
+ - name: amount
18
+ table: expense
19
+ filter: object_type = 2
20
+ title: Теплиці
21
+ negative: true
22
+
23
+ x: account_id # time, sum, - account, type,
24
+ granularity: year
@@ -1,34 +0,0 @@
1
- import { _ as t, f as o } from "./import-file-D6RYWvi_.js";
2
- import { openBlock as s, createElementBlock as n, toDisplayString as m } from "vue";
3
- const c = {
4
- props: ["source", "dimensions"],
5
- data() {
6
- return {
7
- number: ""
8
- };
9
- },
10
- computed: {
11
- formattedNumber() {
12
- return o(this.number);
13
- }
14
- },
15
- mounted() {
16
- this.getNumber();
17
- },
18
- methods: {
19
- async getNumber() {
20
- try {
21
- this.number = this.source[0][this.dimensions[0]];
22
- } catch (e) {
23
- console.error(e);
24
- }
25
- }
26
- }
27
- }, a = { class: "font-[Inter,_Helvetica,_Arial] p-4 w-full text-[28px] pt-[10px] min-h-[130px] border-0" };
28
- function i(e, u, p, d, f, r) {
29
- return s(), n("div", a, " $" + m(r.formattedNumber), 1);
30
- }
31
- const b = /* @__PURE__ */ t(c, [["render", i]]);
32
- export {
33
- b as default
34
- };