@aquera/nile-elements 0.0.76 → 0.0.77

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/README.md CHANGED
@@ -79,6 +79,10 @@ To run a local development server that serves the basic demo located in `demo/in
79
79
 
80
80
  In this section, you can find the updates for each release of `nile-elements`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
81
81
 
82
+ #### Version 0.0.77
83
+ - Nile calendar - Fixed: Hide Input on Allowed Dates
84
+ - dependency: @aquera/nile@0.3.25
85
+
82
86
  #### Version 0.0.76
83
87
  - Nile drawer - fixed cross icon hover issue
84
88
  - dependency: @aquera/nile@0.3.25
@@ -5502,7 +5502,7 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
5502
5502
  ${this.range&&"absolute"===this.type?EM`
5503
5503
  <div class="calender-input">
5504
5504
  <div>
5505
- <span class="manual-input-label">From </span>
5505
+ <span class="manual-input-label ${this.hideInput&&this.hideTimeInput?"hidden":""}">From </span>
5506
5506
  <div class="from">
5507
5507
  ${this.hideInput?EM``:EM`<nile-input class="manual-input" value="${this.formatDate(this.startDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleStartDateInput}">
5508
5508
  </nile-input>`}
@@ -5512,7 +5512,7 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
5512
5512
  </div>
5513
5513
 
5514
5514
  <div>
5515
- <span class="manual-input-label">To </span>
5515
+ <span class="manual-input-label ${this.hideInput&&this.hideTimeInput?"hidden":""}">To </span>
5516
5516
  <div class="from">
5517
5517
  ${this.hideInput?EM``:EM`<nile-input class="manual-input" value="${this.formatDate(this.endDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleEndDateInput}"></nile-input>`}
5518
5518
 
@@ -6380,8 +6380,8 @@ const rN=Symbol.for(""),xN=M=>{if((null==M?void 0:M.r)===rN)return null==M?void
6380
6380
  }
6381
6381
 
6382
6382
  .tab-group--top .tab-group__indicator {
6383
- bottom: calc(-1 * var(--track-width));
6384
- border-bottom: 2px solid var(--nile-colors-brand-600);
6383
+ bottom: 2px;
6384
+ border-bottom: 2px solid var(--nile-colors-primary-600);
6385
6385
  }
6386
6386
 
