@gingkoo/pandora-metabase 1.0.35 → 1.0.36

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.
@@ -28,7 +28,7 @@ var _selectList = _interopRequireDefault(require("../../dialog/select-list"));
28
28
  var _arrow = _interopRequireDefault(require("./arrow.svg"));
29
29
  var _useProvider = require("../../../hooks/use-provider");
30
30
  var _itemName = _interopRequireDefault(require("../../modules/components/item-name"));
31
- var _excluded = ["notExistsToolbar", "subShowSubquery", "toolbar"]; // import './index.less';
31
+ var _excluded = ["notExistsToolbar", "toolbar"]; // import './index.less';
32
32
  var FormulaList = (0, _react.forwardRef)(function (props, ref) {
33
33
  var value = props.value,
34
34
  data = props.data,
@@ -145,23 +145,19 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
145
145
  var _caseList$i, _caseList$i2;
146
146
  var _store$preProps = store.preProps,
147
147
  notExistsToolbar = _store$preProps.notExistsToolbar,
148
- _store$preProps$subSh = _store$preProps.subShowSubquery,
149
- subShowSubquery = _store$preProps$subSh === void 0 ? false : _store$preProps$subSh,
150
148
  toolbar = _store$preProps.toolbar,
151
149
  other = (0, _objectWithoutProperties2["default"])(_store$preProps, _excluded);
152
150
  var _value = ((_caseList$i = caseList[i]) === null || _caseList$i === void 0 ? void 0 : _caseList$i.notExists) || [];
153
151
  var oldList = (0, _cloneDeep["default"])(((_caseList$i2 = caseList[i]) === null || _caseList$i2 === void 0 ? void 0 : _caseList$i2.notExists) || []);
154
152
  var _toolbar = notExistsToolbar || toolbar;
155
- _toolbar = _toolbar.filter(function (v) {
156
- return v !== 'group';
157
- }); // 子查询不需要分组
153
+ // _toolbar = _toolbar.filter((v: string) => v !== 'group'); // 子查询不需要分组
158
154
  var o = _pandora.Modal2.openModal({
159
155
  title: caseList[i].type,
160
156
  transparentMask: true,
161
157
  content: (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
162
158
  children: (0, _jsxRuntime.jsx)(_index["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, other), {}, {
163
159
  notExistsColumns: exitData,
164
- showFields: false,
160
+ // showFields={false}
165
161
  // showSubquery={subShowSubquery}
166
162
  toolbar: _toolbar,
167
163
  btnText: (0, _locale.__)('SqlQueryBuilder.confirm'),
@@ -31,7 +31,7 @@ var _selectList = _interopRequireDefault(require("../dialog/select-list"));
31
31
  var _icons = require("../icons");
32
32
  var _dialog = require("../dialog");
33
33
  var _useProvider = require("../../hooks/use-provider");
34
- var _excluded = ["subToolbar", "toolbar"];
34
+ var _excluded = ["subToolbar", "notExistsColumns", "toolbar"];
35
35
  var PrevResult = 'Previous results';
36
36
  var operators = ['AND', 'OR', '(', ')', ',', '+', '-', '*', '/', '!=', '<=', '>=', '<', '>', '='];
37
37
  var FlagLocation;
@@ -898,15 +898,14 @@ var JoinData = function JoinData(props) {
898
898
  var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
899
899
  var _store$preProps2 = store.preProps,
900
900
  subToolbar = _store$preProps2.subToolbar,
901
+ notExistsColumns = _store$preProps2.notExistsColumns,
901
902
  toolbar = _store$preProps2.toolbar,
902
903
  other = (0, _objectWithoutProperties2["default"])(_store$preProps2, _excluded);
903
904
  var newMeta = store.metaList[groupIndex].list.slice();
904
905
  var index = (0, _utils.findIndex)(store.metaList[groupIndex].list, meta);
905
906
  var oldList = (0, _cloneDeep["default"])(newMeta[index].subquery);
906
907
  var _toolbar = subToolbar || toolbar;
907
- _toolbar = _toolbar.filter(function (v) {
908
- return v !== 'group';
909
- }); // 子查询不需要分组
908
+ // _toolbar = _toolbar.filter((v: string) => v !== 'group'); // 子查询不需要分组
910
909
  var o = _pandora.Modal2.openModal({
911
910
  title: (0, _locale.__)('SqlQueryBuilder.subquery'),
912
911
  transparentMask: true,
@@ -25,7 +25,7 @@ var _Wrapper = _interopRequireDefault(require("./components/Wrapper"));
25
25
  var _metaIcon = _interopRequireDefault(require("./components/meta-icon"));
26
26
  var _header = _interopRequireDefault(require("./components/header"));
27
27
  var _useProvider = require("../../hooks/use-provider");
28
- var _excluded = ["subToolbar", "toolbar"];
28
+ var _excluded = ["subToolbar", "notExistsColumns", "toolbar"];
29
29
  var TableData = function TableData(props) {
30
30
  var _meta$subquery, _meta$subquery2, _meta$subquery3, _meta$table3, _meta$table4, _meta$table6, _meta$table7, _store$showMainColumn;
31
31
  var meta = props.meta,
@@ -128,15 +128,14 @@ var TableData = function TableData(props) {
128
128
  var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
129
129
  var _store$preProps2 = store.preProps,
130
130
  subToolbar = _store$preProps2.subToolbar,
131
+ notExistsColumns = _store$preProps2.notExistsColumns,
131
132
  toolbar = _store$preProps2.toolbar,
132
133
  other = (0, _objectWithoutProperties2["default"])(_store$preProps2, _excluded);
133
134
  var newMetaList = store.metaList[groupIndex].list.slice()[0];
134
135
  var newMeta = store.metaList[groupIndex].list.slice();
135
136
  var oldList = (0, _cloneDeep["default"])(newMetaList.subquery);
136
137
  var _toolbar = subToolbar || toolbar;
137
- _toolbar = _toolbar.filter(function (v) {
138
- return v !== 'group';
139
- }); // 子查询不需要分组
138
+ // _toolbar = _toolbar.filter((v: string) => v !== 'group'); // 子查询不需要分组
140
139
  var o = _pandora.Modal2.openModal({
141
140
  title: (0, _locale.__)('SqlQueryBuilder.subquery'),
142
141
  transparentMask: true,
@@ -164,7 +164,6 @@ var getAlias = exports.getAlias = function getAlias() {
164
164
  })).filter(function (alias) {
165
165
  return Boolean(alias);
166
166
  });
167
- console.log('🚀 ~ getAlias ~ aliass:', aliass);
168
167
  // 收集所有 name_x 中的数字
169
168
  var regex = new RegExp("^".concat(name, "_(\\d+)$"));
170
169
  var indexes = aliass.map(function (alias) {
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
- var _excluded = ["notExistsToolbar", "subShowSubquery", "toolbar"];
5
+ var _excluded = ["notExistsToolbar", "toolbar"];
6
6
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import { useState, forwardRef } from 'react';
8
8
  import cx from 'classnames';
@@ -139,23 +139,19 @@ var FormulaList = forwardRef(function (props, ref) {
139
139
  var _caseList$i, _caseList$i2;
140
140
  var _store$preProps = store.preProps,
141
141
  notExistsToolbar = _store$preProps.notExistsToolbar,
142
- _store$preProps$subSh = _store$preProps.subShowSubquery,
143
- subShowSubquery = _store$preProps$subSh === void 0 ? false : _store$preProps$subSh,
144
142
  toolbar = _store$preProps.toolbar,
145
143
  other = _objectWithoutProperties(_store$preProps, _excluded);
146
144
  var _value = ((_caseList$i = caseList[i]) === null || _caseList$i === void 0 ? void 0 : _caseList$i.notExists) || [];
147
145
  var oldList = cloneDeep(((_caseList$i2 = caseList[i]) === null || _caseList$i2 === void 0 ? void 0 : _caseList$i2.notExists) || []);
148
146
  var _toolbar = notExistsToolbar || toolbar;
149
- _toolbar = _toolbar.filter(function (v) {
150
- return v !== 'group';
151
- }); // 子查询不需要分组
147
+ // _toolbar = _toolbar.filter((v: string) => v !== 'group'); // 子查询不需要分组
152
148
  var o = Modal2.openModal({
153
149
  title: caseList[i].type,
154
150
  transparentMask: true,
155
151
  content: _jsx(_Fragment, {
156
152
  children: _jsx(Metabase, _objectSpread(_objectSpread({}, other), {}, {
157
153
  notExistsColumns: exitData,
158
- showFields: false,
154
+ // showFields={false}
159
155
  // showSubquery={subShowSubquery}
160
156
  toolbar: _toolbar,
161
157
  btnText: __('SqlQueryBuilder.confirm'),
@@ -2,7 +2,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
- var _excluded = ["subToolbar", "toolbar"];
5
+ var _excluded = ["subToolbar", "notExistsColumns", "toolbar"];
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import cx from 'classnames';
@@ -892,15 +892,14 @@ var JoinData = function JoinData(props) {
892
892
  var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
893
893
  var _store$preProps2 = store.preProps,
894
894
  subToolbar = _store$preProps2.subToolbar,
895
+ notExistsColumns = _store$preProps2.notExistsColumns,
895
896
  toolbar = _store$preProps2.toolbar,
896
897
  other = _objectWithoutProperties(_store$preProps2, _excluded);
897
898
  var newMeta = store.metaList[groupIndex].list.slice();
898
899
  var index = findIndex(store.metaList[groupIndex].list, meta);
899
900
  var oldList = cloneDeep(newMeta[index].subquery);
900
901
  var _toolbar = subToolbar || toolbar;
901
- _toolbar = _toolbar.filter(function (v) {
902
- return v !== 'group';
903
- }); // 子查询不需要分组
902
+ // _toolbar = _toolbar.filter((v: string) => v !== 'group'); // 子查询不需要分组
904
903
  var o = Modal2.openModal({
905
904
  title: __('SqlQueryBuilder.subquery'),
906
905
  transparentMask: true,
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
4
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
- var _excluded = ["subToolbar", "toolbar"];
5
+ var _excluded = ["subToolbar", "notExistsColumns", "toolbar"];
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import cx from 'classnames';
@@ -121,15 +121,14 @@ var TableData = function TableData(props) {
121
121
  var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
122
122
  var _store$preProps2 = store.preProps,
123
123
  subToolbar = _store$preProps2.subToolbar,
124
+ notExistsColumns = _store$preProps2.notExistsColumns,
124
125
  toolbar = _store$preProps2.toolbar,
125
126
  other = _objectWithoutProperties(_store$preProps2, _excluded);
126
127
  var newMetaList = store.metaList[groupIndex].list.slice()[0];
127
128
  var newMeta = store.metaList[groupIndex].list.slice();
128
129
  var oldList = cloneDeep(newMetaList.subquery);
129
130
  var _toolbar = subToolbar || toolbar;
130
- _toolbar = _toolbar.filter(function (v) {
131
- return v !== 'group';
132
- }); // 子查询不需要分组
131
+ // _toolbar = _toolbar.filter((v: string) => v !== 'group'); // 子查询不需要分组
133
132
  var o = Modal2.openModal({
134
133
  title: __('SqlQueryBuilder.subquery'),
135
134
  transparentMask: true,
@@ -157,7 +157,6 @@ export var getAlias = function getAlias() {
157
157
  })).filter(function (alias) {
158
158
  return Boolean(alias);
159
159
  });
160
- console.log('🚀 ~ getAlias ~ aliass:', aliass);
161
160
  // 收集所有 name_x 中的数字
162
161
  var regex = new RegExp("^".concat(name, "_(\\d+)$"));
163
162
  var indexes = aliass.map(function (alias) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-metabase",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",