@flexem/fc-gui 3.0.0-alpha.127 → 3.0.0-alpha.128

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.
@@ -22260,10 +22260,18 @@ var history_data_store = __webpack_require__(254);
22260
22260
 
22261
22261
  // CONCATENATED MODULE: ./.tmp/config/history-data/history-data.model.ts
22262
22262
  class HistoryDataModel {
22263
- constructor(error, isUnbind, values) {
22263
+ constructor(error, isUnbind, values, historyDataItems // 新增:多条目独立数据
22264
+ ) {
22264
22265
  this.error = error;
22265
22266
  this.isUnbind = isUnbind;
22266
22267
  this.values = values;
22268
+ this.historyDataItems = historyDataItems;
22269
+ }
22270
+ }
22271
+ class HistoryDataItemModel {
22272
+ constructor(itemName, rows) {
22273
+ this.itemName = itemName;
22274
+ this.rows = rows;
22267
22275
  }
22268
22276
  }
22269
22277
 
@@ -22350,14 +22358,15 @@ class GetAlarmsArgs {
22350
22358
  /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "g", function() { return GraphResult; });
22351
22359
  /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "i", function() { return GraphType; });
22352
22360
  /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "h", function() { return graph_store["GraphStore"]; });
22353
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "p", function() { return view_store["ViewStore"]; });
22354
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "o", function() { return view_model["a" /* ViewModel */]; });
22355
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "m", function() { return image_store["ImageStore"]; });
22356
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "k", function() { return history_data_store["HistoryDataStore"]; });
22357
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "j", function() { return HistoryDataModel; });
22358
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "l", function() { return HistoryDataValue; });
22361
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "q", function() { return view_store["ViewStore"]; });
22362
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "p", function() { return view_model["a" /* ViewModel */]; });
22363
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "n", function() { return image_store["ImageStore"]; });
22364
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "l", function() { return history_data_store["HistoryDataStore"]; });
22365
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "k", function() { return HistoryDataModel; });
22366
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "j", function() { return HistoryDataItemModel; });
22367
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "m", function() { return HistoryDataValue; });
22359
22368
  /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "d", function() { return GetHistoryDataArgs; });
22360
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "n", function() { return variable_store["VariableStore"]; });
22369
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "o", function() { return variable_store["VariableStore"]; });
22361
22370
  /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "e", function() { return GetVariableNameArgs; });
22362
22371
  /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return alarm_store["AlarmsStore"]; });
22363
22372
  /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return GetAlarmsArgs; });
@@ -33026,7 +33035,7 @@ class Guid {
33026
33035
  /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
33027
33036
  /* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53);
33028
33037
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24);
33029
- /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(35);
33038
+ /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36);
33030
33039
  /** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
33031
33040
 
33032
33041
 
@@ -35713,7 +35722,7 @@ class WriteCharacterModalArgs {
35713
35722
  }
35714
35723
 
35715
35724
  // EXTERNAL MODULE: ./.tmp/modal/write-character/write-character-modal.component.ts
35716
- var write_character_modal_component = __webpack_require__(38);
35725
+ var write_character_modal_component = __webpack_require__(39);
35717
35726
 
35718
35727
  // EXTERNAL MODULE: ./.tmp/utils/access-permission.service.ts + 1 modules
35719
35728
  var access_permission_service = __webpack_require__(43);
@@ -37025,7 +37034,7 @@ class datetime_display_element_DatetimeDisplayElement extends conditional_displa
37025
37034
  var d3 = __webpack_require__(18);
37026
37035
 
37027
37036
  // EXTERNAL MODULE: ./node_modules/nvd3/build/nv.d3.js
37028
- var nv_d3 = __webpack_require__(39);
37037
+ var nv_d3 = __webpack_require__(35);
37029
37038
 
37030
37039
  // CONCATENATED MODULE: ./.tmp/config/history-data/historical-curve.time-range.ts
37031
37040
  var HistoricalCurveTimeRange;
@@ -37313,7 +37322,50 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37313
37322
  }
37314
37323
  }
37315
37324
  handleQueryResult(result) {
37316
- if (result.error) {
37325
+ // 【新格式】多条目模式下的错误处理
37326
+ if (result.historyDataItems && result.historyDataItems.length > 0) {
37327
+ // 只要有条目正常返回(即使没有数据),就走正常逻辑
37328
+ // 这样可以确保即使部分条目失败,只要有条目成功返回,就显示正常状态
37329
+ this.clearStatus();
37330
+ if (result.isUnbind) {
37331
+ this.updateElementStatus(HistoricalCurveElementStatus.Unbound);
37332
+ }
37333
+ else {
37334
+ this.updateElementStatus(HistoricalCurveElementStatus.Normal);
37335
+ }
37336
+ // 如果有错误信息,在控制台输出警告
37337
+ if (result.error) {
37338
+ this.logger.warn(`[历史曲线] 部分条目查询失败: ${result.error}`);
37339
+ }
37340
+ // 检查是否有任何条目有数据
37341
+ const hasAnyData = result.historyDataItems.some(item => item.rows && item.rows.length > 0);
37342
+ if (hasAnyData) {
37343
+ // 有数据,计算所有条目的最小和最大时间,确保时间轴覆盖所有数据
37344
+ let globalMinTime = null;
37345
+ let globalMaxTime = null;
37346
+ result.historyDataItems.forEach(item => {
37347
+ if (item.rows && item.rows.length > 0) {
37348
+ const itemMinTime = moment(Object(lodash["first"])(item.rows).time);
37349
+ const itemMaxTime = moment(Object(lodash["last"])(item.rows).time);
37350
+ if (!globalMinTime || itemMinTime.isBefore(globalMinTime)) {
37351
+ globalMinTime = itemMinTime;
37352
+ }
37353
+ if (!globalMaxTime || itemMaxTime.isAfter(globalMaxTime)) {
37354
+ globalMaxTime = itemMaxTime;
37355
+ }
37356
+ }
37357
+ });
37358
+ // 设置全局时间范围
37359
+ if (globalMinTime && globalMaxTime) {
37360
+ this.currentStartTime = globalMinTime;
37361
+ this.currentEndTime = globalMaxTime;
37362
+ }
37363
+ }
37364
+ // 无论是否有数据,都渲染曲线(没有数据会显示空曲线)
37365
+ this.chartElement = this.renderChartWithMultiItems(result.historyDataItems);
37366
+ }
37367
+ // 【旧格式】单条目模式的错误处理
37368
+ else if (result.error) {
37317
37369
  this.updateElementStatus(HistoricalCurveElementStatus.LoadFailed, result.error);
37318
37370
  }
37319
37371
  else {
@@ -37324,6 +37376,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37324
37376
  else {
37325
37377
  this.updateElementStatus(HistoricalCurveElementStatus.Normal);
37326
37378
  }
37379
+ // 【旧格式】单条目数据,使用原有渲染方式
37327
37380
  if (result.values.length) {
37328
37381
  this.currentStartTime = moment(Object(lodash["first"])(result.values).time);
37329
37382
  this.currentEndTime = moment(Object(lodash["last"])(result.values).time);
@@ -37357,31 +37410,61 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37357
37410
  const chartWidth = this.model.displaySetting.size.width;
37358
37411
  const chartHeight = this.model.displaySetting.size.height - this.displayOption.operationAreaHeight - this.displayOption.operationAreaMarginTop;
37359
37412
  const data = new Array();
37360
- // 【新格式】多条目模式:曲线名称使用"条目名-通道名"格式
37361
- if (this.model.dataSetting.dataItems && this.model.dataSetting.dataItems.length > 0) {
37362
- let channelIndex = 0;
37363
- Object(lodash["each"])(this.model.dataSetting.dataItems, dataItem => {
37364
- Object(lodash["each"])(dataItem.channels, channel => {
37365
- const values = new Array();
37366
- Object(lodash["each"])(result, v => values.push({ x: moment(v.time).local().toDate().valueOf(), y: v.values[channelIndex] }));
37367
- // 使用"条目名-通道名"格式
37368
- const displayName = `${dataItem.dataName}-${channel.name}`;
37369
- data.push({ key: displayName, area: channel.projectEnabled, values: values });
37370
- channelIndex++;
37371
- });
37372
- });
37373
- }
37374
- // 【旧格式】单条目模式:同样使用"条目名-通道名"格式
37375
- else {
37376
- const dataItemName = this.model.dataSetting.dataName;
37377
- Object(lodash["each"])(this.model.dataSetting.channels, (channel, key) => {
37413
+ // 【旧格式】单条目模式:只显示通道名
37414
+ Object(lodash["each"])(this.model.dataSetting.channels, (channel, key) => {
37415
+ const values = new Array();
37416
+ Object(lodash["each"])(result, v => values.push({ x: moment(v.time).local().toDate().valueOf(), y: v.values[key] }));
37417
+ const displayName = channel.name;
37418
+ data.push({ key: displayName, area: channel.projectEnabled, values: values });
37419
+ });
37420
+ this.data = data;
37421
+ nv_d3["addGraph"](() => {
37422
+ let chart;
37423
+ if (this.model.displaySetting.curveType === CurveType.BarGroup || this.model.displaySetting.curveType === CurveType.BarStack) {
37424
+ chart = this.getMultiBarWithFocusChart(chartWidth, chartHeight, data);
37425
+ }
37426
+ else {
37427
+ chart = this.getLineChart(chartWidth, chartHeight, data);
37428
+ }
37429
+ // 设置 tooltip 自动隐藏逻辑
37430
+ this.setupTooltipAutoHide(chart);
37431
+ return chart;
37432
+ });
37433
+ }
37434
+ /**
37435
+ * 【新格式】多条目独立数据的曲线渲染
37436
+ * 每个条目独立保持自己的时间戳,不会出现时间戳混乱的问题
37437
+ */
37438
+ renderChartWithMultiItems(historyDataItems) {
37439
+ const chartWidth = this.model.displaySetting.size.width;
37440
+ const chartHeight = this.model.displaySetting.size.height - this.displayOption.operationAreaHeight - this.displayOption.operationAreaMarginTop;
37441
+ const data = new Array();
37442
+ // 创建一个 Map 用于快速查找条目数据
37443
+ const itemDataMap = new Map();
37444
+ Object(lodash["each"])(historyDataItems, item => {
37445
+ if (item && item.itemName) {
37446
+ itemDataMap.set(item.itemName, item.rows || []);
37447
+ }
37448
+ });
37449
+ // 判断是否只有一个条目
37450
+ const isSingleItem = this.model.dataSetting.dataItems && this.model.dataSetting.dataItems.length === 1;
37451
+ // 为每个条目的每个通道创建独立的曲线
37452
+ Object(lodash["each"])(this.model.dataSetting.dataItems, (dataItem) => {
37453
+ const itemName = dataItem.dataName;
37454
+ // 通过 itemName 匹配数据,而不是通过索引
37455
+ const itemRows = itemDataMap.get(itemName) || [];
37456
+ Object(lodash["each"])(dataItem.channels, (channel, channelIdx) => {
37378
37457
  const values = new Array();
37379
- Object(lodash["each"])(result, v => values.push({ x: moment(v.time).local().toDate().valueOf(), y: v.values[key] }));
37380
- // 使用"条目名-通道名"格式
37381
- const displayName = `${dataItemName}-${channel.name}`;
37458
+ // 每个条目使用自己的时间戳和数据
37459
+ Object(lodash["each"])(itemRows, row => {
37460
+ const value = row.values && row.values[channelIdx] !== undefined ? row.values[channelIdx] : null;
37461
+ values.push({ x: moment(row.time).local().toDate().valueOf(), y: value });
37462
+ });
37463
+ // 只有多个条目时才使用"条目名-通道名"格式,单条目时只显示通道名
37464
+ const displayName = isSingleItem ? channel.name : `${itemName}-${channel.name}`;
37382
37465
  data.push({ key: displayName, area: channel.projectEnabled, values: values });
37383
37466
  });
37384
- }
37467
+ });
37385
37468
  this.data = data;
37386
37469
  nv_d3["addGraph"](() => {
37387
37470
  let chart;
@@ -37987,7 +38070,7 @@ class WriteValueModalArgs {
37987
38070
  }
37988
38071
 
37989
38072
  // EXTERNAL MODULE: ./.tmp/modal/write-value/write-value-modal.component.ts
37990
- var write_value_modal_component = __webpack_require__(37);
38073
+ var write_value_modal_component = __webpack_require__(38);
37991
38074
 
37992
38075
  // EXTERNAL MODULE: ./.tmp/model/shared/data-type/fcloud-data-Type.ts
37993
38076
  var fcloud_data_Type = __webpack_require__(6);
@@ -38224,7 +38307,10 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38224
38307
  }
38225
38308
  }, 30000);
38226
38309
  }
38227
- this.variableCommunicator.write(this.writeVariableName, writeValue).subscribe();
38310
+ // 如果是系统变量"当前语种ID",跳过写值操作(已在 handleCurrentLanguageIdSave 中处理)
38311
+ if (this.writeVariableName !== '当前语种ID') {
38312
+ this.variableCommunicator.write(this.writeVariableName, writeValue).subscribe();
38313
+ }
38228
38314
  }
38229
38315
  else {
38230
38316
  this.writeValueMmodalRef.hide();
@@ -43349,1030 +43435,233 @@ var ConditionType;
43349
43435
 
43350
43436
  /***/ }),
43351
43437
  /* 35 */