6387
6387
  .tab-group--top .tab-group__body {
@@ -1,2 +1,2 @@
1
- System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-calendar.css.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-217fe924.cjs.js","lit","lit/directives/class-map.js","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,a,h,l,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,r;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){e=_litDecoratorsJs.query;s=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){a=_nileCalendarCssCjsJs.s;},function(_internalWatchCjsJs){h=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){d=_property002CjsJs.n;},function(_lit){},function(_litDirectivesClassMapJs){},function(_nilePopupNilePopupCssCjsJs){}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_l){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.dropDownOpened=!1,_this.allowedDates={},_this.valueAttribute=null,_this.formattedDate=null,_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.range=!1,_this.type="absolute",_this.selectedTimeZone="local",_this.validAllowedDates=!0,_this.hideInput=!1,_this.hideTimeInput=!1,_this.hideDurationFields=[],_this.hideTimeZone=!1;return _this;}_inherits(r,_l);return _createClass(r,[{key:"firstUpdated",value:function firstUpdated(){var t=this.getAttribute("allowed-dates");if(null!==t)try{this.allowedDates=JSON.parse(t);}catch(t){console.error("Error parsing allowed-dates attribute:",t);}else this.validAllowedDates=!1;}},{key:"checkValidAllowedDate",value:function checkValidAllowedDate(){var _this$allowedDates,_this$allowedDates2,_this$allowedDates3,_this$allowedDates4,_this$allowedDates5,_this$allowedDates6;if(0==Object.keys(this.allowedDates).length)return void(this.validAllowedDates=!1);this.hideInput=!0;new Date(Date.UTC((_this$allowedDates=this.allowedDates)===null||_this$allowedDates===void 0||(_this$allowedDates=_this$allowedDates.startDate)===null||_this$allowedDates===void 0?void 0:_this$allowedDates.slice(0,4),((_this$allowedDates2=this.allowedDates)===null||_this$allowedDates2===void 0||(_this$allowedDates2=_this$allowedDates2.startDate)===null||_this$allowedDates2===void 0?void 0:_this$allowedDates2.slice(5,7))-1,(_this$allowedDates3=this.allowedDates)===null||_this$allowedDates3===void 0||(_this$allowedDates3=_this$allowedDates3.startDate)===null||_this$allowedDates3===void 0?void 0:_this$allowedDates3.slice(8,10)))>new Date(Date.UTC((_this$allowedDates4=this.allowedDates)===null||_this$allowedDates4===void 0||(_this$allowedDates4=_this$allowedDates4.endDate)===null||_this$allowedDates4===void 0?void 0:_this$allowedDates4.slice(0,4),((_this$allowedDates5=this.allowedDates)===null||_this$allowedDates5===void 0||(_this$allowedDates5=_this$allowedDates5.endDate)===null||_this$allowedDates5===void 0?void 0:_this$allowedDates5.slice(5,7))-1,(_this$allowedDates6=this.allowedDates)===null||_this$allowedDates6===void 0||(_this$allowedDates6=_this$allowedDates6.endDate)===null||_this$allowedDates6===void 0?void 0:_this$allowedDates6.slice(8,10)))?(console.error("StartDate must be greater than endDate"),this.validAllowedDates=!1):this.validAllowedDates=!0;}},{key:"valueChanged",value:function valueChanged(){if("object"==_typeof(this.value)&&null!==this.value&&(this.value=JSON.stringify(this.value)),this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){var _t=this.value.getTimezoneOffset(),_i=new Date(this.value.getTime()-60*_t*1e3);isNaN(_i.getTime())||(this.valueAttribute=_i.toISOString().split("T")[0],this.formattedDate="".concat(String(_i.getDate()).padStart(2,"0"),"/").concat(String(_i.getMonth()+1).padStart(2,"0"),"/").concat(_i.getFullYear()));}}},{key:"updated",value:function updated(t){if(_get(_getPrototypeOf(r.prototype),"updated",this).call(this,t),t.has("valueAttribute")){var _t2=new Date(this.valueAttribute||"");if(!isNaN(_t2.getTime())){var _i2=_t2.getTimezoneOffset();this.value=new Date(_t2.getTime()-60*_i2*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}}}},{key:"attributeChangedCallback",value:function attributeChangedCallback(t,i,e){"value"===t?(this.valueAttribute=e,this.initializeValue()):"range"===t&&(this.range=null!==e);}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null;}catch(t){}else if(this.valueAttribute){var _t4;_t4=new Date(this.valueAttribute),_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null);}this.requestUpdate();}},{key:"connectedCallback",value:function connectedCallback(){if(_get(_getPrototypeOf(r.prototype),"connectedCallback",this).call(this),this.initializeValue(),this.valueAttribute){var _t5=new Date(this.valueAttribute);isNaN(_t5.getTime())||(this.value=_t5,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(r.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"getDaysArray",value:function getDaysArray(t,i){var e=new Date(t,i+1,0).getDate();return Array.from({length:e},function(t,i){return i+1;});}},{key:"nextMonth",value:function nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate();}},{key:"prevMonth",value:function prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate();}},{key:"selectDate",value:function selectDate(t,i,e){var s=new Date(e,i,t);if(this.range){if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{var _t6=s;_t6.setHours(23,59,59,999),this.endDate=_t6;}}else this.value=s,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate();}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate});}},{key:"convertTZ",value:function convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}));}},{key:"isCurrentDate",value:function isCurrentDate(t,i,e){var s=new Date();return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear();}},{key:"isAllowedDate",value:function isAllowedDate(t,i,e){var _this$allowedDates7,_this$allowedDates8,_this$allowedDates9,_this$allowedDates10,_this$allowedDates11,_this$allowedDates12;if(!this.validAllowedDates)return!0;var s=new Date(Date.UTC(e,i,t)),n=new Date(Date.UTC((_this$allowedDates7=this.allowedDates)===null||_this$allowedDates7===void 0||(_this$allowedDates7=_this$allowedDates7.startDate)===null||_this$allowedDates7===void 0?void 0:_this$allowedDates7.slice(0,4),((_this$allowedDates8=this.allowedDates)===null||_this$allowedDates8===void 0||(_this$allowedDates8=_this$allowedDates8.startDate)===null||_this$allowedDates8===void 0?void 0:_this$allowedDates8.slice(5,7))-1,(_this$allowedDates9=this.allowedDates)===null||_this$allowedDates9===void 0||(_this$allowedDates9=_this$allowedDates9.startDate)===null||_this$allowedDates9===void 0?void 0:_this$allowedDates9.slice(8,10))),a=new Date(Date.UTC((_this$allowedDates10=this.allowedDates)===null||_this$allowedDates10===void 0||(_this$allowedDates10=_this$allowedDates10.endDate)===null||_this$allowedDates10===void 0?void 0:_this$allowedDates10.slice(0,4),((_this$allowedDates11=this.allowedDates)===null||_this$allowedDates11===void 0||(_this$allowedDates11=_this$allowedDates11.endDate)===null||_this$allowedDates11===void 0?void 0:_this$allowedDates11.slice(5,7))-1,(_this$allowedDates12=this.allowedDates)===null||_this$allowedDates12===void 0||(_this$allowedDates12=_this$allowedDates12.endDate)===null||_this$allowedDates12===void 0?void 0:_this$allowedDates12.slice(8,10)));a.setUTCHours(23,59,59,999);return s>=n&&s<=a;}},{key:"renderMonth",value:function renderMonth(t,e,s){var _this2=this;var n=new Date(t,e,1).getDay(),a=new Date(t,e+1,0).getDay(),h=this.getDaysArray(0===e?t-1:t,0===e?11:e-1),l=this.getDaysArray(11===e?t+1:t,11===e?0:e+1),d=h.slice(h.length-n),_r=l.slice(0,6-a),o=[].concat(_toConsumableArray(d),_toConsumableArray(s),_toConsumableArray(_r)),u=function u(t,i,e,s){if(!s)return"";if(!_this2.range&&_this2.value){if(t===_this2.value.getDate()&&i===_this2.value.getMonth()&&e===_this2.value.getFullYear())return"selected-date";}var n=_this2.startDate&&t===_this2.startDate.getDate()&&i===_this2.startDate.getMonth()&&e===_this2.startDate.getFullYear(),a=_this2.endDate&&t===_this2.endDate.getDate()&&i===_this2.endDate.getMonth()&&e===_this2.endDate.getFullYear();return n?"range-start":a?"range-end":"";},c=function c(t,i,e,s){if(!s)return!1;if(_this2.startDate&&_this2.endDate){var _s=new Date(e,i,t);return _s>=_this2.startDate&&_s<=_this2.endDate;}return!1;};return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"","\"\n >\n </nile-icon>\n <span\n >","\n ","</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"","\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ","\n </div>\n </div>\n "])),this.prevMonth,new Date(t,e).toLocaleString("default",{month:"long"}),t,this.nextMonth,o.map(function(n,a){var h=a>=d.length&&a<d.length+s.length;return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <div\n class=\"day\n ","\n "," "," "," ","\n ","\n \"\n @click=\"","\"\n >\n ","\n </div>"])),_this2.isAllowedDate(n,e,t)?"":"not-allowed",u(n,e,t,h),c(n,e,t,h),c(n,e,t,h)?"in-range":"",h?"":"filler",_this2.isCurrentDate(n,e,t)&&h?"current-date":"",function(){h&&_this2.selectDate(n,e,t);},n);}));}},{key:"formatDate",value:function formatDate(t){if(!t)return"";return"".concat(String(t.getDate()).padStart(2,"0"),"/").concat(String(t.getMonth()+1).padStart(2,"0"),"/").concat(t.getFullYear());}},{key:"formatDateRange",value:function formatDateRange(t){return t?t.startDate&&t.endDate?"".concat(this.formatDate(t.startDate)," - ").concat(this.formatDate(t.endDate)):"":t;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate();}},{key:"handleEndDateInput",value:function handleEndDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate();}},{key:"parseDate",value:function parseDate(t){var _t$split$map=t.split("/").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),i=_t$split$map2[0],e=_t$split$map2[1],s=_t$split$map2[2],n=new Date(s,e-1,i);return isNaN(n.getTime())?null:n;}},{key:"isValidDateInput",value:function isValidDateInput(t){return /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map3=t.split(":").map(Number),_t$split$map4=_slicedToArray(_t$split$map3,3),e=_t$split$map4[0],s=_t$split$map4[1],n=_t$split$map4[2],a=new Date(i.getTime());return a.setHours(e,s,n),a;}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"setType",value:function setType(t){this.type=t;}},{key:"createRelativePeriod",value:function createRelativePeriod(t,i){var e=new Date(),s=new Date();switch(t){case"minutes":s.setMinutes(s.getMinutes()-i);break;case"hours":s.setHours(s.getHours()-i);break;case"days":s.setDate(s.getDate()-i);break;case"weeks":s.setDate(s.getDate()-7*i);break;case"months":s.setMonth(s.getMonth()-i);}return this.startDate=new Date(s.getTime()),this.endDate=new Date(e.getTime()),this.requestUpdate(),{startDate:this.startDate,endDate:this.endDate};}},{key:"handleTimeValueClick",value:function handleTimeValueClick(t,i,e){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i,this.requestUpdate();}},{key:"renderTimeValues",value:function renderTimeValues(t,e){var _this3=this;return e.map(function(e){return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div\n class=\"time-value ","\"\n @click=","\n >\n ","\n </div>\n "])),_this3.selectedUnit===t&&_this3.selectedValue===e?"time-value--selected":"",function(i){return _this3.handleTimeValueClick(t,e,i);},e);});}},{key:"handleDurationChange",value:function handleDurationChange(t){this.selectedValue=Number(t.detail.value),this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleUnitChange",value:function handleUnitChange(t){this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleTimeZoneChange",value:function handleTimeZoneChange(t){this.selectedTimeZone=t.detail.value,this.requestUpdate();}},{key:"onTypeChange",value:function onTypeChange(t){this.type=t.detail.value;}},{key:"render",value:function render(){var _this$hideDurationFie,_this$hideDurationFie2,_this$hideDurationFie3,_this$hideDurationFie4,_this$hideDurationFie5,_this$hideDurationFie6,_this$hideDurationFie7,_this$hideDurationFie8,_this$hideDurationFie9,_this$hideDurationFie10;this.getDaysArray(this.currentYear,this.currentMonth);var t=(this.currentMonth+1)%12,e=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(e,t),i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n class=\"base "," ","\"\n >\n <div class=\"calendar-config ","\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"","\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n <div class=\"calendar-timezone ","\">\n <nile-select\n hoist\n value=","\n @nile-change=","\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ","\"\n >\n <div class=\"calendar-container ","\">\n ","\n </div>\n </div>\n\n <div class=\"unit-container ","\">\n <div\n class=\"time-unit-group "," \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ","\n </div>\n </div>\n </div>\n\n ","\n ","\n </div>\n "])),this.range?"base__range":"","relative"===this.type?"base__relative":"",this.range?"":"hidden",this.onTypeChange,!this.range||this.hideTimeZone?"hidden":"",this.selectedTimeZone,this.handleTimeZoneChange,"absolute"!==this.type?"hidden":"",this.range?"with-margin":"",this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),"relative"!==this.type?"hidden":"",(_this$hideDurationFie=this.hideDurationFields)!==null&&_this$hideDurationFie!==void 0&&_this$hideDurationFie.includes("minutes")?"hidden":"",this.renderTimeValues("minutes",[1,5,15,30,45]),(_this$hideDurationFie2=this.hideDurationFields)!==null&&_this$hideDurationFie2!==void 0&&_this$hideDurationFie2.includes("hours")?"hidden":"",this.renderTimeValues("hours",[1,2,3,6,8,12]),(_this$hideDurationFie3=this.hideDurationFields)!==null&&_this$hideDurationFie3!==void 0&&_this$hideDurationFie3.includes("days")?"hidden":"",this.renderTimeValues("days",[1,2,3,4,5,6]),(_this$hideDurationFie4=this.hideDurationFields)!==null&&_this$hideDurationFie4!==void 0&&_this$hideDurationFie4.includes("weeks")?"hidden":"",this.renderTimeValues("weeks",[1,2,4,6]),(_this$hideDurationFie5=this.hideDurationFields)!==null&&_this$hideDurationFie5!==void 0&&_this$hideDurationFie5.includes("months")?"hidden":"",this.renderTimeValues("months",[3,6,12,15]),this.range&&"relative"===this.type?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"","\"\n @nile-input=\"","\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"","\"\n @nile-change=\"","\"\n >\n <nile-option value=\"minutes\" class=\"","\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"","\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"","\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"","\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"","\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n "])),this.selectedValue,this.handleDurationChange,this.selectedUnit,this.handleUnitChange,(_this$hideDurationFie6=this.hideDurationFields)!==null&&_this$hideDurationFie6!==void 0&&_this$hideDurationFie6.includes("minutes")?"hidden":"",(_this$hideDurationFie7=this.hideDurationFields)!==null&&_this$hideDurationFie7!==void 0&&_this$hideDurationFie7.includes("hours")?"hidden":"",(_this$hideDurationFie8=this.hideDurationFields)!==null&&_this$hideDurationFie8!==void 0&&_this$hideDurationFie8.includes("days")?"hidden":"",(_this$hideDurationFie9=this.hideDurationFields)!==null&&_this$hideDurationFie9!==void 0&&_this$hideDurationFie9.includes("weeks")?"hidden":"",(_this$hideDurationFie10=this.hideDurationFields)!==null&&_this$hideDurationFie10!==void 0&&_this$hideDurationFie10.includes("months")?"hidden":"",!this.startDate||!this.endDate,this.confimRange):"",this.range&&"absolute"===this.type?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\"> \n ","\n \n <nile-input class=\"manual-input ","\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n </div>\n\n <div>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n ","\n \n <nile-input class=\"manual-input "," \" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n </div>\n\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n </div>\n "])),this.hideInput?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral([""]))):i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\">\n </nile-input>"])),this.formatDate(this.startDate),this.handleStartDateInput),this.hideTimeInput?"hidden":"",this.formatTime(this.startDate),this.handleStartTimeInput,this.hideInput?i(_templateObject9||(_templateObject9=_taggedTemplateLiteral([""]))):i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>"])),this.formatDate(this.endDate),this.handleEndDateInput),this.hideTimeInput?"hidden":"",this.formatTime(this.endDate),this.handleEndTimeInput,!this.startDate||!this.endDate,this.confimRange):"");}}],[{key:"styles",get:function get(){return[a];}},{key:"observedAttributes",get:function get(){return["value","range"];}}]);}(l));t([e("nile-dropdown")],r.prototype,"dropdown",void 0),t([d({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([d({type:Object})],r.prototype,"value",void 0),t([d({type:Object,attribute:"allowed-dates"})],r.prototype,"allowedDates",void 0),t([d({type:Object})],r.prototype,"rangeValue",void 0),t([d({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([d({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([d({type:Object})],r.prototype,"startDate",void 0),t([d({type:Object})],r.prototype,"endDate",void 0),t([d({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([d({type:Boolean})],r.prototype,"range",void 0),t([d({type:String})],r.prototype,"type",void 0),t([d({type:String})],r.prototype,"selectedUnit",void 0),t([d({type:Number})],r.prototype,"selectedValue",void 0),t([d({type:String})],r.prototype,"selectedTimeZone",void 0),t([s()],r.prototype,"validAllowedDates",void 0),t([h("allowedDates")],r.prototype,"checkValidAllowedDate",null),t([s()],r.prototype,"hideInput",void 0),t([d({type:Boolean,attribute:"hide-time-input"})],r.prototype,"hideTimeInput",void 0),t([d({type:Array,attribute:"hide-duration-fields"})],r.prototype,"hideDurationFields",void 0),t([d({type:Boolean,attribute:"hide-time-zone"})],r.prototype,"hideTimeZone",void 0),t([h("value")],r.prototype,"valueChanged",null),_export("N",r=t([n("nile-calendar")],r));}};});
1
+ System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-calendar.css.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-217fe924.cjs.js","lit","lit/directives/class-map.js","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,a,h,l,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,r;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){e=_litDecoratorsJs.query;s=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){a=_nileCalendarCssCjsJs.s;},function(_internalWatchCjsJs){h=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){d=_property002CjsJs.n;},function(_lit){},function(_litDirectivesClassMapJs){},function(_nilePopupNilePopupCssCjsJs){}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_l){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.dropDownOpened=!1,_this.allowedDates={},_this.valueAttribute=null,_this.formattedDate=null,_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.range=!1,_this.type="absolute",_this.selectedTimeZone="local",_this.validAllowedDates=!0,_this.hideInput=!1,_this.hideTimeInput=!1,_this.hideDurationFields=[],_this.hideTimeZone=!1;return _this;}_inherits(r,_l);return _createClass(r,[{key:"firstUpdated",value:function firstUpdated(){var t=this.getAttribute("allowed-dates");if(null!==t)try{this.allowedDates=JSON.parse(t);}catch(t){console.error("Error parsing allowed-dates attribute:",t);}else this.validAllowedDates=!1;}},{key:"checkValidAllowedDate",value:function checkValidAllowedDate(){var _this$allowedDates,_this$allowedDates2,_this$allowedDates3,_this$allowedDates4,_this$allowedDates5,_this$allowedDates6;if(0==Object.keys(this.allowedDates).length)return void(this.validAllowedDates=!1);this.hideInput=!0;new Date(Date.UTC((_this$allowedDates=this.allowedDates)===null||_this$allowedDates===void 0||(_this$allowedDates=_this$allowedDates.startDate)===null||_this$allowedDates===void 0?void 0:_this$allowedDates.slice(0,4),((_this$allowedDates2=this.allowedDates)===null||_this$allowedDates2===void 0||(_this$allowedDates2=_this$allowedDates2.startDate)===null||_this$allowedDates2===void 0?void 0:_this$allowedDates2.slice(5,7))-1,(_this$allowedDates3=this.allowedDates)===null||_this$allowedDates3===void 0||(_this$allowedDates3=_this$allowedDates3.startDate)===null||_this$allowedDates3===void 0?void 0:_this$allowedDates3.slice(8,10)))>new Date(Date.UTC((_this$allowedDates4=this.allowedDates)===null||_this$allowedDates4===void 0||(_this$allowedDates4=_this$allowedDates4.endDate)===null||_this$allowedDates4===void 0?void 0:_this$allowedDates4.slice(0,4),((_this$allowedDates5=this.allowedDates)===null||_this$allowedDates5===void 0||(_this$allowedDates5=_this$allowedDates5.endDate)===null||_this$allowedDates5===void 0?void 0:_this$allowedDates5.slice(5,7))-1,(_this$allowedDates6=this.allowedDates)===null||_this$allowedDates6===void 0||(_this$allowedDates6=_this$allowedDates6.endDate)===null||_this$allowedDates6===void 0?void 0:_this$allowedDates6.slice(8,10)))?(console.error("StartDate must be greater than endDate"),this.validAllowedDates=!1):this.validAllowedDates=!0;}},{key:"valueChanged",value:function valueChanged(){if("object"==_typeof(this.value)&&null!==this.value&&(this.value=JSON.stringify(this.value)),this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){var _t=this.value.getTimezoneOffset(),_i=new Date(this.value.getTime()-60*_t*1e3);isNaN(_i.getTime())||(this.valueAttribute=_i.toISOString().split("T")[0],this.formattedDate="".concat(String(_i.getDate()).padStart(2,"0"),"/").concat(String(_i.getMonth()+1).padStart(2,"0"),"/").concat(_i.getFullYear()));}}},{key:"updated",value:function updated(t){if(_get(_getPrototypeOf(r.prototype),"updated",this).call(this,t),t.has("valueAttribute")){var _t2=new Date(this.valueAttribute||"");if(!isNaN(_t2.getTime())){var _i2=_t2.getTimezoneOffset();this.value=new Date(_t2.getTime()-60*_i2*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}}}},{key:"attributeChangedCallback",value:function attributeChangedCallback(t,i,e){"value"===t?(this.valueAttribute=e,this.initializeValue()):"range"===t&&(this.range=null!==e);}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null;}catch(t){}else if(this.valueAttribute){var _t4;_t4=new Date(this.valueAttribute),_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null);}this.requestUpdate();}},{key:"connectedCallback",value:function connectedCallback(){if(_get(_getPrototypeOf(r.prototype),"connectedCallback",this).call(this),this.initializeValue(),this.valueAttribute){var _t5=new Date(this.valueAttribute);isNaN(_t5.getTime())||(this.value=_t5,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(r.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"getDaysArray",value:function getDaysArray(t,i){var e=new Date(t,i+1,0).getDate();return Array.from({length:e},function(t,i){return i+1;});}},{key:"nextMonth",value:function nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate();}},{key:"prevMonth",value:function prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate();}},{key:"selectDate",value:function selectDate(t,i,e){var s=new Date(e,i,t);if(this.range){if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{var _t6=s;_t6.setHours(23,59,59,999),this.endDate=_t6;}}else this.value=s,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide();this.requestUpdate();}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&("local"!==this.selectedTimeZone&&(this.startDate=this.convertTZ(this.startDate,this.selectedTimeZone),this.endDate=this.convertTZ(this.endDate,this.selectedTimeZone)),this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate});}},{key:"convertTZ",value:function convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}));}},{key:"isCurrentDate",value:function isCurrentDate(t,i,e){var s=new Date();return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear();}},{key:"isAllowedDate",value:function isAllowedDate(t,i,e){var _this$allowedDates7,_this$allowedDates8,_this$allowedDates9,_this$allowedDates10,_this$allowedDates11,_this$allowedDates12;if(!this.validAllowedDates)return!0;var s=new Date(Date.UTC(e,i,t)),n=new Date(Date.UTC((_this$allowedDates7=this.allowedDates)===null||_this$allowedDates7===void 0||(_this$allowedDates7=_this$allowedDates7.startDate)===null||_this$allowedDates7===void 0?void 0:_this$allowedDates7.slice(0,4),((_this$allowedDates8=this.allowedDates)===null||_this$allowedDates8===void 0||(_this$allowedDates8=_this$allowedDates8.startDate)===null||_this$allowedDates8===void 0?void 0:_this$allowedDates8.slice(5,7))-1,(_this$allowedDates9=this.allowedDates)===null||_this$allowedDates9===void 0||(_this$allowedDates9=_this$allowedDates9.startDate)===null||_this$allowedDates9===void 0?void 0:_this$allowedDates9.slice(8,10))),a=new Date(Date.UTC((_this$allowedDates10=this.allowedDates)===null||_this$allowedDates10===void 0||(_this$allowedDates10=_this$allowedDates10.endDate)===null||_this$allowedDates10===void 0?void 0:_this$allowedDates10.slice(0,4),((_this$allowedDates11=this.allowedDates)===null||_this$allowedDates11===void 0||(_this$allowedDates11=_this$allowedDates11.endDate)===null||_this$allowedDates11===void 0?void 0:_this$allowedDates11.slice(5,7))-1,(_this$allowedDates12=this.allowedDates)===null||_this$allowedDates12===void 0||(_this$allowedDates12=_this$allowedDates12.endDate)===null||_this$allowedDates12===void 0?void 0:_this$allowedDates12.slice(8,10)));a.setUTCHours(23,59,59,999);return s>=n&&s<=a;}},{key:"renderMonth",value:function renderMonth(t,e,s){var _this2=this;var n=new Date(t,e,1).getDay(),a=new Date(t,e+1,0).getDay(),h=this.getDaysArray(0===e?t-1:t,0===e?11:e-1),l=this.getDaysArray(11===e?t+1:t,11===e?0:e+1),d=h.slice(h.length-n),_r=l.slice(0,6-a),o=[].concat(_toConsumableArray(d),_toConsumableArray(s),_toConsumableArray(_r)),u=function u(t,i,e,s){if(!s)return"";if(!_this2.range&&_this2.value){if(t===_this2.value.getDate()&&i===_this2.value.getMonth()&&e===_this2.value.getFullYear())return"selected-date";}var n=_this2.startDate&&t===_this2.startDate.getDate()&&i===_this2.startDate.getMonth()&&e===_this2.startDate.getFullYear(),a=_this2.endDate&&t===_this2.endDate.getDate()&&i===_this2.endDate.getMonth()&&e===_this2.endDate.getFullYear();return n?"range-start":a?"range-end":"";},c=function c(t,i,e,s){if(!s)return!1;if(_this2.startDate&&_this2.endDate){var _s=new Date(e,i,t);return _s>=_this2.startDate&&_s<=_this2.endDate;}return!1;};return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"","\"\n >\n </nile-icon>\n <span\n >","\n ","</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"","\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ","\n </div>\n </div>\n "])),this.prevMonth,new Date(t,e).toLocaleString("default",{month:"long"}),t,this.nextMonth,o.map(function(n,a){var h=a>=d.length&&a<d.length+s.length;return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <div\n class=\"day\n ","\n "," "," "," ","\n ","\n \"\n @click=\"","\"\n >\n ","\n </div>"])),_this2.isAllowedDate(n,e,t)?"":"not-allowed",u(n,e,t,h),c(n,e,t,h),c(n,e,t,h)?"in-range":"",h?"":"filler",_this2.isCurrentDate(n,e,t)&&h?"current-date":"",function(){h&&_this2.selectDate(n,e,t);},n);}));}},{key:"formatDate",value:function formatDate(t){if(!t)return"";return"".concat(String(t.getDate()).padStart(2,"0"),"/").concat(String(t.getMonth()+1).padStart(2,"0"),"/").concat(t.getFullYear());}},{key:"formatDateRange",value:function formatDateRange(t){return t?t.startDate&&t.endDate?"".concat(this.formatDate(t.startDate)," - ").concat(this.formatDate(t.endDate)):"":t;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate();}},{key:"handleEndDateInput",value:function handleEndDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate();}},{key:"parseDate",value:function parseDate(t){var _t$split$map=t.split("/").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),i=_t$split$map2[0],e=_t$split$map2[1],s=_t$split$map2[2],n=new Date(s,e-1,i);return isNaN(n.getTime())?null:n;}},{key:"isValidDateInput",value:function isValidDateInput(t){return /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map3=t.split(":").map(Number),_t$split$map4=_slicedToArray(_t$split$map3,3),e=_t$split$map4[0],s=_t$split$map4[1],n=_t$split$map4[2],a=new Date(i.getTime());return a.setHours(e,s,n),a;}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"setType",value:function setType(t){this.type=t;}},{key:"createRelativePeriod",value:function createRelativePeriod(t,i){var e=new Date(),s=new Date();switch(t){case"minutes":s.setMinutes(s.getMinutes()-i);break;case"hours":s.setHours(s.getHours()-i);break;case"days":s.setDate(s.getDate()-i);break;case"weeks":s.setDate(s.getDate()-7*i);break;case"months":s.setMonth(s.getMonth()-i);}return this.startDate=new Date(s.getTime()),this.endDate=new Date(e.getTime()),this.requestUpdate(),{startDate:this.startDate,endDate:this.endDate};}},{key:"handleTimeValueClick",value:function handleTimeValueClick(t,i,e){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i,this.requestUpdate();}},{key:"renderTimeValues",value:function renderTimeValues(t,e){var _this3=this;return e.map(function(e){return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <div\n class=\"time-value ","\"\n @click=","\n >\n ","\n </div>\n "])),_this3.selectedUnit===t&&_this3.selectedValue===e?"time-value--selected":"",function(i){return _this3.handleTimeValueClick(t,e,i);},e);});}},{key:"handleDurationChange",value:function handleDurationChange(t){this.selectedValue=Number(t.detail.value),this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleUnitChange",value:function handleUnitChange(t){this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleTimeZoneChange",value:function handleTimeZoneChange(t){this.selectedTimeZone=t.detail.value,this.requestUpdate();}},{key:"onTypeChange",value:function onTypeChange(t){this.type=t.detail.value;}},{key:"render",value:function render(){var _this$hideDurationFie,_this$hideDurationFie2,_this$hideDurationFie3,_this$hideDurationFie4,_this$hideDurationFie5,_this$hideDurationFie6,_this$hideDurationFie7,_this$hideDurationFie8,_this$hideDurationFie9,_this$hideDurationFie10;this.getDaysArray(this.currentYear,this.currentMonth);var t=(this.currentMonth+1)%12,e=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(e,t),i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n class=\"base "," ","\"\n >\n <div class=\"calendar-config ","\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"","\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n <div class=\"calendar-timezone ","\">\n <nile-select\n hoist\n value=","\n @nile-change=","\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ","\"\n >\n <div class=\"calendar-container ","\">\n ","\n </div>\n </div>\n\n <div class=\"unit-container ","\">\n <div\n class=\"time-unit-group "," \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ","\n </div>\n </div>\n\n <div\n class=\"time-unit-group ","\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ","\n </div>\n </div>\n </div>\n\n ","\n ","\n </div>\n "])),this.range?"base__range":"","relative"===this.type?"base__relative":"",this.range?"":"hidden",this.onTypeChange,!this.range||this.hideTimeZone?"hidden":"",this.selectedTimeZone,this.handleTimeZoneChange,"absolute"!==this.type?"hidden":"",this.range?"with-margin":"",this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),"relative"!==this.type?"hidden":"",(_this$hideDurationFie=this.hideDurationFields)!==null&&_this$hideDurationFie!==void 0&&_this$hideDurationFie.includes("minutes")?"hidden":"",this.renderTimeValues("minutes",[1,5,15,30,45]),(_this$hideDurationFie2=this.hideDurationFields)!==null&&_this$hideDurationFie2!==void 0&&_this$hideDurationFie2.includes("hours")?"hidden":"",this.renderTimeValues("hours",[1,2,3,6,8,12]),(_this$hideDurationFie3=this.hideDurationFields)!==null&&_this$hideDurationFie3!==void 0&&_this$hideDurationFie3.includes("days")?"hidden":"",this.renderTimeValues("days",[1,2,3,4,5,6]),(_this$hideDurationFie4=this.hideDurationFields)!==null&&_this$hideDurationFie4!==void 0&&_this$hideDurationFie4.includes("weeks")?"hidden":"",this.renderTimeValues("weeks",[1,2,4,6]),(_this$hideDurationFie5=this.hideDurationFields)!==null&&_this$hideDurationFie5!==void 0&&_this$hideDurationFie5.includes("months")?"hidden":"",this.renderTimeValues("months",[3,6,12,15]),this.range&&"relative"===this.type?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"","\"\n @nile-input=\"","\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"","\"\n @nile-change=\"","\"\n >\n <nile-option value=\"minutes\" class=\"","\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"","\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"","\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"","\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"","\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n "])),this.selectedValue,this.handleDurationChange,this.selectedUnit,this.handleUnitChange,(_this$hideDurationFie6=this.hideDurationFields)!==null&&_this$hideDurationFie6!==void 0&&_this$hideDurationFie6.includes("minutes")?"hidden":"",(_this$hideDurationFie7=this.hideDurationFields)!==null&&_this$hideDurationFie7!==void 0&&_this$hideDurationFie7.includes("hours")?"hidden":"",(_this$hideDurationFie8=this.hideDurationFields)!==null&&_this$hideDurationFie8!==void 0&&_this$hideDurationFie8.includes("days")?"hidden":"",(_this$hideDurationFie9=this.hideDurationFields)!==null&&_this$hideDurationFie9!==void 0&&_this$hideDurationFie9.includes("weeks")?"hidden":"",(_this$hideDurationFie10=this.hideDurationFields)!==null&&_this$hideDurationFie10!==void 0&&_this$hideDurationFie10.includes("months")?"hidden":"",!this.startDate||!this.endDate,this.confimRange):"",this.range&&"absolute"===this.type?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label ","\">From </span>\n <div class=\"from\"> \n ","\n \n <nile-input class=\"manual-input ","\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n </div>\n\n <div>\n <span class=\"manual-input-label ","\">To </span>\n <div class=\"from\">\n ","\n \n <nile-input class=\"manual-input "," \" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n </div>\n\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n </div>\n "])),this.hideInput&&this.hideTimeInput?"hidden":"",this.hideInput?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral([""]))):i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\">\n </nile-input>"])),this.formatDate(this.startDate),this.handleStartDateInput),this.hideTimeInput?"hidden":"",this.formatTime(this.startDate),this.handleStartTimeInput,this.hideInput&&this.hideTimeInput?"hidden":"",this.hideInput?i(_templateObject9||(_templateObject9=_taggedTemplateLiteral([""]))):i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>"])),this.formatDate(this.endDate),this.handleEndDateInput),this.hideTimeInput?"hidden":"",this.formatTime(this.endDate),this.handleEndTimeInput,!this.startDate||!this.endDate,this.confimRange):"");}}],[{key:"styles",get:function get(){return[a];}},{key:"observedAttributes",get:function get(){return["value","range"];}}]);}(l));t([e("nile-dropdown")],r.prototype,"dropdown",void 0),t([d({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([d({type:Object})],r.prototype,"value",void 0),t([d({type:Object,attribute:"allowed-dates"})],r.prototype,"allowedDates",void 0),t([d({type:Object})],r.prototype,"rangeValue",void 0),t([d({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([d({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([d({type:Object})],r.prototype,"startDate",void 0),t([d({type:Object})],r.prototype,"endDate",void 0),t([d({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([d({type:Boolean})],r.prototype,"range",void 0),t([d({type:String})],r.prototype,"type",void 0),t([d({type:String})],r.prototype,"selectedUnit",void 0),t([d({type:Number})],r.prototype,"selectedValue",void 0),t([d({type:String})],r.prototype,"selectedTimeZone",void 0),t([s()],r.prototype,"validAllowedDates",void 0),t([h("allowedDates")],r.prototype,"checkValidAllowedDate",null),t([s()],r.prototype,"hideInput",void 0),t([d({type:Boolean,attribute:"hide-time-input"})],r.prototype,"hideTimeInput",void 0),t([d({type:Array,attribute:"hide-duration-fields"})],r.prototype,"hideDurationFields",void 0),t([d({type:Boolean,attribute:"hide-time-zone"})],r.prototype,"hideTimeZone",void 0),t([h("value")],r.prototype,"valueChanged",null),_export("N",r=t([n("nile-calendar")],r));}};});
2
2
  //# sourceMappingURL=nile-calendar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\nimport { TIMEZONES } from './timezones';\n\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n* The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private currentMonth: number = new Date().getMonth();\n\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value: any;\n\n @property({ type: Object, attribute: 'allowed-dates' })\n allowedDates: any = {};\n\n @property({ type: Object }) rangeValue: any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n\n @property({ type: Object }) endDate: Date | null = null;\n\n @property({ type: Boolean }) isSelectingStart = true;\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: String }) type = 'absolute';\n\n @property({ type: String }) selectedUnit: string;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: String }) selectedTimeZone: string = 'local';\n\n @state() validAllowedDates = true;\n\n firstUpdated() {\n const allowedDatesAttribute = this.getAttribute('allowed-dates');\n\n if (allowedDatesAttribute !== null ) {\n try {\n this.allowedDates = JSON.parse(allowedDatesAttribute);\n } catch (error) {\n console.error('Error parsing allowed-dates attribute:', error);\n }\n }\n else\n {\n this.validAllowedDates=false;\n }\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() { \n if (Object.keys(this.allowedDates).length ==0) {\n this.validAllowedDates = false;\n return;\n }\n this.hideInput=true;\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n this.validAllowedDates=false;\n }\n else\n {\n this.validAllowedDates=true;\n }\n }\n\n @state() hideInput: Boolean = false;\n\n @property({ type: Boolean,attribute:'hide-time-input' }) hideTimeInput: Boolean = false;\n\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: String[] = [];\n @property({ type: Boolean , attribute: 'hide-time-zone' }) hideTimeZone: Boolean = false;\n\n @watch('value')\n valueChanged() {\n\n if (typeof this.value === 'object' && this.value !== null) {\n this.value = JSON.stringify(this.value);\n }\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.requestUpdate();\n }\n\n private selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n if (this.selectedTimeZone !== 'local') {\n this.startDate = this.convertTZ(this.startDate, this.selectedTimeZone);\n this.endDate = this.convertTZ(this.endDate, this.selectedTimeZone);\n }\n\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n isCurrentDate(day: number, month: number, year: number) {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n }\n\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.validAllowedDates) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day\n ${this.isAllowedDate(day, month, year) ? '' : 'not-allowed'}\n ${isSelectedDate(day, month, year, isCurrentMonth)} ${isInRange(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\n ${this.isCurrentDate(day, month, year) && isCurrentMonth\n ? 'current-date'\n : ''}\n \"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n setType(newType: string) {\n this.type = newType;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n this.requestUpdate();\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n\n handleTimeValueClick(unit: string, value: number, event: any) {\n const timestamps = this.createRelativePeriod(unit, value);\n\n this.selectedUnit = unit;\n this.selectedValue = value;\n\n this.requestUpdate();\n }\n\n renderTimeValues(unit: string, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"time-value ${this.selectedUnit === unit &&\n this.selectedValue === value\n ? 'time-value--selected'\n : ''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >\n ${value}\n </div>\n `\n );\n }\n\n handleDurationChange(event: any) {\n this.selectedValue = Number(event.detail.value);\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeZoneChange(event: any) {\n this.selectedTimeZone = event.detail.value;\n this.requestUpdate();\n }\n\n onTypeChange(event: any) {\n this.type = event.detail.value;\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n const timeZones: string[] = TIMEZONES;\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n return html`\n <div\n class=\"base ${this.range ? 'base__range' : ''} ${this.type ===\n 'relative'\n ? 'base__relative'\n : ''}\"\n >\n <div class=\"calendar-config ${!this.range ? 'hidden' : ''}\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n <div class=\"calendar-timezone ${!this.range || this.hideTimeZone ? 'hidden' : ''}\">\n <nile-select\n hoist\n value=${this.selectedTimeZone}\n @nile-change=${this.handleTimeZoneChange}\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ${this.type !== 'absolute' ? 'hidden' : ''}\"\n >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n\n <div class=\"unit-container ${this.type !== 'relative' ? 'hidden' : ''}\">\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('minutes')\n ? 'hidden'\n : ''} \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('hours')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('days')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('weeks')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('months')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n </div>\n </div>\n\n ${this.range && this.type === 'relative'\n ? html`\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"${\n this.selectedValue\n }\"\n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"${\n this.selectedUnit\n }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${\n this.hideDurationFields?.includes('minutes') ? 'hidden' : ''\n }\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"${\n this.hideDurationFields?.includes('hours') ? 'hidden' : ''\n }\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${\n this.hideDurationFields?.includes('days') ? 'hidden' : ''\n }\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"${\n this.hideDurationFields?.includes('weeks') ? 'hidden' : ''\n }\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"${\n this.hideDurationFields?.includes('months') ? 'hidden' : ''\n }\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n ${this.range && this.type === 'absolute'\n ? html`\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\"> \n ${!this.hideInput ? html`<nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.startDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleStartDateInput\n }\">\n </nile-input>`:html`` }\n \n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''}\" value=\"${this.formatTime(\n this.startDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleStartTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n <div>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n ${!this.hideInput ? html`<nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.endDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleEndDateInput\n }\"></nile-input>`:html``}\n \n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''} \" value=\"${this.formatTime(\n this.endDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleEndTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}\n"],"names":["NileCalendar","_l","r","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","allowedDates","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","type","selectedTimeZone","validAllowedDates","hideInput","hideTimeInput","hideDurationFields","hideTimeZone","_this","_inherits","_createClass","key","value","firstUpdated","allowedDatesAttribute","getAttribute","JSON","parse","error","console","checkValidAllowedDate","Object","keys","length","UTC","slice","valueChanged","_typeof","stringify","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","setHours","dropdown","hide","confimRange","convertTZ","tzString","toLocaleString","timeZone","isCurrentDate","today","isAllowedDate","_this$allowedDates7","_this$allowedDates8","_this$allowedDates9","_this$allowedDates10","_this$allowedDates11","_this$allowedDates12","dateToCheck","setUTCHours","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","fillerDaysAfter","allDays","isSelectedDate","isCurrentMonth","isStartDate","isEndDate","isInRange","c","html","_templateObject","_taggedTemplateLiteral","map","index","_templateObject2","formatDate","concat","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","hour","minute","second","newDate","handleStartTimeInput","time","handleEndTimeInput","setType","newType","createRelativePeriod","unit","endTime","startTime","setMinutes","setDate","setMonth","handleTimeValueClick","selectedUnit","selectedValue","renderTimeValues","values","_templateObject3","handleDurationChange","handleUnitChange","handleTimeZoneChange","onTypeChange","render","nextYear","_templateObject4","includes","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","__decorate","get","styles","NileElement","query","prototype","property","Boolean","reflect","attribute","state","watch","customElement"],"mappings":"kmNA2CaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEASGC,EAAAA,KAAAA,CAAAC,aAAuB,GAAIC,CAAAA,IAAAA,CAAAA,CAAAA,CAAOC,QAElCH,CAAAA,CAAAA,CAAAA,KAAAA,CAAAI,WAAsB,CAAA,GAAIF,CAAAA,IAAOG,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,CAAAA,CAIGL,KAAAA,CAAcM,cAAAA,CAAAA,CAAG,CAK7DN,CAAAA,KAAAA,CAAYO,YAAQ,CAAA,EAI4BP,CAAAA,KAAAA,CAAcQ,cAEnD,CAAA,IAAA,CAEqCR,KAAAA,CAAaS,aAAAA,CAC3D,IAE0BT,CAAAA,KAAAA,CAASU,SAAgB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AAA,CAAAA,CAAAA,CAAAA,CAAiCjM,CAAA4L,CAAAA,SAAAA,CAAA,mBAAA,CAAA,IAAA,EAAA,CAAA,CAmBlCL,CAAA,CAAA,CADCW,CAAM,CAAA,cAAA,CAAA,CAAA,CA8BNlM,CAAA4L,CAAAA,SAAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,CAEQL,EAAA,CAARU,CAAAA,CAAAA,CAAAA,CAAAA,CAAmCjM,CAAA4L,CAAAA,SAAAA,CAAA,WAAA,CAAA,IAAA,EAAA,CAAA,CAEqBL,EAAA,CAAxDM,CAAAA,CAAS,CAAE5K,IAAAA,CAAM6K,OAAQE,CAAAA,SAAAA,CAAU,qBAAoDhM,CAAA4L,CAAAA,SAAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAGxFL,CAAA,CAAA,CADCM,CAAS,CAAA,CAAE5K,IAAM0D,CAAAA,KAAAA,CAAOqH,SAAW,CAAA,sBAAA,CAAA,CAAA,CAAA,CACFhM,CAAA4L,CAAAA,SAAAA,CAAA,yBAAA,EACyBL,CAAAA,CAAAA,CAAAA,CAAA,CAA1DM,CAAAA,CAAS,CAAE5K,IAAAA,CAAM6K,QAAUE,SAAW,CAAA,gBAAA,CAAA,CAAA,CAAA,CAAkDhM,CAAA4L,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAGzFL,EAAA,CADCW,CAAAA,CAAM,OA2BNlM,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4L,SAAA,CAAA,cAAA,CAAA,IApIU5L,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYuL,CAAA,CAAA,CADxBY,CAAc,CAAA,eAAA,CAAA,CAAA,CACFnM"}
