@symphony-talent/component-library 4.134.0 → 4.136.0

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.
@@ -1834,29 +1834,8 @@ class InputChipsComponent {
1834
1834
  ],
1835
1835
  asyncValidators: this.asyncValidators
1836
1836
  }));
1837
- this.form.valueChanges.subscribe(sc => {
1838
- if (this.form.controls[this.controlName].status === 'INVALID') {
1839
- for (const errorMessageKey in this.errorMessages) {
1840
- if (this.form.controls[this.controlName].errors.hasOwnProperty(errorMessageKey)) {
1841
- const lastTag = this.form.controls[this.controlName].value;
1842
- lastTag[lastTag.length - 1].hasError = true;
1843
- this.validationMessage = this.errorMessages[errorMessageKey];
1844
- }
1845
- }
1846
- this.canAddTag = false;
1847
- }
1848
- else {
1849
- this.canAddTag = true;
1850
- }
1851
- });
1852
1837
  }
1853
1838
  onAdd(event) {
1854
- // if form control has at least 1 error do not let user add new item
1855
- if (this.form.controls[this.controlErrorCount].value > 1) {
1856
- let chips = this.form.controls[this.controlName].value;
1857
- chips = chips.filter(chip => chip.value !== event.value);
1858
- this.form.controls[this.controlName].patchValue(chips);
1859
- }
1860
1839
  this.form.controls[this.controlName].updateValueAndValidity();
1861
1840
  }
1862
1841
  onRemove(event) {
@@ -1882,7 +1861,7 @@ class InputChipsComponent {
1882
1861
  }
1883
1862
  }
1884
1863
  InputChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: InputChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1885
- InputChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: InputChipsComponent, selector: "symphony-input-chips", inputs: { chips: "chips", autocompleteList: "autocompleteList", validators: "validators", asyncValidators: "asyncValidators", errorMessages: "errorMessages", controlName: "controlName", form: "form", label: "label", isDisabled: "isDisabled" }, ngImport: i0, template: "<div [formGroup]=\"form\">\n <label for=\"item\" *ngIf=\"label\" class=\"input-label\">{{ label }} </label>\n <tag-input\n #input\n class=\"sfx-chips\"\n [formControlName]=\"controlName\"\n [asyncValidators]=\"asyncValidators\"\n [errorMessages]=\"errorMessages\"\n [addOnBlur]=\"true\"\n [@.disabled]=\"isDisabled\"\n (onAdd)=\"onAdd($event)\"\n (onRemove)=\"onRemove($event)\"\n >\n <ng-template let-item=\"item\" let-index=\"index\">\n <span>\n <symphony-chip\n [chipLabel]=\"item.display\"\n [hasError]=\"item.hasError\"\n [hasClose]=\"true\"\n (removeChip)=\"input.removeItem(item, index)\"\n >\n </symphony-chip>\n </span>\n </ng-template>\n\n <div class=\"error-message\">{{ validationMessage }}</div>\n <tag-input-dropdown\n [showDropdownIfEmpty]=\"true\"\n [autocompleteItems]=\"autocompleteList\"\n [appendToBody]=\"false\"\n >\n <ng-template let-item=\"item\" let-index=\"index\">\n {{ item.display }}\n </ng-template>\n </tag-input-dropdown>\n </tag-input>\n <input type=\"hidden\" [formControlName]=\"controlErrorCount\" value=\"0\" />\n</div>\n", styles: [".sfx .input-label{display:block;font-family:neuzeit_groteskbold,sans-serif;margin-bottom:.27rem;line-height:25px}.sfx .sfx-chips .ng2-tag-input{border-bottom:0;min-height:auto;border:1px solid #d0d0d0;border-radius:4px;padding:4px 0 0 4px;max-height:110px;height:100%;overflow-y:auto}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar{width:10px}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-track{box-shadow:inset 0 0 2px transparent;border-radius:30px}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-thumb{background:#d4d4d4;border-radius:30px;border-right:2px white solid;background-clip:padding-box}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-thumb:hover{cursor:pointer}.sfx .sfx-chips .ng2-tag-input.ng2-tag-input--focused,.sfx .sfx-chips .ng2-tag-input.ng2-tag-input--invalid{border-bottom:1px solid #d0d0d0}.sfx .sfx-chips .ng2-tag-input__text-input{padding:0;height:30px;font-family:neuzeit_groteskregular,sans-serif}.sfx .sfx-chips .ng2-tag-input__text-input::-moz-placeholder{text-indent:-9999px}.sfx .sfx-chips .ng2-tag-input__text-input:-ms-input-placeholder{text-indent:-9999px}.sfx .sfx-chips .ng2-tag-input__text-input::placeholder{text-indent:-9999px}.sfx .sfx-chips tag,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active{font-family:neuzeit_groteskregular,sans-serif;line-height:inherit;background:none;margin:0 0 5px;padding:0;height:auto}.sfx .sfx-chips tag:not(:focus):not(.tag--editing):not(:active):not(.readonly):hover,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):focus,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active:not(:focus):not(.tag--editing):not(:active):not(.readonly):hover,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active:not(.readonly):not(.tag--editing):focus{background:none;color:#fff;cursor:default;box-shadow:none}.sfx .sfx-chips .error-message{color:#f0001e;font-size:14px}.sfx .sfx-chips .ng2-dropdown-menu{position:relative!important;width:100%;display:block;top:0!important;left:0!important;margin-top:0;border:1px solid #d0d0d0;border-width:0 1px 1px 1px;box-shadow:0 10px 10px rgba(0,0,0,.2);max-height:260px;padding-top:0}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar{width:10px}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-track{box-shadow:inset 0 0 2px transparent;border-radius:30px}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-thumb{background:#d4d4d4;border-radius:30px;border-right:2px white solid;background-clip:padding-box}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-thumb:hover{cursor:pointer}.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item{font-family:neuzeit_groteskbold;letter-spacing:normal;max-height:40px;line-height:35px}.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item--selected,.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item--selected:active{background:#000;color:#fff}\n"], components: [{ type: i1$4.TagInputComponent, selector: "tag-input", inputs: ["separatorKeys", "separatorKeyCodes", "placeholder", "secondaryPlaceholder", "maxItems", "validators", "asyncValidators", "onlyFromAutocomplete", "errorMessages", "theme", "onTextChangeDebounce", "inputId", "inputClass", "clearOnBlur", "hideForm", "addOnBlur", "addOnPaste", "pasteSplitPattern", "blinkIfDupe", "removable", "editable", "allowDupes", "modelAsStrings", "trimTags", "ripple", "tabindex", "disable", "dragZone", "onRemoving", "onAdding", "animationDuration", "inputText"], outputs: ["onAdd", "onRemove", "onSelect", "onFocus", "onBlur", "onTextChange", "onPaste", "onValidationError", "onTagEdited", "inputTextChange"] }, { type: ChipComponent, selector: "symphony-chip", inputs: ["chipLabel", "hasClose", "hasError"], outputs: ["removeChip"] }, { type: i1$4.TagInputDropdown, selector: "tag-input-dropdown", inputs: ["offset", "focusFirstElement", "showDropdownIfEmpty", "minimumTextLength", "limitItemsTo", "displayBy", "identifyBy", "matchingFn", "appendToBody", "keepOpen", "dynamicUpdate", "zIndex", "autocompleteItems", "autocompleteObservable"] }], directives: [{ type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], encapsulation: i0.ViewEncapsulation.None });
1864
+ InputChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: InputChipsComponent, selector: "symphony-input-chips", inputs: { chips: "chips", autocompleteList: "autocompleteList", validators: "validators", asyncValidators: "asyncValidators", errorMessages: "errorMessages", controlName: "controlName", form: "form", label: "label", isDisabled: "isDisabled", validationMessage: "validationMessage" }, ngImport: i0, template: "<div [formGroup]=\"form\">\n <label for=\"item\" *ngIf=\"label\" class=\"input-label\">{{ label }} </label>\n <tag-input\n #input\n class=\"sfx-chips\"\n [formControlName]=\"controlName\"\n [asyncValidators]=\"asyncValidators\"\n [errorMessages]=\"errorMessages\"\n [addOnBlur]=\"true\"\n [@.disabled]=\"isDisabled\"\n (onAdd)=\"onAdd($event)\"\n (onRemove)=\"onRemove($event)\"\n >\n <ng-template let-item=\"item\" let-index=\"index\">\n <span>\n <symphony-chip\n [chipLabel]=\"item.display\"\n [hasError]=\"item.hasError\"\n [hasClose]=\"true\"\n (removeChip)=\"input.removeItem(item, index)\"\n >\n </symphony-chip>\n </span>\n </ng-template>\n\n <div class=\"error-message\">{{ validationMessage }}</div>\n <tag-input-dropdown\n [showDropdownIfEmpty]=\"true\"\n [autocompleteItems]=\"autocompleteList\"\n [appendToBody]=\"false\"\n >\n <ng-template let-item=\"item\" let-index=\"index\">\n {{ item.display }}\n </ng-template>\n </tag-input-dropdown>\n </tag-input>\n <input type=\"hidden\" [formControlName]=\"controlErrorCount\" value=\"0\" />\n</div>\n", styles: [".sfx .input-label{display:block;font-family:neuzeit_groteskbold,sans-serif;margin-bottom:.27rem;line-height:25px}.sfx .sfx-chips .ng2-tag-input{border-bottom:0;min-height:auto;border:1px solid #d0d0d0;border-radius:4px;padding:4px 0 0 4px;max-height:110px;height:100%;overflow-y:auto}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar{width:10px}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-track{box-shadow:inset 0 0 2px transparent;border-radius:30px}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-thumb{background:#d4d4d4;border-radius:30px;border-right:2px white solid;background-clip:padding-box}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-thumb:hover{cursor:pointer}.sfx .sfx-chips .ng2-tag-input.ng2-tag-input--focused,.sfx .sfx-chips .ng2-tag-input.ng2-tag-input--invalid{border-bottom:1px solid #d0d0d0}.sfx .sfx-chips .ng2-tag-input__text-input{padding:0;height:30px;font-family:neuzeit_groteskregular,sans-serif}.sfx .sfx-chips .ng2-tag-input__text-input::-moz-placeholder{text-indent:-9999px}.sfx .sfx-chips .ng2-tag-input__text-input:-ms-input-placeholder{text-indent:-9999px}.sfx .sfx-chips .ng2-tag-input__text-input::placeholder{text-indent:-9999px}.sfx .sfx-chips tag,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active{font-family:neuzeit_groteskregular,sans-serif;line-height:inherit;background:none;margin:0 0 5px;padding:0;height:auto}.sfx .sfx-chips tag:not(:focus):not(.tag--editing):not(:active):not(.readonly):hover,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):focus,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active:not(:focus):not(.tag--editing):not(:active):not(.readonly):hover,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active:not(.readonly):not(.tag--editing):focus{background:none;color:#fff;cursor:default;box-shadow:none}.sfx .sfx-chips .error-message{color:#f0001e;font-size:14px}.sfx .sfx-chips .ng2-dropdown-menu{position:relative!important;width:100%;display:block;top:0!important;left:0!important;margin-top:0;border:1px solid #d0d0d0;border-width:0 1px 1px 1px;box-shadow:0 10px 10px rgba(0,0,0,.2);max-height:260px;padding-top:0}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar{width:10px}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-track{box-shadow:inset 0 0 2px transparent;border-radius:30px}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-thumb{background:#d4d4d4;border-radius:30px;border-right:2px white solid;background-clip:padding-box}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-thumb:hover{cursor:pointer}.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item{font-family:neuzeit_groteskbold;letter-spacing:normal;max-height:40px;line-height:35px}.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item--selected,.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item--selected:active{background:#000;color:#fff}\n"], components: [{ type: i1$4.TagInputComponent, selector: "tag-input", inputs: ["separatorKeys", "separatorKeyCodes", "placeholder", "secondaryPlaceholder", "maxItems", "validators", "asyncValidators", "onlyFromAutocomplete", "errorMessages", "theme", "onTextChangeDebounce", "inputId", "inputClass", "clearOnBlur", "hideForm", "addOnBlur", "addOnPaste", "pasteSplitPattern", "blinkIfDupe", "removable", "editable", "allowDupes", "modelAsStrings", "trimTags", "ripple", "tabindex", "disable", "dragZone", "onRemoving", "onAdding", "animationDuration", "inputText"], outputs: ["onAdd", "onRemove", "onSelect", "onFocus", "onBlur", "onTextChange", "onPaste", "onValidationError", "onTagEdited", "inputTextChange"] }, { type: ChipComponent, selector: "symphony-chip", inputs: ["chipLabel", "hasClose", "hasError"], outputs: ["removeChip"] }, { type: i1$4.TagInputDropdown, selector: "tag-input-dropdown", inputs: ["offset", "focusFirstElement", "showDropdownIfEmpty", "minimumTextLength", "limitItemsTo", "displayBy", "identifyBy", "matchingFn", "appendToBody", "keepOpen", "dynamicUpdate", "zIndex", "autocompleteItems", "autocompleteObservable"] }], directives: [{ type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], encapsulation: i0.ViewEncapsulation.None });
1886
1865
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: InputChipsComponent, decorators: [{
1887
1866
  type: Component,
1888
1867
  args: [{ selector: 'symphony-input-chips', encapsulation: ViewEncapsulation.None, template: "<div [formGroup]=\"form\">\n <label for=\"item\" *ngIf=\"label\" class=\"input-label\">{{ label }} </label>\n <tag-input\n #input\n class=\"sfx-chips\"\n [formControlName]=\"controlName\"\n [asyncValidators]=\"asyncValidators\"\n [errorMessages]=\"errorMessages\"\n [addOnBlur]=\"true\"\n [@.disabled]=\"isDisabled\"\n (onAdd)=\"onAdd($event)\"\n (onRemove)=\"onRemove($event)\"\n >\n <ng-template let-item=\"item\" let-index=\"index\">\n <span>\n <symphony-chip\n [chipLabel]=\"item.display\"\n [hasError]=\"item.hasError\"\n [hasClose]=\"true\"\n (removeChip)=\"input.removeItem(item, index)\"\n >\n </symphony-chip>\n </span>\n </ng-template>\n\n <div class=\"error-message\">{{ validationMessage }}</div>\n <tag-input-dropdown\n [showDropdownIfEmpty]=\"true\"\n [autocompleteItems]=\"autocompleteList\"\n [appendToBody]=\"false\"\n >\n <ng-template let-item=\"item\" let-index=\"index\">\n {{ item.display }}\n </ng-template>\n </tag-input-dropdown>\n </tag-input>\n <input type=\"hidden\" [formControlName]=\"controlErrorCount\" value=\"0\" />\n</div>\n", styles: [".sfx .input-label{display:block;font-family:neuzeit_groteskbold,sans-serif;margin-bottom:.27rem;line-height:25px}.sfx .sfx-chips .ng2-tag-input{border-bottom:0;min-height:auto;border:1px solid #d0d0d0;border-radius:4px;padding:4px 0 0 4px;max-height:110px;height:100%;overflow-y:auto}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar{width:10px}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-track{box-shadow:inset 0 0 2px transparent;border-radius:30px}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-thumb{background:#d4d4d4;border-radius:30px;border-right:2px white solid;background-clip:padding-box}.sfx .sfx-chips .ng2-tag-input::-webkit-scrollbar-thumb:hover{cursor:pointer}.sfx .sfx-chips .ng2-tag-input.ng2-tag-input--focused,.sfx .sfx-chips .ng2-tag-input.ng2-tag-input--invalid{border-bottom:1px solid #d0d0d0}.sfx .sfx-chips .ng2-tag-input__text-input{padding:0;height:30px;font-family:neuzeit_groteskregular,sans-serif}.sfx .sfx-chips .ng2-tag-input__text-input::-moz-placeholder{text-indent:-9999px}.sfx .sfx-chips .ng2-tag-input__text-input:-ms-input-placeholder{text-indent:-9999px}.sfx .sfx-chips .ng2-tag-input__text-input::placeholder{text-indent:-9999px}.sfx .sfx-chips tag,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active{font-family:neuzeit_groteskregular,sans-serif;line-height:inherit;background:none;margin:0 0 5px;padding:0;height:auto}.sfx .sfx-chips tag:not(:focus):not(.tag--editing):not(:active):not(.readonly):hover,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):focus,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active:not(:focus):not(.tag--editing):not(:active):not(.readonly):hover,.sfx .sfx-chips tag:not(.readonly):not(.tag--editing):active:not(.readonly):not(.tag--editing):focus{background:none;color:#fff;cursor:default;box-shadow:none}.sfx .sfx-chips .error-message{color:#f0001e;font-size:14px}.sfx .sfx-chips .ng2-dropdown-menu{position:relative!important;width:100%;display:block;top:0!important;left:0!important;margin-top:0;border:1px solid #d0d0d0;border-width:0 1px 1px 1px;box-shadow:0 10px 10px rgba(0,0,0,.2);max-height:260px;padding-top:0}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar{width:10px}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-track{box-shadow:inset 0 0 2px transparent;border-radius:30px}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-thumb{background:#d4d4d4;border-radius:30px;border-right:2px white solid;background-clip:padding-box}.sfx .sfx-chips .ng2-dropdown-menu::-webkit-scrollbar-thumb:hover{cursor:pointer}.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item{font-family:neuzeit_groteskbold;letter-spacing:normal;max-height:40px;line-height:35px}.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item--selected,.sfx .sfx-chips .ng2-dropdown-menu .ng2-menu-item--selected:active{background:#000;color:#fff}\n"] }]
@@ -1904,6 +1883,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
1904
1883
  type: Input
1905
1884
  }], isDisabled: [{
1906
1885
  type: Input
1886
+ }], validationMessage: [{
1887
+ type: Input
1907
1888
  }] } });
1908
1889
  class EmailValidator {
1909
1890
  static createValidator(form, controlErrorCount) {