@seniorsistemas/data-seniorx-core 2.1.0 → 2.2.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/chips.const.d.ts +1 -0
- package/core/constants/combobox.const.d.ts +1 -1
- package/core/constants/fileupload.const.d.ts +9 -0
- package/core/constants/icon-picker.const.d.ts +1 -0
- package/core/constants/picklist.const.d.ts +1 -0
- package/core/constants/table.const.d.ts +43 -0
- package/core/types/button.type.d.ts +18 -2
- package/core/types/fileupload.type.d.ts +17 -0
- package/core/types/filters.type.d.ts +4 -0
- package/core/types/table-column.type.d.ts +31 -0
- package/core/types/table-options.type.d.ts +90 -0
- package/core/types/table-shared.type.d.ts +13 -0
- package/core/types/table-visual.type.d.ts +23 -0
- package/core/types/table.type.d.ts +4 -113
- package/core/utils/layout.util.d.ts +4 -0
- package/esm2022/core/constants/chips.const.mjs +2 -1
- package/esm2022/core/constants/combobox.const.mjs +2 -2
- package/esm2022/core/constants/fileupload.const.mjs +10 -0
- package/esm2022/core/constants/icon-picker.const.mjs +76 -1
- package/esm2022/core/constants/picklist.const.mjs +2 -1
- package/esm2022/core/constants/table.const.mjs +53 -6
- package/esm2022/core/types/button.type.mjs +1 -1
- package/esm2022/core/types/fileupload.type.mjs +2 -0
- package/esm2022/core/types/filters.type.mjs +1 -1
- package/esm2022/core/types/table-column.type.mjs +2 -0
- package/esm2022/core/types/table-options.type.mjs +2 -0
- package/esm2022/core/types/table-shared.type.mjs +2 -0
- package/esm2022/core/types/table-visual.type.mjs +2 -0
- package/esm2022/core/types/table.type.mjs +1 -1
- package/esm2022/core/utils/combobox.util.mjs +2 -2
- package/esm2022/core/utils/layout.util.mjs +21 -5
- package/esm2022/features/accordion/accordion-item.component.mjs +1 -1
- package/esm2022/features/badge/badge.component.mjs +1 -1
- package/esm2022/features/button/button.component.mjs +76 -11
- package/esm2022/features/button/components/button-menu.component.mjs +81 -0
- package/esm2022/features/card-list/card/card.component.mjs +3 -3
- package/esm2022/features/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/features/chips/chips.component.mjs +8 -5
- package/esm2022/features/color-picker/color-picker.component.mjs +1 -1
- package/esm2022/features/combobox/combobox.component.mjs +17 -4
- package/esm2022/features/fileupload/fileupload.component.mjs +311 -0
- package/esm2022/features/filters/filters.component.mjs +3 -3
- package/esm2022/features/hyperlink/hyperlink.component.mjs +3 -3
- package/esm2022/features/icon-picker/icon-picker.component.mjs +34 -7
- package/esm2022/features/info-sign/info-sign.component.mjs +1 -1
- package/esm2022/features/mask/mask.component.mjs +1 -1
- package/esm2022/features/modal/modal.component.mjs +1 -1
- package/esm2022/features/number-input/number-input.component.mjs +1 -1
- package/esm2022/features/paginator/paginator.component.mjs +3 -3
- package/esm2022/features/picklist/picklist.component.mjs +33 -6
- package/esm2022/features/row-card-list/row-card/row-card.component.mjs +3 -3
- package/esm2022/features/searchbox/searchbox.component.mjs +3 -3
- package/esm2022/features/stats-card/stats-card.component.mjs +1 -1
- package/esm2022/features/switch/switch.component.mjs +3 -2
- package/esm2022/features/table/components/table-actions-menu.component.mjs +86 -0
- package/esm2022/features/table/components/table-cell-content.component.mjs +124 -0
- package/esm2022/features/table/components/table-sort-indicator.component.mjs +65 -0
- package/esm2022/features/table/table.component.mjs +116 -319
- package/esm2022/features/table/utils/table-config.util.mjs +35 -0
- package/esm2022/features/table/utils/table-data.util.mjs +96 -0
- package/esm2022/features/table/utils/table-layout.util.mjs +25 -0
- package/esm2022/features/table/utils/table-truncate.pipe.mjs +19 -0
- package/esm2022/features/table/utils/table-visual.util.mjs +221 -0
- package/esm2022/features/textarea/textarea.component.mjs +1 -1
- package/esm2022/features/textbox/textbox.component.mjs +1 -1
- package/esm2022/features/tooltip/tooltip.component.mjs +12 -3
- package/esm2022/features/visual-sql-editor/visual-sql-editor.component.mjs +2 -2
- package/esm2022/locales/en.json +194 -0
- package/esm2022/locales/es-CO.json +187 -1
- package/esm2022/locales/pt.json +194 -0
- package/esm2022/providers/features.provider.mjs +3 -1
- package/esm2022/public-api.mjs +3 -1
- package/features/button/button.component.d.ts +14 -7
- package/features/button/components/button-menu.component.d.ts +25 -0
- package/features/chips/chips.component.d.ts +1 -0
- package/features/combobox/combobox.component.d.ts +4 -1
- package/features/fileupload/fileupload.component.d.ts +66 -0
- package/features/icon-picker/icon-picker.component.d.ts +3 -0
- package/features/modal/modal.component.d.ts +1 -1
- package/features/picklist/picklist.component.d.ts +6 -1
- package/features/table/components/table-actions-menu.component.d.ts +12 -0
- package/features/table/components/table-cell-content.component.d.ts +41 -0
- package/features/table/components/table-sort-indicator.component.d.ts +11 -0
- package/features/table/table.component.d.ts +28 -44
- package/features/table/utils/table-config.util.d.ts +3 -0
- package/features/table/utils/table-data.util.d.ts +10 -0
- package/features/table/utils/table-layout.util.d.ts +4 -0
- package/features/table/utils/table-truncate.pipe.d.ts +12 -0
- package/features/table/utils/table-visual.util.d.ts +21 -0
- package/features/tooltip/tooltip.component.d.ts +3 -1
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs +3525 -1848
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +5 -2
- package/src/locales/en.json +194 -0
- package/src/locales/es-CO.json +187 -1
- package/src/locales/pt.json +194 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { ButtonBadgeConfig, ButtonPriority } from '
|
|
3
|
-
import { TieredMenuItemData } from '@seniorsistemas/angular-components/tiered-menu';
|
|
4
|
-
import { ButtonLegacyMenuItem, ButtonSize } from '../../core/types/button.type';
|
|
2
|
+
import { ButtonBadgeConfig, ButtonLegacyMenuItem, ButtonMenuItemData, ButtonPriority, ButtonSize } from '../../core/types/button.type';
|
|
5
3
|
import { Button, Dimension } from '../../core/types/semantics.type';
|
|
4
|
+
import { ButtonMenuActionEvent } from './components/button-menu.component';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class ButtonComponent {
|
|
8
7
|
id: string;
|
|
@@ -25,20 +24,28 @@ export declare class ButtonComponent {
|
|
|
25
24
|
private _menuOptions;
|
|
26
25
|
private _legacyMenuOptions;
|
|
27
26
|
private _menuContext?;
|
|
28
|
-
set menuOptions(value:
|
|
29
|
-
get menuOptions():
|
|
27
|
+
set menuOptions(value: ButtonMenuItemData[] | null | undefined);
|
|
28
|
+
get menuOptions(): ButtonMenuItemData[];
|
|
30
29
|
set menuContext(value: unknown);
|
|
31
30
|
get menuContext(): unknown;
|
|
32
31
|
set legacyModel(value: ButtonLegacyMenuItem[] | undefined);
|
|
33
32
|
clicked: EventEmitter<Event>;
|
|
34
|
-
protected
|
|
33
|
+
protected readonly menuPanelClass = "sdc-button-menu-popover";
|
|
34
|
+
protected resolvedMenuOptions: ButtonMenuItemData[];
|
|
35
|
+
protected menuOpen: boolean;
|
|
35
36
|
protected get hostWidth(): string;
|
|
36
37
|
protected get widthStyle(): string;
|
|
38
|
+
protected get hasMenu(): boolean;
|
|
39
|
+
protected get buttonClasses(): Record<string, boolean>;
|
|
37
40
|
protected onHostClick(event: MouseEvent): void;
|
|
38
|
-
protected
|
|
41
|
+
protected handleButtonClick(event: MouseEvent): void;
|
|
42
|
+
protected handleMenuAction(event: ButtonMenuActionEvent): void;
|
|
43
|
+
protected onMenuOpenChange(open: boolean): void;
|
|
39
44
|
private rebuildResolvedMenuOptions;
|
|
40
45
|
private wrapMenuCommands;
|
|
41
46
|
private mapLegacyMenu;
|
|
47
|
+
private validateSlideButton;
|
|
48
|
+
private isRotateAnimation;
|
|
42
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
43
50
|
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "sdc-button", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "width": { "alias": "width"; "required": false; }; "priority": { "alias": "priority"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "auxiliary": { "alias": "auxiliary"; "required": false; }; "caret": { "alias": "caret"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "slide": { "alias": "slide"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "badge": { "alias": "badge"; "required": false; }; "menuOptions": { "alias": "menuOptions"; "required": false; }; "menuContext": { "alias": "menuContext"; "required": false; }; "legacyModel": { "alias": "model"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
44
51
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { ButtonMenuItemData } from '../../../core/types/button.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type ButtonMenuActionEvent = {
|
|
5
|
+
item: ButtonMenuItemData;
|
|
6
|
+
originalEvent: Event;
|
|
7
|
+
};
|
|
8
|
+
export declare class ButtonMenuComponent {
|
|
9
|
+
items: ButtonMenuItemData[];
|
|
10
|
+
level: number;
|
|
11
|
+
action: EventEmitter<ButtonMenuActionEvent>;
|
|
12
|
+
protected readonly expandedIndex: import("@angular/core").WritableSignal<number | null>;
|
|
13
|
+
protected get visibleItems(): ButtonMenuItemData[];
|
|
14
|
+
protected trackItem(index: number, item: ButtonMenuItemData): string;
|
|
15
|
+
protected hasSubmenu(item: ButtonMenuItemData): boolean;
|
|
16
|
+
protected isExpanded(index: number): boolean;
|
|
17
|
+
protected getVisibleSubmenu(item: ButtonMenuItemData): ButtonMenuItemData[];
|
|
18
|
+
protected openSubmenu(index: number): void;
|
|
19
|
+
protected closeSubmenu(index?: number): void;
|
|
20
|
+
protected onEntryFocusOut(event: FocusEvent, index: number): void;
|
|
21
|
+
protected onItemClick(item: ButtonMenuItemData, index: number, event: Event): void;
|
|
22
|
+
protected onItemKeydown(item: ButtonMenuItemData, index: number, event: KeyboardEvent): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonMenuComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonMenuComponent, "sdc-button-menu", never, { "items": { "alias": "items"; "required": false; }; "level": { "alias": "level"; "required": false; }; }, { "action": "action"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -52,6 +52,7 @@ export declare class ChipsComponent {
|
|
|
52
52
|
get resolvedPlaceholder(): string;
|
|
53
53
|
get resolvedInfoLabel(): string | null;
|
|
54
54
|
get canAddMore(): boolean;
|
|
55
|
+
get resolvedMaxLength(): number | null;
|
|
55
56
|
get removableItems(): boolean;
|
|
56
57
|
writeValue(value: unknown[] | null): void;
|
|
57
58
|
registerOnChange(fn: (value: unknown[]) => void): void;
|
|
@@ -25,7 +25,9 @@ export declare class ComboboxComponent extends InputsComponent<OptionValue | Opt
|
|
|
25
25
|
infoTooltip: string | null;
|
|
26
26
|
infoTooltipPosition: TooltipPosition;
|
|
27
27
|
infoTooltipEvent: TooltipEvent;
|
|
28
|
+
infoTooltipAllowHtml: boolean;
|
|
28
29
|
selectedValueEvent: EventEmitter<ComboboxValue>;
|
|
30
|
+
panelClosed: EventEmitter<void>;
|
|
29
31
|
popover?: PopoverComponent;
|
|
30
32
|
triggerControlRef?: ElementRef<HTMLElement>;
|
|
31
33
|
singleInputRef?: ElementRef<HTMLInputElement>;
|
|
@@ -95,6 +97,7 @@ export declare class ComboboxComponent extends InputsComponent<OptionValue | Opt
|
|
|
95
97
|
clearAll(event?: Event): void;
|
|
96
98
|
onOptionClick(option: ComboboxResolvedOption): void;
|
|
97
99
|
onOptionCheckboxChange(option: ComboboxResolvedOption, checked: boolean): void;
|
|
100
|
+
onOptionCheckboxKeydown(event: KeyboardEvent): void;
|
|
98
101
|
onOptionKeydown(event: KeyboardEvent, option: ComboboxResolvedOption): void;
|
|
99
102
|
toggleAllFilteredItems(checked: boolean): void;
|
|
100
103
|
removeSelectedItem(option: ComboboxResolvedOption, event?: Event): void;
|
|
@@ -163,5 +166,5 @@ export declare class ComboboxComponent extends InputsComponent<OptionValue | Opt
|
|
|
163
166
|
private scheduleVisibleOptionsSync;
|
|
164
167
|
private resetVirtualWindow;
|
|
165
168
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxComponent, never>;
|
|
166
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "sdc-combobox", never, { "multiple": { "alias": "multiple"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "options": { "alias": "options"; "required": false; }; "overrideChipMessage": { "alias": "overrideChipMessage"; "required": false; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "iconSelector": { "alias": "iconSelector"; "required": false; }; "showIconClass": { "alias": "showIconClass"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "infoTooltipEvent": { "alias": "infoTooltipEvent"; "required": false; }; }, { "selectedValueEvent": "onSelectedItem"; }, never, never, true, never>;
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "sdc-combobox", never, { "multiple": { "alias": "multiple"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "options": { "alias": "options"; "required": false; }; "overrideChipMessage": { "alias": "overrideChipMessage"; "required": false; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "iconSelector": { "alias": "iconSelector"; "required": false; }; "showIconClass": { "alias": "showIconClass"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "infoTooltipEvent": { "alias": "infoTooltipEvent"; "required": false; }; "infoTooltipAllowHtml": { "alias": "infoTooltipAllowHtml"; "required": false; }; }, { "selectedValueEvent": "onSelectedItem"; "panelClosed": "panelClosed"; }, never, never, true, never>;
|
|
167
170
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import type { FileUploadMode, SdcFileUploadError, SdcFileUploadFile } from '../../core/types/fileupload.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FileUploadComponent implements OnDestroy {
|
|
5
|
+
nativeInput?: ElementRef<HTMLInputElement>;
|
|
6
|
+
label: string | false;
|
|
7
|
+
required: boolean;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
multiple: boolean;
|
|
10
|
+
accept: string;
|
|
11
|
+
maxFileSize: number;
|
|
12
|
+
helperText: string | false;
|
|
13
|
+
errorMessage: string | false;
|
|
14
|
+
mode: FileUploadMode;
|
|
15
|
+
showPreview: boolean;
|
|
16
|
+
allowDownload: boolean;
|
|
17
|
+
allowRemove: boolean;
|
|
18
|
+
allowImageModal: boolean;
|
|
19
|
+
invalid: boolean;
|
|
20
|
+
placeholder: string;
|
|
21
|
+
set files(val: SdcFileUploadFile[]);
|
|
22
|
+
get files(): SdcFileUploadFile[];
|
|
23
|
+
filesChange: EventEmitter<SdcFileUploadFile[]>;
|
|
24
|
+
fileSelected: EventEmitter<SdcFileUploadFile>;
|
|
25
|
+
fileRemoved: EventEmitter<SdcFileUploadFile>;
|
|
26
|
+
fileDownload: EventEmitter<SdcFileUploadFile>;
|
|
27
|
+
filePreview: EventEmitter<SdcFileUploadFile>;
|
|
28
|
+
validationError: EventEmitter<SdcFileUploadError>;
|
|
29
|
+
readonly componentId: string;
|
|
30
|
+
readonly inputId: string;
|
|
31
|
+
readonly helperId: string;
|
|
32
|
+
readonly errorId: string;
|
|
33
|
+
isDragOver: boolean;
|
|
34
|
+
previewModalVisible: boolean;
|
|
35
|
+
previewFile: SdcFileUploadFile | null;
|
|
36
|
+
private _files;
|
|
37
|
+
private readonly cdr;
|
|
38
|
+
private objectUrls;
|
|
39
|
+
get hasFiles(): boolean;
|
|
40
|
+
get labelText(): string;
|
|
41
|
+
get helperTextValue(): string;
|
|
42
|
+
get errorMessageValue(): string;
|
|
43
|
+
get isInvalid(): boolean;
|
|
44
|
+
get ariaDescribedBy(): string | null;
|
|
45
|
+
get isDropzoneMode(): boolean;
|
|
46
|
+
get isButtonMode(): boolean;
|
|
47
|
+
get isCompactMode(): boolean;
|
|
48
|
+
ngOnDestroy(): void;
|
|
49
|
+
openFilePicker(): void;
|
|
50
|
+
onNativeChange(event: Event): void;
|
|
51
|
+
onDragOver(event: DragEvent): void;
|
|
52
|
+
onDragLeave(event: DragEvent): void;
|
|
53
|
+
onDrop(event: DragEvent): void;
|
|
54
|
+
onDropzoneKeydown(event: KeyboardEvent): void;
|
|
55
|
+
removeFile(file: SdcFileUploadFile, event: Event): void;
|
|
56
|
+
downloadFile(file: SdcFileUploadFile, event: Event): void;
|
|
57
|
+
openPreviewModal(file: SdcFileUploadFile, event: Event): void;
|
|
58
|
+
closePreviewModal(): void;
|
|
59
|
+
formatFileSize(bytes: number): string;
|
|
60
|
+
private processFiles;
|
|
61
|
+
private processSingleFile;
|
|
62
|
+
private validateType;
|
|
63
|
+
private validateSize;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "sdc-fileupload", never, { "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "helperText": { "alias": "helperText"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "showPreview": { "alias": "showPreview"; "required": false; }; "allowDownload": { "alias": "allowDownload"; "required": false; }; "allowRemove": { "alias": "allowRemove"; "required": false; }; "allowImageModal": { "alias": "allowImageModal"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "files": { "alias": "files"; "required": false; }; }, { "filesChange": "filesChange"; "fileSelected": "fileSelected"; "fileRemoved": "fileRemoved"; "fileDownload": "fileDownload"; "filePreview": "filePreview"; "validationError": "validationError"; }, never, never, true, never>;
|
|
66
|
+
}
|
|
@@ -9,6 +9,7 @@ export declare class IconPickerComponent implements ControlValueAccessor, OnDest
|
|
|
9
9
|
private readonly subscriptions;
|
|
10
10
|
private readonly searchInput$;
|
|
11
11
|
private readonly generatedId;
|
|
12
|
+
private readonly searchboxEl?;
|
|
12
13
|
label: string;
|
|
13
14
|
placeholder: string;
|
|
14
15
|
tooltip: string | null;
|
|
@@ -50,6 +51,7 @@ export declare class IconPickerComponent implements ControlValueAccessor, OnDest
|
|
|
50
51
|
registerOnTouched(fn: () => void): void;
|
|
51
52
|
setDisabledState(isDisabled: boolean): void;
|
|
52
53
|
openModal(): void;
|
|
54
|
+
private focusSearchInput;
|
|
53
55
|
onModalVisibleChange(visible: boolean): void;
|
|
54
56
|
onSearch(term: string): void;
|
|
55
57
|
onGridScroll(event: Event): void;
|
|
@@ -59,6 +61,7 @@ export declare class IconPickerComponent implements ControlValueAccessor, OnDest
|
|
|
59
61
|
isIconSelected(icon: IconPickerItem): boolean;
|
|
60
62
|
private loadIconsIfNeeded;
|
|
61
63
|
private buildIconList;
|
|
64
|
+
private sortByPriority;
|
|
62
65
|
private applyFilter;
|
|
63
66
|
private shouldIncludeIcon;
|
|
64
67
|
private resolveIconPickerText;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CdkPortal } from '@angular/cdk/portal';
|
|
2
2
|
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
3
|
-
import { ButtonPriority } from '
|
|
3
|
+
import type { ButtonPriority } from '../../core/types/button.type';
|
|
4
4
|
import type { ModalButton } from '../../core/types/modal.type';
|
|
5
5
|
import type { Dimension } from '../../core/types/semantics.type';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -16,6 +16,7 @@ export declare class PicklistComponent implements OnChanges, AfterViewInit, OnDe
|
|
|
16
16
|
placeholder: string;
|
|
17
17
|
emptyTitle: string;
|
|
18
18
|
emptyText: string;
|
|
19
|
+
emptyIconClass: string;
|
|
19
20
|
resultsCounterSingularLabel: string;
|
|
20
21
|
resultsCounterPluralLabel: string;
|
|
21
22
|
filterFields: string[];
|
|
@@ -33,12 +34,16 @@ export declare class PicklistComponent implements OnChanges, AfterViewInit, OnDe
|
|
|
33
34
|
autoResizeMaxRows: number;
|
|
34
35
|
autoResizeItemHeight: number;
|
|
35
36
|
autoResizeViewportOffset: number;
|
|
37
|
+
maxTitleLength: number;
|
|
38
|
+
maxSubtitleLength: number;
|
|
39
|
+
autofocusSearch: boolean;
|
|
36
40
|
set loading(value: boolean);
|
|
37
41
|
pageChange: EventEmitter<PaginatorState>;
|
|
38
42
|
selectedIdsChange: EventEmitter<number[]>;
|
|
39
43
|
private readonly searchSectionRef?;
|
|
40
44
|
private readonly selectedSectionRef?;
|
|
41
45
|
private readonly footerSectionRef?;
|
|
46
|
+
private readonly searchboxRef?;
|
|
42
47
|
private readonly cdr;
|
|
43
48
|
private readonly zone;
|
|
44
49
|
private readonly loadingState;
|
|
@@ -87,5 +92,5 @@ export declare class PicklistComponent implements OnChanges, AfterViewInit, OnDe
|
|
|
87
92
|
private getItemValueByPath;
|
|
88
93
|
private updateRowsFromViewport;
|
|
89
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<PicklistComponent, never>;
|
|
90
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PicklistComponent, "sdc-picklist", never, { "items": { "alias": "items"; "required": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; }; "idKey": { "alias": "idKey"; "required": false; }; "titleKey": { "alias": "titleKey"; "required": false; }; "subtitleKey": { "alias": "subtitleKey"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "selectionIconClass": { "alias": "selectionIconClass"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "resultsCounterSingularLabel": { "alias": "resultsCounterSingularLabel"; "required": false; }; "resultsCounterPluralLabel": { "alias": "resultsCounterPluralLabel"; "required": false; }; "filterFields": { "alias": "filterFields"; "required": false; }; "first": { "alias": "first"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; }; "maxVisibleSelectedItems": { "alias": "maxVisibleSelectedItems"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "showRowsPerPageOptions": { "alias": "showRowsPerPageOptions"; "required": false; }; "showSelectionCounter": { "alias": "showSelectionCounter"; "required": false; }; "showResultsCounter": { "alias": "showResultsCounter"; "required": false; }; "showItemIcon": { "alias": "showItemIcon"; "required": false; }; "autoResize": { "alias": "autoResize"; "required": false; }; "autoResizeMinRows": { "alias": "autoResizeMinRows"; "required": false; }; "autoResizeMaxRows": { "alias": "autoResizeMaxRows"; "required": false; }; "autoResizeItemHeight": { "alias": "autoResizeItemHeight"; "required": false; }; "autoResizeViewportOffset": { "alias": "autoResizeViewportOffset"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "pageChange": "pageChange"; "selectedIdsChange": "selectedIdsChange"; }, never, never, true, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PicklistComponent, "sdc-picklist", never, { "items": { "alias": "items"; "required": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; }; "idKey": { "alias": "idKey"; "required": false; }; "titleKey": { "alias": "titleKey"; "required": false; }; "subtitleKey": { "alias": "subtitleKey"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "selectionIconClass": { "alias": "selectionIconClass"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "emptyIconClass": { "alias": "emptyIconClass"; "required": false; }; "resultsCounterSingularLabel": { "alias": "resultsCounterSingularLabel"; "required": false; }; "resultsCounterPluralLabel": { "alias": "resultsCounterPluralLabel"; "required": false; }; "filterFields": { "alias": "filterFields"; "required": false; }; "first": { "alias": "first"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; }; "maxVisibleSelectedItems": { "alias": "maxVisibleSelectedItems"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "showRowsPerPageOptions": { "alias": "showRowsPerPageOptions"; "required": false; }; "showSelectionCounter": { "alias": "showSelectionCounter"; "required": false; }; "showResultsCounter": { "alias": "showResultsCounter"; "required": false; }; "showItemIcon": { "alias": "showItemIcon"; "required": false; }; "autoResize": { "alias": "autoResize"; "required": false; }; "autoResizeMinRows": { "alias": "autoResizeMinRows"; "required": false; }; "autoResizeMaxRows": { "alias": "autoResizeMaxRows"; "required": false; }; "autoResizeItemHeight": { "alias": "autoResizeItemHeight"; "required": false; }; "autoResizeViewportOffset": { "alias": "autoResizeViewportOffset"; "required": false; }; "maxTitleLength": { "alias": "maxTitleLength"; "required": false; }; "maxSubtitleLength": { "alias": "maxSubtitleLength"; "required": false; }; "autofocusSearch": { "alias": "autofocusSearch"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "pageChange": "pageChange"; "selectedIdsChange": "selectedIdsChange"; }, never, never, true, never>;
|
|
91
96
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { TableActionMenuItem } from '../../../core/types/table.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TableActionsMenuComponent {
|
|
5
|
+
items: TableActionMenuItem[];
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
select: EventEmitter<TableActionMenuItem>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableActionsMenuComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableActionsMenuComponent, "sdc-table-actions-menu", never, { "items": { "alias": "items"; "required": false; }; "left": { "alias": "left"; "required": false; }; "top": { "alias": "top"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "select": "select"; }, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { RowBase, TableCellConfigMap, TableColumn } from '../../../core/types/table.type';
|
|
3
|
+
import type { TableTextOverflow } from '../../../core/types/table-column.type';
|
|
4
|
+
import { normalizeTableColumnAlignment } from '../utils/table-layout.util';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TableCellContentComponent<T extends RowBase = RowBase> {
|
|
7
|
+
cellConfigs: TableCellConfigMap<T>;
|
|
8
|
+
col: TableColumn<T>;
|
|
9
|
+
resolveValue: (row: T, field?: string) => unknown;
|
|
10
|
+
row: T;
|
|
11
|
+
actionsMenuOpen: boolean;
|
|
12
|
+
defaultTextOverflow?: TableTextOverflow;
|
|
13
|
+
rowCheckboxId: string;
|
|
14
|
+
rowLabel: string;
|
|
15
|
+
rowSelected: boolean;
|
|
16
|
+
toggleActionsMenu: EventEmitter<{
|
|
17
|
+
event: Event;
|
|
18
|
+
trigger: HTMLElement;
|
|
19
|
+
}>;
|
|
20
|
+
toggleRow: EventEmitter<boolean>;
|
|
21
|
+
triggerButtonAction: EventEmitter<void>;
|
|
22
|
+
protected readonly iconSize = 16;
|
|
23
|
+
protected readonly tagIconSize = 12;
|
|
24
|
+
get resolvedAlignment(): ReturnType<typeof normalizeTableColumnAlignment>;
|
|
25
|
+
protected cellTextValue(field?: string | undefined): string;
|
|
26
|
+
protected displayText(field?: string | undefined): string;
|
|
27
|
+
protected isEllipsisMode(): boolean;
|
|
28
|
+
protected ellipsisTitleText(displayText: string): string | null;
|
|
29
|
+
protected formatDate(): string;
|
|
30
|
+
protected formatCurrency(): string;
|
|
31
|
+
protected getCheckedValue(event: Event): boolean;
|
|
32
|
+
protected tagItems(): import("../utils/table-visual.util").TableResolvedTagItem[];
|
|
33
|
+
protected iconPresentation(): import("../utils/table-visual.util").TableResolvedIconPresentation;
|
|
34
|
+
protected titleIconPresentation(): import("../utils/table-visual.util").TableResolvedIconPresentation;
|
|
35
|
+
protected buttonKey(): string;
|
|
36
|
+
protected buttonAriaLabel(): string;
|
|
37
|
+
protected actionsButtonLabel(): string;
|
|
38
|
+
protected onActionsClick(event: Event, trigger: HTMLElement): void;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableCellContentComponent<any>, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableCellContentComponent<any>, "sdc-table-cell-content", never, { "cellConfigs": { "alias": "cellConfigs"; "required": true; }; "col": { "alias": "col"; "required": true; }; "resolveValue": { "alias": "resolveValue"; "required": true; }; "row": { "alias": "row"; "required": true; }; "actionsMenuOpen": { "alias": "actionsMenuOpen"; "required": false; }; "defaultTextOverflow": { "alias": "defaultTextOverflow"; "required": false; }; "rowCheckboxId": { "alias": "rowCheckboxId"; "required": false; }; "rowLabel": { "alias": "rowLabel"; "required": false; }; "rowSelected": { "alias": "rowSelected"; "required": false; }; }, { "toggleActionsMenu": "toggleActionsMenu"; "toggleRow": "toggleRow"; "triggerButtonAction": "triggerButtonAction"; }, never, never, true, never>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SortOrder, TableColumnType } from '../../../core/types/table.type';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TableSortIndicatorComponent {
|
|
4
|
+
columnField: string | null;
|
|
5
|
+
columnType: TableColumnType | undefined;
|
|
6
|
+
sortField: string | null;
|
|
7
|
+
sortOrder: SortOrder;
|
|
8
|
+
sortable: boolean;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableSortIndicatorComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableSortIndicatorComponent, "sdc-table-sort-indicator", never, { "columnField": { "alias": "columnField"; "required": false; }; "columnType": { "alias": "columnType"; "required": false; }; "sortField": { "alias": "sortField"; "required": false; }; "sortOrder": { "alias": "sortOrder"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import type { PaginatorState } from '../../core/types/paginator.type';
|
|
3
3
|
import { type SearchTriggerMode } from '../../core/types/searchbox.type';
|
|
4
|
-
import { type RowBase, type SortOrder, type TableActionMenuItem as NativeActionMenuItem, type TableCellConfig, type
|
|
4
|
+
import { type RowBase, type SortOrder, type TableActionMenuItem as NativeActionMenuItem, type TableCellConfig, type TableColumn, type TableOpenMenuState as OpenMenuState, type TableOptions, type TableSearchEvent } from '../../core/types/table.type';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TableComponent<T extends RowBase = RowBase> {
|
|
7
7
|
private readonly colsSignal;
|
|
8
8
|
private readonly dataSignal;
|
|
9
9
|
private readonly loadingSignal;
|
|
10
|
+
private readonly viewportWidthSignal;
|
|
10
11
|
private readonly configSignal;
|
|
11
12
|
private _config;
|
|
13
|
+
private readonly pathPartsCache;
|
|
14
|
+
private rowCheckboxIdCache;
|
|
12
15
|
protected readonly openMenuState: import("@angular/core").WritableSignal<OpenMenuState<T> | null>;
|
|
16
|
+
protected readonly ariaLabelSignal: import("@angular/core").WritableSignal<string | undefined>;
|
|
17
|
+
protected readonly globalFilter: import("@angular/core").WritableSignal<string>;
|
|
18
|
+
protected readonly sortField: import("@angular/core").WritableSignal<string | null>;
|
|
19
|
+
protected readonly sortOrder: import("@angular/core").WritableSignal<SortOrder>;
|
|
20
|
+
protected readonly selection: import("@angular/core").WritableSignal<T[]>;
|
|
21
|
+
protected readonly first: import("@angular/core").WritableSignal<number>;
|
|
22
|
+
protected readonly rows: import("@angular/core").WritableSignal<number>;
|
|
13
23
|
set cols(value: TableColumn<T>[] | null | undefined);
|
|
14
24
|
get cols(): TableColumn<T>[];
|
|
15
25
|
set data(value: T[] | null | undefined);
|
|
@@ -19,6 +29,7 @@ export declare class TableComponent<T extends RowBase = RowBase> {
|
|
|
19
29
|
set config(value: TableOptions<T> | null | undefined);
|
|
20
30
|
get config(): TableOptions<T>;
|
|
21
31
|
set ariaLabel(value: string | undefined);
|
|
32
|
+
get ariaLabel(): string | undefined;
|
|
22
33
|
action: EventEmitter<{
|
|
23
34
|
column: TableColumn<T>;
|
|
24
35
|
row: T;
|
|
@@ -28,11 +39,9 @@ export declare class TableComponent<T extends RowBase = RowBase> {
|
|
|
28
39
|
first: number;
|
|
29
40
|
rows: number;
|
|
30
41
|
}>;
|
|
31
|
-
get ariaLabel(): string | undefined;
|
|
32
42
|
get isLoading(): boolean;
|
|
33
|
-
protected readonly isMobile: boolean;
|
|
34
|
-
protected readonly ariaLabelSignal: import("@angular/core").WritableSignal<string | undefined>;
|
|
35
43
|
protected readonly options: import("@angular/core").Signal<TableOptions<T>>;
|
|
44
|
+
protected readonly isMobile: import("@angular/core").Signal<boolean>;
|
|
36
45
|
protected readonly showSearch: import("@angular/core").Signal<boolean>;
|
|
37
46
|
protected readonly showPaginator: import("@angular/core").Signal<boolean>;
|
|
38
47
|
protected readonly showInitialLoading: import("@angular/core").Signal<boolean>;
|
|
@@ -40,15 +49,10 @@ export declare class TableComponent<T extends RowBase = RowBase> {
|
|
|
40
49
|
protected readonly searchPlaceholder: import("@angular/core").Signal<string>;
|
|
41
50
|
protected readonly triggerMode: import("@angular/core").Signal<SearchTriggerMode>;
|
|
42
51
|
protected readonly totalRecordsLabel: import("@angular/core").Signal<string>;
|
|
52
|
+
protected readonly defaultTextOverflow: import("@angular/core").Signal<import("../../core/types/table-column.type").TableTextOverflow | undefined>;
|
|
43
53
|
protected readonly emptyTitle: import("@angular/core").Signal<string>;
|
|
44
54
|
protected readonly emptyText: import("@angular/core").Signal<string>;
|
|
45
|
-
protected readonly
|
|
46
|
-
protected readonly sortField: import("@angular/core").WritableSignal<string | null>;
|
|
47
|
-
protected readonly sortOrder: import("@angular/core").WritableSignal<SortOrder>;
|
|
48
|
-
protected readonly selection: import("@angular/core").WritableSignal<T[]>;
|
|
49
|
-
protected readonly first: import("@angular/core").WritableSignal<number>;
|
|
50
|
-
protected readonly rows: import("@angular/core").WritableSignal<number>;
|
|
51
|
-
protected readonly cellsCfg: import("@angular/core").Signal<TableCellConfigMap<T>>;
|
|
55
|
+
protected readonly cellsCfg: import("@angular/core").Signal<import("../../core/types/table-options.type").TableCellConfigMap<T>>;
|
|
52
56
|
protected readonly filteredData: import("@angular/core").Signal<T[]>;
|
|
53
57
|
protected readonly sortedData: import("@angular/core").Signal<T[]>;
|
|
54
58
|
protected readonly totalRecords: import("@angular/core").Signal<number>;
|
|
@@ -57,66 +61,46 @@ export declare class TableComponent<T extends RowBase = RowBase> {
|
|
|
57
61
|
protected readonly selectionSet: import("@angular/core").Signal<Set<T>>;
|
|
58
62
|
protected readonly bodyViewportHeightPx: import("@angular/core").Signal<number>;
|
|
59
63
|
protected readonly emptyBodyHeightPx: import("@angular/core").Signal<number>;
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
protected readonly tableMinWidthPx: import("@angular/core").Signal<number>;
|
|
65
|
+
protected readonly resolveValue: (obj: T, path?: string) => unknown;
|
|
62
66
|
protected onDocumentClick(): void;
|
|
63
67
|
protected onEscapeKey(): void;
|
|
64
68
|
protected onWindowResize(): void;
|
|
65
69
|
protected onWindowScroll(): void;
|
|
66
|
-
protected onSearchTerm(
|
|
67
|
-
protected onClearSearch(
|
|
70
|
+
protected onSearchTerm(eventOrValue: TableSearchEvent): void;
|
|
71
|
+
protected onClearSearch(): void;
|
|
68
72
|
protected toggleSort(field: string, enabled?: boolean): void;
|
|
69
73
|
protected getSortAriaAttribute(col: TableColumn<T>): string | undefined;
|
|
70
74
|
protected columnAlignClass(col: TableColumn<T>): string | null;
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
protected isSortableColumn(col: TableColumn<T>): boolean;
|
|
76
|
+
protected columnMinWidthPx(col: TableColumn<T>): number;
|
|
77
|
+
protected mobileFieldLabel(col: TableColumn<T>): string;
|
|
78
|
+
protected onPageChange(event: PaginatorState): void;
|
|
73
79
|
protected onToggleRow(row: T, checked: boolean): void;
|
|
74
80
|
protected isRowSelected(row: T): boolean;
|
|
75
81
|
protected toggleSelectPage(checked: boolean): void;
|
|
76
82
|
protected isPageFullySelected(): boolean;
|
|
83
|
+
protected getCheckedValue(event: Event): boolean;
|
|
77
84
|
protected getRowCheckboxId(row: T): string;
|
|
78
85
|
protected getRowCheckboxLabel(row: T): string;
|
|
79
86
|
protected tableAriaLabelKey(): string;
|
|
80
|
-
protected cellTextValue(row: T, field?: string): string;
|
|
81
|
-
protected cellCfg<K extends TableCellConfigKey>(kind: K): TableCellConfig<T, K>;
|
|
82
|
-
protected tagsOf(row: T, col: TableColumn<T>): string[];
|
|
83
|
-
protected isEnabledTag(tag: string): boolean;
|
|
84
|
-
protected isDisabledTag(tag: string): boolean;
|
|
85
|
-
protected getTagStyles(tag: string, tagOptions: TableCellConfig<T, 'tag'>): Record<string, string> | null;
|
|
86
|
-
protected _: (obj: T, path?: string) => unknown;
|
|
87
|
-
protected formatDate(value: unknown, _format?: string): string;
|
|
88
|
-
protected formatCurrency(value: unknown, currency?: string): string;
|
|
89
87
|
protected toggleActionsMenu(event: Event, row: T, col: TableColumn<T>, triggerElement: HTMLElement): void;
|
|
90
88
|
protected closeActionsMenu(): void;
|
|
91
89
|
protected isActionsMenuOpen(row: T, col: TableColumn<T>): boolean;
|
|
92
|
-
protected actionItemsFor(row: T,
|
|
93
|
-
protected onPortalActionClick(
|
|
90
|
+
protected actionItemsFor(row: T, options: TableCellConfig<T, 'actions'>): NativeActionMenuItem[];
|
|
91
|
+
protected onPortalActionClick(item: NativeActionMenuItem): void;
|
|
94
92
|
protected onActionSelect(row: T, col: TableColumn<T>, item: {
|
|
95
93
|
key: string;
|
|
96
94
|
label: string;
|
|
97
95
|
icon?: string;
|
|
98
96
|
disabled?: boolean;
|
|
99
97
|
}): void;
|
|
100
|
-
protected buttonKey(row: T, col: TableColumn<T>, opt: TableCellConfig<T, 'button'>): string;
|
|
101
98
|
protected onButtonClick(row: T, col: TableColumn<T>): void;
|
|
102
|
-
|
|
103
|
-
private
|
|
104
|
-
private resolveRowIdentityLabel;
|
|
105
|
-
private getDerivedTagForeground;
|
|
106
|
-
private getTagForeground;
|
|
107
|
-
private getTagBackground;
|
|
108
|
-
private buildTagStyles;
|
|
109
|
-
private getObjectValue;
|
|
110
|
-
private getPathParts;
|
|
99
|
+
protected resolveCellId(col: TableColumn<T>, row: T): string | null;
|
|
100
|
+
private cellCfg;
|
|
111
101
|
private clampPage;
|
|
112
102
|
private reconcileSelectionWithData;
|
|
113
103
|
private resolveActionDisabled;
|
|
114
|
-
private normalizeHexColor;
|
|
115
|
-
private normalizeColumnAlignment;
|
|
116
|
-
private hexToRgb;
|
|
117
|
-
private toRgba;
|
|
118
|
-
private darkenHexColor;
|
|
119
|
-
private mergeOptions;
|
|
120
104
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
121
105
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "sdc-table", never, { "cols": { "alias": "cols"; "required": true; }; "data": { "alias": "data"; "required": true; }; "loading": { "alias": "loading"; "required": false; }; "config": { "alias": "config"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "action": "action"; "lazyLoad": "lazyLoad"; }, never, never, true, never>;
|
|
122
106
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RowBase, TableCellConfigMap, TableOptions } from '../../../core/types/table.type';
|
|
2
|
+
export declare function mergeTableOptions<T extends RowBase = RowBase>(config: TableOptions<T> | null | undefined): TableOptions<T>;
|
|
3
|
+
export declare function buildTableCellConfigMap<T extends RowBase = RowBase>(options: TableOptions<T>): TableCellConfigMap<T>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RowBase, TableColumn, TableRowIdentity } from '../../../core/types/table.type';
|
|
2
|
+
export declare function getObjectValue(source: unknown, key: string): unknown;
|
|
3
|
+
export declare function getPathParts(path: string, cache: Map<string, string[]>): string[];
|
|
4
|
+
export declare function getNestedValue<T extends RowBase = RowBase>(obj: T, path: string | undefined, cache: Map<string, string[]>): unknown;
|
|
5
|
+
export declare function formatTableDate(value: unknown): string;
|
|
6
|
+
export declare function formatTableCurrency(value: unknown, currency?: string): string;
|
|
7
|
+
export declare function toTableTextValue(value: unknown): string;
|
|
8
|
+
export declare function resolveRowIdentityLabel(rowIdentity: TableRowIdentity): string;
|
|
9
|
+
export declare function buildRowCheckboxId<T extends RowBase = RowBase>(row: T): string;
|
|
10
|
+
export declare function filterTableRows<T extends RowBase = RowBase>(data: T[], cols: TableColumn<T>[], query: string, resolveValue: (row: T, field?: string) => unknown): T[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RowBase, TableColumn, TableColumnAlignment } from '../../../core/types/table.type';
|
|
2
|
+
export declare function normalizeTableColumnAlignment(value: unknown): TableColumnAlignment | null;
|
|
3
|
+
export declare function getTableColumnMinWidthPx<T extends RowBase = RowBase>(column: TableColumn<T>): number;
|
|
4
|
+
export declare function getTableMinWidthPx<T extends RowBase = RowBase>(columns: TableColumn<T>[]): number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
interface TruncateColInput {
|
|
4
|
+
textOverflow?: string;
|
|
5
|
+
maxChars?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class SdcTruncatePipe implements PipeTransform {
|
|
8
|
+
transform(text: string, col: TruncateColInput, defaultMode?: string): string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdcTruncatePipe, never>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SdcTruncatePipe, "sdcTruncate", true>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { RowBase, TableBaseVisualConfig, TableCellConfig, TableColumn, TableIconConfig, TableTagConfig, TableVisualConfigInput } from '../../../core/types/table.type';
|
|
2
|
+
export type TableResolvedTagItem = {
|
|
3
|
+
icon: string | null;
|
|
4
|
+
iconType: TableTagConfig['iconType'];
|
|
5
|
+
label: string;
|
|
6
|
+
styles: Record<string, string> | null;
|
|
7
|
+
tooltip: string | null;
|
|
8
|
+
tone: 'enabled' | 'disabled' | null;
|
|
9
|
+
};
|
|
10
|
+
export type TableResolvedIconPresentation = {
|
|
11
|
+
colorStyle: Record<string, string> | null;
|
|
12
|
+
icon: string | null;
|
|
13
|
+
iconType: TableIconConfig['iconType'];
|
|
14
|
+
label: string | null;
|
|
15
|
+
tooltip: string | null;
|
|
16
|
+
};
|
|
17
|
+
export declare function resolveTableVisualConfig<T extends RowBase = RowBase, TValue = unknown, TConfig extends TableBaseVisualConfig = TableBaseVisualConfig>(input: TableVisualConfigInput<T, TValue, TConfig> | undefined, value: TValue, row: T): TConfig | null;
|
|
18
|
+
export declare function resolveTableTagItems<T extends RowBase = RowBase>(row: T, col: TableColumn<T>, tagOptions: TableCellConfig<T, 'tag'>, resolveValue: (rowValue: T, field?: string) => unknown): TableResolvedTagItem[];
|
|
19
|
+
export declare function resolveTableIconPresentation<T extends RowBase = RowBase>(row: T, col: TableColumn<T>, iconOptions: TableCellConfig<T, 'icon'>, resolveValue: (rowValue: T, field?: string) => unknown): TableResolvedIconPresentation;
|
|
20
|
+
export declare function resolveTableTitleIconPresentation<T extends RowBase = RowBase>(row: T, col: TableColumn<T>, iconOptions: TableCellConfig<T, 'icon-title'>, resolveValue: (rowValue: T, field?: string) => unknown): TableResolvedIconPresentation;
|
|
21
|
+
export declare function resolveTableButtonKey<T extends RowBase = RowBase>(row: T, col: TableColumn<T>, buttonOptions: TableCellConfig<T, 'button'>, resolveValue: (rowValue: T, field?: string) => unknown): string;
|
|
@@ -12,7 +12,9 @@ export declare class TooltipComponent implements OnChanges {
|
|
|
12
12
|
tooltipEvent: TooltipEvent;
|
|
13
13
|
fitContent: boolean;
|
|
14
14
|
tooltipDisabled: boolean;
|
|
15
|
+
allowHtml: boolean;
|
|
15
16
|
readonly hostClass = true;
|
|
17
|
+
get hostFillClass(): boolean;
|
|
16
18
|
constructor();
|
|
17
19
|
get tooltipText(): string;
|
|
18
20
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -28,5 +30,5 @@ export declare class TooltipComponent implements OnChanges {
|
|
|
28
30
|
private hide;
|
|
29
31
|
private hasTooltipContent;
|
|
30
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "sdc-tooltip", never, { "pTooltip": { "alias": "pTooltip"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipEvent": { "alias": "tooltipEvent"; "required": false; }; "fitContent": { "alias": "fitContent"; "required": false; }; "tooltipDisabled": { "alias": "tooltipDisabled"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "sdc-tooltip", never, { "pTooltip": { "alias": "pTooltip"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipEvent": { "alias": "tooltipEvent"; "required": false; }; "fitContent": { "alias": "fitContent"; "required": false; }; "tooltipDisabled": { "alias": "tooltipDisabled"; "required": false; }; "allowHtml": { "alias": "allowHtml"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
32
34
|
}
|