@gingkoo/pandora-metabase 1.0.97 → 1.0.98

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.
@@ -8,7 +8,7 @@ exports.patchMetas = exports.joinDataPatch = exports.filterPatch = exports.custo
8
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
9
  var _enum = require("../store/enum");
10
10
  var setConstantId = function setConstantId(item, constantList) {
11
- constantList.map(function (v) {
11
+ constantList === null || constantList === void 0 || constantList.map(function (v) {
12
12
  if (v.label === item.val) {
13
13
  item.id = v.value;
14
14
  }
@@ -59,8 +59,27 @@ var filterPatch = exports.filterPatch = function filterPatch(newMeta, constantLi
59
59
  return item;
60
60
  });
61
61
  }
62
- if (v.type === 'FORMULA' && !v.id) {
63
- return setFormulaId(v, formulaTemplates);
62
+ if (v.type === 'FORMULA') {
63
+ var _v$args;
64
+ var _v = v;
65
+ if (!_v.id) {
66
+ _v = setFormulaId(v, formulaTemplates);
67
+ }
68
+ (_v$args = _v.args) === null || _v$args === void 0 || _v$args.map(function (arg) {
69
+ var _arg$list;
70
+ arg.list = (_arg$list = arg.list) === null || _arg$list === void 0 ? void 0 : _arg$list.map(function (argItem) {
71
+ if (argItem.type === 'constant' && !argItem.id) {
72
+ return setConstantId(argItem, constantList);
73
+ }
74
+ if (argItem.type === 'FORMULA' && !argItem.id) {
75
+ return setFormulaId(argItem, formulaTemplates);
76
+ }
77
+ return argItem;
78
+ });
79
+ return arg;
80
+ });
81
+ return _v;
82
+ // return setFormulaId(v, formulaTemplates);
64
83
  }
65
84
  if (v.type === 'exists' || v.type === 'notExists') {
66
85
  v.notExists = _patchMetas(v.notExists, constantList, formulaTemplates);
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import { TypeEnum } from '../store/enum';
3
3
  var setConstantId = function setConstantId(item, constantList) {
4
- constantList.map(function (v) {
4
+ constantList === null || constantList === void 0 || constantList.map(function (v) {
5
5
  if (v.label === item.val) {
6
6
  item.id = v.value;
7
7
  }
@@ -52,8 +52,27 @@ export var filterPatch = function filterPatch(newMeta, constantList, formulaTemp
52
52
  return item;
53
53
  });
54
54
  }
55
- if (v.type === 'FORMULA' && !v.id) {
56
- return setFormulaId(v, formulaTemplates);
55
+ if (v.type === 'FORMULA') {
56
+ var _v$args;
57
+ var _v = v;
58
+ if (!_v.id) {
59
+ _v = setFormulaId(v, formulaTemplates);
60
+ }
61
+ (_v$args = _v.args) === null || _v$args === void 0 || _v$args.map(function (arg) {
62
+ var _arg$list;
63
+ arg.list = (_arg$list = arg.list) === null || _arg$list === void 0 ? void 0 : _arg$list.map(function (argItem) {
64
+ if (argItem.type === 'constant' && !argItem.id) {
65
+ return setConstantId(argItem, constantList);
66
+ }
67
+ if (argItem.type === 'FORMULA' && !argItem.id) {
68
+ return setFormulaId(argItem, formulaTemplates);
69
+ }
70
+ return argItem;
71
+ });
72
+ return arg;
73
+ });
74
+ return _v;
75
+ // return setFormulaId(v, formulaTemplates);
57
76
  }
58
77
  if (v.type === 'exists' || v.type === 'notExists') {
59
78
  v.notExists = _patchMetas(v.notExists, constantList, formulaTemplates);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-metabase",
3
- "version": "1.0.97",
3
+ "version": "1.0.98",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",