@gingkoo/pandora-metabase 1.0.81 → 1.0.83
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/lib/cjs/components/dialog/formula-list/index.js +139 -74
- package/lib/cjs/components/dialog/formula-list/index.less +13 -0
- package/lib/cjs/components/metabase/index.js +26 -4
- package/lib/cjs/components/metabase/index.less +32 -1
- package/lib/cjs/components/modules/components/header.d.ts +2 -0
- package/lib/cjs/components/modules/components/header.js +11 -6
- package/lib/cjs/components/modules/components/item-wrapper.d.ts +9 -0
- package/lib/cjs/components/modules/components/item-wrapper.js +45 -0
- package/lib/cjs/components/modules/components/meta-icon.d.ts +11 -0
- package/lib/cjs/components/modules/components/meta-icon.js +60 -12
- package/lib/cjs/components/modules/custom-column.js +34 -28
- package/lib/cjs/components/modules/filter.js +18 -12
- package/lib/cjs/components/modules/join-data.js +417 -411
- package/lib/cjs/components/modules/permission-table.js +17 -11
- package/lib/cjs/components/modules/row-limit.js +18 -12
- package/lib/cjs/components/modules/sort.js +33 -27
- package/lib/cjs/components/modules/summarize/index.js +26 -20
- package/lib/cjs/components/modules/table-data.js +137 -131
- package/lib/cjs/components/modules/union.js +14 -8
- package/lib/cjs/hooks/use-state.js +84 -31
- package/lib/cjs/index.js +9 -3
- package/lib/cjs/locale/en.js +5 -3
- package/lib/cjs/locale/zh.js +5 -3
- package/lib/cjs/types.d.ts +2 -0
- package/lib/cjs/utils/storage.d.ts +1 -0
- package/lib/cjs/utils/storage.js +2 -1
- package/lib/cjs/utils.d.ts +6 -0
- package/lib/cjs/utils.js +23 -3
- package/lib/es/components/dialog/formula-list/index.js +139 -76
- package/lib/es/components/dialog/formula-list/index.less +13 -0
- package/lib/es/components/metabase/index.js +26 -4
- package/lib/es/components/metabase/index.less +32 -1
- package/lib/es/components/modules/components/header.d.ts +2 -0
- package/lib/es/components/modules/components/header.js +12 -7
- package/lib/es/components/modules/components/item-wrapper.d.ts +9 -0
- package/lib/es/components/modules/components/item-wrapper.js +38 -0
- package/lib/es/components/modules/components/meta-icon.d.ts +11 -0
- package/lib/es/components/modules/components/meta-icon.js +60 -14
- package/lib/es/components/modules/custom-column.js +34 -28
- package/lib/es/components/modules/filter.js +18 -12
- package/lib/es/components/modules/join-data.js +417 -411
- package/lib/es/components/modules/permission-table.js +17 -11
- package/lib/es/components/modules/row-limit.js +18 -12
- package/lib/es/components/modules/sort.js +33 -27
- package/lib/es/components/modules/summarize/index.js +26 -20
- package/lib/es/components/modules/table-data.js +137 -131
- package/lib/es/components/modules/union.js +14 -8
- package/lib/es/hooks/use-state.js +84 -31
- package/lib/es/index.js +9 -3
- package/lib/es/locale/en.js +5 -3
- package/lib/es/locale/zh.js +5 -3
- package/lib/es/types.d.ts +2 -0
- package/lib/es/utils/storage.d.ts +1 -0
- package/lib/es/utils/storage.js +2 -1
- package/lib/es/utils.d.ts +6 -0
- package/lib/es/utils.js +21 -1
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ import { CustomColumnPopup } from '../dialog';
|
|
|
19
19
|
import Wrapper from './components/Wrapper';
|
|
20
20
|
import NextDom from './components/meta-icon';
|
|
21
21
|
import Header from './components/header';
|
|
22
|
+
import ItemWrapper from './components/item-wrapper';
|
|
22
23
|
import ItemName from './components/item-name';
|
|
23
24
|
import { useStore } from '../../hooks/use-provider';
|
|
24
25
|
var CustomColumn = function CustomColumn(props) {
|
|
@@ -312,42 +313,47 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
312
313
|
className: "Sqb-hover-parent",
|
|
313
314
|
children: [_jsx(Header, {
|
|
314
315
|
meta: meta,
|
|
316
|
+
groupIndex: groupIndex,
|
|
315
317
|
className: 'gray-text',
|
|
316
318
|
title: __('SqlQueryBuilder.customColumn'),
|
|
317
319
|
onClose: function onClose() {
|
|
318
320
|
closePopup();
|
|
319
321
|
store.delMeta(meta, groupIndex);
|
|
320
322
|
}
|
|
321
|
-
}), _jsx(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
children: [v.name, _jsx("span", {
|
|
334
|
-
style: {
|
|
335
|
-
fontSize: 0
|
|
336
|
-
},
|
|
323
|
+
}), _jsx(ItemWrapper, {
|
|
324
|
+
meta: meta,
|
|
325
|
+
groupIndex: groupIndex,
|
|
326
|
+
children: _jsx("div", {
|
|
327
|
+
className: "Sqb-item--content",
|
|
328
|
+
children: _jsxs("div", {
|
|
329
|
+
className: "Sqb-NotebookCell gray-bg",
|
|
330
|
+
children: [meta.customColumn.map(function (v, i) {
|
|
331
|
+
return _jsx(ItemName, {
|
|
332
|
+
isError: isError(v.formulaList, getColumns()),
|
|
333
|
+
children: _jsxs("div", {
|
|
334
|
+
className: cx("Sqb-TableName gray-name"),
|
|
337
335
|
onClick: function onClick(e) {
|
|
338
|
-
return
|
|
336
|
+
return showSubQuery(e, i);
|
|
339
337
|
},
|
|
340
|
-
children: _jsx(
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
338
|
+
children: [v.name, _jsx("span", {
|
|
339
|
+
style: {
|
|
340
|
+
fontSize: 0
|
|
341
|
+
},
|
|
342
|
+
onClick: function onClick(e) {
|
|
343
|
+
return handleDel(e, i);
|
|
344
|
+
},
|
|
345
|
+
children: _jsx(CloseIcon, {})
|
|
346
|
+
})]
|
|
347
|
+
})
|
|
348
|
+
}, i);
|
|
349
|
+
}), _jsx("div", {
|
|
350
|
+
className: "Sqb-TableName gray-name",
|
|
351
|
+
onClick: function onClick(e) {
|
|
352
|
+
showSubQuery(e, -1);
|
|
353
|
+
},
|
|
354
|
+
children: _jsx(AddIcon, {})
|
|
355
|
+
})]
|
|
356
|
+
})
|
|
351
357
|
})
|
|
352
358
|
}), _jsx(NextDom, {
|
|
353
359
|
meta: meta,
|
|
@@ -11,6 +11,7 @@ import { ChangeType } from '../../store/types';
|
|
|
11
11
|
import Wrapper from './components/Wrapper';
|
|
12
12
|
import NextDom from './components/meta-icon';
|
|
13
13
|
import Header from './components/header';
|
|
14
|
+
import ItemWrapper from './components/item-wrapper';
|
|
14
15
|
// import { customTypes, operatorList } from './enum/filter-enum';
|
|
15
16
|
import { useStore } from '../../hooks/use-provider';
|
|
16
17
|
var Filter = function Filter(props) {
|
|
@@ -165,26 +166,31 @@ var Filter = function Filter(props) {
|
|
|
165
166
|
className: "Sqb-hover-parent",
|
|
166
167
|
children: [!meta.isPermanent ? _jsx(Header, {
|
|
167
168
|
meta: meta,
|
|
169
|
+
groupIndex: groupIndex,
|
|
168
170
|
className: 'purple-text',
|
|
169
171
|
title: __('SqlQueryBuilder.filter'),
|
|
170
172
|
onClose: function onClose() {
|
|
171
173
|
closePopup();
|
|
172
174
|
store.delMeta(meta, groupIndex);
|
|
173
175
|
}
|
|
174
|
-
}) : null, _jsx(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
}) : null, _jsx(ItemWrapper, {
|
|
177
|
+
meta: meta,
|
|
178
|
+
groupIndex: groupIndex,
|
|
179
|
+
children: _jsx("div", {
|
|
180
|
+
className: "Sqb-item--content",
|
|
181
|
+
children: _jsx(FormulaList
|
|
180
182
|
// customTypes={customTypes}
|
|
181
183
|
// operatorList={operatorList}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
, {
|
|
185
|
+
// customTypes={customTypes}
|
|
186
|
+
// operatorList={operatorList}
|
|
187
|
+
value: filter,
|
|
188
|
+
data: getPreColumns(),
|
|
189
|
+
exitData: getColumns(),
|
|
190
|
+
onChange: function onChange(val) {
|
|
191
|
+
selectFilter(val);
|
|
192
|
+
}
|
|
193
|
+
})
|
|
188
194
|
})
|
|
189
195
|
}), _jsx(NextDom, {
|
|
190
196
|
meta: meta,
|