@smartsoft001/angular 2.87.0 → 2.89.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,9 +1,9 @@
1
- import * as rxjs from 'rxjs';
2
- import { MonoTypeOperatorFunction, Subject, Subscription, Observable } from 'rxjs';
3
1
  import * as i0 from '@angular/core';
4
- import { ModelSignal, OnDestroy, AfterContentInit, ChangeDetectorRef, ElementRef, Signal, InputSignal, ViewContainerRef, ComponentRef, WritableSignal, TemplateRef, Type, InjectionToken, OnInit, Renderer2, AfterViewInit, OutputEmitterRef, OnChanges, SimpleChange, PipeTransform, ComponentFactory, NgModuleRef, Injector, NgModule } 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';
5
3
  import * as i2$1 from '@angular/forms';
6
- import { ValidatorFn, AsyncValidatorFn, UntypedFormControl, UntypedFormArray, UntypedFormGroup, ControlValueAccessor, AbstractControl } from '@angular/forms';
4
+ import { UntypedFormGroup, ValidatorFn, AsyncValidatorFn, UntypedFormControl, UntypedFormArray, ControlValueAccessor, AbstractControl } from '@angular/forms';
5
+ import * as rxjs from 'rxjs';
6
+ import { Observable, MonoTypeOperatorFunction, Subject, Subscription } from 'rxjs';
7
7
  import { IEntity, IAddress, IDateRange } from '@smartsoft001/domain-core';
8
8
  import * as _smartsoft001_models from '@smartsoft001/models';
9
9
  import { IFieldOptions, IModelOptions, FieldTypeDef } from '@smartsoft001/models';
@@ -14,6 +14,7 @@ import { TranslateService } from '@ngx-translate/core';
14
14
  import * as i2 from 'ngx-cookie';
15
15
  import { Store, ActionReducer, Selector } from '@ngrx/store';
16
16
  import { Action } from '@ngrx/store/src/models';
17
+ import { SafeHtml } from '@angular/platform-browser';
17
18
  import * as _angular_router from '@angular/router';
18
19
  import { Router } from '@angular/router';
19
20
  import { Editor, Toolbar } from 'ngx-editor';
@@ -21,7 +22,6 @@ import * as i9 from '@angular/cdk/drag-drop';
21
22
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
22
23
  import * as i10 from '@angular/cdk/table';
23
24
  import { CdkTableDataSourceInput } from '@angular/cdk/table';
24
- import { SafeHtml } from '@angular/platform-browser';
25
25
  import * as i11 from 'ng-dynamic-component';
26
26
  import * as i1$1 from '@angular/common';
27
27
  import * as i7 from '@angular/common/http';
@@ -45,276 +45,563 @@ declare class AccordionHeaderComponent {
45
45
  static ɵcmp: i0.ɵɵComponentDeclaration<AccordionHeaderComponent, "smart-accordion-header", never, {}, {}, never, ["*"], true, never>;
46
46
  }
47
47
 
