@gingkoo/pandora-metabase 1.0.145 → 1.0.147

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 (117) hide show
  1. package/lib/cjs/common/Loading/index.d.ts +2 -1
  2. package/lib/cjs/components/dialog/custom-column/dialog/function-tip.d.ts +2 -1
  3. package/lib/cjs/components/dialog/custom-column/dialog/select-list.d.ts +2 -1
  4. package/lib/cjs/components/dialog/custom-column/expression-editor.d.ts +2 -1
  5. package/lib/cjs/components/dialog/custom-column/index.d.ts +2 -1
  6. package/lib/cjs/components/dialog/custom-column/tokenized-expression.d.ts +1 -1
  7. package/lib/cjs/components/dialog/custom-editor/index.d.ts +2 -1
  8. package/lib/cjs/components/dialog/expression/index.d.ts +2 -1
  9. package/lib/cjs/components/dialog/formula/index.js +15 -0
  10. package/lib/cjs/components/dialog/formula-list/CaseWhenGroup.d.ts +1 -1
  11. package/lib/cjs/components/dialog/formula-list/LogicGroup.d.ts +1 -1
  12. package/lib/cjs/components/dialog/formula-list/index.js +21 -11
  13. package/lib/cjs/components/dialog/formula-list/index.less +8 -2
  14. package/lib/cjs/components/dialog/select-column/index.d.ts +2 -1
  15. package/lib/cjs/components/dialog/select-column-multiple/index.d.ts +2 -1
  16. package/lib/cjs/components/dialog/select-join/index.d.ts +2 -1
  17. package/lib/cjs/components/dialog/select-join-column/index.d.ts +2 -1
  18. package/lib/cjs/components/dialog/select-join-column-multiple/index.d.ts +2 -1
  19. package/lib/cjs/components/dialog/select-list/index.d.ts +2 -1
  20. package/lib/cjs/components/dialog/select-permission-table/index.d.ts +2 -1
  21. package/lib/cjs/components/dialog/select-summarize/index.d.ts +2 -1
  22. package/lib/cjs/components/dialog/select-table/index.d.ts +2 -1
  23. package/lib/cjs/components/icons.d.ts +30 -29
  24. package/lib/cjs/components/metabase/index.d.ts +2 -1
  25. package/lib/cjs/components/metabase/index.js +16 -1
  26. package/lib/cjs/components/metabase/index.less +34 -0
  27. package/lib/cjs/components/modules/components/Wrapper.d.ts +1 -1
  28. package/lib/cjs/components/modules/components/header.d.ts +2 -1
  29. package/lib/cjs/components/modules/components/item-name.d.ts +1 -1
  30. package/lib/cjs/components/modules/components/item-wrapper.d.ts +1 -1
  31. package/lib/cjs/components/modules/components/meta-icon.d.ts +2 -1
  32. package/lib/cjs/components/modules/custom-column.d.ts +2 -1
  33. package/lib/cjs/components/modules/custom-column.js +16 -12
  34. package/lib/cjs/components/modules/filter.d.ts +2 -1
  35. package/lib/cjs/components/modules/join-data.d.ts +2 -1
  36. package/lib/cjs/components/modules/join-data.js +132 -113
  37. package/lib/cjs/components/modules/permission-table.d.ts +2 -1
  38. package/lib/cjs/components/modules/row-limit.d.ts +2 -1
  39. package/lib/cjs/components/modules/sort.d.ts +2 -1
  40. package/lib/cjs/components/modules/sort.js +18 -14
  41. package/lib/cjs/components/modules/summarize/group-by.d.ts +2 -1
  42. package/lib/cjs/components/modules/summarize/group-by.js +32 -28
  43. package/lib/cjs/components/modules/summarize/index.d.ts +2 -1
  44. package/lib/cjs/components/modules/summarize/select-index.d.ts +2 -1
  45. package/lib/cjs/components/modules/summarize/select-index.js +32 -28
  46. package/lib/cjs/components/modules/table-data.d.ts +2 -1
  47. package/lib/cjs/components/modules/table-data.js +53 -46
  48. package/lib/cjs/components/modules/union.d.ts +2 -1
  49. package/lib/cjs/components/popup.d.ts +1 -1
  50. package/lib/cjs/components/right-click-menu.d.ts +16 -0
  51. package/lib/cjs/components/right-click-menu.js +179 -0
  52. package/lib/cjs/components/right-click-value.d.ts +8 -0
  53. package/lib/cjs/components/right-click-value.js +33 -0
  54. package/lib/cjs/hooks/use-provider.d.ts +1 -1
  55. package/lib/cjs/hooks/use-state.js +62 -22
  56. package/lib/cjs/index.d.ts +2 -2
  57. package/lib/cjs/index.js +4 -1
  58. package/lib/cjs/types.d.ts +17 -0
  59. package/lib/es/common/Loading/index.d.ts +2 -1
  60. package/lib/es/components/dialog/custom-column/dialog/function-tip.d.ts +2 -1
  61. package/lib/es/components/dialog/custom-column/dialog/select-list.d.ts +2 -1
  62. package/lib/es/components/dialog/custom-column/expression-editor.d.ts +2 -1
  63. package/lib/es/components/dialog/custom-column/index.d.ts +2 -1
  64. package/lib/es/components/dialog/custom-column/tokenized-expression.d.ts +1 -1
  65. package/lib/es/components/dialog/custom-editor/index.d.ts +2 -1
  66. package/lib/es/components/dialog/expression/index.d.ts +2 -1
  67. package/lib/es/components/dialog/formula/index.js +15 -0
  68. package/lib/es/components/dialog/formula-list/CaseWhenGroup.d.ts +1 -1
  69. package/lib/es/components/dialog/formula-list/LogicGroup.d.ts +1 -1
  70. package/lib/es/components/dialog/formula-list/index.js +22 -12
  71. package/lib/es/components/dialog/formula-list/index.less +8 -2
  72. package/lib/es/components/dialog/select-column/index.d.ts +2 -1
  73. package/lib/es/components/dialog/select-column-multiple/index.d.ts +2 -1
  74. package/lib/es/components/dialog/select-join/index.d.ts +2 -1
  75. package/lib/es/components/dialog/select-join-column/index.d.ts +2 -1
  76. package/lib/es/components/dialog/select-join-column-multiple/index.d.ts +2 -1
  77. package/lib/es/components/dialog/select-list/index.d.ts +2 -1
  78. package/lib/es/components/dialog/select-permission-table/index.d.ts +2 -1
  79. package/lib/es/components/dialog/select-summarize/index.d.ts +2 -1
  80. package/lib/es/components/dialog/select-table/index.d.ts +2 -1
  81. package/lib/es/components/icons.d.ts +30 -29
  82. package/lib/es/components/metabase/index.d.ts +2 -1
  83. package/lib/es/components/metabase/index.js +15 -2
  84. package/lib/es/components/metabase/index.less +34 -0
  85. package/lib/es/components/modules/components/Wrapper.d.ts +1 -1
  86. package/lib/es/components/modules/components/header.d.ts +2 -1
  87. package/lib/es/components/modules/components/item-name.d.ts +1 -1
  88. package/lib/es/components/modules/components/item-wrapper.d.ts +1 -1
  89. package/lib/es/components/modules/components/meta-icon.d.ts +2 -1
  90. package/lib/es/components/modules/custom-column.d.ts +2 -1
  91. package/lib/es/components/modules/custom-column.js +16 -12
  92. package/lib/es/components/modules/filter.d.ts +2 -1
  93. package/lib/es/components/modules/join-data.d.ts +2 -1
  94. package/lib/es/components/modules/join-data.js +132 -113
  95. package/lib/es/components/modules/permission-table.d.ts +2 -1
  96. package/lib/es/components/modules/row-limit.d.ts +2 -1
  97. package/lib/es/components/modules/sort.d.ts +2 -1
  98. package/lib/es/components/modules/sort.js +18 -14
  99. package/lib/es/components/modules/summarize/group-by.d.ts +2 -1
  100. package/lib/es/components/modules/summarize/group-by.js +32 -28
  101. package/lib/es/components/modules/summarize/index.d.ts +2 -1
  102. package/lib/es/components/modules/summarize/select-index.d.ts +2 -1
  103. package/lib/es/components/modules/summarize/select-index.js +32 -28
  104. package/lib/es/components/modules/table-data.d.ts +2 -1
  105. package/lib/es/components/modules/table-data.js +53 -46
  106. package/lib/es/components/modules/union.d.ts +2 -1
  107. package/lib/es/components/popup.d.ts +1 -1
  108. package/lib/es/components/right-click-menu.d.ts +16 -0
  109. package/lib/es/components/right-click-menu.js +172 -0
  110. package/lib/es/components/right-click-value.d.ts +8 -0
  111. package/lib/es/components/right-click-value.js +25 -0
  112. package/lib/es/hooks/use-provider.d.ts +1 -1
  113. package/lib/es/hooks/use-state.js +62 -22
  114. package/lib/es/index.d.ts +2 -2
  115. package/lib/es/index.js +4 -1
  116. package/lib/es/types.d.ts +17 -0
  117. package/package.json +2 -2
