@zgfe/business-lib 1.2.57 → 1.2.66-hxd.2

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 (135) hide show
  1. package/README.md +12 -12
  2. package/config.js +41 -41
  3. package/es/AUMFormulaTarget/components/formula/index.less +86 -82
  4. package/es/AUMFormulaTarget/components/formulaItem/index.js +52 -13
  5. package/es/AUMFormulaTarget/components/panel/index.less +269 -269
  6. package/es/AUMFormulaTarget/components/symbol/index.less +49 -49
  7. package/es/AUMFormulaTarget/demo/index.js +1 -1
  8. package/es/AUMFormulaTarget/styles/index.less +74 -74
  9. package/es/addToPanel/styles/addPanel.less +25 -25
  10. package/es/addToPanel/styles/index.less +17 -17
  11. package/es/addToPanel/styles/style.less +66 -66
  12. package/es/addToScene/styles/index.less +30 -30
  13. package/es/assets/colorIcon/demo.css +539 -539
  14. package/es/assets/colorIcon/demo_index.html +1454 -1454
  15. package/es/assets/colorIcon/iconfont.css +236 -236
  16. package/es/assets/colorIcon/iconfont.json +394 -394
  17. package/es/assets/colorIcon/iconfont.svg +129 -129
  18. package/es/assets/iconfont/demo.css +539 -539
  19. package/es/assets/iconfont/demo_index.html +5363 -5363
  20. package/es/assets/iconfont/iconfont.css +915 -915
  21. package/es/assets/iconfont/iconfont.json +1584 -1584
  22. package/es/assets/images/attention.png +0 -0
  23. package/es/assets/styles/chunks.less +183 -183
  24. package/es/assets/styles/inner.less +3 -3
  25. package/es/assets/styles/resetAntd.less +551 -551
  26. package/es/assets/styles/variable.less +21 -21
  27. package/es/attrCondition/group.js +5 -2
  28. package/es/attrCondition/index.js +6 -2
  29. package/es/attrCondition/styles/index.less +101 -101
  30. package/es/attrConditions/components/stringList.d.ts +10 -0
  31. package/es/attrConditions/components/stringList.js +57 -27
  32. package/es/attrConditions/components/valuesList.d.ts +10 -0
  33. package/es/attrConditions/components/valuesList.js +6 -2
  34. package/es/attrConditions/styles/group.less +49 -49
  35. package/es/attrConditions/styles/index.less +151 -151
  36. package/es/attrConditions/types.d.ts +17 -0
  37. package/es/attributeSelector/index.js +6 -2
  38. package/es/attributeSelector/listPanel.js +6 -2
  39. package/es/attributeSelector/styles/index.less +141 -141
  40. package/es/attributeSelector/types.d.ts +2 -0
  41. package/es/chart/demo/index.js +2 -3
  42. package/es/chart/styles/index.less +113 -113
  43. package/es/chart/util/data/china.js +17 -17
  44. package/es/chart/util/formatOption.js +1 -1
  45. package/es/constants/apis.d.ts +3 -0
  46. package/es/constants/apis.js +4 -1
  47. package/es/cycleTime/styles/index.less +24 -24
  48. package/es/cycleTime/styles/month.less +95 -95
  49. package/es/dataSetGroup/styles/index.less +146 -146
  50. package/es/datePicker/styles/index.less +53 -53
  51. package/es/datePickerV2/styles/index.less +194 -194
  52. package/es/demoWrapper/index.less +3 -3
  53. package/es/dialog/styles/index.less +22 -22
  54. package/es/dnd/styles/index.less +19 -19
  55. package/es/empty/demo/index.d.ts +4 -0
  56. package/es/empty/demo/index.js +16 -0
  57. package/es/empty/index.d.ts +4 -0
  58. package/es/empty/index.js +19 -0
  59. package/es/empty/types.d.ts +7 -0
  60. package/es/empty/types.js +1 -0
  61. package/es/eventSelector/styles/index.less +123 -123
  62. package/es/formulaTarget/components/formula/index.less +76 -76
  63. package/es/formulaTarget/components/panel/index.less +139 -139
  64. package/es/formulaTarget/components/symbol/index.less +49 -49
  65. package/es/formulaTarget/styles/index.less +74 -74
  66. package/es/hooks/types/subject.d.ts +14 -14
  67. package/es/icon/demo/list.less +32 -32
  68. package/es/index.d.ts +3 -1
  69. package/es/index.js +3 -1
  70. package/es/layout/analysisLayout/demo/index.less +12 -12
  71. package/es/layout/analysisLayout/index.less +118 -118
  72. package/es/layout/columnLayout/demo/index.less +15 -15
  73. package/es/layout/columnLayout/index.less +81 -81
  74. package/es/layout/detail/index.less +27 -27
  75. package/es/layout/optionTitle/components/changePanelModal/styles/index.less +92 -92
  76. package/es/layout/optionTitle/demo/index.less +12 -12
  77. package/es/loading/styles/index.less +20 -20
  78. package/es/loginForm/index.less +7 -7
  79. package/es/platformSelector/index.js +42 -9
  80. package/es/platformSelector/styles/index.less +26 -22
  81. package/es/platformSelector/util.d.ts +1 -1
  82. package/es/platformSelector/util.js +8 -1
  83. package/es/productCondition/conditions/styles/cdpCondition.less +31 -31
  84. package/es/productCondition/conditions/styles/cdpCshCondition.less +41 -41
  85. package/es/productCondition/conditions/styles/eventCondition.less +51 -51
  86. package/es/productCondition/conditions/styles/periodCondition.less +26 -26
  87. package/es/productCondition/conditions/styles/propCondition.less +43 -43
  88. package/es/productCondition/conditions/styles/runTimesCondition.less +19 -19
  89. package/es/productCondition/conditions/styles/tagsCondition.less +20 -20
  90. package/es/productCondition/conditions/styles/textDesc.less +17 -17
  91. package/es/productCondition/styles/conditionTypeList.less +30 -30
  92. package/es/productCondition/styles/conditionWrap.less +18 -18
  93. package/es/productCondition/styles/index.less +33 -33
  94. package/es/productCondition/styles/orConditions.less +34 -34
  95. package/es/productCondition/styles/relationLabel.less +19 -19
  96. package/es/quickDatePicker/styles/index.less +138 -138
  97. package/es/select/styles/handle.less +193 -193
  98. package/es/select/styles/index.less +129 -129
  99. package/es/socket/demo/index.less +27 -27
  100. package/es/table/styles/index.less +5 -5
  101. package/es/targetConditionGroup/demo/styles/index.less +29 -29
  102. package/es/targetConditionGroup/index.js +5 -4
  103. package/es/targetConditionGroup/styles/index.less +53 -53
  104. package/es/targetSelector/styles/index.less +110 -110
  105. package/es/userCondition/conditionTypeList.js +1 -10
  106. package/es/userCondition/conditions/businessCondition.js +3 -10
  107. package/es/userCondition/conditions/eventCondition.js +36 -4
  108. package/es/userCondition/conditions/styles/cdpCondition.less +37 -37
  109. package/es/userCondition/conditions/styles/cdpCshCondition.less +47 -47
  110. package/es/userCondition/conditions/styles/eventCondition.less +57 -51
  111. package/es/userCondition/conditions/styles/periodCondition.less +26 -26
  112. package/es/userCondition/conditions/styles/propCondition.less +43 -43
  113. package/es/userCondition/conditions/styles/runTimesCondition.less +19 -19
  114. package/es/userCondition/conditions/styles/tagsCondition.less +20 -20
  115. package/es/userCondition/conditions/styles/textDesc.less +17 -17
  116. package/es/userCondition/conditions/textDesc.js +1 -24
  117. package/es/userCondition/orConditions.js +0 -7
  118. package/es/userCondition/styles/conditionTypeList.less +30 -30
  119. package/es/userCondition/styles/conditionWrap.less +18 -18
  120. package/es/userCondition/styles/index.less +33 -33
  121. package/es/userCondition/styles/orConditions.less +34 -34
  122. package/es/userCondition/styles/relationLabel.less +19 -19
  123. package/es/userGroup/styles/index.less +145 -145
  124. package/es/userGroupHeader/styles/index.less +31 -31
  125. package/es/userTagsSelector/cascaderOverlay.js +13 -6
  126. package/es/userTagsSelector/components/search/index.less +6 -6
  127. package/es/userTagsSelector/components/tagList/index.less +13 -13
  128. package/es/userTagsSelector/demo/index.js +1 -0
  129. package/es/userTagsSelector/groups/styles/option.less +55 -55
  130. package/es/userTagsSelector/index.js +6 -3
  131. package/es/userTagsSelector/multipleCheckPanel/styles/option.less +40 -40
  132. package/es/userTagsSelector/styles/cascaderOverlay.less +34 -34
  133. package/es/userTagsSelector/styles/index.less +10 -10
  134. package/es/userTagsSelector/types.d.ts +2 -0
  135. package/package.json +62 -62
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- ## 规范
2
-
3
- ### 样式命名规范
4
-
5
- biz-组件名或缩写-具体样式比如 layout 组件的左侧栏命名: biz-layout-left
6
-
7
- ## 注意事项
8
-
9
- ### 样式命名
10
-
11
- 1. 命名上注意语义化,尽量减少语义不明的命名,比如 left、main、center 之类的
12
- 2. className 的命名,统一采用 class-name,不要用驼峰命名
1
+ ## 规范
2
+
3
+ ### 样式命名规范
4
+
5
+ biz-组件名或缩写-具体样式比如 layout 组件的左侧栏命名: biz-layout-left
6
+
7
+ ## 注意事项
8
+
9
+ ### 样式命名
10
+
11
+ 1. 命名上注意语义化,尽量减少语义不明的命名,比如 left、main、center 之类的
12
+ 2. className 的命名,统一采用 class-name,不要用驼峰命名
package/config.js CHANGED
@@ -1,41 +1,41 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- /**
5
- * 对关键配置信息进行本地化存储,避免多人项目配置代码冲突
6
- * @param defaultConfig
7
- * @returns
8
- */
9
- function getConfig(defaultConfig, basePath) {
10
- const configPath = path.resolve(basePath, '.config.json');
11
- let resConfig = defaultConfig;
12
- try {
13
- if (fs.existsSync(configPath)) {
14
- const config = fs.readFileSync(configPath, 'utf-8');
15
- if (!config || config === '{}') {
16
- throw new Error('配置文件为空');
17
- }
18
- const configObj = JSON.parse(config);
19
- // 如果读取的配置文件,数据结构与默认配置不一致,则更新配置文件,更新规则:以默认配置为准,保留用户自定义配置
20
- const isSame = Object.keys(defaultConfig).every((key) => {
21
- return configObj.hasOwnProperty(key);
22
- });
23
- if (!isSame) {
24
- resConfig = Object.assign({}, defaultConfig, configObj);
25
- throw new Error('配置文件数据结构不一致');
26
- }
27
- resConfig = configObj;
28
- } else {
29
- throw new Error('配置文件不存在');
30
- }
31
- } catch (e) {
32
- console.log(e.message);
33
- fs.writeFileSync(configPath, JSON.stringify(resConfig, null, 2));
34
- }
35
- console.log('配置详情', resConfig);
36
- return resConfig;
37
- }
38
-
39
- module.exports = {
40
- getConfig,
41
- };
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ /**
5
+ * 对关键配置信息进行本地化存储,避免多人项目配置代码冲突
6
+ * @param defaultConfig
7
+ * @returns
8
+ */
9
+ function getConfig(defaultConfig, basePath) {
10
+ const configPath = path.resolve(basePath, '.config.json');
11
+ let resConfig = defaultConfig;
12
+ try {
13
+ if (fs.existsSync(configPath)) {
14
+ const config = fs.readFileSync(configPath, 'utf-8');
15
+ if (!config || config === '{}') {
16
+ throw new Error('配置文件为空');
17
+ }
18
+ const configObj = JSON.parse(config);
19
+ // 如果读取的配置文件,数据结构与默认配置不一致,则更新配置文件,更新规则:以默认配置为准,保留用户自定义配置
20
+ const isSame = Object.keys(defaultConfig).every((key) => {
21
+ return configObj.hasOwnProperty(key);
22
+ });
23
+ if (!isSame) {
24
+ resConfig = Object.assign({}, defaultConfig, configObj);
25
+ throw new Error('配置文件数据结构不一致');
26
+ }
27
+ resConfig = configObj;
28
+ } else {
29
+ throw new Error('配置文件不存在');
30
+ }
31
+ } catch (e) {
32
+ console.log(e.message);
33
+ fs.writeFileSync(configPath, JSON.stringify(resConfig, null, 2));
34
+ }
35
+ console.log('配置详情', resConfig);
36
+ return resConfig;
37
+ }
38
+
39
+ module.exports = {
40
+ getConfig,
41
+ };
@@ -1,82 +1,86 @@
1
- @import '../../../assets/styles/inner.less';
2
-
3
- .aum-formula-container {
4
- display: flex;
5
- flex-wrap: wrap;
6
- align-items: center;
7
- line-height: 48px;
8
- &-target {
9
- display: flex;
10
- &:hover {
11
- .formula-container-option:not(.active) {
12
- display: flex;
13
- color: #b9ceff;
14
- &.disabled {
15
- color: #ccd0d4;
16
- }
17
- }
18
- }
19
- &-handle {
20
- min-width: 88px;
21
- // min-width: 184px;
22
- &.focus {
23
- .biz-select-handle-input {
24
- border-color: @primary-color;
25
- }
26
- }
27
- &-icon {
28
- margin-left: 4px;
29
- color: @text-color-middle;
30
- }
31
- &-name {
32
- margin-left: 4px;
33
- }
34
- }
35
- }
36
-
37
- &-format {
38
- display: flex;
39
- align-items: center;
40
- margin-left: 16px;
41
- & > span {
42
- margin-right: 12px;
43
- }
44
- & > span:hover {
45
- color: @error-color;
46
- }
47
-
48
- .biz-select-handle {
49
- min-width: 136px;
50
- }
51
- }
52
- &-add {
53
- margin-left: 16px;
54
- color: @primary-color;
55
- font-size: 18px !important;
56
- cursor: pointer;
57
- }
58
- &-option {
59
- display: flex;
60
- align-items: center;
61
- color: transparent;
62
- cursor: pointer;
63
- &.active {
64
- display: flex;
65
- color: #354354;
66
- }
67
- &.disabled {
68
- cursor: not-allowed;
69
- }
70
-
71
- &:first-child {
72
- margin-right: 4px;
73
- }
74
- &:last-child {
75
- margin-left: 4px;
76
- }
77
- }
78
-
79
- &-symbol {
80
- margin: 0 12px;
81
- }
82
- }
1
+ @import '../../../assets/styles/inner.less';
2
+
3
+ .aum-formula-container {
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ // align-items: center;
7
+ line-height: 48px;
8
+ .formula-symbol {
9
+ margin-top: 16px;
10
+ }
11
+ &-target {
12
+ display: flex;
13
+ &:hover {
14
+ .formula-container-option:not(.active) {
15
+ display: flex;
16
+ color: #b9ceff;
17
+ &.disabled {
18
+ color: #ccd0d4;
19
+ }
20
+ }
21
+ }
22
+ &-handle {
23
+ min-width: 88px;
24
+ // min-width: 184px;
25
+ &.focus {
26
+ .biz-select-handle-input {
27
+ border-color: @primary-color;
28
+ }
29
+ }
30
+ &-icon {
31
+ margin-left: 4px;
32
+ color: @text-color-middle;
33
+ }
34
+ &-name {
35
+ margin-left: 4px;
36
+ }
37
+ }
38
+ }
39
+
40
+ &-format {
41
+ display: flex;
42
+ align-items: center;
43
+ height: 48px;
44
+ margin-left: 16px;
45
+ & > span {
46
+ margin-right: 12px;
47
+ }
48
+ & > span:hover {
49
+ color: @error-color;
50
+ }
51
+
52
+ .biz-select-handle {
53
+ min-width: 136px;
54
+ }
55
+ }
56
+ &-add {
57
+ margin-left: 16px;
58
+ color: @primary-color;
59
+ font-size: 18px !important;
60
+ cursor: pointer;
61
+ }
62
+ &-option {
63
+ display: flex;
64
+ align-items: center;
65
+ color: transparent;
66
+ cursor: pointer;
67
+ &.active {
68
+ display: flex;
69
+ color: #354354;
70
+ }
71
+ &.disabled {
72
+ cursor: not-allowed;
73
+ }
74
+
75
+ &:first-child {
76
+ margin-right: 4px;
77
+ }
78
+ &:last-child {
79
+ margin-left: 4px;
80
+ }
81
+ }
82
+
83
+ &-symbol {
84
+ margin: 0 12px;
85
+ }
86
+ }
@@ -18,6 +18,8 @@ import FormulaPanel from '../panel';
18
18
  import _ from 'lodash';
