@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.
@@ -6,6 +6,7 @@ export declare class CustomFormatDateFieldElement extends CustomInputElement {
6
6
  pickerTrigger: HTMLElement;
7
7
  language: string;
8
8
  datePicker: CustomDatepicker;
9
+ justPreview: boolean;
9
10
  constructor();
10
11
  get value(): string;
11
12
  set value(value: string);
@@ -55,6 +55,9 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
55
55
  CustomFormatDateFieldElement.prototype.initChildInputs = function () {
56
56
  var _a;
57
57
  this.date = _super.prototype.getChildInput.call(this, '#date-field');
58
+ if (!this.date) {
59
+ return;
60
+ }
58
61
  this.date.id = "date-field-" + Date.now();
59
62
  this.pickerTrigger = this.getChildElement('#picker-trigger');
60
63
  this.dateFormat = CustomDatepickerUtils_1.supportedDateFormats.includes(this.dateFormat) ? this.dateFormat : CustomDatepickerUtils_1.defaultDateFormat;
@@ -70,7 +73,9 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
70
73
  this.date.setAttribute('min', this.min);
71
74
  }
72
75
  this.language = ((_a = this.attributes.getNamedItem('language')) === null || _a === void 0 ? void 0 : _a.value) || 'en';
73
- this.initCustomPicker();
76
+ if (this.justPreview) {
77
+ this.initCustomPicker();
78
+ }
74
79
  };
75
80
  // events
76
81
  CustomFormatDateFieldElement.prototype.change = function ($event) {
@@ -90,6 +95,9 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
90
95
  this.language = newValue;
91
96
  this.initCustomPicker();
92
97
  break;
98
+ case 'just-preview':
99
+ this.justPreview = newValue !== null;
100
+ break;
93
101
  }
94
102
  };
95
103
  CustomFormatDateFieldElement.prototype.initCustomPicker = function () {
@@ -1 +1 @@
1
- {"version":3,"file":"CustomFormatDateFieldElement.js","sourceRoot":"","sources":["../../../src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts"],"names":[],"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AhB;QACC,IAAI,CAAC,UAAU,GAAG,IAAI,0BAAgB,CAAC;YACtC,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;YACnC,aAAa,EAAE,IAAI;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAC,CAAA;IACH,CAAC;IArFW,4BAA4B;QA1CxC,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,4BAA4B;YACtC,QAAQ,EAAE,omBAIF;YACR,KAAK,EAAE,mpBAgCN;YACD,SAAS,EAAE,IAAI;SACf,CAAC;OACW,4BAA4B,CAsFxC;IAAD,mCAAC;CAAA,AAtFD,CAAkD,uCAAkB,GAsFnE;AAtFY,oEAA4B"}
1
+ {"version":3,"file":"CustomFormatDateFieldElement.js","sourceRoot":"","sources":["../../../src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,wEAAmE;AACnE,kFAAuH;AA4CvH;IAAkD,gDAAkB;IAQnE;eACC,iBAAO;IACR,CAAC;IAED,sBAAI,+CAAK;aAAT;YACC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QACxB,CAAC;aAED,UAAU,KAAa;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,CAAC;;;OAJA;IAMD,sBAAI,+CAAK;aAAT;YACC,OAAO,IAAA,0CAAkB,EAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvF,CAAC;;;OAAA;IAED,wDAAiB,GAAjB;QACC,iBAAM,iBAAiB,WAAE,CAAC;IAC3B,CAAC;IAED,sDAAe,GAAf;;QAC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4BAA4B,CA+FxC;IAAD,mCAAC;CAAA,AA/FD,CAAkD,uCAAkB,GA+FnE;AA/FY,oEAA4B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luftborn/custom-elements",
3
- "version": "2.12.4",
3
+ "version": "2.12.6",
4
4
  "description": "custom HTML elements for the form builder application (node version: 18)",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -52,6 +52,7 @@ export class CustomFormatDateFieldElement extends CustomInputElement {
52
52
  pickerTrigger: HTMLElement;
53
53
  language: string;
54
54
  datePicker: CustomDatepicker;
55
+ justPreview: boolean;
55
56
 
56
57
  constructor() {
57
58
  super();
@@ -75,8 +76,11 @@ export class CustomFormatDateFieldElement extends CustomInputElement {
75
76
 
76
77
  initChildInputs() {
77
78
  this.date = super.getChildInput('#date-field');
78
- this.date.id = `date-field-${Date.now()}`;
79
+ if (!this.date) {
80
+ return;
81
+ }
79
82
 
83
+ this.date.id = `date-field-${Date.now()}`;
80
84
  this.pickerTrigger = this.getChildElement('#picker-trigger');
81
85
 
82
86
  this.dateFormat = supportedDateFormats.includes(this.dateFormat) ? this.dateFormat : defaultDateFormat;
@@ -94,7 +98,9 @@ export class CustomFormatDateFieldElement extends CustomInputElement {
94
98
  }
95
99
 
96
100
  this.language = this.attributes.getNamedItem('language')?.value || 'en';
97
- this.initCustomPicker();
101
+ if (this.justPreview) {
102
+ this.initCustomPicker();
103
+ }
98
104
  }
99
105
 
100
106
  // events
@@ -120,6 +126,9 @@ export class CustomFormatDateFieldElement extends CustomInputElement {
120
126
  this.language = newValue;
121
127
  this.initCustomPicker();
122
128
  break;
129
+ case 'just-preview':
130
+ this.justPreview = newValue !== null;
131
+ break;
123
132
  }
124
133
  }
125
134