@spw-ds/spw-stencil-library 1.2.4 → 1.2.5

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.
Files changed (212) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/spw-button.spw-loading.entry.cjs.js.map +1 -1
  3. package/dist/cjs/spw-button_2.cjs.entry.js +1 -1
  4. package/dist/cjs/spw-button_2.cjs.entry.js.map +1 -1
  5. package/dist/cjs/spw-custom-select.cjs.entry.js +43 -7
  6. package/dist/cjs/spw-custom-select.cjs.entry.js.map +1 -1
  7. package/dist/cjs/spw-custom-select.entry.cjs.js.map +1 -1
  8. package/dist/cjs/spw-date-picker.cjs.entry.js +48 -28
  9. package/dist/cjs/spw-date-picker.cjs.entry.js.map +1 -1
  10. package/dist/cjs/spw-date-picker.entry.cjs.js.map +1 -1
  11. package/dist/cjs/spw-field-label.spw-group.spw-icon.spw-link.spw-separator.spw-theme-provider.entry.cjs.js.map +1 -1
  12. package/dist/cjs/spw-field-label_6.cjs.entry.js +1 -1
  13. package/dist/cjs/spw-field-label_6.cjs.entry.js.map +1 -1
  14. package/dist/cjs/spw-pagination.cjs.entry.js +26 -16
  15. package/dist/cjs/spw-pagination.cjs.entry.js.map +1 -1
  16. package/dist/cjs/spw-pagination.entry.cjs.js.map +1 -1
  17. package/dist/cjs/spw-search-field.cjs.entry.js +12 -2
  18. package/dist/cjs/spw-search-field.cjs.entry.js.map +1 -1
  19. package/dist/cjs/spw-search-field.entry.cjs.js.map +1 -1
  20. package/dist/cjs/spw-select.cjs.entry.js +3 -1
  21. package/dist/cjs/spw-select.cjs.entry.js.map +1 -1
  22. package/dist/cjs/spw-select.entry.cjs.js.map +1 -1
  23. package/dist/cjs/spw-stencil-library.cjs.js +1 -1
  24. package/dist/cjs/spw-table-cell.cjs.entry.js +23 -2
  25. package/dist/cjs/spw-table-cell.cjs.entry.js.map +1 -1
  26. package/dist/cjs/spw-table-cell.entry.cjs.js.map +1 -1
  27. package/dist/cjs/spw-table-footer.cjs.entry.js +1 -1
  28. package/dist/cjs/spw-table-footer.cjs.entry.js.map +1 -1
  29. package/dist/cjs/spw-table-footer.entry.cjs.js.map +1 -1
  30. package/dist/cjs/spw-table-header.cjs.entry.js +33 -3
  31. package/dist/cjs/spw-table-header.cjs.entry.js.map +1 -1
  32. package/dist/cjs/spw-table-header.entry.cjs.js.map +1 -1
  33. package/dist/cjs/spw-table-row.cjs.entry.js +34 -2
  34. package/dist/cjs/spw-table-row.cjs.entry.js.map +1 -1
  35. package/dist/cjs/spw-table-row.entry.cjs.js.map +1 -1
  36. package/dist/cjs/spw-table.cjs.entry.js +26 -3
  37. package/dist/cjs/spw-table.cjs.entry.js.map +1 -1
  38. package/dist/cjs/spw-table.entry.cjs.js.map +1 -1
  39. package/dist/cjs/utils-D_vNTY6w.js.map +1 -1
  40. package/dist/collection/components/spw-button/spw-button.css +1 -1
  41. package/dist/collection/components/spw-custom-select/spw-custom-select.css +1 -1
  42. package/dist/collection/components/spw-custom-select/spw-custom-select.js +42 -6
  43. package/dist/collection/components/spw-custom-select/spw-custom-select.js.map +1 -1
  44. package/dist/collection/components/spw-date-picker/spw-date-picker.js +48 -28
  45. package/dist/collection/components/spw-date-picker/spw-date-picker.js.map +1 -1
  46. package/dist/collection/components/spw-link/spw-link.css +1 -1
  47. package/dist/collection/components/spw-pagination/spw-pagination.css +1 -1
  48. package/dist/collection/components/spw-pagination/spw-pagination.js +54 -13
  49. package/dist/collection/components/spw-pagination/spw-pagination.js.map +1 -1
  50. package/dist/collection/components/spw-search-field/spw-search-field.js +50 -2
  51. package/dist/collection/components/spw-search-field/spw-search-field.js.map +1 -1
  52. package/dist/collection/components/spw-select/spw-select.js +3 -1
  53. package/dist/collection/components/spw-select/spw-select.js.map +1 -1
  54. package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.css +1 -1
  55. package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.js +82 -1
  56. package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.js.map +1 -1
  57. package/dist/collection/components/spw-table/spw-table-footer/spw-table-footer.css +1 -1
  58. package/dist/collection/components/spw-table/spw-table-header/spw-table-header.css +1 -1
  59. package/dist/collection/components/spw-table/spw-table-header/spw-table-header.js +92 -2
  60. package/dist/collection/components/spw-table/spw-table-header/spw-table-header.js.map +1 -1
  61. package/dist/collection/components/spw-table/spw-table-row/spw-table-row.css +1 -1
  62. package/dist/collection/components/spw-table/spw-table-row/spw-table-row.js +66 -1
  63. package/dist/collection/components/spw-table/spw-table-row/spw-table-row.js.map +1 -1
  64. package/dist/collection/components/spw-table/spw-table.js +27 -2
  65. package/dist/collection/components/spw-table/spw-table.js.map +1 -1
  66. package/dist/collection/stories/organisms/spw-footer/spw-footer.stories.js +1 -1
  67. package/dist/collection/stories/organisms/spw-footer/spw-footer.stories.js.map +1 -1
  68. package/dist/collection/utils/utils.js +47 -48
  69. package/dist/collection/utils/utils.js.map +1 -1
  70. package/dist/components/{p-du-Bai6S.js → p-B2toBmC2.js} +32 -21
  71. package/dist/components/p-B2toBmC2.js.map +1 -0
  72. package/dist/components/p-BBi01mKM.js.map +1 -1
  73. package/dist/components/{p-AjhBdYbk.js → p-DjyPtAVX.js} +3 -3
  74. package/dist/components/p-DjyPtAVX.js.map +1 -0
  75. package/dist/components/{p-CNNUoO2J.js → p-qROlK2WR.js} +3 -3
  76. package/dist/components/p-qROlK2WR.js.map +1 -0
  77. package/dist/components/spw-breadcrumb-item.js +1 -1
  78. package/dist/components/spw-button.js +1 -1
  79. package/dist/components/spw-cookies.js +1 -1
  80. package/dist/components/spw-custom-select.js +43 -7
  81. package/dist/components/spw-custom-select.js.map +1 -1
  82. package/dist/components/spw-date-picker.js +48 -28
  83. package/dist/components/spw-date-picker.js.map +1 -1
  84. package/dist/components/spw-file-upload.js +1 -1
  85. package/dist/components/spw-header-lang.js +1 -1
  86. package/dist/components/spw-header.js +1 -1
  87. package/dist/components/spw-iodda.js +1 -1
  88. package/dist/components/spw-link.js +1 -1
  89. package/dist/components/spw-message.js +1 -1
  90. package/dist/components/spw-pagination.js +1 -1
  91. package/dist/components/spw-search-field.js +15 -4
  92. package/dist/components/spw-search-field.js.map +1 -1
  93. package/dist/components/spw-select.js +3 -1
  94. package/dist/components/spw-select.js.map +1 -1
  95. package/dist/components/spw-table-cell.js +26 -2
  96. package/dist/components/spw-table-cell.js.map +1 -1
  97. package/dist/components/spw-table-footer.js +1 -1
  98. package/dist/components/spw-table-footer.js.map +1 -1
  99. package/dist/components/spw-table-header.js +37 -4
  100. package/dist/components/spw-table-header.js.map +1 -1
  101. package/dist/components/spw-table-row.js +39 -3
  102. package/dist/components/spw-table-row.js.map +1 -1
  103. package/dist/components/spw-table.js +28 -4
  104. package/dist/components/spw-table.js.map +1 -1
  105. package/dist/components_json.json +268 -12
  106. package/dist/components_vscode.json +3088 -0
  107. package/dist/esm/loader.js +1 -1
  108. package/dist/esm/spw-button.spw-loading.entry.js.map +1 -1
  109. package/dist/esm/spw-button_2.entry.js +1 -1
  110. package/dist/esm/spw-button_2.entry.js.map +1 -1
  111. package/dist/esm/spw-custom-select.entry.js +43 -7
  112. package/dist/esm/spw-custom-select.entry.js.map +1 -1
  113. package/dist/esm/spw-date-picker.entry.js +48 -28
  114. package/dist/esm/spw-date-picker.entry.js.map +1 -1
  115. package/dist/esm/spw-field-label.spw-group.spw-icon.spw-link.spw-separator.spw-theme-provider.entry.js.map +1 -1
  116. package/dist/esm/spw-field-label_6.entry.js +1 -1
  117. package/dist/esm/spw-field-label_6.entry.js.map +1 -1
  118. package/dist/esm/spw-pagination.entry.js +26 -16
  119. package/dist/esm/spw-pagination.entry.js.map +1 -1
  120. package/dist/esm/spw-search-field.entry.js +13 -3
  121. package/dist/esm/spw-search-field.entry.js.map +1 -1
  122. package/dist/esm/spw-select.entry.js +3 -1
  123. package/dist/esm/spw-select.entry.js.map +1 -1
  124. package/dist/esm/spw-stencil-library.js +1 -1
  125. package/dist/esm/spw-table-cell.entry.js +23 -2
  126. package/dist/esm/spw-table-cell.entry.js.map +1 -1
  127. package/dist/esm/spw-table-footer.entry.js +1 -1
  128. package/dist/esm/spw-table-footer.entry.js.map +1 -1
  129. package/dist/esm/spw-table-header.entry.js +33 -3
  130. package/dist/esm/spw-table-header.entry.js.map +1 -1
  131. package/dist/esm/spw-table-row.entry.js +35 -3
  132. package/dist/esm/spw-table-row.entry.js.map +1 -1
  133. package/dist/esm/spw-table.entry.js +26 -3
  134. package/dist/esm/spw-table.entry.js.map +1 -1
  135. package/dist/esm/utils-BBi01mKM.js.map +1 -1
  136. package/dist/spw-stencil-library/p-0f69442e.entry.js +2 -0
  137. package/dist/spw-stencil-library/p-0f69442e.entry.js.map +1 -0
  138. package/dist/spw-stencil-library/p-14722019.entry.js +2 -0
  139. package/dist/spw-stencil-library/p-14722019.entry.js.map +1 -0
  140. package/dist/spw-stencil-library/{p-b1de48f3.entry.js → p-152525de.entry.js} +2 -2
  141. package/dist/spw-stencil-library/p-152525de.entry.js.map +1 -0
  142. package/dist/spw-stencil-library/p-2ad00dfc.entry.js +2 -0
  143. package/dist/spw-stencil-library/p-2ad00dfc.entry.js.map +1 -0
  144. package/dist/spw-stencil-library/p-4a273848.entry.js +2 -0
  145. package/dist/spw-stencil-library/p-4a273848.entry.js.map +1 -0
  146. package/dist/spw-stencil-library/{p-31793077.entry.js → p-5632f307.entry.js} +2 -2
  147. package/dist/spw-stencil-library/p-5632f307.entry.js.map +1 -0
  148. package/dist/spw-stencil-library/p-5e43e2ed.entry.js +2 -0
  149. package/dist/spw-stencil-library/p-5e43e2ed.entry.js.map +1 -0
  150. package/dist/spw-stencil-library/p-92583499.entry.js +2 -0
  151. package/dist/spw-stencil-library/p-92583499.entry.js.map +1 -0
  152. package/dist/spw-stencil-library/p-9d760073.entry.js +2 -0
  153. package/dist/spw-stencil-library/p-9d760073.entry.js.map +1 -0
  154. package/dist/spw-stencil-library/p-9e8a779e.entry.js +2 -0
  155. package/dist/spw-stencil-library/p-9e8a779e.entry.js.map +1 -0
  156. package/dist/spw-stencil-library/p-BBi01mKM.js.map +1 -1
  157. package/dist/spw-stencil-library/p-c4e4cfd4.entry.js +2 -0
  158. package/dist/spw-stencil-library/p-c4e4cfd4.entry.js.map +1 -0
  159. package/dist/spw-stencil-library/{p-f7760a47.entry.js → p-fcc5884a.entry.js} +2 -2
  160. package/dist/spw-stencil-library/p-fcc5884a.entry.js.map +1 -0
  161. package/dist/spw-stencil-library/spw-button.spw-loading.entry.esm.js.map +1 -1
  162. package/dist/spw-stencil-library/spw-custom-select.entry.esm.js.map +1 -1
  163. package/dist/spw-stencil-library/spw-date-picker.entry.esm.js.map +1 -1
  164. package/dist/spw-stencil-library/spw-field-label.spw-group.spw-icon.spw-link.spw-separator.spw-theme-provider.entry.esm.js.map +1 -1
  165. package/dist/spw-stencil-library/spw-pagination.entry.esm.js.map +1 -1
  166. package/dist/spw-stencil-library/spw-search-field.entry.esm.js.map +1 -1
  167. package/dist/spw-stencil-library/spw-select.entry.esm.js.map +1 -1
  168. package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
  169. package/dist/spw-stencil-library/spw-table-cell.entry.esm.js.map +1 -1
  170. package/dist/spw-stencil-library/spw-table-footer.entry.esm.js.map +1 -1
  171. package/dist/spw-stencil-library/spw-table-header.entry.esm.js.map +1 -1
  172. package/dist/spw-stencil-library/spw-table-row.entry.esm.js.map +1 -1
  173. package/dist/spw-stencil-library/spw-table.entry.esm.js.map +1 -1
  174. package/dist/stats.json +611 -150
  175. package/dist/types/components/spw-custom-select/spw-custom-select.d.ts +3 -0
  176. package/dist/types/components/spw-date-picker/spw-date-picker.d.ts +1 -0
  177. package/dist/types/components/spw-pagination/spw-pagination.d.ts +4 -1
  178. package/dist/types/components/spw-search-field/spw-search-field.d.ts +5 -0
  179. package/dist/types/components/spw-select/spw-select.d.ts +1 -0
  180. package/dist/types/components/spw-table/spw-table-cell/spw-table-cell.d.ts +6 -0
  181. package/dist/types/components/spw-table/spw-table-header/spw-table-header.d.ts +6 -0
  182. package/dist/types/components/spw-table/spw-table-row/spw-table-row.d.ts +8 -0
  183. package/dist/types/components/spw-table/spw-table.d.ts +2 -0
  184. package/dist/types/components.d.ts +83 -0
  185. package/dist/types/utils/utils.d.ts +2 -1
  186. package/hydrate/index.js +265 -72
  187. package/hydrate/index.mjs +265 -72
  188. package/package.json +1 -1
  189. package/dist/components/p-AjhBdYbk.js.map +0 -1
  190. package/dist/components/p-CNNUoO2J.js.map +0 -1
  191. package/dist/components/p-du-Bai6S.js.map +0 -1
  192. package/dist/spw-stencil-library/p-22f972ca.entry.js +0 -2
  193. package/dist/spw-stencil-library/p-22f972ca.entry.js.map +0 -1
  194. package/dist/spw-stencil-library/p-2c28684f.entry.js +0 -2
  195. package/dist/spw-stencil-library/p-2c28684f.entry.js.map +0 -1
  196. package/dist/spw-stencil-library/p-31793077.entry.js.map +0 -1
  197. package/dist/spw-stencil-library/p-4c21a696.entry.js +0 -2
  198. package/dist/spw-stencil-library/p-4c21a696.entry.js.map +0 -1
  199. package/dist/spw-stencil-library/p-572188ac.entry.js +0 -2
  200. package/dist/spw-stencil-library/p-572188ac.entry.js.map +0 -1
  201. package/dist/spw-stencil-library/p-823b60ae.entry.js +0 -2
  202. package/dist/spw-stencil-library/p-823b60ae.entry.js.map +0 -1
  203. package/dist/spw-stencil-library/p-b1de48f3.entry.js.map +0 -1
  204. package/dist/spw-stencil-library/p-d115a739.entry.js +0 -2
  205. package/dist/spw-stencil-library/p-d115a739.entry.js.map +0 -1
  206. package/dist/spw-stencil-library/p-d2258e0a.entry.js +0 -2
  207. package/dist/spw-stencil-library/p-d2258e0a.entry.js.map +0 -1
  208. package/dist/spw-stencil-library/p-ecec4588.entry.js +0 -2
  209. package/dist/spw-stencil-library/p-ecec4588.entry.js.map +0 -1
  210. package/dist/spw-stencil-library/p-f5caed11.entry.js +0 -2
  211. package/dist/spw-stencil-library/p-f5caed11.entry.js.map +0 -1
  212. package/dist/spw-stencil-library/p-f7760a47.entry.js.map +0 -1