48
- declare abstract class AppBaseComponent implements OnDestroy, AfterContentInit {
49
- protected router: Router;
50
- protected cd: ChangeDetectorRef;
51
- protected elementRef: ElementRef<any>;
52
- protected styleService: StyleService;
53
- protected menuService: MenuService;
54
- protected authService: AuthService;
55
- protected appService: AppService;
56
- protected readonly platformId: Object;
57
- protected document: Document;
58
- private readonly injector;
59
- private _subscriptions;
60
- selectedPath: string;
61
- showMenu: Signal<boolean>;
62
- menuItems: Signal<IMenuItem[]>;
63
- logged: Signal<boolean>;
64
- username: Signal<string>;
65
- loadingPage: Signal<boolean>;
66
- logo: string | undefined;
67
- routerEvents: Signal<_angular_router.Event | undefined>;
68
- options: InputSignal<IAppOptions>;
69
- endMenuContainer: Signal<ViewContainerRef | undefined>;
70
- constructor();
71
- logout(): void;
72
- ngAfterContentInit(): Promise<void>;
73
- ngOnDestroy(): void;
74
- private initMenu;
75
- private initSelectedPath;
76
- private initLoader;
77
- private refreshStyles;
78
- private initPermissionClasses;
79
- static ɵfac: i0.ɵɵFactoryDeclaration<AppBaseComponent, never>;
80
- static ɵdir: i0.ɵɵDirectiveDeclaration<AppBaseComponent, never, never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
48
+ declare class AppService {
49
+ private titleService;
50
+ private translate;
51
+ private router;
52
+ private static _endButtonsSource$;
53
+ private static _titleSource$;
54
+ private _baseTitle;
55
+ endButtons$: rxjs.Observable<AppEndButton[]>;
56
+ title$: rxjs.Observable<string>;
57
+ addEndButton(button: AppEndButton): void;
58
+ removeEndButton(buttonOrId: AppEndButton | string): void;
59
+ initTitle(): void;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
61
+ static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
81
62
  }
63
+ type AppEndButton = IIconButtonOptions & {
64
+ id?: string;
65
+ };
82
66
 
83
- declare class DynamicContentDirective {
84
- container: ViewContainerRef;
85
- static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentDirective, never>;
86
- static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicContentDirective, ".dynamic-content", never, {}, {}, never, never, true, never>;
67
+ interface month {
68
+ dates: moment.Moment[];
69
+ number: string;
70
+ monthName: string;
71
+ year: string;
87
72
  }
88
-
89
- declare class DetailsDirective {
90
- private modalService;
91
- private hardwareService;
92
- options: i0.InputSignal<{
93
- component: any;
94
- params: any;
95
- mode?: "bottom" | "default";
96
- }>;
97
- smartDetailsShowed: i0.OutputEmitterRef<void>;
98
- smartDetailsDismissed: i0.OutputEmitterRef<void>;
99
- click(): Promise<void>;
100
- static ɵfac: i0.ɵɵFactoryDeclaration<DetailsDirective, never>;
101
- static ɵdir: i0.ɵɵDirectiveDeclaration<DetailsDirective, "[smartDetails]", never, { "options": { "alias": "smartDetails"; "required": true; "isSignal": true; }; }, { "smartDetailsShowed": "smartDetailsShowed"; "smartDetailsDismissed": "smartDetailsDismissed"; }, never, never, true, never>;
73
+ interface state {
74
+ date: moment.Moment;
75
+ calendar: month[];
102
76
  }
103
-
104
- declare class SharedServicesModule {
105
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedServicesModule, never>;
106
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedServicesModule, never, [typeof i1.TranslateModule, typeof i2.CookieModule], never>;
107
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedServicesModule>;
77
+ declare class CalendarService {
78
+ state: state;
79
+ constructor();
80
+ setState: (nextState: Partial<state>) => void;
81
+ getCalendar(): month[];
82
+ generatePrevMonths(): void;
83
+ generateNextMonths(): void;
84
+ private initCalendar;
85
+ private previousMonth;
86
+ private filterFutureDates;
87
+ private generateMonth;
88
+ private generateMonthDates;
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarService, never>;
90
+ static ɵprov: i0.ɵɵInjectableDeclaration<CalendarService>;
108
91
  }
109
92
 
110
- declare class SharedDirectivesModule {
111
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedDirectivesModule, never>;
112
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedDirectivesModule, never, [typeof SharedServicesModule, typeof DynamicContentDirective], [typeof DynamicContentDirective]>;
113
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedDirectivesModule>;
93
+ declare class StorageService {
94
+ setItem(key: string, value: any): void;
95
+ getItem(key: string): any;
96
+ removeItem(key: string): void;
97
+ clear(): void;
98
+ static ɵfac: i0.ɵɵFactoryDeclaration<StorageService, never>;
99
+ static ɵprov: i0.ɵɵInjectableDeclaration<StorageService>;
114
100
  }
115
101
 
116
- declare abstract class BaseComponent implements OnDestroy {
117
- get takeUntilDestroy(): MonoTypeOperatorFunction<any>;
118
- destroy$: Subject<boolean>;
119
- ngOnDestroy(): void;
120
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponent, never>;
121
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent, never, never, {}, {}, never, never, true, never>;
122
- }
123
- interface IDynamicComponent<T> extends BaseComponent {
124
- baseInstance: T;
125
- baseComponentRef: ComponentRef<T>;
126
- template: WritableSignal<'custom' | 'default'>;
127
- contentTpl: Signal<TemplateRef<any> | ViewContainerRef | undefined>;
128
- dynamicContents: Signal<readonly DynamicContentDirective[]>;
129
- refreshProperties(): void;
130
- refreshDynamicInstance(): void;
102
+ declare const AUTH_TOKEN = "AUTH_TOKEN";
103
+ declare class AuthService {
104
+ protected storageService: StorageService;
105
+ isAuthenticated(): boolean;
106
+ expectPermissions(permissions: Array<string> | null): boolean;
107
+ getPermissions(): Array<string>;
108
+ getTokenPayload(): any;
109
+ protected getRawToken(): {
110
+ access_token: string;
111
+ } | null;
112
+ protected getToken(): {
113
+ access_token: string;
114
+ } | null;
115
+ setToken(token: {
116
+ access_token: string;
117
+ } | null): void;
118
+ removeToken(): void;
119
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
120
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
131
121
  }
132
- declare function CreateDynamicComponent<T extends {
133
- contentTpl: Signal<TemplateRef<any> | ViewContainerRef | undefined>;
134
- } = any>(type: DynamicComponentType): new () => IDynamicComponent<T>;
135
122
 
136
- declare abstract class ButtonBaseComponent {
137
- static smartType: DynamicComponentType;
138
- mode: WritableSignal<'default' | 'confirm'>;
139
- options: InputSignal<IButtonOptions>;
140
- disabled: InputSignal<boolean>;
141
- contentTpl: i0.Signal<ViewContainerRef | undefined>;
142
- invoke(): void;
143
- confirmInvoke(): void;
144
- confirmCancel(): void;
145
- static ɵfac: i0.ɵɵFactoryDeclaration<ButtonBaseComponent, never>;
146
- static ɵdir: i0.ɵɵDirectiveDeclaration<ButtonBaseComponent, never, never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
123
+ declare class DetailsService {
124
+ private _root;
125
+ get $root(): any;
126
+ constructor();
127
+ init(): void;
128
+ setRoot(obj: any, force?: boolean): void;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<DetailsService, never>;
130
+ static ɵprov: i0.ɵɵInjectableDeclaration<DetailsService>;
147
131
  }
148
132
 
149
- declare const ButtonComponent_base: new () => IDynamicComponent<ButtonBaseComponent>;
150
- declare class ButtonComponent extends ButtonComponent_base {
151
- options: i0.InputSignal<IButtonOptions>;
152
- disabled: i0.InputSignal<boolean>;
153
- contentTpl: i0.Signal<ViewContainerRef | undefined>;
154
- dynamicContents: i0.Signal<readonly DynamicContentDirective[]>;
155
- constructor();
156
- refreshProperties(): void;
157
- static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
158
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "smart-button", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
133
+ declare class DynamicComponentLoader<T> {
134
+ private resolver;
135
+ static declaredComponents: any[];
136
+ getComponentsWithFactories<C>(options: {
137
+ components: Array<any>;
138
+ }): Promise<{
139
+ component: any;
140
+ factory: ComponentFactory<any>;
141
+ }[]>;
142
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentLoader<any>, never>;
143
+ static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentLoader<any>>;
159
144
  }
160
145
 
161
- declare class ButtonStandardComponent extends ButtonBaseComponent {
162
- static ɵfac: i0.ɵɵFactoryDeclaration<ButtonStandardComponent, never>;
163
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonStandardComponent, "smart-button-standard", never, {}, {}, never, ["*"], true, never>;
146
+ declare const DYNAMIC_COMPONENTS_STORE: InjectionToken<[Type<any>]>;
147
+ declare class DynamicComponentStorageService {
148
+ static get(key: string, moduleRef: NgModuleRef<any>): Type<any>[];
164
149
  }
165
150
 
166
- interface IFormProvider {
167
- submit(): void;
151
+ declare const FILE_SERVICE_CONFIG: InjectionToken<IFileServiceConfig>;
152
+ interface IFileServiceConfig {
153
+ apiUrl: string;
168
154
  }
169
- interface IAppProvider {
170
- logged: Signal<boolean>;
171
- username: Signal<string>;
172
- logout: () => void;
155
+ declare class FileService {
156
+ private config;
157
+ private http;
158
+ upload<T>(file: File, callback?: (result: T) => void): Observable<number>;
159
+ download(id: string): void;
160
+ delete(id: string): Promise<void>;
161
+ getUrl(id: string): string;
162
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileService, never>;
163
+ static ɵprov: i0.ɵɵInjectableDeclaration<FileService>;
173
164
  }
174
165
 
175
- declare abstract class IModelExportProvider {
176
- abstract execute(type: Type<any>, value: any): void;
166
+ declare class SmartFormGroup extends UntypedFormGroup {
167
+ static create(): SmartFormGroup;
168
+ setForm(form: UntypedFormGroup): void;
177
169
  }
178
- declare const MODEL_EXPORT_PROVIDER: InjectionToken<IModelExportProvider>;
179
170
 
180
- declare abstract class IModelImportProvider {
181
- abstract getAccept(type: Type<any>): Promise<string>;
182
- abstract convert(type: Type<any>, file: File): Promise<any>;
183
- }
184
- declare const MODEL_IMPORT_PROVIDER: InjectionToken<IModelImportProvider>;
171
+ type IStyle = Record<string, string | undefined>;
185
172
 
186
- declare abstract class IModelLabelProvider {
187
- abstract get(options: IModelLabelOptions): Signal<string>;
188
- }
189
- interface IModelLabelOptions {
190
- key: string;
191
- instance?: any;
192
- type?: Type<any>;
173
+ declare class StyleService {
174
+ private platformId;
175
+ static style: IStyle | null;
176
+ private _elementRef;
177
+ static create(platformId: object, el: ElementRef, style?: Partial<IStyle>): StyleService;
178
+ constructor(platformId: object);
179
+ init(el: ElementRef, style?: IStyle): void;
180
+ set(style?: IStyle): void;
181
+ private execute;
182
+ private setColor;
183
+ private setProperty;
184
+ private setFont;
185
+ private setButton;
186
+ private setMobileBreakpoint;
187
+ static ɵfac: i0.ɵɵFactoryDeclaration<StyleService, never>;
188
+ static ɵprov: i0.ɵɵInjectableDeclaration<StyleService>;
193
189
  }
194
- declare const MODEL_LABEL_PROVIDER: InjectionToken<IModelLabelOptions>;
195
190
 
196
- declare abstract class IModelPossibilitiesProvider {
197
- abstract get(options: IModelPossibilitiesOptions): WritableSignal<{
198
- id: any;
199
- text: string;
200
- checked: boolean;
201
- }[]>;
202
- }
203
- interface IModelPossibilitiesOptions {
204
- key: string;
205
- instance: any;
206
- type?: Type<any>;
191
+ declare class ToastService {
192
+ static lockError: number;
193
+ addLockError(): void;
194
+ removeLockError(): void;
195
+ error(config: IToastOptions): Promise<void>;
196
+ info(config: IToastOptions): Promise<void>;
197
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
198
+ static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>;
199
+ }
200
+ interface IToastOptions {
201
+ title?: string;
202
+ message: string;
203
+ duration?: number;
204
+ buttons?: Array<IToastButton>;
205
+ }
206
+ interface IToastButton {
207
+ text: string;
208
+ position: 'start' | 'end';
209
+ handler: () => void;
210
+ }
211
+
212
+ declare class HardwareService {
213
+ get isMobile(): boolean;
214
+ get isMobileWeb(): boolean;
215
+ onBackButtonClick(callback: () => void): Promise</*PluginListenerHandle*/ any>;
216
+ static ɵfac: i0.ɵɵFactoryDeclaration<HardwareService, never>;
217
+ static ɵprov: i0.ɵɵInjectableDeclaration<HardwareService>;
207
218
  }
208
- declare const MODEL_POSSIBILITIES_PROVIDER: InjectionToken<IModelPossibilitiesProvider>;
209
219
 
210
220
  /**
211
- * @example
212
- *
213
- * in module:
214
- @NgModule({
215
- providers: [
216
- ...
217
- {
218
- provide: MODEL_VALIDATORS_PROVIDER,
219
- useClass: ModelValidatorsProvider
220
- }
221
- ],
222
- *
223
- * provider:
224
- * @Injectable()
225
- export class ModelValidatorsProvider extends IModelValidatorsProvider {
226
- async get(options: IModelValidatorsOptions): Promise<IModelValidators> {
227
- if (options.type === Todo && options.key === 'test') {
228
- return {
229
- validators: null,
230
- asyncValidators: null
231
- }
232
- }
221
+ * Only to use in smart-page
222
+ * @requires PageComponent
223
+ */
224
+ declare class MenuService {
225
+ private readonly resolver;
226
+ private _endContainer;
227
+ private _openedEnd;
228
+ menuItems: i0.WritableSignal<IMenuItem[]>;
229
+ disabled: i0.WritableSignal<boolean>;
230
+ /**
231
+ * @desc checking if the menu is open (menu on the right side of the screen)
232
+ */
233
+ get openedEnd(): boolean;
234
+ enable(): void;
235
+ disable(): void;
236
+ changeMenuItemByRoute(route: string, changes: Partial<IMenuItem>): void;
237
+ setMenuItems(items: IMenuItem[]): void;
238
+ /**
239
+ * @private
240
+ */
241
+ init(endContainer: ViewContainerRef): Promise<void>;
242
+ /**
243
+ * @desc open menu (menu on the right side of the screen)
244
+ * @param {object} options - use options
245
+ * @param {class} options.component - angular component to render
246
+ * @param {class} options.injector - angular injector to use in component
247
+ */
248
+ openEnd(options: {
249
+ component: any;
250
+ injector: Injector;
251
+ }): Promise<void>;
252
+ /**
253
+ * @desc close menu (menu on the left side of the screen)
254
+ */
255
+ closeStart(): Promise<void>;
256
+ /**
257
+ * @desc close menu (menu on the right side of the screen)
258
+ */
259
+ closeEnd(): Promise<void>;
260
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, never>;
261
+ static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
262
+ }
233
263
 
234
- if (options.type === Todo && options.key === 'number') {
235
- return {
236
- validators: [ Validators.required ],
237
- asyncValidators: null
238
- }
239
- }
264
+ declare class ModalService {
265
+ show(options: IModalOptions): Promise<IModal>;
266
+ dismiss<T>(data?: T | null): Promise<void>;
267
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
268
+ static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
269
+ }
270
+ interface IModalOptions {
271
+ component: any;
272
+ props?: any;
273
+ mode?: 'default' | 'bottom';
274
+ cssClass?: string[];
275
+ backdropDismiss?: boolean;
276
+ }
277
+ interface IModal {
278
+ dismiss: () => void;
279
+ onDidDismiss(): Promise<{
280
+ data: any;
281
+ }>;
282
+ }
240
283
 
241
- return Promise.resolve(options.base);
242
- }
284
+ declare class AlertService {
285
+ show(options: IAlertOptions): Promise<void>;
286
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
287
+ static ɵprov: i0.ɵɵInjectableDeclaration<AlertService>;
243
288
  }
244
- */
245
- declare abstract class IModelValidatorsProvider {
246
- abstract get(options: IModelValidatorsOptions): Promise<IModelValidators>;
289
+ interface IAlertOptions {
290
+ header?: string;
291
+ subHeader?: string;
292
+ message?: string;
293
+ backdropDismiss?: boolean;
294
+ buttons?: Array<IAlertButton>;
247
295
  }
248
- interface IModelValidatorsOptions {
249
- key: string;
250
- instance: any;
251
- type?: Type<any> | (() => void);
252
- base?: IModelValidators;
296
+ interface IAlertButton {
297
+ text: string;
298
+ role?: 'cancel' | 'destructive' | string;
299
+ cssClass?: string | string[];
300
+ handler?: (value: any) => boolean | void | {
301
+ [key: string]: any;
302
+ };
253
303
  }
254
- interface IModelValidators {
255
- validators?: ValidatorFn | ValidatorFn[];
256
- asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[];
304
+
305
+ declare class PopoverService {
306
+ close(): Promise<void>;
307
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverService, never>;
308
+ static ɵprov: i0.ɵɵInjectableDeclaration<PopoverService>;
257
309
  }
258
- declare const MODEL_VALIDATORS_PROVIDER: InjectionToken<IModelValidatorsProvider>;
259
310
 
260
- declare abstract class InputBaseComponent<T> extends BaseComponent {
261
- protected cd: ChangeDetectorRef;
262
- internalOptions: InputOptions<T>;
263
- control: UntypedFormControl | UntypedFormArray | UntypedFormGroup;
264
- required: boolean;
265
- possibilities: WritableSignal<Array<{
266
- id: any;
267
- text: string;
268
- checked: boolean;
269
- }> | null>;
270
- fieldOptions: i0.InputSignal<IFieldOptions | undefined>;
271
- options: i0.InputSignal<InputOptions<T> | undefined>;
272
- constructor();
273
- protected afterSetOptionsHandler(): void;
274
- private setRequired;
275
- get formControl(): UntypedFormControl;
276
- get formControlArray(): UntypedFormArray;
277
- get formControlGroup(): UntypedFormGroup;
278
- static ɵfac: i0.ɵɵFactoryDeclaration<InputBaseComponent<any>, never>;
279
- static ɵdir: i0.ɵɵDirectiveDeclaration<InputBaseComponent<any>, never, never, { "fieldOptions": { "alias": "fieldOptions"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
311
+ declare class UIService {
312
+ showAlertWithDismissCallback(heading: string, msg: string, btnText: string, callback: () => void): Promise<void>;
313
+ static ɵfac: i0.ɵɵFactoryDeclaration<UIService, never>;
314
+ static ɵprov: i0.ɵɵInjectableDeclaration<UIService>;
280
315
  }
281
316
 
282
- declare class InputAddressComponent<T> extends InputBaseComponent<T> {
283
- static ɵfac: i0.ɵɵFactoryDeclaration<InputAddressComponent<any>, never>;
284
- static ɵcmp: i0.ɵɵComponentDeclaration<InputAddressComponent<any>, "smart-input-address", never, {}, {}, never, never, true, never>;
317
+ declare class SharedServicesModule {
318
+ static ɵfac: i0.ɵɵFactoryDeclaration<SharedServicesModule, never>;
319
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedServicesModule, never, [typeof i1.TranslateModule, typeof i2.CookieModule], never>;
320
+ static ɵinj: i0.ɵɵInjectorDeclaration<SharedServicesModule>;
285
321
  }
286
322
 
287
- declare class InputColorComponent<T> extends InputBaseComponent<T> {
288
- color: string;
289
- protected afterSetOptionsHandler(): void;
290
- selectColor(color: string): void;
291
- clear(): void;
292
- static ɵfac: i0.ɵɵFactoryDeclaration<InputColorComponent<any>, never>;
293
- static ɵcmp: i0.ɵɵComponentDeclaration<InputColorComponent<any>, "smart-input-color", never, {}, {}, never, never, true, never>;
323
+ declare class NgrxStoreService {
324
+ private static _reducers;
325
+ static store: Store<any> | undefined;
326
+ static addReducer<State, Actions extends Action = Action>(key: string, reducer: ActionReducer<State, Actions>): void;
327
+ connect(store: Store<any>): void;
328
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgrxStoreService, never>;
329
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgrxStoreService>;
294
330
  }
295
331
 
296
- declare class InputCurrencyComponent<T> extends InputBaseComponent<T> {
297
- static ɵfac: i0.ɵɵFactoryDeclaration<InputCurrencyComponent<any>, never>;
298
- static ɵcmp: i0.ɵɵComponentDeclaration<InputCurrencyComponent<any>, "smart-input-currency", never, {}, {}, never, never, true, never>;
332
+ declare class ErrorService {
333
+ private toastService;
334
+ private translateService;
335
+ constructor(toastService: ToastService, translateService: TranslateService);
336
+ log(obj: any): Promise<void>;
337
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorService, never>;
338
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErrorService>;
299
339
  }
300
340
 
301
- declare class InputDateWithEditComponent<T> extends InputBaseComponent<T> implements OnDestroy {
341
+ declare abstract class AppBaseComponent implements OnDestroy, AfterContentInit {
342
+ protected router: Router;
343
+ protected cd: ChangeDetectorRef;
344
+ protected elementRef: ElementRef<any>;
345
+ protected styleService: StyleService;
346
+ protected menuService: MenuService;
347
+ protected authService: AuthService;
348
+ protected appService: AppService;
349
+ protected readonly platformId: Object;
350
+ protected document: Document;
351
+ private readonly injector;
302
352
  private _subscriptions;
353
+ selectedPath: string;
354
+ showMenu: Signal<boolean>;
355
+ menuItems: Signal<IMenuItem[]>;
356
+ logged: Signal<boolean>;
357
+ username: Signal<string>;
358
+ loadingPage: Signal<boolean>;
359
+ logo: string | undefined;
360
+ routerEvents: Signal<_angular_router.Event | undefined>;
361
+ options: InputSignal<IAppOptions>;
362
+ endMenuContainer: Signal<ViewContainerRef | undefined>;
363
+ constructor();
364
+ logout(): void;
365
+ ngAfterContentInit(): Promise<void>;
303
366
  ngOnDestroy(): void;
304
- static ɵfac: i0.ɵɵFactoryDeclaration<InputDateWithEditComponent<any>, never>;
305
- static ɵcmp: i0.ɵɵComponentDeclaration<InputDateWithEditComponent<any>, "smart-input-date-with-edit", never, {}, {}, never, never, true, never>;
367
+ private initMenu;
368
+ private initSelectedPath;
369
+ private initLoader;
370
+ private refreshStyles;
371
+ private initPermissionClasses;
372
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppBaseComponent, never>;
373
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AppBaseComponent, never, never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
306
374
  }
307
375
 
308
- declare class InputDateComponent<T> extends InputBaseComponent<T> implements OnInit {
309
- private hardwareService;
310
- get isMobile(): boolean;
311
- ngOnInit(): void;
312
- static ɵfac: i0.ɵɵFactoryDeclaration<InputDateComponent<any>, never>;
313
- static ɵcmp: i0.ɵɵComponentDeclaration<InputDateComponent<any>, "smart-input-date", never, {}, {}, never, never, true, never>;
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>;
314
380
  }
315
381
 
316
- declare class InputEmailComponent<T> extends InputBaseComponent<T> {
317
- static ɵfac: i0.ɵɵFactoryDeclaration<InputEmailComponent<any>, never>;
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
+ declare abstract class BaseComponent implements OnDestroy {
404
+ get takeUntilDestroy(): MonoTypeOperatorFunction<any>;
405
+ destroy$: Subject<boolean>;
406
+ ngOnDestroy(): void;
407
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponent, never>;
408
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent, never, never, {}, {}, never, never, true, never>;
409
+ }
410
+ interface IDynamicComponent<T> extends BaseComponent {
411
+ baseInstance: T;
412
+ baseComponentRef: ComponentRef<T>;
413
+ template: WritableSignal<'custom' | 'default'>;
414
+ contentTpl: Signal<TemplateRef<any> | ViewContainerRef | undefined>;
415
+ dynamicContents: Signal<readonly DynamicContentDirective[]>;
416
+ refreshProperties(): void;
417
+ refreshDynamicInstance(): void;
418
+ }
419
+ declare function CreateDynamicComponent<T extends {
420
+ contentTpl: Signal<TemplateRef<any> | ViewContainerRef | undefined>;
421
+ } = any>(type: DynamicComponentType): new () => IDynamicComponent<T>;
422
+
423
+ declare abstract class ButtonBaseComponent {
424
+ static smartType: DynamicComponentType;
425
+ mode: WritableSignal<'default' | 'confirm'>;
426
+ options: InputSignal<IButtonOptions>;
427
+ disabled: InputSignal<boolean>;
428
+ contentTpl: i0.Signal<ViewContainerRef | undefined>;
429
+ invoke(): void;
430
+ confirmInvoke(): void;
431
+ confirmCancel(): void;
432
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonBaseComponent, never>;
433
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ButtonBaseComponent, never, never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
434
+ }
435
+
436
+ declare const ButtonComponent_base: new () => IDynamicComponent<ButtonBaseComponent>;
437
+ declare class ButtonComponent extends ButtonComponent_base {
438
+ options: i0.InputSignal<IButtonOptions>;
439
+ disabled: i0.InputSignal<boolean>;
440
+ contentTpl: i0.Signal<ViewContainerRef | undefined>;
441
+ dynamicContents: i0.Signal<readonly DynamicContentDirective[]>;
442
+ constructor();
443
+ refreshProperties(): void;
444
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
445
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "smart-button", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
446
+ }
447
+
448
+ 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[];
544
+ }
545
+ declare const MODEL_VALIDATORS_PROVIDER: InjectionToken<IModelValidatorsProvider>;
546
+
547
+ declare abstract class InputBaseComponent<T> extends BaseComponent {
548
+ protected cd: ChangeDetectorRef;
549
+ internalOptions: InputOptions<T>;
550
+ control: UntypedFormControl | UntypedFormArray | UntypedFormGroup;
551
+ required: boolean;
552
+ possibilities: WritableSignal<Array<{
553
+ id: any;
554
+ text: string;
555
+ checked: boolean;
556
+ }> | null>;
557
+ fieldOptions: i0.InputSignal<IFieldOptions | undefined>;
558
+ options: i0.InputSignal<InputOptions<T> | undefined>;
559
+ constructor();
560
+ protected afterSetOptionsHandler(): void;
561
+ private setRequired;
562
+ get formControl(): UntypedFormControl;
563
+ get formControlArray(): UntypedFormArray;
564
+ get formControlGroup(): UntypedFormGroup;
565
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputBaseComponent<any>, never>;
566
+ static ɵdir: i0.ɵɵDirectiveDeclaration<InputBaseComponent<any>, never, never, { "fieldOptions": { "alias": "fieldOptions"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
567
+ }
568
+
569
+ declare class InputAddressComponent<T> extends InputBaseComponent<T> {
570
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputAddressComponent<any>, never>;
571
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputAddressComponent<any>, "smart-input-address", never, {}, {}, never, never, true, never>;
572
+ }
573
+
574
+ declare class InputColorComponent<T> extends InputBaseComponent<T> {
575
+ color: string;
576
+ protected afterSetOptionsHandler(): void;
577
+ selectColor(color: string): void;
578
+ clear(): void;
579
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputColorComponent<any>, never>;
580
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputColorComponent<any>, "smart-input-color", never, {}, {}, never, never, true, never>;
581
+ }
582
+
583
+ declare class InputCurrencyComponent<T> extends InputBaseComponent<T> {
584
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputCurrencyComponent<any>, never>;
585
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputCurrencyComponent<any>, "smart-input-currency", never, {}, {}, never, never, true, never>;
586
+ }
587
+
588
+ declare class InputDateWithEditComponent<T> extends InputBaseComponent<T> implements OnDestroy {
589
+ private _subscriptions;
590
+ ngOnDestroy(): void;
591
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputDateWithEditComponent<any>, never>;
592
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputDateWithEditComponent<any>, "smart-input-date-with-edit", never, {}, {}, never, never, true, never>;
593
+ }
594
+
595
+ declare class InputDateComponent<T> extends InputBaseComponent<T> implements OnInit {
596
+ private hardwareService;
597
+ get isMobile(): boolean;
598
+ ngOnInit(): void;
599
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputDateComponent<any>, never>;
600
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputDateComponent<any>, "smart-input-date", never, {}, {}, never, never, true, never>;
601
+ }
602
+
603
+ declare class InputEmailComponent<T> extends InputBaseComponent<T> {
604
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputEmailComponent<any>, never>;
318
605
  static ɵcmp: i0.ɵɵComponentDeclaration<InputEmailComponent<any>, "smart-input-email", never, {}, {}, never, never, true, never>;
319
606
  }
320
607
 
@@ -959,15 +1246,15 @@ declare abstract class ListBaseComponent<T extends IEntity<string>> {
959
1246
 
960
1247
  declare const ListComponent_base: new () => IDynamicComponent<ListBaseComponent<any>>;
961
1248
  declare class ListComponent<T extends IEntity<string>> extends ListComponent_base {
962
- private hardwareService;
963
1249
  private _options;
1250
+ private hardwareService;
964
1251
  mode: Signal<ListMode>;
965
1252
  ListMode: typeof ListMode;
966
1253
  options: i0.InputSignal<IListOptions<T>>;
967
1254
  get internalOptions(): IListInternalOptions<T>;
968
1255
  contentTpl: Signal<TemplateRef<any> | undefined>;
969
1256
  dynamicContents: Signal<readonly DynamicContentDirective[]>;
970
- constructor(hardwareService: HardwareService);
1257
+ constructor();
971
1258
  refreshProperties(): void;
972
1259
  private initFields;
973
1260
  private initModel;
@@ -1200,8 +1487,6 @@ declare class PasswordStrengthComponent implements OnChanges {
1200
1487
  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>;
1201
1488
  }
1202
1489
 
1203
- type IStyle = Record<string, string | undefined>;
1204
-
1205
1490
  interface IAppOptions {
1206
1491
  provider: IAppProvider;
1207
1492
  logo?: string;
@@ -1287,424 +1572,114 @@ interface IMenuItem {
1287
1572
  click?: (arg0: IMenuItem) => void;
1288
1573
  caption?: string;
1289
1574
  component?: any;
1290
- icon?: string;
1291
- infos?: Array<{
1292
- text: string;
1293
- }>;
1294
- }
1295
- interface IButtonOptions {
1296
- type?: 'submit' | 'button';
1297
- expand?: 'block' | 'full' | undefined;
1298
- confirm?: boolean;
1299
- color?: 'primary' | 'light' | string;
1300
- click: () => void;
1301
- loading?: Signal<boolean>;
1302
- }
1303
- interface IDetailOptions<T> {
1304
- key: string;
1305
- item?: Signal<T>;
1306
- options: IFieldOptions;
1307
- cellPipe?: ICellPipe<T>;
1308
- loading?: Signal<boolean>;
1309
- }
1310
- interface ICellPipe<T> extends PipeTransform {
1311
- transform(value: T, columnName: string, translate?: (val: string) => string): string;
1312
- }
1313
- interface IPageOptions {
1314
- title: string;
1315
- hideHeader?: boolean;
1316
- hideMenuButton?: boolean;
1317
- showBackButton?: boolean;
1318
- endButtons?: Array<IIconButtonOptions>;
1319
- search?: {
1320
- text: Signal<string>;
1321
- set: (txt: string) => void;
1322
- };
1323
- }
1324
- interface IListProvider<T> {
1325
- getData: (filter: any) => void;
1326
- onChangeMultiSelected?: (list: Array<T>) => void;
1327
- onCleanMultiSelected$?: Observable<void>;
1328
- list: Signal<T[]>;
1329
- loading: Signal<boolean>;
1330
- }
1331
- interface IListPaginationOptions {
1332
- mode?: PaginationMode;
1333
- limit: number;
1334
- loadNextPage: () => Promise<boolean>;
1335
- loadPrevPage: () => Promise<boolean>;
1336
- page: Signal<number>;
1337
- totalPages: Signal<number>;
1338
- }
1339
- declare enum PaginationMode {
1340
- infiniteScroll = "infiniteScroll",
1341
- singlePage = "singlePage"
1342
- }
1343
- declare enum ListMode {
1344
- mobile = "mobile",
1345
- desktop = "desktop",
1346
- masonryGrid = "masonryGrid"
1347
- }
1348
- interface IItemOptionsForPage {
1349
- routingPrefix: string;
1350
- edit: boolean;
1351
- }
1352
- interface IItemOptionsForCustom {
1353
- select: (id: string) => void;
1354
- edit: boolean;
1355
- }
1356
- type ItemOptions = IItemOptionsForPage | IItemOptionsForCustom;
1357
- interface IListComponentFactories<T> {
1358
- top?: ComponentFactory<any>;
1359
- }
1360
- interface IDetailsProvider<T> {
1361
- getData: (id: string) => void;
1362
- clearData: () => void;
1363
- item: Signal<T>;
1364
- loading: Signal<boolean>;
1365
- }
1366
- interface IListOptions<T> {
1367
- provider: IListProvider<T>;
1368
- type: any;
1369
- mode?: ListMode;
1370
- pagination?: IListPaginationOptions;
1371
- cellPipe?: ICellPipe<T>;
1372
- componentFactories?: IListComponentFactories<T>;
1373
- sort?: boolean | {
1374
- default?: string;
1375
- defaultDesc?: boolean;
1376
- };
1377
- details?: boolean | {
1378
- provider?: IDetailsProvider<T>;
1379
- componentFactories?: IDetailsComponentFactories<T>;
1380
- };
1381
- item?: boolean | {
1382
- options?: ItemOptions;
1383
- };
1384
- remove?: boolean | {
1385
- provider?: IRemoveProvider<T>;
1386
- };
1387
- select?: 'multi';
1388
- }
1389
- interface IRemoveProvider<T> {
1390
- invoke: (id: string) => void;
1391
- check?: (item: T) => boolean;
1392
- }
1393
- interface IListInternalOptions<T> extends IListOptions<T> {
1394
- fields?: Array<{
1395
- key: string;
1396
- options: IFieldOptions;
1397
- }>;
1398
- }
1399
-
1400
- declare class AppService {
1401
- private titleService;
1402
- private translate;
1403
- private router;
1404
- private static _endButtonsSource$;
1405
- private static _titleSource$;
1406
- private _baseTitle;
1407
- endButtons$: rxjs.Observable<AppEndButton[]>;
1408
- title$: rxjs.Observable<string>;
1409
- addEndButton(button: AppEndButton): void;
1410
- removeEndButton(buttonOrId: AppEndButton | string): void;
1411
- initTitle(): void;
1412
- static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
1413
- static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
1414
- }
1415
- type AppEndButton = IIconButtonOptions & {
1416
- id?: string;
1417
- };
1418
-
1419
- interface month {
1420
- dates: moment.Moment[];
1421
- number: string;
1422
- monthName: string;
1423
- year: string;
1424
- }
1425
- interface state {
1426
- date: moment.Moment;
1427
- calendar: month[];
1428
- }
1429
- declare class CalendarService {
1430
- state: state;
1431
- constructor();
1432
- setState: (nextState: Partial<state>) => void;
1433
- getCalendar(): month[];
1434
- generatePrevMonths(): void;
1435
- generateNextMonths(): void;
1436
- private initCalendar;
1437
- private previousMonth;
1438
- private filterFutureDates;
1439
- private generateMonth;
1440
- private generateMonthDates;
1441
- static ɵfac: i0.ɵɵFactoryDeclaration<CalendarService, never>;
1442
- static ɵprov: i0.ɵɵInjectableDeclaration<CalendarService>;
1443
- }
1444
-
1445
- declare class StorageService {
1446
- setItem(key: string, value: any): void;
1447
- getItem(key: string): any;
1448
- removeItem(key: string): void;
1449
- clear(): void;
1450
- static ɵfac: i0.ɵɵFactoryDeclaration<StorageService, never>;
1451
- static ɵprov: i0.ɵɵInjectableDeclaration<StorageService>;
1452
- }
1453
-
1454
- declare const AUTH_TOKEN = "AUTH_TOKEN";
1455
- declare class AuthService {
1456
- protected storageService: StorageService;
1457
- isAuthenticated(): boolean;
1458
- expectPermissions(permissions: Array<string> | null): boolean;
1459
- getPermissions(): Array<string>;
1460
- getTokenPayload(): any;
1461
- protected getRawToken(): {
1462
- access_token: string;
1463
- } | null;
1464
- protected getToken(): {
1465
- access_token: string;
1466
- } | null;
1467
- setToken(token: {
1468
- access_token: string;
1469
- } | null): void;
1470
- removeToken(): void;
1471
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
1472
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
1473
- }
1474
-
1475
- declare class DetailsService {
1476
- private _root;
1477
- get $root(): any;
1478
- constructor();
1479
- init(): void;
1480
- setRoot(obj: any, force?: boolean): void;
1481
- static ɵfac: i0.ɵɵFactoryDeclaration<DetailsService, never>;
1482
- static ɵprov: i0.ɵɵInjectableDeclaration<DetailsService>;
1483
- }
1484
-
1485
- declare class DynamicComponentLoader<T> {
1486
- private resolver;
1487
- static declaredComponents: any[];
1488
- getComponentsWithFactories<C>(options: {
1489
- components: Array<any>;
1490
- }): Promise<{
1491
- component: any;
1492
- factory: ComponentFactory<any>;
1493
- }[]>;
1494
- static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentLoader<any>, never>;
1495
- static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentLoader<any>>;
1496
- }
1497
-
1498
- declare const DYNAMIC_COMPONENTS_STORE: InjectionToken<[Type<any>]>;
1499
- declare class DynamicComponentStorageService {
1500
- static get(key: string, moduleRef: NgModuleRef<any>): Type<any>[];
1501
- }
1502
-
1503
- declare const FILE_SERVICE_CONFIG: InjectionToken<IFileServiceConfig>;
1504
- interface IFileServiceConfig {
1505
- apiUrl: string;
1506
- }
1507
- declare class FileService {
1508
- private config;
1509
- private http;
1510
- upload<T>(file: File, callback?: (result: T) => void): Observable<number>;
1511
- download(id: string): void;
1512
- delete(id: string): Promise<void>;
1513
- getUrl(id: string): string;
1514
- static ɵfac: i0.ɵɵFactoryDeclaration<FileService, never>;
1515
- static ɵprov: i0.ɵɵInjectableDeclaration<FileService>;
1516
- }
1517
-
1518
- declare class SmartFormGroup extends UntypedFormGroup {
1519
- static create(): SmartFormGroup;
1520
- setForm(form: UntypedFormGroup): void;
1521
- }
1522
-
1523
- declare class StyleService {
1524
- private platformId;
1525
- static style: IStyle | null;
1526
- private _elementRef;
1527
- static create(platformId: object, el: ElementRef, style?: Partial<IStyle>): StyleService;
1528
- constructor(platformId: object);
1529
- init(el: ElementRef, style?: IStyle): void;
1530
- set(style?: IStyle): void;
1531
- private execute;
1532
- private setColor;
1533
- private setProperty;
1534
- private setFont;
1535
- private setButton;
1536
- private setMobileBreakpoint;
1537
- static ɵfac: i0.ɵɵFactoryDeclaration<StyleService, never>;
1538
- static ɵprov: i0.ɵɵInjectableDeclaration<StyleService>;
1539
- }
1540
-
1541
- declare class ToastService {
1542
- static lockError: number;
1543
- addLockError(): void;
1544
- removeLockError(): void;
1545
- error(config: IToastOptions): Promise<void>;
1546
- info(config: IToastOptions): Promise<void>;
1547
- static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
1548
- static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>;
1549
- }
1550
- interface IToastOptions {
1551
- title?: string;
1552
- message: string;
1553
- duration?: number;
1554
- buttons?: Array<IToastButton>;
1575
+ icon?: string;
1576
+ infos?: Array<{
1577
+ text: string;
1578
+ }>;
1555
1579
  }
1556
- interface IToastButton {
1557
- text: string;
1558
- position: 'start' | 'end';
1559
- handler: () => void;
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>;
1560
1587
  }
1561
-
1562
- declare class HardwareService {
1563
- get isMobile(): boolean;
1564
- get isMobileWeb(): boolean;
1565
- onBackButtonClick(callback: () => void): Promise</*PluginListenerHandle*/ any>;
1566
- static ɵfac: i0.ɵɵFactoryDeclaration<HardwareService, never>;
1567
- static ɵprov: i0.ɵɵInjectableDeclaration<HardwareService>;
1588
+ interface IDetailOptions<T> {
1589
+ key: string;
1590
+ item?: Signal<T>;
1591
+ options: IFieldOptions;
1592
+ cellPipe?: ICellPipe<T>;
1593
+ loading?: Signal<boolean>;
1568
1594
  }
1569
-
1570
- /**
1571
- * Only to use in smart-page
1572
- * @requires PageComponent
1573
- */
1574
- declare class MenuService {
1575
- private readonly resolver;
1576
- private _endContainer;
1577
- private _openedEnd;
1578
- menuItems: i0.WritableSignal<IMenuItem[]>;
1579
- disabled: i0.WritableSignal<boolean>;
1580
- /**
1581
- * @desc checking if the menu is open (menu on the right side of the screen)
1582
- */
1583
- get openedEnd(): boolean;
1584
- enable(): void;
1585
- disable(): void;
1586
- changeMenuItemByRoute(route: string, changes: Partial<IMenuItem>): void;
1587
- setMenuItems(items: IMenuItem[]): void;
1588
- /**
1589
- * @private
1590
- */
1591
- init(endContainer: ViewContainerRef): Promise<void>;
1592
- /**
1593
- * @desc open menu (menu on the right side of the screen)
1594
- * @param {object} options - use options
1595
- * @param {class} options.component - angular component to render
1596
- * @param {class} options.injector - angular injector to use in component
1597
- */
1598
- openEnd(options: {
1599
- component: any;
1600
- injector: Injector;
1601
- }): Promise<void>;
1602
- /**
1603
- * @desc close menu (menu on the left side of the screen)
1604
- */
1605
- closeStart(): Promise<void>;
1606
- /**
1607
- * @desc close menu (menu on the right side of the screen)
1608
- */
1609
- closeEnd(): Promise<void>;
1610
- static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, never>;
1611
- static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
1595
+ interface ICellPipe<T> extends PipeTransform {
1596
+ transform(value: T, columnName: string, translate?: (val: string) => string): string;
1612
1597
  }
1613
-
1614
- declare class ModalService {
1615
- show(options: IModalOptions): Promise<IModal>;
1616
- dismiss<T>(data?: T | null): Promise<void>;
1617
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
1618
- static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
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
+ };
1619
1608
  }
1620
- interface IModalOptions {
1621
- component: any;
1622
- props?: any;
1623
- mode?: 'default' | 'bottom';
1624
- cssClass?: string[];
1625
- backdropDismiss?: boolean;
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>;
1626
1615
  }
1627
- interface IModal {
1628
- dismiss: () => void;
1629
- onDidDismiss(): Promise<{
1630
- data: any;
1631
- }>;
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>;
1632
1623
  }
1633
-
1634
- declare class AlertService {
1635
- show(options: IAlertOptions): Promise<void>;
1636
- static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
1637
- static ɵprov: i0.ɵɵInjectableDeclaration<AlertService>;
1624
+ declare enum PaginationMode {
1625
+ infiniteScroll = "infiniteScroll",
1626
+ singlePage = "singlePage"
1638
1627
  }
1639
- interface IAlertOptions {
1640
- header?: string;
1641
- subHeader?: string;
1642
- message?: string;
1643
- backdropDismiss?: boolean;
1644
- buttons?: Array<IAlertButton>;
1628
+ declare enum ListMode {
1629
+ mobile = "mobile",
1630
+ desktop = "desktop",
1631
+ masonryGrid = "masonryGrid"
1645
1632
  }
1646
- interface IAlertButton {
1647
- text: string;
1648
- role?: 'cancel' | 'destructive' | string;
1649
- cssClass?: string | string[];
1650
- handler?: (value: any) => boolean | void | {
1651
- [key: string]: any;
1652
- };
1633
+ interface IItemOptionsForPage {
1634
+ routingPrefix: string;
1635
+ edit: boolean;
1653
1636
  }
1654
-
1655
- declare class PopoverService {
1656
- close(): Promise<void>;
1657
- static ɵfac: i0.ɵɵFactoryDeclaration<PopoverService, never>;
1658
- static ɵprov: i0.ɵɵInjectableDeclaration<PopoverService>;
1637
+ interface IItemOptionsForCustom {
1638
+ select: (id: string) => void;
1639
+ edit: boolean;
1659
1640
  }
1660
-
1661
- declare class UIService {
1662
- showAlertWithDismissCallback(heading: string, msg: string, btnText: string, callback: () => void): Promise<void>;
1663
- static ɵfac: i0.ɵɵFactoryDeclaration<UIService, never>;
1664
- static ɵprov: i0.ɵɵInjectableDeclaration<UIService>;
1641
+ type ItemOptions = IItemOptionsForPage | IItemOptionsForCustom;
1642
+ interface IListComponentFactories<T> {
1643
+ top?: ComponentFactory<any>;
1665
1644
  }
1666
-
1667
- declare class NgrxStoreService {
1668
- private static _reducers;
1669
- static store: Store<any> | undefined;
1670
- static addReducer<State, Actions extends Action = Action>(key: string, reducer: ActionReducer<State, Actions>): void;
1671
- connect(store: Store<any>): void;
1672
- static ɵfac: i0.ɵɵFactoryDeclaration<NgrxStoreService, never>;
1673
- static ɵprov: i0.ɵɵInjectableDeclaration<NgrxStoreService>;
1645
+ interface IDetailsProvider<T> {
1646
+ getData: (id: string) => void;
1647
+ clearData: () => void;
1648
+ item: Signal<T>;
1649
+ loading: Signal<boolean>;
1674
1650
  }
1675
-
1676
- declare class ErrorService {
1677
- private toastService;
1678
- private translateService;
1679
- constructor(toastService: ToastService, translateService: TranslateService);
1680
- log(obj: any): Promise<void>;
1681
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorService, never>;
1682
- static ɵprov: i0.ɵɵInjectableDeclaration<ErrorService>;
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';
1683
1673
  }
1684
-
1685
- declare class FormFactory {
1686
- private fb;
1687
- private authService;
1688
- private detailsService;
1689
- private validatorsProvider;
1690
- static checkModelMeta<T>(obj: T): void;
1691
- static getOptions<T>(obj: T, key: string): IFieldOptions;
1692
- static getOptionsFromMode(options: IFieldOptions, mode?: 'create' | 'update' | string): IFieldOptions;
1693
- create<T>(obj: T, ops?: {
1694
- mode?: 'create' | 'update' | 'multiUpdate' | string;
1695
- uniqueProvider?: (values: Record<string, any>) => Promise<boolean>;
1696
- root?: AbstractControl;
1697
- }): Promise<SmartFormGroup>;
1698
- private setValidators;
1699
- private createControl;
1700
- static ɵfac: i0.ɵɵFactoryDeclaration<FormFactory, never>;
1701
- static ɵprov: i0.ɵɵInjectableDeclaration<FormFactory>;
1674
+ interface IRemoveProvider<T> {
1675
+ invoke: (id: string) => void;
1676
+ check?: (item: T) => boolean;
1702
1677
  }
1703
-
1704
- declare class SharedFactoriesModule {
1705
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedFactoriesModule, never>;
1706
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedFactoriesModule, never, [typeof i2$1.ReactiveFormsModule], never>;
1707
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedFactoriesModule>;
1678
+ interface IListInternalOptions<T> extends IListOptions<T> {
1679
+ fields?: Array<{
1680
+ key: string;
1681
+ options: IFieldOptions;
1682
+ }>;
1708
1683
  }
1709
1684
 
1710
1685
  declare class ModelLabelPipe<T> implements PipeTransform {
@@ -1766,6 +1741,31 @@ declare class SharedPipesModule {
1766
1741
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedPipesModule>;
1767
1742
  }
1768
1743
 
1744
+ declare class FormFactory {
1745
+ private fb;
1746
+ private authService;
1747
+ private detailsService;
1748
+ private validatorsProvider;
1749
+ static checkModelMeta<T>(obj: T): void;
1750
+ static getOptions<T>(obj: T, key: string): IFieldOptions;
1751
+ static getOptionsFromMode(options: IFieldOptions, mode?: 'create' | 'update' | string): IFieldOptions;
1752
+ create<T>(obj: T, ops?: {
1753
+ mode?: 'create' | 'update' | 'multiUpdate' | string;
1754
+ uniqueProvider?: (values: Record<string, any>) => Promise<boolean>;
1755
+ root?: AbstractControl;
1756
+ }): Promise<SmartFormGroup>;
1757
+ private setValidators;
1758
+ private createControl;
1759
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFactory, never>;
1760
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormFactory>;
1761
+ }
1762
+
1763
+ declare class SharedFactoriesModule {
1764
+ static ɵfac: i0.ɵɵFactoryDeclaration<SharedFactoriesModule, never>;
1765
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedFactoriesModule, never, [typeof i2$1.ReactiveFormsModule], never>;
1766
+ static ɵinj: i0.ɵɵInjectorDeclaration<SharedFactoriesModule>;
1767
+ }
1768
+
1769
1769
  declare class DetailsPage<T extends IEntity<string>> implements OnInit {
1770
1770
  private modalService;
1771
1771
  private styleService;