@flexem/fc-gui 3.0.0-alpha.102 → 3.0.0-alpha.103

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/CHANGELOG.md CHANGED
@@ -456,7 +456,7 @@
456
456
  #### Features
457
457
  1. FLEXCLOUD-2957 切换仪表盘时console报错,由于历史曲线中设置了windowResize但未清除,导致resize会执行已经不存在的历史曲线的数据
458
458
 
459
- ## 3.0.0-alpha.102(2023-12-18)
459
+ ## 3.0.0-alpha.102(2023-12-18),3.0.0-alpha.103(2024-03-07)
460
460
  ### Web端
461
461
  #### Features
462
462
  1. FLEXCLOUD-2619 棒图、环形图设置最大值、最小值为参数后,刻度数值对齐及模糊问题
@@ -22111,7 +22111,7 @@ class ConsoleLoggerService {
22111
22111
 
22112
22112
  "use strict";
22113
22113
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariableUtil; });
22114
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
22114
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
22115
22115
 
22116
22116
  class VariableUtil {
22117
22117
  static getConvertedVariableName(variableStore, variable) {
@@ -22226,6 +22226,19 @@ class VariableDefinition {
22226
22226
  /* 11 */
22227
22227
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
22228
22228
 
22229
+ "use strict";
22230
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariableValueType; });
22231
+ var VariableValueType;
22232
+ (function (VariableValueType) {
22233
+ VariableValueType[VariableValueType["Constant"] = 0] = "Constant";
22234
+ VariableValueType[VariableValueType["Variable"] = 1] = "Variable";
22235
+ })(VariableValueType || (VariableValueType = {}));
22236
+
22237
+
22238
+ /***/ }),
22239
+ /* 12 */
22240
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
22241
+
22229
22242
  "use strict";
22230
22243
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __extends; });
22231
22244
  /* unused harmony export __assign */
@@ -22435,7 +22448,7 @@ function __importDefault(mod) {
22435
22448
 
22436
22449
 
22437
22450
  /***/ }),
22438
- /* 12 */
22451
+ /* 13 */
22439
22452
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
22440
22453
 
22441
22454
  "use strict";
@@ -22598,19 +22611,6 @@ class GetAlarmsArgs {
22598
22611
 
22599
22612
 
22600
22613
 
22601
- /***/ }),
22602
- /* 13 */
22603
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
22604
-
22605
- "use strict";
22606
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariableValueType; });
22607
- var VariableValueType;
22608
- (function (VariableValueType) {
22609
- VariableValueType[VariableValueType["Constant"] = 0] = "Constant";
22610
- VariableValueType[VariableValueType["Variable"] = 1] = "Variable";
22611
- })(VariableValueType || (VariableValueType = {}));
22612
-
22613
-
22614
22614
  /***/ }),
22615
22615
  /* 14 */
22616
22616
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -32958,7 +32958,7 @@ class Guid {
32958
32958
  "use strict";
32959
32959
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; });
32960
32960
  /* unused harmony export SafeSubscriber */
32961
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
32961
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
32962
32962
  /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51);
32963
32963
  /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53);
32964
32964
  /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
@@ -35342,7 +35342,7 @@ function degreesToRadians(degrees) {
35342
35342
  }
35343
35343
 
35344
35344
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
35345
- var variable_value_type = __webpack_require__(13);
35345
+ var variable_value_type = __webpack_require__(11);
35346
35346
 
35347
35347
  // CONCATENATED MODULE: ./.tmp/elements/bar-graph-element.ts
35348
35348
 
@@ -35359,6 +35359,8 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
35359
35359
  this.barText = '';
35360
35360
  this.valueObj = {};
35361
35361
  this.isNeedUpdateScale = false;
35362
+ this.needAddNumber = 0;
35363
+ this.needInitTransform = true;
35362
35364
  if ((this.model.minValueType === variable_value_type["a" /* VariableValueType */].Constant && this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Variable)
35363
35365
  || this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Constant && this.model.minValueType === variable_value_type["a" /* VariableValueType */].Variable) {
35364
35366
  this.isNeedUpdateScale = true;
@@ -35374,8 +35376,10 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
35374
35376
  this.$barRect.attr('transform', this.defaultTransform);
35375
35377
  }