43352
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
43353
-
43354
- "use strict";
43355
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hostReportError; });
43356
- /** PURE_IMPORTS_START PURE_IMPORTS_END */
43357
- function hostReportError(err) {
43358
- setTimeout(function () { throw err; }, 0);
43359
- }
43360
- //# sourceMappingURL=hostReportError.js.map
43361
-
43362
-
43363
- /***/ }),
43364
- /* 36 */
43365
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
43366
-
43367
- "use strict";
43368
-
43369
- // EXTERNAL MODULE: external "@angular/core"
43370
- var core_ = __webpack_require__(0);
43371
-
43372
- // EXTERNAL MODULE: ./node_modules/lodash/lodash.js
43373
- var lodash = __webpack_require__(2);
43374
-
43375
- // EXTERNAL MODULE: ./.tmp/localization/index.ts + 1 modules
43376
- var _tmp_localization = __webpack_require__(9);
43377
-
43378
- // EXTERNAL MODULE: ./.tmp/settings/index.ts + 2 modules
43379
- var settings = __webpack_require__(16);
43380
-
43381
- // EXTERNAL MODULE: ./.tmp/logger/index.ts + 2 modules
43382
- var logger = __webpack_require__(7);
43383
-
43384
- // EXTERNAL MODULE: ./.tmp/shared/index.ts + 3 modules
43385
- var shared = __webpack_require__(5);
43386
-
43387
- // EXTERNAL MODULE: ./.tmp/view/view.service.ts
43388
- var view_service = __webpack_require__(27);
43389
-
43390
- // EXTERNAL MODULE: ./.tmp/gui/gui-view.ts + 126 modules
43391
- var gui_view = __webpack_require__(32);
43392
-
43393
- // EXTERNAL MODULE: external "rxjs/operators"
43394
- var operators_ = __webpack_require__(17);
43438
+ /***/ (function(module, exports, __webpack_require__) {
43395
43439
 
43396
- // CONCATENATED MODULE: ./.tmp/gui/gui-host.ts
43440
+ /* nvd3 version 1.8.6-dev (https://github.com/flexem/nvd3) 2018-08-22 */
43441
+ (function(){
43397
43442
 
43443
+ // set up main nv object
43444
+ var nv = {};
43398
43445
 
43446
+ // the major global objects under the nv namespace
43447
+ nv.dev = false; //set false when in production
43448
+ nv.tooltip = nv.tooltip || {}; // For the tooltip system
43449
+ nv.utils = nv.utils || {}; // Utility subsystem
43450
+ nv.models = nv.models || {}; //stores all the possible models/components
43451
+ nv.charts = {}; //stores all the ready to use charts
43452
+ nv.logs = {}; //stores some statistics and potential error messages
43453
+ nv.dom = {}; //DOM manipulation functions
43399
43454
 
43455
+ // Node/CommonJS - require D3
43456
+ if (typeof(module) !== 'undefined' && typeof(exports) !== 'undefined' && typeof(d3) == 'undefined') {
43457
+ d3 = __webpack_require__(18);
43458
+ }
43400
43459
 
43460
+ nv.dispatch = d3.dispatch('render_start', 'render_end');
43401
43461
 
43402
- class gui_host_GuiHost {
43403
- constructor(injector, bsModalService, context, guiOptions, el) {
43404
- this.injector = injector;
43405
- this.bsModalService = bsModalService;
43406
- this.context = context;
43407
- this.guiOptions = guiOptions;
43408
- this.el = el;
43409
- this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
43410
- const toggleViewFunc = (viewIndex, parentContainerId, baseEl) => {
43411
- this.currentViewIndex = viewIndex;
43412
- return this.context.configStore.viewStore.getViewConfig(viewIndex).pipe(Object(operators_["map"])(config => {
43413
- if (this.currentViewIndex !== viewIndex) {
43414
- return;
43415
- }
43416
- if (!config || !config.config || !config.config.length) {
43417
- throw new shared["a" /* ConfigIsEmptyError */]();
43418
- }
43419
- if (this.currentView) {
43420
- this.currentView.dispose();
43421
- }
43422
- this.currentView = new gui_view["a" /* GuiView */](this.injector, this.bsModalService, this.context);
43423
- const hostGuiOptions = {
43424
- svgRootClass: this.guiOptions.svgRootClass,
43425
- hostContainerId: parentContainerId,
43426
- el: baseEl
43427
- };
43428
- this.currentView.load(config, hostGuiOptions);
43429
- this.currentView.resize(this.currentViewSize, this.currentViewReiszeMode, this.guiOptions.svgRootClass);
43430
- this.containerEl = $(baseEl.nativeElement).find(`div#${parentContainerId}`).first();
43431
- this.containerEl.empty();
43432
- this.containerEl.append(this.currentView.element);
43433
- this.logger.debug(`[GUI] Toggle View(${viewIndex}) successed.`);
43434
- }));
43435
- };
43436
- injector.get(view_service["a" /* ViewService */]).toggleViews.set(el, toggleViewFunc);
43437
- }
43438
- get element() {
43439
- if (this.containerEl) {
43440
- return this.containerEl[0];
43441
- }
43442
- else {
43443
- throw new Error('Gui Host not loaded yet.');
43444
- }
43445
- }
43446
- /**
43447
- * Load gui host and main view.
43448
- */
43449
- load(configureViewId) {
43450
- if (this.isLoaded) {
43451
- throw new Error('The GuiHost already loaded.');
43452
- }
43453
- this.isLoaded = true;
43454
- this.containerEl = $(`<div class="svg-content" id= "${this.guiOptions.hostContainerId}" style="display:flex;position:relative;"></div>`);
43455
- const result = new Promise((resolve, reject) => {
43456
- if (configureViewId && configureViewId !== 0) {
43457
- this.loadViewConfigByConfigureViewId(resolve, reject, configureViewId);
43458
- }
43459
- else {
43460
- this.loadMainViewConfig(resolve, reject);
43461
- }
43462
- });
43463
- return result;
43464
- }
43465
- loadByConfigureViewCode(configureViewCode) {
43466
- if (this.isLoaded) {
43467
- throw new Error('The GuiHost already loaded.');
43462
+ // Function bind polyfill
43463
+ // Needed ONLY for phantomJS as it's missing until version 2.0 which is unreleased as of this comment
43464
+ // https://github.com/ariya/phantomjs/issues/10522
43465
+ // http://kangax.github.io/compat-table/es5/#Function.prototype.bind
43466
+ // phantomJS is used for running the test suite
43467
+ if (!Function.prototype.bind) {
43468
+ Function.prototype.bind = function (oThis) {
43469
+ if (typeof this !== "function") {
43470
+ // closest thing possible to the ECMAScript 5 internal IsCallable function
43471
+ throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
43468
43472
  }
43469
- this.isLoaded = true;
43470
- this.containerEl = $(`<div class="svg-content" id= "${this.guiOptions.hostContainerId}" style="display: inline-block;position: relative;"></div>`);
43471
- const result = new Promise((resolve, reject) => {
43472
- if (configureViewCode) {
43473
- this.loadViewConfigByConfigureViewCode(resolve, reject, configureViewCode);
43474
- }
43475
- else {
43476
- this.loadMainViewConfig(resolve, reject);
43477
- }
43478
- });
43479
- return result;
43480
- }
43481
- loadMainViewConfig(resolve, reject) {
43482
- this.context.configStore.viewStore.getMainViewConfig().subscribe(config => {
43483
- if (config.config && config.config.length) {
43484
- this.currentView = new gui_view["a" /* GuiView */](this.injector, this.bsModalService, this.context);
43485
- this.currentView.load(config, this.guiOptions);
43486
- this.containerEl.empty();
43487
- this.containerEl.append(this.currentView.element);
43488
- resolve(this);
43489
- this.logger.debug('[GUI] Host loaded.');
43490
- }
43491
- else {
43492
- reject(new shared["a" /* ConfigIsEmptyError */]());
43493
- }
43494
- }, error => {
43495
- this.logger.error('[GUI] Load failed: ' + error.stack);
43496
- reject(error);
43497
- });
43498
- }
43499
- loadViewConfigByConfigureViewId(resolve, reject, configureViewId) {
43500
- this.context.configStore.viewStore.getViewConfigByConfigureViewId(configureViewId).subscribe(config => {
43501
- this.handleViewConfigCallback(resolve, reject, config);
43502
- }, error => {
43503
- this.logger.error('[GUI] Load failed: ' + error.stack);
43504
- reject(error);
43505
- });
43506
- }
43507
- loadViewConfigByConfigureViewCode(resolve, reject, configureViewCode) {
43508
- this.context.configStore.viewStore.getViewConfigByConfigureViewCode(configureViewCode).subscribe(config => {
43509
- this.handleViewConfigCallback(resolve, reject, config);
43510
- }, error => {
43511
- this.logger.error('[GUI] Load failed: ' + error.stack);
43512
- reject(error);
43513
- });
43473
+
43474
+ var aArgs = Array.prototype.slice.call(arguments, 1),
43475
+ fToBind = this,
43476
+ fNOP = function () {},
43477
+ fBound = function () {
43478
+ return fToBind.apply(this instanceof fNOP && oThis
43479
+ ? this
43480
+ : oThis,
43481
+ aArgs.concat(Array.prototype.slice.call(arguments)));
43482
+ };
43483
+
43484
+ fNOP.prototype = this.prototype;
43485
+ fBound.prototype = new fNOP();
43486
+ return fBound;
43487
+ };
43488
+ }
43489
+
43490
+ // Development render timers - disabled if dev = false
43491
+ if (nv.dev) {
43492
+ nv.dispatch.on('render_start', function(e) {
43493
+ nv.logs.startTime = +new Date();
43494
+ });
43495
+
43496
+ nv.dispatch.on('render_end', function(e) {
43497
+ nv.logs.endTime = +new Date();
43498
+ nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
43499
+ nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
43500
+ });
43501
+ }
43502
+
43503
+ // Logs all arguments, and returns the last so you can test things in place
43504
+ // Note: in IE8 console.log is an object not a function, and if modernizr is used
43505
+ // then calling Function.prototype.bind with with anything other than a function
43506
+ // causes a TypeError to be thrown.
43507
+ nv.log = function() {
43508
+ if (nv.dev && window.console && console.log && console.log.apply)
43509
+ console.log.apply(console, arguments);
43510
+ else if (nv.dev && window.console && typeof console.log == "function" && Function.prototype.bind) {
43511
+ var log = Function.prototype.bind.call(console.log, console);
43512
+ log.apply(console, arguments);
43514
43513
  }
43515
- handleViewConfigCallback(resolve, reject, config) {
43516
- if (!config.config || !config.config.length) {
43517
- reject(new shared["a" /* ConfigIsEmptyError */]());
43518
- }
43519
- this.currentView = new gui_view["a" /* GuiView */](this.injector, this.bsModalService, this.context);
43520
- this.currentView.load(config, this.guiOptions);
43521
- this.containerEl.empty();
43522
- this.containerEl.append(this.currentView.element);
43523
- resolve(this);
43524
- this.logger.debug('[GUI] Host loaded.');
43514
+ return arguments[arguments.length - 1];
43515
+ };
43516
+
43517
+ // print console warning, should be used by deprecated functions
43518
+ nv.deprecated = function(name, info) {
43519
+ if (console && console.warn) {
43520
+ console.warn('nvd3 warning: `' + name + '` has been deprecated. ', info || '');
43525
43521
  }
43526
- /**
43527
- * Resize current view
43528
- * @param size : target view size
43529
- * @param resizeMode : target resize mode
43530
- */
43531
- resizeView(size, resizeMode) {
43532
- if (this.currentView) {
43533
- this.currentView.resize(size, resizeMode, this.guiOptions.svgRootClass);
43534
- this.currentViewSize = size;
43535
- this.currentViewReiszeMode = resizeMode;
43522
+ };
43523
+
43524
+ // The nv.render function is used to queue up chart rendering
43525
+ // in non-blocking async functions.
43526
+ // When all queued charts are done rendering, nv.dispatch.render_end is invoked.
43527
+ nv.render = function render(step) {
43528
+ // number of graphs to generate in each timeout loop
43529
+ step = step || 1;
43530
+
43531
+ nv.render.active = true;
43532
+ nv.dispatch.render_start();
43533
+
43534
+ var renderLoop = function() {
43535
+ var chart, graph;
43536
+
43537
+ for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
43538
+ chart = graph.generate();
43539
+ if (typeof graph.callback == typeof(Function)) graph.callback(chart);
43536
43540
  }
43537
- }
43538
- /**
43539
- * Update current view size;
43540
- * @param size : target view size
43541
- */
43542
- updateViewSize(size) {
43543
- if (!this.currentView) {
43544
- return;
43541
+
43542
+ nv.render.queue.splice(0, i);
43543
+
43544
+ if (nv.render.queue.length) {
43545
+ setTimeout(renderLoop);
43545
43546
  }
43546
- this.currentView.resize(size, this.currentViewReiszeMode, this.guiOptions.svgRootClass);
43547
- this.currentViewSize = size;
43548
- }
43549
- /**
43550
- * Resize current view
43551
- * @param size : target view size
43552
- * @param resizeMode : target resize mode
43553
- */
43554
- updateViewResizeMode(resizeMode) {
43555
- if (this.currentView) {
43556
- this.currentView.resize(this.currentViewSize, resizeMode, this.guiOptions.svgRootClass);
43557
- this.currentViewReiszeMode = resizeMode;
43547
+ else {
43548
+ nv.dispatch.render_end();
43549
+ nv.render.active = false;
43558
43550
  }
43551
+ };
43552
+
43553
+ setTimeout(renderLoop);
43554
+ };
43555
+
43556
+ nv.render.active = false;
43557
+ nv.render.queue = [];
43558
+
43559
+ /*
43560
+ Adds a chart to the async rendering queue. This method can take arguments in two forms:
43561
+ nv.addGraph({
43562
+ generate: <Function>
43563
+ callback: <Function>
43564
+ })
43565
+
43566
+ or
43567
+
43568
+ nv.addGraph(<generate Function>, <callback Function>)
43569
+
43570
+ The generate function should contain code that creates the NVD3 model, sets options
43571
+ on it, adds data to an SVG element, and invokes the chart model. The generate function
43572
+ should return the chart model. See examples/lineChart.html for a usage example.
43573
+
43574
+ The callback function is optional, and it is called when the generate function completes.
43575
+ */
43576
+ nv.addGraph = function(obj) {
43577
+ if (typeof arguments[0] === typeof(Function)) {
43578
+ obj = {generate: arguments[0], callback: arguments[1]};
43559
43579
  }
43560
- dispose() {
43561
- if (this.currentView) {
43562
- this.currentView.dispose();
43563
- }
43564
- if (this.context) {
43565
- this.context.dispose();
43566
- }
43567
- this.logger.debug('[GUI] GuiHost disposed.');
43580
+
43581
+ nv.render.queue.push(obj);
43582
+
43583
+ if (!nv.render.active) {
43584
+ nv.render();
43568
43585
  }
43586
+ };
43587
+
43588
+ // Node/CommonJS exports
43589
+ if (true) {
43590
+ module.exports = nv;
43569
43591
  }
43570
-
43571
- // EXTERNAL MODULE: ./.tmp/utils/guid.ts
43572
- var guid = __webpack_require__(28);
43573
-
43574
- // CONCATENATED MODULE: ./.tmp/gui/gui.component.ts
43575
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return gui_component_GuiComponent; });
43576
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43577
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43578
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43579
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43580
- return c > 3 && r && Object.defineProperty(target, key, r), r;
43592
+
43593
+ if (typeof(window) !== 'undefined') {
43594
+ window.nv = nv;
43595
+ }
43596
+ /* Facade for queueing DOM write operations
43597
+ * with Fastdom (https://github.com/wilsonpage/fastdom)
43598
+ * if available.
43599
+ * This could easily be extended to support alternate
43600
+ * implementations in the future.
43601
+ */
43602
+ nv.dom.write = function(callback) {
43603
+ if (window.fastdom !== undefined) {
43604
+ return fastdom.mutate(callback);
43605
+ }
43606
+ return callback();
43581
43607
  };
43582
- var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
43583
- return function (target, key) { decorator(target, key, paramIndex); }
43608
+
43609
+ /* Facade for queueing DOM read operations
43610
+ * with Fastdom (https://github.com/wilsonpage/fastdom)
43611
+ * if available.
43612
+ * This could easily be extended to support alternate
43613
+ * implementations in the future.
43614
+ */
43615
+ nv.dom.read = function(callback) {
43616
+ if (window.fastdom !== undefined) {
43617
+ return fastdom.measure(callback);
43618
+ }
43619
+ return callback();
43584
43620
  };
43621
+ /* Utility class to handle creation of an interactive layer.
43622
+ This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
43623
+ containing the X-coordinate. It can also render a vertical line where the mouse is located.
43585
43624
 
43625
+ dispatch.elementMousemove is the important event to latch onto. It is fired whenever the mouse moves over
43626
+ the rectangle. The dispatch is given one object which contains the mouseX/Y location.
43627
+ It also has 'pointXValue', which is the conversion of mouseX to the x-axis scale.
43628
+ */
43629
+ nv.interactiveGuideline = function() {
43630
+ "use strict";
43586
43631
 
43632
+ var margin = { left: 0, top: 0 } //Pass the chart's top and left magins. Used to calculate the mouseX/Y.
43633
+ , width = null
43634
+ , height = null
43635
+ , xScale = d3.scale.linear()
43636
+ , dispatch = d3.dispatch('elementMousemove', 'elementMouseout', 'elementClick', 'elementDblclick', 'elementMouseDown', 'elementMouseUp')
43637
+ , showGuideLine = true
43638
+ , svgContainer = null // Must pass the chart's svg, we'll use its mousemove event.
43639
+ , tooltip = nv.models.tooltip()
43640
+ , isMSIE = window.ActiveXObject// Checkt if IE by looking for activeX. (excludes IE11)
43641
+ ;
43587
43642
 
43643
+ tooltip
43644
+ .duration(0)
43645
+ .hideDelay(0)
43646
+ .hidden(false);
43588
43647
 
43648
+ function layer(selection) {
43649
+ selection.each(function(data) {
43650
+ var container = d3.select(this);
43651
+ var availableWidth = (width || 960), availableHeight = (height || 400);
43652
+ var wrap = container.selectAll("g.nv-wrap.nv-interactiveLineLayer")
43653
+ .data([data]);
43654
+ var wrapEnter = wrap.enter()
43655
+ .append("g").attr("class", " nv-wrap nv-interactiveLineLayer");
43656
+ wrapEnter.append("g").attr("class","nv-interactiveGuideLine");
43589
43657
 
43658
+ if (!svgContainer) {
43659
+ return;
43660
+ }
43590
43661
 
43591
-
43592
- let gui_component_GuiComponent = class GuiComponent {
43593
- constructor(el, localization, injector, bsModalService) {
43594
- this.el = el;
43595
- this.localization = localization;
43596
- this.injector = injector;
43597
- this.bsModalService = bsModalService;
43598
- this.loadFailed = new core_["EventEmitter"]();
43599
- this.loaded = new core_["EventEmitter"]();
43600
- this.lastScale = 1;
43601
- this.isMobileMode = false;
43602
- this.globalSettings = this.injector.get(settings["b" /* GlobalSettings */]);
43603
- this.viewService = injector.get(view_service["a" /* ViewService */]);
43604
- }
43605
- get viewResizeMode() {
43606
- switch (this.resizeMode) {
43607
- case 'HorizontalUniform':
43608
- return settings["c" /* ViewResizeMode */].HorizontalUniform;
43609
- default:
43610
- return settings["c" /* ViewResizeMode */].Uniform;
43611
- }
43612
- }
43613
- ngOnChanges(changes) {
43614
- if (changes.displayMode) {
43615
- this.onDisplayModeChanged(changes.displayMode.previousValue, changes.displayMode.currentValue);
43616
- }
43617
- if (changes.context) {
43618
- this.onProviderChanged(changes.context.previousValue, changes.context.currentValue);
43619
- }
43620
- if (changes.size) {
43621
- this.onSizeChanged(changes.size.previousValue, changes.size.currentValue);
43622
- }
43623
- if (changes.resizeMode) {
43624
- this.onResizeModeChanged(changes.resizeMode.previousValue, changes.resizeMode.currentValue);
43625
- }
43626
- }
43627
- doubleFingerZooming() {
43628
- const scaleElement = this.$svg.find('div.svg-content').first()[0];
43629
- const self = this;
43630
- self.initWidth = scaleElement.offsetWidth;
43631
- self.initHeight = scaleElement.offsetHeight;
43632
- self.lastScale = 1;
43633
- scaleElement.addEventListener('touchstart', function (e) {
43634
- self.pageX = e.targetTouches[0].pageX;
43635
- self.pageY = e.targetTouches[0].pageY;
43636
- self.initX = !Object(lodash["isNaN"])(parseInt(scaleElement.style.left, 10)) ? parseInt(scaleElement.style.left, 10) : 0;
43637
- self.initY = !Object(lodash["isNaN"])(parseInt(scaleElement.style.top, 10)) ? parseInt(scaleElement.style.top, 10) : 0;
43638
- if (e.touches.length >= 2) {
43639
- self.startTouch = e.touches;
43640
- }
43641
- self.isTouch = true;
43642
- }, false);
43643
- scaleElement.addEventListener('touchmove', function (e) {
43644
- if (e.touches.length === 1 && self.isTouch && self.lastScale > 1) {
43645
- e.preventDefault();
43646
- const touchMoveX = e.targetTouches[0].pageX, touchMoveY = e.targetTouches[0].pageY;
43647
- const left = Number(touchMoveX) - Number(self.pageX) + Number(self.initX);
43648
- const top = Number(touchMoveY) - Number(self.pageY) + Number(self.initY);
43649
- if (left > -(self.lastScale - 1) * self.initWidth / 2 && left < (self.lastScale - 1) * self.initWidth / 2) {
43650
- scaleElement.style.left = left + 'px';
43651
- }
43652
- if (top > -(self.lastScale - 1) * self.initHeight / 2 && top < (self.lastScale - 1) * self.initHeight / 2) {
43653
- scaleElement.style.top = top + 'px';
43654
- }
43655
- }
43656
- if (e.touches.length >= 2 && self.isTouch) {
43657
- e.preventDefault();
43658
- const now = e.touches;
43659
- const scale = (self.getDistance(now[0], now[1]) / self.getDistance(self.startTouch[0], self.startTouch[1]));
43660
- let nowScale = self.lastScale;
43661
- if (scale >= 1) {
43662
- nowScale *= 1.008;
43663
- }
43664
- if (nowScale < 1) {
43665
- nowScale = 1;
43666
- }
43667
- if (nowScale > 5) {
43668
- nowScale = 5;
43669
- }
43670
- if (scale < 1) {
43671
- nowScale *= 0.992;
43672
- scaleElement.style.left = -(nowScale - 1) * self.initWidth / 8 + 'px';
43673
- scaleElement.style.top = -(nowScale - 1) * self.initHeight / 8 + 'px';
43674
- }
43675
- scaleElement.style.transform = 'scale(' + nowScale + ')';
43676
- self.lastScale = nowScale;
43677
- }
43678
- }, false);
43679
- scaleElement.addEventListener('touchend', function () {
43680
- if (self.isTouch) {
43681
- self.isTouch = false;
43682
- }
43683
- }, false);
43684
- }
43685
- getDistance(p1, p2) {
43686
- const x = p2.pageX - p1.pageX, y = p2.pageY - p1.pageY;
43687
- return Math.sqrt((x * x) + (y * y));
43688
- }
43689
- ngOnDestroy() {
43690
- if (this.host) {
43691
- this.host.dispose();
43692
- }
43693
- }
43694
- onProviderChanged(oldValue, newValue) {
43695
- if (Object(lodash["isEqual"])(oldValue, newValue)) {
43696
- return;
43697
- }
43698
- if (this.host) {
43699
- this.host.dispose();
43700
- this.host = null;
43701
- }
43702
- if (newValue) {
43703
- this.$svg = $(this.el.nativeElement).find('div.svgView').first();
43704
- this.$svg.empty();
43705
- const svgRootClass = 'S' + guid["a" /* Guid */].newGuid().toString('n');
43706
- this.hostContainerId = 'H' + guid["a" /* Guid */].newGuid().toString('n');
43707
- this.$svg.addClass(svgRootClass);
43708
- const guiOptions = {
43709
- svgRootClass: svgRootClass,
43710
- hostContainerId: this.hostContainerId,
43711
- el: this.el
43712
- };
43713
- const host = new gui_host_GuiHost(this.injector, this.bsModalService, newValue, guiOptions, this.el);
43714
- /*
43715
- * if configureViewCode exist then load by configureViewCode else load by configureViewId
43716
- */
43717
- (this.context.configureViewCode ? host.loadByConfigureViewCode(this.context.configureViewCode) :
43718
- host.load(this.context.configureViewId)).then(t => {
43719
- // 加载结束后,如果context发生了变化,直接返回。
43720
- if (!Object(lodash["isEqual"])(this.context, t.context)) {
43721
- t.dispose();
43722
- return;
43723
- }
43724
- this.host = host;
43725
- this.host.resizeView(this.size, this.viewResizeMode);
43726
- this.$svg.append(t.element);
43727
- if (this.isMobileMode) {
43728
- this.doubleFingerZooming();
43729
- }
43730
- this.loaded.emit();
43731
- }).catch(error => {
43732
- this.$svg.append(`<p>${this.localization.loadFailed}</p>`);
43733
- this.loadFailed.emit(error);
43734
- });
43735
- }
43736
- else {
43737
- if (this.$svg) {
43738
- this.$svg.empty();
43739
- }
43740
- this.host = null;
43741
- }
43742
- }
43743
- onSizeChanged(oldValue, newValue) {
43744
- if (!this.host || Object(lodash["isEqual"])(oldValue, newValue)) {
43745
- return;
43746
- }
43747
- this.host.updateViewSize(newValue);
43748
- if (this.isMobileMode) {
43749
- this.doubleFingerZooming();
43750
- }
43751
- }
43752
- onResizeModeChanged(oldValue, newValue) {
43753
- if (!this.host || Object(lodash["isEqual"])(oldValue, newValue)) {
43754
- return;
43755
- }
43756
- this.host.updateViewResizeMode(this.viewResizeMode);
43757
- }
43758
- onDisplayModeChanged(oldValue, newValue) {
43759
- if (Object(lodash["isEqual"])(oldValue, newValue)) {
43760
- return;
43761
- }
43762
- this.isMobileMode = this.displayMode === 'Mobile';
43763
- this.globalSettings.displayMode = this.isMobileMode ? settings["a" /* DisplayMode */].Mobile : settings["a" /* DisplayMode */].Web;
43764
- }
43765
- refreshCurrentPage() {
43766
- if (this.host.currentViewIndex === undefined) {
43767
- return false;
43768
- }
43769
- const toggleView = this.viewService.toggleViews.get(this.el);
43770
- if (!toggleView) {
43771
- return false;
43772
- }
43773
- toggleView(this.host.currentViewIndex, this.hostContainerId, this.el).subscribe();
43774
- return true;
43775
- }
43776
- };
43777
- __decorate([
43778
- Object(core_["Input"])()
43779
- ], gui_component_GuiComponent.prototype, "context", void 0);
43780
- __decorate([
43781
- Object(core_["Input"])()
43782
- ], gui_component_GuiComponent.prototype, "size", void 0);
43783
- __decorate([
43784
- Object(core_["Input"])()
43785
- ], gui_component_GuiComponent.prototype, "resizeMode", void 0);
43786
- __decorate([
43787
- Object(core_["Input"])()
43788
- ], gui_component_GuiComponent.prototype, "displayMode", void 0);
43789
- __decorate([
43790
- Object(core_["Output"])()
43791
- ], gui_component_GuiComponent.prototype, "loadFailed", void 0);
43792
- __decorate([
43793
- Object(core_["Output"])()
43794
- ], gui_component_GuiComponent.prototype, "loaded", void 0);
43795
- gui_component_GuiComponent = __decorate([
43796
- Object(core_["Component"])({
43797
- selector: 'fc-gui',
43798
- template: "<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "
43799
- }),
43800
- __param(1, Object(core_["Inject"])(_tmp_localization["b" /* LOCALIZATION */]))
43801
- ], gui_component_GuiComponent);
43802
-
43803
-
43804
-
43805
- /***/ }),
43806
- /* 37 */
43807
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
43808
-
43809
- "use strict";
43810
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WriteValueModalComponent; });
43811
- /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
43812
- /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
43813
- /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
43814
- /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
43815
- /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
43816
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
43817
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
43818
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
43819
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43820
- return c > 3 && r && Object.defineProperty(target, key, r), r;
43821
- };
43822
- var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
43823
- return function (target, key) { decorator(target, key, paramIndex); }
43824
- };
43825
-
43826
-
43827
-
43828
- let WriteValueModalComponent = class WriteValueModalComponent {
43829
- constructor(localization, dataTypeService, fractionDigitService, numericalOperationService, bsModalRef) {
43830
- this.localization = localization;
43831
- this.dataTypeService = dataTypeService;
43832
- this.fractionDigitService = fractionDigitService;
43833
- this.numericalOperationService = numericalOperationService;
43834
- this.bsModalRef = bsModalRef;
43835
- this.writeValueRangeText = '';
43836
- this.isSubmitting = false;
43837
- }
43838
- get invalidErrorText() {
43839
- return this.localization.loadFailed;
43840
- }
43841
- ngOnInit() {
43842
- this.initData(this.args);
43843
- this.validate();
43844
- }
43845
- initData(option) {
43846
- this.variableName = option.variableName;
43847
- this.dataType = option.dataType;
43848
- this.fBoxDataType = option.fBoxDataType;
43849
- this.integerDigits = option.integerDigits ? option.integerDigits : 0;
43850
- this.fractionDigits = option.fractionDigits ? option.fractionDigits : 0;
43851
- this.valueType = this.dataTypeService.getValueType(option.version, option.dataType);
43852
- this.pattern = this.dataTypeService.getValuePattern(option.version, option.dataType);
43853
- this.numericalOperation = option.numericalOperation;
43854
- this.enableNumericalOperation = this.numericalOperation.enableNumericalOperation ?
43855
- this.numericalOperation.enableNumericalOperation : false;
43856
- this.value = '';
43857
- if (this.args.enableDataParsed) {
43858
- this.setValueRangeAccordToDataParsed(option);
43859
- }
43860
- else {
43861
- this.writeMaxValue = this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType);
43862
- this.writeMinValue = this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType);
43863
- }
43864
- this.writeValueRangeText = this.getWriteValueRangeText();
43865
- }
43866
- setValueRangeAccordToDataParsed(option) {
43867
- if (this.dataTypeService.isFloat(option.version, this.dataType) || this.enableNumericalOperation) {
43868
- this.maxValueLimit = this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType);
43869
- this.minValueLimit = this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType);
43870
- this.numericalLowerLimit = this.numericalOperation.numericalLowerLimit;
43871
- this.numericalUpperLimit = this.numericalOperation.numericalUpperLimit;
43872
- }
43873
- else {
43874
- this.maxValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType), -this.fractionDigits);
43875
- this.minValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType), -this.fractionDigits);
43876
- this.numericalLowerLimit = +this.fractionDigitService.movePoint(this.numericalOperation.numericalLowerLimit, -this.fractionDigits);
43877
- this.numericalUpperLimit = +this.fractionDigitService.movePoint(this.numericalOperation.numericalUpperLimit, -this.fractionDigits);
43878
- }
43879
- const minValue = this.numericalOperationService.getWriteMinValue(this.minValueLimit, this.numericalOperation);
43880
- const maxValue = this.numericalOperationService.getWriteMaxValue(this.maxValueLimit, this.numericalOperation);
43881
- const lowerLimitValue = this.numericalOperationService.getWriteMinValue(this.numericalLowerLimit, this.numericalOperation);
43882
- const upperLimitValue = this.numericalOperationService.getWriteMaxValue(this.numericalUpperLimit, this.numericalOperation);
43883
- const realMinValue = minValue < maxValue ? minValue : maxValue;
43884
- const realMaxValue = minValue < maxValue ? maxValue : minValue;
43885
- const realLowerLimitValue = lowerLimitValue < upperLimitValue ? lowerLimitValue : upperLimitValue;
43886
- const realUpperLimitValue = lowerLimitValue < upperLimitValue ? upperLimitValue : lowerLimitValue;
43887
- this.writeMinValue = realMinValue > realLowerLimitValue ? realMinValue : realLowerLimitValue;
43888
- this.writeMaxValue = realMaxValue < realUpperLimitValue ? realMaxValue : realUpperLimitValue;
43889
- }
43890
- getWriteValueRangeText() {
43891
- let minValue = '';
43892
- let maxValue = '';
43893
- if (this.dataTypeService.isHexOrBinaryType(this.args.version, this.dataType)) {
43894
- minValue = this.writeMinValue.toString(16);
43895
- maxValue = this.writeMaxValue.toString(16);
43896
- }
43897
- else {
43898
- if (this.args.enableDataParsed && this.fractionDigits > 0) {
43899
- minValue = this.writeMinValue.toFixed(this.fractionDigits).toString();
43900
- maxValue = this.writeMaxValue.toFixed(this.fractionDigits).toString();
43901
- }
43902
- else {
43903
- minValue = this.writeMinValue.toString();
43904
- maxValue = this.writeMaxValue.toString();
43905
- }
43906
- }
43907
- return minValue + '~' + maxValue;
43908
- }
43909
- save() {
43910
- this.isSubmitting = true;
43911
- let value = this.value;
43912
- const showValue = this.value;
43913
- if (this.args.enableDataParsed) {
43914
- if (this.enableNumericalOperation) {
43915
- value = this.numericalOperationService.getWriteValue(this.args.version, this.value, this.numericalOperation, this.dataType, this.fractionDigits);
43916
- }
43917
- else {
43918
- value = this.formatWriteValue();
43919
- }
43920
- }
43921
- // 处理系统变量"当前语种ID"
43922
- if (this.variableName === '当前语种ID') {
43923
- this.handleCurrentLanguageIdSave(value);
43924
- return;
43925
- }
43926
- if (!this.args.releasedVariableService) {
43927
- this.onClosed({
43928
- value: value,
43929
- showValue: showValue,
43930
- enableNumericalOperation: false,
43931
- isNumericalOperation: this.isNumericalOperation,
43932
- variableRwType: 6
43933
- });
43934
- return;
43935
- }
43936
- this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
43937
- const valueTransform = JSON.parse(result.valueTransform);
43938
- if ((valueTransform === null || valueTransform === void 0 ? void 0 : valueTransform.Type) !== 0) {
43939
- this.isNumericalOperation = true;
43940
- }
43941
- this.onClosed({
43942
- value: value,
43943
- showValue: showValue,
43944
- enableNumericalOperation: this.enableNumericalOperation,
43945
- isNumericalOperation: this.isNumericalOperation,
43946
- variableRwType: result.variableRwType
43947
- });
43948
- });
43949
- }
43950
- /**
43951
- * 处理"当前语种ID"系统变量的保存
43952
- */
43953
- handleCurrentLanguageIdSave(value) {
43954
- if (!this.args.guiContext || !this.args.guiContext.updateCurrentLanguageId) {
43955
- this.showValidationErrorInfo(this.localization.loadFailed);
43956
- this.isSubmitting = false;
43957
- return;
43958
- }
43959
- // 转换为数字类型
43960
- const languageId = value === '' || value == null ? null : Number(value);
43961
- // 调用 GuiContext 的语种切换方法
43962
- this.args.guiContext.updateCurrentLanguageId(languageId).then(() => {
43963
- // 语种切换成功,调用 onClosed 回调,让数字显示元件也能更新
43964
- this.onClosed({
43965
- value: value,
43966
- showValue: value,
43967
- enableNumericalOperation: false,
43968
- isNumericalOperation: false,
43969
- variableRwType: 6
43970
- });
43971
- }).catch(() => {
43972
- this.showValidationErrorInfo(this.localization.loadFailed);
43973
- this.isSubmitting = false;
43974
- });
43975
- }
43976
- close() {
43977
- this.bsModalRef.hide();
43978
- }
43979
- validate(event = null) {
43980
- if (event && event.keyCode === 13 && !this.validationError) {
43981
- this.save();
43982
- return;
43983
- }
43984
- // 校验数值必填
43985
- if (null == this.value || '' === this.value.trim()) {
43986
- return this.showValidationErrorInfo(this.localization.numericalValueRequired);
43987
- }
43988
- // 校验格式
43989
- if (!new RegExp(this.pattern).test(this.value)) {
43990
- return this.showValidationErrorInfo(this.localization.invalidNumericalValue);
43991
- }
43992
- // 校验小数点位数
43993
- if (!this.enableNumericalOperation && this.dataTypeService.isSupportFractionDigit(this.args.version, this.dataType)
43994
- && this.getFractionDigits(this.value) > this.fractionDigits) {
43995
- return this.showValidationErrorInfo(`${this.localization.fractionDigitsMustLessThan}${this.fractionDigits}`);
43996
- }
43997
- // 校验负号
43998
- if (Object(lodash__WEBPACK_IMPORTED_MODULE_2__["isNil"])(this.args.version) || (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__["isNil"])(this.args.version) && this.args.version < 5)) {
43999
- if (!this.enableNumericalOperation && !this.dataTypeService.isSignedType(this.args.version, this.dataType) && this.value.startsWith('-')) {
44000
- return this.showValidationErrorInfo(this.localization.canNotBeNegative);
44001
- }
44002
- }
44003
- if (this.dataTypeService.isBinaryType(this.args.version, this.dataType) || this.dataTypeService.isHexType(this.args.version, this.dataType)) {
44004
- // 校验数值最大长度
44005
- const valueMaxLength = this.dataTypeService.getValueMaxLength(this.args.version, this.dataType, this.fBoxDataType);
44006
- const maxLength = this.integerDigits ? Math.min(this.integerDigits, valueMaxLength) : valueMaxLength;
44007
- if (this.value.length > maxLength) {
44008
- return this.showValidationErrorInfo(this.localization.numericalValueTooLong);
44009
- }
44010
- }
44011
- let transportValue;
44012
- if (this.dataTypeService.isHexOrBinaryType(this.args.version, this.dataType)) {
44013
- transportValue = this.dataTypeService.formatToDecimal(this.args.version, this.value, this.dataType);
44014
- }
44015
- else {
44016
- transportValue = Number(this.value);
44017
- }
44018
- if (Number(transportValue) > this.writeMaxValue || Number(transportValue) < this.writeMinValue) {
44019
- return this.showValidationErrorInfo(this.localization.valueOutOfRange);
44020
- }
44021
- // 没有错误则隐藏错误框
44022
- this.hideValidationErrorInfo();
44023
- }
44024
- showValidationErrorInfo(errorText) {
44025
- this.validationError = true;
44026
- this.validationErrorText = errorText;
44027
- }
44028
- hideValidationErrorInfo() {
44029
- this.validationError = false;
44030
- this.validationErrorText = '';
44031
- }
44032
- getFractionDigits(number) {
44033
- if (number && number.indexOf('.') > 0) {
44034
- return number.split('.')[1].length;
44035
- }
44036
- return 0;
44037
- }
44038
- /**
44039
- * 格式化写入的值
44040
- * 因为有小数点的数值类型,会被按照小数点位数移位,所以需要在修改前右移小数点位数
44041
- */
44042
- formatWriteValue() {
44043
- if (this.dataTypeService.isSupportFractionDigit(this.args.version, this.dataType) &&
44044
- !this.dataTypeService.isFloat(this.args.version, this.dataType) && this.fractionDigits) {
44045
- return this.fractionDigitService.movePoint(this.value, this.fractionDigits);
44046
- }
44047
- if (this.dataTypeService.isSupportNumericalOperation(this.args.version, this.dataType)) {
44048
- this.value = Number(this.value).toString();
44049
- }
44050
- return this.value;
44051
- }
44052
- };
44053
- __decorate([
44054
- Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])()
44055
- ], WriteValueModalComponent.prototype, "invalidErrorText", null);
44056
- WriteValueModalComponent = __decorate([
44057
- Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
44058
- selector: 'writeValueModal',
44059
- template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <div class=\"write-value-range\"> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </div> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
44060
- styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
44061
- }),
44062
- __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
44063
- ], WriteValueModalComponent);
44064
-
44065
-
44066
-
44067
- /***/ }),
44068
- /* 38 */
44069
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
44070
-
44071
- "use strict";
44072
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WriteCharacterModalComponent; });
44073
- /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
44074
- /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
44075
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
44076
- /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
44077
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44078
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44079
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
44080
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
44081
- return c > 3 && r && Object.defineProperty(target, key, r), r;
44082
- };
44083
- var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
44084
- return function (target, key) { decorator(target, key, paramIndex); }
44085
- };
44086
-
44087
-
44088
-
44089
- let WriteCharacterModalComponent = class WriteCharacterModalComponent {
44090
- constructor(localization) {
44091
- this.localization = localization;
44092
- this._onClosed = new rxjs__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]();
44093
- }
44094
- get onClosed() {
44095
- return this._onClosed;
44096
- }
44097
- get invalidErrorText() {
44098
- return this.localization.loadFailed;
44099
- }
44100
- ngOnInit() {
44101
- this.variableName = this.args.variableName;
44102
- this.isPassword = this.args.isPassword ? this.args.isPassword : false;
44103
- this.charCount = this.args.charCount;
44104
- this.value = '';
44105
- this.validate();
44106
- }
44107
- validate() {
44108
- // 校验数值必填
44109
- if (null == this.value || '' === this.value.trim()) {
44110
- return this.showValidationErrorInfo(this.localization.characterInputRequired);
44111
- }
44112
- if (this.value.length > this.charCount) {
44113
- return this.showValidationErrorInfo(this.localization.characterOutofRange);
44114
- }
44115
- this.hideValidationErrorInfo();
44116
- }
44117
- showValidationErrorInfo(errorText) {
44118
- this.validationError = true;
44119
- this.validationErrorText = errorText;
44120
- }
44121
- hideValidationErrorInfo() {
44122
- this.validationError = false;
44123
- this.validationErrorText = '';
44124
- }
44125
- save() {
44126
- this.close({ value: this.value });
44127
- }
44128
- close(modalResult) {
44129
- this._onClosed.next(modalResult);
44130
- this._onClosed.complete();
44131
- }
44132
- };
44133
- __decorate([
44134
- Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])()
44135
- ], WriteCharacterModalComponent.prototype, "invalidErrorText", null);
44136
- WriteCharacterModalComponent = __decorate([
44137
- Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
44138
- selector: 'writeCharacterModal',
44139
- template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
44140
- styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 10px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-character-value { padding-left: 8px; height: 32px; margin-left: 16px; } "]
44141
- }),
44142
- __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_2__[/* LOCALIZATION */ "b"]))
44143
- ], WriteCharacterModalComponent);
44144
-
44145
-
44146
-
44147
- /***/ }),
44148
- /* 39 */
44149
- /***/ (function(module, exports, __webpack_require__) {
44150
-
44151
- /* nvd3 version 1.8.6-dev (https://github.com/flexem/nvd3) 2018-08-22 */
44152
- (function(){
44153
-
44154
- // set up main nv object
44155
- var nv = {};
44156
-
44157
- // the major global objects under the nv namespace
44158
- nv.dev = false; //set false when in production
44159
- nv.tooltip = nv.tooltip || {}; // For the tooltip system
44160
- nv.utils = nv.utils || {}; // Utility subsystem
44161
- nv.models = nv.models || {}; //stores all the possible models/components
44162
- nv.charts = {}; //stores all the ready to use charts
44163
- nv.logs = {}; //stores some statistics and potential error messages
44164
- nv.dom = {}; //DOM manipulation functions
44165
-
44166
- // Node/CommonJS - require D3
44167
- if (typeof(module) !== 'undefined' && typeof(exports) !== 'undefined' && typeof(d3) == 'undefined') {
44168
- d3 = __webpack_require__(18);
44169
- }
44170
-
44171
- nv.dispatch = d3.dispatch('render_start', 'render_end');
44172
-
44173
- // Function bind polyfill
44174
- // Needed ONLY for phantomJS as it's missing until version 2.0 which is unreleased as of this comment
44175
- // https://github.com/ariya/phantomjs/issues/10522
44176
- // http://kangax.github.io/compat-table/es5/#Function.prototype.bind
44177
- // phantomJS is used for running the test suite
44178
- if (!Function.prototype.bind) {
44179
- Function.prototype.bind = function (oThis) {
44180
- if (typeof this !== "function") {
44181
- // closest thing possible to the ECMAScript 5 internal IsCallable function
44182
- throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
44183
- }
44184
-
44185
- var aArgs = Array.prototype.slice.call(arguments, 1),
44186
- fToBind = this,
44187
- fNOP = function () {},
44188
- fBound = function () {
44189
- return fToBind.apply(this instanceof fNOP && oThis
44190
- ? this
44191
- : oThis,
44192
- aArgs.concat(Array.prototype.slice.call(arguments)));
44193
- };
44194
-
44195
- fNOP.prototype = this.prototype;
44196
- fBound.prototype = new fNOP();
44197
- return fBound;
44198
- };
44199
- }
44200
-
44201
- // Development render timers - disabled if dev = false
44202
- if (nv.dev) {
44203
- nv.dispatch.on('render_start', function(e) {
44204
- nv.logs.startTime = +new Date();
44205
- });
44206
-
44207
- nv.dispatch.on('render_end', function(e) {
44208
- nv.logs.endTime = +new Date();
44209
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
44210
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
44211
- });
44212
- }
44213
-
44214
- // Logs all arguments, and returns the last so you can test things in place
44215
- // Note: in IE8 console.log is an object not a function, and if modernizr is used
44216
- // then calling Function.prototype.bind with with anything other than a function
44217
- // causes a TypeError to be thrown.
44218
- nv.log = function() {
44219
- if (nv.dev && window.console && console.log && console.log.apply)
44220
- console.log.apply(console, arguments);
44221
- else if (nv.dev && window.console && typeof console.log == "function" && Function.prototype.bind) {
44222
- var log = Function.prototype.bind.call(console.log, console);
44223
- log.apply(console, arguments);
44224
- }
44225
- return arguments[arguments.length - 1];
44226
- };
44227
-
44228
- // print console warning, should be used by deprecated functions
44229
- nv.deprecated = function(name, info) {
44230
- if (console && console.warn) {
44231
- console.warn('nvd3 warning: `' + name + '` has been deprecated. ', info || '');
44232
- }
44233
- };
44234
-
44235
- // The nv.render function is used to queue up chart rendering
44236
- // in non-blocking async functions.
44237
- // When all queued charts are done rendering, nv.dispatch.render_end is invoked.
44238
- nv.render = function render(step) {
44239
- // number of graphs to generate in each timeout loop
44240
- step = step || 1;
44241
-
44242
- nv.render.active = true;
44243
- nv.dispatch.render_start();
44244
-
44245
- var renderLoop = function() {
44246
- var chart, graph;
44247
-
44248
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
44249
- chart = graph.generate();
44250
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
44251
- }
44252
-
44253
- nv.render.queue.splice(0, i);
44254
-
44255
- if (nv.render.queue.length) {
44256
- setTimeout(renderLoop);
44257
- }
44258
- else {
44259
- nv.dispatch.render_end();
44260
- nv.render.active = false;
44261
- }
44262
- };
44263
-
44264
- setTimeout(renderLoop);
44265
- };
44266
-
44267
- nv.render.active = false;
44268
- nv.render.queue = [];
44269
-
44270
- /*
44271
- Adds a chart to the async rendering queue. This method can take arguments in two forms:
44272
- nv.addGraph({
44273
- generate: <Function>
44274
- callback: <Function>
44275
- })
44276
-
44277
- or
44278
-
44279
- nv.addGraph(<generate Function>, <callback Function>)
44280
-
44281
- The generate function should contain code that creates the NVD3 model, sets options
44282
- on it, adds data to an SVG element, and invokes the chart model. The generate function
44283
- should return the chart model. See examples/lineChart.html for a usage example.
44284
-
44285
- The callback function is optional, and it is called when the generate function completes.
44286
- */
44287
- nv.addGraph = function(obj) {
44288
- if (typeof arguments[0] === typeof(Function)) {
44289
- obj = {generate: arguments[0], callback: arguments[1]};
44290
- }
44291
-
44292
- nv.render.queue.push(obj);
44293
-
44294
- if (!nv.render.active) {
44295
- nv.render();
44296
- }
44297
- };
44298
-
44299
- // Node/CommonJS exports
44300
- if (true) {
44301
- module.exports = nv;
44302
- }
44303
-
44304
- if (typeof(window) !== 'undefined') {
44305
- window.nv = nv;
44306
- }
44307
- /* Facade for queueing DOM write operations
44308
- * with Fastdom (https://github.com/wilsonpage/fastdom)
44309
- * if available.
44310
- * This could easily be extended to support alternate
44311
- * implementations in the future.
44312
- */
44313
- nv.dom.write = function(callback) {
44314
- if (window.fastdom !== undefined) {
44315
- return fastdom.mutate(callback);
44316
- }
44317
- return callback();
44318
- };
44319
-
44320
- /* Facade for queueing DOM read operations
44321
- * with Fastdom (https://github.com/wilsonpage/fastdom)
44322
- * if available.
44323
- * This could easily be extended to support alternate
44324
- * implementations in the future.
44325
- */
44326
- nv.dom.read = function(callback) {
44327
- if (window.fastdom !== undefined) {
44328
- return fastdom.measure(callback);
44329
- }
44330
- return callback();
44331
- };
44332
- /* Utility class to handle creation of an interactive layer.
44333
- This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
44334
- containing the X-coordinate. It can also render a vertical line where the mouse is located.
44335
-
44336
- dispatch.elementMousemove is the important event to latch onto. It is fired whenever the mouse moves over
44337
- the rectangle. The dispatch is given one object which contains the mouseX/Y location.
44338
- It also has 'pointXValue', which is the conversion of mouseX to the x-axis scale.
44339
- */
44340
- nv.interactiveGuideline = function() {
44341
- "use strict";
44342
-
44343
- var margin = { left: 0, top: 0 } //Pass the chart's top and left magins. Used to calculate the mouseX/Y.
44344
- , width = null
44345
- , height = null
44346
- , xScale = d3.scale.linear()
44347
- , dispatch = d3.dispatch('elementMousemove', 'elementMouseout', 'elementClick', 'elementDblclick', 'elementMouseDown', 'elementMouseUp')
44348
- , showGuideLine = true
44349
- , svgContainer = null // Must pass the chart's svg, we'll use its mousemove event.
44350
- , tooltip = nv.models.tooltip()
44351
- , isMSIE = window.ActiveXObject// Checkt if IE by looking for activeX. (excludes IE11)
44352
- ;
44353
-
44354
- tooltip
44355
- .duration(0)
44356
- .hideDelay(0)
44357
- .hidden(false);
44358
-
44359
- function layer(selection) {
44360
- selection.each(function(data) {
44361
- var container = d3.select(this);
44362
- var availableWidth = (width || 960), availableHeight = (height || 400);
44363
- var wrap = container.selectAll("g.nv-wrap.nv-interactiveLineLayer")
44364
- .data([data]);
44365
- var wrapEnter = wrap.enter()
44366
- .append("g").attr("class", " nv-wrap nv-interactiveLineLayer");
44367
- wrapEnter.append("g").attr("class","nv-interactiveGuideLine");
44368
-
44369
- if (!svgContainer) {
44370
- return;
44371
- }
44372
-
44373
- function mouseHandler() {
44374
- var mouseX = d3.event.clientX - this.getBoundingClientRect().left;
44375
- var mouseY = d3.event.clientY - this.getBoundingClientRect().top;
43662
+ function mouseHandler() {
43663
+ var mouseX = d3.event.clientX - this.getBoundingClientRect().left;
43664
+ var mouseY = d3.event.clientY - this.getBoundingClientRect().top;
44376
43665
 
44377
43666
  var subtractMargin = true;
44378
43667
  var mouseOutAnyReason = false;
@@ -63424,206 +62713,1003 @@ nv.models.sunburst = function() {
63424
62713
  });
63425
62714
  }
63426
62715
 
63427
- //zoom out to the center when the data is updated.
63428
- zoomClick(nodes[nodes.length - 1])
62716
+ //zoom out to the center when the data is updated.
62717
+ zoomClick(nodes[nodes.length - 1])
62718
+
62719
+
62720
+ //remove unmatched elements ...
62721
+ cG.exit()
62722
+ .transition()
62723
+ .duration(duration)
62724
+ .attr('opacity',0)
62725
+ .each('end',function(d){
62726
+ var k = key(d);
62727
+ prevPositions[k] = undefined;
62728
+ })
62729
+ .remove();
62730
+ });
62731
+
62732
+
62733
+ renderWatch.renderEnd('sunburst immediate');
62734
+ return chart;
62735
+ }
62736
+
62737
+ //============================================================
62738
+ // Expose Public Variables
62739
+ //------------------------------------------------------------
62740
+
62741
+ chart.dispatch = dispatch;
62742
+ chart.options = nv.utils.optionsFunc.bind(chart);
62743
+
62744
+ chart._options = Object.create({}, {
62745
+ // simple options, just get/set the necessary values
62746
+ width: {get: function(){return width;}, set: function(_){width=_;}},
62747
+ height: {get: function(){return height;}, set: function(_){height=_;}},
62748
+ mode: {get: function(){return mode;}, set: function(_){mode=_;}},
62749
+ id: {get: function(){return id;}, set: function(_){id=_;}},
62750
+ duration: {get: function(){return duration;}, set: function(_){duration=_;}},
62751
+ groupColorByParent: {get: function(){return groupColorByParent;}, set: function(_){groupColorByParent=!!_;}},
62752
+ showLabels: {get: function(){return showLabels;}, set: function(_){showLabels=!!_}},
62753
+ labelFormat: {get: function(){return labelFormat;}, set: function(_){labelFormat=_}},
62754
+ labelThreshold: {get: function(){return labelThreshold;}, set: function(_){labelThreshold=_}},
62755
+ sort: {get: function(){return sort;}, set: function(_){sort=_}},
62756
+ key: {get: function(){return key;}, set: function(_){key=_}},
62757
+ // options that require extra logic in the setter
62758
+ margin: {get: function(){return margin;}, set: function(_){
62759
+ margin.top = _.top != undefined ? _.top : margin.top;
62760
+ margin.right = _.right != undefined ? _.right : margin.right;
62761
+ margin.bottom = _.bottom != undefined ? _.bottom : margin.bottom;
62762
+ margin.left = _.left != undefined ? _.left : margin.left;
62763
+ }},
62764
+ color: {get: function(){return color;}, set: function(_){
62765
+ color=nv.utils.getColor(_);
62766
+ }}
62767
+ });
62768
+
62769
+ nv.utils.initOptions(chart);
62770
+ return chart;
62771
+ };
62772
+ nv.models.sunburstChart = function() {
62773
+ "use strict";
62774
+
62775
+ //============================================================
62776
+ // Public Variables with Default Settings
62777
+ //------------------------------------------------------------
62778
+
62779
+ var sunburst = nv.models.sunburst();
62780
+ var tooltip = nv.models.tooltip();
62781
+
62782
+ var margin = {top: 30, right: 20, bottom: 20, left: 20}
62783
+ , width = null
62784
+ , height = null
62785
+ , color = nv.utils.defaultColor()
62786
+ , showTooltipPercent = false
62787
+ , id = Math.round(Math.random() * 100000)
62788
+ , defaultState = null
62789
+ , noData = null
62790
+ , duration = 250
62791
+ , dispatch = d3.dispatch('stateChange', 'changeState','renderEnd');
62792
+
62793
+
62794
+ //============================================================
62795
+ // Private Variables
62796
+ //------------------------------------------------------------
62797
+
62798
+ var renderWatch = nv.utils.renderWatch(dispatch);
62799
+
62800
+ tooltip
62801
+ .duration(0)
62802
+ .headerEnabled(false)
62803
+ .valueFormatter(function(d){return d;});
62804
+
62805
+ //============================================================
62806
+ // Chart function
62807
+ //------------------------------------------------------------
62808
+
62809
+ function chart(selection) {
62810
+ renderWatch.reset();
62811
+ renderWatch.models(sunburst);
62812
+
62813
+ selection.each(function(data) {
62814
+ var container = d3.select(this);
62815
+
62816
+ nv.utils.initSVG(container);
63429
62817
 
62818
+ var availableWidth = nv.utils.availableWidth(width, container, margin);
62819
+ var availableHeight = nv.utils.availableHeight(height, container, margin);
63430
62820
 
63431
- //remove unmatched elements ...
63432
- cG.exit()
63433
- .transition()
63434
- .duration(duration)
63435
- .attr('opacity',0)
63436
- .each('end',function(d){
63437
- var k = key(d);
63438
- prevPositions[k] = undefined;
63439
- })
63440
- .remove();
63441
- });
62821
+ chart.update = function() {
62822
+ if (duration === 0) {
62823
+ container.call(chart);
62824
+ } else {
62825
+ container.transition().duration(duration).call(chart);
62826
+ }
62827
+ };
62828
+ chart.container = container;
63442
62829
 
62830
+ // Display No Data message if there's nothing to show.
62831
+ if (!data || !data.length) {
62832
+ nv.utils.noData(chart, container);
62833
+ return chart;
62834
+ } else {
62835
+ container.selectAll('.nv-noData').remove();
62836
+ }
63443
62837
 
63444
- renderWatch.renderEnd('sunburst immediate');
62838
+ sunburst.width(availableWidth).height(availableHeight).margin(margin);
62839
+ container.call(sunburst);
62840
+ });
62841
+
62842
+ renderWatch.renderEnd('sunburstChart immediate');
63445
62843
  return chart;
63446
62844
  }
63447
62845
 
62846
+ //============================================================
62847
+ // Event Handling/Dispatching (out of chart's scope)
62848
+ //------------------------------------------------------------
62849
+
62850
+ sunburst.dispatch.on('elementMouseover.tooltip', function(evt) {
62851
+ evt.series = {
62852
+ key: evt.data.name,
62853
+ value: (evt.data.value || evt.data.size),
62854
+ color: evt.color,
62855
+ percent: evt.percent
62856
+ };
62857
+ if (!showTooltipPercent) {
62858
+ delete evt.percent;
62859
+ delete evt.series.percent;
62860
+ }
62861
+ tooltip.data(evt).hidden(false);
62862
+ });
62863
+
62864
+ sunburst.dispatch.on('elementMouseout.tooltip', function(evt) {
62865
+ tooltip.hidden(true);
62866
+ });
62867
+
62868
+ sunburst.dispatch.on('elementMousemove.tooltip', function(evt) {
62869
+ tooltip();
62870
+ });
62871
+
63448
62872
  //============================================================
63449
62873
  // Expose Public Variables
63450
62874
  //------------------------------------------------------------
63451
62875
 
62876
+ // expose chart's sub-components
63452
62877
  chart.dispatch = dispatch;
62878
+ chart.sunburst = sunburst;
62879
+ chart.tooltip = tooltip;
63453
62880
  chart.options = nv.utils.optionsFunc.bind(chart);
63454
62881
 
62882
+ // use Object get/set functionality to map between vars and chart functions
63455
62883
  chart._options = Object.create({}, {
63456
62884
  // simple options, just get/set the necessary values
63457
- width: {get: function(){return width;}, set: function(_){width=_;}},
63458
- height: {get: function(){return height;}, set: function(_){height=_;}},
63459
- mode: {get: function(){return mode;}, set: function(_){mode=_;}},
63460
- id: {get: function(){return id;}, set: function(_){id=_;}},
63461
- duration: {get: function(){return duration;}, set: function(_){duration=_;}},
63462
- groupColorByParent: {get: function(){return groupColorByParent;}, set: function(_){groupColorByParent=!!_;}},
63463
- showLabels: {get: function(){return showLabels;}, set: function(_){showLabels=!!_}},
63464
- labelFormat: {get: function(){return labelFormat;}, set: function(_){labelFormat=_}},
63465
- labelThreshold: {get: function(){return labelThreshold;}, set: function(_){labelThreshold=_}},
63466
- sort: {get: function(){return sort;}, set: function(_){sort=_}},
63467
- key: {get: function(){return key;}, set: function(_){key=_}},
62885
+ noData: {get: function(){return noData;}, set: function(_){noData=_;}},
62886
+ defaultState: {get: function(){return defaultState;}, set: function(_){defaultState=_;}},
62887
+ showTooltipPercent: {get: function(){return showTooltipPercent;}, set: function(_){showTooltipPercent=_;}},
62888
+
63468
62889
  // options that require extra logic in the setter
63469
- margin: {get: function(){return margin;}, set: function(_){
63470
- margin.top = _.top != undefined ? _.top : margin.top;
63471
- margin.right = _.right != undefined ? _.right : margin.right;
63472
- margin.bottom = _.bottom != undefined ? _.bottom : margin.bottom;
63473
- margin.left = _.left != undefined ? _.left : margin.left;
63474
- }},
63475
62890
  color: {get: function(){return color;}, set: function(_){
63476
- color=nv.utils.getColor(_);
62891
+ color = _;
62892
+ sunburst.color(color);
62893
+ }},
62894
+ duration: {get: function(){return duration;}, set: function(_){
62895
+ duration = _;
62896
+ renderWatch.reset(duration);
62897
+ sunburst.duration(duration);
62898
+ }},
62899
+ margin: {get: function(){return margin;}, set: function(_){
62900
+ margin.top = _.top !== undefined ? _.top : margin.top;
62901
+ margin.right = _.right !== undefined ? _.right : margin.right;
62902
+ margin.bottom = _.bottom !== undefined ? _.bottom : margin.bottom;
62903
+ margin.left = _.left !== undefined ? _.left : margin.left;
62904
+ sunburst.margin(margin);
63477
62905
  }}
63478
62906
  });
63479
-
62907
+ nv.utils.inheritOptions(chart, sunburst);
63480
62908
  nv.utils.initOptions(chart);
63481
62909
  return chart;
62910
+
62911
+ };
62912
+
62913
+ nv.version = "1.8.6-dev";
62914
+ })();
62915
+ //# sourceMappingURL=nv.d3.js.map
62916
+
62917
+ /***/ }),
62918
+ /* 36 */
62919
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
62920
+
62921
+ "use strict";
62922
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hostReportError; });
62923
+ /** PURE_IMPORTS_START PURE_IMPORTS_END */
62924
+ function hostReportError(err) {
62925
+ setTimeout(function () { throw err; }, 0);
62926
+ }
62927
+ //# sourceMappingURL=hostReportError.js.map
62928
+
62929
+
62930
+ /***/ }),
62931
+ /* 37 */
62932
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
62933
+
62934
+ "use strict";
62935
+
62936
+ // EXTERNAL MODULE: external "@angular/core"
62937
+ var core_ = __webpack_require__(0);
62938
+
62939
+ // EXTERNAL MODULE: ./node_modules/lodash/lodash.js
62940
+ var lodash = __webpack_require__(2);
62941
+
62942
+ // EXTERNAL MODULE: ./.tmp/localization/index.ts + 1 modules
62943
+ var _tmp_localization = __webpack_require__(9);
62944
+
62945
+ // EXTERNAL MODULE: ./.tmp/settings/index.ts + 2 modules
62946
+ var settings = __webpack_require__(16);
62947
+
62948
+ // EXTERNAL MODULE: ./.tmp/logger/index.ts + 2 modules
62949
+ var logger = __webpack_require__(7);
62950
+
62951
+ // EXTERNAL MODULE: ./.tmp/shared/index.ts + 3 modules
62952
+ var shared = __webpack_require__(5);
62953
+
62954
+ // EXTERNAL MODULE: ./.tmp/view/view.service.ts
62955
+ var view_service = __webpack_require__(27);
62956
+
62957
+ // EXTERNAL MODULE: ./.tmp/gui/gui-view.ts + 126 modules
62958
+ var gui_view = __webpack_require__(32);
62959
+
62960
+ // EXTERNAL MODULE: external "rxjs/operators"
62961
+ var operators_ = __webpack_require__(17);
62962
+
62963
+ // CONCATENATED MODULE: ./.tmp/gui/gui-host.ts
62964
+
62965
+
62966
+
62967
+
62968
+
62969
+ class gui_host_GuiHost {
62970
+ constructor(injector, bsModalService, context, guiOptions, el) {
62971
+ this.injector = injector;
62972
+ this.bsModalService = bsModalService;
62973
+ this.context = context;
62974
+ this.guiOptions = guiOptions;
62975
+ this.el = el;
62976
+ this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
62977
+ const toggleViewFunc = (viewIndex, parentContainerId, baseEl) => {
62978
+ this.currentViewIndex = viewIndex;
62979
+ return this.context.configStore.viewStore.getViewConfig(viewIndex).pipe(Object(operators_["map"])(config => {
62980
+ if (this.currentViewIndex !== viewIndex) {
62981
+ return;
62982
+ }
62983
+ if (!config || !config.config || !config.config.length) {
62984
+ throw new shared["a" /* ConfigIsEmptyError */]();
62985
+ }
62986
+ if (this.currentView) {
62987
+ this.currentView.dispose();
62988
+ }
62989
+ this.currentView = new gui_view["a" /* GuiView */](this.injector, this.bsModalService, this.context);
62990
+ const hostGuiOptions = {
62991
+ svgRootClass: this.guiOptions.svgRootClass,
62992
+ hostContainerId: parentContainerId,
62993
+ el: baseEl
62994
+ };
62995
+ this.currentView.load(config, hostGuiOptions);
62996
+ this.currentView.resize(this.currentViewSize, this.currentViewReiszeMode, this.guiOptions.svgRootClass);
62997
+ this.containerEl = $(baseEl.nativeElement).find(`div#${parentContainerId}`).first();
62998
+ this.containerEl.empty();
62999
+ this.containerEl.append(this.currentView.element);
63000
+ this.logger.debug(`[GUI] Toggle View(${viewIndex}) successed.`);
63001
+ }));
63002
+ };
63003
+ injector.get(view_service["a" /* ViewService */]).toggleViews.set(el, toggleViewFunc);
63004
+ }
63005
+ get element() {
63006
+ if (this.containerEl) {
63007
+ return this.containerEl[0];
63008
+ }
63009
+ else {
63010
+ throw new Error('Gui Host not loaded yet.');
63011
+ }
63012
+ }
63013
+ /**
63014
+ * Load gui host and main view.
63015
+ */
63016
+ load(configureViewId) {
63017
+ if (this.isLoaded) {
63018
+ throw new Error('The GuiHost already loaded.');
63019
+ }
63020
+ this.isLoaded = true;
63021
+ this.containerEl = $(`<div class="svg-content" id= "${this.guiOptions.hostContainerId}" style="display:flex;position:relative;"></div>`);
63022
+ const result = new Promise((resolve, reject) => {
63023
+ if (configureViewId && configureViewId !== 0) {
63024
+ this.loadViewConfigByConfigureViewId(resolve, reject, configureViewId);
63025
+ }
63026
+ else {
63027
+ this.loadMainViewConfig(resolve, reject);
63028
+ }
63029
+ });
63030
+ return result;
63031
+ }
63032
+ loadByConfigureViewCode(configureViewCode) {
63033
+ if (this.isLoaded) {
63034
+ throw new Error('The GuiHost already loaded.');
63035
+ }
63036
+ this.isLoaded = true;
63037
+ this.containerEl = $(`<div class="svg-content" id= "${this.guiOptions.hostContainerId}" style="display: inline-block;position: relative;"></div>`);
63038
+ const result = new Promise((resolve, reject) => {
63039
+ if (configureViewCode) {
63040
+ this.loadViewConfigByConfigureViewCode(resolve, reject, configureViewCode);
63041
+ }
63042
+ else {
63043
+ this.loadMainViewConfig(resolve, reject);
63044
+ }
63045
+ });
63046
+ return result;
63047
+ }
63048
+ loadMainViewConfig(resolve, reject) {
63049
+ this.context.configStore.viewStore.getMainViewConfig().subscribe(config => {
63050
+ if (config.config && config.config.length) {
63051
+ this.currentView = new gui_view["a" /* GuiView */](this.injector, this.bsModalService, this.context);
63052
+ this.currentView.load(config, this.guiOptions);
63053
+ this.containerEl.empty();
63054
+ this.containerEl.append(this.currentView.element);
63055
+ resolve(this);
63056
+ this.logger.debug('[GUI] Host loaded.');
63057
+ }
63058
+ else {
63059
+ reject(new shared["a" /* ConfigIsEmptyError */]());
63060
+ }
63061
+ }, error => {
63062
+ this.logger.error('[GUI] Load failed: ' + error.stack);
63063
+ reject(error);
63064
+ });
63065
+ }
63066
+ loadViewConfigByConfigureViewId(resolve, reject, configureViewId) {
63067
+ this.context.configStore.viewStore.getViewConfigByConfigureViewId(configureViewId).subscribe(config => {
63068
+ this.handleViewConfigCallback(resolve, reject, config);
63069
+ }, error => {
63070
+ this.logger.error('[GUI] Load failed: ' + error.stack);
63071
+ reject(error);
63072
+ });
63073
+ }
63074
+ loadViewConfigByConfigureViewCode(resolve, reject, configureViewCode) {
63075
+ this.context.configStore.viewStore.getViewConfigByConfigureViewCode(configureViewCode).subscribe(config => {
63076
+ this.handleViewConfigCallback(resolve, reject, config);
63077
+ }, error => {
63078
+ this.logger.error('[GUI] Load failed: ' + error.stack);
63079
+ reject(error);
63080
+ });
63081
+ }
63082
+ handleViewConfigCallback(resolve, reject, config) {
63083
+ if (!config.config || !config.config.length) {
63084
+ reject(new shared["a" /* ConfigIsEmptyError */]());
63085
+ }
63086
+ this.currentView = new gui_view["a" /* GuiView */](this.injector, this.bsModalService, this.context);
63087
+ this.currentView.load(config, this.guiOptions);
63088
+ this.containerEl.empty();
63089
+ this.containerEl.append(this.currentView.element);
63090
+ resolve(this);
63091
+ this.logger.debug('[GUI] Host loaded.');
63092
+ }
63093
+ /**
63094
+ * Resize current view
63095
+ * @param size : target view size
63096
+ * @param resizeMode : target resize mode
63097
+ */
63098
+ resizeView(size, resizeMode) {
63099
+ if (this.currentView) {
63100
+ this.currentView.resize(size, resizeMode, this.guiOptions.svgRootClass);
63101
+ this.currentViewSize = size;
63102
+ this.currentViewReiszeMode = resizeMode;
63103
+ }
63104
+ }
63105
+ /**
63106
+ * Update current view size;
63107
+ * @param size : target view size
63108
+ */
63109
+ updateViewSize(size) {
63110
+ if (!this.currentView) {
63111
+ return;
63112
+ }
63113
+ this.currentView.resize(size, this.currentViewReiszeMode, this.guiOptions.svgRootClass);
63114
+ this.currentViewSize = size;
63115
+ }
63116
+ /**
63117
+ * Resize current view
63118
+ * @param size : target view size
63119
+ * @param resizeMode : target resize mode
63120
+ */
63121
+ updateViewResizeMode(resizeMode) {
63122
+ if (this.currentView) {
63123
+ this.currentView.resize(this.currentViewSize, resizeMode, this.guiOptions.svgRootClass);
63124
+ this.currentViewReiszeMode = resizeMode;
63125
+ }
63126
+ }
63127
+ dispose() {
63128
+ if (this.currentView) {
63129
+ this.currentView.dispose();
63130
+ }
63131
+ if (this.context) {
63132
+ this.context.dispose();
63133
+ }
63134
+ this.logger.debug('[GUI] GuiHost disposed.');
63135
+ }
63136
+ }
63137
+
63138
+ // EXTERNAL MODULE: ./.tmp/utils/guid.ts
63139
+ var guid = __webpack_require__(28);
63140
+
63141
+ // CONCATENATED MODULE: ./.tmp/gui/gui.component.ts
63142
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return gui_component_GuiComponent; });
63143
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
63144
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
63145
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
63146
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63147
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
63148
+ };
63149
+ var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
63150
+ return function (target, key) { decorator(target, key, paramIndex); }
63151
+ };
63152
+
63153
+
63154
+
63155
+
63156
+
63157
+
63158
+
63159
+ let gui_component_GuiComponent = class GuiComponent {
63160
+ constructor(el, localization, injector, bsModalService) {
63161
+ this.el = el;
63162
+ this.localization = localization;
63163
+ this.injector = injector;
63164
+ this.bsModalService = bsModalService;
63165
+ this.loadFailed = new core_["EventEmitter"]();
63166
+ this.loaded = new core_["EventEmitter"]();
63167
+ this.lastScale = 1;
63168
+ this.isMobileMode = false;
63169
+ this.globalSettings = this.injector.get(settings["b" /* GlobalSettings */]);
63170
+ this.viewService = injector.get(view_service["a" /* ViewService */]);
63171
+ }
63172
+ get viewResizeMode() {
63173
+ switch (this.resizeMode) {
63174
+ case 'HorizontalUniform':
63175
+ return settings["c" /* ViewResizeMode */].HorizontalUniform;
63176
+ default:
63177
+ return settings["c" /* ViewResizeMode */].Uniform;
63178
+ }
63179
+ }
63180
+ ngOnChanges(changes) {
63181
+ if (changes.displayMode) {
63182
+ this.onDisplayModeChanged(changes.displayMode.previousValue, changes.displayMode.currentValue);
63183
+ }
63184
+ if (changes.context) {
63185
+ this.onProviderChanged(changes.context.previousValue, changes.context.currentValue);
63186
+ }
63187
+ if (changes.size) {
63188
+ this.onSizeChanged(changes.size.previousValue, changes.size.currentValue);
63189
+ }
63190
+ if (changes.resizeMode) {
63191
+ this.onResizeModeChanged(changes.resizeMode.previousValue, changes.resizeMode.currentValue);
63192
+ }
63193
+ }
63194
+ doubleFingerZooming() {
63195
+ const scaleElement = this.$svg.find('div.svg-content').first()[0];
63196
+ const self = this;
63197
+ self.initWidth = scaleElement.offsetWidth;
63198
+ self.initHeight = scaleElement.offsetHeight;
63199
+ self.lastScale = 1;
63200
+ scaleElement.addEventListener('touchstart', function (e) {
63201
+ self.pageX = e.targetTouches[0].pageX;
63202
+ self.pageY = e.targetTouches[0].pageY;
63203
+ self.initX = !Object(lodash["isNaN"])(parseInt(scaleElement.style.left, 10)) ? parseInt(scaleElement.style.left, 10) : 0;
63204
+ self.initY = !Object(lodash["isNaN"])(parseInt(scaleElement.style.top, 10)) ? parseInt(scaleElement.style.top, 10) : 0;
63205
+ if (e.touches.length >= 2) {
63206
+ self.startTouch = e.touches;
63207
+ }
63208
+ self.isTouch = true;
63209
+ }, false);
63210
+ scaleElement.addEventListener('touchmove', function (e) {
63211
+ if (e.touches.length === 1 && self.isTouch && self.lastScale > 1) {
63212
+ e.preventDefault();
63213
+ const touchMoveX = e.targetTouches[0].pageX, touchMoveY = e.targetTouches[0].pageY;
63214
+ const left = Number(touchMoveX) - Number(self.pageX) + Number(self.initX);
63215
+ const top = Number(touchMoveY) - Number(self.pageY) + Number(self.initY);
63216
+ if (left > -(self.lastScale - 1) * self.initWidth / 2 && left < (self.lastScale - 1) * self.initWidth / 2) {
63217
+ scaleElement.style.left = left + 'px';
63218
+ }
63219
+ if (top > -(self.lastScale - 1) * self.initHeight / 2 && top < (self.lastScale - 1) * self.initHeight / 2) {
63220
+ scaleElement.style.top = top + 'px';
63221
+ }
63222
+ }
63223
+ if (e.touches.length >= 2 && self.isTouch) {
63224
+ e.preventDefault();
63225
+ const now = e.touches;
63226
+ const scale = (self.getDistance(now[0], now[1]) / self.getDistance(self.startTouch[0], self.startTouch[1]));
63227
+ let nowScale = self.lastScale;
63228
+ if (scale >= 1) {
63229
+ nowScale *= 1.008;
63230
+ }
63231
+ if (nowScale < 1) {
63232
+ nowScale = 1;
63233
+ }
63234
+ if (nowScale > 5) {
63235
+ nowScale = 5;
63236
+ }
63237
+ if (scale < 1) {
63238
+ nowScale *= 0.992;
63239
+ scaleElement.style.left = -(nowScale - 1) * self.initWidth / 8 + 'px';
63240
+ scaleElement.style.top = -(nowScale - 1) * self.initHeight / 8 + 'px';
63241
+ }
63242
+ scaleElement.style.transform = 'scale(' + nowScale + ')';
63243
+ self.lastScale = nowScale;
63244
+ }
63245
+ }, false);
63246
+ scaleElement.addEventListener('touchend', function () {
63247
+ if (self.isTouch) {
63248
+ self.isTouch = false;
63249
+ }
63250
+ }, false);
63251
+ }
63252
+ getDistance(p1, p2) {
63253
+ const x = p2.pageX - p1.pageX, y = p2.pageY - p1.pageY;
63254
+ return Math.sqrt((x * x) + (y * y));
63255
+ }
63256
+ ngOnDestroy() {
63257
+ if (this.host) {
63258
+ this.host.dispose();
63259
+ }
63260
+ }
63261
+ onProviderChanged(oldValue, newValue) {
63262
+ if (Object(lodash["isEqual"])(oldValue, newValue)) {
63263
+ return;
63264
+ }
63265
+ if (this.host) {
63266
+ this.host.dispose();
63267
+ this.host = null;
63268
+ }
63269
+ if (newValue) {
63270
+ this.$svg = $(this.el.nativeElement).find('div.svgView').first();
63271
+ this.$svg.empty();
63272
+ const svgRootClass = 'S' + guid["a" /* Guid */].newGuid().toString('n');
63273
+ this.hostContainerId = 'H' + guid["a" /* Guid */].newGuid().toString('n');
63274
+ this.$svg.addClass(svgRootClass);
63275
+ const guiOptions = {
63276
+ svgRootClass: svgRootClass,
63277
+ hostContainerId: this.hostContainerId,
63278
+ el: this.el
63279
+ };
63280
+ const host = new gui_host_GuiHost(this.injector, this.bsModalService, newValue, guiOptions, this.el);
63281
+ /*
63282
+ * if configureViewCode exist then load by configureViewCode else load by configureViewId
63283
+ */
63284
+ (this.context.configureViewCode ? host.loadByConfigureViewCode(this.context.configureViewCode) :
63285
+ host.load(this.context.configureViewId)).then(t => {
63286
+ // 加载结束后,如果context发生了变化,直接返回。
63287
+ if (!Object(lodash["isEqual"])(this.context, t.context)) {
63288
+ t.dispose();
63289
+ return;
63290
+ }
63291
+ this.host = host;
63292
+ this.host.resizeView(this.size, this.viewResizeMode);
63293
+ this.$svg.append(t.element);
63294
+ if (this.isMobileMode) {
63295
+ this.doubleFingerZooming();
63296
+ }
63297
+ this.loaded.emit();
63298
+ }).catch(error => {
63299
+ this.$svg.append(`<p>${this.localization.loadFailed}</p>`);
63300
+ this.loadFailed.emit(error);
63301
+ });
63302
+ }
63303
+ else {
63304
+ if (this.$svg) {
63305
+ this.$svg.empty();
63306
+ }
63307
+ this.host = null;
63308
+ }
63309
+ }
63310
+ onSizeChanged(oldValue, newValue) {
63311
+ if (!this.host || Object(lodash["isEqual"])(oldValue, newValue)) {
63312
+ return;
63313
+ }
63314
+ this.host.updateViewSize(newValue);
63315
+ if (this.isMobileMode) {
63316
+ this.doubleFingerZooming();
63317
+ }
63318
+ }
63319
+ onResizeModeChanged(oldValue, newValue) {
63320
+ if (!this.host || Object(lodash["isEqual"])(oldValue, newValue)) {
63321
+ return;
63322
+ }
63323
+ this.host.updateViewResizeMode(this.viewResizeMode);
63324
+ }
63325
+ onDisplayModeChanged(oldValue, newValue) {
63326
+ if (Object(lodash["isEqual"])(oldValue, newValue)) {
63327
+ return;
63328
+ }
63329
+ this.isMobileMode = this.displayMode === 'Mobile';
63330
+ this.globalSettings.displayMode = this.isMobileMode ? settings["a" /* DisplayMode */].Mobile : settings["a" /* DisplayMode */].Web;
63331
+ }
63332
+ refreshCurrentPage() {
63333
+ if (this.host.currentViewIndex === undefined) {
63334
+ return false;
63335
+ }
63336
+ const toggleView = this.viewService.toggleViews.get(this.el);
63337
+ if (!toggleView) {
63338
+ return false;
63339
+ }
63340
+ toggleView(this.host.currentViewIndex, this.hostContainerId, this.el).subscribe();
63341
+ return true;
63342
+ }
63482
63343
  };
