@gingkoo/pandora-metabase 1.0.37 → 1.0.38
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/custom-editor/index.d.ts +1 -0
- package/lib/cjs/components/dialog/custom-editor/index.js +2 -0
- package/lib/cjs/components/modules/custom-column.js +16 -0
- package/lib/es/components/dialog/custom-editor/index.d.ts +1 -0
- package/lib/es/components/dialog/custom-editor/index.js +2 -0
- package/lib/es/components/modules/custom-column.js +16 -0
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ var VisualBox = _styledComponents["default"].div.attrs({
|
|
|
23
23
|
var CaseEditor = function CaseEditor(props) {
|
|
24
24
|
var value = props.value,
|
|
25
25
|
data = props.data,
|
|
26
|
+
exitData = props.exitData,
|
|
26
27
|
onOk = props.onOk,
|
|
27
28
|
onCancel = props.onCancel;
|
|
28
29
|
// const [popup, setPopup] = useState<PopupType>({ visible: false }); // 弹框信息
|
|
@@ -82,6 +83,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
82
83
|
isCustom: true,
|
|
83
84
|
value: caseList,
|
|
84
85
|
data: data,
|
|
86
|
+
exitData: exitData,
|
|
85
87
|
ref: ref,
|
|
86
88
|
onChange: setCaseList
|
|
87
89
|
})]
|
|
@@ -30,6 +30,7 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
30
30
|
var store = (0, _useProvider.useStore)();
|
|
31
31
|
var customColumn = meta.customColumn;
|
|
32
32
|
var index = (0, _utils.findIndex)(store.metaList[groupIndex].list, meta);
|
|
33
|
+
var notExistsColumns = store.preProps.notExistsColumns;
|
|
33
34
|
function getAvailableColumns() {
|
|
34
35
|
var newMeta = store.metaList[groupIndex].list.slice();
|
|
35
36
|
var columns = [];
|
|
@@ -212,6 +213,19 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
212
213
|
}
|
|
213
214
|
return data;
|
|
214
215
|
}
|
|
216
|
+
// const getPreColumns = () => {
|
|
217
|
+
// let data = [...getColumns(), ...cloneDeep(notExistsColumns || [])];
|
|
218
|
+
// // 将source 拍到最前面
|
|
219
|
+
// const priorityNames = ['source'];
|
|
220
|
+
// const sorted = data.sort((a, b) => {
|
|
221
|
+
// const aPriority = priorityNames.includes(a.name);
|
|
222
|
+
// const bPriority = priorityNames.includes(b.name);
|
|
223
|
+
// if (aPriority && !bPriority) return -1;
|
|
224
|
+
// if (!aPriority && bPriority) return 1;
|
|
225
|
+
// return 0;
|
|
226
|
+
// });
|
|
227
|
+
// return sorted;
|
|
228
|
+
// };
|
|
215
229
|
// 自定义弹窗
|
|
216
230
|
var showSubQuery = function showSubQuery(e, i) {
|
|
217
231
|
var newMeta = store.metaList[groupIndex].list.slice();
|
|
@@ -224,6 +238,8 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
224
238
|
value: store,
|
|
225
239
|
children: (0, _jsxRuntime.jsx)(_customEditor["default"], {
|
|
226
240
|
data: getColumns(),
|
|
241
|
+
// data={getPreColumns()}
|
|
242
|
+
exitData: getColumns(),
|
|
227
243
|
value: _value,
|
|
228
244
|
onCancel: function onCancel() {
|
|
229
245
|
o.close();
|
|
@@ -17,6 +17,7 @@ var VisualBox = Styled.div.attrs({
|
|
|
17
17
|
var CaseEditor = function CaseEditor(props) {
|
|
18
18
|
var value = props.value,
|
|
19
19
|
data = props.data,
|
|
20
|
+
exitData = props.exitData,
|
|
20
21
|
onOk = props.onOk,
|
|
21
22
|
onCancel = props.onCancel;
|
|
22
23
|
// const [popup, setPopup] = useState<PopupType>({ visible: false }); // 弹框信息
|
|
@@ -76,6 +77,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
76
77
|
isCustom: true,
|
|
77
78
|
value: caseList,
|
|
78
79
|
data: data,
|
|
80
|
+
exitData: exitData,
|
|
79
81
|
ref: ref,
|
|
80
82
|
onChange: setCaseList
|
|
81
83
|
})]
|
|
@@ -26,6 +26,7 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
26
26
|
var store = useStore();
|
|
27
27
|
var customColumn = meta.customColumn;
|
|
28
28
|
var index = findIndex(store.metaList[groupIndex].list, meta);
|
|
29
|
+
var notExistsColumns = store.preProps.notExistsColumns;
|
|
29
30
|
function getAvailableColumns() {
|
|
30
31
|
var newMeta = store.metaList[groupIndex].list.slice();
|
|
31
32
|
var columns = [];
|
|
@@ -208,6 +209,19 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
208
209
|
}
|
|
209
210
|
return data;
|
|
210
211
|
}
|
|
212
|
+
// const getPreColumns = () => {
|
|
213
|
+
// let data = [...getColumns(), ...cloneDeep(notExistsColumns || [])];
|
|
214
|
+
// // 将source 拍到最前面
|
|
215
|
+
// const priorityNames = ['source'];
|
|
216
|
+
// const sorted = data.sort((a, b) => {
|
|
217
|
+
// const aPriority = priorityNames.includes(a.name);
|
|
218
|
+
// const bPriority = priorityNames.includes(b.name);
|
|
219
|
+
// if (aPriority && !bPriority) return -1;
|
|
220
|
+
// if (!aPriority && bPriority) return 1;
|
|
221
|
+
// return 0;
|
|
222
|
+
// });
|
|
223
|
+
// return sorted;
|
|
224
|
+
// };
|
|
211
225
|
// 自定义弹窗
|
|
212
226
|
var showSubQuery = function showSubQuery(e, i) {
|
|
213
227
|
var newMeta = store.metaList[groupIndex].list.slice();
|
|
@@ -220,6 +234,8 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
220
234
|
value: store,
|
|
221
235
|
children: _jsx(CustomEditor, {
|
|
222
236
|
data: getColumns(),
|
|
237
|
+
// data={getPreColumns()}
|
|
238
|
+
exitData: getColumns(),
|
|
223
239
|
value: _value,
|
|
224
240
|
onCancel: function onCancel() {
|
|
225
241
|
o.close();
|