@webilix/ngx-helper-m3 0.0.1

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/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # @webilix/ngx-helper-m3
2
+
3
+ ### Helper library for Angular and Material 3
4
+
5
+ <br /><br />
6
+ This package is under development!
@@ -0,0 +1,581 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component, Injectable, InjectionToken, Injector, Pipe } from '@angular/core';
3
+ import { NgClass, NgComponentOutlet } from '@angular/common';
4
+ import * as i1 from '@angular/material/button';
5
+ import { MatButtonModule, MatIconButton } from '@angular/material/button';
6
+ import * as i2 from '@angular/material/dialog';
7
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
8
+ import * as i3 from '@angular/material/icon';
9
+ import { MatIconModule, MatIcon } from '@angular/material/icon';
10
+ import * as i1$1 from '@angular/material/bottom-sheet';
11
+ import { MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
12
+ import { Helper } from '@webilix/helper-library';
13
+ import { JalaliDateTime } from '@webilix/jalali-date-time';
14
+ import * as i1$2 from '@angular/platform-browser';
15
+
16
+ class ConfirmDialogComponent {
17
+ confirm = inject(MAT_DIALOG_DATA);
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: ConfirmDialogComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "confirm-dialog" } }, ngImport: i0, template: "<mat-dialog-content>\n <content>\n <!-- ICON -->\n @if (confirm.icon) {\n <div class=\"icon\">\n <mat-icon>{{ confirm.icon }}</mat-icon>\n </div>\n }\n\n <!-- CONTENT -->\n <div class=\"content\">\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 </content>\n</mat-dialog-content>\n<mat-dialog-actions [align]=\"'end'\">\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</mat-dialog-actions>\n", styles: ["content{display:flex;align-items:flex-start;column-gap:1rem;padding-top:1rem}content .content{flex:1}content .content .question{text-align:justify}content .content .description{font-size:90%;margin-top:.5rem;text-align:justify}content .content .data{display:flex;align-items:center;column-gap:.5rem;font-size:90%;margin-top:1rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
22
+ type: Component,
23
+ args: [{ host: { selector: 'confirm-dialog' }, imports: [NgClass, MatButtonModule, MatDialogModule, MatIconModule], template: "<mat-dialog-content>\n <content>\n <!-- ICON -->\n @if (confirm.icon) {\n <div class=\"icon\">\n <mat-icon>{{ confirm.icon }}</mat-icon>\n </div>\n }\n\n <!-- CONTENT -->\n <div class=\"content\">\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 </content>\n</mat-dialog-content>\n<mat-dialog-actions [align]=\"'end'\">\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</mat-dialog-actions>\n", styles: ["content{display:flex;align-items:flex-start;column-gap:1rem;padding-top:1rem}content .content{flex:1}content .content .question{text-align:justify}content .content .description{font-size:90%;margin-top:.5rem;text-align:justify}content .content .data{display:flex;align-items:center;column-gap:.5rem;font-size:90%;margin-top:1rem}\n"] }]
24
+ }] });
25
+
26
+ class ConfirmBottomSheetComponent {
27
+ matBottomSheetRef;
28
+ confirm = inject(MAT_BOTTOM_SHEET_DATA);
29
+ constructor(matBottomSheetRef) {
30
+ this.matBottomSheetRef = matBottomSheetRef;
31
+ }
32
+ close(confirmed) {
33
+ this.matBottomSheetRef.dismiss(confirmed);
34
+ }
35
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ConfirmBottomSheetComponent, deps: [{ token: i1$1.MatBottomSheetRef }], target: i0.ɵɵFactoryTarget.Component });
36
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: ConfirmBottomSheetComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "confirm-bottom-sheet" } }, ngImport: i0, template: "<content>\n <!-- ICON -->\n @if (confirm.icon) {\n <div class=\"icon\">\n <mat-icon>{{ confirm.icon }}</mat-icon>\n </div>\n }\n\n <!-- CONTENT -->\n <div class=\"content\">\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</content>\n\n<div class=\"buttons\">\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: ["content{display:flex;align-items:flex-start;column-gap:1rem;padding-top:1rem}content .content{flex:1}content .content .question{text-align:justify}content .content .description{font-size:90%;margin-top:.5rem;text-align:justify}content .content .data{display:flex;align-items:center;column-gap:.5rem;font-size:90%;margin-top:1rem}.buttons{display:flex;align-items:center;justify-content:flex-end;column-gap:1rem;margin:1rem 0 .5rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ConfirmBottomSheetComponent, decorators: [{
39
+ type: Component,
40
+ args: [{ host: { selector: 'confirm-bottom-sheet' }, imports: [NgClass, MatButtonModule, MatIconModule], template: "<content>\n <!-- ICON -->\n @if (confirm.icon) {\n <div class=\"icon\">\n <mat-icon>{{ confirm.icon }}</mat-icon>\n </div>\n }\n\n <!-- CONTENT -->\n <div class=\"content\">\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</content>\n\n<div class=\"buttons\">\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: ["content{display:flex;align-items:flex-start;column-gap:1rem;padding-top:1rem}content .content{flex:1}content .content .question{text-align:justify}content .content .description{font-size:90%;margin-top:.5rem;text-align:justify}content .content .data{display:flex;align-items:center;column-gap:.5rem;font-size:90%;margin-top:1rem}.buttons{display:flex;align-items:center;justify-content:flex-end;column-gap:1rem;margin:1rem 0 .5rem}\n"] }]
41
+ }], ctorParameters: () => [{ type: i1$1.MatBottomSheetRef }] });
42
+
43
+ class NgxHelperConfirmCalss {
44
+ matBottomSheet;
45
+ matDialog;
46
+ confirm;
47
+ constructor(matBottomSheet, matDialog, confirm) {
48
+ this.matBottomSheet = matBottomSheet;
49
+ this.matDialog = matDialog;
50
+ this.confirm = confirm;
51
+ }
52
+ dialog(onConfirmed, arg1, arg2) {
53
+ const onDenied = typeof arg1 === 'function' ? arg1 : undefined;
54
+ const config = arg2 || (typeof arg1 !== 'function' ? arg1 : {});
55
+ this.matDialog
56
+ .open(ConfirmDialogComponent, {
57
+ // DEFAULT CONFIG
58
+ width: 'calc(100vw - 4rem)',
59
+ direction: 'rtl',
60
+ enterAnimationDuration: '100ms',
61
+ exitAnimationDuration: '100ms',
62
+ // OVERWRITE CONFIG
63
+ ...config,
64
+ maxHeight: '80vh',
65
+ // DATA
66
+ data: this.confirm,
67
+ })
68
+ .afterClosed()
69
+ .subscribe({ next: (confirmed) => (!!confirmed ? onConfirmed() : onDenied ? onDenied() : undefined) });
70
+ }
71
+ bottomSheet(onConfirmed, arg1, arg2) {
72
+ const onDenied = typeof arg1 === 'function' ? arg1 : undefined;
73
+ const config = arg2 || (typeof arg1 !== 'function' ? arg1 : {});
74
+ this.matBottomSheet
75
+ .open(ConfirmBottomSheetComponent, {
76
+ // DEFAULT CONFIG
77
+ direction: 'rtl',
78
+ // OVERWRITE CONFIG
79
+ ...config,
80
+ maxHeight: '80vh',
81
+ // DATA
82
+ data: this.confirm,
83
+ })
84
+ .afterDismissed()
85
+ .subscribe({ next: (confirmed) => (!!confirmed ? onConfirmed() : onDenied ? onDenied() : undefined) });
86
+ }
87
+ }
88
+ class NgxHelperConfirmService {
89
+ matBottomSheet;
90
+ matDialog;
91
+ constructor(matBottomSheet, matDialog) {
92
+ this.matBottomSheet = matBottomSheet;
93
+ this.matDialog = matDialog;
94
+ }
95
+ verify(confirm) {
96
+ return new NgxHelperConfirmCalss(this.matBottomSheet, this.matDialog, confirm);
97
+ }
98
+ active(data, config) {
99
+ return this.verify({
100
+ question: `آیا می‌خواهید ${data.title} انتخاب شده را فعال کنید؟`,
101
+ description: config?.description,
102
+ data: data.value ? { title: data.title, value: data.value } : undefined,
103
+ icon: 'check_box',
104
+ confirmClass: config?.confirmClass,
105
+ denyClass: config?.denyClass,
106
+ });
107
+ }
108
+ deactive(data, config) {
109
+ return this.verify({
110
+ question: `آیا می‌خواهید ${data.title} انتخاب شده را غیرفعال کنید؟`,
111
+ description: config?.description,
112
+ data: data.value ? { title: data.title, value: data.value } : undefined,
113
+ icon: 'disabled_by_default',
114
+ confirmClass: config?.confirmClass || 'error',
115
+ denyClass: config?.denyClass,
116
+ });
117
+ }
118
+ delete(data, config) {
119
+ return this.verify({
120
+ question: `آیا می‌خواهید ${data.title} انتخاب شده را حذف کنید؟`,
121
+ description: config?.description,
122
+ data: data.value ? { title: data.title, value: data.value } : undefined,
123
+ icon: 'delete',
124
+ confirmClass: config?.confirmClass || 'error',
125
+ denyClass: config?.denyClass,
126
+ });
127
+ }
128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperConfirmService, deps: [{ token: i1$1.MatBottomSheet }, { token: i2.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
129
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperConfirmService, providedIn: 'root' });
130
+ }
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperConfirmService, decorators: [{
132
+ type: Injectable,
133
+ args: [{ providedIn: 'root' }]
134
+ }], ctorParameters: () => [{ type: i1$1.MatBottomSheet }, { type: i2.MatDialog }] });
135
+
136
+ const NGX_HELPER_CONTAINER_TYPE = new InjectionToken('NGX-HELPER-CONTAINER-TYPE');
137
+ const NGX_HELPER_CONTAINER_DATA = new InjectionToken('NGX-HELPER-CONTAINER-DATA');
138
+ const NGX_HELPER_CONTAINER_CLOSE = new InjectionToken('NGX-HELPER-CONTAINER-CLOSE');
139
+
140
+ class ContainerDialogComponent {
141
+ matDialogRef;
142
+ container = inject(MAT_DIALOG_DATA);
143
+ injector;
144
+ constructor(matDialogRef) {
145
+ this.matDialogRef = matDialogRef;
146
+ }
147
+ ngOnInit() {
148
+ this.injector = Injector.create({
149
+ providers: [
150
+ { provide: NGX_HELPER_CONTAINER_TYPE, useValue: 'DIALOG' },
151
+ { provide: NGX_HELPER_CONTAINER_DATA, useValue: this.container.config.data },
152
+ {
153
+ provide: NGX_HELPER_CONTAINER_CLOSE,
154
+ useFactory: () => (response) => this.matDialogRef.close(response),
155
+ },
156
+ ],
157
+ });
158
+ }
159
+ close() {
160
+ this.matDialogRef.close();
161
+ }
162
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ContainerDialogComponent, deps: [{ token: i2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
163
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: ContainerDialogComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "container-dialog" } }, ngImport: i0, template: "<header>\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\"><mat-icon>close</mat-icon></button>\n }\n</header>\n<content [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n</content>\n", styles: ["header{display:flex;align-items:center;height:50px;line-height:50px;font-size:110%;padding:0 .5rem;border-bottom:1px solid var(--outline-variant)}header .title{flex:1;padding-right:.5rem}content{display:block;max-height:calc(80vh - 50px);overflow:auto}\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"] }] });
164
+ }
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ContainerDialogComponent, decorators: [{
166
+ type: Component,
167
+ args: [{ host: { selector: 'container-dialog' }, imports: [NgComponentOutlet, MatIconButton, MatIcon], template: "<header>\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\"><mat-icon>close</mat-icon></button>\n }\n</header>\n<content [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n</content>\n", styles: ["header{display:flex;align-items:center;height:50px;line-height:50px;font-size:110%;padding:0 .5rem;border-bottom:1px solid var(--outline-variant)}header .title{flex:1;padding-right:.5rem}content{display:block;max-height:calc(80vh - 50px);overflow:auto}\n"] }]
168
+ }], ctorParameters: () => [{ type: i2.MatDialogRef }] });
169
+
170
+ class ContainerBottomSheetComponent {
171
+ matBottomSheetRef;
172
+ container = inject(MAT_BOTTOM_SHEET_DATA);
173
+ injector;
174
+ constructor(matBottomSheetRef) {
175
+ this.matBottomSheetRef = matBottomSheetRef;
176
+ }
177
+ ngOnInit() {
178
+ this.injector = Injector.create({
179
+ providers: [
180
+ { provide: NGX_HELPER_CONTAINER_TYPE, useValue: 'BOTTOMSHEET' },
181
+ { provide: NGX_HELPER_CONTAINER_DATA, useValue: this.container.config.data },
182
+ {
183
+ provide: NGX_HELPER_CONTAINER_CLOSE,
184
+ useFactory: () => (response) => this.matBottomSheetRef.dismiss(response),
185
+ },
186
+ ],
187
+ });
188
+ }
189
+ close() {
190
+ this.matBottomSheetRef.dismiss();
191
+ }
192
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ContainerBottomSheetComponent, deps: [{ token: i1$1.MatBottomSheetRef }], target: i0.ɵɵFactoryTarget.Component });
193
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: ContainerBottomSheetComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "container-bottom-sheet" } }, ngImport: i0, template: "<header>\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\"><mat-icon>close</mat-icon></button>\n }\n</header>\n<content>\n <div [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n </div>\n</content>\n", styles: ["header{display:flex;align-items:center;height:50px;line-height:50px;font-size:110%;padding:0 .5rem;border-bottom:1px solid var(--outline-variant)}header .title{flex:1;padding-right:.5rem}content{display:block;max-height:calc(80vh - 51px);overflow:auto}::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"] }] });
194
+ }
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ContainerBottomSheetComponent, decorators: [{
196
+ type: Component,
197
+ args: [{ host: { selector: 'container-bottom-sheet' }, imports: [NgComponentOutlet, MatIconButton, MatIcon], template: "<header>\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\"><mat-icon>close</mat-icon></button>\n }\n</header>\n<content>\n <div [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n </div>\n</content>\n", styles: ["header{display:flex;align-items:center;height:50px;line-height:50px;font-size:110%;padding:0 .5rem;border-bottom:1px solid var(--outline-variant)}header .title{flex:1;padding-right:.5rem}content{display:block;max-height:calc(80vh - 51px);overflow:auto}::ng-deep .ngx-helper-bottom-sheet .mat-bottom-sheet-container{padding:0}\n"] }]
198
+ }], ctorParameters: () => [{ type: i1$1.MatBottomSheetRef }] });
199
+
200
+ class NgxHelperContainerCalss {
201
+ matBottomSheet;
202
+ matDialog;
203
+ container;
204
+ constructor(matBottomSheet, matDialog, container) {
205
+ this.matBottomSheet = matBottomSheet;
206
+ this.matDialog = matDialog;
207
+ this.container = container;
208
+ }
209
+ dialog(arg1, arg2, arg3) {
210
+ const onResponse = typeof arg1 === 'function' ? arg1 : undefined;
211
+ const onDismiss = typeof arg2 === 'function' ? arg2 : undefined;
212
+ const config = arg3 || (typeof arg2 !== 'function' ? arg2 : {});
213
+ this.matDialog
214
+ .open(ContainerDialogComponent, {
215
+ // DEFAULT CONFIG
216
+ width: 'calc(100vw - 4rem)',
217
+ direction: 'rtl',
218
+ enterAnimationDuration: '100ms',
219
+ exitAnimationDuration: '100ms',
220
+ // OVERWRITE CONFIG
221
+ ...config,
222
+ maxHeight: '80vh',
223
+ // DATA
224
+ data: this.container,
225
+ })
226
+ .afterClosed()
227
+ .subscribe({
228
+ next: (response) => {
229
+ if (onResponse && !!response)
230
+ onResponse(response);
231
+ if (onDismiss && !response)
232
+ onDismiss();
233
+ },
234
+ });
235
+ }
236
+ bottomSheet(arg1, arg2, arg3) {
237
+ const onResponse = typeof arg1 === 'function' ? arg1 : undefined;
238
+ const onDismiss = typeof arg2 === 'function' ? arg2 : undefined;
239
+ const config = arg3 || (typeof arg2 !== 'function' ? arg2 : {});
240
+ this.matBottomSheet
241
+ .open(ContainerBottomSheetComponent, {
242
+ // DEFAULT CONFIG
243
+ direction: 'rtl',
244
+ panelClass: 'ngx-helper-bottom-sheet',
245
+ // OVERWRITE CONFIG
246
+ ...config,
247
+ maxHeight: '80vh',
248
+ // DATA
249
+ data: this.container,
250
+ })
251
+ .afterDismissed()
252
+ .subscribe({
253
+ next: (response) => {
254
+ if (onResponse && !!response)
255
+ onResponse(response);
256
+ if (onDismiss && !response)
257
+ onDismiss();
258
+ },
259
+ });
260
+ }
261
+ }
262
+ class NgxHelperContainerService {
263
+ matBottomSheet;
264
+ matDialog;
265
+ constructor(matBottomSheet, matDialog) {
266
+ this.matBottomSheet = matBottomSheet;
267
+ this.matDialog = matDialog;
268
+ }
269
+ init(component, title, arg1) {
270
+ const config = arg1 || {};
271
+ return new NgxHelperContainerCalss(this.matBottomSheet, this.matDialog, { component, title, config });
272
+ }
273
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperContainerService, deps: [{ token: i1$1.MatBottomSheet }, { token: i2.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
274
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperContainerService, providedIn: 'root' });
275
+ }
276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperContainerService, decorators: [{
277
+ type: Injectable,
278
+ args: [{ providedIn: 'root' }]
279
+ }], ctorParameters: () => [{ type: i1$1.MatBottomSheet }, { type: i2.MatDialog }] });
280
+
281
+ class NgxHelperBankCardPipe {
282
+ transform(value, options) {
283
+ if (!Helper.IS.string(value) || value === '')
284
+ return '';
285
+ switch (options?.view) {
286
+ case 'BANK':
287
+ return Helper.BANK.findCard(value)?.title || '';
288
+ default:
289
+ return Helper.STRING.getBankCardView(value, options?.join || '-');
290
+ }
291
+ }
292
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperBankCardPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
293
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperBankCardPipe, isStandalone: true, name: "ngxHelperBankCard" });
294
+ }
295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperBankCardPipe, decorators: [{
296
+ type: Pipe,
297
+ args: [{ name: 'ngxHelperBankCard' }]
298
+ }] });
299
+
300
+ class NgxHelperDatePipe {
301
+ transform(value, options) {
302
+ if (!value || (!Helper.IS.date(value) && !Helper.IS.number(value)))
303
+ return '';
304
+ const date = typeof value === 'number' ? new Date(value) : value;
305
+ const jalali = JalaliDateTime();
306
+ const timezone = options?.timezone && jalali.timezones().includes(options?.timezone) ? options?.timezone : 'Asia/Tehran';
307
+ switch (options?.format || 'DATE') {
308
+ case 'FULL':
309
+ return jalali.toFullText(date, { format: 'W، d N Y H:I', timezone });
310
+ case 'SHORT':
311
+ return jalali.toFullText(date, { format: 'Y/M/D', timezone });
312
+ case 'DATE':
313
+ return jalali.toFullText(date, { format: 'W، d N Y', timezone });
314
+ case 'TIME':
315
+ return jalali.toFullText(date, { format: 'H:I', timezone });
316
+ case 'WEEK':
317
+ const { from, to } = jalali.periodWeek(1, date, timezone);
318
+ return Helper.DATE.jalaliPeriod(from, to, timezone);
319
+ case 'MONTH':
320
+ return jalali.toFullText(date, { format: 'N Y', timezone });
321
+ case 'YEAR':
322
+ return jalali.toFullText(date, { format: 'Y', timezone });
323
+ default:
324
+ return jalali.toFullText(date, { format: options?.format, timezone });
325
+ }
326
+ }
327
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
328
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperDatePipe, isStandalone: true, name: "ngxHelperDate" });
329
+ }
330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperDatePipe, decorators: [{
331
+ type: Pipe,
332
+ args: [{ name: 'ngxHelperDate' }]
333
+ }] });
334
+
335
+ class NgxHelperDurationPipe {
336
+ transform(value, options) {
337
+ let seconds = 0;
338
+ if (Helper.IS.number(value))
339
+ seconds = Math.abs(value);
340
+ else if (Helper.IS.date(value))
341
+ seconds = Math.floor(Math.abs(new Date().getTime() - value.getTime()) / 1000);
342
+ else if (Helper.IS.object(value)) {
343
+ const from = 'from' in value ? value.from : new Date();
344
+ const to = 'to' in value ? value.to : new Date();
345
+ seconds = Math.floor(Math.abs(from.getTime() - to.getTime()) / 1000);
346
+ }
347
+ const days = Math.floor(seconds / (24 * 60 * 60));
348
+ seconds -= days * (24 * 60 * 60);
349
+ const hours = Math.floor(seconds / (60 * 60));
350
+ seconds -= hours * (60 * 60);
351
+ const minutes = Math.floor(seconds / 60);
352
+ seconds -= minutes * 60;
353
+ const hasDays = days !== 0;
354
+ const time = [hours, minutes, seconds].map((v) => v.toString().padStart(2, '0')).join(':');
355
+ switch (options?.format || 'TEXT') {
356
+ case 'TEXT':
357
+ const hasTime = !!hours || !!minutes || !!seconds;
358
+ const day = hasDays
359
+ ? Helper.NUMBER.format(days, 'EN') + (!!options?.english ? (days === 1 ? ' day' : ' days') : ' روز')
360
+ : '';
361
+ const join = hasDays && hasTime ? (!!options?.english ? ', ' : ' و ') : '';
362
+ return (day + join + (!hasDays || hasTime ? time : '')).trim();
363
+ case 'FULL':
364
+ return (hasDays ? Helper.NUMBER.format(days, 'EN') + ':' : '') + time;
365
+ case 'DAY':
366
+ return Helper.NUMBER.format(days + (hours !== 0 || minutes !== 0 ? 1 : 0), !!options?.english ? 'EN' : 'FA');
367
+ case 'HOUR':
368
+ return Helper.NUMBER.format(days * 24 + hours + (minutes !== 0 ? 1 : 0), !!options?.english ? 'EN' : 'FA');
369
+ case 'MINUTE':
370
+ return Helper.NUMBER.format(days * 24 * 60 + hours * 60 + minutes, !!options?.english ? 'EN' : 'FA');
371
+ case 'SECOND':
372
+ return Helper.NUMBER.format(days * 24 * 3600 + hours * 3600 + minutes * 60 + seconds, !!options?.english ? 'EN' : 'FA');
373
+ }
374
+ }
375
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
376
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperDurationPipe, isStandalone: true, name: "ngxHelperDuration" });
377
+ }
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperDurationPipe, decorators: [{
379
+ type: Pipe,
380
+ args: [{ name: 'ngxHelperDuration' }]
381
+ }] });
382
+
383
+ class NgxHelperFileSizePipe {
384
+ transform(size, options) {
385
+ return Helper.NUMBER.toFileSize(size, !!options?.english ? 'EN' : 'FA');
386
+ }
387
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperFileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
388
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperFileSizePipe, isStandalone: true, name: "ngxHelperFileSize" });
389
+ }
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperFileSizePipe, decorators: [{
391
+ type: Pipe,
392
+ args: [{ name: 'ngxHelperFileSize' }]
393
+ }] });
394
+
395
+ class NgxHelperMobilePipe {
396
+ transform(value, options) {
397
+ if (!Helper.IS.string(value) || value === '')
398
+ return '';
399
+ return Helper.STRING.getMobileView(value, options?.join || '-');
400
+ }
401
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperMobilePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
402
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperMobilePipe, isStandalone: true, name: "ngxHelperMobile" });
403
+ }
404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperMobilePipe, decorators: [{
405
+ type: Pipe,
406
+ args: [{ name: 'ngxHelperMobile' }]
407
+ }] });
408
+
409
+ class NgxHelperMultiLinePipe {
410
+ sanitizer;
411
+ constructor(sanitizer) {
412
+ this.sanitizer = sanitizer;
413
+ }
414
+ transform(value, options) {
415
+ if (!Helper.IS.string(value) || value === '')
416
+ return '';
417
+ return options?.html
418
+ ? this.sanitizer.bypassSecurityTrustHtml(value.replace(/(?:\r\n|\r|\n)/g, '<br />'))
419
+ : Helper.STRING.escapeHTML(value).replace(/(?:\r\n|\r|\n)/g, '<br />');
420
+ }
421
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperMultiLinePipe, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
422
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperMultiLinePipe, isStandalone: true, name: "ngxHelperMultiLine" });
423
+ }
424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperMultiLinePipe, decorators: [{
425
+ type: Pipe,
426
+ args: [{ name: 'ngxHelperMultiLine' }]
427
+ }], ctorParameters: () => [{ type: i1$2.DomSanitizer }] });
428
+
429
+ class NgxHelperNumberPipe {
430
+ transform(value, options) {
431
+ if (!Helper.IS.number(value))
432
+ return '';
433
+ value = options?.fractionDigits ? +value.toFixed(options?.fractionDigits) : value;
434
+ return Helper.NUMBER.format(value, options?.english ? 'EN' : 'FA');
435
+ }
436
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
437
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperNumberPipe, isStandalone: true, name: "ngxHelperNumber" });
438
+ }
439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperNumberPipe, decorators: [{
440
+ type: Pipe,
441
+ args: [{ name: 'ngxHelperNumber' }]
442
+ }] });
443
+
444
+ class NgxHelperPeriodPipe {
445
+ transform(value, options) {
446
+ const from = Helper.IS.date(value) ? value : 'from' in value ? value.from : new Date();
447
+ const to = Helper.IS.date(value) ? new Date() : 'to' in value ? value.to : new Date();
448
+ return Helper.DATE.jalaliPeriod(from, to, options?.timezone || '');
449
+ }
450
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperPeriodPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
451
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperPeriodPipe, isStandalone: true, name: "ngxHelperPeriod" });
452
+ }
453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperPeriodPipe, decorators: [{
454
+ type: Pipe,
455
+ args: [{ name: 'ngxHelperPeriod' }]
456
+ }] });
457
+
458
+ class NgxHelperPricePipe {
459
+ transform(value, options) {
460
+ if (!Helper.IS.number(value) || value < 0)
461
+ return '';
462
+ const getPrice = (...titles) => {
463
+ const price = Helper.NUMBER.format(+value.toFixed(2), !!options?.english ? 'EN' : 'FA');
464
+ const unit = titles[options?.short ? 0 : 1][options?.english ? 0 : 1];
465
+ const currency = options?.currency ? ' ' + options?.currency : '';
466
+ return `${price} ${unit}${currency}`;
467
+ };
468
+ if (value < 1000)
469
+ return getPrice(['', ''], ['', '']);
470
+ value /= 1000;
471
+ if (value < 1000)
472
+ return getPrice(['T', 'ه'], ['Thousand', 'هزار']);
473
+ value /= 1000;
474
+ if (value < 1000)
475
+ return getPrice(['M', 'م'], ['Million', 'میلیون']);
476
+ value /= 1000;
477
+ return getPrice(['B', 'د'], ['Billion', 'میلیارد']);
478
+ }
479
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperPricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
480
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperPricePipe, isStandalone: true, name: "ngxHelperPrice" });
481
+ }
482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperPricePipe, decorators: [{
483
+ type: Pipe,
484
+ args: [{ name: 'ngxHelperPrice' }]
485
+ }] });
486
+
487
+ class NgxHelperSafePipe {
488
+ domSanitizer;
489
+ constructor(domSanitizer) {
490
+ this.domSanitizer = domSanitizer;
491
+ }
492
+ transform(value, options) {
493
+ if (!Helper.IS.string(value) || value === '')
494
+ return '';
495
+ switch (options?.type || 'HTML') {
496
+ case 'STYLE':
497
+ return this.domSanitizer.bypassSecurityTrustStyle(value);
498
+ case 'SCRIPT':
499
+ return this.domSanitizer.bypassSecurityTrustScript(value);
500
+ case 'URL':
501
+ return this.domSanitizer.bypassSecurityTrustUrl(value);
502
+ case 'RESOURCE_URL':
503
+ return this.domSanitizer.bypassSecurityTrustResourceUrl(value);
504
+ case 'HTML':
505
+ return this.domSanitizer.bypassSecurityTrustHtml(value);
506
+ }
507
+ }
508
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperSafePipe, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
509
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperSafePipe, isStandalone: true, name: "ngxHelperSafe" });
510
+ }
511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperSafePipe, decorators: [{
512
+ type: Pipe,
513
+ args: [{ name: 'ngxHelperSafe' }]
514
+ }], ctorParameters: () => [{ type: i1$2.DomSanitizer }] });
515
+
516
+ class NgxHelperVolumePipe {
517
+ transform(value, options) {
518
+ if (!Helper.IS.number(value) || value < 0)
519
+ return '';
520
+ const getVolume = (...titles) => {
521
+ const volume = Helper.NUMBER.format(+value.toFixed(2), options?.english ? 'EN' : 'FA');
522
+ const shortIndex = options?.short ? 0 : 1;
523
+ const titleIndex = options?.english ? 0 : 1;
524
+ return `${volume} ${titles[shortIndex][titleIndex]}`;
525
+ };
526
+ if (value === 0)
527
+ return getVolume(['', ''], ['', '']);
528
+ if (value < 1000)
529
+ return getVolume(['ML', 'م'], ['Milliliter', 'میلی لیتر']);
530
+ value /= 1000;
531
+ return getVolume(['L', 'ل'], ['Liter', 'لیتر']);
532
+ }
533
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperVolumePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
534
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperVolumePipe, isStandalone: true, name: "ngxHelperVolume" });
535
+ }
536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperVolumePipe, decorators: [{
537
+ type: Pipe,
538
+ args: [{ name: 'ngxHelperVolume' }]
539
+ }] });
540
+
541
+ class NgxHelperWeightPipe {
542
+ transform(value, options) {
543
+ if (!Helper.IS.number(value) || value < 0)
544
+ return '';
545
+ const getWeight = (...titles) => {
546
+ const weight = Helper.NUMBER.format(+value.toFixed(2), options?.english ? 'EN' : 'FA');
547
+ const shortIndex = options?.short ? 0 : 1;
548
+ const titleIndex = options?.english ? 0 : 1;
549
+ return `${weight} ${titles[shortIndex][titleIndex]}`;
550
+ };
551
+ if (value === 0)
552
+ return getWeight(['', ''], ['', '']);
553
+ if (value < 1000)
554
+ return getWeight(['G', 'گ'], ['Gram', 'گرم']);
555
+ value /= 1000;
556
+ if (value < 1000)
557
+ return getWeight(['K', 'ک'], ['Kilogram', 'کیلو']);
558
+ value /= 1000;
559
+ if (value < 1000)
560
+ return getWeight(['T', 'ت'], ['Tonne', 'تن']);
561
+ value /= 1000;
562
+ return getWeight(['KT', 'ه'], ['Kilotonne', 'هزار تن']);
563
+ }
564
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperWeightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
565
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperWeightPipe, isStandalone: true, name: "ngxHelperWeight" });
566
+ }
567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NgxHelperWeightPipe, decorators: [{
568
+ type: Pipe,
569
+ args: [{ name: 'ngxHelperWeight' }]
570
+ }] });
571
+
572
+ /*
573
+ * Public API Surface of ngx-helper-m3
574
+ */
575
+
576
+ /**
577
+ * Generated bundle index. Do not edit.
578
+ */
579
+
580
+ export { NGX_HELPER_CONTAINER_CLOSE, NGX_HELPER_CONTAINER_DATA, NGX_HELPER_CONTAINER_TYPE, NgxHelperBankCardPipe, NgxHelperConfirmService, NgxHelperContainerService, NgxHelperDatePipe, NgxHelperDurationPipe, NgxHelperFileSizePipe, NgxHelperMobilePipe, NgxHelperMultiLinePipe, NgxHelperNumberPipe, NgxHelperPeriodPipe, NgxHelperPricePipe, NgxHelperSafePipe, NgxHelperVolumePipe, NgxHelperWeightPipe };
581
+ //# sourceMappingURL=webilix-ngx-helper-m3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webilix-ngx-helper-m3.mjs","sources":["../../../ngx-helper-m3/src/lib/confirm/dialog/confirm-dialog.component.ts","../../../ngx-helper-m3/src/lib/confirm/dialog/confirm-dialog.component.html","../../../ngx-helper-m3/src/lib/confirm/bottom-sheet/confirm-bottom-sheet.component.ts","../../../ngx-helper-m3/src/lib/confirm/bottom-sheet/confirm-bottom-sheet.component.html","../../../ngx-helper-m3/src/lib/confirm/confirm.service.ts","../../../ngx-helper-m3/src/lib/container/container.interface.ts","../../../ngx-helper-m3/src/lib/container/dialog/container-dialog.component.ts","../../../ngx-helper-m3/src/lib/container/dialog/container-dialog.component.html","../../../ngx-helper-m3/src/lib/container/bottom-sheet/container-bottom-sheet.component.ts","../../../ngx-helper-m3/src/lib/container/bottom-sheet/container-bottom-sheet.component.html","../../../ngx-helper-m3/src/lib/container/container.service.ts","../../../ngx-helper-m3/src/lib/pipes/bank-card.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/date.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/duration.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/file-size.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/mobile.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/multi-line.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/number.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/period.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/price.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/safe.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/volume.pipe.ts","../../../ngx-helper-m3/src/lib/pipes/weight.pipe.ts","../../../ngx-helper-m3/src/public-api.ts","../../../ngx-helper-m3/src/webilix-ngx-helper-m3.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { NgClass } from '@angular/common';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { INgxHelperConfirm } from '../confirm.interface';\n\n@Component({\n host: { selector: 'confirm-dialog' },\n imports: [NgClass, MatButtonModule, MatDialogModule, MatIconModule],\n templateUrl: './confirm-dialog.component.html',\n styleUrl: './confirm-dialog.component.scss',\n})\nexport class ConfirmDialogComponent {\n public confirm: INgxHelperConfirm = inject(MAT_DIALOG_DATA);\n}\n","<mat-dialog-content>\n <content>\n <!-- ICON -->\n @if (confirm.icon) {\n <div class=\"icon\">\n <mat-icon>{{ confirm.icon }}</mat-icon>\n </div>\n }\n\n <!-- CONTENT -->\n <div class=\"content\">\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 </content>\n</mat-dialog-content>\n<mat-dialog-actions [align]=\"'end'\">\n <button mat-button type=\"button\" mat-dialog-close [ngClass]=\"confirm.denyClass\">خیر</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"true\" [ngClass]=\"confirm.confirmClass\">بلی</button>\n</mat-dialog-actions>\n","import { Component, inject } from '@angular/core';\nimport { NgClass } from '@angular/common';\n\nimport { MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef } from '@angular/material/bottom-sheet';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { INgxHelperConfirm } from '../confirm.interface';\n\n@Component({\n host: { selector: 'confirm-bottom-sheet' },\n imports: [NgClass, MatButtonModule, MatIconModule],\n templateUrl: './confirm-bottom-sheet.component.html',\n styleUrl: './confirm-bottom-sheet.component.scss',\n})\nexport class ConfirmBottomSheetComponent {\n public confirm: INgxHelperConfirm = inject(MAT_BOTTOM_SHEET_DATA);\n\n constructor(private readonly matBottomSheetRef: MatBottomSheetRef<ConfirmBottomSheetComponent>) {}\n\n close(confirmed?: boolean) {\n this.matBottomSheetRef.dismiss(confirmed);\n }\n}\n","<content>\n <!-- ICON -->\n @if (confirm.icon) {\n <div class=\"icon\">\n <mat-icon>{{ confirm.icon }}</mat-icon>\n </div>\n }\n\n <!-- CONTENT -->\n <div class=\"content\">\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</content>\n\n<div class=\"buttons\">\n <button mat-button type=\"button\" (click)=\"close()\" [ngClass]=\"confirm.denyClass\">خیر</button>\n <button mat-button type=\"button\" (click)=\"close(true)\" [ngClass]=\"confirm.confirmClass\">بلی</button>\n</div>\n","import { Injectable } from '@angular/core';\n\nimport { MatBottomSheet, MatBottomSheetConfig } from '@angular/material/bottom-sheet';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\n\nimport { ConfirmDialogComponent } from './dialog/confirm-dialog.component';\nimport { ConfirmBottomSheetComponent } from './bottom-sheet/confirm-bottom-sheet.component';\n\nimport { INgxHelperConfirm } from './confirm.interface';\n\ninterface IConfirmData {\n readonly title: string;\n readonly value?: string;\n}\n\ninterface IConfirmConfig {\n readonly description: string;\n readonly confirmClass: string;\n readonly denyClass: string;\n}\n\nclass NgxHelperConfirmCalss {\n constructor(\n private readonly matBottomSheet: MatBottomSheet,\n private readonly matDialog: MatDialog,\n private readonly confirm: INgxHelperConfirm,\n ) {}\n\n dialog(onConfirmed: () => void): void;\n dialog(onConfirmed: () => void, onDenied: () => void): void;\n dialog(onConfirmed: () => void, config: MatDialogConfig): void;\n dialog(onConfirmed: () => void, onDenied: () => void, config: MatDialogConfig): void;\n dialog(onConfirmed: () => void, arg1?: any, arg2?: any): void {\n const onDenied: (() => void) | undefined = typeof arg1 === 'function' ? arg1 : undefined;\n const config: MatDialogConfig = arg2 || (typeof arg1 !== 'function' ? arg1 : {});\n\n this.matDialog\n .open<any, any, boolean>(ConfirmDialogComponent, {\n // DEFAULT CONFIG\n width: 'calc(100vw - 4rem)',\n direction: 'rtl',\n enterAnimationDuration: '100ms',\n exitAnimationDuration: '100ms',\n // OVERWRITE CONFIG\n ...config,\n maxHeight: '80vh',\n // DATA\n data: this.confirm,\n })\n .afterClosed()\n .subscribe({ next: (confirmed?: boolean) => (!!confirmed ? onConfirmed() : onDenied ? onDenied() : undefined) });\n }\n\n bottomSheet(onConfirmed: () => void): void;\n bottomSheet(onConfirmed: () => void, onDenied: () => void): void;\n bottomSheet(onConfirmed: () => void, config: MatBottomSheetConfig): void;\n bottomSheet(onConfirmed: () => void, onDenied: () => void, config: MatBottomSheetConfig): void;\n bottomSheet(onConfirmed: () => void, arg1?: any, arg2?: any): void {\n const onDenied: (() => void) | undefined = typeof arg1 === 'function' ? arg1 : undefined;\n const config: MatBottomSheetConfig = arg2 || (typeof arg1 !== 'function' ? arg1 : {});\n\n this.matBottomSheet\n .open<any, any, boolean>(ConfirmBottomSheetComponent, {\n // DEFAULT CONFIG\n direction: 'rtl',\n // OVERWRITE CONFIG\n ...config,\n maxHeight: '80vh',\n // DATA\n data: this.confirm,\n })\n .afterDismissed()\n .subscribe({ next: (confirmed?: boolean) => (!!confirmed ? onConfirmed() : onDenied ? onDenied() : undefined) });\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NgxHelperConfirmService {\n constructor(private readonly matBottomSheet: MatBottomSheet, private readonly matDialog: MatDialog) {}\n\n verify(confirm: INgxHelperConfirm): NgxHelperConfirmCalss {\n return new NgxHelperConfirmCalss(this.matBottomSheet, this.matDialog, confirm);\n }\n\n active(data: IConfirmData): NgxHelperConfirmCalss;\n active(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;\n active(data: IConfirmData, config?: Partial<IConfirmConfig>): NgxHelperConfirmCalss {\n return this.verify({\n question: `آیا می‌خواهید ${data.title} انتخاب شده را فعال کنید؟`,\n description: config?.description,\n data: data.value ? { title: data.title, value: data.value } : undefined,\n icon: 'check_box',\n confirmClass: config?.confirmClass,\n denyClass: config?.denyClass,\n });\n }\n\n deactive(data: IConfirmData): NgxHelperConfirmCalss;\n deactive(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;\n deactive(data: IConfirmData, config?: Partial<IConfirmConfig>): NgxHelperConfirmCalss {\n return this.verify({\n question: `آیا می‌خواهید ${data.title} انتخاب شده را غیرفعال کنید؟`,\n description: config?.description,\n data: data.value ? { title: data.title, value: data.value } : undefined,\n icon: 'disabled_by_default',\n confirmClass: config?.confirmClass || 'error',\n denyClass: config?.denyClass,\n });\n }\n\n delete(data: IConfirmData): NgxHelperConfirmCalss;\n delete(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;\n delete(data: IConfirmData, config?: Partial<IConfirmConfig>): NgxHelperConfirmCalss {\n return this.verify({\n question: `آیا می‌خواهید ${data.title} انتخاب شده را حذف کنید؟`,\n description: config?.description,\n data: data.value ? { title: data.title, value: data.value } : undefined,\n icon: 'delete',\n confirmClass: config?.confirmClass || 'error',\n denyClass: config?.denyClass,\n });\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface INgxHelperContainerConfig {\n data?: any;\n padding?: string;\n hideClose?: boolean;\n}\n\nexport type NgxHelperContainer = 'DIALOG' | 'BOTTOMSHEET';\n\nexport const NGX_HELPER_CONTAINER_TYPE: InjectionToken<NgxHelperContainer> = new InjectionToken('NGX-HELPER-CONTAINER-TYPE');\nexport const NGX_HELPER_CONTAINER_DATA: InjectionToken<any> = new InjectionToken<any>('NGX-HELPER-CONTAINER-DATA');\nexport const NGX_HELPER_CONTAINER_CLOSE: InjectionToken<(response?: any) => void> = new InjectionToken(\n 'NGX-HELPER-CONTAINER-CLOSE',\n);\n","import { NgComponentOutlet } from '@angular/common';\nimport { Component, inject, Injector, OnInit } from '@angular/core';\nimport { ComponentType } from '@angular/cdk/portal';\n\nimport { MatIconButton } from '@angular/material/button';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { MatIcon } from '@angular/material/icon';\n\nimport {\n INgxHelperContainerConfig,\n NGX_HELPER_CONTAINER_CLOSE,\n NGX_HELPER_CONTAINER_DATA,\n NGX_HELPER_CONTAINER_TYPE,\n} from '../container.interface';\n\n@Component({\n host: { selector: 'container-dialog' },\n imports: [NgComponentOutlet, MatIconButton, MatIcon],\n templateUrl: './container-dialog.component.html',\n styleUrl: './container-dialog.component.scss',\n})\nexport class ContainerDialogComponent implements OnInit {\n public container: {\n component: ComponentType<any>;\n readonly title: string;\n readonly config: INgxHelperContainerConfig;\n } = inject(MAT_DIALOG_DATA);\n\n public injector!: Injector;\n\n constructor(private readonly matDialogRef: MatDialogRef<ContainerDialogComponent>) {}\n\n ngOnInit(): void {\n this.injector = Injector.create({\n providers: [\n { provide: NGX_HELPER_CONTAINER_TYPE, useValue: 'DIALOG' },\n { provide: NGX_HELPER_CONTAINER_DATA, useValue: this.container.config.data },\n {\n provide: NGX_HELPER_CONTAINER_CLOSE,\n useFactory: () => (response?: any) => this.matDialogRef.close(response),\n },\n ],\n });\n }\n\n close(): void {\n this.matDialogRef.close();\n }\n}\n","<header>\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\"><mat-icon>close</mat-icon></button>\n }\n</header>\n<content [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n</content>\n","import { NgComponentOutlet } from '@angular/common';\nimport { Component, inject, Injector, OnInit } from '@angular/core';\nimport { ComponentType } from '@angular/cdk/portal';\n\nimport { MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef } from '@angular/material/bottom-sheet';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\n\nimport {\n INgxHelperContainerConfig,\n NGX_HELPER_CONTAINER_CLOSE,\n NGX_HELPER_CONTAINER_DATA,\n NGX_HELPER_CONTAINER_TYPE,\n} from '../container.interface';\n\n@Component({\n host: { selector: 'container-bottom-sheet' },\n imports: [NgComponentOutlet, MatIconButton, MatIcon],\n templateUrl: './container-bottom-sheet.component.html',\n styleUrl: './container-bottom-sheet.component.scss',\n})\nexport class ContainerBottomSheetComponent implements OnInit {\n public container: {\n component: ComponentType<any>;\n readonly title: string;\n readonly config: INgxHelperContainerConfig;\n } = inject(MAT_BOTTOM_SHEET_DATA);\n\n public injector!: Injector;\n\n constructor(private readonly matBottomSheetRef: MatBottomSheetRef<ContainerBottomSheetComponent>) {}\n\n ngOnInit(): void {\n this.injector = Injector.create({\n providers: [\n { provide: NGX_HELPER_CONTAINER_TYPE, useValue: 'BOTTOMSHEET' },\n { provide: NGX_HELPER_CONTAINER_DATA, useValue: this.container.config.data },\n {\n provide: NGX_HELPER_CONTAINER_CLOSE,\n useFactory: () => (response?: any) => this.matBottomSheetRef.dismiss(response),\n },\n ],\n });\n }\n\n close(): void {\n this.matBottomSheetRef.dismiss();\n }\n}\n","<header>\n <div class=\"title\">{{ container.title }}</div>\n @if (!container.config.hideClose) {\n <button mat-icon-button type=\"button\" (click)=\"close()\"><mat-icon>close</mat-icon></button>\n }\n</header>\n<content>\n <div [style.padding]=\"container.config.padding || '1rem'\">\n <span *ngComponentOutlet=\"container.component; injector: injector\"></span>\n </div>\n</content>\n","import { Injectable } from '@angular/core';\nimport { ComponentType } from '@angular/cdk/portal';\n\nimport { MatBottomSheet, MatBottomSheetConfig } from '@angular/material/bottom-sheet';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\n\nimport { ContainerDialogComponent } from './dialog/container-dialog.component';\nimport { ContainerBottomSheetComponent } from './bottom-sheet/container-bottom-sheet.component';\n\nimport { INgxHelperContainerConfig } from './container.interface';\n\ninterface IContainerData {\n readonly component: ComponentType<any>;\n readonly title: string;\n readonly config: INgxHelperContainerConfig;\n}\n\nclass NgxHelperContainerCalss {\n constructor(\n private readonly matBottomSheet: MatBottomSheet,\n private readonly matDialog: MatDialog,\n private readonly container: IContainerData,\n ) {}\n\n dialog<T>(): void;\n dialog<T>(onResponse: (response: T) => void): void;\n dialog<T>(onResponse: (response: T) => void, onDismiss: () => void): void;\n dialog<T>(onResponse: (response: T) => void, config: MatDialogConfig): void;\n dialog<T>(onResponse: (response: T) => void, onDismiss: () => void, config: MatDialogConfig): void;\n dialog<T>(arg1?: any, arg2?: any, arg3?: any): void {\n const onResponse: ((response: T) => void) | undefined = typeof arg1 === 'function' ? arg1 : undefined;\n const onDismiss: (() => void) | undefined = typeof arg2 === 'function' ? arg2 : undefined;\n const config: MatDialogConfig = arg3 || (typeof arg2 !== 'function' ? arg2 : {});\n\n this.matDialog\n .open(ContainerDialogComponent, {\n // DEFAULT CONFIG\n width: 'calc(100vw - 4rem)',\n direction: 'rtl',\n enterAnimationDuration: '100ms',\n exitAnimationDuration: '100ms',\n // OVERWRITE CONFIG\n ...config,\n maxHeight: '80vh',\n // DATA\n data: this.container,\n })\n .afterClosed()\n .subscribe({\n next: (response?: T) => {\n if (onResponse && !!response) onResponse(response);\n if (onDismiss && !response) onDismiss();\n },\n });\n }\n\n bottomSheet<T>(): void;\n bottomSheet<T>(onResponse: (result: T) => void): void;\n bottomSheet<T>(onResponse: (result: T) => void, onDismiss: () => void): void;\n bottomSheet<T>(onResponse: (result: T) => void, config: MatBottomSheetConfig): void;\n bottomSheet<T>(onResponse: (result: T) => void, onDismiss: () => void, config: MatBottomSheetConfig): void;\n bottomSheet<T>(arg1?: any, arg2?: any, arg3?: any): void {\n const onResponse: ((result: T) => void) | undefined = typeof arg1 === 'function' ? arg1 : undefined;\n const onDismiss: (() => void) | undefined = typeof arg2 === 'function' ? arg2 : undefined;\n const config: MatBottomSheetConfig = arg3 || (typeof arg2 !== 'function' ? arg2 : {});\n\n this.matBottomSheet\n .open<any, any, T>(ContainerBottomSheetComponent, {\n // DEFAULT CONFIG\n direction: 'rtl',\n panelClass: 'ngx-helper-bottom-sheet',\n // OVERWRITE CONFIG\n ...config,\n maxHeight: '80vh',\n // DATA\n data: this.container,\n })\n .afterDismissed()\n .subscribe({\n next: (response?: T) => {\n if (onResponse && !!response) onResponse(response);\n if (onDismiss && !response) onDismiss();\n },\n });\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class NgxHelperContainerService {\n constructor(private readonly matBottomSheet: MatBottomSheet, private readonly matDialog: MatDialog) {}\n\n init(component: ComponentType<any>, title: string): NgxHelperContainerCalss;\n init(component: ComponentType<any>, title: string, config: INgxHelperContainerConfig): NgxHelperContainerCalss;\n init(component: ComponentType<any>, title: string, arg1?: any): NgxHelperContainerCalss {\n const config: INgxHelperContainerConfig = arg1 || {};\n\n return new NgxHelperContainerCalss(this.matBottomSheet, this.matDialog, { component, title, config });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperBankCard' })\nexport class NgxHelperBankCardPipe implements PipeTransform {\n transform(value: string, options?: { view?: 'CARD' | 'BANK'; join?: string }): string {\n if (!Helper.IS.string(value) || value === '') return '';\n\n switch (options?.view) {\n case 'BANK':\n return Helper.BANK.findCard(value)?.title || '';\n default:\n return Helper.STRING.getBankCardView(value, options?.join || '-');\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\nimport { JalaliDateTime } from '@webilix/jalali-date-time';\n\ntype Formats = string | 'FULL' | 'SHORT' | 'DATE' | 'TIME' | 'WEEK' | 'MONTH' | 'YEAR';\n\n@Pipe({ name: 'ngxHelperDate' })\nexport class NgxHelperDatePipe implements PipeTransform {\n transform(value: Date, options?: { format?: Formats; timezone?: string }): string;\n transform(value: number, options?: { format?: Formats; timezone?: string }): string;\n transform(value: any, options?: { format?: Formats; timezone?: string }): string {\n if (!value || (!Helper.IS.date(value) && !Helper.IS.number(value))) return '';\n\n const date: Date = typeof value === 'number' ? new Date(value) : value;\n const jalali = JalaliDateTime();\n const timezone: string =\n options?.timezone && jalali.timezones().includes(options?.timezone) ? options?.timezone : 'Asia/Tehran';\n\n switch (options?.format || 'DATE') {\n case 'FULL':\n return jalali.toFullText(date, { format: 'W، d N Y H:I', timezone });\n\n case 'SHORT':\n return jalali.toFullText(date, { format: 'Y/M/D', timezone });\n\n case 'DATE':\n return jalali.toFullText(date, { format: 'W، d N Y', timezone });\n\n case 'TIME':\n return jalali.toFullText(date, { format: 'H:I', timezone });\n\n case 'WEEK':\n const { from, to } = jalali.periodWeek(1, date, timezone);\n return Helper.DATE.jalaliPeriod(from, to, timezone);\n\n case 'MONTH':\n return jalali.toFullText(date, { format: 'N Y', timezone });\n\n case 'YEAR':\n return jalali.toFullText(date, { format: 'Y', timezone });\n\n default:\n return jalali.toFullText(date, { format: options?.format, timezone });\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\ntype Formats = 'TEXT' | 'FULL' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';\n\n@Pipe({ name: 'ngxHelperDuration' })\nexport class NgxHelperDurationPipe implements PipeTransform {\n transform(value: number, options?: { format?: Formats; english?: boolean }): string;\n transform(value: Date, options?: { format?: Formats; english?: boolean }): string;\n transform(value: { from: Date }, options?: { format?: Formats; english?: boolean }): string;\n transform(value: { to: Date }, options?: { format?: Formats; english?: boolean }): string;\n transform(value: { from: Date; to: Date }, options?: { format?: Formats; english?: boolean }): string;\n transform(value: any, options?: { format?: Formats; english?: boolean }): string {\n let seconds: number = 0;\n if (Helper.IS.number(value)) seconds = Math.abs(value);\n else if (Helper.IS.date(value)) seconds = Math.floor(Math.abs(new Date().getTime() - value.getTime()) / 1000);\n else if (Helper.IS.object(value)) {\n const from: Date = 'from' in value ? value.from : new Date();\n const to: Date = 'to' in value ? value.to : new Date();\n seconds = Math.floor(Math.abs(from.getTime() - to.getTime()) / 1000);\n }\n\n const days: number = Math.floor(seconds / (24 * 60 * 60));\n seconds -= days * (24 * 60 * 60);\n const hours: number = Math.floor(seconds / (60 * 60));\n seconds -= hours * (60 * 60);\n const minutes: number = Math.floor(seconds / 60);\n seconds -= minutes * 60;\n\n const hasDays: boolean = days !== 0;\n const time: string = [hours, minutes, seconds].map((v) => v.toString().padStart(2, '0')).join(':');\n\n switch (options?.format || 'TEXT') {\n case 'TEXT':\n const hasTime: boolean = !!hours || !!minutes || !!seconds;\n const day: string = hasDays\n ? Helper.NUMBER.format(days, 'EN') + (!!options?.english ? (days === 1 ? ' day' : ' days') : ' روز')\n : '';\n const join = hasDays && hasTime ? (!!options?.english ? ', ' : ' و ') : '';\n return (day + join + (!hasDays || hasTime ? time : '')).trim();\n\n case 'FULL':\n return (hasDays ? Helper.NUMBER.format(days, 'EN') + ':' : '') + time;\n\n case 'DAY':\n return Helper.NUMBER.format(days + (hours !== 0 || minutes !== 0 ? 1 : 0), !!options?.english ? 'EN' : 'FA');\n\n case 'HOUR':\n return Helper.NUMBER.format(days * 24 + hours + (minutes !== 0 ? 1 : 0), !!options?.english ? 'EN' : 'FA');\n\n case 'MINUTE':\n return Helper.NUMBER.format(days * 24 * 60 + hours * 60 + minutes, !!options?.english ? 'EN' : 'FA');\n\n case 'SECOND':\n return Helper.NUMBER.format(\n days * 24 * 3600 + hours * 3600 + minutes * 60 + seconds,\n !!options?.english ? 'EN' : 'FA',\n );\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperFileSize' })\nexport class NgxHelperFileSizePipe implements PipeTransform {\n transform(size: number, options?: { english?: boolean }): string {\n return Helper.NUMBER.toFileSize(size, !!options?.english ? 'EN' : 'FA');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperMobile' })\nexport class NgxHelperMobilePipe implements PipeTransform {\n transform(value: string, options?: { join?: string }): string {\n if (!Helper.IS.string(value) || value === '') return '';\n\n return Helper.STRING.getMobileView(value, options?.join || '-');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperMultiLine' })\nexport class NgxHelperMultiLinePipe implements PipeTransform {\n constructor(private readonly sanitizer: DomSanitizer) {}\n\n transform(value: string, options?: { html?: boolean }): string | SafeHtml {\n if (!Helper.IS.string(value) || value === '') return '';\n\n return options?.html\n ? this.sanitizer.bypassSecurityTrustHtml(value.replace(/(?:\\r\\n|\\r|\\n)/g, '<br />'))\n : Helper.STRING.escapeHTML(value).replace(/(?:\\r\\n|\\r|\\n)/g, '<br />');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperNumber' })\nexport class NgxHelperNumberPipe implements PipeTransform {\n transform(value: number, options?: { fractionDigits?: number; english?: boolean }): string {\n if (!Helper.IS.number(value)) return '';\n\n value = options?.fractionDigits ? +value.toFixed(options?.fractionDigits) : value;\n return Helper.NUMBER.format(value, options?.english ? 'EN' : 'FA');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperPeriod' })\nexport class NgxHelperPeriodPipe implements PipeTransform {\n transform(value: Date, options?: { timezone?: string }): string;\n transform(value: { from: Date }, options?: { timezone?: string }): string;\n transform(value: { to: Date }, options?: { timezone?: string }): string;\n transform(value: { from: Date; to: Date }, options?: { timezone?: string }): string;\n transform(value: any, options?: { timezone?: string }): string {\n const from: Date = Helper.IS.date(value) ? value : 'from' in value ? value.from : new Date();\n const to: Date = Helper.IS.date(value) ? new Date() : 'to' in value ? value.to : new Date();\n\n return Helper.DATE.jalaliPeriod(from, to, options?.timezone || '');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperPrice' })\nexport class NgxHelperPricePipe implements PipeTransform {\n transform(value: number, options?: { currency?: string; short?: boolean; english?: boolean }): string {\n if (!Helper.IS.number(value) || value < 0) return '';\n\n const getPrice = (...titles: [string, string][]): string => {\n const price: string = Helper.NUMBER.format(+value.toFixed(2), !!options?.english ? 'EN' : 'FA');\n const unit: string = titles[options?.short ? 0 : 1][options?.english ? 0 : 1];\n const currency: string = options?.currency ? ' ' + options?.currency : '';\n\n return `${price} ${unit}${currency}`;\n };\n\n if (value < 1000) return getPrice(['', ''], ['', '']);\n\n value /= 1000;\n if (value < 1000) return getPrice(['T', 'ه'], ['Thousand', 'هزار']);\n\n value /= 1000;\n if (value < 1000) return getPrice(['M', 'م'], ['Million', 'میلیون']);\n\n value /= 1000;\n return getPrice(['B', 'د'], ['Billion', 'میلیارد']);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from '@angular/platform-browser';\n\nimport { Helper } from '@webilix/helper-library';\n\ntype Types = 'HTML' | 'STYLE' | 'SCRIPT' | 'URL' | 'RESOURCE_URL';\n\n@Pipe({ name: 'ngxHelperSafe' })\nexport class NgxHelperSafePipe implements PipeTransform {\n constructor(private readonly domSanitizer: DomSanitizer) {}\n\n transform(\n value: string,\n options?: { type?: Types },\n ): string | SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {\n if (!Helper.IS.string(value) || value === '') return '';\n\n switch (options?.type || 'HTML') {\n case 'STYLE':\n return this.domSanitizer.bypassSecurityTrustStyle(value);\n case 'SCRIPT':\n return this.domSanitizer.bypassSecurityTrustScript(value);\n case 'URL':\n return this.domSanitizer.bypassSecurityTrustUrl(value);\n case 'RESOURCE_URL':\n return this.domSanitizer.bypassSecurityTrustResourceUrl(value);\n case 'HTML':\n return this.domSanitizer.bypassSecurityTrustHtml(value);\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperVolume' })\nexport class NgxHelperVolumePipe implements PipeTransform {\n transform(value: number, options?: { short?: boolean; english?: boolean }): string {\n if (!Helper.IS.number(value) || value < 0) return '';\n\n const getVolume = (...titles: [string, string][]): string => {\n const volume: string = Helper.NUMBER.format(+value.toFixed(2), options?.english ? 'EN' : 'FA');\n const shortIndex: number = options?.short ? 0 : 1;\n const titleIndex: number = options?.english ? 0 : 1;\n return `${volume} ${titles[shortIndex][titleIndex]}`;\n };\n\n if (value === 0) return getVolume(['', ''], ['', '']);\n\n if (value < 1000) return getVolume(['ML', 'م'], ['Milliliter', 'میلی لیتر']);\n\n value /= 1000;\n return getVolume(['L', 'ل'], ['Liter', 'لیتر']);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Helper } from '@webilix/helper-library';\n\n@Pipe({ name: 'ngxHelperWeight' })\nexport class NgxHelperWeightPipe implements PipeTransform {\n transform(value: number, options?: { short?: boolean; english?: boolean }): string {\n if (!Helper.IS.number(value) || value < 0) return '';\n\n const getWeight = (...titles: [string, string][]): string => {\n const weight: string = Helper.NUMBER.format(+value.toFixed(2), options?.english ? 'EN' : 'FA');\n const shortIndex: number = options?.short ? 0 : 1;\n const titleIndex: number = options?.english ? 0 : 1;\n return `${weight} ${titles[shortIndex][titleIndex]}`;\n };\n\n if (value === 0) return getWeight(['', ''], ['', '']);\n\n if (value < 1000) return getWeight(['G', 'گ'], ['Gram', 'گرم']);\n\n value /= 1000;\n if (value < 1000) return getWeight(['K', 'ک'], ['Kilogram', 'کیلو']);\n\n value /= 1000;\n if (value < 1000) return getWeight(['T', 'ت'], ['Tonne', 'تن']);\n\n value /= 1000;\n return getWeight(['KT', 'ه'], ['Kilotonne', 'هزار تن']);\n }\n}\n","/*\n * Public API Surface of ngx-helper-m3\n */\n\nexport * from './lib/confirm/confirm.interface';\nexport * from './lib/confirm/confirm.service';\n\nexport * from './lib/container/container.interface';\nexport * from './lib/container/container.service';\n\n// PIPES\nexport * from './lib/pipes/bank-card.pipe';\nexport * from './lib/pipes/date.pipe';\nexport * from './lib/pipes/duration.pipe';\nexport * from './lib/pipes/file-size.pipe';\nexport * from './lib/pipes/mobile.pipe';\nexport * from './lib/pipes/multi-line.pipe';\nexport * from './lib/pipes/number.pipe';\nexport * from './lib/pipes/period.pipe';\nexport * from './lib/pipes/price.pipe';\nexport * from './lib/pipes/safe.pipe';\nexport * from './lib/pipes/volume.pipe';\nexport * from './lib/pipes/weight.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;MAea,sBAAsB,CAAA;AACxB,IAAA,OAAO,GAAsB,MAAM,CAAC,eAAe,CAAC;uGADlD,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECfnC,smCA8BA,EDnBc,MAAA,EAAA,CAAA,6UAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,OAAO,mFAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,6GAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,MAAA,EAAA,kBAAA,EAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IA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CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAE/D,KAAK,IAAI,IAAI;AACb,QAAA,OAAO,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;;uGAtBlD,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,IAAI;mBAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE;;;ACJjC;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@webilix/ngx-helper-m3" />
5
+ export * from './public-api';
@@ -0,0 +1,11 @@
1
+ import { MatBottomSheetRef } from '@angular/material/bottom-sheet';
2
+ import { INgxHelperConfirm } from '../confirm.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ConfirmBottomSheetComponent {
5
+ private readonly matBottomSheetRef;
6
+ confirm: INgxHelperConfirm;
7
+ constructor(matBottomSheetRef: MatBottomSheetRef<ConfirmBottomSheetComponent>);
8
+ close(confirmed?: boolean): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmBottomSheetComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmBottomSheetComponent, "ng-component", never, {}, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,11 @@
1
+ export interface INgxHelperConfirm {
2
+ readonly question: string;
3
+ readonly description?: string;
4
+ readonly data?: {
5
+ readonly title: string;
6
+ readonly value: string;
7
+ };
8
+ readonly icon?: string;
9
+ readonly confirmClass?: string;
10
+ readonly denyClass?: string;
11
+ }
@@ -0,0 +1,42 @@
1
+ import { MatBottomSheet, MatBottomSheetConfig } from '@angular/material/bottom-sheet';
2
+ import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
3
+ import { INgxHelperConfirm } from './confirm.interface';
4
+ import * as i0 from "@angular/core";
5
+ interface IConfirmData {
6
+ readonly title: string;
7
+ readonly value?: string;
8
+ }
9
+ interface IConfirmConfig {
10
+ readonly description: string;
11
+ readonly confirmClass: string;
12
+ readonly denyClass: string;
13
+ }
14
+ declare class NgxHelperConfirmCalss {
15
+ private readonly matBottomSheet;
16
+ private readonly matDialog;
17
+ private readonly confirm;
18
+ constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog, confirm: INgxHelperConfirm);
19
+ dialog(onConfirmed: () => void): void;
20
+ dialog(onConfirmed: () => void, onDenied: () => void): void;
21
+ dialog(onConfirmed: () => void, config: MatDialogConfig): void;
22
+ dialog(onConfirmed: () => void, onDenied: () => void, config: MatDialogConfig): void;
23
+ bottomSheet(onConfirmed: () => void): void;
24
+ bottomSheet(onConfirmed: () => void, onDenied: () => void): void;
25
+ bottomSheet(onConfirmed: () => void, config: MatBottomSheetConfig): void;
26
+ bottomSheet(onConfirmed: () => void, onDenied: () => void, config: MatBottomSheetConfig): void;
27
+ }
28
+ export declare class NgxHelperConfirmService {
29
+ private readonly matBottomSheet;
30
+ private readonly matDialog;
31
+ constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog);
32
+ verify(confirm: INgxHelperConfirm): NgxHelperConfirmCalss;
33
+ active(data: IConfirmData): NgxHelperConfirmCalss;
34
+ active(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;
35
+ deactive(data: IConfirmData): NgxHelperConfirmCalss;
36
+ deactive(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;
37
+ delete(data: IConfirmData): NgxHelperConfirmCalss;
38
+ delete(data: IConfirmData, config: Partial<IConfirmConfig>): NgxHelperConfirmCalss;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperConfirmService, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperConfirmService>;
41
+ }
42
+ export {};
@@ -0,0 +1,7 @@
1
+ import { INgxHelperConfirm } from '../confirm.interface';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ConfirmDialogComponent {
4
+ confirm: INgxHelperConfirm;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmDialogComponent, "ng-component", never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,19 @@
1
+ import { Injector, OnInit } from '@angular/core';
2
+ import { ComponentType } from '@angular/cdk/portal';
3
+ import { MatBottomSheetRef } from '@angular/material/bottom-sheet';
4
+ import { INgxHelperContainerConfig } from '../container.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ContainerBottomSheetComponent implements OnInit {
7
+ private readonly matBottomSheetRef;
8
+ container: {
9
+ component: ComponentType<any>;
10
+ readonly title: string;
11
+ readonly config: INgxHelperContainerConfig;
12
+ };
13
+ injector: Injector;
14
+ constructor(matBottomSheetRef: MatBottomSheetRef<ContainerBottomSheetComponent>);
15
+ ngOnInit(): void;
16
+ close(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContainerBottomSheetComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContainerBottomSheetComponent, "ng-component", never, {}, {}, never, never, true, never>;
19
+ }
@@ -0,0 +1,10 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface INgxHelperContainerConfig {
3
+ data?: any;
4
+ padding?: string;
5
+ hideClose?: boolean;
6
+ }
7
+ export type NgxHelperContainer = 'DIALOG' | 'BOTTOMSHEET';
8
+ export declare const NGX_HELPER_CONTAINER_TYPE: InjectionToken<NgxHelperContainer>;
9
+ export declare const NGX_HELPER_CONTAINER_DATA: InjectionToken<any>;
10
+ export declare const NGX_HELPER_CONTAINER_CLOSE: InjectionToken<(response?: any) => void>;
@@ -0,0 +1,36 @@
1
+ import { ComponentType } from '@angular/cdk/portal';
2
+ import { MatBottomSheet, MatBottomSheetConfig } from '@angular/material/bottom-sheet';
3
+ import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
4
+ import { INgxHelperContainerConfig } from './container.interface';
5
+ import * as i0 from "@angular/core";
6
+ interface IContainerData {
7
+ readonly component: ComponentType<any>;
8
+ readonly title: string;
9
+ readonly config: INgxHelperContainerConfig;
10
+ }
11
+ declare class NgxHelperContainerCalss {
12
+ private readonly matBottomSheet;
13
+ private readonly matDialog;
14
+ private readonly container;
15
+ constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog, container: IContainerData);
16
+ dialog<T>(): void;
17
+ dialog<T>(onResponse: (response: T) => void): void;
18
+ dialog<T>(onResponse: (response: T) => void, onDismiss: () => void): void;
19
+ dialog<T>(onResponse: (response: T) => void, config: MatDialogConfig): void;
20
+ dialog<T>(onResponse: (response: T) => void, onDismiss: () => void, config: MatDialogConfig): void;
21
+ bottomSheet<T>(): void;
22
+ bottomSheet<T>(onResponse: (result: T) => void): void;
23
+ bottomSheet<T>(onResponse: (result: T) => void, onDismiss: () => void): void;
24
+ bottomSheet<T>(onResponse: (result: T) => void, config: MatBottomSheetConfig): void;
25
+ bottomSheet<T>(onResponse: (result: T) => void, onDismiss: () => void, config: MatBottomSheetConfig): void;
26
+ }
27
+ export declare class NgxHelperContainerService {
28
+ private readonly matBottomSheet;
29
+ private readonly matDialog;
30
+ constructor(matBottomSheet: MatBottomSheet, matDialog: MatDialog);
31
+ init(component: ComponentType<any>, title: string): NgxHelperContainerCalss;
32
+ init(component: ComponentType<any>, title: string, config: INgxHelperContainerConfig): NgxHelperContainerCalss;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperContainerService, never>;
34
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperContainerService>;
35
+ }
36
+ export {};
@@ -0,0 +1,19 @@
1
+ import { Injector, OnInit } from '@angular/core';
2
+ import { ComponentType } from '@angular/cdk/portal';
3
+ import { MatDialogRef } from '@angular/material/dialog';
4
+ import { INgxHelperContainerConfig } from '../container.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ContainerDialogComponent implements OnInit {
7
+ private readonly matDialogRef;
8
+ container: {
9
+ component: ComponentType<any>;
10
+ readonly title: string;
11
+ readonly config: INgxHelperContainerConfig;
12
+ };
13
+ injector: Injector;
14
+ constructor(matDialogRef: MatDialogRef<ContainerDialogComponent>);
15
+ ngOnInit(): void;
16
+ close(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContainerDialogComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContainerDialogComponent, "ng-component", never, {}, {}, never, never, true, never>;
19
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperBankCardPipe implements PipeTransform {
4
+ transform(value: string, options?: {
5
+ view?: 'CARD' | 'BANK';
6
+ join?: string;
7
+ }): string;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperBankCardPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperBankCardPipe, "ngxHelperBankCard", true>;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ type Formats = string | 'FULL' | 'SHORT' | 'DATE' | 'TIME' | 'WEEK' | 'MONTH' | 'YEAR';
4
+ export declare class NgxHelperDatePipe implements PipeTransform {
5
+ transform(value: Date, options?: {
6
+ format?: Formats;
7
+ timezone?: string;
8
+ }): string;
9
+ transform(value: number, options?: {
10
+ format?: Formats;
11
+ timezone?: string;
12
+ }): string;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperDatePipe, never>;
14
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperDatePipe, "ngxHelperDate", true>;
15
+ }
16
+ export {};
@@ -0,0 +1,35 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ type Formats = 'TEXT' | 'FULL' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
4
+ export declare class NgxHelperDurationPipe implements PipeTransform {
5
+ transform(value: number, options?: {
6
+ format?: Formats;
7
+ english?: boolean;
8
+ }): string;
9
+ transform(value: Date, options?: {
10
+ format?: Formats;
11
+ english?: boolean;
12
+ }): string;
13
+ transform(value: {
14
+ from: Date;
15
+ }, options?: {
16
+ format?: Formats;
17
+ english?: boolean;
18
+ }): string;
19
+ transform(value: {
20
+ to: Date;
21
+ }, options?: {
22
+ format?: Formats;
23
+ english?: boolean;
24
+ }): string;
25
+ transform(value: {
26
+ from: Date;
27
+ to: Date;
28
+ }, options?: {
29
+ format?: Formats;
30
+ english?: boolean;
31
+ }): string;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperDurationPipe, never>;
33
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperDurationPipe, "ngxHelperDuration", true>;
34
+ }
35
+ export {};
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperFileSizePipe implements PipeTransform {
4
+ transform(size: number, options?: {
5
+ english?: boolean;
6
+ }): string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperFileSizePipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperFileSizePipe, "ngxHelperFileSize", true>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperMobilePipe implements PipeTransform {
4
+ transform(value: string, options?: {
5
+ join?: string;
6
+ }): string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperMobilePipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperMobilePipe, "ngxHelperMobile", true>;
9
+ }
@@ -0,0 +1,12 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NgxHelperMultiLinePipe implements PipeTransform {
5
+ private readonly sanitizer;
6
+ constructor(sanitizer: DomSanitizer);
7
+ transform(value: string, options?: {
8
+ html?: boolean;
9
+ }): string | SafeHtml;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperMultiLinePipe, never>;
11
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperMultiLinePipe, "ngxHelperMultiLine", true>;
12
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperNumberPipe implements PipeTransform {
4
+ transform(value: number, options?: {
5
+ fractionDigits?: number;
6
+ english?: boolean;
7
+ }): string;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperNumberPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperNumberPipe, "ngxHelperNumber", true>;
10
+ }
@@ -0,0 +1,25 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperPeriodPipe implements PipeTransform {
4
+ transform(value: Date, options?: {
5
+ timezone?: string;
6
+ }): string;
7
+ transform(value: {
8
+ from: Date;
9
+ }, options?: {
10
+ timezone?: string;
11
+ }): string;
12
+ transform(value: {
13
+ to: Date;
14
+ }, options?: {
15
+ timezone?: string;
16
+ }): string;
17
+ transform(value: {
18
+ from: Date;
19
+ to: Date;
20
+ }, options?: {
21
+ timezone?: string;
22
+ }): string;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperPeriodPipe, never>;
24
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperPeriodPipe, "ngxHelperPeriod", true>;
25
+ }
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperPricePipe implements PipeTransform {
4
+ transform(value: number, options?: {
5
+ currency?: string;
6
+ short?: boolean;
7
+ english?: boolean;
8
+ }): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperPricePipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperPricePipe, "ngxHelperPrice", true>;
11
+ }
@@ -0,0 +1,14 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ type Types = 'HTML' | 'STYLE' | 'SCRIPT' | 'URL' | 'RESOURCE_URL';
5
+ export declare class NgxHelperSafePipe implements PipeTransform {
6
+ private readonly domSanitizer;
7
+ constructor(domSanitizer: DomSanitizer);
8
+ transform(value: string, options?: {
9
+ type?: Types;
10
+ }): string | SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperSafePipe, never>;
12
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperSafePipe, "ngxHelperSafe", true>;
13
+ }
14
+ export {};
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperVolumePipe implements PipeTransform {
4
+ transform(value: number, options?: {
5
+ short?: boolean;
6
+ english?: boolean;
7
+ }): string;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperVolumePipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperVolumePipe, "ngxHelperVolume", true>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgxHelperWeightPipe implements PipeTransform {
4
+ transform(value: number, options?: {
5
+ short?: boolean;
6
+ english?: boolean;
7
+ }): string;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperWeightPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<NgxHelperWeightPipe, "ngxHelperWeight", true>;
10
+ }
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@webilix/ngx-helper-m3",
3
+ "version": "0.0.1",
4
+ "author": "Ali Amirnezhad",
5
+ "description": "Helper library for Angular and Material 3",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/webilix/ngx-helper-m3.git"
9
+ },
10
+ "keywords": [
11
+ "angular",
12
+ "helper",
13
+ "persian",
14
+ "farsi",
15
+ "material 3"
16
+ ],
17
+ "license": "MIT",
18
+ "bugs": {
19
+ "url": "https://github.com/webilix/ngx-helper-m3/issues"
20
+ },
21
+ "homepage": "https://github.com/webilix/ngx-helper-m3#readme",
22
+ "peerDependencies": {
23
+ "@angular/common": ">=19.0.0",
24
+ "@angular/core": ">=19.0.0",
25
+ "@angular/material": ">=19.0.1",
26
+ "@webilix/helper-library": ">=6.0.2",
27
+ "@webilix/jalali-date-time": ">=2.0.5"
28
+ },
29
+ "dependencies": {
30
+ "tslib": "^2.3.0"
31
+ },
32
+ "sideEffects": false,
33
+ "module": "fesm2022/webilix-ngx-helper-m3.mjs",
34
+ "typings": "index.d.ts",
35
+ "exports": {
36
+ "./package.json": {
37
+ "default": "./package.json"
38
+ },
39
+ ".": {
40
+ "types": "./index.d.ts",
41
+ "default": "./fesm2022/webilix-ngx-helper-m3.mjs"
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,16 @@
1
+ export * from './lib/confirm/confirm.interface';
2
+ export * from './lib/confirm/confirm.service';
3
+ export * from './lib/container/container.interface';
4
+ export * from './lib/container/container.service';
5
+ export * from './lib/pipes/bank-card.pipe';
6
+ export * from './lib/pipes/date.pipe';
7
+ export * from './lib/pipes/duration.pipe';
8
+ export * from './lib/pipes/file-size.pipe';
9
+ export * from './lib/pipes/mobile.pipe';
10
+ export * from './lib/pipes/multi-line.pipe';
11
+ export * from './lib/pipes/number.pipe';
12
+ export * from './lib/pipes/period.pipe';
13
+ export * from './lib/pipes/price.pipe';
14
+ export * from './lib/pipes/safe.pipe';
15
+ export * from './lib/pipes/volume.pipe';
16
+ export * from './lib/pipes/weight.pipe';