1
+ {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\nimport { TIMEZONES } from './timezones';\n\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n* The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private currentMonth: number = new Date().getMonth();\n\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value: any;\n\n @property({ type: Object, attribute: 'allowed-dates' })\n allowedDates: any = {};\n\n @property({ type: Object }) rangeValue: any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n\n @property({ type: Object }) endDate: Date | null = null;\n\n @property({ type: Boolean }) isSelectingStart = true;\n\n @property({ type: Boolean }) range = false;\n\n @property({ type: String }) type = 'absolute';\n\n @property({ type: String }) selectedUnit: string;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: String }) selectedTimeZone: string = 'local';\n\n @state() validAllowedDates = true;\n\n firstUpdated() {\n const allowedDatesAttribute = this.getAttribute('allowed-dates');\n\n if (allowedDatesAttribute !== null ) {\n try {\n this.allowedDates = JSON.parse(allowedDatesAttribute);\n } catch (error) {\n console.error('Error parsing allowed-dates attribute:', error);\n }\n }\n else\n {\n this.validAllowedDates=false;\n }\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() { \n if (Object.keys(this.allowedDates).length ==0) {\n this.validAllowedDates = false;\n return;\n }\n this.hideInput=true;\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n this.validAllowedDates=false;\n }\n else\n {\n this.validAllowedDates=true;\n }\n }\n\n @state() hideInput: Boolean = false;\n\n @property({ type: Boolean,attribute:'hide-time-input' }) hideTimeInput: Boolean = false;\n\n @property({ type: Array, attribute: 'hide-duration-fields' })\n hideDurationFields: String[] = [];\n @property({ type: Boolean , attribute: 'hide-time-zone' }) hideTimeZone: Boolean = false;\n\n @watch('value')\n valueChanged() {\n\n if (typeof this.value === 'object' && this.value !== null) {\n this.value = JSON.stringify(this.value);\n }\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.requestUpdate();\n }\n\n private selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n if (this.selectedTimeZone !== 'local') {\n this.startDate = this.convertTZ(this.startDate, this.selectedTimeZone);\n this.endDate = this.convertTZ(this.endDate, this.selectedTimeZone);\n }\n\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n isCurrentDate(day: number, month: number, year: number) {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n }\n\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.validAllowedDates) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = new Date(\n Date.UTC(\n this.allowedDates?.startDate?.slice(0, 4),\n this.allowedDates?.startDate?.slice(5, 7) - 1,\n this.allowedDates?.startDate?.slice(8, 10)\n )\n );\n const endDate = new Date(\n Date.UTC(\n this.allowedDates?.endDate?.slice(0, 4),\n this.allowedDates?.endDate?.slice(5, 7) - 1,\n this.allowedDates?.endDate?.slice(8, 10)\n )\n );\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"header-divider\"></div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day\n ${this.isAllowedDate(day, month, year) ? '' : 'not-allowed'}\n ${isSelectedDate(day, month, year, isCurrentMonth)} ${isInRange(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\n ${this.isCurrentDate(day, month, year) && isCurrentMonth\n ? 'current-date'\n : ''}\n \"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n setType(newType: string) {\n this.type = newType;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n this.requestUpdate();\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n\n handleTimeValueClick(unit: string, value: number, event: any) {\n const timestamps = this.createRelativePeriod(unit, value);\n\n this.selectedUnit = unit;\n this.selectedValue = value;\n\n this.requestUpdate();\n }\n\n renderTimeValues(unit: string, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"time-value ${this.selectedUnit === unit &&\n this.selectedValue === value\n ? 'time-value--selected'\n : ''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >\n ${value}\n </div>\n `\n );\n }\n\n handleDurationChange(event: any) {\n this.selectedValue = Number(event.detail.value);\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeZoneChange(event: any) {\n this.selectedTimeZone = event.detail.value;\n this.requestUpdate();\n }\n\n onTypeChange(event: any) {\n this.type = event.detail.value;\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n const timeZones: string[] = TIMEZONES;\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n return html`\n <div\n class=\"base ${this.range ? 'base__range' : ''} ${this.type ===\n 'relative'\n ? 'base__relative'\n : ''}\"\n >\n <div class=\"calendar-config ${!this.range ? 'hidden' : ''}\">\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n <div class=\"calendar-timezone ${!this.range || this.hideTimeZone ? 'hidden' : ''}\">\n <nile-select\n hoist\n value=${this.selectedTimeZone}\n @nile-change=${this.handleTimeZoneChange}\n >\n <nile-option value=\"local\">Local Time Zone</nile-option>\n <nile-option value=\"UTC\">UTC</nile-option>\n </nile-select>\n </div>\n\n <div\n class=\"calendar-wrapper ${this.type !== 'absolute' ? 'hidden' : ''}\"\n >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n\n <div class=\"unit-container ${this.type !== 'relative' ? 'hidden' : ''}\">\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('minutes')\n ? 'hidden'\n : ''} \"\n >\n <div class=\"time-unit-name\"><span>Minutes</span></div>\n <div class=\"time-unit-value minute-values\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('hours')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Hours</span></div>\n <div class=\"time-unit-value hours-values\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('days')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Days</span></div>\n <div class=\"time-unit-value\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('weeks')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Weeks</span></div>\n <div class=\"time-unit-value weeks-values \">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n </div>\n\n <div\n class=\"time-unit-group ${this.hideDurationFields?.includes('months')\n ? 'hidden'\n : ''}\"\n >\n <div class=\"time-unit-name\"><span>Months:</span></div>\n <div class=\"time-unit-value months-values \">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n </div>\n </div>\n\n ${this.range && this.type === 'relative'\n ? html`\n <div class=\"calender-input calender-input--relative\">\n <div class=\"unit-input-container\">\n <nile-input class=\"manual-input duration-input\" label=\"Duration\" value=\"${\n this.selectedValue\n }\"\n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\" ></nile-input>\n <nile-select class=\"manual-input time-input\" label=\"Unit of time\" style=\"margin-top:3px\" value=\"${\n this.selectedUnit\n }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${\n this.hideDurationFields?.includes('minutes') ? 'hidden' : ''\n }\"> Minutes </nile-option>\n <nile-option value=\"hours\" class=\"${\n this.hideDurationFields?.includes('hours') ? 'hidden' : ''\n }\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${\n this.hideDurationFields?.includes('days') ? 'hidden' : ''\n }\"> Days </nile-option>\n <nile-option value=\"weeks\" class=\"${\n this.hideDurationFields?.includes('weeks') ? 'hidden' : ''\n }\"> Weeks </nile-option>\n <nile-option value=\"months\" class=\"${\n this.hideDurationFields?.includes('months') ? 'hidden' : ''\n }\"> Months </nile-option>\n </nile-select>\n\n </div>\n\n <div class=\"button-container--relative\">\n <nile-button class=\"apply-button\" variant=\"primary\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n ${this.range && this.type === 'absolute'\n ? html`\n <div class=\"calender-input\">\n <div>\n <span class=\"manual-input-label ${this.hideInput && this.hideTimeInput \n ? 'hidden'\n : ''}\">From </span>\n <div class=\"from\"> \n ${!this.hideInput ? html`<nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.startDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleStartDateInput\n }\">\n </nile-input>`:html`` }\n \n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''}\" value=\"${this.formatTime(\n this.startDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleStartTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n <div>\n <span class=\"manual-input-label ${this.hideInput && this.hideTimeInput \n ? 'hidden'\n : ''}\">To </span>\n <div class=\"from\">\n ${!this.hideInput ? html`<nile-input class=\"manual-input\" value=\"${this.formatDate(\n this.endDate\n )}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${\n this.handleEndDateInput\n }\"></nile-input>`:html``}\n \n <nile-input class=\"manual-input ${this.hideTimeInput ? 'hidden':''} \" value=\"${this.formatTime(\n this.endDate\n )}\" placeholder=\"HH:MM:SS\" @nile-change=\"${\n this.handleEndTimeInput\n }\"> </nile-input>\n </div>\n </div>\n\n </div>\n <div class=\"button-container\">\n <nile-button class=\"apply-button\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}\n"],"names":["NileCalendar","_l","r","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","allowedDates","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","type","selectedTimeZone","validAllowedDates","hideInput","hideTimeInput","hideDurationFields","hideTimeZone","_this","_inherits","_createClass","key","value","firstUpdated","allowedDatesAttribute","getAttribute","JSON","parse","error","console","checkValidAllowedDate","Object","keys","length","UTC","slice","valueChanged","_typeof","stringify","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","setHours","dropdown","hide","confimRange","convertTZ","tzString","toLocaleString","timeZone","isCurrentDate","today","isAllowedDate","_this$allowedDates7","_this$allowedDates8","_this$allowedDates9","_this$allowedDates10","_this$allowedDates11","_this$allowedDates12","dateToCheck","setUTCHours","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","fillerDaysAfter","allDays","isSelectedDate","isCurrentMonth","isStartDate","isEndDate","isInRange","c","html","_templateObject","_taggedTemplateLiteral","map","index","_templateObject2","formatDate","concat","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","hour","minute","second","newDate","handleStartTimeInput","time","handleEndTimeInput","setType","newType","createRelativePeriod","unit","endTime","startTime","setMinutes","setDate","setMonth","handleTimeValueClick","selectedUnit","selectedValue","renderTimeValues","values","_templateObject3","handleDurationChange","handleUnitChange","handleTimeZoneChange","onTypeChange","render","nextYear","_templateObject4","includes","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","__decorate","get","styles","NileElement","query","prototype","property","Boolean","reflect","attribute","state","watch","customElement"],"mappings":"kmNA2CaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEASGC,EAAAA,KAAAA,CAAAC,aAAuB,GAAIC,CAAAA,IAAAA,CAAAA,CAAAA,CAAOC,QAElCH,CAAAA,CAAAA,CAAAA,KAAAA,CAAAI,WAAsB,CAAA,GAAIF,CAAAA,IAAOG,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,CAAAA,CAIGL,KAAAA,CAAcM,cAAAA,CAAAA,CAAG,CAK7DN,CAAAA,KAAAA,CAAYO,YAAQ,CAAA,EAI4BP,CAAAA,KAAAA,CAAcQ,cAEnD,CAAA,IAAA,CAEqCR,KAAAA,CAAaS,aAAAA,CAC3D,IAE0BT,CAAAA,KAAAA,CAASU,SAAgB,CAAA,IAAA,CAEzBV,KAAAA,CAAOW,OAAAA,CAAgB,IAEtBX,CAAAA,KAAAA,CAAgBY,gBAAG,CAAA,CAAA,CAAA,CAEnBZ,KAAAA,CAAKa,KAAG,CAAA,CAAA,CAAA,CAETb,KAAAA,CAAIc,IAAAA,CAAG,UAMPd,CAAAA,KAAAA,CAAgBe,gBAAW,CAAA,OAAA,CAE9Cf,KAAAA,CAAiBgB,iBAAAA,CAAAA,CAAG,CAkDpBhB,CAAAA,KAAAA,CAASiB,SAAY,CAAA,CAAA,CAAA,CAE2BjB,KAAAA,CAAakB,aAAY,CAAA,CAAA,CAAA,CAGlFlB,KAAAA,CAAkBmB,kBAAAA,CAAa,EAC4BnB,CAAAA,KAAAA,CAAYoB,YAAY,CAAA,CAAA,CA2wBpF,QAAAC,KAAA,EA72BQC,SAAA,CAAAvB,CAAA,CAAAD,EAAA,SAAAyB,YAAA,CAAAxB,CAAA,GAAAyB,GAAA,gBAAAC,KAAA,CA4CP,SAAAC,aAAA,CAAAA,CACE,GAAMC,CAAAA,CAAAA,CAAwB3B,IAAK4B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,CAAA,CADCM,CAAS,CAAA,CAAE5K,IAAM0D,CAAAA,KAAAA,CAAOqH,SAAW,CAAA,sBAAA,CAAA,CAAA,CAAA,CACFhM,CAAA4L,CAAAA,SAAAA,CAAA,yBAAA,EACyBL,CAAAA,CAAAA,CAAAA,CAAA,CAA1DM,CAAAA,CAAS,CAAE5K,IAAAA,CAAM6K,QAAUE,SAAW,CAAA,gBAAA,CAAA,CAAA,CAAA,CAAkDhM,CAAA4L,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAGzFL,EAAA,CADCW,CAAAA,CAAM,OA2BNlM,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4L,SAAA,CAAA,cAAA,CAAA,IApIU5L,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYuL,CAAA,CAAA,CADxBY,CAAc,CAAA,eAAA,CAAA,CAAA,CACFnM"}
@@ -158,7 +158,7 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
158
158
  ${this.range&&"absolute"===this.type?i`
159
159
  <div class="calender-input">
160
160
  <div>
161
- <span class="manual-input-label">From </span>
161
+ <span class="manual-input-label ${this.hideInput&&this.hideTimeInput?"hidden":""}">From </span>
162
162
  <div class="from">
163
163
  ${this.hideInput?i``:i`<nile-input class="manual-input" value="${this.formatDate(this.startDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleStartDateInput}">
164
164
  </nile-input>`}
@@ -168,7 +168,7 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-0a3007c5.esm.js";
168
168
  </div>
169
169
 
170
170
  <div>
171
- <span class="manual-input-label">To </span>
171
+ <span class="manual-input-label ${this.hideInput&&this.hideTimeInput?"hidden":""}">To </span>
172
172
  <div class="from">
173
173
  ${this.hideInput?i``:i`<nile-input class="manual-input" value="${this.formatDate(this.endDate)}" placeholder="DD/MM/YYYY" @nile-change="${this.handleEndDateInput}"></nile-input>`}
174
174
 
@@ -1,2 +1,2 @@
1
- System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var t,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){t=_index001CjsJs.i;}],execute:function execute(){_export("s",o=t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n [hidden] {\n display: none !important;\n }\n\n :host {\n --indicator-color: var(--nile-colors-primary-600);\n --track-color: #e5e9eb;\n --track-width: 2px;\n --tab-gap: 12px;\n\n display: block;\n }\n\n .tab-group {\n display: flex;\n border-radius: 0;\n }\n\n .tab-group__tabs {\n display: flex;\n position: relative;\n gap: var(--tab-gap);\n }\n\n .hide__track {\n --track-width: 0px;\n --tab-gap: 3px;\n }\n\n .tab-group__indicator {\n position: absolute;\n transition: 0.3s translate ease, 0.3s width ease;\n }\n\n .tab-group--has-scroll-controls .tab-group__nav-container {\n position: relative;\n padding: 0 10px;\n }\n\n .tab-group__body {\n display: block;\n overflow: auto;\n }\n\n .tab-group__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n bottom: 0;\n width: 20px;\n }\n\n .tab-group__scroll-button--start {\n left: 0;\n }\n\n .tab-group__scroll-button--end {\n right: 0;\n }\n\n .tab-group--rtl .tab-group__scroll-button--start {\n left: auto;\n right: 0;\n }\n\n .tab-group--rtl .tab-group__scroll-button--end {\n left: 0;\n right: auto;\n }\n\n /*\n * Top\n */\n\n .tab-group--top {\n flex-direction: column;\n }\n\n .tab-group--top .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group--top .tab-group__nav {\n display: flex;\n overflow-x: auto;\n\n /* Hide scrollbar in Firefox */\n scrollbar-width: none;\n }\n\n /* Hide scrollbar in Chrome/Safari */\n .tab-group--top .tab-group__nav::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n .tab-group--top .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n border-bottom: solid var(--track-width)\n var(--nile-colors-gray-light-mode-200);\n }\n\n .tab-group--top .tab-group__indicator {\n bottom: calc(-1 * var(--track-width));\n border-bottom: 2px solid var(--nile-colors-brand-600);\n }\n\n .tab-group--top .tab-group__body {\n order: 2;\n }\n\n .tab-group--top ::slotted(nile-tab-panel) {\n --padding: 10px 0;\n }\n\n /*\n * Bottom\n */\n\n .tab-group--bottom {\n flex-direction: column;\n }\n\n .tab-group--bottom .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group--bottom .tab-group__nav {\n display: flex;\n overflow-x: auto;\n\n /* Hide scrollbar in Firefox */\n scrollbar-width: none;\n }\n\n /* Hide scrollbar in Chrome/Safari */\n .tab-group--bottom .tab-group__nav::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n .tab-group--bottom .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n border-top: solid var(--track-width) var(--track-color);\n }\n\n .tab-group--bottom .tab-group__indicator {\n top: calc(-1 * var(--track-width));\n border-top: solid var(--track-width) var(--indicator-color);\n }\n\n .tab-group--bottom .tab-group__body {\n order: 1;\n }\n\n .tab-group--bottom ::slotted(nile-tab-panel) {\n --padding: 10px 0;\n }\n\n /*\n * Start\n */\n\n .tab-group--start {\n flex-direction: row;\n }\n\n .tab-group--start .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group--start .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n border-inline-end: solid var(--track-width) var(--track-color);\n }\n\n .tab-group--start .tab-group__indicator {\n right: calc(-1 * var(--track-width));\n border-right: solid var(--track-width) var(--indicator-color);\n }\n\n .tab-group--start.tab-group--rtl .tab-group__indicator {\n right: auto;\n left: calc(-1 * var(--track-width));\n }\n\n .tab-group--start .tab-group__body {\n flex: 1 1 auto;\n order: 2;\n }\n\n .tab-group--start ::slotted(nile-tab-panel) {\n --padding: 0 10px;\n }\n\n /*\n * End\n */\n\n .tab-group--end {\n flex-direction: row;\n }\n\n .tab-group--end .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group--end .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n border-left: solid var(--track-width) var(--track-color);\n }\n\n .tab-group--end .tab-group__indicator {\n left: calc(-1 * var(--track-width));\n border-inline-start: solid var(--track-width) var(--indicator-color);\n }\n\n .tab-group--end.tab-group--rtl .tab-group__indicator {\n right: calc(-1 * var(--track-width));\n left: auto;\n }\n\n .tab-group--end .tab-group__body {\n flex: 1 1 auto;\n order: 1;\n }\n\n .tab-group--end ::slotted(nile-tab-panel) {\n --padding: 0 10px;\n }\n\n .hide__track slot::slotted(nile-tab) {\n --tab-border-radius: 4px;\n --tab-padding:8px 12px;\n --tab-hover-background-color: #f9fafb;\n --tab-active-background-color: var(--nile-colors-brand-50);\n }\n"]))));}};});
1
+ System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var t,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){t=_index001CjsJs.i;}],execute:function execute(){_export("s",o=t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n [hidden] {\n display: none !important;\n }\n\n :host {\n --indicator-color: var(--nile-colors-primary-600);\n --track-color: #e5e9eb;\n --track-width: 2px;\n --tab-gap: 12px;\n\n display: block;\n }\n\n .tab-group {\n display: flex;\n border-radius: 0;\n }\n\n .tab-group__tabs {\n display: flex;\n position: relative;\n gap: var(--tab-gap);\n }\n\n .hide__track {\n --track-width: 0px;\n --tab-gap: 3px;\n }\n\n .tab-group__indicator {\n position: absolute;\n transition: 0.3s translate ease, 0.3s width ease;\n }\n\n .tab-group--has-scroll-controls .tab-group__nav-container {\n position: relative;\n padding: 0 10px;\n }\n\n .tab-group__body {\n display: block;\n overflow: auto;\n }\n\n .tab-group__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n bottom: 0;\n width: 20px;\n }\n\n .tab-group__scroll-button--start {\n left: 0;\n }\n\n .tab-group__scroll-button--end {\n right: 0;\n }\n\n .tab-group--rtl .tab-group__scroll-button--start {\n left: auto;\n right: 0;\n }\n\n .tab-group--rtl .tab-group__scroll-button--end {\n left: 0;\n right: auto;\n }\n\n /*\n * Top\n */\n\n .tab-group--top {\n flex-direction: column;\n }\n\n .tab-group--top .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group--top .tab-group__nav {\n display: flex;\n overflow-x: auto;\n\n /* Hide scrollbar in Firefox */\n scrollbar-width: none;\n }\n\n /* Hide scrollbar in Chrome/Safari */\n .tab-group--top .tab-group__nav::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n .tab-group--top .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n border-bottom: solid var(--track-width)\n var(--nile-colors-gray-light-mode-200);\n }\n\n .tab-group--top .tab-group__indicator {\n bottom: 2px;\n border-bottom: 2px solid var(--nile-colors-primary-600);\n }\n\n .tab-group--top .tab-group__body {\n order: 2;\n }\n\n .tab-group--top ::slotted(nile-tab-panel) {\n --padding: 10px 0;\n }\n\n /*\n * Bottom\n */\n\n .tab-group--bottom {\n flex-direction: column;\n }\n\n .tab-group--bottom .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group--bottom .tab-group__nav {\n display: flex;\n overflow-x: auto;\n\n /* Hide scrollbar in Firefox */\n scrollbar-width: none;\n }\n\n /* Hide scrollbar in Chrome/Safari */\n .tab-group--bottom .tab-group__nav::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n .tab-group--bottom .tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n border-top: solid var(--track-width) var(--track-color);\n }\n\n .tab-group--bottom .tab-group__indicator {\n top: calc(-1 * var(--track-width));\n border-top: solid var(--track-width) var(--indicator-color);\n }\n\n .tab-group--bottom .tab-group__body {\n order: 1;\n }\n\n .tab-group--bottom ::slotted(nile-tab-panel) {\n --padding: 10px 0;\n }\n\n /*\n * Start\n */\n\n .tab-group--start {\n flex-direction: row;\n }\n\n .tab-group--start .tab-group__nav-container {\n order: 1;\n }\n\n .tab-group--start .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n border-inline-end: solid var(--track-width) var(--track-color);\n }\n\n .tab-group--start .tab-group__indicator {\n right: calc(-1 * var(--track-width));\n border-right: solid var(--track-width) var(--indicator-color);\n }\n\n .tab-group--start.tab-group--rtl .tab-group__indicator {\n right: auto;\n left: calc(-1 * var(--track-width));\n }\n\n .tab-group--start .tab-group__body {\n flex: 1 1 auto;\n order: 2;\n }\n\n .tab-group--start ::slotted(nile-tab-panel) {\n --padding: 0 10px;\n }\n\n /*\n * End\n */\n\n .tab-group--end {\n flex-direction: row;\n }\n\n .tab-group--end .tab-group__nav-container {\n order: 2;\n }\n\n .tab-group--end .tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n border-left: solid var(--track-width) var(--track-color);\n }\n\n .tab-group--end .tab-group__indicator {\n left: calc(-1 * var(--track-width));\n border-inline-start: solid var(--track-width) var(--indicator-color);\n }\n\n .tab-group--end.tab-group--rtl .tab-group__indicator {\n right: calc(-1 * var(--track-width));\n left: auto;\n }\n\n .tab-group--end .tab-group__body {\n flex: 1 1 auto;\n order: 1;\n }\n\n .tab-group--end ::slotted(nile-tab-panel) {\n --padding: 0 10px;\n }\n\n .hide__track slot::slotted(nile-tab) {\n --tab-border-radius: 4px;\n --tab-padding:8px 12px;\n --tab-hover-background-color: #f9fafb;\n --tab-active-background-color: var(--nile-colors-brand-50);\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-tab-group.css.cjs.js.map