@@ -21,6 +21,7 @@ import NextDom from './components/meta-icon';
21
21
  import Header from './components/header';
22
22
  import ItemWrapper from './components/item-wrapper';
23
23
  import ItemName from './components/item-name';
24
+ import RightClickValue from '../right-click-value';
24
25
  import { getTopLayerZIndex } from '../../utils/helper-dom';
25
26
  import { useStore } from '../../hooks/use-provider';
26
27
  var CustomColumn = function CustomColumn(props) {
@@ -310,20 +311,23 @@ var CustomColumn = function CustomColumn(props) {
310
311
  children: [meta.customColumn.map(function (v, i) {
311
312
  return _jsx(ItemName, {
312
313
  isError: isError(v.formulaList, getColumns()) || isExistsError(v.formulaList, store.existsError),
313
- children: _jsxs("div", {
314
- className: cx("Sqb-TableName gray-name"),
315
- onClick: function onClick(e) {
316
- return showSubQuery(e, i);
317
- },
318
- children: [v.name, _jsx("span", {
319
- style: {
320
- fontSize: 0
321
- },
314
+ children: _jsx(RightClickValue, {
315
+ value: v,
316
+ children: _jsxs("div", {
317
+ className: cx("Sqb-TableName gray-name"),
322
318
  onClick: function onClick(e) {
323
- return handleDel(e, i);
319
+ return showSubQuery(e, i);
324
320
  },
325
- children: _jsx(CloseIcon, {})
326
- })]
321
+ children: [v.name, _jsx("span", {
322
+ style: {
323
+ fontSize: 0
324
+ },
325
+ onClick: function onClick(e) {
326
+ return handleDel(e, i);
327
+ },
328
+ children: _jsx(CloseIcon, {})
329
+ })]
330
+ })
327
331
  })
328
332
  }, i);
329
333
  }), _jsx("div", {
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { MetaFilter } from '../../store/types';
2
3
  interface PropsType {
3
4
  meta: MetaFilter;
4
5
  groupIndex: number;
5
6
  }
6
- declare const Filter: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
+ declare const Filter: (props: PropsType) => React.JSX.Element;
7
8
  export default Filter;
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { MetaJoin } from '../../store/types';
2
3
  interface PropsType {
3
4
  meta: MetaJoin;
4
5
  groupIndex: number;
5
6
  }
6
- declare const JoinData: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
+ declare const JoinData: (props: PropsType) => React.JSX.Element;
7
8
  export default JoinData;
@@ -22,6 +22,7 @@ import { AtomsTypeEnum, ChangeType, FormulaTypeEnum } from '../../store/types';
22
22
  import { SummarizeAlias } from '../../store/helper';
23
23
  import { getHelper, changeTableAlias, isValidSQLAlias, isError } from '../../utils';
24
24
  import ItemName from './components/item-name';
25
+ import RightClickValue from '../right-click-value';
25
26
  import Wrapper from './components/Wrapper';
26
27
  import NextDom from './components/meta-icon';
27
28
  import Header from './components/header';
@@ -1211,17 +1212,20 @@ var JoinData = function JoinData(props) {
1211
1212
  var _items$2, _items$3;
1212
1213
  return _jsx(ItemName, {
1213
1214
  isError: isError(items, getColumns(type)),
1214
- children: _jsx("div", {
1215
- className: cx("Sqb-TableName", {
1216
- notSelected: !((_items$2 = items[0]) !== null && _items$2 !== void 0 && _items$2.fieldName)
1217
- }),
1218
- "v-position": type,
1219
- "v-index": i,
1220
- "v-index2": index,
1221
- onClick: selectMoreJoinColumn,
1222
- children: (_items$3 = items[0]) !== null && _items$3 !== void 0 && _items$3.fieldName ? items.map(function (field) {
1223
- return field.fieldName;
1224
- }).join(' || ') : __('SqlQueryBuilder.pickTable')
1215
+ children: _jsx(RightClickValue, {
1216
+ value: items,
1217
+ children: _jsx("div", {
1218
+ className: cx("Sqb-TableName", {
1219
+ notSelected: !((_items$2 = items[0]) !== null && _items$2 !== void 0 && _items$2.fieldName)
1220
+ }),
1221
+ "v-position": type,
1222
+ "v-index": i,
1223
+ "v-index2": index,
1224
+ onClick: selectMoreJoinColumn,
1225
+ children: (_items$3 = items[0]) !== null && _items$3 !== void 0 && _items$3.fieldName ? items.map(function (field) {
1226
+ return field.fieldName;
1227
+ }).join(' || ') : __('SqlQueryBuilder.pickTable')
1228
+ })
1225
1229
  })
1226
1230
  }, type + i);
1227
1231
  } else {
@@ -1268,17 +1272,20 @@ var JoinData = function JoinData(props) {
1268
1272
  return _jsx(ItemName, {
1269
1273
  isError: !!(item.id || item.val) && !getConstantLabel(store.constantList, item.id || item.val),
1270
1274
  message: "\u5E38\u91CF\u4E22\u5931",
1271
- children: _jsx("div", {
1272
- className: cx("Sqb-TableName", {
1273
- notSelected: !item.val
1274
- }),
1275
- "v-position": type,
1276
- "v-index": i,
1277
- "v-index2": index,
1278
- "v-val": item.id || item.val,
1279
- onClick: selectConstant,
1280
- children: getConstantLabel(store.constantList, item.id || item.val, item.val) || __('SqlQueryBuilder.pickConstant')
1281
- }, index)
1275
+ children: _jsx(RightClickValue, {
1276
+ value: item,
1277
+ children: _jsx("div", {
1278
+ className: cx("Sqb-TableName", {
1279
+ notSelected: !item.val
1280
+ }),
1281
+ "v-position": type,
1282
+ "v-index": i,
1283
+ "v-index2": index,
1284
+ "v-val": item.id || item.val,
1285
+ onClick: selectConstant,
1286
+ children: getConstantLabel(store.constantList, item.id || item.val, item.val) || __('SqlQueryBuilder.pickConstant')
1287
+ }, index)
1288
+ })
1282
1289
  }, index);
1283
1290
  }
1284
1291
  });
@@ -1315,12 +1322,15 @@ var JoinData = function JoinData(props) {
1315
1322
  className: cx("Sqb-NotebookCell"),
1316
1323
  children: [_jsx(ItemName, {
1317
1324
  isError: leftTableIsError(),
1318
- children: _jsx("div", {
1319
- className: cx("Sqb-TableName", {
1320
- notSelected: !table1Selected
1321
- }),
1322
- onClick: selectLeftTable,
1323
- children: getTable1Name() || __('SqlQueryBuilder.pickTable')
1325
+ children: _jsx(RightClickValue, {
1326
+ value: meta.table1,
1327
+ children: _jsx("div", {
1328
+ className: cx("Sqb-TableName", {
1329
+ notSelected: !table1Selected
1330
+ }),
1331
+ onClick: selectLeftTable,
1332
+ children: getTable1Name() || __('SqlQueryBuilder.pickTable')
1333
+ })
1324
1334
  })
1325
1335
  }), _jsx("div", {
1326
1336
  onClick: selectJoin,
@@ -1341,84 +1351,90 @@ var JoinData = function JoinData(props) {
1341
1351
  cursor: 'pointer'
1342
1352
  }
1343
1353
  })
1344
- }), meta.isSubquery ? _jsxs("div", {
1345
- className: cx("Sqb-TableName", {
1346
- notSelected: !subQuerySelected
1347
- }),
1348
- onClick: function onClick() {
1349
- showSubQuery(meta.subquery);
1350
- },
1351
- children: [subQuerySelected && _jsx(_Fragment, {
1352
- children: function () {
1353
- var showButton = store.tableEnableAlias || tableIsError() && isDel;
1354
- var icon = isDel ? _jsx(ExclamationCircleFill, {}) : store.tableEnableAlias ? 'As' : '';
1355
- return showButton ? _jsx(Tooltip, {
1356
- title: __(tableIsError() ? isDel ? 'metabase.verify' : 'SqlQueryBuilder.repeatAlias' : 'SqlQueryBuilder.alias'),
1357
- children: _jsx(Button, {
1358
- danger: tableIsError(),
1359
- className: cx(':Sqb-TableName-as', {
1360
- isError: tableIsError()
1361
- }),
1362
- shape: 'circle',
1363
- style: isDel ? {
1364
- fontSize: 18,
1365
- backgroundColor: '#fff',
1366
- width: 'auto',
1367
- height: 'auto'
1368
- } : {},
1369
- iconOnly: true,
1370
- primary: !isDel,
1371
- icon: icon,
1372
- size: 'small',
1373
- onClick: function onClick(e) {
1374
- if (store.tableEnableAlias) {
1375
- var _meta$table3;
1376
- e.stopPropagation();
1377
- onChangeTableAlias(((_meta$table3 = meta.table2) === null || _meta$table3 === void 0 ? void 0 : _meta$table3.alias) || '');
1354
+ }), meta.isSubquery ? _jsx(RightClickValue, {
1355
+ value: meta,
1356
+ children: _jsxs("div", {
1357
+ className: cx("Sqb-TableName", {
1358
+ notSelected: !subQuerySelected
1359
+ }),
1360
+ onClick: function onClick() {
1361
+ showSubQuery(meta.subquery);
1362
+ },
1363
+ children: [subQuerySelected && _jsx(_Fragment, {
1364
+ children: function () {
1365
+ var showButton = store.tableEnableAlias || tableIsError() && isDel;
1366
+ var icon = isDel ? _jsx(ExclamationCircleFill, {}) : store.tableEnableAlias ? 'As' : '';
1367
+ return showButton ? _jsx(Tooltip, {
1368
+ title: __(tableIsError() ? isDel ? 'metabase.verify' : 'SqlQueryBuilder.repeatAlias' : 'SqlQueryBuilder.alias'),
1369
+ children: _jsx(Button, {
1370
+ danger: tableIsError(),
1371
+ className: cx(':Sqb-TableName-as', {
1372
+ isError: tableIsError()
1373
+ }),
1374
+ shape: 'circle',
1375
+ style: isDel ? {
1376
+ fontSize: 18,
1377
+ backgroundColor: '#fff',
1378
+ width: 'auto',
1379
+ height: 'auto'
1380
+ } : {},
1381
+ iconOnly: true,
1382
+ primary: !isDel,
1383
+ icon: icon,
1384
+ size: 'small',
1385
+ onClick: function onClick(e) {
1386
+ if (store.tableEnableAlias) {
1387
+ var _meta$table3;
1388
+ e.stopPropagation();
1389
+ onChangeTableAlias(((_meta$table3 = meta.table2) === null || _meta$table3 === void 0 ? void 0 : _meta$table3.alias) || '');
1390
+ }
1378
1391
  }
1379
- }
1380
- })
1381
- }) : null;
1382
- }()
1383
- }), subQuerySelected ? "".concat(((_meta$subquery2 = meta.subquery) === null || _meta$subquery2 === void 0 ? void 0 : _meta$subquery2[0]).table.datasourceName, ".").concat(((_meta$subquery3 = meta.subquery) === null || _meta$subquery3 === void 0 ? void 0 : _meta$subquery3[0]).table.name, " ").concat((_meta$table4 = meta.table2) !== null && _meta$table4 !== void 0 && _meta$table4.alias && store.tableEnableAlias ? "as ".concat((_meta$table5 = meta.table2) === null || _meta$table5 === void 0 ? void 0 : _meta$table5.alias) : '', " ") : __('SqlQueryBuilder.setSubQuery')]
1384
- }) : _jsxs("div", {
1385
- className: cx("Sqb-TableName", {
1386
- notSelected: !table2Selected
1387
- }),
1388
- onClick: selectTable,
1389
- children: [table2Selected && _jsx(_Fragment, {
1390
- children: function () {
1391
- var showButton = store.tableEnableAlias || tableIsError() && isDel;
1392
- var icon = isDel ? _jsx(ExclamationCircleFill, {}) : store.tableEnableAlias ? 'As' : '';
1393
- return showButton ? _jsx(Tooltip, {
1394
- title: __(tableIsError() ? isDel ? 'metabase.verify' : 'SqlQueryBuilder.repeatAlias' : 'SqlQueryBuilder.alias'),
1395
- children: _jsx(Button, {
1396
- danger: tableIsError(),
1397
- className: cx(':Sqb-TableName-as', {
1398
- isError: tableIsError()
1399
- }),
1400
- shape: 'circle',
1401
- style: isDel ? {
1402
- fontSize: 18,
1403
- backgroundColor: '#fff',
1404
- width: 'auto',
1405
- height: 'auto'
1406
- } : {},
1407
- iconOnly: true,
1408
- primary: !isDel,
1409
- icon: icon,
1410
- size: 'small',
1411
- onClick: function onClick(e) {
1412
- if (store.tableEnableAlias) {
1413
- var _meta$table6;
1414
- e.stopPropagation();
1415
- onChangeTableAlias(((_meta$table6 = meta.table2) === null || _meta$table6 === void 0 ? void 0 : _meta$table6.alias) || '');
1392
+ })
1393
+ }) : null;
1394
+ }()
1395
+ }), subQuerySelected ? "".concat(((_meta$subquery2 = meta.subquery) === null || _meta$subquery2 === void 0 ? void 0 : _meta$subquery2[0]).table.datasourceName, ".").concat(((_meta$subquery3 = meta.subquery) === null || _meta$subquery3 === void 0 ? void 0 : _meta$subquery3[0]).table.name, " ").concat((_meta$table4 = meta.table2) !== null && _meta$table4 !== void 0 && _meta$table4.alias && store.tableEnableAlias ? "as ".concat((_meta$table5 = meta.table2) === null || _meta$table5 === void 0 ? void 0 : _meta$table5.alias) : '', " ") : __('SqlQueryBuilder.setSubQuery')]
1396
+ })
1397
+ }) : _jsx(RightClickValue, {
1398
+ value: meta.table2,
1399
+ children: _jsxs("div", {
1400
+ className: cx("Sqb-TableName", {
1401
+ notSelected: !table2Selected
1402
+ }),
1403
+ onClick: selectTable,
1404
+ children: [table2Selected && _jsx(_Fragment, {
1405
+ children: function () {
1406
+ var showButton = store.tableEnableAlias || tableIsError() && isDel;
1407
+ var icon = isDel ? _jsx(ExclamationCircleFill, {}) : store.tableEnableAlias ? 'As' : '';
1408
+ return showButton ? _jsx(Tooltip, {
1409
+ title: __(tableIsError() ? isDel ? 'metabase.verify' : 'SqlQueryBuilder.repeatAlias' : 'SqlQueryBuilder.alias'),
1410
+ children: _jsx(Button, {
1411
+ danger: tableIsError(),
1412
+ className: cx(':Sqb-TableName-as', {
1413
+ isError: tableIsError()
1414
+ }),
1415
+ shape: 'circle',
1416
+ style: isDel ? {
1417
+ fontSize: 18,
1418
+ backgroundColor: '#fff',
1419
+ width: 'auto',
1420
+ height: 'auto'
1421
+ } : {},
1422
+ iconOnly: true,
1423
+ primary: !isDel,
1424
+ icon: icon,
1425
+ size: 'small',
1426
+ onClick: function onClick(e) {
1427
+ if (store.tableEnableAlias) {
1428
+ var _meta$table6;
1429
+ e.stopPropagation();
1430
+ onChangeTableAlias(((_meta$table6 = meta.table2) === null || _meta$table6 === void 0 ? void 0 : _meta$table6.alias) || '');
1431
+ }
1416
1432
  }
1417
- }
1418
- })
1419
- }) : null;
1420
- }()
1421
- }), table2Selected ? "".concat(meta.table2.datasourceName, ".").concat(meta.table2.name, " ").concat((_meta$table7 = meta.table2) !== null && _meta$table7 !== void 0 && _meta$table7.alias && store.tableEnableAlias ? "as ".concat((_meta$table8 = meta.table2) === null || _meta$table8 === void 0 ? void 0 : _meta$table8.alias) : '') : __('SqlQueryBuilder.pickTable')]
1433
+ })
1434
+ }) : null;
1435
+ }()
1436
+ }), table2Selected ? "".concat(meta.table2.datasourceName, ".").concat(meta.table2.name, " ").concat((_meta$table7 = meta.table2) !== null && _meta$table7 !== void 0 && _meta$table7.alias && store.tableEnableAlias ? "as ".concat((_meta$table8 = meta.table2) === null || _meta$table8 === void 0 ? void 0 : _meta$table8.alias) : '') : __('SqlQueryBuilder.pickTable')]
1437
+ })
1422
1438
  }), store.showSubquery && _jsx(Tooltip, {
1423
1439
  title: __('SqlQueryBuilder.switchSubQuery'),
1424
1440
  children: _jsx(Button, {
@@ -1529,15 +1545,18 @@ var JoinData = function JoinData(props) {
1529
1545
  children: "on"
1530
1546
  }), _jsx(ItemName, {
1531
1547
  isError: isError(v, getTableColumns()),
1532
- children: _jsx("div", {
1533
- className: cx("Sqb-TableName purple-name", {
1534
- notSelected: !v.quotes
1535
- }),
1536
- onClick: function onClick(e) {
1537
- return changeExpression(e, i);
1538
- },
1539
- children: v.quotes || __('joinData.selectExpression')
1540
- }, i)
1548
+ children: _jsx(RightClickValue, {
1549
+ value: v,
1550
+ children: _jsx("div", {
1551
+ className: cx("Sqb-TableName purple-name", {
1552
+ notSelected: !v.quotes
1553
+ }),
1554
+ onClick: function onClick(e) {
1555
+ return changeExpression(e, i);
1556
+ },
1557
+ children: v.quotes || __('joinData.selectExpression')
1558
+ }, i)
1559
+ })
1541
1560
  }), _jsx(Tooltip, {
1542
1561
  title: __('SqlQueryBuilder.add'),
1543
1562
  children: _jsx(Dropdown, {
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { MetaData } from '../../store/types';
2
3
  interface PropsType {
3
4
  meta: MetaData;
4
5
  groupIndex: number;
5
6
  }
6
- declare const PermissionTable: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
+ declare const PermissionTable: (props: PropsType) => React.JSX.Element;
7
8
  export default PermissionTable;
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  interface PropsType {
2
3
  store?: any;
3
4
  meta: any;
4
5
  groupIndex: number;
5
6
  }
6
- declare const RowLimit: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
+ declare const RowLimit: (props: PropsType) => React.JSX.Element;
7
8
  export default RowLimit;
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { MetaSort } from '../../store/types';
2
3
  interface PropsType {
3
4
  meta: MetaSort;
4
5
  groupIndex: number;
5
6
  }
6
- declare const Sort: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
+ declare const Sort: (props: PropsType) => React.JSX.Element;
7
8
  export default Sort;
@@ -15,6 +15,7 @@ import Header from './components/header';
15
15
  import ItemWrapper from './components/item-wrapper';
16
16
  import { useStore } from '../../hooks/use-provider';
17
17
  import ItemName from './components/item-name';
18
+ import RightClickValue from '../right-click-value';
18
19
  var Sort = function Sort(props) {
19
20
  var meta = props.meta,
20
21
  groupIndex = props.groupIndex;
@@ -192,21 +193,24 @@ var Sort = function Sort(props) {
192
193
  children: [sort.map(function (v, i) {
193
194
  return _jsx(ItemName, {
194
195
  isError: isError(v.expression, getColumns()),
195
- children: _jsxs("div", {
196
- className: "Sqb-TableName gray-name",
197
- onClick: function onClick() {
198
- return handleSort(i);
199
- },
200
- children: [v.sort === SortEnum.asc ? _jsx(UpArrowIcon, {}) : _jsx(DownArrowIcon, {}), getName(v.expression), _jsx("span", {
201
- style: {
202
- fontSize: 0
196
+ children: _jsx(RightClickValue, {
197
+ value: v,
198
+ children: _jsxs("div", {
199
+ className: "Sqb-TableName gray-name",
200
+ onClick: function onClick() {
201
+ return handleSort(i);
203
202
  },
204
- onClick: function onClick(e) {
205
- return delSortColumn(e, i);
206
- },
207
- children: _jsx(CloseIcon, {})
208
- })]
209
- }, i)
203
+ children: [v.sort === SortEnum.asc ? _jsx(UpArrowIcon, {}) : _jsx(DownArrowIcon, {}), getName(v.expression), _jsx("span", {
204
+ style: {
205
+ fontSize: 0
206
+ },
207
+ onClick: function onClick(e) {
208
+ return delSortColumn(e, i);
209
+ },
210
+ children: _jsx(CloseIcon, {})
211
+ })]
212
+ }, i)
213
+ })
210
214
  }, i);
211
215
  }), _jsx("div", {
212
216
  className: "Sqb-TableName gray-name",
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { MetaSummarize } from '../../../store/types';
2
3
  interface PropsType {
3
4
  meta: MetaSummarize;
4
5
  groupIndex: number;
5
6
  }
6
- declare const GroupBy: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
7
+ declare const GroupBy: (props: PropsType) => React.JSX.Element;
7
8
  export default GroupBy;
@@ -16,6 +16,7 @@ import { Tooltip, Button, Modal, Input, Toast } from '@gingkoo/pandora';
16
16
  import { uuidv4, getAlias } from '../../../utils/helper';
17
17
  import { changeFieldAlias, isExistsError, isValidSQLAlias } from '../../../utils';
18
18
  import ItemName from '../components/item-name';
19
+ import RightClickValue from '../../right-click-value';
19
20
  import { AddIcon, CloseIcon } from '../../icons';
20
21
  import FormulaList from '../../dialog/formula-list';
21
22
  import { useStore } from '../../../hooks/use-provider';
@@ -510,36 +511,39 @@ var GroupBy = function GroupBy(props) {
510
511
  children: [meta.by.map(function (v, i) {
511
512
  return _jsx(ItemName, {
512
513
  isError: isExistsError([getErrorCheckField(v)], store.existsError),
513
- children: _jsxs("div", {
514
- className: "Sqb-TableName green-name",
515
- onClick: function onClick(e) {
516
- return handleUpdate(e, i);
517
- },
518
- children: [v.quotes && _jsx(_Fragment, {
519
- children: store.groupByEnableAlias && _jsx(Tooltip, {
520
- title: !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias) ? __('SqlQueryBuilder.aliasForRules') : __('SqlQueryBuilder.alias'),
521
- children: _jsx(Button, {
522
- className: cx(':Sqb-TableName-as :Sqb-TableName green-name', _defineProperty({}, 'isError', !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias))),
523
- shape: 'circle',
524
- iconOnly: true,
525
- primary: true,
526
- icon: 'As',
527
- size: 'small',
528
- onClick: function onClick(e) {
529
- e.stopPropagation();
530
- onChangeFieldAlias((v === null || v === void 0 ? void 0 : v.fieldAlias) || '', i);
531
- }
532
- })
533
- })
534
- }), "".concat(v.quotes, " ").concat(v.fieldAlias ? "as ".concat(v.fieldAlias) : ''), _jsx("span", {
535
- style: {
536
- fontSize: 0
537
- },
514
+ children: _jsx(RightClickValue, {
515
+ value: v,
516
+ children: _jsxs("div", {
517
+ className: "Sqb-TableName green-name",
538
518
  onClick: function onClick(e) {
539
- return handleDel(e, i);
519
+ return handleUpdate(e, i);
540
520
  },
541
- children: _jsx(CloseIcon, {})
542
- })]
521
+ children: [v.quotes && _jsx(_Fragment, {
522
+ children: store.groupByEnableAlias && _jsx(Tooltip, {
523
+ title: !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias) ? __('SqlQueryBuilder.aliasForRules') : __('SqlQueryBuilder.alias'),
524
+ children: _jsx(Button, {
525
+ className: cx(':Sqb-TableName-as :Sqb-TableName green-name', _defineProperty({}, 'isError', !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias))),
526
+ shape: 'circle',
527
+ iconOnly: true,
528
+ primary: true,
529
+ icon: 'As',
530
+ size: 'small',
531
+ onClick: function onClick(e) {
532
+ e.stopPropagation();
533
+ onChangeFieldAlias((v === null || v === void 0 ? void 0 : v.fieldAlias) || '', i);
534
+ }
535
+ })
536
+ })
537
+ }), "".concat(v.quotes, " ").concat(v.fieldAlias ? "as ".concat(v.fieldAlias) : ''), _jsx("span", {
538
+ style: {
539
+ fontSize: 0
540
+ },
541
+ onClick: function onClick(e) {
542
+ return handleDel(e, i);
543
+ },
544
+ children: _jsx(CloseIcon, {})
545
+ })]
546
+ })
543
547
  })
544
548
  }, i);
545
549
  }), _jsx("div", {
@@ -1,8 +1,9 @@
1
+ import React from 'react';
1
2
  import { MetaSummarize } from '../../../store/types';
2
3
  interface PropsType {
3
4
  store?: any;
4
5
  meta: MetaSummarize;
5
6
  groupIndex: number;
6
7
  }
7
- declare const Summarize: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
8
+ declare const Summarize: (props: PropsType) => React.JSX.Element;
8
9
  export default Summarize;
@@ -1,8 +1,9 @@
1
+ import React from 'react';
1
2
  import { MetaSummarize } from '../../../store/types';
2
3
  interface PropsType {
3
4
  store?: any;
4
5
  meta: MetaSummarize;
5
6
  groupIndex: number;
6
7
  }
7
- declare const SelectIndex: (props: PropsType) => import("react/jsx-runtime").JSX.Element;
8
+ declare const SelectIndex: (props: PropsType) => React.JSX.Element;
8
9
  export default SelectIndex;
@@ -15,6 +15,7 @@ import { uuidv4 } from '../../../utils/helper';
15
15
  import { MetaSummarize_Enum, AtomsTypeEnum, ChangeType } from '../../../store/types';
16
16
  import { changeFieldAlias, isExistsError, isValidSQLAlias } from '../../../utils';
17
17
  import ItemName from '../components/item-name';
18
+ import RightClickValue from '../../right-click-value';
18
19
  import { AddIcon, CloseIcon } from '../../icons';
19
20
  import { SelectSummarize } from '../../dialog';
20
21
  import { useStore } from '../../../hooks/use-provider';
@@ -412,36 +413,39 @@ var SelectIndex = function SelectIndex(props) {
412
413
  children: [meta.group.map(function (v, i) {
413
414
  return _jsx(ItemName, {
414
415
  isError: isExistsError([getErrorCheckField(v)], store.existsError),
415
- children: _jsxs("div", {
416
- className: "Sqb-TableName green-name",
417
- onClick: function onClick(e) {
418
- return handleUpdate(e, i);
419
- },
420
- children: [v.quotes && _jsx(_Fragment, {
421
- children: store.groupByEnableAlias && _jsx(Tooltip, {
422
- title: !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias) ? __('SqlQueryBuilder.aliasForRules') : __('SqlQueryBuilder.alias'),
423
- children: _jsx(Button, {
424
- className: cx(':Sqb-TableName-as :Sqb-TableName green-name', _defineProperty({}, 'isError', !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias))),
425
- shape: 'circle',
426
- iconOnly: true,
427
- primary: true,
428
- icon: 'As',
429
- size: 'small',
430
- onClick: function onClick(e) {
431
- e.stopPropagation();
432
- onChangeFieldAlias((v === null || v === void 0 ? void 0 : v.fieldAlias) || '', i);
433
- }
434
- })
435
- })
436
- }), "".concat(v.quotes, " ").concat(v.fieldAlias ? "as ".concat(v.fieldAlias) : ''), _jsx("span", {
437
- style: {
438
- fontSize: 0
439
- },
416
+ children: _jsx(RightClickValue, {
417
+ value: v,
418
+ children: _jsxs("div", {
419
+ className: "Sqb-TableName green-name",
440
420
  onClick: function onClick(e) {
441
- return handleDel(e, i);
421
+ return handleUpdate(e, i);
442
422
  },
443
- children: _jsx(CloseIcon, {})
444
- })]
423
+ children: [v.quotes && _jsx(_Fragment, {
424
+ children: store.groupByEnableAlias && _jsx(Tooltip, {
425
+ title: !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias) ? __('SqlQueryBuilder.aliasForRules') : __('SqlQueryBuilder.alias'),
426
+ children: _jsx(Button, {
427
+ className: cx(':Sqb-TableName-as :Sqb-TableName green-name', _defineProperty({}, 'isError', !isValidSQLAlias(v === null || v === void 0 ? void 0 : v.fieldAlias))),
428
+ shape: 'circle',
429
+ iconOnly: true,
430
+ primary: true,
431
+ icon: 'As',
432
+ size: 'small',
433
+ onClick: function onClick(e) {
434
+ e.stopPropagation();
435
+ onChangeFieldAlias((v === null || v === void 0 ? void 0 : v.fieldAlias) || '', i);
436
+ }
437
+ })
438
+ })
439
+ }), "".concat(v.quotes, " ").concat(v.fieldAlias ? "as ".concat(v.fieldAlias) : ''), _jsx("span", {
440
+ style: {
441
+ fontSize: 0
442
+ },
443
+ onClick: function onClick(e) {
444
+ return handleDel(e, i);
445
+ },
446
+ children: _jsx(CloseIcon, {})
447
+ })]
448
+ })
445
449
  })
446
450
  }, i);
447
451
  }), _jsx("div", {