@tylertech/forge 2.14.0 → 2.16.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/custom-elements.json +324 -86
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chunks/{chunk.YBEBD4CN.js → chunk.22OZJNVS.js} +2 -2
- package/dist/esm/chunks/chunk.26XTVQKW.js +7 -0
- package/dist/esm/chunks/chunk.26XTVQKW.js.map +7 -0
- package/dist/esm/chunks/{chunk.X5LGVZGO.js → chunk.4RPIQ65C.js} +2 -2
- package/dist/esm/chunks/chunk.4RPIQ65C.js.map +7 -0
- package/dist/esm/chunks/{chunk.DYRY2HWZ.js → chunk.4Y7EPWU2.js} +2 -2
- package/dist/esm/chunks/chunk.7B3AZYBR.js +7 -0
- package/dist/esm/chunks/chunk.7B3AZYBR.js.map +7 -0
- package/dist/esm/chunks/{chunk.J2H5RXTX.js → chunk.7BESNUTG.js} +2 -2
- package/dist/esm/chunks/chunk.7LI25R6R.js +7 -0
- package/dist/esm/chunks/chunk.7LI25R6R.js.map +7 -0
- package/dist/esm/chunks/chunk.A47X5VG3.js +7 -0
- package/dist/esm/chunks/chunk.A47X5VG3.js.map +7 -0
- package/dist/esm/chunks/{chunk.MXTDW27J.js → chunk.BUCIIOGE.js} +2 -2
- package/dist/esm/chunks/chunk.GCR7QZRO.js +7 -0
- package/dist/esm/chunks/chunk.GCR7QZRO.js.map +7 -0
- package/dist/esm/chunks/{chunk.XHV3GQ7L.js → chunk.HI2DQJZG.js} +2 -2
- package/dist/esm/chunks/{chunk.44IJE5UL.js → chunk.HMCOY5WC.js} +2 -2
- package/dist/esm/chunks/chunk.HMCOY5WC.js.map +7 -0
- package/dist/esm/chunks/{chunk.E6CYXNS2.js → chunk.IJW7Z6YD.js} +2 -2
- package/dist/esm/chunks/{chunk.6RSRYR55.js → chunk.IP3OQKGW.js} +2 -2
- package/dist/esm/chunks/{chunk.J6P3GKZM.js → chunk.J2VLKZWP.js} +2 -2
- package/dist/esm/chunks/{chunk.J6P3GKZM.js.map → chunk.J2VLKZWP.js.map} +1 -1
- package/dist/esm/chunks/{chunk.RHFNK6EE.js → chunk.K4DGAJOM.js} +2 -2
- package/dist/esm/chunks/{chunk.ESR2NHOS.js → chunk.KKMKGN2I.js} +2 -2
- package/dist/esm/chunks/{chunk.MHOS3IHQ.js → chunk.MUEXD4SD.js} +2 -2
- package/dist/esm/chunks/{chunk.O73S5LF3.js → chunk.P4EW5GAS.js} +2 -2
- package/dist/esm/chunks/chunk.PWKRTM6B.js +7 -0
- package/dist/esm/chunks/chunk.PWKRTM6B.js.map +7 -0
- package/dist/esm/chunks/chunk.Q7LFOS2I.js +7 -0
- package/dist/esm/chunks/chunk.Q7LFOS2I.js.map +7 -0
- package/dist/esm/chunks/{chunk.OZ5BPXNV.js → chunk.REH25ELY.js} +2 -2
- package/dist/esm/chunks/{chunk.HU27X3IT.js → chunk.UDAWTDPV.js} +2 -2
- package/dist/esm/chunks/chunk.VPH7GX4C.js +7 -0
- package/dist/esm/chunks/chunk.VPH7GX4C.js.map +7 -0
- package/dist/esm/chunks/chunk.XQ2EQIDS.js +7 -0
- package/dist/esm/chunks/chunk.XQ2EQIDS.js.map +7 -0
- package/dist/esm/chunks/chunk.Y5A7RQ5M.js +7 -0
- package/dist/esm/chunks/chunk.Y5A7RQ5M.js.map +7 -0
- package/dist/esm/chunks/{chunk.DFJUCHEO.js → chunk.YUCLBBES.js} +2 -2
- package/dist/esm/chunks/chunk.YWVKDJXZ.js +7 -0
- package/dist/esm/chunks/chunk.YWVKDJXZ.js.map +7 -0
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stack/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.d.ts +2 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.js +13 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.d.ts +2 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +1 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.d.ts +4 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.js +15 -1
- package/esm/app-bar/profile-button/app-bar-profile-button.d.ts +2 -0
- package/esm/app-bar/profile-button/app-bar-profile-button.js +9 -0
- package/esm/autocomplete/autocomplete-constants.d.ts +1 -0
- package/esm/autocomplete/autocomplete-constants.js +1 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +5 -0
- package/esm/autocomplete/autocomplete-foundation.js +19 -2
- package/esm/autocomplete/autocomplete.d.ts +3 -0
- package/esm/autocomplete/autocomplete.js +7 -0
- package/esm/chip-field/chip-field-foundation.d.ts +1 -1
- package/esm/date-picker/base/base-date-picker-adapter.d.ts +2 -2
- package/esm/date-picker/base/base-date-picker-foundation.d.ts +2 -2
- package/esm/date-picker/base/base-date-picker-foundation.js +7 -4
- package/esm/date-picker/date-picker-adapter.js +5 -7
- package/esm/date-range-picker/date-range-picker-adapter.d.ts +4 -2
- package/esm/date-range-picker/date-range-picker-adapter.js +20 -18
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +4 -1
- package/esm/date-range-picker/date-range-picker-foundation.js +48 -14
- package/esm/expansion-panel/expansion-panel-constants.d.ts +2 -0
- package/esm/expansion-panel/expansion-panel-constants.js +3 -1
- package/esm/expansion-panel/expansion-panel-foundation.js +4 -1
- package/esm/expansion-panel/expansion-panel.js +1 -1
- package/esm/field/field-adapter.d.ts +4 -2
- package/esm/field/field-adapter.js +5 -2
- package/esm/field/field-foundation.d.ts +2 -2
- package/esm/field/field-foundation.js +7 -9
- package/esm/profile-card/profile-card-adapter.d.ts +2 -0
- package/esm/profile-card/profile-card-adapter.js +12 -1
- package/esm/profile-card/profile-card-constants.d.ts +1 -0
- package/esm/profile-card/profile-card-constants.js +1 -0
- package/esm/profile-card/profile-card-foundation.d.ts +4 -0
- package/esm/profile-card/profile-card-foundation.js +9 -0
- package/esm/profile-card/profile-card.d.ts +2 -0
- package/esm/profile-card/profile-card.js +7 -0
- package/esm/select/core/base-select-foundation.js +8 -3
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/stack/stack-constants.d.ts +2 -0
- package/esm/stack/stack-constants.js +1 -0
- package/esm/stack/stack-foundation.d.ts +4 -4
- package/esm/stack/stack-foundation.js +2 -2
- package/esm/stack/stack.d.ts +3 -3
- package/esm/stack/stack.js +1 -1
- package/esm/text-field/text-field-adapter.d.ts +1 -1
- package/esm/text-field/text-field-adapter.js +4 -3
- package/esm/time-picker/time-picker-adapter.js +4 -7
- package/esm/time-picker/time-picker-foundation.js +9 -6
- package/package.json +1 -1
- package/styles/stack/_mixins.scss +1 -1
- package/styles/stack/stack.scss +4 -1
- package/dist/esm/chunks/chunk.44IJE5UL.js.map +0 -7
- package/dist/esm/chunks/chunk.4X2OFZDL.js +0 -7
- package/dist/esm/chunks/chunk.4X2OFZDL.js.map +0 -7
- package/dist/esm/chunks/chunk.73AYD2BF.js +0 -7
- package/dist/esm/chunks/chunk.73AYD2BF.js.map +0 -7
- package/dist/esm/chunks/chunk.DQJPIDVW.js +0 -7
- package/dist/esm/chunks/chunk.DQJPIDVW.js.map +0 -7
- package/dist/esm/chunks/chunk.HV6SPRC4.js +0 -7
- package/dist/esm/chunks/chunk.HV6SPRC4.js.map +0 -7
- package/dist/esm/chunks/chunk.LDN4HLF7.js +0 -7
- package/dist/esm/chunks/chunk.LDN4HLF7.js.map +0 -7
- package/dist/esm/chunks/chunk.LFLREB3C.js +0 -7
- package/dist/esm/chunks/chunk.LFLREB3C.js.map +0 -7
- package/dist/esm/chunks/chunk.NW7NV2A2.js +0 -7
- package/dist/esm/chunks/chunk.NW7NV2A2.js.map +0 -7
- package/dist/esm/chunks/chunk.SAQVWOVK.js +0 -7
- package/dist/esm/chunks/chunk.SAQVWOVK.js.map +0 -7
- package/dist/esm/chunks/chunk.U724KSZU.js +0 -7
- package/dist/esm/chunks/chunk.U724KSZU.js.map +0 -7
- package/dist/esm/chunks/chunk.UF43SSFY.js +0 -7
- package/dist/esm/chunks/chunk.UF43SSFY.js.map +0 -7
- package/dist/esm/chunks/chunk.ULIFS3UR.js +0 -7
- package/dist/esm/chunks/chunk.ULIFS3UR.js.map +0 -7
- package/dist/esm/chunks/chunk.X5LGVZGO.js.map +0 -7
- /package/dist/esm/chunks/{chunk.YBEBD4CN.js.map → chunk.22OZJNVS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DYRY2HWZ.js.map → chunk.4Y7EPWU2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.J2H5RXTX.js.map → chunk.7BESNUTG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MXTDW27J.js.map → chunk.BUCIIOGE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XHV3GQ7L.js.map → chunk.HI2DQJZG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.E6CYXNS2.js.map → chunk.IJW7Z6YD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6RSRYR55.js.map → chunk.IP3OQKGW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RHFNK6EE.js.map → chunk.K4DGAJOM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ESR2NHOS.js.map → chunk.KKMKGN2I.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MHOS3IHQ.js.map → chunk.MUEXD4SD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.O73S5LF3.js.map → chunk.P4EW5GAS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OZ5BPXNV.js.map → chunk.REH25ELY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HU27X3IT.js.map → chunk.UDAWTDPV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DFJUCHEO.js.map → chunk.YUCLBBES.js.map} +0 -0
|
@@ -88,8 +88,8 @@ export declare abstract class BaseDatePickerFoundation<TAdapter extends IBaseDat
|
|
|
88
88
|
protected _removeInputChangeListeners(): void;
|
|
89
89
|
protected _destroyListeners(): void;
|
|
90
90
|
protected _onInput(evt: Event): void;
|
|
91
|
-
protected _onInputFocus(evt:
|
|
92
|
-
protected _onInputBlur(evt:
|
|
91
|
+
protected _onInputFocus(evt: FocusEvent): void;
|
|
92
|
+
protected _onInputBlur(evt: FocusEvent): void;
|
|
93
93
|
protected _openCalendar(emitOpenEvent?: boolean): void;
|
|
94
94
|
protected _closeCalendar(emitCloseEvent?: boolean): void;
|
|
95
95
|
protected _onInputKeydown(evt: KeyboardEvent): void;
|
|
@@ -93,8 +93,14 @@ export class BaseDatePickerFoundation {
|
|
|
93
93
|
}
|
|
94
94
|
_onInputFocus(evt) {
|
|
95
95
|
this._adapter.selectInputText();
|
|
96
|
+
if (this.masked && this.showMaskFormat) {
|
|
97
|
+
this._applyMask();
|
|
98
|
+
}
|
|
96
99
|
}
|
|
97
100
|
_onInputBlur(evt) {
|
|
101
|
+
if (this.masked && this.showMaskFormat) {
|
|
102
|
+
this._applyMask();
|
|
103
|
+
}
|
|
98
104
|
this._formatInputValue();
|
|
99
105
|
if (this._open && !this._adapter.isInputFocused()) {
|
|
100
106
|
this._closeCalendar(true);
|
|
@@ -339,7 +345,7 @@ export class BaseDatePickerFoundation {
|
|
|
339
345
|
}
|
|
340
346
|
_initializeMask() {
|
|
341
347
|
const options = {
|
|
342
|
-
showMaskFormat: this._showMaskFormat,
|
|
348
|
+
showMaskFormat: this._showMaskFormat && this._adapter.isInputFocused(),
|
|
343
349
|
pattern: this._maskFormat,
|
|
344
350
|
onChange: (value) => this._handleInput(value)
|
|
345
351
|
};
|
|
@@ -515,9 +521,6 @@ export class BaseDatePickerFoundation {
|
|
|
515
521
|
set showMaskFormat(value) {
|
|
516
522
|
if (this._showMaskFormat !== value) {
|
|
517
523
|
this._showMaskFormat = value;
|
|
518
|
-
if (this._isInitialized) {
|
|
519
|
-
this._applyMask();
|
|
520
|
-
}
|
|
521
524
|
}
|
|
522
525
|
}
|
|
523
526
|
get notifyInputValueChanges() {
|
|
@@ -21,16 +21,14 @@ export class DatePickerAdapter extends BaseDatePickerAdapter {
|
|
|
21
21
|
this._calendarDropdown = new CalendarDropdown(targetElement, this._dropdownIdentifier);
|
|
22
22
|
}
|
|
23
23
|
initializeMask(options) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
24
|
+
var _a;
|
|
25
|
+
(_a = this._inputMask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
27
26
|
this._inputMask = new DateInputMask(this._inputElement, options);
|
|
28
27
|
}
|
|
29
28
|
destroyMask() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = this._inputMask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
31
|
+
this._inputMask = undefined;
|
|
34
32
|
}
|
|
35
33
|
initializeAccessibility() {
|
|
36
34
|
this._inputElement.setAttribute('autocomplete', 'off');
|
|
@@ -20,6 +20,7 @@ export interface IDateRangePickerAdapter extends IBaseDatePickerAdapter {
|
|
|
20
20
|
tryFocusInput(): void;
|
|
21
21
|
tryBlurInput(): void;
|
|
22
22
|
selectToInputText(): void;
|
|
23
|
+
destroyToMask(): void;
|
|
23
24
|
}
|
|
24
25
|
export declare class DateRangePickerAdapter extends BaseDatePickerAdapter<IDateRangePickerComponent> implements IDateRangePickerAdapter {
|
|
25
26
|
private _fromInputElement;
|
|
@@ -32,9 +33,10 @@ export declare class DateRangePickerAdapter extends BaseDatePickerAdapter<IDateR
|
|
|
32
33
|
protected _initializeInput(): void;
|
|
33
34
|
protected _initializeCalendarDropdown(): void;
|
|
34
35
|
initializeMask(fromOptions: IDateInputMaskOptions): void;
|
|
36
|
+
destroyMask(): void;
|
|
35
37
|
initializeToMask(toOptions: IDateInputMaskOptions): void;
|
|
38
|
+
destroyToMask(): void;
|
|
36
39
|
destroy(): void;
|
|
37
|
-
destroyMask(): void;
|
|
38
40
|
private _destroyToValueChangeListener;
|
|
39
41
|
initializeAccessibility(): void;
|
|
40
42
|
addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void;
|
|
@@ -50,7 +52,7 @@ export declare class DateRangePickerAdapter extends BaseDatePickerAdapter<IDateR
|
|
|
50
52
|
setInputValue(value: string, emitEvents: boolean): void;
|
|
51
53
|
setToInputValue(value: string, emitEvents: boolean): void;
|
|
52
54
|
isInputDisabled(): boolean;
|
|
53
|
-
isInputFocused(): boolean;
|
|
55
|
+
isInputFocused(target?: EventTarget | null): boolean;
|
|
54
56
|
getInputValue(): string;
|
|
55
57
|
getToInputValue(): string;
|
|
56
58
|
setDisabled(isDisabled: boolean): void;
|
|
@@ -26,31 +26,29 @@ export class DateRangePickerAdapter extends BaseDatePickerAdapter {
|
|
|
26
26
|
this._calendarDropdown = new CalendarDropdown(targetElement, this._dropdownIdentifier);
|
|
27
27
|
}
|
|
28
28
|
initializeMask(fromOptions) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = this._fromInputMask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
32
31
|
this._fromInputMask = new DateInputMask(this._fromInputElement, fromOptions);
|
|
33
32
|
}
|
|
33
|
+
destroyMask() {
|
|
34
|
+
var _a;
|
|
35
|
+
(_a = this._fromInputMask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
36
|
+
this._fromInputMask = undefined;
|
|
37
|
+
}
|
|
34
38
|
initializeToMask(toOptions) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
39
|
+
var _a;
|
|
40
|
+
(_a = this._toInputMask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
38
41
|
this._toInputMask = new DateInputMask(this._toInputElement, toOptions);
|
|
39
42
|
}
|
|
43
|
+
destroyToMask() {
|
|
44
|
+
var _a;
|
|
45
|
+
(_a = this._toInputMask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
46
|
+
this._toInputMask = undefined;
|
|
47
|
+
}
|
|
40
48
|
destroy() {
|
|
41
49
|
super.destroy();
|
|
42
50
|
this._destroyToValueChangeListener();
|
|
43
51
|
}
|
|
44
|
-
destroyMask() {
|
|
45
|
-
if (this._fromInputMask) {
|
|
46
|
-
this._fromInputMask.destroy();
|
|
47
|
-
this._fromInputMask = undefined;
|
|
48
|
-
}
|
|
49
|
-
if (this._toInputMask) {
|
|
50
|
-
this._toInputMask.destroy();
|
|
51
|
-
this._toInputMask = undefined;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
52
|
_destroyToValueChangeListener() {
|
|
55
53
|
if (typeof this._toValueChangeListener === 'function') {
|
|
56
54
|
this._toValueChangeListener();
|
|
@@ -142,8 +140,12 @@ export class DateRangePickerAdapter extends BaseDatePickerAdapter {
|
|
|
142
140
|
isInputDisabled() {
|
|
143
141
|
return this._fromInputElement.disabled;
|
|
144
142
|
}
|
|
145
|
-
isInputFocused() {
|
|
146
|
-
|
|
143
|
+
isInputFocused(target) {
|
|
144
|
+
if (target && this._toInputElement === target || this._fromInputElement === target) {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
const activeEl = getActiveElement();
|
|
148
|
+
return this._toInputElement === activeEl || this._fromInputElement === activeEl;
|
|
147
149
|
}
|
|
148
150
|
getInputValue() {
|
|
149
151
|
return this._fromInputElement.value;
|
|
@@ -33,6 +33,7 @@ export declare class DateRangePickerFoundation extends BaseDatePickerFoundation<
|
|
|
33
33
|
protected _onToday(): void;
|
|
34
34
|
protected _onClear(): void;
|
|
35
35
|
protected _getCurrentValue(): IDatePickerRange | null | undefined;
|
|
36
|
+
private _applyToMask;
|
|
36
37
|
private _formatToInputValue;
|
|
37
38
|
protected _setFormattedInputValue(suppressValueChanges?: boolean): void;
|
|
38
39
|
private _setFormattedToInputValue;
|
|
@@ -42,7 +43,7 @@ export declare class DateRangePickerFoundation extends BaseDatePickerFoundation<
|
|
|
42
43
|
protected _onDateSelected(event: ICalendarDateSelectEventData): void;
|
|
43
44
|
protected _applyMin(): void;
|
|
44
45
|
protected _applyMax(): void;
|
|
45
|
-
protected
|
|
46
|
+
protected _initializeToMask(): void;
|
|
46
47
|
protected _applyDisabledDates(): void;
|
|
47
48
|
protected _applyDisabledDaysOfWeek(): void;
|
|
48
49
|
private _onToInput;
|
|
@@ -50,6 +51,8 @@ export declare class DateRangePickerFoundation extends BaseDatePickerFoundation<
|
|
|
50
51
|
private _handleToInput;
|
|
51
52
|
private _onToInputFocus;
|
|
52
53
|
private _onToInputBlur;
|
|
54
|
+
protected _onInputFocus(evt: FocusEvent): void;
|
|
55
|
+
protected _onInputBlur(evt: FocusEvent): void;
|
|
53
56
|
protected _onInputValueChanged(value: string): void;
|
|
54
57
|
private _onToInputValueChanged;
|
|
55
58
|
get value(): IDatePickerRange | null | undefined;
|
|
@@ -21,6 +21,7 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
|
|
|
21
21
|
this._toInputBlurListener = evt => this._onToInputBlur(evt);
|
|
22
22
|
}
|
|
23
23
|
_initializeState() {
|
|
24
|
+
this._applyToMask();
|
|
24
25
|
if (!this._from) {
|
|
25
26
|
this._from = this._coerceDateValue(this._adapter.getInputValue());
|
|
26
27
|
}
|
|
@@ -92,6 +93,15 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
|
|
|
92
93
|
_getCurrentValue() {
|
|
93
94
|
return this._value;
|
|
94
95
|
}
|
|
96
|
+
_applyToMask() {
|
|
97
|
+
if (this._masked) {
|
|
98
|
+
this._initializeToMask();
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this._adapter.destroyToMask();
|
|
102
|
+
this._formatToInputValue();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
95
105
|
_formatToInputValue() {
|
|
96
106
|
const inputValue = this._adapter.getToInputValue();
|
|
97
107
|
if (inputValue) {
|
|
@@ -201,22 +211,21 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
|
|
|
201
211
|
}
|
|
202
212
|
super._applyMax();
|
|
203
213
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
214
|
+
_initializeToMask() {
|
|
215
|
+
if (!this._masked) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const options = {
|
|
219
|
+
showMaskFormat: this._showMaskFormat && this._adapter.isInputFocused(),
|
|
220
|
+
pattern: this._maskFormat,
|
|
221
|
+
onChange: (value) => this._handleToInput(value)
|
|
222
|
+
};
|
|
223
|
+
if (this._prepareMaskCallback) {
|
|
224
|
+
options.prepareCallback = (value, masked, flags, maskInstance) => {
|
|
225
|
+
return this._prepareMaskCallback.call(null, value, masked, flags, maskInstance);
|
|
212
226
|
};
|
|
213
|
-
if (this._prepareMaskCallback) {
|
|
214
|
-
options.prepareCallback = (value, masked, flags, maskInstance) => {
|
|
215
|
-
return this._prepareMaskCallback.call(null, value, masked, flags, maskInstance);
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
this._adapter.initializeToMask(options);
|
|
219
227
|
}
|
|
228
|
+
this._adapter.initializeToMask(options);
|
|
220
229
|
}
|
|
221
230
|
_applyDisabledDates() {
|
|
222
231
|
if (this._from && !this._isDateValueAcceptable(this._from)) {
|
|
@@ -263,13 +272,38 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
|
|
|
263
272
|
}
|
|
264
273
|
_onToInputFocus() {
|
|
265
274
|
this._adapter.selectToInputText();
|
|
275
|
+
if (this.masked && this._showMaskFormat) {
|
|
276
|
+
this._initializeMask();
|
|
277
|
+
this._initializeToMask();
|
|
278
|
+
}
|
|
266
279
|
}
|
|
267
280
|
_onToInputBlur(evt) {
|
|
281
|
+
if (this._masked && !this._adapter.isInputFocused(evt.relatedTarget)) {
|
|
282
|
+
this._initializeMask();
|
|
283
|
+
this._initializeToMask();
|
|
284
|
+
}
|
|
268
285
|
this._formatToInputValue();
|
|
269
286
|
if (this._open) {
|
|
270
287
|
this._closeCalendar(true);
|
|
271
288
|
}
|
|
272
289
|
}
|
|
290
|
+
_onInputFocus(evt) {
|
|
291
|
+
this._adapter.selectInputText();
|
|
292
|
+
if (this.masked && this._showMaskFormat) {
|
|
293
|
+
this._initializeMask();
|
|
294
|
+
this._initializeToMask();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
_onInputBlur(evt) {
|
|
298
|
+
if (this.masked && !this._adapter.isInputFocused(evt.relatedTarget)) {
|
|
299
|
+
this._initializeMask();
|
|
300
|
+
this._initializeToMask();
|
|
301
|
+
}
|
|
302
|
+
this._formatInputValue();
|
|
303
|
+
if (this._open && !this._adapter.isInputFocused(evt.relatedTarget)) {
|
|
304
|
+
this._closeCalendar(true);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
273
307
|
_onInputValueChanged(value) {
|
|
274
308
|
if (this._masked) {
|
|
275
309
|
return;
|
|
@@ -24,7 +24,9 @@ const events = {
|
|
|
24
24
|
const attributes = {
|
|
25
25
|
OPEN: 'open',
|
|
26
26
|
ORIENTATION: 'orientation',
|
|
27
|
-
USE_ANIMATIONS: 'use-animations'
|
|
27
|
+
USE_ANIMATIONS: 'use-animations',
|
|
28
|
+
IGNORE: 'data-forge-ignore',
|
|
29
|
+
IGNORE_ALT: 'forge-ignore'
|
|
28
30
|
};
|
|
29
31
|
const numbers = {
|
|
30
32
|
COLLAPSE_ANIMATION_DURATION: 400,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debounce } from '@tylertech/forge-core';
|
|
6
|
+
import { debounce, getEventPath } from '@tylertech/forge-core';
|
|
7
7
|
import { EXPANSION_PANEL_CONSTANTS } from './expansion-panel-constants';
|
|
8
8
|
export class ExpansionPanelFoundation {
|
|
9
9
|
constructor(_adapter) {
|
|
@@ -115,6 +115,9 @@ export class ExpansionPanelFoundation {
|
|
|
115
115
|
* @param {MouseEvent} evt The click event.
|
|
116
116
|
*/
|
|
117
117
|
_onClick(evt) {
|
|
118
|
+
if (getEventPath(evt).find(p => p.nodeType === 1 && (p.hasAttribute(EXPANSION_PANEL_CONSTANTS.attributes.IGNORE) || p.hasAttribute(EXPANSION_PANEL_CONSTANTS.attributes.IGNORE_ALT)))) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
118
121
|
evt.stopPropagation();
|
|
119
122
|
this._toggle();
|
|
120
123
|
this._emitEvent();
|
|
@@ -9,7 +9,7 @@ import { BaseComponent } from '../core/base/base-component';
|
|
|
9
9
|
import { ExpansionPanelAdapter } from './expansion-panel-adapter';
|
|
10
10
|
import { EXPANSION_PANEL_CONSTANTS } from './expansion-panel-constants';
|
|
11
11
|
import { ExpansionPanelFoundation } from './expansion-panel-foundation';
|
|
12
|
-
const template = '<template><div class=\"forge-expansion-panel\" part=\"root\"><div class=\"forge-expansion-panel__header\"
|
|
12
|
+
const template = '<template><div class=\"forge-expansion-panel\" part=\"root\"><div class=\"forge-expansion-panel__header\" part=\"header\"><slot name=\"header\"></slot></div><div class=\"forge-expansion-panel__content\" style=\"height: 0; opacity: 0; visibility: hidden;\" part=\"content\"><slot></slot></div></div></template>';
|
|
13
13
|
const styles = '.forge-expansion-panel{display:block;display:var(--forge-expansion-panel-display,block);height:auto;height:var(--forge-expansion-panel-height,auto)}.forge-expansion-panel__header{outline:0}.forge-expansion-panel__header:hover{cursor:pointer}.forge-expansion-panel__header forge-open-icon{margin-left:auto}.forge-expansion-panel__content{overflow:hidden;overflow:var(--forge-expansion-panel-content-overflow,hidden);max-height:none;max-height:var(--forge-expansion-panel-content-max-height,none)}.forge-expansion-panel__content::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-expansion-panel__content::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-expansion-panel__content::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-expansion-panel__content::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-expansion-panel__content::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-expansion-panel__content::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}:host{display:block}:host([hidden]){display:none}';
|
|
14
14
|
/**
|
|
15
15
|
* A web component that encapsulates the functionality of expanding/collapsing content when clicked.
|
|
@@ -18,6 +18,7 @@ export interface IFieldAdapter extends IBaseAdapter {
|
|
|
18
18
|
removeLabelSlotListener(listener: (evt: Event) => void): void;
|
|
19
19
|
setLabelClass(name: string): void;
|
|
20
20
|
removeLabelClass(name: string): void;
|
|
21
|
+
isLabelFloating(): boolean;
|
|
21
22
|
addLeadingSlotListener(listener: (evt: Event) => void): void;
|
|
22
23
|
removeLeadingSlotListener(listener: (evt: Event) => void): void;
|
|
23
24
|
addTrailingSlotListener(listener: (evt: Event) => void): void;
|
|
@@ -29,7 +30,7 @@ export interface IFieldAdapter extends IBaseAdapter {
|
|
|
29
30
|
hasLeadingNodes(): boolean;
|
|
30
31
|
hasPlaceholder(): boolean;
|
|
31
32
|
hasTrailingNodes(): boolean;
|
|
32
|
-
inputHasFocus(): boolean;
|
|
33
|
+
inputHasFocus(target?: EventTarget | null): boolean;
|
|
33
34
|
inputHasValue(): boolean;
|
|
34
35
|
fieldHasValue(): boolean;
|
|
35
36
|
isDisabled(): boolean;
|
|
@@ -81,9 +82,10 @@ export declare class FieldAdapter extends BaseAdapter<IFieldComponent> implement
|
|
|
81
82
|
inputHasValue(): boolean;
|
|
82
83
|
fieldHasValue(): boolean;
|
|
83
84
|
hasPlaceholder(): boolean;
|
|
84
|
-
inputHasFocus(): boolean;
|
|
85
|
+
inputHasFocus(target?: EventTarget | null): boolean;
|
|
85
86
|
setLabelClass(name: string): void;
|
|
86
87
|
removeLabelClass(name: string): void;
|
|
88
|
+
isLabelFloating(): boolean;
|
|
87
89
|
setRoomy(isRoomy: boolean): void;
|
|
88
90
|
setDense(isDense: boolean): void;
|
|
89
91
|
hasLeadingNodes(): boolean;
|
|
@@ -104,8 +104,8 @@ export class FieldAdapter extends BaseAdapter {
|
|
|
104
104
|
hasPlaceholder() {
|
|
105
105
|
return this._inputElement.placeholder ? this._inputElement.placeholder.trim().length > 0 : false;
|
|
106
106
|
}
|
|
107
|
-
inputHasFocus() {
|
|
108
|
-
return this._inputElement === getActiveElement();
|
|
107
|
+
inputHasFocus(target) {
|
|
108
|
+
return this._inputElement === target || this._inputElement === getActiveElement();
|
|
109
109
|
}
|
|
110
110
|
setLabelClass(name) {
|
|
111
111
|
if (this._labelElement) {
|
|
@@ -117,6 +117,9 @@ export class FieldAdapter extends BaseAdapter {
|
|
|
117
117
|
this._labelElement.classList.remove(name);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
+
isLabelFloating() {
|
|
121
|
+
return this._component.hasAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);
|
|
122
|
+
}
|
|
120
123
|
setRoomy(isRoomy) {
|
|
121
124
|
toggleClass(this._rootElement, isRoomy, FIELD_CONSTANTS.classes.ROOMY);
|
|
122
125
|
}
|
|
@@ -55,8 +55,8 @@ export declare class FieldFoundation {
|
|
|
55
55
|
protected _detectTrailingContent(): void;
|
|
56
56
|
protected _detectAddonEndContent(): void;
|
|
57
57
|
protected _detectSlottedContent(): void;
|
|
58
|
-
protected _onFocus(
|
|
59
|
-
protected _onBlur(
|
|
58
|
+
protected _onFocus(evt: FocusEvent): void;
|
|
59
|
+
protected _onBlur(evt: FocusEvent): void;
|
|
60
60
|
protected _onValueChanged(value: any): void;
|
|
61
61
|
protected _onInputAttributeChanged(name: string, value: string | null): void;
|
|
62
62
|
protected _setShapeType(): void;
|
|
@@ -144,14 +144,12 @@ export class FieldFoundation {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
floatLabel(value) {
|
|
147
|
-
var _a;
|
|
148
|
-
if (((_a = this._floatingLabel) === null || _a === void 0 ? void 0 : _a.isFloating) === value) {
|
|
147
|
+
var _a, _b;
|
|
148
|
+
if (((_a = this._floatingLabel) === null || _a === void 0 ? void 0 : _a.isFloating) === value || this._adapter.isLabelFloating() === value) {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
if (!value && this._floatLabelType === 'always') {
|
|
152
|
-
|
|
153
|
-
this._floatingLabel.float(true, true);
|
|
154
|
-
}
|
|
152
|
+
(_b = this._floatingLabel) === null || _b === void 0 ? void 0 : _b.float(true, true);
|
|
155
153
|
this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING, '');
|
|
156
154
|
return;
|
|
157
155
|
}
|
|
@@ -228,20 +226,20 @@ export class FieldFoundation {
|
|
|
228
226
|
this._detectTrailingContent();
|
|
229
227
|
this._detectAddonEndContent();
|
|
230
228
|
}
|
|
231
|
-
_onFocus(
|
|
229
|
+
_onFocus(evt) {
|
|
232
230
|
this._adapter.setRootClass(FIELD_CONSTANTS.classes.FOCUSED);
|
|
233
231
|
this._adapter.setLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);
|
|
234
232
|
this.floatLabel(true);
|
|
235
233
|
}
|
|
236
|
-
_onBlur(
|
|
237
|
-
if (this._adapter.inputHasFocus()) {
|
|
234
|
+
_onBlur(evt) {
|
|
235
|
+
if (this._adapter.inputHasFocus(evt.relatedTarget)) {
|
|
238
236
|
return;
|
|
239
237
|
}
|
|
240
238
|
this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);
|
|
241
239
|
this._adapter.removeLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);
|
|
242
240
|
if (!this._adapter.fieldHasValue() && !this._adapter.hasPlaceholder()) {
|
|
243
|
-
this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);
|
|
244
241
|
this.floatLabel(false);
|
|
242
|
+
this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);
|
|
245
243
|
}
|
|
246
244
|
}
|
|
247
245
|
_onValueChanged(value) {
|
|
@@ -9,6 +9,7 @@ export interface IProfileCardAdapter extends IBaseAdapter {
|
|
|
9
9
|
setFullName(value: string): void;
|
|
10
10
|
setEmail(value: string): void;
|
|
11
11
|
setAvatarText(value: string): void;
|
|
12
|
+
setAvatarIcon(value: string): void;
|
|
12
13
|
setAvatarImageUrl(value: string): void;
|
|
13
14
|
setAvatarLetterCount(count: number): void;
|
|
14
15
|
setActionToolbarVisibility(isVisible: boolean): void;
|
|
@@ -34,6 +35,7 @@ export declare class ProfileCardAdapter extends BaseAdapter<IProfileCardComponen
|
|
|
34
35
|
setFullName(value: string): void;
|
|
35
36
|
setEmail(value: string): void;
|
|
36
37
|
setAvatarText(value: string): void;
|
|
38
|
+
setAvatarIcon(value: string): void;
|
|
37
39
|
setAvatarImageUrl(value: string): void;
|
|
38
40
|
setAvatarLetterCount(count: number): void;
|
|
39
41
|
setActionToolbarVisibility(isVisible: boolean): void;
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { getShadowElement } from '@tylertech/forge-core';
|
|
6
|
+
import { getShadowElement, removeAllChildren } from '@tylertech/forge-core';
|
|
7
7
|
import { BaseAdapter } from '../core/base/base-adapter';
|
|
8
|
+
import { IconComponentDelegate } from '../icon';
|
|
8
9
|
import { PROFILE_CARD_CONSTANTS } from './profile-card-constants';
|
|
9
10
|
export class ProfileCardAdapter extends BaseAdapter {
|
|
10
11
|
constructor(component) {
|
|
@@ -27,6 +28,16 @@ export class ProfileCardAdapter extends BaseAdapter {
|
|
|
27
28
|
setAvatarText(value) {
|
|
28
29
|
this._component.setAttribute(PROFILE_CARD_CONSTANTS.attributes.AVATAR_TEXT, value);
|
|
29
30
|
this._avatarElement.text = value;
|
|
31
|
+
removeAllChildren(this._avatarElement);
|
|
32
|
+
}
|
|
33
|
+
setAvatarIcon(value) {
|
|
34
|
+
if (value) {
|
|
35
|
+
const iconDelegate = new IconComponentDelegate({ props: { name: value } });
|
|
36
|
+
this._avatarElement.replaceChildren(iconDelegate.element);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
removeAllChildren(this._avatarElement);
|
|
40
|
+
}
|
|
30
41
|
}
|
|
31
42
|
setAvatarImageUrl(value) {
|
|
32
43
|
this._component.setAttribute(PROFILE_CARD_CONSTANTS.attributes.AVATAR_IMAGE_URL, value);
|
|
@@ -11,6 +11,7 @@ export interface IProfileCardFoundation extends ICustomElementFoundation {
|
|
|
11
11
|
signOut: boolean;
|
|
12
12
|
profile: boolean;
|
|
13
13
|
avatarText: string;
|
|
14
|
+
avatarIcon: string;
|
|
14
15
|
avatarImageUrl: string;
|
|
15
16
|
avatarLetterCount: number;
|
|
16
17
|
}
|
|
@@ -19,6 +20,7 @@ export declare class ProfileCardFoundation implements IProfileCardFoundation {
|
|
|
19
20
|
private _fullName;
|
|
20
21
|
private _email;
|
|
21
22
|
private _avatarText;
|
|
23
|
+
private _avatarIcon;
|
|
22
24
|
private _avatarImageUrl;
|
|
23
25
|
private _avatarLetterCount;
|
|
24
26
|
private _showSignOutButton;
|
|
@@ -39,6 +41,8 @@ export declare class ProfileCardFoundation implements IProfileCardFoundation {
|
|
|
39
41
|
set email(value: string);
|
|
40
42
|
get avatarText(): string;
|
|
41
43
|
set avatarText(value: string);
|
|
44
|
+
get avatarIcon(): string;
|
|
45
|
+
set avatarIcon(value: string);
|
|
42
46
|
get avatarImageUrl(): string;
|
|
43
47
|
set avatarImageUrl(value: string);
|
|
44
48
|
get avatarLetterCount(): number;
|
|
@@ -73,6 +73,15 @@ export class ProfileCardFoundation {
|
|
|
73
73
|
this._adapter.setAvatarText(this._avatarText);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
get avatarIcon() {
|
|
77
|
+
return this._avatarIcon;
|
|
78
|
+
}
|
|
79
|
+
set avatarIcon(value) {
|
|
80
|
+
if (this._avatarIcon !== value) {
|
|
81
|
+
this._avatarIcon = value;
|
|
82
|
+
this._adapter.setAvatarIcon(this._avatarIcon);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
76
85
|
get avatarImageUrl() {
|
|
77
86
|
return this._avatarImageUrl;
|
|
78
87
|
}
|
|
@@ -12,6 +12,7 @@ export interface IProfileCardComponent extends IBaseComponent {
|
|
|
12
12
|
signOutText: string;
|
|
13
13
|
profileText: string;
|
|
14
14
|
avatarText: string;
|
|
15
|
+
avatarIcon: string;
|
|
15
16
|
avatarImageUrl: string;
|
|
16
17
|
avatarLetterCount: number;
|
|
17
18
|
}
|
|
@@ -42,6 +43,7 @@ export declare class ProfileCardComponent extends BaseComponent implements IProf
|
|
|
42
43
|
signOutText: string;
|
|
43
44
|
profileText: string;
|
|
44
45
|
avatarText: string;
|
|
46
|
+
avatarIcon: string;
|
|
45
47
|
avatarImageUrl: string;
|
|
46
48
|
avatarLetterCount: number;
|
|
47
49
|
}
|
|
@@ -34,6 +34,7 @@ let ProfileCardComponent = class ProfileCardComponent extends BaseComponent {
|
|
|
34
34
|
PROFILE_CARD_CONSTANTS.attributes.SIGN_OUT_TEXT,
|
|
35
35
|
PROFILE_CARD_CONSTANTS.attributes.PROFILE_TEXT,
|
|
36
36
|
PROFILE_CARD_CONSTANTS.attributes.AVATAR_TEXT,
|
|
37
|
+
PROFILE_CARD_CONSTANTS.attributes.AVATAR_ICON,
|
|
37
38
|
PROFILE_CARD_CONSTANTS.attributes.AVATAR_IMAGE_URL,
|
|
38
39
|
PROFILE_CARD_CONSTANTS.attributes.AVATAR_LETTER_COUNT
|
|
39
40
|
];
|
|
@@ -64,6 +65,9 @@ let ProfileCardComponent = class ProfileCardComponent extends BaseComponent {
|
|
|
64
65
|
case PROFILE_CARD_CONSTANTS.attributes.AVATAR_TEXT:
|
|
65
66
|
this.avatarText = newValue;
|
|
66
67
|
break;
|
|
68
|
+
case PROFILE_CARD_CONSTANTS.attributes.AVATAR_ICON:
|
|
69
|
+
this.avatarIcon = newValue;
|
|
70
|
+
break;
|
|
67
71
|
case PROFILE_CARD_CONSTANTS.attributes.AVATAR_IMAGE_URL:
|
|
68
72
|
this.avatarImageUrl = newValue;
|
|
69
73
|
break;
|
|
@@ -94,6 +98,9 @@ __decorate([
|
|
|
94
98
|
__decorate([
|
|
95
99
|
FoundationProperty()
|
|
96
100
|
], ProfileCardComponent.prototype, "avatarText", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
FoundationProperty()
|
|
103
|
+
], ProfileCardComponent.prototype, "avatarIcon", void 0);
|
|
97
104
|
__decorate([
|
|
98
105
|
FoundationProperty()
|
|
99
106
|
], ProfileCardComponent.prototype, "avatarImageUrl", void 0);
|
|
@@ -291,7 +291,12 @@ export class BaseSelectFoundation extends ListDropdownAwareFoundation {
|
|
|
291
291
|
}
|
|
292
292
|
if (this._multiple) {
|
|
293
293
|
if (this._selectedLabels.length) {
|
|
294
|
-
|
|
294
|
+
if (this._selectedLabels.length === 1) {
|
|
295
|
+
return this._selectedLabels[0];
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
return `${this._selectedLabels.length} options selected`;
|
|
299
|
+
}
|
|
295
300
|
}
|
|
296
301
|
else {
|
|
297
302
|
return '';
|
|
@@ -439,8 +444,8 @@ export class BaseSelectFoundation extends ListDropdownAwareFoundation {
|
|
|
439
444
|
this._filterTimeout = undefined;
|
|
440
445
|
}, 300);
|
|
441
446
|
this._options = this._adapter.getOptions();
|
|
442
|
-
// TODO
|
|
443
|
-
const matchedOption = this._flatOptions.find(option => !option.disabled && option.label.toLowerCase().startsWith(this._filterString));
|
|
447
|
+
// TODO: Enhance this to cycle through closest matches (see the native select)
|
|
448
|
+
const matchedOption = this._flatOptions.find(option => !option.disabled && option.label.toLowerCase().startsWith(this._filterString.toLowerCase()));
|
|
444
449
|
if (matchedOption) {
|
|
445
450
|
const optionIndex = this._flatOptions.indexOf(matchedOption);
|
|
446
451
|
if (this._open) {
|