ato-water-lib 0.0.10 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/icon1.png +0 -0
- package/esm2020/lib/ato-water-lib.module.mjs +9 -4
- package/esm2020/lib/components/asset-flow/asset-flow.component.mjs +2 -2
- package/esm2020/lib/directive/ato-loading.directive.mjs +83 -0
- package/esm2020/lib/models/default-gojs-editor.model.mjs +3 -2
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/ato-water-lib.mjs +92 -6
- package/fesm2015/ato-water-lib.mjs.map +1 -1
- package/fesm2020/ato-water-lib.mjs +92 -6
- package/fesm2020/ato-water-lib.mjs.map +1 -1
- package/lib/ato-water-lib.module.d.ts +3 -2
- package/lib/directive/ato-loading.directive.d.ts +14 -0
- package/package.json +6 -3
- package/public-api.d.ts +1 -0
@@ -3507,7 +3507,8 @@ class AtoDefaultGojsEditor {
|
|
3507
3507
|
if (this.animationInterval) {
|
3508
3508
|
clearInterval(this.animationInterval);
|
3509
3509
|
}
|
3510
|
-
|
3510
|
+
const diagramDiv = document.getElementById(`${this.myDiagramDiv}`);
|
3511
|
+
this.myDiagram = this.$(go.Diagram, diagramDiv, this.initialOptions);
|
3511
3512
|
// this.myDiagram.initialPosition = new go.Point(0, 0);
|
3512
3513
|
this.addOrRemoveCompoentTemplate();
|
3513
3514
|
this.makeLinkTemplate();
|
@@ -7735,7 +7736,7 @@ class AssetFlowComponent {
|
|
7735
7736
|
// linkFromPortIdProperty: 'fromPort',
|
7736
7737
|
// linkToPortIdProperty: 'toPort',
|
7737
7738
|
// };
|
7738
|
-
this.getDefaultFlowData();
|
7739
|
+
this.flowData = this.getDefaultFlowData();
|
7739
7740
|
}
|
7740
7741
|
onClickParamOfTable($event) {
|
7741
7742
|
this.onClickParamOfTableEvent.emit($event);
|
@@ -7766,14 +7767,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7766
7767
|
type: Input
|
7767
7768
|
}] } });
|
7768
7769
|
|
7770
|
+
class AtoLoadingDirective {
|
7771
|
+
constructor(el, renderer) {
|
7772
|
+
this.el = el;
|
7773
|
+
this.renderer = renderer;
|
7774
|
+
// Tạo phần tử spinner wrapper
|
7775
|
+
this.spinnerWrapper = this.renderer.createElement('div');
|
7776
|
+
this.renderer.setStyle(this.spinnerWrapper, 'position', 'absolute');
|
7777
|
+
this.renderer.setStyle(this.spinnerWrapper, 'top', '0');
|
7778
|
+
this.renderer.setStyle(this.spinnerWrapper, 'left', '0');
|
7779
|
+
this.renderer.setStyle(this.spinnerWrapper, 'width', '100%');
|
7780
|
+
this.renderer.setStyle(this.spinnerWrapper, 'height', '100%');
|
7781
|
+
this.renderer.setStyle(this.spinnerWrapper, 'display', 'flex');
|
7782
|
+
this.renderer.setStyle(this.spinnerWrapper, 'align-items', 'center');
|
7783
|
+
this.renderer.setStyle(this.spinnerWrapper, 'justify-content', 'center');
|
7784
|
+
this.renderer.setStyle(this.spinnerWrapper, 'background', 'rgba(255, 255, 255, 0.7)');
|
7785
|
+
this.renderer.setStyle(this.spinnerWrapper, 'z-index', '10');
|
7786
|
+
// Tạo phần tử spinner icon (sử dụng hình ảnh base64)
|
7787
|
+
const spinner = this.renderer.createElement('img');
|
7788
|
+
// this.renderer.setAttribute(spinner, 'src', 'data:image/gif;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ibWFyZ2luOiBhdXRvOyBiYWNrZ3JvdW5kOiByZ2IoMjU1LCAyNTUsIDI1NSk7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IGFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyIgd2lkdGg9Ijg4cHgiIG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F0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiBkdXI9IjMuMDMwMzAzMDMwMzAzMDMwM3MiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiB2YWx1ZXM9IjAgNTAgLTEyMDs5MCA1MCAtMTIwIiBrZXlUaW1lcz0iMDsxIiBzdHlsZT0iYW5pbWF0aW9uLXBsYXktc3RhdGU6IHJ1bm5pbmc7IGFuaW1hdGlvbi1kZWxheTogMHM7Ij48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgoKPC9nPgo8IS0tIFtsZGlvXSBnZW5lcmF0ZWQgYnkgaHR0cHM6Ly9sb2FkaW5nLmlvLyAtLT48L3N2Zz4=');
|
7789
|
+
this.renderer.setProperty(spinner, 'innerHTML', `
|
7790
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto; animation-play-state: running; animation-delay: 0s;" width="88px" height="88px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
7791
|
+
<defs style="animation-play-state: running; animation-delay: 0s;">
|
7792
|
+
<mask id="ldio-vcyb45baouk-mask" style="animation-play-state: running; animation-delay: 0s;">
|
7793
|
+
<rect x="0" y="0" width="100" height="100" fill="white" style="animation-play-state: running; animation-delay: 0s;"/>
|
7794
|
+
</mask>
|
7795
|
+
</defs>
|
7796
|
+
<rect x="0" y="0" width="100" height="100" fill="#5caaea" style="animation-play-state: running; animation-delay: 0s;"/>
|
7797
|
+
<g mask="url(#ldio-vcyb45baouk-mask)" style="animation-play-state: running; animation-delay: 0s;">
|
7798
|
+
<rect x="-100" y="-250" width="300" height="300" rx="90" ry="90" fill="#82ceff" opacity="0.4" style="animation-play-state: running; animation-delay: 0s;">
|
7799
|
+
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" values="0 50 -100;90 50 -100" keyTimes="0;1" style="animation-play-state: running; animation-delay: 0s;"/>
|
7800
|
+
</rect>
|
7801
|
+
|
7802
|
+
<rect x="-100" y="-260" width="300" height="300" rx="95" ry="95" fill="#a5dcff" opacity="0.4" style="animation-play-state: running; animation-delay: 0s;">
|
7803
|
+
<animateTransform attributeName="transform" type="rotate" dur="1.5151515151515151s" repeatCount="indefinite" values="0 50 -110;90 50 -110" keyTimes="0;1" style="animation-play-state: running; animation-delay: 0s;"/>
|
7804
|
+
</rect>
|
7805
|
+
|
7806
|
+
<rect x="-100" y="-270" width="300" height="300" rx="100" ry="100" fill="#ffffff" opacity="0.4" style="animation-play-state: running; animation-delay: 0s;">
|
7807
|
+
<animateTransform attributeName="transform" type="rotate" dur="3.0303030303030303s" repeatCount="indefinite" values="0 50 -120;90 50 -120" keyTimes="0;1" style="animation-play-state: running; animation-delay: 0s;"/>
|
7808
|
+
</rect>
|
7809
|
+
|
7810
|
+
</g>
|
7811
|
+
<!-- [ldio] generated by https://loading.io/ --></svg>
|
7812
|
+
`);
|
7813
|
+
this.renderer.setStyle(spinner, 'width', '40px');
|
7814
|
+
this.renderer.setStyle(spinner, 'height', '40px');
|
7815
|
+
// Thêm spinner vào spinner wrapper
|
7816
|
+
this.renderer.appendChild(this.spinnerWrapper, spinner);
|
7817
|
+
}
|
7818
|
+
ngOnChanges(changes) {
|
7819
|
+
if (changes['appLoading']) {
|
7820
|
+
if (this.appLoading) {
|
7821
|
+
this.showSpinner();
|
7822
|
+
}
|
7823
|
+
else {
|
7824
|
+
this.hideSpinner();
|
7825
|
+
}
|
7826
|
+
}
|
7827
|
+
}
|
7828
|
+
showSpinner() {
|
7829
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
|
7830
|
+
this.renderer.setStyle(this.el.nativeElement, 'filter', 'blur(2px)');
|
7831
|
+
this.renderer.appendChild(this.el.nativeElement, this.spinnerWrapper);
|
7832
|
+
}
|
7833
|
+
hideSpinner() {
|
7834
|
+
this.renderer.removeStyle(this.el.nativeElement, 'filter');
|
7835
|
+
if (this.el.nativeElement.contains(this.spinnerWrapper)) {
|
7836
|
+
this.renderer.removeChild(this.el.nativeElement, this.spinnerWrapper);
|
7837
|
+
}
|
7838
|
+
}
|
7839
|
+
}
|
7840
|
+
AtoLoadingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoLoadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
7841
|
+
AtoLoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: { appLoading: "appLoading" }, usesOnChanges: true, ngImport: i0 });
|
7842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoLoadingDirective, decorators: [{
|
7843
|
+
type: Directive,
|
7844
|
+
args: [{
|
7845
|
+
selector: '[atoLoading]'
|
7846
|
+
}]
|
7847
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { appLoading: [{
|
7848
|
+
type: Input
|
7849
|
+
}] } });
|
7850
|
+
|
7769
7851
|
class AtoWaterLibModule {
|
7770
7852
|
}
|
7771
7853
|
AtoWaterLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
7772
7854
|
AtoWaterLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, declarations: [AtoWaterLibComponent,
|
7773
7855
|
AtoFlowDiagramLibComponent,
|
7774
|
-
AssetFlowComponent
|
7856
|
+
AssetFlowComponent,
|
7857
|
+
AtoLoadingDirective], imports: [CommonModule], exports: [AtoWaterLibComponent,
|
7775
7858
|
AtoFlowDiagramLibComponent,
|
7776
|
-
AssetFlowComponent
|
7859
|
+
AssetFlowComponent,
|
7860
|
+
AtoLoadingDirective] });
|
7777
7861
|
AtoWaterLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule] });
|
7778
7862
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, decorators: [{
|
7779
7863
|
type: NgModule,
|
@@ -7782,6 +7866,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7782
7866
|
AtoWaterLibComponent,
|
7783
7867
|
AtoFlowDiagramLibComponent,
|
7784
7868
|
AssetFlowComponent,
|
7869
|
+
AtoLoadingDirective,
|
7785
7870
|
],
|
7786
7871
|
imports: [
|
7787
7872
|
CommonModule
|
@@ -7789,7 +7874,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7789
7874
|
exports: [
|
7790
7875
|
AtoWaterLibComponent,
|
7791
7876
|
AtoFlowDiagramLibComponent,
|
7792
|
-
AssetFlowComponent
|
7877
|
+
AssetFlowComponent,
|
7878
|
+
AtoLoadingDirective
|
7793
7879
|
]
|
7794
7880
|
}]
|
7795
7881
|
}] });
|
@@ -7802,5 +7888,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7802
7888
|
* Generated bundle index. Do not edit.
|
7803
7889
|
*/
|
7804
7890
|
|
7805
|
-
export { AssetFlowComponent, AtoFlowDiagramLibComponent, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
|
7891
|
+
export { AssetFlowComponent, AtoFlowDiagramLibComponent, AtoLoadingDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
|
7806
7892
|
//# sourceMappingURL=ato-water-lib.mjs.map
|