ato-water-lib 0.0.33 → 0.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/ng-package.json +11 -0
- package/package.json +3 -22
- package/src/lib/ato-water-lib.component.spec.ts +23 -0
- package/src/lib/ato-water-lib.component.ts +15 -0
- package/src/lib/ato-water-lib.module.ts +31 -0
- package/src/lib/ato-water-lib.service.spec.ts +16 -0
- package/src/lib/ato-water-lib.service.ts +9 -0
- package/src/lib/components/asset-flow/asset-flow.component.html +21 -0
- package/src/lib/components/asset-flow/asset-flow.component.scss +4 -0
- package/src/lib/components/asset-flow/asset-flow.component.spec.ts +23 -0
- package/src/lib/components/asset-flow/asset-flow.component.ts +137 -0
- package/src/lib/components/asset-params-view/asset-params-view.component.html +85 -0
- package/src/lib/components/asset-params-view/asset-params-view.component.scss +37 -0
- package/src/lib/components/asset-params-view/asset-params-view.component.spec.ts +23 -0
- package/src/lib/components/asset-params-view/asset-params-view.component.ts +16 -0
- package/src/lib/components/flow-diagram-lib/flow-diagram-lib.component.css +0 -0
- package/src/lib/components/flow-diagram-lib/flow-diagram-lib.component.html +25 -0
- package/src/lib/components/flow-diagram-lib/flow-diagram-lib.component.ts +69 -0
- package/src/lib/constants/applicable-prefixes-const.ts +452 -0
- package/src/lib/constants/base64.const.ts +5 -0
- package/src/lib/constants/components-group-const.ts +1637 -0
- package/src/lib/constants/icon-base64.const.ts +3 -0
- package/src/lib/constants/icon-svg.const.ts +8 -0
- package/src/lib/constants/key.const.ts +5 -0
- package/src/lib/constants/plant.constant.ts +52 -0
- package/src/lib/constants/value.const.ts +822 -0
- package/src/lib/directive/ato-loading.directive.ts +55 -0
- package/src/lib/directive/ng-var.directive.ts +28 -0
- package/src/lib/models/default-gojs-editor.model.ts +4906 -0
- package/{lib/models/gojs-data.model.d.ts → src/lib/models/gojs-data.model.ts} +3 -3
- package/src/lib/models/gojs-editor.model.ts +1901 -0
- package/src/lib/services/utils/utils.service.ts +141 -0
- package/{public-api.d.ts → src/public-api.ts} +10 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2020/ato-water-lib.mjs +0 -5
- package/esm2020/lib/ato-water-lib.component.mjs +0 -19
- package/esm2020/lib/ato-water-lib.module.mjs +0 -49
- package/esm2020/lib/ato-water-lib.service.mjs +0 -14
- package/esm2020/lib/components/asset-flow/asset-flow.component.mjs +0 -121
- package/esm2020/lib/components/asset-params-view/asset-params-view.component.mjs +0 -26
- package/esm2020/lib/components/flow-diagram-lib/flow-diagram-lib.component.mjs +0 -54
- package/esm2020/lib/constants/applicable-prefixes-const.mjs +0 -441
- package/esm2020/lib/constants/base64.const.mjs +0 -5
- package/esm2020/lib/constants/components-group-const.mjs +0 -1476
- package/esm2020/lib/constants/icon-base64.const.mjs +0 -4
- package/esm2020/lib/constants/key.const.mjs +0 -4
- package/esm2020/lib/constants/plant.constant.mjs +0 -51
- package/esm2020/lib/constants/value.const.mjs +0 -782
- package/esm2020/lib/directive/ato-loading.directive.mjs +0 -55
- package/esm2020/lib/directive/ng-var.directive.mjs +0 -31
- package/esm2020/lib/models/default-gojs-editor.model.mjs +0 -3227
- package/esm2020/lib/models/gojs-data.model.mjs +0 -6
- package/esm2020/lib/models/gojs-editor.model.mjs +0 -1754
- package/esm2020/lib/services/utils/utils.service.mjs +0 -133
- package/esm2020/public-api.mjs +0 -15
- package/fesm2015/ato-water-lib.mjs +0 -8018
- package/fesm2015/ato-water-lib.mjs.map +0 -1
- package/fesm2020/ato-water-lib.mjs +0 -8205
- package/fesm2020/ato-water-lib.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/ato-water-lib.component.d.ts +0 -5
- package/lib/ato-water-lib.module.d.ts +0 -13
- package/lib/ato-water-lib.service.d.ts +0 -6
- package/lib/components/asset-flow/asset-flow.component.d.ts +0 -1336
- package/lib/components/asset-params-view/asset-params-view.component.d.ts +0 -10
- package/lib/components/flow-diagram-lib/flow-diagram-lib.component.d.ts +0 -16
- package/lib/constants/applicable-prefixes-const.d.ts +0 -162
- package/lib/constants/base64.const.d.ts +0 -3
- package/lib/constants/components-group-const.d.ts +0 -1561
- package/lib/constants/icon-base64.const.d.ts +0 -3
- package/lib/constants/key.const.d.ts +0 -1
- package/lib/constants/plant.constant.d.ts +0 -7
- package/lib/constants/value.const.d.ts +0 -71
- package/lib/directive/ato-loading.directive.d.ts +0 -14
- package/lib/directive/ng-var.directive.d.ts +0 -12
- package/lib/models/default-gojs-editor.model.d.ts +0 -197
- package/lib/models/gojs-editor.model.d.ts +0 -436
- package/lib/services/utils/utils.service.d.ts +0 -24
@@ -0,0 +1,55 @@
|
|
1
|
+
import { Directive, ElementRef, Renderer2, Input, OnChanges, SimpleChanges } from '@angular/core';
|
2
|
+
|
3
|
+
@Directive({
|
4
|
+
selector: '[atoLoading]'
|
5
|
+
})
|
6
|
+
export class AtoLoadingDirective implements OnChanges {
|
7
|
+
|
8
|
+
@Input() appLoading: boolean;
|
9
|
+
|
10
|
+
private spinnerWrapper: HTMLElement;
|
11
|
+
|
12
|
+
constructor(private el: ElementRef, private renderer: Renderer2) {
|
13
|
+
this.spinnerWrapper = this.renderer.createElement('div');
|
14
|
+
this.renderer.setStyle(this.spinnerWrapper, 'position', 'absolute');
|
15
|
+
this.renderer.setStyle(this.spinnerWrapper, 'top', '0');
|
16
|
+
this.renderer.setStyle(this.spinnerWrapper, 'left', '0');
|
17
|
+
this.renderer.setStyle(this.spinnerWrapper, 'width', '100%');
|
18
|
+
this.renderer.setStyle(this.spinnerWrapper, 'height', '100%');
|
19
|
+
this.renderer.setStyle(this.spinnerWrapper, 'display', 'flex');
|
20
|
+
this.renderer.setStyle(this.spinnerWrapper, 'align-items', 'center');
|
21
|
+
this.renderer.setStyle(this.spinnerWrapper, 'justify-content', 'center');
|
22
|
+
this.renderer.setStyle(this.spinnerWrapper, 'background', 'rgba(255, 255, 255, 0.7)');
|
23
|
+
this.renderer.setStyle(this.spinnerWrapper, 'z-index', '10');
|
24
|
+
|
25
|
+
const spinner = this.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B2YWx1ZXM9IjAgNTAgLTExMDs5MCA1MCAtMTEwIiBrZXlUaW1lcz0iMDsxIiBzdHlsZT0iYW5pbWF0aW9uLXBsYXktc3RhdGU6IHJ1bm5pbmc7IGFuaW1hdGlvbi1kZWxheTogMHM7Ij48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgoKICA8cmVjdCB4PSItMTAwIiB5PSItMjcwIiB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgcng9IjEwMCIgcnk9IjEwMCIgZmlsbD0iI2ZmZmZmZiIgb3BhY2l0eT0iMC40IiBzdHlsZT0iYW5pbWF0aW9uLXBsYXktc3RhdGU6IHJ1bm5pbmc7IGFuaW1hdGlvbi1kZWxheTogMHM7Ij4KICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiBkdXI9IjMuMDMwMzAzMDMwMzAzMDMwM3MiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiB2YWx1ZXM9IjAgNTAgLTEyMDs5MCA1MCAtMTIwIiBrZXlUaW1lcz0iMDsxIiBzdHlsZT0iYW5pbWF0aW9uLXBsYXktc3RhdGU6IHJ1bm5pbmc7IGFuaW1hdGlvbi1kZWxheTogMHM7Ij48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgoKPC9nPgo8IS0tIFtsZGlvXSBnZW5lcmF0ZWQgYnkgaHR0cHM6Ly9sb2FkaW5nLmlvLyAtLT48L3N2Zz4=');
|
27
|
+
this.renderer.setStyle(spinner, 'width', '30px');
|
28
|
+
this.renderer.setStyle(spinner, 'height', '30px');
|
29
|
+
this.renderer.setStyle(spinner, 'border-radius', '50%');
|
30
|
+
|
31
|
+
this.renderer.appendChild(this.spinnerWrapper, spinner);
|
32
|
+
}
|
33
|
+
|
34
|
+
ngOnChanges(changes: SimpleChanges): void {
|
35
|
+
if (changes['appLoading']) {
|
36
|
+
if (this.appLoading) {
|
37
|
+
this.showSpinner();
|
38
|
+
} else {
|
39
|
+
this.hideSpinner();
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
private showSpinner(): void {
|
45
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
|
46
|
+
this.renderer.appendChild(this.el.nativeElement, this.spinnerWrapper);
|
47
|
+
}
|
48
|
+
|
49
|
+
private hideSpinner(): void {
|
50
|
+
if (this.el.nativeElement.contains(this.spinnerWrapper)) {
|
51
|
+
this.renderer.removeChild(this.el.nativeElement, this.spinnerWrapper);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';
|
2
|
+
|
3
|
+
@Directive({
|
4
|
+
selector: '[ngAtoVar]',
|
5
|
+
})
|
6
|
+
export class AtoNgVarDirective {
|
7
|
+
@Input()
|
8
|
+
set ngAtoVar(context: unknown) {
|
9
|
+
this.context.$implicit = this.context.ngAtoVar = context;
|
10
|
+
|
11
|
+
if (!this.hasView) {
|
12
|
+
this.vcRef.createEmbeddedView(this.templateRef, this.context);
|
13
|
+
this.hasView = true;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
private context: {
|
18
|
+
$implicit: unknown;
|
19
|
+
ngAtoVar: unknown;
|
20
|
+
} = {
|
21
|
+
$implicit: null,
|
22
|
+
ngAtoVar: null,
|
23
|
+
};
|
24
|
+
|
25
|
+
private hasView: boolean = false;
|
26
|
+
|
27
|
+
constructor(private templateRef: TemplateRef<any>, private vcRef: ViewContainerRef) {}
|
28
|
+
}
|