chrv-components 1.12.111 → 1.12.112
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.
|
Binary file
|
|
@@ -4311,6 +4311,10 @@ class ChrInputComponent {
|
|
|
4311
4311
|
this.ngControl()?.statusChanges?.subscribe((data) => {
|
|
4312
4312
|
this.state.set(this._getState(data));
|
|
4313
4313
|
});
|
|
4314
|
+
this.displayValue.subscribe((v) => {
|
|
4315
|
+
if (v === undefined || v === null)
|
|
4316
|
+
this.displayValue.set('');
|
|
4317
|
+
});
|
|
4314
4318
|
};
|
|
4315
4319
|
this.ensureNgControl = () => {
|
|
4316
4320
|
const control = this.ngControl();
|
|
@@ -4599,7 +4603,7 @@ class ChrSearchSelectInputComponent extends ChrInputComponent {
|
|
|
4599
4603
|
};
|
|
4600
4604
|
}
|
|
4601
4605
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrSearchSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4602
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: ChrSearchSelectInputComponent, isStandalone: true, selector: "chr-search-select-input", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"search-select-input-wrapper\">\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [(displayValue)]=\"displayValue\"\n (input)=\"dl.open();onInput($event);\"
|
|
4606
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: ChrSearchSelectInputComponent, isStandalone: true, selector: "chr-search-select-input", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"search-select-input-wrapper\">\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [(displayValue)]=\"displayValue\"\n [(value)]=\"value\" (input)=\"dl.open();onInput($event);\">\n <chr-input-indicators>\n <!-- @if(isFocused()){ -->\n @if(value() == null){\n <span class=\"material-symbols selection-status-indicator error\">close</span>\n }@else {\n <span class=\"material-symbols selection-status-indicator success\">check</span>\n }\n <span class=\"selection-status-indicator\" style=\"width: 1rem; \"></span>\n <!-- } -->\n </chr-input-indicators>\n <chr-input-data-overlay>\n <chr-data-list #dl [for]=\"''+name()\" [suggestions]=\"data()\" [display]=\"display()\" [selectOnFullMatch]=\"true\"\n (optionSelected)=\"selectOption($event.value)\"></chr-data-list>\n </chr-input-data-overlay>\n </chr-input>\n</div>", styles: [":host{display:flex;flex-direction:column;flex:1 1 auto;justify-self:stretch;align-self:center;min-width:0}.search-select-input-wrapper{position:relative}.selection-status-indicator.success{color:var(--success-color)}.selection-status-indicator.error{color:var(--error-color)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: ChrInputComponent, selector: "chr-input", inputs: ["label", "id", "name", "value", "displayValue", "type", "step", "debounceTime", "isDisabled", "isFocused", "min", "max", "minLength", "maxLength", "ngControl", "tooltip", "tooltipPosition"], outputs: ["idChange", "nameChange", "valueChange", "displayValueChange", "isDisabledChange", "isFocusedChange", "ngControlChange", "input", "debouncedInput", "focus", "enter", "blur"] }, { kind: "component", type: ChrInputIndicators, selector: "chr-input-indicators" }, { kind: "component", type: DataListComponent, selector: "chr-data-list", inputs: ["suggestions", "for", "allowStringify", "display", "targetElement", "blurOnSelect", "selectOnFullMatch"], outputs: ["optionSelected"] }, { kind: "component", type: ChrInputDataOverlay, selector: "chr-input-data-overlay" }] }); }
|
|
4603
4607
|
}
|
|
4604
4608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrSearchSelectInputComponent, decorators: [{
|
|
4605
4609
|
type: Component,
|
|
@@ -4609,7 +4613,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
4609
4613
|
ChrInputIndicators,
|
|
4610
4614
|
DataListComponent,
|
|
4611
4615
|
ChrInputDataOverlay,
|
|
4612
|
-
], template: "<div class=\"search-select-input-wrapper\">\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [(displayValue)]=\"displayValue\"\n (input)=\"dl.open();onInput($event);\"
|
|
4616
|
+
], template: "<div class=\"search-select-input-wrapper\">\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [(displayValue)]=\"displayValue\"\n [(value)]=\"value\" (input)=\"dl.open();onInput($event);\">\n <chr-input-indicators>\n <!-- @if(isFocused()){ -->\n @if(value() == null){\n <span class=\"material-symbols selection-status-indicator error\">close</span>\n }@else {\n <span class=\"material-symbols selection-status-indicator success\">check</span>\n }\n <span class=\"selection-status-indicator\" style=\"width: 1rem; \"></span>\n <!-- } -->\n </chr-input-indicators>\n <chr-input-data-overlay>\n <chr-data-list #dl [for]=\"''+name()\" [suggestions]=\"data()\" [display]=\"display()\" [selectOnFullMatch]=\"true\"\n (optionSelected)=\"selectOption($event.value)\"></chr-data-list>\n </chr-input-data-overlay>\n </chr-input>\n</div>", styles: [":host{display:flex;flex-direction:column;flex:1 1 auto;justify-self:stretch;align-self:center;min-width:0}.search-select-input-wrapper{position:relative}.selection-status-indicator.success{color:var(--success-color)}.selection-status-indicator.error{color:var(--error-color)}\n"] }]
|
|
4613
4617
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }] } });
|
|
4614
4618
|
|
|
4615
4619
|
class ChrTagSelectInputComponent extends ChrInputComponent {
|
|
@@ -4667,11 +4671,8 @@ class ChrTagSelectInputComponent extends ChrInputComponent {
|
|
|
4667
4671
|
this.onChange(value);
|
|
4668
4672
|
};
|
|
4669
4673
|
}
|
|
4670
|
-
ngOnInit() {
|
|
4671
|
-
super.ngOnInit();
|
|
4672
|
-
}
|
|
4673
4674
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrTagSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4674
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: ChrTagSelectInputComponent, isStandalone: true, selector: "chr-tag-select-input", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"tag-select-input-wrapper\">\n <!-- Champ de recherche enfant -->\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [displayValue]=\"displayValue() ?? ''\"\n (displayValueChange)=\"displayValue.set($event)\"
|
|
4675
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: ChrTagSelectInputComponent, isStandalone: true, selector: "chr-tag-select-input", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"tag-select-input-wrapper\">\n <!-- Champ de recherche enfant -->\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [displayValue]=\"displayValue() ?? ''\"\n [(value)]=\"value\" (input)=\"dl.open();onInput($event);\" (displayValueChange)=\"displayValue.set($event)\"\n (input)=\"dl.open();onInput($event);\">\n\n <chr-input-indicators>\n <span class=\"material-symbols\">data_array</span>\n <span style=\"width: 1rem;\"></span>\n </chr-input-indicators>\n <chr-input-data-overlay>\n <chr-data-list #dl [for]=\"'' + name()\" [suggestions]=\"filteredOptions()\" [selectOnFullMatch]=\"true\"\n [display]=\"display()\" (optionSelected)=\"selectOption($event.value)\">\n </chr-data-list>\n </chr-input-data-overlay>\n <chr-input-data>\n <!-- Affichage des Tags (Chips) -->\n @if (selectedItems().length > 0) {\n <div class=\"tags-container\">\n @for (item of selectedItems(); track $index) {\n <div class=\"tag-chip\">\n <span class=\"tag-label\">{{ display()(item) }}</span>\n <button type=\"button\" class=\"tag-remove-btn\" (click)=\"removeTag($index)\"\n [attr.aria-label]=\"'Supprimer ' + display()(item)\">\n <span class=\"material-symbols\">close</span>\n </button>\n </div>\n }\n </div>\n }\n </chr-input-data>\n </chr-input>\n</div>", styles: [":host{display:flex;flex-direction:column;flex:1 1 auto;justify-self:stretch;align-self:center;min-width:0}.tag-select-input-wrapper{position:relative}.tags-container{display:flex;flex-wrap:wrap;gap:.375rem;margin-top:.25rem}.tag-chip{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;background-color:color-mix(in srgb,var(--primary-color) 10%,transparent 90%);color:var(--primary-color);border-radius:9999px;font-size:.875rem;font-weight:500;line-height:1}.tag-remove-btn{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;cursor:pointer;padding:0;border-radius:50%;width:1.125rem;height:1.125rem;opacity:.7;transition:opacity .15s ease,background-color .15s ease}::ng-deep .tag-select-input-wrapper span.custom-datalist-arrow{top:.8rem}.tag-remove-btn:hover{opacity:1;background-color:#0000001a}.tag-remove-btn .material-symbols{font-size:1rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: ChrInputComponent, selector: "chr-input", inputs: ["label", "id", "name", "value", "displayValue", "type", "step", "debounceTime", "isDisabled", "isFocused", "min", "max", "minLength", "maxLength", "ngControl", "tooltip", "tooltipPosition"], outputs: ["idChange", "nameChange", "valueChange", "displayValueChange", "isDisabledChange", "isFocusedChange", "ngControlChange", "input", "debouncedInput", "focus", "enter", "blur"] }, { kind: "component", type: ChrInputIndicators, selector: "chr-input-indicators" }, { kind: "component", type: DataListComponent, selector: "chr-data-list", inputs: ["suggestions", "for", "allowStringify", "display", "targetElement", "blurOnSelect", "selectOnFullMatch"], outputs: ["optionSelected"] }, { kind: "component", type: ChrInputData, selector: "chr-input-data" }, { kind: "component", type: ChrInputDataOverlay, selector: "chr-input-data-overlay" }] }); }
|
|
4675
4676
|
}
|
|
4676
4677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ChrTagSelectInputComponent, decorators: [{
|
|
4677
4678
|
type: Component,
|
|
@@ -4682,7 +4683,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
4682
4683
|
DataListComponent,
|
|
4683
4684
|
ChrInputData,
|
|
4684
4685
|
ChrInputDataOverlay,
|
|
4685
|
-
], template: "<div class=\"tag-select-input-wrapper\">\n <!-- Champ de recherche enfant -->\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [displayValue]=\"displayValue() ?? ''\"\n (displayValueChange)=\"displayValue.set($event)\"
|
|
4686
|
+
], template: "<div class=\"tag-select-input-wrapper\">\n <!-- Champ de recherche enfant -->\n <chr-input [id]=\"id()\" [name]=\"name()\" type=\"text\" [label]=\"label()\" [displayValue]=\"displayValue() ?? ''\"\n [(value)]=\"value\" (input)=\"dl.open();onInput($event);\" (displayValueChange)=\"displayValue.set($event)\"\n (input)=\"dl.open();onInput($event);\">\n\n <chr-input-indicators>\n <span class=\"material-symbols\">data_array</span>\n <span style=\"width: 1rem;\"></span>\n </chr-input-indicators>\n <chr-input-data-overlay>\n <chr-data-list #dl [for]=\"'' + name()\" [suggestions]=\"filteredOptions()\" [selectOnFullMatch]=\"true\"\n [display]=\"display()\" (optionSelected)=\"selectOption($event.value)\">\n </chr-data-list>\n </chr-input-data-overlay>\n <chr-input-data>\n <!-- Affichage des Tags (Chips) -->\n @if (selectedItems().length > 0) {\n <div class=\"tags-container\">\n @for (item of selectedItems(); track $index) {\n <div class=\"tag-chip\">\n <span class=\"tag-label\">{{ display()(item) }}</span>\n <button type=\"button\" class=\"tag-remove-btn\" (click)=\"removeTag($index)\"\n [attr.aria-label]=\"'Supprimer ' + display()(item)\">\n <span class=\"material-symbols\">close</span>\n </button>\n </div>\n }\n </div>\n }\n </chr-input-data>\n </chr-input>\n</div>", styles: [":host{display:flex;flex-direction:column;flex:1 1 auto;justify-self:stretch;align-self:center;min-width:0}.tag-select-input-wrapper{position:relative}.tags-container{display:flex;flex-wrap:wrap;gap:.375rem;margin-top:.25rem}.tag-chip{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;background-color:color-mix(in srgb,var(--primary-color) 10%,transparent 90%);color:var(--primary-color);border-radius:9999px;font-size:.875rem;font-weight:500;line-height:1}.tag-remove-btn{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:inherit;cursor:pointer;padding:0;border-radius:50%;width:1.125rem;height:1.125rem;opacity:.7;transition:opacity .15s ease,background-color .15s ease}::ng-deep .tag-select-input-wrapper span.custom-datalist-arrow{top:.8rem}.tag-remove-btn:hover{opacity:1;background-color:#0000001a}.tag-remove-btn .material-symbols{font-size:1rem}\n"] }]
|
|
4686
4687
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }] } });
|
|
4687
4688
|
|
|
4688
4689
|
class ChrTextAreaInputComponent extends ChrInputComponent {
|