63483
- nv.models.sunburstChart = function() {
63484
- "use strict";
63485
-
63486
- //============================================================
63487
- // Public Variables with Default Settings
63488
- //------------------------------------------------------------
63489
-
63490
- var sunburst = nv.models.sunburst();
63491
- var tooltip = nv.models.tooltip();
63492
-
63493
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
63494
- , width = null
63495
- , height = null
63496
- , color = nv.utils.defaultColor()
63497
- , showTooltipPercent = false
63498
- , id = Math.round(Math.random() * 100000)
63499
- , defaultState = null
63500
- , noData = null
63501
- , duration = 250
63502
- , dispatch = d3.dispatch('stateChange', 'changeState','renderEnd');
63503
-
63504
-
63505
- //============================================================
63506
- // Private Variables
63507
- //------------------------------------------------------------
63508
-
63509
- var renderWatch = nv.utils.renderWatch(dispatch);
63510
-
63511
- tooltip
63512
- .duration(0)
63513
- .headerEnabled(false)
63514
- .valueFormatter(function(d){return d;});
63515
-
63516
- //============================================================
63517
- // Chart function
63518
- //------------------------------------------------------------
63519
-
63520
- function chart(selection) {
63521
- renderWatch.reset();
63522
- renderWatch.models(sunburst);
63523
-
63524
- selection.each(function(data) {
63525
- var container = d3.select(this);
63344
+ __decorate([
63345
+ Object(core_["Input"])()
63346
+ ], gui_component_GuiComponent.prototype, "context", void 0);
63347
+ __decorate([
63348
+ Object(core_["Input"])()
63349
+ ], gui_component_GuiComponent.prototype, "size", void 0);
63350
+ __decorate([
63351
+ Object(core_["Input"])()
63352
+ ], gui_component_GuiComponent.prototype, "resizeMode", void 0);
63353
+ __decorate([
63354
+ Object(core_["Input"])()
63355
+ ], gui_component_GuiComponent.prototype, "displayMode", void 0);
63356
+ __decorate([
63357
+ Object(core_["Output"])()
63358
+ ], gui_component_GuiComponent.prototype, "loadFailed", void 0);
63359
+ __decorate([
63360
+ Object(core_["Output"])()
63361
+ ], gui_component_GuiComponent.prototype, "loaded", void 0);
63362
+ gui_component_GuiComponent = __decorate([
63363
+ Object(core_["Component"])({
63364
+ selector: 'fc-gui',
63365
+ template: "<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "
63366
+ }),
63367
+ __param(1, Object(core_["Inject"])(_tmp_localization["b" /* LOCALIZATION */]))
63368
+ ], gui_component_GuiComponent);
63526
63369
 
63527
- nv.utils.initSVG(container);
63370
+
63371
+
63372
+ /***/ }),
63373
+ /* 38 */
63374
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
63375
+
63376
+ "use strict";
63377
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WriteValueModalComponent; });
63378
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
63379
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
63380
+ /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
63381
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
63382
+ /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
63383
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
63384
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
63385
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
63386
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63387
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
63388
+ };
63389
+ var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
63390
+ return function (target, key) { decorator(target, key, paramIndex); }
63391
+ };
63528
63392
 
