@webilix/ngx-helper-m3 0.0.15 → 0.0.17
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/fesm2022/webilix-ngx-helper-m3.mjs +386 -135
- package/fesm2022/webilix-ngx-helper-m3.mjs.map +1 -1
- package/lib/components/section/column/ngx-helper-section-column.component.d.ts +16 -3
- package/lib/coordinates/get/get.component.d.ts +19 -0
- package/lib/coordinates/ngx-helper-coordinates.interface.d.ts +10 -0
- package/lib/coordinates/ngx-helper-coordinates.service.d.ts +16 -0
- package/lib/coordinates/show/show.component.d.ts +15 -0
- package/lib/directives/ngx-helper-sticky.directive.d.ts +19 -0
- package/ngx-helper-m3.css +0 -1
- package/package.json +4 -2
- package/public-api.d.ts +11 -9
- package/lib/components/section/ngx-helper-section-sticky.directive.d.ts +0 -18
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, Injector, Component, HostBinding, Input, Pipe, Injectable, Optional, Inject, EventEmitter, Output, inject,
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, Injector, Component, HostBinding, Input, Pipe, Injectable, Optional, Inject, EventEmitter, Output, inject, createComponent, HostListener, Directive } from '@angular/core';
|
3
3
|
import { NgComponentOutlet, NgClass } from '@angular/common';
|
4
|
-
import * as i1$
|
4
|
+
import * as i1$1 from '@angular/material/button';
|
5
5
|
import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
|
6
6
|
import { MatDivider } from '@angular/material/divider';
|
7
7
|
import * as i3$1 from '@angular/material/icon';
|
@@ -13,14 +13,22 @@ import { JalaliDateTime } from '@webilix/jalali-date-time';
|
|
13
13
|
import * as i1 from '@angular/router';
|
14
14
|
import * as i3 from '@angular/cdk/clipboard';
|
15
15
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
16
|
-
import * as i1$1 from '@angular/platform-browser';
|
17
16
|
import * as i2$1 from '@angular/material/dialog';
|
18
17
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
19
|
-
import * as i1$
|
18
|
+
import * as i1$2 from '@angular/material/bottom-sheet';
|
20
19
|
import { MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
|
20
|
+
import { provideNgxMask, NgxMaskDirective } from 'ngx-mask';
|
21
|
+
import { Map, View, Feature } from 'ol';
|
22
|
+
import { Point } from 'ol/geom';
|
23
|
+
import interactionDoubleClickZoom from 'ol/interaction/DoubleClickZoom';
|
24
|
+
import TileLayer from 'ol/layer/Tile';
|
25
|
+
import VectorLayer from 'ol/layer/Vector';
|
26
|
+
import OSM from 'ol/source/OSM';
|
27
|
+
import VectorSource from 'ol/source/Vector';
|
21
28
|
import { trigger, transition, style, animate } from '@angular/animations';
|
22
29
|
import * as i1$4 from '@angular/common/http';
|
23
30
|
import { HttpHeaders, HttpEventType } from '@angular/common/http';
|
31
|
+
import * as i1$3 from '@angular/platform-browser';
|
24
32
|
|
25
33
|
const NGX_HELPER_CONFIG = new InjectionToken('NGX-HELPER-CONFIG');
|
26
34
|
const provideNgxHelperConfig = (config) => {
|
@@ -449,11 +457,11 @@ class NgxHelperCardComponent {
|
|
449
457
|
this.isMobile = window.innerWidth <= this.componentConfig.mobileWidth;
|
450
458
|
}
|
451
459
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperCardComponent, deps: [{ token: ComponentService }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
452
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NgxHelperCardComponent, isStandalone: true, selector: "ngx-helper-card", inputs: { title: "title", subTitle: "subTitle", icon: "icon", actions: "actions", padding: "padding", backgroundColor: "backgroundColor", hasShadow: "hasShadow" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "className": "this.className" } }, providers: [ComponentService], usesOnChanges: true, ngImport: i0, template: "<div class=\"card-header\" [class.has-sub-title]=\"subTitle\">\n <!-- ICON -->\n @if (icon) { <mat-icon>{{ icon }}</mat-icon> }\n\n <!-- TITLE -->\n <div class=\"content\">\n <div class=\"title\">{{ title }}</div>\n <!-- SUB TITLE -->\n @if (subTitle) {\n <div class=\"sub-title\">{{ subTitle }}</div>\n }\n </div>\n\n <!-- BUTTONS -->\n @if (buttons.length > 0) {\n <div class=\"buttons\" [ngClass]=\"isMobile ? 'mobile-view' : ''\">\n @for (item of buttons; track $index) {\n <!-- TYPE -->\n @switch (item.type) {\n\n <!-- BUTTON -->\n @case('BUTTON') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" (click)=\"item.action()\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n }\n\n <!-- MENU -->\n @case('MENU') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" [matMenuTriggerFor]=\"actionMenu\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n <mat-menu #actionMenu=\"matMenu\" class=\"ngx-helper-card-action-menu\">\n @for (menu of item.buttons; track $index) {\n <!-- DIVIDER -->\n @if (menu === 'DIVIDER') { <mat-divider></mat-divider> }\n <!-- BUTTON -->\n @else {\n <button mat-menu-item type=\"button\" (click)=\"menu.action()\" [style.color]=\"menu.color\">\n <div class=\"title\">{{ menu.title }}</div>\n <mat-icon [style.color]=\"menu.color\">{{ menu.icon }}</mat-icon>\n </button>\n } }\n </mat-menu>\n } } }\n </div>\n }\n</div>\n\n<div class=\"card-content\" [style.padding]=\"padding\" [style.background-color]=\"backgroundColor\">\n <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .ngx-helper-card-action-menu button mat-icon{font-size:115%;margin:0 0 0 .75rem!important}::ng-deep .ngx-helper-card-action-menu button .title{font-size:90%!important}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-helper-card-action-menu .mat-divider{margin:0;border-top-color:var(--outline-variant)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
|
460
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NgxHelperCardComponent, isStandalone: true, selector: "ngx-helper-card", inputs: { title: "title", subTitle: "subTitle", icon: "icon", actions: "actions", padding: "padding", backgroundColor: "backgroundColor", hasShadow: "hasShadow" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "className": "this.className" } }, providers: [ComponentService], usesOnChanges: true, ngImport: i0, template: "<div class=\"card-header\" [class.has-sub-title]=\"subTitle\">\n <!-- ICON -->\n @if (icon) { <mat-icon>{{ icon }}</mat-icon> }\n\n <!-- TITLE -->\n <div class=\"content\">\n <div class=\"title\">{{ title }}</div>\n <!-- SUB TITLE -->\n @if (subTitle) {\n <div class=\"sub-title\">{{ subTitle }}</div>\n }\n </div>\n\n <!-- BUTTONS -->\n @if (buttons.length > 0) {\n <div class=\"buttons\" [ngClass]=\"isMobile ? 'mobile-view' : ''\">\n @for (item of buttons; track $index) {\n <!-- TYPE -->\n @switch (item.type) {\n\n <!-- BUTTON -->\n @case('BUTTON') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" (click)=\"item.action()\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n }\n\n <!-- MENU -->\n @case('MENU') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" [matMenuTriggerFor]=\"actionMenu\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n <mat-menu #actionMenu=\"matMenu\" class=\"ngx-helper-card-action-menu\" [xPosition]=\"'before'\">\n @for (menu of item.buttons; track $index) {\n <!-- DIVIDER -->\n @if (menu === 'DIVIDER') { <mat-divider></mat-divider> }\n <!-- BUTTON -->\n @else {\n <button mat-menu-item type=\"button\" (click)=\"menu.action()\" [style.color]=\"menu.color\">\n <div class=\"title\">{{ menu.title }}</div>\n <mat-icon [style.color]=\"menu.color\">{{ menu.icon }}</mat-icon>\n </button>\n } }\n </mat-menu>\n } } }\n </div>\n }\n</div>\n\n<div class=\"card-content\" [style.padding]=\"padding\" [style.background-color]=\"backgroundColor\">\n <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .ngx-helper-card-action-menu button mat-icon{font-size:115%;margin:0 0 0 .75rem!important}::ng-deep .ngx-helper-card-action-menu button .title{font-size:90%!important}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-helper-card-action-menu .mat-divider{margin:0;border-top-color:var(--outline-variant)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
|
453
461
|
}
|
454
462
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperCardComponent, decorators: [{
|
455
463
|
type: Component,
|
456
|
-
args: [{ selector: 'ngx-helper-card', host: { '(window:resize)': 'onResize($event)' }, imports: [NgClass, MatButton, MatDivider, MatIcon, MatMenuModule], providers: [ComponentService], template: "<div class=\"card-header\" [class.has-sub-title]=\"subTitle\">\n <!-- ICON -->\n @if (icon) { <mat-icon>{{ icon }}</mat-icon> }\n\n <!-- TITLE -->\n <div class=\"content\">\n <div class=\"title\">{{ title }}</div>\n <!-- SUB TITLE -->\n @if (subTitle) {\n <div class=\"sub-title\">{{ subTitle }}</div>\n }\n </div>\n\n <!-- BUTTONS -->\n @if (buttons.length > 0) {\n <div class=\"buttons\" [ngClass]=\"isMobile ? 'mobile-view' : ''\">\n @for (item of buttons; track $index) {\n <!-- TYPE -->\n @switch (item.type) {\n\n <!-- BUTTON -->\n @case('BUTTON') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" (click)=\"item.action()\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n }\n\n <!-- MENU -->\n @case('MENU') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" [matMenuTriggerFor]=\"actionMenu\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n <mat-menu #actionMenu=\"matMenu\" class=\"ngx-helper-card-action-menu\">\n @for (menu of item.buttons; track $index) {\n <!-- DIVIDER -->\n @if (menu === 'DIVIDER') { <mat-divider></mat-divider> }\n <!-- BUTTON -->\n @else {\n <button mat-menu-item type=\"button\" (click)=\"menu.action()\" [style.color]=\"menu.color\">\n <div class=\"title\">{{ menu.title }}</div>\n <mat-icon [style.color]=\"menu.color\">{{ menu.icon }}</mat-icon>\n </button>\n } }\n </mat-menu>\n } } }\n </div>\n }\n</div>\n\n<div class=\"card-content\" [style.padding]=\"padding\" [style.background-color]=\"backgroundColor\">\n <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .ngx-helper-card-action-menu button mat-icon{font-size:115%;margin:0 0 0 .75rem!important}::ng-deep .ngx-helper-card-action-menu button .title{font-size:90%!important}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-helper-card-action-menu .mat-divider{margin:0;border-top-color:var(--outline-variant)}\n"] }]
|
464
|
+
args: [{ selector: 'ngx-helper-card', host: { '(window:resize)': 'onResize($event)' }, imports: [NgClass, MatButton, MatDivider, MatIcon, MatMenuModule], providers: [ComponentService], template: "<div class=\"card-header\" [class.has-sub-title]=\"subTitle\">\n <!-- ICON -->\n @if (icon) { <mat-icon>{{ icon }}</mat-icon> }\n\n <!-- TITLE -->\n <div class=\"content\">\n <div class=\"title\">{{ title }}</div>\n <!-- SUB TITLE -->\n @if (subTitle) {\n <div class=\"sub-title\">{{ subTitle }}</div>\n }\n </div>\n\n <!-- BUTTONS -->\n @if (buttons.length > 0) {\n <div class=\"buttons\" [ngClass]=\"isMobile ? 'mobile-view' : ''\">\n @for (item of buttons; track $index) {\n <!-- TYPE -->\n @switch (item.type) {\n\n <!-- BUTTON -->\n @case('BUTTON') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" (click)=\"item.action()\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n }\n\n <!-- MENU -->\n @case('MENU') {\n <button mat-button type=\"button\" [style.color]=\"item.color\" [matMenuTriggerFor]=\"actionMenu\">\n @if (!isMobile) {\n <div class=\"title\">{{ item.title }}</div>\n }\n <!-- ICON -->\n @if (isMobile || item.showIcon) {\n <mat-icon>{{ item.icon }}</mat-icon>\n }\n </button>\n <mat-menu #actionMenu=\"matMenu\" class=\"ngx-helper-card-action-menu\" [xPosition]=\"'before'\">\n @for (menu of item.buttons; track $index) {\n <!-- DIVIDER -->\n @if (menu === 'DIVIDER') { <mat-divider></mat-divider> }\n <!-- BUTTON -->\n @else {\n <button mat-menu-item type=\"button\" (click)=\"menu.action()\" [style.color]=\"menu.color\">\n <div class=\"title\">{{ menu.title }}</div>\n <mat-icon [style.color]=\"menu.color\">{{ menu.icon }}</mat-icon>\n </button>\n } }\n </mat-menu>\n } } }\n </div>\n }\n</div>\n\n<div class=\"card-content\" [style.padding]=\"padding\" [style.background-color]=\"backgroundColor\">\n <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .ngx-helper-card-action-menu button mat-icon{font-size:115%;margin:0 0 0 .75rem!important}::ng-deep .ngx-helper-card-action-menu button .title{font-size:90%!important}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-helper-card-action-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-helper-card-action-menu .mat-divider{margin:0;border-top-color:var(--outline-variant)}\n"] }]
|
457
465
|
}], ctorParameters: () => [{ type: ComponentService }, { type: undefined, decorators: [{
|
458
466
|
type: Optional
|
459
467
|
}, {
|
@@ -715,71 +723,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
715
723
|
args: [{ required: false }]
|
716
724
|
}] } });
|
717
725
|
|
718
|
-
class NgxHelperSectionStickyDirective {
|
719
|
-
elementRef;
|
720
|
-
config;
|
721
|
-
ngxHelperSectionSticky;
|
722
|
-
ngxHelperSectionZIndex;
|
723
|
-
componentService = inject(ComponentService);
|
724
|
-
componentConfig;
|
725
|
-
isMobile = false;
|
726
|
-
constructor(elementRef, config) {
|
727
|
-
this.elementRef = elementRef;
|
728
|
-
this.config = config;
|
729
|
-
}
|
730
|
-
ngOnInit() {
|
731
|
-
this.componentConfig = this.componentService.getComponentConfig(this.config);
|
732
|
-
this.onResize();
|
733
|
-
}
|
734
|
-
onResize() {
|
735
|
-
this.isMobile = window.innerWidth <= this.componentConfig.mobileWidth;
|
736
|
-
this.setPosition();
|
737
|
-
}
|
738
|
-
setPosition() {
|
739
|
-
const element = this.elementRef.nativeElement;
|
740
|
-
if (!element)
|
741
|
-
return;
|
742
|
-
switch (this.ngxHelperSectionSticky) {
|
743
|
-
case 'TOP':
|
744
|
-
const top = this.componentConfig.stickyView?.top;
|
745
|
-
if (!top)
|
746
|
-
return;
|
747
|
-
element.style.position = 'sticky';
|
748
|
-
element.style.zIndex = this.ngxHelperSectionZIndex ? this.ngxHelperSectionZIndex.toString() : '1';
|
749
|
-
element.style.top = this.isMobile ? top.mobileView : top.desktopView;
|
750
|
-
break;
|
751
|
-
case 'BOTTOM':
|
752
|
-
const bottom = this.componentConfig.stickyView?.bottom;
|
753
|
-
if (!bottom)
|
754
|
-
return;
|
755
|
-
element.style.position = 'sticky';
|
756
|
-
element.style.zIndex = this.ngxHelperSectionZIndex ? this.ngxHelperSectionZIndex.toString() : '1';
|
757
|
-
element.style.bottom = this.isMobile ? bottom.mobileView : bottom.desktopView;
|
758
|
-
break;
|
759
|
-
}
|
760
|
-
}
|
761
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionStickyDirective, deps: [{ token: i0.ElementRef }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
762
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: NgxHelperSectionStickyDirective, isStandalone: true, selector: "[ngxHelperSectionSticky]", inputs: { ngxHelperSectionSticky: "ngxHelperSectionSticky", ngxHelperSectionZIndex: "ngxHelperSectionZIndex" }, host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0 });
|
763
|
-
}
|
764
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionStickyDirective, decorators: [{
|
765
|
-
type: Directive,
|
766
|
-
args: [{
|
767
|
-
selector: '[ngxHelperSectionSticky]',
|
768
|
-
host: { '(window:resize)': 'onResize($event)' },
|
769
|
-
}]
|
770
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
771
|
-
type: Optional
|
772
|
-
}, {
|
773
|
-
type: Inject,
|
774
|
-
args: [NGX_HELPER_CONFIG]
|
775
|
-
}] }], propDecorators: { ngxHelperSectionSticky: [{
|
776
|
-
type: Input,
|
777
|
-
args: [{ required: true }]
|
778
|
-
}], ngxHelperSectionZIndex: [{
|
779
|
-
type: Input,
|
780
|
-
args: [{ required: false }]
|
781
|
-
}] } });
|
782
|
-
|
783
726
|
class NgxHelperSectionComponent {
|
784
727
|
componentService;
|
785
728
|
config;
|
@@ -819,27 +762,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
819
762
|
}] } });
|
820
763
|
|
821
764
|
class NgxHelperSectionColumnComponent {
|
765
|
+
componentService;
|
766
|
+
config;
|
822
767
|
flexStyle = '1';
|
823
768
|
widthStyle = '*';
|
769
|
+
stickyPosition;
|
770
|
+
stickyZIndex;
|
771
|
+
stickyTop;
|
824
772
|
flex;
|
825
773
|
width;
|
826
774
|
sticky;
|
775
|
+
zIndex;
|
776
|
+
componentConfig;
|
777
|
+
isMobile = false;
|
778
|
+
constructor(componentService, config) {
|
779
|
+
this.componentService = componentService;
|
780
|
+
this.config = config;
|
781
|
+
}
|
827
782
|
ngOnChanges(changes) {
|
828
783
|
this.flexStyle = this.width ? 'unset' : this.flex?.toString() || '1';
|
829
784
|
this.widthStyle = this.width || '*';
|
785
|
+
this.componentConfig = this.componentService.getComponentConfig(this.config);
|
786
|
+
this.onResize();
|
830
787
|
}
|
831
|
-
|
832
|
-
|
788
|
+
onResize() {
|
789
|
+
this.isMobile = window.innerWidth <= this.componentConfig.mobileWidth;
|
790
|
+
this.setPosition();
|
791
|
+
}
|
792
|
+
setPosition() {
|
793
|
+
const top = this.componentConfig.stickyView?.top;
|
794
|
+
if (!top)
|
795
|
+
return;
|
796
|
+
const sticky = this.sticky === true ||
|
797
|
+
(this.sticky === 'DESKTOP' && !this.isMobile) ||
|
798
|
+
(this.sticky === 'MOBILE' && this.isMobile);
|
799
|
+
this.stickyPosition = sticky ? 'sticky' : 'static';
|
800
|
+
this.stickyZIndex = sticky ? (this.zIndex ? this.zIndex.toString() : '1') : 'auto';
|
801
|
+
this.stickyTop = sticky ? (this.isMobile ? top.mobileView : top.desktopView) : 'auto';
|
802
|
+
}
|
803
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionColumnComponent, deps: [{ token: ComponentService }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
804
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NgxHelperSectionColumnComponent, isStandalone: true, selector: "ngx-helper-section-column", inputs: { flex: "flex", width: "width", sticky: "sticky", zIndex: "zIndex" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "style.flex": "this.flexStyle", "style.width": "this.widthStyle", "style.position": "this.stickyPosition", "style.zInde": "this.stickyZIndex", "style.top": "this.stickyTop" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
|
833
805
|
}
|
834
806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionColumnComponent, decorators: [{
|
835
807
|
type: Component,
|
836
|
-
args: [{ selector: 'ngx-helper-section-column', imports: [], template: "<ng-content></ng-content>\n" }]
|
837
|
-
}],
|
808
|
+
args: [{ selector: 'ngx-helper-section-column', host: { '(window:resize)': 'onResize($event)' }, imports: [], template: "<ng-content></ng-content>\n" }]
|
809
|
+
}], ctorParameters: () => [{ type: ComponentService }, { type: undefined, decorators: [{
|
810
|
+
type: Optional
|
811
|
+
}, {
|
812
|
+
type: Inject,
|
813
|
+
args: [NGX_HELPER_CONFIG]
|
814
|
+
}] }], propDecorators: { flexStyle: [{
|
838
815
|
type: HostBinding,
|
839
816
|
args: ['style.flex']
|
840
817
|
}], widthStyle: [{
|
841
818
|
type: HostBinding,
|
842
819
|
args: ['style.width']
|
820
|
+
}], stickyPosition: [{
|
821
|
+
type: HostBinding,
|
822
|
+
args: ['style.position']
|
823
|
+
}], stickyZIndex: [{
|
824
|
+
type: HostBinding,
|
825
|
+
args: ['style.zInde']
|
826
|
+
}], stickyTop: [{
|
827
|
+
type: HostBinding,
|
828
|
+
args: ['style.top']
|
843
829
|
}], flex: [{
|
844
830
|
type: Input,
|
845
831
|
args: [{ required: false }]
|
@@ -849,6 +835,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
849
835
|
}], sticky: [{
|
850
836
|
type: Input,
|
851
837
|
args: [{ required: false }]
|
838
|
+
}], zIndex: [{
|
839
|
+
type: Input,
|
840
|
+
args: [{ required: false }]
|
852
841
|
}] } });
|
853
842
|
|
854
843
|
class NgxHelperValueBoxComponent {
|
@@ -1007,60 +996,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
1007
996
|
args: [{ required: false }]
|
1008
997
|
}] } });
|
1009
998
|
|
1010
|
-
class NgxHelperMultiLinePipe {
|
1011
|
-
domSanitizer;
|
1012
|
-
constructor(domSanitizer) {
|
1013
|
-
this.domSanitizer = domSanitizer;
|
1014
|
-
}
|
1015
|
-
transform(value, options) {
|
1016
|
-
if (value === undefined || value === null || !Helper.IS.string(value) || value === '')
|
1017
|
-
return '';
|
1018
|
-
return options?.html
|
1019
|
-
? this.domSanitizer.bypassSecurityTrustHtml(value.replace(/(?:\r\n|\r|\n)/g, '<br />'))
|
1020
|
-
: Helper.STRING.escapeHTML(value).replace(/(?:\r\n|\r|\n)/g, '<br />');
|
1021
|
-
}
|
1022
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMultiLinePipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
1023
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMultiLinePipe, isStandalone: true, name: "ngxHelperMultiLine" });
|
1024
|
-
}
|
1025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMultiLinePipe, decorators: [{
|
1026
|
-
type: Pipe,
|
1027
|
-
args: [{ name: 'ngxHelperMultiLine' }]
|
1028
|
-
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
1029
|
-
|
1030
|
-
class NgxHelperSafePipe {
|
1031
|
-
domSanitizer;
|
1032
|
-
constructor(domSanitizer) {
|
1033
|
-
this.domSanitizer = domSanitizer;
|
1034
|
-
}
|
1035
|
-
transform(value, options) {
|
1036
|
-
if (value === undefined || value === null || !Helper.IS.string(value) || value === '')
|
1037
|
-
return '';
|
1038
|
-
switch (options?.type || 'HTML') {
|
1039
|
-
case 'STYLE':
|
1040
|
-
return this.domSanitizer.bypassSecurityTrustStyle(value);
|
1041
|
-
case 'SCRIPT':
|
1042
|
-
return this.domSanitizer.bypassSecurityTrustScript(value);
|
1043
|
-
case 'URL':
|
1044
|
-
return this.domSanitizer.bypassSecurityTrustUrl(value);
|
1045
|
-
case 'RESOURCE_URL':
|
1046
|
-
return this.domSanitizer.bypassSecurityTrustResourceUrl(value);
|
1047
|
-
case 'HTML':
|
1048
|
-
return this.domSanitizer.bypassSecurityTrustHtml(value);
|
1049
|
-
}
|
1050
|
-
}
|
1051
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSafePipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
1052
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSafePipe, isStandalone: true, name: "ngxHelperSafe" });
|
1053
|
-
}
|
1054
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSafePipe, decorators: [{
|
1055
|
-
type: Pipe,
|
1056
|
-
args: [{ name: 'ngxHelperSafe' }]
|
1057
|
-
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
1058
|
-
|
1059
999
|
class ConfirmDialogComponent {
|
1060
1000
|
className = 'ngx-helper-m3-confirm';
|
1061
1001
|
confirm = inject(MAT_DIALOG_DATA);
|
1062
1002
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1063
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ConfirmDialogComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "confirm-dialog" }, properties: { "className": "this.className" } }, ngImport: i0, template: "<div class=\"confirm-content\">\n <!-- ICON -->\n @if (confirm.icon) {\n <mat-icon>{{ confirm.icon }}</mat-icon>\n }\n\n <!-- CONTENT -->\n <div class=\"confirm\">\n <div class=\"question\">{{ confirm.question }}</div>\n <!-- DESCRIPTION -->\n @if (confirm.description) {\n <div class=\"description\">{{ confirm.description }}</div>\n }\n <!-- DATA -->\n @if (confirm.data) {\n <div class=\"data\">\n <div class=\"title\">{{ confirm.data.title }}:</div>\n <div class=\"value\">{{ confirm.data.value }}</div>\n </div>\n }\n </div>\n</div>\n\n<div class=\"confirm-footer\">\n <button mat-button type=\"button\" mat-dialog-close [ngClass]=\"confirm.denyClass\">\u062E\u06CC\u0631</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"true\" [ngClass]=\"confirm.confirmClass\">\u0628\u0644\u06CC</button>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$
|
1003
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ConfirmDialogComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "confirm-dialog" }, properties: { "className": "this.className" } }, ngImport: i0, template: "<div class=\"confirm-content\">\n <!-- ICON -->\n @if (confirm.icon) {\n <mat-icon>{{ confirm.icon }}</mat-icon>\n }\n\n <!-- CONTENT -->\n <div class=\"confirm\">\n <div class=\"question\">{{ confirm.question }}</div>\n <!-- DESCRIPTION -->\n @if (confirm.description) {\n <div class=\"description\">{{ confirm.description }}</div>\n }\n <!-- DATA -->\n @if (confirm.data) {\n <div class=\"data\">\n <div class=\"title\">{{ confirm.data.title }}:</div>\n <div class=\"value\">{{ confirm.data.value }}</div>\n </div>\n }\n </div>\n</div>\n\n<div class=\"confirm-footer\">\n <button mat-button type=\"button\" mat-dialog-close [ngClass]=\"confirm.denyClass\">\u062E\u06CC\u0631</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"true\" [ngClass]=\"confirm.confirmClass\">\u0628\u0644\u06CC</button>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
1064
1004
|
}
|
1065
1005
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
1066
1006
|
type: Component,
|
@@ -1080,13 +1020,13 @@ class ConfirmBottomSheetComponent {
|
|
1080
1020
|
close(confirmed) {
|
1081
1021
|
this.matBottomSheetRef.dismiss(confirmed);
|
1082
1022
|
}
|
1083
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmBottomSheetComponent, deps: [{ token: i1$
|
1084
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ConfirmBottomSheetComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "confirm-bottom-sheet" }, properties: { "className": "this.className" } }, ngImport: i0, template: "<div class=\"confirm-content\">\n <!-- ICON -->\n @if (confirm.icon) {\n <mat-icon>{{ confirm.icon }}</mat-icon>\n }\n\n <!-- CONTENT -->\n <div class=\"confirm\">\n <div class=\"question\">{{ confirm.question }}</div>\n <!-- DESCRIPTION -->\n @if (confirm.description) {\n <div class=\"description\">{{ confirm.description }}</div>\n }\n <!-- DATA -->\n @if (confirm.data) {\n <div class=\"data\">\n <div class=\"title\">{{ confirm.data.title }}:</div>\n <div class=\"value\">{{ confirm.data.value }}</div>\n </div>\n }\n </div>\n</div>\n\n<div class=\"confirm-footer\">\n <button mat-button type=\"button\" (click)=\"close()\" [ngClass]=\"confirm.denyClass\">\u062E\u06CC\u0631</button>\n <button mat-button type=\"button\" (click)=\"close(true)\" [ngClass]=\"confirm.confirmClass\">\u0628\u0644\u06CC</button>\n</div>\n", styles: ["::ng-deep .ngx-helper-bottom-sheet .mat-bottom-sheet-container{padding:0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$
|
1023
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmBottomSheetComponent, deps: [{ token: i1$2.MatBottomSheetRef }], target: i0.ɵɵFactoryTarget.Component });
|
1024
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ConfirmBottomSheetComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "confirm-bottom-sheet" }, properties: { "className": "this.className" } }, ngImport: i0, template: "<div class=\"confirm-content\">\n <!-- ICON -->\n @if (confirm.icon) {\n <mat-icon>{{ confirm.icon }}</mat-icon>\n }\n\n <!-- CONTENT -->\n <div class=\"confirm\">\n <div class=\"question\">{{ confirm.question }}</div>\n <!-- DESCRIPTION -->\n @if (confirm.description) {\n <div class=\"description\">{{ confirm.description }}</div>\n }\n <!-- DATA -->\n @if (confirm.data) {\n <div class=\"data\">\n <div class=\"title\">{{ confirm.data.title }}:</div>\n <div class=\"value\">{{ confirm.data.value }}</div>\n </div>\n }\n </div>\n</div>\n\n<div class=\"confirm-footer\">\n <button mat-button type=\"button\" (click)=\"close()\" [ngClass]=\"confirm.denyClass\">\u062E\u06CC\u0631</button>\n <button mat-button type=\"button\" (click)=\"close(true)\" [ngClass]=\"confirm.confirmClass\">\u0628\u0644\u06CC</button>\n</div>\n", styles: ["::ng-deep .ngx-helper-bottom-sheet .mat-bottom-sheet-container{padding:0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
1085
1025
|
}
|
1086
1026
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmBottomSheetComponent, decorators: [{
|
1087
1027
|
type: Component,
|
1088
1028
|
args: [{ host: { selector: 'confirm-bottom-sheet' }, imports: [NgClass, MatButtonModule, MatIconModule], template: "<div class=\"confirm-content\">\n <!-- ICON -->\n @if (confirm.icon) {\n <mat-icon>{{ confirm.icon }}</mat-icon>\n }\n\n <!-- CONTENT -->\n <div class=\"confirm\">\n <div class=\"question\">{{ confirm.question }}</div>\n <!-- DESCRIPTION -->\n @if (confirm.description) {\n <div class=\"description\">{{ confirm.description }}</div>\n }\n <!-- DATA -->\n @if (confirm.data) {\n <div class=\"data\">\n <div class=\"title\">{{ confirm.data.title }}:</div>\n <div class=\"value\">{{ confirm.data.value }}</div>\n </div>\n }\n </div>\n</div>\n\n<div class=\"confirm-footer\">\n <button mat-button type=\"button\" (click)=\"close()\" [ngClass]=\"confirm.denyClass\">\u062E\u06CC\u0631</button>\n <button mat-button type=\"button\" (click)=\"close(true)\" [ngClass]=\"confirm.confirmClass\">\u0628\u0644\u06CC</button>\n</div>\n", styles: ["::ng-deep .ngx-helper-bottom-sheet .mat-bottom-sheet-container{padding:0}\n"] }]
|
1089
|
-
}], ctorParameters: () => [{ type: i1$
|
1029
|
+
}], ctorParameters: () => [{ type: i1$2.MatBottomSheetRef }], propDecorators: { className: [{
|
1090
1030
|
type: HostBinding,
|
1091
1031
|
args: ['className']
|
1092
1032
|
}] } });
|
@@ -1180,13 +1120,13 @@ class NgxHelperConfirmService {
|
|
1180
1120
|
denyClass: config?.denyClass,
|
1181
1121
|
});
|
1182
1122
|
}
|
1183
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperConfirmService, deps: [{ token: i1$
|
1123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperConfirmService, deps: [{ token: i1$2.MatBottomSheet }, { token: i2$1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
1184
1124
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperConfirmService, providedIn: 'root' });
|
1185
1125
|
}
|
1186
1126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperConfirmService, decorators: [{
|
1187
1127
|
type: Injectable,
|
1188
1128
|
args: [{ providedIn: 'root' }]
|
1189
|
-
}], ctorParameters: () => [{ type: i1$
|
1129
|
+
}], ctorParameters: () => [{ type: i1$2.MatBottomSheet }, { type: i2$1.MatDialog }] });
|
1190
1130
|
|
1191
1131
|
const NGX_HELPER_CONTAINER_TYPE = new InjectionToken('NGX-HELPER-CONTAINER-TYPE');
|
1192
1132
|
const NGX_HELPER_CONTAINER_DATA = new InjectionToken('NGX-HELPER-CONTAINER-DATA');
|
@@ -1249,13 +1189,13 @@ class ContainerBottomSheetComponent {
|
|
1249
1189
|
close() {
|
1250
1190
|
this.matBottomSheetRef.dismiss();
|
1251
1191
|
}
|
1252
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContainerBottomSheetComponent, deps: [{ token: i1$
|
1192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContainerBottomSheetComponent, deps: [{ token: i1$2.MatBottomSheetRef }], target: i0.ɵɵFactoryTarget.Component });
|
1253
1193
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ContainerBottomSheetComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "container-bottom-sheet" }, properties: { "className": "this.className" } }, ngImport: i0, template: "<div class=\"container-header\">\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n</div>\n\n<div class=\"container-content\" [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n</div>\n", styles: ["::ng-deep .ngx-helper-bottom-sheet .mat-bottom-sheet-container{padding:0}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
1254
1194
|
}
|
1255
1195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContainerBottomSheetComponent, decorators: [{
|
1256
1196
|
type: Component,
|
1257
1197
|
args: [{ host: { selector: 'container-bottom-sheet' }, imports: [NgComponentOutlet, MatIconButton, MatIcon], template: "<div class=\"container-header\">\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n</div>\n\n<div class=\"container-content\" [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n</div>\n", styles: ["::ng-deep .ngx-helper-bottom-sheet .mat-bottom-sheet-container{padding:0}\n"] }]
|
1258
|
-
}], ctorParameters: () => [{ type: i1$
|
1198
|
+
}], ctorParameters: () => [{ type: i1$2.MatBottomSheetRef }], propDecorators: { className: [{
|
1259
1199
|
type: HostBinding,
|
1260
1200
|
args: ['className']
|
1261
1201
|
}] } });
|
@@ -1333,13 +1273,213 @@ class NgxHelperContainerService {
|
|
1333
1273
|
const config = arg1 || {};
|
1334
1274
|
return new NgxHelperContainerCalss(this.matBottomSheet, this.matDialog, { component, title, config });
|
1335
1275
|
}
|
1336
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperContainerService, deps: [{ token: i1$
|
1276
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperContainerService, deps: [{ token: i1$2.MatBottomSheet }, { token: i2$1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
1337
1277
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperContainerService, providedIn: 'root' });
|
1338
1278
|
}
|
1339
1279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperContainerService, decorators: [{
|
1340
1280
|
type: Injectable,
|
1341
1281
|
args: [{ providedIn: 'root' }]
|
1342
|
-
}], ctorParameters: () => [{ type: i1$
|
1282
|
+
}], ctorParameters: () => [{ type: i1$2.MatBottomSheet }, { type: i2$1.MatDialog }] });
|
1283
|
+
|
1284
|
+
class GetComponent {
|
1285
|
+
coordinates;
|
1286
|
+
config;
|
1287
|
+
close;
|
1288
|
+
map;
|
1289
|
+
coordinate = [];
|
1290
|
+
inputTransformFn = (value) => Helper.STRING.changeNumbers(value.toString(), 'EN');
|
1291
|
+
ngOnInit() {
|
1292
|
+
this.coordinate = this.coordinates
|
1293
|
+
? [this.coordinates.longitude, this.coordinates.latitude]
|
1294
|
+
: this.config?.view
|
1295
|
+
? [this.config.view.longitude, this.config.view.latitude]
|
1296
|
+
: [51.3380603, 35.6997382];
|
1297
|
+
const zoom = this.config?.zoom || 15;
|
1298
|
+
this.map = new Map({
|
1299
|
+
view: new View({ center: this.coordinate, zoom, projection: 'EPSG:4326' }),
|
1300
|
+
layers: [new TileLayer({ source: new OSM() })],
|
1301
|
+
target: 'ngx-helper-m3-coordinates-map',
|
1302
|
+
});
|
1303
|
+
this.map
|
1304
|
+
.getInteractions()
|
1305
|
+
.getArray()
|
1306
|
+
.forEach((interaction) => {
|
1307
|
+
if (interaction instanceof interactionDoubleClickZoom)
|
1308
|
+
this.map.removeInteraction(interaction);
|
1309
|
+
});
|
1310
|
+
this.addLayer();
|
1311
|
+
}
|
1312
|
+
addLayer() {
|
1313
|
+
this.map
|
1314
|
+
.getLayers()
|
1315
|
+
.getArray()
|
1316
|
+
.forEach((layer) => {
|
1317
|
+
if (layer instanceof VectorLayer)
|
1318
|
+
this.map.removeLayer(layer);
|
1319
|
+
});
|
1320
|
+
if (this.coordinates) {
|
1321
|
+
const size = this.config?.size || 8;
|
1322
|
+
const color = this.config?.color || 'rgb(42, 101, 126)';
|
1323
|
+
const point = new Point(this.coordinate);
|
1324
|
+
const layer = new VectorLayer({
|
1325
|
+
source: new VectorSource({ features: [new Feature(point)] }),
|
1326
|
+
style: {
|
1327
|
+
'circle-fill-color': color,
|
1328
|
+
'circle-radius': size,
|
1329
|
+
'circle-stroke-color': '#FFF',
|
1330
|
+
'circle-stroke-width': 1,
|
1331
|
+
},
|
1332
|
+
});
|
1333
|
+
this.map.addLayer(layer);
|
1334
|
+
}
|
1335
|
+
}
|
1336
|
+
checkInputs(latitude, longitude) {
|
1337
|
+
this.coordinates = undefined;
|
1338
|
+
this.addLayer();
|
1339
|
+
latitude = latitude.toString().trim();
|
1340
|
+
if (latitude === '' || isNaN(+latitude) || +latitude < -180 || +latitude > 180)
|
1341
|
+
return;
|
1342
|
+
longitude = longitude.toString().trim();
|
1343
|
+
if (longitude === '' || isNaN(+longitude) || +longitude < -180 || +longitude > 180)
|
1344
|
+
return;
|
1345
|
+
const center = [+longitude, +latitude];
|
1346
|
+
this.map.getView().animate({ center, duration: 1000 });
|
1347
|
+
this.coordinate = [+longitude, +latitude];
|
1348
|
+
this.coordinates = { latitude: +latitude, longitude: +longitude };
|
1349
|
+
this.addLayer();
|
1350
|
+
}
|
1351
|
+
selectCoordinates() {
|
1352
|
+
if (!this.coordinates)
|
1353
|
+
return;
|
1354
|
+
this.close(this.coordinates);
|
1355
|
+
}
|
1356
|
+
setCoordinates(event) {
|
1357
|
+
event.preventDefault();
|
1358
|
+
this.coordinate = this.map.getEventCoordinate(event).map((c) => +c.toFixed(7));
|
1359
|
+
this.coordinates = { latitude: this.coordinate[1], longitude: this.coordinate[0] };
|
1360
|
+
this.addLayer();
|
1361
|
+
}
|
1362
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1363
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: GetComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "get" } }, providers: [provideNgxMask()], ngImport: i0, template: "<div\n id=\"ngx-helper-m3-coordinates-map\"\n class=\"map\"\n (dblclick)=\"setCoordinates($event)\"\n (contextmenu)=\"setCoordinates($event)\"\n></div>\n\n<div class=\"coordinates\">\n <div class=\"header\">\n <div class=\"title\">COORDINATES</div>\n <mat-icon (click)=\"close()\">close</mat-icon>\n </div>\n <div class=\"item\">\n <div class=\"title\">LATITUDE</div>\n <input\n type=\"text\"\n maxlength=\"15\"\n inputmode=\"numeric\"\n [value]=\"coordinate[1] || ''\"\n mask=\"separator.12\"\n thousandSeparator=\"\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [inputTransformFn]=\"inputTransformFn\"\n (keyup.enter)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n (blur)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n #latitudeInput\n />\n </div>\n <div class=\"item\">\n <div class=\"title\">LONGITUDE</div>\n <input\n type=\"text\"\n maxlength=\"15\"\n inputmode=\"numeric\"\n [value]=\"coordinate[0] || ''\"\n mask=\"separator.12\"\n thousandSeparator=\"\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [inputTransformFn]=\"inputTransformFn\"\n (keyup.enter)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n (blur)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n #longitudeInput\n />\n </div>\n <div class=\"buttons\">\n <mat-icon [class.disabled]=\"!coordinates\" (click)=\"selectCoordinates()\">done_all</mat-icon>\n </div>\n</div>\n", styles: [":host{display:block;z-index:1000;position:fixed;inset:0}:host .map{width:100vw;height:100vh;background-color:#fff}:host .coordinates{position:absolute;bottom:0;left:0;padding:.5rem .5rem .75rem;background-color:#fff;box-shadow:0 0 5px 0 var(--primary)}:host .coordinates .header{display:flex;align-items:center;column-gap:1rem;padding:.5rem 1rem;color:var(--on-primary);background-color:var(--primary)}:host .coordinates .header .title{flex:1;font-size:90%;font-weight:500;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .header mat-icon{cursor:pointer;font-size:110%;color:var(--on-primary)}:host .coordinates .item{display:flex;align-items:center;column-gap:1rem;padding:.75rem 1rem 0;color:#000}:host .coordinates .item .title{flex:1;font-size:90%;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .item input{direction:ltr;text-align:left;outline:none;width:125px;font-size:90%;padding:.25rem;border-radius:4px;color:#000;border:1px solid rgb(200,200,200);font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .buttons{display:flex;justify-content:right;margin-top:.5rem;padding-right:1rem}:host .coordinates .buttons mat-icon{cursor:pointer;font-size:110%;color:#000}:host .coordinates .buttons mat-icon.disabled{opacity:.4}\n"], dependencies: [{ kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
1364
|
+
}
|
1365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GetComponent, decorators: [{
|
1366
|
+
type: Component,
|
1367
|
+
args: [{ host: { selector: 'get' }, imports: [NgxMaskDirective, MatIcon], providers: [provideNgxMask()], template: "<div\n id=\"ngx-helper-m3-coordinates-map\"\n class=\"map\"\n (dblclick)=\"setCoordinates($event)\"\n (contextmenu)=\"setCoordinates($event)\"\n></div>\n\n<div class=\"coordinates\">\n <div class=\"header\">\n <div class=\"title\">COORDINATES</div>\n <mat-icon (click)=\"close()\">close</mat-icon>\n </div>\n <div class=\"item\">\n <div class=\"title\">LATITUDE</div>\n <input\n type=\"text\"\n maxlength=\"15\"\n inputmode=\"numeric\"\n [value]=\"coordinate[1] || ''\"\n mask=\"separator.12\"\n thousandSeparator=\"\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [inputTransformFn]=\"inputTransformFn\"\n (keyup.enter)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n (blur)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n #latitudeInput\n />\n </div>\n <div class=\"item\">\n <div class=\"title\">LONGITUDE</div>\n <input\n type=\"text\"\n maxlength=\"15\"\n inputmode=\"numeric\"\n [value]=\"coordinate[0] || ''\"\n mask=\"separator.12\"\n thousandSeparator=\"\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [inputTransformFn]=\"inputTransformFn\"\n (keyup.enter)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n (blur)=\"checkInputs(latitudeInput.value, longitudeInput.value)\"\n #longitudeInput\n />\n </div>\n <div class=\"buttons\">\n <mat-icon [class.disabled]=\"!coordinates\" (click)=\"selectCoordinates()\">done_all</mat-icon>\n </div>\n</div>\n", styles: [":host{display:block;z-index:1000;position:fixed;inset:0}:host .map{width:100vw;height:100vh;background-color:#fff}:host .coordinates{position:absolute;bottom:0;left:0;padding:.5rem .5rem .75rem;background-color:#fff;box-shadow:0 0 5px 0 var(--primary)}:host .coordinates .header{display:flex;align-items:center;column-gap:1rem;padding:.5rem 1rem;color:var(--on-primary);background-color:var(--primary)}:host .coordinates .header .title{flex:1;font-size:90%;font-weight:500;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .header mat-icon{cursor:pointer;font-size:110%;color:var(--on-primary)}:host .coordinates .item{display:flex;align-items:center;column-gap:1rem;padding:.75rem 1rem 0;color:#000}:host .coordinates .item .title{flex:1;font-size:90%;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .item input{direction:ltr;text-align:left;outline:none;width:125px;font-size:90%;padding:.25rem;border-radius:4px;color:#000;border:1px solid rgb(200,200,200);font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .buttons{display:flex;justify-content:right;margin-top:.5rem;padding-right:1rem}:host .coordinates .buttons mat-icon{cursor:pointer;font-size:110%;color:#000}:host .coordinates .buttons mat-icon.disabled{opacity:.4}\n"] }]
|
1368
|
+
}] });
|
1369
|
+
|
1370
|
+
class ShowComponent {
|
1371
|
+
coordinates;
|
1372
|
+
config;
|
1373
|
+
close;
|
1374
|
+
map;
|
1375
|
+
copied;
|
1376
|
+
copyTimeout;
|
1377
|
+
ngOnInit() {
|
1378
|
+
const coordinate = [this.coordinates.longitude, this.coordinates.latitude];
|
1379
|
+
const point = new Point(coordinate);
|
1380
|
+
const zoom = this.config?.zoom || 15;
|
1381
|
+
const size = this.config?.size || 8;
|
1382
|
+
const color = this.config?.color || 'rgb(42, 101, 126)';
|
1383
|
+
this.map = new Map({
|
1384
|
+
view: new View({ center: coordinate, zoom, projection: 'EPSG:4326' }),
|
1385
|
+
layers: [
|
1386
|
+
new TileLayer({ source: new OSM() }),
|
1387
|
+
new VectorLayer({
|
1388
|
+
source: new VectorSource({ features: [new Feature(point)] }),
|
1389
|
+
style: {
|
1390
|
+
'circle-fill-color': color,
|
1391
|
+
'circle-radius': size,
|
1392
|
+
'circle-stroke-color': '#FFF',
|
1393
|
+
'circle-stroke-width': 1,
|
1394
|
+
},
|
1395
|
+
}),
|
1396
|
+
],
|
1397
|
+
target: 'ngx-helper-m3-coordinates-map',
|
1398
|
+
});
|
1399
|
+
}
|
1400
|
+
setCopy(type) {
|
1401
|
+
if (this.copyTimeout)
|
1402
|
+
clearTimeout(this.copyTimeout);
|
1403
|
+
this.copied = type;
|
1404
|
+
this.copyTimeout = setTimeout(() => (this.copied = undefined), 1000);
|
1405
|
+
}
|
1406
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ShowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1407
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ShowComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "show" } }, ngImport: i0, template: "<div id=\"ngx-helper-m3-coordinates-map\" class=\"map\"></div>\n\n<div class=\"coordinates\">\n <div class=\"header\">\n <div class=\"title\">COORDINATES</div>\n <mat-icon (click)=\"close()\">close</mat-icon>\n </div>\n <div class=\"item\">\n <div class=\"title\">LATITUDE</div>\n <div class=\"value\">{{ coordinates.latitude.toFixed(7) }}</div>\n <mat-icon [cdkCopyToClipboard]=\"coordinates.latitude.toString()\" (click)=\"setCopy('LATITUDE')\">\n {{ copied === 'LATITUDE' ? 'done_all' : 'copy' }}\n </mat-icon>\n </div>\n <div class=\"item\">\n <div class=\"title\">LONGITUDE</div>\n <div class=\"value\">{{ coordinates.longitude.toFixed(7) }}</div>\n <mat-icon [cdkCopyToClipboard]=\"coordinates.longitude.toString()\" (click)=\"setCopy('LONGITUDE')\">\n {{ copied === 'LONGITUDE' ? 'done_all' : 'copy' }}\n </mat-icon>\n </div>\n</div>\n", styles: [":host{display:block;z-index:1000;position:fixed;inset:0}:host .map{width:100vw;height:100vh;background-color:#fff}:host .coordinates{position:absolute;bottom:0;left:0;padding:.5rem .5rem .75rem;background-color:#fff;box-shadow:0 0 5px 0 var(--primary)}:host .coordinates .header{display:flex;align-items:center;column-gap:1rem;padding:.5rem 1rem;color:var(--on-primary);background-color:var(--primary)}:host .coordinates .header .title{flex:1;font-size:90%;font-weight:500;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .header mat-icon{cursor:pointer;font-size:110%;color:var(--on-primary)}:host .coordinates .item{display:flex;align-items:center;column-gap:1rem;padding:.75rem 1rem 0;color:#000}:host .coordinates .item .title{font-size:90%;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .item .value{flex:1;font-size:95%;text-align:right;padding-right:1rem;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .item mat-icon{cursor:pointer;font-size:100%;color:#000}\n"], dependencies: [{ kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i3.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
1408
|
+
}
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ShowComponent, decorators: [{
|
1410
|
+
type: Component,
|
1411
|
+
args: [{ host: { selector: 'show' }, imports: [ClipboardModule, MatIcon], template: "<div id=\"ngx-helper-m3-coordinates-map\" class=\"map\"></div>\n\n<div class=\"coordinates\">\n <div class=\"header\">\n <div class=\"title\">COORDINATES</div>\n <mat-icon (click)=\"close()\">close</mat-icon>\n </div>\n <div class=\"item\">\n <div class=\"title\">LATITUDE</div>\n <div class=\"value\">{{ coordinates.latitude.toFixed(7) }}</div>\n <mat-icon [cdkCopyToClipboard]=\"coordinates.latitude.toString()\" (click)=\"setCopy('LATITUDE')\">\n {{ copied === 'LATITUDE' ? 'done_all' : 'copy' }}\n </mat-icon>\n </div>\n <div class=\"item\">\n <div class=\"title\">LONGITUDE</div>\n <div class=\"value\">{{ coordinates.longitude.toFixed(7) }}</div>\n <mat-icon [cdkCopyToClipboard]=\"coordinates.longitude.toString()\" (click)=\"setCopy('LONGITUDE')\">\n {{ copied === 'LONGITUDE' ? 'done_all' : 'copy' }}\n </mat-icon>\n </div>\n</div>\n", styles: [":host{display:block;z-index:1000;position:fixed;inset:0}:host .map{width:100vw;height:100vh;background-color:#fff}:host .coordinates{position:absolute;bottom:0;left:0;padding:.5rem .5rem .75rem;background-color:#fff;box-shadow:0 0 5px 0 var(--primary)}:host .coordinates .header{display:flex;align-items:center;column-gap:1rem;padding:.5rem 1rem;color:var(--on-primary);background-color:var(--primary)}:host .coordinates .header .title{flex:1;font-size:90%;font-weight:500;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .header mat-icon{cursor:pointer;font-size:110%;color:var(--on-primary)}:host .coordinates .item{display:flex;align-items:center;column-gap:1rem;padding:.75rem 1rem 0;color:#000}:host .coordinates .item .title{font-size:90%;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .item .value{flex:1;font-size:95%;text-align:right;padding-right:1rem;font-family:Roboto,Helvetica Neue,sans-serif}:host .coordinates .item mat-icon{cursor:pointer;font-size:100%;color:#000}\n"] }]
|
1412
|
+
}] });
|
1413
|
+
|
1414
|
+
class NgxHelperCoordinatesService {
|
1415
|
+
applicationRef;
|
1416
|
+
injector;
|
1417
|
+
constructor(applicationRef, injector) {
|
1418
|
+
this.applicationRef = applicationRef;
|
1419
|
+
this.injector = injector;
|
1420
|
+
}
|
1421
|
+
get(arg1, arg2) {
|
1422
|
+
const coordinates = arg1 ? ('latitude' in arg1 ? arg1 : undefined) : undefined;
|
1423
|
+
const config = arg2 || (arg1 && !coordinates ? arg1 : undefined);
|
1424
|
+
return new Promise((resolve, reject) => {
|
1425
|
+
const componentRef = createComponent(GetComponent, {
|
1426
|
+
environmentInjector: this.applicationRef.injector,
|
1427
|
+
elementInjector: this.injector,
|
1428
|
+
});
|
1429
|
+
componentRef.instance.coordinates = coordinates;
|
1430
|
+
componentRef.instance.config = config;
|
1431
|
+
componentRef.instance.close = (coordinates) => {
|
1432
|
+
this.applicationRef.detachView(componentRef.hostView);
|
1433
|
+
componentRef.destroy();
|
1434
|
+
coordinates ? resolve(coordinates) : reject();
|
1435
|
+
};
|
1436
|
+
const htmlElement = componentRef.hostView.rootNodes[0];
|
1437
|
+
this.applicationRef.attachView(componentRef.hostView);
|
1438
|
+
document.body.appendChild(htmlElement);
|
1439
|
+
});
|
1440
|
+
}
|
1441
|
+
show(coordinates, config) {
|
1442
|
+
const componentRef = createComponent(ShowComponent, {
|
1443
|
+
environmentInjector: this.applicationRef.injector,
|
1444
|
+
elementInjector: this.injector,
|
1445
|
+
});
|
1446
|
+
componentRef.instance.coordinates = coordinates;
|
1447
|
+
componentRef.instance.config = config;
|
1448
|
+
componentRef.instance.close = () => {
|
1449
|
+
this.applicationRef.detachView(componentRef.hostView);
|
1450
|
+
componentRef.destroy();
|
1451
|
+
};
|
1452
|
+
const htmlElement = componentRef.hostView.rootNodes[0];
|
1453
|
+
this.applicationRef.attachView(componentRef.hostView);
|
1454
|
+
document.body.appendChild(htmlElement);
|
1455
|
+
}
|
1456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperCoordinatesService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
1457
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperCoordinatesService, providedIn: 'root' });
|
1458
|
+
}
|
1459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperCoordinatesService, decorators: [{
|
1460
|
+
type: Injectable,
|
1461
|
+
args: [{ providedIn: 'root' }]
|
1462
|
+
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }] });
|
1463
|
+
|
1464
|
+
class NgxHelperMultiLinePipe {
|
1465
|
+
domSanitizer;
|
1466
|
+
constructor(domSanitizer) {
|
1467
|
+
this.domSanitizer = domSanitizer;
|
1468
|
+
}
|
1469
|
+
transform(value, options) {
|
1470
|
+
if (value === undefined || value === null || !Helper.IS.string(value) || value === '')
|
1471
|
+
return '';
|
1472
|
+
return options?.html
|
1473
|
+
? this.domSanitizer.bypassSecurityTrustHtml(value.replace(/(?:\r\n|\r|\n)/g, '<br />'))
|
1474
|
+
: Helper.STRING.escapeHTML(value).replace(/(?:\r\n|\r|\n)/g, '<br />');
|
1475
|
+
}
|
1476
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMultiLinePipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
1477
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMultiLinePipe, isStandalone: true, name: "ngxHelperMultiLine" });
|
1478
|
+
}
|
1479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMultiLinePipe, decorators: [{
|
1480
|
+
type: Pipe,
|
1481
|
+
args: [{ name: 'ngxHelperMultiLine' }]
|
1482
|
+
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }] });
|
1343
1483
|
|
1344
1484
|
class ToastComponent {
|
1345
1485
|
elementRef;
|
@@ -1867,6 +2007,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
1867
2007
|
args: [{ providedIn: 'root' }]
|
1868
2008
|
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: NgxHelperToastService }] });
|
1869
2009
|
|
2010
|
+
class NgxHelperStickyDirective {
|
2011
|
+
elementRef;
|
2012
|
+
config;
|
2013
|
+
ngxHelperSticky;
|
2014
|
+
stickyIn = 'ALWAYS';
|
2015
|
+
zIndex;
|
2016
|
+
mobileWidth;
|
2017
|
+
stickyView;
|
2018
|
+
isMobile = false;
|
2019
|
+
constructor(elementRef, config) {
|
2020
|
+
this.elementRef = elementRef;
|
2021
|
+
this.config = config;
|
2022
|
+
}
|
2023
|
+
ngOnInit() {
|
2024
|
+
const getStickyView = (config) => {
|
2025
|
+
return {
|
2026
|
+
desktopView: typeof config === 'string' ? config : config.desktopView,
|
2027
|
+
mobileView: typeof config === 'string' ? config : config.mobileView,
|
2028
|
+
};
|
2029
|
+
};
|
2030
|
+
(this.mobileWidth = this.config?.mobileWidth || 600),
|
2031
|
+
(this.stickyView = {
|
2032
|
+
top: this.config?.stickyView?.top ? getStickyView(this.config.stickyView.top) : undefined,
|
2033
|
+
bottom: this.config?.stickyView?.bottom ? getStickyView(this.config.stickyView.bottom) : undefined,
|
2034
|
+
});
|
2035
|
+
this.onResize();
|
2036
|
+
}
|
2037
|
+
onResize() {
|
2038
|
+
this.isMobile = window.innerWidth <= this.mobileWidth;
|
2039
|
+
this.setPosition();
|
2040
|
+
}
|
2041
|
+
setPosition() {
|
2042
|
+
const element = this.elementRef.nativeElement;
|
2043
|
+
if (!element)
|
2044
|
+
return;
|
2045
|
+
const sticky = this.stickyIn === 'ALWAYS' ||
|
2046
|
+
(this.stickyIn === 'DESKTOP' && !this.isMobile) ||
|
2047
|
+
(this.stickyIn === 'MOBILE' && this.isMobile);
|
2048
|
+
switch (this.ngxHelperSticky) {
|
2049
|
+
case 'TOP':
|
2050
|
+
const top = this.stickyView.top;
|
2051
|
+
if (!top)
|
2052
|
+
return;
|
2053
|
+
element.style.position = sticky ? 'sticky' : 'static';
|
2054
|
+
element.style.zIndex = sticky ? (this.zIndex ? this.zIndex.toString() : '1') : 'auto';
|
2055
|
+
element.style.top = sticky ? (this.isMobile ? top.mobileView : top.desktopView) : 'auto';
|
2056
|
+
break;
|
2057
|
+
case 'BOTTOM':
|
2058
|
+
const bottom = this.stickyView.bottom;
|
2059
|
+
if (!bottom)
|
2060
|
+
return;
|
2061
|
+
element.style.position = sticky ? 'sticky' : 'static';
|
2062
|
+
element.style.zIndex = sticky ? (this.zIndex ? this.zIndex.toString() : '1') : 'auto';
|
2063
|
+
element.style.bottom = sticky ? (this.isMobile ? bottom.mobileView : bottom.desktopView) : 'auto';
|
2064
|
+
break;
|
2065
|
+
}
|
2066
|
+
}
|
2067
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperStickyDirective, deps: [{ token: i0.ElementRef }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
2068
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: NgxHelperStickyDirective, isStandalone: true, selector: "[ngxHelperSticky]", inputs: { ngxHelperSticky: "ngxHelperSticky", stickyIn: "stickyIn", zIndex: "zIndex" }, host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0 });
|
2069
|
+
}
|
2070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperStickyDirective, decorators: [{
|
2071
|
+
type: Directive,
|
2072
|
+
args: [{
|
2073
|
+
selector: '[ngxHelperSticky]',
|
2074
|
+
host: { '(window:resize)': 'onResize($event)' },
|
2075
|
+
}]
|
2076
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
2077
|
+
type: Optional
|
2078
|
+
}, {
|
2079
|
+
type: Inject,
|
2080
|
+
args: [NGX_HELPER_CONFIG]
|
2081
|
+
}] }], propDecorators: { ngxHelperSticky: [{
|
2082
|
+
type: Input,
|
2083
|
+
args: [{ required: true }]
|
2084
|
+
}], stickyIn: [{
|
2085
|
+
type: Input,
|
2086
|
+
args: [{ required: false }]
|
2087
|
+
}], zIndex: [{
|
2088
|
+
type: Input,
|
2089
|
+
args: [{ required: false }]
|
2090
|
+
}] } });
|
2091
|
+
|
2092
|
+
class NgxHelperSafePipe {
|
2093
|
+
domSanitizer;
|
2094
|
+
constructor(domSanitizer) {
|
2095
|
+
this.domSanitizer = domSanitizer;
|
2096
|
+
}
|
2097
|
+
transform(value, options) {
|
2098
|
+
if (value === undefined || value === null || !Helper.IS.string(value) || value === '')
|
2099
|
+
return '';
|
2100
|
+
switch (options?.type || 'HTML') {
|
2101
|
+
case 'STYLE':
|
2102
|
+
return this.domSanitizer.bypassSecurityTrustStyle(value);
|
2103
|
+
case 'SCRIPT':
|
2104
|
+
return this.domSanitizer.bypassSecurityTrustScript(value);
|
2105
|
+
case 'URL':
|
2106
|
+
return this.domSanitizer.bypassSecurityTrustUrl(value);
|
2107
|
+
case 'RESOURCE_URL':
|
2108
|
+
return this.domSanitizer.bypassSecurityTrustResourceUrl(value);
|
2109
|
+
case 'HTML':
|
2110
|
+
return this.domSanitizer.bypassSecurityTrustHtml(value);
|
2111
|
+
}
|
2112
|
+
}
|
2113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSafePipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
2114
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSafePipe, isStandalone: true, name: "ngxHelperSafe" });
|
2115
|
+
}
|
2116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSafePipe, decorators: [{
|
2117
|
+
type: Pipe,
|
2118
|
+
args: [{ name: 'ngxHelperSafe' }]
|
2119
|
+
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }] });
|
2120
|
+
|
1870
2121
|
/*
|
1871
2122
|
* Public API Surface of ngx-helper-m3
|
1872
2123
|
*/
|
@@ -1875,5 +2126,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
1875
2126
|
* Generated bundle index. Do not edit.
|
1876
2127
|
*/
|
1877
2128
|
|
1878
|
-
export { NGX_HELPER_BOX_DATA, NGX_HELPER_CONFIG, NGX_HELPER_CONTAINER_CLOSE, NGX_HELPER_CONTAINER_DATA, NGX_HELPER_CONTAINER_TYPE, NGX_HELPER_PAGE_GROUP_DATA, NGX_HELPER_PAGE_GROUP_DATA_CHANGE, NGX_HELPER_PAGE_GROUP_ITEM, NgxHelperBankCardPipe, NgxHelperBoxComponent, NgxHelperCardComponent, NgxHelperConfirmService, NgxHelperContainerService, NgxHelperDatePipe, NgxHelperDurationPipe, NgxHelperFileSizePipe, NgxHelperHttpService, NgxHelperLoaderComponent, NgxHelperMobilePipe, NgxHelperMultiLinePipe, NgxHelperNumberPipe, NgxHelperPageGroupComponent, NgxHelperPeriodPipe, NgxHelperPricePipe, NgxHelperProgressComponent, NgxHelperSafePipe, NgxHelperSectionColumnComponent, NgxHelperSectionComponent,
|
2129
|
+
export { NGX_HELPER_BOX_DATA, NGX_HELPER_CONFIG, NGX_HELPER_CONTAINER_CLOSE, NGX_HELPER_CONTAINER_DATA, NGX_HELPER_CONTAINER_TYPE, NGX_HELPER_PAGE_GROUP_DATA, NGX_HELPER_PAGE_GROUP_DATA_CHANGE, NGX_HELPER_PAGE_GROUP_ITEM, NgxHelperBankCardPipe, NgxHelperBoxComponent, NgxHelperCardComponent, NgxHelperConfirmService, NgxHelperContainerService, NgxHelperCoordinatesService, NgxHelperDatePipe, NgxHelperDurationPipe, NgxHelperFileSizePipe, NgxHelperHttpService, NgxHelperLoaderComponent, NgxHelperMobilePipe, NgxHelperMultiLinePipe, NgxHelperNumberPipe, NgxHelperPageGroupComponent, NgxHelperPeriodPipe, NgxHelperPricePipe, NgxHelperProgressComponent, NgxHelperSafePipe, NgxHelperSectionColumnComponent, NgxHelperSectionComponent, NgxHelperStickyDirective, NgxHelperToastService, NgxHelperValueBoxComponent, NgxHelperValueListComponent, NgxHelperValuePipe, NgxHelperVolumePipe, NgxHelperWeightPipe, provideNgxHelperConfig };
|
1879
2130
|
//# sourceMappingURL=webilix-ngx-helper-m3.mjs.map
|