@nocobase/plugin-charts 0.11.1-alpha.5 → 0.12.0-alpha.2
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/client.d.ts +2 -3
- package/client.js +1 -1
- package/{lib → dist}/client/index.d.ts +1 -0
- package/dist/client/index.js +3234 -0
- package/{lib → dist}/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/locale/en-US.js +26 -0
- package/{src/locale/es-ES.ts → dist/locale/es-ES.js} +22 -18
- package/dist/locale/fr-FR.js +5 -0
- package/dist/locale/ja-JP.js +5 -0
- package/dist/locale/pt-BR.js +26 -0
- package/dist/locale/ru-RU.js +5 -0
- package/dist/locale/tr-TR.js +5 -0
- package/dist/locale/zh-CN.js +65 -0
- package/dist/node_modules/json5/dist/index.js +1737 -0
- package/dist/node_modules/json5/dist/index.min.js +1 -0
- package/dist/node_modules/json5/lib/cli.js +152 -0
- package/dist/node_modules/json5/lib/index.d.ts +4 -0
- package/dist/node_modules/json5/lib/index.js +1 -0
- package/dist/node_modules/json5/lib/parse.d.ts +15 -0
- package/dist/node_modules/json5/lib/parse.js +1114 -0
- package/dist/node_modules/json5/lib/register.js +13 -0
- package/dist/node_modules/json5/lib/require.js +4 -0
- package/dist/node_modules/json5/lib/stringify.d.ts +89 -0
- package/dist/node_modules/json5/lib/stringify.js +261 -0
- package/dist/node_modules/json5/lib/unicode.d.ts +3 -0
- package/dist/node_modules/json5/lib/unicode.js +4 -0
- package/dist/node_modules/json5/lib/util.d.ts +5 -0
- package/dist/node_modules/json5/lib/util.js +35 -0
- package/dist/node_modules/json5/package.json +1 -0
- package/dist/server/actions/chartsQueries.js +57 -0
- package/dist/server/actions/index.js +2 -0
- package/dist/server/collections/chartsQueries.js +30 -0
- package/dist/server/index.js +11 -0
- package/dist/server/plugin.js +66 -0
- package/dist/server/query.js +39 -0
- package/dist/server/shared/index.js +5 -0
- package/package.json +17 -28
- package/server.d.ts +2 -3
- package/server.js +1 -1
- package/lib/client/ChartBlockEngine.js +0 -146
- package/lib/client/ChartBlockEngineDesigner.js +0 -293
- package/lib/client/ChartBlockInitializer.js +0 -263
- package/lib/client/ChartQueryBlockInitializer.js +0 -191
- package/lib/client/ChartQueryMetadataProvider.js +0 -91
- package/lib/client/DataSetPreviewTable.js +0 -113
- package/lib/client/Icons.js +0 -210
- package/lib/client/chartRenderComponents/index.js +0 -20
- package/lib/client/hooks/index.js +0 -38
- package/lib/client/index.js +0 -143
- package/lib/client/locale/index.js +0 -37
- package/lib/client/select/CustomSelect.js +0 -148
- package/lib/client/select/ReadPretty.js +0 -77
- package/lib/client/select/index.js +0 -27
- package/lib/client/select/shared.js +0 -66
- package/lib/client/settings/AddNewQuery.js +0 -270
- package/lib/client/settings/ConfigureFields.js +0 -39
- package/lib/client/settings/QueriesTable.js +0 -77
- package/lib/client/settings/queryTypes.js +0 -77
- package/lib/client/settings/schemas/chartsQueries.js +0 -353
- package/lib/client/templates/AreaTemplate.js +0 -81
- package/lib/client/templates/BarTemplate.js +0 -98
- package/lib/client/templates/ColumnTemplate.js +0 -98
- package/lib/client/templates/FunnelTemplate.js +0 -82
- package/lib/client/templates/LineTemplate.js +0 -89
- package/lib/client/templates/PieTemplate.js +0 -87
- package/lib/client/templates/RadarTemplate.js +0 -88
- package/lib/client/templates/ScatterTemplate.js +0 -107
- package/lib/client/templates/TableTemplate.js +0 -54
- package/lib/client/templates/index.js +0 -25
- package/lib/client/utils.js +0 -50
- package/lib/index.js +0 -13
- package/lib/locale/en-US.js +0 -29
- package/lib/locale/es-ES.js +0 -59
- package/lib/locale/fr-FR.js +0 -8
- package/lib/locale/ja-JP.js +0 -8
- package/lib/locale/pt-BR.js +0 -29
- package/lib/locale/ru-RU.js +0 -8
- package/lib/locale/tr-TR.js +0 -8
- package/lib/locale/zh-CN.js +0 -68
- package/lib/server/actions/chartsQueries.js +0 -89
- package/lib/server/actions/index.js +0 -1
- package/lib/server/collections/chartsQueries.js +0 -33
- package/lib/server/index.js +0 -13
- package/lib/server/plugin.js +0 -106
- package/lib/server/query.js +0 -71
- package/lib/server/shared/index.js +0 -8
- package/src/client/ChartBlockEngine.tsx +0 -121
- package/src/client/ChartBlockEngineDesigner.tsx +0 -248
- package/src/client/ChartBlockInitializer.tsx +0 -223
- package/src/client/ChartQueryBlockInitializer.tsx +0 -156
- package/src/client/ChartQueryMetadataProvider.tsx +0 -64
- package/src/client/DataSetPreviewTable.tsx +0 -71
- package/src/client/Icons.tsx +0 -99
- package/src/client/chartRenderComponents/index.ts +0 -7
- package/src/client/hooks/index.ts +0 -19
- package/src/client/index.tsx +0 -115
- package/src/client/locale/index.ts +0 -18
- package/src/client/select/CustomSelect.tsx +0 -126
- package/src/client/select/ReadPretty.tsx +0 -39
- package/src/client/select/index.md +0 -31
- package/src/client/select/index.ts +0 -2
- package/src/client/select/shared.ts +0 -37
- package/src/client/settings/AddNewQuery.tsx +0 -176
- package/src/client/settings/ConfigureFields.tsx +0 -18
- package/src/client/settings/QueriesTable.tsx +0 -26
- package/src/client/settings/queryTypes.ts +0 -65
- package/src/client/settings/schemas/chartsQueries.ts +0 -319
- package/src/client/templates/AreaTemplate.tsx +0 -64
- package/src/client/templates/BarTemplate.tsx +0 -80
- package/src/client/templates/ColumnTemplate.tsx +0 -81
- package/src/client/templates/FunnelTemplate.tsx +0 -65
- package/src/client/templates/LineTemplate.tsx +0 -72
- package/src/client/templates/PieTemplate.tsx +0 -68
- package/src/client/templates/RadarTemplate.tsx +0 -71
- package/src/client/templates/ScatterTemplate.tsx +0 -90
- package/src/client/templates/TableTemplate.tsx +0 -48
- package/src/client/templates/index.ts +0 -21
- package/src/client/utils.ts +0 -39
- package/src/index.ts +0 -1
- package/src/locale/en-US.ts +0 -23
- package/src/locale/fr-FR.ts +0 -1
- package/src/locale/ja-JP.ts +0 -1
- package/src/locale/pt-BR.ts +0 -23
- package/src/locale/ru-RU.ts +0 -1
- package/src/locale/tr-TR.ts +0 -1
- package/src/locale/zh-CN.ts +0 -64
- package/src/server/actions/chartsQueries.ts +0 -49
- package/src/server/actions/index.ts +0 -0
- package/src/server/collections/.gitkeep +0 -0
- package/src/server/collections/chartsQueries.ts +0 -26
- package/src/server/index.ts +0 -1
- package/src/server/plugin.ts +0 -61
- package/src/server/query.ts +0 -39
- package/src/server/shared/index.ts +0 -2
- /package/{lib → dist}/client/ChartBlockEngine.d.ts +0 -0
- /package/{lib → dist}/client/ChartBlockEngineDesigner.d.ts +0 -0
- /package/{lib → dist}/client/ChartBlockInitializer.d.ts +0 -0
- /package/{lib → dist}/client/ChartQueryBlockInitializer.d.ts +0 -0
- /package/{lib → dist}/client/ChartQueryMetadataProvider.d.ts +0 -0
- /package/{lib → dist}/client/DataSetPreviewTable.d.ts +0 -0
- /package/{lib → dist}/client/Icons.d.ts +0 -0
- /package/{lib → dist}/client/chartRenderComponents/index.d.ts +0 -0
- /package/{lib → dist}/client/hooks/index.d.ts +0 -0
- /package/{lib → dist}/client/locale/index.d.ts +0 -0
- /package/{lib → dist}/client/select/CustomSelect.d.ts +0 -0
- /package/{lib → dist}/client/select/ReadPretty.d.ts +0 -0
- /package/{lib → dist}/client/select/index.d.ts +0 -0
- /package/{lib → dist}/client/select/shared.d.ts +0 -0
- /package/{lib → dist}/client/settings/AddNewQuery.d.ts +0 -0
- /package/{lib → dist}/client/settings/ConfigureFields.d.ts +0 -0
- /package/{lib → dist}/client/settings/QueriesTable.d.ts +0 -0
- /package/{lib → dist}/client/settings/queryTypes.d.ts +0 -0
- /package/{lib → dist}/client/settings/schemas/chartsQueries.d.ts +0 -0
- /package/{lib → dist}/client/templates/AreaTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/BarTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/ColumnTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/FunnelTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/LineTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/PieTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/RadarTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/ScatterTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/TableTemplate.d.ts +0 -0
- /package/{lib → dist}/client/templates/index.d.ts +0 -0
- /package/{lib → dist}/client/utils.d.ts +0 -0
- /package/{lib → dist}/locale/en-US.d.ts +0 -0
- /package/{lib → dist}/locale/es-ES.d.ts +0 -0
- /package/{lib → dist}/locale/fr-FR.d.ts +0 -0
- /package/{lib → dist}/locale/ja-JP.d.ts +0 -0
- /package/{lib → dist}/locale/pt-BR.d.ts +0 -0
- /package/{lib → dist}/locale/ru-RU.d.ts +0 -0
- /package/{lib → dist}/locale/tr-TR.d.ts +0 -0
- /package/{lib → dist}/locale/zh-CN.d.ts +0 -0
- /package/{lib → dist}/server/actions/chartsQueries.d.ts +0 -0
- /package/{lib → dist}/server/actions/index.d.ts +0 -0
- /package/{lib → dist}/server/collections/chartsQueries.d.ts +0 -0
- /package/{lib → dist}/server/index.d.ts +0 -0
- /package/{lib → dist}/server/plugin.d.ts +0 -0
- /package/{lib → dist}/server/query.d.ts +0 -0
- /package/{lib → dist}/server/shared/index.d.ts +0 -0
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useDestroyQueryItemAction = exports.useDestroyAllSelectedQueriesAction = exports.chartsQueriesSchema = void 0;
|
|
7
|
-
function _shared() {
|
|
8
|
-
const data = require("@formily/shared");
|
|
9
|
-
_shared = function _shared() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _client() {
|
|
15
|
-
const data = require("@nocobase/client");
|
|
16
|
-
_client = function _client() {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
return data;
|
|
20
|
-
}
|
|
21
|
-
var _ChartQueryMetadataProvider = require("../../ChartQueryMetadataProvider");
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
26
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
27
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
28
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
29
|
-
const collection = {
|
|
30
|
-
name: 'chartsQueries',
|
|
31
|
-
fields: [{
|
|
32
|
-
type: 'integer',
|
|
33
|
-
name: 'title',
|
|
34
|
-
interface: 'input',
|
|
35
|
-
uiSchema: {
|
|
36
|
-
title: '{{t("Title",{ns:"charts"})}}',
|
|
37
|
-
type: 'string',
|
|
38
|
-
'x-component': 'Input',
|
|
39
|
-
required: true
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
type: 'string',
|
|
43
|
-
name: 'type',
|
|
44
|
-
interface: 'select',
|
|
45
|
-
uiSchema: {
|
|
46
|
-
title: '{{t("Type",{ns:"charts"})}}',
|
|
47
|
-
type: 'string',
|
|
48
|
-
'x-component': 'Select',
|
|
49
|
-
required: true,
|
|
50
|
-
enum: [{
|
|
51
|
-
label: '{{t("API")}}',
|
|
52
|
-
value: 'api'
|
|
53
|
-
}, {
|
|
54
|
-
label: '{{t("SQL")}}',
|
|
55
|
-
value: 'sql'
|
|
56
|
-
}, {
|
|
57
|
-
label: '{{t("JSON")}}',
|
|
58
|
-
value: 'json'
|
|
59
|
-
}]
|
|
60
|
-
}
|
|
61
|
-
}]
|
|
62
|
-
};
|
|
63
|
-
const useDestroyQueryItemAction = () => {
|
|
64
|
-
const ctx = (0, _ChartQueryMetadataProvider.useChartQueryMetadataContext)();
|
|
65
|
-
const _useResourceActionCon = (0, _client().useResourceActionContext)(),
|
|
66
|
-
refresh = _useResourceActionCon.refresh;
|
|
67
|
-
const _useResourceContext = (0, _client().useResourceContext)(),
|
|
68
|
-
resource = _useResourceContext.resource,
|
|
69
|
-
targetKey = _useResourceContext.targetKey;
|
|
70
|
-
const _useRecord = (0, _client().useRecord)(),
|
|
71
|
-
filterByTk = _useRecord[targetKey];
|
|
72
|
-
return {
|
|
73
|
-
run() {
|
|
74
|
-
return _asyncToGenerator(function* () {
|
|
75
|
-
yield resource.destroy({
|
|
76
|
-
filterByTk
|
|
77
|
-
});
|
|
78
|
-
refresh();
|
|
79
|
-
ctx.refresh();
|
|
80
|
-
})();
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
exports.useDestroyQueryItemAction = useDestroyQueryItemAction;
|
|
85
|
-
const useDestroyAllSelectedQueriesAction = () => {
|
|
86
|
-
const ctx = (0, _ChartQueryMetadataProvider.useChartQueryMetadataContext)();
|
|
87
|
-
const _useResourceActionCon2 = (0, _client().useResourceActionContext)(),
|
|
88
|
-
state = _useResourceActionCon2.state,
|
|
89
|
-
setState = _useResourceActionCon2.setState,
|
|
90
|
-
refresh = _useResourceActionCon2.refresh;
|
|
91
|
-
const _useResourceContext2 = (0, _client().useResourceContext)(),
|
|
92
|
-
resource = _useResourceContext2.resource,
|
|
93
|
-
targetKey = _useResourceContext2.targetKey;
|
|
94
|
-
return {
|
|
95
|
-
run() {
|
|
96
|
-
return _asyncToGenerator(function* () {
|
|
97
|
-
yield resource.destroy({
|
|
98
|
-
filterByTk: (state === null || state === void 0 ? void 0 : state.selectedRowKeys) || []
|
|
99
|
-
});
|
|
100
|
-
setState === null || setState === void 0 ? void 0 : setState({
|
|
101
|
-
selectedRowKeys: []
|
|
102
|
-
});
|
|
103
|
-
refresh();
|
|
104
|
-
ctx.refresh();
|
|
105
|
-
})();
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
exports.useDestroyAllSelectedQueriesAction = useDestroyAllSelectedQueriesAction;
|
|
110
|
-
const chartsQueriesSchema = {
|
|
111
|
-
type: 'object',
|
|
112
|
-
properties: {
|
|
113
|
-
[(0, _shared().uid)()]: {
|
|
114
|
-
type: 'void',
|
|
115
|
-
'x-decorator': 'ResourceActionProvider',
|
|
116
|
-
'x-decorator-props': {
|
|
117
|
-
collection,
|
|
118
|
-
resourceName: 'chartsQueries',
|
|
119
|
-
request: {
|
|
120
|
-
resource: 'chartsQueries',
|
|
121
|
-
action: 'list',
|
|
122
|
-
params: {
|
|
123
|
-
pageSize: 50,
|
|
124
|
-
sort: ['-id'],
|
|
125
|
-
appends: []
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
'x-component': 'CollectionProvider',
|
|
130
|
-
'x-component-props': {
|
|
131
|
-
collection
|
|
132
|
-
},
|
|
133
|
-
properties: {
|
|
134
|
-
actions: {
|
|
135
|
-
type: 'void',
|
|
136
|
-
'x-component': 'ActionBar',
|
|
137
|
-
'x-component-props': {
|
|
138
|
-
style: {
|
|
139
|
-
marginBottom: 16
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
properties: {
|
|
143
|
-
delete: {
|
|
144
|
-
type: 'void',
|
|
145
|
-
title: '{{ t("Delete") }}',
|
|
146
|
-
'x-component': 'Action',
|
|
147
|
-
'x-component-props': {
|
|
148
|
-
useAction: '{{ useDestroyAllSelectedQueriesAction }}',
|
|
149
|
-
confirm: {
|
|
150
|
-
title: '{{t("Delete queries",{ns:"charts"})}}',
|
|
151
|
-
content: "{{t('Are you sure you want to delete it?')}}"
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
create: {
|
|
156
|
-
type: 'void',
|
|
157
|
-
title: '{{t("Add query")}}',
|
|
158
|
-
'x-component': 'AddNewQuery',
|
|
159
|
-
'x-component-props': {
|
|
160
|
-
type: 'primary'
|
|
161
|
-
},
|
|
162
|
-
properties: {
|
|
163
|
-
drawer: {
|
|
164
|
-
type: 'void',
|
|
165
|
-
'x-component': 'Action.Drawer',
|
|
166
|
-
'x-decorator': 'Form',
|
|
167
|
-
'x-decorator-props': {
|
|
168
|
-
useValues(options) {
|
|
169
|
-
const ctx = (0, _client().useActionContext)();
|
|
170
|
-
return (0, _client().useRequest)(() => Promise.resolve({
|
|
171
|
-
data: {
|
|
172
|
-
name: `s_${(0, _shared().uid)()}`
|
|
173
|
-
}
|
|
174
|
-
}), _objectSpread(_objectSpread({}, options), {}, {
|
|
175
|
-
refreshDeps: [ctx.visible]
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
title: '{{t("Add query",{ns:"charts"})}}',
|
|
180
|
-
properties: {
|
|
181
|
-
title: {
|
|
182
|
-
'x-component': 'CollectionField',
|
|
183
|
-
'x-decorator': 'FormItem'
|
|
184
|
-
},
|
|
185
|
-
type: {
|
|
186
|
-
'x-component': 'CollectionField',
|
|
187
|
-
'x-decorator': 'FormItem'
|
|
188
|
-
},
|
|
189
|
-
footer: {
|
|
190
|
-
type: 'void',
|
|
191
|
-
'x-component': 'Action.Drawer.Footer',
|
|
192
|
-
properties: {
|
|
193
|
-
cancel: {
|
|
194
|
-
title: '{{t("Cancel",{ns:"charts"})}}',
|
|
195
|
-
'x-component': 'Action',
|
|
196
|
-
'x-component-props': {
|
|
197
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
submit: {
|
|
201
|
-
title: '{{t("Submit",{ns:"charts"})}}',
|
|
202
|
-
'x-component': 'Action',
|
|
203
|
-
'x-component-props': {
|
|
204
|
-
type: 'primary',
|
|
205
|
-
useAction: '{{ cm.useCreateAction }}'
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
table: {
|
|
217
|
-
type: 'void',
|
|
218
|
-
'x-uid': 'input',
|
|
219
|
-
'x-component': 'Table.Void',
|
|
220
|
-
'x-component-props': {
|
|
221
|
-
rowKey: 'id',
|
|
222
|
-
rowSelection: {
|
|
223
|
-
type: 'checkbox'
|
|
224
|
-
},
|
|
225
|
-
useDataSource: '{{ cm.useDataSourceFromRAC }}'
|
|
226
|
-
},
|
|
227
|
-
properties: {
|
|
228
|
-
title: {
|
|
229
|
-
type: 'void',
|
|
230
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
231
|
-
'x-component': 'Table.Column',
|
|
232
|
-
properties: {
|
|
233
|
-
title: {
|
|
234
|
-
type: 'number',
|
|
235
|
-
'x-component': 'CollectionField',
|
|
236
|
-
'x-read-pretty': true
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
type: {
|
|
241
|
-
type: 'void',
|
|
242
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
243
|
-
'x-component': 'Table.Column',
|
|
244
|
-
properties: {
|
|
245
|
-
type: {
|
|
246
|
-
type: 'string',
|
|
247
|
-
'x-component': 'CollectionField',
|
|
248
|
-
'x-read-pretty': true
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
actions: {
|
|
253
|
-
type: 'void',
|
|
254
|
-
title: '{{t("Actions")}}',
|
|
255
|
-
'x-component': 'Table.Column',
|
|
256
|
-
properties: {
|
|
257
|
-
actions: {
|
|
258
|
-
type: 'void',
|
|
259
|
-
'x-component': 'Space',
|
|
260
|
-
'x-component-props': {
|
|
261
|
-
split: '|'
|
|
262
|
-
},
|
|
263
|
-
properties: {
|
|
264
|
-
fields: {
|
|
265
|
-
type: 'void',
|
|
266
|
-
title: '{{t("Configure fields")}}',
|
|
267
|
-
'x-component': 'Action.Link',
|
|
268
|
-
'x-component-props': {
|
|
269
|
-
type: 'primary'
|
|
270
|
-
},
|
|
271
|
-
properties: {
|
|
272
|
-
drawer: {
|
|
273
|
-
type: 'void',
|
|
274
|
-
'x-component': 'Action.Drawer',
|
|
275
|
-
title: '{{t("Configure fields")}}',
|
|
276
|
-
properties: {
|
|
277
|
-
configure: {
|
|
278
|
-
type: 'void',
|
|
279
|
-
'x-component': 'ConfigureFields'
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
update: {
|
|
286
|
-
type: 'void',
|
|
287
|
-
title: '{{t("Edit")}}',
|
|
288
|
-
'x-component': 'EditQuery',
|
|
289
|
-
'x-component-props': {
|
|
290
|
-
type: 'primary'
|
|
291
|
-
},
|
|
292
|
-
properties: {
|
|
293
|
-
drawer: {
|
|
294
|
-
type: 'void',
|
|
295
|
-
'x-component': 'Action.Drawer',
|
|
296
|
-
'x-decorator': 'Form',
|
|
297
|
-
'x-decorator-props': {
|
|
298
|
-
useValues: '{{ cm.useValuesFromRecord }}'
|
|
299
|
-
},
|
|
300
|
-
title: '{{t("Edit")}}',
|
|
301
|
-
properties: {
|
|
302
|
-
title: {
|
|
303
|
-
'x-component': 'CollectionField',
|
|
304
|
-
'x-decorator': 'FormItem'
|
|
305
|
-
},
|
|
306
|
-
footer: {
|
|
307
|
-
type: 'void',
|
|
308
|
-
'x-component': 'Action.Drawer.Footer',
|
|
309
|
-
properties: {
|
|
310
|
-
cancel: {
|
|
311
|
-
title: '{{t("Cancel",{ns:"charts"})}}',
|
|
312
|
-
'x-component': 'Action',
|
|
313
|
-
'x-component-props': {
|
|
314
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
submit: {
|
|
318
|
-
title: '{{t("Submit",{ns:"charts"})}}',
|
|
319
|
-
'x-component': 'Action',
|
|
320
|
-
'x-component-props': {
|
|
321
|
-
type: 'primary',
|
|
322
|
-
useAction: '{{ cm.useUpdateAction }}'
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
delete: {
|
|
332
|
-
type: 'void',
|
|
333
|
-
title: '{{ t("Delete") }}',
|
|
334
|
-
'x-component': 'Action.Link',
|
|
335
|
-
'x-component-props': {
|
|
336
|
-
confirm: {
|
|
337
|
-
title: '{{t("Delete query",{ns:"charts"})}}',
|
|
338
|
-
content: "{{t('Are you sure you want to delete it?')}}"
|
|
339
|
-
},
|
|
340
|
-
useAction: '{{ useDestroyQueryItemAction }}'
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
|
-
exports.chartsQueriesSchema = chartsQueriesSchema;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.areaTemplate = void 0;
|
|
7
|
-
function _json() {
|
|
8
|
-
const data = _interopRequireDefault(require("json5"));
|
|
9
|
-
_json = function _json() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
const chartConfig = {
|
|
16
|
-
yField: '{{metric}}',
|
|
17
|
-
xField: '{{dimension}}',
|
|
18
|
-
seriesField: '{{category}}'
|
|
19
|
-
};
|
|
20
|
-
const areaTemplate = {
|
|
21
|
-
description: '1 「time」or 「Ordered Noun」 field,1 「Numerical」 field,1 「Unordered Noun」 field (optional)',
|
|
22
|
-
type: 'Area',
|
|
23
|
-
title: 'Area',
|
|
24
|
-
iconId: 'icon-area',
|
|
25
|
-
group: 2,
|
|
26
|
-
renderComponent: 'G2Plot',
|
|
27
|
-
defaultChartOptions: chartConfig,
|
|
28
|
-
configurableProperties: {
|
|
29
|
-
type: 'void',
|
|
30
|
-
properties: {
|
|
31
|
-
dimension: {
|
|
32
|
-
required: true,
|
|
33
|
-
type: 'string',
|
|
34
|
-
title: '{{t("Category axis / Dimension",{ns:"charts"})}}',
|
|
35
|
-
'x-decorator': 'FormItem',
|
|
36
|
-
'x-component': 'Select',
|
|
37
|
-
enum: '{{dataSource}}'
|
|
38
|
-
},
|
|
39
|
-
metric: {
|
|
40
|
-
required: true,
|
|
41
|
-
type: 'string',
|
|
42
|
-
title: '{{t("Value axis / Metrics",{ns:"charts"})}}',
|
|
43
|
-
'x-decorator': 'FormItem',
|
|
44
|
-
'x-component': 'Select',
|
|
45
|
-
enum: '{{dataSource}}'
|
|
46
|
-
},
|
|
47
|
-
category: {
|
|
48
|
-
type: 'string',
|
|
49
|
-
title: '{{t("Color legend / Dimensional",{ns:"charts"})}}',
|
|
50
|
-
'x-decorator': 'FormItem',
|
|
51
|
-
'x-component': 'Select',
|
|
52
|
-
enum: '{{dataSource}}'
|
|
53
|
-
},
|
|
54
|
-
jsonConfig: {
|
|
55
|
-
type: 'void',
|
|
56
|
-
'x-component': 'div',
|
|
57
|
-
properties: {
|
|
58
|
-
template: {
|
|
59
|
-
required: true,
|
|
60
|
-
title: '{{t("JSON config",{ns:"charts"})}}',
|
|
61
|
-
type: 'string',
|
|
62
|
-
default: _json().default.stringify(chartConfig, null, 2),
|
|
63
|
-
'x-decorator': 'FormItem',
|
|
64
|
-
'x-component': 'Input.TextArea',
|
|
65
|
-
'x-component-props': {
|
|
66
|
-
autoSize: {
|
|
67
|
-
minRows: 8,
|
|
68
|
-
maxRows: 16
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
description: '{{jsonConfigDesc("Area | G2Plot","https://g2plot.antv.antgroup.com/api/plots/area")}}',
|
|
72
|
-
'x-validator': {
|
|
73
|
-
json5: true
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
exports.areaTemplate = areaTemplate;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.barTemplate = void 0;
|
|
7
|
-
function _json() {
|
|
8
|
-
const data = _interopRequireDefault(require("json5"));
|
|
9
|
-
_json = function _json() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
const chartConfig = {
|
|
16
|
-
appendPadding: 10,
|
|
17
|
-
isGroup: true,
|
|
18
|
-
yField: '{{dimension}}',
|
|
19
|
-
xField: '{{metric}}',
|
|
20
|
-
seriesField: '{{category}}',
|
|
21
|
-
label: {
|
|
22
|
-
// 可手动配置 label 数据标签位置
|
|
23
|
-
position: 'middle',
|
|
24
|
-
// 配置样式
|
|
25
|
-
style: {
|
|
26
|
-
fill: '#FFFFFF',
|
|
27
|
-
opacity: 0.6
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
xAxis: {
|
|
31
|
-
label: {
|
|
32
|
-
autoHide: true,
|
|
33
|
-
autoRotate: false
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const barTemplate = {
|
|
38
|
-
description: '1 「time」 or 「ordered noun」 field, 1 「value」 field, 0~ 1 「unordered noun」',
|
|
39
|
-
type: 'Bar',
|
|
40
|
-
title: 'Bar',
|
|
41
|
-
iconId: 'icon-bar',
|
|
42
|
-
group: 2,
|
|
43
|
-
renderComponent: 'G2Plot',
|
|
44
|
-
defaultChartOptions: chartConfig,
|
|
45
|
-
configurableProperties: {
|
|
46
|
-
type: 'void',
|
|
47
|
-
properties: {
|
|
48
|
-
dimension: {
|
|
49
|
-
required: true,
|
|
50
|
-
type: 'string',
|
|
51
|
-
title: '{{t("Category axis / Dimension",{ns:"charts"})}}',
|
|
52
|
-
'x-decorator': 'FormItem',
|
|
53
|
-
'x-component': 'Select',
|
|
54
|
-
enum: '{{dataSource}}'
|
|
55
|
-
},
|
|
56
|
-
metric: {
|
|
57
|
-
required: true,
|
|
58
|
-
type: 'string',
|
|
59
|
-
title: '{{t("Value axis / Metrics",{ns:"charts"})}}',
|
|
60
|
-
'x-decorator': 'FormItem',
|
|
61
|
-
'x-component': 'Select',
|
|
62
|
-
enum: '{{dataSource}}'
|
|
63
|
-
},
|
|
64
|
-
category: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
title: '{{t("Color legend / Dimensional",{ns:"charts"})}}',
|
|
67
|
-
'x-decorator': 'FormItem',
|
|
68
|
-
'x-component': 'Select',
|
|
69
|
-
enum: '{{dataSource}}'
|
|
70
|
-
},
|
|
71
|
-
jsonConfig: {
|
|
72
|
-
type: 'void',
|
|
73
|
-
'x-component': 'div',
|
|
74
|
-
properties: {
|
|
75
|
-
template: {
|
|
76
|
-
required: true,
|
|
77
|
-
title: '{{t("JSON config",{ns:"charts"})}}',
|
|
78
|
-
type: 'string',
|
|
79
|
-
default: _json().default.stringify(chartConfig, null, 2),
|
|
80
|
-
'x-decorator': 'FormItem',
|
|
81
|
-
'x-component': 'Input.TextArea',
|
|
82
|
-
'x-component-props': {
|
|
83
|
-
autoSize: {
|
|
84
|
-
minRows: 8,
|
|
85
|
-
maxRows: 16
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
description: '{{jsonConfigDesc("Bar | G2Plot","https://g2plot.antv.antgroup.com/api/plots/bar")}}',
|
|
89
|
-
'x-validator': {
|
|
90
|
-
json5: true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
exports.barTemplate = barTemplate;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.columnTemplate = void 0;
|
|
7
|
-
function _json() {
|
|
8
|
-
const data = _interopRequireDefault(require("json5"));
|
|
9
|
-
_json = function _json() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
const chartConfig = {
|
|
16
|
-
appendPadding: 10,
|
|
17
|
-
isGroup: true,
|
|
18
|
-
yField: '{{metric}}',
|
|
19
|
-
xField: '{{dimension}}',
|
|
20
|
-
seriesField: '{{category}}',
|
|
21
|
-
label: {
|
|
22
|
-
// 可手动配置 label 数据标签位置
|
|
23
|
-
position: 'middle',
|
|
24
|
-
// 配置样式
|
|
25
|
-
style: {
|
|
26
|
-
fill: '#FFFFFF',
|
|
27
|
-
opacity: 0.6
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
xAxis: {
|
|
31
|
-
label: {
|
|
32
|
-
autoHide: true,
|
|
33
|
-
autoRotate: false
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const columnTemplate = {
|
|
38
|
-
description: '1 「time」 or 「ordered noun」 field, 1 「value」 field, 0 to 1 「unordered noun」',
|
|
39
|
-
type: 'Column',
|
|
40
|
-
title: 'Column',
|
|
41
|
-
iconId: 'icon-column',
|
|
42
|
-
group: 2,
|
|
43
|
-
renderComponent: 'G2Plot',
|
|
44
|
-
defaultChartOptions: chartConfig,
|
|
45
|
-
configurableProperties: {
|
|
46
|
-
type: 'void',
|
|
47
|
-
properties: {
|
|
48
|
-
dimension: {
|
|
49
|
-
required: true,
|
|
50
|
-
type: 'string',
|
|
51
|
-
title: '{{t("Category axis / Dimension",{ns:"charts"})}}',
|
|
52
|
-
'x-decorator': 'FormItem',
|
|
53
|
-
'x-component': 'Select',
|
|
54
|
-
enum: '{{dataSource}}'
|
|
55
|
-
},
|
|
56
|
-
metric: {
|
|
57
|
-
required: true,
|
|
58
|
-
type: 'string',
|
|
59
|
-
title: '{{t("Value axis / Metrics",{ns:"charts"})}}',
|
|
60
|
-
'x-decorator': 'FormItem',
|
|
61
|
-
'x-component': 'Select',
|
|
62
|
-
enum: '{{dataSource}}'
|
|
63
|
-
},
|
|
64
|
-
category: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
title: '{{t("Color legend / Dimensional",{ns:"charts"})}}',
|
|
67
|
-
'x-decorator': 'FormItem',
|
|
68
|
-
'x-component': 'Select',
|
|
69
|
-
enum: '{{dataSource}}'
|
|
70
|
-
},
|
|
71
|
-
jsonConfig: {
|
|
72
|
-
type: 'void',
|
|
73
|
-
'x-component': 'div',
|
|
74
|
-
properties: {
|
|
75
|
-
template: {
|
|
76
|
-
required: true,
|
|
77
|
-
title: '{{t("JSON config",{ns:"charts"})}}',
|
|
78
|
-
type: 'string',
|
|
79
|
-
default: _json().default.stringify(chartConfig, null, 2),
|
|
80
|
-
'x-decorator': 'FormItem',
|
|
81
|
-
'x-component': 'Input.TextArea',
|
|
82
|
-
'x-component-props': {
|
|
83
|
-
autoSize: {
|
|
84
|
-
minRows: 8,
|
|
85
|
-
maxRows: 16
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
description: '{{jsonConfigDesc("Column | G2Plot","https://g2plot.antv.antgroup.com/api/plots/column")}}',
|
|
89
|
-
'x-validator': {
|
|
90
|
-
json5: true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
exports.columnTemplate = columnTemplate;
|