@flexem/fc-gui 3.0.0-alpha.94 → 3.0.0-alpha.97

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.
@@ -32,8 +32,6 @@ export declare class HistoricalCurveElement extends ConditionalDisplayElement {
32
32
  private elementStatus;
33
33
  private chartElement;
34
34
  private isMobileMode;
35
- private data;
36
- private timer;
37
35
  constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, historyDataStore: HistoryDataStore, signalRAppId: string);
38
36
  dispose(): void;
39
37
  private getValidTimePeriods;
@@ -42,7 +40,6 @@ export declare class HistoricalCurveElement extends ConditionalDisplayElement {
42
40
  private reRenderElement;
43
41
  private renderElement;
44
42
  private renderChart;
45
- initPoint(): void;
46
43
  private getLineChart;
47
44
  private getMultiBarWithFocusChart;
48
45
  private renderCommonProperty;
@@ -29,7 +29,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
29
29
  operationButtonMargin: 4
30
30
  };
31
31
  this.elementStatus = HistoricalCurveElementStatus.Loading;
32
- this.data = [];
33
32
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
34
33
  this.localization = injector.get(LOCALIZATION);
35
34
  this.timePeriods = this.getValidTimePeriods();
@@ -141,7 +140,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
141
140
  each(result, v => values.push({ x: moment(v.time).local().toDate().valueOf(), y: v.values[key] }));
142
141
  data.push({ key: channel.name, area: channel.projectEnabled, values: values });
143
142
  });
144
- this.data = data;
145
143
  nv.addGraph(() => {
146
144
  if (this.model.displaySetting.curveType === CurveType.BarGroup || this.model.displaySetting.curveType === CurveType.BarStack) {
147
145
  return this.getMultiBarWithFocusChart(chartWidth, chartHeight, data);
@@ -151,50 +149,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
151
149
  }
152
150
  });
153
151
  }
154
- initPoint() {
155
- try {
156
- const legendList = this.$element
157
- .find('.nv-legend')
158
- .find('.nv-series');
159
- let hiddenCount = 0;
160
- for (let i = 0; i < this.data.length; i++) {
161
- const channel = this.model.dataSetting.channels[i];
162
- if (legendList.eq(i).children().eq(0).css('fill-opacity') === '1') {
163
- const pointList = this.$element
164
- .find('.nv-scatterWrap')
165
- .find('.nv-series-' + (i - hiddenCount))
166
- .find('.nv-point');
167
- if (pointList && pointList.length) {
168
- for (let j = 0; j < pointList.length; j++) {
169
- const point = pointList.eq(j);
170
- const previousPoint = pointList.eq(j - 1);
171
- if (j && point.attr('transform').split(',')[1] !== previousPoint.attr('transform').split(',')[1]) {
172
- if (channel.enablePoint && channel.pointColor) {
173
- const pointStyle = {
174
- 'stroke-opacity': 1,
175
- 'stroke-width': '2px',
176
- 'stroke': channel.pointColor,
177
- 'fill-opacity': 1,
178
- 'fill': channel.pointColor
179
- };
180
- point.addClass('nv-mark-point');
181
- point.css(pointStyle);
182
- previousPoint.addClass('nv-mark-point');
183
- previousPoint.css(pointStyle);
184
- }
185
- }
186
- }
187
- }
188
- }
189
- else {
190
- hiddenCount++;
191
- }
192
- }
193
- }
194
- catch (e) {
195
- console.log(e);
196
- }
197
- }
198
152
  getLineChart(chartWidth, chartHeight, data) {
199
153
  const chart = nv.models.lineChart().showLegend(true)
200
154
  .margin({ top: 0, bottom: 0, left: this.displayOption.marginLeft, right: this.displayOption.marginRight })
@@ -210,19 +164,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
210
164
  }
211
165
  this.renderCommonProperty(chart, chartWidth, chartHeight, data);
212
166
  this.renderOperationArea(chartWidth, chartHeight);
213
- this.initPoint();
214
- chart.legend.dispatch.on('legendClick', () => {
215
- setTimeout(() => {
216
- this.$element.find('.nv-mark-point').css({
217
- 'stroke-opacity': 0,
218
- 'stroke-width': 0,
219
- 'stroke': 'unset',
220
- 'fill-opacity': 0,
221
- 'fill': 'unset'
222
- }).removeClass('nv-mark-point');
223
- this.initPoint();
224
- }, 1);
225
- });
226
167
  return chart;
227
168
  }
