@smartsoft001/angular 2.89.0 → 2.90.0

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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ModelSignal, ComponentFactory, InjectionToken, Type, NgModuleRef, ElementRef, ViewContainerRef, Injector, OnDestroy, AfterContentInit, ChangeDetectorRef, Signal, InputSignal, ComponentRef, WritableSignal, TemplateRef, OnInit, Renderer2, AfterViewInit, OutputEmitterRef, OnChanges, SimpleChange, PipeTransform, NgModule } from '@angular/core';
2
+ import { Type, Signal, InjectionToken, WritableSignal, PipeTransform, ComponentFactory, NgModuleRef, ElementRef, ViewContainerRef, Injector, ModelSignal, OnDestroy, AfterContentInit, ChangeDetectorRef, InputSignal, ComponentRef, TemplateRef, OnInit, Renderer2, AfterViewInit, OutputEmitterRef, OnChanges, SimpleChange, NgModule } from '@angular/core';
3
3
  import * as i2$1 from '@angular/forms';
4
- import { UntypedFormGroup, ValidatorFn, AsyncValidatorFn, UntypedFormControl, UntypedFormArray, ControlValueAccessor, AbstractControl } from '@angular/forms';
4
+ import { ValidatorFn, AsyncValidatorFn, UntypedFormControl, UntypedFormArray, AbstractControl, UntypedFormGroup, ControlValueAccessor } from '@angular/forms';
5
5
  import * as rxjs from 'rxjs';
6
6
  import { Observable, MonoTypeOperatorFunction, Subject, Subscription } from 'rxjs';
7
7
  import { IEntity, IAddress, IDateRange } from '@smartsoft001/domain-core';
@@ -28,21 +28,303 @@ import * as i7 from '@angular/common/http';
28
28
  import * as i8 from 'ng-lazyload-image';
29
29
  import * as i2$2 from '@ngrx/effects';
30
30
 
