@open-rlb/ng-bootstrap 3.3.33 → 3.3.34
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.
|
@@ -10189,12 +10189,15 @@ class LanguageChipsComponent extends AbstractComponent {
|
|
|
10189
10189
|
this.userDefinedId = input('', { ...(ngDevMode ? { debugName: "userDefinedId" } : /* istanbul ignore next */ {}), alias: 'id' });
|
|
10190
10190
|
this.selectKey = signal(0, ...(ngDevMode ? [{ debugName: "selectKey" }] : /* istanbul ignore next */ []));
|
|
10191
10191
|
this.chips = computed(() => this.value() ?? [], ...(ngDevMode ? [{ debugName: "chips" }] : /* istanbul ignore next */ []));
|
|
10192
|
-
this.available = computed(() => this.options().filter(l => !this.chips().includes(l)), ...(ngDevMode ? [{ debugName: "available" }] : /* istanbul ignore next */ []));
|
|
10193
10192
|
this.isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
10194
10193
|
this.addControl = new FormControl(null);
|
|
10195
10194
|
this.addControl.valueChanges.pipe(filter(Boolean), takeUntilDestroyed()).subscribe(lang => {
|
|
10196
10195
|
this.add(lang);
|
|
10197
10196
|
this.addControl.setValue(null, { emitEvent: false });
|
|
10197
|
+
// Reset the dropdown back to its placeholder after every pick, even when
|
|
10198
|
+
// the value was ignored as a duplicate, so the already-selected option
|
|
10199
|
+
// doesn't stay stuck as the visible selection.
|
|
10200
|
+
this.selectKey.update(k => k + 1);
|
|
10198
10201
|
});
|
|
10199
10202
|
}
|
|
10200
10203
|
add(lang) {
|
|
@@ -10202,7 +10205,6 @@ class LanguageChipsComponent extends AbstractComponent {
|
|
|
10202
10205
|
return;
|
|
10203
10206
|
const next = [...this.chips(), lang];
|
|
10204
10207
|
this.setValue(next);
|
|
10205
|
-
this.selectKey.update(k => k + 1);
|
|
10206
10208
|
this.touch();
|
|
10207
10209
|
}
|
|
10208
10210
|
remove(lang) {
|
|
@@ -10217,14 +10219,14 @@ class LanguageChipsComponent extends AbstractComponent {
|
|
|
10217
10219
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LanguageChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10218
10220
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LanguageChipsComponent, isStandalone: true, selector: "rlb-language-chips", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "null" } }, usesInheritance: true, ngImport: i0, template: `
|
|
10219
10221
|
<div class="d-flex flex-column gap-2">
|
|
10220
|
-
@if (!isDisabled()
|
|
10222
|
+
@if (!isDisabled()) {
|
|
10221
10223
|
@for (_ of [selectKey()]; track _) {
|
|
10222
10224
|
<div class="lang-add-select">
|
|
10223
10225
|
<rlb-select
|
|
10224
10226
|
[formControl]="addControl"
|
|
10225
10227
|
[placeholder]="placeholder()"
|
|
10226
10228
|
>
|
|
10227
|
-
@for (lang of
|
|
10229
|
+
@for (lang of options(); track lang) {
|
|
10228
10230
|
<rlb-option [value]="lang">{{ lang }}</rlb-option>
|
|
10229
10231
|
}
|
|
10230
10232
|
</rlb-select>
|
|
@@ -10232,14 +10234,19 @@ class LanguageChipsComponent extends AbstractComponent {
|
|
|
10232
10234
|
}
|
|
10233
10235
|
}
|
|
10234
10236
|
@if (chips().length > 0) {
|
|
10235
|
-
<div class="d-flex flex-wrap align-items-center gap-2">
|
|
10237
|
+
<div class="chips-box form-control d-flex flex-wrap align-items-center gap-2">
|
|
10236
10238
|
@for (lang of chips(); track lang) {
|
|
10237
|
-
<span
|
|
10238
|
-
|
|
10239
|
+
<span
|
|
10240
|
+
rlb-badge
|
|
10241
|
+
pill
|
|
10242
|
+
color="secondary"
|
|
10243
|
+
class="chip d-inline-flex align-items-center gap-1 mw-100"
|
|
10244
|
+
>
|
|
10245
|
+
<span class="chip-label">{{ lang }}</span>
|
|
10239
10246
|
@if (!isDisabled()) {
|
|
10240
10247
|
<button
|
|
10241
10248
|
type="button"
|
|
10242
|
-
class="btn-close btn-close-white btn-close-sm"
|
|
10249
|
+
class="btn-close btn-close-white btn-close-sm flex-shrink-0"
|
|
10243
10250
|
(click)="remove(lang)"
|
|
10244
10251
|
[attr.aria-label]="'Remove ' + lang"
|
|
10245
10252
|
></button>
|
|
@@ -10249,20 +10256,20 @@ class LanguageChipsComponent extends AbstractComponent {
|
|
|
10249
10256
|
</div>
|
|
10250
10257
|
}
|
|
10251
10258
|
</div>
|
|
10252
|
-
`, isInline: true, styles: [".lang-add-select{min-width:130px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SelectComponent, selector: "rlb-select", inputs: ["placeholder", "size", "disabled", "readonly", "multiple", "display", "inputId", "enable-validation"] }, { kind: "component", type: OptionComponent, selector: "rlb-option", inputs: ["value", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10259
|
+
`, isInline: true, styles: [".lang-add-select{min-width:130px}.chips-box{height:auto;max-height:7.5rem;overflow-y:auto}.chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:12rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SelectComponent, selector: "rlb-select", inputs: ["placeholder", "size", "disabled", "readonly", "multiple", "display", "inputId", "enable-validation"] }, { kind: "component", type: OptionComponent, selector: "rlb-option", inputs: ["value", "disabled"] }, { kind: "component", type: BadgeComponent, selector: "span[rlb-badge], img[rlb-badge]", inputs: ["pill", "color", "hidden-text", "border", "class", "badge-text-color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10253
10260
|
}
|
|
10254
10261
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LanguageChipsComponent, decorators: [{
|
|
10255
10262
|
type: Component,
|
|
10256
10263
|
args: [{ selector: 'rlb-language-chips', template: `
|
|
10257
10264
|
<div class="d-flex flex-column gap-2">
|
|
10258
|
-
@if (!isDisabled()
|
|
10265
|
+
@if (!isDisabled()) {
|
|
10259
10266
|
@for (_ of [selectKey()]; track _) {
|
|
10260
10267
|
<div class="lang-add-select">
|
|
10261
10268
|
<rlb-select
|
|
10262
10269
|
[formControl]="addControl"
|
|
10263
10270
|
[placeholder]="placeholder()"
|
|
10264
10271
|
>
|
|
10265
|
-
@for (lang of
|
|
10272
|
+
@for (lang of options(); track lang) {
|
|
10266
10273
|
<rlb-option [value]="lang">{{ lang }}</rlb-option>
|
|
10267
10274
|
}
|
|
10268
10275
|
</rlb-select>
|
|
@@ -10270,14 +10277,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
10270
10277
|
}
|
|
10271
10278
|
}
|
|
10272
10279
|
@if (chips().length > 0) {
|
|
10273
|
-
<div class="d-flex flex-wrap align-items-center gap-2">
|
|
10280
|
+
<div class="chips-box form-control d-flex flex-wrap align-items-center gap-2">
|
|
10274
10281
|
@for (lang of chips(); track lang) {
|
|
10275
|
-
<span
|
|
10276
|
-
|
|
10282
|
+
<span
|
|
10283
|
+
rlb-badge
|
|
10284
|
+
pill
|
|
10285
|
+
color="secondary"
|
|
10286
|
+
class="chip d-inline-flex align-items-center gap-1 mw-100"
|
|
10287
|
+
>
|
|
10288
|
+
<span class="chip-label">{{ lang }}</span>
|
|
10277
10289
|
@if (!isDisabled()) {
|
|
10278
10290
|
<button
|
|
10279
10291
|
type="button"
|
|
10280
|
-
class="btn-close btn-close-white btn-close-sm"
|
|
10292
|
+
class="btn-close btn-close-white btn-close-sm flex-shrink-0"
|
|
10281
10293
|
(click)="remove(lang)"
|
|
10282
10294
|
[attr.aria-label]="'Remove ' + lang"
|
|
10283
10295
|
></button>
|
|
@@ -10287,7 +10299,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
10287
10299
|
</div>
|
|
10288
10300
|
}
|
|
10289
10301
|
</div>
|
|
10290
|
-
`, host: { '[attr.id]': 'null' }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, SelectComponent, OptionComponent], styles: [".lang-add-select{min-width:130px}\n"] }]
|
|
10302
|
+
`, host: { '[attr.id]': 'null' }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, SelectComponent, OptionComponent, BadgeComponent], styles: [".lang-add-select{min-width:130px}.chips-box{height:auto;max-height:7.5rem;overflow-y:auto}.chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:12rem}\n"] }]
|
|
10291
10303
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
|
|
10292
10304
|
|
|
10293
10305
|
class RadioComponent extends AbstractComponent {
|