@nocobase/plugin-data-visualization 1.6.10 → 1.7.0-alpha.10

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.
@@ -7,4 +7,8 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
+ /**
11
+ * @deprecated
12
+ * use `chartRendererSettings` instead
13
+ */
10
14
  export declare function ChartRendererDesigner(): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '@nocobase/client';
10
+ export declare const chartBlockSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '@nocobase/client';
10
+ export declare const chartFilterBlockSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '@nocobase/client';
10
+ export declare const chartFilterItemSettings: SchemaSettings<{}>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '@nocobase/client';
10
+ export declare const chartRendererSettings: SchemaSettings<{}>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export { chartActionRefreshSettings } from './chartActionRefresh';
10
+ export { chartBlockActionRefreshSettings } from './chartBlockActionRefresh';
11
+ export { chartBlockSettings } from './chartBlock';
12
+ export { chartRendererSettings } from './chartRenderer';
13
+ export { chartFilterBlockSettings } from './chartFilterBlock';
14
+ export { chartFilterItemSettings } from './chartFilterItem';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const ChartFilterBlockToolbar: () => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const ChartFilterItemToolbar: () => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const ChartRendererToolbar: () => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './ChartRenderer';
10
+ export * from './ChartFilterBlock';
11
+ export * from './ChartFilterItem';
@@ -14,7 +14,8 @@ export declare const createRendererSchema: (decoratorProps: any, componentProps?
14
14
  'x-decorator': string;
15
15
  'x-decorator-props': any;
16
16
  'x-acl-action': string;
17
- 'x-designer': string;
17
+ 'x-toolbar': string;
18
+ 'x-settings': string;
18
19
  'x-component': string;
19
20
  'x-component-props': {
20
21
  size: string;
@@ -8,24 +8,24 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.6.10",
12
- "dayjs": "1.11.10",
11
+ "@nocobase/client": "1.7.0-alpha.10",
12
+ "dayjs": "1.11.13",
13
13
  "@formily/react": "2.3.0",
14
14
  "@formily/shared": "2.3.2",
15
15
  "lodash": "4.17.21",
16
+ "@nocobase/cache": "1.7.0-alpha.10",
17
+ "@nocobase/server": "1.7.0-alpha.10",
18
+ "@nocobase/test": "1.7.0-alpha.10",
19
+ "@nocobase/utils": "1.7.0-alpha.10",
16
20
  "react": "18.2.0",
17
- "@nocobase/cache": "1.6.10",
18
- "@nocobase/server": "1.6.10",
19
- "@nocobase/test": "1.6.10",
20
21
  "@emotion/css": "11.13.0",
21
22
  "@ant-design/icons": "5.6.1",
22
23
  "ahooks": "3.7.8",
23
- "antd": "5.12.8",
24
- "@formily/antd-v5": "1.1.9",
24
+ "antd": "5.24.2",
25
+ "@formily/antd-v5": "1.2.3",
25
26
  "@formily/core": "2.3.0",
26
- "@nocobase/utils": "1.6.10",
27
27
  "react-i18next": "11.18.6",
28
- "@nocobase/actions": "1.6.10",
29
- "@nocobase/database": "1.6.10",
28
+ "@nocobase/actions": "1.7.0-alpha.10",
29
+ "@nocobase/database": "1.7.0-alpha.10",
30
30
  "sequelize": "6.35.2"
31
31
  };
@@ -0,0 +1,101 @@
1
+ {
2
+ "Edit": "Bewerken",
3
+ "Delete": "Verwijder",
4
+ "Cancel": "Annuleren",
5
+ "Submit": "Indienen",
6
+ "Actions": "Acties",
7
+ "Title": "Titel",
8
+ "Enable": "Inschakelen",
9
+ "Chart": "Grafiek",
10
+ "ChartV2": "GrafiekV2",
11
+ "Charts": "Grafieken",
12
+ "Configure": "Configureren",
13
+ "Duplicate": "Dupliceren",
14
+ "Configure chart": "Configureer grafiek",
15
+ "Transform": "Transformeer",
16
+ "Chart type": "Grafiektype",
17
+ "JSON config": "JSON configuratie",
18
+ "Query": "Query",
19
+ "Data": "Data",
20
+ "Run query": "Query uitvoeren",
21
+ "Measures": "Afmetingen",
22
+ "Dimensions": "Dimensies",
23
+ "Filter": "Filter",
24
+ "Sort": "Sorteren",
25
+ "Limit": "Limiet",
26
+ "Offset": "Offset",
27
+ "Enable cache": "Cache inschakelen",
28
+ "TTL (second)": "TTL (seconde)",
29
+ "veld": "Veld",
30
+ "Aggregation": "Aggregatie",
31
+ "Alias": "Alias",
32
+ "Format": "Formaat",
33
+ "The first 10 records of the query result:": "De eerste 10 records van het queryresultaat:",
34
+ "Please run query to retrive data.": "Voer query uit om gegevens op te halen.",
35
+ "Type": "Type",
36
+ "Add veld": "Voeg veld toe",
37
+ "Add chart": "Voeg grafiek toe",
38
+ "xField": "X veld",
39
+ "yField": "Y veld",
40
+ "seriesField": "Serie veld",
41
+ "angleField": "Hoek veld",
42
+ "colorField": "Kleur veld",
43
+ "Line": "Lijn",
44
+ "Area": "Gebied",
45
+ "Column": "Kolom",
46
+ "Bar": "Bar",
47
+ "Pie": "Taart",
48
+ "Dual axes": "Dubbele assen",
49
+ "Scatter": "Scatter",
50
+ "Gauge": "Gauge",
51
+ "Statistic": "Statistiek",
52
+ "Currency": "Munteenheid",
53
+ "Percent": "Percentage",
54
+ "Exponential": "Exponential",
55
+ "Abbreviation": "Afkorting",
56
+ "Please configure and run query": "Configureer en voer de query uit",
57
+ "Please configure chart": "Configureer grafiek",
58
+ "Are you sure to cancel?": "Ben je zeker dat je wil annuleren?",
59
+ "You changes are not saved. If you click OK, your changes will be lost.": "Je wijzigingen worden niet opgeslagen. Als je op OK klikt, gaan je wijzigingen verloren.",
60
+ "Same properties set in the form above will be overwritten by this JSON config.": "Sommige eigenschappen die in het bovenstaande formulier zijn ingesteld, worden overschreven door deze JSON-configuratie.",
61
+ "Built-in": "Ingebouwd",
62
+ "Config reference: ": "Configuratie referentie: ",
63
+ "Table": "Tabel",
64
+ "Sum": "Som",
65
+ "Avg": "Gem",
66
+ "Count": "Aantal",
67
+ "Min": "Min",
68
+ "Max": "Max",
69
+ "Please select a chart type.": "Kies een grafiektype.",
70
+ "Collection": "Collectie",
71
+ "isStack": "isStapel",
72
+ "isPercent": "isPercentage",
73
+ "isGroup": "isGroep",
74
+ "smooth": "glad",
75
+ "Expand": "Uitbreiden",
76
+ "Current filter": "Huidige filter",
77
+ "Add custom veld": "Aangepast veld toevoegen",
78
+ "To filter with custom fields, use \"Current filter\" variables in the chart configuration.": "Als je wil filteren met aangepaste velden, gebruik je de variabelen \"Current filter\" in de grafiekconfiguratie.",
79
+ "Input": "Invoer",
80
+ "Date range": "Datumbereik",
81
+ "Time range": "Tijdsbereik",
82
+ "Edit veld properties": "Bewerk veld eigenschappen",
83
+ "Select a source veld to use metadata of the veld": "Selecteer een bronveld om metagegevens van het veld te gebruiken",
84
+ "Original veld": "Origineel veld",
85
+ "Transformation": "Transformatie",
86
+ "Add transformation": "Transformatie toevoegen",
87
+ "Container": "Container",
88
+ "Show border": "Toon rand",
89
+ "Transformation tip": "Velden staan ​​meerdere transformaties toe, die sequentieel worden toegepast. Let op wijzigingen in het gegevenstype na elke transformatie. Drag-and-drop-functionaliteit maakt aanpassing van de transformatievolgorde mogelijk.",
90
+ "Type conversion": "Type conversie",
91
+ "Transformer": "Transformeer",
92
+ "Size": "Grootte",
93
+ "Width": "Breedte",
94
+ "Height": "Hoogte",
95
+ "Aspect ratio": "Aspect ratio",
96
+ "Fixed height": "Vaste hoogte",
97
+ "Show background": "Toon achtergrond",
98
+ "Show padding": "Toon opvulling",
99
+ "Distinct": "Onderscheiden",
100
+ "Auto refresh": "Auto vernieuwing"
101
+ }
@@ -1 +1 @@
1
- {"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2025-03-25T07:04:31.177Z"}
1
+ {"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2025-03-27T04:32:23.571Z"}
@@ -1 +1 @@
1
- {"name":"moment-timezone","version":"0.5.43","description":"Parse and display moments in any timezone.","homepage":"http://momentjs.com/timezone/","author":"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","keywords":["moment","date","time","timezone","olson","iana","zone","tz"],"main":"./index.js","typings":"./index.d.ts","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment-timezone.git"},"bugs":{"url":"https://github.com/moment/moment-timezone/issues"},"license":"MIT","dependencies":{"moment":"^2.29.4"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-clean":"^2.0.1","grunt-contrib-jshint":"^3.2.0","grunt-contrib-nodeunit":"^4.0.0","grunt-contrib-uglify":"^5.2.2","grunt-exec":"^3.0.0","typescript":"^3.5.1"},"jspm":{"main":"builds/moment-timezone-with-data","shim":{"moment-timezone":{"deps":["moment"]}}},"scripts":{"test":"grunt"},"_lastModified":"2025-03-25T07:04:31.828Z"}
1
+ {"name":"moment-timezone","version":"0.5.43","description":"Parse and display moments in any timezone.","homepage":"http://momentjs.com/timezone/","author":"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","keywords":["moment","date","time","timezone","olson","iana","zone","tz"],"main":"./index.js","typings":"./index.d.ts","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment-timezone.git"},"bugs":{"url":"https://github.com/moment/moment-timezone/issues"},"license":"MIT","dependencies":{"moment":"^2.29.4"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-clean":"^2.0.1","grunt-contrib-jshint":"^3.2.0","grunt-contrib-nodeunit":"^4.0.0","grunt-contrib-uglify":"^5.2.2","grunt-exec":"^3.0.0","typescript":"^3.5.1"},"jspm":{"main":"builds/moment-timezone-with-data","shim":{"moment-timezone":{"deps":["moment"]}}},"scripts":{"test":"grunt"},"_lastModified":"2025-03-27T04:32:24.256Z"}
@@ -215,10 +215,10 @@ const cacheMiddleware = async (ctx, next) => {
215
215
  const checkPermission = (ctx, next) => {
216
216
  var _a;
217
217
  const { collection, dataSource } = ctx.action.params.values;
218
- const roleName = ctx.state.currentRole || "anonymous";
218
+ const roleNames = ctx.state.currentRoles || ["anonymous"];
219
219
  const acl = ((_a = ctx.app.dataSourceManager.get(dataSource)) == null ? void 0 : _a.acl) || ctx.app.acl;
220
- const can = acl.can({ role: roleName, resource: collection, action: "list" });
221
- if (!can && roleName !== "root") {
220
+ const can = acl.can({ roles: roleNames, resource: collection, action: "list" });
221
+ if (!can && !roleNames.includes("root")) {
222
222
  ctx.throw(403, "No permissions");
223
223
  }
224
224
  return next();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-data-visualization",
3
- "version": "1.6.10",
3
+ "version": "1.7.0-alpha.10",
4
4
  "displayName": "Data visualization",
5
5
  "displayName.zh-CN": "数据可视化",
6
6
  "description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",
@@ -34,7 +34,7 @@
34
34
  "@nocobase/test": "1.x",
35
35
  "@nocobase/utils": "1.x"
36
36
  },
37
- "gitHead": "e60f706756ba6e0d11a6b9a752c02531db8500bc",
37
+ "gitHead": "d2c8d0194316b2d1bf42af6f466cf4b29af84778",
38
38
  "keywords": [
39
39
  "Blocks"
40
40
  ]