@flexem/fc-gui 3.0.0-alpha.126 → 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.
- package/bundles/@flexem/fc-gui.umd.js +1303 -1209
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +4 -4
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/config/history-data/history-data.model.d.ts +7 -1
- package/config/history-data/history-data.model.js +9 -1
- package/config/history-data/history-data.model.metadata.json +1 -1
- package/config/history-data/index.d.ts +1 -1
- package/config/history-data/index.js +1 -1
- package/config/history-data/index.metadata.json +1 -1
- package/elements/historical-curve/historical-curve.element.d.ts +5 -0
- package/elements/historical-curve/historical-curve.element.js +97 -23
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/numerical-display/numerical-display-element.js +4 -1
- package/modal/write-value/write-value-modal.component.js +9 -3
- package/package.json +1 -1
|
@@ -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__, "
|
|
22354
|
-
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "
|
|
22355
|
-
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "
|
|
22356
|
-
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "
|
|
22357
|
-
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "
|
|
22358
|
-
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "
|
|
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__, "
|
|
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__(
|
|
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__(
|
|
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__(
|
|
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
|
-
|
|
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
|
-
|
|
37362
|
-
|
|
37363
|
-
Object(lodash["each"])(
|
|
37364
|
-
|
|
37365
|
-
|
|
37366
|
-
|
|
37367
|
-
|
|
37368
|
-
|
|
37369
|
-
|
|
37370
|
-
|
|
37371
|
-
|
|
37372
|
-
}
|
|
37373
|
-
|
|
37374
|
-
|
|
37375
|
-
|
|
37376
|
-
|
|
37377
|
-
|
|
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
|
-
|
|
37380
|
-
|
|
37381
|
-
|
|
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__(
|
|
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
|
-
|
|
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,1024 +43435,233 @@ var ConditionType;
|
|
|
43349
43435
|
|
|
43350
43436
|
/***/ }),
|
|
43351
43437
|
/* 35 */
|
|
43352
|
-
/***/ (function(module,
|
|
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
|
-
|
|
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
|
-
|
|
43403
|
-
|
|
43404
|
-
|
|
43405
|
-
|
|
43406
|
-
|
|
43407
|
-
|
|
43408
|
-
|
|
43409
|
-
this
|
|
43410
|
-
|
|
43411
|
-
|
|
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
|
-
|
|
43470
|
-
|
|
43471
|
-
|
|
43472
|
-
|
|
43473
|
-
|
|
43474
|
-
|
|
43475
|
-
|
|
43476
|
-
|
|
43477
|
-
|
|
43478
|
-
|
|
43479
|
-
|
|
43480
|
-
|
|
43481
|
-
|
|
43482
|
-
|
|
43483
|
-
|
|
43484
|
-
|
|
43485
|
-
|
|
43486
|
-
|
|
43487
|
-
|
|
43488
|
-
|
|
43489
|
-
|
|
43490
|
-
|
|
43491
|
-
|
|
43492
|
-
|
|
43493
|
-
|
|
43494
|
-
|
|
43495
|
-
|
|
43496
|
-
|
|
43497
|
-
|
|
43498
|
-
|
|
43499
|
-
|
|
43500
|
-
|
|
43501
|
-
|
|
43502
|
-
|
|
43503
|
-
|
|
43504
|
-
|
|
43505
|
-
|
|
43506
|
-
|
|
43507
|
-
|
|
43508
|
-
|
|
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
|
-
|
|
43516
|
-
|
|
43517
|
-
|
|
43518
|
-
|
|
43519
|
-
|
|
43520
|
-
|
|
43521
|
-
|
|
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
|
-
|
|
43528
|
-
|
|
43529
|
-
|
|
43530
|
-
|
|
43531
|
-
|
|
43532
|
-
|
|
43533
|
-
|
|
43534
|
-
|
|
43535
|
-
|
|
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
|
-
|
|
43540
|
-
|
|
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
|
-
|
|
43547
|
-
|
|
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
|
-
|
|
43561
|
-
|
|
43562
|
-
|
|
43563
|
-
|
|
43564
|
-
|
|
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
|
-
|
|
43572
|
-
|
|
43573
|
-
|
|
43574
|
-
|
|
43575
|
-
|
|
43576
|
-
|
|
43577
|
-
|
|
43578
|
-
|
|
43579
|
-
|
|
43580
|
-
|
|
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
|
-
|
|
43583
|
-
|
|
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
|
-
|
|
43593
|
-
|
|
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
|
-
// 更新成功,关闭弹窗
|
|
43964
|
-
this.bsModalRef.hide();
|
|
43965
|
-
}).catch(() => {
|
|
43966
|
-
this.showValidationErrorInfo(this.localization.loadFailed);
|
|
43967
|
-
this.isSubmitting = false;
|
|
43968
|
-
});
|
|
43969
|
-
}
|
|
43970
|
-
close() {
|
|
43971
|
-
this.bsModalRef.hide();
|
|
43972
|
-
}
|
|
43973
|
-
validate(event = null) {
|
|
43974
|
-
if (event && event.keyCode === 13 && !this.validationError) {
|
|
43975
|
-
this.save();
|
|
43976
|
-
return;
|
|
43977
|
-
}
|
|
43978
|
-
// 校验数值必填
|
|
43979
|
-
if (null == this.value || '' === this.value.trim()) {
|
|
43980
|
-
return this.showValidationErrorInfo(this.localization.numericalValueRequired);
|
|
43981
|
-
}
|
|
43982
|
-
// 校验格式
|
|
43983
|
-
if (!new RegExp(this.pattern).test(this.value)) {
|
|
43984
|
-
return this.showValidationErrorInfo(this.localization.invalidNumericalValue);
|
|
43985
|
-
}
|
|
43986
|
-
// 校验小数点位数
|
|
43987
|
-
if (!this.enableNumericalOperation && this.dataTypeService.isSupportFractionDigit(this.args.version, this.dataType)
|
|
43988
|
-
&& this.getFractionDigits(this.value) > this.fractionDigits) {
|
|
43989
|
-
return this.showValidationErrorInfo(`${this.localization.fractionDigitsMustLessThan}${this.fractionDigits}`);
|
|
43990
|
-
}
|
|
43991
|
-
// 校验负号
|
|
43992
|
-
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)) {
|
|
43993
|
-
if (!this.enableNumericalOperation && !this.dataTypeService.isSignedType(this.args.version, this.dataType) && this.value.startsWith('-')) {
|
|
43994
|
-
return this.showValidationErrorInfo(this.localization.canNotBeNegative);
|
|
43995
|
-
}
|
|
43996
|
-
}
|
|
43997
|
-
if (this.dataTypeService.isBinaryType(this.args.version, this.dataType) || this.dataTypeService.isHexType(this.args.version, this.dataType)) {
|
|
43998
|
-
// 校验数值最大长度
|
|
43999
|
-
const valueMaxLength = this.dataTypeService.getValueMaxLength(this.args.version, this.dataType, this.fBoxDataType);
|
|
44000
|
-
const maxLength = this.integerDigits ? Math.min(this.integerDigits, valueMaxLength) : valueMaxLength;
|
|
44001
|
-
if (this.value.length > maxLength) {
|
|
44002
|
-
return this.showValidationErrorInfo(this.localization.numericalValueTooLong);
|
|
44003
|
-
}
|
|
44004
|
-
}
|
|
44005
|
-
let transportValue;
|
|
44006
|
-
if (this.dataTypeService.isHexOrBinaryType(this.args.version, this.dataType)) {
|
|
44007
|
-
transportValue = this.dataTypeService.formatToDecimal(this.args.version, this.value, this.dataType);
|
|
44008
|
-
}
|
|
44009
|
-
else {
|
|
44010
|
-
transportValue = Number(this.value);
|
|
44011
|
-
}
|
|
44012
|
-
if (Number(transportValue) > this.writeMaxValue || Number(transportValue) < this.writeMinValue) {
|
|
44013
|
-
return this.showValidationErrorInfo(this.localization.valueOutOfRange);
|
|
44014
|
-
}
|
|
44015
|
-
// 没有错误则隐藏错误框
|
|
44016
|
-
this.hideValidationErrorInfo();
|
|
44017
|
-
}
|
|
44018
|
-
showValidationErrorInfo(errorText) {
|
|
44019
|
-
this.validationError = true;
|
|
44020
|
-
this.validationErrorText = errorText;
|
|
44021
|
-
}
|
|
44022
|
-
hideValidationErrorInfo() {
|
|
44023
|
-
this.validationError = false;
|
|
44024
|
-
this.validationErrorText = '';
|
|
44025
|
-
}
|
|
44026
|
-
getFractionDigits(number) {
|
|
44027
|
-
if (number && number.indexOf('.') > 0) {
|
|
44028
|
-
return number.split('.')[1].length;
|
|
44029
|
-
}
|
|
44030
|
-
return 0;
|
|
44031
|
-
}
|
|
44032
|
-
/**
|
|
44033
|
-
* 格式化写入的值
|
|
44034
|
-
* 因为有小数点的数值类型,会被按照小数点位数移位,所以需要在修改前右移小数点位数
|
|
44035
|
-
*/
|
|
44036
|
-
formatWriteValue() {
|
|
44037
|
-
if (this.dataTypeService.isSupportFractionDigit(this.args.version, this.dataType) &&
|
|
44038
|
-
!this.dataTypeService.isFloat(this.args.version, this.dataType) && this.fractionDigits) {
|
|
44039
|
-
return this.fractionDigitService.movePoint(this.value, this.fractionDigits);
|
|
44040
|
-
}
|
|
44041
|
-
if (this.dataTypeService.isSupportNumericalOperation(this.args.version, this.dataType)) {
|
|
44042
|
-
this.value = Number(this.value).toString();
|
|
44043
|
-
}
|
|
44044
|
-
return this.value;
|
|
44045
|
-
}
|
|
44046
|
-
};
|
|
44047
|
-
__decorate([
|
|
44048
|
-
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])()
|
|
44049
|
-
], WriteValueModalComponent.prototype, "invalidErrorText", null);
|
|
44050
|
-
WriteValueModalComponent = __decorate([
|
|
44051
|
-
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
44052
|
-
selector: 'writeValueModal',
|
|
44053
|
-
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\">×</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> ",
|
|
44054
|
-
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; } "]
|
|
44055
|
-
}),
|
|
44056
|
-
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
|
|
44057
|
-
], WriteValueModalComponent);
|
|
44058
|
-
|
|
44059
|
-
|
|
44060
|
-
|
|
44061
|
-
/***/ }),
|
|
44062
|
-
/* 38 */
|
|
44063
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
44064
|
-
|
|
44065
|
-
"use strict";
|
|
44066
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WriteCharacterModalComponent; });
|
|
44067
|
-
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
44068
|
-
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
44069
|
-
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
|
|
44070
|
-
/* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
|
|
44071
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
44072
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
44073
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
44074
|
-
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;
|
|
44075
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
44076
|
-
};
|
|
44077
|
-
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
|
|
44078
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
44079
|
-
};
|
|
44080
|
-
|
|
44081
|
-
|
|
44082
|
-
|
|
44083
|
-
let WriteCharacterModalComponent = class WriteCharacterModalComponent {
|
|
44084
|
-
constructor(localization) {
|
|
44085
|
-
this.localization = localization;
|
|
44086
|
-
this._onClosed = new rxjs__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]();
|
|
44087
|
-
}
|
|
44088
|
-
get onClosed() {
|
|
44089
|
-
return this._onClosed;
|
|
44090
|
-
}
|
|
44091
|
-
get invalidErrorText() {
|
|
44092
|
-
return this.localization.loadFailed;
|
|
44093
|
-
}
|
|
44094
|
-
ngOnInit() {
|
|
44095
|
-
this.variableName = this.args.variableName;
|
|
44096
|
-
this.isPassword = this.args.isPassword ? this.args.isPassword : false;
|
|
44097
|
-
this.charCount = this.args.charCount;
|
|
44098
|
-
this.value = '';
|
|
44099
|
-
this.validate();
|
|
44100
|
-
}
|
|
44101
|
-
validate() {
|
|
44102
|
-
// 校验数值必填
|
|
44103
|
-
if (null == this.value || '' === this.value.trim()) {
|
|
44104
|
-
return this.showValidationErrorInfo(this.localization.characterInputRequired);
|
|
44105
|
-
}
|
|
44106
|
-
if (this.value.length > this.charCount) {
|
|
44107
|
-
return this.showValidationErrorInfo(this.localization.characterOutofRange);
|
|
44108
|
-
}
|
|
44109
|
-
this.hideValidationErrorInfo();
|
|
44110
|
-
}
|
|
44111
|
-
showValidationErrorInfo(errorText) {
|
|
44112
|
-
this.validationError = true;
|
|
44113
|
-
this.validationErrorText = errorText;
|
|
44114
|
-
}
|
|
44115
|
-
hideValidationErrorInfo() {
|
|
44116
|
-
this.validationError = false;
|
|
44117
|
-
this.validationErrorText = '';
|
|
44118
|
-
}
|
|
44119
|
-
save() {
|
|
44120
|
-
this.close({ value: this.value });
|
|
44121
|
-
}
|
|
44122
|
-
close(modalResult) {
|
|
44123
|
-
this._onClosed.next(modalResult);
|
|
44124
|
-
this._onClosed.complete();
|
|
44125
|
-
}
|
|
44126
|
-
};
|
|
44127
|
-
__decorate([
|
|
44128
|
-
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])()
|
|
44129
|
-
], WriteCharacterModalComponent.prototype, "invalidErrorText", null);
|
|
44130
|
-
WriteCharacterModalComponent = __decorate([
|
|
44131
|
-
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
44132
|
-
selector: 'writeCharacterModal',
|
|
44133
|
-
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\">×</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> ",
|
|
44134
|
-
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; } "]
|
|
44135
|
-
}),
|
|
44136
|
-
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_2__[/* LOCALIZATION */ "b"]))
|
|
44137
|
-
], WriteCharacterModalComponent);
|
|
44138
|
-
|
|
44139
|
-
|
|
44140
|
-
|
|
44141
|
-
/***/ }),
|
|
44142
|
-
/* 39 */
|
|
44143
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
44144
|
-
|
|
44145
|
-
/* nvd3 version 1.8.6-dev (https://github.com/flexem/nvd3) 2018-08-22 */
|
|
44146
|
-
(function(){
|
|
44147
|
-
|
|
44148
|
-
// set up main nv object
|
|
44149
|
-
var nv = {};
|
|
44150
|
-
|
|
44151
|
-
// the major global objects under the nv namespace
|
|
44152
|
-
nv.dev = false; //set false when in production
|
|
44153
|
-
nv.tooltip = nv.tooltip || {}; // For the tooltip system
|
|
44154
|
-
nv.utils = nv.utils || {}; // Utility subsystem
|
|
44155
|
-
nv.models = nv.models || {}; //stores all the possible models/components
|
|
44156
|
-
nv.charts = {}; //stores all the ready to use charts
|
|
44157
|
-
nv.logs = {}; //stores some statistics and potential error messages
|
|
44158
|
-
nv.dom = {}; //DOM manipulation functions
|
|
44159
|
-
|
|
44160
|
-
// Node/CommonJS - require D3
|
|
44161
|
-
if (typeof(module) !== 'undefined' && typeof(exports) !== 'undefined' && typeof(d3) == 'undefined') {
|
|
44162
|
-
d3 = __webpack_require__(18);
|
|
44163
|
-
}
|
|
44164
|
-
|
|
44165
|
-
nv.dispatch = d3.dispatch('render_start', 'render_end');
|
|
44166
|
-
|
|
44167
|
-
// Function bind polyfill
|
|
44168
|
-
// Needed ONLY for phantomJS as it's missing until version 2.0 which is unreleased as of this comment
|
|
44169
|
-
// https://github.com/ariya/phantomjs/issues/10522
|
|
44170
|
-
// http://kangax.github.io/compat-table/es5/#Function.prototype.bind
|
|
44171
|
-
// phantomJS is used for running the test suite
|
|
44172
|
-
if (!Function.prototype.bind) {
|
|
44173
|
-
Function.prototype.bind = function (oThis) {
|
|
44174
|
-
if (typeof this !== "function") {
|
|
44175
|
-
// closest thing possible to the ECMAScript 5 internal IsCallable function
|
|
44176
|
-
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
|
44177
|
-
}
|
|
44178
|
-
|
|
44179
|
-
var aArgs = Array.prototype.slice.call(arguments, 1),
|
|
44180
|
-
fToBind = this,
|
|
44181
|
-
fNOP = function () {},
|
|
44182
|
-
fBound = function () {
|
|
44183
|
-
return fToBind.apply(this instanceof fNOP && oThis
|
|
44184
|
-
? this
|
|
44185
|
-
: oThis,
|
|
44186
|
-
aArgs.concat(Array.prototype.slice.call(arguments)));
|
|
44187
|
-
};
|
|
44188
|
-
|
|
44189
|
-
fNOP.prototype = this.prototype;
|
|
44190
|
-
fBound.prototype = new fNOP();
|
|
44191
|
-
return fBound;
|
|
44192
|
-
};
|
|
44193
|
-
}
|
|
44194
|
-
|
|
44195
|
-
// Development render timers - disabled if dev = false
|
|
44196
|
-
if (nv.dev) {
|
|
44197
|
-
nv.dispatch.on('render_start', function(e) {
|
|
44198
|
-
nv.logs.startTime = +new Date();
|
|
44199
|
-
});
|
|
44200
|
-
|
|
44201
|
-
nv.dispatch.on('render_end', function(e) {
|
|
44202
|
-
nv.logs.endTime = +new Date();
|
|
44203
|
-
nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
|
|
44204
|
-
nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
|
|
44205
|
-
});
|
|
44206
|
-
}
|
|
44207
|
-
|
|
44208
|
-
// Logs all arguments, and returns the last so you can test things in place
|
|
44209
|
-
// Note: in IE8 console.log is an object not a function, and if modernizr is used
|
|
44210
|
-
// then calling Function.prototype.bind with with anything other than a function
|
|
44211
|
-
// causes a TypeError to be thrown.
|
|
44212
|
-
nv.log = function() {
|
|
44213
|
-
if (nv.dev && window.console && console.log && console.log.apply)
|
|
44214
|
-
console.log.apply(console, arguments);
|
|
44215
|
-
else if (nv.dev && window.console && typeof console.log == "function" && Function.prototype.bind) {
|
|
44216
|
-
var log = Function.prototype.bind.call(console.log, console);
|
|
44217
|
-
log.apply(console, arguments);
|
|
44218
|
-
}
|
|
44219
|
-
return arguments[arguments.length - 1];
|
|
44220
|
-
};
|
|
44221
|
-
|
|
44222
|
-
// print console warning, should be used by deprecated functions
|
|
44223
|
-
nv.deprecated = function(name, info) {
|
|
44224
|
-
if (console && console.warn) {
|
|
44225
|
-
console.warn('nvd3 warning: `' + name + '` has been deprecated. ', info || '');
|
|
44226
|
-
}
|
|
44227
|
-
};
|
|
44228
|
-
|
|
44229
|
-
// The nv.render function is used to queue up chart rendering
|
|
44230
|
-
// in non-blocking async functions.
|
|
44231
|
-
// When all queued charts are done rendering, nv.dispatch.render_end is invoked.
|
|
44232
|
-
nv.render = function render(step) {
|
|
44233
|
-
// number of graphs to generate in each timeout loop
|
|
44234
|
-
step = step || 1;
|
|
44235
|
-
|
|
44236
|
-
nv.render.active = true;
|
|
44237
|
-
nv.dispatch.render_start();
|
|
44238
|
-
|
|
44239
|
-
var renderLoop = function() {
|
|
44240
|
-
var chart, graph;
|
|
44241
|
-
|
|
44242
|
-
for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
|
|
44243
|
-
chart = graph.generate();
|
|
44244
|
-
if (typeof graph.callback == typeof(Function)) graph.callback(chart);
|
|
44245
|
-
}
|
|
44246
|
-
|
|
44247
|
-
nv.render.queue.splice(0, i);
|
|
44248
|
-
|
|
44249
|
-
if (nv.render.queue.length) {
|
|
44250
|
-
setTimeout(renderLoop);
|
|
44251
|
-
}
|
|
44252
|
-
else {
|
|
44253
|
-
nv.dispatch.render_end();
|
|
44254
|
-
nv.render.active = false;
|
|
44255
|
-
}
|
|
44256
|
-
};
|
|
44257
|
-
|
|
44258
|
-
setTimeout(renderLoop);
|
|
44259
|
-
};
|
|
44260
|
-
|
|
44261
|
-
nv.render.active = false;
|
|
44262
|
-
nv.render.queue = [];
|
|
44263
|
-
|
|
44264
|
-
/*
|
|
44265
|
-
Adds a chart to the async rendering queue. This method can take arguments in two forms:
|
|
44266
|
-
nv.addGraph({
|
|
44267
|
-
generate: <Function>
|
|
44268
|
-
callback: <Function>
|
|
44269
|
-
})
|
|
44270
|
-
|
|
44271
|
-
or
|
|
44272
|
-
|
|
44273
|
-
nv.addGraph(<generate Function>, <callback Function>)
|
|
44274
|
-
|
|
44275
|
-
The generate function should contain code that creates the NVD3 model, sets options
|
|
44276
|
-
on it, adds data to an SVG element, and invokes the chart model. The generate function
|
|
44277
|
-
should return the chart model. See examples/lineChart.html for a usage example.
|
|
44278
|
-
|
|
44279
|
-
The callback function is optional, and it is called when the generate function completes.
|
|
44280
|
-
*/
|
|
44281
|
-
nv.addGraph = function(obj) {
|
|
44282
|
-
if (typeof arguments[0] === typeof(Function)) {
|
|
44283
|
-
obj = {generate: arguments[0], callback: arguments[1]};
|
|
44284
|
-
}
|
|
44285
|
-
|
|
44286
|
-
nv.render.queue.push(obj);
|
|
44287
|
-
|
|
44288
|
-
if (!nv.render.active) {
|
|
44289
|
-
nv.render();
|
|
44290
|
-
}
|
|
44291
|
-
};
|
|
44292
|
-
|
|
44293
|
-
// Node/CommonJS exports
|
|
44294
|
-
if (true) {
|
|
44295
|
-
module.exports = nv;
|
|
44296
|
-
}
|
|
44297
|
-
|
|
44298
|
-
if (typeof(window) !== 'undefined') {
|
|
44299
|
-
window.nv = nv;
|
|
44300
|
-
}
|
|
44301
|
-
/* Facade for queueing DOM write operations
|
|
44302
|
-
* with Fastdom (https://github.com/wilsonpage/fastdom)
|
|
44303
|
-
* if available.
|
|
44304
|
-
* This could easily be extended to support alternate
|
|
44305
|
-
* implementations in the future.
|
|
44306
|
-
*/
|
|
44307
|
-
nv.dom.write = function(callback) {
|
|
44308
|
-
if (window.fastdom !== undefined) {
|
|
44309
|
-
return fastdom.mutate(callback);
|
|
44310
|
-
}
|
|
44311
|
-
return callback();
|
|
44312
|
-
};
|
|
44313
|
-
|
|
44314
|
-
/* Facade for queueing DOM read operations
|
|
44315
|
-
* with Fastdom (https://github.com/wilsonpage/fastdom)
|
|
44316
|
-
* if available.
|
|
44317
|
-
* This could easily be extended to support alternate
|
|
44318
|
-
* implementations in the future.
|
|
44319
|
-
*/
|
|
44320
|
-
nv.dom.read = function(callback) {
|
|
44321
|
-
if (window.fastdom !== undefined) {
|
|
44322
|
-
return fastdom.measure(callback);
|
|
44323
|
-
}
|
|
44324
|
-
return callback();
|
|
44325
|
-
};
|
|
44326
|
-
/* Utility class to handle creation of an interactive layer.
|
|
44327
|
-
This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
|
|
44328
|
-
containing the X-coordinate. It can also render a vertical line where the mouse is located.
|
|
44329
|
-
|
|
44330
|
-
dispatch.elementMousemove is the important event to latch onto. It is fired whenever the mouse moves over
|
|
44331
|
-
the rectangle. The dispatch is given one object which contains the mouseX/Y location.
|
|
44332
|
-
It also has 'pointXValue', which is the conversion of mouseX to the x-axis scale.
|
|
44333
|
-
*/
|
|
44334
|
-
nv.interactiveGuideline = function() {
|
|
44335
|
-
"use strict";
|
|
44336
|
-
|
|
44337
|
-
var margin = { left: 0, top: 0 } //Pass the chart's top and left magins. Used to calculate the mouseX/Y.
|
|
44338
|
-
, width = null
|
|
44339
|
-
, height = null
|
|
44340
|
-
, xScale = d3.scale.linear()
|
|
44341
|
-
, dispatch = d3.dispatch('elementMousemove', 'elementMouseout', 'elementClick', 'elementDblclick', 'elementMouseDown', 'elementMouseUp')
|
|
44342
|
-
, showGuideLine = true
|
|
44343
|
-
, svgContainer = null // Must pass the chart's svg, we'll use its mousemove event.
|
|
44344
|
-
, tooltip = nv.models.tooltip()
|
|
44345
|
-
, isMSIE = window.ActiveXObject// Checkt if IE by looking for activeX. (excludes IE11)
|
|
44346
|
-
;
|
|
44347
|
-
|
|
44348
|
-
tooltip
|
|
44349
|
-
.duration(0)
|
|
44350
|
-
.hideDelay(0)
|
|
44351
|
-
.hidden(false);
|
|
44352
|
-
|
|
44353
|
-
function layer(selection) {
|
|
44354
|
-
selection.each(function(data) {
|
|
44355
|
-
var container = d3.select(this);
|
|
44356
|
-
var availableWidth = (width || 960), availableHeight = (height || 400);
|
|
44357
|
-
var wrap = container.selectAll("g.nv-wrap.nv-interactiveLineLayer")
|
|
44358
|
-
.data([data]);
|
|
44359
|
-
var wrapEnter = wrap.enter()
|
|
44360
|
-
.append("g").attr("class", " nv-wrap nv-interactiveLineLayer");
|
|
44361
|
-
wrapEnter.append("g").attr("class","nv-interactiveGuideLine");
|
|
44362
|
-
|
|
44363
|
-
if (!svgContainer) {
|
|
44364
|
-
return;
|
|
44365
|
-
}
|
|
44366
|
-
|
|
44367
|
-
function mouseHandler() {
|
|
44368
|
-
var mouseX = d3.event.clientX - this.getBoundingClientRect().left;
|
|
44369
|
-
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;
|
|
44370
43665
|
|
|
44371
43666
|
var subtractMargin = true;
|
|
44372
43667
|
var mouseOutAnyReason = false;
|
|
@@ -63418,206 +62713,1003 @@ nv.models.sunburst = function() {
|
|
|
63418
62713
|
});
|
|
63419
62714
|
}
|
|
63420
62715
|
|
|
63421
|
-
//zoom out to the center when the data is updated.
|
|
63422
|
-
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);
|
|
63423
62815
|
|
|
62816
|
+
nv.utils.initSVG(container);
|
|
63424
62817
|
|
|
63425
|
-
|
|
63426
|
-
|
|
63427
|
-
.transition()
|
|
63428
|
-
.duration(duration)
|
|
63429
|
-
.attr('opacity',0)
|
|
63430
|
-
.each('end',function(d){
|
|
63431
|
-
var k = key(d);
|
|
63432
|
-
prevPositions[k] = undefined;
|
|
63433
|
-
})
|
|
63434
|
-
.remove();
|
|
63435
|
-
});
|
|
62818
|
+
var availableWidth = nv.utils.availableWidth(width, container, margin);
|
|
62819
|
+
var availableHeight = nv.utils.availableHeight(height, container, margin);
|
|
63436
62820
|
|
|
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;
|
|
63437
62829
|
|
|
63438
|
-
|
|
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
|
+
}
|
|
62837
|
+
|
|
62838
|
+
sunburst.width(availableWidth).height(availableHeight).margin(margin);
|
|
62839
|
+
container.call(sunburst);
|
|
62840
|
+
});
|
|
62841
|
+
|
|
62842
|
+
renderWatch.renderEnd('sunburstChart immediate');
|
|
63439
62843
|
return chart;
|
|
63440
62844
|
}
|
|
63441
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
|
+
|
|
63442
62872
|
//============================================================
|
|
63443
62873
|
// Expose Public Variables
|
|
63444
62874
|
//------------------------------------------------------------
|
|
63445
62875
|
|
|
62876
|
+
// expose chart's sub-components
|
|
63446
62877
|
chart.dispatch = dispatch;
|
|
62878
|
+
chart.sunburst = sunburst;
|
|
62879
|
+
chart.tooltip = tooltip;
|
|
63447
62880
|
chart.options = nv.utils.optionsFunc.bind(chart);
|
|
63448
62881
|
|
|
62882
|
+
// use Object get/set functionality to map between vars and chart functions
|
|
63449
62883
|
chart._options = Object.create({}, {
|
|
63450
62884
|
// simple options, just get/set the necessary values
|
|
63451
|
-
|
|
63452
|
-
|
|
63453
|
-
|
|
63454
|
-
|
|
63455
|
-
duration: {get: function(){return duration;}, set: function(_){duration=_;}},
|
|
63456
|
-
groupColorByParent: {get: function(){return groupColorByParent;}, set: function(_){groupColorByParent=!!_;}},
|
|
63457
|
-
showLabels: {get: function(){return showLabels;}, set: function(_){showLabels=!!_}},
|
|
63458
|
-
labelFormat: {get: function(){return labelFormat;}, set: function(_){labelFormat=_}},
|
|
63459
|
-
labelThreshold: {get: function(){return labelThreshold;}, set: function(_){labelThreshold=_}},
|
|
63460
|
-
sort: {get: function(){return sort;}, set: function(_){sort=_}},
|
|
63461
|
-
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
|
+
|
|
63462
62889
|
// options that require extra logic in the setter
|
|
63463
|
-
margin: {get: function(){return margin;}, set: function(_){
|
|
63464
|
-
margin.top = _.top != undefined ? _.top : margin.top;
|
|
63465
|
-
margin.right = _.right != undefined ? _.right : margin.right;
|
|
63466
|
-
margin.bottom = _.bottom != undefined ? _.bottom : margin.bottom;
|
|
63467
|
-
margin.left = _.left != undefined ? _.left : margin.left;
|
|
63468
|
-
}},
|
|
63469
62890
|
color: {get: function(){return color;}, set: function(_){
|
|
63470
|
-
color=
|
|
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);
|
|
63471
62905
|
}}
|
|
63472
62906
|
});
|
|
63473
|
-
|
|
62907
|
+
nv.utils.inheritOptions(chart, sunburst);
|
|
63474
62908
|
nv.utils.initOptions(chart);
|
|
63475
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
|
+
}
|
|
63476
63343
|
};
|
|
63477
|
-
|
|
63478
|
-
"
|
|
63479
|
-
|
|
63480
|
-
|
|
63481
|
-
|
|
63482
|
-
|
|
63483
|
-
|
|
63484
|
-
|
|
63485
|
-
|
|
63486
|
-
|
|
63487
|
-
|
|
63488
|
-
|
|
63489
|
-
|
|
63490
|
-
|
|
63491
|
-
|
|
63492
|
-
|
|
63493
|
-
|
|
63494
|
-
|
|
63495
|
-
|
|
63496
|
-
|
|
63497
|
-
|
|
63498
|
-
|
|
63499
|
-
|
|
63500
|
-
|
|
63501
|
-
|
|
63502
|
-
|
|
63503
|
-
var renderWatch = nv.utils.renderWatch(dispatch);
|
|
63504
|
-
|
|
63505
|
-
tooltip
|
|
63506
|
-
.duration(0)
|
|
63507
|
-
.headerEnabled(false)
|
|
63508
|
-
.valueFormatter(function(d){return d;});
|
|
63509
|
-
|
|
63510
|
-
//============================================================
|
|
63511
|
-
// Chart function
|
|
63512
|
-
//------------------------------------------------------------
|
|
63513
|
-
|
|
63514
|
-
function chart(selection) {
|
|
63515
|
-
renderWatch.reset();
|
|
63516
|
-
renderWatch.models(sunburst);
|
|
63517
|
-
|
|
63518
|
-
selection.each(function(data) {
|
|
63519
|
-
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);
|
|
63520
63369
|
|
|
63521
|
-
|
|
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
|
+
};
|
|
63522
63392
|
|
|
63523
|
-
var availableWidth = nv.utils.availableWidth(width, container, margin);
|
|
63524
|
-
var availableHeight = nv.utils.availableHeight(height, container, margin);
|
|
63525
63393
|
|
|
63526
|
-
chart.update = function() {
|
|
63527
|
-
if (duration === 0) {
|
|
63528
|
-
container.call(chart);
|
|
63529
|
-
} else {
|
|
63530
|
-
container.transition().duration(duration).call(chart);
|
|
63531
|
-
}
|
|
63532
|
-
};
|
|
63533
|
-
chart.container = container;
|
|
63534
63394
|
|
|
63535
|
-
|
|
63536
|
-
|
|
63537
|
-
|
|
63538
|
-
|
|
63539
|
-
|
|
63540
|
-
|
|
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();
|
|
63541
63468
|
}
|
|
63542
|
-
|
|
63543
|
-
|
|
63544
|
-
|
|
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
|
+
});
|
|
63545
63515
|
});
|
|
63546
|
-
|
|
63547
|
-
renderWatch.renderEnd('sunburstChart immediate');
|
|
63548
|
-
return chart;
|
|
63549
63516
|
}
|
|
63550
|
-
|
|
63551
|
-
|
|
63552
|
-
|
|
63553
|
-
|
|
63554
|
-
|
|
63555
|
-
|
|
63556
|
-
|
|
63557
|
-
|
|
63558
|
-
value: (evt.data.value || evt.data.size),
|
|
63559
|
-
color: evt.color,
|
|
63560
|
-
percent: evt.percent
|
|
63561
|
-
};
|
|
63562
|
-
if (!showTooltipPercent) {
|
|
63563
|
-
delete evt.percent;
|
|
63564
|
-
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;
|
|
63565
63525
|
}
|
|
63566
|
-
|
|
63567
|
-
|
|
63568
|
-
|
|
63569
|
-
|
|
63570
|
-
|
|
63571
|
-
|
|
63572
|
-
|
|
63573
|
-
|
|
63574
|
-
|
|
63575
|
-
|
|
63576
|
-
|
|
63577
|
-
|
|
63578
|
-
|
|
63579
|
-
|
|
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\">×</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);
|
|
63580
63631
|
|
|
63581
|
-
|
|
63582
|
-
|
|
63583
|
-
|
|
63584
|
-
|
|
63585
|
-
|
|
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
|
+
};
|
|
63586
63653
|
|
|
63587
|
-
// use Object get/set functionality to map between vars and chart functions
|
|
63588
|
-
chart._options = Object.create({}, {
|
|
63589
|
-
// simple options, just get/set the necessary values
|
|
63590
|
-
noData: {get: function(){return noData;}, set: function(_){noData=_;}},
|
|
63591
|
-
defaultState: {get: function(){return defaultState;}, set: function(_){defaultState=_;}},
|
|
63592
|
-
showTooltipPercent: {get: function(){return showTooltipPercent;}, set: function(_){showTooltipPercent=_;}},
|
|
63593
63654
|
|
|
63594
|
-
// options that require extra logic in the setter
|
|
63595
|
-
color: {get: function(){return color;}, set: function(_){
|
|
63596
|
-
color = _;
|
|
63597
|
-
sunburst.color(color);
|
|
63598
|
-
}},
|
|
63599
|
-
duration: {get: function(){return duration;}, set: function(_){
|
|
63600
|
-
duration = _;
|
|
63601
|
-
renderWatch.reset(duration);
|
|
63602
|
-
sunburst.duration(duration);
|
|
63603
|
-
}},
|
|
63604
|
-
margin: {get: function(){return margin;}, set: function(_){
|
|
63605
|
-
margin.top = _.top !== undefined ? _.top : margin.top;
|
|
63606
|
-
margin.right = _.right !== undefined ? _.right : margin.right;
|
|
63607
|
-
margin.bottom = _.bottom !== undefined ? _.bottom : margin.bottom;
|
|
63608
|
-
margin.left = _.left !== undefined ? _.left : margin.left;
|
|
63609
|
-
sunburst.margin(margin);
|
|
63610
|
-
}}
|
|
63611
|
-
});
|
|
63612
|
-
nv.utils.inheritOptions(chart, sunburst);
|
|
63613
|
-
nv.utils.initOptions(chart);
|
|
63614
|
-
return chart;
|
|
63615
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
|
+
}
|
|
63616
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\">×</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);
|
|
63617
63711
|
|
|
63618
|
-
|
|
63619
|
-
})();
|
|
63620
|
-
//# sourceMappingURL=nv.d3.js.map
|
|
63712
|
+
|
|
63621
63713
|
|
|
63622
63714
|
/***/ }),
|
|
63623
63715
|
/* 40 */
|
|
@@ -65042,7 +65134,7 @@ var $$rxSubscriber = rxSubscriber;
|
|
|
65042
65134
|
"use strict";
|
|
65043
65135
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; });
|
|
65044
65136
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
|
|
65045
|
-
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
65137
|
+
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
|
|
65046
65138
|
/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
|
|
65047
65139
|
|
|
65048
65140
|
|
|
@@ -67717,7 +67809,7 @@ var InnerSubscriber_InnerSubscriber = /*@__PURE__*/ (function (_super) {
|
|
|
67717
67809
|
var subscribeToArray = __webpack_require__(275);
|
|
67718
67810
|
|
|
67719
67811
|
// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/hostReportError.js
|
|
67720
|
-
var hostReportError = __webpack_require__(
|
|
67812
|
+
var hostReportError = __webpack_require__(36);
|
|
67721
67813
|
|
|
67722
67814
|
// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js
|
|
67723
67815
|
/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
|
|
@@ -73451,7 +73543,7 @@ var ngx_bootstrap_tooltip_TooltipModule = /** @class */ (function () {
|
|
|
73451
73543
|
//# sourceMappingURL=ngx-bootstrap-tooltip.js.map
|
|
73452
73544
|
|
|
73453
73545
|
// EXTERNAL MODULE: ./.tmp/gui/gui.component.ts + 1 modules
|
|
73454
|
-
var gui_component = __webpack_require__(
|
|
73546
|
+
var gui_component = __webpack_require__(37);
|
|
73455
73547
|
|
|
73456
73548
|
// EXTERNAL MODULE: ./.tmp/localization/localization.service.ts
|
|
73457
73549
|
var localization_service = __webpack_require__(19);
|
|
@@ -73463,10 +73555,10 @@ var alert_modal_component = __webpack_require__(22);
|
|
|
73463
73555
|
var confirm_operation_modal_component = __webpack_require__(21);
|
|
73464
73556
|
|
|
73465
73557
|
// EXTERNAL MODULE: ./.tmp/modal/write-character/write-character-modal.component.ts
|
|
73466
|
-
var write_character_modal_component = __webpack_require__(
|
|
73558
|
+
var write_character_modal_component = __webpack_require__(39);
|
|
73467
73559
|
|
|
73468
73560
|
// EXTERNAL MODULE: ./.tmp/modal/write-value/write-value-modal.component.ts
|
|
73469
|
-
var write_value_modal_component = __webpack_require__(
|
|
73561
|
+
var write_value_modal_component = __webpack_require__(38);
|
|
73470
73562
|
|
|
73471
73563
|
// EXTERNAL MODULE: ./.tmp/settings/global-settings.ts
|
|
73472
73564
|
var global_settings = __webpack_require__(49);
|
|
@@ -86202,7 +86294,7 @@ module.exports = g;
|
|
|
86202
86294
|
|
|
86203
86295
|
"use strict";
|
|
86204
86296
|
__webpack_require__.r(__webpack_exports__);
|
|
86205
|
-
/* harmony import */ var _gui_gui_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
86297
|
+
/* harmony import */ var _gui_gui_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
|
|
86206
86298
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GuiComponent", function() { return _gui_gui_component__WEBPACK_IMPORTED_MODULE_0__["a"]; });
|
|
86207
86299
|
|
|
86208
86300
|
/* harmony import */ var _gui_gui_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32);
|
|
@@ -86226,21 +86318,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
86226
86318
|
|
|
86227
86319
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GraphStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["h"]; });
|
|
86228
86320
|
|
|
86229
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ViewStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["
|
|
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"]; });
|
|
86230
86324
|
|
|
86231
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
86325
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["n"]; });
|
|
86232
86326
|
|
|
86233
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
86327
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["l"]; });
|
|
86234
86328
|
|
|
86235
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
86329
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataModel", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["k"]; });
|
|
86236
86330
|
|
|
86237
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
86331
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataItemModel", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["j"]; });
|
|
86238
86332
|
|
|
86239
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataValue", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["
|
|
86333
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HistoryDataValue", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["m"]; });
|
|
86240
86334
|
|
|
86241
86335
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GetHistoryDataArgs", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["d"]; });
|
|
86242
86336
|
|
|
86243
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VariableStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["
|
|
86337
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VariableStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["o"]; });
|
|
86244
86338
|
|
|
86245
86339
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GetVariableNameArgs", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["e"]; });
|
|
86246
86340
|
|
|
@@ -86260,7 +86354,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
86260
86354
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VariableStateEnum", function() { return _communication__WEBPACK_IMPORTED_MODULE_5__["d"]; });
|
|
86261
86355
|
|
|
86262
86356
|
/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
|
|
86263
|
-
/* 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__));
|
|
86264
86358
|
/* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9);
|
|
86265
86359
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Localization", function() { return _localization__WEBPACK_IMPORTED_MODULE_7__["c"]; });
|
|
86266
86360
|
|
|
@@ -86317,7 +86411,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
86317
86411
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteVariableProtocol", function() { return _remote__WEBPACK_IMPORTED_MODULE_11__["k"]; });
|
|
86318
86412
|
|
|
86319
86413
|
/* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14);
|
|
86320
|
-
/* 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__));
|
|
86321
86415
|
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(7);
|
|
86322
86416
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOGGER_SERVICE_TOKEN", function() { return _logger__WEBPACK_IMPORTED_MODULE_13__["b"]; });
|
|
86323
86417
|
|