@posiwise/utils 0.0.137 → 0.0.139

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.
@@ -0,0 +1,203 @@
1
+ import * as i3 from '@angular/forms';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import * as i4$1 from '@angular/router';
4
+ import { Router, ActivatedRoute } from '@angular/router';
5
+ import * as moment from 'moment';
6
+ import * as i0 from '@angular/core';
7
+ import { EventEmitter, Injector, OnInit, OnChanges, ElementRef, TemplateRef, ChangeDetectorRef, SimpleChanges } from '@angular/core';
8
+ import * as i9 from '@posiwise/admin-module-utils';
9
+ import { AdminService } from '@posiwise/admin-module-utils';
10
+ import { AppBaseComponent } from '@posiwise/app-base-component';
11
+ import { User } from '@posiwise/common-utilities';
12
+ import * as i5$1 from '@ng-bootstrap/ng-bootstrap';
13
+ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
14
+ import * as i2 from '@angular/common';
15
+ import * as i4 from '@posiwise/core-transloco';
16
+ import * as i7 from '@posiwise/directives';
17
+ import * as i8 from '@posiwise/pipes';
18
+ import * as i6 from 'ngx-image-cropper';
19
+ import { ImageTransform, ImageCroppedEvent } from 'ngx-image-cropper';
20
+ import * as i5 from 'primeng/button';
21
+
22
+ declare class QuillHelper {
23
+ static init(): void;
24
+ static getEditorConfig(additionalToolbarConfig?: any[]): {
25
+ toolbar: {
26
+ container: any[];
27
+ handlers: {
28
+ image: () => void;
29
+ video: () => void;
30
+ };
31
+ };
32
+ imageResize: {
33
+ displaySize: boolean;
34
+ };
35
+ noDragDrop: boolean;
36
+ };
37
+ }
38
+
39
+ declare function ValidateForm(formName: string): MethodDecorator;
40
+ declare function MatchPassword(abstractControl: AbstractControl): any;
41
+
42
+ declare function appendQueryParam(router: Router, activatedRoute: ActivatedRoute, queryParams: any): void;
43
+ declare function clearQueryParams(router: Router, activatedRoute: ActivatedRoute): void;
44
+
45
+ declare function handleDateRangeSelection(event: {
46
+ startDate: moment.Moment;
47
+ endDate: moment.Moment;
48
+ }, selectedDateRange: any): any;
49
+
50
+ declare class CustomUploaderComponent extends AppBaseComponent {
51
+ private readonly modalService;
52
+ private readonly document;
53
+ saveEvent: EventEmitter<{
54
+ file: string;
55
+ name: string;
56
+ }>;
57
+ controlName: string;
58
+ private _previewData;
59
+ set previewData(value: {
60
+ url: string;
61
+ name?: string;
62
+ });
63
+ get previewData(): {
64
+ url: string;
65
+ name?: string;
66
+ };
67
+ get previewSrc(): string;
68
+ cacheBust: number;
69
+ previewBroken: boolean;
70
+ aspectRatio: string;
71
+ title: string;
72
+ uploadedFile: any;
73
+ selectedFileName: string;
74
+ buttonBusy: boolean;
75
+ constructor(injector: Injector, modalService: NgbModal, document: Document);
76
+ deleteExistingFile(): void;
77
+ onSaveFile(): void;
78
+ onFileChange(value: any): void;
79
+ private dataURLtoBlob;
80
+ onImageSelection(event: any): void;
81
+ openModal(content: any): void;
82
+ clearValues(): void;
83
+ onClose(): void;
84
+ updateHeight(): void;
85
+ onImgError(): void;
86
+ onImgChange(): void;
87
+ private matchTileHeights;
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomUploaderComponent, never>;
89
+ 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>;
90
+ }
91
+
92
+ declare class ResourceHeaderComponent extends AppBaseComponent implements OnInit, OnChanges {
93
+ private readonly document;
94
+ private readonly adminService;
95
+ private readonly modalService;
96
+ private readonly cdr;
97
+ navbarCollapse: ElementRef;
98
+ logoEditModal: TemplateRef<CustomUploaderComponent>;
99
+ user: User;
100
+ userLoggedIn: boolean;
101
+ isScrolled: boolean;
102
+ open: boolean;
103
+ logo: string;
104
+ navbarItems: any;
105
+ domainId: any;
106
+ contrastImageUrl: any;
107
+ darkImageUrl: any;
108
+ editingNavbar: {
109
+ items: any[];
110
+ };
111
+ id: string;
112
+ scrollTimeout: any;
113
+ canEditResourcesValue: boolean;
114
+ constructor(injector: Injector, document: Document, adminService: AdminService, modalService: NgbModal, cdr: ChangeDetectorRef);
115
+ ngOnInit(): void;
116
+ ngOnChanges(changes: SimpleChanges): void;
117
+ openLogoEditModal(): void;
118
+ onSaveLogo(event: any): void;
119
+ onScroll(): void;
120
+ onDocumentClick(event: Event): void;
121
+ closeAllDropdowns(): void;
122
+ openDropdown(item: any): void;
123
+ onNavbarItemClick(item: any, event: Event): void;
124
+ onDropdownItemClick(item: any): void;
125
+ openEditNavbarModal(): Promise<void>;
126
+ saveNavbarLinks(modal: any, updatedNavbar: any): void;
127
+ private updateCanEditResourcesValue;
128
+ canEditResources(): boolean;
129
+ navigateToLogin(): void;
130
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResourceHeaderComponent, never>;
131
+ static ɵcmp: i0.ɵɵComponentDeclaration<ResourceHeaderComponent, "pw-resource-header", never, { "user": { "alias": "user"; "required": false; }; "userLoggedIn": { "alias": "userLoggedIn"; "required": false; }; }, {}, never, never, false, never>;
132
+ }
133
+
134
+ declare class ProfileImageCropperComponent {
135
+ private readonly cdr;
136
+ imageChangedEvent: Event | string;
137
+ croppedImage: string;
138
+ imageSelectionEvent: EventEmitter<string>;
139
+ closeEvent: EventEmitter<void>;
140
+ fileChangeEvent: EventEmitter<string>;
141
+ aspectRatio: string;
142
+ dynamicData: any;
143
+ transform: ImageTransform;
144
+ canvasRotation: number;
145
+ showCropper: boolean;
146
+ busy: boolean;
147
+ constructor(cdr: ChangeDetectorRef);
148
+ onFileChange(event: Event): void;
149
+ imageCropped(event: ImageCroppedEvent): void;
150
+ imageLoaded(): void;
151
+ rotateLeft(): void;
152
+ rotateRight(): void;
153
+ private flipAfterRotate;
154
+ flipHorizontal(): void;
155
+ flipVertical(): void;
156
+ saveProfilePicture(): void;
157
+ onCloseModal(): void;
158
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProfileImageCropperComponent, never>;
159
+ 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>;
160
+ }
161
+
162
+ /**
163
+ * Lightweight module for pw-image-cropper component
164
+ *
165
+ * Minimal dependencies - only CommonModule, ImageCropperModule, DirectivesModule
166
+ * Use this instead of ResourceSharedComponentsModule when you only need image cropping
167
+ */
168
+ declare class ProfileImageCropperModule {
169
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProfileImageCropperModule, never>;
170
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ProfileImageCropperModule, [typeof ProfileImageCropperComponent, typeof CustomUploaderComponent], [typeof i2.CommonModule, typeof i4.CoreTranslocoModule, typeof i5.ButtonModule, typeof i6.ImageCropperModule, typeof i7.DirectivesModule], [typeof ProfileImageCropperComponent, typeof CustomUploaderComponent]>;
171
+ static ɵinj: i0.ɵɵInjectorDeclaration<ProfileImageCropperModule>;
172
+ }
173
+
174
+ /**
175
+ * ResourceHeaderModule - Optimized
176
+ * DragDropModule removed - now lazy-loaded only when edit modal opens
177
+ * This reduces bundle size for landing pages where users aren't logged in
178
+ */
179
+ declare class ResourceHeaderModule {
180
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResourceHeaderModule, never>;
181
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceHeaderModule, [typeof ResourceHeaderComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4$1.RouterModule, typeof i5$1.NgbModalModule, typeof i5$1.NgbTooltipModule, typeof i4.CoreTranslocoModule, typeof i7.DirectivesModule, typeof i8.PipesModule, typeof i9.AdminModuleUtilsModule, typeof ProfileImageCropperModule], [typeof ResourceHeaderComponent]>;
182
+ static ɵinj: i0.ɵɵInjectorDeclaration<ResourceHeaderModule>;
183
+ }
184
+
185
+ declare class FieldErrorDisplayComponent {
186
+ errorMsg: string;
187
+ displayError: boolean;
188
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDisplayComponent, never>;
189
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldErrorDisplayComponent, "pw-field-error-display", never, { "errorMsg": { "alias": "errorMsg"; "required": false; }; "displayError": { "alias": "displayError"; "required": false; }; }, {}, never, never, false, never>;
190
+ }
191
+
192
+ /**
193
+ * Standalone module for FieldErrorDisplayComponent.
194
+ * Import this lightweight module instead of SharedComponentsModule
195
+ * when you only need field error display functionality.
196
+ */
197
+ declare class FieldErrorDisplayModule {
198
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDisplayModule, never>;
199
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FieldErrorDisplayModule, [typeof FieldErrorDisplayComponent], [typeof i2.CommonModule], [typeof FieldErrorDisplayComponent]>;
200
+ static ɵinj: i0.ɵɵInjectorDeclaration<FieldErrorDisplayModule>;
201
+ }
202
+
203
+ export { CustomUploaderComponent, FieldErrorDisplayComponent, FieldErrorDisplayModule, MatchPassword, ProfileImageCropperComponent, ProfileImageCropperModule, QuillHelper, ResourceHeaderComponent, ResourceHeaderModule, ValidateForm, appendQueryParam, clearQueryParams, handleDateRangeSelection };
@@ -1,287 +0,0 @@
1
- import * as i3$1 from '@angular/cdk/drag-drop';
2
- import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
3
- import * as i3 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i0 from '@angular/core';
6
- import { EventEmitter, Output, Input, Component } from '@angular/core';
7
- import * as i2 from '@angular/forms';
8
- import { FormsModule } from '@angular/forms';
9
-
10
- /**
11
- * Edit Navbar Modal Component
12
- * Contains drag-drop functionality for reordering navbar items
13
- * This component is lazy-loaded only when the edit modal is opened
14
- */
15
- class EditNavbarModalComponent {
16
- constructor() {
17
- this.save = new EventEmitter();
18
- this.closeEvent = new EventEmitter();
19
- }
20
- dropNavbarItems(event) {
21
- moveItemInArray(this.editingNavbar.items, event.previousIndex, event.currentIndex);
22
- }
23
- dropNavbarSubtitles(index, event) {
24
- moveItemInArray(this.editingNavbar.items[index].subtitles, event.previousIndex, event.currentIndex);
25
- }
26
- addNavbarItem() {
27
- this.editingNavbar.items.push({
28
- title: '',
29
- path: '',
30
- subtitles: []
31
- });
32
- }
33
- removeNavbarItem(index) {
34
- this.editingNavbar.items.splice(index, 1);
35
- }
36
- addNavbarSubtitle(index) {
37
- this.editingNavbar.items[index].subtitles.push({
38
- title: '',
39
- path: ''
40
- });
41
- }
42
- removeNavbarSubtitle(navIndex, subIndex) {
43
- this.editingNavbar.items[navIndex].subtitles.splice(subIndex, 1);
44
- }
45
- onSave() {
46
- this.save.emit(this.editingNavbar);
47
- }
48
- onClose() {
49
- this.closeEvent.emit();
50
- }
51
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: EditNavbarModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
52
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: EditNavbarModalComponent, isStandalone: true, selector: "pw-edit-navbar-modal", inputs: { editingNavbar: "editingNavbar" }, outputs: { save: "save", closeEvent: "closeEvent" }, ngImport: i0, template: `
53
- <div class="modal-header">
54
- <h5 class="modal-title">Edit Navbar Links</h5>
55
- <button type="button" class="btn-close" aria-label="Close" (click)="onClose()"></button>
56
- </div>
57
-
58
- <div class="modal-body">
59
- <h4 class="mb-3">Navbar Section</h4>
60
- <div cdkDropList (cdkDropListDropped)="dropNavbarItems($event)">
61
- <div
62
- *ngFor="let item of editingNavbar.items; let i = index"
63
- class="border p-3 mb-3"
64
- cdkDrag
65
- >
66
- <div class="row">
67
- <div class="col-md-5 mb-2">
68
- <label [for]="'navbarTitle' + i" class="form-label">Title</label>
69
- <input
70
- [id]="'navbarTitle' + i"
71
- class="form-control"
72
- [(ngModel)]="item.title"
73
- />
74
- </div>
75
- <div class="col-md-5 mb-2">
76
- <label [for]="'navbarPath' + i" class="form-label">Path</label>
77
- <input
78
- [id]="'navbarPath' + i"
79
- class="form-control"
80
- [(ngModel)]="item.path"
81
- />
82
- </div>
83
- <div
84
- class="col-md-2 d-flex justify-content-between align-items-center mt-4"
85
- >
86
- <i
87
- class="fa fa-trash in-page-trash-icon text-danger cursor-pointer"
88
- (click)="removeNavbarItem(i)"
89
- (keydown.enter)="removeNavbarItem(i)"
90
- (keydown.space)="removeNavbarItem(i)"
91
- ></i>
92
- <i
93
- class="fa fa-bars in-page-bars-icon cursor-pointer"
94
- cdkDragHandle
95
- ></i>
96
- </div>
97
- </div>
98
-
99
- <div cdkDropList (cdkDropListDropped)="dropNavbarSubtitles(i, $event)">
100
- <div
101
- *ngFor="let sub of item.subtitles; let j = index"
102
- class="row border p-3 mb-2 align-items-center"
103
- cdkDrag
104
- >
105
- <div class="col-md-5">
106
- <label [for]="'navbarSubtitleTitle' + i + j" class="form-label"
107
- >Subtitle Title</label
108
- >
109
- <input
110
- [id]="'navbarSubtitleTitle' + i + j"
111
- class="form-control"
112
- [(ngModel)]="sub.title"
113
- />
114
- </div>
115
- <div class="col-md-5">
116
- <label [for]="'navbarSubtitlePath' + i + j" class="form-label"
117
- >Subtitle Path</label
118
- >
119
- <input
120
- [id]="'navbarSubtitlePath' + i + j"
121
- class="form-control"
122
- [(ngModel)]="sub.path"
123
- />
124
- </div>
125
- <div
126
- class="col-md-2 d-flex justify-content-between align-items-center mt-4"
127
- >
128
- <i
129
- class="fa fa-trash in-page-trash-icon text-danger cursor-pointer"
130
- (click)="removeNavbarSubtitle(i, j)"
131
- (keydown.enter)="removeNavbarSubtitle(i, j)"
132
- (keydown.space)="removeNavbarSubtitle(i, j)"
133
- ></i>
134
- <i
135
- class="fa fa-bars in-page-bars-icon cursor-pointer"
136
- cdkDragHandle
137
- ></i>
138
- </div>
139
- </div>
140
- </div>
141
-
142
- <button
143
- class="btn btn-outline-primary btn-sm mt-2"
144
- (click)="addNavbarSubtitle(i)"
145
- >
146
- + Add Subtitle
147
- </button>
148
- </div>
149
- </div>
150
-
151
- <button class="btn btn-primary mt-3" (click)="addNavbarItem()">
152
- + Add Navbar Item
153
- </button>
154
- </div>
155
-
156
- <div class="modal-footer">
157
- <button class="btn btn-secondary" (click)="onClose()">Cancel</button>
158
- <button class="btn btn-primary" (click)="onSave()">Save</button>
159
- </div>
160
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }] }); }
161
- }
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: EditNavbarModalComponent, decorators: [{
163
- type: Component,
164
- args: [{
165
- selector: 'pw-edit-navbar-modal',
166
- standalone: true,
167
- imports: [CommonModule, FormsModule, DragDropModule],
168
- template: `
169
- <div class="modal-header">
170
- <h5 class="modal-title">Edit Navbar Links</h5>
171
- <button type="button" class="btn-close" aria-label="Close" (click)="onClose()"></button>
172
- </div>
173
-
174
- <div class="modal-body">
175
- <h4 class="mb-3">Navbar Section</h4>
176
- <div cdkDropList (cdkDropListDropped)="dropNavbarItems($event)">
177
- <div
178
- *ngFor="let item of editingNavbar.items; let i = index"
179
- class="border p-3 mb-3"
180
- cdkDrag
181
- >
182
- <div class="row">
183
- <div class="col-md-5 mb-2">
184
- <label [for]="'navbarTitle' + i" class="form-label">Title</label>
185
- <input
186
- [id]="'navbarTitle' + i"
187
- class="form-control"
188
- [(ngModel)]="item.title"
189
- />
190
- </div>
191
- <div class="col-md-5 mb-2">
192
- <label [for]="'navbarPath' + i" class="form-label">Path</label>
193
- <input
194
- [id]="'navbarPath' + i"
195
- class="form-control"
196
- [(ngModel)]="item.path"
197
- />
198
- </div>
199
- <div
200
- class="col-md-2 d-flex justify-content-between align-items-center mt-4"
201
- >
202
- <i
203
- class="fa fa-trash in-page-trash-icon text-danger cursor-pointer"
204
- (click)="removeNavbarItem(i)"
205
- (keydown.enter)="removeNavbarItem(i)"
206
- (keydown.space)="removeNavbarItem(i)"
207
- ></i>
208
- <i
209
- class="fa fa-bars in-page-bars-icon cursor-pointer"
210
- cdkDragHandle
211
- ></i>
212
- </div>
213
- </div>
214
-
215
- <div cdkDropList (cdkDropListDropped)="dropNavbarSubtitles(i, $event)">
216
- <div
217
- *ngFor="let sub of item.subtitles; let j = index"
218
- class="row border p-3 mb-2 align-items-center"
219
- cdkDrag
220
- >
221
- <div class="col-md-5">
222
- <label [for]="'navbarSubtitleTitle' + i + j" class="form-label"
223
- >Subtitle Title</label
224
- >
225
- <input
226
- [id]="'navbarSubtitleTitle' + i + j"
227
- class="form-control"
228
- [(ngModel)]="sub.title"
229
- />
230
- </div>
231
- <div class="col-md-5">
232
- <label [for]="'navbarSubtitlePath' + i + j" class="form-label"
233
- >Subtitle Path</label
234
- >
235
- <input
236
- [id]="'navbarSubtitlePath' + i + j"
237
- class="form-control"
238
- [(ngModel)]="sub.path"
239
- />
240
- </div>
241
- <div
242
- class="col-md-2 d-flex justify-content-between align-items-center mt-4"
243
- >
244
- <i
245
- class="fa fa-trash in-page-trash-icon text-danger cursor-pointer"
246
- (click)="removeNavbarSubtitle(i, j)"
247
- (keydown.enter)="removeNavbarSubtitle(i, j)"
248
- (keydown.space)="removeNavbarSubtitle(i, j)"
249
- ></i>
250
- <i
251
- class="fa fa-bars in-page-bars-icon cursor-pointer"
252
- cdkDragHandle
253
- ></i>
254
- </div>
255
- </div>
256
- </div>
257
-
258
- <button
259
- class="btn btn-outline-primary btn-sm mt-2"
260
- (click)="addNavbarSubtitle(i)"
261
- >
262
- + Add Subtitle
263
- </button>
264
- </div>
265
- </div>
266
-
267
- <button class="btn btn-primary mt-3" (click)="addNavbarItem()">
268
- + Add Navbar Item
269
- </button>
270
- </div>
271
-
272
- <div class="modal-footer">
273
- <button class="btn btn-secondary" (click)="onClose()">Cancel</button>
274
- <button class="btn btn-primary" (click)="onSave()">Save</button>
275
- </div>
276
- `
277
- }]
278
- }], propDecorators: { editingNavbar: [{
279
- type: Input
280
- }], save: [{
281
- type: Output
282
- }], closeEvent: [{
283
- type: Output
284
- }] } });
285
-
286
- export { EditNavbarModalComponent };
287
- //# sourceMappingURL=posiwise-utils-edit-navbar-modal.component-ZLFpMqq1.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"posiwise-utils-edit-navbar-modal.component-ZLFpMqq1.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 { CommonModule } from '@angular/common';\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: [CommonModule, 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 <div\n *ngFor=\"let item of editingNavbar.items; let i = index\"\n class=\"border p-3 mb-3\"\n cdkDrag\n >\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\n <div cdkDropList (cdkDropListDropped)=\"dropNavbarSubtitles(i, $event)\">\n <div\n *ngFor=\"let sub of item.subtitles; let j = index\"\n class=\"row border p-3 mb-2 align-items-center\"\n cdkDrag\n >\n <div class=\"col-md-5\">\n <label [for]=\"'navbarSubtitleTitle' + i + j\" 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 [for]=\"'navbarSubtitlePath' + i + j\" 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 </div>\n\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 </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":["i1","i3"],"mappings":";;;;;;;;;AAMA;;;;AAIG;MAmHU,wBAAwB,CAAA;AAlHrC,IAAA,WAAA,GAAA;AAoHc,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,YAAY,EAAQ;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAQ;AA4ClD;AA1CG,IAAA,eAAe,CAAC,KAAK,EAAA;AACjB,QAAA,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC;;IAGtF,mBAAmB,CAAC,KAAa,EAAE,KAAK,EAAA;QACpC,eAAe,CACX,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,EACzC,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,YAAY,CACrB;;IAGL,aAAa,GAAA;AACT,QAAA,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;A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per';
2
- export * from './lib/decorators';
3
- export * from './lib/routing.helper';
4
- export * from './lib/date-range.utils';
5
- export * from './lib/resource-header/resource-header.module';
6
- export * from './lib/resource-header/resource-header.component';
7
- export * from './lib/custom-uploader/custom-uploader.component';
8
- export * from './lib/image-cropper/profile-image-cropper.module';
9
- export * from './lib/image-cropper/image-cropper.component';
10
- export * from './lib/field-error-display/field-error-display.component';
11
- export * from './lib/field-error-display/field-error-display.module';
@@ -1,35 +0,0 @@
1
- import { EventEmitter, Injector } from '@angular/core';
2
- import { AppBaseComponent } from '@posiwise/app-base-component';
3
- import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
4
- import * as i0 from "@angular/core";
5
- export declare class CustomUploaderComponent extends AppBaseComponent {
6
- private readonly modalService;
7
- private readonly document;
8
- saveEvent: EventEmitter<{
9
- file: string;
10
- name: string;
11
- }>;
12
- controlName: string;
13
- previewData: {
14
- url: string;
15
- name?: string;
16
- };
17
- aspectRatio: string;
18
- title: string;
19
- uploadedFile: any;
20
- selectedFileName: string;
21
- buttonBusy: boolean;
22
- constructor(injector: Injector, modalService: NgbModal, document: Document);
23
- deleteExistingFile(): void;
24
- onSaveFile(): void;
25
- onFileChange(value: any): void;
26
- private dataURLtoBlob;
27
- onImageSelection(event: any): void;
28
- openModal(content: any): void;
29
- clearValues(): void;
30
- onClose(): void;
31
- updateHeight(): void;
32
- onImgChange(event?: Event): void;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<CustomUploaderComponent, never>;
34
- 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>;
35
- }
@@ -1,5 +0,0 @@
1
- import * as moment from 'moment';
2
- export declare function handleDateRangeSelection(event: {
3
- startDate: moment.Moment;
4
- endDate: moment.Moment;
5
- }, selectedDateRange: any): any;
@@ -1,4 +0,0 @@
1
- import { AbstractControl } from '@angular/forms';
2
- import 'reflect-metadata';
3
- export declare function ValidateForm(formName: string): MethodDecorator;
4
- export declare function MatchPassword(abstractControl: AbstractControl): any;
@@ -1,7 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class FieldErrorDisplayComponent {
3
- errorMsg: string;
4
- displayError: boolean;
5
- static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDisplayComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<FieldErrorDisplayComponent, "pw-field-error-display", never, { "errorMsg": { "alias": "errorMsg"; "required": false; }; "displayError": { "alias": "displayError"; "required": false; }; }, {}, never, never, false, never>;
7
- }
@@ -1,13 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./field-error-display.component";
3
- import * as i2 from "@angular/common";
4
- /**
5
- * Standalone module for FieldErrorDisplayComponent.
6
- * Import this lightweight module instead of SharedComponentsModule
7
- * when you only need field error display functionality.
8
- */
9
- export declare class FieldErrorDisplayModule {
10
- static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDisplayModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<FieldErrorDisplayModule, [typeof i1.FieldErrorDisplayComponent], [typeof i2.CommonModule], [typeof i1.FieldErrorDisplayComponent]>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<FieldErrorDisplayModule>;
13
- }
@@ -1,30 +0,0 @@
1
- import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
- import { ImageCroppedEvent, ImageTransform } from 'ngx-image-cropper';
3
- import * as i0 from "@angular/core";
4
- export declare class ProfileImageCropperComponent {
5
- private readonly cdr;
6
- imageChangedEvent: Event | string;
7
- croppedImage: string;
8
- imageSelectionEvent: EventEmitter<string>;
9
- closeEvent: EventEmitter<void>;
10
- fileChangeEvent: EventEmitter<string>;
11
- aspectRatio: string;
12
- dynamicData: any;
13
- transform: ImageTransform;
14
- canvasRotation: number;
15
- showCropper: boolean;
16
- busy: boolean;
17
- constructor(cdr: ChangeDetectorRef);
18
- onFileChange(event: Event): void;
19
- imageCropped(event: ImageCroppedEvent): void;
20
- imageLoaded(): void;
21
- rotateLeft(): void;
22
- rotateRight(): void;
23
- private flipAfterRotate;
24
- flipHorizontal(): void;
25
- flipVertical(): void;
26
- saveProfilePicture(): void;
27
- onCloseModal(): void;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<ProfileImageCropperComponent, never>;
29
- 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>;
30
- }