@sevtech/kit 21.3.1 → 21.3.3
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/ui-yoda.mjs +68 -30
- package/fesm2022/ui-yoda.mjs.map +1 -1
- package/package.json +1 -1
- package/ui/yoda/index.d.ts +17 -4
- package/ui/yoda/primeng.scss +2 -1
package/fesm2022/ui-yoda.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, signal, computed, contentChild, TemplateRef, Directive, booleanAttribute, numberAttribute, ElementRef, viewChild, input, output, Renderer2, effect, ChangeDetectionStrategy, Component, linkedSignal, DestroyRef, afterNextRender, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
-
import { map, Subject, debounce, timer, filter, tap, switchMap, exhaustMap, defer,
|
|
3
|
+
import { map, catchError, Subject, debounce, timer, filter, tap, switchMap, exhaustMap, defer, EMPTY } from 'rxjs';
|
|
4
4
|
import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { NgControl } from '@angular/forms';
|
|
6
|
-
import { isDefined, isFunction, isString, isArray,
|
|
6
|
+
import { isDefined, isFunction, isString, isArray, isNonEmptyString, isNil, isNonEmptyArray, isEmptyArray, noop, resolveMaybeFn, objectKeys } from '@sevtech/kit/misc';
|
|
7
7
|
import { NgTemplateOutlet } from '@angular/common';
|
|
8
8
|
import { SlotOutletDirective, HighlightPipe } from '@sevtech/kit/ui';
|
|
9
9
|
import { cssDimensionAttribute, htmlBooleanAttribute, defineKitFeature, resolveConfigProviders, collectFeatureProviders } from '@sevtech/kit/ng-misc';
|
|
@@ -69,6 +69,8 @@ const DEFAULT_CONFIG = {
|
|
|
69
69
|
loopScroll: true,
|
|
70
70
|
autoSelect: true,
|
|
71
71
|
autoSelectClose: true,
|
|
72
|
+
labelToInput: false,
|
|
73
|
+
seedList: true,
|
|
72
74
|
scrollHeight: '200px',
|
|
73
75
|
show: {
|
|
74
76
|
hint: false,
|
|
@@ -117,10 +119,10 @@ var RequestType;
|
|
|
117
119
|
})(RequestType || (RequestType = {}));
|
|
118
120
|
|
|
119
121
|
class YodaError extends Error {
|
|
120
|
-
constructor(query, causeOrType) {
|
|
122
|
+
constructor(query, causeOrType, cause) {
|
|
121
123
|
const reason = computeReason(causeOrType);
|
|
122
124
|
super(computeMessage(reason, query, causeOrType), {
|
|
123
|
-
cause: reason === 'request' ? causeOrType : undefined,
|
|
125
|
+
cause: cause ?? (reason === 'request' ? causeOrType : undefined),
|
|
124
126
|
});
|
|
125
127
|
this.name = 'YodaError';
|
|
126
128
|
this.query = query;
|
|
@@ -148,7 +150,7 @@ function computeMessage(reason, query, cause) {
|
|
|
148
150
|
return `[YODA]: form value "${query}" did not resolve`;
|
|
149
151
|
default: {
|
|
150
152
|
return cause instanceof Error || cause instanceof HttpErrorResponse
|
|
151
|
-
? `[YODA]: request "${query}" failed
|
|
153
|
+
? `[YODA]: request "${query}" failed - ${cause.message}`
|
|
152
154
|
: '[YODA]: unknown error';
|
|
153
155
|
}
|
|
154
156
|
}
|
|
@@ -162,9 +164,11 @@ class ApiService {
|
|
|
162
164
|
}
|
|
163
165
|
request(data) {
|
|
164
166
|
const { url, params } = this.resolveEndpoint(data);
|
|
165
|
-
return this.httpClient
|
|
166
|
-
.
|
|
167
|
-
|
|
167
|
+
return this.httpClient.get(url, { params }).pipe(map((rows) => this.parseResponse(rows, data)), catchError((error) => {
|
|
168
|
+
throw data.type === RequestType.Create
|
|
169
|
+
? new YodaError(data.query, data.type, error)
|
|
170
|
+
: new YodaError(data.query, error);
|
|
171
|
+
}));
|
|
168
172
|
}
|
|
169
173
|
resolveEndpoint(data) {
|
|
170
174
|
const params = toRequestParams(data);
|
|
@@ -218,11 +222,13 @@ function isGroupOption(option) {
|
|
|
218
222
|
}
|
|
219
223
|
function parseResponseRaw(row, formatLabel) {
|
|
220
224
|
const [value, label, ...payload] = row;
|
|
225
|
+
const optionLabel = isFunction(formatLabel) ? formatLabel(...row) : undefined;
|
|
221
226
|
return {
|
|
222
227
|
value,
|
|
228
|
+
label,
|
|
223
229
|
payload,
|
|
224
230
|
kind: 'option',
|
|
225
|
-
|
|
231
|
+
optionLabel: isNonEmptyString(optionLabel) ? optionLabel : undefined,
|
|
226
232
|
};
|
|
227
233
|
}
|
|
228
234
|
function toRequestParams({ action, repository, type, query, parent }) {
|
|
@@ -246,6 +252,7 @@ class StateService {
|
|
|
246
252
|
this.selectedSource = signal(null, ...(ngDevMode ? [{ debugName: "selectedSource" }] : []));
|
|
247
253
|
this.createdSource = signal(null, ...(ngDevMode ? [{ debugName: "createdSource" }] : []));
|
|
248
254
|
this.matchSource = signal(matchByLabel, ...(ngDevMode ? [{ debugName: "matchSource" }] : []));
|
|
255
|
+
this.blank = null;
|
|
249
256
|
this.query$$ = this.querySource.asReadonly();
|
|
250
257
|
this.selected$$ = this.selectedSource.asReadonly();
|
|
251
258
|
this.isOpen$$ = this.openSource.asReadonly();
|
|
@@ -283,8 +290,14 @@ class StateService {
|
|
|
283
290
|
this.fetch$.next(buildRequest(query, type, 'options', options));
|
|
284
291
|
}
|
|
285
292
|
resolve(value, options) {
|
|
293
|
+
/* Стор обязан совпасть с формой до ответа: иначе поле показывает прошлый выбор, а цепочка не видит родителя */
|
|
294
|
+
this.blank = buildBlankOption(value);
|
|
295
|
+
this.select(this.blank);
|
|
286
296
|
this.fetch$.next(buildRequest(value.toString(), RequestType.Get, 'selection', options));
|
|
287
297
|
}
|
|
298
|
+
isBlank(option) {
|
|
299
|
+
return isDefined(option) && option === this.blank;
|
|
300
|
+
}
|
|
288
301
|
createByQuery(query, options) {
|
|
289
302
|
this.create$.next(buildRequest(query, RequestType.Create, 'selection', options));
|
|
290
303
|
}
|
|
@@ -354,11 +367,21 @@ class StateService {
|
|
|
354
367
|
throw new YodaError(request.query, request.type);
|
|
355
368
|
}
|
|
356
369
|
if (request.type === RequestType.Create) {
|
|
357
|
-
this.optionsSource.update((current) => [option, ...(current ?? [])]);
|
|
358
370
|
this.createdSource.set(option);
|
|
359
371
|
}
|
|
372
|
+
if (request.seedList) {
|
|
373
|
+
this.seedOptions(request.type, option);
|
|
374
|
+
}
|
|
360
375
|
this.select(option);
|
|
361
376
|
}
|
|
377
|
+
seedOptions(type, option) {
|
|
378
|
+
switch (type) {
|
|
379
|
+
case RequestType.Create:
|
|
380
|
+
return this.optionsSource.update((current) => [option, ...(current ?? [])]);
|
|
381
|
+
case RequestType.Get:
|
|
382
|
+
return this.optionsSource.set([option]);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
362
385
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
363
386
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StateService }); }
|
|
364
387
|
}
|
|
@@ -368,6 +391,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
368
391
|
function buildRequest(query, type, target, options) {
|
|
369
392
|
return { ...options, type, query, target };
|
|
370
393
|
}
|
|
394
|
+
function buildBlankOption(value) {
|
|
395
|
+
return { kind: 'option', label: '', value };
|
|
396
|
+
}
|
|
371
397
|
function matchByLabel(option, query) {
|
|
372
398
|
return option.label.toLowerCase().includes(query);
|
|
373
399
|
}
|
|
@@ -545,6 +571,10 @@ class BaseDirective extends SlotDirective {
|
|
|
545
571
|
this.autoSelect = input(this.config.autoSelect, ...(ngDevMode ? [{ debugName: "autoSelect", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
546
572
|
/** Закрывать ли список после автовыбора */
|
|
547
573
|
this.autoSelectClose = input(this.config.autoSelectClose, ...(ngDevMode ? [{ debugName: "autoSelectClose", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
574
|
+
/** Результат `LabelFormatter` из `withLabelFormatters` идёт и в инпут, а не только в `optionLabel` для списка */
|
|
575
|
+
this.labelToInput = input(this.config.labelToInput, ...(ngDevMode ? [{ debugName: "labelToInput", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
576
|
+
/** Значение из `writeValue` или созданное через `create` кладётся в список */
|
|
577
|
+
this.seedList = input(this.config.seedList, ...(ngDevMode ? [{ debugName: "seedList", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
548
578
|
/** Включает кнопку `+`, которая отправляет введённый текст запросом на создание */
|
|
549
579
|
this.create = input(false, ...(ngDevMode ? [{ debugName: "create", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
550
580
|
/** `empty` - показывать кнопку, только когда ничего не нашлось */
|
|
@@ -630,11 +660,11 @@ class BaseDirective extends SlotDirective {
|
|
|
630
660
|
return this.inputRef()?.nativeElement ?? null;
|
|
631
661
|
}
|
|
632
662
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BaseDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
633
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.18", type: BaseDirective, isStandalone: true, inputs: { repository: { classPropertyName: "repository", publicName: "repository", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: true, isRequired: false, transformFunction: null }, transformOptions: { classPropertyName: "transformOptions", publicName: "transformOptions", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: true, isRequired: false, transformFunction: null }, preloadQuery: { classPropertyName: "preloadQuery", publicName: "preloadQuery", isSignal: true, isRequired: false, transformFunction: null }, preloadType: { classPropertyName: "preloadType", publicName: "preloadType", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, native: { classPropertyName: "native", publicName: "native", isSignal: true, isRequired: false, transformFunction: null }, listRender: { classPropertyName: "listRender", publicName: "listRender", isSignal: true, isRequired: false, transformFunction: null }, itemsShow: { classPropertyName: "itemsShow", publicName: "itemsShow", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, loopScroll: { classPropertyName: "loopScroll", publicName: "loopScroll", isSignal: true, isRequired: false, transformFunction: null }, selectGroup: { classPropertyName: "selectGroup", publicName: "selectGroup", isSignal: true, isRequired: false, transformFunction: null }, groupSticky: { classPropertyName: "groupSticky", publicName: "groupSticky", isSignal: true, isRequired: false, transformFunction: null }, disabledOption: { classPropertyName: "disabledOption", publicName: "disabledOption", isSignal: true, isRequired: false, transformFunction: null }, filterOption: { classPropertyName: "filterOption", publicName: "filterOption", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null }, autoSelectClose: { classPropertyName: "autoSelectClose", publicName: "autoSelectClose", isSignal: true, isRequired: false, transformFunction: null }, create: { classPropertyName: "create", publicName: "create", isSignal: true, isRequired: false, transformFunction: null }, createMode: { classPropertyName: "createMode", publicName: "createMode", isSignal: true, isRequired: false, transformFunction: null }, createPlace: { classPropertyName: "createPlace", publicName: "createPlace", isSignal: true, isRequired: false, transformFunction: null }, showHint: { classPropertyName: "showHint", publicName: "showHint", isSignal: true, isRequired: false, transformFunction: null }, showEmpty: { classPropertyName: "showEmpty", publicName: "showEmpty", isSignal: true, isRequired: false, transformFunction: null }, showMore: { classPropertyName: "showMore", publicName: "showMore", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, showHighlight: { classPropertyName: "showHighlight", publicName: "showHighlight", isSignal: true, isRequired: false, transformFunction: null }, showToggle: { classPropertyName: "showToggle", publicName: "showToggle", isSignal: true, isRequired: false, transformFunction: null }, showLoader: { classPropertyName: "showLoader", publicName: "showLoader", isSignal: true, isRequired: false, transformFunction: null }, hintMessage: { classPropertyName: "hintMessage", publicName: "hintMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, moreMessage: { classPropertyName: "moreMessage", publicName: "moreMessage", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, inputReadonly: { classPropertyName: "inputReadonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, inputSize: { classPropertyName: "inputSize", publicName: "inputSize", isSignal: true, isRequired: false, transformFunction: null }, parentValue: { classPropertyName: "parentValue", publicName: "parentValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChanged: "selectionChanged", optionCreated: "optionCreated", requestFailed: "requestFailed" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
663
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.18", type: BaseDirective, isStandalone: true, inputs: { repository: { classPropertyName: "repository", publicName: "repository", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: true, isRequired: false, transformFunction: null }, transformOptions: { classPropertyName: "transformOptions", publicName: "transformOptions", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: true, isRequired: false, transformFunction: null }, preloadQuery: { classPropertyName: "preloadQuery", publicName: "preloadQuery", isSignal: true, isRequired: false, transformFunction: null }, preloadType: { classPropertyName: "preloadType", publicName: "preloadType", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, native: { classPropertyName: "native", publicName: "native", isSignal: true, isRequired: false, transformFunction: null }, listRender: { classPropertyName: "listRender", publicName: "listRender", isSignal: true, isRequired: false, transformFunction: null }, itemsShow: { classPropertyName: "itemsShow", publicName: "itemsShow", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, loopScroll: { classPropertyName: "loopScroll", publicName: "loopScroll", isSignal: true, isRequired: false, transformFunction: null }, selectGroup: { classPropertyName: "selectGroup", publicName: "selectGroup", isSignal: true, isRequired: false, transformFunction: null }, groupSticky: { classPropertyName: "groupSticky", publicName: "groupSticky", isSignal: true, isRequired: false, transformFunction: null }, disabledOption: { classPropertyName: "disabledOption", publicName: "disabledOption", isSignal: true, isRequired: false, transformFunction: null }, filterOption: { classPropertyName: "filterOption", publicName: "filterOption", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null }, autoSelectClose: { classPropertyName: "autoSelectClose", publicName: "autoSelectClose", isSignal: true, isRequired: false, transformFunction: null }, labelToInput: { classPropertyName: "labelToInput", publicName: "labelToInput", isSignal: true, isRequired: false, transformFunction: null }, seedList: { classPropertyName: "seedList", publicName: "seedList", isSignal: true, isRequired: false, transformFunction: null }, create: { classPropertyName: "create", publicName: "create", isSignal: true, isRequired: false, transformFunction: null }, createMode: { classPropertyName: "createMode", publicName: "createMode", isSignal: true, isRequired: false, transformFunction: null }, createPlace: { classPropertyName: "createPlace", publicName: "createPlace", isSignal: true, isRequired: false, transformFunction: null }, showHint: { classPropertyName: "showHint", publicName: "showHint", isSignal: true, isRequired: false, transformFunction: null }, showEmpty: { classPropertyName: "showEmpty", publicName: "showEmpty", isSignal: true, isRequired: false, transformFunction: null }, showMore: { classPropertyName: "showMore", publicName: "showMore", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, showHighlight: { classPropertyName: "showHighlight", publicName: "showHighlight", isSignal: true, isRequired: false, transformFunction: null }, showToggle: { classPropertyName: "showToggle", publicName: "showToggle", isSignal: true, isRequired: false, transformFunction: null }, showLoader: { classPropertyName: "showLoader", publicName: "showLoader", isSignal: true, isRequired: false, transformFunction: null }, hintMessage: { classPropertyName: "hintMessage", publicName: "hintMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, moreMessage: { classPropertyName: "moreMessage", publicName: "moreMessage", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, inputReadonly: { classPropertyName: "inputReadonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, inputSize: { classPropertyName: "inputSize", publicName: "inputSize", isSignal: true, isRequired: false, transformFunction: null }, parentValue: { classPropertyName: "parentValue", publicName: "parentValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChanged: "selectionChanged", optionCreated: "optionCreated", requestFailed: "requestFailed" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
634
664
|
}
|
|
635
665
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BaseDirective, decorators: [{
|
|
636
666
|
type: Directive
|
|
637
|
-
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }], repository: [{ type: i0.Input, args: [{ isSignal: true, alias: "repository", required: false }] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }], apiUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiUrl", required: false }] }], transformOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformOptions", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], minQueryLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minQueryLength", required: false }] }], preloadQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "preloadQuery", required: false }] }], preloadType: [{ type: i0.Input, args: [{ isSignal: true, alias: "preloadType", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], native: [{ type: i0.Input, args: [{ isSignal: true, alias: "native", required: false }] }], listRender: [{ type: i0.Input, args: [{ isSignal: true, alias: "listRender", required: false }] }], itemsShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsShow", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], loopScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopScroll", required: false }] }], selectGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectGroup", required: false }] }], groupSticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupSticky", required: false }] }], disabledOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledOption", required: false }] }], filterOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterOption", required: false }] }], autoSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelect", required: false }] }], autoSelectClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelectClose", required: false }] }], create: [{ type: i0.Input, args: [{ isSignal: true, alias: "create", required: false }] }], createMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "createMode", required: false }] }], createPlace: [{ type: i0.Input, args: [{ isSignal: true, alias: "createPlace", required: false }] }], showHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHint", required: false }] }], showEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmpty", required: false }] }], showMore: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMore", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showCounter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCounter", required: false }] }], showHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHighlight", required: false }] }], showToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggle", required: false }] }], showLoader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLoader", required: false }] }], hintMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintMessage", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], moreMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreMessage", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], inputReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], minlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minlength", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], inputSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputSize", required: false }] }], parentValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentValue", required: false }] }], selectionChanged: [{ type: i0.Output, args: ["selectionChanged"] }], optionCreated: [{ type: i0.Output, args: ["optionCreated"] }], requestFailed: [{ type: i0.Output, args: ["requestFailed"] }] } });
|
|
667
|
+
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }], repository: [{ type: i0.Input, args: [{ isSignal: true, alias: "repository", required: false }] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }], apiUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiUrl", required: false }] }], transformOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformOptions", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], minQueryLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minQueryLength", required: false }] }], preloadQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "preloadQuery", required: false }] }], preloadType: [{ type: i0.Input, args: [{ isSignal: true, alias: "preloadType", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], native: [{ type: i0.Input, args: [{ isSignal: true, alias: "native", required: false }] }], listRender: [{ type: i0.Input, args: [{ isSignal: true, alias: "listRender", required: false }] }], itemsShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsShow", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], loopScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopScroll", required: false }] }], selectGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectGroup", required: false }] }], groupSticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupSticky", required: false }] }], disabledOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledOption", required: false }] }], filterOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterOption", required: false }] }], autoSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelect", required: false }] }], autoSelectClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelectClose", required: false }] }], labelToInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelToInput", required: false }] }], seedList: [{ type: i0.Input, args: [{ isSignal: true, alias: "seedList", required: false }] }], create: [{ type: i0.Input, args: [{ isSignal: true, alias: "create", required: false }] }], createMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "createMode", required: false }] }], createPlace: [{ type: i0.Input, args: [{ isSignal: true, alias: "createPlace", required: false }] }], showHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHint", required: false }] }], showEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmpty", required: false }] }], showMore: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMore", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showCounter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCounter", required: false }] }], showHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHighlight", required: false }] }], showToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggle", required: false }] }], showLoader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLoader", required: false }] }], hintMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintMessage", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], moreMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreMessage", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], inputReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], minlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minlength", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], inputSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputSize", required: false }] }], parentValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentValue", required: false }] }], selectionChanged: [{ type: i0.Output, args: ["selectionChanged"] }], optionCreated: [{ type: i0.Output, args: ["optionCreated"] }], requestFailed: [{ type: i0.Output, args: ["requestFailed"] }] } });
|
|
638
668
|
|
|
639
669
|
const WHITESPACE = /\s+/;
|
|
640
670
|
const MARKUP = /^\s*</;
|
|
@@ -893,11 +923,11 @@ class ListComponent {
|
|
|
893
923
|
?.scrollIntoView({ behavior: 'auto', block: 'nearest', inline: 'nearest' });
|
|
894
924
|
}
|
|
895
925
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
896
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: ListComponent, isStandalone: true, selector: "ss-yoda-list", inputs: { itemsShow: { classPropertyName: "itemsShow", publicName: "itemsShow", isSignal: true, isRequired: false, transformFunction: null }, moreMessage: { classPropertyName: "moreMessage", publicName: "moreMessage", isSignal: true, isRequired: false, transformFunction: null }, showMore: { classPropertyName: "showMore", publicName: "showMore", isSignal: true, isRequired: false, transformFunction: null }, showHighlight: { classPropertyName: "showHighlight", publicName: "showHighlight", isSignal: true, isRequired: false, transformFunction: null }, loopScroll: { classPropertyName: "loopScroll", publicName: "loopScroll", isSignal: true, isRequired: false, transformFunction: null }, selectGroup: { classPropertyName: "selectGroup", publicName: "selectGroup", isSignal: true, isRequired: false, transformFunction: null }, groupSticky: { classPropertyName: "groupSticky", publicName: "groupSticky", isSignal: true, isRequired: false, transformFunction: null }, disabledOption: { classPropertyName: "disabledOption", publicName: "disabledOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "listRef", first: true, predicate: ["listRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ul\n #listRef\n class=\"yoda-list\"\n role=\"listbox\"\n [class.yoda-list--grouped]=\"hasGroups$$()\"\n>\n @for (row of rows$$(); track $index; let index = $index) {\n <li\n class=\"yoda-list__option\"\n role=\"option\"\n tabindex=\"-1\"\n [class.select]=\"isSelected(row)\"\n [class.focus]=\"focusedIndex$$() === index\"\n [class.yoda-list__option--more]=\"row.kind === 'more'\"\n [class.yoda-list__option--group]=\"row.kind === 'group'\"\n [class.yoda-list__option--sticky]=\"row.kind === 'group' && groupSticky()\"\n [attr.data-index]=\"index\"\n [attr.aria-selected]=\"isSelected(row)\"\n [attr.aria-disabled]=\"isSelectable(row) ? null : true\"\n (click)=\"activate(row)\"\n (pointerenter)=\"focus(index, row)\"\n >\n @if (row.kind === 'more') {\n {{ moreMessage() }}\n } @else {\n @let slot = row.kind === 'group' ? groupSlot$$() : optionSlot$$();\n\n <ng-container\n *slotOutlet=\"\n slot ?? row;\n context: {\n $implicit: row,\n query: query$$(),\n };\n let item\n \"\n >\n @if (showHighlight() && item.kind === 'option') {\n <span [innerHTML]=\"item.label | highlight: query$$()\"></span>\n } @else {\n {{ item.label }}\n }\n </ng-container>\n }\n </li>\n }\n</ul>\n", styles: [":host{display:block}.yoda-list{display:flex;flex-direction:column;margin:0;padding:0;color:var(--ss-yoda-list-color, inherit);list-style-type:none}.yoda-list--grouped .yoda-list__option{padding-inline-start:var(--ss-yoda-list-nested-padding, 1.5rem)}.yoda-list--grouped .yoda-list__option--group,.yoda-list--grouped .yoda-list__option--more{padding-inline-start:var(--ss-yoda-padding-x, .75rem)}.yoda-list__option{padding:var(--ss-yoda-padding-y, .5rem) var(--ss-yoda-padding-x, .75rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;scroll-margin-block-start:var(--ss-yoda-group-height, 2.25rem)}.yoda-list__option.focus{color:var(--ss-yoda-list-focus-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08));cursor:pointer}.yoda-list__option.select{color:var(--ss-yoda-list-selected-color, inherit);font-weight:600;background:var(--ss-yoda-list-selected-background, rgba(59, 130, 246, .14))}.yoda-list__option.select.focus{color:var(--ss-yoda-list-selected-focus-color, var(--ss-yoda-list-selected-color, inherit));background:var(--ss-yoda-list-selected-focus-background, rgba(59, 130, 246, .2))}.yoda-list__option[aria-disabled=true]{color:var(--ss-yoda-muted-color, #a1a1aa);cursor:not-allowed}.yoda-list__option--group[aria-disabled=true]{cursor:default}.yoda-list__option--group{color:var(--ss-yoda-muted-color, #71717a);font-size:var(--ss-yoda-group-font-size, .8125em);font-weight:600}.yoda-list__option--group:not([aria-disabled=true]){color:inherit;cursor:pointer}.yoda-list__option--sticky{position:sticky;inset-block-start:0;z-index:1;background:var(--ss-yoda-panel-background, #fff)}.yoda-list__option--more{color:var(--ss-yoda-accent-color, #3b82f6);font-size:var(--ss-yoda-small-font-size, .875em);font-weight:600;text-align:center;border-block-start:1px solid var(--ss-yoda-separator-color, #e4e4e7);cursor:pointer}.yoda-list__option--more.focus{color:var(--ss-yoda-accent-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08))}\n"], dependencies: [{ kind: "directive", type: SlotOutletDirective, selector: "[slotOutlet]", inputs: ["slotOutlet", "slotOutletContext"], exportAs: ["slotOutlet"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
926
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: ListComponent, isStandalone: true, selector: "ss-yoda-list", inputs: { itemsShow: { classPropertyName: "itemsShow", publicName: "itemsShow", isSignal: true, isRequired: false, transformFunction: null }, moreMessage: { classPropertyName: "moreMessage", publicName: "moreMessage", isSignal: true, isRequired: false, transformFunction: null }, showMore: { classPropertyName: "showMore", publicName: "showMore", isSignal: true, isRequired: false, transformFunction: null }, showHighlight: { classPropertyName: "showHighlight", publicName: "showHighlight", isSignal: true, isRequired: false, transformFunction: null }, loopScroll: { classPropertyName: "loopScroll", publicName: "loopScroll", isSignal: true, isRequired: false, transformFunction: null }, selectGroup: { classPropertyName: "selectGroup", publicName: "selectGroup", isSignal: true, isRequired: false, transformFunction: null }, groupSticky: { classPropertyName: "groupSticky", publicName: "groupSticky", isSignal: true, isRequired: false, transformFunction: null }, disabledOption: { classPropertyName: "disabledOption", publicName: "disabledOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "listRef", first: true, predicate: ["listRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ul\n #listRef\n class=\"yoda-list\"\n role=\"listbox\"\n [class.yoda-list--grouped]=\"hasGroups$$()\"\n>\n @for (row of rows$$(); track $index; let index = $index) {\n <li\n class=\"yoda-list__option\"\n role=\"option\"\n tabindex=\"-1\"\n [class.select]=\"isSelected(row)\"\n [class.focus]=\"focusedIndex$$() === index\"\n [class.yoda-list__option--more]=\"row.kind === 'more'\"\n [class.yoda-list__option--group]=\"row.kind === 'group'\"\n [class.yoda-list__option--sticky]=\"row.kind === 'group' && groupSticky()\"\n [attr.data-index]=\"index\"\n [attr.aria-selected]=\"isSelected(row)\"\n [attr.aria-disabled]=\"isSelectable(row) ? null : true\"\n (click)=\"activate(row)\"\n (pointerenter)=\"focus(index, row)\"\n >\n @if (row.kind === 'more') {\n {{ moreMessage() }}\n } @else {\n @let slot = row.kind === 'group' ? groupSlot$$() : optionSlot$$();\n\n <ng-container\n *slotOutlet=\"\n slot ?? row;\n context: {\n $implicit: row,\n query: query$$(),\n };\n let item\n \"\n >\n @if (showHighlight() && item.kind === 'option') {\n <span [innerHTML]=\"(item.optionLabel ?? item.label) | highlight: query$$()\"></span>\n } @else {\n {{ item.optionLabel ?? item.label }}\n }\n </ng-container>\n }\n </li>\n }\n</ul>\n", styles: [":host{display:block}.yoda-list{display:flex;flex-direction:column;margin:0;padding:0;color:var(--ss-yoda-list-color, inherit);list-style-type:none}.yoda-list--grouped .yoda-list__option{padding-inline-start:var(--ss-yoda-list-nested-padding, 1.5rem)}.yoda-list--grouped .yoda-list__option--group,.yoda-list--grouped .yoda-list__option--more{padding-inline-start:var(--ss-yoda-padding-x, .75rem)}.yoda-list__option{padding:var(--ss-yoda-padding-y, .5rem) var(--ss-yoda-padding-x, .75rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;scroll-margin-block-start:var(--ss-yoda-group-height, 2.25rem)}.yoda-list__option.focus{color:var(--ss-yoda-list-focus-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08));cursor:pointer}.yoda-list__option.select{color:var(--ss-yoda-list-selected-color, inherit);font-weight:600;background:var(--ss-yoda-list-selected-background, rgba(59, 130, 246, .14))}.yoda-list__option.select.focus{color:var(--ss-yoda-list-selected-focus-color, var(--ss-yoda-list-selected-color, inherit));background:var(--ss-yoda-list-selected-focus-background, rgba(59, 130, 246, .2))}.yoda-list__option[aria-disabled=true]{color:var(--ss-yoda-muted-color, #a1a1aa);cursor:not-allowed}.yoda-list__option--group[aria-disabled=true]{cursor:default}.yoda-list__option--group{color:var(--ss-yoda-muted-color, #71717a);font-size:var(--ss-yoda-group-font-size, .8125em);font-weight:600}.yoda-list__option--group:not([aria-disabled=true]){color:inherit;cursor:pointer}.yoda-list__option--sticky{position:sticky;inset-block-start:0;z-index:1;background:var(--ss-yoda-panel-background, #fff)}.yoda-list__option--more{color:var(--ss-yoda-accent-color, #3b82f6);font-size:var(--ss-yoda-small-font-size, .875em);font-weight:600;text-align:center;border-block-start:1px solid var(--ss-yoda-separator-color, #e4e4e7);cursor:pointer}.yoda-list__option--more.focus{color:var(--ss-yoda-accent-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08))}\n"], dependencies: [{ kind: "directive", type: SlotOutletDirective, selector: "[slotOutlet]", inputs: ["slotOutlet", "slotOutletContext"], exportAs: ["slotOutlet"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
897
927
|
}
|
|
898
928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ListComponent, decorators: [{
|
|
899
929
|
type: Component,
|
|
900
|
-
args: [{ selector: 'ss-yoda-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [HighlightPipe, SlotOutletDirective], template: "<ul\n #listRef\n class=\"yoda-list\"\n role=\"listbox\"\n [class.yoda-list--grouped]=\"hasGroups$$()\"\n>\n @for (row of rows$$(); track $index; let index = $index) {\n <li\n class=\"yoda-list__option\"\n role=\"option\"\n tabindex=\"-1\"\n [class.select]=\"isSelected(row)\"\n [class.focus]=\"focusedIndex$$() === index\"\n [class.yoda-list__option--more]=\"row.kind === 'more'\"\n [class.yoda-list__option--group]=\"row.kind === 'group'\"\n [class.yoda-list__option--sticky]=\"row.kind === 'group' && groupSticky()\"\n [attr.data-index]=\"index\"\n [attr.aria-selected]=\"isSelected(row)\"\n [attr.aria-disabled]=\"isSelectable(row) ? null : true\"\n (click)=\"activate(row)\"\n (pointerenter)=\"focus(index, row)\"\n >\n @if (row.kind === 'more') {\n {{ moreMessage() }}\n } @else {\n @let slot = row.kind === 'group' ? groupSlot$$() : optionSlot$$();\n\n <ng-container\n *slotOutlet=\"\n slot ?? row;\n context: {\n $implicit: row,\n query: query$$(),\n };\n let item\n \"\n >\n @if (showHighlight() && item.kind === 'option') {\n <span [innerHTML]=\"item.label | highlight: query$$()\"></span>\n } @else {\n {{ item.label }}\n }\n </ng-container>\n }\n </li>\n }\n</ul>\n", styles: [":host{display:block}.yoda-list{display:flex;flex-direction:column;margin:0;padding:0;color:var(--ss-yoda-list-color, inherit);list-style-type:none}.yoda-list--grouped .yoda-list__option{padding-inline-start:var(--ss-yoda-list-nested-padding, 1.5rem)}.yoda-list--grouped .yoda-list__option--group,.yoda-list--grouped .yoda-list__option--more{padding-inline-start:var(--ss-yoda-padding-x, .75rem)}.yoda-list__option{padding:var(--ss-yoda-padding-y, .5rem) var(--ss-yoda-padding-x, .75rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;scroll-margin-block-start:var(--ss-yoda-group-height, 2.25rem)}.yoda-list__option.focus{color:var(--ss-yoda-list-focus-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08));cursor:pointer}.yoda-list__option.select{color:var(--ss-yoda-list-selected-color, inherit);font-weight:600;background:var(--ss-yoda-list-selected-background, rgba(59, 130, 246, .14))}.yoda-list__option.select.focus{color:var(--ss-yoda-list-selected-focus-color, var(--ss-yoda-list-selected-color, inherit));background:var(--ss-yoda-list-selected-focus-background, rgba(59, 130, 246, .2))}.yoda-list__option[aria-disabled=true]{color:var(--ss-yoda-muted-color, #a1a1aa);cursor:not-allowed}.yoda-list__option--group[aria-disabled=true]{cursor:default}.yoda-list__option--group{color:var(--ss-yoda-muted-color, #71717a);font-size:var(--ss-yoda-group-font-size, .8125em);font-weight:600}.yoda-list__option--group:not([aria-disabled=true]){color:inherit;cursor:pointer}.yoda-list__option--sticky{position:sticky;inset-block-start:0;z-index:1;background:var(--ss-yoda-panel-background, #fff)}.yoda-list__option--more{color:var(--ss-yoda-accent-color, #3b82f6);font-size:var(--ss-yoda-small-font-size, .875em);font-weight:600;text-align:center;border-block-start:1px solid var(--ss-yoda-separator-color, #e4e4e7);cursor:pointer}.yoda-list__option--more.focus{color:var(--ss-yoda-accent-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08))}\n"] }]
|
|
930
|
+
args: [{ selector: 'ss-yoda-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [HighlightPipe, SlotOutletDirective], template: "<ul\n #listRef\n class=\"yoda-list\"\n role=\"listbox\"\n [class.yoda-list--grouped]=\"hasGroups$$()\"\n>\n @for (row of rows$$(); track $index; let index = $index) {\n <li\n class=\"yoda-list__option\"\n role=\"option\"\n tabindex=\"-1\"\n [class.select]=\"isSelected(row)\"\n [class.focus]=\"focusedIndex$$() === index\"\n [class.yoda-list__option--more]=\"row.kind === 'more'\"\n [class.yoda-list__option--group]=\"row.kind === 'group'\"\n [class.yoda-list__option--sticky]=\"row.kind === 'group' && groupSticky()\"\n [attr.data-index]=\"index\"\n [attr.aria-selected]=\"isSelected(row)\"\n [attr.aria-disabled]=\"isSelectable(row) ? null : true\"\n (click)=\"activate(row)\"\n (pointerenter)=\"focus(index, row)\"\n >\n @if (row.kind === 'more') {\n {{ moreMessage() }}\n } @else {\n @let slot = row.kind === 'group' ? groupSlot$$() : optionSlot$$();\n\n <ng-container\n *slotOutlet=\"\n slot ?? row;\n context: {\n $implicit: row,\n query: query$$(),\n };\n let item\n \"\n >\n @if (showHighlight() && item.kind === 'option') {\n <span [innerHTML]=\"(item.optionLabel ?? item.label) | highlight: query$$()\"></span>\n } @else {\n {{ item.optionLabel ?? item.label }}\n }\n </ng-container>\n }\n </li>\n }\n</ul>\n", styles: [":host{display:block}.yoda-list{display:flex;flex-direction:column;margin:0;padding:0;color:var(--ss-yoda-list-color, inherit);list-style-type:none}.yoda-list--grouped .yoda-list__option{padding-inline-start:var(--ss-yoda-list-nested-padding, 1.5rem)}.yoda-list--grouped .yoda-list__option--group,.yoda-list--grouped .yoda-list__option--more{padding-inline-start:var(--ss-yoda-padding-x, .75rem)}.yoda-list__option{padding:var(--ss-yoda-padding-y, .5rem) var(--ss-yoda-padding-x, .75rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;scroll-margin-block-start:var(--ss-yoda-group-height, 2.25rem)}.yoda-list__option.focus{color:var(--ss-yoda-list-focus-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08));cursor:pointer}.yoda-list__option.select{color:var(--ss-yoda-list-selected-color, inherit);font-weight:600;background:var(--ss-yoda-list-selected-background, rgba(59, 130, 246, .14))}.yoda-list__option.select.focus{color:var(--ss-yoda-list-selected-focus-color, var(--ss-yoda-list-selected-color, inherit));background:var(--ss-yoda-list-selected-focus-background, rgba(59, 130, 246, .2))}.yoda-list__option[aria-disabled=true]{color:var(--ss-yoda-muted-color, #a1a1aa);cursor:not-allowed}.yoda-list__option--group[aria-disabled=true]{cursor:default}.yoda-list__option--group{color:var(--ss-yoda-muted-color, #71717a);font-size:var(--ss-yoda-group-font-size, .8125em);font-weight:600}.yoda-list__option--group:not([aria-disabled=true]){color:inherit;cursor:pointer}.yoda-list__option--sticky{position:sticky;inset-block-start:0;z-index:1;background:var(--ss-yoda-panel-background, #fff)}.yoda-list__option--more{color:var(--ss-yoda-accent-color, #3b82f6);font-size:var(--ss-yoda-small-font-size, .875em);font-weight:600;text-align:center;border-block-start:1px solid var(--ss-yoda-separator-color, #e4e4e7);cursor:pointer}.yoda-list__option--more.focus{color:var(--ss-yoda-accent-color, #3b82f6);background:var(--ss-yoda-list-focus-background, rgba(59, 130, 246, .08))}\n"] }]
|
|
901
931
|
}], ctorParameters: () => [], propDecorators: { listRef: [{ type: i0.ViewChild, args: ['listRef', { isSignal: true }] }], itemsShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsShow", required: false }] }], moreMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreMessage", required: false }] }], showMore: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMore", required: false }] }], showHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHighlight", required: false }] }], loopScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopScroll", required: false }] }], selectGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectGroup", required: false }] }], groupSticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupSticky", required: false }] }], disabledOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledOption", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
902
932
|
function limitIndex(index, max, circular) {
|
|
903
933
|
if (circular) {
|
|
@@ -945,11 +975,11 @@ class NativeComponent {
|
|
|
945
975
|
}
|
|
946
976
|
}
|
|
947
977
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NativeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
948
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NativeComponent, isStandalone: true, selector: "ss-yoda-native", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "selectRef", first: true, predicate: ["nativeRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<select\n #nativeRef\n [disabled]=\"disabled()\"\n (change)=\"select(nativeRef.value, state.options$$() ?? [])\"\n>\n <option\n disabled\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n\n @for (group of groups$$(); track $index) {\n @if (group.label; as label) {\n <optgroup [label]=\"label\">\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.label }}</option>\n }\n </optgroup>\n } @else {\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.label }}</option>\n }\n }\n }\n</select>\n", styles: [":host{position:absolute;top:0;right:0;bottom:0;left:0}select{inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;border:0;opacity:0;cursor:pointer}select:disabled{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
978
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: NativeComponent, isStandalone: true, selector: "ss-yoda-native", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "selectRef", first: true, predicate: ["nativeRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<select\n #nativeRef\n [disabled]=\"disabled()\"\n (change)=\"select(nativeRef.value, state.options$$() ?? [])\"\n>\n <option\n disabled\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n\n @for (group of groups$$(); track $index) {\n @if (group.label; as label) {\n <optgroup [label]=\"label\">\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.optionLabel ?? item.label }}</option>\n }\n </optgroup>\n } @else {\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.optionLabel ?? item.label }}</option>\n }\n }\n }\n</select>\n", styles: [":host{position:absolute;top:0;right:0;bottom:0;left:0}select{inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;border:0;opacity:0;cursor:pointer}select:disabled{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
949
979
|
}
|
|
950
980
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NativeComponent, decorators: [{
|
|
951
981
|
type: Component,
|
|
952
|
-
args: [{ selector: 'ss-yoda-native', changeDetection: ChangeDetectionStrategy.OnPush, template: "<select\n #nativeRef\n [disabled]=\"disabled()\"\n (change)=\"select(nativeRef.value, state.options$$() ?? [])\"\n>\n <option\n disabled\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n\n @for (group of groups$$(); track $index) {\n @if (group.label; as label) {\n <optgroup [label]=\"label\">\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.label }}</option>\n }\n </optgroup>\n } @else {\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.label }}</option>\n }\n }\n }\n</select>\n", styles: [":host{position:absolute;top:0;right:0;bottom:0;left:0}select{inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;border:0;opacity:0;cursor:pointer}select:disabled{cursor:not-allowed}\n"] }]
|
|
982
|
+
args: [{ selector: 'ss-yoda-native', changeDetection: ChangeDetectionStrategy.OnPush, template: "<select\n #nativeRef\n [disabled]=\"disabled()\"\n (change)=\"select(nativeRef.value, state.options$$() ?? [])\"\n>\n <option\n disabled\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n\n @for (group of groups$$(); track $index) {\n @if (group.label; as label) {\n <optgroup [label]=\"label\">\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.optionLabel ?? item.label }}</option>\n }\n </optgroup>\n } @else {\n @for (item of group.items; track item.value) {\n <option [value]=\"item.value\">{{ item.optionLabel ?? item.label }}</option>\n }\n }\n }\n</select>\n", styles: [":host{position:absolute;top:0;right:0;bottom:0;left:0}select{inline-size:100%;block-size:100%;-webkit-appearance:none;appearance:none;border:0;opacity:0;cursor:pointer}select:disabled{cursor:not-allowed}\n"] }]
|
|
953
983
|
}], ctorParameters: () => [], propDecorators: { selectRef: [{ type: i0.ViewChild, args: ['nativeRef', { isSignal: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
954
984
|
|
|
955
985
|
class PanelComponent {
|
|
@@ -1077,6 +1107,7 @@ class Yoda extends BaseDirective {
|
|
|
1077
1107
|
transform: this.transformOptions(),
|
|
1078
1108
|
minQueryLength: this.minQueryLength(),
|
|
1079
1109
|
parent: this.parentValue$$() ?? undefined,
|
|
1110
|
+
seedList: this.seedList(),
|
|
1080
1111
|
}), ...(ngDevMode ? [{ debugName: "requestOptions$$" }] : []));
|
|
1081
1112
|
this.canCreate$$ = computed(() => {
|
|
1082
1113
|
if (!this.create() || this.isLocked$$())
|
|
@@ -1088,16 +1119,16 @@ class Yoda extends BaseDirective {
|
|
|
1088
1119
|
this.clearVisible$$ = computed(() => this.showClear() && !this.isLocked$$() && isNonEmptyString(this.typed$$()), ...(ngDevMode ? [{ debugName: "clearVisible$$" }] : []));
|
|
1089
1120
|
this.counterVisible$$ = computed(() => this.showCounter() && !this.isLocked$$() && isNonEmptyArray(this.state.options$$()), ...(ngDevMode ? [{ debugName: "counterVisible$$" }] : []));
|
|
1090
1121
|
this.statusVisible$$ = computed(() => {
|
|
1091
|
-
if (this.isLocked$$())
|
|
1092
|
-
return false;
|
|
1093
1122
|
const { status } = this.state.requestState$$();
|
|
1094
|
-
if (status === 'error'
|
|
1123
|
+
if (status === 'error')
|
|
1095
1124
|
return true;
|
|
1096
1125
|
if (status === 'loading')
|
|
1097
1126
|
return this.showLoader();
|
|
1098
|
-
|
|
1127
|
+
if (this.isLocked$$())
|
|
1128
|
+
return false;
|
|
1129
|
+
return this.isNative$$() || this.showToggle();
|
|
1099
1130
|
}, ...(ngDevMode ? [{ debugName: "statusVisible$$" }] : []));
|
|
1100
|
-
this.createDisabled$$ = computed(() => this.state.requestState$$().status
|
|
1131
|
+
this.createDisabled$$ = computed(() => this.state.requestState$$().status !== 'idle' ||
|
|
1101
1132
|
isShortQuery(this.typed$$(), this.minQueryLength()), ...(ngDevMode ? [{ debugName: "createDisabled$$" }] : []));
|
|
1102
1133
|
this.errorText$$ = computed(() => this.state.requestState$$().status === 'error' ? (this.errorMessage() ?? null) : null, ...(ngDevMode ? [{ debugName: "errorText$$" }] : []));
|
|
1103
1134
|
this.needsEagerLoad$$ = computed(() => {
|
|
@@ -1130,8 +1161,6 @@ class Yoda extends BaseDirective {
|
|
|
1130
1161
|
this.typed$$.set('');
|
|
1131
1162
|
return this.state.clear();
|
|
1132
1163
|
}
|
|
1133
|
-
/* Стор обязан совпасть с формой до ответа и эффект примет пустоту за очистку */
|
|
1134
|
-
this.state.select({ kind: 'option', value, label: '' });
|
|
1135
1164
|
this.state.resolve(value, this.requestOptions$$());
|
|
1136
1165
|
}
|
|
1137
1166
|
registerOnChange(onChange) {
|
|
@@ -1167,6 +1196,9 @@ class Yoda extends BaseDirective {
|
|
|
1167
1196
|
}
|
|
1168
1197
|
onInput(value) {
|
|
1169
1198
|
this.typed$$.set(value);
|
|
1199
|
+
if (this.control$$()?.updateOn !== 'blur') {
|
|
1200
|
+
this.control$$()?.markAsDirty();
|
|
1201
|
+
}
|
|
1170
1202
|
this.state.open();
|
|
1171
1203
|
if (this.mode() === 'select') {
|
|
1172
1204
|
if (this.state.selected$$()) {
|
|
@@ -1233,15 +1265,20 @@ class Yoda extends BaseDirective {
|
|
|
1233
1265
|
}
|
|
1234
1266
|
syncSelection(selected) {
|
|
1235
1267
|
if (isDefined(selected)) {
|
|
1236
|
-
this.typed$$.set(selected.label);
|
|
1268
|
+
this.typed$$.set((this.labelToInput() && selected.optionLabel) || selected.label);
|
|
1237
1269
|
}
|
|
1238
1270
|
const value = selected?.value ?? null;
|
|
1239
|
-
|
|
1271
|
+
const changed = value !== this.lastValue;
|
|
1272
|
+
if (changed) {
|
|
1273
|
+
this.lastValue = value;
|
|
1274
|
+
this.onChange(value);
|
|
1275
|
+
this.chain?.resetAfter(this);
|
|
1276
|
+
}
|
|
1277
|
+
if (this.state.isBlank(selected))
|
|
1278
|
+
return;
|
|
1279
|
+
if (!changed && isNil(selected))
|
|
1240
1280
|
return;
|
|
1241
|
-
this.lastValue = value;
|
|
1242
|
-
this.onChange(value);
|
|
1243
1281
|
this.selectionChanged.emit(selected);
|
|
1244
|
-
this.chain?.resetAfter(this);
|
|
1245
1282
|
}
|
|
1246
1283
|
eagerLoad() {
|
|
1247
1284
|
if (!this.needsEagerLoad$$())
|
|
@@ -1260,6 +1297,7 @@ class Yoda extends BaseDirective {
|
|
|
1260
1297
|
const errors = { ...(control.errors ?? {}) };
|
|
1261
1298
|
if (state.status === 'error') {
|
|
1262
1299
|
errors[REQUEST_ERROR_KEY] = state.error.getPayload();
|
|
1300
|
+
this.onTouched();
|
|
1263
1301
|
}
|
|
1264
1302
|
else {
|
|
1265
1303
|
delete errors[REQUEST_ERROR_KEY];
|
|
@@ -1289,7 +1327,7 @@ class Yoda extends BaseDirective {
|
|
|
1289
1327
|
}
|
|
1290
1328
|
}
|
|
1291
1329
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: Yoda, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1292
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: Yoda, isStandalone: true, selector: "ss-yoda", host: { listeners: { "keydown.escape": "close()", "keydown.tab": "close()", "keydown.enter": "onEnter($event)", "keydown.arrowdown": "onArrow($event, 1)", "keydown.arrowup": "onArrow($event, -1)", "focusout": "onFocusOut($event.relatedTarget)" }, properties: { "attr.data-size": "size()", "attr.data-variant": "variant()", "attr.data-separator": "separator()", "style.inline-size": "width()", "style.flex": "flexBasis$$()", "class.yoda--inline": "listRender() === \"inline\"", "class.yoda--disabled": "isDisabled$$()", "class.yoda--locked": "isLocked$$()", "class.yoda--chained": "chainInline$$()", "class.yoda--hidden": "chainHidden$$()", "attr.data-chain": "chainPosition$$()", "class.yoda--invalid": "invalid$$()" } }, providers: [StateService, SlotsService], viewQueries: [{ propertyName: "list", first: true, predicate: ListComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"yoda__field\">\n @if (createStartVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n <div class=\"yoda__segment yoda__segment--input\">\n <input\n #inputRef\n class=\"yoda__input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.id]=\"id()\"\n [attr.name]=\"name()\"\n [attr.size]=\"inputSize()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.required]=\"required()\"\n [attr.minlength]=\"minlength()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.readonly]=\"inputReadonly()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.aria-expanded]=\"state.isOpen$$()\"\n [attr.aria-invalid]=\"invalid$$() || null\"\n [value]=\"typed$$()\"\n [disabled]=\"isDisabled$$()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput(inputRef.value)\"\n />\n\n @if (counterVisible$$()) {\n <ss-yoda-action\n type=\"counter\"\n [itemsShow]=\"itemsShow()\"\n [selectGroup]=\"selectGroup()\"\n />\n }\n\n @if (clearVisible$$()) {\n <ss-yoda-action\n type=\"clear\"\n (activated)=\"onAction($event)\"\n />\n }\n </div>\n\n @if (createEndVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n @if (statusVisible$$()) {\n <div class=\"yoda__segment yoda__segment--status\">\n <ss-yoda-action\n type=\"state\"\n [native]=\"isNative$$()\"\n [errorText]=\"errorText$$()\"\n (activated)=\"onAction($event)\"\n />\n\n @if (isNative$$()) {\n <ss-yoda-native\n [disabled]=\"isLocked$$()\"\n [placeholder]=\"placeholder()\"\n />\n }\n </div>\n }\n</div>\n\n@if (!isNative$$()) {\n <ss-yoda-panel\n [origin]=\"host\"\n [showHint]=\"showHint()\"\n [showEmpty]=\"showEmpty()\"\n [listRender]=\"listRender()\"\n [panelClass]=\"panelClass()\"\n [hintMessage]=\"hintMessage()\"\n [scrollHeight]=\"scrollHeight()\"\n [emptyMessage]=\"emptyMessage()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [minQueryLength]=\"minQueryLength()\"\n >\n <ss-yoda-list\n [showMore]=\"showMore()\"\n [itemsShow]=\"itemsShow()\"\n [loopScroll]=\"loopScroll()\"\n [moreMessage]=\"moreMessage()\"\n [selectGroup]=\"selectGroup()\"\n [groupSticky]=\"groupSticky()\"\n [showHighlight]=\"showHighlight()\"\n [disabledOption]=\"disabledOption()\"\n (selected)=\"onSelect($event)\"\n />\n </ss-yoda-panel>\n}\n", styles: [":host{display:flex;inline-size:100%;flex-direction:column;color:var(--ss-yoda-color, #18181b);font-size:var(--ss-yoda-font-size, 1rem)}.yoda__field{display:flex;position:relative;align-items:stretch;border-radius:var(--ss-yoda-radius, 6px);background:var(--ss-yoda-background, #fff);border:1px solid var(--ss-yoda-border-color, #d4d4d8)}:host(:not(.yoda--locked)) .yoda__field:focus-within{box-shadow:var(--ss-yoda-focus-ring-shadow, none);outline-offset:var(--ss-yoda-focus-ring-offset, 0);border-color:var(--ss-yoda-border-focus-color, #3b82f6);outline:var(--ss-yoda-focus-ring-width, 0) var(--ss-yoda-focus-ring-style, none) var(--ss-yoda-focus-ring-color, transparent)}:host([data-variant=fill]) .yoda__field{background:var(--ss-yoda-fill-background, #f4f4f5)}:host([data-size=small]){--ss-yoda-padding-y: var(--ss-yoda-sm-padding-y, .25rem);--ss-yoda-padding-x: var(--ss-yoda-sm-padding-x, .5rem);--ss-yoda-font-size: var(--ss-yoda-sm-font-size, .875rem)}:host([data-size=large]){--ss-yoda-padding-y: var(--ss-yoda-lg-padding-y, .75rem);--ss-yoda-padding-x: var(--ss-yoda-lg-padding-x, .75rem);--ss-yoda-font-size: var(--ss-yoda-lg-font-size, 1.125rem)}:host(.yoda--invalid) .yoda__field{border-color:var(--ss-yoda-border-invalid-color, #ef4444)}:host(.yoda--invalid) .yoda__field:focus-within{border-color:var(--ss-yoda-border-invalid-focus-color, #dc2626)}:host(.yoda--disabled){cursor:not-allowed;
|
|
1330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: Yoda, isStandalone: true, selector: "ss-yoda", host: { listeners: { "keydown.escape": "close()", "keydown.tab": "close()", "keydown.enter": "onEnter($event)", "keydown.arrowdown": "onArrow($event, 1)", "keydown.arrowup": "onArrow($event, -1)", "focusout": "onFocusOut($event.relatedTarget)" }, properties: { "attr.data-size": "size()", "attr.data-variant": "variant()", "attr.data-separator": "separator()", "style.inline-size": "width()", "style.flex": "flexBasis$$()", "class.yoda--inline": "listRender() === \"inline\"", "class.yoda--disabled": "isDisabled$$()", "class.yoda--locked": "isLocked$$()", "class.yoda--chained": "chainInline$$()", "class.yoda--hidden": "chainHidden$$()", "attr.data-chain": "chainPosition$$()", "class.yoda--invalid": "invalid$$()" } }, providers: [StateService, SlotsService], viewQueries: [{ propertyName: "list", first: true, predicate: ListComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"yoda__field\">\n @if (createStartVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n <div class=\"yoda__segment yoda__segment--input\">\n <input\n #inputRef\n class=\"yoda__input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.id]=\"id()\"\n [attr.name]=\"name()\"\n [attr.size]=\"inputSize()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.required]=\"required()\"\n [attr.minlength]=\"minlength()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.readonly]=\"inputReadonly()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.aria-expanded]=\"state.isOpen$$()\"\n [attr.aria-invalid]=\"invalid$$() || null\"\n [value]=\"typed$$()\"\n [disabled]=\"isDisabled$$()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput(inputRef.value)\"\n />\n\n @if (counterVisible$$()) {\n <ss-yoda-action\n type=\"counter\"\n [itemsShow]=\"itemsShow()\"\n [selectGroup]=\"selectGroup()\"\n />\n }\n\n @if (clearVisible$$()) {\n <ss-yoda-action\n type=\"clear\"\n (activated)=\"onAction($event)\"\n />\n }\n </div>\n\n @if (createEndVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n @if (statusVisible$$()) {\n <div class=\"yoda__segment yoda__segment--status\">\n <ss-yoda-action\n type=\"state\"\n [native]=\"isNative$$()\"\n [errorText]=\"errorText$$()\"\n (activated)=\"onAction($event)\"\n />\n\n @if (isNative$$()) {\n <ss-yoda-native\n [disabled]=\"isLocked$$()\"\n [placeholder]=\"placeholder()\"\n />\n }\n </div>\n }\n</div>\n\n@if (!isNative$$()) {\n <ss-yoda-panel\n [origin]=\"host\"\n [showHint]=\"showHint()\"\n [showEmpty]=\"showEmpty()\"\n [listRender]=\"listRender()\"\n [panelClass]=\"panelClass()\"\n [hintMessage]=\"hintMessage()\"\n [scrollHeight]=\"scrollHeight()\"\n [emptyMessage]=\"emptyMessage()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [minQueryLength]=\"minQueryLength()\"\n >\n <ss-yoda-list\n [showMore]=\"showMore()\"\n [itemsShow]=\"itemsShow()\"\n [loopScroll]=\"loopScroll()\"\n [moreMessage]=\"moreMessage()\"\n [selectGroup]=\"selectGroup()\"\n [groupSticky]=\"groupSticky()\"\n [showHighlight]=\"showHighlight()\"\n [disabledOption]=\"disabledOption()\"\n (selected)=\"onSelect($event)\"\n />\n </ss-yoda-panel>\n}\n", styles: [":host{display:flex;inline-size:100%;flex-direction:column;color:var(--ss-yoda-color, #18181b);font-size:var(--ss-yoda-font-size, 1rem)}.yoda__field{display:flex;position:relative;align-items:stretch;border-radius:var(--ss-yoda-radius, 6px);background:var(--ss-yoda-background, #fff);border:1px solid var(--ss-yoda-border-color, #d4d4d8)}:host(:not(.yoda--locked)) .yoda__field:focus-within{box-shadow:var(--ss-yoda-focus-ring-shadow, none);outline-offset:var(--ss-yoda-focus-ring-offset, 0);border-color:var(--ss-yoda-border-focus-color, #3b82f6);outline:var(--ss-yoda-focus-ring-width, 0) var(--ss-yoda-focus-ring-style, none) var(--ss-yoda-focus-ring-color, transparent)}:host([data-variant=fill]) .yoda__field{background:var(--ss-yoda-fill-background, #f4f4f5)}:host([data-size=small]){--ss-yoda-padding-y: var(--ss-yoda-sm-padding-y, .25rem);--ss-yoda-padding-x: var(--ss-yoda-sm-padding-x, .5rem);--ss-yoda-font-size: var(--ss-yoda-sm-font-size, .875rem)}:host([data-size=large]){--ss-yoda-padding-y: var(--ss-yoda-lg-padding-y, .75rem);--ss-yoda-padding-x: var(--ss-yoda-lg-padding-x, .75rem);--ss-yoda-font-size: var(--ss-yoda-lg-font-size, 1.125rem)}:host(.yoda--invalid) .yoda__field{border-color:var(--ss-yoda-border-invalid-color, #ef4444)}:host(.yoda--invalid) .yoda__field:focus-within{border-color:var(--ss-yoda-border-invalid-focus-color, #dc2626)}:host(.yoda--disabled){cursor:not-allowed;color:var(--ss-yoda-disabled-color, #a1a1aa)}:host(.yoda--disabled) .yoda__field{background:var(--ss-yoda-disabled-background, #f4f4f5)}.yoda__segment{display:flex;flex:0 0 auto;align-items:center;justify-content:center;padding-inline:var(--ss-yoda-padding-x, .75rem)}.yoda__segment--input{flex:1 1 0;min-inline-size:0;justify-content:flex-start;gap:var(--ss-yoda-gap, .5rem)}.yoda__segment--status{position:relative}:host([data-separator=border]) .yoda__segment+.yoda__segment{border-inline-start:1px solid var(--ss-yoda-separator-color, #e4e4e7)}:host([data-separator=divider]) .yoda__segment+.yoda__segment{position:relative}:host([data-separator=divider]) .yoda__segment+.yoda__segment:before{content:\"\";inline-size:1px;position:absolute;inset-inline-start:0;inset-block:var(--ss-yoda-divider-inset, .375rem);background:var(--ss-yoda-separator-color, #e4e4e7)}.yoda__input{border:0;outline:0;flex:1 1 0;font:inherit;color:inherit;min-inline-size:0;text-overflow:ellipsis;background:transparent;padding-block:var(--ss-yoda-padding-y, .5rem)}.yoda__input::placeholder{color:var(--ss-yoda-muted-color, #a1a1aa)}.yoda__input:disabled{cursor:not-allowed}:host(.yoda--hidden){display:none}:host(.yoda--chained){flex:1 1 0}:host(.yoda--chained) .yoda__field{border-radius:0}:host(.yoda--chained:not([data-chain=first])){margin-inline-start:-1px}:host(.yoda--chained[data-chain=first]) .yoda__field,:host(.yoda--chained[data-chain=only]) .yoda__field{border-end-start-radius:var(--ss-yoda-radius, 6px);border-start-start-radius:var(--ss-yoda-radius, 6px)}:host(.yoda--chained[data-chain=last]) .yoda__field,:host(.yoda--chained[data-chain=only]) .yoda__field{border-end-end-radius:var(--ss-yoda-radius, 6px);border-start-end-radius:var(--ss-yoda-radius, 6px)}:host(.yoda--chained) .yoda__field:focus-within{z-index:1}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "ss-yoda-action", inputs: ["type", "errorText", "selectGroup", "itemsShow", "disabled", "native"], outputs: ["activated"] }, { kind: "component", type: NativeComponent, selector: "ss-yoda-native", inputs: ["placeholder", "disabled"] }, { kind: "component", type: PanelComponent, selector: "ss-yoda-panel", inputs: ["origin", "listRender", "scrollStrategy", "panelClass", "scrollHeight", "showHint", "showEmpty", "minQueryLength", "hintMessage", "emptyMessage"] }, { kind: "component", type: ListComponent, selector: "ss-yoda-list", inputs: ["itemsShow", "moreMessage", "showMore", "showHighlight", "loopScroll", "selectGroup", "groupSticky", "disabledOption"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1293
1331
|
}
|
|
1294
1332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: Yoda, decorators: [{
|
|
1295
1333
|
type: Component,
|
|
@@ -1312,7 +1350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
1312
1350
|
'(keydown.arrowdown)': 'onArrow($event, 1)',
|
|
1313
1351
|
'(keydown.arrowup)': 'onArrow($event, -1)',
|
|
1314
1352
|
'(focusout)': 'onFocusOut($event.relatedTarget)',
|
|
1315
|
-
}, imports: [ActionComponent, NativeComponent, PanelComponent, ListComponent], template: "<div class=\"yoda__field\">\n @if (createStartVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n <div class=\"yoda__segment yoda__segment--input\">\n <input\n #inputRef\n class=\"yoda__input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.id]=\"id()\"\n [attr.name]=\"name()\"\n [attr.size]=\"inputSize()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.required]=\"required()\"\n [attr.minlength]=\"minlength()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.readonly]=\"inputReadonly()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.aria-expanded]=\"state.isOpen$$()\"\n [attr.aria-invalid]=\"invalid$$() || null\"\n [value]=\"typed$$()\"\n [disabled]=\"isDisabled$$()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput(inputRef.value)\"\n />\n\n @if (counterVisible$$()) {\n <ss-yoda-action\n type=\"counter\"\n [itemsShow]=\"itemsShow()\"\n [selectGroup]=\"selectGroup()\"\n />\n }\n\n @if (clearVisible$$()) {\n <ss-yoda-action\n type=\"clear\"\n (activated)=\"onAction($event)\"\n />\n }\n </div>\n\n @if (createEndVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n @if (statusVisible$$()) {\n <div class=\"yoda__segment yoda__segment--status\">\n <ss-yoda-action\n type=\"state\"\n [native]=\"isNative$$()\"\n [errorText]=\"errorText$$()\"\n (activated)=\"onAction($event)\"\n />\n\n @if (isNative$$()) {\n <ss-yoda-native\n [disabled]=\"isLocked$$()\"\n [placeholder]=\"placeholder()\"\n />\n }\n </div>\n }\n</div>\n\n@if (!isNative$$()) {\n <ss-yoda-panel\n [origin]=\"host\"\n [showHint]=\"showHint()\"\n [showEmpty]=\"showEmpty()\"\n [listRender]=\"listRender()\"\n [panelClass]=\"panelClass()\"\n [hintMessage]=\"hintMessage()\"\n [scrollHeight]=\"scrollHeight()\"\n [emptyMessage]=\"emptyMessage()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [minQueryLength]=\"minQueryLength()\"\n >\n <ss-yoda-list\n [showMore]=\"showMore()\"\n [itemsShow]=\"itemsShow()\"\n [loopScroll]=\"loopScroll()\"\n [moreMessage]=\"moreMessage()\"\n [selectGroup]=\"selectGroup()\"\n [groupSticky]=\"groupSticky()\"\n [showHighlight]=\"showHighlight()\"\n [disabledOption]=\"disabledOption()\"\n (selected)=\"onSelect($event)\"\n />\n </ss-yoda-panel>\n}\n", styles: [":host{display:flex;inline-size:100%;flex-direction:column;color:var(--ss-yoda-color, #18181b);font-size:var(--ss-yoda-font-size, 1rem)}.yoda__field{display:flex;position:relative;align-items:stretch;border-radius:var(--ss-yoda-radius, 6px);background:var(--ss-yoda-background, #fff);border:1px solid var(--ss-yoda-border-color, #d4d4d8)}:host(:not(.yoda--locked)) .yoda__field:focus-within{box-shadow:var(--ss-yoda-focus-ring-shadow, none);outline-offset:var(--ss-yoda-focus-ring-offset, 0);border-color:var(--ss-yoda-border-focus-color, #3b82f6);outline:var(--ss-yoda-focus-ring-width, 0) var(--ss-yoda-focus-ring-style, none) var(--ss-yoda-focus-ring-color, transparent)}:host([data-variant=fill]) .yoda__field{background:var(--ss-yoda-fill-background, #f4f4f5)}:host([data-size=small]){--ss-yoda-padding-y: var(--ss-yoda-sm-padding-y, .25rem);--ss-yoda-padding-x: var(--ss-yoda-sm-padding-x, .5rem);--ss-yoda-font-size: var(--ss-yoda-sm-font-size, .875rem)}:host([data-size=large]){--ss-yoda-padding-y: var(--ss-yoda-lg-padding-y, .75rem);--ss-yoda-padding-x: var(--ss-yoda-lg-padding-x, .75rem);--ss-yoda-font-size: var(--ss-yoda-lg-font-size, 1.125rem)}:host(.yoda--invalid) .yoda__field{border-color:var(--ss-yoda-border-invalid-color, #ef4444)}:host(.yoda--invalid) .yoda__field:focus-within{border-color:var(--ss-yoda-border-invalid-focus-color, #dc2626)}:host(.yoda--disabled){cursor:not-allowed;
|
|
1353
|
+
}, imports: [ActionComponent, NativeComponent, PanelComponent, ListComponent], template: "<div class=\"yoda__field\">\n @if (createStartVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n <div class=\"yoda__segment yoda__segment--input\">\n <input\n #inputRef\n class=\"yoda__input\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.id]=\"id()\"\n [attr.name]=\"name()\"\n [attr.size]=\"inputSize()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.required]=\"required()\"\n [attr.minlength]=\"minlength()\"\n [attr.maxlength]=\"maxlength()\"\n [attr.readonly]=\"inputReadonly()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.aria-expanded]=\"state.isOpen$$()\"\n [attr.aria-invalid]=\"invalid$$() || null\"\n [value]=\"typed$$()\"\n [disabled]=\"isDisabled$$()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput(inputRef.value)\"\n />\n\n @if (counterVisible$$()) {\n <ss-yoda-action\n type=\"counter\"\n [itemsShow]=\"itemsShow()\"\n [selectGroup]=\"selectGroup()\"\n />\n }\n\n @if (clearVisible$$()) {\n <ss-yoda-action\n type=\"clear\"\n (activated)=\"onAction($event)\"\n />\n }\n </div>\n\n @if (createEndVisible$$()) {\n <ss-yoda-action\n class=\"yoda__segment\"\n type=\"create\"\n [disabled]=\"createDisabled$$()\"\n (activated)=\"onAction($event)\"\n />\n }\n\n @if (statusVisible$$()) {\n <div class=\"yoda__segment yoda__segment--status\">\n <ss-yoda-action\n type=\"state\"\n [native]=\"isNative$$()\"\n [errorText]=\"errorText$$()\"\n (activated)=\"onAction($event)\"\n />\n\n @if (isNative$$()) {\n <ss-yoda-native\n [disabled]=\"isLocked$$()\"\n [placeholder]=\"placeholder()\"\n />\n }\n </div>\n }\n</div>\n\n@if (!isNative$$()) {\n <ss-yoda-panel\n [origin]=\"host\"\n [showHint]=\"showHint()\"\n [showEmpty]=\"showEmpty()\"\n [listRender]=\"listRender()\"\n [panelClass]=\"panelClass()\"\n [hintMessage]=\"hintMessage()\"\n [scrollHeight]=\"scrollHeight()\"\n [emptyMessage]=\"emptyMessage()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [minQueryLength]=\"minQueryLength()\"\n >\n <ss-yoda-list\n [showMore]=\"showMore()\"\n [itemsShow]=\"itemsShow()\"\n [loopScroll]=\"loopScroll()\"\n [moreMessage]=\"moreMessage()\"\n [selectGroup]=\"selectGroup()\"\n [groupSticky]=\"groupSticky()\"\n [showHighlight]=\"showHighlight()\"\n [disabledOption]=\"disabledOption()\"\n (selected)=\"onSelect($event)\"\n />\n </ss-yoda-panel>\n}\n", styles: [":host{display:flex;inline-size:100%;flex-direction:column;color:var(--ss-yoda-color, #18181b);font-size:var(--ss-yoda-font-size, 1rem)}.yoda__field{display:flex;position:relative;align-items:stretch;border-radius:var(--ss-yoda-radius, 6px);background:var(--ss-yoda-background, #fff);border:1px solid var(--ss-yoda-border-color, #d4d4d8)}:host(:not(.yoda--locked)) .yoda__field:focus-within{box-shadow:var(--ss-yoda-focus-ring-shadow, none);outline-offset:var(--ss-yoda-focus-ring-offset, 0);border-color:var(--ss-yoda-border-focus-color, #3b82f6);outline:var(--ss-yoda-focus-ring-width, 0) var(--ss-yoda-focus-ring-style, none) var(--ss-yoda-focus-ring-color, transparent)}:host([data-variant=fill]) .yoda__field{background:var(--ss-yoda-fill-background, #f4f4f5)}:host([data-size=small]){--ss-yoda-padding-y: var(--ss-yoda-sm-padding-y, .25rem);--ss-yoda-padding-x: var(--ss-yoda-sm-padding-x, .5rem);--ss-yoda-font-size: var(--ss-yoda-sm-font-size, .875rem)}:host([data-size=large]){--ss-yoda-padding-y: var(--ss-yoda-lg-padding-y, .75rem);--ss-yoda-padding-x: var(--ss-yoda-lg-padding-x, .75rem);--ss-yoda-font-size: var(--ss-yoda-lg-font-size, 1.125rem)}:host(.yoda--invalid) .yoda__field{border-color:var(--ss-yoda-border-invalid-color, #ef4444)}:host(.yoda--invalid) .yoda__field:focus-within{border-color:var(--ss-yoda-border-invalid-focus-color, #dc2626)}:host(.yoda--disabled){cursor:not-allowed;color:var(--ss-yoda-disabled-color, #a1a1aa)}:host(.yoda--disabled) .yoda__field{background:var(--ss-yoda-disabled-background, #f4f4f5)}.yoda__segment{display:flex;flex:0 0 auto;align-items:center;justify-content:center;padding-inline:var(--ss-yoda-padding-x, .75rem)}.yoda__segment--input{flex:1 1 0;min-inline-size:0;justify-content:flex-start;gap:var(--ss-yoda-gap, .5rem)}.yoda__segment--status{position:relative}:host([data-separator=border]) .yoda__segment+.yoda__segment{border-inline-start:1px solid var(--ss-yoda-separator-color, #e4e4e7)}:host([data-separator=divider]) .yoda__segment+.yoda__segment{position:relative}:host([data-separator=divider]) .yoda__segment+.yoda__segment:before{content:\"\";inline-size:1px;position:absolute;inset-inline-start:0;inset-block:var(--ss-yoda-divider-inset, .375rem);background:var(--ss-yoda-separator-color, #e4e4e7)}.yoda__input{border:0;outline:0;flex:1 1 0;font:inherit;color:inherit;min-inline-size:0;text-overflow:ellipsis;background:transparent;padding-block:var(--ss-yoda-padding-y, .5rem)}.yoda__input::placeholder{color:var(--ss-yoda-muted-color, #a1a1aa)}.yoda__input:disabled{cursor:not-allowed}:host(.yoda--hidden){display:none}:host(.yoda--chained){flex:1 1 0}:host(.yoda--chained) .yoda__field{border-radius:0}:host(.yoda--chained:not([data-chain=first])){margin-inline-start:-1px}:host(.yoda--chained[data-chain=first]) .yoda__field,:host(.yoda--chained[data-chain=only]) .yoda__field{border-end-start-radius:var(--ss-yoda-radius, 6px);border-start-start-radius:var(--ss-yoda-radius, 6px)}:host(.yoda--chained[data-chain=last]) .yoda__field,:host(.yoda--chained[data-chain=only]) .yoda__field{border-end-end-radius:var(--ss-yoda-radius, 6px);border-start-end-radius:var(--ss-yoda-radius, 6px)}:host(.yoda--chained) .yoda__field:focus-within{z-index:1}\n"] }]
|
|
1316
1354
|
}], ctorParameters: () => [], propDecorators: { list: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ListComponent), { isSignal: true }] }] } });
|
|
1317
1355
|
|
|
1318
1356
|
class YodaChain {
|