@luftborn/custom-elements 2.12.4 → 2.12.6

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.
package/demo/index.min.js CHANGED
@@ -4940,6 +4940,9 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
4940
4940
  CustomFormatDateFieldElement.prototype.initChildInputs = function () {
4941
4941
  var _a;
4942
4942
  this.date = _super.prototype.getChildInput.call(this, '#date-field');
4943
+ if (!this.date) {
4944
+ return;
4945
+ }
4943
4946
  this.date.id = "date-field-" + Date.now();
4944
4947
  this.pickerTrigger = this.getChildElement('#picker-trigger');
4945
4948
  this.dateFormat = CustomDatepickerUtils_1.supportedDateFormats.includes(this.dateFormat) ? this.dateFormat : CustomDatepickerUtils_1.defaultDateFormat;
@@ -4955,7 +4958,9 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
4955
4958
  this.date.setAttribute('min', this.min);
4956
4959
  }
4957
4960
  this.language = ((_a = this.attributes.getNamedItem('language')) === null || _a === void 0 ? void 0 : _a.value) || 'en';
4958
- this.initCustomPicker();
4961
+ if (this.justPreview) {
4962
+ this.initCustomPicker();
4963
+ }
4959
4964
  };
4960
4965
  // events
4961
4966
  CustomFormatDateFieldElement.prototype.change = function ($event) {
@@ -4975,6 +4980,9 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
4975
4980
  this.language = newValue;
4976
4981
  this.initCustomPicker();
4977
4982
  break;
4983
+ case 'just-preview':
4984
+ this.justPreview = newValue !== null;
4985
+ break;
4978
4986
  }
4979
4987
  };
4980
4988
  CustomFormatDateFieldElement.prototype.initCustomPicker = function () {