19
19
  import { BizValidatorContext } from '../../../context';
20
20
  import { FormulaTypes } from '../panel/types';
21
+ import request from '../../../utils/ajax';
22
+ import Apis from '../../../constants/apis';
21
23
  var FormulaItem = function FormulaItem(props) {
22
24
  var _useState = useState(props.value),
23
25
  _useState2 = _slicedToArray(_useState, 2),
@@ -48,6 +50,10 @@ var FormulaItem = function FormulaItem(props) {
48
50
  setOpen = _useState12[1];
49
51
  var panelRef = useRef(null);
50
52
  var handleRef = useRef(null);
53
+ var _useState13 = useState(),
54
+ _useState14 = _slicedToArray(_useState13, 2),
55
+ eventRemovedList = _useState14[0],
56
+ setEventRemovedList = _useState14[1];
51
57
  useEffect(function () {
52
58
  window.addEventListener('click', handleClick);
53
59
  return function () {
@@ -56,21 +62,27 @@ var FormulaItem = function FormulaItem(props) {
56
62
  }, [open, formulaValue]);
57
63
  useEffect(function () {
58
64
  var condition = formulaValue === null || formulaValue === void 0 ? void 0 : formulaValue.condition;
59
- setLabel((condition === null || condition === void 0 ? void 0 : condition.eventName) || (condition === null || condition === void 0 ? void 0 : condition.datasetName) || '');
60
- if (condition) {
61
- if ((condition === null || condition === void 0 ? void 0 : condition.type) === FormulaTypes.EVENT) {
62
- setDimension(getDimension(currentApp, condition.analysisDimension, condition.eventId, eventGroupList));
63
- setHaveFilter(judgeHaveFilter(condition.filters));
64
- } else {
65
- setHaveFilter(!!(condition.filters || []).length);
66
- setDimension(condition.fieldName || '');
67
- }
68
- } else {
65
+ if (formulaValue && formulaValue.condition && (eventRemovedList === null || eventRemovedList === void 0 ? void 0 : eventRemovedList.includes(formulaValue.condition.eventId))) {
66
+ setLabel('');
69
67
  setDimension('');
70
68
  setHaveFilter(false);
69
+ } else {
70
+ setLabel((condition === null || condition === void 0 ? void 0 : condition.eventName) || (condition === null || condition === void 0 ? void 0 : condition.datasetName) || '');
71
+ if (condition) {
72
+ if ((condition === null || condition === void 0 ? void 0 : condition.type) === FormulaTypes.EVENT) {
73
+ setDimension(getDimension(currentApp, condition.analysisDimension, condition.eventId, eventGroupList));
74
+ setHaveFilter(judgeHaveFilter(condition.filters));
75
+ } else {
76
+ setHaveFilter(!!(condition.filters || []).length);
77
+ setDimension(condition.fieldName || '');
78
+ }
79
+ } else {
80
+ setDimension('');
81
+ setHaveFilter(false);
82
+ }
71
83
  }
72
84
  props.onChange && props.onChange(formulaValue);
73
- }, [formulaValue]);
85
+ }, [formulaValue, eventRemovedList]);
74
86
  var handleClick = function handleClick(e) {
75
87
  var _handleRef$current, _panelRef$current;
76
88
  var handleClicked = (_handleRef$current = handleRef.current) === null || _handleRef$current === void 0 ? void 0 : _handleRef$current.contains(e.target);
@@ -120,6 +132,23 @@ var FormulaItem = function FormulaItem(props) {
120
132
  });
121
133
  }, 0);
122
134
  };
