@seniorsistemas/data-seniorx-core 3.0.0 → 3.1.0
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/core/constants/editable-overlay.const.d.ts +4 -0
- package/core/constants/help-popover.const.d.ts +7 -0
- package/core/constants/input-mask.const.d.ts +5 -0
- package/core/constants/navigation-button.const.d.ts +3 -0
- package/core/constants/object-card.const.d.ts +21 -0
- package/core/constants/thumbnail.const.d.ts +6 -0
- package/core/constants/thumbnails.const.d.ts +4 -0
- package/core/constants/token-list.const.d.ts +3 -0
- package/core/types/button.type.d.ts +1 -1
- package/core/types/datepicker.type.d.ts +28 -0
- package/core/types/dynamic-form.type.d.ts +29 -0
- package/core/types/editable-overlay.type.d.ts +15 -0
- package/core/types/help-popover.type.d.ts +2 -0
- package/core/types/input-mask.type.d.ts +6 -0
- package/core/types/lookup.type.d.ts +45 -0
- package/core/types/navigation-button.type.d.ts +9 -0
- package/core/types/row-card.type.d.ts +5 -0
- package/core/types/semantics.type.d.ts +1 -1
- package/core/types/table-options.type.d.ts +1 -0
- package/core/types/thumbnail.type.d.ts +1 -0
- package/core/types/thumbnails.type.d.ts +20 -0
- package/core/types/token-list.type.d.ts +6 -0
- package/core/utils/emoji-support.util.d.ts +12 -0
- package/core/utils/overlay-dismiss.util.d.ts +25 -0
- package/esm2022/core/config/row-card.type.config.mjs +3 -1
- package/esm2022/core/constants/country-phone-picker.const.mjs +6 -6
- package/esm2022/core/constants/editable-overlay.const.mjs +5 -0
- package/esm2022/core/constants/help-popover.const.mjs +7 -0
- package/esm2022/core/constants/input-mask.const.mjs +6 -0
- package/esm2022/core/constants/navigation-button.const.mjs +4 -0
- package/esm2022/core/constants/object-card.const.mjs +23 -0
- package/esm2022/core/constants/thumbnail.const.mjs +14 -0
- package/esm2022/core/constants/thumbnails.const.mjs +5 -0
- package/esm2022/core/constants/token-list.const.mjs +4 -0
- package/esm2022/core/types/button.type.mjs +1 -1
- package/esm2022/core/types/datepicker.type.mjs +2 -0
- package/esm2022/core/types/dynamic-form.type.mjs +2 -0
- package/esm2022/core/types/editable-overlay.type.mjs +2 -0
- package/esm2022/core/types/help-popover.type.mjs +2 -0
- package/esm2022/core/types/input-mask.type.mjs +2 -0
- package/esm2022/core/types/lookup.type.mjs +2 -0
- package/esm2022/core/types/navigation-button.type.mjs +2 -0
- package/esm2022/core/types/row-card.type.mjs +1 -1
- package/esm2022/core/types/semantics.type.mjs +1 -1
- package/esm2022/core/types/table-options.type.mjs +1 -1
- package/esm2022/core/types/thumbnail.type.mjs +2 -0
- package/esm2022/core/types/thumbnails.type.mjs +2 -0
- package/esm2022/core/types/token-list.type.mjs +2 -0
- package/esm2022/core/utils/emoji-support.util.mjs +48 -0
- package/esm2022/core/utils/mask.util.mjs +2 -2
- package/esm2022/core/utils/overlay-dismiss.util.mjs +38 -0
- package/esm2022/features/alert/alert.component.mjs +5 -2
- package/esm2022/features/autocomplete/autocomplete.component.mjs +30 -8
- package/esm2022/features/bignumber-input/bignumber-input.component.mjs +1 -1
- package/esm2022/features/button/button.component.mjs +13 -5
- package/esm2022/features/card-list/card/card.component.mjs +2 -2
- package/esm2022/features/card-list/card-list.component.mjs +2 -2
- package/esm2022/features/checkbox-list/checkbox-list.component.mjs +25 -5
- package/esm2022/features/chips/chips.component.mjs +3 -3
- package/esm2022/features/code-editor/code-editor.component.mjs +12 -3
- package/esm2022/features/combobox/combobox.component.mjs +3 -3
- package/esm2022/features/confirm/confirm.component.mjs +2 -2
- package/esm2022/features/context-selector/context-selector.component.mjs +1 -1
- package/esm2022/features/country-phone-picker/country-phone-picker.component.mjs +22 -18
- package/esm2022/features/currency/currency.component.mjs +3 -3
- package/esm2022/features/datepicker/datepicker.component.mjs +814 -0
- package/esm2022/features/dynamic-form/dynamic-form-field.directive.mjs +178 -0
- package/esm2022/features/dynamic-form/dynamic-form.component.mjs +60 -0
- package/esm2022/features/dynamic-form/dynamic-form.registry.mjs +13 -0
- package/esm2022/features/editable-overlay/editable-overlay-editor.directive.mjs +31 -0
- package/esm2022/features/editable-overlay/editable-overlay.component.mjs +217 -0
- package/esm2022/features/editor/editor.component.mjs +173 -0
- package/esm2022/features/empty-state/empty-state.component.mjs +3 -3
- package/esm2022/features/fileupload/fileupload.component.mjs +3 -3
- package/esm2022/features/help-popover/help-popover.component.mjs +204 -0
- package/esm2022/features/hyperlink/hyperlink.component.mjs +3 -3
- package/esm2022/features/icon-picker/icon-picker.component.mjs +4 -4
- package/esm2022/features/image-cropper/image-cropper.component.mjs +2 -2
- package/esm2022/features/info-sign/info-sign.component.mjs +6 -3
- package/esm2022/features/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.mjs +1 -1
- package/esm2022/features/inline-edit/components/inline-edit-item/inline-edit-item.component.mjs +2 -2
- package/esm2022/features/input-mask/input-mask.directive.mjs +510 -0
- package/esm2022/features/list/list.component.mjs +2 -2
- package/esm2022/features/localized-number-input/localized-number-input.component.mjs +3 -3
- package/esm2022/features/lookup/lookup.component.mjs +351 -0
- package/esm2022/features/modal/modal.component.mjs +6 -3
- package/esm2022/features/modalc/modalc.component.mjs +6 -3
- package/esm2022/features/navigation-button/navigation-button.component.mjs +172 -0
- package/esm2022/features/number-input/number-input.component.mjs +10 -4
- package/esm2022/features/object-card/components/object-card-field/object-card-field.component.mjs +89 -0
- package/esm2022/features/object-card/components/object-card-main/object-card-main.component.mjs +114 -0
- package/esm2022/features/object-card/object-card.component.mjs +199 -0
- package/esm2022/features/password-strength/password-strength.component.mjs +3 -3
- package/esm2022/features/pin-code-field/pin-code-field.component.mjs +14 -4
- package/esm2022/features/popover/popover.component.mjs +29 -3
- package/esm2022/features/profile-picture-picker/profile-picture-picker.component.mjs +13 -4
- package/esm2022/features/rating-scale/rating-scale.component.mjs +24 -4
- package/esm2022/features/row-card-list/row-card/row-card.component.mjs +19 -4
- package/esm2022/features/row-card-list/row-card-list.component.mjs +12 -3
- package/esm2022/features/scaffold/scaffold.component.mjs +3 -3
- package/esm2022/features/searchbox/searchbox.component.mjs +2 -2
- package/esm2022/features/select-button/select-button.component.mjs +26 -4
- package/esm2022/features/slider/slider.component.mjs +3 -3
- package/esm2022/features/split-button/split-button.component.mjs +1 -1
- package/esm2022/features/spotlight/components/spotlight-overlay/spotlight-overlay.component.mjs +15 -18
- package/esm2022/features/spotlight/spotlight.component.mjs +2 -2
- package/esm2022/features/star-rating/star-rating.component.mjs +25 -4
- package/esm2022/features/table/components/table-cell-content.component.mjs +2 -2
- package/esm2022/features/table/table.component.mjs +30 -9
- package/esm2022/features/textarea/textarea.component.mjs +3 -3
- package/esm2022/features/thumbnail/thumbnail.component.mjs +86 -0
- package/esm2022/features/thumbnails/components/thumbnail-item/thumbnail-item.component.mjs +59 -0
- package/esm2022/features/thumbnails/components/thumbnail-item-image/thumbnail-item-image.component.mjs +25 -0
- package/esm2022/features/thumbnails/components/thumbnail-item-video/thumbnail-item-video.component.mjs +50 -0
- package/esm2022/features/thumbnails/thumbnails.component.mjs +76 -0
- package/esm2022/features/tiered-menu/directives/tiered-menu.directive.mjs +13 -1
- package/esm2022/features/token-list/token-list.component.mjs +64 -0
- package/esm2022/features/visual-sql-editor/visual-sql-editor.component.mjs +2 -2
- package/esm2022/locales/en.json +409 -1
- package/esm2022/locales/es-CO.json +423 -2
- package/esm2022/locales/pt.json +1037 -630
- package/esm2022/providers/features.provider.mjs +20 -2
- package/esm2022/providers/primeng-config.provider.mjs +14 -128
- package/esm2022/providers/translate.provider.mjs +2 -2
- package/esm2022/public-api.mjs +31 -1
- package/features/alert/alert.component.d.ts +1 -0
- package/features/autocomplete/autocomplete.component.d.ts +9 -3
- package/features/button/button.component.d.ts +3 -1
- package/features/checkbox-list/checkbox-list.component.d.ts +8 -1
- package/features/code-editor/code-editor.component.d.ts +5 -1
- package/features/country-phone-picker/country-phone-picker.component.d.ts +3 -0
- package/features/datepicker/datepicker.component.d.ts +118 -0
- package/features/dynamic-form/dynamic-form-field.directive.d.ts +26 -0
- package/features/dynamic-form/dynamic-form.component.d.ts +15 -0
- package/features/dynamic-form/dynamic-form.registry.d.ts +11 -0
- package/features/editable-overlay/editable-overlay-editor.directive.d.ts +22 -0
- package/features/editable-overlay/editable-overlay.component.d.ts +60 -0
- package/features/editor/editor.component.d.ts +47 -0
- package/features/help-popover/help-popover.component.d.ts +81 -0
- package/features/info-sign/info-sign.component.d.ts +2 -1
- package/features/input-mask/input-mask.directive.d.ts +117 -0
- package/features/lookup/lookup.component.d.ts +104 -0
- package/features/modal/modal.component.d.ts +2 -1
- package/features/modalc/modalc.component.d.ts +2 -1
- package/features/navigation-button/navigation-button.component.d.ts +58 -0
- package/features/number-input/number-input.component.d.ts +3 -1
- package/features/object-card/components/object-card-field/object-card-field.component.d.ts +48 -0
- package/features/object-card/components/object-card-main/object-card-main.component.d.ts +57 -0
- package/features/object-card/object-card.component.d.ts +70 -0
- package/features/pin-code-field/pin-code-field.component.d.ts +6 -1
- package/features/popover/popover.component.d.ts +4 -1
- package/features/profile-picture-picker/profile-picture-picker.component.d.ts +5 -1
- package/features/rating-scale/rating-scale.component.d.ts +9 -1
- package/features/row-card-list/row-card/row-card.component.d.ts +6 -1
- package/features/row-card-list/row-card-list.component.d.ts +4 -1
- package/features/select-button/select-button.component.d.ts +9 -1
- package/features/star-rating/star-rating.component.d.ts +9 -1
- package/features/table/table.component.d.ts +2 -1
- package/features/thumbnail/thumbnail.component.d.ts +48 -0
- package/features/thumbnails/components/thumbnail-item/thumbnail-item.component.d.ts +29 -0
- package/features/thumbnails/components/thumbnail-item-image/thumbnail-item-image.component.d.ts +13 -0
- package/features/thumbnails/components/thumbnail-item-video/thumbnail-item-video.component.d.ts +19 -0
- package/features/thumbnails/thumbnails.component.d.ts +46 -0
- package/features/tiered-menu/directives/tiered-menu.directive.d.ts +2 -0
- package/features/token-list/token-list.component.d.ts +31 -0
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs +11288 -6613
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs.map +1 -1
- package/package.json +12 -3
- package/providers/primeng-config.provider.d.ts +12 -0
- package/public-api.d.ts +38 -0
- package/src/locales/en.json +409 -1
- package/src/locales/es-CO.json +423 -2
- package/src/locales/pt.json +1037 -630
- package/styles/sdc-global-variables.scss +38 -0
- package/styles.css +132 -0
- package/styles.scss +2 -0
- package/esm2022/providers/custom/button.mjs +0 -93
- package/esm2022/providers/custom/toast.mjs +0 -75
- package/providers/custom/button.d.ts +0 -16
- package/providers/custom/toast.d.ts +0 -14
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
3
|
+
import { InputsComponent } from '../../core/directives/inputs.directive';
|
|
4
|
+
import type { CalendarDay, DatePickerMode, DatePickerSelectionMode, DateRange, DatepickerMonthChangeEvent, DatepickerView } from '../../core/types/datepicker.type';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
type DatepickerValue = Date | DateRange | Date[] | null;
|
|
7
|
+
export declare class DatepickerComponent extends InputsComponent<DatepickerValue> implements OnInit, OnDestroy, Validator {
|
|
8
|
+
private readonly translate;
|
|
9
|
+
private readonly cdr;
|
|
10
|
+
private readonly elementRef;
|
|
11
|
+
private readonly subscriptions;
|
|
12
|
+
mode: DatePickerMode;
|
|
13
|
+
selectionMode: DatePickerSelectionMode;
|
|
14
|
+
showIcon: boolean;
|
|
15
|
+
icon: string;
|
|
16
|
+
min: Date | null;
|
|
17
|
+
max: Date | null;
|
|
18
|
+
defaultDate: Date | null;
|
|
19
|
+
dateFormat: string;
|
|
20
|
+
hourFormat: '12' | '24';
|
|
21
|
+
minuteStep: number;
|
|
22
|
+
showSeconds: boolean;
|
|
23
|
+
rangeSeparator: string;
|
|
24
|
+
showOnFocus: boolean;
|
|
25
|
+
readonlyInput: boolean;
|
|
26
|
+
firstDayOfWeek: number;
|
|
27
|
+
showButtonBar: boolean;
|
|
28
|
+
showClear: boolean;
|
|
29
|
+
disabledDates: Date[];
|
|
30
|
+
disabledDays: number[];
|
|
31
|
+
selected: EventEmitter<DatepickerValue>;
|
|
32
|
+
closed: EventEmitter<void>;
|
|
33
|
+
monthChange: EventEmitter<DatepickerMonthChangeEvent>;
|
|
34
|
+
yearChange: EventEmitter<DatepickerMonthChangeEvent>;
|
|
35
|
+
inputRef?: ElementRef<HTMLInputElement>;
|
|
36
|
+
triggerRef?: ElementRef<HTMLElement>;
|
|
37
|
+
private readonly panelContentRef?;
|
|
38
|
+
private readonly dayButtonRefs?;
|
|
39
|
+
protected readonly inputId: string;
|
|
40
|
+
panelOpen: boolean;
|
|
41
|
+
private suppressNextFocusOpen;
|
|
42
|
+
readonly currentView: import("@angular/core").WritableSignal<DatepickerView>;
|
|
43
|
+
readonly viewDate: import("@angular/core").WritableSignal<Date>;
|
|
44
|
+
readonly focusedDate: import("@angular/core").WritableSignal<Date | null>;
|
|
45
|
+
readonly hours: import("@angular/core").WritableSignal<number>;
|
|
46
|
+
readonly minutes: import("@angular/core").WritableSignal<number>;
|
|
47
|
+
readonly seconds: import("@angular/core").WritableSignal<number>;
|
|
48
|
+
private readonly rangeStart;
|
|
49
|
+
private readonly rangeEnd;
|
|
50
|
+
private readonly rangeSelecting;
|
|
51
|
+
readonly weekDayNames: import("@angular/core").Signal<string[]>;
|
|
52
|
+
calendarDays(): CalendarDay[];
|
|
53
|
+
calendarWeeks(): CalendarDay[][];
|
|
54
|
+
calendarMonths(): {
|
|
55
|
+
month: number;
|
|
56
|
+
name: string;
|
|
57
|
+
selected: boolean;
|
|
58
|
+
}[];
|
|
59
|
+
readonly yearRange: import("@angular/core").Signal<number[]>;
|
|
60
|
+
displayValue(): string;
|
|
61
|
+
readonly viewMonthYearLabel: import("@angular/core").Signal<string>;
|
|
62
|
+
readonly showTimePicker: import("@angular/core").Signal<boolean>;
|
|
63
|
+
ngOnInit(): void;
|
|
64
|
+
ngOnDestroy(): void;
|
|
65
|
+
writeValue(value: DatepickerValue): void;
|
|
66
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
67
|
+
openPanel(): void;
|
|
68
|
+
closePanel(): void;
|
|
69
|
+
private closePanelAndFocusInput;
|
|
70
|
+
togglePanel(): void;
|
|
71
|
+
onInputClick(): void;
|
|
72
|
+
onInputFocus(): void;
|
|
73
|
+
onOverlayKeydown(event: KeyboardEvent): void;
|
|
74
|
+
onKeydown(event: KeyboardEvent): void;
|
|
75
|
+
private focusIntoPanel;
|
|
76
|
+
onDaysGridKeydown(event: KeyboardEvent): void;
|
|
77
|
+
prevMonth(): void;
|
|
78
|
+
nextMonth(): void;
|
|
79
|
+
prevYear(): void;
|
|
80
|
+
nextYear(): void;
|
|
81
|
+
prevYearRange(): void;
|
|
82
|
+
nextYearRange(): void;
|
|
83
|
+
switchToMonthView(): void;
|
|
84
|
+
switchToYearView(): void;
|
|
85
|
+
selectMonth(month: number): void;
|
|
86
|
+
selectYear(year: number): void;
|
|
87
|
+
selectDay(day: CalendarDay): void;
|
|
88
|
+
incrementHours(): void;
|
|
89
|
+
decrementHours(): void;
|
|
90
|
+
incrementMinutes(): void;
|
|
91
|
+
decrementMinutes(): void;
|
|
92
|
+
incrementSeconds(): void;
|
|
93
|
+
decrementSeconds(): void;
|
|
94
|
+
selectToday(): void;
|
|
95
|
+
clearValue(): void;
|
|
96
|
+
confirmDateTime(): void;
|
|
97
|
+
onPopoverOpenChange(open: boolean): void;
|
|
98
|
+
private initializeViewDate;
|
|
99
|
+
private commitDateValue;
|
|
100
|
+
private handleRangeSelection;
|
|
101
|
+
private handleMultipleSelection;
|
|
102
|
+
private updateTimeOnValue;
|
|
103
|
+
private isDateSelected;
|
|
104
|
+
private isDateDisabled;
|
|
105
|
+
private isInRange;
|
|
106
|
+
private isRangeStart;
|
|
107
|
+
private isRangeEnd;
|
|
108
|
+
private isMonthSelected;
|
|
109
|
+
private isSameDay;
|
|
110
|
+
private handleDaysKeydown;
|
|
111
|
+
private focusDayButton;
|
|
112
|
+
isDayTabStop(day: CalendarDay): boolean;
|
|
113
|
+
private formatDate;
|
|
114
|
+
padTime(n: number): string;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, never>;
|
|
116
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "sdc-datepicker", never, { "mode": { "alias": "mode"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "defaultDate": { "alias": "defaultDate"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "hourFormat": { "alias": "hourFormat"; "required": false; }; "minuteStep": { "alias": "minuteStep"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "rangeSeparator": { "alias": "rangeSeparator"; "required": false; }; "showOnFocus": { "alias": "showOnFocus"; "required": false; }; "readonlyInput": { "alias": "readonlyInput"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "showButtonBar": { "alias": "showButtonBar"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "disabledDays": { "alias": "disabledDays"; "required": false; }; }, { "selected": "selected"; "closed": "closed"; "monthChange": "monthChange"; "yearChange": "yearChange"; }, never, never, true, never>;
|
|
117
|
+
}
|
|
118
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import type { DynamicFieldConfig } from '../../core/types/dynamic-form.type';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DynamicFormFieldDirective implements OnChanges, OnDestroy {
|
|
6
|
+
private readonly viewContainer;
|
|
7
|
+
private componentRef;
|
|
8
|
+
field: DynamicFieldConfig;
|
|
9
|
+
formGroup: FormGroup;
|
|
10
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
11
|
+
ngOnDestroy(): void;
|
|
12
|
+
private renderField;
|
|
13
|
+
private applyFieldConfig;
|
|
14
|
+
private mapCommonInputs;
|
|
15
|
+
private mapRequiredAndDisabled;
|
|
16
|
+
private mapOptionsAndRange;
|
|
17
|
+
private mapOptions;
|
|
18
|
+
private mapRange;
|
|
19
|
+
private mapExtraInputs;
|
|
20
|
+
private trySetInput;
|
|
21
|
+
private updateFormControl;
|
|
22
|
+
private writeValueToInstance;
|
|
23
|
+
private bindInstanceCallbacksToControl;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormFieldDirective, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicFormFieldDirective, "[sdcDynamicFormField]", never, { "field": { "alias": "sdcDynamicFormField"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import type { DynamicFieldConfig, DynamicStructureConfig } from '../../core/types/dynamic-form.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DynamicFormComponent {
|
|
5
|
+
form: FormGroup;
|
|
6
|
+
fields: (DynamicFieldConfig | DynamicStructureConfig)[];
|
|
7
|
+
isStructure(item: DynamicFieldConfig | DynamicStructureConfig): item is DynamicStructureConfig;
|
|
8
|
+
isField(item: DynamicFieldConfig | DynamicStructureConfig): item is DynamicFieldConfig;
|
|
9
|
+
isFieldVisible(field: DynamicFieldConfig): boolean;
|
|
10
|
+
getGridStyle(structure: DynamicStructureConfig): Record<string, string>;
|
|
11
|
+
getFieldStyle(field: DynamicFieldConfig): Record<string, string>;
|
|
12
|
+
trackItem(index: number, item: DynamicFieldConfig | DynamicStructureConfig): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "sdc-dynamic-form", never, { "form": { "alias": "form"; "required": true; }; "fields": { "alias": "fields"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import type { DynamicFieldType } from '../../core/types/dynamic-form.type';
|
|
3
|
+
export declare class DynamicFormRegistry {
|
|
4
|
+
private static readonly fields;
|
|
5
|
+
static registerField(type: DynamicFieldType, component: Type<unknown>): void;
|
|
6
|
+
static resolveField(type: string): Type<unknown> | undefined;
|
|
7
|
+
static registerMany(mappings: Array<{
|
|
8
|
+
type: DynamicFieldType;
|
|
9
|
+
component: Type<unknown>;
|
|
10
|
+
}>): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import type { EditableOverlayEditorContext } from '../../core/types/editable-overlay.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Structural directive used to project a custom editor inside `sdc-editable-overlay`:
|
|
6
|
+
*
|
|
7
|
+
* ```html
|
|
8
|
+
* <sdc-editable-overlay [formControl]="control">
|
|
9
|
+
* <ng-template sdcEditableOverlayEditor let-value let-commit="commit">
|
|
10
|
+
* <sdc-textarea [value]="value" (valueChange)="commit($event)"></sdc-textarea>
|
|
11
|
+
* </ng-template>
|
|
12
|
+
* </sdc-editable-overlay>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* See `EditableOverlayEditorContext` for the full shape available to the template.
|
|
16
|
+
*/
|
|
17
|
+
export declare class EditableOverlayEditorDirective<T = unknown> {
|
|
18
|
+
readonly template: TemplateRef<EditableOverlayEditorContext<T>>;
|
|
19
|
+
constructor(template: TemplateRef<EditableOverlayEditorContext<T>>);
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableOverlayEditorDirective<any>, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableOverlayEditorDirective<any>, "ng-template[sdcEditableOverlayEditor]", never, {}, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import type { EditableOverlayEditorContext } from '../../core/types/editable-overlay.type';
|
|
4
|
+
import type { StringBoolean } from '../../core/types/semantics.type';
|
|
5
|
+
import { EditableOverlayEditorDirective } from './editable-overlay-editor.directive';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class EditableOverlayComponent implements ControlValueAccessor {
|
|
8
|
+
private readonly cdr;
|
|
9
|
+
private readonly translate;
|
|
10
|
+
label: StringBoolean;
|
|
11
|
+
message: StringBoolean;
|
|
12
|
+
invalid: boolean;
|
|
13
|
+
required: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
placeholder: string;
|
|
16
|
+
emptyText: StringBoolean;
|
|
17
|
+
saveLabel: StringBoolean;
|
|
18
|
+
cancelLabel: StringBoolean;
|
|
19
|
+
maxlength?: number;
|
|
20
|
+
displayFormatter?: (value: unknown) => string;
|
|
21
|
+
saved: EventEmitter<unknown>;
|
|
22
|
+
canceled: EventEmitter<void>;
|
|
23
|
+
openChange: EventEmitter<boolean>;
|
|
24
|
+
valueChange: EventEmitter<unknown>;
|
|
25
|
+
protected editorTemplate?: EditableOverlayEditorDirective;
|
|
26
|
+
protected readonly labelId: string;
|
|
27
|
+
protected readonly messageId: string;
|
|
28
|
+
protected readonly triggerId: string;
|
|
29
|
+
protected value: unknown;
|
|
30
|
+
protected draft: unknown;
|
|
31
|
+
protected open: boolean;
|
|
32
|
+
protected readonly editorContext: EditableOverlayEditorContext;
|
|
33
|
+
private onChangeFn;
|
|
34
|
+
private onTouchedFn;
|
|
35
|
+
protected get editAriaLabel(): string;
|
|
36
|
+
protected get saveButtonLabel(): string;
|
|
37
|
+
protected get cancelButtonLabel(): string;
|
|
38
|
+
protected get emptyStateText(): string;
|
|
39
|
+
protected get isValueEmpty(): boolean;
|
|
40
|
+
protected get displayText(): string;
|
|
41
|
+
protected get draftAsString(): string;
|
|
42
|
+
labelKey(): string;
|
|
43
|
+
messageKey(): string;
|
|
44
|
+
writeValue(value: unknown): void;
|
|
45
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
46
|
+
registerOnTouched(fn: () => void): void;
|
|
47
|
+
setDisabledState(isDisabled: boolean): void;
|
|
48
|
+
protected startEdit(): void;
|
|
49
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
50
|
+
protected saveEdit(): void;
|
|
51
|
+
protected cancelEdit(): void;
|
|
52
|
+
/** Reacts to sdc-popover closing itself (outside click / Escape) - treated as a cancel. */
|
|
53
|
+
protected onPopoverOpenChange(nextOpen: boolean): void;
|
|
54
|
+
protected updateDraft(value: unknown): void;
|
|
55
|
+
private closeOverlay;
|
|
56
|
+
private isEmpty;
|
|
57
|
+
private formatValue;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableOverlayComponent, never>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EditableOverlayComponent, "sdc-editable-overlay", never, { "label": { "alias": "label"; "required": false; }; "message": { "alias": "message"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "saveLabel": { "alias": "saveLabel"; "required": false; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "displayFormatter": { "alias": "displayFormatter"; "required": false; }; }, { "saved": "saved"; "canceled": "canceled"; "openChange": "openChange"; "valueChange": "valueChange"; }, ["editorTemplate"], never, true, never>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { InputsComponent } from '../../core/directives/inputs.directive';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Event emitted when the editor content changes. */
|
|
5
|
+
export interface EditorTextChangeEvent {
|
|
6
|
+
htmlValue: string;
|
|
7
|
+
textValue: string;
|
|
8
|
+
}
|
|
9
|
+
/** Text alignment options accepted by {@link EditorComponent.setTextAlign}. */
|
|
10
|
+
export type EditorTextAlignment = 'left' | 'center' | 'right' | 'justify';
|
|
11
|
+
/** Default toolbar buttons available in the editor. */
|
|
12
|
+
export declare const EDITOR_DEFAULT_TOOLBAR_BUTTONS: string[];
|
|
13
|
+
export declare class EditorComponent extends InputsComponent<string> implements AfterViewInit, OnDestroy {
|
|
14
|
+
readonly: boolean;
|
|
15
|
+
minHeight: string;
|
|
16
|
+
maxHeight: string;
|
|
17
|
+
showToolbar: boolean;
|
|
18
|
+
toolbarButtons: string[];
|
|
19
|
+
infoTooltip: string | null;
|
|
20
|
+
textChange: EventEmitter<EditorTextChangeEvent>;
|
|
21
|
+
selectionChange: EventEmitter<void>;
|
|
22
|
+
private readonly editorHost;
|
|
23
|
+
protected readonly editorHostId: string;
|
|
24
|
+
private editor;
|
|
25
|
+
ngAfterViewInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
writeValue(value: string): void;
|
|
28
|
+
setDisabledState(isDisabled: boolean): void;
|
|
29
|
+
/** Check if a mark or node is active in the current selection. */
|
|
30
|
+
isActive(name: string | Record<string, unknown>, attrs?: Record<string, unknown>): boolean;
|
|
31
|
+
/** Check if a toolbar button should be shown based on `toolbarButtons` config. */
|
|
32
|
+
isButtonVisible(name: string): boolean;
|
|
33
|
+
toggleBold(): void;
|
|
34
|
+
toggleItalic(): void;
|
|
35
|
+
toggleUnderline(): void;
|
|
36
|
+
toggleStrike(): void;
|
|
37
|
+
toggleBulletList(): void;
|
|
38
|
+
toggleOrderedList(): void;
|
|
39
|
+
setTextAlign(alignment: EditorTextAlignment): void;
|
|
40
|
+
toggleBlockquote(): void;
|
|
41
|
+
toggleCode(): void;
|
|
42
|
+
undo(): void;
|
|
43
|
+
redo(): void;
|
|
44
|
+
private buildExtensions;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "sdc-editor", never, { "readonly": { "alias": "readonly"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarButtons": { "alias": "toolbarButtons"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; }, { "textChange": "textChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import type { HelpPopoverArrowPosition, HelpPopoverPosition } from '../../core/types/help-popover.type';
|
|
3
|
+
import type { PopoverPlacement } from '../../core/types/popover.type';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* @description Balão de ajuda contextual acionado a partir de um elemento projetado (trigger).
|
|
7
|
+
* Reutiliza o `sdc-popover` como motor de overlay/posicionamento (abertura, clique fora, escape,
|
|
8
|
+
* anexação ao body/appendTo, foco). O `sdc-help-popover` é responsável apenas pela apresentação
|
|
9
|
+
* do balão (cabeçalho, conteúdo, rodapé e seta indicativa) e pelo cálculo visual adicional
|
|
10
|
+
* necessário para as posições `left`/`right`, que o `sdc-popover` não modela nativamente.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <sdc-help-popover content="Informe aqui o seu CPF" position="right">
|
|
15
|
+
* <button sdc-help-popover-trigger type="button">?</button>
|
|
16
|
+
* </sdc-help-popover>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class HelpPopoverComponent {
|
|
20
|
+
private readonly cdr;
|
|
21
|
+
/** Conteúdo do balão: texto simples (chave de tradução ou texto literal) ou `TemplateRef`. */
|
|
22
|
+
content: string | TemplateRef<unknown> | null;
|
|
23
|
+
/** Exibe o botão de fechar (X) no cabeçalho do balão. */
|
|
24
|
+
closeButton: boolean;
|
|
25
|
+
/** Classe de ícone (ex: Font Awesome) exibida no cabeçalho. */
|
|
26
|
+
icon: string;
|
|
27
|
+
/** Texto (chave de tradução) exibido no cabeçalho. */
|
|
28
|
+
header: string;
|
|
29
|
+
/** Texto (chave de tradução) exibido no rodapé. */
|
|
30
|
+
footer: string;
|
|
31
|
+
/** Texto (chave de tradução) do botão de ação do rodapé. */
|
|
32
|
+
buttonText: string;
|
|
33
|
+
/** Posição do balão em relação ao elemento de trigger. */
|
|
34
|
+
position: HelpPopoverPosition;
|
|
35
|
+
/** Alinhamento da seta indicadora em relação ao lado do balão. */
|
|
36
|
+
arrowPosition: HelpPopoverArrowPosition;
|
|
37
|
+
/** Desabilita a abertura do balão. */
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
/** Fecha o balão ao clicar fora dele. */
|
|
40
|
+
closeOnOutsideClick: boolean;
|
|
41
|
+
/** Seletor do elemento onde o painel do balão será anexado (padrão: `document.body`). */
|
|
42
|
+
appendTo?: string;
|
|
43
|
+
/** Sobrescreve o texto (chave de tradução) usado como `aria-label` do balão. */
|
|
44
|
+
ariaLabel?: string;
|
|
45
|
+
/** Classes adicionais aplicadas ao painel do balão. */
|
|
46
|
+
panelClass?: string;
|
|
47
|
+
/** Emitido quando o usuário clica no botão de ação do rodapé. */
|
|
48
|
+
buttonClicked: EventEmitter<void>;
|
|
49
|
+
/** Emitido quando o estado de abertura do balão muda (clique no trigger, X, fora, ou show()/hide()). */
|
|
50
|
+
openChange: EventEmitter<boolean>;
|
|
51
|
+
private readonly popoverRef?;
|
|
52
|
+
protected readonly closeAriaLabelKey = "platform.datacore.help_popover.close";
|
|
53
|
+
protected open: boolean;
|
|
54
|
+
protected triggerWidth: number;
|
|
55
|
+
protected triggerHeight: number;
|
|
56
|
+
protected get contentIsString(): boolean;
|
|
57
|
+
protected get contentText(): string;
|
|
58
|
+
protected get contentTemplate(): TemplateRef<unknown> | null;
|
|
59
|
+
protected get hasIcon(): boolean;
|
|
60
|
+
protected get hasHeaderText(): boolean;
|
|
61
|
+
protected get hasHeader(): boolean;
|
|
62
|
+
protected get hasFooterText(): boolean;
|
|
63
|
+
protected get hasButtonText(): boolean;
|
|
64
|
+
protected get hasFooter(): boolean;
|
|
65
|
+
protected get isTopOrBottom(): boolean;
|
|
66
|
+
protected get isLeftOrRight(): boolean;
|
|
67
|
+
protected get resolvedPlacement(): PopoverPlacement;
|
|
68
|
+
protected get resolvedAriaLabel(): string;
|
|
69
|
+
protected get resolvedPanelClass(): string[];
|
|
70
|
+
/** Abre o balão programaticamente. */
|
|
71
|
+
show(): void;
|
|
72
|
+
/** Fecha o balão programaticamente. */
|
|
73
|
+
hide(): void;
|
|
74
|
+
/** Alterna a visibilidade do balão. */
|
|
75
|
+
toggle(): void;
|
|
76
|
+
protected onButtonClicked(): void;
|
|
77
|
+
protected onOpenChange(isOpen: boolean): void;
|
|
78
|
+
private measureTrigger;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HelpPopoverComponent, never>;
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HelpPopoverComponent, "sdc-help-popover", never, { "content": { "alias": "content"; "required": false; }; "closeButton": { "alias": "closeButton"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "header": { "alias": "header"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; "buttonText": { "alias": "buttonText"; "required": false; }; "position": { "alias": "position"; "required": false; }; "arrowPosition": { "alias": "arrowPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; }, { "buttonClicked": "buttonClicked"; "openChange": "openChange"; }, never, ["[sdc-help-popover-trigger]"], true, never>;
|
|
81
|
+
}
|
|
@@ -11,10 +11,11 @@ export declare class InfoSignComponent {
|
|
|
11
11
|
iconAriaLabel: string;
|
|
12
12
|
tooltipPosition: TooltipPosition;
|
|
13
13
|
tooltipEvent: TooltipEvent;
|
|
14
|
+
allowHtml: boolean;
|
|
14
15
|
inline: boolean;
|
|
15
16
|
get resolvedTooltip(): string;
|
|
16
17
|
get resolvedLabel(): string | null;
|
|
17
18
|
get resolvedAriaLabel(): string;
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<InfoSignComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InfoSignComponent, "sdc-info-sign", never, { "label": { "alias": "label"; "required": false; }; "labelParams": { "alias": "labelParams"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": true; }; "tooltipParams": { "alias": "tooltipParams"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "iconAriaLabel": { "alias": "iconAriaLabel"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipEvent": { "alias": "tooltipEvent"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfoSignComponent, "sdc-info-sign", never, { "label": { "alias": "label"; "required": false; }; "labelParams": { "alias": "labelParams"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": true; }; "tooltipParams": { "alias": "tooltipParams"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "iconAriaLabel": { "alias": "iconAriaLabel"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipEvent": { "alias": "tooltipEvent"; "required": false; }; "allowHtml": { "alias": "allowHtml"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
20
21
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @description Diretiva de máscara de entrada interativa para campos de texto.
|
|
6
|
+
*
|
|
7
|
+
* Aplique `sdcInputMask` em qualquer `<input>` para aplicar uma máscara de formatação,
|
|
8
|
+
* guiando a entrada do usuário com um padrão definido. Implementa `ControlValueAccessor`
|
|
9
|
+
* e `Validator` para integração nativa com Angular Forms (`ngModel`/`formControl`).
|
|
10
|
+
*
|
|
11
|
+
* **Tokens de máscara:**
|
|
12
|
+
* - `9` — dígito (0-9)
|
|
13
|
+
* - `a` — letra (conforme `characterPattern`, padrão `[A-Za-z]`)
|
|
14
|
+
* - `*` — alfanumérico (letra ou dígito)
|
|
15
|
+
* - Qualquer outro caractere é tratado como literal (ex: `.`, `-`, `/`, `(`, `)`)
|
|
16
|
+
* - `?` — tudo após esse ponto na máscara passa a ser opcional
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <!-- CPF -->
|
|
21
|
+
* <input type="text" sdcInputMask="999.999.999-99" [(ngModel)]="cpf" />
|
|
22
|
+
*
|
|
23
|
+
* <!-- CNPJ -->
|
|
24
|
+
* <input type="text" sdcInputMask="99.999.999/9999-99" [(ngModel)]="cnpj" />
|
|
25
|
+
*
|
|
26
|
+
* <!-- Telefone, retornando só os dígitos digitados -->
|
|
27
|
+
* <input type="text" sdcInputMask="(99) 99999-9999" [unmask]="true" [(ngModel)]="telefone" />
|
|
28
|
+
* ```
|
|
29
|
+
* @category Input
|
|
30
|
+
*/
|
|
31
|
+
export declare class InputMaskDirective implements OnInit, OnChanges, ControlValueAccessor, Validator {
|
|
32
|
+
/**
|
|
33
|
+
* Padrão da máscara. Tokens: `9` (dígito), `a` (letra), `*` (alfanumérico).
|
|
34
|
+
* Demais caracteres são literais. `?` torna o restante da máscara opcional.
|
|
35
|
+
*/
|
|
36
|
+
mask: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Caractere exibido nas posições ainda não preenchidas.
|
|
39
|
+
* @default '_'
|
|
40
|
+
*/
|
|
41
|
+
slotChar: string;
|
|
42
|
+
/**
|
|
43
|
+
* Quando `true`, o modelo recebe apenas os caracteres digitados pelo usuário,
|
|
44
|
+
* sem os literais da máscara. Quando `false`, o modelo recebe o valor completo
|
|
45
|
+
* incluindo literais.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
unmask: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Expressão regular usada para validar o token `a` (letra).
|
|
51
|
+
* @default '[A-Za-z]'
|
|
52
|
+
*/
|
|
53
|
+
characterPattern: string;
|
|
54
|
+
/**
|
|
55
|
+
* Quando `true`, limpa o campo ao perder o foco se a máscara estiver incompleta.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
autoClear: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Emitido quando todos os tokens obrigatórios da máscara estão preenchidos.
|
|
61
|
+
* Disparado apenas na transição de incompleto para completo (edge-triggered).
|
|
62
|
+
* Emite o valor atual (mascarado ou não, conforme `unmask`).
|
|
63
|
+
*/
|
|
64
|
+
maskComplete: EventEmitter<string>;
|
|
65
|
+
private readonly el;
|
|
66
|
+
private readonly renderer;
|
|
67
|
+
private tokens;
|
|
68
|
+
private buffer;
|
|
69
|
+
private wasComplete;
|
|
70
|
+
private lastValue;
|
|
71
|
+
private onChange;
|
|
72
|
+
private onTouched;
|
|
73
|
+
private onValidatorChange;
|
|
74
|
+
ngOnInit(): void;
|
|
75
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
76
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
77
|
+
private buildMask;
|
|
78
|
+
private parseMask;
|
|
79
|
+
private buildToken;
|
|
80
|
+
private resetBuffer;
|
|
81
|
+
private isValidChar;
|
|
82
|
+
private isEditable;
|
|
83
|
+
private nextEditablePos;
|
|
84
|
+
private prevEditablePos;
|
|
85
|
+
private setCursor;
|
|
86
|
+
private setInputValue;
|
|
87
|
+
private getDisplayValue;
|
|
88
|
+
private getBlurDisplayValue;
|
|
89
|
+
/**
|
|
90
|
+
* Retorna o valor que deve ser propagado ao modelo.
|
|
91
|
+
* Retorna `null` quando o usuário não digitou nada.
|
|
92
|
+
*/
|
|
93
|
+
private getModelValue;
|
|
94
|
+
private clearRange;
|
|
95
|
+
private isMaskComplete;
|
|
96
|
+
private checkAndEmitComplete;
|
|
97
|
+
private dispatchInputEvent;
|
|
98
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
99
|
+
private shouldIgnoreKeydown;
|
|
100
|
+
private handleBackspace;
|
|
101
|
+
private handleDelete;
|
|
102
|
+
private handleCharacterInput;
|
|
103
|
+
private finishEdit;
|
|
104
|
+
onFocus(_event: FocusEvent): void;
|
|
105
|
+
onBlur(_event: Event): void;
|
|
106
|
+
onPaste(event: ClipboardEvent): void;
|
|
107
|
+
private consumePastedText;
|
|
108
|
+
private consumePastedChar;
|
|
109
|
+
onClick(): void;
|
|
110
|
+
writeValue(value: string | null): void;
|
|
111
|
+
registerOnChange(onChange: (value: string | null) => void): void;
|
|
112
|
+
registerOnTouched(onTouched: () => void): void;
|
|
113
|
+
setDisabledState(isDisabled: boolean): void;
|
|
114
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputMaskDirective, never>;
|
|
116
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InputMaskDirective, "input[sdcInputMask]", never, { "mask": { "alias": "sdcInputMask"; "required": false; }; "slotChar": { "alias": "slotChar"; "required": false; }; "unmask": { "alias": "unmask"; "required": false; }; "characterPattern": { "alias": "characterPattern"; "required": false; }; "autoClear": { "alias": "autoClear"; "required": false; }; }, { "maskComplete": "maskComplete"; }, never, never, true, never>;
|
|
117
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ConnectedPosition, ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
|
+
import { InputsComponent } from '../../core/directives/inputs.directive';
|
|
4
|
+
import type { LookupConfig, LookupSearchRequest, LookupSearchResponse } from '../../core/types/lookup.type';
|
|
5
|
+
import type { ModalButton } from '../../core/types/modal.type';
|
|
6
|
+
import type { TableColumn } from '../../core/types/table.type';
|
|
7
|
+
import type { PaginatorState } from '../../core/types/paginator.type';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class LookupComponent extends InputsComponent<unknown> implements AfterViewInit, OnDestroy {
|
|
10
|
+
private static nextId;
|
|
11
|
+
private static allocateComponentId;
|
|
12
|
+
private readonly overlay;
|
|
13
|
+
private readonly router;
|
|
14
|
+
private readonly destroy$;
|
|
15
|
+
private readonly inputSubject;
|
|
16
|
+
private dismissWatcher;
|
|
17
|
+
/** CDK overlay config */
|
|
18
|
+
protected readonly scrollStrategy: ScrollStrategy;
|
|
19
|
+
protected readonly overlayPositions: ConnectedPosition[];
|
|
20
|
+
protected containerDiv?: ElementRef<HTMLElement>;
|
|
21
|
+
config: LookupConfig;
|
|
22
|
+
suggestions: unknown[];
|
|
23
|
+
dialogData: LookupSearchResponse;
|
|
24
|
+
dialogLoading: boolean;
|
|
25
|
+
onLookupRequest: EventEmitter<string>;
|
|
26
|
+
onDialogSearch: EventEmitter<LookupSearchRequest>;
|
|
27
|
+
onDialogOpen: EventEmitter<void>;
|
|
28
|
+
valueSelected: EventEmitter<unknown>;
|
|
29
|
+
protected readonly componentId: string;
|
|
30
|
+
protected readonly inputValue: import("@angular/core").WritableSignal<string>;
|
|
31
|
+
protected readonly panelOpen: import("@angular/core").WritableSignal<boolean>;
|
|
32
|
+
protected readonly dialogVisible: import("@angular/core").WritableSignal<boolean>;
|
|
33
|
+
protected readonly dialogQuery: import("@angular/core").WritableSignal<string>;
|
|
34
|
+
protected readonly dialogPage: import("@angular/core").WritableSignal<number>;
|
|
35
|
+
protected readonly filtersExpanded: import("@angular/core").WritableSignal<boolean>;
|
|
36
|
+
protected readonly filterValues: import("@angular/core").WritableSignal<Record<string, string>>;
|
|
37
|
+
protected readonly dialogSelection: import("@angular/core").WritableSignal<unknown[]>;
|
|
38
|
+
protected readonly pageSize: import("@angular/core").Signal<number>;
|
|
39
|
+
protected readonly isMultiple: import("@angular/core").Signal<boolean>;
|
|
40
|
+
protected readonly hasFilters: import("@angular/core").Signal<boolean>;
|
|
41
|
+
protected readonly dialogTableConfig: import("@angular/core").Signal<{
|
|
42
|
+
search: {
|
|
43
|
+
show: boolean;
|
|
44
|
+
};
|
|
45
|
+
table: {
|
|
46
|
+
totalRecordsLabel: string;
|
|
47
|
+
responsive: boolean;
|
|
48
|
+
mode: "api";
|
|
49
|
+
};
|
|
50
|
+
pagination: {
|
|
51
|
+
show: boolean;
|
|
52
|
+
};
|
|
53
|
+
empty: {
|
|
54
|
+
show: boolean;
|
|
55
|
+
title: string;
|
|
56
|
+
text: string;
|
|
57
|
+
};
|
|
58
|
+
cells: {
|
|
59
|
+
checkbox: {
|
|
60
|
+
selectAll: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}>;
|
|
64
|
+
protected readonly tableColumns: import("@angular/core").Signal<TableColumn<import("../../core/types/table-shared.type").RowBase>[]>;
|
|
65
|
+
protected readonly dialogFirst: import("@angular/core").Signal<number>;
|
|
66
|
+
protected readonly hasDialogSelection: import("@angular/core").Signal<boolean>;
|
|
67
|
+
protected readonly dialogModalFooterButtons: import("@angular/core").Signal<ModalButton[]>;
|
|
68
|
+
constructor();
|
|
69
|
+
ngAfterViewInit(): void;
|
|
70
|
+
ngOnDestroy(): void;
|
|
71
|
+
writeValue(value: unknown): void;
|
|
72
|
+
protected toggleFilters(): void;
|
|
73
|
+
protected onFilterValueChange(name: string, value: string | null): void;
|
|
74
|
+
protected filterValueFor(name: string): string;
|
|
75
|
+
protected mapFilterOptions(options: {
|
|
76
|
+
value: string;
|
|
77
|
+
label: string;
|
|
78
|
+
}[] | undefined): {
|
|
79
|
+
value: string;
|
|
80
|
+
text: string;
|
|
81
|
+
}[];
|
|
82
|
+
protected applyFilters(): void;
|
|
83
|
+
protected clearFilters(): void;
|
|
84
|
+
protected onInputChange(event: Event): void;
|
|
85
|
+
protected onInputFocus(): void;
|
|
86
|
+
protected closePanel(): void;
|
|
87
|
+
protected selectSuggestion(item: unknown): void;
|
|
88
|
+
protected getDisplayValue(item: unknown): string;
|
|
89
|
+
protected openDialog(): void;
|
|
90
|
+
protected onDialogVisibleChange(visible: boolean): void;
|
|
91
|
+
protected onDialogSearchEvent(query: string): void;
|
|
92
|
+
protected onDialogPageChange(event: PaginatorState): void;
|
|
93
|
+
protected onDialogRowClick(row: unknown): void;
|
|
94
|
+
protected onDialogSelectionChange(selection: unknown[]): void;
|
|
95
|
+
protected confirmMultipleSelection(): void;
|
|
96
|
+
private selectItem;
|
|
97
|
+
private toggleDialogRowSelection;
|
|
98
|
+
private dataKeyOf;
|
|
99
|
+
private updateInputDisplay;
|
|
100
|
+
private emitDialogSearch;
|
|
101
|
+
private mapFieldType;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LookupComponent, never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LookupComponent, "sdc-lookup", never, { "config": { "alias": "config"; "required": true; }; "suggestions": { "alias": "suggestions"; "required": false; }; "dialogData": { "alias": "dialogData"; "required": false; }; "dialogLoading": { "alias": "dialogLoading"; "required": false; }; }, { "onLookupRequest": "onLookupRequest"; "onDialogSearch": "onDialogSearch"; "onDialogOpen": "onDialogOpen"; "valueSelected": "valueSelected"; }, never, never, true, never>;
|
|
104
|
+
}
|
|
@@ -8,6 +8,7 @@ export declare class ModalComponent implements AfterViewInit, OnDestroy {
|
|
|
8
8
|
dialogPanel?: ElementRef<HTMLDivElement>;
|
|
9
9
|
bodyPortal?: CdkPortal;
|
|
10
10
|
footerButtons: ModalButton[];
|
|
11
|
+
headerActions: ModalButton[];
|
|
11
12
|
header: string;
|
|
12
13
|
height: Dimension;
|
|
13
14
|
maximizable: boolean;
|
|
@@ -52,6 +53,6 @@ export declare class ModalComponent implements AfterViewInit, OnDestroy {
|
|
|
52
53
|
private viewInitialized;
|
|
53
54
|
private bodyPortalOutlet?;
|
|
54
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
55
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "sdc-modal", never, { "footerButtons": { "alias": "footerButtons"; "required": false; }; "header": { "alias": "header"; "required": false; }; "height": { "alias": "height"; "required": false; }; "maximizable": { "alias": "maximizable"; "required": false; }; "maximize": { "alias": "maximize"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "width": { "alias": "width"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "appendToBody": { "alias": "appendToBody"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, { "hidden": "hidden"; "visibleChange": "visibleChange"; }, never, ["*", "[footer]"], true, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "sdc-modal", never, { "footerButtons": { "alias": "footerButtons"; "required": false; }; "headerActions": { "alias": "headerActions"; "required": false; }; "header": { "alias": "header"; "required": false; }; "height": { "alias": "height"; "required": false; }; "maximizable": { "alias": "maximizable"; "required": false; }; "maximize": { "alias": "maximize"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "width": { "alias": "width"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "appendToBody": { "alias": "appendToBody"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, { "hidden": "hidden"; "visibleChange": "visibleChange"; }, never, ["*", "[footer]"], true, never>;
|
|
56
57
|
static ngAcceptInputType_appendToBody: unknown;
|
|
57
58
|
}
|