63529
- var availableWidth = nv.utils.availableWidth(width, container, margin);
63530
- var availableHeight = nv.utils.availableHeight(height, container, margin);
63531
63393
 
63532
- chart.update = function() {
63533
- if (duration === 0) {
63534
- container.call(chart);
63535
- } else {
63536
- container.transition().duration(duration).call(chart);
63537
- }
63538
- };
63539
- chart.container = container;
63540
63394
 
63541
- // Display No Data message if there's nothing to show.
63542
- if (!data || !data.length) {
63543
- nv.utils.noData(chart, container);
63544
- return chart;
63545
- } else {
63546
- container.selectAll('.nv-noData').remove();
63395
+ let WriteValueModalComponent = class WriteValueModalComponent {
63396
+ constructor(localization, dataTypeService, fractionDigitService, numericalOperationService, bsModalRef) {
63397
+ this.localization = localization;
63398
+ this.dataTypeService = dataTypeService;
63399
+ this.fractionDigitService = fractionDigitService;
63400
+ this.numericalOperationService = numericalOperationService;
63401
+ this.bsModalRef = bsModalRef;
63402
+ this.writeValueRangeText = '';
63403
+ this.isSubmitting = false;
63404
+ }
63405
+ get invalidErrorText() {
63406
+ return this.localization.loadFailed;
63407
+ }
63408
+ ngOnInit() {
63409
+ this.initData(this.args);
63410
+ this.validate();
63411
+ }
63412
+ initData(option) {
63413
+ this.variableName = option.variableName;
63414
+ this.dataType = option.dataType;
63415
+ this.fBoxDataType = option.fBoxDataType;
63416
+ this.integerDigits = option.integerDigits ? option.integerDigits : 0;
63417
+ this.fractionDigits = option.fractionDigits ? option.fractionDigits : 0;
63418
+ this.valueType = this.dataTypeService.getValueType(option.version, option.dataType);
63419
+ this.pattern = this.dataTypeService.getValuePattern(option.version, option.dataType);
63420
+ this.numericalOperation = option.numericalOperation;
63421
+ this.enableNumericalOperation = this.numericalOperation.enableNumericalOperation ?
63422
+ this.numericalOperation.enableNumericalOperation : false;
63423
+ this.value = '';
63424
+ if (this.args.enableDataParsed) {
63425
+ this.setValueRangeAccordToDataParsed(option);
63426
+ }
63427
+ else {
63428
+ this.writeMaxValue = this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType);
63429
+ this.writeMinValue = this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType);
63430
+ }
63431
+ this.writeValueRangeText = this.getWriteValueRangeText();
63432
+ }
63433
+ setValueRangeAccordToDataParsed(option) {
63434
+ if (this.dataTypeService.isFloat(option.version, this.dataType) || this.enableNumericalOperation) {
63435
+ this.maxValueLimit = this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType);
63436
+ this.minValueLimit = this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType);
63437
+ this.numericalLowerLimit = this.numericalOperation.numericalLowerLimit;
63438
+ this.numericalUpperLimit = this.numericalOperation.numericalUpperLimit;
63439
+ }
63440
+ else {
63441
+ this.maxValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMaxValue(option.version, this.dataType, this.fBoxDataType), -this.fractionDigits);
63442
+ this.minValueLimit = +this.fractionDigitService.movePoint(this.dataTypeService.getMinValue(option.version, this.dataType, this.fBoxDataType), -this.fractionDigits);
63443
+ this.numericalLowerLimit = +this.fractionDigitService.movePoint(this.numericalOperation.numericalLowerLimit, -this.fractionDigits);
63444
+ this.numericalUpperLimit = +this.fractionDigitService.movePoint(this.numericalOperation.numericalUpperLimit, -this.fractionDigits);
63445
+ }
63446
+ const minValue = this.numericalOperationService.getWriteMinValue(this.minValueLimit, this.numericalOperation);
63447
+ const maxValue = this.numericalOperationService.getWriteMaxValue(this.maxValueLimit, this.numericalOperation);
63448
+ const lowerLimitValue = this.numericalOperationService.getWriteMinValue(this.numericalLowerLimit, this.numericalOperation);
63449
+ const upperLimitValue = this.numericalOperationService.getWriteMaxValue(this.numericalUpperLimit, this.numericalOperation);
63450
+ const realMinValue = minValue < maxValue ? minValue : maxValue;
63451
+ const realMaxValue = minValue < maxValue ? maxValue : minValue;
63452
+ const realLowerLimitValue = lowerLimitValue < upperLimitValue ? lowerLimitValue : upperLimitValue;
63453
+ const realUpperLimitValue = lowerLimitValue < upperLimitValue ? upperLimitValue : lowerLimitValue;
63454
+ this.writeMinValue = realMinValue > realLowerLimitValue ? realMinValue : realLowerLimitValue;
63455
+ this.writeMaxValue = realMaxValue < realUpperLimitValue ? realMaxValue : realUpperLimitValue;
63456
+ }
63457
+ getWriteValueRangeText() {
63458
+ let minValue = '';
63459
+ let maxValue = '';
63460
+ if (this.dataTypeService.isHexOrBinaryType(this.args.version, this.dataType)) {
63461
+ minValue = this.writeMinValue.toString(16);
63462
+ maxValue = this.writeMaxValue.toString(16);
63463
+ }
63464
+ else {
63465
+ if (this.args.enableDataParsed && this.fractionDigits > 0) {
63466
+ minValue = this.writeMinValue.toFixed(this.fractionDigits).toString();
63467
+ maxValue = this.writeMaxValue.toFixed(this.fractionDigits).toString();
63547
63468
  }
63548
-
63549
- sunburst.width(availableWidth).height(availableHeight).margin(margin);
63550
- container.call(sunburst);
63469
+ else {
63470
+ minValue = this.writeMinValue.toString();
63471
+ maxValue = this.writeMaxValue.toString();
63472
+ }
63473
+ }
63474
+ return minValue + '~' + maxValue;
63475
+ }
63476
+ save() {
63477
+ this.isSubmitting = true;
63478
+ let value = this.value;
63479
+ const showValue = this.value;
63480
+ if (this.args.enableDataParsed) {
63481
+ if (this.enableNumericalOperation) {
63482
+ value = this.numericalOperationService.getWriteValue(this.args.version, this.value, this.numericalOperation, this.dataType, this.fractionDigits);
63483
+ }
63484
+ else {
63485
+ value = this.formatWriteValue();
63486
+ }
63487
+ }
63488
+ // 处理系统变量"当前语种ID"
63489
+ if (this.variableName === '当前语种ID') {
63490
+ this.handleCurrentLanguageIdSave(value);
63491
+ return;
63492
+ }
63493
+ if (!this.args.releasedVariableService) {
63494
+ this.onClosed({
63495
+ value: value,
63496
+ showValue: showValue,
63497
+ enableNumericalOperation: false,
63498
+ isNumericalOperation: this.isNumericalOperation,
63499
+ variableRwType: 6
63500
+ });
63501
+ return;
63502
+ }
63503
+ this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
63504
+ const valueTransform = JSON.parse(result.valueTransform);
63505
+ if ((valueTransform === null || valueTransform === void 0 ? void 0 : valueTransform.Type) !== 0) {
63506
+ this.isNumericalOperation = true;
63507
+ }
63508
+ this.onClosed({
63509
+ value: value,
63510
+ showValue: showValue,
63511
+ enableNumericalOperation: this.enableNumericalOperation,
63512
+ isNumericalOperation: this.isNumericalOperation,
63513
+ variableRwType: result.variableRwType
63514
+ });
63551
63515
  });
