@haloduck/ui 2.1.0 → 2.1.1

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 ADDED
@@ -0,0 +1,1464 @@
1
+ import * as rxjs from 'rxjs';
2
+ import { Observable, Subject } from 'rxjs';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, OnInit, EventEmitter, AfterViewInit, OnChanges, ElementRef, SimpleChanges, OnDestroy, Type, Renderer2, ChangeDetectorRef, Injector, TemplateRef } from '@angular/core';
5
+ import { HttpClient } from '@angular/common/http';
6
+ import { FormGroup, FormBuilder, ControlValueAccessor } from '@angular/forms';
7
+ import { LngLat, MenuItemEx, SearchParams, TableRowProperty } from '@haloduck/core';
8
+ import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
9
+ import * as THREE from 'three';
10
+ import { STLLoader, OrbitControls } from 'three-stdlib';
11
+ import * as _haloduck_ui from '@haloduck/ui';
12
+ import { OverlayRef, Overlay } from '@angular/cdk/overlay';
13
+ import * as _jsverse_transloco from '@jsverse/transloco';
14
+
15
+ interface SocialLoginProvider {
16
+ name: 'google' | 'apple' | 'kakao';
17
+ enabled: boolean;
18
+ clientId?: string;
19
+ redirectUrl?: string;
20
+ state?: {
21
+ [key: string]: string;
22
+ };
23
+ }
24
+ interface MetaData {
25
+ userType: string;
26
+ groupId: string;
27
+ }
28
+ interface AuthenticateConfig {
29
+ socialLoginProviders?: SocialLoginProvider[];
30
+ metaData?: MetaData;
31
+ useSignUp?: boolean;
32
+ }
33
+ declare const AUTHENTICATE_CONFIG: InjectionToken<AuthenticateConfig>;
34
+ declare function provideAuthenticateConfig(config: AuthenticateConfig): {
35
+ provide: InjectionToken<AuthenticateConfig>;
36
+ useValue: AuthenticateConfig;
37
+ };
38
+ declare function provideSocialLoginProviders(providers: SocialLoginProvider[]): {
39
+ provide: InjectionToken<AuthenticateConfig>;
40
+ useValue: AuthenticateConfig;
41
+ };
42
+ declare function provideAuthenticateMetadata(metadata: MetaData): {
43
+ provide: InjectionToken<AuthenticateConfig>;
44
+ useValue: AuthenticateConfig;
45
+ };
46
+ declare class AuthenticateComponent implements OnInit {
47
+ private fb;
48
+ private http;
49
+ private notificationService;
50
+ private injectedConfig;
51
+ private translateService;
52
+ metaData?: any;
53
+ socialLoginProviders?: SocialLoginProvider[];
54
+ useSignUp?: boolean;
55
+ get effectiveMetaData(): any;
56
+ get effectiveSocialProviders(): SocialLoginProvider[];
57
+ get effectiveUseSignUp(): boolean;
58
+ showSocialLogin: boolean;
59
+ showDivider: boolean;
60
+ loginForm: FormGroup;
61
+ signupForm: FormGroup;
62
+ confirmSignupForm: FormGroup;
63
+ resetForm: FormGroup;
64
+ newPasswordForm: FormGroup;
65
+ otpForm: FormGroup;
66
+ stage: 'login' | 'signup' | 'confirmSignup' | 'reset' | 'newPassword' | 'otpVerify';
67
+ emailForReset: string;
68
+ emailForConfirm: string;
69
+ isCurrentlySignedIn: boolean;
70
+ currentUserEmail: string;
71
+ constructor(fb: FormBuilder, http: HttpClient);
72
+ ngOnInit(): void;
73
+ checkCurrentUserStatus(): void;
74
+ switchStage(stage: 'login' | 'signup' | 'confirmSignup' | 'reset' | 'newPassword' | 'otpVerify'): void;
75
+ login(): void;
76
+ confirmNewPassword(): void;
77
+ signup(): void;
78
+ confirmSignup(): void;
79
+ resendConfirmationCode(): void;
80
+ handleAlreadyAuthenticatedUser(): void;
81
+ signOutCurrentUser(): void;
82
+ reset(): void;
83
+ verifyOtp(): void;
84
+ get passwordValue(): string;
85
+ get isMinLength(): boolean;
86
+ get hasUppercase(): boolean;
87
+ get hasLowercase(): boolean;
88
+ get hasNumber(): boolean;
89
+ get hasSpecialChar(): boolean;
90
+ get isPasswordValid(): boolean;
91
+ get passwordRules(): {
92
+ label: string;
93
+ valid: boolean;
94
+ }[];
95
+ get signupPasswordValue(): string;
96
+ get signupIsMinLength(): boolean;
97
+ get signupHasUppercase(): boolean;
98
+ get signupHasLowercase(): boolean;
99
+ get signupHasNumber(): boolean;
100
+ get signupHasSpecialChar(): boolean;
101
+ get isSignupPasswordValid(): boolean;
102
+ get signupPasswordRules(): {
103
+ label: string;
104
+ valid: boolean;
105
+ }[];
106
+ get enabledSocialProviders(): SocialLoginProvider[];
107
+ isProviderEnabled(providerName: 'google' | 'apple' | 'kakao'): boolean;
108
+ loginWithGoogle(): void;
109
+ loginWithApple(): void;
110
+ loginWithKakao(): void;
111
+ getSocialLoginIcon(provider: string): string;
112
+ getSocialLoginLabel(provider: string): rxjs.Observable<any>;
113
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticateComponent, never>;
114
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticateComponent, "haloduck-authenticate", never, { "metaData": { "alias": "metaData"; "required": false; }; "socialLoginProviders": { "alias": "socialLoginProviders"; "required": false; }; "useSignUp": { "alias": "useSignUp"; "required": false; }; "showSocialLogin": { "alias": "showSocialLogin"; "required": false; }; "showDivider": { "alias": "showDivider"; "required": false; }; }, {}, never, never, true, never>;
115
+ }
116
+
117
+ interface ProcessCognitoUserResponse {
118
+ email: string;
119
+ authResult: {
120
+ AccessToken: string;
121
+ ExpiresIn: number;
122
+ IdToken: string;
123
+ RefreshToken: string;
124
+ TokenType: string;
125
+ };
126
+ }
127
+ declare class AuthenticateCallbackComponent implements OnInit {
128
+ private route;
129
+ private router;
130
+ private notificationService;
131
+ isProcessing: boolean;
132
+ error: string | null;
133
+ success: boolean;
134
+ ngOnInit(): void;
135
+ private handleSocialCallback;
136
+ private decodeBase64;
137
+ private processAmplifyLogin;
138
+ private getClientId;
139
+ redirectToLogin(): void;
140
+ private redirectAfterLogin;
141
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticateCallbackComponent, never>;
142
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticateCallbackComponent, "haloduck-authenticate-callback", never, {}, {}, never, never, true, never>;
143
+ }
144
+
145
+ type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'none';
146
+ declare class ButtonComponent {
147
+ disabled: boolean | null;
148
+ variant: ButtonVariant;
149
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
150
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "haloduck-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, ["*"], true, never>;
151
+ }
152
+
153
+ interface Option {
154
+ id?: string;
155
+ value: string;
156
+ isSticky?: boolean;
157
+ isExclusive?: boolean;
158
+ shouldManualInput?: boolean;
159
+ manualPrefix?: string;
160
+ }
161
+ declare class SelectDropdownComponent {
162
+ protected _filteredOptions: i0.WritableSignal<Option[]>;
163
+ protected _options: Option[];
164
+ protected _selectedOptionIds: string[];
165
+ protected manualInputValues: Record<string, string>;
166
+ protected activeManualKey: string | null;
167
+ protected isComposing: boolean;
168
+ selectedChange: EventEmitter<string[]>;
169
+ closeDropdown: EventEmitter<void>;
170
+ useFilter: boolean;
171
+ multiselect: boolean;
172
+ atLeastOne: boolean;
173
+ asButton: boolean;
174
+ set options(value: Option[] | null);
175
+ get options(): Option[] | null;
176
+ set selectedOptionIds(value: string[] | null);
177
+ get selectedOptions(): string[] | null;
178
+ onFilterInput(event: Event): void;
179
+ onToggleOption(option: Option): void;
180
+ onEditManualInput(option: Option): void;
181
+ getManualInputDisplayValue(option: Option): string;
182
+ isOptionSelected(option: Option): boolean;
183
+ private isIdExclusive;
184
+ private getManualKey;
185
+ private seedManualInputs;
186
+ onManualInputChange(option: Option, value: string): void;
187
+ onCompositionStart(): void;
188
+ onCompositionEnd(option: Option, event: Event): void;
189
+ onManualInputKeydown(option: Option, event: KeyboardEvent): void;
190
+ onManualInputConfirm(option: Option): void;
191
+ onManualInputBlur(option: Option): void;
192
+ private emitSelectedChange;
193
+ private setSelected;
194
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectDropdownComponent, never>;
195
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectDropdownComponent, "haloduck-select-dropdown", never, { "useFilter": { "alias": "useFilter"; "required": false; }; "multiselect": { "alias": "multiselect"; "required": false; }; "atLeastOne": { "alias": "atLeastOne"; "required": false; }; "asButton": { "alias": "asButton"; "required": false; }; "options": { "alias": "options"; "required": false; }; "selectedOptionIds": { "alias": "selectedOptionIds"; "required": false; }; }, { "selectedChange": "selectedChange"; "closeDropdown": "closeDropdown"; }, never, never, true, never>;
196
+ }
197
+
198
+ declare class SelectComponent implements ControlValueAccessor, AfterViewInit, OnChanges {
199
+ private readonly translateService;
200
+ private readonly overlay;
201
+ private readonly viewContainerRef;
202
+ private readonly cdr;
203
+ private overlayRef;
204
+ private static instanceCounter;
205
+ readonly radioGroupName: string;
206
+ selectedChange: EventEmitter<string | string[]>;
207
+ disabled: boolean | null;
208
+ loading: boolean;
209
+ variant: 'primary' | 'secondary' | 'danger' | 'none';
210
+ asButton: boolean;
211
+ useIcon: boolean;
212
+ useFilter: boolean;
213
+ multiselect: boolean;
214
+ placeholder: string;
215
+ atLeastOne: boolean;
216
+ showAll: boolean;
217
+ showAllItems: boolean;
218
+ options: Option[] | null;
219
+ layout: 'horizontal' | 'vertical';
220
+ labelWidth: string;
221
+ set value(value: string[] | string);
222
+ get value(): string | string[] | null;
223
+ origin: ElementRef;
224
+ label: ElementRef;
225
+ isDropdownOpen: i0.WritableSignal<boolean>;
226
+ selectedOptionIds: string[];
227
+ displayedSelectedOptions: Option[];
228
+ private selectedIdToDisplayOption;
229
+ manualInputValues: Record<string, string>;
230
+ activeManualKey: string | null;
231
+ isComposing: boolean;
232
+ onClick(event: MouseEvent): void;
233
+ onKeyDown(event: KeyboardEvent): void;
234
+ onDeselectOption(event: Event, option: Option): void;
235
+ onToggleOption(option: Option): void;
236
+ isOptionSelected(option: Option): boolean;
237
+ private isIdExclusive;
238
+ getSelectedValue(): string | string[] | null;
239
+ onChange: (_value: any) => void;
240
+ onTouched: () => void;
241
+ writeValue(value: string[] | string): void;
242
+ registerOnChange(fn: any): void;
243
+ registerOnTouched(fn: any): void;
244
+ setDisabledState?(isDisabled: boolean): void;
245
+ ngAfterViewInit(): void;
246
+ constructor();
247
+ ngOnChanges(changes: SimpleChanges): void;
248
+ private recomputeSelectedOptions;
249
+ private isManualSelection;
250
+ getManualKey(option: Option): string;
251
+ seedManualInputs(): void;
252
+ onManualInputChange(option: Option, value: string): void;
253
+ onCompositionStart(): void;
254
+ onCompositionEnd(option: Option, event: Event): void;
255
+ onManualInputKeydown(option: Option, event: KeyboardEvent): void;
256
+ onManualInputBlur(option: Option): void;
257
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
258
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "haloduck-select", never, { "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "asButton": { "alias": "asButton"; "required": false; }; "useIcon": { "alias": "useIcon"; "required": false; }; "useFilter": { "alias": "useFilter"; "required": false; }; "multiselect": { "alias": "multiselect"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "atLeastOne": { "alias": "atLeastOne"; "required": false; }; "showAll": { "alias": "showAll"; "required": false; }; "showAllItems": { "alias": "showAllItems"; "required": false; }; "options": { "alias": "options"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "labelWidth": { "alias": "labelWidth"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, ["*", "buttonIcon"], true, never>;
259
+ }
260
+
261
+ interface DateRange {
262
+ from: string;
263
+ to: string;
264
+ }
265
+ interface DateRangeDropdown {
266
+ currentYear: number;
267
+ currentMonth: number;
268
+ from?: string;
269
+ listCalendarDate: CalendarDate[];
270
+ }
271
+ interface CalendarDate {
272
+ datetime: string;
273
+ date: string;
274
+ isToday: boolean;
275
+ isTheDate: boolean;
276
+ isCurrentMonth: boolean;
277
+ }
278
+ declare class CalendarComponent implements OnInit {
279
+ private readonly translateService;
280
+ monthSelect: SelectComponent;
281
+ singleDate: boolean;
282
+ firstDayOfWeek: number;
283
+ selectedDate?: string;
284
+ selectedDateRange?: DateRange;
285
+ dateChange: EventEmitter<CalendarDate>;
286
+ dateRangeChange: EventEmitter<DateRange>;
287
+ currentYear: number;
288
+ currentMonth: number;
289
+ listCalendarDate: CalendarDate[];
290
+ isFromSelected: boolean;
291
+ yearList: Option[];
292
+ monthList: Option[];
293
+ onAdjustYear(amount: number): void;
294
+ onAdjustMonth(amount: number): void;
295
+ onSelectCalendarDate(date: CalendarDate): void;
296
+ onCalenderOpen(value: string | DateRange): void;
297
+ calculateDateRangeDropdown(): void;
298
+ onSelectYear(year: string | string[]): void;
299
+ onSelectMonth(month: string | string[]): void;
300
+ ngOnInit(): void;
301
+ constructor();
302
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
303
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "haloduck-calendar", never, { "singleDate": { "alias": "singleDate"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "selectedDate": { "alias": "selectedDate"; "required": false; }; "selectedDateRange": { "alias": "selectedDateRange"; "required": false; }; }, { "dateChange": "dateChange"; "dateRangeChange": "dateRangeChange"; }, never, never, true, never>;
304
+ }
305
+ declare function dateToString(date: Date): string;
306
+
307
+ interface Button {
308
+ id: string;
309
+ label: string;
310
+ variant: ButtonVariant;
311
+ }
312
+
313
+ declare class ConfirmDialogService {
314
+ private readonly dialogService;
315
+ private clickedButton$;
316
+ confirm(title: string, message: string, buttons: Button[]): Observable<string>;
317
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogService, never>;
318
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmDialogService>;
319
+ }
320
+
321
+ declare class CopyButtonComponent {
322
+ text: string;
323
+ isAnimating: boolean;
324
+ copyToClipboard($event: Event): void;
325
+ static ɵfac: i0.ɵɵFactoryDeclaration<CopyButtonComponent, never>;
326
+ static ɵcmp: i0.ɵɵComponentDeclaration<CopyButtonComponent, "haloduck-copy-button", never, { "text": { "alias": "text"; "required": false; }; }, {}, never, never, true, never>;
327
+ }
328
+
329
+ declare class DatePickerComponent implements ControlValueAccessor, OnInit, OnDestroy {
330
+ destroy$: Subject<void>;
331
+ private readonly translateService;
332
+ private readonly overlay;
333
+ disabled: boolean;
334
+ placeholder: string;
335
+ firstDayOfWeek: number;
336
+ origin: ElementRef;
337
+ selectedDate?: string;
338
+ private overlayRef?;
339
+ onClick(): void;
340
+ onDateChange(date: CalendarDate): void;
341
+ openCalendar(): void;
342
+ closeCalendar(): void;
343
+ onChange: (value: any) => void;
344
+ onTouched: () => void;
345
+ writeValue(value: string): void;
346
+ registerOnChange(fn: any): void;
347
+ registerOnTouched(fn: any): void;
348
+ setDisabledState?(isDisabled: boolean): void;
349
+ ngOnInit(): void;
350
+ ngOnDestroy(): void;
351
+ constructor();
352
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
353
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "haloduck-date-picker", never, { "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; }, {}, never, ["*"], true, never>;
354
+ }
355
+
356
+ declare class DateRangeComponent implements ControlValueAccessor, OnDestroy {
357
+ destroy$: Subject<void>;
358
+ private readonly translateService;
359
+ private readonly overlay;
360
+ dateRangeOptions: Option[];
361
+ disabled: boolean;
362
+ placeholder: string;
363
+ firstDayOfWeek: number;
364
+ origin: ElementRef;
365
+ selectedDateRangeOptionId?: string;
366
+ dateRange?: DateRange;
367
+ private overlayRef?;
368
+ getSelectedDateRangeString(): any;
369
+ onClick(): void;
370
+ onDateRangeOptionChange(selectedOptionId: string): void;
371
+ onDateRangeChange(dateRange: DateRange): void;
372
+ calculateDateRange(): void;
373
+ getDateRangeOptionId(dateRange: DateRange): string;
374
+ openCalendar(): void;
375
+ closeCalendar(): void;
376
+ onChange: (value: any) => void;
377
+ onTouched: () => void;
378
+ writeValue(value: DateRange): void;
379
+ registerOnChange(fn: any): void;
380
+ registerOnTouched(fn: any): void;
381
+ setDisabledState?(isDisabled: boolean): void;
382
+ ngOnDestroy(): void;
383
+ constructor();
384
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeComponent, never>;
385
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateRangeComponent, "haloduck-date-range", never, { "dateRangeOptions": { "alias": "dateRangeOptions"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; }, {}, never, ["*"], true, never>;
386
+ }
387
+
388
+ declare class DrawCanvasComponent implements AfterViewInit, ControlValueAccessor {
389
+ imagePath: string;
390
+ lineColor: string;
391
+ canvasRef: ElementRef<HTMLCanvasElement>;
392
+ private ctx;
393
+ private isDrawing;
394
+ private onChange;
395
+ private onTouched;
396
+ ngAfterViewInit(): void;
397
+ private loadImage;
398
+ private setupCanvas;
399
+ private startMouseDrawing;
400
+ private mouseDraw;
401
+ private startTouchDrawing;
402
+ private touchDraw;
403
+ private stopDrawing;
404
+ saveDrawing(): void;
405
+ private dataURLToBlob;
406
+ writeValue(file: File | null): void;
407
+ registerOnChange(fn: (file: File | null) => void): void;
408
+ registerOnTouched(fn: () => void): void;
409
+ setDisabledState?(isDisabled: boolean): void;
410
+ onReset(): void;
411
+ static ɵfac: i0.ɵɵFactoryDeclaration<DrawCanvasComponent, never>;
412
+ static ɵcmp: i0.ɵɵComponentDeclaration<DrawCanvasComponent, "haloduck-draw-canvas", never, { "imagePath": { "alias": "imagePath"; "required": false; }; "lineColor": { "alias": "lineColor"; "required": false; }; }, {}, never, never, true, never>;
413
+ }
414
+
415
+ declare const ERROR_NOT_ACCEPTABLE_FILE_TYPE = "NOT_ACCEPTABLE_FILE_TYPE";
416
+ declare const ERROR_OVER_SIZE = "OVER_SIZE";
417
+ declare const ERROR_OVER_COUNT = "OVER_COUNT";
418
+ declare const ERROR_UPLOAD = "UPLOAD";
419
+ interface FileEx extends File {
420
+ isUploading: boolean;
421
+ isUploaded: boolean;
422
+ key: string;
423
+ name: string;
424
+ size: number;
425
+ type: string;
426
+ tag: string[];
427
+ previewUrl?: string;
428
+ }
429
+ declare class FileUploaderComponent implements ControlValueAccessor {
430
+ disabled: boolean;
431
+ urlPrefix: string;
432
+ keyPrefix: string;
433
+ uploadApi: (file: File, keyPrefix: string) => Observable<string>;
434
+ multiple: boolean;
435
+ maxCount: number;
436
+ maxSize: number;
437
+ accept: string[];
438
+ filesAdded: EventEmitter<FileEx[]>;
439
+ fileRemoved: EventEmitter<FileEx>;
440
+ error: EventEmitter<{
441
+ error: string;
442
+ file: FileEx;
443
+ }[]>;
444
+ private readonly cdr;
445
+ private readonly zone;
446
+ files: FileEx[];
447
+ isUploading: boolean;
448
+ isDragOver: boolean;
449
+ private onChange;
450
+ private onTouched;
451
+ writeValue(files: FileEx[]): void;
452
+ registerOnChange(fn: (files: FileEx[]) => void): void;
453
+ registerOnTouched(fn: () => void): void;
454
+ setDisabledState?(isDisabled: boolean): void;
455
+ onFileSelected(event: Event): void;
456
+ removeFile(index: number): void;
457
+ onFileTagChanged(index: number, tags: string[]): void;
458
+ onDragOver(event: DragEvent): void;
459
+ onDragLeave(event: DragEvent): void;
460
+ onDrop(event: DragEvent): void;
461
+ getFilePreview(file: FileEx): string;
462
+ addFiles(addedFiles: FileEx[]): void;
463
+ isAcceptableFileType(file: File): boolean;
464
+ startUpload(): Observable<FileEx[]>;
465
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploaderComponent, never>;
466
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploaderComponent, "haloduck-file-uploader", never, { "disabled": { "alias": "disabled"; "required": false; }; "urlPrefix": { "alias": "urlPrefix"; "required": false; }; "keyPrefix": { "alias": "keyPrefix"; "required": false; }; "uploadApi": { "alias": "uploadApi"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "maxCount": { "alias": "maxCount"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; }, { "filesAdded": "filesAdded"; "fileRemoved": "fileRemoved"; "error": "error"; }, never, never, true, never>;
467
+ }
468
+
469
+ declare class FlipComponent {
470
+ title: string;
471
+ set isOpen(value: boolean);
472
+ _isOpen: i0.WritableSignal<boolean>;
473
+ toggle(): void;
474
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlipComponent, never>;
475
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlipComponent, "haloduck-flip", never, { "title": { "alias": "title"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; }, {}, never, ["*"], true, never>;
476
+ }
477
+
478
+ declare class ImageUploaderComponent implements ControlValueAccessor, OnInit, AfterViewInit {
479
+ label: ElementRef;
480
+ disabled: boolean;
481
+ id: string;
482
+ alt: string;
483
+ urlPrefix: string;
484
+ keyPrefix: string;
485
+ uploadApi: (file: File, keyPrefix: string) => Observable<string>;
486
+ backgroundImage: string;
487
+ shouldPassToSibling: boolean;
488
+ passToSibling: EventEmitter<FileEx[]>;
489
+ fileAdded: EventEmitter<FileEx>;
490
+ fileRemoved: EventEmitter<FileEx>;
491
+ error: EventEmitter<{
492
+ error: string;
493
+ file: FileEx;
494
+ }[]>;
495
+ imageUrl: string | null;
496
+ file: FileEx | null;
497
+ isDragOver: boolean;
498
+ isUploading: boolean;
499
+ private readonly dialogService;
500
+ private onChange;
501
+ private onTouched;
502
+ writeValue(key: string | null): void;
503
+ registerOnChange(fn: (url: string | null) => void): void;
504
+ registerOnTouched(fn: () => void): void;
505
+ setDisabledState?(isDisabled: boolean): void;
506
+ startUpload(): Observable<FileEx>;
507
+ onFileSelected(event: Event): void;
508
+ onDrop(event: DragEvent): void;
509
+ onDragOver(event: DragEvent): void;
510
+ onDragLeave(event: DragEvent): void;
511
+ onDragStart(event: DragEvent): void;
512
+ onDragEnd(event: DragEvent): void;
513
+ removeImage(): void;
514
+ setFiles(listFile: FileEx[]): void;
515
+ previewImage(imageUrl: string): void;
516
+ ngAfterViewInit(): void;
517
+ ngOnInit(): void;
518
+ static ɵfac: i0.ɵɵFactoryDeclaration<ImageUploaderComponent, never>;
519
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImageUploaderComponent, "haloduck-image-uploader", never, { "disabled": { "alias": "disabled"; "required": false; }; "id": { "alias": "id"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "urlPrefix": { "alias": "urlPrefix"; "required": false; }; "keyPrefix": { "alias": "keyPrefix"; "required": false; }; "uploadApi": { "alias": "uploadApi"; "required": false; }; "backgroundImage": { "alias": "backgroundImage"; "required": false; }; "shouldPassToSibling": { "alias": "shouldPassToSibling"; "required": false; }; }, { "passToSibling": "passToSibling"; "fileAdded": "fileAdded"; "fileRemoved": "fileRemoved"; "error": "error"; }, never, ["*"], true, never>;
520
+ }
521
+
522
+ declare class ImageViewerComponent {
523
+ context: any;
524
+ imageUrl: string;
525
+ imageAlt: string;
526
+ private readonly dialogService;
527
+ onClose(): void;
528
+ static ɵfac: i0.ɵɵFactoryDeclaration<ImageViewerComponent, never>;
529
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImageViewerComponent, "haloduck-image-viewer", never, { "context": { "alias": "context"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "imageAlt": { "alias": "imageAlt"; "required": false; }; }, {}, never, never, true, never>;
530
+ }
531
+
532
+ declare class InputComponent implements ControlValueAccessor, AfterViewInit {
533
+ private readonly cdr;
534
+ label: ElementRef;
535
+ private inputElement;
536
+ placeholder: string;
537
+ type: string;
538
+ disabled: boolean;
539
+ rows: number;
540
+ autofocus: boolean;
541
+ value: string;
542
+ onChange: (value: any) => void;
543
+ onTouched: () => void;
544
+ writeValue(value: any): void;
545
+ registerOnChange(fn: any): void;
546
+ registerOnTouched(fn: any): void;
547
+ setDisabledState?(isDisabled: boolean): void;
548
+ focus(): void;
549
+ onInput(event: Event): void;
550
+ onKeydown($event: KeyboardEvent): void;
551
+ ngAfterViewInit(): void;
552
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
553
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "haloduck-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, ["*"], true, never>;
554
+ }
555
+
556
+ declare class LanguageSelectorComponent implements OnInit {
557
+ origin: ElementRef;
558
+ private readonly destroy$;
559
+ private readonly translateService;
560
+ private readonly overlay;
561
+ language: i0.WritableSignal<string>;
562
+ private overlayRef?;
563
+ showLanguageOptions(): void;
564
+ hideLanguageOptions(): void;
565
+ ngOnInit(): void;
566
+ static ɵfac: i0.ɵɵFactoryDeclaration<LanguageSelectorComponent, never>;
567
+ static ɵcmp: i0.ɵɵComponentDeclaration<LanguageSelectorComponent, "haloduck-language-selector", never, {}, {}, never, never, true, never>;
568
+ }
569
+
570
+ declare const google: any;
571
+ interface Location {
572
+ plusCode: string;
573
+ postalCode: string;
574
+ countryCode: string;
575
+ country: string;
576
+ area1: string;
577
+ area2: string;
578
+ area3: string;
579
+ formatted: string;
580
+ lat: number;
581
+ lng: number;
582
+ }
583
+ declare class MapToAddressComponent implements OnInit, ControlValueAccessor {
584
+ private readonly coreService;
585
+ mapId: string;
586
+ defaultLngLat: LngLat;
587
+ disabled: boolean;
588
+ language: string;
589
+ currentLngLat?: LngLat;
590
+ private _currentAddress?;
591
+ private _isGoogleLoaded;
592
+ private _loadError?;
593
+ get isGoogleLoaded(): boolean;
594
+ get loadError(): string | undefined;
595
+ set currentAddress(value: string);
596
+ locationChanged: EventEmitter<Location>;
597
+ map: any;
598
+ marker: any;
599
+ location: Location;
600
+ private onChange;
601
+ private onTouched;
602
+ ngOnInit(): Promise<void>;
603
+ initScript(): Promise<void>;
604
+ initMap(): void;
605
+ initializeMap(lngLat: LngLat): void;
606
+ onClick(event: any): void;
607
+ setMapToAddress(): void;
608
+ getAddress(): void;
609
+ parseAddress(results: any): Location;
610
+ getComponentLongName(results: any[], type: string): string;
611
+ getComponentShortName(results: any[], type: string): string;
612
+ writeValue(value: Location): void;
613
+ registerOnChange(fn: (value: Location) => void): void;
614
+ registerOnTouched(fn: () => void): void;
615
+ setDisabledState?(isDisabled: boolean): void;
616
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapToAddressComponent, never>;
617
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapToAddressComponent, "haloduck-map-to-address", never, { "disabled": { "alias": "disabled"; "required": false; }; "language": { "alias": "language"; "required": false; }; "currentLngLat": { "alias": "currentLngLat"; "required": false; }; "currentAddress": { "alias": "currentAddress"; "required": false; }; }, { "locationChanged": "locationChanged"; }, never, never, true, never>;
618
+ }
619
+
620
+ declare class SideMenuComponent {
621
+ menuItems: Array<MenuItemEx>;
622
+ depth: number;
623
+ menuItemSelected: EventEmitter<MenuItemEx>;
624
+ static ɵfac: i0.ɵɵFactoryDeclaration<SideMenuComponent, never>;
625
+ static ɵcmp: i0.ɵɵComponentDeclaration<SideMenuComponent, "haloduck-side-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; }, { "menuItemSelected": "menuItemSelected"; }, never, never, true, never>;
626
+ }
627
+
628
+ declare class SideMenuItemComponent implements OnInit {
629
+ private sanitizer;
630
+ private readonly router;
631
+ menuItem: MenuItemEx;
632
+ depth: number;
633
+ menuItemSelectHandler?: EventEmitter<MenuItemEx>;
634
+ iconSvg: SafeHtml;
635
+ constructor(sanitizer: DomSanitizer);
636
+ ngOnInit(): void;
637
+ onMenuItemSelected(menuItem: MenuItemEx): void;
638
+ navigateTo(link: string[]): void;
639
+ static ɵfac: i0.ɵɵFactoryDeclaration<SideMenuItemComponent, never>;
640
+ static ɵcmp: i0.ɵɵComponentDeclaration<SideMenuItemComponent, "haloduck-side-menu-item", never, { "menuItem": { "alias": "menuItem"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "menuItemSelectHandler": { "alias": "menuItemSelectHandler"; "required": false; }; }, {}, never, never, true, never>;
641
+ }
642
+
643
+ declare class StlViewerComponent implements OnInit, AfterViewInit, OnDestroy {
644
+ fileUrl: string;
645
+ filename: string;
646
+ context: any;
647
+ containerRef: ElementRef;
648
+ private readonly dialogService;
649
+ isPopup: boolean;
650
+ scene: THREE.Scene;
651
+ camera: THREE.PerspectiveCamera;
652
+ renderer: THREE.WebGLRenderer;
653
+ loader: STLLoader;
654
+ controls: OrbitControls;
655
+ loadingPercentage: number;
656
+ showStl(): void;
657
+ download(): void;
658
+ closeDialog(): void;
659
+ animate: () => void;
660
+ ngAfterViewInit(): void;
661
+ ngOnDestroy(): void;
662
+ ngOnInit(): void;
663
+ static ɵfac: i0.ɵɵFactoryDeclaration<StlViewerComponent, never>;
664
+ static ɵcmp: i0.ɵɵComponentDeclaration<StlViewerComponent, "haloduck-stl-viewer", never, { "fileUrl": { "alias": "fileUrl"; "required": false; }; "filename": { "alias": "filename"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, {}, never, never, true, never>;
665
+ }
666
+
667
+ interface TableColumn {
668
+ key: string | string[];
669
+ label: string;
670
+ width?: string;
671
+ align?: 'text-left' | 'text-center' | 'text-right';
672
+ sortable?: boolean;
673
+ sort?: SearchParams.Sort;
674
+ type?: 'number' | 'date' | 'datetime' | 'time' | 'custom';
675
+ breakpoint?: string;
676
+ hidden?: Observable<boolean>;
677
+ customRenderFn?: (data: any) => Observable<string>;
678
+ customRenderTemplate?: string;
679
+ fix?: 'left' | 'right' | 'none';
680
+ copyable?: boolean;
681
+ }
682
+ interface TableRow extends TableRowProperty {
683
+ [key: string]: any;
684
+ }
685
+ declare class TableComponent implements OnInit, AfterViewInit {
686
+ private readonly coreService;
687
+ private readonly tableSettingService;
688
+ loadMoreRowRef?: ElementRef;
689
+ tableLayout: 'fixed' | 'auto';
690
+ tableName: string;
691
+ useLoadMore: boolean;
692
+ private defaultAutoLoad;
693
+ private defaultShowHeader;
694
+ columns: TableColumn[];
695
+ rows: Observable<TableRow[]>;
696
+ isLoading: Observable<boolean>;
697
+ isPaging: Observable<boolean>;
698
+ sort: Observable<SearchParams.Sort[]>;
699
+ expandedTemplate?: any;
700
+ customTemplates: {
701
+ [key: string]: any;
702
+ };
703
+ onSortChange: EventEmitter<SearchParams.Sort>;
704
+ lastEvaluatedKey: Observable<any>;
705
+ onLoadMore: EventEmitter<any>;
706
+ onRowClick: EventEmitter<TableRow>;
707
+ onRowDblClick: EventEmitter<TableRow>;
708
+ settings$: Observable<_haloduck_ui.TableSettings>;
709
+ showHeader$: Observable<boolean>;
710
+ autoLoad$: Observable<boolean>;
711
+ getColumnValue(row: TableRow, column: TableColumn): Observable<string>;
712
+ getColumnValueRaw(row: TableRow, column: TableColumn): any;
713
+ getColumnValueRawWithArrayKey(row: TableRow, column: TableColumn): any;
714
+ getNumber(data: any): Observable<string>;
715
+ getDate(data: any): Observable<string>;
716
+ getDateTime(data: any): Observable<string>;
717
+ getTime(data: any): Observable<string>;
718
+ onUpdateSort(field: string | string[], direction: SearchParams.SortDirection): void;
719
+ getSortDirection(field: string | string[]): Observable<string | undefined>;
720
+ onLoadMoreClicked(): void;
721
+ onAutoLoadTriggered(): void;
722
+ onRowClicked(row: TableRow): void;
723
+ onRowDblClicked(row: TableRow): void;
724
+ getFixedPosition(column: TableColumn, side: 'left' | 'right'): string | null;
725
+ getFixedZIndex(column: TableColumn): number;
726
+ copyToClipboard(event: Event, row: TableRow, column: TableColumn): Promise<void>;
727
+ ngOnInit(): void;
728
+ openSettings(): void;
729
+ ngAfterViewInit(): void;
730
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
731
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "haloduck-table", never, { "tableLayout": { "alias": "tableLayout"; "required": false; }; "tableName": { "alias": "tableName"; "required": false; }; "useLoadMore": { "alias": "useLoadMore"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "isPaging": { "alias": "isPaging"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "expandedTemplate": { "alias": "expandedTemplate"; "required": false; }; "customTemplates": { "alias": "customTemplates"; "required": false; }; "lastEvaluatedKey": { "alias": "lastEvaluatedKey"; "required": false; }; }, { "onSortChange": "onSortChange"; "onLoadMore": "onLoadMore"; "onRowClick": "onRowClick"; "onRowDblClick": "onRowDblClick"; }, never, never, true, never>;
732
+ }
733
+
734
+ interface TableSettings {
735
+ showHeader: boolean;
736
+ autoLoad: boolean;
737
+ }
738
+ declare class TableSettingService {
739
+ private dialogService;
740
+ private currentOverlayRef?;
741
+ private currentTableNameSubject;
742
+ private settingsSubjects;
743
+ private defaultSettings;
744
+ get currentTableName$(): Observable<string>;
745
+ show(tableName: string): void;
746
+ hide(): void;
747
+ getSettings(tableName: string): Observable<TableSettings>;
748
+ setCurrentTableName(tableName: string): void;
749
+ updateSettings(tableName: string, settings: TableSettings): void;
750
+ private loadSettingsFromStorage;
751
+ private saveSettingsToStorage;
752
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableSettingService, never>;
753
+ static ɵprov: i0.ɵɵInjectableDeclaration<TableSettingService>;
754
+ }
755
+
756
+ declare class TableSettingComponent implements OnInit {
757
+ private readonly tableSettingService;
758
+ context?: {
759
+ tableName: string;
760
+ overlayRef: OverlayRef;
761
+ };
762
+ get currentSettings$(): rxjs.Observable<TableSettings>;
763
+ ngOnInit(): void;
764
+ close(): void;
765
+ onSettingChange(settings: TableSettings): void;
766
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableSettingComponent, never>;
767
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableSettingComponent, "haloduck-table-setting", never, { "context": { "alias": "context"; "required": false; }; }, {}, never, never, true, never>;
768
+ }
769
+
770
+ declare class ToggleComponent implements ControlValueAccessor, AfterViewInit {
771
+ layout: 'horizontal' | 'vertical';
772
+ value: boolean | null;
773
+ disabled: boolean;
774
+ nullable: boolean;
775
+ toggled: EventEmitter<boolean | null>;
776
+ label: ElementRef;
777
+ onChange: (value: any) => void;
778
+ onTouched: () => void;
779
+ writeValue(value: any): void;
780
+ registerOnChange(fn: any): void;
781
+ registerOnTouched(fn: any): void;
782
+ setDisabledState?(isDisabled: boolean): void;
783
+ onToggle(): void;
784
+ ngAfterViewInit(): void;
785
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToggleComponent, never>;
786
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleComponent, "haloduck-toggle", never, { "layout": { "alias": "layout"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "nullable": { "alias": "nullable"; "required": false; }; }, { "toggled": "toggled"; }, never, ["*"], true, never>;
787
+ }
788
+
789
+ interface TabItem {
790
+ id?: string;
791
+ label: string;
792
+ component: Type<any>;
793
+ inputs?: Record<string, any>;
794
+ }
795
+ declare class TabsComponent implements OnChanges, AfterViewInit {
796
+ tabs: TabItem[];
797
+ selectedIndex: number;
798
+ layout: 'horizontal' | 'vertical';
799
+ labelWidth: string;
800
+ selectedIndexChange: EventEmitter<number>;
801
+ label: ElementRef;
802
+ ngOnChanges(changes: SimpleChanges): void;
803
+ ngAfterViewInit(): void;
804
+ get current(): TabItem | null;
805
+ select(index: number): void;
806
+ private ensureSelectedInRange;
807
+ static ɵfac: i0.ɵɵFactoryDeclaration<TabsComponent, never>;
808
+ static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "haloduck-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "labelWidth": { "alias": "labelWidth"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; }, never, ["[slot=label]"], true, never>;
809
+ }
810
+
811
+ declare class TagInputComponent implements ControlValueAccessor, AfterViewInit {
812
+ label: ElementRef;
813
+ inputEl: ElementRef<HTMLInputElement>;
814
+ placeholder: string;
815
+ disabled: boolean;
816
+ allowDuplicates: boolean;
817
+ set value(tags: string[] | null);
818
+ valueChange: EventEmitter<string[]>;
819
+ tags: string[];
820
+ inputValue: string;
821
+ onChange: (value: any) => void;
822
+ onTouched: () => void;
823
+ writeValue(value: string[] | null): void;
824
+ registerOnChange(fn: any): void;
825
+ registerOnTouched(fn: any): void;
826
+ setDisabledState(isDisabled: boolean): void;
827
+ ngAfterViewInit(): void;
828
+ focus(): void;
829
+ onInput(event: Event): void;
830
+ onBlur(): void;
831
+ onKeydown(event: KeyboardEvent): void;
832
+ removeTag(index: number): void;
833
+ private commitCurrentInput;
834
+ private addTag;
835
+ private emitChanges;
836
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagInputComponent, never>;
837
+ static ɵcmp: i0.ɵɵComponentDeclaration<TagInputComponent, "haloduck-tag-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "allowDuplicates": { "alias": "allowDuplicates"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], true, never>;
838
+ }
839
+
840
+ declare class TagViewerComponent implements AfterViewInit {
841
+ label: ElementRef;
842
+ tags: string[];
843
+ shouldWrap: boolean;
844
+ set value(tags: string[] | null);
845
+ ngAfterViewInit(): void;
846
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagViewerComponent, never>;
847
+ static ɵcmp: i0.ɵɵComponentDeclaration<TagViewerComponent, "haloduck-tag-viewer", never, { "shouldWrap": { "alias": "shouldWrap"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, ["*"], true, never>;
848
+ }
849
+
850
+ interface GroupedConfig {
851
+ layoutClasses?: string;
852
+ bgClasses?: string;
853
+ borderClasses?: string;
854
+ labelText?: string;
855
+ labelClasses?: string;
856
+ labelOffset?: string;
857
+ }
858
+ declare class GroupedDirective implements OnInit {
859
+ private elementRef;
860
+ private renderer;
861
+ haloduckGrouped: GroupedConfig | string;
862
+ layoutClasses: string;
863
+ bgClasses: string;
864
+ borderClasses: string;
865
+ labelText: string;
866
+ labelClasses: string;
867
+ labelOffset: string;
868
+ hostClasses: string;
869
+ private labelElement;
870
+ constructor(elementRef: ElementRef, renderer: Renderer2);
871
+ ngOnInit(): void;
872
+ private applyConfig;
873
+ private createLayout;
874
+ private createBorder;
875
+ private createLabel;
876
+ private addClasses;
877
+ private removeBorderClasses;
878
+ updateLabel(text: string): void;
879
+ toggleLabel(show: boolean): void;
880
+ static ɵfac: i0.ɵɵFactoryDeclaration<GroupedDirective, never>;
881
+ static ɵdir: i0.ɵɵDirectiveDeclaration<GroupedDirective, "[haloduckGrouped]", never, { "haloduckGrouped": { "alias": "haloduckGrouped"; "required": false; }; "layoutClasses": { "alias": "layoutClasses"; "required": false; }; "bgClasses": { "alias": "bgClasses"; "required": false; }; "borderClasses": { "alias": "borderClasses"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelClasses": { "alias": "labelClasses"; "required": false; }; "labelOffset": { "alias": "labelOffset"; "required": false; }; }, {}, never, never, true, never>;
882
+ }
883
+
884
+ declare const WYSIWYG_ICONS: {
885
+ readonly undo: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"/><path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\"/></svg>";
886
+ readonly redo: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 7v6h-6\"/><path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7\"/></svg>";
887
+ readonly bold: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8\"/></svg>";
888
+ readonly italic: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"19\" x2=\"10\" y1=\"4\" y2=\"4\"/><line x1=\"14\" x2=\"5\" y1=\"20\" y2=\"20\"/><line x1=\"15\" x2=\"9\" y1=\"4\" y2=\"20\"/></svg>";
889
+ readonly underline: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 4v6a6 6 0 0 0 12 0V4\"/><line x1=\"4\" x2=\"20\" y1=\"20\" y2=\"20\"/></svg>";
890
+ readonly strikethrough: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16 4H9a3 3 0 0 0-2.83 4\"/><path d=\"M14 12a4 4 0 0 1 0 8H6\"/><line x1=\"4\" x2=\"20\" y1=\"12\" y2=\"12\"/></svg>";
891
+ readonly superscript: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 19 8-8\"/><path d=\"m12 19-8-8\"/><path d=\"M20 12h-4c0-1.5.44-2 1.5-2.5S20 8.33 20 7c0-1.11-.9-2-2-2h-2\"/></svg>";
892
+ readonly subscript: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m4 5 8 8\"/><path d=\"m12 5-8 8\"/><path d=\"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-1.11-.9-2-2-2h-2\"/></svg>";
893
+ readonly alignLeft: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\"/><line x1=\"15\" x2=\"3\" y1=\"12\" y2=\"12\"/><line x1=\"17\" x2=\"3\" y1=\"18\" y2=\"18\"/></svg>";
894
+ readonly alignCenter: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\"/><line x1=\"17\" x2=\"7\" y1=\"12\" y2=\"12\"/><line x1=\"19\" x2=\"5\" y1=\"18\" y2=\"18\"/></svg>";
895
+ readonly alignRight: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"21\" x2=\"3\" y1=\"6\" y2=\"6\"/><line x1=\"21\" x2=\"9\" y1=\"12\" y2=\"12\"/><line x1=\"21\" x2=\"7\" y1=\"18\" y2=\"18\"/></svg>";
896
+ readonly alignJustify: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"3\" x2=\"21\" y1=\"6\" y2=\"6\"/><line x1=\"3\" x2=\"21\" y1=\"12\" y2=\"12\"/><line x1=\"3\" x2=\"21\" y1=\"18\" y2=\"18\"/></svg>";
897
+ readonly listBullet: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\"/><line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\"/><line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\"/><line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\"/><line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\"/><line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\"/></svg>";
898
+ readonly listOrdered: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"10\" x2=\"21\" y1=\"6\" y2=\"6\"/><line x1=\"10\" x2=\"21\" y1=\"12\" y2=\"12\"/><line x1=\"10\" x2=\"21\" y1=\"18\" y2=\"18\"/><path d=\"M4 6h1v4\"/><path d=\"M4 10h2\"/><path d=\"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1\"/></svg>";
899
+ readonly indentIncrease: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"3 8 7 12 3 16\"/><line x1=\"21\" x2=\"11\" y1=\"12\" y2=\"12\"/><line x1=\"21\" x2=\"11\" y1=\"6\" y2=\"6\"/><line x1=\"21\" x2=\"11\" y1=\"18\" y2=\"18\"/></svg>";
900
+ readonly indentDecrease: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"7 8 3 12 7 16\"/><line x1=\"21\" x2=\"11\" y1=\"12\" y2=\"12\"/><line x1=\"21\" x2=\"11\" y1=\"6\" y2=\"6\"/><line x1=\"21\" x2=\"11\" y1=\"18\" y2=\"18\"/></svg>";
901
+ readonly link: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></svg>";
902
+ readonly image: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"/></svg>";
903
+ readonly imagePlus: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7\"/><line x1=\"16\" x2=\"22\" y1=\"5\" y2=\"5\"/><line x1=\"19\" x2=\"19\" y1=\"2\" y2=\"8\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"/></svg>";
904
+ readonly minus: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"/></svg>";
905
+ readonly heading1: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 12h8\"/><path d=\"M4 18V6\"/><path d=\"M12 18V6\"/><path d=\"m17 12 3-2v8\"/></svg>";
906
+ readonly heading2: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 12h8\"/><path d=\"M4 18V6\"/><path d=\"M12 18V6\"/><path d=\"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1\"/></svg>";
907
+ readonly heading3: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 12h8\"/><path d=\"M4 18V6\"/><path d=\"M12 18V6\"/><path d=\"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2\"/><path d=\"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2\"/></svg>";
908
+ readonly paragraph: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M13 4v16\"/><path d=\"M17 4v16\"/><path d=\"M19 4H9.5a4.5 4.5 0 0 0 0 9H13\"/></svg>";
909
+ readonly quote: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21z\"/><path d=\"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3z\"/></svg>";
910
+ readonly eraser: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21\"/><path d=\"M22 21H7\"/><path d=\"m5 11 9 9\"/></svg>";
911
+ readonly trash: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 6h18\"/><path d=\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\"/><path d=\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\"/></svg>";
912
+ readonly textColor: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 20h16\"/><path d=\"m6 16 6-12 6 12\"/><path d=\"M8 12h8\"/></svg>";
913
+ readonly highlighter: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m9 11-6 6v3h9l3-3\"/><path d=\"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4\"/></svg>";
914
+ readonly typeInline: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"4 7 4 4 20 4 20 7\"/><line x1=\"9\" x2=\"15\" y1=\"20\" y2=\"20\"/><line x1=\"12\" x2=\"12\" y1=\"4\" y2=\"20\"/></svg>";
915
+ readonly wrapLeft: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"6\" height=\"6\" x=\"3\" y=\"3\" rx=\"1\"/><path d=\"M3 13h18\"/><path d=\"M3 17h18\"/><path d=\"M13 7h8\"/></svg>";
916
+ readonly wrapRight: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"6\" height=\"6\" x=\"15\" y=\"3\" rx=\"1\"/><path d=\"M3 13h18\"/><path d=\"M3 17h18\"/><path d=\"M3 7h8\"/></svg>";
917
+ readonly breakLeft: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"8\" height=\"6\" x=\"3\" y=\"9\" rx=\"1\"/><path d=\"M3 5h18\"/><path d=\"M3 19h18\"/></svg>";
918
+ readonly breakCenter: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"8\" height=\"6\" x=\"8\" y=\"9\" rx=\"1\"/><path d=\"M3 5h18\"/><path d=\"M3 19h18\"/></svg>";
919
+ readonly breakRight: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"8\" height=\"6\" x=\"13\" y=\"9\" rx=\"1\"/><path d=\"M3 5h18\"/><path d=\"M3 19h18\"/></svg>";
920
+ readonly chevronDown: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m6 9 6 6 6-6\"/></svg>";
921
+ readonly layoutGrid: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"7\" height=\"7\" x=\"3\" y=\"3\" rx=\"1\"/><rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\"/><rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\"/><rect width=\"7\" height=\"7\" x=\"3\" y=\"14\" rx=\"1\"/></svg>";
922
+ readonly trash2: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 6h18\"/><path d=\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\"/><path d=\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\"/><line x1=\"10\" x2=\"10\" y1=\"11\" y2=\"17\"/><line x1=\"14\" x2=\"14\" y1=\"11\" y2=\"17\"/></svg>";
923
+ readonly cornerDownLeft: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"9 10 4 15 9 20\"/><path d=\"M20 4v7a4 4 0 0 1-4 4H4\"/></svg>";
924
+ readonly move: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"5 9 2 12 5 15\"/><polyline points=\"9 5 12 2 15 5\"/><polyline points=\"15 19 12 22 9 19\"/><polyline points=\"19 9 22 12 19 15\"/><line x1=\"2\" x2=\"22\" y1=\"12\" y2=\"12\"/><line x1=\"12\" x2=\"12\" y1=\"2\" y2=\"22\"/></svg>";
925
+ readonly plus: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" x2=\"12\" y1=\"5\" y2=\"19\"/><line x1=\"5\" x2=\"19\" y1=\"12\" y2=\"12\"/></svg>";
926
+ };
927
+ type WysiwygIconName = keyof typeof WYSIWYG_ICONS;
928
+
929
+ type BlockElementType = 'image' | 'video' | 'iframe' | 'table' | 'blockquote' | 'code-block' | 'og-card';
930
+ type AlignmentType = 'inline' | 'wrap-left' | 'wrap-right' | 'break-left' | 'break-center' | 'break-right';
931
+ interface BlockElementConfig {
932
+ type: BlockElementType;
933
+ element: HTMLElement;
934
+ wrapper: HTMLElement;
935
+ resizable: boolean;
936
+ draggable: boolean;
937
+ aspectRatioLocked: boolean;
938
+ }
939
+ declare class WysiwygEditorComponent implements ControlValueAccessor, AfterViewInit, OnDestroy {
940
+ private cdr;
941
+ private http;
942
+ private sanitizer;
943
+ apiUrl: string;
944
+ editorContent: ElementRef<HTMLElement>;
945
+ label: ElementRef;
946
+ imageInput: ElementRef<HTMLInputElement>;
947
+ placeholder: string;
948
+ disabled: boolean;
949
+ height: string;
950
+ readonly: boolean;
951
+ uploadApi?: (file: File, keyPrefix: string) => Observable<string>;
952
+ keyPrefix: string;
953
+ urlPrefix?: string;
954
+ contentChange: EventEmitter<string>;
955
+ textChange: EventEmitter<string>;
956
+ uploadStart: EventEmitter<File>;
957
+ uploadComplete: EventEmitter<{
958
+ file: File;
959
+ key: string;
960
+ }>;
961
+ uploadError: EventEmitter<{
962
+ file: File;
963
+ error: any;
964
+ }>;
965
+ private value;
966
+ private resizing;
967
+ private selectedElement;
968
+ private savedSelection;
969
+ showImageToolbar: boolean;
970
+ selectedImage: HTMLImageElement | null;
971
+ imageToolbarPosition: {
972
+ x: number;
973
+ y: number;
974
+ };
975
+ currentImageAlign: 'inline' | 'wrap-left' | 'wrap-right' | 'break-left' | 'break-center' | 'break-right';
976
+ showBlockToolbar: boolean;
977
+ selectedBlock: BlockElementConfig | null;
978
+ blockToolbarPosition: {
979
+ x: number;
980
+ y: number;
981
+ };
982
+ currentBlockAlign: AlignmentType;
983
+ icons: Record<WysiwygIconName, SafeHtml>;
984
+ showTextColorPalette: boolean;
985
+ showBackgroundColorPalette: boolean;
986
+ showLayoutOutlines: boolean;
987
+ showPropertyEditor: boolean;
988
+ selectedLayoutElement: HTMLElement | null;
989
+ propertyEditorPosition: {
990
+ x: number;
991
+ y: number;
992
+ };
993
+ elementActionButtonsPosition: {
994
+ top: number;
995
+ right: number;
996
+ bottom: number;
997
+ left: number;
998
+ };
999
+ showDeleteButton: boolean;
1000
+ showInsertLineButton: boolean;
1001
+ showMoveButton: boolean;
1002
+ activePropertyTab: 'layout' | 'color' | 'typography';
1003
+ currentStyles: {
1004
+ paddingTop: string;
1005
+ paddingRight: string;
1006
+ paddingBottom: string;
1007
+ paddingLeft: string;
1008
+ marginTop: string;
1009
+ marginRight: string;
1010
+ marginBottom: string;
1011
+ marginLeft: string;
1012
+ width: string;
1013
+ height: string;
1014
+ color: string;
1015
+ backgroundColor: string;
1016
+ borderTopWidth: string;
1017
+ borderRightWidth: string;
1018
+ borderBottomWidth: string;
1019
+ borderLeftWidth: string;
1020
+ borderStyle: string;
1021
+ borderColor: string;
1022
+ borderTopLeftRadius: string;
1023
+ borderTopRightRadius: string;
1024
+ borderBottomRightRadius: string;
1025
+ borderBottomLeftRadius: string;
1026
+ fontSize: string;
1027
+ fontWeight: string;
1028
+ textAlign: string;
1029
+ lineHeight: string;
1030
+ display: string;
1031
+ flexDirection: string;
1032
+ justifyContent: string;
1033
+ alignItems: string;
1034
+ gap: string;
1035
+ imageAlign: 'inline' | 'wrap-left' | 'wrap-right' | 'break-left' | 'break-center' | 'break-right' | null;
1036
+ } | null;
1037
+ private isDragging;
1038
+ private draggedWrapper;
1039
+ private dragGhost;
1040
+ private dragOriginalParent;
1041
+ private dragOriginalNextSibling;
1042
+ private lastDropIndicator;
1043
+ private boundMouseMove;
1044
+ private boundMouseUp;
1045
+ private boundScrollHandler;
1046
+ private boundSelectionChangeHandler;
1047
+ private uploadingImages;
1048
+ isUploading: boolean;
1049
+ insertIndicator: {
1050
+ show: boolean;
1051
+ top: number;
1052
+ insertBefore: HTMLElement | null;
1053
+ };
1054
+ colors: string[];
1055
+ fontSizes: string[];
1056
+ fontFamilies: string[];
1057
+ onChange: (value: any) => void;
1058
+ onTouched: () => void;
1059
+ constructor(cdr: ChangeDetectorRef, http: HttpClient, sanitizer: DomSanitizer);
1060
+ ngAfterViewInit(): void;
1061
+ ngOnDestroy(): void;
1062
+ private cleanup;
1063
+ /**
1064
+ * Set up scroll handler to update action button positions during scroll
1065
+ */
1066
+ private setupScrollHandler;
1067
+ /**
1068
+ * Clean up scroll handler
1069
+ */
1070
+ private cleanupScrollHandler;
1071
+ /**
1072
+ * Set up selection change handler to track cursor position
1073
+ * This fixes mobile issue where focus is lost before mousedown saves selection
1074
+ */
1075
+ private setupSelectionChangeHandler;
1076
+ /**
1077
+ * Save selection when it changes within the editor
1078
+ * Uses ShadowDOM-aware selection retrieval
1079
+ */
1080
+ private saveSelectionOnChange;
1081
+ /**
1082
+ * Clean up selection change handler
1083
+ */
1084
+ private cleanupSelectionChangeHandler;
1085
+ private setupPasteHandler;
1086
+ private createUrlPreviewCard;
1087
+ /**
1088
+ * Sanitize HTML content to prevent XSS and properly extract body content.
1089
+ * Uses regex pre-processing and DOMParser to handle complete HTML documents.
1090
+ */
1091
+ private sanitizeHtml;
1092
+ private insertHtml;
1093
+ onInput(): void;
1094
+ /**
1095
+ * Save selection when user clicks/selects with mouse inside the editor.
1096
+ * Also ensures empty editor has a <p> tag for proper text input.
1097
+ */
1098
+ onEditorMouseUp(): void;
1099
+ /**
1100
+ * Ensure empty editor has a <p> tag for proper text input structure
1101
+ */
1102
+ private ensureInitialParagraph;
1103
+ /**
1104
+ * Handle keydown events directly on the editor content.
1105
+ * This ensures proper handling within Shadow DOM.
1106
+ */
1107
+ onEditorKeyDown(event: KeyboardEvent): void;
1108
+ /**
1109
+ * Save selection when user navigates with keyboard (arrow keys, etc.)
1110
+ */
1111
+ onEditorKeyUp(event: KeyboardEvent): void;
1112
+ /**
1113
+ * Immediately save the current selection with ShadowDOM support
1114
+ * Called during input when we KNOW the cursor is in the editor
1115
+ */
1116
+ private saveSelectionImmediate;
1117
+ onContentChange(): void;
1118
+ /**
1119
+ * Remove empty resizable wrappers that no longer contain their content element.
1120
+ * This happens when users delete an image/video using keyboard or other means.
1121
+ */
1122
+ private cleanupEmptyWrappers;
1123
+ saveSelection(): void;
1124
+ /**
1125
+ * Handle mousedown on toolbar to preserve editor selection
1126
+ * This is called BEFORE focus changes, so we can save the selection
1127
+ */
1128
+ onToolbarMouseDown(event: MouseEvent): void;
1129
+ execCommand(command: string, value?: string | null): void;
1130
+ setFontSize(size: string): void;
1131
+ setFontFamily(font: string): void;
1132
+ toggleTextColorPalette(): void;
1133
+ toggleBackgroundColorPalette(): void;
1134
+ toggleLayoutMode(): void;
1135
+ /**
1136
+ * Handle element click in layout mode to show property editor
1137
+ */
1138
+ onLayoutElementClick(event: MouseEvent): void;
1139
+ /**
1140
+ * Position element action buttons relative to the selected element
1141
+ * Button centers should be at the element's corners:
1142
+ * - Move button: top-left
1143
+ * - Delete button: top-right
1144
+ * - Insert line button: bottom-right
1145
+ */
1146
+ private positionElementActionButtons;
1147
+ /**
1148
+ * Extract computed styles from the selected element
1149
+ */
1150
+ private extractElementStyles;
1151
+ /**
1152
+ * Detect image alignment from element styles
1153
+ */
1154
+ private detectImageAlignment;
1155
+ /**
1156
+ * Convert RGB color to hex format
1157
+ */
1158
+ private rgbToHex;
1159
+ /**
1160
+ * Position the property editor panel near the clicked element
1161
+ */
1162
+ private positionPropertyEditor;
1163
+ /**
1164
+ * Update a style property on the selected element
1165
+ */
1166
+ updateElementStyle(property: string, value: string): void;
1167
+ /**
1168
+ * Convert camelCase property name to CSS property name
1169
+ */
1170
+ private toCssProperty;
1171
+ /**
1172
+ * Close the property editor
1173
+ */
1174
+ closePropertyEditor(): void;
1175
+ /**
1176
+ * Handle mouse move over editor content to show insert indicator between elements
1177
+ */
1178
+ onEditorMouseMove(event: MouseEvent): void;
1179
+ /**
1180
+ * Hide insert indicator when mouse leaves editor
1181
+ */
1182
+ onEditorMouseLeave(): void;
1183
+ /**
1184
+ * Insert a new paragraph block at the indicator position
1185
+ */
1186
+ insertBlockAtIndicator(): void;
1187
+ /**
1188
+ * Move cursor to the beginning of an element
1189
+ */
1190
+ private moveCursorToElement;
1191
+ /**
1192
+ * Update image alignment from property sidebar
1193
+ */
1194
+ updateLayoutImageAlignment(alignment: 'inline' | 'wrap-left' | 'wrap-right' | 'break-left' | 'break-center' | 'break-right'): void;
1195
+ /**
1196
+ * Delete the selected layout element
1197
+ */
1198
+ deleteLayoutElement(): void;
1199
+ /**
1200
+ * Start dragging the selected layout element
1201
+ * Called when the move button is pressed
1202
+ */
1203
+ startLayoutElementDrag(event: MouseEvent): void;
1204
+ /**
1205
+ * Start mouse-based drag operation for layout element
1206
+ */
1207
+ private startLayoutDrag;
1208
+ /**
1209
+ * Insert a new line (br or p) after the selected layout element
1210
+ */
1211
+ insertLineAfterLayoutElement(): void;
1212
+ setTextColor(color: string): void;
1213
+ setBackgroundColor(color: string): void;
1214
+ insertLink(): void;
1215
+ editLink(): void;
1216
+ private findParentAnchor;
1217
+ insertImageUrl(): void;
1218
+ /**
1219
+ * Upload image from external URL to S3
1220
+ */
1221
+ private uploadImageFromUrl;
1222
+ insertImageFromInput(event: Event): void;
1223
+ private insertImageFromFile;
1224
+ private insertImageAsBase64;
1225
+ private uploadImageToServer;
1226
+ private generateUploadId;
1227
+ private createUploadPlaceholder;
1228
+ private insertPlaceholderAtCursor;
1229
+ private replacePlaceholderWithImage;
1230
+ private showPlaceholderError;
1231
+ private updateUploadingState;
1232
+ private cancelPendingUploads;
1233
+ /**
1234
+ * Process external images in pasted HTML
1235
+ * Downloads external images, uploads to S3, and replaces src with CDN URL
1236
+ */
1237
+ private processExternalImagesInHtml;
1238
+ /**
1239
+ * Create an inline placeholder for images being uploaded within pasted HTML
1240
+ */
1241
+ private createInlineUploadPlaceholder;
1242
+ /**
1243
+ * Fetch external image and upload to S3
1244
+ */
1245
+ private fetchAndUploadImage;
1246
+ private insertImage;
1247
+ /**
1248
+ * Handle external file drops (e.g., dropping image files from desktop)
1249
+ */
1250
+ onDrop(event: DragEvent): void;
1251
+ /**
1252
+ * Handle dragover for external file drops
1253
+ */
1254
+ onDragOver(event: DragEvent): void;
1255
+ private makeExistingImagesResizable;
1256
+ private makeResizable;
1257
+ /**
1258
+ * Add resize handles and dragging to an already-inserted wrapper.
1259
+ * This is called for newly inserted images where the wrapper is already in the DOM.
1260
+ */
1261
+ private addResizeHandlesToWrapper;
1262
+ /**
1263
+ * Make an element draggable using mouse events (not HTML5 DnD API)
1264
+ * This gives us full control and works properly with Shadow DOM
1265
+ */
1266
+ private makeImageDraggable;
1267
+ /**
1268
+ * Prepare for potential drag - actual drag starts only after mouse moves
1269
+ */
1270
+ private prepareDrag;
1271
+ /**
1272
+ * Start mouse-based drag operation
1273
+ */
1274
+ private startMouseDrag;
1275
+ /**
1276
+ * Clean up mouse drag listeners
1277
+ */
1278
+ private cleanupMouseDrag;
1279
+ private getRangeFromPoint;
1280
+ private getNodeRect;
1281
+ /**
1282
+ * Determine the block element type from an HTML element
1283
+ */
1284
+ private getBlockElementType;
1285
+ /**
1286
+ * Get alignment options based on block element type
1287
+ */
1288
+ private getAlignmentOptions;
1289
+ /**
1290
+ * Check if an element type supports resizing
1291
+ */
1292
+ private isResizable;
1293
+ /**
1294
+ * Make a block element draggable using mouse events (same as makeImageDraggable)
1295
+ */
1296
+ private makeBlockElementDraggable;
1297
+ /**
1298
+ * Select a block element in the DOM so that keyboard actions (backspace/delete) will affect it
1299
+ */
1300
+ private selectBlockElement;
1301
+ /**
1302
+ * Show popup toolbar for any block element
1303
+ */
1304
+ private showBlockPopupToolbar;
1305
+ /**
1306
+ * Set alignment for the selected block element
1307
+ */
1308
+ setBlockAlignment(alignment: AlignmentType): void;
1309
+ /**
1310
+ * Delete the selected block element
1311
+ * Uses selection and execCommand to support undo/redo
1312
+ */
1313
+ deleteSelectedBlock(): void;
1314
+ /**
1315
+ * Delete an element while supporting undo/redo
1316
+ * by selecting it first and using execCommand
1317
+ */
1318
+ private deleteElementWithUndo;
1319
+ private showImagePopupToolbar;
1320
+ setImageAlignment(alignment: 'inline' | 'wrap-left' | 'wrap-right' | 'break-left' | 'break-center' | 'break-right'): void;
1321
+ onMouseMove(event: MouseEvent): void;
1322
+ onMouseUp(event: MouseEvent): void;
1323
+ onDocumentClick(event: MouseEvent): void;
1324
+ onKeyDown(event: KeyboardEvent): void;
1325
+ writeValue(value: any): void;
1326
+ registerOnChange(fn: any): void;
1327
+ registerOnTouched(fn: any): void;
1328
+ setDisabledState(isDisabled: boolean): void;
1329
+ getContent(): string;
1330
+ getText(): string;
1331
+ /**
1332
+ * Set content in the editor.
1333
+ * Automatically extracts body content if a full HTML document is provided.
1334
+ */
1335
+ setContent(content: string): void;
1336
+ /**
1337
+ * Extract body content from a string that might be a full HTML document.
1338
+ */
1339
+ private extractBodyContent;
1340
+ /**
1341
+ * Get raw body content without the full HTML document wrapper.
1342
+ * Useful for internal operations or when you only need the content.
1343
+ */
1344
+ getRawContent(): string;
1345
+ clear(): void;
1346
+ exportToPDFViaApi(filename?: string): Promise<void>;
1347
+ exportToPDF(filename?: string): Promise<void>;
1348
+ private waitForImagesToLoad;
1349
+ focus(): void;
1350
+ static ɵfac: i0.ɵɵFactoryDeclaration<WysiwygEditorComponent, never>;
1351
+ static ɵcmp: i0.ɵɵComponentDeclaration<WysiwygEditorComponent, "haloduck-wysiwyg-editor", never, { "apiUrl": { "alias": "apiUrl"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "height": { "alias": "height"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "uploadApi": { "alias": "uploadApi"; "required": false; }; "keyPrefix": { "alias": "keyPrefix"; "required": false; }; "urlPrefix": { "alias": "urlPrefix"; "required": false; }; }, { "contentChange": "contentChange"; "textChange": "textChange"; "uploadStart": "uploadStart"; "uploadComplete": "uploadComplete"; "uploadError": "uploadError"; }, never, ["*"], true, never>;
1352
+ }
1353
+
1354
+ declare class WysiwygViewerComponent implements OnChanges {
1355
+ private readonly sanitizer;
1356
+ content: string;
1357
+ showButtons: boolean;
1358
+ sanitizedContent: SafeHtml;
1359
+ ngOnChanges(changes: SimpleChanges): void;
1360
+ private updateContent;
1361
+ exportToPDF(filename?: string): Promise<void>;
1362
+ private waitForImagesToLoad;
1363
+ print(): void;
1364
+ static ɵfac: i0.ɵɵFactoryDeclaration<WysiwygViewerComponent, never>;
1365
+ static ɵcmp: i0.ɵɵComponentDeclaration<WysiwygViewerComponent, "haloduck-wysiwyg-viewer", never, { "content": { "alias": "content"; "required": false; }; "showButtons": { "alias": "showButtons"; "required": false; }; }, {}, never, never, true, never>;
1366
+ }
1367
+
1368
+ declare class AutoLoadDirective implements OnInit, OnDestroy, OnChanges {
1369
+ private readonly elementRef;
1370
+ private readonly ngZone;
1371
+ private observer?;
1372
+ private isLoading;
1373
+ autoLoadEnabled: boolean;
1374
+ autoLoadThreshold: number;
1375
+ autoLoadRootMargin: string;
1376
+ autoLoadTrigger: EventEmitter<void>;
1377
+ ngOnInit(): void;
1378
+ ngOnChanges(changes: SimpleChanges): void;
1379
+ ngOnDestroy(): void;
1380
+ private setupObserver;
1381
+ private initializeObserver;
1382
+ private triggerLoad;
1383
+ private temporarilyDisableObserver;
1384
+ private disconnect;
1385
+ setLoadingState(loading: boolean): void;
1386
+ resetAutoLoad(): void;
1387
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutoLoadDirective, never>;
1388
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AutoLoadDirective, "[haloduckAutoLoad]", never, { "autoLoadEnabled": { "alias": "autoLoadEnabled"; "required": false; }; "autoLoadThreshold": { "alias": "autoLoadThreshold"; "required": false; }; "autoLoadRootMargin": { "alias": "autoLoadRootMargin"; "required": false; }; }, { "autoLoadTrigger": "autoLoadTrigger"; }, never, never, true, never>;
1389
+ }
1390
+
1391
+ declare class BreadcrumbComponent implements OnInit {
1392
+ private readonly breadcrumbService;
1393
+ listBreadcrumb: {
1394
+ label: string;
1395
+ url: string;
1396
+ }[];
1397
+ ngOnInit(): void;
1398
+ static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
1399
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbComponent, "haloduck-breadcrumb", never, {}, {}, never, never, true, never>;
1400
+ }
1401
+
1402
+ declare class DialogService {
1403
+ private overlay;
1404
+ private injector;
1405
+ private dialogStack;
1406
+ constructor(overlay: Overlay, injector: Injector);
1407
+ open<T>(component: Type<T> | TemplateRef<any>, data?: any, classList?: string[]): OverlayRef;
1408
+ close(overlayRef?: OverlayRef): void;
1409
+ closeAll(): void;
1410
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
1411
+ static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
1412
+ }
1413
+
1414
+ declare class NotificationComponent {
1415
+ private readonly notificationService;
1416
+ listNotification$: rxjs.Observable<_haloduck_ui.Notification[]>;
1417
+ removeNotification(id: string): void;
1418
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationComponent, never>;
1419
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationComponent, "haloduck-notification", never, {}, {}, never, never, true, never>;
1420
+ }
1421
+
1422
+ declare global {
1423
+ interface Window {
1424
+ FlutterApp?: {
1425
+ postMessage: (message: string) => void;
1426
+ };
1427
+ }
1428
+ }
1429
+ type NotificationType = 'success' | 'error' | 'warning' | 'info';
1430
+ interface Notification {
1431
+ id: string;
1432
+ type: NotificationType;
1433
+ message: string;
1434
+ timeout?: number;
1435
+ timeoutRef?: number;
1436
+ }
1437
+ declare class NotificationService {
1438
+ private listNotification$;
1439
+ private listNotification;
1440
+ showNotification(title: string, body: string, timeout?: number, payload?: any): void;
1441
+ _showNotification(type: NotificationType, message: string, timeout?: number): string;
1442
+ getListNotification(): Observable<Notification[]>;
1443
+ removeNotificationById(id: string): void;
1444
+ constructor();
1445
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
1446
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
1447
+ }
1448
+
1449
+ declare class PictureNameComponent {
1450
+ name?: string;
1451
+ pictureKey?: string;
1452
+ cdnUrl?: string;
1453
+ static ɵfac: i0.ɵɵFactoryDeclaration<PictureNameComponent, never>;
1454
+ static ɵcmp: i0.ɵɵComponentDeclaration<PictureNameComponent, "haloduck-picture-name", never, { "name": { "alias": "name"; "required": false; }; "pictureKey": { "alias": "pictureKey"; "required": false; }; "cdnUrl": { "alias": "cdnUrl"; "required": false; }; }, {}, never, never, true, never>;
1455
+ }
1456
+
1457
+ declare const provideHaloduckTransloco: () => {
1458
+ provide: i0.InjectionToken<_jsverse_transloco.TranslocoScope>;
1459
+ useValue: _jsverse_transloco.TranslocoScope;
1460
+ multi: boolean;
1461
+ }[];
1462
+
1463
+ export { AUTHENTICATE_CONFIG, AuthenticateCallbackComponent, AuthenticateComponent, AutoLoadDirective, BreadcrumbComponent, ButtonComponent, CalendarComponent, ConfirmDialogService, CopyButtonComponent, DatePickerComponent, DateRangeComponent, DialogService, DrawCanvasComponent, ERROR_NOT_ACCEPTABLE_FILE_TYPE, ERROR_OVER_COUNT, ERROR_OVER_SIZE, ERROR_UPLOAD, FileUploaderComponent, FlipComponent, GroupedDirective, ImageUploaderComponent, ImageViewerComponent, InputComponent, LanguageSelectorComponent, MapToAddressComponent, NotificationComponent, NotificationService, PictureNameComponent, SelectComponent, SelectDropdownComponent, SideMenuComponent, SideMenuItemComponent, StlViewerComponent, TableComponent, TableSettingComponent, TableSettingService, TabsComponent, TagInputComponent, TagViewerComponent, ToggleComponent, WysiwygEditorComponent, WysiwygViewerComponent, dateToString, google, provideAuthenticateConfig, provideAuthenticateMetadata, provideHaloduckTransloco, provideSocialLoginProviders };
1464
+ export type { AuthenticateConfig, ButtonVariant, CalendarDate, DateRange, DateRangeDropdown, FileEx, GroupedConfig, Location, MetaData, Notification, NotificationType, Option, ProcessCognitoUserResponse, SocialLoginProvider, TabItem, TableColumn, TableRow, TableSettings };