228
169
  getMultiBarWithFocusChart(chartWidth, chartHeight, data) {
@@ -266,18 +207,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
266
207
  chart.tooltip.headerFormatter(d => this.timeFormat(d, '%x %X'));
267
208
  if (this.model.displaySetting.showAxis) {
268
209
  chart.xAxis.showMaxMin(true).tickFormat(d => {
269
- this.$element.find('.nv-mark-point').css({
270
- 'stroke-opacity': 0,
271
- 'stroke-width': 0,
272
- 'stroke': 'unset',
273
- 'fill-opacity': 0,
274
- 'fill': 'unset'
275
- }).removeClass('nv-mark-point');
276
- clearTimeout(this.timer);
277
- this.timer = undefined;
278
- this.timer = setTimeout(() => {
279
- this.initPoint();
280
- }, 100);
281
210
  if (this.currentTimePeriod === 3 || this.currentTimePeriod === 4 || this.currentTimePeriod === 5) {
282
211
  return this.timeFormat(d, '%y-%m-%d');
283
212
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":21,"character":44},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":65,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":66,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":67,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":68,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":69,"character":23},{"__symbolic":"reference","module":"../../config","name":"HistoryDataStore","line":70,"character":43},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"reRenderElement":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"renderChart":[{"__symbolic":"method"}],"initPoint":[{"__symbolic":"method"}],"getLineChart":[{"__symbolic":"method"}],"getMultiBarWithFocusChart":[{"__symbolic":"method"}],"renderCommonProperty":[{"__symbolic":"method"}],"renderOperationArea":[{"__symbolic":"method"}],"timeFormat":[{"__symbolic":"method"}],"loadFirstPage":[{"__symbolic":"method"}],"loadNextPage":[{"__symbolic":"method"}],"loadPreviousPage":[{"__symbolic":"method"}],"loadLastPage":[{"__symbolic":"method"}],"initElementStatus":[{"__symbolic":"method"}],"updateElementStatus":[{"__symbolic":"method"}],"setStatusAsUnbound":[{"__symbolic":"method"}],"setStatusAsLoading":[{"__symbolic":"method"}],"setStatusAsLoadFailed":[{"__symbolic":"method"}],"renderStatus":[{"__symbolic":"method"}],"clearStatus":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"HistoricalCurveElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":21,"character":44},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":63,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":64,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":65,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":66,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":67,"character":23},{"__symbolic":"reference","module":"../../config","name":"HistoryDataStore","line":68,"character":43},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"getValidTimePeriods":[{"__symbolic":"method"}],"updateTimeRange":[{"__symbolic":"method"}],"updateQueryTimeRange":[{"__symbolic":"method"}],"reRenderElement":[{"__symbolic":"method"}],"renderElement":[{"__symbolic":"method"}],"renderChart":[{"__symbolic":"method"}],"getLineChart":[{"__symbolic":"method"}],"getMultiBarWithFocusChart":[{"__symbolic":"method"}],"renderCommonProperty":[{"__symbolic":"method"}],"renderOperationArea":[{"__symbolic":"method"}],"timeFormat":[{"__symbolic":"method"}],"loadFirstPage":[{"__symbolic":"method"}],"loadNextPage":[{"__symbolic":"method"}],"loadPreviousPage":[{"__symbolic":"method"}],"loadLastPage":[{"__symbolic":"method"}],"initElementStatus":[{"__symbolic":"method"}],"updateElementStatus":[{"__symbolic":"method"}],"setStatusAsUnbound":[{"__symbolic":"method"}],"setStatusAsLoading":[{"__symbolic":"method"}],"setStatusAsLoadFailed":[{"__symbolic":"method"}],"renderStatus":[{"__symbolic":"method"}],"clearStatus":[{"__symbolic":"method"}]}}}}]
@@ -113,12 +113,7 @@ export class VideoElement extends ConditionalDisplayElement {
113
113
  else if (isIos) {
114
114
  this.setIosVideo(this.videoUrl, videoId);
115
115
  }
116
- try {
117
- this.videoPlayer = new EZUIPlayer(videoId);
118
- }
119
- catch (err) {
120
- console.log(err);
121
- }
116
+ this.videoPlayer = new EZUIPlayer(videoId);
122
117
  }, 1000);
123
118
  const style = document.createElement('style');
124
119
  style.innerHTML = `#${videoId}::-webkit-media-controls-enclosure {
@@ -110,24 +110,13 @@ let WriteValueModalComponent = class WriteValueModalComponent {
110
110
  value = this.formatWriteValue();
111
111
  }
112
112
  }
113
- if (!this.args.releasedVariableService) {
114
- this.onClosed({
115
- value: value,
116
- showValue: showValue,
117
- enableNumericalOperation: false,
118
- isNumericalOperation: this.isNumericalOperation,
119
- variableRwType: 6
120
- });
121
- return;
122
- }
123
113
  this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
124
114
  const valueTransform = JSON.parse(result.valueTransform);
125
- if (valueTransform.Type !== 0) {
115
+ if ((valueTransform === null || valueTransform === void 0 ? void 0 : valueTransform.Type) !== 0) {
126
116
  this.isNumericalOperation = true;
127
117
  }
128
118
  this.onClosed({
129
- value: value,
130
- showValue: showValue,
119
+ value, showValue,
131
120
  enableNumericalOperation: this.enableNumericalOperation,
132
121
  isNumericalOperation: this.isNumericalOperation,
133
122
  variableRwType: result.variableRwType
@@ -7,14 +7,6 @@ export interface HistroicalCurveChannelModel {
7
7
  * 连接线颜色
8
8
  */
9
9
  readonly connectorColor: string;
10
- /**
11
- * 启用标记点
12
- */
13
- readonly enablePoint: boolean;
14
- /**
15
- * 标记点颜色
16
- */
17
- readonly pointColor: string;
18
10
  /**
19
11
  * 是否投影颜色
20
12
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.94",
3
+ "version": "3.0.0-alpha.97",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",