@formio/js 5.1.0-dev.5979.96c77b0 → 5.1.0-dev.5982.b1aad89

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.
@@ -195,7 +195,7 @@ class GoogleAddressProvider extends AddressProvider_1.AddressProvider {
195
195
  */
196
196
  tryRemoveLibrary(options = {}) {
197
197
  var _a, _b, _c;
198
- if (!Formio_1.Formio.libraries[this.getLibraryName()] || !(document === null || document === void 0 ? void 0 : document.querySelector)) {
198
+ if (!Formio_1.Formio.libraries[this.getLibraryName()]) {
199
199
  return;
200
200
  }
201
201
  const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
@@ -93,8 +93,6 @@ class CalendarWidget extends InputWidget_1.default {
93
93
  this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';
94
94
  this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';
95
95
  this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';
96
- this.settings.wasDefaultValueChanged = false;
97
- this.settings.defaultValue = '';
98
96
  this.settings.manualInputValue = '';
99
97
  this.settings.isManuallyOverriddenValue = false;
100
98
  this.settings.currentValue = '';
@@ -115,10 +113,6 @@ class CalendarWidget extends InputWidget_1.default {
115
113
  this.calendar._input.value = this.settings.isManuallyOverriddenValue ? this.settings.manualInputValue : this.calendar.altInput.value;
116
114
  this.emit('update');
117
115
  }
118
- if (this.settings.wasDefaultValueChanged) {
119
- this.calendar._input.value = this.settings.defaultValue;
120
- this.settings.wasDefaultValueChanged = false;
121
- }
122
116
  if (this.calendar) {
123
117
  this.emit('blur');
124
118
  }
@@ -360,14 +354,6 @@ class CalendarWidget extends InputWidget_1.default {
360
354
  this.settings.currentValue = event.target.value;
361
355
  this.emit('update');
362
356
  }
363
- if (event.target.value === '' && this.calendar.selectedDates.length > 0) {
364
- this.settings.wasDefaultValueChanged = true;
365
- this.settings.defaultValue = event.target.value;
366
- this.calendar.clear();
367
- }
368
- else {
369
- this.settings.wasDefaultValueChanged = false;
370
- }
371
357
  });
372
358
  if (this.calendar.daysContainer) {
373
359
  this.calendar.daysContainer.addEventListener('click', () => {
@@ -187,7 +187,7 @@ export class GoogleAddressProvider extends AddressProvider {
187
187
  * @param {ProviderOptions} options - The options for the provider.
188
188
  */
189
189
  tryRemoveLibrary(options = {}) {
190
- if (!Formio.libraries[this.getLibraryName()] || !document?.querySelector) {
190
+ if (!Formio.libraries[this.getLibraryName()]) {
191
191
  return;
192
192
  }
193
193
  const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
@@ -87,8 +87,6 @@ export default class CalendarWidget extends InputWidget {
87
87
  this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';
88
88
  this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';
89
89
  this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';
90
- this.settings.wasDefaultValueChanged = false;
91
- this.settings.defaultValue = '';
92
90
  this.settings.manualInputValue = '';
93
91
  this.settings.isManuallyOverriddenValue = false;
94
92
  this.settings.currentValue = '';
@@ -109,10 +107,6 @@ export default class CalendarWidget extends InputWidget {
109
107
  this.calendar._input.value = this.settings.isManuallyOverriddenValue ? this.settings.manualInputValue : this.calendar.altInput.value;
110
108
  this.emit('update');
111
109
  }
112
- if (this.settings.wasDefaultValueChanged) {
113
- this.calendar._input.value = this.settings.defaultValue;
114
- this.settings.wasDefaultValueChanged = false;
115
- }
116
110
  if (this.calendar) {
117
111
  this.emit('blur');
118
112
  }
@@ -351,14 +345,6 @@ export default class CalendarWidget extends InputWidget {
351
345
  this.settings.currentValue = event.target.value;
352
346
  this.emit('update');
353
347
  }
354
- if (event.target.value === '' && this.calendar.selectedDates.length > 0) {
355
- this.settings.wasDefaultValueChanged = true;
356
- this.settings.defaultValue = event.target.value;
357
- this.calendar.clear();
358
- }
359
- else {
360
- this.settings.wasDefaultValueChanged = false;
361
- }
362
348
  });
363
349
  if (this.calendar.daysContainer) {
364
350
  this.calendar.daysContainer.addEventListener('click', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.5979.96c77b0",
3
+ "version": "5.1.0-dev.5982.b1aad89",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {