@energycap/components 0.37.1-ECAP-18944-page-view-background-color.20230811-1458 → 0.37.1-ECAP-18590-combobox-addNewOptions-updates.20230814-1120
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/esm2020/lib/controls/combobox/combobox.component.mjs +27 -3
- package/esm2020/lib/shared/page/page-view/page-view.component.mjs +3 -3
- package/fesm2015/energycap-components.mjs +29 -4
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +28 -4
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/lib/controls/combobox/combobox.component.d.ts +26 -1
- package/package.json +1 -1
@@ -19,6 +19,16 @@ export type ComboboxMenuPosition = "top_right" | "top_left" | "bottom_left" | "b
|
|
19
19
|
* the label of the button with value of the textbox
|
20
20
|
*/
|
21
21
|
type AddNewType = "dynamic" | "static" | boolean;
|
22
|
+
/**
|
23
|
+
* Options for configuring the "Add new" button when in static mode
|
24
|
+
*/
|
25
|
+
type AddNewOptions = {
|
26
|
+
label?: string; /** A custom label to display in place of the default "Add new..." */
|
27
|
+
labelColor?: string; /** A custom color to apply to the label in the form of 'var(--ec-color-danger)' or '#FFFFF'*/
|
28
|
+
classList?: string; /** A string of space-separated utility classes we'll apply to the label */
|
29
|
+
icon?: string; /** A custom icon to display in place of the default 'icon-add' */
|
30
|
+
iconColor?: string; /** A custom color to apply to the icon in the form of 'var(--ec-color-danger)' or '#FFFFF' */
|
31
|
+
};
|
22
32
|
/**
|
23
33
|
* Select box (select, autocomplete, combobox)
|
24
34
|
*
|
@@ -50,6 +60,21 @@ export declare class ComboboxComponent extends FormControlBase implements OnInit
|
|
50
60
|
* Show the add new button in the popup
|
51
61
|
*/
|
52
62
|
addNew?: AddNewType;
|
63
|
+
/** Configure the addNew button label & icon when addNew is true and set to static
|
64
|
+
* Default is set to: { label: 'All new...', icon: 'icon-add'}
|
65
|
+
* @see AddNewOptions
|
66
|
+
* @memberof ComboboxComponent
|
67
|
+
* @example
|
68
|
+
* <ec-combobox [addNew]="true"
|
69
|
+
* [addNewOptions]="{
|
70
|
+
* label: 'Help me choose...,
|
71
|
+
* labelColor: #2D5CB8,
|
72
|
+
* icon: 'icon-search',
|
73
|
+
* iconColor: 'var(--ec-color-danger)',
|
74
|
+
* classList: 'text-body-2 text-link }">
|
75
|
+
* </ec-combobox>
|
76
|
+
*/
|
77
|
+
addNewOptions?: AddNewOptions;
|
53
78
|
/**
|
54
79
|
* The maximum number of characters allowed in the input.
|
55
80
|
*
|
@@ -383,6 +408,6 @@ export declare class ComboboxComponent extends FormControlBase implements OnInit
|
|
383
408
|
*/
|
384
409
|
private findDefaultSelectionIndex;
|
385
410
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxComponent, never>;
|
386
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "ec-combobox", never, { "addNew": "addNew"; "maxlength": "maxlength"; "menuPosition": "menuPosition"; "minlength": "minlength"; "options": "options"; "templateType": "templateType"; "customMenuTemplate": "customMenuTemplate"; "preserveIconSpace": "preserveIconSpace"; "popupFixed": "popupFixed"; "totalRecords": "totalRecords"; "upperCase": "upperCase"; "placeholder": "placeholder"; "loadOnOpenObservable": "loadOnOpenObservable"; "hideToggleButton": "hideToggleButton"; "alwaysOpen": "alwaysOpen"; "menuElementClasses": "menuElementClasses"; "textboxElementClasses": "textboxElementClasses"; "hideNoMatches": "hideNoMatches"; "noMatchesText": "noMatchesText"; }, { "addNewClick": "addNewClick"; "search": "search"; }, never, never, false, never>;
|
411
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "ec-combobox", never, { "addNew": "addNew"; "addNewOptions": "addNewOptions"; "maxlength": "maxlength"; "menuPosition": "menuPosition"; "minlength": "minlength"; "options": "options"; "templateType": "templateType"; "customMenuTemplate": "customMenuTemplate"; "preserveIconSpace": "preserveIconSpace"; "popupFixed": "popupFixed"; "totalRecords": "totalRecords"; "upperCase": "upperCase"; "placeholder": "placeholder"; "loadOnOpenObservable": "loadOnOpenObservable"; "hideToggleButton": "hideToggleButton"; "alwaysOpen": "alwaysOpen"; "menuElementClasses": "menuElementClasses"; "textboxElementClasses": "textboxElementClasses"; "hideNoMatches": "hideNoMatches"; "noMatchesText": "noMatchesText"; }, { "addNewClick": "addNewClick"; "search": "search"; }, never, never, false, never>;
|
387
412
|
}
|
388
413
|
export {};
|