@yuuvis/client-framework 2.1.30 → 2.1.32

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.
@@ -695,6 +695,14 @@ class NumberComponent extends AbstractMatFormField {
695
695
  }
696
696
  // eslint-disable-next-line @typescript-eslint/no-empty-function
697
697
  registerOnTouched() { }
698
+ setDisabledState(isDisabled) {
699
+ if (isDisabled) {
700
+ this.innerCtrl.disable();
701
+ }
702
+ else {
703
+ this.innerCtrl.enable();
704
+ }
705
+ }
698
706
  // called when the input looses focus
699
707
  format() {
700
708
  if (!this.readonly() && typeof this.value === 'number' && this.validationErrors.length === 0) {
@@ -1071,6 +1079,14 @@ class OrganizationComponent extends AbstractMatFormField {
1071
1079
  this.value = this.#getPropagateValue();
1072
1080
  this.propagateChange(this.value);
1073
1081
  }
1082
+ setDisabledState(isDisabled) {
1083
+ if (isDisabled) {
1084
+ this.acFormControl.disable();
1085
+ }
1086
+ else {
1087
+ this.acFormControl.enable();
1088
+ }
1089
+ }
1074
1090
  #getPropagateValue() {
1075
1091
  if (this.multiselect()) {
1076
1092
  return this.innerValue.map((v) => (this.withMetadata() ? { id: v.user.id, title: v.user.title } : v.user.id));
@@ -1258,6 +1274,14 @@ class OrganizationSetComponent extends AbstractMatFormField {
1258
1274
  }
1259
1275
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1260
1276
  registerOnTouched(fn) { }
1277
+ setDisabledState(isDisabled) {
1278
+ if (isDisabled) {
1279
+ this.acFormControl.disable();
1280
+ }
1281
+ else {
1282
+ this.acFormControl.enable();
1283
+ }
1284
+ }
1261
1285
  propagate() {
1262
1286
  this.value = this.#getPropagateValue();
1263
1287
  this.propagateChange(this.value);
@@ -1711,6 +1735,14 @@ class StringComponent extends AbstractMatFormField {
1711
1735
  }
1712
1736
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1713
1737
  registerOnTouched() { }
1738
+ setDisabledState(isDisabled) {
1739
+ if (isDisabled) {
1740
+ this.fc.disable();
1741
+ }
1742
+ else {
1743
+ this.fc.enable();
1744
+ }
1745
+ }
1714
1746
  #onValueChange(val) {
1715
1747
  this.value = val;
1716
1748
  this.empty = Utils.isEmpty(val);
@@ -1933,6 +1965,14 @@ class CatalogComponent extends AbstractMatFormField {
1933
1965
  }
1934
1966
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1935
1967
  registerOnTouched(fn) { }
1968
+ setDisabledState(isDisabled) {
1969
+ if (isDisabled) {
1970
+ this.fc.disable();
1971
+ }
1972
+ else {
1973
+ this.fc.enable();
1974
+ }
1975
+ }
1936
1976
  ngOnInit() {
1937
1977
  if (this.required)
1938
1978
  this.fc.setValidators(Validators.required);