globuswebcomponents 2.10.11 → 2.10.12
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/dist/cjs/gb-avatar_44.cjs.entry.js +22 -21
- package/dist/cjs/reusableModels-_LRAKnsh.js.map +1 -1
- package/dist/collection/components/gb-date-picker/gb-date-picker.js +3 -3
- package/dist/collection/components/gb-date-picker/gb-date-picker.js.map +1 -1
- package/dist/collection/components/gb-table/gb-table.js +19 -18
- package/dist/collection/components/gb-table/gb-table.js.map +1 -1
- package/dist/collection/models/reusableModels.js.map +1 -1
- package/dist/components/gb-date-picker.js +1 -1
- package/dist/components/gb-filter-modal.js +1 -1
- package/dist/components/gb-table-header.js +1 -1
- package/dist/components/gb-table.js +22 -21
- package/dist/components/gb-table.js.map +1 -1
- package/dist/components/{p-Dhj1-0eP.js → p-BqUYAF2A.js} +5 -5
- package/dist/components/p-BqUYAF2A.js.map +1 -0
- package/dist/components/{p-CbooQRoa.js → p-C__Zx-sJ.js} +3 -3
- package/dist/components/{p-CbooQRoa.js.map → p-C__Zx-sJ.js.map} +1 -1
- package/dist/components/{p-CoUI1smZ.js → p-DmjkaQ_5.js} +3 -3
- package/dist/components/{p-CoUI1smZ.js.map → p-DmjkaQ_5.js.map} +1 -1
- package/dist/components/p-cHn6O-Kf.js.map +1 -1
- package/dist/docs.json +3 -3
- package/dist/esm/gb-avatar_44.entry.js +22 -21
- package/dist/esm/reusableModels-cHn6O-Kf.js.map +1 -1
- package/dist/globuscomponents/globuscomponents.esm.js +1 -1
- package/dist/globuscomponents/{p-7ab790f6.entry.js → p-9d8adb68.entry.js} +2 -2
- package/dist/globuscomponents/p-9d8adb68.entry.js.map +1 -0
- package/dist/globuscomponents/p-cHn6O-Kf.js.map +1 -1
- package/dist/types/models/reusableModels.d.ts +6 -0
- package/package.json +1 -1
- package/dist/components/p-Dhj1-0eP.js.map +0 -1
- package/dist/globuscomponents/p-7ab790f6.entry.js.map +0 -1
|
@@ -3589,7 +3589,7 @@ const GbDatePicker = class {
|
|
|
3589
3589
|
if (selected.length) {
|
|
3590
3590
|
const formatted = selected[0];
|
|
3591
3591
|
this.value = formatted;
|
|
3592
|
-
console.log(this.value);
|
|
3592
|
+
// console.log(this.value);
|
|
3593
3593
|
this.dateChange.emit(this.value);
|
|
3594
3594
|
}
|
|
3595
3595
|
this.picker.close();
|
|
@@ -3645,9 +3645,9 @@ const GbDatePicker = class {
|
|
|
3645
3645
|
return timePart ? `${datePart} ${timePart}` : datePart;
|
|
3646
3646
|
}
|
|
3647
3647
|
render() {
|
|
3648
|
-
return (index.h("div", { key: '
|
|
3648
|
+
return (index.h("div", { key: '8cab893615f8fc15f7065e7965ddfbb15fe347e3', class: `date_picker_container` }, this.label && (index.h(index.Fragment, null, this.formatLabel ? (index.h("p", { class: "date_picker_label text-sm-medium" }, this.label.charAt(0).toUpperCase() + this.label.slice(1).toLowerCase())) : (index.h("p", { class: "date_picker_label text-sm-medium" }, this.label)))), index.h("div", { key: '5b8f0a61dc08165c79e489c373a07578c5f1650f', class: `date-picker-wrapper ${this.fullWidth ? 'full_width' : ''}` }, index.h("div", { key: '65f0f7275784140d932b3cdf8e7c6d0ddb3739db', class: `inner_container ${this.iconPosition}`, onClick: () => {
|
|
3649
3649
|
this.toggleCalendar();
|
|
3650
|
-
} }, this.iconPosition === 'left' && (index.h("svg", { key: '875dd7b117cdf8d19312a0bcbac9c317a5717d84', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { key: '9eebb47a822f7288311e721edf88e2308dfa9c72', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" }))), index.h("input", { key: '520e04f27c89bc9a43229ea7275b5c3faf420c48', type: "text", ref: el => (this.inputEl = el), placeholder: this.placeholder, disabled: this.disabled, value: this.displayValue, readonly: true }), index.h("span", { key: 'cd55b7b3e26d92c537655b591c1093ee5a4549e3', ref: el => (this.mirrorEl = el), id: "mirror" }, this.displayValue || this.placeholder), this.iconPosition === 'right' && (index.h("svg", { key: '3d316b7f552af984851d0adbfc55a76a83636cbc', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { key: '98a3121056cf504620663f61198f27243390eb29', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" })))), index.h("div", { key: '73747dac8b472afada0aa376cc36ac7964d92d24', class: `calendar-container ${!this.isCalendarShown ? 'hidden' : ''} ${this.dropdownAlignment}` }))));
|
|
3650
|
+
} }, this.iconPosition === 'left' && (index.h("svg", { key: '2ec3ba90d834faf39327330991572f4584041e32', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { key: 'bffd509c3bd170607f962c4ca5728c6ac39a2a34', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" }))), index.h("input", { key: '126656493244aba02c492fea9c5c2b54ac9523be', type: "text", ref: el => (this.inputEl = el), placeholder: this.placeholder, disabled: this.disabled, value: this.displayValue, readonly: true }), index.h("span", { key: 'a38bd7e2c491ca60f03c08e09e79da4cb09e5357', ref: el => (this.mirrorEl = el), id: "mirror" }, this.displayValue || this.placeholder), this.iconPosition === 'right' && (index.h("svg", { key: 'f9897047358dff6c07b1dfd1f231cb69c94c11cb', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { key: 'fed5fd84d3031efe3345ebd0f80a0ede5dbbb220', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" })))), index.h("div", { key: '71facc85421157a01999066ee09e6465bfcc24fc', class: `calendar-container ${!this.isCalendarShown ? 'hidden' : ''} ${this.dropdownAlignment}` }))));
|
|
3651
3651
|
}
|
|
3652
3652
|
get el() { return index.getElement(this); }
|
|
3653
3653
|
static get watchers() { return {
|
|
@@ -7346,7 +7346,7 @@ const GbTable = class {
|
|
|
7346
7346
|
this.draggedIndex = null;
|
|
7347
7347
|
this.handlePageChange = ({ detail }) => {
|
|
7348
7348
|
const { pageNumber, pageSize } = detail;
|
|
7349
|
-
console.log(detail);
|
|
7349
|
+
// console.log(detail);
|
|
7350
7350
|
// Update these state variables to trigger a re-render
|
|
7351
7351
|
this.internalPageSize = pageSize;
|
|
7352
7352
|
this.internalCurrentPage = pageNumber;
|
|
@@ -7404,7 +7404,7 @@ const GbTable = class {
|
|
|
7404
7404
|
this.rowActionClicked.emit({ action, row });
|
|
7405
7405
|
}
|
|
7406
7406
|
renderCell(col, row) {
|
|
7407
|
-
var _a, _b, _c;
|
|
7407
|
+
var _a, _b, _c, _d, _e;
|
|
7408
7408
|
if (col.cellComponent) {
|
|
7409
7409
|
const Tag = col.cellComponent;
|
|
7410
7410
|
// resolve props
|
|
@@ -7435,7 +7435,9 @@ const GbTable = class {
|
|
|
7435
7435
|
return (index.h("div", { class: "text_and_supporting_text" }, index.h("div", { class: "primary" }, index.h("p", { class: "text-sm-medium" }, primary)), supporting && (index.h("div", { class: "supporting" }, index.h("p", { class: "text-xs-regular" }, supporting)))));
|
|
7436
7436
|
}
|
|
7437
7437
|
const value = this.getCellValue(col, row);
|
|
7438
|
-
|
|
7438
|
+
const resolvedClass = typeof col.cellClass === 'function' ? col.cellClass(row) : ((_d = col.cellClass) !== null && _d !== void 0 ? _d : '');
|
|
7439
|
+
const resolvedStyle = typeof col.cellStyle === 'function' ? col.cellStyle(row) : (_e = col.cellStyle) !== null && _e !== void 0 ? _e : {};
|
|
7440
|
+
return index.h("p", { class: `body_text text-sm-regular ${resolvedClass}`, style: resolvedStyle }, value);
|
|
7439
7441
|
}
|
|
7440
7442
|
getCellValue(col, row) {
|
|
7441
7443
|
if (col.value) {
|
|
@@ -7561,27 +7563,26 @@ const GbTable = class {
|
|
|
7561
7563
|
this.selectionChanged.emit(selected);
|
|
7562
7564
|
}
|
|
7563
7565
|
get displayedData() {
|
|
7564
|
-
|
|
7565
|
-
console.log('
|
|
7566
|
-
console.log('
|
|
7567
|
-
console.log('page:', this.internalCurrentPage, 'size:', this.internalPageSize);
|
|
7566
|
+
// console.log('sortedData length:', this.sortedData.length);
|
|
7567
|
+
// console.log('mode:', this.paginationConfig?.paginationMode);
|
|
7568
|
+
// console.log('page:', this.internalCurrentPage, 'size:', this.internalPageSize);
|
|
7568
7569
|
if (!this.paginationConfig || this.paginationConfig.paginationMode === 'external') {
|
|
7569
7570
|
return this.sortedData;
|
|
7570
7571
|
}
|
|
7571
7572
|
const start = (this.internalCurrentPage - 1) * this.internalPageSize;
|
|
7572
7573
|
const end = start + this.internalPageSize;
|
|
7573
|
-
console.log('slice:', start, end);
|
|
7574
|
+
// console.log('slice:', start, end);
|
|
7574
7575
|
return this.sortedData.slice(start, end);
|
|
7575
7576
|
}
|
|
7576
7577
|
get totalPages() {
|
|
7577
|
-
|
|
7578
|
-
console.log('
|
|
7579
|
-
console.log('
|
|
7580
|
-
|
|
7578
|
+
// console.log('sortedData length:', this.sortedData.length);
|
|
7579
|
+
// console.log('internalPageSize:', this.internalPageSize);
|
|
7580
|
+
// console.log('paginationMode:', this.paginationConfig?.paginationMode);
|
|
7581
|
+
var _a;
|
|
7581
7582
|
if (!this.paginationConfig)
|
|
7582
7583
|
return 1;
|
|
7583
7584
|
const pageSize = this.internalPageSize || 1;
|
|
7584
|
-
const totalItems = this.paginationConfig.paginationMode === 'internal' ? this.sortedData.length : ((
|
|
7585
|
+
const totalItems = this.paginationConfig.paginationMode === 'internal' ? this.sortedData.length : ((_a = this.paginationConfig.totalItems) !== null && _a !== void 0 ? _a : 0);
|
|
7585
7586
|
return Math.max(1, Math.ceil(totalItems / pageSize));
|
|
7586
7587
|
}
|
|
7587
7588
|
onDataChange() {
|
|
@@ -7703,7 +7704,7 @@ const GbTable = class {
|
|
|
7703
7704
|
}, 300); // match CSS duration
|
|
7704
7705
|
}
|
|
7705
7706
|
onApplyFilters(detail) {
|
|
7706
|
-
console.log(detail.detail);
|
|
7707
|
+
// console.log(detail.detail);
|
|
7707
7708
|
this.applyFilters.emit(detail.detail);
|
|
7708
7709
|
this.showFilterModalInternal = false;
|
|
7709
7710
|
}
|
|
@@ -7711,16 +7712,16 @@ const GbTable = class {
|
|
|
7711
7712
|
window.removeEventListener('resize', this.checkViewport);
|
|
7712
7713
|
}
|
|
7713
7714
|
render() {
|
|
7714
|
-
return (index.h("div", { key: '
|
|
7715
|
+
return (index.h("div", { key: '5056f3d647ae140564a7f198f366cc63e5b9e8b3', class: `table_wrapper` }, index.h("gb-table-header", { key: 'f32c4759f3d225e4bc110940451323996bc27c3c', mode: this.tableHeaderConfig.datePickerMode, "table-heading": this.tableHeaderConfig.tableHeading, "table-heading-label": this.tableHeaderConfig.tableHeadingLabel, "show-search": this.tableHeaderConfig.showSearch, "show-date-filter": this.tableHeaderConfig.showDateFilter, "show-filter": this.tableHeaderConfig.showFilter, "show-export": this.tableHeaderConfig.showExport, "show-column-options": this.tableHeaderConfig.showColumnOptions, "show-refresh-button": this.tableHeaderConfig.showRefreshButton, "input-placeholder": this.tableHeaderConfig.inputPlaceholder, "date-picker-placeholder": this.tableHeaderConfig.datePickerPlaceholder, "show-entire-data": this.tableHeaderConfig.showEntireData, "show-layout-toggle": this.tableHeaderConfig.showLayoutToggle, "filter-state": this.tableHeaderConfig.filterState, "filter-count": this.tableHeaderConfig.filterCount, "export-button-state": this.tableHeaderConfig.exportButtonState, "pdf-state": this.tableHeaderConfig.pdfState, "csv-state": this.tableHeaderConfig.csvState, onInputValueChanged: this.emitSearchValue.bind(this), onDateChange: this.emitDateChange.bind(this), onColumnOptionsButtonClicked: this.columnOptionsButtonClicked(), onExportClicked: e => this.exportButtonClicked(e), onFilterButtonClicked: () => this.openFilterModal() }), this.showColumnsPanel && (index.h("div", { key: '70b5132baa875792dfd91f6e6e156aa2e138baf5', class: "dialog", style: {
|
|
7715
7716
|
transform: `translate(${this.modalPosition.x}px, ${this.modalPosition.y}px)`,
|
|
7716
|
-
} }, index.h("div", { key: '
|
|
7717
|
+
} }, index.h("div", { key: '1b378b8fd139c9eafbfbd8c68405b403fb3376c7', class: "column-modal" }, index.h("div", { key: 'd849dce29c1ac7dbc5414a92953c917c3835f42c', class: "modal_header" }, index.h("div", { key: '688e2a8db0d7dc473c29b1d29873bed3cd15bc65', class: "modal_header_content", onPointerDown: this.onModalPointerDown }, index.h("h4", { key: 'd50a0712f6527f8e9c3bb684c98b967d6a32d978', class: "heading display-xs-semi-bold" }, "Column Options"), index.h("gb-button-close", { key: '64fc1381bbd75bee33dce37af4b416fcb01b41a1', class: "close_button", color: "gray", size: "sm", onClick: () => (this.showColumnsPanel = false) }))), index.h("div", { key: 'aba7d0f8c648a86dc56229d4f7a72934be75372f', class: "content_wrapper" }, index.h("div", { key: '1181dcf3ee7c0bd9616c5fca8f46c159b94e8d81', class: "modal_content" }, this.internalColumns.map((col, index$1) => (index.h("div", { class: "column_option", draggable: true, onDragStart: () => (this.draggedIndex = index$1), onDragOver: e => e.preventDefault(), onDrop: () => {
|
|
7717
7718
|
if (this.draggedIndex !== null && this.draggedIndex !== index$1) {
|
|
7718
7719
|
this.reorderColumns(this.draggedIndex, index$1);
|
|
7719
7720
|
}
|
|
7720
7721
|
this.draggedIndex = null;
|
|
7721
7722
|
} }, index.h("div", { class: "label_and_dragger" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, index.h("path", { d: "M8 6H8.00635M8 12H8.00635M8 18H8.00635M15.9937 6H16M15.9937 12H16M15.9937 18H16", stroke: "var(--color-icon, #4B5565)", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), index.h("p", { class: "label text-md-regular" }, col.label)), index.h("gb-toggle", { size: "sm", state: reusableModels.StateEnum.Default, position: "right", pressed: col.visible, text: false, onToggleClicked: e => {
|
|
7722
7723
|
this.toggleColumn(e, col.key);
|
|
7723
|
-
} })))), index.h("div", { key: '
|
|
7724
|
+
} })))), index.h("div", { key: '28a47aba3b0f15c1b6de3b085f80bc001a1bebc1', class: "modal-actions" })))))), this.showFilterModalInternal && (index.h("div", { key: 'd25879e14611ee44cea97ec29bea62df204f88dd', class: `filter_modal_wrapper ${this.isFilterModalVisible ? 'open' : 'closing'}` }, index.h("gb-filter-modal", { key: '1b9ae3191bd84e6c346d28c11e00c9024c4b8f13', class: "filter_modal", filterConfig: this.filterConfig, onClose: e => {
|
|
7724
7725
|
e.stopPropagation();
|
|
7725
7726
|
this.closeFilterModal();
|
|
7726
7727
|
}, onApplyFilters: e => this.onApplyFilters(e) }))), this.internalLoading ? (
|
|
@@ -7759,7 +7760,7 @@ const GbTable = class {
|
|
|
7759
7760
|
// ✅ No loading + no data = empty state
|
|
7760
7761
|
index.h("div", { class: "empty_state_wrapper" }, index.h("gb-empty-state", { size: "sm", "main-text": this.emptyStateConfig.mainText, "supporting-text": this.emptyStateConfig.supportingText, color: this.emptyStateConfig.color, theme: this.emptyStateConfig.theme, "primary-button-icon-leading-swap": "assets/plus.svg", "illustration-icon": this.emptyStateConfig.illustrationIcon, background: true, "background-type": "grid", icon: "illustration", "illustration-style": "cloud" }))) : (
|
|
7761
7762
|
// ✅ Has data + not loading
|
|
7762
|
-
index.h(index.Fragment, null, this.isMobile ? this.renderMobileView() : this.renderDesktopView())), this.paginationConfig && this.data.length > 0 && (index.h("gb-pagination", { key: '
|
|
7763
|
+
index.h(index.Fragment, null, this.isMobile ? this.renderMobileView() : this.renderDesktopView())), this.paginationConfig && this.data.length > 0 && (index.h("gb-pagination", { key: '31eac5166425d8970bafccc86cdb9b520531e63d', "entries-dropdown-menu-position": this.paginationConfig.entriesDropdownMenuPosition, "page-size": this.paginationConfig.paginationMode === 'internal' ? this.internalPageSize : this.paginationConfig.pageSize, "current-page": this.paginationConfig.paginationMode === 'internal' ? this.internalCurrentPage : this.paginationConfig.currentPage, "total-pages": this.totalPages, onPageItemSelected: this.handlePageChange.bind(this) }))));
|
|
7763
7764
|
}
|
|
7764
7765
|
static get watchers() { return {
|
|
7765
7766
|
"data": ["onDataChange"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reusableModels-_LRAKnsh.js","sources":["src/models/reusableModels.ts"],"sourcesContent":["export type GeneralSizes = 'xxxxl' | 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs' | 'profile_lg' | 'profile_md' | 'profile_sm';\r\n\r\nexport type GeneralHierarchies = 'primary' | 'secondary_gray' | 'secondary_color' | 'tertiary_gray' | 'tertiary_color' | 'link_gray' | 'link_color';\r\n\r\nexport enum StateEnum {\r\n Default = 'default',\r\n Disabled = 'disabled',\r\n}\r\n\r\nexport type ArrowPositions = 'bottom_center' | 'bottom_left' | 'bottom_right' | 'top_center' | 'left' | 'right' | 'none' | 'center';\r\n\r\nexport type CheckBoxVariants = 'checkbox' | 'check_circle' | 'radio';\r\n\r\nexport enum BorderWeights {\r\n VeryLight = 'very_light',\r\n Light = 'light',\r\n Regular = 'regular',\r\n Heavy = 'heavy',\r\n}\r\n\r\nexport enum OnlineIndicatorStates {\r\n Online = 'online',\r\n Offline = 'offline',\r\n}\r\n\r\nexport type BreakPoints = 'desktop' | 'mobile';\r\n\r\nexport type FileUploadIconType = 'solid' | 'outline';\r\n\r\nexport type FileUploadStates = 'default' | 'in_progress' | 'complete' | 'hover' | 'disabled' | 'error';\r\n\r\nexport type GeneralColors = 'default' | 'gray' | 'primary' | 'error' | 'warning' | 'success' | 'discovery' | 'information' | 'pink' | 'purple' | 'white';\r\n\r\nexport type PaginationNumberShapes = 'square' | 'circle';\r\n\r\nexport type PaginationTypes =\r\n | 'page_default'\r\n | 'page_minimal_center_aligned'\r\n | 'card_default'\r\n | 'card_minimal_right_aligned'\r\n | 'card_minimal_left_aligned'\r\n | 'card_minimal_center_aligned'\r\n | 'card_button_group_right_aligned'\r\n | 'card_button_group_left_aligned'\r\n | 'card_button_group_center_aligned';\r\n\r\nexport type TabTypes =\r\n | 'button_primary'\r\n | 'button_gray'\r\n | 'button_white'\r\n | 'rounded_button_white'\r\n | 'underline'\r\n | 'underline_filled'\r\n | 'line'\r\n | 'button_white_border'\r\n | 'rounded_button_white_border'\r\n | 'button_gray_border';\r\n\r\nexport type GeneralBackgroundCategories = 'plain_background' | 'colored_background';\r\n\r\nexport type InputFieldTypes =\r\n | 'default'\r\n | 'icon_leading'\r\n | 'leading_dropdown'\r\n | 'trailing_dropdown'\r\n | 'leading_text'\r\n | 'payment_input'\r\n | 'tags'\r\n | 'trailing_button'\r\n | 'password'\r\n | 'password_icon_leading'\r\n | 'count';\r\n\r\nexport type DropdownTypes = 'default' | 'icon_leading' | 'avatar_leading' | 'dot_leading' | 'checkbox' | 'search' | 'tags';\r\n\r\nexport type ColorTypes = 'gray' | 'blue' | 'cyan' | 'pink' | 'purple' | 'green' | 'yellow' | 'red' | 'white';\r\n\r\nexport type DropdownItemTypes = string | number | { name: string | number; username: string; selected?: boolean };\r\n\r\nexport type PaginationDotTypes = 'dot' | 'line';\r\n\r\nexport type FileIconStyles = 'default' | 'gray' | 'solid';\r\n\r\nexport type FileIconTypes = 'pdf' | 'csv' | 'jpg' | 'jpeg' | 'ppt' | 'pptx' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'svg' | 'txt' | 'zip' | 'rar' | 'mp3' | 'mp4' | 'png' | 'empty';\r\n\r\nexport type TableCellTypes = 'text' | 'lead_text' | 'lead_checkbox' | 'badge';\r\n\r\nexport type ProgressStepStatus = 'incomplete' | 'current' | 'complete';\r\n\r\nexport type ProgressStepTypes = 'icon_only' | 'icon_left' | 'icon_top' | 'text_line' | 'featured_icon_left' | 'featured_icon_top';\r\n\r\nexport type ProgressStepStates = 'default' | 'destructive';\r\n\r\nexport type BadgeTypes = 'pill_color' | 'pill_outline' | 'badge_color' | 'badge_modern';\r\n\r\nexport type GeneralStyles = 'standard' | 'compact';\r\n\r\nexport type StateType = 'default' | 'disabled' | 'applied' | 'loading';\r\n\r\nexport type ButtonGroupTypes = 'false' | 'leading' | 'only' | 'dot' | 'checkbox';\r\n\r\nexport type ThemeTypes = 'system' | 'light' | 'dark';\r\n\r\nexport type BadgeIconTypes = 'dot' | 'avatar' | 'icon_leading' | 'icon_trailing' | 'country' | 'only' | 'false';\r\n\r\nexport type DropdownRoles = { badgeLabel: string; badgeColor: GeneralColors; badgeType: BadgeTypes };\r\n\r\nexport type StepperType = {\r\n state: ProgressStepStates;\r\n status: ProgressStepStatus;\r\n label?: string;\r\n supportingText?: string;\r\n};\r\n\r\nexport type DetailCellType = 'information' | 'document' | 'status' | 'button';\r\n\r\nexport type MetricFeaturedIconTypes = 'glassmorphism' | 'circular_filled';\r\n\r\nexport interface DropdownListGroup {\r\n icon: string;\r\n label: string;\r\n shortcut: string;\r\n}\r\n\r\nexport type CloseButtonPositions = 'left' | 'right';\r\n\r\nexport interface Notification {\r\n label: string;\r\n time: string;\r\n desc: string;\r\n icon: string;\r\n}\r\n\r\nexport type IllustrationTypes = 'cloud' | 'box' | 'documents' | 'credit_card';\r\n\r\nexport type PatternTypes = 'circles' | 'grid' | 'grid_dot' | 'squares';\r\n\r\nexport type MobilePosition = 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right';\r\n\r\nexport interface TableColumn {\r\n key: string;\r\n label: string;\r\n transform?: {
|
|
1
|
+
{"version":3,"file":"reusableModels-_LRAKnsh.js","sources":["src/models/reusableModels.ts"],"sourcesContent":["export type GeneralSizes = 'xxxxl' | 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs' | 'profile_lg' | 'profile_md' | 'profile_sm';\r\n\r\nexport type GeneralHierarchies = 'primary' | 'secondary_gray' | 'secondary_color' | 'tertiary_gray' | 'tertiary_color' | 'link_gray' | 'link_color';\r\n\r\nexport enum StateEnum {\r\n Default = 'default',\r\n Disabled = 'disabled',\r\n}\r\n\r\nexport type ArrowPositions = 'bottom_center' | 'bottom_left' | 'bottom_right' | 'top_center' | 'left' | 'right' | 'none' | 'center';\r\n\r\nexport type CheckBoxVariants = 'checkbox' | 'check_circle' | 'radio';\r\n\r\nexport enum BorderWeights {\r\n VeryLight = 'very_light',\r\n Light = 'light',\r\n Regular = 'regular',\r\n Heavy = 'heavy',\r\n}\r\n\r\nexport enum OnlineIndicatorStates {\r\n Online = 'online',\r\n Offline = 'offline',\r\n}\r\n\r\nexport type BreakPoints = 'desktop' | 'mobile';\r\n\r\nexport type FileUploadIconType = 'solid' | 'outline';\r\n\r\nexport type FileUploadStates = 'default' | 'in_progress' | 'complete' | 'hover' | 'disabled' | 'error';\r\n\r\nexport type GeneralColors = 'default' | 'gray' | 'primary' | 'error' | 'warning' | 'success' | 'discovery' | 'information' | 'pink' | 'purple' | 'white';\r\n\r\nexport type PaginationNumberShapes = 'square' | 'circle';\r\n\r\nexport type PaginationTypes =\r\n | 'page_default'\r\n | 'page_minimal_center_aligned'\r\n | 'card_default'\r\n | 'card_minimal_right_aligned'\r\n | 'card_minimal_left_aligned'\r\n | 'card_minimal_center_aligned'\r\n | 'card_button_group_right_aligned'\r\n | 'card_button_group_left_aligned'\r\n | 'card_button_group_center_aligned';\r\n\r\nexport type TabTypes =\r\n | 'button_primary'\r\n | 'button_gray'\r\n | 'button_white'\r\n | 'rounded_button_white'\r\n | 'underline'\r\n | 'underline_filled'\r\n | 'line'\r\n | 'button_white_border'\r\n | 'rounded_button_white_border'\r\n | 'button_gray_border';\r\n\r\nexport type GeneralBackgroundCategories = 'plain_background' | 'colored_background';\r\n\r\nexport type InputFieldTypes =\r\n | 'default'\r\n | 'icon_leading'\r\n | 'leading_dropdown'\r\n | 'trailing_dropdown'\r\n | 'leading_text'\r\n | 'payment_input'\r\n | 'tags'\r\n | 'trailing_button'\r\n | 'password'\r\n | 'password_icon_leading'\r\n | 'count';\r\n\r\nexport type DropdownTypes = 'default' | 'icon_leading' | 'avatar_leading' | 'dot_leading' | 'checkbox' | 'search' | 'tags';\r\n\r\nexport type ColorTypes = 'gray' | 'blue' | 'cyan' | 'pink' | 'purple' | 'green' | 'yellow' | 'red' | 'white';\r\n\r\nexport type DropdownItemTypes = string | number | { name: string | number; username: string; selected?: boolean };\r\n\r\nexport type PaginationDotTypes = 'dot' | 'line';\r\n\r\nexport type FileIconStyles = 'default' | 'gray' | 'solid';\r\n\r\nexport type FileIconTypes = 'pdf' | 'csv' | 'jpg' | 'jpeg' | 'ppt' | 'pptx' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'svg' | 'txt' | 'zip' | 'rar' | 'mp3' | 'mp4' | 'png' | 'empty';\r\n\r\nexport type TableCellTypes = 'text' | 'lead_text' | 'lead_checkbox' | 'badge';\r\n\r\nexport type ProgressStepStatus = 'incomplete' | 'current' | 'complete';\r\n\r\nexport type ProgressStepTypes = 'icon_only' | 'icon_left' | 'icon_top' | 'text_line' | 'featured_icon_left' | 'featured_icon_top';\r\n\r\nexport type ProgressStepStates = 'default' | 'destructive';\r\n\r\nexport type BadgeTypes = 'pill_color' | 'pill_outline' | 'badge_color' | 'badge_modern';\r\n\r\nexport type GeneralStyles = 'standard' | 'compact';\r\n\r\nexport type StateType = 'default' | 'disabled' | 'applied' | 'loading';\r\n\r\nexport type ButtonGroupTypes = 'false' | 'leading' | 'only' | 'dot' | 'checkbox';\r\n\r\nexport type ThemeTypes = 'system' | 'light' | 'dark';\r\n\r\nexport type BadgeIconTypes = 'dot' | 'avatar' | 'icon_leading' | 'icon_trailing' | 'country' | 'only' | 'false';\r\n\r\nexport type DropdownRoles = { badgeLabel: string; badgeColor: GeneralColors; badgeType: BadgeTypes };\r\n\r\nexport type StepperType = {\r\n state: ProgressStepStates;\r\n status: ProgressStepStatus;\r\n label?: string;\r\n supportingText?: string;\r\n};\r\n\r\nexport type DetailCellType = 'information' | 'document' | 'status' | 'button';\r\n\r\nexport type MetricFeaturedIconTypes = 'glassmorphism' | 'circular_filled';\r\n\r\nexport interface DropdownListGroup {\r\n icon: string;\r\n label: string;\r\n shortcut: string;\r\n}\r\n\r\nexport type CloseButtonPositions = 'left' | 'right';\r\n\r\nexport interface Notification {\r\n label: string;\r\n time: string;\r\n desc: string;\r\n icon: string;\r\n}\r\n\r\nexport type IllustrationTypes = 'cloud' | 'box' | 'documents' | 'credit_card';\r\n\r\nexport type PatternTypes = 'circles' | 'grid' | 'grid_dot' | 'squares';\r\n\r\nexport type MobilePosition = 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right';\r\n\r\nexport interface TableColumn {\r\n key: string;\r\n label: string;\r\n transform?: {};\r\n value?: (row: any) => any;\r\n supportingText?: string | ((row: any) => string);\r\n width?: string;\r\n align?: 'left' | 'center' | 'right';\r\n stickyRight?: boolean;\r\n helpIcon?: boolean;\r\n sortable?: boolean;\r\n sortType?: 'string' | 'number' | 'date';\r\n visible?: boolean;\r\n sortComparator?: (a: any, b: any) => number;\r\n cellComponent?: string;\r\n cellActionType?: 'dropdown' | 'void';\r\n cellProps?: ((row: any) => { [key: string]: any }) | { [key: string]: any };\r\n cellSlots?: {\r\n default?: {\r\n tag?: string; // e.g., 'p', 'span' to wrap content\r\n content: (row: any) => string | any; // Function to get slot content\r\n };\r\n named?: {\r\n [slotName: string]: {\r\n tag: string; // e.g., 'p', 'h1', 'span'\r\n content: (row: any) => string | any; // Function to get slot content\r\n };\r\n };\r\n };\r\n cellClass?: string | ((row: any) => string);\r\n cellStyle?: { [key: string]: string } | ((row: any) => { [key: string]: string });\r\n onClick?: () => void;\r\n mobile?: {\r\n position?: MobilePosition;\r\n };\r\n}\r\n\r\nexport interface RowAction {\r\n label: string;\r\n icon?: string;\r\n action: string; // emitted event name\r\n disabled?: boolean;\r\n destructive?: boolean;\r\n type?: 'button' | 'dropdown';\r\n}\r\n\r\nexport interface DropdownOption {\r\n label: string;\r\n icon?: string;\r\n action: string; // emitted event name\r\n disabled?: boolean;\r\n}\r\n\r\nexport type PortalPlacement =\r\n | 'top'\r\n | 'top-start'\r\n | 'top-end'\r\n | 'bottom'\r\n | 'bottom-start'\r\n | 'bottom-end'\r\n | 'left'\r\n | 'left-start'\r\n | 'left-end'\r\n | 'right'\r\n | 'right-start'\r\n | 'right-end';\r\n\r\nexport interface FilterConfig {\r\n title: string;\r\n enableDateRange: boolean;\r\n dateRangeLabel?: string;\r\n showClearButton?: boolean;\r\n additionalFields?: {\r\n tag: string;\r\n key: string;\r\n event: string;\r\n props: any;\r\n default?: any;\r\n }[];\r\n initialValues: {\r\n pageNumber: number;\r\n pageSize: number;\r\n };\r\n}\r\n"],"names":["StateEnum","BorderWeights","OnlineIndicatorStates"],"mappings":";;AAIYA;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHWA,iBAAS,KAATA,iBAAS,GAGpB,EAAA,CAAA,CAAA;AAMWC;AAAZ,CAAA,UAAY,aAAa,EAAA;AACvB,IAAA,aAAA,CAAA,WAAA,CAAA,GAAA,YAAwB;AACxB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EALWA,qBAAa,KAAbA,qBAAa,GAKxB,EAAA,CAAA,CAAA;AAEWC;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,qBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAHWA,6BAAqB,KAArBA,6BAAqB,GAGhC,EAAA,CAAA,CAAA;;"}
|
|
@@ -360,7 +360,7 @@ export class GbDatePicker {
|
|
|
360
360
|
if (selected.length) {
|
|
361
361
|
const formatted = selected[0];
|
|
362
362
|
this.value = formatted;
|
|
363
|
-
console.log(this.value);
|
|
363
|
+
// console.log(this.value);
|
|
364
364
|
this.dateChange.emit(this.value);
|
|
365
365
|
}
|
|
366
366
|
this.picker.close();
|
|
@@ -416,9 +416,9 @@ export class GbDatePicker {
|
|
|
416
416
|
return timePart ? `${datePart} ${timePart}` : datePart;
|
|
417
417
|
}
|
|
418
418
|
render() {
|
|
419
|
-
return (h("div", { key: '
|
|
419
|
+
return (h("div", { key: '8cab893615f8fc15f7065e7965ddfbb15fe347e3', class: `date_picker_container` }, this.label && (h(Fragment, null, this.formatLabel ? (h("p", { class: "date_picker_label text-sm-medium" }, this.label.charAt(0).toUpperCase() + this.label.slice(1).toLowerCase())) : (h("p", { class: "date_picker_label text-sm-medium" }, this.label)))), h("div", { key: '5b8f0a61dc08165c79e489c373a07578c5f1650f', class: `date-picker-wrapper ${this.fullWidth ? 'full_width' : ''}` }, h("div", { key: '65f0f7275784140d932b3cdf8e7c6d0ddb3739db', class: `inner_container ${this.iconPosition}`, onClick: () => {
|
|
420
420
|
this.toggleCalendar();
|
|
421
|
-
} }, this.iconPosition === 'left' && (h("svg", { key: '875dd7b117cdf8d19312a0bcbac9c317a5717d84', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '9eebb47a822f7288311e721edf88e2308dfa9c72', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" }))), h("input", { key: '520e04f27c89bc9a43229ea7275b5c3faf420c48', type: "text", ref: el => (this.inputEl = el), placeholder: this.placeholder, disabled: this.disabled, value: this.displayValue, readonly: true }), h("span", { key: 'cd55b7b3e26d92c537655b591c1093ee5a4549e3', ref: el => (this.mirrorEl = el), id: "mirror" }, this.displayValue || this.placeholder), this.iconPosition === 'right' && (h("svg", { key: '3d316b7f552af984851d0adbfc55a76a83636cbc', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '98a3121056cf504620663f61198f27243390eb29', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" })))), h("div", { key: '73747dac8b472afada0aa376cc36ac7964d92d24', class: `calendar-container ${!this.isCalendarShown ? 'hidden' : ''} ${this.dropdownAlignment}` }))));
|
|
421
|
+
} }, this.iconPosition === 'left' && (h("svg", { key: '2ec3ba90d834faf39327330991572f4584041e32', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'bffd509c3bd170607f962c4ca5728c6ac39a2a34', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" }))), h("input", { key: '126656493244aba02c492fea9c5c2b54ac9523be', type: "text", ref: el => (this.inputEl = el), placeholder: this.placeholder, disabled: this.disabled, value: this.displayValue, readonly: true }), h("span", { key: 'a38bd7e2c491ca60f03c08e09e79da4cb09e5357', ref: el => (this.mirrorEl = el), id: "mirror" }, this.displayValue || this.placeholder), this.iconPosition === 'right' && (h("svg", { key: 'f9897047358dff6c07b1dfd1f231cb69c94c11cb', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'fed5fd84d3031efe3345ebd0f80a0ede5dbbb220', d: "M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z", fill: "var(--color-icon, #4B5565)" })))), h("div", { key: '71facc85421157a01999066ee09e6465bfcc24fc', class: `calendar-container ${!this.isCalendarShown ? 'hidden' : ''} ${this.dropdownAlignment}` }))));
|
|
422
422
|
}
|
|
423
423
|
static get is() { return "gb-date-picker"; }
|
|
424
424
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gb-date-picker.js","sourceRoot":"","sources":["../../../src/components/gb-date-picker/gb-date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,kCAAkC,CAAC;AAS1C,MAAM,OAAO,YAAY;IALzB;QAOU,gBAAW,GAAW,uBAAuB,CAAC;QAC7B,UAAK,GAAyB,IAAI,CAAC;QACpD,WAAM,GAAW,QAAQ,CAAC;QAC1B,SAAI,GAAuB,QAAQ,CAAC;QACpC,aAAQ,GAAY,KAAK,CAAC;QAC1B,iBAAY,GAAyB,OAAO,CAAC;QAC7C,sBAAiB,GAAyB,MAAM,CAAC;QACjD,UAAK,GAAW,EAAE,CAAC;QACnB,gBAAW,GAAY,IAAI,CAAC;QAC5B,eAAU,GAAY,KAAK,CAAC;QAC5B,eAAU,GAAY,KAAK,CAAC;QAC5B,eAAU,GAAY,KAAK,CAAC;QAC5B,iBAAY,GAAY,KAAK,CAAC;QAC9B,eAAU,GAAW,CAAC,CAAC;QACvB,cAAS,GAAY,KAAK,CAAC;QAC1B,oBAAe,GAAY,KAAK,CAAC;QACjC,eAAU,GAAyB,SAAS,CAAC;QAC7C,UAAK,GAAW,MAAM,CAAC,UAAU,CAAC;QAElC,oBAAe,GAAkC,SAAS,CAAC;QAM5D,4BAAuB,GAAY,KAAK,CAAC;QAmCzC,iBAAY,GAAG,GAAG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, State, Fragment, Watch } from '@stencil/core';\r\nimport flatpickr from 'flatpickr';\r\nimport 'flatpickr/dist/flatpickr.min.css';\r\nimport { CustomLocale } from 'flatpickr/dist/types/locale';\r\nimport { CloseButtonPositions } from '../../models/reusableModels';\r\n\r\n@Component({\r\n tag: 'gb-date-picker',\r\n styleUrl: 'gb-date-picker.css',\r\n shadow: true,\r\n})\r\nexport class GbDatePicker {\r\n @Element() el: HTMLElement;\r\n @Prop() placeholder: string = 'Start date - end date';\r\n @Prop({ mutable: true }) value: Date | Date[] | null = null;\r\n @Prop() format: string = 'M j, Y';\r\n @Prop() mode: 'single' | 'range' = 'single';\r\n @Prop() disabled: boolean = false;\r\n @Prop() iconPosition: CloseButtonPositions = 'right';\r\n @Prop() dropdownAlignment: CloseButtonPositions = 'left';\r\n @Prop() label: string = '';\r\n @Prop() formatLabel: boolean = true;\r\n @Prop() allowInput: boolean = false;\r\n @Prop() enableTime: boolean = false;\r\n @Prop() noCalendar: boolean = false;\r\n @Prop() twentyfourHr: boolean = false;\r\n @Prop() showMonths: number = 2;\r\n @Prop() fullWidth: boolean = false;\r\n @State() isCalendarShown: boolean = false;\r\n @State() breakpoint: 'mobile' | 'desktop' = 'desktop';\r\n @State() width: number = window.innerWidth;\r\n @State() displayValue: string;\r\n @State() selectionSource: 'sidebar' | 'calendar' | null = 'sidebar';\r\n @Event() dateChange: EventEmitter<Date | Date[]>;\r\n\r\n private inputEl!: HTMLInputElement;\r\n private picker: flatpickr.Instance;\r\n private activeSidebarItem?: HTMLElement;\r\n private hasAppliedDefaultPreset: boolean = false;\r\n private mirrorEl!: HTMLSpanElement;\r\n\r\n componentDidLoad() {\r\n // this.injectApplyButton();\r\n this.initializePicker();\r\n this.resizeInputFieldBasedOnTheValue();\r\n }\r\n\r\n componentWillLoad() {\r\n window.addEventListener('resize', this.handleResize);\r\n\r\n // ✅ Initialize displayValue before render to avoid state changes during componentDidLoad\r\n if (!this.displayValue) {\r\n this.displayValue = '';\r\n }\r\n }\r\n\r\n resizeInputFieldBasedOnTheValue() {\r\n if (!this.inputEl || !this.mirrorEl || this.fullWidth) return;\r\n\r\n const text = this.displayValue || this.inputEl.value || this.placeholder || '';\r\n\r\n this.mirrorEl.textContent = text;\r\n\r\n // padding + caret buffer\r\n const padding = 16;\r\n this.inputEl.style.width = `${this.mirrorEl.offsetWidth + padding}px`;\r\n }\r\n\r\n @Watch('displayValue')\r\n handleDisplayValueChange() {\r\n requestAnimationFrame(() => this.resizeInputFieldBasedOnTheValue());\r\n }\r\n\r\n private handleResize = () => {\r\n this.width = window.innerWidth;\r\n\r\n const newBreakpoint = this.width < 900 ? 'mobile' : 'desktop';\r\n\r\n if (newBreakpoint !== this.breakpoint) {\r\n this.breakpoint = newBreakpoint;\r\n\r\n if (this.picker) {\r\n this.picker.set('showMonths', this.getMonthCount());\r\n\r\n // Sidebar only makes sense for 2 months\r\n requestAnimationFrame(() => {\r\n this.maybeCreateSidebar(this.picker.calendarContainer);\r\n });\r\n }\r\n }\r\n };\r\n\r\n private getMonthCount(): number {\r\n return this.width < 900 ? 1 : this.showMonths;\r\n }\r\n\r\n disconnectedCallback() {\r\n if (this.picker) this.picker.destroy();\r\n }\r\n\r\n private initializePicker() {\r\n const calendarContainer = this.el.shadowRoot.querySelector('.calendar-container') as HTMLElement;\r\n const input = this.inputEl;\r\n\r\n const customLocale: Partial<CustomLocale> = {\r\n weekdays: {\r\n shorthand: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\r\n longhand: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\r\n },\r\n rangeSeparator: ' - ',\r\n };\r\n\r\n if (!calendarContainer || !input) {\r\n console.warn('Calendar container or input not found.');\r\n return;\r\n }\r\n\r\n const fixDaysWidth = () => {\r\n const days = this.el.shadowRoot?.querySelector('.flatpickr-days') as HTMLElement;\r\n if (days) {\r\n days.style.width = 'auto';\r\n }\r\n };\r\n\r\n this.picker = flatpickr(input, {\r\n dateFormat: this.format,\r\n mode: this.mode,\r\n showMonths: this.getMonthCount(),\r\n appendTo: calendarContainer, // keep inside shadow root\r\n clickOpens: false,\r\n allowInput: false,\r\n altInput: false,\r\n altFormat: this.format,\r\n closeOnSelect: !this.enableTime,\r\n locale: customLocale,\r\n disableMobile: true,\r\n enableTime: this.enableTime,\r\n noCalendar: this.noCalendar,\r\n time_24hr: this.twentyfourHr,\r\n prevArrow: `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" class=\"calendar_arrow\">\r\n <path d=\"M12.5 4.99988C12.5 4.99988 7.50001 8.68232 7.5 9.99992C7.49999 11.3175 12.5 14.9999 12.5 14.9999\" stroke=\"var(--color-icon, #4B5565)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n</svg>\r\n `,\r\n nextArrow: ` \r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" class=\"calendar_arrow\">\r\n <path d=\"M7.50004 5C7.50004 5 12.5 8.68244 12.5 10C12.5 11.3176 7.5 15 7.5 15\" stroke=\"var(--color-icon, #4B5565)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n</svg>\r\n `,\r\n onChange: (selectedDates: Date[]) => {\r\n // if (this.selectionSource === 'sidebar') return;\r\n this.selectionSource = 'calendar';\r\n this.activeSidebarItem?.removeAttribute('selected');\r\n this.activeSidebarItem = undefined;\r\n\r\n if (this.mode === 'range' && selectedDates.length === 2) {\r\n const [start, end] = selectedDates;\r\n const newDisplayValue = `${this.picker.formatDate(start, this.format)} - ${this.picker.formatDate(end, this.format)}`;\r\n if (this.displayValue !== newDisplayValue) {\r\n this.displayValue = newDisplayValue;\r\n }\r\n this.value = [start, end];\r\n this.dateChange.emit([start, end]);\r\n }\r\n\r\n if (this.mode === 'single' && selectedDates.length > 0) {\r\n const newDisplayValue = this.picker.formatDate(selectedDates[0], this.format);\r\n if (this.displayValue !== newDisplayValue) {\r\n this.displayValue = newDisplayValue;\r\n }\r\n this.value = selectedDates[0];\r\n this.dateChange.emit(this.value);\r\n }\r\n\r\n fixDaysWidth();\r\n },\r\n onOpen: () => {\r\n this.isCalendarShown = true;\r\n fixDaysWidth();\r\n },\r\n onClose: () => {\r\n this.isCalendarShown = false;\r\n },\r\n onReady: (_, __, fp) => {\r\n this.picker = fp; // ✅ FIRST\r\n\r\n requestAnimationFrame(() => {\r\n this.injectSidebarLayout(fp);\r\n this.maybeCreateSidebar(fp.calendarContainer);\r\n\r\n if (!this.hasAppliedDefaultPreset && !this.value && this.showMonths > 1) {\r\n this.hasAppliedDefaultPreset = true;\r\n this.selectionSource = 'sidebar';\r\n this.applyDefaultTodayPreset();\r\n } else {\r\n this.selectionSource = 'sidebar';\r\n }\r\n });\r\n },\r\n });\r\n\r\n input.addEventListener('input', () => {\r\n const dateStr = input.value;\r\n const parsedDate = this.picker.parseDate(dateStr, this.format);\r\n\r\n if (parsedDate && this.value !== parsedDate) {\r\n this.value = parsedDate;\r\n this.dateChange.emit(this.value);\r\n }\r\n });\r\n }\r\n\r\n clearDateSelection() {\r\n if (this.picker) {\r\n this.picker.clear();\r\n }\r\n }\r\n\r\n private applyDefaultTodayPreset() {\r\n if (!this.picker) return;\r\n\r\n const today = new Date();\r\n\r\n // Set flatpickr value\r\n this.picker.setDate(today, false);\r\n\r\n // Only update if value is still null/empty\r\n if (!this.value) {\r\n this.value = today;\r\n this.dateChange.emit(today);\r\n }\r\n\r\n // UI state - only update if changed\r\n if (this.displayValue !== 'Today') {\r\n this.displayValue = 'Today';\r\n }\r\n }\r\n\r\n private maybeCreateSidebar(calendar: HTMLElement) {\r\n // Remove existing sidebar\r\n calendar.querySelector('.fp-sidebar')?.remove();\r\n\r\n // Sidebar ONLY when months > 1 AND desktop\r\n if (this.breakpoint === 'mobile' || this.picker.config.showMonths <= 1) {\r\n calendar.classList.remove('has-sidebar');\r\n return;\r\n }\r\n\r\n const sidebar = this.createSidebar();\r\n calendar.classList.add('has-sidebar');\r\n calendar.prepend(sidebar);\r\n }\r\n\r\n injectSidebarLayout(fp: flatpickr.Instance) {\r\n const calendar = fp.calendarContainer as HTMLElement;\r\n if (!calendar || calendar.querySelector('.fp-layout')) return;\r\n\r\n const months = calendar.querySelector('.flatpickr-months');\r\n const inner = calendar.querySelector('.flatpickr-innerContainer');\r\n const time = calendar.querySelector('.flatpickr-time');\r\n\r\n if (!months || !inner) return;\r\n\r\n const layout = document.createElement('div');\r\n layout.className = 'fp-layout';\r\n\r\n const main = document.createElement('div');\r\n main.className = 'fp-main';\r\n\r\n main.append(months, inner);\r\n if (time && this.enableTime) main.appendChild(time); // 🔥 preserve time picker\r\n\r\n layout.appendChild(main);\r\n\r\n calendar.appendChild(layout);\r\n\r\n this.injectApplyButton();\r\n }\r\n\r\n createSidebar(): HTMLElement {\r\n const sidebar = document.createElement('div');\r\n sidebar.className = 'fp-sidebar';\r\n\r\n const ranges = [\r\n { key: 'today', label: 'Today' },\r\n { key: 'yesterday', label: 'Yesterday' },\r\n { key: 'this-week', label: 'This week' },\r\n { key: 'last-week', label: 'Last week' },\r\n { key: 'this-month', label: 'This month' },\r\n { key: 'last-month', label: 'Last month' },\r\n { key: 'this-year', label: 'This year' },\r\n { key: 'last-year', label: 'Last year' },\r\n ];\r\n\r\n ranges.forEach(r => {\r\n const item = document.createElement('gb-date-picker-list-item');\r\n item.setAttribute('label', r.label);\r\n item.dataset.range = r.key;\r\n\r\n item.addEventListener('mousedown', e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n this.clearPresetSelection(sidebar);\r\n (item as any).selected = true;\r\n\r\n this.applyPreset(r.key);\r\n this.picker.close(); //test this\r\n });\r\n\r\n sidebar.appendChild(item);\r\n\r\n if (r.key === 'today') {\r\n requestAnimationFrame(() => {\r\n this.selectSidebarItem(item);\r\n // this.applyPreset('today');\r\n });\r\n }\r\n });\r\n\r\n return sidebar;\r\n }\r\n\r\n selectSidebarItem(item: HTMLElement) {\r\n if (this.activeSidebarItem) {\r\n this.activeSidebarItem.removeAttribute('selected');\r\n }\r\n\r\n item.setAttribute('selected', 'true');\r\n this.activeSidebarItem = item;\r\n }\r\n\r\n applyPreset(key: string) {\r\n if (!this.picker) return;\r\n\r\n this.selectionSource = 'sidebar';\r\n\r\n const today = new Date();\r\n let start!: Date;\r\n let end!: Date;\r\n\r\n switch (key) {\r\n case 'today':\r\n start = end = new Date();\r\n this.displayValue = 'Today';\r\n break;\r\n\r\n case 'yesterday':\r\n start = end = new Date();\r\n start.setDate(start.getDate() - 1);\r\n this.displayValue = 'Yesterday';\r\n break;\r\n\r\n case 'this-week': {\r\n const d = new Date();\r\n start = new Date(d);\r\n start.setDate(d.getDate() - d.getDay());\r\n end = new Date();\r\n this.displayValue = 'This week';\r\n break;\r\n }\r\n\r\n case 'last-week': {\r\n const d = new Date();\r\n end = new Date(d);\r\n end.setDate(d.getDate() - d.getDay() - 1);\r\n start = new Date(end);\r\n start.setDate(end.getDate() - 6);\r\n this.displayValue = 'Last week';\r\n break;\r\n }\r\n\r\n case 'this-month':\r\n start = new Date(today.getFullYear(), today.getMonth(), 1);\r\n end = new Date();\r\n this.displayValue = 'This month';\r\n break;\r\n\r\n case 'last-month':\r\n start = new Date(today.getFullYear(), today.getMonth() - 1, 1);\r\n end = new Date(today.getFullYear(), today.getMonth(), 0);\r\n this.displayValue = 'Last month';\r\n break;\r\n\r\n case 'this-year':\r\n start = new Date(today.getFullYear(), 0, 1);\r\n end = new Date();\r\n this.displayValue = 'This year';\r\n break;\r\n\r\n case 'last-year':\r\n start = new Date(today.getFullYear() - 1, 0, 1);\r\n end = new Date(today.getFullYear() - 1, 11, 31);\r\n this.displayValue = 'Last year';\r\n break;\r\n }\r\n\r\n const value = this.mode === 'range' ? [start, end] : start;\r\n\r\n // Update picker WITHOUT triggering onChange\r\n this.picker.setDate(value, false);\r\n\r\n // Emit real data\r\n this.value = value;\r\n\r\n this.dateChange.emit(this.value);\r\n\r\n this.preventTimePickerClosing();\r\n }\r\n\r\n clearPresetSelection(sidebar: HTMLElement) {\r\n const items = sidebar.querySelectorAll('gb-date-picker-list-item');\r\n items.forEach(item => {\r\n (item as any).selected = false;\r\n });\r\n }\r\n\r\n injectApplyButton() {\r\n const calendarContainer = this.el.shadowRoot.querySelector('.calendar-container') as HTMLElement;\r\n const timeContainer = calendarContainer.querySelector('.flatpickr-time') as HTMLElement;\r\n\r\n if (!timeContainer) return;\r\n\r\n const buttonDiv = document.createElement('div');\r\n buttonDiv.classList.add('apply_button_wrapper');\r\n\r\n // Create custom button\r\n const applyBtn = document.createElement('gb-button');\r\n applyBtn.setAttribute('size', 'md');\r\n applyBtn.setAttribute('hierarchy', 'primary');\r\n applyBtn.setAttribute('icon', 'default');\r\n applyBtn.classList.add('apply-btn');\r\n\r\n // Add label inside\r\n applyBtn.innerHTML = `<p>OK</p>`;\r\n\r\n buttonDiv.insertAdjacentElement('afterend', applyBtn);\r\n buttonDiv.appendChild(applyBtn);\r\n\r\n // Click logic\r\n applyBtn.addEventListener('click', () => {\r\n const selected = this.picker.selectedDates;\r\n\r\n if (selected.length) {\r\n const formatted = selected[0];\r\n this.value = formatted;\r\n console.log(this.value);\r\n this.dateChange.emit(this.value);\r\n }\r\n\r\n this.picker.close();\r\n });\r\n\r\n // Insert after time div\r\n timeContainer.insertAdjacentElement('afterend', buttonDiv);\r\n }\r\n\r\n preventTimePickerClosing() {\r\n const calendarContainer = this.el.shadowRoot.querySelector('.calendar-container') as HTMLElement;\r\n const timeContainer = calendarContainer.querySelector('.flatpickr-am-pm') as HTMLElement;\r\n\r\n if ((this.mode === 'single' && this.enableTime) || (this.mode === 'range' && this.enableTime)) {\r\n calendarContainer.addEventListener('click', e => {\r\n e.stopPropagation();\r\n });\r\n }\r\n\r\n if (timeContainer) {\r\n timeContainer.addEventListener('click', e => {\r\n e.stopPropagation();\r\n });\r\n }\r\n }\r\n\r\n private toggleCalendar(event?: Event) {\r\n if (event) {\r\n const target = event.target as HTMLElement;\r\n if (this.el.shadowRoot && this.el.shadowRoot.contains(target)) {\r\n const calendarEl = this.el.shadowRoot.querySelector('.calendar-container');\r\n if (calendarEl && calendarEl.contains(target)) {\r\n return; // Ignore clicks inside the calendar\r\n }\r\n }\r\n }\r\n\r\n if (!this.picker) return;\r\n\r\n if (this.isCalendarShown) {\r\n this.picker.close();\r\n } else {\r\n this.picker.open();\r\n }\r\n }\r\n\r\n stripYearFormat(format: string): string {\r\n // Remove Y or ,Y or -Y or Y, or Y- and tidy separators\r\n // Handles tokens like \"M-j-Y\", \"F j, Y\", \"d/m/Y\", \"Y-m-d\", etc.\r\n let [datePart, timePart] = format.split(/\\s+(?=[HhKk])/);\r\n\r\n // Remove year tokens (Y or y) and any adjacent separator characters (, - / . space)\r\n datePart = datePart.replace(/(?:\\s*[-,/.]\\s*|\\s+)?[Yy](?:\\s*[-,/.]\\s*|\\s+)?/g, '');\r\n\r\n // Clean up doubled separators produced by removal (e.g. \"M--j\" -> \"M-j\")\r\n datePart = datePart.replace(/[-,/.]{2,}/g, '-');\r\n\r\n // Remove leading/trailing separators/spaces\r\n datePart = datePart.replace(/^[\\s-_,./]+|[\\s-_,./]+$/g, '');\r\n\r\n // Normalize multiple spaces\r\n datePart = datePart.replace(/\\s{2,}/g, ' ').trim();\r\n\r\n return timePart ? `${datePart} ${timePart}` : datePart;\r\n }\r\n\r\n render() {\r\n return (\r\n <div class={`date_picker_container`}>\r\n {this.label && (\r\n <>\r\n {this.formatLabel ? (\r\n <p class=\"date_picker_label text-sm-medium\">{this.label.charAt(0).toUpperCase() + this.label.slice(1).toLowerCase()}</p>\r\n ) : (\r\n <p class=\"date_picker_label text-sm-medium\">{this.label}</p>\r\n )}\r\n </>\r\n )}\r\n <div class={`date-picker-wrapper ${this.fullWidth ? 'full_width' : ''}`}>\r\n <div\r\n class={`inner_container ${this.iconPosition}`}\r\n onClick={() => {\r\n this.toggleCalendar();\r\n }}\r\n >\r\n {this.iconPosition === 'left' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z\"\r\n fill=\"var(--color-icon, #4B5565)\"\r\n />\r\n </svg>\r\n )}\r\n <input type=\"text\" ref={el => (this.inputEl = el as HTMLInputElement)} placeholder={this.placeholder} disabled={this.disabled} value={this.displayValue} readonly />\r\n <span ref={el => (this.mirrorEl = el as HTMLSpanElement)} id=\"mirror\">\r\n {this.displayValue || this.placeholder}\r\n </span>\r\n {this.iconPosition === 'right' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z\"\r\n fill=\"var(--color-icon, #4B5565)\"\r\n />\r\n </svg>\r\n )}\r\n </div>\r\n\r\n {/* Always in DOM, just hidden by CSS */}\r\n <div class={`calendar-container ${!this.isCalendarShown ? 'hidden' : ''} ${this.dropdownAlignment}`}></div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"gb-date-picker.js","sourceRoot":"","sources":["../../../src/components/gb-date-picker/gb-date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,kCAAkC,CAAC;AAS1C,MAAM,OAAO,YAAY;IALzB;QAOU,gBAAW,GAAW,uBAAuB,CAAC;QAC7B,UAAK,GAAyB,IAAI,CAAC;QACpD,WAAM,GAAW,QAAQ,CAAC;QAC1B,SAAI,GAAuB,QAAQ,CAAC;QACpC,aAAQ,GAAY,KAAK,CAAC;QAC1B,iBAAY,GAAyB,OAAO,CAAC;QAC7C,sBAAiB,GAAyB,MAAM,CAAC;QACjD,UAAK,GAAW,EAAE,CAAC;QACnB,gBAAW,GAAY,IAAI,CAAC;QAC5B,eAAU,GAAY,KAAK,CAAC;QAC5B,eAAU,GAAY,KAAK,CAAC;QAC5B,eAAU,GAAY,KAAK,CAAC;QAC5B,iBAAY,GAAY,KAAK,CAAC;QAC9B,eAAU,GAAW,CAAC,CAAC;QACvB,cAAS,GAAY,KAAK,CAAC;QAC1B,oBAAe,GAAY,KAAK,CAAC;QACjC,eAAU,GAAyB,SAAS,CAAC;QAC7C,UAAK,GAAW,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, State, Fragment, Watch } from '@stencil/core';\r\nimport flatpickr from 'flatpickr';\r\nimport 'flatpickr/dist/flatpickr.min.css';\r\nimport { CustomLocale } from 'flatpickr/dist/types/locale';\r\nimport { CloseButtonPositions } from '../../models/reusableModels';\r\n\r\n@Component({\r\n tag: 'gb-date-picker',\r\n styleUrl: 'gb-date-picker.css',\r\n shadow: true,\r\n})\r\nexport class GbDatePicker {\r\n @Element() el: HTMLElement;\r\n @Prop() placeholder: string = 'Start date - end date';\r\n @Prop({ mutable: true }) value: Date | Date[] | null = null;\r\n @Prop() format: string = 'M j, Y';\r\n @Prop() mode: 'single' | 'range' = 'single';\r\n @Prop() disabled: boolean = false;\r\n @Prop() iconPosition: CloseButtonPositions = 'right';\r\n @Prop() dropdownAlignment: CloseButtonPositions = 'left';\r\n @Prop() label: string = '';\r\n @Prop() formatLabel: boolean = true;\r\n @Prop() allowInput: boolean = false;\r\n @Prop() enableTime: boolean = false;\r\n @Prop() noCalendar: boolean = false;\r\n @Prop() twentyfourHr: boolean = false;\r\n @Prop() showMonths: number = 2;\r\n @Prop() fullWidth: boolean = false;\r\n @State() isCalendarShown: boolean = false;\r\n @State() breakpoint: 'mobile' | 'desktop' = 'desktop';\r\n @State() width: number = window.innerWidth;\r\n @State() displayValue: string;\r\n @State() selectionSource: 'sidebar' | 'calendar' | null = 'sidebar';\r\n @Event() dateChange: EventEmitter<Date | Date[]>;\r\n\r\n private inputEl!: HTMLInputElement;\r\n private picker: flatpickr.Instance;\r\n private activeSidebarItem?: HTMLElement;\r\n private hasAppliedDefaultPreset: boolean = false;\r\n private mirrorEl!: HTMLSpanElement;\r\n\r\n componentDidLoad() {\r\n // this.injectApplyButton();\r\n this.initializePicker();\r\n this.resizeInputFieldBasedOnTheValue();\r\n }\r\n\r\n componentWillLoad() {\r\n window.addEventListener('resize', this.handleResize);\r\n\r\n // ✅ Initialize displayValue before render to avoid state changes during componentDidLoad\r\n if (!this.displayValue) {\r\n this.displayValue = '';\r\n }\r\n }\r\n\r\n resizeInputFieldBasedOnTheValue() {\r\n if (!this.inputEl || !this.mirrorEl || this.fullWidth) return;\r\n\r\n const text = this.displayValue || this.inputEl.value || this.placeholder || '';\r\n\r\n this.mirrorEl.textContent = text;\r\n\r\n // padding + caret buffer\r\n const padding = 16;\r\n this.inputEl.style.width = `${this.mirrorEl.offsetWidth + padding}px`;\r\n }\r\n\r\n @Watch('displayValue')\r\n handleDisplayValueChange() {\r\n requestAnimationFrame(() => this.resizeInputFieldBasedOnTheValue());\r\n }\r\n\r\n private handleResize = () => {\r\n this.width = window.innerWidth;\r\n\r\n const newBreakpoint = this.width < 900 ? 'mobile' : 'desktop';\r\n\r\n if (newBreakpoint !== this.breakpoint) {\r\n this.breakpoint = newBreakpoint;\r\n\r\n if (this.picker) {\r\n this.picker.set('showMonths', this.getMonthCount());\r\n\r\n // Sidebar only makes sense for 2 months\r\n requestAnimationFrame(() => {\r\n this.maybeCreateSidebar(this.picker.calendarContainer);\r\n });\r\n }\r\n }\r\n };\r\n\r\n private getMonthCount(): number {\r\n return this.width < 900 ? 1 : this.showMonths;\r\n }\r\n\r\n disconnectedCallback() {\r\n if (this.picker) this.picker.destroy();\r\n }\r\n\r\n private initializePicker() {\r\n const calendarContainer = this.el.shadowRoot.querySelector('.calendar-container') as HTMLElement;\r\n const input = this.inputEl;\r\n\r\n const customLocale: Partial<CustomLocale> = {\r\n weekdays: {\r\n shorthand: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\r\n longhand: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\r\n },\r\n rangeSeparator: ' - ',\r\n };\r\n\r\n if (!calendarContainer || !input) {\r\n console.warn('Calendar container or input not found.');\r\n return;\r\n }\r\n\r\n const fixDaysWidth = () => {\r\n const days = this.el.shadowRoot?.querySelector('.flatpickr-days') as HTMLElement;\r\n if (days) {\r\n days.style.width = 'auto';\r\n }\r\n };\r\n\r\n this.picker = flatpickr(input, {\r\n dateFormat: this.format,\r\n mode: this.mode,\r\n showMonths: this.getMonthCount(),\r\n appendTo: calendarContainer, // keep inside shadow root\r\n clickOpens: false,\r\n allowInput: false,\r\n altInput: false,\r\n altFormat: this.format,\r\n closeOnSelect: !this.enableTime,\r\n locale: customLocale,\r\n disableMobile: true,\r\n enableTime: this.enableTime,\r\n noCalendar: this.noCalendar,\r\n time_24hr: this.twentyfourHr,\r\n prevArrow: `\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" class=\"calendar_arrow\">\r\n <path d=\"M12.5 4.99988C12.5 4.99988 7.50001 8.68232 7.5 9.99992C7.49999 11.3175 12.5 14.9999 12.5 14.9999\" stroke=\"var(--color-icon, #4B5565)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n</svg>\r\n `,\r\n nextArrow: ` \r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" class=\"calendar_arrow\">\r\n <path d=\"M7.50004 5C7.50004 5 12.5 8.68244 12.5 10C12.5 11.3176 7.5 15 7.5 15\" stroke=\"var(--color-icon, #4B5565)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n</svg>\r\n `,\r\n onChange: (selectedDates: Date[]) => {\r\n // if (this.selectionSource === 'sidebar') return;\r\n this.selectionSource = 'calendar';\r\n this.activeSidebarItem?.removeAttribute('selected');\r\n this.activeSidebarItem = undefined;\r\n\r\n if (this.mode === 'range' && selectedDates.length === 2) {\r\n const [start, end] = selectedDates;\r\n const newDisplayValue = `${this.picker.formatDate(start, this.format)} - ${this.picker.formatDate(end, this.format)}`;\r\n if (this.displayValue !== newDisplayValue) {\r\n this.displayValue = newDisplayValue;\r\n }\r\n this.value = [start, end];\r\n this.dateChange.emit([start, end]);\r\n }\r\n\r\n if (this.mode === 'single' && selectedDates.length > 0) {\r\n const newDisplayValue = this.picker.formatDate(selectedDates[0], this.format);\r\n if (this.displayValue !== newDisplayValue) {\r\n this.displayValue = newDisplayValue;\r\n }\r\n this.value = selectedDates[0];\r\n this.dateChange.emit(this.value);\r\n }\r\n\r\n fixDaysWidth();\r\n },\r\n onOpen: () => {\r\n this.isCalendarShown = true;\r\n fixDaysWidth();\r\n },\r\n onClose: () => {\r\n this.isCalendarShown = false;\r\n },\r\n onReady: (_, __, fp) => {\r\n this.picker = fp; // ✅ FIRST\r\n\r\n requestAnimationFrame(() => {\r\n this.injectSidebarLayout(fp);\r\n this.maybeCreateSidebar(fp.calendarContainer);\r\n\r\n if (!this.hasAppliedDefaultPreset && !this.value && this.showMonths > 1) {\r\n this.hasAppliedDefaultPreset = true;\r\n this.selectionSource = 'sidebar';\r\n this.applyDefaultTodayPreset();\r\n } else {\r\n this.selectionSource = 'sidebar';\r\n }\r\n });\r\n },\r\n });\r\n\r\n input.addEventListener('input', () => {\r\n const dateStr = input.value;\r\n const parsedDate = this.picker.parseDate(dateStr, this.format);\r\n\r\n if (parsedDate && this.value !== parsedDate) {\r\n this.value = parsedDate;\r\n this.dateChange.emit(this.value);\r\n }\r\n });\r\n }\r\n\r\n clearDateSelection() {\r\n if (this.picker) {\r\n this.picker.clear();\r\n }\r\n }\r\n\r\n private applyDefaultTodayPreset() {\r\n if (!this.picker) return;\r\n\r\n const today = new Date();\r\n\r\n // Set flatpickr value\r\n this.picker.setDate(today, false);\r\n\r\n // Only update if value is still null/empty\r\n if (!this.value) {\r\n this.value = today;\r\n this.dateChange.emit(today);\r\n }\r\n\r\n // UI state - only update if changed\r\n if (this.displayValue !== 'Today') {\r\n this.displayValue = 'Today';\r\n }\r\n }\r\n\r\n private maybeCreateSidebar(calendar: HTMLElement) {\r\n // Remove existing sidebar\r\n calendar.querySelector('.fp-sidebar')?.remove();\r\n\r\n // Sidebar ONLY when months > 1 AND desktop\r\n if (this.breakpoint === 'mobile' || this.picker.config.showMonths <= 1) {\r\n calendar.classList.remove('has-sidebar');\r\n return;\r\n }\r\n\r\n const sidebar = this.createSidebar();\r\n calendar.classList.add('has-sidebar');\r\n calendar.prepend(sidebar);\r\n }\r\n\r\n injectSidebarLayout(fp: flatpickr.Instance) {\r\n const calendar = fp.calendarContainer as HTMLElement;\r\n if (!calendar || calendar.querySelector('.fp-layout')) return;\r\n\r\n const months = calendar.querySelector('.flatpickr-months');\r\n const inner = calendar.querySelector('.flatpickr-innerContainer');\r\n const time = calendar.querySelector('.flatpickr-time');\r\n\r\n if (!months || !inner) return;\r\n\r\n const layout = document.createElement('div');\r\n layout.className = 'fp-layout';\r\n\r\n const main = document.createElement('div');\r\n main.className = 'fp-main';\r\n\r\n main.append(months, inner);\r\n if (time && this.enableTime) main.appendChild(time); // 🔥 preserve time picker\r\n\r\n layout.appendChild(main);\r\n\r\n calendar.appendChild(layout);\r\n\r\n this.injectApplyButton();\r\n }\r\n\r\n createSidebar(): HTMLElement {\r\n const sidebar = document.createElement('div');\r\n sidebar.className = 'fp-sidebar';\r\n\r\n const ranges = [\r\n { key: 'today', label: 'Today' },\r\n { key: 'yesterday', label: 'Yesterday' },\r\n { key: 'this-week', label: 'This week' },\r\n { key: 'last-week', label: 'Last week' },\r\n { key: 'this-month', label: 'This month' },\r\n { key: 'last-month', label: 'Last month' },\r\n { key: 'this-year', label: 'This year' },\r\n { key: 'last-year', label: 'Last year' },\r\n ];\r\n\r\n ranges.forEach(r => {\r\n const item = document.createElement('gb-date-picker-list-item');\r\n item.setAttribute('label', r.label);\r\n item.dataset.range = r.key;\r\n\r\n item.addEventListener('mousedown', e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n this.clearPresetSelection(sidebar);\r\n (item as any).selected = true;\r\n\r\n this.applyPreset(r.key);\r\n this.picker.close(); //test this\r\n });\r\n\r\n sidebar.appendChild(item);\r\n\r\n if (r.key === 'today') {\r\n requestAnimationFrame(() => {\r\n this.selectSidebarItem(item);\r\n // this.applyPreset('today');\r\n });\r\n }\r\n });\r\n\r\n return sidebar;\r\n }\r\n\r\n selectSidebarItem(item: HTMLElement) {\r\n if (this.activeSidebarItem) {\r\n this.activeSidebarItem.removeAttribute('selected');\r\n }\r\n\r\n item.setAttribute('selected', 'true');\r\n this.activeSidebarItem = item;\r\n }\r\n\r\n applyPreset(key: string) {\r\n if (!this.picker) return;\r\n\r\n this.selectionSource = 'sidebar';\r\n\r\n const today = new Date();\r\n let start!: Date;\r\n let end!: Date;\r\n\r\n switch (key) {\r\n case 'today':\r\n start = end = new Date();\r\n this.displayValue = 'Today';\r\n break;\r\n\r\n case 'yesterday':\r\n start = end = new Date();\r\n start.setDate(start.getDate() - 1);\r\n this.displayValue = 'Yesterday';\r\n break;\r\n\r\n case 'this-week': {\r\n const d = new Date();\r\n start = new Date(d);\r\n start.setDate(d.getDate() - d.getDay());\r\n end = new Date();\r\n this.displayValue = 'This week';\r\n break;\r\n }\r\n\r\n case 'last-week': {\r\n const d = new Date();\r\n end = new Date(d);\r\n end.setDate(d.getDate() - d.getDay() - 1);\r\n start = new Date(end);\r\n start.setDate(end.getDate() - 6);\r\n this.displayValue = 'Last week';\r\n break;\r\n }\r\n\r\n case 'this-month':\r\n start = new Date(today.getFullYear(), today.getMonth(), 1);\r\n end = new Date();\r\n this.displayValue = 'This month';\r\n break;\r\n\r\n case 'last-month':\r\n start = new Date(today.getFullYear(), today.getMonth() - 1, 1);\r\n end = new Date(today.getFullYear(), today.getMonth(), 0);\r\n this.displayValue = 'Last month';\r\n break;\r\n\r\n case 'this-year':\r\n start = new Date(today.getFullYear(), 0, 1);\r\n end = new Date();\r\n this.displayValue = 'This year';\r\n break;\r\n\r\n case 'last-year':\r\n start = new Date(today.getFullYear() - 1, 0, 1);\r\n end = new Date(today.getFullYear() - 1, 11, 31);\r\n this.displayValue = 'Last year';\r\n break;\r\n }\r\n\r\n const value = this.mode === 'range' ? [start, end] : start;\r\n\r\n // Update picker WITHOUT triggering onChange\r\n this.picker.setDate(value, false);\r\n\r\n // Emit real data\r\n this.value = value;\r\n\r\n this.dateChange.emit(this.value);\r\n\r\n this.preventTimePickerClosing();\r\n }\r\n\r\n clearPresetSelection(sidebar: HTMLElement) {\r\n const items = sidebar.querySelectorAll('gb-date-picker-list-item');\r\n items.forEach(item => {\r\n (item as any).selected = false;\r\n });\r\n }\r\n\r\n injectApplyButton() {\r\n const calendarContainer = this.el.shadowRoot.querySelector('.calendar-container') as HTMLElement;\r\n const timeContainer = calendarContainer.querySelector('.flatpickr-time') as HTMLElement;\r\n\r\n if (!timeContainer) return;\r\n\r\n const buttonDiv = document.createElement('div');\r\n buttonDiv.classList.add('apply_button_wrapper');\r\n\r\n // Create custom button\r\n const applyBtn = document.createElement('gb-button');\r\n applyBtn.setAttribute('size', 'md');\r\n applyBtn.setAttribute('hierarchy', 'primary');\r\n applyBtn.setAttribute('icon', 'default');\r\n applyBtn.classList.add('apply-btn');\r\n\r\n // Add label inside\r\n applyBtn.innerHTML = `<p>OK</p>`;\r\n\r\n buttonDiv.insertAdjacentElement('afterend', applyBtn);\r\n buttonDiv.appendChild(applyBtn);\r\n\r\n // Click logic\r\n applyBtn.addEventListener('click', () => {\r\n const selected = this.picker.selectedDates;\r\n\r\n if (selected.length) {\r\n const formatted = selected[0];\r\n this.value = formatted;\r\n // console.log(this.value);\r\n this.dateChange.emit(this.value);\r\n }\r\n\r\n this.picker.close();\r\n });\r\n\r\n // Insert after time div\r\n timeContainer.insertAdjacentElement('afterend', buttonDiv);\r\n }\r\n\r\n preventTimePickerClosing() {\r\n const calendarContainer = this.el.shadowRoot.querySelector('.calendar-container') as HTMLElement;\r\n const timeContainer = calendarContainer.querySelector('.flatpickr-am-pm') as HTMLElement;\r\n\r\n if ((this.mode === 'single' && this.enableTime) || (this.mode === 'range' && this.enableTime)) {\r\n calendarContainer.addEventListener('click', e => {\r\n e.stopPropagation();\r\n });\r\n }\r\n\r\n if (timeContainer) {\r\n timeContainer.addEventListener('click', e => {\r\n e.stopPropagation();\r\n });\r\n }\r\n }\r\n\r\n private toggleCalendar(event?: Event) {\r\n if (event) {\r\n const target = event.target as HTMLElement;\r\n if (this.el.shadowRoot && this.el.shadowRoot.contains(target)) {\r\n const calendarEl = this.el.shadowRoot.querySelector('.calendar-container');\r\n if (calendarEl && calendarEl.contains(target)) {\r\n return; // Ignore clicks inside the calendar\r\n }\r\n }\r\n }\r\n\r\n if (!this.picker) return;\r\n\r\n if (this.isCalendarShown) {\r\n this.picker.close();\r\n } else {\r\n this.picker.open();\r\n }\r\n }\r\n\r\n stripYearFormat(format: string): string {\r\n // Remove Y or ,Y or -Y or Y, or Y- and tidy separators\r\n // Handles tokens like \"M-j-Y\", \"F j, Y\", \"d/m/Y\", \"Y-m-d\", etc.\r\n let [datePart, timePart] = format.split(/\\s+(?=[HhKk])/);\r\n\r\n // Remove year tokens (Y or y) and any adjacent separator characters (, - / . space)\r\n datePart = datePart.replace(/(?:\\s*[-,/.]\\s*|\\s+)?[Yy](?:\\s*[-,/.]\\s*|\\s+)?/g, '');\r\n\r\n // Clean up doubled separators produced by removal (e.g. \"M--j\" -> \"M-j\")\r\n datePart = datePart.replace(/[-,/.]{2,}/g, '-');\r\n\r\n // Remove leading/trailing separators/spaces\r\n datePart = datePart.replace(/^[\\s-_,./]+|[\\s-_,./]+$/g, '');\r\n\r\n // Normalize multiple spaces\r\n datePart = datePart.replace(/\\s{2,}/g, ' ').trim();\r\n\r\n return timePart ? `${datePart} ${timePart}` : datePart;\r\n }\r\n\r\n render() {\r\n return (\r\n <div class={`date_picker_container`}>\r\n {this.label && (\r\n <>\r\n {this.formatLabel ? (\r\n <p class=\"date_picker_label text-sm-medium\">{this.label.charAt(0).toUpperCase() + this.label.slice(1).toLowerCase()}</p>\r\n ) : (\r\n <p class=\"date_picker_label text-sm-medium\">{this.label}</p>\r\n )}\r\n </>\r\n )}\r\n <div class={`date-picker-wrapper ${this.fullWidth ? 'full_width' : ''}`}>\r\n <div\r\n class={`inner_container ${this.iconPosition}`}\r\n onClick={() => {\r\n this.toggleCalendar();\r\n }}\r\n >\r\n {this.iconPosition === 'left' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z\"\r\n fill=\"var(--color-icon, #4B5565)\"\r\n />\r\n </svg>\r\n )}\r\n <input type=\"text\" ref={el => (this.inputEl = el as HTMLInputElement)} placeholder={this.placeholder} disabled={this.disabled} value={this.displayValue} readonly />\r\n <span ref={el => (this.mirrorEl = el as HTMLSpanElement)} id=\"mirror\">\r\n {this.displayValue || this.placeholder}\r\n </span>\r\n {this.iconPosition === 'right' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M9.16658 10.0833C8.75237 10.0833 8.41658 10.4191 8.41658 10.8333C8.41658 11.2475 8.75237 11.5833 9.16658 11.5833V10.8333V10.0833ZM13.3333 11.5833C13.7475 11.5833 14.0833 11.2475 14.0833 10.8333C14.0833 10.4191 13.7475 10.0833 13.3333 10.0833V10.8333V11.5833ZM6.66658 10.0833C6.25237 10.0833 5.91659 10.4191 5.91659 10.8333C5.91659 11.2475 6.25237 11.5833 6.66658 11.5833V10.8333V10.0833ZM6.67407 11.5833C7.08828 11.5833 7.42407 11.2475 7.42407 10.8333C7.42407 10.4191 7.08828 10.0833 6.67407 10.0833V10.8333V11.5833ZM10.8333 14.9166C11.2475 14.9166 11.5833 14.5808 11.5833 14.1666C11.5833 13.7524 11.2475 13.4166 10.8333 13.4166V14.1666V14.9166ZM6.66658 13.4166C6.25237 13.4166 5.91659 13.7524 5.91659 14.1666C5.91659 14.5808 6.25237 14.9166 6.66658 14.9166V14.1666V13.4166ZM13.3333 14.9166C13.7475 14.9166 14.0833 14.5808 14.0833 14.1666C14.0833 13.7524 13.7475 13.4166 13.3333 13.4166V14.1666V14.9166ZM13.3258 13.4166C12.9116 13.4166 12.5758 13.7524 12.5758 14.1666C12.5758 14.5808 12.9116 14.9166 13.3258 14.9166V14.1666V13.4166ZM15.7499 1.66663C15.7499 1.25241 15.4141 0.916626 14.9999 0.916626C14.5857 0.916626 14.2499 1.25241 14.2499 1.66663H14.9999H15.7499ZM14.2499 3.33329C14.2499 3.74751 14.5857 4.08329 14.9999 4.08329C15.4141 4.08329 15.7499 3.74751 15.7499 3.33329H14.9999H14.2499ZM5.74992 1.66663C5.74992 1.25241 5.41413 0.916626 4.99992 0.916626C4.58571 0.916626 4.24992 1.25241 4.24992 1.66663H4.99992H5.74992ZM4.24992 3.33329C4.24992 3.74751 4.58571 4.08329 4.99992 4.08329C5.41413 4.08329 5.74992 3.74751 5.74992 3.33329H4.99992H4.24992ZM2.49992 5.91663C2.08571 5.91663 1.74992 6.25241 1.74992 6.66663C1.74992 7.08084 2.08571 7.41663 2.49992 7.41663V6.66663V5.91663ZM17.4999 7.41663C17.9141 7.41663 18.2499 7.08084 18.2499 6.66663C18.2499 6.25241 17.9141 5.91663 17.4999 5.91663V6.66663V7.41663ZM9.16658 10.8333V11.5833H13.3333V10.8333V10.0833H9.16658V10.8333ZM6.66658 10.8333V11.5833H6.67407V10.8333V10.0833H6.66658V10.8333ZM10.8333 14.1666V13.4166H6.66658V14.1666V14.9166H10.8333V14.1666ZM13.3333 14.1666V13.4166H13.3258V14.1666V14.9166H13.3333V14.1666ZM14.9999 1.66663H14.2499V3.33329H14.9999H15.7499V1.66663H14.9999ZM4.99992 1.66663H4.24992V3.33329H4.99992H5.74992V1.66663H4.99992ZM9.20825 2.49996V3.24996H10.7916V2.49996V1.74996H9.20825V2.49996ZM17.9166 10.2027H17.1666V10.6306H17.9166H18.6666V10.2027H17.9166ZM10.7916 18.3333V17.5833H9.20825V18.3333V19.0833H10.7916V18.3333ZM2.08325 10.6306H2.83325V10.2027H2.08325H1.33325V10.6306H2.08325ZM9.20825 18.3333V17.5833C7.506 17.5833 6.31079 17.5814 5.4071 17.4501C4.53136 17.3228 4.03943 17.0875 3.67726 16.696L3.12668 17.2053L2.57611 17.7145C3.25737 18.451 4.12685 18.7798 5.19134 18.9345C6.22789 19.0851 7.55174 19.0833 9.20825 19.0833V18.3333ZM2.08325 10.6306H1.33325C1.33325 12.4265 1.33189 13.8433 1.46941 14.9491C1.60893 16.071 1.90254 16.9864 2.57611 17.7145L3.12668 17.2053L3.67726 16.696C3.30739 16.2961 3.07929 15.7397 2.95795 14.764C2.83462 13.7723 2.83325 12.4658 2.83325 10.6306H2.08325ZM17.9166 10.6306H17.1666C17.1666 12.4658 17.1652 13.7723 17.0419 14.764C16.9205 15.7397 16.6924 16.2961 16.3226 16.696L16.8732 17.2053L17.4237 17.7145C18.0973 16.9864 18.3909 16.071 18.5304 14.9491C18.668 13.8433 18.6666 12.4265 18.6666 10.6306H17.9166ZM10.7916 18.3333V19.0833C12.4481 19.0833 13.7719 19.0851 14.8085 18.9345C15.873 18.7798 16.7425 18.451 17.4237 17.7145L16.8732 17.2053L16.3226 16.696C15.9604 17.0875 15.4685 17.3228 14.5927 17.4501C13.689 17.5814 12.4938 17.5833 10.7916 17.5833V18.3333ZM10.7916 2.49996V3.24996C12.4938 3.24996 13.689 3.25182 14.5927 3.38316C15.4685 3.51045 15.9604 3.74573 16.3226 4.13728L16.8732 3.62799L17.4237 3.11871C16.7425 2.38222 15.873 2.05348 14.8085 1.89876C13.7719 1.7481 12.4481 1.74996 10.7916 1.74996V2.49996ZM17.9166 10.2027H18.6666C18.6666 8.40677 18.668 6.98999 18.5304 5.88412C18.3909 4.76229 18.0973 3.84689 17.4237 3.11871L16.8732 3.62799L16.3226 4.13728C16.6924 4.53713 16.9205 5.09352 17.0419 6.06924C17.1652 7.06093 17.1666 8.36747 17.1666 10.2027H17.9166ZM9.20825 2.49996V1.74996C7.55174 1.74996 6.22789 1.7481 5.19134 1.89876C4.12685 2.05348 3.25737 2.38222 2.57611 3.11871L3.12668 3.62799L3.67726 4.13728C4.03943 3.74573 4.53136 3.51045 5.4071 3.38316C6.31079 3.25182 7.506 3.24996 9.20825 3.24996V2.49996ZM2.08325 10.2027H2.83325C2.83325 8.36747 2.83462 7.06093 2.95795 6.06924C3.07929 5.09352 3.30739 4.53713 3.67726 4.13728L3.12668 3.62799L2.57611 3.11871C1.90254 3.84689 1.60893 4.76229 1.46941 5.88412C1.33189 6.98999 1.33325 8.40677 1.33325 10.2027H2.08325ZM2.49992 6.66663V7.41663H17.4999V6.66663V5.91663H2.49992V6.66663Z\"\r\n fill=\"var(--color-icon, #4B5565)\"\r\n />\r\n </svg>\r\n )}\r\n </div>\r\n\r\n {/* Always in DOM, just hidden by CSS */}\r\n <div class={`calendar-container ${!this.isCalendarShown ? 'hidden' : ''} ${this.dropdownAlignment}`}></div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|