63552
-
63553
- renderWatch.renderEnd('sunburstChart immediate');
63554
- return chart;
63555
63516
  }
63556
-
63557
- //============================================================
63558
- // Event Handling/Dispatching (out of chart's scope)
63559
- //------------------------------------------------------------
63560
-
63561
- sunburst.dispatch.on('elementMouseover.tooltip', function(evt) {
63562
- evt.series = {
63563
- key: evt.data.name,
63564
- value: (evt.data.value || evt.data.size),
63565
- color: evt.color,
63566
- percent: evt.percent
63567
- };
63568
- if (!showTooltipPercent) {
63569
- delete evt.percent;
63570
- delete evt.series.percent;
63517
+ /**
63518
+ * 处理"当前语种ID"系统变量的保存
63519
+ */
63520
+ handleCurrentLanguageIdSave(value) {
63521
+ if (!this.args.guiContext || !this.args.guiContext.updateCurrentLanguageId) {
63522
+ this.showValidationErrorInfo(this.localization.loadFailed);
63523
+ this.isSubmitting = false;
63524
+ return;
63571
63525
  }
63572
- tooltip.data(evt).hidden(false);
63573
- });
63574
-
63575
- sunburst.dispatch.on('elementMouseout.tooltip', function(evt) {
63576
- tooltip.hidden(true);
63577
- });
63578
-
63579
- sunburst.dispatch.on('elementMousemove.tooltip', function(evt) {
63580
- tooltip();
63581
- });
63582
-
63583
- //============================================================
63584
- // Expose Public Variables
63585
- //------------------------------------------------------------
63526
+ // 转换为数字类型
63527
+ const languageId = value === '' || value == null ? null : Number(value);
63528
+ // 调用 GuiContext 的语种切换方法
63529
+ this.args.guiContext.updateCurrentLanguageId(languageId).then(() => {
63530
+ // 语种切换成功,调用 onClosed 回调,让数字显示元件也能更新
63531
+ this.onClosed({
63532
+ value: value,
63533
+ showValue: value,
63534
+ enableNumericalOperation: false,
63535
+ isNumericalOperation: false,
63536
+ variableRwType: 6
63537
+ });
63538
+ }).catch(() => {
63539
+ this.showValidationErrorInfo(this.localization.loadFailed);
63540
+ this.isSubmitting = false;
63541
+ });
63542
+ }
63543
+ close() {
63544
+ this.bsModalRef.hide();
63545
+ }
63546
+ validate(event = null) {
63547
+ if (event && event.keyCode === 13 && !this.validationError) {
63548
+ this.save();
63549
+ return;
63550
+ }
63551
+ // 校验数值必填
63552
+ if (null == this.value || '' === this.value.trim()) {
63553
+ return this.showValidationErrorInfo(this.localization.numericalValueRequired);
63554
+ }
63555
+ // 校验格式
63556
+ if (!new RegExp(this.pattern).test(this.value)) {
63557
+ return this.showValidationErrorInfo(this.localization.invalidNumericalValue);
63558
+ }
63559
+ // 校验小数点位数
63560
+ if (!this.enableNumericalOperation && this.dataTypeService.isSupportFractionDigit(this.args.version, this.dataType)
63561
+ && this.getFractionDigits(this.value) > this.fractionDigits) {
63562
+ return this.showValidationErrorInfo(`${this.localization.fractionDigitsMustLessThan}${this.fractionDigits}`);
63563
+ }
63564
+ // 校验负号
63565
+ if (Object(lodash__WEBPACK_IMPORTED_MODULE_2__["isNil"])(this.args.version) || (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__["isNil"])(this.args.version) && this.args.version < 5)) {
63566
+ if (!this.enableNumericalOperation && !this.dataTypeService.isSignedType(this.args.version, this.dataType) && this.value.startsWith('-')) {
63567
+ return this.showValidationErrorInfo(this.localization.canNotBeNegative);
63568
+ }
63569
+ }
63570
+ if (this.dataTypeService.isBinaryType(this.args.version, this.dataType) || this.dataTypeService.isHexType(this.args.version, this.dataType)) {
63571
+ // 校验数值最大长度
63572
+ const valueMaxLength = this.dataTypeService.getValueMaxLength(this.args.version, this.dataType, this.fBoxDataType);
63573
+ const maxLength = this.integerDigits ? Math.min(this.integerDigits, valueMaxLength) : valueMaxLength;
63574
+ if (this.value.length > maxLength) {
63575
+ return this.showValidationErrorInfo(this.localization.numericalValueTooLong);
63576
+ }
63577
+ }
63578
+ let transportValue;
63579
+ if (this.dataTypeService.isHexOrBinaryType(this.args.version, this.dataType)) {
63580
+ transportValue = this.dataTypeService.formatToDecimal(this.args.version, this.value, this.dataType);
63581
+ }
63582
+ else {
63583
+ transportValue = Number(this.value);
63584
+ }
63585
+ if (Number(transportValue) > this.writeMaxValue || Number(transportValue) < this.writeMinValue) {
63586
+ return this.showValidationErrorInfo(this.localization.valueOutOfRange);
63587
+ }
63588
+ // 没有错误则隐藏错误框
63589
+ this.hideValidationErrorInfo();
63590
+ }
63591
+ showValidationErrorInfo(errorText) {
63592
+ this.validationError = true;
63593
+ this.validationErrorText = errorText;
63594
+ }
63595
+ hideValidationErrorInfo() {
63596
+ this.validationError = false;
63597
+ this.validationErrorText = '';
63598
+ }
63599
+ getFractionDigits(number) {
63600
+ if (number && number.indexOf('.') > 0) {
63601
+ return number.split('.')[1].length;
63602
+ }
63603
+ return 0;
63604
+ }
63605
+ /**
63606
+ * 格式化写入的值
63607
+ * 因为有小数点的数值类型,会被按照小数点位数移位,所以需要在修改前右移小数点位数
63608
+ */
63609
+ formatWriteValue() {
63610
+ if (this.dataTypeService.isSupportFractionDigit(this.args.version, this.dataType) &&
63611
+ !this.dataTypeService.isFloat(this.args.version, this.dataType) && this.fractionDigits) {
63612
+ return this.fractionDigitService.movePoint(this.value, this.fractionDigits);
63613
+ }
63614
+ if (this.dataTypeService.isSupportNumericalOperation(this.args.version, this.dataType)) {
63615
+ this.value = Number(this.value).toString();
63616
+ }
63617
+ return this.value;
63618
+ }
63619
+ };
63620
+ __decorate([
63621
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])()
63622
+ ], WriteValueModalComponent.prototype, "invalidErrorText", null);
63623
+ WriteValueModalComponent = __decorate([
63624
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
63625
+ selector: 'writeValueModal',
63626
+ template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <span class=\"write-value-range\">{{localization.writeValueRange}}:</span> <div class=\"write-value-range\"> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </div> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
63627
+ styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
63628
+ }),
63629
+ __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
63630
+ ], WriteValueModalComponent);
63586
63631
 