31
- declare class AccordionComponent {
32
- show: ModelSignal<boolean>;
33
- update(): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<AccordionComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<AccordionComponent, "smart-accordion", never, { "show": { "alias": "show"; "required": false; "isSignal": true; }; }, { "show": "showChange"; }, never, ["smart-accordion-header", "smart-accordion-body"], true, never>;
31
+ /**
32
+ * Forward declaration for InputBaseComponent to break circular dependency.
33
+ * This is a placeholder type that will be properly typed when imported from components.
34
+ */
35
+ type InputBaseComponentType<T = any> = Type<any>;
36
+
37
+ interface IFormProvider {
38
+ submit(): void;
39
+ }
40
+ interface IAppProvider {
41
+ logged: Signal<boolean>;
42
+ username: Signal<string>;
43
+ logout: () => void;
44
+ }
45
+
46
+ declare abstract class IModelExportProvider {
47
+ abstract execute(type: Type<any>, value: any): void;
48
+ }
49
+ declare const MODEL_EXPORT_PROVIDER: InjectionToken<IModelExportProvider>;
50
+
51
+ declare abstract class IModelImportProvider {
52
+ abstract getAccept(type: Type<any>): Promise<string>;
53
+ abstract convert(type: Type<any>, file: File): Promise<any>;
54
+ }
55
+ declare const MODEL_IMPORT_PROVIDER: InjectionToken<IModelImportProvider>;
56
+
57
+ declare abstract class IModelLabelProvider {
58
+ abstract get(options: IModelLabelOptions): Signal<string>;
59
+ }
60
+ interface IModelLabelOptions {
61
+ key: string;
62
+ instance?: any;
63
+ type?: Type<any>;
64
+ }
65
+ declare const MODEL_LABEL_PROVIDER: InjectionToken<IModelLabelOptions>;
66
+
67
+ declare abstract class IModelPossibilitiesProvider {
68
+ abstract get(options: IModelPossibilitiesOptions): WritableSignal<{
69
+ id: any;
70
+ text: string;
71
+ checked: boolean;
72
+ }[]>;
73
+ }
74
+ interface IModelPossibilitiesOptions {
75
+ key: string;
76
+ instance: any;
77
+ type?: Type<any>;
78
+ }
79
+ declare const MODEL_POSSIBILITIES_PROVIDER: InjectionToken<IModelPossibilitiesProvider>;
80
+
81
+ /**
82
+ * @example
83
+ *
84
+ * in module:
85
+ @NgModule({
86
+ providers: [
87
+ ...
88
+ {
89
+ provide: MODEL_VALIDATORS_PROVIDER,
90
+ useClass: ModelValidatorsProvider
91
+ }
92
+ ],
93
+ *
94
+ * provider:
95
+ * @Injectable()
96
+ export class ModelValidatorsProvider extends IModelValidatorsProvider {
97
+ async get(options: IModelValidatorsOptions): Promise<IModelValidators> {
98
+ if (options.type === Todo && options.key === 'test') {
99
+ return {
100
+ validators: null,
101
+ asyncValidators: null
102
+ }
103
+ }
104
+
105
+ if (options.type === Todo && options.key === 'number') {
106
+ return {
107
+ validators: [ Validators.required ],
108
+ asyncValidators: null
109
+ }
110
+ }
111
+
112
+ return Promise.resolve(options.base);
113
+ }
114
+ }
115
+ */
116
+ declare abstract class IModelValidatorsProvider {
117
+ abstract get(options: IModelValidatorsOptions): Promise<IModelValidators>;
118
+ }
119
+ interface IModelValidatorsOptions {
120
+ key: string;
121
+ instance: any;
122
+ type?: Type<any> | (() => void);
123
+ base?: IModelValidators;
124
+ }
125
+ interface IModelValidators {
126
+ validators?: ValidatorFn | ValidatorFn[];
127
+ asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[];
128
+ }
129
+ declare const MODEL_VALIDATORS_PROVIDER: InjectionToken<IModelValidatorsProvider>;
130
+
131
+ type IStyle = Record<string, string | undefined>;
132
+ type StyleType = 'color-primary' | 'color-primary-rgb' | 'color-primary-contrast' | 'color-primary-contrast-rgb' | 'color-primary-shade' | 'color-primary-tint' | 'color-secondary' | 'color-secondary-rgb' | 'color-secondary-contrast' | 'color-secondary-contrast-rgb' | 'color-secondary-shade' | 'color-secondary-tint' | 'color-tertiary' | 'color-tertiary-rgb' | 'color-tertiary-contrast' | 'color-tertiary-contrast-rgb' | 'color-tertiary-shade' | 'color-tertiary-tint' | 'color-success' | 'color-success-rgb' | 'color-success-contrast' | 'color-success-contrast-rgb' | 'color-success-shade' | 'color-success-tint' | 'color-warning' | 'color-warning-rgb' | 'color-warning-contrast' | 'color-warning-contrast-rgb' | 'color-warning-shade' | 'color-warning-tint' | 'color-danger' | 'color-danger-rgb' | 'color-danger-contrast' | 'color-danger-contrast-rgb' | 'color-danger-shade' | 'color-danger-tint' | 'color-dark' | 'color-dark-rgb' | 'color-dark-contrast' | 'color-dark-contrast-rgb' | 'color-dark-shade' | 'color-dark-tint' | 'color-medium' | 'color-medium-rgb' | 'color-medium-contrast' | 'color-medium-contrast-rgb' | 'color-medium-shade' | 'color-medium-tint' | 'color-light' | 'color-light-rgb' | 'color-light-contrast' | 'color-light-contrast-rgb' | 'color-light-shade' | 'color-light-tint' | 'font' | 'font-weight' | 'font-style' | 'ios-font' | 'ios-font-weight' | 'ios-font-style' | 'md-font' | 'md-font-weight' | 'md-font-style' | 'button-height' | 'button-min-width' | 'button-padding-right' | 'button-padding-left' | 'button-padding-top' | 'button-padding-bottom' | 'button-icon-size' | 'phone-breakpoint' | 'tablet-breakpoint';
133
+
134
+ interface IAppOptions {
135
+ provider: IAppProvider;
136
+ logo?: string;
137
+ menu?: {
138
+ showForAnonymous?: boolean;
139
+ items?: IMenuItem[];
140
+ };
141
+ style?: IStyle;
142
+ }
143
+ interface ICardOptions {
144
+ title?: string;
145
+ buttons?: Array<IIconButtonOptions>;
146
+ }
147
+ interface IIconButtonOptions {
148
+ icon: string;
149
+ text?: string;
150
+ handler?: () => void;
151
+ component?: any;
152
+ type?: 'default' | 'popover';
153
+ disabled$?: Observable<boolean>;
154
+ number?: number;
155
+ }
156
+ type DynamicComponentType = 'form' | 'page' | 'button' | 'details' | 'list' | 'crud-list-page' | 'crud-item-page';
157
+ interface IDynamicComponentData {
158
+ key: DynamicComponentType;
159
+ component: Type<any>;
160
+ data?: any;
161
+ }
162
+ interface IFormOptions<T> {
163
+ model: T;
164
+ show: boolean;
165
+ treeLevel?: number;
166
+ control?: AbstractControl;
167
+ mode?: 'create' | 'update' | string;
168
+ loading$?: Observable<boolean>;
169
+ uniqueProvider?: (values: Record<keyof T, any>) => Promise<boolean>;
170
+ possibilities?: {
171
+ [key: string]: WritableSignal<{
172
+ id: any;
173
+ text: string;
174
+ checked: boolean;
175
+ }[]>;
176
+ };
177
+ inputComponents?: {
178
+ [key: string]: InputBaseComponentType<T>;
179
+ };
180
+ fieldOptions?: IFieldOptions;
181
+ modelOptions?: IModelOptions;
182
+ }
183
+ type InputOptions<T> = IInputOptions & IInputFromFieldOptions<T>;
184
+ interface IInputOptions {
185
+ treeLevel: number;
186
+ control: UntypedFormControl | UntypedFormArray;
187
+ possibilities?: WritableSignal<{
188
+ id: any;
189
+ text: string;
190
+ checked: boolean;
191
+ }[]>;
192
+ component?: InputBaseComponentType<any>;
193
+ }
194
+ interface IInputFromFieldOptions<T> {
195
+ model: T;
196
+ fieldKey: string;
197
+ mode?: 'create' | 'update' | string;
198
+ }
199
+ interface IDetailsComponentFactories<T> {
200
+ top?: ComponentFactory<any>;
201
+ bottom?: ComponentFactory<any>;
202
+ }
203
+ interface IDetailsOptions<T extends IEntity<string>> {
204
+ title?: string;
205
+ cellPipe?: ICellPipe<T>;
206
+ type: any;
207
+ item: Signal<T>;
208
+ loading?: Signal<boolean>;
209
+ itemHandler?: ((id: string) => void) | null;
210
+ removeHandler?: ((item: T) => void) | null;
211
+ componentFactories?: IDetailsComponentFactories<T>;
212
+ }
213
+ interface IMenuItem {
214
+ mode?: 'divider' | 'default';
215
+ route?: string;
216
+ click?: (arg0: IMenuItem) => void;
217
+ caption?: string;
218
+ component?: any;
219
+ icon?: string;
220
+ infos?: Array<{
221
+ text: string;
222
+ }>;
223
+ }
224
+ interface IButtonOptions {
225
+ type?: 'submit' | 'button';
226
+ expand?: 'block' | 'full' | undefined;
227
+ confirm?: boolean;
228
+ color?: 'primary' | 'light' | string;
229
+ click: () => void;
230
+ loading?: Signal<boolean>;
231
+ }
232
+ interface IDetailOptions<T> {
233
+ key: string;
234
+ item?: Signal<T>;
235
+ options: IFieldOptions;
236
+ cellPipe?: ICellPipe<T>;
237
+ loading?: Signal<boolean>;
238
+ }
239
+ interface ICellPipe<T> extends PipeTransform {
240
+ transform(value: T, columnName: string, translate?: (val: string) => string): string;
241
+ }
242
+ interface IPageOptions {
243
+ title: string;
244
+ hideHeader?: boolean;
245
+ hideMenuButton?: boolean;
246
+ showBackButton?: boolean;
247
+ endButtons?: Array<IIconButtonOptions>;
248
+ search?: {
249
+ text: Signal<string>;
250
+ set: (txt: string) => void;
251
+ };
252
+ }
253
+ interface IListProvider<T> {
254
+ getData: (filter: any) => void;
255
+ onChangeMultiSelected?: (list: Array<T>) => void;
256
+ onCleanMultiSelected$?: Observable<void>;
257
+ list: Signal<T[]>;
258
+ loading: Signal<boolean>;
259
+ }
260
+ interface IListPaginationOptions {
261
+ mode?: PaginationMode;
262
+ limit: number;
263
+ loadNextPage: () => Promise<boolean>;
264
+ loadPrevPage: () => Promise<boolean>;
265
+ page: Signal<number>;
266
+ totalPages: Signal<number>;
267
+ }
268
+ declare enum PaginationMode {
269
+ infiniteScroll = "infiniteScroll",
270
+ singlePage = "singlePage"
271
+ }
272
+ declare enum ListMode {
273
+ mobile = "mobile",
274
+ desktop = "desktop",
275
+ masonryGrid = "masonryGrid"
276
+ }
277
+ interface IItemOptionsForPage {
278
+ routingPrefix: string;
279
+ edit: boolean;
280
+ }
281
+ interface IItemOptionsForCustom {
282
+ select: (id: string) => void;
283
+ edit: boolean;
284
+ }
285
+ type ItemOptions = IItemOptionsForPage | IItemOptionsForCustom;
286
+ interface IListComponentFactories<T> {
287
+ top?: ComponentFactory<any>;
288
+ }
289
+ interface IDetailsProvider<T> {
290
+ getData: (id: string) => void;
291
+ clearData: () => void;
292
+ item: Signal<T>;
293
+ loading: Signal<boolean>;
294
+ }
295
+ interface IListOptions<T> {
296
+ provider: IListProvider<T>;
297
+ type: any;
298
+ mode?: ListMode;
299
+ pagination?: IListPaginationOptions;
300
+ cellPipe?: ICellPipe<T>;
301
+ componentFactories?: IListComponentFactories<T>;
302
+ sort?: boolean | {
303
+ default?: string;
304
+ defaultDesc?: boolean;
305
+ };
306
+ details?: boolean | {
307
+ provider?: IDetailsProvider<T>;
308
+ componentFactories?: IDetailsComponentFactories<T>;
309
+ component?: Type<any>;
310
+ };
311
+ item?: boolean | {
312
+ options?: ItemOptions;
313
+ };
314
+ remove?: boolean | {
315
+ provider?: IRemoveProvider<T>;
316
+ };
317
+ select?: 'multi';
36
318
  }
37
-
38
- declare class AccordionBodyComponent {
39
- static ɵfac: i0.ɵɵFactoryDeclaration<AccordionBodyComponent, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<AccordionBodyComponent, "smart-accordion-body", never, {}, {}, never, ["*"], true, never>;
319
+ interface IRemoveProvider<T> {
320
+ invoke: (id: string) => void;
321
+ check?: (item: T) => boolean;
41
322
  }
42
-
43
- declare class AccordionHeaderComponent {
44
- static ɵfac: i0.ɵɵFactoryDeclaration<AccordionHeaderComponent, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<AccordionHeaderComponent, "smart-accordion-header", never, {}, {}, never, ["*"], true, never>;
323
+ interface IListInternalOptions<T> extends IListOptions<T> {
324
+ fields?: Array<{
325
+ key: string;
326
+ options: IFieldOptions;
327
+ }>;
46
328
  }
47
329
 
48
330
  declare class AppService {
@@ -168,8 +450,6 @@ declare class SmartFormGroup extends UntypedFormGroup {
168
450
  setForm(form: UntypedFormGroup): void;
169
451
  }
170
452
 
171
- type IStyle = Record<string, string | undefined>;
172
-
173
453
  declare class StyleService {
174
454
  private platformId;
175
455
  static style: IStyle | null;
@@ -338,6 +618,109 @@ declare class ErrorService {
338
618
  static ɵprov: i0.ɵɵInjectableDeclaration<ErrorService>;
339
619
  }
340
620
 
621
+ declare class DynamicContentDirective {
622
+ container: ViewContainerRef;
623
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentDirective, never>;
624
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicContentDirective, ".dynamic-content", never, {}, {}, never, never, true, never>;
625
+ }
626
+
627
+ declare class DetailsDirective {
628
+ private modalService;
629
+ private hardwareService;
630
+ options: i0.InputSignal<{
631
+ component: any;
632
+ params: any;
633
+ mode?: "bottom" | "default";
634
+ }>;
635
+ smartDetailsShowed: i0.OutputEmitterRef<void>;
636
+ smartDetailsDismissed: i0.OutputEmitterRef<void>;
637
+ click(): Promise<void>;
638
+ static ɵfac: i0.ɵɵFactoryDeclaration<DetailsDirective, never>;
639
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DetailsDirective, "[smartDetails]", never, { "options": { "alias": "smartDetails"; "required": true; "isSignal": true; }; }, { "smartDetailsShowed": "smartDetailsShowed"; "smartDetailsDismissed": "smartDetailsDismissed"; }, never, never, true, never>;
640
+ }
641
+
642
+ declare class SharedDirectivesModule {
643
+ static ɵfac: i0.ɵɵFactoryDeclaration<SharedDirectivesModule, never>;
644
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedDirectivesModule, never, [typeof SharedServicesModule, typeof DynamicContentDirective], [typeof DynamicContentDirective]>;
645
+ static ɵinj: i0.ɵɵInjectorDeclaration<SharedDirectivesModule>;
646
+ }
647
+
648
+ declare class ModelLabelPipe<T> implements PipeTransform {
649
+ private translateService;
650
+ private modelLabelProvider;
651
+ transform(instance: T, key: string, type?: Type<any> | (() => void)): string;
652
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModelLabelPipe<any>, never>;
653
+ static ɵpipe: i0.ɵɵPipeDeclaration<ModelLabelPipe<any>, "smartModelLabel", true>;
654
+ }
655
+
656
+ declare class ListCellPipe<T extends {
657
+ [key: string]: any;
658
+ }> implements PipeTransform {
659
+ private readonly translateService;
660
+ transform(obj: T, key: string, pipe: ICellPipe<T>, type?: Type<T>): {
661
+ value?: any;
662
+ type?: FieldTypeDef | null;
663
+ };
664
+ private getFieldType;
665
+ private getValue;
666
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListCellPipe<any>, never>;
667
+ static ɵpipe: i0.ɵɵPipeDeclaration<ListCellPipe<any>, "smartListCell", true>;
668
+ }
669
+
670
+ declare class TrustHtmlPipe implements PipeTransform {
671
+ private sanitizer;
672
+ transform(val: string): SafeHtml;
673
+ static ɵfac: i0.ɵɵFactoryDeclaration<TrustHtmlPipe, never>;
674
+ static ɵpipe: i0.ɵɵPipeDeclaration<TrustHtmlPipe, "smartTrustHtml", true>;
675
+ }
676
+
677
+ declare class ListHeaderPipe<T> implements PipeTransform {
678
+ private translateService;
679
+ private modelLabelProvider;
680
+ transform(data: T, key: string, type?: Type<any>): Signal<string>;
681
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListHeaderPipe<any>, never>;
682
+ static ɵpipe: i0.ɵɵPipeDeclaration<ListHeaderPipe<any>, "smartListHeader", true>;
683
+ }
684
+
685
+ declare class FileUrlPipe implements PipeTransform {
686
+ private service;
687
+ transform(file: {
688
+ id: any;
689
+ }): string;
690
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUrlPipe, never>;
691
+ static ɵpipe: i0.ɵɵPipeDeclaration<FileUrlPipe, "smartFileUrl", true>;
692
+ }
693
+
694
+ declare class EnumToListPipe implements PipeTransform {
695
+ transform(value: any): Array<string>;
696
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnumToListPipe, never>;
697
+ static ɵpipe: i0.ɵɵPipeDeclaration<EnumToListPipe, "smartEnumToList", true>;
698
+ }
699
+
700
+ declare const PIPES: (typeof ModelLabelPipe | typeof ListCellPipe | typeof TrustHtmlPipe | typeof ListHeaderPipe | typeof EnumToListPipe)[];
701
+ declare class SharedPipesModule {
702
+ static ɵfac: i0.ɵɵFactoryDeclaration<SharedPipesModule, never>;
703
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, never, [typeof ModelLabelPipe, typeof ListCellPipe, typeof TrustHtmlPipe, typeof ListHeaderPipe, typeof EnumToListPipe], [typeof ModelLabelPipe, typeof ListCellPipe, typeof TrustHtmlPipe, typeof ListHeaderPipe, typeof EnumToListPipe]>;
704
+ static ɵinj: i0.ɵɵInjectorDeclaration<SharedPipesModule>;
705
+ }
706
+
707
+ declare class AccordionComponent {
708
+ show: ModelSignal<boolean>;
709
+ update(): void;
710
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionComponent, never>;
711
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionComponent, "smart-accordion", never, { "show": { "alias": "show"; "required": false; "isSignal": true; }; }, { "show": "showChange"; }, never, ["smart-accordion-header", "smart-accordion-body"], true, never>;
712
+ }
713
+
714
+ declare class AccordionBodyComponent {
715
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionBodyComponent, never>;
716
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionBodyComponent, "smart-accordion-body", never, {}, {}, never, ["*"], true, never>;
717
+ }
718
+
719
+ declare class AccordionHeaderComponent {
720
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionHeaderComponent, never>;
721
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionHeaderComponent, "smart-accordion-header", never, {}, {}, never, ["*"], true, never>;
722
+ }
723
+
341
724
  declare abstract class AppBaseComponent implements OnDestroy, AfterContentInit {
342
725
  protected router: Router;
343
726
  protected cd: ChangeDetectorRef;
@@ -373,33 +756,6 @@ declare abstract class AppBaseComponent implements OnDestroy, AfterContentInit {
373
756
  static ɵdir: i0.ɵɵDirectiveDeclaration<AppBaseComponent, never, never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
374
757
  }
375
758
 
376
- declare class DynamicContentDirective {
377
- container: ViewContainerRef;
378
- static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentDirective, never>;
379
- static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicContentDirective, ".dynamic-content", never, {}, {}, never, never, true, never>;
380
- }
381
-
382
- declare class DetailsDirective {
383
- private modalService;
384
- private hardwareService;
385
- options: i0.InputSignal<{
386
- component: any;
387
- params: any;
388
- mode?: "bottom" | "default";
389
- }>;
390
- smartDetailsShowed: i0.OutputEmitterRef<void>;
391
- smartDetailsDismissed: i0.OutputEmitterRef<void>;
392
- click(): Promise<void>;
393
- static ɵfac: i0.ɵɵFactoryDeclaration<DetailsDirective, never>;
394
- static ɵdir: i0.ɵɵDirectiveDeclaration<DetailsDirective, "[smartDetails]", never, { "options": { "alias": "smartDetails"; "required": true; "isSignal": true; }; }, { "smartDetailsShowed": "smartDetailsShowed"; "smartDetailsDismissed": "smartDetailsDismissed"; }, never, never, true, never>;
395
- }
396
-
397
- declare class SharedDirectivesModule {
398
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedDirectivesModule, never>;
399
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedDirectivesModule, never, [typeof SharedServicesModule, typeof DynamicContentDirective], [typeof DynamicContentDirective]>;
400
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedDirectivesModule>;
401
- }
402
-
403
759
  declare abstract class BaseComponent implements OnDestroy {
404
760
  get takeUntilDestroy(): MonoTypeOperatorFunction<any>;
405
761
  destroy$: Subject<boolean>;
@@ -446,103 +802,9 @@ declare class ButtonComponent extends ButtonComponent_base {
446
802
  }
447
803
 
448
804
  declare class ButtonStandardComponent extends ButtonBaseComponent {
449
- static ɵfac: i0.ɵɵFactoryDeclaration<ButtonStandardComponent, never>;
450
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonStandardComponent, "smart-button-standard", never, {}, {}, never, ["*"], true, never>;
451
- }
452
-
453
- interface IFormProvider {
454
- submit(): void;
455
- }
456
- interface IAppProvider {
457
- logged: Signal<boolean>;
458
- username: Signal<string>;
459
- logout: () => void;
460
- }
461
-
462
- declare abstract class IModelExportProvider {
463
- abstract execute(type: Type<any>, value: any): void;
464
- }
465
- declare const MODEL_EXPORT_PROVIDER: InjectionToken<IModelExportProvider>;
466
-
467
- declare abstract class IModelImportProvider {
468
- abstract getAccept(type: Type<any>): Promise<string>;
469
- abstract convert(type: Type<any>, file: File): Promise<any>;
470
- }
471
- declare const MODEL_IMPORT_PROVIDER: InjectionToken<IModelImportProvider>;
472
-
473
- declare abstract class IModelLabelProvider {
474
- abstract get(options: IModelLabelOptions): Signal<string>;
475
- }
476
- interface IModelLabelOptions {
477
- key: string;
478
- instance?: any;
479
- type?: Type<any>;
480
- }
481
- declare const MODEL_LABEL_PROVIDER: InjectionToken<IModelLabelOptions>;
482
-
483
- declare abstract class IModelPossibilitiesProvider {
484
- abstract get(options: IModelPossibilitiesOptions): WritableSignal<{
485
- id: any;
486
- text: string;
487
- checked: boolean;
488
- }[]>;
489
- }
490
- interface IModelPossibilitiesOptions {
491
- key: string;
492
- instance: any;
493
- type?: Type<any>;
494
- }
495
- declare const MODEL_POSSIBILITIES_PROVIDER: InjectionToken<IModelPossibilitiesProvider>;
496
-
497
- /**
498
- * @example
499
- *
500
- * in module:
501
- @NgModule({
502
- providers: [
503
- ...
504
- {
505
- provide: MODEL_VALIDATORS_PROVIDER,
506
- useClass: ModelValidatorsProvider
507
- }
508
- ],
509
- *
510
- * provider:
511
- * @Injectable()
512
- export class ModelValidatorsProvider extends IModelValidatorsProvider {
513
- async get(options: IModelValidatorsOptions): Promise<IModelValidators> {
514
- if (options.type === Todo && options.key === 'test') {
515
- return {
516
- validators: null,
517
- asyncValidators: null
518
- }
519
- }
520
-
521
- if (options.type === Todo && options.key === 'number') {
522
- return {
523
- validators: [ Validators.required ],
524
- asyncValidators: null
525
- }
526
- }
527
-
528
- return Promise.resolve(options.base);
529
- }
530
- }
531
- */
532
- declare abstract class IModelValidatorsProvider {
533
- abstract get(options: IModelValidatorsOptions): Promise<IModelValidators>;
534
- }
535
- interface IModelValidatorsOptions {
536
- key: string;
537
- instance: any;
538
- type?: Type<any> | (() => void);
539
- base?: IModelValidators;
540
- }
541
- interface IModelValidators {
542
- validators?: ValidatorFn | ValidatorFn[];
543
- asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[];
805
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonStandardComponent, never>;
806
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonStandardComponent, "smart-button-standard", never, {}, {}, never, ["*"], true, never>;
544
807
  }
545
- declare const MODEL_VALIDATORS_PROVIDER: InjectionToken<IModelValidatorsProvider>;
546
808
 
547
809
  declare abstract class InputBaseComponent<T> extends BaseComponent {
548
810
  protected cd: ChangeDetectorRef;
@@ -1487,260 +1749,6 @@ declare class PasswordStrengthComponent implements OnChanges {
1487
1749
  static ɵcmp: i0.ɵɵComponentDeclaration<PasswordStrengthComponent, "smart-password-strength", never, { "passwordToCheck": { "alias": "passwordToCheck"; "required": true; "isSignal": true; }; "showHint": { "alias": "showHint"; "required": true; "isSignal": true; }; }, { "passwordStrength": "passwordStrength"; }, never, never, true, never>;
1488
1750
  }
1489
1751
 
1490
- interface IAppOptions {
1491
- provider: IAppProvider;
1492
- logo?: string;
1493
- menu?: {
1494
- showForAnonymous?: boolean;
1495
- items?: IMenuItem[];
1496
- };
1497
- style?: IStyle;
1498
- }
1499
- interface ICardOptions {
1500
- title?: string;
1501
- buttons?: Array<IIconButtonOptions>;
1502
- }
1503
- interface IIconButtonOptions {
1504
- icon: string;
1505
- text?: string;
1506
- handler?: () => void;
1507
- component?: any;
1508
- type?: 'default' | 'popover';
1509
- disabled$?: Observable<boolean>;
1510
- number?: number;
1511
- }
1512
- type DynamicComponentType = 'form' | 'page' | 'button' | 'details' | 'list' | 'crud-list-page' | 'crud-item-page';
1513
- interface IDynamicComponentData {
1514
- key: DynamicComponentType;
1515
- component: Type<any>;
1516
- data?: any;
1517
- }
1518
- interface IFormOptions<T> {
1519
- model: T;
1520
- show: boolean;
1521
- treeLevel?: number;
1522
- control?: AbstractControl;
1523
- mode?: 'create' | 'update' | string;
1524
- loading$?: Observable<boolean>;
1525
- uniqueProvider?: (values: Record<keyof T, any>) => Promise<boolean>;
1526
- possibilities?: {
1527
- [key: string]: WritableSignal<{
1528
- id: any;
1529
- text: string;
1530
- checked: boolean;
1531
- }[]>;
1532
- };
1533
- inputComponents?: {
1534
- [key: string]: Type<InputBaseComponent<T>>;
1535
- };
1536
- fieldOptions?: IFieldOptions;
1537
- modelOptions?: IModelOptions;
1538
- }
1539
- type InputOptions<T> = IInputOptions & IInputFromFieldOptions<T>;
1540
- interface IInputOptions {
1541
- treeLevel: number;
1542
- control: UntypedFormControl | UntypedFormArray;
1543
- possibilities?: WritableSignal<{
1544
- id: any;
1545
- text: string;
1546
- checked: boolean;
1547
- }[]>;
1548
- component?: Type<InputBaseComponent<any>>;
1549
- }
1550
- interface IInputFromFieldOptions<T> {
1551
- model: T;
1552
- fieldKey: string;
1553
- mode?: 'create' | 'update' | string;
1554
- }
1555
- interface IDetailsComponentFactories<T> {
1556
- top?: ComponentFactory<any>;
1557
- bottom?: ComponentFactory<any>;
1558
- }
1559
- interface IDetailsOptions<T extends IEntity<string>> {
1560
- title?: string;
1561
- cellPipe?: ICellPipe<T>;
1562
- type: any;
1563
- item: Signal<T>;
1564
- loading?: Signal<boolean>;
1565
- itemHandler?: ((id: string) => void) | null;
1566
- removeHandler?: ((item: T) => void) | null;
1567
- componentFactories?: IDetailsComponentFactories<T>;
1568
- }
1569
- interface IMenuItem {
1570
- mode?: 'divider' | 'default';
1571
- route?: string;
1572
- click?: (arg0: IMenuItem) => void;
1573
- caption?: string;
1574
- component?: any;
1575
- icon?: string;
1576
- infos?: Array<{
1577
- text: string;
1578
- }>;
1579
- }
1580
- interface IButtonOptions {
1581
- type?: 'submit' | 'button';
1582
- expand?: 'block' | 'full' | undefined;
1583
- confirm?: boolean;
1584
- color?: 'primary' | 'light' | string;
1585
- click: () => void;
1586
- loading?: Signal<boolean>;
1587
- }
1588
- interface IDetailOptions<T> {
1589
- key: string;
1590
- item?: Signal<T>;
1591
- options: IFieldOptions;
1592
- cellPipe?: ICellPipe<T>;
1593
- loading?: Signal<boolean>;
1594
- }
1595
- interface ICellPipe<T> extends PipeTransform {
1596
- transform(value: T, columnName: string, translate?: (val: string) => string): string;
1597
- }
1598
- interface IPageOptions {
1599
- title: string;
1600
- hideHeader?: boolean;
1601
- hideMenuButton?: boolean;
1602
- showBackButton?: boolean;
1603
- endButtons?: Array<IIconButtonOptions>;
1604
- search?: {
1605
- text: Signal<string>;
1606
- set: (txt: string) => void;
1607
- };
1608
- }
1609
- interface IListProvider<T> {
1610
- getData: (filter: any) => void;
1611
- onChangeMultiSelected?: (list: Array<T>) => void;
1612
- onCleanMultiSelected$?: Observable<void>;
1613
- list: Signal<T[]>;
1614
- loading: Signal<boolean>;
1615
- }
1616
- interface IListPaginationOptions {
1617
- mode?: PaginationMode;
1618
- limit: number;
1619
- loadNextPage: () => Promise<boolean>;
1620
- loadPrevPage: () => Promise<boolean>;
1621
- page: Signal<number>;
1622
- totalPages: Signal<number>;
1623
- }
1624
- declare enum PaginationMode {
1625
- infiniteScroll = "infiniteScroll",
1626
- singlePage = "singlePage"
1627
- }
1628
- declare enum ListMode {
1629
- mobile = "mobile",
1630
- desktop = "desktop",
1631
- masonryGrid = "masonryGrid"
1632
- }
1633
- interface IItemOptionsForPage {
1634
- routingPrefix: string;
1635
- edit: boolean;
1636
- }
1637
- interface IItemOptionsForCustom {
1638
- select: (id: string) => void;
1639
- edit: boolean;
1640
- }
1641
- type ItemOptions = IItemOptionsForPage | IItemOptionsForCustom;
1642
- interface IListComponentFactories<T> {
1643
- top?: ComponentFactory<any>;
1644
- }
1645
- interface IDetailsProvider<T> {
1646
- getData: (id: string) => void;
1647
- clearData: () => void;
1648
- item: Signal<T>;
1649
- loading: Signal<boolean>;
1650
- }
1651
- interface IListOptions<T> {
1652
- provider: IListProvider<T>;
1653
- type: any;
1654
- mode?: ListMode;
1655
- pagination?: IListPaginationOptions;
1656
- cellPipe?: ICellPipe<T>;
1657
- componentFactories?: IListComponentFactories<T>;
1658
- sort?: boolean | {
1659
- default?: string;
1660
- defaultDesc?: boolean;
1661
- };
1662
- details?: boolean | {
1663
- provider?: IDetailsProvider<T>;
1664
- componentFactories?: IDetailsComponentFactories<T>;
1665
- };
1666
- item?: boolean | {
1667
- options?: ItemOptions;
1668
- };
1669
- remove?: boolean | {
1670
- provider?: IRemoveProvider<T>;
1671
- };
1672
- select?: 'multi';
1673
- }
1674
- interface IRemoveProvider<T> {
1675
- invoke: (id: string) => void;
1676
- check?: (item: T) => boolean;
1677
- }
1678
- interface IListInternalOptions<T> extends IListOptions<T> {
1679
- fields?: Array<{
1680
- key: string;
1681
- options: IFieldOptions;
1682
- }>;
1683
- }
1684
-
1685
- declare class ModelLabelPipe<T> implements PipeTransform {
1686
- private translateService;
1687
- private modelLabelProvider;
1688
- transform(instance: T, key: string, type?: Type<any> | (() => void)): string;
1689
- static ɵfac: i0.ɵɵFactoryDeclaration<ModelLabelPipe<any>, never>;
1690
- static ɵpipe: i0.ɵɵPipeDeclaration<ModelLabelPipe<any>, "smartModelLabel", true>;
1691
- }
1692
-
1693
- declare class ListCellPipe<T extends {
1694
- [key: string]: any;
1695
- }> implements PipeTransform {
1696
- private readonly translateService;
1697
- transform(obj: T, key: string, pipe: ICellPipe<T>, type?: Type<T>): {
1698
- value?: any;
1699
- type?: FieldTypeDef | null;
1700
- };
1701
- private getFieldType;
1702
- private getValue;
1703
- static ɵfac: i0.ɵɵFactoryDeclaration<ListCellPipe<any>, never>;
1704
- static ɵpipe: i0.ɵɵPipeDeclaration<ListCellPipe<any>, "smartListCell", true>;
1705
- }
1706
-
1707
- declare class TrustHtmlPipe implements PipeTransform {
1708
- private sanitizer;
1709
- transform(val: string): SafeHtml;
1710
- static ɵfac: i0.ɵɵFactoryDeclaration<TrustHtmlPipe, never>;
1711
- static ɵpipe: i0.ɵɵPipeDeclaration<TrustHtmlPipe, "smartTrustHtml", true>;
1712
- }
1713
-
1714
- declare class ListHeaderPipe<T> implements PipeTransform {
1715
- private translateService;
1716
- private modelLabelProvider;
1717
- transform(data: T, key: string, type?: Type<any>): Signal<string>;
1718
- static ɵfac: i0.ɵɵFactoryDeclaration<ListHeaderPipe<any>, never>;
1719
- static ɵpipe: i0.ɵɵPipeDeclaration<ListHeaderPipe<any>, "smartListHeader", true>;
1720
- }
1721
-
1722
- declare class FileUrlPipe implements PipeTransform {
1723
- private service;
1724
- transform(file: {
1725
- id: any;
1726
- }): string;
1727
- static ɵfac: i0.ɵɵFactoryDeclaration<FileUrlPipe, never>;
1728
- static ɵpipe: i0.ɵɵPipeDeclaration<FileUrlPipe, "smartFileUrl", true>;
1729
- }
1730
-
1731
- declare class EnumToListPipe implements PipeTransform {
1732
- transform(value: any): Array<string>;
1733
- static ɵfac: i0.ɵɵFactoryDeclaration<EnumToListPipe, never>;
1734
- static ɵpipe: i0.ɵɵPipeDeclaration<EnumToListPipe, "smartEnumToList", true>;
1735
- }
1736
-
1737
- declare const PIPES: (typeof ModelLabelPipe | typeof ListCellPipe | typeof TrustHtmlPipe | typeof ListHeaderPipe | typeof EnumToListPipe)[];
1738
- declare class SharedPipesModule {
1739
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedPipesModule, never>;
1740
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, never, [typeof ModelLabelPipe, typeof ListCellPipe, typeof TrustHtmlPipe, typeof ListHeaderPipe, typeof EnumToListPipe], [typeof ModelLabelPipe, typeof ListCellPipe, typeof TrustHtmlPipe, typeof ListHeaderPipe, typeof EnumToListPipe]>;
1741
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedPipesModule>;
1742
- }
1743
-
1744
1752
  declare class FormFactory {
1745
1753
  private fb;
1746
1754
  private authService;
@@ -1817,4 +1825,4 @@ declare const SmartNgModule: typeof SmartNgModuleDecorator;
1817
1825
  declare function SmartNgModuleDecorator(options: NgModule): (constructor: any) => any;
1818
1826
 
1819
1827
  export { AUTH_TOKEN, AccordionBodyComponent, AccordionComponent, AccordionHeaderComponent, AlertService, AppBaseComponent, AppService, AuthService, BaseComponent, ButtonBaseComponent, ButtonComponent, ButtonStandardComponent, CalendarService, CardComponent, CreateDynamicComponent, DYNAMIC_COMPONENTS_STORE, DateEditComponent, DateRangeComponent, DateRangeModalComponent, DetailAddressComponent, DetailArrayComponent, DetailAttachmentComponent, DetailBaseComponent, DetailColorComponent, DetailComponent, DetailDateRangeComponent, DetailEmailComponent, DetailEnumComponent, DetailFlagComponent, DetailImageComponent, DetailLogoComponent, DetailObjectComponent, DetailPdfComponent, DetailPhoneNumberPlComponent, DetailTextComponent, DetailVideoComponent, DetailsBaseComponent, DetailsComponent, DetailsDirective, DetailsPage, DetailsService, DetailsStandardComponent, DynamicComponentLoader, DynamicComponentStorageService, DynamicContentDirective, EnumToListPipe, ErrorService, ExportComponent, FILE_SERVICE_CONFIG, FileService, FileUrlPipe, FilterBtnConstants, FormBaseComponent, FormComponent, FormFactory, FormStandardComponent, HardwareService, IModelExportProvider, IModelImportProvider, IModelLabelProvider, IModelPossibilitiesProvider, IModelValidatorsProvider, ImportComponent, InfoComponent, InfoModalComponent, InputAddressComponent, InputArrayComponent, InputAttachmentComponent, InputBaseComponent, InputCheckComponent, InputColorComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputDateWithEditComponent, InputEmailComponent, InputEnumComponent, InputErrorComponent, InputFileComponent, InputFlagComponent, InputFloatComponent, InputImageComponent, InputIntComponent, InputIntsComponent, InputLogoComponent, InputLongTextComponent, InputNipComponent, InputObjectComponent, InputPasswordComponent, InputPdfComponent, InputPeselComponent, InputPhoneNumberComponent, InputPhoneNumberPlComponent, InputRadioComponent, InputStringsComponent, InputTextComponent, InputVideoComponent, ListBaseComponent, ListCellPipe, ListComponent, ListDesktopComponent, ListHeaderPipe, ListMasonryGridComponent, ListMobileComponent, ListMode, LoaderComponent, MODEL_EXPORT_PROVIDER, MODEL_IMPORT_PROVIDER, MODEL_LABEL_PROVIDER, MODEL_POSSIBILITIES_PROVIDER, MODEL_VALIDATORS_PROVIDER, MenuService, ModalService, ModelLabelPipe, NgrxSharedModule, NgrxStoreService, PIPES, PageBaseComponent, PageComponent, PageStandardComponent, PaginationMode, PagingComponent, PasswordStrengthComponent, PopoverService, ReduxAction, ReduxActionDecorator, ReduxSelect, SearchbarComponent, SharedDirectivesModule, SharedFactoriesModule, SharedModule, SharedPagesModule, SharedPipesModule, SharedServicesModule, SmartFormGroup, SmartNgModule, SmartNgModuleDecorator, StorageService, StyleService, ToastService, TrustHtmlPipe, UIService, fastPropGetter };
1820
- export type { AppEndButton, CalendarState, DynamicComponentType, IAlertButton, IAlertOptions, IAppOptions, IAppProvider, IButtonOptions, ICardOptions, ICellPipe, IDetailOptions, IDetailsComponentFactories, IDetailsOptions, IDetailsProvider, IDynamicComponent, IDynamicComponentData, IFileServiceConfig, IFormOptions, IFormProvider, IIconButtonOptions, IInputFromFieldOptions, IInputOptions, IItemOptionsForCustom, IItemOptionsForPage, IListComponentFactories, IListInternalOptions, IListOptions, IListPaginationOptions, IListProvider, IMenuItem, IModal, IModalOptions, IModelLabelOptions, IModelPossibilitiesOptions, IModelValidators, IModelValidatorsOptions, IPageOptions, IRemoveProvider, IToastButton, IToastOptions, InputOptions, ItemOptions, month };
1828
+ export type { AppEndButton, CalendarState, DynamicComponentType, IAlertButton, IAlertOptions, IAppOptions, IAppProvider, IButtonOptions, ICardOptions, ICellPipe, IDetailOptions, IDetailsComponentFactories, IDetailsOptions, IDetailsProvider, IDynamicComponent, IDynamicComponentData, IFileServiceConfig, IFormOptions, IFormProvider, IIconButtonOptions, IInputFromFieldOptions, IInputOptions, IItemOptionsForCustom, IItemOptionsForPage, IListComponentFactories, IListInternalOptions, IListOptions, IListPaginationOptions, IListProvider, IMenuItem, IModal, IModalOptions, IModelLabelOptions, IModelPossibilitiesOptions, IModelValidators, IModelValidatorsOptions, IPageOptions, IRemoveProvider, IStyle, IToastButton, IToastOptions, InputBaseComponentType, InputOptions, ItemOptions, StyleType, month };