@spartan-ng/brain 0.0.1-alpha.707 → 0.0.1-alpha.708
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/fesm2022/spartan-ng-brain-accordion.mjs +30 -30
- package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs +19 -19
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-autocomplete.mjs +89 -102
- package/fesm2022/spartan-ng-brain-autocomplete.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-avatar.mjs +15 -15
- package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-button.mjs +4 -4
- package/fesm2022/spartan-ng-brain-button.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-calendar.mjs +120 -127
- package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-checkbox.mjs +24 -24
- package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs +17 -17
- package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-combobox.mjs +151 -178
- package/fesm2022/spartan-ng-brain-combobox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-command.mjs +43 -52
- package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-core.mjs +5 -5
- package/fesm2022/spartan-ng-brain-core.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-date-time-luxon.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-date-time.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-dialog.mjs +72 -86
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-field.mjs +38 -43
- package/fesm2022/spartan-ng-brain-field.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-forms.mjs +20 -20
- package/fesm2022/spartan-ng-brain-forms.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-hover-card.mjs +24 -32
- package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input-otp.mjs +23 -25
- package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input.mjs +6 -6
- package/fesm2022/spartan-ng-brain-input.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-label.mjs +6 -6
- package/fesm2022/spartan-ng-brain-label.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs +49 -53
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-popover.mjs +13 -15
- package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-progress.mjs +11 -13
- package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-radio-group.mjs +28 -34
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-resizable.mjs +23 -23
- package/fesm2022/spartan-ng-brain-resizable.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +102 -105
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-separator.mjs +7 -7
- package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sheet.mjs +24 -24
- package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-slider.mjs +52 -76
- package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sonner.mjs +108 -132
- package/fesm2022/spartan-ng-brain-sonner.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-switch.mjs +21 -23
- package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tabs.mjs +36 -39
- package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-textarea.mjs +6 -6
- package/fesm2022/spartan-ng-brain-textarea.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle-group.mjs +21 -27
- package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle.mjs +10 -12
- package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tooltip.mjs +27 -27
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/hlm-tailwind-preset.css +6 -6
- package/package.json +44 -43
- package/{autocomplete/index.d.ts → types/spartan-ng-brain-autocomplete.d.ts} +10 -10
- package/{calendar/index.d.ts → types/spartan-ng-brain-calendar.d.ts} +2 -2
- package/{combobox/index.d.ts → types/spartan-ng-brain-combobox.d.ts} +10 -10
- package/{dialog/index.d.ts → types/spartan-ng-brain-dialog.d.ts} +1 -1
- package/{hover-card/index.d.ts → types/spartan-ng-brain-hover-card.d.ts} +1 -1
- package/{select/index.d.ts → types/spartan-ng-brain-select.d.ts} +11 -11
- /package/{accordion/index.d.ts → types/spartan-ng-brain-accordion.d.ts} +0 -0
- /package/{alert-dialog/index.d.ts → types/spartan-ng-brain-alert-dialog.d.ts} +0 -0
- /package/{avatar/index.d.ts → types/spartan-ng-brain-avatar.d.ts} +0 -0
- /package/{button/index.d.ts → types/spartan-ng-brain-button.d.ts} +0 -0
- /package/{checkbox/index.d.ts → types/spartan-ng-brain-checkbox.d.ts} +0 -0
- /package/{collapsible/index.d.ts → types/spartan-ng-brain-collapsible.d.ts} +0 -0
- /package/{command/index.d.ts → types/spartan-ng-brain-command.d.ts} +0 -0
- /package/{core/index.d.ts → types/spartan-ng-brain-core.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/spartan-ng-brain-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/spartan-ng-brain-date-time.d.ts} +0 -0
- /package/{field/index.d.ts → types/spartan-ng-brain-field.d.ts} +0 -0
- /package/{forms/index.d.ts → types/spartan-ng-brain-forms.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/spartan-ng-brain-input-otp.d.ts} +0 -0
- /package/{input/index.d.ts → types/spartan-ng-brain-input.d.ts} +0 -0
- /package/{label/index.d.ts → types/spartan-ng-brain-label.d.ts} +0 -0
- /package/{navigation-menu/index.d.ts → types/spartan-ng-brain-navigation-menu.d.ts} +0 -0
- /package/{popover/index.d.ts → types/spartan-ng-brain-popover.d.ts} +0 -0
- /package/{progress/index.d.ts → types/spartan-ng-brain-progress.d.ts} +0 -0
- /package/{radio-group/index.d.ts → types/spartan-ng-brain-radio-group.d.ts} +0 -0
- /package/{resizable/index.d.ts → types/spartan-ng-brain-resizable.d.ts} +0 -0
- /package/{separator/index.d.ts → types/spartan-ng-brain-separator.d.ts} +0 -0
- /package/{sheet/index.d.ts → types/spartan-ng-brain-sheet.d.ts} +0 -0
- /package/{slider/index.d.ts → types/spartan-ng-brain-slider.d.ts} +0 -0
- /package/{sonner/index.d.ts → types/spartan-ng-brain-sonner.d.ts} +0 -0
- /package/{switch/index.d.ts → types/spartan-ng-brain-switch.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/spartan-ng-brain-tabs.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/spartan-ng-brain-textarea.d.ts} +0 -0
- /package/{toggle-group/index.d.ts → types/spartan-ng-brain-toggle-group.d.ts} +0 -0
- /package/{toggle/index.d.ts → types/spartan-ng-brain-toggle.d.ts} +0 -0
- /package/{tooltip/index.d.ts → types/spartan-ng-brain-tooltip.d.ts} +0 -0
- /package/{index.d.ts → types/spartan-ng-brain.d.ts} +0 -0
|
@@ -74,12 +74,12 @@ class BrnComboboxContent {
|
|
|
74
74
|
_combobox = injectBrnComboboxBase();
|
|
75
75
|
el = inject(ElementRef);
|
|
76
76
|
/** Determine if the combobox has no visible items */
|
|
77
|
-
_isEmpty = computed(() => !this._combobox.visibleItems(), ...(ngDevMode ? [{ debugName: "_isEmpty" }] : []));
|
|
77
|
+
_isEmpty = computed(() => !this._combobox.visibleItems(), ...(ngDevMode ? [{ debugName: "_isEmpty" }] : /* istanbul ignore next */ []));
|
|
78
78
|
_comboboxWidth = this._combobox.searchInputWrapperWidth;
|
|
79
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
80
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
79
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
80
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxContent, isStandalone: true, selector: "[brnComboboxContent]", host: { properties: { "attr.data-empty": "_isEmpty() ? \"\" : null", "style.--brn-combobox-width.px": "_comboboxWidth()" } }, ngImport: i0 });
|
|
81
81
|
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxContent, decorators: [{
|
|
83
83
|
type: Directive,
|
|
84
84
|
args: [{
|
|
85
85
|
selector: '[brnComboboxContent]',
|
|
@@ -108,56 +108,48 @@ class BrnCombobox {
|
|
|
108
108
|
_brnPopover = inject(BrnPopover, { optional: true });
|
|
109
109
|
controlState = this._fieldControl?.controlState;
|
|
110
110
|
/** Whether the combobox is disabled */
|
|
111
|
-
disabled = input(false, ...(ngDevMode ?
|
|
112
|
-
_disabled = linkedSignal(this.disabled, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
111
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
112
|
+
_disabled = linkedSignal(this.disabled, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
113
113
|
/** @internal The disabled state as a readonly signal */
|
|
114
114
|
disabledState = this._disabled.asReadonly();
|
|
115
115
|
/** Options for filtering the combobox items */
|
|
116
|
-
filterOptions = input({}, ...(ngDevMode ? [{ debugName: "filterOptions" }] : []));
|
|
116
|
+
filterOptions = input({}, ...(ngDevMode ? [{ debugName: "filterOptions" }] : /* istanbul ignore next */ []));
|
|
117
117
|
/** @internal The collator used for string comparison */
|
|
118
118
|
collator = computed(() => {
|
|
119
119
|
const options = this.filterOptions();
|
|
120
120
|
const mergedOptions = { ...this._config.filterOptions, ...options };
|
|
121
121
|
return new Intl.Collator(options.locale, mergedOptions);
|
|
122
|
-
}, ...(ngDevMode ? [{ debugName: "collator" }] : []));
|
|
122
|
+
}, ...(ngDevMode ? [{ debugName: "collator" }] : /* istanbul ignore next */ []));
|
|
123
123
|
/** A function to compare an item with the selected value. */
|
|
124
|
-
isItemEqualToValue = input(this._config.isItemEqualToValue, ...(ngDevMode ? [{ debugName: "isItemEqualToValue" }] : []));
|
|
124
|
+
isItemEqualToValue = input(this._config.isItemEqualToValue, ...(ngDevMode ? [{ debugName: "isItemEqualToValue" }] : /* istanbul ignore next */ []));
|
|
125
125
|
/** A function to convert an item to a string for display. */
|
|
126
|
-
itemToString = input(this._config.itemToString, ...(ngDevMode ? [{ debugName: "itemToString" }] : []));
|
|
126
|
+
itemToString = input(this._config.itemToString, ...(ngDevMode ? [{ debugName: "itemToString" }] : /* istanbul ignore next */ []));
|
|
127
127
|
/** A custom filter function to use when searching. */
|
|
128
|
-
filter = input(this._config.filter, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
128
|
+
filter = input(this._config.filter, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
129
129
|
/** Whether to auto-highlight the first matching item. */
|
|
130
|
-
autoHighlight = input(this._config.autoHighlight, ...(ngDevMode ?
|
|
131
|
-
transform: booleanAttribute,
|
|
132
|
-
}]));
|
|
130
|
+
autoHighlight = input(this._config.autoHighlight, { ...(ngDevMode ? { debugName: "autoHighlight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
133
131
|
/** Whether to close the popover after selecting an item. */
|
|
134
|
-
closeOnSelect = input(this._config.closeOnSelect, ...(ngDevMode ?
|
|
135
|
-
transform: booleanAttribute,
|
|
136
|
-
}]));
|
|
132
|
+
closeOnSelect = input(this._config.closeOnSelect, { ...(ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
137
133
|
/** The selected value of the combobox. */
|
|
138
|
-
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
139
|
-
hasValue = computed(() => this.value() !== null, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
134
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
135
|
+
hasValue = computed(() => this.value() !== null && this.value() !== undefined, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
140
136
|
/** The current search query. */
|
|
141
|
-
search = model('', ...(ngDevMode ? [{ debugName: "search" }] : []));
|
|
142
|
-
_inputWidth = signal(null, ...(ngDevMode ? [{ debugName: "_inputWidth" }] : []));
|
|
137
|
+
search = model('', ...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
|
|
138
|
+
_inputWidth = signal(null, ...(ngDevMode ? [{ debugName: "_inputWidth" }] : /* istanbul ignore next */ []));
|
|
143
139
|
/** @internal The width of the search input wrapper */
|
|
144
140
|
searchInputWrapperWidth = this._inputWidth.asReadonly();
|
|
145
141
|
/** @internal Access all the items within the combobox */
|
|
146
|
-
items = contentChildren(BrnComboboxItemToken, ...(ngDevMode ?
|
|
147
|
-
|
|
148
|
-
}]));
|
|
149
|
-
_content = contentChild(BrnComboboxContent, ...(ngDevMode ? [{ debugName: "_content", descendants: true }] : [{
|
|
150
|
-
descendants: true,
|
|
151
|
-
}]));
|
|
142
|
+
items = contentChildren(BrnComboboxItemToken, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
|
|
143
|
+
_content = contentChild(BrnComboboxContent, { ...(ngDevMode ? { debugName: "_content" } : /* istanbul ignore next */ {}), descendants: true });
|
|
152
144
|
/** Determine if the combobox has any visible items */
|
|
153
|
-
visibleItems = computed(() => this.items().some((item) => item.visible()), ...(ngDevMode ? [{ debugName: "visibleItems" }] : []));
|
|
145
|
+
visibleItems = computed(() => this.items().some((item) => item.visible()), ...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
154
146
|
/** @internal The key manager for managing active descendant */
|
|
155
147
|
keyManager = new ActiveDescendantKeyManager(this.items, this._injector);
|
|
156
148
|
/** @internal Whether the combobox is expanded */
|
|
157
|
-
isExpanded = computed(() => this._brnPopover?.stateComputed() === 'open', ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
|
|
158
|
-
_comboboxInput = signal(undefined, ...(ngDevMode ? [{ debugName: "_comboboxInput" }] : []));
|
|
159
|
-
mode = computed(() => this._comboboxInput()?.mode() || 'combobox', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
160
|
-
labelableId = computed(() => this._comboboxInput()?.id(), ...(ngDevMode ? [{ debugName: "labelableId" }] : []));
|
|
149
|
+
isExpanded = computed(() => this._brnPopover?.stateComputed() === 'open', ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
|
|
150
|
+
_comboboxInput = signal(undefined, ...(ngDevMode ? [{ debugName: "_comboboxInput" }] : /* istanbul ignore next */ []));
|
|
151
|
+
mode = computed(() => this._comboboxInput()?.mode() || 'combobox', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
152
|
+
labelableId = computed(() => this._comboboxInput()?.id(), ...(ngDevMode ? [{ debugName: "labelableId" }] : /* istanbul ignore next */ []));
|
|
161
153
|
_onChange;
|
|
162
154
|
_onTouched;
|
|
163
155
|
constructor() {
|
|
@@ -261,10 +253,10 @@ class BrnCombobox {
|
|
|
261
253
|
return;
|
|
262
254
|
this._brnPopover?.close();
|
|
263
255
|
}
|
|
264
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
265
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
256
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCombobox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
257
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.16", type: BrnCombobox, isStandalone: true, selector: "[brnCombobox]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, isItemEqualToValue: { classPropertyName: "isItemEqualToValue", publicName: "isItemEqualToValue", isSignal: true, isRequired: false, transformFunction: null }, itemToString: { classPropertyName: "itemToString", publicName: "itemToString", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", search: "searchChange" }, host: { listeners: { "focusout": "_onFocusOut($event)" } }, providers: [BRN_COMBOBOX_VALUE_ACCESSOR, provideBrnComboboxBase(BrnCombobox), provideBrnLabelable(BrnCombobox)], queries: [{ propertyName: "items", predicate: BrnComboboxItemToken, descendants: true, isSignal: true }, { propertyName: "_content", first: true, predicate: BrnComboboxContent, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0 });
|
|
266
258
|
}
|
|
267
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCombobox, decorators: [{
|
|
268
260
|
type: Directive,
|
|
269
261
|
args: [{
|
|
270
262
|
selector: '[brnCombobox]',
|
|
@@ -301,10 +293,10 @@ class BrnComboboxAnchor {
|
|
|
301
293
|
return;
|
|
302
294
|
this._brnDialog.mutableAttachTo.set(this._host.nativeElement);
|
|
303
295
|
}
|
|
304
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
305
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
296
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxAnchor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
297
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxAnchor, isStandalone: true, selector: "[brnComboboxAnchor]", ngImport: i0 });
|
|
306
298
|
}
|
|
307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxAnchor, decorators: [{
|
|
308
300
|
type: Directive,
|
|
309
301
|
args: [{ selector: '[brnComboboxAnchor]' }]
|
|
310
302
|
}], ctorParameters: () => [] });
|
|
@@ -312,11 +304,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
312
304
|
class BrnComboboxChip {
|
|
313
305
|
_combobox = injectBrnComboboxBase();
|
|
314
306
|
_disabled = this._combobox.disabledState;
|
|
315
|
-
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
316
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
317
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
307
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
308
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxChip, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
309
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxChip, isStandalone: true, selector: "[brnComboboxChip]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "tabindex": "-1" }, properties: { "attr.data-disabled": "_disabled() ? \"\" : null", "attr.aria-disabled": "_disabled() ? \"true\" : null" } }, ngImport: i0 });
|
|
318
310
|
}
|
|
319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxChip, decorators: [{
|
|
320
312
|
type: Directive,
|
|
321
313
|
args: [{
|
|
322
314
|
selector: '[brnComboboxChip]',
|
|
@@ -333,18 +325,15 @@ class BrnComboboxChipInput {
|
|
|
333
325
|
_el = inject(ElementRef);
|
|
334
326
|
_combobox = injectBrnComboboxBase();
|
|
335
327
|
/** The id of the combobox input */
|
|
336
|
-
id = input(`brn-combobox-input-${++BrnComboboxChipInput._id}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
328
|
+
id = input(`brn-combobox-input-${++BrnComboboxChipInput._id}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
337
329
|
/** Manual override for aria-invalid. When not set, auto-detects from the parent combobox error state. */
|
|
338
|
-
ariaInvalidOverride = input(undefined, ...(ngDevMode ?
|
|
339
|
-
|
|
340
|
-
transform: (v) => (v === '' || v === undefined ? undefined : booleanAttribute(v)),
|
|
341
|
-
alias: 'aria-invalid',
|
|
342
|
-
}]));
|
|
330
|
+
ariaInvalidOverride = input(undefined, { ...(ngDevMode ? { debugName: "ariaInvalidOverride" } : /* istanbul ignore next */ {}), transform: (v) => (v === '' || v === undefined ? undefined : booleanAttribute(v)),
|
|
331
|
+
alias: 'aria-invalid' });
|
|
343
332
|
/** Computed aria-invalid: uses manual override if provided, otherwise reads from parent error state. */
|
|
344
|
-
_ariaInvalid = computed(() => this.ariaInvalidOverride() ?? this._combobox.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : []));
|
|
345
|
-
_dirty = computed(() => this._combobox.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : []));
|
|
346
|
-
_touched = computed(() => this._combobox.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : []));
|
|
347
|
-
_spartanInvalid = computed(() => this._combobox.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_spartanInvalid" }] : []));
|
|
333
|
+
_ariaInvalid = computed(() => this.ariaInvalidOverride() ?? this._combobox.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []));
|
|
334
|
+
_dirty = computed(() => this._combobox.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []));
|
|
335
|
+
_touched = computed(() => this._combobox.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
|
|
336
|
+
_spartanInvalid = computed(() => this._combobox.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_spartanInvalid" }] : /* istanbul ignore next */ []));
|
|
348
337
|
_disabled = this._combobox.disabledState;
|
|
349
338
|
/** Whether the combobox panel is expanded */
|
|
350
339
|
_isExpanded = this._combobox.isExpanded;
|
|
@@ -383,10 +372,10 @@ class BrnComboboxChipInput {
|
|
|
383
372
|
}
|
|
384
373
|
this._combobox.keyManager.onKeydown(event);
|
|
385
374
|
}
|
|
386
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
387
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
375
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxChipInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
376
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxChipInput, isStandalone: true, selector: "input[brnComboboxChipInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalidOverride: { classPropertyName: "ariaInvalidOverride", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "text", "role": "combobox", "autocomplete": "off", "autocorrect": "off", "autocapitalize": "none", "spellcheck": "false", "aria-autocomplete": "list", "aria-haspopup": "listbox" }, listeners: { "keydown": "onKeyDown($event)", "input": "onInput($event)" }, properties: { "id": "id()", "attr.aria-expanded": "_isExpanded()", "attr.aria-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-matches-spartan-invalid": "_spartanInvalid() ? \"true\" : null", "attr.data-dirty": "_touched() ? \"true\" : null", "attr.data-touched": "_touched() ? \"true\" : null", "attr.disabled": "_disabled() ? \"\" : null", "attr.data-disabled": "_disabled() ? \"\" : null" } }, ngImport: i0 });
|
|
388
377
|
}
|
|
389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxChipInput, decorators: [{
|
|
390
379
|
type: Directive,
|
|
391
380
|
args: [{
|
|
392
381
|
selector: 'input[brnComboboxChipInput]',
|
|
@@ -426,10 +415,10 @@ class BrnComboboxChipRemove {
|
|
|
426
415
|
const value = this._chip.value();
|
|
427
416
|
this._combobox.removeValue(value);
|
|
428
417
|
}
|
|
429
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
430
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
418
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxChipRemove, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
419
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxChipRemove, isStandalone: true, selector: "button[brnComboboxChipRemove]", host: { attributes: { "type": "button", "tabindex": "-1", "aria-disabled": "true" }, listeners: { "click": "removeChip($event)" }, properties: { "attr.data-disabled": "_disabled() ? \"\" : null", "attr.aria-disabled": "_disabled() ? \"true\" : null", "attr.disabled": "_disabled() ? \"\" : null" } }, ngImport: i0 });
|
|
431
420
|
}
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxChipRemove, decorators: [{
|
|
433
422
|
type: Directive,
|
|
434
423
|
args: [{
|
|
435
424
|
selector: 'button[brnComboboxChipRemove]',
|
|
@@ -459,7 +448,7 @@ class BrnComboboxClear {
|
|
|
459
448
|
else {
|
|
460
449
|
return this._combobox.search() !== '';
|
|
461
450
|
}
|
|
462
|
-
}, ...(ngDevMode ? [{ debugName: "_shouldShowClear" }] : []));
|
|
451
|
+
}, ...(ngDevMode ? [{ debugName: "_shouldShowClear" }] : /* istanbul ignore next */ []));
|
|
463
452
|
constructor() {
|
|
464
453
|
effect(() => {
|
|
465
454
|
this._viewContainerRef.clear();
|
|
@@ -483,10 +472,10 @@ class BrnComboboxClear {
|
|
|
483
472
|
this._combobox.resetSearch();
|
|
484
473
|
}
|
|
485
474
|
}
|
|
486
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
487
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
475
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxClear, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
476
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxClear, isStandalone: true, selector: "[brnComboboxClear]", ngImport: i0 });
|
|
488
477
|
}
|
|
489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxClear, decorators: [{
|
|
490
479
|
type: Directive,
|
|
491
480
|
args: [{
|
|
492
481
|
selector: '[brnComboboxClear]',
|
|
@@ -494,10 +483,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
494
483
|
}], ctorParameters: () => [] });
|
|
495
484
|
|
|
496
485
|
class BrnComboboxEmpty {
|
|
497
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
498
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
486
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxEmpty, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
487
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxEmpty, isStandalone: true, selector: "[brnComboboxEmpty]", host: { attributes: { "role": "status", "aria-live": "polite", "aria-atomic": "true" } }, ngImport: i0 });
|
|
499
488
|
}
|
|
500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxEmpty, decorators: [{
|
|
501
490
|
type: Directive,
|
|
502
491
|
args: [{
|
|
503
492
|
selector: '[brnComboboxEmpty]',
|
|
@@ -512,11 +501,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
512
501
|
class BrnComboboxLabel {
|
|
513
502
|
static _id = 0;
|
|
514
503
|
/** The id of the combobox label */
|
|
515
|
-
id = input(`brn-combobox-label-${++BrnComboboxLabel._id}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
516
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
517
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
504
|
+
id = input(`brn-combobox-label-${++BrnComboboxLabel._id}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
505
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
506
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxLabel, isStandalone: true, selector: "[brnComboboxLabel]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()" } }, ngImport: i0 });
|
|
518
507
|
}
|
|
519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxLabel, decorators: [{
|
|
520
509
|
type: Directive,
|
|
521
510
|
args: [{
|
|
522
511
|
selector: '[brnComboboxLabel]',
|
|
@@ -528,21 +517,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
528
517
|
|
|
529
518
|
class BrnComboboxGroup {
|
|
530
519
|
/** Get the items in the group */
|
|
531
|
-
_items = contentChildren(BrnComboboxItemToken, ...(ngDevMode ?
|
|
532
|
-
descendants: true,
|
|
533
|
-
}]));
|
|
520
|
+
_items = contentChildren(BrnComboboxItemToken, { ...(ngDevMode ? { debugName: "_items" } : /* istanbul ignore next */ {}), descendants: true });
|
|
534
521
|
/** Determine if there are any visible items in the group */
|
|
535
|
-
_visible = computed(() => this._items().some((item) => item.visible()), ...(ngDevMode ? [{ debugName: "_visible" }] : []));
|
|
522
|
+
_visible = computed(() => this._items().some((item) => item.visible()), ...(ngDevMode ? [{ debugName: "_visible" }] : /* istanbul ignore next */ []));
|
|
536
523
|
/** Get the label associated with the group */
|
|
537
|
-
_label = contentChild(BrnComboboxLabel, ...(ngDevMode ? [{ debugName: "_label" }] : []));
|
|
524
|
+
_label = contentChild(BrnComboboxLabel, ...(ngDevMode ? [{ debugName: "_label" }] : /* istanbul ignore next */ []));
|
|
538
525
|
_labelledBy = computed(() => {
|
|
539
526
|
const label = this._label();
|
|
540
527
|
return label ? label.id() : null;
|
|
541
|
-
}, ...(ngDevMode ? [{ debugName: "_labelledBy" }] : []));
|
|
542
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
543
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
528
|
+
}, ...(ngDevMode ? [{ debugName: "_labelledBy" }] : /* istanbul ignore next */ []));
|
|
529
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
530
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.16", type: BrnComboboxGroup, isStandalone: true, selector: "[brnComboboxGroup]", host: { attributes: { "role": "group" }, properties: { "attr.data-hidden": "!_visible() ? \"\" : null", "attr.aria-labelledby": "_labelledBy()" } }, queries: [{ propertyName: "_items", predicate: BrnComboboxItemToken, descendants: true, isSignal: true }, { propertyName: "_label", first: true, predicate: BrnComboboxLabel, descendants: true, isSignal: true }], ngImport: i0 });
|
|
544
531
|
}
|
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxGroup, decorators: [{
|
|
546
533
|
type: Directive,
|
|
547
534
|
args: [{
|
|
548
535
|
selector: '[brnComboboxGroup]',
|
|
@@ -561,25 +548,22 @@ class BrnComboboxInput {
|
|
|
561
548
|
_el = inject(ElementRef);
|
|
562
549
|
_combobox = injectBrnComboboxBase();
|
|
563
550
|
_content = inject(BrnComboboxContent, { optional: true });
|
|
564
|
-
mode = computed(() => (this._content ? 'popup' : 'combobox'), ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
551
|
+
mode = computed(() => (this._content ? 'popup' : 'combobox'), ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
565
552
|
/** The id of the combobox input */
|
|
566
|
-
id = input(`brn-combobox-input-${++BrnComboboxInput._id}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
553
|
+
id = input(`brn-combobox-input-${++BrnComboboxInput._id}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
567
554
|
/** Manual override for aria-invalid. When not set, auto-detects from the parent combobox error state. */
|
|
568
|
-
ariaInvalidOverride = input(undefined, ...(ngDevMode ?
|
|
569
|
-
|
|
570
|
-
transform: (v) => (v === '' || v === undefined ? undefined : booleanAttribute(v)),
|
|
571
|
-
alias: 'aria-invalid',
|
|
572
|
-
}]));
|
|
555
|
+
ariaInvalidOverride = input(undefined, { ...(ngDevMode ? { debugName: "ariaInvalidOverride" } : /* istanbul ignore next */ {}), transform: (v) => (v === '' || v === undefined ? undefined : booleanAttribute(v)),
|
|
556
|
+
alias: 'aria-invalid' });
|
|
573
557
|
/** Forces the invalid state visually, regardless of form control state. */
|
|
574
|
-
forceInvalid = input(false, ...(ngDevMode ?
|
|
558
|
+
forceInvalid = input(false, { ...(ngDevMode ? { debugName: "forceInvalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
575
559
|
disabled = this._combobox.disabledState;
|
|
576
560
|
/** Whether the combobox panel is expanded */
|
|
577
561
|
_isExpanded = this._combobox.isExpanded;
|
|
578
562
|
/** Computed aria-invalid: uses manual override if provided, otherwise reads from parent error state. */
|
|
579
|
-
_ariaInvalid = computed(() => this.ariaInvalidOverride() ?? this._combobox.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : []));
|
|
580
|
-
_dirty = computed(() => this._combobox.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : []));
|
|
581
|
-
_touched = computed(() => this._combobox.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : []));
|
|
582
|
-
_spartanInvalid = computed(() => this.forceInvalid() || this._combobox.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_spartanInvalid" }] : []));
|
|
563
|
+
_ariaInvalid = computed(() => this.ariaInvalidOverride() ?? this._combobox.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []));
|
|
564
|
+
_dirty = computed(() => this._combobox.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []));
|
|
565
|
+
_touched = computed(() => this._combobox.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
|
|
566
|
+
_spartanInvalid = computed(() => this.forceInvalid() || this._combobox.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_spartanInvalid" }] : /* istanbul ignore next */ []));
|
|
583
567
|
constructor() {
|
|
584
568
|
this._combobox.registerComboboxInput?.(this);
|
|
585
569
|
effect(() => {
|
|
@@ -627,10 +611,10 @@ class BrnComboboxInput {
|
|
|
627
611
|
}
|
|
628
612
|
this._combobox.keyManager.onKeydown(event);
|
|
629
613
|
}
|
|
630
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
631
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
614
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
615
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxInput, isStandalone: true, selector: "input[brnComboboxInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalidOverride: { classPropertyName: "ariaInvalidOverride", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, forceInvalid: { classPropertyName: "forceInvalid", publicName: "forceInvalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "text", "role": "combobox", "autocomplete": "off", "autocorrect": "off", "autocapitalize": "none", "spellcheck": "false", "aria-autocomplete": "list", "aria-haspopup": "listbox" }, listeners: { "keydown": "onKeyDown($event)", "input": "onInput($event)" }, properties: { "id": "id()", "attr.aria-expanded": "_isExpanded()", "attr.aria-invalid": "_ariaInvalid() ? \"true\": null", "attr.data-invalid": "_ariaInvalid() ? \"true\": null", "attr.data-matches-spartan-invalid": "_spartanInvalid() ? \"true\": null", "attr.data-touched": "_touched() ? \"true\": null", "attr.data-dirty": "_dirty() ? \"true\": null", "attr.disabled": "disabled() ? \"\" : null" } }, exportAs: ["brnComboboxInput"], ngImport: i0 });
|
|
632
616
|
}
|
|
633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxInput, decorators: [{
|
|
634
618
|
type: Directive,
|
|
635
619
|
args: [{
|
|
636
620
|
selector: 'input[brnComboboxInput]',
|
|
@@ -665,26 +649,23 @@ class BrnComboboxItem {
|
|
|
665
649
|
/** Access the combobox component */
|
|
666
650
|
_combobox = injectBrnComboboxBase();
|
|
667
651
|
/** A unique id for the item */
|
|
668
|
-
id = input(`brn-combobox-item-${++BrnComboboxItem._id}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
652
|
+
id = input(`brn-combobox-item-${++BrnComboboxItem._id}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
669
653
|
/** The value this item represents. */
|
|
670
|
-
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
654
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
671
655
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
672
|
-
_disabled = input(false, ...(ngDevMode ?
|
|
673
|
-
|
|
674
|
-
alias: 'disabled',
|
|
675
|
-
transform: booleanAttribute,
|
|
676
|
-
}]));
|
|
656
|
+
_disabled = input(false, { ...(ngDevMode ? { debugName: "_disabled" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
657
|
+
transform: booleanAttribute });
|
|
677
658
|
/** Expose disabled as a value - used by the Highlightable interface */
|
|
678
659
|
get disabled() {
|
|
679
660
|
return this._disabled();
|
|
680
661
|
}
|
|
681
662
|
/** Whether the item is selected. */
|
|
682
|
-
active = computed(() => this._combobox.isSelected(this.value()), ...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
683
|
-
_highlighted = signal(false, ...(ngDevMode ? [{ debugName: "_highlighted" }] : []));
|
|
663
|
+
active = computed(() => this._combobox.isSelected(this.value()), ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
664
|
+
_highlighted = signal(false, ...(ngDevMode ? [{ debugName: "_highlighted" }] : /* istanbul ignore next */ []));
|
|
684
665
|
/** @internal Determine if this item is visible based on the current search query */
|
|
685
666
|
visible = computed(() => {
|
|
686
667
|
return this._combobox.filter()(this.value(), this._combobox.search(), this._combobox.collator(), this._combobox.itemToString());
|
|
687
|
-
}, ...(ngDevMode ? [{ debugName: "visible" }] : []));
|
|
668
|
+
}, ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
688
669
|
setActiveStyles() {
|
|
689
670
|
this._highlighted.set(true);
|
|
690
671
|
// ensure the item is in view
|
|
@@ -711,10 +692,10 @@ class BrnComboboxItem {
|
|
|
711
692
|
}
|
|
712
693
|
this._combobox.keyManager.setActiveItem(this);
|
|
713
694
|
}
|
|
714
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
715
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
695
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
696
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxItem, isStandalone: true, selector: "[brnComboboxItem]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "option" }, listeners: { "click": "select()", "mouseenter": "activate()" }, properties: { "id": "id()", "attr.data-highlighted": "_highlighted() ? \"\" : null", "attr.data-value": "value()", "attr.data-hidden": "!visible() ? '' : null", "attr.aria-selected": "active()", "attr.aria-disabled": "_disabled()", "attr.data-disabled": "_disabled() ? \"\" : null" } }, providers: [provideBrnComboboxItem(BrnComboboxItem)], ngImport: i0 });
|
|
716
697
|
}
|
|
717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxItem, decorators: [{
|
|
718
699
|
type: Directive,
|
|
719
700
|
args: [{
|
|
720
701
|
selector: '[brnComboboxItem]',
|
|
@@ -740,11 +721,11 @@ class BrnComboboxList {
|
|
|
740
721
|
/** Determine if the combobox has any visible items */
|
|
741
722
|
_visibleItems = this._combobox.visibleItems;
|
|
742
723
|
/** The id of the combobox list */
|
|
743
|
-
id = input(`brn-combobox-list-${++BrnComboboxList._id}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
744
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
745
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
724
|
+
id = input(`brn-combobox-list-${++BrnComboboxList._id}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
725
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
726
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxList, isStandalone: true, selector: "[brnComboboxList]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox", "tabIndex": "-1", "aria-orientation": "vertical" }, properties: { "id": "id()", "attr.data-empty": "!_visibleItems() ? \"\" : null" } }, ngImport: i0 });
|
|
746
727
|
}
|
|
747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxList, decorators: [{
|
|
748
729
|
type: Directive,
|
|
749
730
|
args: [{
|
|
750
731
|
selector: '[brnComboboxList]',
|
|
@@ -771,61 +752,53 @@ class BrnComboboxMultiple {
|
|
|
771
752
|
_brnPopover = inject(BrnPopover, { optional: true });
|
|
772
753
|
controlState = this._fieldControl?.controlState;
|
|
773
754
|
/** Whether the combobox is disabled */
|
|
774
|
-
disabled = input(false, ...(ngDevMode ?
|
|
775
|
-
_disabled = linkedSignal(this.disabled, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
755
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
756
|
+
_disabled = linkedSignal(this.disabled, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
776
757
|
/** @internal The disabled state as a readonly signal */
|
|
777
758
|
disabledState = this._disabled.asReadonly();
|
|
778
759
|
/** Options for filtering the combobox items */
|
|
779
|
-
filterOptions = input({}, ...(ngDevMode ? [{ debugName: "filterOptions" }] : []));
|
|
760
|
+
filterOptions = input({}, ...(ngDevMode ? [{ debugName: "filterOptions" }] : /* istanbul ignore next */ []));
|
|
780
761
|
/** @internal The collator used for string comparison */
|
|
781
762
|
collator = computed(() => {
|
|
782
763
|
const options = this.filterOptions();
|
|
783
764
|
const mergedOptions = { ...this._config.filterOptions, ...options };
|
|
784
765
|
return new Intl.Collator(options.locale, mergedOptions);
|
|
785
|
-
}, ...(ngDevMode ? [{ debugName: "collator" }] : []));
|
|
766
|
+
}, ...(ngDevMode ? [{ debugName: "collator" }] : /* istanbul ignore next */ []));
|
|
786
767
|
/** A function to compare an item with the selected value. */
|
|
787
|
-
isItemEqualToValue = input(this._config.isItemEqualToValue, ...(ngDevMode ? [{ debugName: "isItemEqualToValue" }] : []));
|
|
768
|
+
isItemEqualToValue = input(this._config.isItemEqualToValue, ...(ngDevMode ? [{ debugName: "isItemEqualToValue" }] : /* istanbul ignore next */ []));
|
|
788
769
|
/** A function to convert an item to a string for display. */
|
|
789
|
-
itemToString = input(this._config.itemToString, ...(ngDevMode ? [{ debugName: "itemToString" }] : []));
|
|
770
|
+
itemToString = input(this._config.itemToString, ...(ngDevMode ? [{ debugName: "itemToString" }] : /* istanbul ignore next */ []));
|
|
790
771
|
/** A custom filter function to use when searching. */
|
|
791
|
-
filter = input(this._config.filter, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
772
|
+
filter = input(this._config.filter, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
792
773
|
/** Whether to auto-highlight the first matching item. */
|
|
793
|
-
autoHighlight = input(this._config.autoHighlight, ...(ngDevMode ?
|
|
794
|
-
transform: booleanAttribute,
|
|
795
|
-
}]));
|
|
774
|
+
autoHighlight = input(this._config.autoHighlight, { ...(ngDevMode ? { debugName: "autoHighlight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
796
775
|
/** Whether to reset the search and close the popover after selecting an item when the search is active. */
|
|
797
|
-
closeOnSelect = input(this._config.closeOnSelect, ...(ngDevMode ?
|
|
798
|
-
transform: booleanAttribute,
|
|
799
|
-
}]));
|
|
776
|
+
closeOnSelect = input(this._config.closeOnSelect, { ...(ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
800
777
|
/** The selected values of the combobox. */
|
|
801
|
-
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
778
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
802
779
|
hasValue = computed(() => {
|
|
803
780
|
const value = this.value();
|
|
804
|
-
if (value
|
|
781
|
+
if (value === null || value === undefined)
|
|
805
782
|
return false;
|
|
806
783
|
return value.length > 0;
|
|
807
|
-
}, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
784
|
+
}, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
808
785
|
/** The current search query. */
|
|
809
|
-
search = model('', ...(ngDevMode ? [{ debugName: "search" }] : []));
|
|
810
|
-
_inputWidth = signal(null, ...(ngDevMode ? [{ debugName: "_inputWidth" }] : []));
|
|
786
|
+
search = model('', ...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
|
|
787
|
+
_inputWidth = signal(null, ...(ngDevMode ? [{ debugName: "_inputWidth" }] : /* istanbul ignore next */ []));
|
|
811
788
|
/** @internal The width of the search input wrapper */
|
|
812
789
|
searchInputWrapperWidth = this._inputWidth.asReadonly();
|
|
813
790
|
/** @internal Access all the items within the combobox */
|
|
814
|
-
items = contentChildren(BrnComboboxItemToken, ...(ngDevMode ?
|
|
815
|
-
|
|
816
|
-
}]));
|
|
817
|
-
_content = contentChild(BrnComboboxContent, ...(ngDevMode ? [{ debugName: "_content", descendants: true }] : [{
|
|
818
|
-
descendants: true,
|
|
819
|
-
}]));
|
|
791
|
+
items = contentChildren(BrnComboboxItemToken, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
|
|
792
|
+
_content = contentChild(BrnComboboxContent, { ...(ngDevMode ? { debugName: "_content" } : /* istanbul ignore next */ {}), descendants: true });
|
|
820
793
|
/** Determine if the combobox has any visible items */
|
|
821
|
-
visibleItems = computed(() => this.items().some((item) => item.visible()), ...(ngDevMode ? [{ debugName: "visibleItems" }] : []));
|
|
794
|
+
visibleItems = computed(() => this.items().some((item) => item.visible()), ...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
822
795
|
/** @internal The key manager for managing active descendant */
|
|
823
796
|
keyManager = new ActiveDescendantKeyManager(this.items, this._injector);
|
|
824
797
|
/** @internal Whether the autocomplete is expanded */
|
|
825
|
-
isExpanded = computed(() => this._brnPopover?.stateComputed() === 'open', ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
|
|
826
|
-
_comboboxChipInput = signal(undefined, ...(ngDevMode ? [{ debugName: "_comboboxChipInput" }] : []));
|
|
798
|
+
isExpanded = computed(() => this._brnPopover?.stateComputed() === 'open', ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
|
|
799
|
+
_comboboxChipInput = signal(undefined, ...(ngDevMode ? [{ debugName: "_comboboxChipInput" }] : /* istanbul ignore next */ []));
|
|
827
800
|
mode = signal('combobox').asReadonly();
|
|
828
|
-
labelableId = computed(() => this._comboboxChipInput()?.id(), ...(ngDevMode ? [{ debugName: "labelableId" }] : []));
|
|
801
|
+
labelableId = computed(() => this._comboboxChipInput()?.id(), ...(ngDevMode ? [{ debugName: "labelableId" }] : /* istanbul ignore next */ []));
|
|
829
802
|
_onChange;
|
|
830
803
|
_onTouched;
|
|
831
804
|
constructor() {
|
|
@@ -943,14 +916,14 @@ class BrnComboboxMultiple {
|
|
|
943
916
|
setDisabledState(isDisabled) {
|
|
944
917
|
this._disabled.set(isDisabled);
|
|
945
918
|
}
|
|
946
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
947
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
919
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxMultiple, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
920
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.16", type: BrnComboboxMultiple, isStandalone: true, selector: "[brnCombobox]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, isItemEqualToValue: { classPropertyName: "isItemEqualToValue", publicName: "isItemEqualToValue", isSignal: true, isRequired: false, transformFunction: null }, itemToString: { classPropertyName: "itemToString", publicName: "itemToString", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", search: "searchChange" }, host: { listeners: { "focusout": "_onFocusOut($event)" } }, providers: [
|
|
948
921
|
BRN_COMBOBOX_MULTIPLE_VALUE_ACCESSOR,
|
|
949
922
|
provideBrnComboboxBase(BrnComboboxMultiple),
|
|
950
923
|
provideBrnLabelable(BrnComboboxMultiple),
|
|
951
924
|
], queries: [{ propertyName: "items", predicate: BrnComboboxItemToken, descendants: true, isSignal: true }, { propertyName: "_content", first: true, predicate: BrnComboboxContent, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0 });
|
|
952
925
|
}
|
|
953
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxMultiple, decorators: [{
|
|
954
927
|
type: Directive,
|
|
955
928
|
args: [{
|
|
956
929
|
selector: '[brnCombobox]',
|
|
@@ -973,10 +946,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
973
946
|
class BrnComboboxPlaceholder {
|
|
974
947
|
_combobox = injectBrnComboboxBase();
|
|
975
948
|
_hasValue = this._combobox.hasValue;
|
|
976
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
977
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
949
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
950
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxPlaceholder, isStandalone: true, selector: "[brnComboboxPlaceholder]", host: { properties: { "attr.data-hidden": "_hasValue() ? \"\" : null" } }, ngImport: i0 });
|
|
978
951
|
}
|
|
979
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxPlaceholder, decorators: [{
|
|
980
953
|
type: Directive,
|
|
981
954
|
args: [{
|
|
982
955
|
selector: '[brnComboboxPlaceholder]',
|
|
@@ -994,10 +967,10 @@ class BrnComboboxPopoverTrigger {
|
|
|
994
967
|
return;
|
|
995
968
|
this._brnDialog?.open();
|
|
996
969
|
}
|
|
997
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
998
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
970
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxPopoverTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
971
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxPopoverTrigger, isStandalone: true, selector: "[brnComboboxPopoverTrigger]", host: { listeners: { "click": "open()" } }, ngImport: i0 });
|
|
999
972
|
}
|
|
1000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxPopoverTrigger, decorators: [{
|
|
1001
974
|
type: Directive,
|
|
1002
975
|
args: [{
|
|
1003
976
|
selector: '[brnComboboxPopoverTrigger]',
|
|
@@ -1008,11 +981,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
1008
981
|
}] });
|
|
1009
982
|
|
|
1010
983
|
class BrnComboboxSeparator {
|
|
1011
|
-
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
1012
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1013
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
984
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
985
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
986
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxSeparator, isStandalone: true, selector: "[brnComboboxSeparator]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "attr.aria-orientation": "orientation()", "attr.data-orientation": "orientation()" } }, ngImport: i0 });
|
|
1014
987
|
}
|
|
1015
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
988
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxSeparator, decorators: [{
|
|
1016
989
|
type: Directive,
|
|
1017
990
|
args: [{
|
|
1018
991
|
selector: '[brnComboboxSeparator]',
|
|
@@ -1025,10 +998,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
1025
998
|
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
|
|
1026
999
|
|
|
1027
1000
|
class BrnComboboxStatus {
|
|
1028
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1029
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1001
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxStatus, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1002
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxStatus, isStandalone: true, selector: "[brnComboboxStatus]", host: { attributes: { "role": "status", "aria-live": "polite", "aria-atomic": "true" } }, ngImport: i0 });
|
|
1030
1003
|
}
|
|
1031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxStatus, decorators: [{
|
|
1032
1005
|
type: Directive,
|
|
1033
1006
|
args: [{
|
|
1034
1007
|
selector: '[brnComboboxStatus]',
|
|
@@ -1044,21 +1017,21 @@ class BrnComboboxTrigger {
|
|
|
1044
1017
|
_combobox = injectBrnComboboxBase();
|
|
1045
1018
|
_isExpanded = this._combobox.isExpanded;
|
|
1046
1019
|
_disabled = this._combobox.disabledState;
|
|
1047
|
-
_isPlaceholder = computed(() => !this._combobox.hasValue(), ...(ngDevMode ? [{ debugName: "_isPlaceholder" }] : []));
|
|
1048
|
-
_ariaInvalid = computed(() => this._combobox.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : []));
|
|
1049
|
-
_dirty = computed(() => this._combobox.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : []));
|
|
1050
|
-
_touched = computed(() => this._combobox.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : []));
|
|
1051
|
-
_spartanInvalid = computed(() => this._combobox.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_spartanInvalid" }] : []));
|
|
1020
|
+
_isPlaceholder = computed(() => !this._combobox.hasValue(), ...(ngDevMode ? [{ debugName: "_isPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1021
|
+
_ariaInvalid = computed(() => this._combobox.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []));
|
|
1022
|
+
_dirty = computed(() => this._combobox.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []));
|
|
1023
|
+
_touched = computed(() => this._combobox.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
|
|
1024
|
+
_spartanInvalid = computed(() => this._combobox.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_spartanInvalid" }] : /* istanbul ignore next */ []));
|
|
1052
1025
|
/** Listen for keydown events */
|
|
1053
1026
|
onKeyDown(event) {
|
|
1054
1027
|
if (!this._combobox.isExpanded() && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
|
|
1055
1028
|
this._combobox.open();
|
|
1056
1029
|
}
|
|
1057
1030
|
}
|
|
1058
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1059
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1031
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1032
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxTrigger, isStandalone: true, selector: "button[brnComboboxTrigger]", host: { attributes: { "type": "button", "role": "combobox", "aria-haspopup": "dialog" }, listeners: { "keydown": "onKeyDown($event)" }, properties: { "attr.aria-expanded": "_isExpanded() ? \"true\" : \"false\"", "attr.aria-disabled": "_disabled() ? \"true\" : null", "attr.disabled": "_disabled() ? \"\" : null", "attr.data-placeholder": "_isPlaceholder() ? \"\" : null", "attr.aria-invalid": " _ariaInvalid() ? \"true\": null", "attr.data-invalid": " _ariaInvalid() ? \"true\": null", "attr.data-matches-spartan-invalid": " _spartanInvalid() ? \"true\": null", "attr.data-touched": " _touched() ? \"true\": null", "attr.data-dirty": " _dirty() ? \"true\": null" } }, ngImport: i0 });
|
|
1060
1033
|
}
|
|
1061
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1034
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxTrigger, decorators: [{
|
|
1062
1035
|
type: Directive,
|
|
1063
1036
|
args: [{
|
|
1064
1037
|
selector: 'button[brnComboboxTrigger]',
|
|
@@ -1082,18 +1055,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
1082
1055
|
|
|
1083
1056
|
class BrnComboboxValue {
|
|
1084
1057
|
_combobox = injectBrnComboboxBase();
|
|
1085
|
-
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
1086
|
-
_isPlaceholder = computed(() => !this._combobox.hasValue(), ...(ngDevMode ? [{ debugName: "_isPlaceholder" }] : []));
|
|
1087
|
-
hidden = computed(() => !this._combobox.hasValue() && !this.placeholder(), ...(ngDevMode ? [{ debugName: "hidden" }] : []));
|
|
1058
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1059
|
+
_isPlaceholder = computed(() => !this._combobox.hasValue(), ...(ngDevMode ? [{ debugName: "_isPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1060
|
+
hidden = computed(() => !this._combobox.hasValue() && !this.placeholder(), ...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
|
|
1088
1061
|
_value = computed(() => {
|
|
1089
1062
|
return this._combobox.hasValue()
|
|
1090
1063
|
? stringifyAsLabel(this._combobox.value(), this._combobox.itemToString())
|
|
1091
1064
|
: this.placeholder();
|
|
1092
|
-
}, ...(ngDevMode ? [{ debugName: "_value" }] : []));
|
|
1093
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1094
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1065
|
+
}, ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
1066
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxValue, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1067
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnComboboxValue, isStandalone: true, selector: "[brnComboboxValue]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-placeholder": "_isPlaceholder() ? \"\" : null", "attr.data-hidden": "hidden() ? \"\" : null", "textContent": "_value()" } }, ngImport: i0 });
|
|
1095
1068
|
}
|
|
1096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxValue, decorators: [{
|
|
1097
1070
|
type: Directive,
|
|
1098
1071
|
args: [{
|
|
1099
1072
|
selector: '[brnComboboxValue]',
|
|
@@ -1115,7 +1088,7 @@ class BrnComboboxValueTemplate {
|
|
|
1115
1088
|
return null;
|
|
1116
1089
|
}
|
|
1117
1090
|
return value;
|
|
1118
|
-
}, ...(ngDevMode ? [{ debugName: "_value" }] : []));
|
|
1091
|
+
}, ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
1119
1092
|
constructor() {
|
|
1120
1093
|
effect(() => {
|
|
1121
1094
|
const value = this._value();
|
|
@@ -1130,10 +1103,10 @@ class BrnComboboxValueTemplate {
|
|
|
1130
1103
|
}
|
|
1131
1104
|
});
|
|
1132
1105
|
}
|
|
1133
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1134
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1106
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxValueTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1107
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxValueTemplate, isStandalone: true, selector: "[brnComboboxValueTemplate]", ngImport: i0 });
|
|
1135
1108
|
}
|
|
1136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxValueTemplate, decorators: [{
|
|
1137
1110
|
type: Directive,
|
|
1138
1111
|
args: [{
|
|
1139
1112
|
selector: '[brnComboboxValueTemplate]',
|
|
@@ -1146,11 +1119,11 @@ class BrnComboboxValues {
|
|
|
1146
1119
|
_combobox = injectBrnComboboxBase();
|
|
1147
1120
|
_values = computed(() => {
|
|
1148
1121
|
const values = this._combobox.value();
|
|
1149
|
-
if (values
|
|
1122
|
+
if (values === null || values === undefined) {
|
|
1150
1123
|
return null;
|
|
1151
1124
|
}
|
|
1152
1125
|
return Array.isArray(values) ? values : [values];
|
|
1153
|
-
}, ...(ngDevMode ? [{ debugName: "_values" }] : []));
|
|
1126
|
+
}, ...(ngDevMode ? [{ debugName: "_values" }] : /* istanbul ignore next */ []));
|
|
1154
1127
|
constructor() {
|
|
1155
1128
|
effect(() => {
|
|
1156
1129
|
const values = this._values();
|
|
@@ -1165,10 +1138,10 @@ class BrnComboboxValues {
|
|
|
1165
1138
|
}
|
|
1166
1139
|
});
|
|
1167
1140
|
}
|
|
1168
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1169
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1141
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxValues, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1142
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnComboboxValues, isStandalone: true, selector: "[brnComboboxValues]", ngImport: i0 });
|
|
1170
1143
|
}
|
|
1171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnComboboxValues, decorators: [{
|
|
1172
1145
|
type: Directive,
|
|
1173
1146
|
args: [{
|
|
1174
1147
|
selector: '[brnComboboxValues]',
|