63587
- // expose chart's sub-components
63588
- chart.dispatch = dispatch;
63589
- chart.sunburst = sunburst;
63590
- chart.tooltip = tooltip;
63591
- chart.options = nv.utils.optionsFunc.bind(chart);
63632
+
63633
+
63634
+ /***/ }),
63635
+ /* 39 */
63636
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
63637
+
63638
+ "use strict";
63639
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WriteCharacterModalComponent; });
63640
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
63641
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
63642
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
63643
+ /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
63644
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
63645
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
63646
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
63647
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63648
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
63649
+ };
63650
+ var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
63651
+ return function (target, key) { decorator(target, key, paramIndex); }
63652
+ };
63592
63653
 
63593
- // use Object get/set functionality to map between vars and chart functions
63594
- chart._options = Object.create({}, {
63595
- // simple options, just get/set the necessary values
63596
- noData: {get: function(){return noData;}, set: function(_){noData=_;}},
63597
- defaultState: {get: function(){return defaultState;}, set: function(_){defaultState=_;}},
63598
- showTooltipPercent: {get: function(){return showTooltipPercent;}, set: function(_){showTooltipPercent=_;}},
63599
63654
 
63600
- // options that require extra logic in the setter
63601
- color: {get: function(){return color;}, set: function(_){
63602
- color = _;
63603
- sunburst.color(color);
63604
- }},
63605
- duration: {get: function(){return duration;}, set: function(_){
63606
- duration = _;
63607
- renderWatch.reset(duration);
63608
- sunburst.duration(duration);
63609
- }},
63610
- margin: {get: function(){return margin;}, set: function(_){
63611
- margin.top = _.top !== undefined ? _.top : margin.top;
63612
- margin.right = _.right !== undefined ? _.right : margin.right;
63613
- margin.bottom = _.bottom !== undefined ? _.bottom : margin.bottom;
63614
- margin.left = _.left !== undefined ? _.left : margin.left;
63615
- sunburst.margin(margin);
63616
- }}
63617
- });
63618
- nv.utils.inheritOptions(chart, sunburst);
63619
- nv.utils.initOptions(chart);
63620
- return chart;
63621
63655
 
