@elasticias/ui 1.0.34 → 1.0.36
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.
|
@@ -66,6 +66,8 @@ import * as i1$f from 'primeng/selectbutton';
|
|
|
66
66
|
import { SelectButtonModule, SelectButton } from 'primeng/selectbutton';
|
|
67
67
|
import * as i2$5 from 'primeng/table';
|
|
68
68
|
import { TableModule } from 'primeng/table';
|
|
69
|
+
import * as i1$g from 'primeng/radiobutton';
|
|
70
|
+
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
69
71
|
import { updatePreset, updateSurfacePalette, $t } from '@primeng/themes';
|
|
70
72
|
import Aura from '@primeng/themes/aura';
|
|
71
73
|
import Lara from '@primeng/themes/lara';
|
|
@@ -9394,6 +9396,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9394
9396
|
* value when ticked, `null` when unticked) — the latter pairs with
|
|
9395
9397
|
* a parent NgModel array for multi-select scenarios.
|
|
9396
9398
|
*
|
|
9399
|
+
* Two layouts, set by `inline`:
|
|
9400
|
+
* - `inline` (default) — box with its label to the right, for
|
|
9401
|
+
* standalone toggles and dense lists.
|
|
9402
|
+
* - `[inline]="false"` — field layout: the label sits above, like
|
|
9403
|
+
* `ef-select` / `ef-input-text`, and the box is centred in a
|
|
9404
|
+
* `--hit-base` row so it lines up with the inputs beside it in a
|
|
9405
|
+
* form grid.
|
|
9406
|
+
*
|
|
9397
9407
|
* ```html
|
|
9398
9408
|
* <ef-checkbox
|
|
9399
9409
|
* labelKey="catalog.is_active"
|
|
@@ -9417,6 +9427,14 @@ class EfCheckboxComponent extends AbstractEfFormControl {
|
|
|
9417
9427
|
* styled against `.ef-checkbox-native`.
|
|
9418
9428
|
*/
|
|
9419
9429
|
variant = 'primeng';
|
|
9430
|
+
/** Label beside the box (default). `false` stacks the label above,
|
|
9431
|
+
* matching the other form fields in a grid row. */
|
|
9432
|
+
inline = true;
|
|
9433
|
+
get isStacked() { return !this.inline; }
|
|
9434
|
+
/** Whether the label renders beside the box (inline layout only). */
|
|
9435
|
+
get hasLabel() {
|
|
9436
|
+
return !!(this.labelKey() || this.label());
|
|
9437
|
+
}
|
|
9420
9438
|
/** Two-way bindable `[(checked)]`. */
|
|
9421
9439
|
checked = false;
|
|
9422
9440
|
checkedChange = new EventEmitter();
|
|
@@ -9472,11 +9490,11 @@ class EfCheckboxComponent extends AbstractEfFormControl {
|
|
|
9472
9490
|
this.onTouched();
|
|
9473
9491
|
}
|
|
9474
9492
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9475
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: EfCheckboxComponent, isStandalone: true, selector: "ef-checkbox", inputs: { value: "value", binary: ["binary", "binary", booleanAttribute], variant: "variant", checked: "checked" }, outputs: { checkedChange: "checkedChange" }, usesInheritance: true, ngImport: i0, template: "@if (variant === 'comptoir') {\n
|
|
9493
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: EfCheckboxComponent, isStandalone: true, selector: "ef-checkbox", inputs: { value: "value", binary: ["binary", "binary", booleanAttribute], variant: "variant", inline: ["inline", "inline", booleanAttribute], checked: "checked" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "class.ef-stacked": "this.isStacked" } }, usesInheritance: true, ngImport: i0, template: "@if (!inline && hasLabel) {\n <ef-label [labelKey]=\"labelKey()\" [label]=\"label()\" [for]=\"effectiveId\" [required]=\"required()\" />\n}\n<div class=\"ef-checkbox-control\">\n @if (variant === 'comptoir') {\n <label class=\"ef-checkbox-native\" [class.is-disabled]=\"disabled\">\n <input\n type=\"checkbox\"\n [id]=\"effectiveId\"\n [attr.name]=\"name() || null\"\n [checked]=\"!!checked\"\n [disabled]=\"isDisabled()\"\n [class.is-invalid]=\"isInvalid\"\n [attr.aria-label]=\"effectiveAriaLabel\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"isInvalid ? 'true' : null\"\n [attr.aria-describedby]=\"(showRequired || serverErrors) ? errorsId : null\"\n (change)=\"handleNativeChange($any($event.target).checked)\"\n />\n <span class=\"ef-checkbox-box\" aria-hidden=\"true\"></span>\n @if (inline && hasLabel) {\n <span class=\"ef-checkbox-label\">\n {{ labelKey() ? (labelKey() | translate) : label() }}\n @if (required()) {\n <span class=\"ef-checkbox-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n </label>\n } @else {\n <p-checkbox\n [inputId]=\"effectiveId\"\n [name]=\"name()\"\n [ngModel]=\"checked\"\n [ngModelOptions]=\"{standalone: true}\"\n (onChange)=\"handleChange($event)\"\n [value]=\"value\"\n [binary]=\"binary\"\n [disabled]=\"isDisabled()\"\n [ariaLabel]=\"effectiveAriaLabel || undefined\"\n />\n @if (inline && hasLabel) {\n <ef-label [labelKey]=\"labelKey()\" [label]=\"label()\" [for]=\"effectiveId\" styleClass=\"form-label-left cursor-pointer\" />\n }\n }\n</div>\n@if (showRequired || serverErrors) {\n <div [id]=\"errorsId\" role=\"alert\" aria-live=\"polite\">\n @if (showRequired) {\n <small class=\"text-danger\">{{ 'validation.required' | translate }}</small>\n }\n @if (serverErrors; as errors) {\n @for (error of errors; track error) {\n <small class=\"text-danger block\">{{ error }}</small>\n }\n }\n </div>\n}\n", styles: [":host{display:inline-flex;flex-wrap:wrap;align-items:center;gap:.5rem;min-width:0}.ef-checkbox-control{display:inline-flex;align-items:center;gap:.5rem;min-width:0}:host(.ef-stacked){display:block}:host(.ef-stacked)>.ef-checkbox-control{display:flex;min-height:var(--hit-base)}\n"], dependencies: [{ kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: EfLabelComponent, selector: "ef-label", inputs: ["label", "labelKey", "for", "styleClass", "required"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
9476
9494
|
}
|
|
9477
9495
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfCheckboxComponent, decorators: [{
|
|
9478
9496
|
type: Component,
|
|
9479
|
-
args: [{ selector: 'ef-checkbox', standalone: true, imports: [CheckboxModule, FormsModule, TranslateModule, EfLabelComponent], template: "@if (variant === 'comptoir') {\n
|
|
9497
|
+
args: [{ selector: 'ef-checkbox', standalone: true, imports: [CheckboxModule, FormsModule, TranslateModule, EfLabelComponent], template: "@if (!inline && hasLabel) {\n <ef-label [labelKey]=\"labelKey()\" [label]=\"label()\" [for]=\"effectiveId\" [required]=\"required()\" />\n}\n<div class=\"ef-checkbox-control\">\n @if (variant === 'comptoir') {\n <label class=\"ef-checkbox-native\" [class.is-disabled]=\"disabled\">\n <input\n type=\"checkbox\"\n [id]=\"effectiveId\"\n [attr.name]=\"name() || null\"\n [checked]=\"!!checked\"\n [disabled]=\"isDisabled()\"\n [class.is-invalid]=\"isInvalid\"\n [attr.aria-label]=\"effectiveAriaLabel\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"isInvalid ? 'true' : null\"\n [attr.aria-describedby]=\"(showRequired || serverErrors) ? errorsId : null\"\n (change)=\"handleNativeChange($any($event.target).checked)\"\n />\n <span class=\"ef-checkbox-box\" aria-hidden=\"true\"></span>\n @if (inline && hasLabel) {\n <span class=\"ef-checkbox-label\">\n {{ labelKey() ? (labelKey() | translate) : label() }}\n @if (required()) {\n <span class=\"ef-checkbox-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n </label>\n } @else {\n <p-checkbox\n [inputId]=\"effectiveId\"\n [name]=\"name()\"\n [ngModel]=\"checked\"\n [ngModelOptions]=\"{standalone: true}\"\n (onChange)=\"handleChange($event)\"\n [value]=\"value\"\n [binary]=\"binary\"\n [disabled]=\"isDisabled()\"\n [ariaLabel]=\"effectiveAriaLabel || undefined\"\n />\n @if (inline && hasLabel) {\n <ef-label [labelKey]=\"labelKey()\" [label]=\"label()\" [for]=\"effectiveId\" styleClass=\"form-label-left cursor-pointer\" />\n }\n }\n</div>\n@if (showRequired || serverErrors) {\n <div [id]=\"errorsId\" role=\"alert\" aria-live=\"polite\">\n @if (showRequired) {\n <small class=\"text-danger\">{{ 'validation.required' | translate }}</small>\n }\n @if (serverErrors; as errors) {\n @for (error of errors; track error) {\n <small class=\"text-danger block\">{{ error }}</small>\n }\n }\n </div>\n}\n", styles: [":host{display:inline-flex;flex-wrap:wrap;align-items:center;gap:.5rem;min-width:0}.ef-checkbox-control{display:inline-flex;align-items:center;gap:.5rem;min-width:0}:host(.ef-stacked){display:block}:host(.ef-stacked)>.ef-checkbox-control{display:flex;min-height:var(--hit-base)}\n"] }]
|
|
9480
9498
|
}], ctorParameters: () => [], propDecorators: { value: [{
|
|
9481
9499
|
type: Input
|
|
9482
9500
|
}], binary: [{
|
|
@@ -9484,6 +9502,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
9484
9502
|
args: [{ transform: booleanAttribute }]
|
|
9485
9503
|
}], variant: [{
|
|
9486
9504
|
type: Input
|
|
9505
|
+
}], inline: [{
|
|
9506
|
+
type: Input,
|
|
9507
|
+
args: [{ transform: booleanAttribute }]
|
|
9508
|
+
}], isStacked: [{
|
|
9509
|
+
type: HostBinding,
|
|
9510
|
+
args: ['class.ef-stacked']
|
|
9487
9511
|
}], checked: [{
|
|
9488
9512
|
type: Input
|
|
9489
9513
|
}], checkedChange: [{
|
|
@@ -11017,6 +11041,137 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11017
11041
|
args: [{ selector: 'ef-change-password', standalone: true, imports: [CommonModule, TranslateModule, EfPasswordComponent, EfFormGridComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ef-form-grid>\n @if (requireCurrent()) {\n <ef-password\n class=\"col-12\"\n name=\"currentPassword\"\n labelKey=\"ef_change_password_current\"\n autocomplete=\"current-password\"\n required\n (valueChangeEvent)=\"currentPassword.set($event)\"\n />\n }\n <ef-password\n class=\"col-6\"\n name=\"newPassword\"\n labelKey=\"ef_change_password_new\"\n autocomplete=\"new-password\"\n required\n (valueChangeEvent)=\"newPassword.set($event)\"\n />\n <ef-password\n class=\"col-6\"\n name=\"newPasswordConfirmation\"\n labelKey=\"ef_change_password_confirm\"\n autocomplete=\"new-password\"\n required\n (valueChangeEvent)=\"confirmation.set($event)\"\n />\n</ef-form-grid>\n\n@if (validationKeys().length || errors().length) {\n <ul class=\"ef-change-password__errors\">\n @for (key of validationKeys(); track $index) {\n <li>{{ key | translate }}</li>\n }\n <!-- Server messages arrive already translated (Identity returns prose,\n not keys), so they are printed verbatim. -->\n @for (error of errors(); track $index) {\n <li>{{ error }}</li>\n }\n </ul>\n}\n", styles: [":host{display:grid;gap:var(--s-2, 8px);min-width:0}.ef-change-password__errors{display:grid;gap:4px;margin:0;padding:0;list-style:none;min-width:0;font-size:12px;line-height:1.4;color:var(--st-cancelled-fg, #b42318)}\n"] }]
|
|
11018
11042
|
}], propDecorators: { requireCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "requireCurrent", required: false }] }], busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], submitted: [{ type: i0.Output, args: ["submitted"] }] } });
|
|
11019
11043
|
|
|
11044
|
+
/**
|
|
11045
|
+
* Comptoir radio group — one `p-radiobutton` per option, single value.
|
|
11046
|
+
*
|
|
11047
|
+
* Options follow the `ef-select` shape (`options` / `optionLabel` /
|
|
11048
|
+
* `optionValue`, change via `selectionChangeEvent`), so a short select
|
|
11049
|
+
* can become a radio group by swapping the tag.
|
|
11050
|
+
*
|
|
11051
|
+
* Two layouts, set by `inline`, matching `ef-checkbox`:
|
|
11052
|
+
* - `inline` (default) — group label and options on one line.
|
|
11053
|
+
* - `[inline]="false"` — field layout: the label sits above, like
|
|
11054
|
+
* `ef-select` / `ef-input-text`, and the options sit in a
|
|
11055
|
+
* `--hit-base` row so they line up with the inputs beside them in a
|
|
11056
|
+
* form grid.
|
|
11057
|
+
*
|
|
11058
|
+
* Options wrap when the row runs out of width, so a long list never
|
|
11059
|
+
* widens the page on a phone.
|
|
11060
|
+
*
|
|
11061
|
+
* ```html
|
|
11062
|
+
* <ef-radio
|
|
11063
|
+
* name="clientType"
|
|
11064
|
+
* labelKey="sales_clients_col_type"
|
|
11065
|
+
* [inline]="false"
|
|
11066
|
+
* [options]="context.ref.get('client_type')()"
|
|
11067
|
+
* optionLabel="label"
|
|
11068
|
+
* optionValue="code"
|
|
11069
|
+
* [value]="clientType()"
|
|
11070
|
+
* (selectionChangeEvent)="patchEntity({ clientType: $event })" />
|
|
11071
|
+
* ```
|
|
11072
|
+
*/
|
|
11073
|
+
class EfRadioComponent extends AbstractEfFormControl {
|
|
11074
|
+
options = [];
|
|
11075
|
+
/** Property shown as the option's text. */
|
|
11076
|
+
optionLabel = 'label';
|
|
11077
|
+
/** Property used as the value. Unset → the whole option object. */
|
|
11078
|
+
optionValue;
|
|
11079
|
+
/** Property that disables a single option when truthy. */
|
|
11080
|
+
optionDisabled;
|
|
11081
|
+
/** Group label beside the options (default). `false` stacks it above,
|
|
11082
|
+
* matching the other form fields in a grid row. */
|
|
11083
|
+
inline = true;
|
|
11084
|
+
get isStacked() { return !this.inline; }
|
|
11085
|
+
value = null;
|
|
11086
|
+
selectionChangeEvent = new EventEmitter();
|
|
11087
|
+
onChange = () => { };
|
|
11088
|
+
onTouched = () => { };
|
|
11089
|
+
ngControl = inject(NgControl, { self: true, optional: true });
|
|
11090
|
+
constructor() {
|
|
11091
|
+
super();
|
|
11092
|
+
if (this.ngControl) {
|
|
11093
|
+
this.ngControl.valueAccessor = this;
|
|
11094
|
+
}
|
|
11095
|
+
}
|
|
11096
|
+
get hasLabel() {
|
|
11097
|
+
return !!(this.labelKey() || this.label());
|
|
11098
|
+
}
|
|
11099
|
+
/** Shared `name` so the browser treats the options as one group. */
|
|
11100
|
+
get groupName() {
|
|
11101
|
+
return this.name() || this.effectiveId;
|
|
11102
|
+
}
|
|
11103
|
+
get labelId() {
|
|
11104
|
+
return `${this.effectiveId}-label`;
|
|
11105
|
+
}
|
|
11106
|
+
get showRequired() {
|
|
11107
|
+
const ctrl = this.ngControl?.control;
|
|
11108
|
+
return !!(ctrl?.hasError('required') && ctrl?.touched);
|
|
11109
|
+
}
|
|
11110
|
+
get serverErrors() {
|
|
11111
|
+
return this.resolvedExternalErrors() ?? this.ngControl?.control?.errors?.['serverError'] ?? null;
|
|
11112
|
+
}
|
|
11113
|
+
get isInvalid() {
|
|
11114
|
+
if (this.resolvedExternalErrors()?.length)
|
|
11115
|
+
return true;
|
|
11116
|
+
const ctrl = this.ngControl?.control;
|
|
11117
|
+
return !!(ctrl?.invalid && (ctrl?.touched || ctrl?.dirty));
|
|
11118
|
+
}
|
|
11119
|
+
optionValueOf(opt) {
|
|
11120
|
+
return this.optionValue ? opt?.[this.optionValue] : opt;
|
|
11121
|
+
}
|
|
11122
|
+
optionLabelOf(opt) {
|
|
11123
|
+
return opt?.[this.optionLabel] ?? '';
|
|
11124
|
+
}
|
|
11125
|
+
isOptionDisabled(opt) {
|
|
11126
|
+
return this.isDisabled() || (!!this.optionDisabled && !!opt?.[this.optionDisabled]);
|
|
11127
|
+
}
|
|
11128
|
+
optionId(index) {
|
|
11129
|
+
return `${this.effectiveId}-${index}`;
|
|
11130
|
+
}
|
|
11131
|
+
writeValue(value) {
|
|
11132
|
+
this.value = value;
|
|
11133
|
+
}
|
|
11134
|
+
registerOnChange(fn) {
|
|
11135
|
+
this.onChange = fn;
|
|
11136
|
+
}
|
|
11137
|
+
registerOnTouched(fn) {
|
|
11138
|
+
this.onTouched = fn;
|
|
11139
|
+
}
|
|
11140
|
+
setDisabledState(isDisabled) {
|
|
11141
|
+
this.updateDisabledState(isDisabled);
|
|
11142
|
+
}
|
|
11143
|
+
handleChange(next) {
|
|
11144
|
+
this.value = next;
|
|
11145
|
+
this.onChange(next);
|
|
11146
|
+
this.selectionChangeEvent.emit(next);
|
|
11147
|
+
this.onTouched();
|
|
11148
|
+
}
|
|
11149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11150
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: EfRadioComponent, isStandalone: true, selector: "ef-radio", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", inline: ["inline", "inline", booleanAttribute], value: "value" }, outputs: { selectionChangeEvent: "selectionChangeEvent" }, host: { properties: { "class.ef-stacked": "this.isStacked" } }, usesInheritance: true, ngImport: i0, template: "@if (hasLabel) {\n <span class=\"ef-radio-group-label\" [id]=\"labelId\">\n <ef-label\n [labelKey]=\"labelKey()\"\n [label]=\"label()\"\n [required]=\"required()\"\n [styleClass]=\"inline ? 'form-label-left' : 'form-label'\"\n />\n </span>\n}\n<div\n class=\"ef-radio-options\"\n role=\"radiogroup\"\n [attr.aria-labelledby]=\"hasLabel ? labelId : null\"\n [attr.aria-label]=\"hasLabel ? null : effectiveAriaLabel\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"isInvalid ? 'true' : null\"\n [attr.aria-describedby]=\"(showRequired || serverErrors) ? errorsId : null\"\n>\n @for (opt of options; track $index; let i = $index) {\n <div class=\"ef-radio-option\">\n <p-radiobutton\n [inputId]=\"optionId(i)\"\n [name]=\"groupName\"\n [value]=\"optionValueOf(opt)\"\n [ngModel]=\"value\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"handleChange($event)\"\n [disabled]=\"isOptionDisabled(opt)\"\n />\n <label class=\"ef-radio-option-label\" [for]=\"optionId(i)\" [class.is-disabled]=\"isOptionDisabled(opt)\">\n {{ optionLabelOf(opt) }}\n </label>\n </div>\n }\n</div>\n@if (showRequired || serverErrors) {\n <div class=\"ef-radio-errors\" [id]=\"errorsId\" role=\"alert\" aria-live=\"polite\">\n @if (showRequired) {\n <small class=\"text-danger\">{{ 'validation.required' | translate }}</small>\n }\n @if (serverErrors; as errors) {\n @for (error of errors; track error) {\n <small class=\"text-danger block\">{{ error }}</small>\n }\n }\n </div>\n}\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;min-width:0}.ef-radio-options{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1.25rem;min-width:0}.ef-radio-option{display:inline-flex;align-items:center;gap:.5rem;min-width:0}.ef-radio-option-label{font-size:13.5px;font-weight:600;color:var(--text);cursor:pointer;-webkit-user-select:none;user-select:none}.ef-radio-option-label.is-disabled{color:var(--text-mute);cursor:not-allowed}.ef-radio-errors{flex-basis:100%}:host(.ef-stacked){display:block}:host(.ef-stacked)>.ef-radio-group-label{display:block}:host(.ef-stacked)>.ef-radio-options{min-height:var(--hit-base)}\n"], dependencies: [{ kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i1$g.RadioButton, selector: "p-radioButton, p-radiobutton, p-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: EfLabelComponent, selector: "ef-label", inputs: ["label", "labelKey", "for", "styleClass", "required"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
11151
|
+
}
|
|
11152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EfRadioComponent, decorators: [{
|
|
11153
|
+
type: Component,
|
|
11154
|
+
args: [{ selector: 'ef-radio', standalone: true, imports: [RadioButtonModule, FormsModule, TranslateModule, EfLabelComponent], template: "@if (hasLabel) {\n <span class=\"ef-radio-group-label\" [id]=\"labelId\">\n <ef-label\n [labelKey]=\"labelKey()\"\n [label]=\"label()\"\n [required]=\"required()\"\n [styleClass]=\"inline ? 'form-label-left' : 'form-label'\"\n />\n </span>\n}\n<div\n class=\"ef-radio-options\"\n role=\"radiogroup\"\n [attr.aria-labelledby]=\"hasLabel ? labelId : null\"\n [attr.aria-label]=\"hasLabel ? null : effectiveAriaLabel\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"isInvalid ? 'true' : null\"\n [attr.aria-describedby]=\"(showRequired || serverErrors) ? errorsId : null\"\n>\n @for (opt of options; track $index; let i = $index) {\n <div class=\"ef-radio-option\">\n <p-radiobutton\n [inputId]=\"optionId(i)\"\n [name]=\"groupName\"\n [value]=\"optionValueOf(opt)\"\n [ngModel]=\"value\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"handleChange($event)\"\n [disabled]=\"isOptionDisabled(opt)\"\n />\n <label class=\"ef-radio-option-label\" [for]=\"optionId(i)\" [class.is-disabled]=\"isOptionDisabled(opt)\">\n {{ optionLabelOf(opt) }}\n </label>\n </div>\n }\n</div>\n@if (showRequired || serverErrors) {\n <div class=\"ef-radio-errors\" [id]=\"errorsId\" role=\"alert\" aria-live=\"polite\">\n @if (showRequired) {\n <small class=\"text-danger\">{{ 'validation.required' | translate }}</small>\n }\n @if (serverErrors; as errors) {\n @for (error of errors; track error) {\n <small class=\"text-danger block\">{{ error }}</small>\n }\n }\n </div>\n}\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;min-width:0}.ef-radio-options{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1.25rem;min-width:0}.ef-radio-option{display:inline-flex;align-items:center;gap:.5rem;min-width:0}.ef-radio-option-label{font-size:13.5px;font-weight:600;color:var(--text);cursor:pointer;-webkit-user-select:none;user-select:none}.ef-radio-option-label.is-disabled{color:var(--text-mute);cursor:not-allowed}.ef-radio-errors{flex-basis:100%}:host(.ef-stacked){display:block}:host(.ef-stacked)>.ef-radio-group-label{display:block}:host(.ef-stacked)>.ef-radio-options{min-height:var(--hit-base)}\n"] }]
|
|
11155
|
+
}], ctorParameters: () => [], propDecorators: { options: [{
|
|
11156
|
+
type: Input
|
|
11157
|
+
}], optionLabel: [{
|
|
11158
|
+
type: Input
|
|
11159
|
+
}], optionValue: [{
|
|
11160
|
+
type: Input
|
|
11161
|
+
}], optionDisabled: [{
|
|
11162
|
+
type: Input
|
|
11163
|
+
}], inline: [{
|
|
11164
|
+
type: Input,
|
|
11165
|
+
args: [{ transform: booleanAttribute }]
|
|
11166
|
+
}], isStacked: [{
|
|
11167
|
+
type: HostBinding,
|
|
11168
|
+
args: ['class.ef-stacked']
|
|
11169
|
+
}], value: [{
|
|
11170
|
+
type: Input
|
|
11171
|
+
}], selectionChangeEvent: [{
|
|
11172
|
+
type: Output
|
|
11173
|
+
}] } });
|
|
11174
|
+
|
|
11020
11175
|
/**
|
|
11021
11176
|
* Native Comptoir textarea — no PrimeNG wrapper. Pairs with the
|
|
11022
11177
|
* `.ef-textarea` rule in `@elasticias/ui/styles/patterns` (focus
|
|
@@ -11882,5 +12037,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
11882
12037
|
* Generated bundle index. Do not edit.
|
|
11883
12038
|
*/
|
|
11884
12039
|
|
|
11885
|
-
export { EF_BADGE_BG_COLORS, EF_BADGE_BG_LIGHT_COLORS, EF_BADGE_BORDER_COLORS, EF_BADGE_DEFAULTS, EF_BADGE_TEXT_COLORS, EF_CHART_PALETTE, EF_DATATABLE_ACTIONS_DEFAULTS, EF_DATATABLE_COLUMN_DEFAULTS, EF_DATATABLE_DEFAULTS, EF_DATA_CARD_MOBILE_LAYOUT, EF_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfAboutDialogComponent, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBuildStampComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, EfChangePasswordComponent, EfChartComponent, EfCheckboxComponent, EfClearButtonComponent, EfColumnHeaderTemplateDirective, EfColumnTemplateDirective, EfCompactPipe, EfConfirmDialogComponent, EfCurrencyPipe, EfDataCardComponent, EfDatatableActionBarComponent, EfDatatableComponent, EfDatepickerAdvancedComponent, EfDatepickerComponent, EfDetailToolbarComponent, EfDialogComponent, EfEmailMetricsCardComponent, EfEmptyStateComponent, EfFabComponent, EfFieldsetComponent, EfFilterDrawerComponent, EfFilterPillComponent, EfFormGridComponent, EfInputNumberComponent, EfInputTextComponent, EfKpiCardComponent, EfLabelComponent, EfModuleRailComponent, EfModuleSideComponent, EfMultiSelectComponent, EfOrderBuilderComponent, EfOrderSummaryComponent, EfOverflowTooltipDirective, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfProfileMenuComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRankListComponent, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfShortcutsDialogComponent, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfThemeToggleComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTooltipDirective, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
|
|
12040
|
+
export { EF_BADGE_BG_COLORS, EF_BADGE_BG_LIGHT_COLORS, EF_BADGE_BORDER_COLORS, EF_BADGE_DEFAULTS, EF_BADGE_TEXT_COLORS, EF_CHART_PALETTE, EF_DATATABLE_ACTIONS_DEFAULTS, EF_DATATABLE_COLUMN_DEFAULTS, EF_DATATABLE_DEFAULTS, EF_DATA_CARD_MOBILE_LAYOUT, EF_STATUS_COLORS, EF_STATUS_COLOR_ALIASES, EfAboutDialogComponent, EfActivationFilterComponent, EfAppMainComponent, EfAppShellComponent, EfAppShellMobileComponent, EfAppTopComponent, EfBadgeComponent, EfBlockUiComponent, EfBlockableDivComponent, EfBottomSheetComponent, EfBuildStampComponent, EfBulkBarComponent, EfButtonComponent, EfButtonGroupComponent, EfCardComponent, EfChangeHistoryComponent, EfChangePasswordComponent, EfChartComponent, EfCheckboxComponent, EfClearButtonComponent, EfColumnHeaderTemplateDirective, EfColumnTemplateDirective, EfCompactPipe, EfConfirmDialogComponent, EfCurrencyPipe, EfDataCardComponent, EfDatatableActionBarComponent, EfDatatableComponent, EfDatepickerAdvancedComponent, EfDatepickerComponent, EfDetailToolbarComponent, EfDialogComponent, EfEmailMetricsCardComponent, EfEmptyStateComponent, EfFabComponent, EfFieldsetComponent, EfFilterDrawerComponent, EfFilterPillComponent, EfFormGridComponent, EfInputNumberComponent, EfInputTextComponent, EfKpiCardComponent, EfLabelComponent, EfModuleRailComponent, EfModuleSideComponent, EfMultiSelectComponent, EfOrderBuilderComponent, EfOrderSummaryComponent, EfOverflowTooltipDirective, EfPagerComponent, EfPasswordComponent, EfPdfPreviewComponent, EfPillGroupComponent, EfPresetPillComponent, EfPriceDisplayComponent, EfProductCatalogueComponent, EfProductCatalogueFilterComponent, EfProductTypeaheadComponent, EfProfileChipComponent, EfProfileMenuComponent, EfPulseComponent, EfQuantitySelectorComponent, EfQuantityStepperComponent, EfRadioComponent, EfRankListComponent, EfRowActionsComponent, EfSearchToolbarComponent, EfSelectButtonComponent, EfSelectComponent, EfServerErrorsDirective, EfShortcutsDialogComponent, EfSkeletonComponent, EfSmartBarComponent, EfStatsComponent, EfStatusChipComponent, EfTabPanelDirective, EfTabsComponent, EfTextareaComponent, EfThemeConfiguratorComponent, EfThemeToggleComponent, EfTimelineComponent, EfToastRegionComponent, EfToggleSwitchComponent, EfToolbarComponent, EfTooltipDirective, EfTotalsComponent, OrderEntityHelper, OrderLineItemHelper, TruncatePipe, buildChartConfig, getColumnAlignment, mergeColumnDefaults, resolveEfStatusColor };
|
|
11886
12041
|
//# sourceMappingURL=elasticias-ui.mjs.map
|