@db-ux/ngx-core-components 1.1.1 → 2.0.0-0-custom-select-16b8cce
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/README.md +2 -2
- package/components/custom-select/custom-select.d.ts +131 -0
- package/components/custom-select/index.d.ts +1 -0
- package/components/custom-select/model.d.ts +173 -0
- package/components/custom-select-dropdown/custom-select-dropdown.d.ts +19 -0
- package/components/custom-select-dropdown/index.d.ts +1 -0
- package/components/custom-select-dropdown/model.d.ts +15 -0
- package/components/custom-select-form-field/custom-select-form-field.d.ts +18 -0
- package/components/custom-select-form-field/index.d.ts +1 -0
- package/components/custom-select-form-field/model.d.ts +5 -0
- package/components/custom-select-list/custom-select-list.d.ts +20 -0
- package/components/custom-select-list/index.d.ts +1 -0
- package/components/custom-select-list/model.d.ts +8 -0
- package/components/custom-select-list-item/custom-select-list-item.d.ts +48 -0
- package/components/custom-select-list-item/index.d.ts +1 -0
- package/components/custom-select-list-item/model.d.ts +29 -0
- package/components/input/input.d.ts +2 -1
- package/components/page/model.d.ts +4 -0
- package/components/page/page.d.ts +2 -1
- package/components/select/model.d.ts +3 -3
- package/components/select/select.d.ts +2 -1
- package/components/tag/model.d.ts +3 -3
- package/components/tag/tag.d.ts +2 -1
- package/esm2022/components/accordion/model.mjs +1 -1
- package/esm2022/components/badge/model.mjs +1 -1
- package/esm2022/components/button/model.mjs +1 -1
- package/esm2022/components/card/model.mjs +1 -1
- package/esm2022/components/checkbox/checkbox.mjs +5 -5
- package/esm2022/components/custom-select/custom-select.mjs +1080 -0
- package/esm2022/components/custom-select/index.mjs +2 -0
- package/esm2022/components/custom-select/model.mjs +2 -0
- package/esm2022/components/custom-select-dropdown/custom-select-dropdown.mjs +88 -0
- package/esm2022/components/custom-select-dropdown/index.mjs +2 -0
- package/esm2022/components/custom-select-dropdown/model.mjs +2 -0
- package/esm2022/components/custom-select-form-field/custom-select-form-field.mjs +81 -0
- package/esm2022/components/custom-select-form-field/index.mjs +2 -0
- package/esm2022/components/custom-select-form-field/model.mjs +2 -0
- package/esm2022/components/custom-select-list/custom-select-list.mjs +93 -0
- package/esm2022/components/custom-select-list/index.mjs +2 -0
- package/esm2022/components/custom-select-list/model.mjs +2 -0
- package/esm2022/components/custom-select-list-item/custom-select-list-item.mjs +219 -0
- package/esm2022/components/custom-select-list-item/index.mjs +2 -0
- package/esm2022/components/custom-select-list-item/model.mjs +2 -0
- package/esm2022/components/divider/model.mjs +1 -1
- package/esm2022/components/drawer/model.mjs +1 -1
- package/esm2022/components/icon/model.mjs +1 -1
- package/esm2022/components/input/input.mjs +10 -8
- package/esm2022/components/input/model.mjs +1 -1
- package/esm2022/components/link/model.mjs +1 -1
- package/esm2022/components/navigation-item/model.mjs +1 -1
- package/esm2022/components/notification/model.mjs +1 -1
- package/esm2022/components/page/model.mjs +1 -1
- package/esm2022/components/page/page.mjs +6 -4
- package/esm2022/components/select/model.mjs +1 -1
- package/esm2022/components/select/select.mjs +11 -7
- package/esm2022/components/stack/model.mjs +1 -1
- package/esm2022/components/tabs/model.mjs +1 -1
- package/esm2022/components/tag/model.mjs +1 -1
- package/esm2022/components/tag/tag.mjs +7 -6
- package/esm2022/components/textarea/model.mjs +1 -1
- package/esm2022/components/textarea/textarea.mjs +5 -5
- package/esm2022/index.mjs +6 -1
- package/esm2022/shared/constants.mjs +7 -2
- package/esm2022/shared/model.mjs +4 -2
- package/esm2022/utils/index.mjs +3 -1
- package/esm2022/utils/navigation.mjs +1 -1
- package/fesm2022/db-ux-ngx-core-components.mjs +1606 -63
- package/fesm2022/db-ux-ngx-core-components.mjs.map +1 -1
- package/index.d.ts +5 -0
- package/package.json +4 -4
- package/shared/constants.d.ts +5 -0
- package/shared/model.d.ts +36 -19
- package/utils/index.d.ts +2 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
An Angular library containing all styles & components of [DB UX Design System (technical components)](https://github.com/db-ux-design-system/core-web).
|
|
9
9
|
|
|
10
|
-
> **Note:** Find more information about specific components [here](https://
|
|
10
|
+
> **Note:** Find more information about specific components [here](https://design-system.deutschebahn.com/core-web/review/main)
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
@@ -115,7 +115,7 @@ There are 3 ways to use Events in Angular:
|
|
|
115
115
|
|
|
116
116
|
## Deutsche Bahn brand
|
|
117
117
|
|
|
118
|
-
As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even
|
|
118
|
+
As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even if being used with the code that we're providing with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UX Design System products free to use and release it under the Apache 2.0 license.
|
|
119
119
|
Please have a look at our brand portal at <https://marketingportal.extranet.deutschebahn.com/> for any further questions and whom to contact on any brand issues.
|
|
120
120
|
|
|
121
121
|
For any usage outside of Deutsche Bahn websites and applications you aren't allowed to use any Deutsche Bahn brand and
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, SimpleChanges, Renderer2 } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { DBCustomSelectProps, DBCustomSelectState, CustomSelectOptionType } from "./model";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DBCustomSelect implements ControlValueAccessor {
|
|
6
|
+
private renderer;
|
|
7
|
+
constructor(renderer: Renderer2);
|
|
8
|
+
cls: (...args: import("../../utils").ClassNameArg[]) => string;
|
|
9
|
+
getBooleanAsString: (originBool?: boolean | undefined) => any;
|
|
10
|
+
getHideProp: (show?: boolean | undefined) => any;
|
|
11
|
+
DEFAULT_CLOSE_BUTTON: string;
|
|
12
|
+
DEFAULT_INVALID_MESSAGE: string;
|
|
13
|
+
DEFAULT_LABEL: string;
|
|
14
|
+
DEFAULT_MESSAGE: string;
|
|
15
|
+
DEFAULT_VALID_MESSAGE: string;
|
|
16
|
+
id: DBCustomSelectProps["id"];
|
|
17
|
+
name: DBCustomSelectProps["name"];
|
|
18
|
+
message: DBCustomSelectProps["message"];
|
|
19
|
+
showMessage: DBCustomSelectProps["showMessage"];
|
|
20
|
+
showNoResults: DBCustomSelectProps["showNoResults"];
|
|
21
|
+
multiple: DBCustomSelectProps["multiple"];
|
|
22
|
+
showSelectAll: DBCustomSelectProps["showSelectAll"];
|
|
23
|
+
showSearch: DBCustomSelectProps["showSearch"];
|
|
24
|
+
values: DBCustomSelectProps["values"];
|
|
25
|
+
validation: DBCustomSelectProps["validation"];
|
|
26
|
+
invalidMessage: DBCustomSelectProps["invalidMessage"];
|
|
27
|
+
required: DBCustomSelectProps["required"];
|
|
28
|
+
validMessage: DBCustomSelectProps["validMessage"];
|
|
29
|
+
options: DBCustomSelectProps["options"];
|
|
30
|
+
selectedType: DBCustomSelectProps["selectedType"];
|
|
31
|
+
amountText: DBCustomSelectProps["amountText"];
|
|
32
|
+
selectAllLabel: DBCustomSelectProps["selectAllLabel"];
|
|
33
|
+
deSelectAllLabel: DBCustomSelectProps["deSelectAllLabel"];
|
|
34
|
+
removeTagsTexts: DBCustomSelectProps["removeTagsTexts"];
|
|
35
|
+
className: DBCustomSelectProps["className"];
|
|
36
|
+
width: DBCustomSelectProps["width"];
|
|
37
|
+
variant: DBCustomSelectProps["variant"];
|
|
38
|
+
placement: DBCustomSelectProps["placement"];
|
|
39
|
+
showLabel: DBCustomSelectProps["showLabel"];
|
|
40
|
+
icon: DBCustomSelectProps["icon"];
|
|
41
|
+
showIcon: DBCustomSelectProps["showIcon"];
|
|
42
|
+
label: DBCustomSelectProps["label"];
|
|
43
|
+
form: DBCustomSelectProps["form"];
|
|
44
|
+
disabled: DBCustomSelectProps["disabled"];
|
|
45
|
+
open: DBCustomSelectProps["open"];
|
|
46
|
+
dropdownWidth: DBCustomSelectProps["dropdownWidth"];
|
|
47
|
+
searchLabel: DBCustomSelectProps["searchLabel"];
|
|
48
|
+
searchPlaceholder: DBCustomSelectProps["searchPlaceholder"];
|
|
49
|
+
showLoading: DBCustomSelectProps["showLoading"];
|
|
50
|
+
noResultsText: DBCustomSelectProps["noResultsText"];
|
|
51
|
+
loadingText: DBCustomSelectProps["loadingText"];
|
|
52
|
+
mobileCloseButtonText: DBCustomSelectProps["mobileCloseButtonText"];
|
|
53
|
+
showClearSelection: DBCustomSelectProps["showClearSelection"];
|
|
54
|
+
clearSelectionLabel: DBCustomSelectProps["clearSelectionLabel"];
|
|
55
|
+
placeholder: DBCustomSelectProps["placeholder"];
|
|
56
|
+
messageIcon: DBCustomSelectProps["messageIcon"];
|
|
57
|
+
onDropdownToggle: EventEmitter<any>;
|
|
58
|
+
onSelect: EventEmitter<any>;
|
|
59
|
+
onAmountChange: EventEmitter<any>;
|
|
60
|
+
_ref: ElementRef | undefined;
|
|
61
|
+
selectRef: ElementRef | undefined;
|
|
62
|
+
detailsRef: ElementRef | undefined;
|
|
63
|
+
selectAllRef: ElementRef | undefined;
|
|
64
|
+
_name: DBCustomSelectState["_name"];
|
|
65
|
+
_id: DBCustomSelectState["_id"];
|
|
66
|
+
_messageId: DBCustomSelectState["_messageId"];
|
|
67
|
+
_validMessageId: DBCustomSelectState["_validMessageId"];
|
|
68
|
+
_invalidMessageId: DBCustomSelectState["_invalidMessageId"];
|
|
69
|
+
_selectId: DBCustomSelectState["_selectId"];
|
|
70
|
+
_labelId: DBCustomSelectState["_labelId"];
|
|
71
|
+
_summaryId: DBCustomSelectState["_summaryId"];
|
|
72
|
+
_placeholderId: DBCustomSelectState["_placeholderId"];
|
|
73
|
+
_infoTextId: DBCustomSelectState["_infoTextId"];
|
|
74
|
+
_validity: DBCustomSelectState["_validity"];
|
|
75
|
+
_descByIds: DBCustomSelectState["_descByIds"];
|
|
76
|
+
_selectedLabels: DBCustomSelectState["_selectedLabels"];
|
|
77
|
+
_selectedLabelsId: DBCustomSelectState["_selectedLabelsId"];
|
|
78
|
+
_voiceOverFallback: DBCustomSelectState["_voiceOverFallback"];
|
|
79
|
+
_selectedOptions: DBCustomSelectState["_selectedOptions"];
|
|
80
|
+
selectAllEnabled: DBCustomSelectState["selectAllEnabled"];
|
|
81
|
+
searchEnabled: DBCustomSelectState["searchEnabled"];
|
|
82
|
+
amountOptions: DBCustomSelectState["amountOptions"];
|
|
83
|
+
_values: DBCustomSelectState["_values"];
|
|
84
|
+
_options: DBCustomSelectState["_options"];
|
|
85
|
+
_hasNoOptions: DBCustomSelectState["_hasNoOptions"];
|
|
86
|
+
_internalChangeTimestamp: DBCustomSelectState["_internalChangeTimestamp"];
|
|
87
|
+
_externalChangeTimestamp: DBCustomSelectState["_externalChangeTimestamp"];
|
|
88
|
+
handleDropdownToggle(event: any): ReturnType<DBCustomSelectState["handleDropdownToggle"]>;
|
|
89
|
+
getNativeSelectValue(): ReturnType<DBCustomSelectState["getNativeSelectValue"]>;
|
|
90
|
+
setDescById(descId?: string): ReturnType<DBCustomSelectState["setDescById"]>;
|
|
91
|
+
getSelectAllLabel(): ReturnType<DBCustomSelectState["getSelectAllLabel"]>;
|
|
92
|
+
getOptionLabel(option: CustomSelectOptionType): ReturnType<DBCustomSelectState["getOptionLabel"]>;
|
|
93
|
+
getOptionChecked(value?: string): ReturnType<DBCustomSelectState["getOptionChecked"]>;
|
|
94
|
+
getOptionKey(option: CustomSelectOptionType): ReturnType<DBCustomSelectState["getOptionKey"]>;
|
|
95
|
+
getTagRemoveLabel(index: number): ReturnType<DBCustomSelectState["getTagRemoveLabel"]>;
|
|
96
|
+
handleTagRemove(option: CustomSelectOptionType, event: any): ReturnType<DBCustomSelectState["handleTagRemove"]>;
|
|
97
|
+
handleAutoPlacement(): ReturnType<DBCustomSelectState["handleAutoPlacement"]>;
|
|
98
|
+
handleArrowDownUp(event: any): ReturnType<DBCustomSelectState["handleArrowDownUp"]>;
|
|
99
|
+
handleKeyboardPress(event: any): ReturnType<DBCustomSelectState["handleKeyboardPress"]>;
|
|
100
|
+
handleClose(event: any): ReturnType<DBCustomSelectState["handleClose"]>;
|
|
101
|
+
handleDocumentClose(event: any): ReturnType<DBCustomSelectState["handleDocumentClose"]>;
|
|
102
|
+
handleSelect(value?: string): ReturnType<DBCustomSelectState["handleSelect"]>;
|
|
103
|
+
handleSelectAll(): ReturnType<DBCustomSelectState["handleSelectAll"]>;
|
|
104
|
+
handleFocusFirstDropdownCheckbox(activeElement?: Element): ReturnType<DBCustomSelectState["handleFocusFirstDropdownCheckbox"]>;
|
|
105
|
+
handleOpenByKeyboardFocus(onlySearch?: boolean): ReturnType<DBCustomSelectState["handleOpenByKeyboardFocus"]>;
|
|
106
|
+
handleSearch(event: any): ReturnType<DBCustomSelectState["handleSearch"]>;
|
|
107
|
+
handleClearAll(): ReturnType<DBCustomSelectState["handleClearAll"]>;
|
|
108
|
+
handleSummaryFocus(): ReturnType<DBCustomSelectState["handleSummaryFocus"]>;
|
|
109
|
+
selectAllChecked: DBCustomSelectState["selectAllChecked"];
|
|
110
|
+
selectAllIndeterminate: DBCustomSelectState["selectAllIndeterminate"];
|
|
111
|
+
trackByOption0(_: any, option: any): undefined;
|
|
112
|
+
trackByOption1(index: any, option: any): undefined;
|
|
113
|
+
trackByOption2(_: any, option: any): undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
116
|
+
* @param element the ref for the component
|
|
117
|
+
* @param customElementSelector the custom element like `my-component`
|
|
118
|
+
*/
|
|
119
|
+
private enableAttributePassing;
|
|
120
|
+
writeValue(value: any): void;
|
|
121
|
+
propagateChange(_: any): void;
|
|
122
|
+
registerOnChange(onChange: any): void;
|
|
123
|
+
registerOnTouched(onTouched: any): void;
|
|
124
|
+
setDisabledState(disabled: boolean): void;
|
|
125
|
+
ngOnInit(): void;
|
|
126
|
+
ngAfterViewInit(): void;
|
|
127
|
+
ngAfterContentChecked(changes: SimpleChanges): void;
|
|
128
|
+
ngOnDestroy(): void;
|
|
129
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DBCustomSelect, never>;
|
|
130
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBCustomSelect, "db-custom-select", never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "message": { "alias": "message"; "required": false; }; "showMessage": { "alias": "showMessage"; "required": false; }; "showNoResults": { "alias": "showNoResults"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "showSelectAll": { "alias": "showSelectAll"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "values": { "alias": "values"; "required": false; }; "validation": { "alias": "validation"; "required": false; }; "invalidMessage": { "alias": "invalidMessage"; "required": false; }; "required": { "alias": "required"; "required": false; }; "validMessage": { "alias": "validMessage"; "required": false; }; "options": { "alias": "options"; "required": false; }; "selectedType": { "alias": "selectedType"; "required": false; }; "amountText": { "alias": "amountText"; "required": false; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; }; "deSelectAllLabel": { "alias": "deSelectAllLabel"; "required": false; }; "removeTagsTexts": { "alias": "removeTagsTexts"; "required": false; }; "className": { "alias": "className"; "required": false; }; "width": { "alias": "width"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "form": { "alias": "form"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "open": { "alias": "open"; "required": false; }; "dropdownWidth": { "alias": "dropdownWidth"; "required": false; }; "searchLabel": { "alias": "searchLabel"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "showLoading": { "alias": "showLoading"; "required": false; }; "noResultsText": { "alias": "noResultsText"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "mobileCloseButtonText": { "alias": "mobileCloseButtonText"; "required": false; }; "showClearSelection": { "alias": "showClearSelection"; "required": false; }; "clearSelectionLabel": { "alias": "clearSelectionLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "messageIcon": { "alias": "messageIcon"; "required": false; }; }, { "onDropdownToggle": "onDropdownToggle"; "onSelect": "onSelect"; "onAmountChange": "onAmountChange"; }, never, ["*"], true, never>;
|
|
131
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DBCustomSelect } from './custom-select';
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { BaseFormProps, CloseEventState, CustomFormProps, FormMessageProps, FormState, GlobalProps, GlobalState, IconProps, PlacementVerticalType, PopoverState, RequiredProps, ShowIconProps, ShowLabelProps, ValidationType, WidthProps } from '../../shared/model';
|
|
2
|
+
import { DBCustomSelectFormFieldDefaultProps } from '../custom-select-form-field/model';
|
|
3
|
+
import { CustomSelectDropdownWidthType } from '../custom-select-dropdown/model';
|
|
4
|
+
import { DBCustomSelectListItemExtraProps } from '../custom-select-list-item/model';
|
|
5
|
+
export type CustomSelectOptionType = {
|
|
6
|
+
/**
|
|
7
|
+
* Disables this option
|
|
8
|
+
*/
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Identifier for option
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* If the value is different from the label you want to show to the user.
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The value for the option
|
|
20
|
+
*/
|
|
21
|
+
value?: string;
|
|
22
|
+
} & DBCustomSelectListItemExtraProps;
|
|
23
|
+
export declare const SelectedTypeList: readonly ["amount", "text", "tag"];
|
|
24
|
+
export type SelectedTypeType = (typeof SelectedTypeList)[number];
|
|
25
|
+
export type DBCustomSelectDefaultProps = {
|
|
26
|
+
/**
|
|
27
|
+
* Optional: if select-type="amount" change the shown text
|
|
28
|
+
*/
|
|
29
|
+
amountText?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Label for the clear selection button
|
|
32
|
+
*/
|
|
33
|
+
clearSelectionLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Deselect all checkbox label
|
|
36
|
+
*/
|
|
37
|
+
deSelectAllLabel?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Changes the behavior of the dropdown with.
|
|
40
|
+
* Default: fixed 328px
|
|
41
|
+
* Auto: Based on the size of the form-field
|
|
42
|
+
*/
|
|
43
|
+
dropdownWidth?: CustomSelectDropdownWidthType | 'string';
|
|
44
|
+
/**
|
|
45
|
+
* Dropdown - hint if data has to be loaded
|
|
46
|
+
*/
|
|
47
|
+
loadingText?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Change the button text for mobile close
|
|
50
|
+
*/
|
|
51
|
+
mobileCloseButtonText?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Enables CustomSelect
|
|
54
|
+
*/
|
|
55
|
+
multiple?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Dropdown - hint if there are no options
|
|
58
|
+
*/
|
|
59
|
+
noResultsText?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional: if select-type="amount" when amount changes
|
|
62
|
+
* @param amount The amount of selected checkboxes
|
|
63
|
+
*/
|
|
64
|
+
onAmountChange?: (amount: number) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Triggers after some checkbox was clicked in dropdown
|
|
67
|
+
* @param values the changed values
|
|
68
|
+
*/
|
|
69
|
+
onSelect?: (values: string[]) => void;
|
|
70
|
+
/**
|
|
71
|
+
* You should pass in the options as an array.
|
|
72
|
+
*/
|
|
73
|
+
options?: CustomSelectOptionType[];
|
|
74
|
+
/**
|
|
75
|
+
* The `placement` attributes values change the position to absolute and adds a transform based on the placement.
|
|
76
|
+
*/
|
|
77
|
+
placement?: PlacementVerticalType;
|
|
78
|
+
/**
|
|
79
|
+
* Optional: if you use selectedType=tag and options, you need to set the removeTagsTexts for screen reader users
|
|
80
|
+
*/
|
|
81
|
+
removeTagsTexts?: string[];
|
|
82
|
+
/**
|
|
83
|
+
* Search label
|
|
84
|
+
*/
|
|
85
|
+
searchLabel?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Search placeholder
|
|
88
|
+
*/
|
|
89
|
+
searchPlaceholder?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Select all checkbox label
|
|
92
|
+
*/
|
|
93
|
+
selectAllLabel?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Change the selected type for values shown in multi select
|
|
96
|
+
*/
|
|
97
|
+
selectedType?: SelectedTypeType;
|
|
98
|
+
/**
|
|
99
|
+
* Show clear selection button (default:true). Hide it if you have very small inputs e.g. in tables.
|
|
100
|
+
*/
|
|
101
|
+
showClearSelection?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Dropdown - enable loading infotext and spinner
|
|
104
|
+
*/
|
|
105
|
+
showLoading?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Dropdown - enable no options infotext
|
|
108
|
+
*/
|
|
109
|
+
showNoResults?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Forces search in header.
|
|
112
|
+
*/
|
|
113
|
+
showSearch?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Forces select all checkbox (only for multiple).
|
|
116
|
+
*/
|
|
117
|
+
showSelectAll?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Initial value for multi select
|
|
120
|
+
*/
|
|
121
|
+
values?: string[];
|
|
122
|
+
/**
|
|
123
|
+
* Programmatically open the dropdown. May differ if you don't use onDropdownToggle.
|
|
124
|
+
*/
|
|
125
|
+
open?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Informs the user when dropdown was toggled.
|
|
128
|
+
*/
|
|
129
|
+
onDropdownToggle?: (event: any) => void;
|
|
130
|
+
};
|
|
131
|
+
export type DBCustomSelectProps = GlobalProps & CustomFormProps & BaseFormProps & RequiredProps & FormMessageProps & DBCustomSelectDefaultProps & DBCustomSelectFormFieldDefaultProps & WidthProps & IconProps & ShowIconProps & ShowLabelProps;
|
|
132
|
+
export type DBCustomSelectDefaultState = {
|
|
133
|
+
_validity?: ValidationType;
|
|
134
|
+
_values?: string[];
|
|
135
|
+
_options?: CustomSelectOptionType[];
|
|
136
|
+
_selectedOptions?: CustomSelectOptionType[];
|
|
137
|
+
_hasNoOptions: boolean;
|
|
138
|
+
_selectId?: string;
|
|
139
|
+
_labelId?: string;
|
|
140
|
+
_summaryId?: string;
|
|
141
|
+
_placeholderId?: string;
|
|
142
|
+
_selectedLabels?: string;
|
|
143
|
+
_selectedLabelsId?: string;
|
|
144
|
+
_infoTextId?: string;
|
|
145
|
+
_externalChangeTimestamp?: number;
|
|
146
|
+
_internalChangeTimestamp?: number;
|
|
147
|
+
_name?: string;
|
|
148
|
+
getNativeSelectValue: () => string;
|
|
149
|
+
getOptionLabel: (option: CustomSelectOptionType) => string;
|
|
150
|
+
getOptionChecked: (value?: string) => boolean;
|
|
151
|
+
getOptionKey: (option: CustomSelectOptionType) => string;
|
|
152
|
+
getTagRemoveLabel: (index: number) => string;
|
|
153
|
+
selectAllEnabled: boolean;
|
|
154
|
+
searchEnabled: boolean;
|
|
155
|
+
amountOptions: number;
|
|
156
|
+
setDescById: (descId?: string) => void;
|
|
157
|
+
handleTagRemove: (option: CustomSelectOptionType, event?: any) => void;
|
|
158
|
+
handleSummaryFocus: () => void;
|
|
159
|
+
handleSelect: (value?: string) => void;
|
|
160
|
+
handleSelectAll: () => void;
|
|
161
|
+
handleClearAll: () => void;
|
|
162
|
+
handleDropdownToggle: (event: any) => void;
|
|
163
|
+
handleDocumentClose: (event: any) => void;
|
|
164
|
+
handleOpenByKeyboardFocus: (onlySearch?: boolean) => void;
|
|
165
|
+
handleFocusFirstDropdownCheckbox: (activeElement?: Element) => void;
|
|
166
|
+
handleKeyboardPress: (event: any) => void;
|
|
167
|
+
handleArrowDownUp: (event: any) => void;
|
|
168
|
+
handleSearch: (event: any) => void;
|
|
169
|
+
getSelectAllLabel: () => string;
|
|
170
|
+
selectAllChecked: boolean;
|
|
171
|
+
selectAllIndeterminate: boolean;
|
|
172
|
+
};
|
|
173
|
+
export type DBCustomSelectState = DBCustomSelectDefaultState & GlobalState & FormState & CloseEventState & PopoverState;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { DBCustomSelectDropdownProps } from "./model";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DBCustomSelectDropdown {
|
|
5
|
+
cls: (...args: import("../../utils").ClassNameArg[]) => string;
|
|
6
|
+
id: DBCustomSelectDropdownProps["id"];
|
|
7
|
+
className: DBCustomSelectDropdownProps["className"];
|
|
8
|
+
width: DBCustomSelectDropdownProps["width"];
|
|
9
|
+
_ref: ElementRef | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
12
|
+
* @param element the ref for the component
|
|
13
|
+
* @param customElementSelector the custom element like `my-component`
|
|
14
|
+
*/
|
|
15
|
+
private enableAttributePassing;
|
|
16
|
+
ngAfterViewInit(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DBCustomSelectDropdown, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBCustomSelectDropdown, "db-custom-select-dropdown", never, { "id": { "alias": "id"; "required": false; }; "className": { "alias": "className"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DBCustomSelectDropdown } from './custom-select-dropdown';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
|
+
export declare const CustomSelectDropdownWidthList: readonly ["fixed", "auto", "full"];
|
|
3
|
+
export type CustomSelectDropdownWidthType = (typeof CustomSelectDropdownWidthList)[number];
|
|
4
|
+
export type DBCustomSelectDropdownDefaultProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Changes the behavior of the dropdown with.
|
|
7
|
+
* Default: fixed 328px
|
|
8
|
+
* Full: Based on the size of the form-field
|
|
9
|
+
* Auto: Based on the size of the largest list item
|
|
10
|
+
*/
|
|
11
|
+
width?: CustomSelectDropdownWidthType | string;
|
|
12
|
+
};
|
|
13
|
+
export type DBCustomSelectDropdownProps = DBCustomSelectDropdownDefaultProps & GlobalProps;
|
|
14
|
+
export type DBCustomSelectDropdownDefaultState = {};
|
|
15
|
+
export type DBCustomSelectDropdownState = DBCustomSelectDropdownDefaultState & GlobalState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { DBCustomSelectFormFieldProps } from "./model";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DBCustomSelectFormField {
|
|
5
|
+
cls: (...args: import("../../utils").ClassNameArg[]) => string;
|
|
6
|
+
id: DBCustomSelectFormFieldProps["id"];
|
|
7
|
+
className: DBCustomSelectFormFieldProps["className"];
|
|
8
|
+
_ref: ElementRef | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
11
|
+
* @param element the ref for the component
|
|
12
|
+
* @param customElementSelector the custom element like `my-component`
|
|
13
|
+
*/
|
|
14
|
+
private enableAttributePassing;
|
|
15
|
+
ngAfterViewInit(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DBCustomSelectFormField, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBCustomSelectFormField, "db-custom-select-form-field", never, { "id": { "alias": "id"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DBCustomSelectFormField } from './custom-select-form-field';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
|
+
export type DBCustomSelectFormFieldDefaultProps = {};
|
|
3
|
+
export type DBCustomSelectFormFieldProps = DBCustomSelectFormFieldDefaultProps & GlobalProps;
|
|
4
|
+
export type DBCustomSelectFormFieldDefaultState = {};
|
|
5
|
+
export type DBCustomSelectFormFieldState = DBCustomSelectFormFieldDefaultState & GlobalState;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { DBCustomSelectListProps } from "./model";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DBCustomSelectList {
|
|
5
|
+
cls: (...args: import("../../utils").ClassNameArg[]) => string;
|
|
6
|
+
multiple: DBCustomSelectListProps["multiple"];
|
|
7
|
+
label: DBCustomSelectListProps["label"];
|
|
8
|
+
id: DBCustomSelectListProps["id"];
|
|
9
|
+
className: DBCustomSelectListProps["className"];
|
|
10
|
+
_ref: ElementRef | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
13
|
+
* @param element the ref for the component
|
|
14
|
+
* @param customElementSelector the custom element like `my-component`
|
|
15
|
+
*/
|
|
16
|
+
private enableAttributePassing;
|
|
17
|
+
ngAfterViewInit(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DBCustomSelectList, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBCustomSelectList, "db-custom-select-list", never, { "multiple": { "alias": "multiple"; "required": false; }; "label": { "alias": "label"; "required": false; }; "id": { "alias": "id"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DBCustomSelectList } from './custom-select-list';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
|
+
export type DBCustomSelectListDefaultProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
multiple?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type DBCustomSelectListProps = DBCustomSelectListDefaultProps & GlobalProps;
|
|
7
|
+
export type DBCustomSelectListDefaultState = {};
|
|
8
|
+
export type DBCustomSelectListState = DBCustomSelectListDefaultState & GlobalState;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, SimpleChanges, Renderer2 } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { DBCustomSelectListItemProps, DBCustomSelectListItemState } from "./model";
|
|
4
|
+
import { ChangeEvent } from "../../shared/model";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DBCustomSelectListItem implements ControlValueAccessor {
|
|
7
|
+
private renderer;
|
|
8
|
+
constructor(renderer: Renderer2);
|
|
9
|
+
cls: (...args: import("../../utils").ClassNameArg[]) => string;
|
|
10
|
+
getBooleanAsString: (originBool?: boolean | undefined) => any;
|
|
11
|
+
getHideProp: (show?: boolean | undefined) => any;
|
|
12
|
+
id: DBCustomSelectListItemProps["id"];
|
|
13
|
+
isGroupTitle: DBCustomSelectListItemProps["isGroupTitle"];
|
|
14
|
+
showDivider: DBCustomSelectListItemProps["showDivider"];
|
|
15
|
+
type: DBCustomSelectListItemProps["type"];
|
|
16
|
+
checked: DBCustomSelectListItemProps["checked"];
|
|
17
|
+
className: DBCustomSelectListItemProps["className"];
|
|
18
|
+
groupTitle: DBCustomSelectListItemProps["groupTitle"];
|
|
19
|
+
icon: DBCustomSelectListItemProps["icon"];
|
|
20
|
+
showIcon: DBCustomSelectListItemProps["showIcon"];
|
|
21
|
+
name: DBCustomSelectListItemProps["name"];
|
|
22
|
+
disabled: DBCustomSelectListItemProps["disabled"];
|
|
23
|
+
value: DBCustomSelectListItemProps["value"];
|
|
24
|
+
label: DBCustomSelectListItemProps["label"];
|
|
25
|
+
onChange: EventEmitter<any>;
|
|
26
|
+
change: EventEmitter<any>;
|
|
27
|
+
_ref: ElementRef | undefined;
|
|
28
|
+
_id: DBCustomSelectListItemState["_id"];
|
|
29
|
+
hasDivider: DBCustomSelectListItemState["hasDivider"];
|
|
30
|
+
handleChange(event: ChangeEvent<HTMLInputElement>): ReturnType<DBCustomSelectListItemState["handleChange"]>;
|
|
31
|
+
getIconAfter(): ReturnType<DBCustomSelectListItemState["getIconAfter"]>;
|
|
32
|
+
/**
|
|
33
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
34
|
+
* @param element the ref for the component
|
|
35
|
+
* @param customElementSelector the custom element like `my-component`
|
|
36
|
+
*/
|
|
37
|
+
private enableAttributePassing;
|
|
38
|
+
writeValue(value: any): void;
|
|
39
|
+
propagateChange(_: any): void;
|
|
40
|
+
registerOnChange(onChange: any): void;
|
|
41
|
+
registerOnTouched(onTouched: any): void;
|
|
42
|
+
setDisabledState(disabled: boolean): void;
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
ngAfterViewInit(): void;
|
|
45
|
+
ngAfterContentChecked(changes: SimpleChanges): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DBCustomSelectListItem, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBCustomSelectListItem, "db-custom-select-list-item", never, { "id": { "alias": "id"; "required": false; }; "isGroupTitle": { "alias": "isGroupTitle"; "required": false; }; "showDivider": { "alias": "showDivider"; "required": false; }; "type": { "alias": "type"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "className": { "alias": "className"; "required": false; }; "groupTitle": { "alias": "groupTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, { "onChange": "onChange"; "change": "change"; }, never, ["*"], true, never>;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DBCustomSelectListItem } from './custom-select-list-item';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseFormProps, ChangeEventProps, ChangeEventState, FormCheckProps, GlobalProps, GlobalState, IconProps, ShowIconProps, ValueProps } from '../../shared/model';
|
|
2
|
+
export declare const CustomSelectListItemTypeList: readonly ["checkbox", "radio"];
|
|
3
|
+
export type CustomSelectListItemTypeType = (typeof CustomSelectListItemTypeList)[number];
|
|
4
|
+
export type DBCustomSelectListItemExtraProps = {
|
|
5
|
+
/**
|
|
6
|
+
* If the item is a group title (only text)
|
|
7
|
+
*/
|
|
8
|
+
isGroupTitle?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Show a divider on the bottom of the list item for visual grouping (don't use it on every item)
|
|
11
|
+
*/
|
|
12
|
+
showDivider?: boolean;
|
|
13
|
+
} & IconProps & ShowIconProps;
|
|
14
|
+
export type DBCustomSelectListItemDefaultProps = {
|
|
15
|
+
/**
|
|
16
|
+
* Set the title of a group of items - disables radio/checkbox behavior
|
|
17
|
+
*/
|
|
18
|
+
groupTitle?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Change the behavior of the item single(radio) or multiple(checkbox)
|
|
21
|
+
*/
|
|
22
|
+
type?: CustomSelectListItemTypeType;
|
|
23
|
+
};
|
|
24
|
+
export type DBCustomSelectListItemProps = DBCustomSelectListItemDefaultProps & GlobalProps & BaseFormProps & ValueProps & FormCheckProps & ChangeEventProps<HTMLInputElement> & DBCustomSelectListItemExtraProps;
|
|
25
|
+
export type DBCustomSelectListItemDefaultState = {
|
|
26
|
+
getIconAfter: () => string | undefined;
|
|
27
|
+
hasDivider?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type DBCustomSelectListItemState = DBCustomSelectListItemDefaultState & ChangeEventState<HTMLInputElement> & GlobalState;
|
|
@@ -45,6 +45,7 @@ export declare class DBInput implements ControlValueAccessor {
|
|
|
45
45
|
autocomplete: DBInputProps["autocomplete"];
|
|
46
46
|
autofocus: DBInputProps["autofocus"];
|
|
47
47
|
dataList: DBInputProps["dataList"];
|
|
48
|
+
ariaDescribedBy: DBInputProps["ariaDescribedBy"];
|
|
48
49
|
messageIcon: DBInputProps["messageIcon"];
|
|
49
50
|
onInput: EventEmitter<any>;
|
|
50
51
|
input: EventEmitter<any>;
|
|
@@ -84,5 +85,5 @@ export declare class DBInput implements ControlValueAccessor {
|
|
|
84
85
|
ngAfterViewInit(): void;
|
|
85
86
|
ngAfterContentChecked(changes: SimpleChanges): void;
|
|
86
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<DBInput, never>;
|
|
87
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DBInput, "db-input", never, { "id": { "alias": "id"; "required": false; }; "dataListId": { "alias": "dataListId"; "required": false; }; "message": { "alias": "message"; "required": false; }; "showMessage": { "alias": "showMessage"; "required": false; }; "value": { "alias": "value"; "required": false; }; "validation": { "alias": "validation"; "required": false; }; "invalidMessage": { "alias": "invalidMessage"; "required": false; }; "required": { "alias": "required"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "validMessage": { "alias": "validMessage"; "required": false; }; "className": { "alias": "className"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconAfter": { "alias": "iconAfter"; "required": false; }; "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "step": { "alias": "step"; "required": false; }; "max": { "alias": "max"; "required": false; }; "min": { "alias": "min"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "form": { "alias": "form"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "dataList": { "alias": "dataList"; "required": false; }; "messageIcon": { "alias": "messageIcon"; "required": false; }; }, { "onInput": "onInput"; "input": "input"; "onChange": "onChange"; "change": "change"; "onBlur": "onBlur"; "blur": "blur"; "onFocus": "onFocus"; "focus": "focus"; }, never, ["*"], true, never>;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBInput, "db-input", never, { "id": { "alias": "id"; "required": false; }; "dataListId": { "alias": "dataListId"; "required": false; }; "message": { "alias": "message"; "required": false; }; "showMessage": { "alias": "showMessage"; "required": false; }; "value": { "alias": "value"; "required": false; }; "validation": { "alias": "validation"; "required": false; }; "invalidMessage": { "alias": "invalidMessage"; "required": false; }; "required": { "alias": "required"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "validMessage": { "alias": "validMessage"; "required": false; }; "className": { "alias": "className"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconAfter": { "alias": "iconAfter"; "required": false; }; "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "step": { "alias": "step"; "required": false; }; "max": { "alias": "max"; "required": false; }; "min": { "alias": "min"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "form": { "alias": "form"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "dataList": { "alias": "dataList"; "required": false; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; }; "messageIcon": { "alias": "messageIcon"; "required": false; }; }, { "onInput": "onInput"; "input": "input"; "onChange": "onChange"; "change": "change"; "onBlur": "onBlur"; "blur": "blur"; "onFocus": "onFocus"; "focus": "focus"; }, never, ["*"], true, never>;
|
|
88
89
|
}
|
|
@@ -20,6 +20,10 @@ export type DBPageDefaultProps = {
|
|
|
20
20
|
* The slot can be used for React to set a header.
|
|
21
21
|
*/
|
|
22
22
|
header?: any;
|
|
23
|
+
/**
|
|
24
|
+
* Adds `class` to `<main>` element
|
|
25
|
+
*/
|
|
26
|
+
mainClass?: string;
|
|
23
27
|
/**
|
|
24
28
|
* The variant=fixed uses flex-box to make header and footer static
|
|
25
29
|
*/
|
|
@@ -9,6 +9,7 @@ export declare class DBPage {
|
|
|
9
9
|
variant: DBPageProps["variant"];
|
|
10
10
|
id: DBPageProps["id"];
|
|
11
11
|
className: DBPageProps["className"];
|
|
12
|
+
mainClass: DBPageProps["mainClass"];
|
|
12
13
|
_ref: ElementRef | undefined;
|
|
13
14
|
fontsLoaded: DBPageState["fontsLoaded"];
|
|
14
15
|
/**
|
|
@@ -21,5 +22,5 @@ export declare class DBPage {
|
|
|
21
22
|
ngAfterViewInit(): void;
|
|
22
23
|
ngOnDestroy(): void;
|
|
23
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<DBPage, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DBPage, "db-page", never, { "fadeIn": { "alias": "fadeIn"; "required": false; }; "documentOverflow": { "alias": "documentOverflow"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "id": { "alias": "id"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, ["[header]", "*", "[footer]"], true, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBPage, "db-page", never, { "fadeIn": { "alias": "fadeIn"; "required": false; }; "documentOverflow": { "alias": "documentOverflow"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "id": { "alias": "id"; "required": false; }; "className": { "alias": "className"; "required": false; }; "mainClass": { "alias": "mainClass"; "required": false; }; }, {}, never, ["[header]", "*", "[footer]"], true, never>;
|
|
25
26
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ChangeEventProps, ChangeEventState, ClickEventProps, ClickEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, GlobalProps, GlobalState, IconProps, InitializedState, InputEventProps, InputEventState, ShowIconProps } from '../../shared/model';
|
|
2
2
|
export type DBSelectDefaultProps = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Enable multiple select -> use DBCustomSelect/db-custom-select for a better look
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
multiple?: boolean;
|
|
7
7
|
/**
|
|
8
8
|
* If you don't/can't use children/slots you can pass in the options as an array.
|
|
9
9
|
*/
|
|
@@ -35,7 +35,7 @@ export type DBSelectOptionType = {
|
|
|
35
35
|
*/
|
|
36
36
|
value: string | string[] | number;
|
|
37
37
|
};
|
|
38
|
-
export type DBSelectProps =
|
|
38
|
+
export type DBSelectProps = GlobalProps & ClickEventProps<HTMLSelectElement> & ChangeEventProps<HTMLSelectElement> & FocusEventProps<HTMLSelectElement> & InputEventProps<HTMLSelectElement> & FormProps & IconProps & FormMessageProps & DBSelectDefaultProps & ShowIconProps & FormSizeProps;
|
|
39
39
|
export type DBSelectDefaultState = {
|
|
40
40
|
_placeholderId: string;
|
|
41
41
|
getOptionLabel: (option: DBSelectOptionType) => string;
|
|
@@ -30,6 +30,7 @@ export declare class DBSelect implements ControlValueAccessor {
|
|
|
30
30
|
name: DBSelectProps["name"];
|
|
31
31
|
size: DBSelectProps["size"];
|
|
32
32
|
autocomplete: DBSelectProps["autocomplete"];
|
|
33
|
+
multiple: DBSelectProps["multiple"];
|
|
33
34
|
options: DBSelectProps["options"];
|
|
34
35
|
placeholder: DBSelectProps["placeholder"];
|
|
35
36
|
messageIcon: DBSelectProps["messageIcon"];
|
|
@@ -74,5 +75,5 @@ export declare class DBSelect implements ControlValueAccessor {
|
|
|
74
75
|
ngAfterViewInit(): void;
|
|
75
76
|
ngAfterContentChecked(changes: SimpleChanges): void;
|
|
76
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<DBSelect, never>;
|
|
77
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DBSelect, "db-select", never, { "id": { "alias": "id"; "required": false; }; "message": { "alias": "message"; "required": false; }; "showMessage": { "alias": "showMessage"; "required": false; }; "value": { "alias": "value"; "required": false; }; "validation": { "alias": "validation"; "required": false; }; "invalidMessage": { "alias": "invalidMessage"; "required": false; }; "required": { "alias": "required"; "required": false; }; "validMessage": { "alias": "validMessage"; "required": false; }; "className": { "alias": "className"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "messageIcon": { "alias": "messageIcon"; "required": false; }; }, { "onClick": "onClick"; "onInput": "onInput"; "input": "input"; "onChange": "onChange"; "change": "change"; "onBlur": "onBlur"; "blur": "blur"; "onFocus": "onFocus"; "focus": "focus"; }, never, ["*"], true, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DBSelect, "db-select", never, { "id": { "alias": "id"; "required": false; }; "message": { "alias": "message"; "required": false; }; "showMessage": { "alias": "showMessage"; "required": false; }; "value": { "alias": "value"; "required": false; }; "validation": { "alias": "validation"; "required": false; }; "invalidMessage": { "alias": "invalidMessage"; "required": false; }; "required": { "alias": "required"; "required": false; }; "validMessage": { "alias": "validMessage"; "required": false; }; "className": { "alias": "className"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "messageIcon": { "alias": "messageIcon"; "required": false; }; }, { "onClick": "onClick"; "onInput": "onInput"; "input": "input"; "onChange": "onChange"; "change": "change"; "onBlur": "onBlur"; "blur": "blur"; "onFocus": "onFocus"; "focus": "focus"; }, never, ["*"], true, never>;
|
|
78
79
|
}
|