@@ -134,8 +134,23 @@ const SpwDatePicker = class {
134
134
  this.handleMaskedInput(event);
135
135
  };
136
136
  this.handleInputFocus = () => {
137
- if (!this.disabled && this.datepickerInstance) {
138
- this.datepickerInstance.show();
137
+ if (this.disabled)
138
+ return;
139
+ if (!this.datepickerInstance) {
140
+ this.initializeDatepicker();
141
+ }
142
+ if (this.datepickerInstance && typeof this.datepickerInstance.show === 'function') {
143
+ try {
144
+ this.datepickerInstance.show();
145
+ }
146
+ catch (error) {
147
+ console.warn("Erreur lors de l'ouverture du datepicker, réinitialisation...", error);
148
+ this.datepickerInstance = null;
149
+ this.initializeDatepicker();
150
+ if (this.datepickerInstance && typeof this.datepickerInstance.show === 'function') {
151
+ this.datepickerInstance.show();
152
+ }
153
+ }
139
154
  }
140
155
  };
141
156
  this.handleKeyDown = (ev) => {
@@ -210,21 +225,36 @@ const SpwDatePicker = class {
210
225
  this.internalValue = start;
211
226
  this.lastInputValue = this.internalValue;
212
227
  }
228
+ connectedCallback() {
229
+ if (!this.datepickerInstance && this.inputElement) {
230
+ requestAnimationFrame(() => {
231
+ this.initializeDatepicker();
232
+ });
233
+ }
234
+ }
213
235
  componentDidLoad() {
236
+ var _a;
214
237
  this.initializeDatepicker();
215
238
  if (this.value) {
216
239
  const initialDate = new Date(this.value);
217
240
  if (!isNaN(initialDate.getTime())) {
218
- this.datepickerInstance.setDate(initialDate, true);
219
- this.inputElement.value = this.formatDate(initialDate);
220
- this.internalValue = this.formatDate(initialDate);
241
+ (_a = this.datepickerInstance) === null || _a === void 0 ? void 0 : _a.setDate(initialDate, true);
242
+ if (this.inputElement) {
243
+ this.inputElement.value = this.formatDate(initialDate);
244
+ this.internalValue = this.formatDate(initialDate);
245
+ }
221
246
  }
222
247
  }
223
248
  this.internals.setFormValue(this.value ? this.value : null);
224
249
  }
225
250
  disconnectedCallback() {
226
251
  if (this.datepickerInstance && typeof this.datepickerInstance.remove === 'function') {
227
- this.datepickerInstance.remove();
252
+ setTimeout(() => {
253
+ if (!this.el.isConnected && this.datepickerInstance) {
254
+ this.datepickerInstance.remove();
255
+ this.datepickerInstance = null;
256
+ }
257
+ }, 100);
228
258
  }
229
259
  }
230
260
  watchValue(newValue) {
@@ -355,7 +385,6 @@ const SpwDatePicker = class {
355
385
  let start = null;
356
386
  let end = null;
357
387
  siblings.forEach(pickerEl => {
358
- // Accéder à l'attribut HTML pour déterminer si c'est le début ou la fin
359
388
  if (pickerEl.hasAttribute('is-start')) {
360
389
  start = pickerEl;
361
390
  }
@@ -375,7 +404,6 @@ const SpwDatePicker = class {
375
404
  const startValue = start.value;
376
405
  const endValue = end.value;
377
406
  if (!startValue || !endValue) {
378
- // Pas de range complet, supprimer le highlighting
379
407
  const allDates = this.datepickerInstance.calendar.querySelectorAll('.qs-square');
380
408
  allDates.forEach((dateEl) => {
381
409
  dateEl.classList.remove('spw-date-range-start', 'spw-date-range-end', 'spw-date-range-middle');
@@ -386,34 +414,27 @@ const SpwDatePicker = class {
386
414
  const endDate = new Date(endValue);
387
415
  if (isNaN(startDate.getTime()) || isNaN(endDate.getTime()))
388
416
  return;
389
- // Highlighter les dates dans le range
390
417
  const allDates = this.datepickerInstance.calendar.querySelectorAll('.qs-square:not(.qs-empty)');
391
418
  allDates.forEach((dateEl) => {
392
419
  const dateNum = parseInt(dateEl.textContent || '0', 10);
393
420
  if (!dateNum)
394
421
  return;
395
- // Récupérer le mois/année actuellement affiché
396
422
  const currentMonth = this.datepickerInstance.currentMonth;
397
423
  const currentYear = this.datepickerInstance.currentYear;
398
424
  const cellDate = new Date(currentYear, currentMonth, dateNum);
399
- // Normaliser les dates pour comparer uniquement jour/mois/année (sans heures)
400
425
  const cellDateOnly = new Date(cellDate.getFullYear(), cellDate.getMonth(), cellDate.getDate());
401
426
  const startDateOnly = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());
402
427
  const endDateOnly = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());
403
- // Vérifier si cette date est dans le range
404
428
  if (cellDateOnly >= startDateOnly && cellDateOnly <= endDateOnly) {
405
429
  if (cellDateOnly.getTime() === startDateOnly.getTime()) {
406
- // Date de début
407
430
  dateEl.classList.add('spw-date-range-start');
408
431
  dateEl.classList.remove('spw-date-range-middle', 'spw-date-range-end');
409
432
  }
410
433
  else if (cellDateOnly.getTime() === endDateOnly.getTime()) {
411
- // Date de fin
412
434
  dateEl.classList.add('spw-date-range-end');
413
435
  dateEl.classList.remove('spw-date-range-middle', 'spw-date-range-start');
414
436
  }
415
437
  else {
416
- // Date au milieu
417
438
  dateEl.classList.add('spw-date-range-middle');
418
439
  dateEl.classList.remove('spw-date-range-start', 'spw-date-range-end');
419
440
  }
@@ -543,8 +564,16 @@ const SpwDatePicker = class {
543
564
  }
544
565
  }
545
566
  initializeDatepicker() {
546
- if (!this.inputElement)
547
- return;
567
+ var _a;
568
+ if (!this.inputElement) {
569
+ const shadowInput = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input[type="text"]');
570
+ if (shadowInput) {
571
+ this.inputElement = shadowInput;
572
+ }
573
+ else {
574
+ return;
575
+ }
576
+ }
548
577
  const options = {
549
578
  position: this.position,
550
579
  startDay: 1,
@@ -578,11 +607,9 @@ const SpwDatePicker = class {
578
607
  this.internals.setFormValue(isoString);
579
608
  this.dateChange.emit({ value: isoString, date: selectedDate });
580
609
  this.updateRangeConstraints();
581
- // Mettre à jour le highlighting visuel du range
582
610
  setTimeout(() => {
583
611
  var _a, _b;
584
612
  this.highlightRangeInCalendar();
585
- // Mettre aussi à jour le highlighting sur l'autre datepicker s'il est ouvert
586
613
  const { start, end } = this.getRangeSiblings();
587
614
  const sibling = this.isStart ? end : start;
588
615
  if (sibling && sibling.isOpen) {
@@ -596,7 +623,6 @@ const SpwDatePicker = class {
596
623
  setTimeout(() => {
597
624
  this.setupCalendarNavigation();
598
625
  this.highlightRangeInCalendar();
599
- // Réappliquer plusieurs fois pour contrer js-datepicker
600
626
  setTimeout(() => this.highlightRangeInCalendar(), 50);
601
627
  setTimeout(() => this.highlightRangeInCalendar(), 150);
602
628
  }, 100);
@@ -607,9 +633,6 @@ const SpwDatePicker = class {
607
633
  },
608
634
  };
609
635
  if (this.range && this.rangeId) {
610
- // NOTE: On ne définit PAS options.id car js-datepicker applique alors des contraintes
611
- // automatiques qui sont inversées. On gère nous-mêmes les contraintes.
612
- // options.id = this.rangeId;
613
636
  const { start, end } = this.getRangeSiblings();
614
637
  if (this.isStart) {
615
638
  if (end && end.value) {
@@ -635,7 +658,6 @@ const SpwDatePicker = class {
635
658
  options.maxDate = new Date(this.maxDate);
636
659
  }
637
660
  if (this.datepickerInstance) {
638
- // js-datepicker utilise remove() pour détruire l'instance
639
661
  if (typeof this.datepickerInstance.remove === 'function') {
640
662
  this.datepickerInstance.remove();
641
663
  }
@@ -651,9 +673,7 @@ const SpwDatePicker = class {
651
673
  this.internalValue = formattedDate;
652
674
  this.lastInputValue = formattedDate;
653
675
  }
654
- catch (error) {
655
- // Si la date n'est pas valide avec les contraintes actuelles, on la laisse vide
656
- }
676
+ catch (error) { }
657
677
  }
658
678
  }
659
679
  }
@@ -699,7 +719,7 @@ const SpwDatePicker = class {
699
719
  'spw-date-picker__input--open': this.isOpen,
700
720
  };
701
721
  const errorMessage = this.error || this.internalError;
702
- return (index.h(index.Host, { key: '657ed1e69aaeb89fe38dd244e5744bf3caf5ca21' }, index.h("div", { key: 'dc957192b9d4b8c3eb9bd9f055a84c8ac67f6150', class: "spw-date-picker" }, this.label && index.h("spw-field-label", { key: '34adf8491363afcb0bce2aed2dfb72d4d3655b81', label: this.label, required: this.required }), this.assistiveText && (index.h("spw-field-message", { key: '098a6382c0558a436b17c605654c1edcb1447408', class: "spw-tw-mb-2 -spw-tw-mt-1", variant: "hint", showIcon: false }, this.assistiveText)), index.h("div", { key: '9d6684f543f9300f5bc528a6ee6a88d79f19c9fa', class: "spw-date-picker__input-container" }, index.h("input", { key: '56f8098297fada855c2672f7d3b4d926e7ac2e71', ref: el => (this.inputElement = el), id: this.uniqueId, type: "text", class: inputClass, value: this.internalValue, placeholder: this.placeholder, disabled: this.disabled, required: this.required, onFocus: this.handleInputFocus, onInput: this.handleInputChange, onKeyDown: this.handleKeyDown, "aria-describedby": this.assistiveText || errorMessage ? `${this.uniqueId}-help ${this.uniqueId}-error` : undefined, "aria-invalid": this.hasError }), index.h("spw-icon", { key: 'c18e7b4405c18d553036c5fd0301aa9bf2403be8', icon: "fa-calendar", class: "spw-date-picker__icon" })), this.error && (index.h("spw-field-message", { key: '83103ba00956d37bc8369d220f1b80591d840fea', variant: "error", showIcon: this.showErrorIcon }, this.error)), this.hint && (index.h("spw-field-message", { key: 'fbcb99394e7fac065b25141b14f57247993efb09', variant: "hint", showIcon: this.showHintIcon }, this.hint)), this.success && (index.h("spw-field-message", { key: 'a0041903b10368ad8f2c9482603868565ab20ee2', variant: "success", showIcon: this.showSuccessIcon }, this.success)), this.warning && (index.h("spw-field-message", { key: 'd52fdb1f562529df9d9e10f7ee5c92e221a8debe', variant: "warning", showIcon: this.showWarningIcon }, this.warning)))));
722
+ return (index.h(index.Host, { key: 'eb66aebb637564da5d4e3c83cfe76d9d61e12e85' }, index.h("div", { key: '7984062a8d5c11c6876780431ff8bfd93bd935cc', class: "spw-date-picker" }, this.label && index.h("spw-field-label", { key: '494b6184491b96597c068dccba20a8f7d588b144', label: this.label, required: this.required }), this.assistiveText && (index.h("spw-field-message", { key: 'cac9fb61d6af9ddfc648a1483812a72fea20ed2b', class: "spw-tw-mb-2 -spw-tw-mt-1", variant: "hint", showIcon: false }, this.assistiveText)), index.h("div", { key: 'd54d9d938865e6594c7f58f62941a01014503ee5', class: "spw-date-picker__input-container" }, index.h("input", { key: 'a5495ee8d28f851e40c8139f1f2ced630f19d016', ref: el => (this.inputElement = el), id: this.uniqueId, type: "text", class: inputClass, value: this.internalValue, placeholder: this.placeholder, disabled: this.disabled, required: this.required, onFocus: this.handleInputFocus, onInput: this.handleInputChange, onKeyDown: this.handleKeyDown, "aria-describedby": this.assistiveText || errorMessage ? `${this.uniqueId}-help ${this.uniqueId}-error` : undefined, "aria-invalid": this.hasError }), index.h("spw-icon", { key: '0737358ffe36b3c05d8a767c7cfdf14832144c85', icon: "fa-calendar", class: "spw-date-picker__icon" })), this.error && (index.h("spw-field-message", { key: 'da0bf405570f245e40822174b0360537be5de8da', variant: "error", showIcon: this.showErrorIcon }, this.error)), this.hint && (index.h("spw-field-message", { key: '2f72f9c384714c9687abe5807ce1a42c94247357', variant: "hint", showIcon: this.showHintIcon }, this.hint)), this.success && (index.h("spw-field-message", { key: 'c6d8902f5c56a696eea582d60f0fc82baade5cf3', variant: "success", showIcon: this.showSuccessIcon }, this.success)), this.warning && (index.h("spw-field-message", { key: '297c8119472b719c145c10301f4bd37bc6812f35', variant: "warning", showIcon: this.showWarningIcon }, this.warning)))));
703
723
  }
704
724
  static get formAssociated() { return true; }
705
725
  get el() { return index.getElement(this); }