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
package/esm2020/public-api.mjs
CHANGED
@@ -4,6 +4,9 @@
|
|
4
4
|
export * from './lib/ato-water-lib.service';
|
5
5
|
export * from './lib/ato-water-lib.component';
|
6
6
|
export * from './lib/ato-water-lib.module';
|
7
|
+
// Component
|
7
8
|
export * from './lib/components/flow-diagram-lib/flow-diagram-lib.component';
|
8
9
|
export * from './lib/components/asset-flow/asset-flow.component';
|
9
|
-
|
10
|
+
// Directive
|
11
|
+
export * from './lib/directive/ato-loading.directive';
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2F0by13YXRlci1saWIvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxZQUFZO0FBQ1osY0FBYyw4REFBOEQsQ0FBQztBQUM3RSxjQUFjLGtEQUFrRCxDQUFDO0FBQ2pFLFlBQVk7QUFDWixjQUFjLHVDQUF1QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBhdG8td2F0ZXItbGliXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYXRvLXdhdGVyLWxpYi5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F0by13YXRlci1saWIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2F0by13YXRlci1saWIubW9kdWxlJztcbi8vIENvbXBvbmVudFxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9mbG93LWRpYWdyYW0tbGliL2Zsb3ctZGlhZ3JhbS1saWIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvYXNzZXQtZmxvdy9hc3NldC1mbG93LmNvbXBvbmVudCc7XG4vLyBEaXJlY3RpdmVcbmV4cG9ydCAqIGZyb20gJy4vbGliL2RpcmVjdGl2ZS9hdG8tbG9hZGluZy5kaXJlY3RpdmUnO1xuXG5cblxuIl19
|
@@ -3518,7 +3518,8 @@ class AtoDefaultGojsEditor {
|
|
3518
3518
|
if (this.animationInterval) {
|
3519
3519
|
clearInterval(this.animationInterval);
|
3520
3520
|
}
|
3521
|
-
|
3521
|
+
const diagramDiv = document.getElementById(`${this.myDiagramDiv}`);
|
3522
|
+
this.myDiagram = this.$(go.Diagram, diagramDiv, this.initialOptions);
|
3522
3523
|
// this.myDiagram.initialPosition = new go.Point(0, 0);
|
3523
3524
|
this.addOrRemoveCompoentTemplate();
|
3524
3525
|
this.makeLinkTemplate();
|
@@ -7637,7 +7638,7 @@ class AssetFlowComponent {
|
|
7637
7638
|
// linkFromPortIdProperty: 'fromPort',
|
7638
7639
|
// linkToPortIdProperty: 'toPort',
|
7639
7640
|
// };
|
7640
|
-
this.getDefaultFlowData();
|
7641
|
+
this.flowData = this.getDefaultFlowData();
|
7641
7642
|
}
|
7642
7643
|
onClickParamOfTable($event) {
|
7643
7644
|
this.onClickParamOfTableEvent.emit($event);
|
@@ -7664,14 +7665,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7664
7665
|
type: Input
|
7665
7666
|
}] } });
|
7666
7667
|
|
7668
|
+
class AtoLoadingDirective {
|
7669
|
+
constructor(el, renderer) {
|
7670
|
+
this.el = el;
|
7671
|
+
this.renderer = renderer;
|
7672
|
+
// Tạo phần tử spinner wrapper
|
7673
|
+
this.spinnerWrapper = this.renderer.createElement('div');
|
7674
|
+
this.renderer.setStyle(this.spinnerWrapper, 'position', 'absolute');
|
7675
|
+
this.renderer.setStyle(this.spinnerWrapper, 'top', '0');
|
7676
|
+
this.renderer.setStyle(this.spinnerWrapper, 'left', '0');
|
7677
|
+
this.renderer.setStyle(this.spinnerWrapper, 'width', '100%');
|
7678
|
+
this.renderer.setStyle(this.spinnerWrapper, 'height', '100%');
|
7679
|
+
this.renderer.setStyle(this.spinnerWrapper, 'display', 'flex');
|
7680
|
+
this.renderer.setStyle(this.spinnerWrapper, 'align-items', 'center');
|
7681
|
+
this.renderer.setStyle(this.spinnerWrapper, 'justify-content', 'center');
|
7682
|
+
this.renderer.setStyle(this.spinnerWrapper, 'background', 'rgba(255, 255, 255, 0.7)');
|
7683
|
+
this.renderer.setStyle(this.spinnerWrapper, 'z-index', '10');
|
7684
|
+
// Tạo phần tử spinner icon (sử dụng hình ảnh base64)
|
7685
|
+
const spinner = this.renderer.createElement('img');
|
7686
|
+
// this.renderer.setAttribute(spinner, 'src', 'data:image/gif;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHls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3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgcng9IjEwMCIgcnk9IjEwMCIgZmlsbD0iI2ZmZmZmZiIgb3BhY2l0eT0iMC40IiBzdHlsZT0iYW5pbWF0aW9uLXBsYXktc3RhdGU6IHJ1bm5pbmc7IGFuaW1hdGlvbi1kZWxheTogMHM7Ij4KICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiBkdXI9IjMuMDMwMzAzMDMwMzAzMDMwM3MiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiB2YWx1ZXM9IjAgNTAgLTEyMDs5MCA1MCAtMTIwIiBrZXlUaW1lcz0iMDsxIiBzdHlsZT0iYW5pbWF0aW9uLXBsYXktc3RhdGU6IHJ1bm5pbmc7IGFuaW1hdGlvbi1kZWxheTogMHM7Ij48L2FuaW1hdGVUcmFuc2Zvcm0+CiAgPC9yZWN0PgoKPC9nPgo8IS0tIFtsZGlvXSBnZW5lcmF0ZWQgYnkgaHR0cHM6Ly9sb2FkaW5nLmlvLyAtLT48L3N2Zz4=');
|
7687
|
+
this.renderer.setProperty(spinner, 'innerHTML', `
|
7688
|
+
<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">
|
7689
|
+
<defs style="animation-play-state: running; animation-delay: 0s;">
|
7690
|
+
<mask id="ldio-vcyb45baouk-mask" style="animation-play-state: running; animation-delay: 0s;">
|
7691
|
+
<rect x="0" y="0" width="100" height="100" fill="white" style="animation-play-state: running; animation-delay: 0s;"/>
|
7692
|
+
</mask>
|
7693
|
+
</defs>
|
7694
|
+
<rect x="0" y="0" width="100" height="100" fill="#5caaea" style="animation-play-state: running; animation-delay: 0s;"/>
|
7695
|
+
<g mask="url(#ldio-vcyb45baouk-mask)" style="animation-play-state: running; animation-delay: 0s;">
|
7696
|
+
<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;">
|
7697
|
+
<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;"/>
|
7698
|
+
</rect>
|
7699
|
+
|
7700
|
+
<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;">
|
7701
|
+
<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;"/>
|
7702
|
+
</rect>
|
7703
|
+
|
7704
|
+
<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;">
|
7705
|
+
<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;"/>
|
7706
|
+
</rect>
|
7707
|
+
|
7708
|
+
</g>
|
7709
|
+
<!-- [ldio] generated by https://loading.io/ --></svg>
|
7710
|
+
`);
|
7711
|
+
this.renderer.setStyle(spinner, 'width', '40px');
|
7712
|
+
this.renderer.setStyle(spinner, 'height', '40px');
|
7713
|
+
// Thêm spinner vào spinner wrapper
|
7714
|
+
this.renderer.appendChild(this.spinnerWrapper, spinner);
|
7715
|
+
}
|
7716
|
+
ngOnChanges(changes) {
|
7717
|
+
if (changes['appLoading']) {
|
7718
|
+
if (this.appLoading) {
|
7719
|
+
this.showSpinner();
|
7720
|
+
}
|
7721
|
+
else {
|
7722
|
+
this.hideSpinner();
|
7723
|
+
}
|
7724
|
+
}
|
7725
|
+
}
|
7726
|
+
showSpinner() {
|
7727
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
|
7728
|
+
this.renderer.setStyle(this.el.nativeElement, 'filter', 'blur(2px)');
|
7729
|
+
this.renderer.appendChild(this.el.nativeElement, this.spinnerWrapper);
|
7730
|
+
}
|
7731
|
+
hideSpinner() {
|
7732
|
+
this.renderer.removeStyle(this.el.nativeElement, 'filter');
|
7733
|
+
if (this.el.nativeElement.contains(this.spinnerWrapper)) {
|
7734
|
+
this.renderer.removeChild(this.el.nativeElement, this.spinnerWrapper);
|
7735
|
+
}
|
7736
|
+
}
|
7737
|
+
}
|
7738
|
+
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 });
|
7739
|
+
AtoLoadingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AtoLoadingDirective, selector: "[atoLoading]", inputs: { appLoading: "appLoading" }, usesOnChanges: true, ngImport: i0 });
|
7740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoLoadingDirective, decorators: [{
|
7741
|
+
type: Directive,
|
7742
|
+
args: [{
|
7743
|
+
selector: '[atoLoading]'
|
7744
|
+
}]
|
7745
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { appLoading: [{
|
7746
|
+
type: Input
|
7747
|
+
}] } });
|
7748
|
+
|
7667
7749
|
class AtoWaterLibModule {
|
7668
7750
|
}
|
7669
7751
|
AtoWaterLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
7670
7752
|
AtoWaterLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, declarations: [AtoWaterLibComponent,
|
7671
7753
|
AtoFlowDiagramLibComponent,
|
7672
|
-
AssetFlowComponent
|
7754
|
+
AssetFlowComponent,
|
7755
|
+
AtoLoadingDirective], imports: [CommonModule], exports: [AtoWaterLibComponent,
|
7673
7756
|
AtoFlowDiagramLibComponent,
|
7674
|
-
AssetFlowComponent
|
7757
|
+
AssetFlowComponent,
|
7758
|
+
AtoLoadingDirective] });
|
7675
7759
|
AtoWaterLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, imports: [CommonModule] });
|
7676
7760
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AtoWaterLibModule, decorators: [{
|
7677
7761
|
type: NgModule,
|
@@ -7680,6 +7764,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7680
7764
|
AtoWaterLibComponent,
|
7681
7765
|
AtoFlowDiagramLibComponent,
|
7682
7766
|
AssetFlowComponent,
|
7767
|
+
AtoLoadingDirective,
|
7683
7768
|
],
|
7684
7769
|
imports: [
|
7685
7770
|
CommonModule
|
@@ -7687,7 +7772,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7687
7772
|
exports: [
|
7688
7773
|
AtoWaterLibComponent,
|
7689
7774
|
AtoFlowDiagramLibComponent,
|
7690
|
-
AssetFlowComponent
|
7775
|
+
AssetFlowComponent,
|
7776
|
+
AtoLoadingDirective
|
7691
7777
|
]
|
7692
7778
|
}]
|
7693
7779
|
}] });
|
@@ -7700,5 +7786,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
7700
7786
|
* Generated bundle index. Do not edit.
|
7701
7787
|
*/
|
7702
7788
|
|
7703
|
-
export { AssetFlowComponent, AtoFlowDiagramLibComponent, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
|
7789
|
+
export { AssetFlowComponent, AtoFlowDiagramLibComponent, AtoLoadingDirective, AtoWaterLibComponent, AtoWaterLibModule, AtoWaterLibService };
|
7704
7790
|
//# sourceMappingURL=ato-water-lib.mjs.map
|