ato-water-lib 0.0.10 → 0.0.11
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/public-api.mjs +4 -1
- package/fesm2015/ato-water-lib.mjs +90 -5
- package/fesm2015/ato-water-lib.mjs.map +1 -1
- package/fesm2020/ato-water-lib.mjs +90 -5
- 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
@@ -7735,7 +7735,7 @@ class AssetFlowComponent {
|
|
7735
7735
|
// linkFromPortIdProperty: 'fromPort',
|
7736
7736
|
// linkToPortIdProperty: 'toPort',
|
7737
7737
|
// };
|
7738
|
-
this.getDefaultFlowData();
|
7738
|
+
this.flowData = this.getDefaultFlowData();
|
7739
7739
|
}
|
7740
7740
|
onClickParamOfTable($event) {
|
7741
7741
|
this.onClickParamOfTableEvent.emit($event);
|
@@ -7766,14 +7766,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7766
7766
|
type: Input
|
7767
7767
|
}] } });
|
7768
7768
|
|
7769
|
+
class AtoLoadingDirective {
|
7770
|
+
constructor(el, renderer) {
|
7771
|
+
this.el = el;
|
7772
|
+
this.renderer = renderer;
|
7773
|
+
// Tạo phần tử spinner wrapper
|
7774
|
+
this.spinnerWrapper = this.renderer.createElement('div');
|
7775
|
+
this.renderer.setStyle(this.spinnerWrapper, 'position', 'absolute');
|
7776
|
+
this.renderer.setStyle(this.spinnerWrapper, 'top', '0');
|
7777
|
+
this.renderer.setStyle(this.spinnerWrapper, 'left', '0');
|
7778
|
+
this.renderer.setStyle(this.spinnerWrapper, 'width', '100%');
|
7779
|
+
this.renderer.setStyle(this.spinnerWrapper, 'height', '100%');
|
7780
|
+
this.renderer.setStyle(this.spinnerWrapper, 'display', 'flex');
|
7781
|
+
this.renderer.setStyle(this.spinnerWrapper, 'align-items', 'center');
|
7782
|
+
this.renderer.setStyle(this.spinnerWrapper, 'justify-content', 'center');
|
7783
|
+
this.renderer.setStyle(this.spinnerWrapper, 'background', 'rgba(255, 255, 255, 0.7)');
|
7784
|
+
this.renderer.setStyle(this.spinnerWrapper, 'z-index', '10');
|
7785
|
+
// Tạo phần tử spinner icon (sử dụng hình ảnh base64)
|
7786
|
+
const spinner = this.renderer.createElement('img');
|
7787
|
+
// this.renderer.setAttribute(spinner, 'src', 'data:image/gif;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ibWFyZ2luOiBhdXRvOyBiYWNrZ3JvdW5kOiByZ2IoMjU1LCAyNTUsIDI1NSk7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IGFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyIgd2lkdGg9Ijg4cHgiIGhlaWdodD0iODhweCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KPGRlZnMgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyI+CiAgPG1hc2sgaWQ9ImxkaW8tdmN5YjQ1YmFvdWstbWFzayIgc3R5bGU9ImFuaW1hdGlvbi1wbGF5LXN0YXRlOiBydW5uaW5nOyBhbmltYXRpb24tZGVsYXk6IDBzOyI+CiAgICA8cmVjdCB4PSIwI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sZGlvXSBnZW5lcmF0ZWQgYnkgaHR0cHM6Ly9sb2FkaW5nLmlvLyAtLT48L3N2Zz4=');
|
7788
|
+
this.renderer.setProperty(spinner, 'innerHTML', `
|
7789
|
+
<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">
|
7790
|
+
<defs style="animation-play-state: running; animation-delay: 0s;">
|
7791
|
+
<mask id="ldio-vcyb45baouk-mask" style="animation-play-state: running; animation-delay: 0s;">
|
7792
|
+
<rect x="0" y="0" width="100" height="100" fill="white" style="animation-play-state: running; animation-delay: 0s;"/>
|
7793
|
+
</mask>
|
7794
|
+
</defs>
|
7795
|
+
<rect x="0" y="0" width="100" height="100" fill="#5caaea" style="animation-play-state: running; animation-delay: 0s;"/>
|
7796
|
+
<g mask="url(#ldio-vcyb45baouk-mask)" style="animation-play-state: running; animation-delay: 0s;">
|
7797
|
+
<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;">
|
7798
|
+
<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;"/>
|
7799
|
+
</rect>
|
7800
|
+
|
7801
|
+
<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;">
|
7802
|
+
<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;"/>
|
7803
|
+
</rect>
|
7804
|
+
|
7805
|
+
<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;">
|
7806
|
+
<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;"/>
|
7807
|
+
</rect>
|
7808
|
+
|
7809
|
+
</g>
|
7810
|
+
<!-- [ldio] generated by https://loading.io/ --></svg>
|
7811
|
+
`);
|
7812
|
+
this.renderer.setStyle(spinner, 'width', '40px');
|
7813
|
+
this.renderer.setStyle(spinner, 'height', '40px');
|
7814
|
+
// Thêm spinner vào spinner wrapper
|
7815
|
+
this.renderer.appendChild(this.spinnerWrapper, spinner);
|
7816
|
+
}
|
7817
|
+
ngOnChanges(changes) {
|
7818
|
+
if (changes['appLoading']) {
|
7819
|
+
if (this.appLoading) {
|
7820
|
+
this.showSpinner();
|
7821
|
+
}
|
7822
|
+
else {
|
7823
|
+
this.hideSpinner();
|
7824
|
+
}
|
7825
|
+
}
|
7826
|
+
}
|
7827
|
+
showSpinner() {
|
7828
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
|
7829
|
+
this.renderer.setStyle(this.el.nativeElement, 'filter', 'blur(2px)');
|
7830
|
+
this.renderer.appendChild(this.el.nativeElement, this.spinnerWrapper);
|
7831
|
+
}
|
7832
|
+
hideSpinner() {
|
7833
|
+
this.renderer.removeStyle(this.el.nativeElement, 'filter');
|
7834
|
+
if (this.el.nativeElement.contains(this.spinnerWrapper)) {
|
7835
|
+
this.renderer.removeChild(this.el.nativeElement, this.spinnerWrapper);
|
7836
|
+
}
|
7837
|
+
}
|
7838
|
+
}
|
7839
|
+
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 });
|
7840
|
+
AtoLoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: { appLoading: "appLoading" }, usesOnChanges: true, ngImport: i0 });
|
7841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoLoadingDirective, decorators: [{
|
7842
|
+
type: Directive,
|
7843
|
+
args: [{
|
7844
|
+
selector: '[atoLoading]'
|
7845
|
+
}]
|
7846
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { appLoading: [{
|
7847
|
+
type: Input
|
7848
|
+
}] } });
|
7849
|
+
|
7769
7850
|
class AtoWaterLibModule {
|
7770
7851
|
}
|
7771
7852
|
AtoWaterLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
7772
7853
|
AtoWaterLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, declarations: [AtoWaterLibComponent,
|
7773
7854
|
AtoFlowDiagramLibComponent,
|
7774
|
-
AssetFlowComponent
|
7855
|
+
AssetFlowComponent,
|
7856
|
+
AtoLoadingDirective], imports: [CommonModule], exports: [AtoWaterLibComponent,
|
7775
7857
|
AtoFlowDiagramLibComponent,
|
7776
|
-
AssetFlowComponent
|
7858
|
+
AssetFlowComponent,
|
7859
|
+
AtoLoadingDirective] });
|
7777
7860
|
AtoWaterLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule] });
|
7778
7861
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, decorators: [{
|
7779
7862
|
type: NgModule,
|
@@ -7782,6 +7865,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7782
7865
|
AtoWaterLibComponent,
|
7783
7866
|
AtoFlowDiagramLibComponent,
|
7784
7867
|
AssetFlowComponent,
|
7868
|
+
AtoLoadingDirective,
|
7785
7869
|
],
|
7786
7870
|
imports: [
|
7787
7871
|
CommonModule
|
@@ -7789,7 +7873,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7789
7873
|
exports: [
|
7790
7874
|
AtoWaterLibComponent,
|
7791
7875
|
AtoFlowDiagramLibComponent,
|
7792
|
-
AssetFlowComponent
|
7876
|
+
AssetFlowComponent,
|
7877
|
+
AtoLoadingDirective
|
7793
7878
|
]
|
7794
7879
|
}]
|
7795
7880
|
}] });
|
@@ -7802,5 +7887,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7802
7887
|
* Generated bundle index. Do not edit.
|
7803
7888
|
*/
|
7804
7889
|
|
7805
|
-
export { AssetFlowComponent, AtoFlowDiagramLibComponent, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
|
7890
|
+
export { AssetFlowComponent, AtoFlowDiagramLibComponent, AtoLoadingDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
|
7806
7891
|
//# sourceMappingURL=ato-water-lib.mjs.map
|