35376
35378
  setTimeout(() => {
35377
- this.initFrameNode();
35378
- }, 0);
35379
+ if (this.model.maxValueType !== variable_value_type["a" /* VariableValueType */].Variable || this.model.minValueType !== variable_value_type["a" /* VariableValueType */].Variable) {
35380
+ this.initFrameNode();
35381
+ }
35382
+ });
35379
35383
  }
35380
35384
  get readVariableName() {
35381
35385
  if (!this.model) {
@@ -35392,10 +35396,42 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
35392
35396
  return variable_util["a" /* VariableUtil */].getConvertedVariableName(this.variableStore, variable);
35393
35397
  }
35394
35398
  }
35399
+ initTransform() {
35400
+ if (this.needAddNumber <= 3)
35401
+ return;
35402
+ this.$element[0].childNodes.forEach((node, index) => {
35403
+ const matrixE = node.transform.baseVal[0].matrix.e;
35404
+ node.transform.baseVal[0].matrix.e = matrixE + (this.needAddNumber - 3) * 7;
35405
+ if (node.nodeName === 'g') {
35406
+ const nodeValue = node.attributes['clip-path'].value.replace('url(#', '').replace(')', '');
35407
+ const rootNode = node.parentNode.parentNode.parentElement;
35408
+ const clipPath = $(rootNode).find(`clipPath[id="${nodeValue}"]`);
35409
+ const demoPath = clipPath.find('path');
35410
+ const dValues = demoPath.attr('d').split(',');
35411
+ const retValues = [];
35412
+ dValues.forEach((line) => {
35413
+ const values = [];
35414
+ line.split(' ').forEach((item) => {
35415
+ const nItem = Number(item);
35416
+ if (!isNaN(nItem) && item < 100) {
35417
+ item = nItem > 0 ? nItem + (this.needAddNumber - 3) * 7 : nItem - (this.needAddNumber - 3) * 7;
35418
+ }
35419
+ values.push(item);
35420
+ });
35421
+ retValues.push(values.join(' '));
35422
+ });
35423
+ demoPath.attr('d', retValues.join(','));
35424
+ }
35425
+ else if (index === this.$element[0].childNodes.length - 1) {
35426
+ this.defaultTransform = node.attributes['transform'].value;
35427
+ }
35428
+ });
35429
+ }
35395
35430
  initFrameNode() {
35396
35431
  const arcPath = Snap(this.$element[0]);
35397
35432
  const b = arcPath.getBBox(true);
35398
- this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', b.width).attr('height', b.height).attr('fill', 'transparent');
35433
+ const width = this.needAddNumber <= 3 ? b.width : b.width + (this.needAddNumber - 3) * 7;
35434
+ this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', b.height).attr('fill', 'transparent');
35399
35435
  }
35400
35436
  updateValueObj(value, variableName) {
35401
35437
  var _a, _b, _c;
@@ -35425,6 +35461,14 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
35425
35461
  min = bar_graph_element_BarGraphElement.DEFAULT_MIN_VALUE;
35426
35462
  max = bar_graph_element_BarGraphElement.DEFAULT_MAX_VALUE;
35427
35463
  }
35464
+ if (this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Variable && this.model.minValueType === variable_value_type["a" /* VariableValueType */].Variable) {
35465
+ this.needAddNumber = max.toString().length > min.toString().length ? max.toString().length : min.toString().length;
35466
+ if (this.needInitTransform) {
35467
+ this.initTransform();
35468
+ this.initFrameNode();
35469
+ this.needInitTransform = false;
35470
+ }
35471
+ }
35428
35472
  const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
