@webilix/ngx-helper-m3 0.0.12 → 0.0.14
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 +552 -107
- package/fesm2022/webilix-ngx-helper-m3.mjs.map +1 -1
- package/lib/components/loader/ngx-helper-loader.component.d.ts +6 -3
- package/lib/components/progress/ngx-helper-progress.component.d.ts +20 -0
- package/lib/http/download/download.component.d.ts +25 -0
- package/lib/http/ngx-helper-http.interface.d.ts +6 -0
- package/lib/http/ngx-helper-http.service.d.ts +13 -2
- package/lib/http/upload/upload.component.d.ts +1 -1
- package/lib/ngx-helper.config.d.ts +5 -0
- package/lib/toast/ngx-helper-toast.interface.d.ts +4 -0
- package/lib/toast/ngx-helper-toast.service.d.ts +41 -0
- package/lib/toast/toast/toast.component.d.ts +35 -0
- package/ngx-helper-m3.css +157 -1
- package/package.json +4 -4
- package/public-api.d.ts +3 -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, Directive, createComponent } from '@angular/core';
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, Injector, Component, HostBinding, Input, Pipe, Injectable, Optional, Inject, EventEmitter, Output, inject, Directive, HostListener, createComponent } from '@angular/core';
|
3
3
|
import { NgComponentOutlet, NgClass } from '@angular/common';
|
4
4
|
import * as i1$2 from '@angular/material/button';
|
5
5
|
import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
|
@@ -18,9 +18,9 @@ import * as i2$1 from '@angular/material/dialog';
|
|
18
18
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
19
19
|
import * as i1$3 from '@angular/material/bottom-sheet';
|
20
20
|
import { MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
|
21
|
+
import { trigger, transition, style, animate } from '@angular/animations';
|
21
22
|
import * as i1$4 from '@angular/common/http';
|
22
23
|
import { HttpHeaders, HttpEventType } from '@angular/common/http';
|
23
|
-
import { trigger, transition, style, animate } from '@angular/animations';
|
24
24
|
|
25
25
|
const NGX_HELPER_CONFIG = new InjectionToken('NGX-HELPER-CONFIG');
|
26
26
|
const provideNgxHelperConfig = (config) => {
|
@@ -53,10 +53,10 @@ class NgxHelperBoxComponent {
|
|
53
53
|
providers: [{ provide: NGX_HELPER_BOX_DATA, useValue: this.data }],
|
54
54
|
});
|
55
55
|
}
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
57
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NgxHelperBoxComponent, isStandalone: true, selector: "ngx-helper-box", inputs: { component: "component", data: "data", padding: "padding", hideShadow: "hideShadow" }, host: { properties: { "className": "this.className", "style.padding": "this.paddingCSS" } }, usesOnChanges: true, ngImport: i0, template: "@if (component) {\n<span *ngComponentOutlet=\"component; injector: injector\"></span>\n} @else {\n<ng-content></ng-content>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }] });
|
58
58
|
}
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperBoxComponent, decorators: [{
|
60
60
|
type: Component,
|
61
61
|
args: [{ selector: 'ngx-helper-box', imports: [NgComponentOutlet], template: "@if (component) {\n<span *ngComponentOutlet=\"component; injector: injector\"></span>\n} @else {\n<ng-content></ng-content>\n}\n" }]
|
62
62
|
}], propDecorators: { className: [{
|
@@ -90,10 +90,10 @@ class NgxHelperBankCardPipe {
|
|
90
90
|
return Helper.STRING.getBankCardView(value, options?.join || '-');
|
91
91
|
}
|
92
92
|
}
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
94
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperBankCardPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
94
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperBankCardPipe, isStandalone: true, name: "ngxHelperBankCard" });
|
95
95
|
}
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperBankCardPipe, decorators: [{
|
97
97
|
type: Pipe,
|
98
98
|
args: [{ name: 'ngxHelperBankCard' }]
|
99
99
|
}] });
|
@@ -125,10 +125,10 @@ class NgxHelperDatePipe {
|
|
125
125
|
return jalali.toFullText(date, { format: options?.format, timezone });
|
126
126
|
}
|
127
127
|
}
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
129
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
129
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperDatePipe, isStandalone: true, name: "ngxHelperDate" });
|
130
130
|
}
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperDatePipe, decorators: [{
|
132
132
|
type: Pipe,
|
133
133
|
args: [{ name: 'ngxHelperDate' }]
|
134
134
|
}] });
|
@@ -175,10 +175,10 @@ class NgxHelperDurationPipe {
|
|
175
175
|
return Helper.NUMBER.format(days * 24 * 3600 + hours * 3600 + minutes * 60 + seconds, !!options?.english ? 'EN' : 'FA');
|
176
176
|
}
|
177
177
|
}
|
178
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
179
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
179
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperDurationPipe, isStandalone: true, name: "ngxHelperDuration" });
|
180
180
|
}
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperDurationPipe, decorators: [{
|
182
182
|
type: Pipe,
|
183
183
|
args: [{ name: 'ngxHelperDuration' }]
|
184
184
|
}] });
|
@@ -189,10 +189,10 @@ class NgxHelperFileSizePipe {
|
|
189
189
|
return '';
|
190
190
|
return Helper.NUMBER.toFileSize(value, !!options?.english ? 'EN' : 'FA');
|
191
191
|
}
|
192
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
193
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperFileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
193
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperFileSizePipe, isStandalone: true, name: "ngxHelperFileSize" });
|
194
194
|
}
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperFileSizePipe, decorators: [{
|
196
196
|
type: Pipe,
|
197
197
|
args: [{ name: 'ngxHelperFileSize' }]
|
198
198
|
}] });
|
@@ -203,10 +203,10 @@ class NgxHelperMobilePipe {
|
|
203
203
|
return '';
|
204
204
|
return Helper.STRING.getMobileView(value, options?.join || '-');
|
205
205
|
}
|
206
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
207
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMobilePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
207
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMobilePipe, isStandalone: true, name: "ngxHelperMobile" });
|
208
208
|
}
|
209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMobilePipe, decorators: [{
|
210
210
|
type: Pipe,
|
211
211
|
args: [{ name: 'ngxHelperMobile' }]
|
212
212
|
}] });
|
@@ -218,10 +218,10 @@ class NgxHelperNumberPipe {
|
|
218
218
|
value = options?.fractionDigits ? +value.toFixed(options?.fractionDigits) : value;
|
219
219
|
return Helper.NUMBER.format(value, options?.english ? 'EN' : 'FA');
|
220
220
|
}
|
221
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
222
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
222
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperNumberPipe, isStandalone: true, name: "ngxHelperNumber" });
|
223
223
|
}
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperNumberPipe, decorators: [{
|
225
225
|
type: Pipe,
|
226
226
|
args: [{ name: 'ngxHelperNumber' }]
|
227
227
|
}] });
|
@@ -234,10 +234,10 @@ class NgxHelperPeriodPipe {
|
|
234
234
|
const to = Helper.IS.date(value) ? new Date() : 'to' in value ? value.to : new Date();
|
235
235
|
return Helper.DATE.jalaliPeriod(from, to, options?.timezone || '');
|
236
236
|
}
|
237
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
238
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPeriodPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
238
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPeriodPipe, isStandalone: true, name: "ngxHelperPeriod" });
|
239
239
|
}
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPeriodPipe, decorators: [{
|
241
241
|
type: Pipe,
|
242
242
|
args: [{ name: 'ngxHelperPeriod' }]
|
243
243
|
}] });
|
@@ -265,10 +265,10 @@ class NgxHelperPricePipe {
|
|
265
265
|
value /= 1000;
|
266
266
|
return getPrice(['B', 'د'], ['Billion', 'میلیارد']);
|
267
267
|
}
|
268
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
269
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
269
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPricePipe, isStandalone: true, name: "ngxHelperPrice" });
|
270
270
|
}
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPricePipe, decorators: [{
|
272
272
|
type: Pipe,
|
273
273
|
args: [{ name: 'ngxHelperPrice' }]
|
274
274
|
}] });
|
@@ -292,10 +292,10 @@ class NgxHelperVolumePipe {
|
|
292
292
|
value /= 1000;
|
293
293
|
return getVolume(['L', 'ل'], ['Liter', 'لیتر']);
|
294
294
|
}
|
295
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
296
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
295
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperVolumePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
296
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperVolumePipe, isStandalone: true, name: "ngxHelperVolume" });
|
297
297
|
}
|
298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperVolumePipe, decorators: [{
|
299
299
|
type: Pipe,
|
300
300
|
args: [{ name: 'ngxHelperVolume' }]
|
301
301
|
}] });
|
@@ -325,10 +325,10 @@ class NgxHelperWeightPipe {
|
|
325
325
|
value /= 1000;
|
326
326
|
return getWeight(['KT', 'ه'], ['Kilotonne', 'هزار تن']);
|
327
327
|
}
|
328
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
329
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
328
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperWeightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
329
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperWeightPipe, isStandalone: true, name: "ngxHelperWeight" });
|
330
330
|
}
|
331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperWeightPipe, decorators: [{
|
332
332
|
type: Pipe,
|
333
333
|
args: [{ name: 'ngxHelperWeight' }]
|
334
334
|
}] });
|
@@ -363,10 +363,10 @@ class NgxHelperValuePipe {
|
|
363
363
|
return new NgxHelperWeightPipe().transform(value.value, value) || emptyText;
|
364
364
|
}
|
365
365
|
}
|
366
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
367
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
367
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperValuePipe, isStandalone: true, name: "ngxHelperValue" });
|
368
368
|
}
|
369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperValuePipe, decorators: [{
|
370
370
|
type: Pipe,
|
371
371
|
args: [{ name: 'ngxHelperValue' }]
|
372
372
|
}] });
|
@@ -398,7 +398,7 @@ class ComponentService {
|
|
398
398
|
return value === undefined
|
399
399
|
? { title: item.title, value: '' }
|
400
400
|
: typeof value === 'string'
|
401
|
-
? { title: item.title, value: value.trim() }
|
401
|
+
? { title: item.title, value: value.trim(), color: item.color }
|
402
402
|
: {
|
403
403
|
title: item.title,
|
404
404
|
value: pipeTransform(value),
|
@@ -410,10 +410,10 @@ class ComponentService {
|
|
410
410
|
};
|
411
411
|
});
|
412
412
|
}
|
413
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
414
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
414
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ComponentService });
|
415
415
|
}
|
416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ComponentService, decorators: [{
|
417
417
|
type: Injectable
|
418
418
|
}] });
|
419
419
|
|
@@ -448,10 +448,10 @@ class NgxHelperCardComponent {
|
|
448
448
|
onResize() {
|
449
449
|
this.isMobile = window.innerWidth <= this.componentConfig.mobileWidth;
|
450
450
|
}
|
451
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
452
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
451
|
+
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"] }] });
|
453
453
|
}
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperCardComponent, decorators: [{
|
455
455
|
type: Component,
|
456
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"] }]
|
457
457
|
}], ctorParameters: () => [{ type: ComponentService }, { type: undefined, decorators: [{
|
@@ -488,20 +488,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
488
488
|
class NgxHelperLoaderComponent {
|
489
489
|
loaderSize;
|
490
490
|
loaderColor;
|
491
|
-
mode;
|
491
|
+
mode = 'SPINNER';
|
492
492
|
size;
|
493
493
|
color;
|
494
494
|
padding;
|
495
|
+
margin;
|
496
|
+
ngOnInit() {
|
497
|
+
this.init();
|
498
|
+
}
|
495
499
|
ngOnChanges(changes) {
|
500
|
+
this.init();
|
501
|
+
}
|
502
|
+
init() {
|
496
503
|
this.loaderSize = `${this.size || 25}px`;
|
497
504
|
this.loaderColor = this.color || `var(--secondary)`;
|
498
505
|
}
|
499
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
500
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
506
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
507
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NgxHelperLoaderComponent, isStandalone: true, selector: "ngx-helper-loader", inputs: { mode: "mode", size: "size", color: "color", padding: "padding", margin: "margin" }, host: { properties: { "style.--loader-size": "this.loaderSize", "style.--loader-color": "this.loaderColor" } }, usesOnChanges: true, ngImport: i0, template: "<div [style.padding]=\"padding || '0'\">\n <div [class]=\"mode.toLowerCase()\" [style.margin]=\"margin || '0px'\"></div>\n</div>\n", styles: [".spinner{--size: calc(var(--loader-size) / 7);width:var(--loader-size);aspect-ratio:1;border-radius:50%;background:radial-gradient(farthest-side,var(--loader-color) 94%,rgba(0,0,0,0)) top/var(--size) var(--size) no-repeat,conic-gradient(rgba(0,0,0,0) 30%,var(--loader-color));mask:radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - var(--size)),#000 0);animation:spinner 1s infinite linear}@keyframes spinner{to{transform:rotate(1turn)}}.dots-spinner{--dot: no-repeat radial-gradient(farthest-side, var(--loader-color) 92%, #0000);--size: calc(var(--loader-size) / 4);width:var(--loader-size);aspect-ratio:1;background:var(--dot) top,var(--dot) left,var(--dot) right,var(--dot) bottom;background-size:var(--size) var(--size);animation:dots-spinner 1s infinite}@keyframes dots-spinner{to{transform:rotate(.5turn)}}.wheel-spinner{--size: calc(var(--loader-size) / 9);width:var(--loader-size);aspect-ratio:1;border-radius:50%;background:var(--loader-color);mask:repeating-conic-gradient(rgba(0,0,0,0) 0deg,#000 1deg 70deg,rgba(0,0,0,0) 71deg 90deg),radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - var(--size) - 1px),#000 calc(100% - var(--size)));-webkit-mask-composite:destination-in;mask-composite:intersect;animation:wheel-spinner 1s infinite}@keyframes wheel-spinner{to{transform:rotate(.5turn)}}\n"] });
|
501
508
|
}
|
502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperLoaderComponent, decorators: [{
|
503
510
|
type: Component,
|
504
|
-
args: [{ selector: 'ngx-helper-loader', imports: [], template: "<div [style.padding]=\"padding || '0'\">\n <div [class]=\"mode.toLowerCase()\"></div>\n</div>\n", styles: [".spinner{--size: calc(var(--loader-size) / 7);width:var(--loader-size);aspect-ratio:1;border-radius:50%;background:radial-gradient(farthest-side,var(--loader-color) 94%,rgba(0,0,0,0)) top/var(--size) var(--size) no-repeat,conic-gradient(rgba(0,0,0,0) 30%,var(--loader-color));mask:radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - var(--size)),#000 0);animation:spinner 1s infinite linear}@keyframes spinner{to{transform:rotate(1turn)}}.dots-spinner{--dot: no-repeat radial-gradient(farthest-side, var(--loader-color) 92%, #0000);--size: calc(var(--loader-size) / 4);width:var(--loader-size);aspect-ratio:1;background:var(--dot) top,var(--dot) left,var(--dot) right,var(--dot) bottom;background-size:var(--size) var(--size);animation:dots-spinner 1s infinite}@keyframes dots-spinner{to{transform:rotate(.5turn)}}.wheel-spinner{--size: calc(var(--loader-size) / 9);width:var(--loader-size);aspect-ratio:1;border-radius:50%;background:var(--loader-color);mask:repeating-conic-gradient(rgba(0,0,0,0) 0deg,#000 1deg 70deg,rgba(0,0,0,0) 71deg 90deg),radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - var(--size) - 1px),#000 calc(100% - var(--size)));-webkit-mask-composite:destination-in;mask-composite:intersect;animation:wheel-spinner 1s infinite}@keyframes wheel-spinner{to{transform:rotate(.5turn)}}\n"] }]
|
511
|
+
args: [{ selector: 'ngx-helper-loader', imports: [], template: "<div [style.padding]=\"padding || '0'\">\n <div [class]=\"mode.toLowerCase()\" [style.margin]=\"margin || '0px'\"></div>\n</div>\n", styles: [".spinner{--size: calc(var(--loader-size) / 7);width:var(--loader-size);aspect-ratio:1;border-radius:50%;background:radial-gradient(farthest-side,var(--loader-color) 94%,rgba(0,0,0,0)) top/var(--size) var(--size) no-repeat,conic-gradient(rgba(0,0,0,0) 30%,var(--loader-color));mask:radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - var(--size)),#000 0);animation:spinner 1s infinite linear}@keyframes spinner{to{transform:rotate(1turn)}}.dots-spinner{--dot: no-repeat radial-gradient(farthest-side, var(--loader-color) 92%, #0000);--size: calc(var(--loader-size) / 4);width:var(--loader-size);aspect-ratio:1;background:var(--dot) top,var(--dot) left,var(--dot) right,var(--dot) bottom;background-size:var(--size) var(--size);animation:dots-spinner 1s infinite}@keyframes dots-spinner{to{transform:rotate(.5turn)}}.wheel-spinner{--size: calc(var(--loader-size) / 9);width:var(--loader-size);aspect-ratio:1;border-radius:50%;background:var(--loader-color);mask:repeating-conic-gradient(rgba(0,0,0,0) 0deg,#000 1deg 70deg,rgba(0,0,0,0) 71deg 90deg),radial-gradient(farthest-side,rgba(0,0,0,0) calc(100% - var(--size) - 1px),#000 calc(100% - var(--size)));-webkit-mask-composite:destination-in;mask-composite:intersect;animation:wheel-spinner 1s infinite}@keyframes wheel-spinner{to{transform:rotate(.5turn)}}\n"] }]
|
505
512
|
}], propDecorators: { loaderSize: [{
|
506
513
|
type: HostBinding,
|
507
514
|
args: ['style.--loader-size']
|
@@ -510,7 +517,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
510
517
|
args: ['style.--loader-color']
|
511
518
|
}], mode: [{
|
512
519
|
type: Input,
|
513
|
-
args: [{ required:
|
520
|
+
args: [{ required: false }]
|
514
521
|
}], size: [{
|
515
522
|
type: Input,
|
516
523
|
args: [{ required: false }]
|
@@ -520,6 +527,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
520
527
|
}], padding: [{
|
521
528
|
type: Input,
|
522
529
|
args: [{ required: false }]
|
530
|
+
}], margin: [{
|
531
|
+
type: Input,
|
532
|
+
args: [{ required: false }]
|
523
533
|
}] } });
|
524
534
|
|
525
535
|
const NGX_HELPER_PAGE_GROUP_ITEM = new InjectionToken('NGX-HELPER-PAGE-GROUP-ITEM');
|
@@ -618,10 +628,10 @@ class NgxHelperPageGroupComponent {
|
|
618
628
|
};
|
619
629
|
this.pageChanged.next(item);
|
620
630
|
}
|
621
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
622
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
631
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPageGroupComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: ComponentService }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
632
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NgxHelperPageGroupComponent, isStandalone: true, selector: "ngx-helper-page-group", inputs: { pageGroup: "pageGroup", pageId: "pageId", data: "data" }, outputs: { pageChanged: "pageChanged", dataChanged: "dataChanged" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "className": "this.className", "style.display": "this.display" } }, providers: [ComponentService], usesOnChanges: true, ngImport: i0, template: "@if (pages.length > 0) {\n<!-- DESKTOP VIEW -->\n@if (!isMobile) {\n<div\n class=\"page-group-aside\"\n [style.width]=\"sidebarWidth\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"componentConfig.stickyView?.top?.desktopView || undefined\"\n>\n @for (item of pages; track $index) {\n <div\n class=\"page\"\n [class.active]=\"pageId === item\"\n [style.cursor]=\"pageId === item ? 'default' : 'pointer'\"\n (click)=\"setPage(item)\"\n >\n <!-- ICON -->\n <mat-icon>{{ pageGroup.pages[item].icon }}</mat-icon>\n <div class=\"title\">{{ pageGroup.pages[item].title }}</div>\n <!-- CURRENT PAGE -->\n @if (pageId === item) { <mat-icon>keyboard_double_arrow_left</mat-icon> }\n </div>\n }\n</div>\n}\n\n<!-- MOBILE VIEW -->\n@if (isMobile) {\n<div\n class=\"page-group-nav\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"componentConfig.stickyView?.top?.mobileView || undefined\"\n>\n @for (item of pages; track $index) {\n <div\n class=\"page\"\n [class.active]=\"pageId === item\"\n [style.cursor]=\"pageId === item ? 'default' : 'pointer'\"\n (click)=\"setPage(item)\"\n >\n <mat-icon>{{ pageGroup.pages[item].icon }}</mat-icon>\n @if (pageId === item) {\n <div class=\"title\">{{ pageGroup.pages[item].title }}</div>\n }\n </div>\n }\n</div>\n\n<div\n class=\"page-group-spacer\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"\n 'calc(' +\n (componentConfig.stickyView?.top?.mobileView || undefined) +\n ' + var(--ngx-helper-m3-page-group-toolbar-height))'\n \"\n></div>\n}\n\n<div class=\"page-group-content\">\n <!-- HEADER -->\n @if (pageGroup.header) {\n <div\n class=\"header\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"\n (isMobile\n ? 'calc(' +\n (componentConfig.stickyView?.top?.mobileView || undefined) +\n ' + var(--ngx-helper-m3-page-group-toolbar-height) + 1rem)'\n : componentConfig.stickyView?.top?.desktopView) || undefined\n \"\n >\n <span *ngComponentOutlet=\"pageGroup.header; injector: injector\"></span>\n <div class=\"spacer\"></div>\n </div>\n }\n <span *ngComponentOutlet=\"pageGroup.pages[pageId].component; injector: injector\"></span>\n</div>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
623
633
|
}
|
624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
634
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperPageGroupComponent, decorators: [{
|
625
635
|
type: Component,
|
626
636
|
args: [{ selector: 'ngx-helper-page-group', host: { '(window:resize)': 'onResize($event)' }, imports: [NgComponentOutlet, MatIcon], providers: [ComponentService], template: "@if (pages.length > 0) {\n<!-- DESKTOP VIEW -->\n@if (!isMobile) {\n<div\n class=\"page-group-aside\"\n [style.width]=\"sidebarWidth\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"componentConfig.stickyView?.top?.desktopView || undefined\"\n>\n @for (item of pages; track $index) {\n <div\n class=\"page\"\n [class.active]=\"pageId === item\"\n [style.cursor]=\"pageId === item ? 'default' : 'pointer'\"\n (click)=\"setPage(item)\"\n >\n <!-- ICON -->\n <mat-icon>{{ pageGroup.pages[item].icon }}</mat-icon>\n <div class=\"title\">{{ pageGroup.pages[item].title }}</div>\n <!-- CURRENT PAGE -->\n @if (pageId === item) { <mat-icon>keyboard_double_arrow_left</mat-icon> }\n </div>\n }\n</div>\n}\n\n<!-- MOBILE VIEW -->\n@if (isMobile) {\n<div\n class=\"page-group-nav\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"componentConfig.stickyView?.top?.mobileView || undefined\"\n>\n @for (item of pages; track $index) {\n <div\n class=\"page\"\n [class.active]=\"pageId === item\"\n [style.cursor]=\"pageId === item ? 'default' : 'pointer'\"\n (click)=\"setPage(item)\"\n >\n <mat-icon>{{ pageGroup.pages[item].icon }}</mat-icon>\n @if (pageId === item) {\n <div class=\"title\">{{ pageGroup.pages[item].title }}</div>\n }\n </div>\n }\n</div>\n\n<div\n class=\"page-group-spacer\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"\n 'calc(' +\n (componentConfig.stickyView?.top?.mobileView || undefined) +\n ' + var(--ngx-helper-m3-page-group-toolbar-height))'\n \"\n></div>\n}\n\n<div class=\"page-group-content\">\n <!-- HEADER -->\n @if (pageGroup.header) {\n <div\n class=\"header\"\n [style.position]=\"componentConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"\n (isMobile\n ? 'calc(' +\n (componentConfig.stickyView?.top?.mobileView || undefined) +\n ' + var(--ngx-helper-m3-page-group-toolbar-height) + 1rem)'\n : componentConfig.stickyView?.top?.desktopView) || undefined\n \"\n >\n <span *ngComponentOutlet=\"pageGroup.header; injector: injector\"></span>\n <div class=\"spacer\"></div>\n </div>\n }\n <span *ngComponentOutlet=\"pageGroup.pages[pageId].component; injector: injector\"></span>\n</div>\n}\n" }]
|
627
637
|
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: ComponentService }, { type: undefined, decorators: [{
|
@@ -650,6 +660,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
650
660
|
type: Output
|
651
661
|
}] } });
|
652
662
|
|
663
|
+
class NgxHelperProgressComponent {
|
664
|
+
className = 'ngx-helper-m3-progress';
|
665
|
+
borderRadiusCSS;
|
666
|
+
backgroundColorCSS;
|
667
|
+
value;
|
668
|
+
align = 'LR';
|
669
|
+
borderRadius = '0px';
|
670
|
+
progressColor = 'var(--surface-container)';
|
671
|
+
backgroundColor;
|
672
|
+
size;
|
673
|
+
direction;
|
674
|
+
ngOnChanges(changes) {
|
675
|
+
this.className = `ngx-helper-m3-progress ${this.align}`;
|
676
|
+
this.borderRadiusCSS = this.borderRadius;
|
677
|
+
this.backgroundColorCSS = this.backgroundColor || 'transparent';
|
678
|
+
let value = typeof this.value === 'number' ? this.value : (this.value.done / this.value.total) * 100;
|
679
|
+
if (isNaN(value) || value < 0)
|
680
|
+
value = 0;
|
681
|
+
else if (value > 100)
|
682
|
+
value = 100;
|
683
|
+
this.size = `${value.toFixed(2)}%`;
|
684
|
+
this.direction = this.align === 'LR' || this.align === 'RL' ? 'H' : 'V';
|
685
|
+
}
|
686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
687
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NgxHelperProgressComponent, isStandalone: true, selector: "ngx-helper-progress", inputs: { value: "value", align: "align", borderRadius: "borderRadius", progressColor: "progressColor", backgroundColor: "backgroundColor" }, host: { properties: { "className": "this.className", "style.border-radius": "this.borderRadiusCSS", "style.background-color": "this.backgroundColorCSS" } }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"progress\"\n [style.border-radius]=\"borderRadius\"\n [style.background-color]=\"progressColor\"\n [style.width]=\"direction === 'H' ? size : '100%'\"\n [style.height]=\"direction === 'V' ? size : '100%'\"\n></div>\n<div class=\"content\"><ng-content></ng-content></div>\n", styles: [""] });
|
688
|
+
}
|
689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperProgressComponent, decorators: [{
|
690
|
+
type: Component,
|
691
|
+
args: [{ selector: 'ngx-helper-progress', imports: [], template: "<div\n class=\"progress\"\n [style.border-radius]=\"borderRadius\"\n [style.background-color]=\"progressColor\"\n [style.width]=\"direction === 'H' ? size : '100%'\"\n [style.height]=\"direction === 'V' ? size : '100%'\"\n></div>\n<div class=\"content\"><ng-content></ng-content></div>\n" }]
|
692
|
+
}], propDecorators: { className: [{
|
693
|
+
type: HostBinding,
|
694
|
+
args: ['className']
|
695
|
+
}], borderRadiusCSS: [{
|
696
|
+
type: HostBinding,
|
697
|
+
args: ['style.border-radius']
|
698
|
+
}], backgroundColorCSS: [{
|
699
|
+
type: HostBinding,
|
700
|
+
args: ['style.background-color']
|
701
|
+
}], value: [{
|
702
|
+
type: Input,
|
703
|
+
args: [{ required: true }]
|
704
|
+
}], align: [{
|
705
|
+
type: Input,
|
706
|
+
args: [{ required: false }]
|
707
|
+
}], borderRadius: [{
|
708
|
+
type: Input,
|
709
|
+
args: [{ required: false }]
|
710
|
+
}], progressColor: [{
|
711
|
+
type: Input,
|
712
|
+
args: [{ required: false }]
|
713
|
+
}], backgroundColor: [{
|
714
|
+
type: Input,
|
715
|
+
args: [{ required: false }]
|
716
|
+
}] } });
|
717
|
+
|
653
718
|
class NgxHelperSectionStickyDirective {
|
654
719
|
elementRef;
|
655
720
|
config;
|
@@ -693,10 +758,10 @@ class NgxHelperSectionStickyDirective {
|
|
693
758
|
break;
|
694
759
|
}
|
695
760
|
}
|
696
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
697
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.
|
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 });
|
698
763
|
}
|
699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionStickyDirective, decorators: [{
|
700
765
|
type: Directive,
|
701
766
|
args: [{
|
702
767
|
selector: '[ngxHelperSectionSticky]',
|
@@ -734,10 +799,10 @@ class NgxHelperSectionComponent {
|
|
734
799
|
onResize() {
|
735
800
|
this.isMobile = window.innerWidth <= this.componentConfig.mobileWidth;
|
736
801
|
}
|
737
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
738
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
802
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionComponent, deps: [{ token: ComponentService }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
803
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NgxHelperSectionComponent, isStandalone: true, selector: "ngx-helper-section", inputs: { gapSize: "gapSize" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "style.--section-gap": "this.gap" } }, providers: [ComponentService], ngImport: i0, template: "<div class=\"section-columns\" [class.section-columns-mobile]=\"isMobile\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;direction:rtl}:host .section-columns{display:flex;align-items:flex-start;column-gap:var(--section-gap)}:host ::ng-deep ngx-helper-section-column{flex:1;display:flex;flex-direction:column;row-gap:var(--section-gap)}:host .section-columns-mobile{flex-direction:column;column-gap:0;row-gap:var(--section-gap)}:host .section-columns-mobile ::ng-deep ngx-helper-section-column{width:100%!important}\n"] });
|
739
804
|
}
|
740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionComponent, decorators: [{
|
741
806
|
type: Component,
|
742
807
|
args: [{ selector: 'ngx-helper-section', host: { '(window:resize)': 'onResize($event)' }, imports: [], providers: [ComponentService], template: "<div class=\"section-columns\" [class.section-columns-mobile]=\"isMobile\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;direction:rtl}:host .section-columns{display:flex;align-items:flex-start;column-gap:var(--section-gap)}:host ::ng-deep ngx-helper-section-column{flex:1;display:flex;flex-direction:column;row-gap:var(--section-gap)}:host .section-columns-mobile{flex-direction:column;column-gap:0;row-gap:var(--section-gap)}:host .section-columns-mobile ::ng-deep ngx-helper-section-column{width:100%!important}\n"] }]
|
743
808
|
}], ctorParameters: () => [{ type: ComponentService }, { type: undefined, decorators: [{
|
@@ -763,10 +828,10 @@ class NgxHelperSectionColumnComponent {
|
|
763
828
|
this.flexStyle = this.width ? 'unset' : this.flex?.toString() || '1';
|
764
829
|
this.widthStyle = this.width || '*';
|
765
830
|
}
|
766
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
767
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
831
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
832
|
+
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" }, host: { properties: { "style.flex": "this.flexStyle", "style.width": "this.widthStyle" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
|
768
833
|
}
|
769
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSectionColumnComponent, decorators: [{
|
770
835
|
type: Component,
|
771
836
|
args: [{ selector: 'ngx-helper-section-column', imports: [], template: "<ng-content></ng-content>\n" }]
|
772
837
|
}], propDecorators: { flexStyle: [{
|
@@ -848,10 +913,10 @@ class NgxHelperValueBoxComponent {
|
|
848
913
|
this.copyTimeout = undefined;
|
849
914
|
}, 2000);
|
850
915
|
}
|
851
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
852
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
916
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperValueBoxComponent, deps: [{ token: i1.Router }, { token: ComponentService }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
917
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NgxHelperValueBoxComponent, isStandalone: true, selector: "ngx-helper-value-box", inputs: { values: "values", column: "column", clearBox: "clearBox", emptyText: "emptyText", gapSize: "gapSize", hideShadow: "hideShadow" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "className": "this.className", "style.grid-template-columns": "this.gridTemplateColumns", "style.--gap-size": "this.boxGap" } }, providers: [ComponentService], usesOnChanges: true, ngImport: i0, template: "@for (item of data; track $index) {\n<div class=\"value-box\" [class.clear]=\"clearBox\" [class.click]=\"!!item.action\">\n <div class=\"title\" (click)=\"onClick(item.action)\">{{ item.title }}</div>\n <div\n class=\"value\"\n [style.display]=\"'inline-block'\"\n [style.direction]=\"item.ltr ? 'ltr' : '*'\"\n [style.color]=\"item.color\"\n [class.en]=\"item.english\"\n [class.empty]=\"!item.value\"\n (click)=\"onClick(item.action)\"\n >\n {{ item.value || emptyText }}\n </div>\n <!-- COPY TO CLIPBOARD -->\n @if (item.copyToClipboard && item.value) {\n <button mat-icon-button type=\"button\" [cdkCopyToClipboard]=\"item.value\" (click)=\"onCopy($event, $index)\">\n <mat-icon>{{ copyIndex === $index ? 'done_all' : 'copy' }}</mat-icon>\n </button>\n }\n</div>\n}\n", styles: [""], 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"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] });
|
853
918
|
}
|
854
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperValueBoxComponent, decorators: [{
|
855
920
|
type: Component,
|
856
921
|
args: [{ selector: 'ngx-helper-value-box', host: { '(window:resize)': 'onResize($event)' }, imports: [ClipboardModule, MatIcon, MatIconButton], providers: [ComponentService], template: "@for (item of data; track $index) {\n<div class=\"value-box\" [class.clear]=\"clearBox\" [class.click]=\"!!item.action\">\n <div class=\"title\" (click)=\"onClick(item.action)\">{{ item.title }}</div>\n <div\n class=\"value\"\n [style.display]=\"'inline-block'\"\n [style.direction]=\"item.ltr ? 'ltr' : '*'\"\n [style.color]=\"item.color\"\n [class.en]=\"item.english\"\n [class.empty]=\"!item.value\"\n (click)=\"onClick(item.action)\"\n >\n {{ item.value || emptyText }}\n </div>\n <!-- COPY TO CLIPBOARD -->\n @if (item.copyToClipboard && item.value) {\n <button mat-icon-button type=\"button\" [cdkCopyToClipboard]=\"item.value\" (click)=\"onCopy($event, $index)\">\n <mat-icon>{{ copyIndex === $index ? 'done_all' : 'copy' }}</mat-icon>\n </button>\n }\n</div>\n}\n" }]
|
857
922
|
}], ctorParameters: () => [{ type: i1.Router }, { type: ComponentService }, { type: undefined, decorators: [{
|
@@ -922,10 +987,10 @@ class NgxHelperValueListComponent {
|
|
922
987
|
this.copyTimeout = undefined;
|
923
988
|
}, 2000);
|
924
989
|
}
|
925
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
926
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
990
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperValueListComponent, deps: [{ token: i1.Router }, { token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
991
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NgxHelperValueListComponent, isStandalone: true, selector: "ngx-helper-value-list", inputs: { values: "values", titleWidth: "titleWidth", emptyText: "emptyText" }, host: { properties: { "className": "this.className" } }, providers: [ComponentService], usesOnChanges: true, ngImport: i0, template: "@for (item of data; track $index) {\n<div class=\"value-list-item\" [class.even]=\"$index % 2 === 0\" [class.odd]=\"$index % 2 === 1\">\n <div class=\"title\" [style.width]=\"titleWidth\">{{ item.title }}:</div>\n <div class=\"value\">\n <div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"item.ltr ? 'ltr' : '*'\"\n [style.color]=\"item.color\"\n [class.en]=\"item.english\"\n [class.empty]=\"!item.value\"\n [class.click]=\"!!item.action\"\n (click)=\"onClick(item.action)\"\n >\n {{ item.value || emptyText }}\n </div>\n <!-- ACTION -->\n @if (item.action) {\n <button mat-icon-button type=\"button\" (click)=\"onClick(item.action)\">\n <mat-icon [style.color]=\"item.color\">open_in_new</mat-icon>\n </button>\n\n }\n </div>\n <!-- COPY TO CLIPBOARD -->\n @if (item.copyToClipboard && item.value) {\n <button mat-icon-button type=\"button\" [cdkCopyToClipboard]=\"item.value\" (click)=\"onCopy($event, $index)\">\n <mat-icon>{{ copyIndex === $index ? 'done_all' : 'copy' }}</mat-icon>\n </button>\n }\n</div>\n}\n", styles: [""], 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"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] });
|
927
992
|
}
|
928
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
993
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperValueListComponent, decorators: [{
|
929
994
|
type: Component,
|
930
995
|
args: [{ selector: 'ngx-helper-value-list', imports: [ClipboardModule, MatIcon, MatIconButton], providers: [ComponentService], template: "@for (item of data; track $index) {\n<div class=\"value-list-item\" [class.even]=\"$index % 2 === 0\" [class.odd]=\"$index % 2 === 1\">\n <div class=\"title\" [style.width]=\"titleWidth\">{{ item.title }}:</div>\n <div class=\"value\">\n <div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"item.ltr ? 'ltr' : '*'\"\n [style.color]=\"item.color\"\n [class.en]=\"item.english\"\n [class.empty]=\"!item.value\"\n [class.click]=\"!!item.action\"\n (click)=\"onClick(item.action)\"\n >\n {{ item.value || emptyText }}\n </div>\n <!-- ACTION -->\n @if (item.action) {\n <button mat-icon-button type=\"button\" (click)=\"onClick(item.action)\">\n <mat-icon [style.color]=\"item.color\">open_in_new</mat-icon>\n </button>\n\n }\n </div>\n <!-- COPY TO CLIPBOARD -->\n @if (item.copyToClipboard && item.value) {\n <button mat-icon-button type=\"button\" [cdkCopyToClipboard]=\"item.value\" (click)=\"onCopy($event, $index)\">\n <mat-icon>{{ copyIndex === $index ? 'done_all' : 'copy' }}</mat-icon>\n </button>\n }\n</div>\n}\n" }]
|
931
996
|
}], ctorParameters: () => [{ type: i1.Router }, { type: ComponentService }], propDecorators: { className: [{
|
@@ -954,10 +1019,10 @@ class NgxHelperMultiLinePipe {
|
|
954
1019
|
? this.domSanitizer.bypassSecurityTrustHtml(value.replace(/(?:\r\n|\r|\n)/g, '<br />'))
|
955
1020
|
: Helper.STRING.escapeHTML(value).replace(/(?:\r\n|\r|\n)/g, '<br />');
|
956
1021
|
}
|
957
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
958
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
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" });
|
959
1024
|
}
|
960
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperMultiLinePipe, decorators: [{
|
961
1026
|
type: Pipe,
|
962
1027
|
args: [{ name: 'ngxHelperMultiLine' }]
|
963
1028
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
@@ -983,10 +1048,10 @@ class NgxHelperSafePipe {
|
|
983
1048
|
return this.domSanitizer.bypassSecurityTrustHtml(value);
|
984
1049
|
}
|
985
1050
|
}
|
986
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
987
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.
|
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" });
|
988
1053
|
}
|
989
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperSafePipe, decorators: [{
|
990
1055
|
type: Pipe,
|
991
1056
|
args: [{ name: 'ngxHelperSafe' }]
|
992
1057
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
@@ -994,10 +1059,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
994
1059
|
class ConfirmDialogComponent {
|
995
1060
|
className = 'ngx-helper-m3-confirm';
|
996
1061
|
confirm = inject(MAT_DIALOG_DATA);
|
997
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
998
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
1062
|
+
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$2.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"] }] });
|
999
1064
|
}
|
1000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
1001
1066
|
type: Component,
|
1002
1067
|
args: [{ host: { selector: 'confirm-dialog' }, imports: [NgClass, MatButtonModule, MatDialogModule, 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\" 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" }]
|
1003
1068
|
}], propDecorators: { className: [{
|
@@ -1015,10 +1080,10 @@ class ConfirmBottomSheetComponent {
|
|
1015
1080
|
close(confirmed) {
|
1016
1081
|
this.matBottomSheetRef.dismiss(confirmed);
|
1017
1082
|
}
|
1018
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
1019
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
1083
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmBottomSheetComponent, deps: [{ token: i1$3.MatBottomSheetRef }], target: i0.ɵɵFactoryTarget.Component });
|
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$2.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"] }] });
|
1020
1085
|
}
|
1021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1086
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ConfirmBottomSheetComponent, decorators: [{
|
1022
1087
|
type: Component,
|
1023
1088
|
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"] }]
|
1024
1089
|
}], ctorParameters: () => [{ type: i1$3.MatBottomSheetRef }], propDecorators: { className: [{
|
@@ -1115,10 +1180,10 @@ class NgxHelperConfirmService {
|
|
1115
1180
|
denyClass: config?.denyClass,
|
1116
1181
|
});
|
1117
1182
|
}
|
1118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
1119
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
1183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperConfirmService, deps: [{ token: i1$3.MatBottomSheet }, { token: i2$1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
1184
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperConfirmService, providedIn: 'root' });
|
1120
1185
|
}
|
1121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperConfirmService, decorators: [{
|
1122
1187
|
type: Injectable,
|
1123
1188
|
args: [{ providedIn: 'root' }]
|
1124
1189
|
}], ctorParameters: () => [{ type: i1$3.MatBottomSheet }, { type: i2$1.MatDialog }] });
|
@@ -1150,10 +1215,10 @@ class ContainerDialogComponent {
|
|
1150
1215
|
close() {
|
1151
1216
|
this.matDialogRef.close();
|
1152
1217
|
}
|
1153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
1154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
1218
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContainerDialogComponent, deps: [{ token: i2$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
1219
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ContainerDialogComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "container-dialog" }, 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: [""], 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"] }] });
|
1155
1220
|
}
|
1156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContainerDialogComponent, decorators: [{
|
1157
1222
|
type: Component,
|
1158
1223
|
args: [{ host: { selector: 'container-dialog' }, 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" }]
|
1159
1224
|
}], ctorParameters: () => [{ type: i2$1.MatDialogRef }], propDecorators: { className: [{
|
@@ -1184,10 +1249,10 @@ class ContainerBottomSheetComponent {
|
|
1184
1249
|
close() {
|
1185
1250
|
this.matBottomSheetRef.dismiss();
|
1186
1251
|
}
|
1187
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
1188
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
1252
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContainerBottomSheetComponent, deps: [{ token: i1$3.MatBottomSheetRef }], target: i0.ɵɵFactoryTarget.Component });
|
1253
|
+
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"] }] });
|
1189
1254
|
}
|
1190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ContainerBottomSheetComponent, decorators: [{
|
1191
1256
|
type: Component,
|
1192
1257
|
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"] }]
|
1193
1258
|
}], ctorParameters: () => [{ type: i1$3.MatBottomSheetRef }], propDecorators: { className: [{
|
@@ -1268,18 +1333,319 @@ class NgxHelperContainerService {
|
|
1268
1333
|
const config = arg1 || {};
|
1269
1334
|
return new NgxHelperContainerCalss(this.matBottomSheet, this.matDialog, { component, title, config });
|
1270
1335
|
}
|
1271
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
1272
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
1336
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperContainerService, deps: [{ token: i1$3.MatBottomSheet }, { token: i2$1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
1337
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperContainerService, providedIn: 'root' });
|
1273
1338
|
}
|
1274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1339
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperContainerService, decorators: [{
|
1275
1340
|
type: Injectable,
|
1276
1341
|
args: [{ providedIn: 'root' }]
|
1277
1342
|
}], ctorParameters: () => [{ type: i1$3.MatBottomSheet }, { type: i2$1.MatDialog }] });
|
1278
1343
|
|
1279
|
-
class
|
1344
|
+
class ToastComponent {
|
1345
|
+
elementRef;
|
1346
|
+
onClick = () => this.close();
|
1347
|
+
host = true;
|
1348
|
+
className = 'ngx-helper-m3-toast';
|
1349
|
+
top = '1rem';
|
1350
|
+
textColor;
|
1351
|
+
borderColor;
|
1352
|
+
backgroundColor;
|
1353
|
+
id;
|
1354
|
+
icon;
|
1355
|
+
messages = [];
|
1356
|
+
config;
|
1357
|
+
init;
|
1358
|
+
close;
|
1359
|
+
timeout;
|
1360
|
+
showClose;
|
1361
|
+
animation;
|
1362
|
+
progress = 0;
|
1363
|
+
start = 0;
|
1364
|
+
interval;
|
1365
|
+
constructor(elementRef) {
|
1366
|
+
this.elementRef = elementRef;
|
1367
|
+
}
|
1368
|
+
ngOnInit() {
|
1369
|
+
this.borderColor = this.backgroundColor;
|
1370
|
+
const xPosition = this.config.helper?.toastXPosition || 'CENTER';
|
1371
|
+
this.className = `ngx-helper-m3-toast ${xPosition.toLowerCase()}`;
|
1372
|
+
const toastTimeout = this.config.helper?.toastTimeout === undefined || this.config.helper?.toastTimeout < 0
|
1373
|
+
? 4000
|
1374
|
+
: this.config.helper?.toastTimeout;
|
1375
|
+
this.timeout =
|
1376
|
+
this.config.toast.timeout === undefined || this.config.toast.timeout < 0
|
1377
|
+
? toastTimeout
|
1378
|
+
: this.config.toast.timeout;
|
1379
|
+
this.showClose = this.config.toast.showClose || this.timeout === 0;
|
1380
|
+
this.animation = this.config.helper?.toastProgressAnimation || 'DECREASE';
|
1381
|
+
if (this.timeout) {
|
1382
|
+
this.start = new Date().getTime();
|
1383
|
+
this.interval = setInterval(() => {
|
1384
|
+
const timer = new Date().getTime();
|
1385
|
+
this.progress = ((timer - this.start) * 100) / this.timeout;
|
1386
|
+
this.progress = this.progress < 100 ? +this.progress.toFixed(2) : 100;
|
1387
|
+
if (this.progress === 100)
|
1388
|
+
this.close();
|
1389
|
+
}, 25);
|
1390
|
+
}
|
1391
|
+
}
|
1392
|
+
ngOnDestroy() {
|
1393
|
+
if (this.interval)
|
1394
|
+
clearInterval(this.interval);
|
1395
|
+
}
|
1396
|
+
ngAfterViewInit() {
|
1397
|
+
this.init();
|
1398
|
+
}
|
1399
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToastComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
1400
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ToastComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "toast" }, listeners: { "click": "onClick()" }, properties: { "@host": "this.host", "className": "this.className", "style.top": "this.top", "style.color": "this.textColor", "style.border-color": "this.borderColor", "style.background-color": "this.backgroundColor" } }, ngImport: i0, template: "<div class=\"content\">\n <div class=\"toast\">\n <mat-icon [style.color]=\"textColor\" class=\"icon\">{{ icon }}</mat-icon>\n <ul>\n @for (message of messages; track $index) {\n <li [innerHTML]=\"message | ngxHelperMultiLine\"></li>\n }\n </ul>\n </div>\n <!-- CLOSE ICON -->\n @if (showClose) {\n <mat-icon [style.color]=\"textColor\" class=\"close\">close</mat-icon>\n }\n</div>\n\n<div class=\"progress-container\" [style.background-color]=\"backgroundColor\">\n @if (timeout !== 0) {\n <div\n class=\"progress-value\"\n [style.background-color]=\"'color-mix(in srgb, ' + backgroundColor + ', black 25%)'\"\n [style.width]=\"(animation === 'DECREASE' ? 100 - progress : progress) + '%'\"\n ></div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: NgxHelperMultiLinePipe, name: "ngxHelperMultiLine" }], animations: [
|
1401
|
+
trigger('host', [
|
1402
|
+
transition(':enter', [
|
1403
|
+
style({ top: 0, opacity: 0 }),
|
1404
|
+
animate('350ms ease-in-out', style({ top: '*', opacity: 1 })),
|
1405
|
+
]),
|
1406
|
+
]),
|
1407
|
+
] });
|
1408
|
+
}
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ToastComponent, decorators: [{
|
1410
|
+
type: Component,
|
1411
|
+
args: [{ host: { selector: 'toast' }, imports: [MatIcon, NgxHelperMultiLinePipe], animations: [
|
1412
|
+
trigger('host', [
|
1413
|
+
transition(':enter', [
|
1414
|
+
style({ top: 0, opacity: 0 }),
|
1415
|
+
animate('350ms ease-in-out', style({ top: '*', opacity: 1 })),
|
1416
|
+
]),
|
1417
|
+
]),
|
1418
|
+
], template: "<div class=\"content\">\n <div class=\"toast\">\n <mat-icon [style.color]=\"textColor\" class=\"icon\">{{ icon }}</mat-icon>\n <ul>\n @for (message of messages; track $index) {\n <li [innerHTML]=\"message | ngxHelperMultiLine\"></li>\n }\n </ul>\n </div>\n <!-- CLOSE ICON -->\n @if (showClose) {\n <mat-icon [style.color]=\"textColor\" class=\"close\">close</mat-icon>\n }\n</div>\n\n<div class=\"progress-container\" [style.background-color]=\"backgroundColor\">\n @if (timeout !== 0) {\n <div\n class=\"progress-value\"\n [style.background-color]=\"'color-mix(in srgb, ' + backgroundColor + ', black 25%)'\"\n [style.width]=\"(animation === 'DECREASE' ? 100 - progress : progress) + '%'\"\n ></div>\n }\n</div>\n" }]
|
1419
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onClick: [{
|
1420
|
+
type: HostListener,
|
1421
|
+
args: ['click']
|
1422
|
+
}], host: [{
|
1423
|
+
type: HostBinding,
|
1424
|
+
args: ['@host']
|
1425
|
+
}], className: [{
|
1426
|
+
type: HostBinding,
|
1427
|
+
args: ['className']
|
1428
|
+
}], top: [{
|
1429
|
+
type: HostBinding,
|
1430
|
+
args: ['style.top']
|
1431
|
+
}], textColor: [{
|
1432
|
+
type: HostBinding,
|
1433
|
+
args: ['style.color']
|
1434
|
+
}], borderColor: [{
|
1435
|
+
type: HostBinding,
|
1436
|
+
args: ['style.border-color']
|
1437
|
+
}], backgroundColor: [{
|
1438
|
+
type: HostBinding,
|
1439
|
+
args: ['style.background-color']
|
1440
|
+
}] } });
|
1441
|
+
|
1442
|
+
class NgxHelperToastService {
|
1443
|
+
applicationRef;
|
1444
|
+
injector;
|
1445
|
+
config;
|
1446
|
+
components = [];
|
1447
|
+
constructor(applicationRef, injector, config) {
|
1448
|
+
this.applicationRef = applicationRef;
|
1449
|
+
this.injector = injector;
|
1450
|
+
this.config = config;
|
1451
|
+
}
|
1452
|
+
getId() {
|
1453
|
+
let id = undefined;
|
1454
|
+
while (!id || this.components.some((c) => c.id === id))
|
1455
|
+
id = Helper.STRING.getRandom(10);
|
1456
|
+
return id;
|
1457
|
+
}
|
1458
|
+
updatePositions() {
|
1459
|
+
let top = 0;
|
1460
|
+
this.components.forEach((c, index) => {
|
1461
|
+
c.componentRef.instance.top = `calc(${(index / 1.5).toFixed(1)}rem + calc(${top}px + 1rem))`;
|
1462
|
+
top += +c.componentRef.instance.elementRef.nativeElement.offsetHeight;
|
1463
|
+
});
|
1464
|
+
}
|
1465
|
+
toast(toast, message, arg1, arg2) {
|
1466
|
+
const config = arg2 ? arg1 : typeof arg1 === 'object' ? arg1 : {};
|
1467
|
+
const onClose = arg2 || (typeof arg1 === 'function' ? arg1 : () => { });
|
1468
|
+
const messages = typeof message === 'string' ? [message] : message;
|
1469
|
+
const content = [toast.icon, toast.textColor, toast.backgroundColor, ...messages].join('\n');
|
1470
|
+
const duplicate = this.components.find((component) => component.content === content);
|
1471
|
+
if (!this.config?.toastAllowDuplicates && duplicate) {
|
1472
|
+
if (this.config?.toastResetDuplicates) {
|
1473
|
+
duplicate.componentRef.instance.start = new Date().getTime();
|
1474
|
+
duplicate.componentRef.instance.progress = 0;
|
1475
|
+
}
|
1476
|
+
return;
|
1477
|
+
}
|
1478
|
+
const componentRef = createComponent(ToastComponent, {
|
1479
|
+
environmentInjector: this.applicationRef.injector,
|
1480
|
+
elementInjector: this.injector,
|
1481
|
+
});
|
1482
|
+
const id = this.getId();
|
1483
|
+
componentRef.instance.id = id;
|
1484
|
+
componentRef.instance.icon = toast.icon;
|
1485
|
+
componentRef.instance.textColor = toast.textColor;
|
1486
|
+
componentRef.instance.backgroundColor = toast.backgroundColor;
|
1487
|
+
componentRef.instance.messages = messages;
|
1488
|
+
componentRef.instance.config = { helper: this.config, toast: config };
|
1489
|
+
componentRef.instance.init = () => this.updatePositions();
|
1490
|
+
componentRef.instance.close = () => {
|
1491
|
+
this.applicationRef.detachView(componentRef.hostView);
|
1492
|
+
document.body.removeChild(htmlElement);
|
1493
|
+
componentRef.destroy();
|
1494
|
+
this.components = this.components.filter((c) => c.id !== componentRef.instance.id);
|
1495
|
+
this.updatePositions();
|
1496
|
+
if (onClose)
|
1497
|
+
onClose();
|
1498
|
+
};
|
1499
|
+
const htmlElement = componentRef.hostView.rootNodes[0];
|
1500
|
+
this.applicationRef.attachView(componentRef.hostView);
|
1501
|
+
document.body.appendChild(htmlElement);
|
1502
|
+
this.components.push({ id, componentRef, content });
|
1503
|
+
this.updatePositions();
|
1504
|
+
}
|
1505
|
+
info(message, arg1, arg2) {
|
1506
|
+
const toast = { icon: 'warning_amber', textColor: '#fff', backgroundColor: '#2f96b4' };
|
1507
|
+
this.toast(toast, message, arg1, arg2);
|
1508
|
+
}
|
1509
|
+
success(message, arg1, arg2) {
|
1510
|
+
const toast = { icon: 'done_all', textColor: '#fff', backgroundColor: '#51a351' };
|
1511
|
+
this.toast(toast, message, arg1, arg2);
|
1512
|
+
}
|
1513
|
+
warning(message, arg1, arg2) {
|
1514
|
+
const toast = { icon: 'info', textColor: '#fff', backgroundColor: '#f89406' };
|
1515
|
+
this.toast(toast, message, arg1, arg2);
|
1516
|
+
}
|
1517
|
+
error(message, arg1, arg2) {
|
1518
|
+
const toast = { icon: 'cancel', textColor: '#fff', backgroundColor: '#bd362f' };
|
1519
|
+
this.toast(toast, message, arg1, arg2);
|
1520
|
+
}
|
1521
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperToastService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: NGX_HELPER_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
1522
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperToastService, providedIn: 'root' });
|
1523
|
+
}
|
1524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperToastService, decorators: [{
|
1525
|
+
type: Injectable,
|
1526
|
+
args: [{ providedIn: 'root' }]
|
1527
|
+
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: undefined, decorators: [{
|
1528
|
+
type: Optional
|
1529
|
+
}, {
|
1530
|
+
type: Inject,
|
1531
|
+
args: [NGX_HELPER_CONFIG]
|
1532
|
+
}] }] });
|
1533
|
+
|
1534
|
+
class DownloadComponent {
|
1280
1535
|
httpClient;
|
1536
|
+
ngxHelperToastService;
|
1537
|
+
host = true;
|
1281
1538
|
className = 'ngx-helper-m3-http';
|
1539
|
+
bottom = '1rem';
|
1540
|
+
id;
|
1541
|
+
path;
|
1542
|
+
title;
|
1543
|
+
config;
|
1544
|
+
onSuccess;
|
1545
|
+
onError;
|
1546
|
+
close;
|
1547
|
+
progress = 0;
|
1548
|
+
constructor(httpClient, ngxHelperToastService) {
|
1549
|
+
this.httpClient = httpClient;
|
1550
|
+
this.ngxHelperToastService = ngxHelperToastService;
|
1551
|
+
}
|
1552
|
+
ngAfterViewInit() {
|
1553
|
+
setTimeout(this.download.bind(this), 0);
|
1554
|
+
}
|
1555
|
+
download() {
|
1556
|
+
let headers = new HttpHeaders();
|
1557
|
+
const header = this.config.header || {};
|
1558
|
+
Object.keys(header).forEach((key) => (headers = headers.set(key, header[key])));
|
1559
|
+
let request;
|
1560
|
+
switch (this.config.method || 'GET') {
|
1561
|
+
case 'GET':
|
1562
|
+
request = this.httpClient.get(this.path, {
|
1563
|
+
headers,
|
1564
|
+
reportProgress: true,
|
1565
|
+
observe: 'events',
|
1566
|
+
responseType: 'arraybuffer',
|
1567
|
+
});
|
1568
|
+
break;
|
1569
|
+
case 'POST':
|
1570
|
+
request = this.httpClient.post(this.path, {
|
1571
|
+
headers,
|
1572
|
+
reportProgress: true,
|
1573
|
+
observe: 'events',
|
1574
|
+
responseType: 'arraybuffer',
|
1575
|
+
});
|
1576
|
+
break;
|
1577
|
+
case 'PUT':
|
1578
|
+
request = this.httpClient.put(this.path, {
|
1579
|
+
headers,
|
1580
|
+
reportProgress: true,
|
1581
|
+
observe: 'events',
|
1582
|
+
responseType: 'arraybuffer',
|
1583
|
+
});
|
1584
|
+
break;
|
1585
|
+
case 'PATCH':
|
1586
|
+
request = this.httpClient.patch(this.path, {
|
1587
|
+
headers,
|
1588
|
+
reportProgress: true,
|
1589
|
+
observe: 'events',
|
1590
|
+
responseType: 'arraybuffer',
|
1591
|
+
});
|
1592
|
+
break;
|
1593
|
+
}
|
1594
|
+
request.subscribe({
|
1595
|
+
next: (event) => {
|
1596
|
+
switch (event.type) {
|
1597
|
+
case HttpEventType.DownloadProgress:
|
1598
|
+
const progress = event.loaded && event.total ? Math.ceil((event.loaded / event.total) * 1000) / 10 : 0;
|
1599
|
+
this.progress = progress <= 100 ? progress : 100;
|
1600
|
+
break;
|
1601
|
+
case HttpEventType.Response:
|
1602
|
+
this.progress = 100;
|
1603
|
+
this.onSuccess(event.body);
|
1604
|
+
this.close();
|
1605
|
+
break;
|
1606
|
+
}
|
1607
|
+
},
|
1608
|
+
error: () => {
|
1609
|
+
this.onError();
|
1610
|
+
this.close();
|
1611
|
+
},
|
1612
|
+
});
|
1613
|
+
}
|
1614
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DownloadComponent, deps: [{ token: i1$4.HttpClient }, { token: NgxHelperToastService }], target: i0.ɵɵFactoryTarget.Component });
|
1615
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DownloadComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "download" }, properties: { "@host": "this.host", "className": "this.className", "style.bottom": "this.bottom" } }, ngImport: i0, template: "<div class=\"content\">\n <mat-icon>file_download</mat-icon>\n <div class=\"title\">{{ title }}</div>\n</div>\n\n<div class=\"progress-container\">\n <div class=\"progress-value\" [style.width]=\"progress + '%'\"></div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
|
1616
|
+
trigger('host', [
|
1617
|
+
transition(':enter', [
|
1618
|
+
style({ left: 'calc(-250px - 1rem)' }),
|
1619
|
+
animate('100ms ease-in-out', style({ left: '1rem' })),
|
1620
|
+
]),
|
1621
|
+
]),
|
1622
|
+
] });
|
1623
|
+
}
|
1624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DownloadComponent, decorators: [{
|
1625
|
+
type: Component,
|
1626
|
+
args: [{ host: { selector: 'download' }, imports: [MatIcon], animations: [
|
1627
|
+
trigger('host', [
|
1628
|
+
transition(':enter', [
|
1629
|
+
style({ left: 'calc(-250px - 1rem)' }),
|
1630
|
+
animate('100ms ease-in-out', style({ left: '1rem' })),
|
1631
|
+
]),
|
1632
|
+
]),
|
1633
|
+
], template: "<div class=\"content\">\n <mat-icon>file_download</mat-icon>\n <div class=\"title\">{{ title }}</div>\n</div>\n\n<div class=\"progress-container\">\n <div class=\"progress-value\" [style.width]=\"progress + '%'\"></div>\n</div>\n" }]
|
1634
|
+
}], ctorParameters: () => [{ type: i1$4.HttpClient }, { type: NgxHelperToastService }], propDecorators: { host: [{
|
1635
|
+
type: HostBinding,
|
1636
|
+
args: ['@host']
|
1637
|
+
}], className: [{
|
1638
|
+
type: HostBinding,
|
1639
|
+
args: ['className']
|
1640
|
+
}], bottom: [{
|
1641
|
+
type: HostBinding,
|
1642
|
+
args: ['style.bottom']
|
1643
|
+
}] } });
|
1644
|
+
|
1645
|
+
class UploadComponent {
|
1646
|
+
httpClient;
|
1282
1647
|
host = true;
|
1648
|
+
className = 'ngx-helper-m3-http';
|
1283
1649
|
bottom = '1rem';
|
1284
1650
|
id;
|
1285
1651
|
file;
|
@@ -1331,8 +1697,8 @@ class UploadComponent {
|
|
1331
1697
|
error: (error) => this.close('ERROR', error.error, error.status),
|
1332
1698
|
});
|
1333
1699
|
}
|
1334
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
1335
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
1700
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: UploadComponent, deps: [{ token: i1$4.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
1701
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: UploadComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "upload" }, properties: { "@host": "this.host", "className": "this.className", "style.bottom": "this.bottom" } }, ngImport: i0, template: "<div class=\"content\">\n <mat-icon>file_upload</mat-icon>\n <div class=\"file\">{{ file.name }}</div>\n</div>\n\n<div class=\"progress-container\">\n <div class=\"progress-value\" [style.width]=\"progress + '%'\"></div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
|
1336
1702
|
trigger('host', [
|
1337
1703
|
transition(':enter', [
|
1338
1704
|
style({ left: 'calc(-250px - 1rem)' }),
|
@@ -1341,7 +1707,7 @@ class UploadComponent {
|
|
1341
1707
|
]),
|
1342
1708
|
] });
|
1343
1709
|
}
|
1344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: UploadComponent, decorators: [{
|
1345
1711
|
type: Component,
|
1346
1712
|
args: [{ host: { selector: 'upload' }, imports: [MatIcon], animations: [
|
1347
1713
|
trigger('host', [
|
@@ -1351,12 +1717,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
1351
1717
|
]),
|
1352
1718
|
]),
|
1353
1719
|
], template: "<div class=\"content\">\n <mat-icon>file_upload</mat-icon>\n <div class=\"file\">{{ file.name }}</div>\n</div>\n\n<div class=\"progress-container\">\n <div class=\"progress-value\" [style.width]=\"progress + '%'\"></div>\n</div>\n" }]
|
1354
|
-
}], ctorParameters: () => [{ type: i1$4.HttpClient }], propDecorators: {
|
1355
|
-
type: HostBinding,
|
1356
|
-
args: ['className']
|
1357
|
-
}], host: [{
|
1720
|
+
}], ctorParameters: () => [{ type: i1$4.HttpClient }], propDecorators: { host: [{
|
1358
1721
|
type: HostBinding,
|
1359
1722
|
args: ['@host']
|
1723
|
+
}], className: [{
|
1724
|
+
type: HostBinding,
|
1725
|
+
args: ['className']
|
1360
1726
|
}], bottom: [{
|
1361
1727
|
type: HostBinding,
|
1362
1728
|
args: ['style.bottom']
|
@@ -1365,10 +1731,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
1365
1731
|
class NgxHelperHttpService {
|
1366
1732
|
applicationRef;
|
1367
1733
|
injector;
|
1734
|
+
ngxHelperToastService;
|
1368
1735
|
components = [];
|
1369
|
-
constructor(applicationRef, injector) {
|
1736
|
+
constructor(applicationRef, injector, ngxHelperToastService) {
|
1370
1737
|
this.applicationRef = applicationRef;
|
1371
1738
|
this.injector = injector;
|
1739
|
+
this.ngxHelperToastService = ngxHelperToastService;
|
1372
1740
|
}
|
1373
1741
|
getId() {
|
1374
1742
|
let id = undefined;
|
@@ -1381,6 +1749,54 @@ class NgxHelperHttpService {
|
|
1381
1749
|
c.componentRef.instance.bottom = `calc(${(index / 1.5).toFixed(1)}rem + calc(${index * 40}px + 1rem))`;
|
1382
1750
|
});
|
1383
1751
|
}
|
1752
|
+
getBuffer(path, title, config) {
|
1753
|
+
return new Promise((resolve, reject) => {
|
1754
|
+
const componentRef = createComponent(DownloadComponent, {
|
1755
|
+
environmentInjector: this.applicationRef.injector,
|
1756
|
+
elementInjector: this.injector,
|
1757
|
+
});
|
1758
|
+
const id = this.getId();
|
1759
|
+
componentRef.instance.id = id;
|
1760
|
+
componentRef.instance.path = path;
|
1761
|
+
componentRef.instance.title = title;
|
1762
|
+
componentRef.instance.config = config || {};
|
1763
|
+
componentRef.instance.onSuccess = (arrayBuffer) => resolve(arrayBuffer);
|
1764
|
+
componentRef.instance.onError = () => reject();
|
1765
|
+
componentRef.instance.close = () => {
|
1766
|
+
this.applicationRef.detachView(componentRef.hostView);
|
1767
|
+
document.body.removeChild(htmlElement);
|
1768
|
+
componentRef.destroy();
|
1769
|
+
this.components = this.components.filter((c) => c.id !== componentRef.instance.id);
|
1770
|
+
this.updatePositions();
|
1771
|
+
};
|
1772
|
+
const htmlElement = componentRef.hostView.rootNodes[0];
|
1773
|
+
this.applicationRef.attachView(componentRef.hostView);
|
1774
|
+
document.body.appendChild(htmlElement);
|
1775
|
+
this.components.push({ id, componentRef });
|
1776
|
+
this.updatePositions();
|
1777
|
+
});
|
1778
|
+
}
|
1779
|
+
download(path, title, config) {
|
1780
|
+
const onError = () => this.ngxHelperToastService.error('امکان دانلود فایل وجود ندارد.');
|
1781
|
+
const onSuccess = (arrayBuffer) => {
|
1782
|
+
try {
|
1783
|
+
const split = path
|
1784
|
+
.split('.')
|
1785
|
+
.map((text) => text.trim().replace(/\//gi, ''))
|
1786
|
+
.filter((text) => !!text);
|
1787
|
+
const name = Helper.STRING.getFileName(title, split[split.length - 1] || '');
|
1788
|
+
const href = URL.createObjectURL(new Blob([arrayBuffer]));
|
1789
|
+
const a = document.createElement('a');
|
1790
|
+
a.href = href;
|
1791
|
+
a.download = name;
|
1792
|
+
a.click();
|
1793
|
+
}
|
1794
|
+
catch (e) {
|
1795
|
+
onError();
|
1796
|
+
}
|
1797
|
+
};
|
1798
|
+
this.getBuffer(path, title, config || {}).then(onSuccess, onError);
|
1799
|
+
}
|
1384
1800
|
upload(file, url, arg1, arg2, arg3) {
|
1385
1801
|
const config = typeof arg3 === 'function' ? arg1 : {};
|
1386
1802
|
const onSuccess = typeof arg3 === 'function' ? arg2 : arg1;
|
@@ -1397,6 +1813,7 @@ class NgxHelperHttpService {
|
|
1397
1813
|
componentRef.instance.close = (type, result, status) => {
|
1398
1814
|
this.applicationRef.detachView(componentRef.hostView);
|
1399
1815
|
document.body.removeChild(htmlElement);
|
1816
|
+
componentRef.destroy();
|
1400
1817
|
this.components = this.components.filter((c) => c.id !== componentRef.instance.id);
|
1401
1818
|
this.updatePositions();
|
1402
1819
|
switch (type) {
|
@@ -1414,13 +1831,41 @@ class NgxHelperHttpService {
|
|
1414
1831
|
this.components.push({ id, componentRef });
|
1415
1832
|
this.updatePositions();
|
1416
1833
|
}
|
1417
|
-
|
1418
|
-
|
1834
|
+
printPDF(data, config) {
|
1835
|
+
const getPDF = () => {
|
1836
|
+
return new Promise((resolve, reject) => {
|
1837
|
+
if (typeof data !== 'string') {
|
1838
|
+
resolve(new Blob([data], { type: 'application/pdf' }));
|
1839
|
+
return;
|
1840
|
+
}
|
1841
|
+
this.getBuffer(data, 'دریافت فایل', config || {}).then((arrayBuffer) => resolve(new Blob([arrayBuffer], { type: 'application/pdf' })), () => reject());
|
1842
|
+
});
|
1843
|
+
};
|
1844
|
+
getPDF().then((blob) => {
|
1845
|
+
try {
|
1846
|
+
const prevIframe = document.getElementById('ngx-helper-http-pdf-download-iframe');
|
1847
|
+
if (prevIframe)
|
1848
|
+
document.body.removeChild(prevIframe);
|
1849
|
+
const src = URL.createObjectURL(blob);
|
1850
|
+
const iframe = document.createElement('iframe');
|
1851
|
+
iframe.id = 'ngx-helper-http-pdf-download-iframe';
|
1852
|
+
iframe.style.display = 'none';
|
1853
|
+
document.body.appendChild(iframe);
|
1854
|
+
iframe.src = src;
|
1855
|
+
iframe.onload = () => iframe.contentWindow?.print();
|
1856
|
+
}
|
1857
|
+
catch (e) {
|
1858
|
+
this.ngxHelperToastService.error('امکان پرینت فایل وجود ندارد.');
|
1859
|
+
}
|
1860
|
+
}, () => this.ngxHelperToastService.error('امکان دانلود فایل وجود ندارد.'));
|
1861
|
+
}
|
1862
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperHttpService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: NgxHelperToastService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1863
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperHttpService, providedIn: 'root' });
|
1419
1864
|
}
|
1420
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
1865
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NgxHelperHttpService, decorators: [{
|
1421
1866
|
type: Injectable,
|
1422
1867
|
args: [{ providedIn: 'root' }]
|
1423
|
-
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }] });
|
1868
|
+
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: NgxHelperToastService }] });
|
1424
1869
|
|
1425
1870
|
/*
|
1426
1871
|
* Public API Surface of ngx-helper-m3
|
@@ -1430,5 +1875,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
1430
1875
|
* Generated bundle index. Do not edit.
|
1431
1876
|
*/
|
1432
1877
|
|
1433
|
-
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, NgxHelperSafePipe, NgxHelperSectionColumnComponent, NgxHelperSectionComponent, NgxHelperSectionStickyDirective, NgxHelperValueBoxComponent, NgxHelperValueListComponent, NgxHelperValuePipe, NgxHelperVolumePipe, NgxHelperWeightPipe, provideNgxHelperConfig };
|
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, NgxHelperSectionStickyDirective, NgxHelperToastService, NgxHelperValueBoxComponent, NgxHelperValueListComponent, NgxHelperValuePipe, NgxHelperVolumePipe, NgxHelperWeightPipe, provideNgxHelperConfig };
|
1434
1879
|
//# sourceMappingURL=webilix-ngx-helper-m3.mjs.map
|