@klippa/ngx-enhancy-forms 5.2.0 → 5.2.1

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.
@@ -904,10 +904,9 @@
904
904
  this.onSearch.emit(value);
905
905
  };
906
906
  SelectComponent.prototype.getDefaultTranslation = function (key) {
907
- var _this = this;
908
907
  switch (key) {
909
908
  case 'placeholder':
910
- return function () { var _a; return (_a = _this.placeholder) !== null && _a !== void 0 ? _a : 'Pick an option'; };
909
+ return function () { return 'Pick an option'; };
911
910
  case 'amountSelected':
912
911
  return function (amount) { return amount + " selected"; };
913
912
  }
@@ -915,6 +914,9 @@
915
914
  SelectComponent.prototype.getTranslation = function (key, params) {
916
915
  if (params === void 0) { params = null; }
917
916
  var _a, _b, _c;
917
+ if (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {
918
+ return this.placeholder;
919
+ }
918
920
  return (_c = (_b = (_a = this.translations) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.call(_a, params)) !== null && _c !== void 0 ? _c : this.getDefaultTranslation(key)(params);
919
921
  };
920
922
  return SelectComponent;
@@ -1314,10 +1316,9 @@
1314
1316
  }
1315
1317
  };
1316
1318
  DatePickerComponent.prototype.getDefaultTranslation = function (key) {
1317
- var _this = this;
1318
1319
  switch (key) {
1319
1320
  case 'placeholder':
1320
- return function () { var _a; return (_a = _this.placeholder) !== null && _a !== void 0 ? _a : 'Select date'; };
1321
+ return function () { return 'Select date'; };
1321
1322
  }
1322
1323
  };
1323
1324
  DatePickerComponent.prototype.getTranslation = function (key, params) {
@@ -1326,6 +1327,9 @@
1326
1327
  if (key === 'placeholder' && this.multiple) {
1327
1328
  return '';
1328
1329
  }
1330
+ if (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {
1331
+ return this.placeholder;
1332
+ }
1329
1333
  return (_c = (_b = (_a = this.translations) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.call(_a, params)) !== null && _c !== void 0 ? _c : this.getDefaultTranslation(key)(params);
1330
1334
  };
1331
1335
  return DatePickerComponent;
@@ -1603,10 +1607,9 @@
1603
1607
  }
1604
1608
  };
1605
1609
  DateTimePickerComponent.prototype.getDefaultTranslation = function (key) {
1606
- var _this = this;
1607
1610
  switch (key) {
1608
1611
  case 'placeholder':
1609
- return function () { var _a; return (_a = _this.placeholder) !== null && _a !== void 0 ? _a : 'Select date'; };
1612
+ return function () { return 'Select date'; };
1610
1613
  case 'selectDays':
1611
1614
  return function () { return 'Select day(s)'; };
1612
1615
  case 'selectedDate':
@@ -1623,6 +1626,9 @@
1623
1626
  if (key === 'placeholder' && this.multiple) {
1624
1627
  return '';
1625
1628
  }
1629
+ if (key === 'placeholder' && stringIsSetAndFilled(this.placeholder)) {
1630
+ return this.placeholder;
1631
+ }
1626
1632
  return (_c = (_b = (_a = this.translations) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.call(_a, params)) !== null && _c !== void 0 ? _c : this.getDefaultTranslation(key)(params);
1627
1633
  };
1628
1634
  return DateTimePickerComponent;