@meshmakers/shared-services 3.3.34 → 3.3.380

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 DELETED
@@ -1,189 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ModuleWithProviders } from '@angular/core';
3
- import * as rxjs from 'rxjs';
4
- import { BehaviorSubject, Observable } from 'rxjs';
5
- import { DataSource, CollectionViewer } from '@angular/cdk/collections';
6
- import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
7
-
8
- declare class SharedServicesModule {
9
- static forRoot(): ModuleWithProviders<SharedServicesModule>;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedServicesModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedServicesModule, never, never, never>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<SharedServicesModule>;
13
- }
14
-
15
- interface Breadcrumb {
16
- label: string;
17
- url: string;
18
- }
19
-
20
- declare class BreadcrumbService {
21
- private readonly _breadcrumbLabels;
22
- private readonly _newBreadcrumb;
23
- constructor();
24
- get breadcrumbLabels(): BehaviorSubject<any>;
25
- get newBreadcrumb(): BehaviorSubject<Breadcrumb[]>;
26
- updateBreadcrumbLabels(labels: any): void;
27
- updateBreadcrumb(newBreadcrumb: Breadcrumb[]): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbService, never>;
29
- static ɵprov: i0.ɵɵInjectableDeclaration<BreadcrumbService>;
30
- }
31
-
32
- declare class ErrorMessage {
33
- title?: string;
34
- message?: string;
35
- }
36
-
37
- declare class MessageService {
38
- private readonly snackBar;
39
- latestErrorMessage: BehaviorSubject<ErrorMessage | null>;
40
- errorMessages: ErrorMessage[];
41
- constructor();
42
- getErrorMessageCount(): number;
43
- getErrorMessage(index: number): ErrorMessage;
44
- getLatestErrorMessage(): Observable<ErrorMessage | null>;
45
- showError(message: string, title: string): void;
46
- showErrorWithDetails(error: any): void;
47
- showErrorMessage(message: string): void;
48
- showInformation(message: string): void;
49
- clearCurrentError(): void;
50
- clearAllErrors(): void;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, never>;
52
- static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
53
- }
54
-
55
- declare class AutoCompleteResult {
56
- searchTerm?: string;
57
- list?: string[];
58
- }
59
-
60
- declare class PagedResultDto<T> {
61
- skip: number;
62
- take: number;
63
- totalCount: number;
64
- list: T[];
65
- constructor();
66
- }
67
-
68
- declare class DataSourceBase<TDto> implements DataSource<TDto> {
69
- private readonly dataSubject;
70
- private readonly loadingSubject;
71
- private readonly totalCountSubject;
72
- readonly loading$: Observable<boolean>;
73
- readonly totalCount$: Observable<number>;
74
- private readonly addedDtoList;
75
- private readonly removedDtoList;
76
- private lastPagedResult;
77
- get totalCount(): Observable<number>;
78
- reset(): void;
79
- addTemporaryDto(dto: TDto): void;
80
- removeTemporaryDto(dto: TDto): void;
81
- get addedTemporaryDtos(): TDto[];
82
- get removedTemporaryDtos(): TDto[];
83
- connect(_: CollectionViewer): Observable<readonly TDto[]>;
84
- disconnect(_: CollectionViewer): void;
85
- clear(): void;
86
- protected onBeginLoad(): void;
87
- protected onCompleteLoad(pagedResult: PagedResultDto<TDto>): void;
88
- private onEndLoad;
89
- }
90
-
91
- declare class GenericDataSource<TEntity> implements DataSource<TEntity> {
92
- data: TEntity[];
93
- private readonly dataSubject;
94
- constructor(data: TEntity[]);
95
- emitChanged(): void;
96
- connect(_: CollectionViewer): Observable<TEntity[]>;
97
- disconnect(_: CollectionViewer): void;
98
- }
99
-
100
- interface EntitySelectDataSource<T> {
101
- onFilter: (filter: string) => Promise<PagedResultDto<T>>;
102
- onDisplayEntity: (entity: T) => string;
103
- getIdEntity: (entity: T) => any;
104
- }
105
-
106
- interface AutoCompleteDataSource {
107
- onFilter: (filter: string) => Observable<AutoCompleteResult>;
108
- onPreprocessSearchString: (search: string) => string;
109
- }
110
-
111
- declare class IsoDateTime {
112
- static utcToLocalDateTimeIso(utcDateTime: string): string | null;
113
- static localToUtcDateTimeIso(localDateTime: string): string | null;
114
- static currentUtcDateTimeIso(): string;
115
- }
116
-
117
- declare class EnumTuple<TValue = number> {
118
- id: string | undefined;
119
- name: TValue | undefined;
120
- }
121
- declare class EnumReader<TValue = number> {
122
- private readonly value;
123
- constructor(value: Record<string, TValue>);
124
- getNamesAndValues(): EnumTuple<TValue>[];
125
- getNames(): string[];
126
- private getObjValues;
127
- }
128
-
129
- declare class ObjectCloner {
130
- static cloneArray<TR, TS1>(source: TS1[], ignoreProperties?: string[] | null): TR[];
131
- static cloneObject<TR, TS1>(source: TS1, ignoreProperties?: string[] | null): TR;
132
- static cloneObject2<TR, TS1, TS2>(source: TS1, source2: TS2, ignoreProperties?: string[] | null): TR;
133
- }
134
-
135
- declare class NfcReaderService {
136
- private ndef;
137
- private abortController;
138
- private nfcStatusSubject;
139
- nfcStatus$: rxjs.Observable<string>;
140
- constructor();
141
- private convertSerialToEmployeeNumber;
142
- startScan(onSuccess: (serial: string, employeeNumber: string, messages: string[]) => void, onError: (error: string) => void): Promise<void>;
143
- stopScan(): void;
144
- static ɵfac: i0.ɵɵFactoryDeclaration<NfcReaderService, never>;
145
- static ɵprov: i0.ɵɵInjectableDeclaration<NfcReaderService>;
146
- }
147
-
148
- declare class QrCodeScannerService {
149
- private stream;
150
- isSupported(): Promise<boolean>;
151
- scan(video: HTMLVideoElement): Promise<string>;
152
- stop(): void;
153
- static ɵfac: i0.ɵɵFactoryDeclaration<QrCodeScannerService, never>;
154
- static ɵprov: i0.ɵɵInjectableDeclaration<QrCodeScannerService>;
155
- }
156
-
157
- interface ParseResult {
158
- location: string;
159
- machineId: string;
160
- }
161
- interface ParseResponse {
162
- success: boolean;
163
- message: string;
164
- data?: ParseResult;
165
- }
166
- declare class MacoSchemeDecoderService {
167
- private locationMap;
168
- /**
169
- * Parses a MACO scheme URL and extracts a mapped location code and machine ID from the last URL segment.
170
- *
171
- * @param url - The URL to parse.
172
- * @returns A `ParseResponse` containing:
173
- * - `success: true` with extracted location and machine ID if parsing is successful.
174
- * - `success: false` with an error message if the input is invalid or cannot be parsed.
175
- */
176
- parseUrl(url: string): ParseResponse;
177
- static ɵfac: i0.ɵɵFactoryDeclaration<MacoSchemeDecoderService, never>;
178
- static ɵprov: i0.ɵɵInjectableDeclaration<MacoSchemeDecoderService>;
179
- }
180
-
181
- declare class MmHttpErrorInterceptor implements HttpInterceptor {
182
- private readonly messageService;
183
- intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
184
- static ɵfac: i0.ɵɵFactoryDeclaration<MmHttpErrorInterceptor, never>;
185
- static ɵprov: i0.ɵɵInjectableDeclaration<MmHttpErrorInterceptor>;
186
- }
187
-
188
- export { AutoCompleteResult, BreadcrumbService, DataSourceBase, EnumReader, EnumTuple, ErrorMessage, GenericDataSource, IsoDateTime, MacoSchemeDecoderService, MessageService, MmHttpErrorInterceptor, NfcReaderService, ObjectCloner, PagedResultDto, QrCodeScannerService, SharedServicesModule };
189
- export type { AutoCompleteDataSource, Breadcrumb, EntitySelectDataSource, ParseResponse, ParseResult };