135
+ function getEventRemoved() {
136
+ request(Apis.queryEventRemoved, {
137
+ method: 'post',
138
+ data: {
139
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
140
+ }
141
+ }).then(function (res) {
142
+ if ((res === null || res === void 0 ? void 0 : res.code) === '100000') {
143
+ setEventRemovedList(res === null || res === void 0 ? void 0 : res.data);
144
+ }
145
+ }).catch(function (err) {
146
+ console.error(err);
147
+ });
148
+ }
149
+ useEffect(function () {
150
+ getEventRemoved();
151
+ }, []);
123
152
  return /*#__PURE__*/React.createElement(BizValidatorContext.Provider, {
124
153
  value: {
125
154
  isValidate: isValidate,
@@ -128,7 +157,11 @@ var FormulaItem = function FormulaItem(props) {
128
157
  }
129
158
  }
130
159
  }, /*#__PURE__*/React.createElement("div", {
131
- className: "".concat(classPrefix, "-target")
160
+ className: "".concat(classPrefix, "-target"),
161
+ style: {
162
+ flexDirection: 'column',
163
+ marginTop: 8
164
+ }
132
165
  }, /*#__PURE__*/React.createElement(Dropdown, {
133
166
  dropdownRender: function dropdownRender() {
134
167
  return /*#__PURE__*/React.createElement(FormulaPanel, {
@@ -164,6 +197,12 @@ var FormulaItem = function FormulaItem(props) {
164
197
  type: "a-shaixuan2"
165
198
  }) : null, /*#__PURE__*/React.createElement("span", {
166
199
  className: "".concat(classPrefix, "-target-handle-name")
167
- }, dimension))))));
200
+ }, dimension)))), formulaValue && formulaValue.condition && (eventRemovedList === null || eventRemovedList === void 0 ? void 0 : eventRemovedList.includes(formulaValue.condition.eventId)) && /*#__PURE__*/React.createElement("div", {
201
+ style: {
202
+ color: '#FB5547',
203
+ height: 20,
204
+ lineHeight: '20px'
205
+ }
206
+ }, "\u4E8B\u4EF6\u5DF2\u88AB\u5220\u9664\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")));
168
207
  };
169
208
  export default FormulaItem;