@webilix/ngx-helper-m3 0.0.16 → 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 +190 -2
- package/fesm2022/webilix-ngx-helper-m3.mjs.map +1 -1
- 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/package.json +4 -2
- package/public-api.d.ts +2 -0
@@ -1,5 +1,5 @@
|
|
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
4
|
import * as i1$1 from '@angular/material/button';
|
5
5
|
import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
|
@@ -17,6 +17,14 @@ import * as i2$1 from '@angular/material/dialog';
|
|
17
17
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
18
18
|
import * as i1$2 from '@angular/material/bottom-sheet';
|
19
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';
|
20
28
|
import { trigger, transition, style, animate } from '@angular/animations';
|
21
29
|
import * as i1$4 from '@angular/common/http';
|
22
30
|
import { HttpHeaders, HttpEventType } from '@angular/common/http';
|
@@ -1273,6 +1281,186 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
1273
1281
|
args: [{ providedIn: 'root' }]
|
1274
1282
|
}], ctorParameters: () => [{ type: i1$2.MatBottomSheet }, { type: i2$1.MatDialog }] });
|
1275
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
|
+
|
1276
1464
|
class NgxHelperMultiLinePipe {
|
1277
1465
|
domSanitizer;
|
1278
1466
|
constructor(domSanitizer) {
|
@@ -1938,5 +2126,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
1938
2126
|
* Generated bundle index. Do not edit.
|
1939
2127
|
*/
|
1940
2128
|
|
1941
|
-
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, NgxHelperStickyDirective, NgxHelperToastService, NgxHelperValueBoxComponent, NgxHelperValueListComponent, NgxHelperValuePipe, NgxHelperVolumePipe, NgxHelperWeightPipe, provideNgxHelperConfig };
|
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 };
|
1942
2130
|
//# sourceMappingURL=webilix-ngx-helper-m3.mjs.map
|