@gingkoo/pandora-metabase 1.0.82 → 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 +137 -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 +44 -4
- package/lib/cjs/index.js +5 -2
- package/lib/cjs/locale/en.js +5 -3
- package/lib/cjs/locale/zh.js +5 -3
- package/lib/cjs/types.d.ts +1 -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 +137 -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 +44 -4
- package/lib/es/index.js +5 -2
- package/lib/es/locale/en.js +5 -3
- package/lib/es/locale/zh.js +5 -3
- package/lib/es/types.d.ts +1 -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
|
@@ -29,6 +29,7 @@ var _itemName = _interopRequireDefault(require("./components/item-name"));
|
|
|
29
29
|
var _Wrapper = _interopRequireDefault(require("./components/Wrapper"));
|
|
30
30
|
var _metaIcon = _interopRequireDefault(require("./components/meta-icon"));
|
|
31
31
|
var _header = _interopRequireDefault(require("./components/header"));
|
|
32
|
+
var _itemWrapper = _interopRequireDefault(require("./components/item-wrapper"));
|
|
32
33
|
var _selectList = _interopRequireDefault(require("../dialog/select-list"));
|
|
33
34
|
var _icons = require("../icons");
|
|
34
35
|
var _dialog = require("../dialog");
|
|
@@ -1459,451 +1460,456 @@ var JoinData = function JoinData(props) {
|
|
|
1459
1460
|
className: (0, _classnames["default"])("Sqb-hover-parent"),
|
|
1460
1461
|
children: [(0, _jsxRuntime.jsx)(_header["default"], {
|
|
1461
1462
|
meta: meta,
|
|
1463
|
+
groupIndex: groupIndex,
|
|
1462
1464
|
title: (0, _locale.__)('SqlQueryBuilder.joinData'),
|
|
1463
1465
|
onClose: function onClose() {
|
|
1464
1466
|
return store.delMeta(meta, groupIndex);
|
|
1465
1467
|
}
|
|
1466
|
-
}), (0, _jsxRuntime.jsx)("
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1468
|
+
}), (0, _jsxRuntime.jsx)(_itemWrapper["default"], {
|
|
1469
|
+
meta: meta,
|
|
1470
|
+
groupIndex: groupIndex,
|
|
1471
|
+
children: (0, _jsxRuntime.jsx)("div", {
|
|
1472
|
+
className: (0, _classnames["default"])("Sqb-item--content"),
|
|
1473
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
1474
|
+
className: (0, _classnames["default"])("Sqb-NotebookCell"),
|
|
1475
|
+
children: [(0, _jsxRuntime.jsx)(_itemName["default"], {
|
|
1476
|
+
isError: leftTableIsError(),
|
|
1477
|
+
children: (0, _jsxRuntime.jsx)("div", {
|
|
1478
|
+
className: (0, _classnames["default"])("Sqb-TableName", {
|
|
1479
|
+
notSelected: !table1Selected
|
|
1480
|
+
}),
|
|
1481
|
+
onClick: selectLeftTable,
|
|
1482
|
+
children: getTable1Name() || (0, _locale.__)('SqlQueryBuilder.pickTable')
|
|
1483
|
+
})
|
|
1484
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
1485
|
+
onClick: selectJoin,
|
|
1486
|
+
children: meta.joinType === _enum.JoinEnum.left ? (0, _jsxRuntime.jsx)(_icons.LeftJoinIcon, {
|
|
1487
|
+
style: {
|
|
1488
|
+
marginRight: '0.5rem',
|
|
1489
|
+
cursor: 'pointer'
|
|
1490
|
+
}
|
|
1491
|
+
}) : meta.joinType === _enum.JoinEnum.right ? (0, _jsxRuntime.jsx)(_icons.LeftJoinIcon, {
|
|
1492
|
+
style: {
|
|
1493
|
+
transform: 'rotate(-180deg)',
|
|
1494
|
+
marginRight: '0.5rem',
|
|
1495
|
+
cursor: 'pointer'
|
|
1496
|
+
}
|
|
1497
|
+
}) : (0, _jsxRuntime.jsx)(_icons.InnerJoinIcon, {
|
|
1498
|
+
style: {
|
|
1499
|
+
marginRight: '0.5rem',
|
|
1500
|
+
cursor: 'pointer'
|
|
1501
|
+
}
|
|
1502
|
+
})
|
|
1503
|
+
}), meta.isSubquery ? (0, _jsxRuntime.jsxs)("div", {
|
|
1473
1504
|
className: (0, _classnames["default"])("Sqb-TableName", {
|
|
1474
|
-
notSelected: !
|
|
1505
|
+
notSelected: !subQuerySelected
|
|
1475
1506
|
}),
|
|
1476
|
-
onClick:
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
var showButton = store.tableEnableAlias || tableIsError() && isDel;
|
|
1508
|
-
var icon = isDel ? (0, _jsxRuntime.jsx)(_pandoraIcons.ExclamationCircleFill, {}) : store.tableEnableAlias ? 'As' : '';
|
|
1509
|
-
return showButton ? (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1510
|
-
title: (0, _locale.__)(tableIsError() ? isDel ? 'metabase.verify' : 'SqlQueryBuilder.repeatAlias' : 'SqlQueryBuilder.alias'),
|
|
1511
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1512
|
-
danger: tableIsError(),
|
|
1513
|
-
className: (0, _classnames["default"])(':Sqb-TableName-as', {
|
|
1514
|
-
isError: tableIsError()
|
|
1515
|
-
}),
|
|
1516
|
-
shape: 'circle',
|
|
1517
|
-
style: isDel ? {
|
|
1518
|
-
fontSize: 18,
|
|
1519
|
-
backgroundColor: '#fff',
|
|
1520
|
-
width: 'auto',
|
|
1521
|
-
height: 'auto'
|
|
1522
|
-
} : {},
|
|
1523
|
-
iconOnly: true,
|
|
1524
|
-
primary: !isDel,
|
|
1525
|
-
icon: icon,
|
|
1526
|
-
size: 'small',
|
|
1527
|
-
onClick: function onClick(e) {
|
|
1528
|
-
if (store.tableEnableAlias) {
|
|
1529
|
-
var _meta$table4;
|
|
1530
|
-
e.stopPropagation();
|
|
1531
|
-
onChangeTableAlias(((_meta$table4 = meta.table2) === null || _meta$table4 === void 0 ? void 0 : _meta$table4.alias) || '');
|
|
1507
|
+
onClick: function onClick() {
|
|
1508
|
+
showSubQuery(meta.subquery);
|
|
1509
|
+
},
|
|
1510
|
+
children: [subQuerySelected && (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
1511
|
+
children: function () {
|
|
1512
|
+
var showButton = store.tableEnableAlias || tableIsError() && isDel;
|
|
1513
|
+
var icon = isDel ? (0, _jsxRuntime.jsx)(_pandoraIcons.ExclamationCircleFill, {}) : store.tableEnableAlias ? 'As' : '';
|
|
1514
|
+
return showButton ? (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1515
|
+
title: (0, _locale.__)(tableIsError() ? isDel ? 'metabase.verify' : 'SqlQueryBuilder.repeatAlias' : 'SqlQueryBuilder.alias'),
|
|
1516
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1517
|
+
danger: tableIsError(),
|
|
1518
|
+
className: (0, _classnames["default"])(':Sqb-TableName-as', {
|
|
1519
|
+
isError: tableIsError()
|
|
1520
|
+
}),
|
|
1521
|
+
shape: 'circle',
|
|
1522
|
+
style: isDel ? {
|
|
1523
|
+
fontSize: 18,
|
|
1524
|
+
backgroundColor: '#fff',
|
|
1525
|
+
width: 'auto',
|
|
1526
|
+
height: 'auto'
|
|
1527
|
+
} : {},
|
|
1528
|
+
iconOnly: true,
|
|
1529
|
+
primary: !isDel,
|
|
1530
|
+
icon: icon,
|
|
1531
|
+
size: 'small',
|
|
1532
|
+
onClick: function onClick(e) {
|
|
1533
|
+
if (store.tableEnableAlias) {
|
|
1534
|
+
var _meta$table4;
|
|
1535
|
+
e.stopPropagation();
|
|
1536
|
+
onChangeTableAlias(((_meta$table4 = meta.table2) === null || _meta$table4 === void 0 ? void 0 : _meta$table4.alias) || '');
|
|
1537
|
+
}
|
|
1532
1538
|
}
|
|
1533
|
-
}
|
|
1534
|
-
})
|
|
1535
|
-
})
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1539
|
+
})
|
|
1540
|
+
}) : null;
|
|
1541
|
+
}()
|
|
1542
|
+
})
|
|
1543
|
+
// <Tooltip
|
|
1544
|
+
// title={__(
|
|
1545
|
+
// tableIsError()
|
|
1546
|
+
// ? isDel
|
|
1547
|
+
// ? 'metabase.verify'
|
|
1548
|
+
// : 'SqlQueryBuilder.repeatAlias'
|
|
1549
|
+
// : 'SqlQueryBuilder.alias',
|
|
1550
|
+
// )}
|
|
1551
|
+
// >
|
|
1552
|
+
// <Button
|
|
1553
|
+
// danger={tableIsError()}
|
|
1554
|
+
// className={cx(':Sqb-TableName-as', {
|
|
1555
|
+
// isError: tableIsError(),
|
|
1556
|
+
// })}
|
|
1557
|
+
// shape='circle'
|
|
1558
|
+
// style={
|
|
1559
|
+
// isDel
|
|
1560
|
+
// ? {
|
|
1561
|
+
// fontSize: 18,
|
|
1562
|
+
// backgroundColor: '#fff',
|
|
1563
|
+
// width: 'auto',
|
|
1564
|
+
// height: 'auto',
|
|
1565
|
+
// }
|
|
1566
|
+
// : {}
|
|
1567
|
+
// }
|
|
1568
|
+
// iconOnly
|
|
1569
|
+
// primary={!isDel}
|
|
1570
|
+
// icon={isDel ? <ExclamationCircleFill /> : 'As'}
|
|
1571
|
+
// size='small'
|
|
1572
|
+
// onClick={(e) => {
|
|
1573
|
+
// e.stopPropagation();
|
|
1574
|
+
// onChangeTableAlias(meta.table2?.alias || '');
|
|
1575
|
+
// }}
|
|
1576
|
+
// ></Button>
|
|
1577
|
+
// </Tooltip>
|
|
1578
|
+
, 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$table5 = meta.table2) !== null && _meta$table5 !== void 0 && _meta$table5.alias && store.tableEnableAlias ? "as ".concat((_meta$table6 = meta.table2) === null || _meta$table6 === void 0 ? void 0 : _meta$table6.alias) : '', " ") : (0, _locale.__)('SqlQueryBuilder.setSubQuery')]
|
|
1579
|
+
}) : (0, _jsxRuntime.jsxs)("div", {
|
|
1580
|
+
className: (0, _classnames["default"])("Sqb-TableName", {
|
|
1581
|
+
notSelected: !table2Selected
|
|
1582
|
+
}),
|
|
1583
|
+
onClick: selectTable,
|
|
1584
|
+
children: [table2Selected && (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
1585
|
+
children: function () {
|
|
1586
|
+
var showButton = store.tableEnableAlias || tableIsError() && isDel;
|
|
1587
|
+
var icon = isDel ? (0, _jsxRuntime.jsx)(_pandoraIcons.ExclamationCircleFill, {}) : store.tableEnableAlias ? 'As' : '';
|
|
1588
|
+
return showButton ? (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1589
|
+
title: (0, _locale.__)(tableIsError() ? isDel ? 'metabase.verify' : 'SqlQueryBuilder.repeatAlias' : 'SqlQueryBuilder.alias'),
|
|
1590
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1591
|
+
danger: tableIsError(),
|
|
1592
|
+
className: (0, _classnames["default"])(':Sqb-TableName-as', {
|
|
1593
|
+
isError: tableIsError()
|
|
1594
|
+
}),
|
|
1595
|
+
shape: 'circle',
|
|
1596
|
+
style: isDel ? {
|
|
1597
|
+
fontSize: 18,
|
|
1598
|
+
backgroundColor: '#fff',
|
|
1599
|
+
width: 'auto',
|
|
1600
|
+
height: 'auto'
|
|
1601
|
+
} : {},
|
|
1602
|
+
iconOnly: true,
|
|
1603
|
+
primary: !isDel,
|
|
1604
|
+
icon: icon,
|
|
1605
|
+
size: 'small',
|
|
1606
|
+
onClick: function onClick(e) {
|
|
1607
|
+
if (store.tableEnableAlias) {
|
|
1608
|
+
var _meta$table7;
|
|
1609
|
+
e.stopPropagation();
|
|
1610
|
+
onChangeTableAlias(((_meta$table7 = meta.table2) === null || _meta$table7 === void 0 ? void 0 : _meta$table7.alias) || '');
|
|
1611
|
+
}
|
|
1606
1612
|
}
|
|
1607
|
-
}
|
|
1608
|
-
})
|
|
1609
|
-
})
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
})
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
title: (0, _locale.__)('SqlQueryBuilder.switch'),
|
|
1667
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1668
|
-
disabled: meta.readonly,
|
|
1669
|
-
primary: true,
|
|
1670
|
-
ghost: true,
|
|
1671
|
-
className: 'mr-2 operator-icon',
|
|
1672
|
-
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.Repeat, {}),
|
|
1673
|
-
onClick: function onClick(e) {
|
|
1674
|
-
onChangeType(e, {
|
|
1675
|
-
position: ExpressionsEnum.LEFT,
|
|
1676
|
-
index: i
|
|
1677
|
-
});
|
|
1678
|
-
}
|
|
1679
|
-
})
|
|
1680
|
-
}), (0, _jsxRuntime.jsx)("span", {
|
|
1681
|
-
className: 'mr-2 text-gray-500',
|
|
1682
|
-
children: "="
|
|
1683
|
-
}), renderItem(v.rhs, ExpressionsEnum.RIGHT, i), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1684
|
-
title: (0, _locale.__)('SqlQueryBuilder.switch'),
|
|
1685
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1686
|
-
disabled: meta.readonly,
|
|
1687
|
-
primary: true,
|
|
1688
|
-
ghost: true,
|
|
1689
|
-
className: 'mr-2 operator-icon',
|
|
1690
|
-
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.Repeat, {}),
|
|
1691
|
-
onClick: function onClick(e) {
|
|
1692
|
-
onChangeType(e, {
|
|
1693
|
-
position: ExpressionsEnum.RIGHT,
|
|
1694
|
-
index: i
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
|
-
})
|
|
1698
|
-
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1699
|
-
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1700
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1701
|
-
trigger: ['click'],
|
|
1702
|
-
onChange: function onChange(key) {
|
|
1703
|
-
addExpression(key, i);
|
|
1704
|
-
},
|
|
1705
|
-
droplist: menuTypes,
|
|
1613
|
+
})
|
|
1614
|
+
}) : null;
|
|
1615
|
+
}()
|
|
1616
|
+
})
|
|
1617
|
+
// <Tooltip
|
|
1618
|
+
// title={__(
|
|
1619
|
+
// tableIsError()
|
|
1620
|
+
// ? isDel
|
|
1621
|
+
// ? 'metabase.verify'
|
|
1622
|
+
// : 'SqlQueryBuilder.repeatAlias'
|
|
1623
|
+
// : 'SqlQueryBuilder.alias',
|
|
1624
|
+
// )}
|
|
1625
|
+
// >
|
|
1626
|
+
// <Button
|
|
1627
|
+
// danger={tableIsError()}
|
|
1628
|
+
// className={cx(':Sqb-TableName-as', {
|
|
1629
|
+
// isError: tableIsError(),
|
|
1630
|
+
// })}
|
|
1631
|
+
// shape='circle'
|
|
1632
|
+
// style={
|
|
1633
|
+
// isDel
|
|
1634
|
+
// ? {
|
|
1635
|
+
// fontSize: 18,
|
|
1636
|
+
// backgroundColor: '#fff',
|
|
1637
|
+
// width: 'auto',
|
|
1638
|
+
// height: 'auto',
|
|
1639
|
+
// }
|
|
1640
|
+
// : {}
|
|
1641
|
+
// }
|
|
1642
|
+
// iconOnly
|
|
1643
|
+
// primary={!isDel}
|
|
1644
|
+
// icon={isDel ? <ExclamationCircleFill /> : 'As'}
|
|
1645
|
+
// size='small'
|
|
1646
|
+
// onClick={(e) => {
|
|
1647
|
+
// e.stopPropagation();
|
|
1648
|
+
// onChangeTableAlias(meta.table2?.alias || '');
|
|
1649
|
+
// }}
|
|
1650
|
+
// ></Button>
|
|
1651
|
+
// </Tooltip>
|
|
1652
|
+
, table2Selected ? "".concat(meta.table2.datasourceName, ".").concat(meta.table2.name, " ").concat((_meta$table8 = meta.table2) !== null && _meta$table8 !== void 0 && _meta$table8.alias && store.tableEnableAlias ? "as ".concat((_meta$table9 = meta.table2) === null || _meta$table9 === void 0 ? void 0 : _meta$table9.alias) : '') : (0, _locale.__)('SqlQueryBuilder.pickTable')]
|
|
1653
|
+
}), store.showSubquery && (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1654
|
+
title: (0, _locale.__)('SqlQueryBuilder.switchSubQuery'),
|
|
1655
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1656
|
+
disabled: meta.readonly,
|
|
1657
|
+
primary: meta.isSubquery,
|
|
1658
|
+
ghost: true,
|
|
1659
|
+
className: (0, _classnames["default"])('mr-2 operator-icon', (0, _defineProperty2["default"])({}, 'subquery-icon', !meta.isSubquery)),
|
|
1660
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.RelatedWork, {}),
|
|
1661
|
+
onClick: switchSubQuery
|
|
1662
|
+
})
|
|
1663
|
+
}), ((_meta$table0 = meta.table2) === null || _meta$table0 === void 0 ? void 0 : _meta$table0.name) && ((_meta$table1 = meta.table1) === null || _meta$table1 === void 0 ? void 0 : _meta$table1.name) && ((_meta$expressions = meta.expressions) === null || _meta$expressions === void 0 ? void 0 : _meta$expressions.map(function (v, i) {
|
|
1664
|
+
if (v.type === _types.AtomsTypeEnum.JOIN_DEFAULT) {
|
|
1665
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
1666
|
+
className: (0, _classnames["default"])("Sqb-where block"),
|
|
1667
|
+
children: [i == 0 && (0, _jsxRuntime.jsx)("span", {
|
|
1668
|
+
className: 'ml-2 mr-4 text-gray-500',
|
|
1669
|
+
children: "on"
|
|
1670
|
+
}), renderItem(v.lhs, ExpressionsEnum.LEFT, i), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1671
|
+
title: (0, _locale.__)('SqlQueryBuilder.switch'),
|
|
1706
1672
|
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1707
1673
|
disabled: meta.readonly,
|
|
1708
1674
|
primary: true,
|
|
1709
1675
|
ghost: true,
|
|
1710
1676
|
className: 'mr-2 operator-icon',
|
|
1711
|
-
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.
|
|
1677
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.Repeat, {}),
|
|
1678
|
+
onClick: function onClick(e) {
|
|
1679
|
+
onChangeType(e, {
|
|
1680
|
+
position: ExpressionsEnum.LEFT,
|
|
1681
|
+
index: i
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1712
1684
|
})
|
|
1713
|
-
})
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
danger: true,
|
|
1719
|
-
className: 'mr-2 operator-icon',
|
|
1720
|
-
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfLine, {}),
|
|
1721
|
-
onClick: function onClick() {
|
|
1722
|
-
var index = (0, _utils.findIndex)(store.metaList[groupIndex].list, meta);
|
|
1723
|
-
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1724
|
-
newMeta[index].expressions.splice(i, 1);
|
|
1725
|
-
store.setMeta(newMeta, groupIndex);
|
|
1726
|
-
}
|
|
1727
|
-
})
|
|
1728
|
-
})]
|
|
1729
|
-
}, i);
|
|
1730
|
-
}
|
|
1731
|
-
if (v.type === _types.AtomsTypeEnum.OPERATOR) {
|
|
1732
|
-
return (0, _jsxRuntime.jsxs)("div", {
|
|
1733
|
-
className: (0, _classnames["default"])("Sqb-where block"),
|
|
1734
|
-
children: [i == 0 && (0, _jsxRuntime.jsx)("span", {
|
|
1735
|
-
className: 'ml-2 mr-4 text-gray-500',
|
|
1736
|
-
children: "on"
|
|
1737
|
-
}), (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1738
|
-
trigger: ['click'],
|
|
1739
|
-
onChange: function onChange(key) {
|
|
1740
|
-
changeOperator(key, i);
|
|
1741
|
-
},
|
|
1742
|
-
droplist: menuOperator,
|
|
1743
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1744
|
-
className: 'ml-2 mr-4 text-gray-500',
|
|
1745
|
-
type: 'link',
|
|
1746
|
-
children: v.val
|
|
1747
|
-
})
|
|
1748
|
-
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1749
|
-
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1750
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1751
|
-
trigger: ['click'],
|
|
1752
|
-
onChange: function onChange(key) {
|
|
1753
|
-
addExpression(key, i);
|
|
1754
|
-
},
|
|
1755
|
-
droplist: menuTypes,
|
|
1685
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
1686
|
+
className: 'mr-2 text-gray-500',
|
|
1687
|
+
children: "="
|
|
1688
|
+
}), renderItem(v.rhs, ExpressionsEnum.RIGHT, i), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1689
|
+
title: (0, _locale.__)('SqlQueryBuilder.switch'),
|
|
1756
1690
|
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1757
1691
|
disabled: meta.readonly,
|
|
1758
1692
|
primary: true,
|
|
1759
1693
|
ghost: true,
|
|
1760
1694
|
className: 'mr-2 operator-icon',
|
|
1761
|
-
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.
|
|
1695
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.Repeat, {}),
|
|
1696
|
+
onClick: function onClick(e) {
|
|
1697
|
+
onChangeType(e, {
|
|
1698
|
+
position: ExpressionsEnum.RIGHT,
|
|
1699
|
+
index: i
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1762
1702
|
})
|
|
1763
|
-
})
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
if (v.type === _types.AtomsTypeEnum.EXPRESSION) {
|
|
1782
|
-
return (0, _jsxRuntime.jsxs)("div", {
|
|
1783
|
-
className: (0, _classnames["default"])("Sqb-where block"),
|
|
1784
|
-
children: [i == 0 && (0, _jsxRuntime.jsx)("span", {
|
|
1785
|
-
className: 'ml-2 mr-4 text-gray-500',
|
|
1786
|
-
children: "on"
|
|
1787
|
-
}), (0, _jsxRuntime.jsx)(_itemName["default"], {
|
|
1788
|
-
isError: (0, _utils.isError)(v, getTableColumns()),
|
|
1789
|
-
children: (0, _jsxRuntime.jsx)("div", {
|
|
1790
|
-
className: (0, _classnames["default"])("Sqb-TableName purple-name", {
|
|
1791
|
-
notSelected: !v.quotes
|
|
1792
|
-
}),
|
|
1793
|
-
onClick: function onClick(e) {
|
|
1794
|
-
return changeExpression(e, i);
|
|
1795
|
-
},
|
|
1796
|
-
children: v.quotes || (0, _locale.__)('joinData.selectExpression')
|
|
1797
|
-
}, i)
|
|
1798
|
-
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1799
|
-
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1800
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1801
|
-
trigger: ['click'],
|
|
1802
|
-
onChange: function onChange(key) {
|
|
1803
|
-
addExpression(key, i);
|
|
1804
|
-
},
|
|
1805
|
-
droplist: menuTypes,
|
|
1703
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1704
|
+
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1705
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1706
|
+
trigger: ['click'],
|
|
1707
|
+
onChange: function onChange(key) {
|
|
1708
|
+
addExpression(key, i);
|
|
1709
|
+
},
|
|
1710
|
+
droplist: menuTypes,
|
|
1711
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1712
|
+
disabled: meta.readonly,
|
|
1713
|
+
primary: true,
|
|
1714
|
+
ghost: true,
|
|
1715
|
+
className: 'mr-2 operator-icon',
|
|
1716
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfPlus, {})
|
|
1717
|
+
})
|
|
1718
|
+
})
|
|
1719
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1720
|
+
title: (0, _locale.__)('SqlQueryBuilder.del'),
|
|
1806
1721
|
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1807
1722
|
disabled: meta.readonly,
|
|
1808
|
-
|
|
1809
|
-
ghost: true,
|
|
1723
|
+
danger: true,
|
|
1810
1724
|
className: 'mr-2 operator-icon',
|
|
1811
|
-
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.
|
|
1725
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfLine, {}),
|
|
1726
|
+
onClick: function onClick() {
|
|
1727
|
+
var index = (0, _utils.findIndex)(store.metaList[groupIndex].list, meta);
|
|
1728
|
+
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1729
|
+
newMeta[index].expressions.splice(i, 1);
|
|
1730
|
+
store.setMeta(newMeta, groupIndex);
|
|
1731
|
+
}
|
|
1812
1732
|
})
|
|
1813
|
-
})
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1824
|
-
newMeta[index].expressions.splice(i, 1);
|
|
1825
|
-
store.setMeta(newMeta, groupIndex);
|
|
1826
|
-
}
|
|
1827
|
-
})
|
|
1828
|
-
})]
|
|
1829
|
-
}, i);
|
|
1830
|
-
}
|
|
1831
|
-
if (v.type === _types.AtomsTypeEnum.COLLECTION) {
|
|
1832
|
-
return (0, _jsxRuntime.jsxs)("div", {
|
|
1833
|
-
className: (0, _classnames["default"])(" Sqb-collection-box"),
|
|
1834
|
-
children: [i == 0 && (0, _jsxRuntime.jsx)("span", {
|
|
1835
|
-
className: 'ml-2 mr-4 text-gray-500',
|
|
1836
|
-
children: "on"
|
|
1837
|
-
}), (0, _jsxRuntime.jsx)(_dialog.FormulaList, {
|
|
1838
|
-
_type: _types.FormulaTypeEnum.JOIN_DATA,
|
|
1839
|
-
// showPreview={false}
|
|
1840
|
-
// check={formulaList?.[fun.name]?.args?.[i]?.check || ''}
|
|
1841
|
-
value: v.list,
|
|
1842
|
-
data: getCollectionTableColumns(),
|
|
1843
|
-
// ref={ref}
|
|
1844
|
-
onChange: function onChange(data, _quotes) {
|
|
1845
|
-
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1846
|
-
newMeta[index].expressions[i].list = data;
|
|
1847
|
-
newMeta[index].expressions[i].quotes = _quotes;
|
|
1848
|
-
store.setMeta(newMeta, groupIndex, {
|
|
1849
|
-
obj: newMeta[index].expressions,
|
|
1850
|
-
type: _types.ChangeType.expressions
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1854
|
-
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1855
|
-
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1733
|
+
})]
|
|
1734
|
+
}, i);
|
|
1735
|
+
}
|
|
1736
|
+
if (v.type === _types.AtomsTypeEnum.OPERATOR) {
|
|
1737
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
1738
|
+
className: (0, _classnames["default"])("Sqb-where block"),
|
|
1739
|
+
children: [i == 0 && (0, _jsxRuntime.jsx)("span", {
|
|
1740
|
+
className: 'ml-2 mr-4 text-gray-500',
|
|
1741
|
+
children: "on"
|
|
1742
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1856
1743
|
trigger: ['click'],
|
|
1857
1744
|
onChange: function onChange(key) {
|
|
1858
|
-
|
|
1745
|
+
changeOperator(key, i);
|
|
1859
1746
|
},
|
|
1860
|
-
droplist:
|
|
1747
|
+
droplist: menuOperator,
|
|
1748
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1749
|
+
className: 'ml-2 mr-4 text-gray-500',
|
|
1750
|
+
type: 'link',
|
|
1751
|
+
children: v.val
|
|
1752
|
+
})
|
|
1753
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1754
|
+
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1755
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1756
|
+
trigger: ['click'],
|
|
1757
|
+
onChange: function onChange(key) {
|
|
1758
|
+
addExpression(key, i);
|
|
1759
|
+
},
|
|
1760
|
+
droplist: menuTypes,
|
|
1761
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1762
|
+
disabled: meta.readonly,
|
|
1763
|
+
primary: true,
|
|
1764
|
+
ghost: true,
|
|
1765
|
+
className: 'mr-2 operator-icon',
|
|
1766
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfPlus, {})
|
|
1767
|
+
})
|
|
1768
|
+
})
|
|
1769
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1770
|
+
title: (0, _locale.__)('SqlQueryBuilder.del'),
|
|
1861
1771
|
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1862
1772
|
disabled: meta.readonly,
|
|
1863
|
-
|
|
1864
|
-
ghost: true,
|
|
1773
|
+
danger: true,
|
|
1865
1774
|
className: 'mr-2 operator-icon',
|
|
1866
|
-
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.
|
|
1775
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfLine, {}),
|
|
1776
|
+
onClick: function onClick() {
|
|
1777
|
+
var index = (0, _utils.findIndex)(store.metaList[groupIndex].list, meta);
|
|
1778
|
+
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1779
|
+
newMeta[index].expressions.splice(i, 1);
|
|
1780
|
+
store.setMeta(newMeta, groupIndex);
|
|
1781
|
+
}
|
|
1867
1782
|
})
|
|
1868
|
-
})
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1783
|
+
})]
|
|
1784
|
+
}, i);
|
|
1785
|
+
}
|
|
1786
|
+
if (v.type === _types.AtomsTypeEnum.EXPRESSION) {
|
|
1787
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
1788
|
+
className: (0, _classnames["default"])("Sqb-where block"),
|
|
1789
|
+
children: [i == 0 && (0, _jsxRuntime.jsx)("span", {
|
|
1790
|
+
className: 'ml-2 mr-4 text-gray-500',
|
|
1791
|
+
children: "on"
|
|
1792
|
+
}), (0, _jsxRuntime.jsx)(_itemName["default"], {
|
|
1793
|
+
isError: (0, _utils.isError)(v, getTableColumns()),
|
|
1794
|
+
children: (0, _jsxRuntime.jsx)("div", {
|
|
1795
|
+
className: (0, _classnames["default"])("Sqb-TableName purple-name", {
|
|
1796
|
+
notSelected: !v.quotes
|
|
1797
|
+
}),
|
|
1798
|
+
onClick: function onClick(e) {
|
|
1799
|
+
return changeExpression(e, i);
|
|
1800
|
+
},
|
|
1801
|
+
children: v.quotes || (0, _locale.__)('joinData.selectExpression')
|
|
1802
|
+
}, i)
|
|
1803
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1804
|
+
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1805
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1806
|
+
trigger: ['click'],
|
|
1807
|
+
onChange: function onChange(key) {
|
|
1808
|
+
addExpression(key, i);
|
|
1809
|
+
},
|
|
1810
|
+
droplist: menuTypes,
|
|
1811
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1812
|
+
disabled: meta.readonly,
|
|
1813
|
+
primary: true,
|
|
1814
|
+
ghost: true,
|
|
1815
|
+
className: 'mr-2 operator-icon',
|
|
1816
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfPlus, {})
|
|
1817
|
+
})
|
|
1818
|
+
})
|
|
1819
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1820
|
+
title: (0, _locale.__)('SqlQueryBuilder.del'),
|
|
1821
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1822
|
+
disabled: meta.readonly,
|
|
1823
|
+
danger: true,
|
|
1824
|
+
className: 'mr-2 operator-icon',
|
|
1825
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfLine, {}),
|
|
1826
|
+
onClick: function onClick() {
|
|
1827
|
+
var index = (0, _utils.findIndex)(store.metaList[groupIndex].list, meta);
|
|
1828
|
+
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1829
|
+
newMeta[index].expressions.splice(i, 1);
|
|
1830
|
+
store.setMeta(newMeta, groupIndex);
|
|
1831
|
+
}
|
|
1832
|
+
})
|
|
1833
|
+
})]
|
|
1834
|
+
}, i);
|
|
1835
|
+
}
|
|
1836
|
+
if (v.type === _types.AtomsTypeEnum.COLLECTION) {
|
|
1837
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
1838
|
+
className: (0, _classnames["default"])(" Sqb-collection-box"),
|
|
1839
|
+
children: [i == 0 && (0, _jsxRuntime.jsx)("span", {
|
|
1840
|
+
className: 'ml-2 mr-4 text-gray-500',
|
|
1841
|
+
children: "on"
|
|
1842
|
+
}), (0, _jsxRuntime.jsx)(_dialog.FormulaList, {
|
|
1843
|
+
_type: _types.FormulaTypeEnum.JOIN_DATA,
|
|
1844
|
+
// showPreview={false}
|
|
1845
|
+
// check={formulaList?.[fun.name]?.args?.[i]?.check || ''}
|
|
1846
|
+
value: v.list,
|
|
1847
|
+
data: getCollectionTableColumns(),
|
|
1848
|
+
// ref={ref}
|
|
1849
|
+
onChange: function onChange(data, _quotes) {
|
|
1878
1850
|
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1879
|
-
newMeta[index].expressions.
|
|
1880
|
-
|
|
1851
|
+
newMeta[index].expressions[i].list = data;
|
|
1852
|
+
newMeta[index].expressions[i].quotes = _quotes;
|
|
1853
|
+
store.setMeta(newMeta, groupIndex, {
|
|
1854
|
+
obj: newMeta[index].expressions,
|
|
1855
|
+
type: _types.ChangeType.expressions
|
|
1856
|
+
});
|
|
1881
1857
|
}
|
|
1882
|
-
})
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1858
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1859
|
+
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1860
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1861
|
+
trigger: ['click'],
|
|
1862
|
+
onChange: function onChange(key) {
|
|
1863
|
+
addExpression(key, i);
|
|
1864
|
+
},
|
|
1865
|
+
droplist: menuTypes,
|
|
1866
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1867
|
+
disabled: meta.readonly,
|
|
1868
|
+
primary: true,
|
|
1869
|
+
ghost: true,
|
|
1870
|
+
className: 'mr-2 operator-icon',
|
|
1871
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfPlus, {})
|
|
1872
|
+
})
|
|
1873
|
+
})
|
|
1874
|
+
}), (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1875
|
+
title: (0, _locale.__)('SqlQueryBuilder.del'),
|
|
1876
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1877
|
+
disabled: meta.readonly,
|
|
1878
|
+
danger: true,
|
|
1879
|
+
className: 'mr-2 operator-icon',
|
|
1880
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfLine, {}),
|
|
1881
|
+
onClick: function onClick() {
|
|
1882
|
+
var index = (0, _utils.findIndex)(store.metaList[groupIndex].list, meta);
|
|
1883
|
+
var newMeta = store.metaList[groupIndex].list.slice();
|
|
1884
|
+
newMeta[index].expressions.splice(i, 1);
|
|
1885
|
+
store.setMeta(newMeta, groupIndex);
|
|
1886
|
+
}
|
|
1887
|
+
})
|
|
1888
|
+
})]
|
|
1889
|
+
}, i);
|
|
1890
|
+
}
|
|
1891
|
+
})), ((_meta$table10 = meta.table2) === null || _meta$table10 === void 0 ? void 0 : _meta$table10.name) && ((_meta$table11 = meta.table1) === null || _meta$table11 === void 0 ? void 0 : _meta$table11.name) && (((_meta$expressions2 = meta.expressions) === null || _meta$expressions2 === void 0 ? void 0 : _meta$expressions2.length) || 0) < 1 && (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
|
|
1892
|
+
title: (0, _locale.__)('SqlQueryBuilder.add'),
|
|
1893
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Dropdown, {
|
|
1894
|
+
trigger: ['click'],
|
|
1895
|
+
onChange: function onChange(key) {
|
|
1896
|
+
addExpression(key);
|
|
1897
|
+
},
|
|
1898
|
+
droplist: menuTypes,
|
|
1899
|
+
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
1900
|
+
disabled: meta.readonly,
|
|
1901
|
+
primary: true,
|
|
1902
|
+
ghost: true,
|
|
1903
|
+
className: 'mr-2 operator-icon',
|
|
1904
|
+
icon: (0, _jsxRuntime.jsx)(_pandoraIcons.FfPlus, {})
|
|
1905
|
+
})
|
|
1900
1906
|
})
|
|
1901
|
-
})
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
})
|
|
1907
|
+
}), columnsSelected && (((_store$showMainColumn = store.showMainColumn[groupIndex]) === null || _store$showMainColumn === void 0 ? void 0 : _store$showMainColumn.showColumn) || ((_store$showMainColumn2 = store.showMainColumn[groupIndex]) === null || _store$showMainColumn2 === void 0 ? void 0 : _store$showMainColumn2.index) < index) && (!store.isExit || store.isSubquery) && store.showFields && (0, _jsxRuntime.jsx)("div", {
|
|
1908
|
+
className: "Sqb-TableColumns",
|
|
1909
|
+
onClick: selectColumns,
|
|
1910
|
+
children: (0, _locale.__)('SqlQueryBuilder.columns')
|
|
1911
|
+
})]
|
|
1912
|
+
})
|
|
1907
1913
|
})
|
|
1908
1914
|
}), (0, _jsxRuntime.jsx)(_metaIcon["default"], {
|
|
1909
1915
|
meta: meta,
|