63656
+ let WriteCharacterModalComponent = class WriteCharacterModalComponent {
63657
+ constructor(localization) {
63658
+ this.localization = localization;
63659
+ this._onClosed = new rxjs__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]();
63660
+ }
63661
+ get onClosed() {
63662
+ return this._onClosed;
63663
+ }
63664
+ get invalidErrorText() {
63665
+ return this.localization.loadFailed;
63666
+ }
63667
+ ngOnInit() {
63668
+ this.variableName = this.args.variableName;
63669
+ this.isPassword = this.args.isPassword ? this.args.isPassword : false;
63670
+ this.charCount = this.args.charCount;
63671
+ this.value = '';
63672
+ this.validate();
63673
+ }
63674
+ validate() {
63675
+ // 校验数值必填
63676
+ if (null == this.value || '' === this.value.trim()) {
63677
+ return this.showValidationErrorInfo(this.localization.characterInputRequired);
63678
+ }
63679
+ if (this.value.length > this.charCount) {
63680
+ return this.showValidationErrorInfo(this.localization.characterOutofRange);
63681
+ }
63682
+ this.hideValidationErrorInfo();
63683
+ }
63684
+ showValidationErrorInfo(errorText) {
63685
+ this.validationError = true;
63686
+ this.validationErrorText = errorText;
63687
+ }
63688
+ hideValidationErrorInfo() {
63689
+ this.validationError = false;
63690
+ this.validationErrorText = '';
63691
+ }
63692
+ save() {
63693
+ this.close({ value: this.value });
63694
+ }
63695
+ close(modalResult) {
63696
+ this._onClosed.next(modalResult);
63697
+ this._onClosed.complete();
63698
+ }
63622
63699
  };