35429
35473
  for (let i = 0; i < textElements.length; i++) {
35430
35474
  const text = textElements[i];
@@ -35441,7 +35485,8 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
35441
35485
  if (this.model.minValueType !== variable_value_type["a" /* VariableValueType */].Constant || this.model.maxValueType !== variable_value_type["a" /* VariableValueType */].Constant) {
35442
35486
  // FLEXCLOUD-2619 刻度未对齐问题
35443
35487
  let translateX = 0;
35444
- switch (sacleValue.toString().length) {
35488
+ const sacleLen = sacleValue.toString().length;
35489
+ switch (sacleLen) {
35445
35490
  case 1:
35446
35491
  translateX = 13;
35447
35492
  break;
@@ -35452,6 +35497,9 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
35452
35497
  translateX = this.model.fractionDigits ? 5 : 0;
35453
35498
  break;
35454
35499
  default:
35500
+ if (sacleLen > 3 && this.needAddNumber > 3) {
35501
+ translateX = -(sacleLen - 3) * 7;
35502
+ }
35455
35503
  break;
35456
35504
  }
35457
35505
  text.transform.baseVal[0].matrix.e = translateX;
@@ -35550,7 +35598,7 @@ bar_graph_element_BarGraphElement.DEFAULT_MAX_VALUE = 100;
35550
35598
 
35551
35599
 
35552
35600
  // EXTERNAL MODULE: ./.tmp/config/index.ts + 11 modules
35553
- var _tmp_config = __webpack_require__(12);
35601
+ var _tmp_config = __webpack_require__(13);
35554
35602
 
35555
35603
  // EXTERNAL MODULE: ./.tmp/modal/alert/alert-modal.component.ts
35556
35604
  var alert_modal_component = __webpack_require__(20);
@@ -37860,6 +37908,7 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
37860
37908
  this.valueObj = {};
37861
37909
  this.isNeedUpdateScale = false;
37862
37910
  this.initTransform = false;
37911
+ this.needAddNumber = 0;
37863
37912
  if ((this.model.minValueType === variable_value_type["a" /* VariableValueType */].Constant && this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Variable)
37864
37913
  || this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Constant && this.model.minValueType === variable_value_type["a" /* VariableValueType */].Variable) {
37865
37914
  this.isNeedUpdateScale = true;
@@ -37870,7 +37919,9 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
37870
37919
  this._barElement$ = el$.find('path[data-id="barArc"]');
37871
37920
  this._textElement$ = el$.find('text[data-id="pText"]');
37872
37921
  setTimeout(() => {
37873
- this.initFrameNode();
37922
+ if (this.model.minValueType !== variable_value_type["a" /* VariableValueType */].Variable) {
37923
+ this.initFrameNode();
37924
+ }
37874
37925
  this.changeStates();
37875
37926
  });
37876
37927
  }
@@ -37904,10 +37955,39 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
37904
37955
  const variable = new variable_definition["a" /* VariableDefinition */](this.model.maxVariable.name, this.model.maxVariable.groupName, this.model.maxVariable.dataSourceCode, this.model.maxVariable.variableVersion);
37905
37956
  return variable_util["a" /* VariableUtil */].getConvertedVariableName(this.variableStore, variable);
37906
37957
  }
37958
+ initTransformFun() {
37959
+ if (this.needAddNumber <= 3)
37960
+ return;
37961
+ this.$element[0].childNodes.forEach((node) => {
37962
+ const matrixE = node.transform.baseVal[0].matrix.e;
37963
+ node.transform.baseVal[0].matrix.e = matrixE + (this.needAddNumber - 3) * 5;
37964
+ if (node.nodeName === 'g') {
37965
+ const nodeValue = node.attributes['clip-path'].value.replace('url(#', '').replace(')', '');
37966
+ const rootNode = node.parentNode.parentNode.parentElement;
37967
+ const clipPath = $(rootNode).find(`clipPath[id="${nodeValue}"]`);
37968
+ const demoPath = clipPath.find('path');
37969
+ const dValues = demoPath.attr('d').split(',');
37970
+ const retValues = [];
37971
+ dValues.forEach((line, index) => {
37972
+ const values = [];
37973
+ line.split(' ').forEach((item) => {
37974
+ const nItem = Number(item);
37975
+ if (!isNaN(nItem) && (index === 1 || nItem === -1)) {
37976
+ item = nItem > 0 ? nItem + (this.needAddNumber - 3) * 8 : nItem - (this.needAddNumber - 3) * 8;
37977
+ }
37978
+ values.push(item);
37979
+ });
37980
+ retValues.push(values.join(' '));
37981
+ });
37982
+ demoPath.attr('d', retValues.join(','));
37983
+ }
37984
+ });
37985
+ }
37907
37986
  initFrameNode() {
37908
37987
  const arcPath = Snap(this.$element[0]);
37909
37988
  const b = arcPath.getBBox(true);
37910
- this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', b.width).attr('height', b.height).attr('fill', 'transparent');
37989
+ const width = this.needAddNumber <= 3 ? b.width : b.width + (this.needAddNumber - 3) * 8;
37990
+ this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', b.height).attr('fill', 'transparent');
37911
37991
  }
37912
37992
  init(variableName) {
37913
37993
  if (variableName) {
@@ -37956,6 +38036,13 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
37956
38036
  min = ring_graph_element_RingGraphElement.DEFAULT_MIN_VALUE;
37957
38037
  max = ring_graph_element_RingGraphElement.DEFAULT_MAX_VALUE;
37958
38038
  }
38039
+ if (this.model.minValueType === variable_value_type["a" /* VariableValueType */].Variable) {
38040
+ this.needAddNumber = max.toString().length > min.toString().length ? max.toString().length : min.toString().length;
38041
+ if (!this.initTransform) {
38042
+ this.initTransformFun();
38043
+ this.initFrameNode();
38044
+ }
38045
+ }
37959
38046
  const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
37960
38047
  for (let i = 0; i < textElements.length; i++) {
37961
38048
  const text = textElements[i];
@@ -37969,12 +38056,12 @@ class ring_graph_element_RingGraphElement extends readable_element_ReadableEleme
37969
38056
  }
37970
38057
  if (!isNaN(sacleValue)) {
37971
38058
  text.innerHTML = sacleValue;
38059
+ isInitTransform = true;
37972
38060
  if (this.model.minValueType !== variable_value_type["a" /* VariableValueType */].Constant || this.model.maxValueType !== variable_value_type["a" /* VariableValueType */].Constant) {
37973
38061
  // FLEXCLOUD-2619 刻度显示不全问题
37974
38062
  const order = (i + 1) / textElements.length;
37975
- if (!this.initTransform && order > 0.2 && order < 0.5 && sacleValue.toString().length > 2) {
37976
- text.transform.baseVal[0].matrix.e -= 5;
37977
- isInitTransform = true;
38063
+ if (!this.initTransform && order > 0.7 && sacleValue.toString().length > 3) {
38064
+ text.transform.baseVal[0].matrix.e -= (sacleValue.toString().length - 3) * 5;
37978
38065
  }
37979
38066
  }
37980
38067
  }
@@ -61523,7 +61610,7 @@ nv.version = "1.8.6-dev";
61523
61610
  "use strict";
61524
61611
 
61525
61612
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
61526
- var tslib_es6 = __webpack_require__(11);
61613
+ var tslib_es6 = __webpack_require__(12);
61527
61614
 
61528
61615
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js + 3 modules
61529
61616
  var Observable = __webpack_require__(14);
@@ -63291,7 +63378,7 @@ var Subject = __webpack_require__(39);
63291
63378
  var operators_ = __webpack_require__(16);
63292
63379
 
63293
63380
  // EXTERNAL MODULE: ./.tmp/config/index.ts + 11 modules
63294
- var _tmp_config = __webpack_require__(12);
63381
+ var _tmp_config = __webpack_require__(13);
63295
63382
 
63296
63383
  // EXTERNAL MODULE: ./.tmp/core/stringifying-map.ts
63297
63384
  var stringifying_map = __webpack_require__(29);
@@ -64021,7 +64108,7 @@ class RelationConditionResult {
64021
64108
  }
64022
64109
 
64023
64110
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
64024
- var variable_value_type = __webpack_require__(13);
64111
+ var variable_value_type = __webpack_require__(11);
64025
64112
 
64026
64113
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/relation-type.ts
64027
64114
  var relation_type = __webpack_require__(21);
@@ -65535,7 +65622,7 @@ var Observable = __webpack_require__(14);
65535
65622
  var isScheduler = __webpack_require__(50);
65536
65623
 
65537
65624
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
65538
- var tslib_es6 = __webpack_require__(11);
65625
+ var tslib_es6 = __webpack_require__(12);
65539
65626
 
65540
65627
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
65541
65628
  var Subscriber = __webpack_require__(28);
@@ -83971,7 +84058,7 @@ __webpack_require__.r(__webpack_exports__);
83971
84058
  /* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
83972
84059
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringifyingMap", function() { return _core__WEBPACK_IMPORTED_MODULE_3__["a"]; });
83973
84060
 
83974
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
84061
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
83975
84062
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConfigStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["b"]; });
83976
84063
 
83977
84064
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Graph", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["f"]; });