@wawjs/ngx-bos 22.0.4 → 22.0.6
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/AGENTS.md +4 -0
- package/README.md +12 -5
- package/RELEASES.md +15 -0
- package/ai/code-style.md +15 -0
- package/fesm2022/wawjs-ngx-bos-ngx-bos.config-B6tWU_X3.mjs +29 -0
- package/fesm2022/wawjs-ngx-bos-ngx-bos.config-B6tWU_X3.mjs.map +1 -0
- package/fesm2022/wawjs-ngx-bos-user.service-DFgHcvNR.mjs +187 -0
- package/fesm2022/wawjs-ngx-bos-user.service-DFgHcvNR.mjs.map +1 -0
- package/fesm2022/wawjs-ngx-bos.mjs +3065 -2293
- package/fesm2022/wawjs-ngx-bos.mjs.map +1 -1
- package/package.json +10 -10
- package/src/feature/file/file.component.ts +56 -53
- package/src/feature/file/file.service.ts +4 -3
- package/src/feature/file/file.util.ts +9 -2
- package/src/feature/file/pages/files/files.component.html +1 -1
- package/src/feature/file/pages/files/files.component.ts +5 -6
- package/src/feature/user/guards/admins.guard.ts +5 -12
- package/src/feature/user/guards/authenticated.guard.ts +3 -10
- package/src/feature/user/guards/guest.guard.ts +3 -3
- package/src/feature/user/pages/users/users.component.ts +2 -6
- package/src/feature/user/user.service.ts +25 -28
- package/src/feature/user/user.storage.ts +31 -0
- package/src/icons/spider/spider.component.ts +4 -4
- package/src/ngx-bos.config.ts +1 -1
- package/src/pages/form/form.component.ts +21 -7
- package/src/pages/forms/forms.component.ts +9 -22
- package/src/public-api.ts +1 -1
- package/types/wawjs-ngx-bos.d.ts +402 -305
package/types/wawjs-ngx-bos.d.ts
CHANGED
|
@@ -1,338 +1,435 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { FormComponentInterface, FormInterface,
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
userForm?: FormComponentInterface[];
|
|
19
|
-
signPath?: string;
|
|
20
|
-
profilePath?: string;
|
|
21
|
-
defaultUserThumb?: string;
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, InjectionToken, PipeTransform, Provider, TemplateRef, Type } from "@angular/core";
|
|
3
|
+
import { Form, FormComponentInterface, FormInterface, Formcomponent, FormcomponentService } from "@wawjs/ngx-form";
|
|
4
|
+
import { CrudComponent, CrudDocument, CrudService } from "@wawjs/ngx-crud";
|
|
5
|
+
import { SelectValue } from "@wawjs/ngx-ui";
|
|
6
|
+
import { CanActivateFn, Routes } from "@angular/router";
|
|
7
|
+
import { CountryCode } from "libphonenumber-js";
|
|
8
|
+
export interface NgxBosConfig {
|
|
9
|
+
appId?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
cdnUrl?: string;
|
|
12
|
+
roles?: string[];
|
|
13
|
+
userFields?: string[];
|
|
14
|
+
userForm?: FormComponentInterface[];
|
|
15
|
+
signPath?: string;
|
|
16
|
+
profilePath?: string;
|
|
17
|
+
defaultUserThumb?: string;
|
|
22
18
|
}
|
|
23
|
-
declare const DEFAULT_NGX_BOS_CONFIG: Required<NgxBosConfig>;
|
|
24
|
-
declare const NGX_BOS_CONFIG: InjectionToken<Required<NgxBosConfig>>;
|
|
25
|
-
declare function ngxBosProvide(config?: NgxBosConfig): EnvironmentProviders;
|
|
26
|
-
declare const provideNgxBos: typeof ngxBosProvide;
|
|
27
|
-
|
|
28
|
-
type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
19
|
+
export declare const DEFAULT_NGX_BOS_CONFIG: Required<NgxBosConfig>;
|
|
20
|
+
export declare const NGX_BOS_CONFIG: InjectionToken<Required<NgxBosConfig>>;
|
|
21
|
+
export declare function ngxBosProvide(config?: NgxBosConfig): EnvironmentProviders;
|
|
22
|
+
export declare const provideNgxBos: typeof ngxBosProvide;
|
|
23
|
+
export type FileMode = 'single-image' | 'single-file' | 'multi-image' | 'multi-file';
|
|
24
|
+
export type FileView = 'dropzone' | 'list' | 'thumb-only';
|
|
25
|
+
export declare class FileComponent {
|
|
26
|
+
/** UI props */
|
|
27
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
28
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
29
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
readonly clearable: import("@angular/core").InputSignal<boolean>;
|
|
31
|
+
readonly accept: import("@angular/core").InputSignal<string>;
|
|
32
|
+
readonly preview: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
/** Behaviour */
|
|
34
|
+
readonly mode: import("@angular/core").InputSignal<FileMode>;
|
|
35
|
+
readonly view: import("@angular/core").InputSignal<FileView>;
|
|
36
|
+
/** Optional crop box (for image modes) */
|
|
37
|
+
readonly cropWidth: import("@angular/core").InputSignal<number | null>;
|
|
38
|
+
readonly cropHeight: import("@angular/core").InputSignal<number | null>;
|
|
39
|
+
/** Custom templates */
|
|
40
|
+
readonly t_item: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
|
|
41
|
+
readonly t_empty: import("@angular/core").InputSignal<TemplateRef<unknown> | undefined>;
|
|
42
|
+
/** Back-end routing */
|
|
43
|
+
readonly container: import("@angular/core").InputSignal<string>;
|
|
44
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
45
|
+
/** Separate models for each mode */
|
|
46
|
+
readonly wImage: import("@angular/core").ModelSignal<string | null>;
|
|
47
|
+
readonly wFile: import("@angular/core").ModelSignal<string | null>;
|
|
48
|
+
readonly wImages: import("@angular/core").ModelSignal<string[]>;
|
|
49
|
+
readonly wFiles: import("@angular/core").ModelSignal<string[]>;
|
|
50
|
+
private readonly _modal;
|
|
51
|
+
private readonly _fs;
|
|
52
|
+
readonly isMultiple: import("@angular/core").Signal<boolean>;
|
|
53
|
+
readonly isImageMode: import("@angular/core").Signal<boolean>;
|
|
54
|
+
/** Normalized list of URLs for rendering */
|
|
55
|
+
readonly files: import("@angular/core").Signal<string[]>;
|
|
56
|
+
triggerPick(input: HTMLInputElement): void;
|
|
57
|
+
isImage(src: string): boolean;
|
|
58
|
+
onPicked(input: HTMLInputElement): Promise<void>;
|
|
59
|
+
removeAt(index: number): void;
|
|
60
|
+
clear(): void;
|
|
61
|
+
private _cropStageWidth;
|
|
62
|
+
private _cropStageHeight;
|
|
63
|
+
private _applyNewUrls;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileComponent, never>;
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileComponent, "ngx-file", never, {
|
|
66
|
+
"label": {
|
|
67
|
+
"alias": "label";
|
|
68
|
+
"required": false;
|
|
69
|
+
"isSignal": true;
|
|
70
|
+
};
|
|
71
|
+
"placeholder": {
|
|
72
|
+
"alias": "placeholder";
|
|
73
|
+
"required": false;
|
|
74
|
+
"isSignal": true;
|
|
75
|
+
};
|
|
76
|
+
"disabled": {
|
|
77
|
+
"alias": "disabled";
|
|
78
|
+
"required": false;
|
|
79
|
+
"isSignal": true;
|
|
80
|
+
};
|
|
81
|
+
"clearable": {
|
|
82
|
+
"alias": "clearable";
|
|
83
|
+
"required": false;
|
|
84
|
+
"isSignal": true;
|
|
85
|
+
};
|
|
86
|
+
"accept": {
|
|
87
|
+
"alias": "accept";
|
|
88
|
+
"required": false;
|
|
89
|
+
"isSignal": true;
|
|
90
|
+
};
|
|
91
|
+
"preview": {
|
|
92
|
+
"alias": "preview";
|
|
93
|
+
"required": false;
|
|
94
|
+
"isSignal": true;
|
|
95
|
+
};
|
|
96
|
+
"mode": {
|
|
97
|
+
"alias": "mode";
|
|
98
|
+
"required": false;
|
|
99
|
+
"isSignal": true;
|
|
100
|
+
};
|
|
101
|
+
"view": {
|
|
102
|
+
"alias": "view";
|
|
103
|
+
"required": false;
|
|
104
|
+
"isSignal": true;
|
|
105
|
+
};
|
|
106
|
+
"cropWidth": {
|
|
107
|
+
"alias": "cropWidth";
|
|
108
|
+
"required": false;
|
|
109
|
+
"isSignal": true;
|
|
110
|
+
};
|
|
111
|
+
"cropHeight": {
|
|
112
|
+
"alias": "cropHeight";
|
|
113
|
+
"required": false;
|
|
114
|
+
"isSignal": true;
|
|
115
|
+
};
|
|
116
|
+
"t_item": {
|
|
117
|
+
"alias": "t_item";
|
|
118
|
+
"required": false;
|
|
119
|
+
"isSignal": true;
|
|
120
|
+
};
|
|
121
|
+
"t_empty": {
|
|
122
|
+
"alias": "t_empty";
|
|
123
|
+
"required": false;
|
|
124
|
+
"isSignal": true;
|
|
125
|
+
};
|
|
126
|
+
"container": {
|
|
127
|
+
"alias": "container";
|
|
128
|
+
"required": false;
|
|
129
|
+
"isSignal": true;
|
|
130
|
+
};
|
|
131
|
+
"name": {
|
|
132
|
+
"alias": "name";
|
|
133
|
+
"required": false;
|
|
134
|
+
"isSignal": true;
|
|
135
|
+
};
|
|
136
|
+
"wImage": {
|
|
137
|
+
"alias": "wImage";
|
|
138
|
+
"required": false;
|
|
139
|
+
"isSignal": true;
|
|
140
|
+
};
|
|
141
|
+
"wFile": {
|
|
142
|
+
"alias": "wFile";
|
|
143
|
+
"required": false;
|
|
144
|
+
"isSignal": true;
|
|
145
|
+
};
|
|
146
|
+
"wImages": {
|
|
147
|
+
"alias": "wImages";
|
|
148
|
+
"required": false;
|
|
149
|
+
"isSignal": true;
|
|
150
|
+
};
|
|
151
|
+
"wFiles": {
|
|
152
|
+
"alias": "wFiles";
|
|
153
|
+
"required": false;
|
|
154
|
+
"isSignal": true;
|
|
155
|
+
};
|
|
156
|
+
}, {
|
|
157
|
+
"wImage": "wImageChange";
|
|
158
|
+
"wFile": "wFileChange";
|
|
159
|
+
"wImages": "wImagesChange";
|
|
160
|
+
"wFiles": "wFilesChange";
|
|
161
|
+
}, never, never, true, never>;
|
|
71
162
|
}
|
|
72
|
-
|
|
73
163
|
interface File$1 extends CrudDocument<File$1> {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
164
|
+
name: string;
|
|
165
|
+
description: string;
|
|
166
|
+
url?: string;
|
|
77
167
|
}
|
|
78
|
-
interface ImageResizeBounds {
|
|
79
|
-
|
|
80
|
-
|
|
168
|
+
export interface ImageResizeBounds {
|
|
169
|
+
width: number;
|
|
170
|
+
height: number;
|
|
81
171
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FileService>;
|
|
172
|
+
export declare class FileService extends CrudService<File$1> {
|
|
173
|
+
private readonly _http;
|
|
174
|
+
constructor();
|
|
175
|
+
/**
|
|
176
|
+
* Upload base64 (data URL) to backend with optional container/name.
|
|
177
|
+
* Returns a URL string from the API; rejects when the request fails.
|
|
178
|
+
*/
|
|
179
|
+
uploadBase64(dataUrl: string, container?: string, name?: string): Promise<string>;
|
|
180
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileService, never>;
|
|
181
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
93
182
|
}
|
|
94
|
-
|
|
95
183
|
/**
|
|
96
184
|
* Read a File as base64 data URL.
|
|
97
185
|
*/
|
|
98
|
-
declare function fileToDataUrl(file: File): Promise<string>;
|
|
186
|
+
export declare function fileToDataUrl(file: File): Promise<string>;
|
|
99
187
|
/**
|
|
100
188
|
* Resize an image file so it fits within given bounds, preserving aspect ratio.
|
|
101
189
|
* Returns a base64 data URL (or the original if no resize is needed / not image).
|
|
102
190
|
*/
|
|
103
|
-
declare function resizeImageToBounds(file: File, bounds: ImageResizeBounds): Promise<string>;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
name: string;
|
|
191
|
+
export declare function resizeImageToBounds(file: File, bounds: ImageResizeBounds): Promise<string>;
|
|
192
|
+
export declare const fileDefaults: {
|
|
193
|
+
label: string;
|
|
194
|
+
placeholder: string;
|
|
195
|
+
disabled: boolean;
|
|
196
|
+
clearable: boolean;
|
|
197
|
+
accept: string;
|
|
198
|
+
preview: boolean;
|
|
199
|
+
mode: string;
|
|
200
|
+
view: string;
|
|
201
|
+
cropWidth: number | null;
|
|
202
|
+
cropHeight: number | null;
|
|
203
|
+
container: string;
|
|
204
|
+
name: string;
|
|
118
205
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
private _fileService;
|
|
134
|
-
private _clipboard;
|
|
135
|
-
private _alert;
|
|
136
|
-
private _form;
|
|
137
|
-
private _core;
|
|
138
|
-
columns: string[];
|
|
139
|
-
form: FormInterface;
|
|
140
|
-
config: {
|
|
141
|
-
paginate: (page?: number) => void;
|
|
142
|
-
perPage: number;
|
|
143
|
-
setPerPage: (perPage: number) => void;
|
|
144
|
-
allDocs: boolean;
|
|
145
|
-
create: () => void;
|
|
146
|
-
delete: (doc: File$1) => void;
|
|
206
|
+
export declare class FileSelectorComponent {
|
|
207
|
+
private _files;
|
|
208
|
+
private _translate;
|
|
209
|
+
readonly wModel: import("@angular/core").InputSignal<string | null>;
|
|
210
|
+
readonly wChange: import("@angular/core").OutputEmitterRef<string | null>;
|
|
211
|
+
readonly items: import("@angular/core").Signal<import("@wawjs/ngx-bos").File[]>;
|
|
212
|
+
readonly placeholder: import("@angular/core").WritableSignal<string>;
|
|
213
|
+
onSelect(value: SelectValue): void;
|
|
214
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileSelectorComponent, never>;
|
|
215
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileSelectorComponent, "file-selector", never, {
|
|
216
|
+
"wModel": {
|
|
217
|
+
"alias": "wModel";
|
|
218
|
+
"required": false;
|
|
219
|
+
"isSignal": true;
|
|
147
220
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
221
|
+
}, {
|
|
222
|
+
"wChange": "wChange";
|
|
223
|
+
}, never, never, true, never>;
|
|
224
|
+
}
|
|
225
|
+
export declare class FilesComponent {
|
|
226
|
+
private _fileService;
|
|
227
|
+
private _clipboard;
|
|
228
|
+
private _alert;
|
|
229
|
+
private _form;
|
|
230
|
+
private _core;
|
|
231
|
+
columns: string[];
|
|
232
|
+
form: FormInterface;
|
|
233
|
+
config: {
|
|
234
|
+
paginate: (page?: number) => void;
|
|
235
|
+
perPage: number;
|
|
236
|
+
setPerPage: (perPage: number) => void;
|
|
237
|
+
allDocs: boolean;
|
|
238
|
+
create: () => void;
|
|
239
|
+
delete: (doc: File$1) => void;
|
|
240
|
+
};
|
|
241
|
+
readonly rows: import("@angular/core").WritableSignal<File$1[]>;
|
|
242
|
+
constructor();
|
|
243
|
+
copy(text: string): void;
|
|
244
|
+
setRows(page?: number): void;
|
|
245
|
+
private _page;
|
|
246
|
+
private _preCreate;
|
|
247
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilesComponent, never>;
|
|
248
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilesComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
156
249
|
}
|
|
157
|
-
|
|
158
|
-
declare const
|
|
159
|
-
|
|
160
|
-
declare const FORM_COMPONENTS: string[];
|
|
161
|
-
declare const FORM_COMPONENT_FORM: (key: string) => FormInterface;
|
|
250
|
+
export declare const filesRoutes: Routes;
|
|
251
|
+
export declare const FORM_COMPONENTS: string[];
|
|
252
|
+
export declare const FORM_COMPONENT_FORM: (key: string) => FormInterface;
|
|
162
253
|
/**
|
|
163
254
|
* Central registry: template name → component class.
|
|
164
255
|
* Names must match `component.name` in form schema (e.g. `{ name: 'Input', ... }`)
|
|
165
256
|
* and what the template component passes into FormService.addTemplateComponent().
|
|
166
257
|
*/
|
|
167
|
-
declare const FORM_TEMPLATE_COMPONENTS: Record<string, Type<unknown>>;
|
|
168
|
-
declare const provideFormComponents: () => Provider;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
thumb: string;
|
|
258
|
+
export declare const FORM_TEMPLATE_COMPONENTS: Record<string, Type<unknown>>;
|
|
259
|
+
export declare const provideFormComponents: () => Provider;
|
|
260
|
+
export interface User extends CrudDocument<User> {
|
|
261
|
+
data: Record<string, unknown>;
|
|
262
|
+
is: Record<string, boolean>;
|
|
263
|
+
roles: string[];
|
|
264
|
+
name: string;
|
|
265
|
+
phone: string;
|
|
266
|
+
bio: string;
|
|
267
|
+
email: string;
|
|
268
|
+
thumb: string;
|
|
179
269
|
}
|
|
180
|
-
|
|
181
|
-
declare const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
title: string;
|
|
186
|
-
components: FormComponentInterface[];
|
|
270
|
+
export declare const NEW_USER: User;
|
|
271
|
+
export declare const createUserFormComponents: (userForm?: FormComponentInterface[]) => {
|
|
272
|
+
formId: string;
|
|
273
|
+
title: string;
|
|
274
|
+
components: FormComponentInterface[];
|
|
187
275
|
};
|
|
188
|
-
declare const userFormComponentsFactory: () => {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
276
|
+
export declare const userFormComponentsFactory: () => {
|
|
277
|
+
formId: string;
|
|
278
|
+
title: string;
|
|
279
|
+
components: FormComponentInterface[];
|
|
192
280
|
};
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
deleteAdmin(user: User): rxjs.Observable<User>;
|
|
218
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserService, never>;
|
|
219
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserService>;
|
|
281
|
+
export declare class UserService extends CrudService<User> {
|
|
282
|
+
private readonly _userHttpService;
|
|
283
|
+
private readonly _alertService;
|
|
284
|
+
private readonly _router;
|
|
285
|
+
private readonly _emitterService;
|
|
286
|
+
private readonly _bosConfig;
|
|
287
|
+
readonly url: string;
|
|
288
|
+
roles: string[];
|
|
289
|
+
employees: string[];
|
|
290
|
+
readonly users: import("@angular/core").Signal<User[]>;
|
|
291
|
+
user: import("@angular/core").WritableSignal<User>;
|
|
292
|
+
thumb: import("@angular/core").Signal<string>;
|
|
293
|
+
role(role: string): boolean;
|
|
294
|
+
readonly usersByRole: import("@angular/core").Signal<Record<string, User[]>>;
|
|
295
|
+
constructor();
|
|
296
|
+
setUser(user: User): void;
|
|
297
|
+
updateMe(): import("rxjs").Subscription;
|
|
298
|
+
updateMeAfterWhile(): void;
|
|
299
|
+
changePassword(oldPass: string, newPass: string): import("rxjs").Observable<any>;
|
|
300
|
+
logout(): void;
|
|
301
|
+
updateAdmin(user: User): import("rxjs").Observable<User>;
|
|
302
|
+
deleteAdmin(user: User): import("rxjs").Observable<User>;
|
|
303
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
|
|
304
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
220
305
|
}
|
|
221
|
-
|
|
222
|
-
declare const
|
|
223
|
-
|
|
224
|
-
declare
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
value:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
306
|
+
export declare const adminsGuard: CanActivateFn;
|
|
307
|
+
export declare const authenticatedGuard: CanActivateFn;
|
|
308
|
+
export declare const guestGuard: CanActivateFn;
|
|
309
|
+
export declare class UserSelectorComponent {
|
|
310
|
+
userService: UserService;
|
|
311
|
+
value: import("@angular/core").InputSignal<string>;
|
|
312
|
+
onChange: import("@angular/core").OutputEmitterRef<SelectValue>;
|
|
313
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserSelectorComponent, never>;
|
|
314
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserSelectorComponent, "user-selector", never, {
|
|
315
|
+
"value": {
|
|
316
|
+
"alias": "value";
|
|
317
|
+
"required": false;
|
|
318
|
+
"isSignal": true;
|
|
319
|
+
};
|
|
320
|
+
}, {
|
|
321
|
+
"onChange": "onChange";
|
|
322
|
+
}, never, never, true, never>;
|
|
234
323
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserPreviewComponent, "user-preview", never, {}, {}, never, never, true, never>;
|
|
324
|
+
export declare class UserPreviewComponent {
|
|
325
|
+
userService: UserService;
|
|
326
|
+
protected readonly bosConfig: Required<import("@wawjs/ngx-bos").NgxBosConfig>;
|
|
327
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserPreviewComponent, never>;
|
|
328
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserPreviewComponent, "user-preview", never, {}, {}, never, never, true, never>;
|
|
241
329
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UsersComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
330
|
+
export declare class UsersComponent extends CrudComponent<UserService, User, FormInterface> {
|
|
331
|
+
protected configType: 'server' | 'local';
|
|
332
|
+
private readonly _formService;
|
|
333
|
+
protected allowUrl(): boolean;
|
|
334
|
+
protected delete(doc: User): Promise<void>;
|
|
335
|
+
protected update(doc: User): void;
|
|
336
|
+
userService: UserService;
|
|
337
|
+
/** Every role gets a checkbox column; matches the columns added in the constructor. */
|
|
338
|
+
readonly roles: string[];
|
|
339
|
+
columns: string[];
|
|
340
|
+
config: import("@wawjs/ngx-crud").TableConfig<User>;
|
|
341
|
+
constructor();
|
|
342
|
+
updateRole(user: User, role: string, value: boolean): void;
|
|
343
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UsersComponent, never>;
|
|
344
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UsersComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
258
345
|
}
|
|
259
|
-
|
|
260
|
-
declare
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClientsComponent, never>;
|
|
272
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClientsComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
346
|
+
export declare const usersRoutes: Routes;
|
|
347
|
+
export declare class ClientsComponent extends CrudComponent<UserService, User, FormInterface> {
|
|
348
|
+
/** Use server-side pagination for clients */
|
|
349
|
+
protected configType: 'server' | 'local';
|
|
350
|
+
/** Basic columns for clients table */
|
|
351
|
+
columns: string[];
|
|
352
|
+
/** wtable config built by CrudComponent, aware of server mode */
|
|
353
|
+
config: import("@wawjs/ngx-crud").TableConfig<User>;
|
|
354
|
+
protected allowUrl(): boolean;
|
|
355
|
+
constructor();
|
|
356
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClientsComponent, never>;
|
|
357
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClientsComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
273
358
|
}
|
|
274
|
-
|
|
275
|
-
declare
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
359
|
+
export declare const clientsRoutes: Routes;
|
|
360
|
+
export declare class FormComponent extends CrudComponent<FormcomponentService, Formcomponent, FormInterface> {
|
|
361
|
+
private _route;
|
|
362
|
+
private _bosConfig;
|
|
363
|
+
private readonly _params;
|
|
364
|
+
/** Current `:formId` route param; updates when navigating between forms. */
|
|
365
|
+
readonly formId: import("@angular/core").Signal<string>;
|
|
366
|
+
protected configType: 'server' | 'local';
|
|
367
|
+
protected preCreate(doc: Formcomponent): void;
|
|
368
|
+
protected localDocumentsFilter: (doc: Formcomponent) => boolean;
|
|
369
|
+
protected allowUrl(): boolean;
|
|
370
|
+
/** Basic columns for clients table */
|
|
371
|
+
columns: string[];
|
|
372
|
+
/** wtable config built by CrudComponent, aware of server mode */
|
|
373
|
+
config: import("@wawjs/ngx-crud").TableConfig<Formcomponent>;
|
|
374
|
+
constructor();
|
|
375
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
376
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
292
377
|
}
|
|
293
|
-
|
|
294
|
-
declare
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
constructor();
|
|
313
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormsComponent, never>;
|
|
314
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormsComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
378
|
+
export declare const formRoutes: Routes;
|
|
379
|
+
export declare class FormsComponent {
|
|
380
|
+
private _formService;
|
|
381
|
+
private _bosConfig;
|
|
382
|
+
columns: string[];
|
|
383
|
+
config: {
|
|
384
|
+
buttons: ({
|
|
385
|
+
icon: string;
|
|
386
|
+
click: (form: Form) => void;
|
|
387
|
+
hrefFunc?: undefined;
|
|
388
|
+
} | {
|
|
389
|
+
icon: string;
|
|
390
|
+
hrefFunc: (form: Form) => string;
|
|
391
|
+
click?: undefined;
|
|
392
|
+
})[];
|
|
393
|
+
};
|
|
394
|
+
readonly documents: import("@angular/core").Signal<Form[]>;
|
|
395
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormsComponent, never>;
|
|
396
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormsComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
315
397
|
}
|
|
316
|
-
|
|
317
|
-
declare
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
398
|
+
export declare const formsRoutes: Routes;
|
|
399
|
+
export declare class SpiderComponent {
|
|
400
|
+
width: import("@angular/core").InputSignal<string>;
|
|
401
|
+
height: import("@angular/core").InputSignal<string>;
|
|
402
|
+
start: import("@angular/core").InputSignal<string>;
|
|
403
|
+
end: import("@angular/core").InputSignal<string>;
|
|
404
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderComponent, never>;
|
|
405
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderComponent, "icon-spider", never, {
|
|
406
|
+
"width": {
|
|
407
|
+
"alias": "width";
|
|
408
|
+
"required": false;
|
|
409
|
+
"isSignal": true;
|
|
410
|
+
};
|
|
411
|
+
"height": {
|
|
412
|
+
"alias": "height";
|
|
413
|
+
"required": false;
|
|
414
|
+
"isSignal": true;
|
|
415
|
+
};
|
|
416
|
+
"start": {
|
|
417
|
+
"alias": "start";
|
|
418
|
+
"required": false;
|
|
419
|
+
"isSignal": true;
|
|
420
|
+
};
|
|
421
|
+
"end": {
|
|
422
|
+
"alias": "end";
|
|
423
|
+
"required": false;
|
|
424
|
+
"isSignal": true;
|
|
425
|
+
};
|
|
426
|
+
}, {}, never, never, true, never>;
|
|
326
427
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
static ɵpipe: _angular_core.ɵɵPipeDeclaration<PhonePipe, "phone", true>;
|
|
428
|
+
export declare class PhonePipe implements PipeTransform {
|
|
429
|
+
transform(value: string | null | undefined, country?: CountryCode): string;
|
|
430
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhonePipe, never>;
|
|
431
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<PhonePipe, "phone", true>;
|
|
332
432
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
export { ClientsComponent, DEFAULT_NGX_BOS_CONFIG, FORM_COMPONENTS, FORM_COMPONENT_FORM, FORM_TEMPLATE_COMPONENTS, FileComponent, FileSelectorComponent, FileService, FilesComponent, FormComponent, FormsComponent, NEW_USER, NGX_BOS_CONFIG, NGX_BOS_VERSION, PhonePipe, SpiderComponent, UserPreviewComponent, UserSelectorComponent, UserService, UsersComponent, adminsGuard, authenticatedGuard, clientsRoutes, createUserFormComponents, fileDefaults, fileToDataUrl, filesRoutes, formRoutes, formsRoutes, guestGuard, ngxBosProvide, provideFormComponents, provideNgxBos, resizeImageToBounds, userFormComponentsFactory, usersRoutes };
|
|
338
|
-
export type { File$1 as File, FileMode, FileView, ImageResizeBounds, NgxBosConfig, NgxBosVersion, User };
|
|
433
|
+
export declare const NGX_BOS_VERSION: "22.0.5";
|
|
434
|
+
export type NgxBosVersion = typeof NGX_BOS_VERSION;
|
|
435
|
+
export { File$1 as File };
|