@flexem/fc-gui 3.0.0-alpha.36 → 3.0.0-alpha.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/bundles/@flexem/fc-gui.umd.js +61 -49
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +2 -2
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/gui/gui-host.d.ts +1 -1
- package/gui/gui.component.d.ts +3 -0
- package/gui/gui.component.js +14 -2
- package/gui/gui.component.metadata.json +1 -1
- package/package.json +1 -1
package/gui/gui-host.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class GuiHost implements Disposable {
|
|
|
13
13
|
readonly el: ElementRef;
|
|
14
14
|
private isLoaded;
|
|
15
15
|
private currentView;
|
|
16
|
-
|
|
16
|
+
currentViewIndex: number;
|
|
17
17
|
private containerEl;
|
|
18
18
|
private currentViewSize;
|
|
19
19
|
private currentViewReiszeMode;
|
package/gui/gui.component.d.ts
CHANGED
|
@@ -24,10 +24,12 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
|
|
|
24
24
|
initHeight: number;
|
|
25
25
|
lastScale: number;
|
|
26
26
|
isMobileMode: boolean;
|
|
27
|
+
hostContainerId: string;
|
|
27
28
|
private $svg;
|
|
28
29
|
private host;
|
|
29
30
|
private get viewResizeMode();
|
|
30
31
|
private readonly globalSettings;
|
|
32
|
+
private readonly viewService;
|
|
31
33
|
constructor(el: ElementRef, localization: Localization, injector: Injector, bsModalService: BsModalService);
|
|
32
34
|
ngOnChanges(changes: {
|
|
33
35
|
[propKey: string]: SimpleChange;
|
|
@@ -39,4 +41,5 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
|
|
|
39
41
|
private onSizeChanged;
|
|
40
42
|
private onResizeModeChanged;
|
|
41
43
|
private onDisplayModeChanged;
|
|
44
|
+
refreshCurrentPage(): void;
|
|
42
45
|
}
|
package/gui/gui.component.js
CHANGED
|
@@ -18,6 +18,7 @@ import { Size } from '../model';
|
|
|
18
18
|
import { DisplayMode, GlobalSettings, ViewResizeMode } from '../settings';
|
|
19
19
|
import { GuiHost } from './gui-host';
|
|
20
20
|
import { Guid } from '../utils/guid';
|
|
21
|
+
import { ViewService } from '../view/view.service';
|
|
21
22
|
let GuiComponent = class GuiComponent {
|
|
22
23
|
constructor(el, localization, injector, bsModalService) {
|
|
23
24
|
this.el = el;
|
|
@@ -29,6 +30,7 @@ let GuiComponent = class GuiComponent {
|
|
|
29
30
|
this.lastScale = 1;
|
|
30
31
|
this.isMobileMode = false;
|
|
31
32
|
this.globalSettings = this.injector.get(GlobalSettings);
|
|
33
|
+
this.viewService = injector.get(ViewService);
|
|
32
34
|
}
|
|
33
35
|
get viewResizeMode() {
|
|
34
36
|
switch (this.resizeMode) {
|
|
@@ -131,11 +133,11 @@ let GuiComponent = class GuiComponent {
|
|
|
131
133
|
this.$svg = $(this.el.nativeElement).find('div.svgView').first();
|
|
132
134
|
this.$svg.empty();
|
|
133
135
|
const svgRootClass = 'S' + Guid.newGuid().toString('n');
|
|
134
|
-
|
|
136
|
+
this.hostContainerId = 'H' + Guid.newGuid().toString('n');
|
|
135
137
|
this.$svg.addClass(svgRootClass);
|
|
136
138
|
const guiOptions = {
|
|
137
139
|
svgRootClass: svgRootClass,
|
|
138
|
-
hostContainerId: hostContainerId,
|
|
140
|
+
hostContainerId: this.hostContainerId,
|
|
139
141
|
el: this.el
|
|
140
142
|
};
|
|
141
143
|
const host = new GuiHost(this.injector, this.bsModalService, newValue, guiOptions, this.el);
|
|
@@ -190,6 +192,16 @@ let GuiComponent = class GuiComponent {
|
|
|
190
192
|
this.isMobileMode = this.displayMode === 'Mobile';
|
|
191
193
|
this.globalSettings.displayMode = this.isMobileMode ? DisplayMode.Mobile : DisplayMode.Web;
|
|
192
194
|
}
|
|
195
|
+
refreshCurrentPage() {
|
|
196
|
+
const viewIndex = this.host.currentViewIndex;
|
|
197
|
+
if (null != viewIndex) {
|
|
198
|
+
const toggleView = this.viewService.toggleViews.get(this.el);
|
|
199
|
+
if (!toggleView) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
toggleView(viewIndex, this.hostContainerId, this.el).subscribe();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
193
205
|
};
|
|
194
206
|
__decorate([
|
|
195
207
|
Input(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"fc-gui","template":"<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "}]}],"members":{"context":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"resizeMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"displayMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":5}}]}],"loadFailed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":49,"character":37},{"__symbolic":"reference","module":"../localization","name":"Localization","line":50,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":51,"character":35},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":52,"character":41}]}],"ngOnChanges":[{"__symbolic":"method"}],"doubleFingerZooming":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onProviderChanged":[{"__symbolic":"method"}],"onSizeChanged":[{"__symbolic":"method"}],"onResizeModeChanged":[{"__symbolic":"method"}],"onDisplayModeChanged":[{"__symbolic":"method"}],"refreshCurrentPage":[{"__symbolic":"method"}]}}}}]
|