1"use strict"; 2(self["webpackChunknhbLogin"] = self["webpackChunknhbLogin"] || []).push([[9799],{ 3 4/***/ 9799 5(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 6 7__webpack_require__.r(__webpack_exports__); 8/* harmony export */ __webpack_require__.d(__webpack_exports__, { 9/* harmony export */ month_select: () => (/* binding */ MonthSelect), 10/* harmony export */ san_month_header: () => (/* binding */ SanMonthHeader), 11/* harmony export */ week_header: () => (/* binding */ WeekHeader), 12/* harmony export */ week_picker: () => (/* binding */ WeekPicker), 13/* harmony export */ year_select: () => (/* binding */ YearSelect) 14/* harmony export */ }); 15/* harmony import */ var _runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8339); 16/* harmony import */ var _runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3029); 17/* harmony import */ var _runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2901); 18/* harmony import */ var _index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3434); 19 20 21 22 23var monthSelectCss = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin-block-start:0
23px;margin-block-end:0px;margin-inline-start:0px;margin-inline-end:0px;margin:0;padding:0;border:0;font-size:100%;font-family:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}::slotted(p){margin:0;padding:0}/*! \n* Main Utitilities\n* Copyright 2023 Santander \n* Copyright 2023 Santander. \n* Licensed under MIT (https://github.com/master/LICENSE) \n*/#month-table{width:100%;border-collapse:collapse !important;border-spacing:0px !important}#month-table td san-text{border:1px solid rgba(255, 255, 255, 0);border-radius:30px;padding:8px 15px;margin:3px}#month-table td san-text.default-month{border-radius:30px;padding:8px 15px;margin:3px}#month-table td san-text.current-month{border-radius:30px;border:1px solid var(--color-action-alternative-default)}#month-table td san-text.selected{background-color:var(--color-action-alternative-default)}#month-table td.month-header:hover{cursor:pointer;background-color:solid var(--color-action-alternative-default);color:white}"; 24var MonthSelectStyle0 = monthSelectCss; 25var MonthSelect = /*#__PURE__*/(function () { 26 var MonthSelect = /*#__PURE__*/function () { 27 function MonthSelect(hostRef) { 28 (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, MonthSelect); 29 (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.r)(this, hostRef); 30 this.monthSelected = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "monthSelected", 7); 31 this.selectedMonth = undefined; 32 this.dateRestrictionObj = undefined; 33 } 34 return (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(MonthSelect, [{ 35 key: "monthSelect", 36 value: function monthSelect(evt) { 37 this.monthSelected.emit(evt.target); 38 } 39 }, { 40 key: "render", 41 value: function render() { 42 var _this = this; 43 var monthList = []; 44 var date = new Date(); 45 for (var index = 0; index < 12; index++) { 46 date.setMonth(index); 47 var monthFormatted = date.toLocaleString('default', { 48 month: "long" 49 }); 50 monthList.push({ 51 value: index, 52 label: monthFormatted.substring(0, 1).toUpperCase() + monthFormatted.slice(1).toLowerCase() 53 }); 54 } 55 var currentMonth = new Date().getMonth(), 56 months = [], 57 rows = []; 58 monthList.forEach(function (element) { 59 var maxDate = new Date(_this.dateRestrictionObj.maximumDate), 60 minDate = new Date(_this.dateRestrictionObj.minimumDate); 61 var monthClass = '', 62 selected = false; 63 if (_this.selectedMonth && element.value == _this.selectedMonth) { 64 monthClass = ' selected'; 65 selected = true; 66 } 67 if (new Date(minDate).getMonth() > element.value || new Date(maxDate).getMonth() < element.value) { 68 months.push((0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("td", { 69 key: '8559d06241cc06f82473f2126ce6dd284da2c74e', 70 "class": "month-header" 71 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 72 key: '245fd51d50354fc327fca7016e241d791ec53cc7', 73 color: "disabled" 74 }, element.label))); 75 } else { 76 months.push((0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("td", { 77 key: 'bb7241a207e2db5da0ed5aa6bcc12735a250f885', 78 onClick: _this.monthSelect.bind(_this), 79 "class": "month-header" 80 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 81 key: '4c49b4970f2504273fd78c61003a76a583f07e0a', 82 "class": (element.value == currentMonth ? 'current-month' : 'default') + monthClass, 83 color: selected == true ? 'inverted' : 'default' 84 }, element.label))); 85 } 86 }); 87 rows.push((0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tr", { 88 key: '43e188143660615638e5fa14ea93ed4919aeef4a' 89 }, months.slice(0, 3)), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tr", { 90 key: 'ce6e0281cafca78ce864ba2777eb1d40ce78bb32' 91 }, months.slice(3, 6)), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tr", { 92 key: '2978b038ed4844088278e5f2748a32cf4f7e88be' 93 }, months.slice(6, 9)), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tr", { 94 key: '2d53af246d084d8d828dce0c9cda286ad77b8d83' 95 }, months.slice(9, 12))); 96 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("table", { 97 key: '8ea38de7d6bf3bfb5cf5dd3edbd84346343e5a2c', 98 id: 'month-table' 99 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tbody", { 100 key: 'da546d5cf68b35ed586898e4828501e8ab32f576' 101 }, rows)); 102 } 103 }]); 104 }(); 105 MonthSelect.style = MonthSelectStyle0; 106 return MonthSelect; 107})(); 108var sanMonthHeaderCss = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin-block-start:0
108px;margin-block-end:0px;margin-inline-start:0px;margin-inline-end:0px;margin:0;padding:0;border:0;font-size:100%;font-family:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}::slotted(p){margin:0;padding:0}/*! \n* Main Utitilities\n* Copyright 2023 Santander \n* Copyright 2023 Santander. \n* Licensed under MIT (https://github.com/master/LICENSE) \n*/san-month-header{display:flex;justify-content:space-between;align-items:center;color:#565a5c;text-align:center;padding-top:22px;padding-bottom:37px;caption-side:initial}san-month-header p{border:1px solid #c4c4c4;color:red;display:flex;justify-content:center;align-items:center;min-height:2.3em;min-width:2em}san-month-header p:hover{cursor:pointer}san-month-header h3{min-width:10em}san-month-header .hide{visibility:hidden}san-month-header .show{visibility:visible}san-month-header .month-header{display:flex;flex-flow:row nowrap;justify-content:space-between;width:100%}san-month-header .month-action{display:flex;padding-left:24px}"; 109var SanMonthHeaderStyle0 = sanMonthHeaderCss; 110var SanMonthHeader = /*#__PURE__*/(function () { 111 var SanMonthHeader = /*#__PURE__*/function () { 112 function SanMonthHeader(hostRef) { 113 (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, SanMonthHeader); 114 (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.r)(this, hostRef); 115 this.datePickerController = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "datePickerController", 7); 116 this.monthChanged = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "monthChanged", 7); 117 this.openMultiYearSelect = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "openMultiYearSelect", 7); 118 this.year = undefined; 119 this.month = undefined; 120 this.mobile = undefined; 121 this.secondMonthHeader = undefined; 122 this.showMultiYearView = false; 123 this.showMonthSelectView = false; 124 this.backButtonLabel = undefined; 125 } 126 return (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(SanMonthHeader, [{ 127 key: "datePickerEvent", 128 value: function datePickerEvent(datePickerAction) { 129 this.datePickerController.emit(datePickerAction); 130 } 131 }, { 132 key: "monthChangedHandler", 133 value: function monthChangedHandler(arrowDirection) { 134 this.monthChanged.emit(arrowDirection); 135 } 136 }, { 137 key: "openMultiYearSelectHandler", 138 value: function openMultiYearSelectHandler() { 139 if (this.showMultiYearView == false) { 140 this.openMultiYearSelect.emit(true); 141 } else { 142 this.openMultiYearSelect.emit(false); 143 this.showMonthSelectView = false; 144 } 145 } 146 }, { 147 key: "isFirstAllMonth", 148 value: function isFirstAllMonth() { 149 return this.month == 0 && this.year == 100; 150 } 151 }, { 152 key: "isLastAllMonth", 153 value: function isLastAllMonth() { 154 return this.month == 11 && this.year == 9999; 155 } 156 }, { 157 key: "render", 158 value: function render() { 159 var months = []; 160 var date = new Date(); 161 for (var index = 0; index < 12; index++) { 162 date.setMonth(index); 163 var monthFormatted = date.toLocaleString('default', { 164 month: "long" 165 }); 166 months.push({ 167 value: index, 168 label: monthFormatted.substring(0, 1).toUpperCase() + monthFormatted.slice(1).toLowerCase() 169 }); 170 } 171 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("div", { 172 key: 'b22187606e69a4e691f35c0ce8ad7ac8ba90853b', 173 "class": "month-header" 174 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-action-link", { 175 key: 'bf5e61a3b66574faf3d1d30f5817ed940ef59949' 176 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("span", { 177 key: '8cfc4f66d52489daf21199be7cd5bdd281f27f34', 178 onClick: this.datePickerEvent.bind(this, 'back'), 179 "class": this.showMonthSelectView == true && this.showMultiYearView == true ? 'show' : 'hide' 180 }, this.backButtonLabel), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-icon", { 181 key: '1e3cffbad6857e514600364cca8b14b9f817df47', 182 "class": this.showMonthSelectView == true && this.showMultiYearView == true || this.isFirstAllMonth() ? 'hide' : 'show', 183 slot: "icon-start", 184 iconcontent: "chefron-left", 185 size: "size-24",
186 onClick: this.monthChangedHandler.bind(this, 'minus') 187 })), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("div", { 188 key: 'd99a69ce902886e703ca71a365adab10f150d0f7', 189 "class": "month-action" 190 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 191 key: '53d3d8a028eed094289738235ecd3744eb9c0f41' 192 }, "".concat(months[this.month].label, " ").concat(this.year)), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-action-link", { 193 key: '084fdb5f2aedbc6a12dff5dd03c985b3621c8c62' 194 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-icon", { 195 key: 'd96553be227cfb19cbc5a47a73ec43970f73cb1b', 196 slot: "icon-start", 197 iconcontent: this.showMultiYearView == true ? 'chevron-up-small' : 'chevron-down-small', 198 size: "size-24", 199 onClick: this.openMultiYearSelectHandler.bind(this) 200 }))), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-action-link", { 201 key: '09424b1fb2fd5f36bcea925f04fcc37166c74882' 202 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-icon", { 203 key: '0d68bd3045cd6fca1313c208ed840e3a98e4fbbc', 204 "class": this.showMonthSelectView == true && this.showMultiYearView == true || this.isLastAllMonth() ? 'hide' : 'show', 205 slot: "icon-start", 206 iconcontent: "chevron-right", 207 size: "size-24", 208 onClick: this.monthChangedHandler.bind(this, 'plus') 209 }), (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-icon", { 210 key: '5df4ce77ba2476febb2e1d201b225f39269319a4', 211 "class": this.showMonthSelectView == true && this.showMultiYearView == true ? 'show' : 'hide', 212 slot: "icon-start", 213 iconcontent: "close", 214 size: "size-24", 215 color: 'color-icon-default', 216 onClick: this.datePickerEvent.bind(this, 'close') 217 }))); 218 } 219 }]); 220 }(); 221 SanMonthHeader.style = SanMonthHeaderStyle0; 222 return SanMonthHeader; 223})(); 224var weekHeaderCss = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin-block-start:0
224px;margin-block-end:0px;margin-inline-start:0px;margin-inline-end:0px;margin:0;padding:0;border:0;font-size:100%;font-family:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}::slotted(p){margin:0;padding:0}/*! \n* Main Utitilities\n* Copyright 2023 Santander \n* Copyright 2023 Santander. \n* Licensed under MIT (https://github.com/master/LICENSE) \n*/:root{--columns:7}#my-table{width:100%;border-collapse:collapse !important;border-spacing:0px !important}#my-table tr{grid-template-columns:repeat(var(--columns), 1fr)}#my-table td.multi-selected{background-color:var(--color-background-alternative)}#my-table td.multi-selected-start{background-color:var(--color-background-alternative);border-radius:100% 0 0 100%}#my-table td.multi-selected-end{background-color:var(--color-background-alternative);border-radius:0 100% 100% 0}#my-table td.nearby-dates{background-color:var(--color-action-alternative-default)}#my-table td san-text{border:1px solid rgba(255, 255, 255, 0);border-radius:100%;padding:8px 10px;margin:3px}#my-table td san-text.today{border-radius:100%;border:1px solid var(--color-action-alternative-default)}#my-table td san-text.selected{background-color:var(--color-action-alternative-default)}#my-table td.week-header:hover{cursor:pointer}#my-table td.week-header.after-date{background-color:var(--color-background-alternative)}@media only screen and (width <= 767px){#my-table td{width:70px}}.disabled{color:var(--color-text-disabled)}.empty{color:#bbbbbb;visibility:hidden}.empty.last-month{color:#f3f0f0}.empty.next-month{color:#f3f0f0}.empty:hover{cursor:not-allowed}"; 225var WeekHeaderStyle0 = weekHeaderCss; 226var WeekHeader = /*#__PURE__*/(function () { 227 var WeekHeader = /*#__PURE__*/function () { 228 function WeekHeader(hostRef) { 229 (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, WeekHeader); 230 (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.r)(this, hostRef); 231 this.singleDateSelected = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "singleDateSelected", 7); 232 this.multiDateSelected = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "multiDateSelected", 7); 233 this.multiDateHover = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "multiDateHover", 7); 234 this.sanMouseOut = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "sanMouseOut", 7); 235 this.date = undefined; 236 this.datesObj = undefined; 237 this.day = undefined; 238 this.daysInMonth = undefined; 239 this.lastDay = undefined; 240 this.lastDayOfMonth = undefined; 241 this.month = undefined; 242 this.multiDate = undefined; 243 this.dateRestrictionObj = undefined; 244 this.offset = undefined; 245 this.selectedDate = undefined; 246 this.year = undefined; 247 this.todaysDate = undefined; 248 this.weekDays = [0, 1, 2, 3, 4, 5, 6]; 249 this.workDaysOnly = undefined; 250 } 251 // Emit event when a single date is selected 252 return (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(WeekHeader, [{ 253 key: "singleDateSelectedHandler", 254 value: function singleDateSelectedHandler(evt) { 255 this.singleDateSelected.emit(evt.target); 256 } 257 // Emit event when multiple dates are selected 258 }, { 259 key: "multiDateSelectedHandler", 260 value: function multiDateSelectedHandler(evt) { 261 this.multiDateSelected.emit(evt.target); 262 } 263 // Emit event when mouse hovers over multiple dates 264 }, { 265 key: "multiDateHoverHandler", 266 value: function multiDateHoverHandler(evt) { 267 this.multiDateHover.emit(evt.target); 268 } 269 // Emit event when mouse leaves an element 270 }, {
271 key: "mouseOutHandler", 272 value: function mouseOutHandler(evt) { 273 this.sanMouseOut.emit(evt.target); 274 } 275 // Generate a matrix of rows for the calendar 276 }, { 277 key: "generateRowsMatrix", 278 value: function generateRowsMatrix() { 279 var rows = []; 280 var missingDays = []; 281 var columnOrder = this.workDaysOnly ? this.weekDays.filter(function (day) { 282 return day !== 0 && day !== 6; 283 }) : this.weekDays; 284 this.weekDays = columnOrder; 285 if (!columnOrder) { 286 throw new Error('weekDays or workDaysOnly is not defined'); 287 } 288 for (var i = 0; i < 7; i++) { 289 if (!columnOrder.includes(i)) { 290 for (var d = 1; d <= this.daysInMonth; d++) { 291 var date = new Date(this.year, this.month, d); 292 if (date.getDay() === i) { 293 missingDays.push(d); 294 } 295 } 296 } 297 } 298 var validDays = []; 299 for (var _d = 1; _d <= this.daysInMonth; _d++) { 300 if (!missingDays.includes(_d)) { 301 validDays.push(_d); 302 } 303 } 304 var firstValidDay = validDays[0]; 305 var firstValidDate = new Date(this.year, this.month, firstValidDay); 306 var firstValidDayOfWeek = firstValidDate.getDay(); 307 var positionInIndex = columnOrder.indexOf(firstValidDayOfWeek); 308 var validDayIndex = 0; 309 for (var week = 0; week < 6; week++) { 310 var weekRow = []; 311 for (var _i = 0; _i < columnOrder.length; _i++) { 312 if (week === 0 && _i < positionInIndex) { 313 weekRow.push(this.renderEmptyCell('last-month')); 314 } else if (validDayIndex >= validDays.length) { 315 weekRow.push(this.renderEmptyCell('next-month')); 316 } else { 317 var day = validDays[validDayIndex]; 318 validDayIndex++; 319 weekRow.push(this.renderDayCell(day)); 320 } 321 } 322 rows.push(weekRow); 323 } 324 return rows; 325 } 326 // Render an empty cell with a specific class name 327 }, { 328 key: "renderEmptyCell", 329 value: function renderEmptyCell(className) { 330 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("td", { 331 "class": "empty ".concat(className) 332 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", null)); 333 } 334 // Render a cell for a specific day 335 }, { 336 key: "renderDayCell", 337 value: function renderDayCell(day) { 338 var className = 'week-header'; 339 var selected = false; 340 var currentDate = new Date(this.year, this.month, day); 341 var maxDate = new Date(this.dateRestrictionObj.maximumDate); 342 var minDate = new Date(this.dateRestrictionObj.minimumDate); 343 var todaysDate = currentDate.getTime() === new Date(this.todaysDate).getTime(); 344 if (minDate.getTime() > currentDate.getTime() || maxDate.getTime() < currentDate.getTime()) { 345 return this.renderDisabledCell(); 346 } 347 if (this.datesObj.firstDate && this.datesObj.secondDate) { 348 selected = this.handleMultiDateSelection(currentDate); 349 } else if (this.datesObj.firstDate && this.datesObj.hoveredDate) { 350 selected = this.handleHoverDateSelection(currentDate); 351 } else { 352 selected = this.handleSingleDateSelection(currentDate); 353 } 354 if (selected) { 355 todaysDate = false; 356 } 357 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("td", { 358 "class": className, 359 onClick: this.multiDate ? this.multiDateSelectedHandler.bind(this) : this.singleDateSelectedHandler.bind(this), 360 onMouseOver: this.multiDate && this.datesObj.firstDate && this.multiDateHoverHandler.bind(this), 361 onMouseOut: this.mouseOutHandler.bind(this) 362 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 363 "class": todaysDate ? 'today' : selected ? 'selected' : '', 364 color: selected ? 'inverted' : 'default' 365 }, day)); 366 } 367 // Render a disabled cell 368 }, {
369 key: "renderDisabledCell", 370 value: function renderDisabledCell() { 371 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("td", { 372 "class": 'disabled' 373 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 374 color: 'disabled' 375 })); 376 } 377 // Handle selection of multiple dates 378 }, { 379 key: "handleMultiDateSelection", 380 value: function handleMultiDateSelection(currentDate) { 381 var className = 'week-header'; 382 var selected = false; 383 if (currentDate.getTime() >= new Date(this.datesObj.firstDate).getTime() && currentDate.getTime() <= new Date(this.datesObj.secondDate).getTime()) { 384 if (!this.multiDate) { 385 selected = true; 386 return selected; 387 } 388 if (currentDate.getTime() !== new Date(this.datesObj.firstDate).getTime() && currentDate.getTime() !== new Date(this.datesObj.secondDate).getTime()) { 389 className += ' multi-selected '; 390 } else { 391 className += currentDate.getTime() === new Date(this.datesObj.firstDate).getTime() ? ' multi-selected-start ' : ' multi-selected-end '; 392 selected = true; 393 } 394 } else { 395 selected = false; 396 } 397 return selected; 398 } 399 // Handle selection of a date when hovering over multiple dates 400 }, { 401 key: "handleHoverDateSelection", 402 value: function handleHoverDateSelection(currentDate) { 403 var className = 'week-header'; 404 var selected = false; 405 var selectedDay = new Date(this.datesObj.firstDate).getDate(); 406 var selectedMonth = new Date(this.datesObj.firstDate).getMonth(); 407 var selectedYear = new Date(this.datesObj.firstDate).getFullYear(); 408 selected = selectedDay === currentDate.getDate() && selectedMonth === this.month && selectedYear === this.year; 409 className += currentDate.getTime() === new Date(this.datesObj.firstDate).getTime() ? ' multi-selected-start ' : ''; 410 if (currentDate.getTime() <= new Date(this.datesObj.firstDate).getTime()) { 411 className += ' before-date '; 412 } else if (new Date(this.datesObj.hoveredDate).setDate(new Date(this.datesObj.hoveredDate).getDate() + 1) > currentDate.getTime() && currentDate.getTime() > new Date(this.datesObj.firstDate).getTime()) { 413 className += ' after-date '; 414 } 415 return selected; 416 } 417 // Handle selection of a single date 418 }, { 419 key: "handleSingleDateSelection", 420 value: function handleSingleDateSelection(currentDate) { 421 var selectedDate = new Date(this.selectedDate || this.datesObj.firstDate); 422 return selectedDate.getDate() === currentDate.getDate() && selectedDate.getMonth() === this.month && selectedDate.getFullYear() === this.year; 423 } 424 }, { 425 key: "componentDidLoad", 426 value: function componentDidLoad() { 427 var root = this.el || document.documentElement; 428 root.style.setProperty('--columns', "".concat(this.weekDays.length)); 429 } 430 // Render the component 431 }, { 432 key: "render", 433 value: function render() { 434 var rowsMatrix = this.generateRowsMatrix(); 435 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("table", { 436 key: '56e933d5f105db45e2e8e8a4b089a970a6e49761', 437 id: 'my-table' 438 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tbody", { 439 key: '26717461f1903fa649be6280ff945bdc50b34761', 440 "class": 'week-header-container' 441 }, rowsMatrix.map(function (row, index) { 442 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tr", { 443 key: index 444 }, row); 445 }))); 446 } 447 }, { 448 key: "el", 449 get: function get() { 450 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.g)(this); 451 } 452 }]); 453 }(); 454 WeekHeader.style = WeekHeaderStyle0; 455 return WeekHeader; 456})(); 457var weekPickerCss = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin-block-start:0
457px;margin-block-end:0px;margin-inline-start:0px;margin-inline-end:0px;margin:0;padding:0;border:0;font-size:100%;font-family:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}::slotted(p){margin:0;padding:0}/*! \n* Main Utitilities\n* Copyright 2023 Santander \n* Copyright 2023 Santander. \n* Licensed under MIT (https://github.com/master/LICENSE) \n*/:root{--columns:7}week-picker .datepicker-week-container{padding-bottom:10px;display:grid;grid-template-columns:repeat(var(--columns), 1fr)}"; 458var WeekPickerStyle0 = weekPickerCss; 459var WeekPicker = /*#__PURE__*/(function () { 460 var WeekPicker = /*#__PURE__*/function () { 461 function WeekPicker(hostRef) { 462 (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, WeekPicker); 463 (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.r)(this, hostRef); 464 this.mobile = undefined; 465 this.weekDays = [0, 1, 2, 3, 4, 5, 6]; 466 this.workDaysOnly = undefined; 467 } 468 return (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(WeekPicker, [{ 469 key: "componentDidLoad", 470 value: function componentDidLoad() { 471 var root = this.el || document.documentElement; 472 root.style.setProperty('--columns', "".concat(this.weekDays.length)); 473 } 474 }, { 475 key: "render", 476 value: function render() { 477 var date = new Date('1998/07/05'); 478 var weeks = []; 479 for (var index = 0; index < 7; index++) { 480 var weekFormat = date.toLocaleString('default', { 481 weekday: "long" 482 }); 483 weeks.push((0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("div", { 484 "class": "datepicker-week-header", 485 key: index 486 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 487 key: '16dfaa3705aedb9d12f0ec9812f6f773259664a6', 488 color: "soft" 489 }, weekFormat.substring(0, 1).toUpperCase()))); 490 date.setDate(date.getDate() + 1); 491 } 492 // Ajustar weekDays se workWeek for true 493 var adjustedWeekDays = this.workDaysOnly ? this.weekDays.filter(function (day) { 494 return day !== 0 && day !== 6; 495 }) : this.weekDays; 496 this.weekDays = adjustedWeekDays; 497 // Reordenar as semanas de acordo com adjustedWeekDays 498 var orderweek = adjustedWeekDays.map(function (day) { 499 return weeks[day]; 500 }); 501 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("div", { 502 key: '37dcaa56c04787a05e440aed8139861f3c90ff79', 503 "class": "datepicker-week-container" 504 }, orderweek); 505 } 506 }, { 507 key: "el", 508 get: function get() { 509 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.g)(this); 510 } 511 }]); 512 }(); 513 WeekPicker.style = WeekPickerStyle0; 514 return WeekPicker; 515})(); 516var yearSelectCss = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin-block-start:0
516px;margin-block-end:0px;margin-inline-start:0px;margin-inline-end:0px;margin:0;padding:0;border:0;font-size:100%;font-family:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}::slotted(p){margin:0;padding:0}/*! \n* Main Utitilities\n* Copyright 2023 Santander \n* Copyright 2023 Santander. \n* Licensed under MIT (https://github.com/master/LICENSE) \n*/#year-table{width:100%;height:300px;border-collapse:collapse !important;border-spacing:0px !important}#year-table td san-text{border:1px solid rgba(255, 255, 255, 0);border-radius:30px;padding:8px 15px;margin:3px}#year-table td san-text.default-year{border-radius:30px;padding:8px 15px;margin:3px}#year-table td san-text.current-year{border-radius:30px;border:1px solid var(--color-action-alternative-default)}#year-table td san-text.selected{background-color:var(--color-action-alternative-default)}#year-table td.year-header:hover{cursor:pointer;background-color:solid var(--color-action-alternative-default);color:white}"; 517var YearSelectStyle0 = yearSelectCss; 518var yearIncrease = 28; 519var firstYear = 100; 520var lastYear = 9999; 521var currentYear = new Date().getFullYear(); 522var YearSelect = /*#__PURE__*/(function () { 523 var YearSelect = /*#__PURE__*/function () { 524 function YearSelect(hostRef) { 525 (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, YearSelect); 526 (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.r)(this, hostRef); 527 this.yearSelected = (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.c)(this, "yearSelected", 7); 528 this.years = new Set([]); 529 this.throttleTimer = false; 530 this.goToCurrentOrSelectedYear = true; 531 this.selectedYear = undefined; 532 this.dateRestrictionObj = undefined; 533 this.rows = []; 534 } 535 return (0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(YearSelect, [{ 536 key: "yearSelect", 537 value: function yearSelect(evt) { 538 this.yearSelected.emit(evt.target); 539 this.goToCurrentOrSelectedYear = true; 540 } 541 }, { 542 key: "yearSelectedController", 543 value: function yearSelectedController(event) { 544 this.selectedYear = parseInt(event.detail.innerHTML); 545 } 546 }, { 547 key: "handleInfiniteScroll", 548 value: function handleInfiniteScroll(_) { 549 var _this2 = this; 550 if (this.years.size >= lastYear - firstYear) { 551 return; 552 } 553 this.throttle(function () { 554 var shouldLoadMore = _this2.el.scrollTop + _this2.el.clientHeight >= _this2.el.scrollHeight * 0.9; 555 if (shouldLoadMore) { 556 var years = Array.from(_this2.years.values()); 557 var startRange = years[years.length - 1]; 558 var endRange = startRange + yearIncrease < 9999 ? startRange + yearIncrease : 9999; 559 _this2.goToCurrentOrSelectedYear = false; 560 _this2.addYears(startRange, endRange); 561 } 562 }, 500); 563 } 564 }, { 565 key: "throttle", 566 value: function throttle(callback, time) { 567 var _this3 = this; 568 if (this.throttleTimer) return; 569 this.throttleTimer = true; 570 setTimeout(function () { 571 { 572 callback(); 573 _this3.throttleTimer = false; 574 } 575 }, time); 576 } 577 }, { 578 key: "componentWillLoad", 579 value: function componentWillLoad() { 580 this.addInitialYears(); 581 } 582 }, { 583 key: "addInitialYears", 584 value: function addInitialYears() { 585 var startRange = firstYear; 586 var currentPage = this.selectedYear ? Math.floor(this.selectedYear / yearIncrease) : Math.floor(currentYear / yearIncrease); 587 var endRange = currentPage * yearIncrease + yearIncrease; 588 this.addYears(startRange, endRange); 589 } 590 }, {
591 key: "addYears", 592 value: function addYears(startRange, endRange) { 593 var maxDate = new Date(this.dateRestrictionObj.maximumDate), 594 minDate = new Date(this.dateRestrictionObj.minimumDate), 595 years = []; 596 for (var i = startRange; i <= endRange; i++) { 597 if (new Date(minDate).getFullYear() > i || new Date(maxDate).getFullYear() < i) { 598 years.push((0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("td", { 599 "class": "year-header" 600 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 601 color: "disabled" 602 }, i))); 603 } else { 604 years.push((0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("td", { 605 onClick: this.yearSelect.bind(this), 606 "class": "year-header" 607 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("san-text", { 608 id: i == currentYear ? "current-year" : i, 609 "class": i == currentYear ? 'current-year' : 'default' 610 }, i))); 611 } 612 this.years.add(i); 613 if ((i - startRange) % 4 == 0) { 614 this.rows = [].concat((0,_runnertmp_work_san_hobapa_loginui_san_hobapa_loginui_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this.rows), [(0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tr", null, years.slice(i - startRange - 4, i - startRange))]); 615 } 616 } 617 } 618 }, { 619 key: "render", 620 value: function render() { 621 var _a; 622 if (this.selectedYear) { 623 for (var i = 0; i < this.rows.length; i++) { 624 if (!this.rows[i]['$children$']) { 625 continue; 626 } 627 for (var j = 0; j < 4; j++) { 628 if (!this.rows[i]['$children$'][j]['$children$'][0]['$elm$']) { 629 continue; 630 } 631 if (this.rows[i]['$children$'][j]['$children$'][0]['$elm$'].id == this.selectedYear) { 632 this.rows[i]['$children$'][j]['$children$'][0]['$elm$'].classList.add('selected'); 633 this.rows[i]['$children$'][j]['$children$'][0]['$elm$'].shadowRoot.querySelector('div').classList.add('c-text-color--inverted'); 634 } else if (this.rows[i]['$children$'][j]['$children$'][0]['$elm$'].classList.contains('selected')) { 635 this.rows[i]['$children$'][j]['$children$'][0]['$elm$'].classList.remove('selected'); 636 this.rows[i]['$children$'][j]['$children$'][0]['$elm$'].shadowRoot.querySelector('div').classList.remove('c-text-color--inverted'); 637 } 638 } 639 } 640 } 641 if (this.goToCurrentOrSelectedYear) { 642 var showItem = this.selectedYear ? '#selected-year' : '#current-year'; 643 (_a = this.el.querySelector(showItem)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ 644 block: 'center' 645 }); 646 } 647 this.goToCurrentOrSelectedYear = true; 648 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("table", { 649 key: 'b6dd3e427ceb0a188cb726c68db1ad59992ae866', 650 id: "year-table" 651 }, (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.h)("tbody", { 652 key: 'b6f0af18227b486c2404425b5d075d4aab06183e' 653 }, this.rows)); 654 } 655 }, { 656 key: "el", 657 get: function get() { 658 return (0,_index_74790bf6_js__WEBPACK_IMPORTED_MODULE_3__.g)(this); 659 } 660 }]); 661 }(); 662 YearSelect.style = YearSelectStyle0; 663 return YearSelect; 664})(); 665 666 667//# sourceMappingURL=month-select_5.entry.js.map 668 669/***/ } 670 671}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.