@posiwise/utils 0.0.144 → 0.0.145
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/fesm2022/{posiwise-utils-edit-navbar-modal.component-DC6PY39N.mjs → posiwise-utils-edit-navbar-modal.component-BD9hKcnO.mjs} +187 -69
- package/fesm2022/posiwise-utils-edit-navbar-modal.component-BD9hKcnO.mjs.map +1 -0
- package/fesm2022/posiwise-utils.mjs +1328 -1012
- package/fesm2022/posiwise-utils.mjs.map +1 -1
- package/package.json +6 -5
- package/types/posiwise-utils.d.ts +249 -178
- package/fesm2022/posiwise-utils-edit-navbar-modal.component-DC6PY39N.mjs.map +0 -1
|
@@ -1,204 +1,275 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import * as
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import * as
|
|
15
|
-
import
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import
|
|
20
|
-
import * as
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
imageResize: {
|
|
34
|
-
displaySize: boolean;
|
|
35
|
-
};
|
|
36
|
-
noDragDrop: boolean;
|
|
1
|
+
import Quill from "quill";
|
|
2
|
+
import * as i3 from "@angular/forms";
|
|
3
|
+
import { AbstractControl } from "@angular/forms";
|
|
4
|
+
import "reflect-metadata";
|
|
5
|
+
import * as i4 from "@angular/router";
|
|
6
|
+
import { ActivatedRoute, Router } from "@angular/router";
|
|
7
|
+
import * as moment from "moment";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, Injector, OnChanges, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
|
|
10
|
+
import * as i9 from "@posiwise/admin-module-utils";
|
|
11
|
+
import { AdminService } from "@posiwise/admin-module-utils";
|
|
12
|
+
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
13
|
+
import { User } from "@posiwise/common-utilities";
|
|
14
|
+
import * as i5 from "@ng-bootstrap/ng-bootstrap";
|
|
15
|
+
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
|
|
16
|
+
import * as i3$1 from "@angular/common";
|
|
17
|
+
import * as i4$1 from "@posiwise/core-transloco";
|
|
18
|
+
import * as i8$1 from "@posiwise/directives";
|
|
19
|
+
import * as i8 from "@posiwise/pipes";
|
|
20
|
+
import * as i7 from "ngx-image-cropper";
|
|
21
|
+
import { ImageCroppedEvent, ImageTransform } from "ngx-image-cropper";
|
|
22
|
+
import * as i5$1 from "primeng/button";
|
|
23
|
+
import * as i6 from "primeng/tooltip";
|
|
24
|
+
export declare class QuillHelper {
|
|
25
|
+
static init(): void;
|
|
26
|
+
static getEditorConfig(additionalToolbarConfig?: any[]): {
|
|
27
|
+
toolbar: {
|
|
28
|
+
container: any[];
|
|
29
|
+
handlers: {
|
|
30
|
+
image: () => void;
|
|
31
|
+
video: () => void;
|
|
32
|
+
};
|
|
37
33
|
};
|
|
34
|
+
imageResize: {
|
|
35
|
+
displaySize: boolean;
|
|
36
|
+
};
|
|
37
|
+
noDragDrop: boolean;
|
|
38
|
+
pasteGuard: boolean;
|
|
39
|
+
};
|
|
38
40
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
declare function
|
|
42
|
-
|
|
43
|
-
declare function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
export declare const PASTED_IMAGE_MESSAGE: string;
|
|
42
|
+
/** True when the clipboard carries an image FILE — a screenshot, or an image copied from disk. */
|
|
43
|
+
export declare function clipboardHasImageFile(clipboardData: DataTransfer | null | undefined): boolean;
|
|
44
|
+
/** True when this src embeds the file in the document instead of referencing it. */
|
|
45
|
+
export declare function isEmbeddedImageSrc(src: string | null | undefined): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Quill module. Register once, then enable with `pasteGuard: true` (or
|
|
48
|
+
* `pasteGuard: { onBlocked: fn }` to replace the default alert with a toast).
|
|
49
|
+
*/
|
|
50
|
+
export declare class PasteGuard {
|
|
51
|
+
private readonly notify;
|
|
52
|
+
constructor(quill: Quill, options?: {
|
|
53
|
+
onBlocked?: (message: string) => void;
|
|
54
|
+
});
|
|
55
|
+
private handlePaste;
|
|
56
|
+
}
|
|
57
|
+
export declare function ValidateForm(formName: string): MethodDecorator;
|
|
58
|
+
export declare function MatchPassword(abstractControl: AbstractControl): any;
|
|
59
|
+
export declare function appendQueryParam(router: Router, activatedRoute: ActivatedRoute, queryParams: any): void;
|
|
60
|
+
export declare function clearQueryParams(router: Router, activatedRoute: ActivatedRoute): void;
|
|
61
|
+
export declare function handleDateRangeSelection(event: {
|
|
62
|
+
startDate: moment.Moment;
|
|
63
|
+
endDate: moment.Moment;
|
|
49
64
|
}, selectedDateRange: any): any;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
declare namespace custom_uploader_component_d_exports {
|
|
66
|
+
export { CustomUploaderComponent };
|
|
67
|
+
}
|
|
68
|
+
export declare class CustomUploaderComponent extends AppBaseComponent {
|
|
69
|
+
private readonly modalService;
|
|
70
|
+
private readonly document;
|
|
71
|
+
saveEvent: EventEmitter<{
|
|
72
|
+
file: string;
|
|
73
|
+
name: string;
|
|
74
|
+
}>;
|
|
75
|
+
controlName: string;
|
|
76
|
+
private _previewData;
|
|
77
|
+
set previewData(value: {
|
|
78
|
+
url: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
});
|
|
81
|
+
get previewData(): {
|
|
82
|
+
url: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
};
|
|
85
|
+
get previewSrc(): string;
|
|
86
|
+
cacheBust: number;
|
|
87
|
+
previewBroken: boolean;
|
|
88
|
+
aspectRatio: string;
|
|
89
|
+
title: string;
|
|
90
|
+
uploadedFile: any;
|
|
91
|
+
selectedFileName: string;
|
|
92
|
+
buttonBusy: boolean;
|
|
93
|
+
constructor(injector: Injector, modalService: NgbModal, document: Document);
|
|
94
|
+
deleteExistingFile(): void;
|
|
95
|
+
onSaveFile(): void;
|
|
96
|
+
onFileChange(value: any): void;
|
|
97
|
+
private dataURLtoBlob;
|
|
98
|
+
onImageSelection(event: any): void;
|
|
99
|
+
openModal(content: any): void;
|
|
100
|
+
clearValues(): void;
|
|
101
|
+
onClose(): void;
|
|
102
|
+
updateHeight(): void;
|
|
103
|
+
onImgError(): void;
|
|
104
|
+
onImgChange(): void;
|
|
105
|
+
private matchTileHeights;
|
|
106
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomUploaderComponent, never>;
|
|
107
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomUploaderComponent, "pw-custom-uploader", never, {
|
|
108
|
+
"controlName": {
|
|
109
|
+
"alias": "controlName";
|
|
110
|
+
"required": false;
|
|
111
|
+
};
|
|
112
|
+
"previewData": {
|
|
113
|
+
"alias": "previewData";
|
|
114
|
+
"required": false;
|
|
115
|
+
};
|
|
116
|
+
"aspectRatio": {
|
|
117
|
+
"alias": "aspectRatio";
|
|
118
|
+
"required": false;
|
|
119
|
+
};
|
|
120
|
+
"title": {
|
|
121
|
+
"alias": "title";
|
|
122
|
+
"required": false;
|
|
123
|
+
};
|
|
124
|
+
}, {
|
|
125
|
+
"saveEvent": "saveEvent";
|
|
126
|
+
}, never, never, false, never>;
|
|
127
|
+
}
|
|
128
|
+
declare namespace resource_header_component_d_exports {
|
|
129
|
+
export { ResourceHeaderComponent };
|
|
130
|
+
}
|
|
131
|
+
export declare class ResourceHeaderComponent extends AppBaseComponent implements OnInit, OnChanges {
|
|
132
|
+
private readonly document;
|
|
133
|
+
private readonly adminService;
|
|
134
|
+
private readonly modalService;
|
|
135
|
+
private readonly cdr;
|
|
136
|
+
navbarCollapse: ElementRef;
|
|
137
|
+
logoEditModal: TemplateRef<CustomUploaderComponent>;
|
|
138
|
+
user: User;
|
|
139
|
+
userLoggedIn: boolean;
|
|
140
|
+
isScrolled: boolean;
|
|
141
|
+
open: boolean;
|
|
142
|
+
logo: string;
|
|
143
|
+
navbarItems: any;
|
|
144
|
+
domainId: any;
|
|
145
|
+
contrastImageUrl: any;
|
|
146
|
+
darkImageUrl: any;
|
|
147
|
+
editingNavbar: {
|
|
148
|
+
items: any[];
|
|
149
|
+
};
|
|
150
|
+
id: string;
|
|
151
|
+
scrollTimeout: any;
|
|
152
|
+
canEditResourcesValue: boolean;
|
|
153
|
+
constructor(injector: Injector, document: Document, adminService: AdminService, modalService: NgbModal, cdr: ChangeDetectorRef);
|
|
154
|
+
ngOnInit(): void;
|
|
155
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
156
|
+
openLogoEditModal(): void;
|
|
157
|
+
onSaveLogo(event: any): void;
|
|
158
|
+
onScroll(): void;
|
|
159
|
+
onDocumentClick(event: Event): void;
|
|
160
|
+
closeAllDropdowns(): void;
|
|
161
|
+
openDropdown(item: any): void;
|
|
162
|
+
onNavbarItemClick(item: any, event: Event): void;
|
|
163
|
+
onDropdownItemClick(item: any): void;
|
|
164
|
+
openEditNavbarModal(): Promise<void>;
|
|
165
|
+
saveNavbarLinks(modal: any, updatedNavbar: any): void;
|
|
166
|
+
private updateCanEditResourcesValue;
|
|
167
|
+
canEditResources(): boolean;
|
|
168
|
+
navigateToLogin(): void;
|
|
169
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceHeaderComponent, never>;
|
|
170
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResourceHeaderComponent, "pw-resource-header", never, {
|
|
171
|
+
"user": {
|
|
172
|
+
"alias": "user";
|
|
173
|
+
"required": false;
|
|
174
|
+
};
|
|
175
|
+
"userLoggedIn": {
|
|
176
|
+
"alias": "userLoggedIn";
|
|
177
|
+
"required": false;
|
|
67
178
|
};
|
|
68
|
-
|
|
69
|
-
cacheBust: number;
|
|
70
|
-
previewBroken: boolean;
|
|
71
|
-
aspectRatio: string;
|
|
72
|
-
title: string;
|
|
73
|
-
uploadedFile: any;
|
|
74
|
-
selectedFileName: string;
|
|
75
|
-
buttonBusy: boolean;
|
|
76
|
-
constructor(injector: Injector, modalService: NgbModal, document: Document);
|
|
77
|
-
deleteExistingFile(): void;
|
|
78
|
-
onSaveFile(): void;
|
|
79
|
-
onFileChange(value: any): void;
|
|
80
|
-
private dataURLtoBlob;
|
|
81
|
-
onImageSelection(event: any): void;
|
|
82
|
-
openModal(content: any): void;
|
|
83
|
-
clearValues(): void;
|
|
84
|
-
onClose(): void;
|
|
85
|
-
updateHeight(): void;
|
|
86
|
-
onImgError(): void;
|
|
87
|
-
onImgChange(): void;
|
|
88
|
-
private matchTileHeights;
|
|
89
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CustomUploaderComponent, never>;
|
|
90
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CustomUploaderComponent, "pw-custom-uploader", never, { "controlName": { "alias": "controlName"; "required": false; }; "previewData": { "alias": "previewData"; "required": false; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, { "saveEvent": "saveEvent"; }, never, never, false, never>;
|
|
179
|
+
}, {}, never, never, false, never>;
|
|
91
180
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
181
|
+
declare namespace image_cropper_component_d_exports {
|
|
182
|
+
export { ProfileImageCropperComponent };
|
|
183
|
+
}
|
|
184
|
+
export declare class ProfileImageCropperComponent {
|
|
185
|
+
private readonly cdr;
|
|
186
|
+
imageChangedEvent: Event | null;
|
|
187
|
+
croppedImage: string;
|
|
188
|
+
imageSelectionEvent: EventEmitter<string>;
|
|
189
|
+
closeEvent: EventEmitter<void>;
|
|
190
|
+
fileChangeEvent: EventEmitter<string>;
|
|
191
|
+
aspectRatio: string;
|
|
192
|
+
dynamicData: any;
|
|
193
|
+
transform: ImageTransform;
|
|
194
|
+
canvasRotation: number;
|
|
195
|
+
showCropper: boolean;
|
|
196
|
+
busy: boolean;
|
|
197
|
+
constructor(cdr: ChangeDetectorRef);
|
|
198
|
+
onFileChange(event: Event): void;
|
|
199
|
+
imageCropped(event: ImageCroppedEvent): void;
|
|
200
|
+
imageLoaded(): void;
|
|
201
|
+
rotateLeft(): void;
|
|
202
|
+
rotateRight(): void;
|
|
203
|
+
private flipAfterRotate;
|
|
204
|
+
flipHorizontal(): void;
|
|
205
|
+
flipVertical(): void;
|
|
206
|
+
saveProfilePicture(): void;
|
|
207
|
+
onCloseModal(): void;
|
|
208
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileImageCropperComponent, never>;
|
|
209
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProfileImageCropperComponent, "pw-image-cropper", never, {
|
|
210
|
+
"aspectRatio": {
|
|
211
|
+
"alias": "aspectRatio";
|
|
212
|
+
"required": false;
|
|
213
|
+
};
|
|
214
|
+
"dynamicData": {
|
|
215
|
+
"alias": "dynamicData";
|
|
216
|
+
"required": false;
|
|
111
217
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
118
|
-
openLogoEditModal(): void;
|
|
119
|
-
onSaveLogo(event: any): void;
|
|
120
|
-
onScroll(): void;
|
|
121
|
-
onDocumentClick(event: Event): void;
|
|
122
|
-
closeAllDropdowns(): void;
|
|
123
|
-
openDropdown(item: any): void;
|
|
124
|
-
onNavbarItemClick(item: any, event: Event): void;
|
|
125
|
-
onDropdownItemClick(item: any): void;
|
|
126
|
-
openEditNavbarModal(): Promise<void>;
|
|
127
|
-
saveNavbarLinks(modal: any, updatedNavbar: any): void;
|
|
128
|
-
private updateCanEditResourcesValue;
|
|
129
|
-
canEditResources(): boolean;
|
|
130
|
-
navigateToLogin(): void;
|
|
131
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceHeaderComponent, never>;
|
|
132
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ResourceHeaderComponent, "pw-resource-header", never, { "user": { "alias": "user"; "required": false; }; "userLoggedIn": { "alias": "userLoggedIn"; "required": false; }; }, {}, never, never, false, never>;
|
|
218
|
+
}, {
|
|
219
|
+
"imageSelectionEvent": "imageSelectionEvent";
|
|
220
|
+
"closeEvent": "closeEvent";
|
|
221
|
+
"fileChangeEvent": "fileChangeEvent";
|
|
222
|
+
}, never, never, false, never>;
|
|
133
223
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
private readonly cdr;
|
|
137
|
-
imageChangedEvent: Event | string;
|
|
138
|
-
croppedImage: string;
|
|
139
|
-
imageSelectionEvent: EventEmitter<string>;
|
|
140
|
-
closeEvent: EventEmitter<void>;
|
|
141
|
-
fileChangeEvent: EventEmitter<string>;
|
|
142
|
-
aspectRatio: string;
|
|
143
|
-
dynamicData: any;
|
|
144
|
-
transform: ImageTransform;
|
|
145
|
-
canvasRotation: number;
|
|
146
|
-
showCropper: boolean;
|
|
147
|
-
busy: boolean;
|
|
148
|
-
constructor(cdr: ChangeDetectorRef);
|
|
149
|
-
onFileChange(event: Event): void;
|
|
150
|
-
imageCropped(event: ImageCroppedEvent): void;
|
|
151
|
-
imageLoaded(): void;
|
|
152
|
-
rotateLeft(): void;
|
|
153
|
-
rotateRight(): void;
|
|
154
|
-
private flipAfterRotate;
|
|
155
|
-
flipHorizontal(): void;
|
|
156
|
-
flipVertical(): void;
|
|
157
|
-
saveProfilePicture(): void;
|
|
158
|
-
onCloseModal(): void;
|
|
159
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileImageCropperComponent, never>;
|
|
160
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ProfileImageCropperComponent, "pw-image-cropper", never, { "aspectRatio": { "alias": "aspectRatio"; "required": false; }; "dynamicData": { "alias": "dynamicData"; "required": false; }; }, { "imageSelectionEvent": "imageSelectionEvent"; "closeEvent": "closeEvent"; "fileChangeEvent": "fileChangeEvent"; }, never, never, false, never>;
|
|
224
|
+
declare namespace profile_image_cropper_module_d_exports {
|
|
225
|
+
export { ProfileImageCropperModule };
|
|
161
226
|
}
|
|
162
|
-
|
|
163
227
|
/**
|
|
164
228
|
* Lightweight module for pw-image-cropper component
|
|
165
229
|
*
|
|
166
|
-
* Minimal dependencies - only CommonModule,
|
|
230
|
+
* Minimal dependencies - only CommonModule, ImageCropperComponent, DirectivesModule
|
|
167
231
|
* Use this instead of ResourceSharedComponentsModule when you only need image cropping
|
|
168
232
|
*/
|
|
169
|
-
declare class ProfileImageCropperModule {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
233
|
+
export declare class ProfileImageCropperModule {
|
|
234
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileImageCropperModule, never>;
|
|
235
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ProfileImageCropperModule, [typeof ProfileImageCropperComponent, typeof CustomUploaderComponent], [typeof i3$1.CommonModule, typeof i4$1.CoreTranslocoModule, typeof i5$1.ButtonModule, typeof i6.TooltipModule, typeof i7.ImageCropperComponent, typeof i8$1.DirectivesModule], [typeof ProfileImageCropperComponent, typeof CustomUploaderComponent]>;
|
|
236
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ProfileImageCropperModule>;
|
|
173
237
|
}
|
|
174
|
-
|
|
175
238
|
/**
|
|
176
239
|
* ResourceHeaderModule - Optimized
|
|
177
240
|
* DragDropModule removed - now lazy-loaded only when edit modal opens
|
|
178
241
|
* This reduces bundle size for landing pages where users aren't logged in
|
|
179
242
|
*/
|
|
180
|
-
declare class ResourceHeaderModule {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
243
|
+
export declare class ResourceHeaderModule {
|
|
244
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResourceHeaderModule, never>;
|
|
245
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceHeaderModule, [typeof ResourceHeaderComponent], [typeof i3$1.CommonModule, typeof i3.FormsModule, typeof i4.RouterModule, typeof i5.NgbModalModule, typeof i5.NgbTooltipModule, typeof i4$1.CoreTranslocoModule, typeof i8$1.DirectivesModule, typeof i8.PipesModule, typeof i9.AdminModuleUtilsModule, typeof ProfileImageCropperModule], [typeof ResourceHeaderComponent]>;
|
|
246
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ResourceHeaderModule>;
|
|
184
247
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
248
|
+
declare namespace field_error_display_component_d_exports {
|
|
249
|
+
export { FieldErrorDisplayComponent };
|
|
250
|
+
}
|
|
251
|
+
export declare class FieldErrorDisplayComponent {
|
|
252
|
+
errorMsg: string;
|
|
253
|
+
displayError: boolean;
|
|
254
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDisplayComponent, never>;
|
|
255
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldErrorDisplayComponent, "pw-field-error-display", never, {
|
|
256
|
+
"errorMsg": {
|
|
257
|
+
"alias": "errorMsg";
|
|
258
|
+
"required": false;
|
|
259
|
+
};
|
|
260
|
+
"displayError": {
|
|
261
|
+
"alias": "displayError";
|
|
262
|
+
"required": false;
|
|
263
|
+
};
|
|
264
|
+
}, {}, never, never, false, never>;
|
|
191
265
|
}
|
|
192
|
-
|
|
193
266
|
/**
|
|
194
267
|
* Standalone module for FieldErrorDisplayComponent.
|
|
195
268
|
* Import this lightweight module instead of SharedComponentsModule
|
|
196
269
|
* when you only need field error display functionality.
|
|
197
270
|
*/
|
|
198
|
-
declare class FieldErrorDisplayModule {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export { CustomUploaderComponent, FieldErrorDisplayComponent, FieldErrorDisplayModule, MatchPassword, ProfileImageCropperComponent, ProfileImageCropperModule, QuillHelper, ResourceHeaderComponent, ResourceHeaderModule, ValidateForm, appendQueryParam, clearQueryParams, handleDateRangeSelection };
|
|
271
|
+
export declare class FieldErrorDisplayModule {
|
|
272
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDisplayModule, never>;
|
|
273
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FieldErrorDisplayModule, [typeof FieldErrorDisplayComponent], [typeof i3$1.CommonModule], [typeof FieldErrorDisplayComponent]>;
|
|
274
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FieldErrorDisplayModule>;
|
|
275
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posiwise-utils-edit-navbar-modal.component-DC6PY39N.mjs","sources":["../../../../libs/utils/src/lib/resource-header/edit-navbar-modal.component.ts"],"sourcesContent":["import { moveItemInArray } from '@angular/cdk/drag-drop';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\n/**\n * Edit Navbar Modal Component\n * Contains drag-drop functionality for reordering navbar items\n * This component is lazy-loaded only when the edit modal is opened\n */\n@Component({\n selector: 'pw-edit-navbar-modal',\n standalone: true,\n imports: [FormsModule, DragDropModule],\n template: `\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Navbar Links</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"onClose()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <h4 class=\"mb-3\">Navbar Section</h4>\n <div cdkDropList (cdkDropListDropped)=\"dropNavbarItems($event)\">\n @for (item of editingNavbar.items; track item; let i = $index) {\n <div class=\"border p-3 mb-3\" cdkDrag>\n <div class=\"row\">\n <div class=\"col-md-5 mb-2\">\n <label [for]=\"'navbarTitle' + i\" class=\"form-label\">Title</label>\n <input\n [id]=\"'navbarTitle' + i\"\n class=\"form-control\"\n [(ngModel)]=\"item.title\"\n />\n </div>\n <div class=\"col-md-5 mb-2\">\n <label [for]=\"'navbarPath' + i\" class=\"form-label\">Path</label>\n <input\n [id]=\"'navbarPath' + i\"\n class=\"form-control\"\n [(ngModel)]=\"item.path\"\n />\n </div>\n <div\n class=\"col-md-2 d-flex justify-content-between align-items-center mt-4\"\n >\n <i\n class=\"fa fa-trash in-page-trash-icon text-danger cursor-pointer\"\n (click)=\"removeNavbarItem(i)\"\n (keydown.enter)=\"removeNavbarItem(i)\"\n (keydown.space)=\"removeNavbarItem(i)\"\n ></i>\n <i\n class=\"fa fa-bars in-page-bars-icon cursor-pointer\"\n cdkDragHandle\n ></i>\n </div>\n </div>\n <div cdkDropList (cdkDropListDropped)=\"dropNavbarSubtitles(i, $event)\">\n @for (sub of item.subtitles; track sub; let j = $index) {\n <div class=\"row border p-3 mb-2 align-items-center\" cdkDrag>\n <div class=\"col-md-5\">\n <label\n [for]=\"'navbarSubtitleTitle' + i + j\"\n class=\"form-label\"\n >Subtitle Title</label\n >\n <input\n [id]=\"'navbarSubtitleTitle' + i + j\"\n class=\"form-control\"\n [(ngModel)]=\"sub.title\"\n />\n </div>\n <div class=\"col-md-5\">\n <label\n [for]=\"'navbarSubtitlePath' + i + j\"\n class=\"form-label\"\n >Subtitle Path</label\n >\n <input\n [id]=\"'navbarSubtitlePath' + i + j\"\n class=\"form-control\"\n [(ngModel)]=\"sub.path\"\n />\n </div>\n <div\n class=\"col-md-2 d-flex justify-content-between align-items-center mt-4\"\n >\n <i\n class=\"fa fa-trash in-page-trash-icon text-danger cursor-pointer\"\n (click)=\"removeNavbarSubtitle(i, j)\"\n (keydown.enter)=\"removeNavbarSubtitle(i, j)\"\n (keydown.space)=\"removeNavbarSubtitle(i, j)\"\n ></i>\n <i\n class=\"fa fa-bars in-page-bars-icon cursor-pointer\"\n cdkDragHandle\n ></i>\n </div>\n </div>\n }\n </div>\n <button\n class=\"btn btn-outline-primary btn-sm mt-2\"\n (click)=\"addNavbarSubtitle(i)\"\n >\n + Add Subtitle\n </button>\n </div>\n }\n </div>\n\n <button class=\"btn btn-primary mt-3\" (click)=\"addNavbarItem()\">\n + Add Navbar Item\n </button>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"onClose()\">Cancel</button>\n <button class=\"btn btn-primary\" (click)=\"onSave()\">Save</button>\n </div>\n `\n})\nexport class EditNavbarModalComponent {\n @Input() editingNavbar;\n @Output() save = new EventEmitter<void>();\n @Output() closeEvent = new EventEmitter<void>();\n\n dropNavbarItems(event) {\n moveItemInArray(this.editingNavbar.items, event.previousIndex, event.currentIndex);\n }\n\n dropNavbarSubtitles(index: number, event) {\n moveItemInArray(\n this.editingNavbar.items[index].subtitles,\n event.previousIndex,\n event.currentIndex\n );\n }\n\n addNavbarItem() {\n this.editingNavbar.items.push({\n title: '',\n path: '',\n subtitles: []\n });\n }\n\n removeNavbarItem(index: number) {\n this.editingNavbar.items.splice(index, 1);\n }\n\n addNavbarSubtitle(index: number) {\n this.editingNavbar.items[index].subtitles.push({\n title: '',\n path: ''\n });\n }\n\n removeNavbarSubtitle(navIndex: number, subIndex: number) {\n this.editingNavbar.items[navIndex].subtitles.splice(subIndex, 1);\n }\n\n onSave() {\n this.save.emit(this.editingNavbar);\n }\n\n onClose() {\n this.closeEvent.emit();\n }\n}\n"],"names":[],"mappings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