63700
+ __decorate([
63701
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])()
63702
+ ], WriteCharacterModalComponent.prototype, "invalidErrorText", null);
63703
+ WriteCharacterModalComponent = __decorate([
63704
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
63705
+ selector: 'writeCharacterModal',
63706
+ template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
63707
+ styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 10px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-character-value { padding-left: 8px; height: 32px; margin-left: 16px; } "]
63708
+ }),
63709
+ __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_2__[/* LOCALIZATION */ "b"]))
63710
+ ], WriteCharacterModalComponent);
63623
63711
 
63624
- nv.version = "1.8.6-dev";
63625
- })();
63626
- //# sourceMappingURL=nv.d3.js.map
63712
+
63627
63713
 
63628
63714
  /***/ }),
63629
63715
  /* 40 */
@@ -65048,7 +65134,7 @@ var $$rxSubscriber = rxSubscriber;
65048
65134
  "use strict";
65049
65135
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; });
65050
65136
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
65051
- /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35);
65137
+ /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
65052
65138
  /** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
65053
65139
 
65054
65140
 
@@ -67723,7 +67809,7 @@ var InnerSubscriber_InnerSubscriber = /*@__PURE__*/ (function (_super) {
67723
67809
  var subscribeToArray = __webpack_require__(275);
67724
67810
 
67725
67811
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/hostReportError.js
67726
- var hostReportError = __webpack_require__(35);
67812
+ var hostReportError = __webpack_require__(36);
67727
67813
 
67728
67814
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js
67729
67815
  /** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
@@ -73457,7 +73543,7 @@ var ngx_bootstrap_tooltip_TooltipModule = /** @class */ (function () {
73457
73543
  //# sourceMappingURL=ngx-bootstrap-tooltip.js.map
73458
73544
 
73459
73545
  // EXTERNAL MODULE: ./.tmp/gui/gui.component.ts + 1 modules
73460
- var gui_component = __webpack_require__(36);
73546
+ var gui_component = __webpack_require__(37);
73461
73547
 
73462
73548
  // EXTERNAL MODULE: ./.tmp/localization/localization.service.ts
73463
73549
  var localization_service = __webpack_require__(19);
@@ -73469,10 +73555,10 @@ var alert_modal_component = __webpack_require__(22);
73469
73555
  var confirm_operation_modal_component = __webpack_require__(21);
73470
73556
 
73471
73557
  // EXTERNAL MODULE: ./.tmp/modal/write-character/write-character-modal.component.ts
73472
- var write_character_modal_component = __webpack_require__(38);
73558
+ var write_character_modal_component = __webpack_require__(39);
73473
73559
 
73474
73560
  // EXTERNAL MODULE: ./.tmp/modal/write-value/write-value-modal.component.ts
73475
- var write_value_modal_component = __webpack_require__(37);
73561
+ var write_value_modal_component = __webpack_require__(38);
73476
73562
 
73477
73563
  // EXTERNAL MODULE: ./.tmp/settings/global-settings.ts
73478
73564
  var global_settings = __webpack_require__(49);
@@ -86208,7 +86294,7 @@ module.exports = g;
86208
86294
 
86209
86295
  "use strict";
86210
86296
  __webpack_require__.r(__webpack_exports__);
86211
- /* harmony import */ var _gui_gui_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
86297
+ /* harmony import */ var _gui_gui_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
86212
86298
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GuiComponent", function() { return _gui_gui_component__WEBPACK_IMPORTED_MODULE_0__["a"]; });
86213
86299
 
86214
86300
  /* harmony import */ var _gui_gui_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32);
@@ -86232,21 +86318,23 @@ __webpack_require__.r(__webpack_exports__);
86232
86318
 
86233
86319
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GraphStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["h"]; });
86234
86320
 
86235
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["p"]; });
86321
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["q"]; });
86322
+
86323
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewModel", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["p"]; });
86236
86324
 
86237
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewModel", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["o"]; });
86325
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["n"]; });
86238
86326
 
86239
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["m"]; });
86327
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["l"]; });
86240
86328
 
86241
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["k"]; });
86329
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataModel", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["k"]; });
86242
86330
 
86243
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataModel", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["j"]; });
86331
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataItemModel", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["j"]; });
86244
86332
 
86245
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataValue", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["l"]; });
86333
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataValue", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["m"]; });
86246
86334
 
86247
86335
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GetHistoryDataArgs", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["d"]; });
86248
86336
 
86249
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VariableStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["n"]; });
86337
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VariableStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["o"]; });
86250
86338
 
86251
86339
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GetVariableNameArgs", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["e"]; });
86252
86340
 
@@ -86266,7 +86354,7 @@ __webpack_require__.r(__webpack_exports__);
86266
86354
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VariableStateEnum", function() { return _communication__WEBPACK_IMPORTED_MODULE_5__["d"]; });
86267
86355
 
86268
86356
  /* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
86269
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _model__WEBPACK_IMPORTED_MODULE_6__) if(["GuiComponent","GuiView","GuiContext","GuiModule","LOGGER_SERVICE_TOKEN","LoggerService","ConsoleLoggerService","StringifyingMap","ConfigStore","Graph","GraphResult","GraphType","GraphStore","ViewStore","ViewModel","ImageStore","HistoryDataStore","HistoryDataModel","HistoryDataValue","GetHistoryDataArgs","VariableStore","GetVariableNameArgs","AlarmsStore","GetAlarmsArgs","VariableCommunicator","VariableValue","VariableState","VariableDefinition","VariableStateEnum","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _model__WEBPACK_IMPORTED_MODULE_6__[key]; }) }(__WEBPACK_IMPORT_KEY__));
86357
+ /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _model__WEBPACK_IMPORTED_MODULE_6__) if(["GuiComponent","GuiView","GuiContext","GuiModule","LOGGER_SERVICE_TOKEN","LoggerService","ConsoleLoggerService","StringifyingMap","ConfigStore","Graph","GraphResult","GraphType","GraphStore","ViewStore","ViewModel","ImageStore","HistoryDataStore","HistoryDataModel","HistoryDataItemModel","HistoryDataValue","GetHistoryDataArgs","VariableStore","GetVariableNameArgs","AlarmsStore","GetAlarmsArgs","VariableCommunicator","VariableValue","VariableState","VariableDefinition","VariableStateEnum","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _model__WEBPACK_IMPORTED_MODULE_6__[key]; }) }(__WEBPACK_IMPORT_KEY__));
86270
86358
  /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9);
86271
86359
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Localization", function() { return _localization__WEBPACK_IMPORTED_MODULE_7__["c"]; });
86272
86360
 
@@ -86323,7 +86411,7 @@ __webpack_require__.r(__webpack_exports__);
86323
86411
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteVariableProtocol", function() { return _remote__WEBPACK_IMPORTED_MODULE_11__["k"]; });
86324
86412
 
86325
86413
  /* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14);
86326
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _service__WEBPACK_IMPORTED_MODULE_12__) if(["GuiComponent","GuiView","GuiContext","GuiModule","LOGGER_SERVICE_TOKEN","LoggerService","ConsoleLoggerService","StringifyingMap","ConfigStore","Graph","GraphResult","GraphType","GraphStore","ViewStore","ViewModel","ImageStore","HistoryDataStore","HistoryDataModel","HistoryDataValue","GetHistoryDataArgs","VariableStore","GetVariableNameArgs","AlarmsStore","GetAlarmsArgs","VariableCommunicator","VariableValue","VariableState","VariableDefinition","VariableStateEnum","Localization","LOCALIZATION","DefaultLocalization","Localization_zh_CN","SecurityChecker","Disposable","ConfigIsEmptyError","OperationHelper","GuiConsts","GraphExtendedStyle","GetReleasedGraphStateResult","GraphStateResult","GetReleasedGraphStates","GraphStateKey","GraphState","RemoteGraphProtocol","RemoteGraphStore","RemoteViewProtocol","RemoteViewStore","ViewResult","RemoteImageProtocol","RemoteImageStore","RemoteVariableCommunicator","RemoteVariableProtocol","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _service__WEBPACK_IMPORTED_MODULE_12__[key]; }) }(__WEBPACK_IMPORT_KEY__));
86414
+ /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _service__WEBPACK_IMPORTED_MODULE_12__) if(["GuiComponent","GuiView","GuiContext","GuiModule","LOGGER_SERVICE_TOKEN","LoggerService","ConsoleLoggerService","StringifyingMap","ConfigStore","Graph","GraphResult","GraphType","GraphStore","ViewStore","ViewModel","ImageStore","HistoryDataStore","HistoryDataModel","HistoryDataItemModel","HistoryDataValue","GetHistoryDataArgs","VariableStore","GetVariableNameArgs","AlarmsStore","GetAlarmsArgs","VariableCommunicator","VariableValue","VariableState","VariableDefinition","VariableStateEnum","Localization","LOCALIZATION","DefaultLocalization","Localization_zh_CN","SecurityChecker","Disposable","ConfigIsEmptyError","OperationHelper","GuiConsts","GraphExtendedStyle","GetReleasedGraphStateResult","GraphStateResult","GetReleasedGraphStates","GraphStateKey","GraphState","RemoteGraphProtocol","RemoteGraphStore","RemoteViewProtocol","RemoteViewStore","ViewResult","RemoteImageProtocol","RemoteImageStore","RemoteVariableCommunicator","RemoteVariableProtocol","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _service__WEBPACK_IMPORTED_MODULE_12__[key]; }) }(__WEBPACK_IMPORT_KEY__));
86327
86415
  /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(7);
86328
86416
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOGGER_SERVICE_TOKEN", function() { return _logger__WEBPACK_IMPORTED_MODULE_13__["b"]; });
86329
86417