@geoblink/design-system
Version:
Geoblink Design System for Vue.js
1 lines • 7.86 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports["components/GeoCalendarNavigationMonth"]=t(require("lodash")):e["components/GeoCalendarNavigationMonth"]=t(e.lodash)}(window,function(e){return r={},t.m=n={"/Tr7":function(e,t,n){"use strict";function r(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}n.d(t,"a",function(){return r})},"2Ktv":function(e,t,n){"use strict";t.a={props:{currentMonth:{type:Number,required:!0,validator:function(e){return 0<=e&&e<=11}},currentYear:{type:Number,required:!0},earliestDate:{type:Date,required:!1},latestDate:{type:Date,required:!1},locale:{type:Object,required:!1}}}},33:function(e,t,n){e.exports=n("kLp9")},AF4N:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("/Tr7");function o(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Object(r.a)(e),o=Object(r.a)(t);return n.getFullYear()-o.getFullYear()}},"KHd+":function(e,t,n){"use strict";function r(e,t,n,r,o,a,i,u){var c,s="function"==typeof e?e.options:e;if(t&&(s.render=t,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),a&&(s._scopeId="data-v-"+a),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},s._ssrRegister=c):o&&(c=u?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(s.functional){s._injectStyles=c;var l=s.render;s.render=function(e,t){return c.call(t),l(e,t)}}else{var f=s.beforeCreate;s.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:s}}n.d(t,"a",function(){return r})},M34a:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("/Tr7");function o(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object(r.a)(e);return t.setHours(0,0,0,0),t}},YLtl:function(t,n){t.exports=e},cnyc:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("/Tr7");function o(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");return Object(r.a)(e).getFullYear()}},d60l:function(e,t,n){"use strict";n.r(t),n.d(t,"PICKER_DATE_UNITS",function(){return a}),n.d(t,"GRANULARITY_IDS",function(){return i}),n.d(t,"YEAR_GRID_CONSTANTS",function(){return u}),n.d(t,"DAY_GRID_CONSTANTS",function(){return c}),n.d(t,"MONTH_GRID_CONSTANTS",function(){return s}),n.d(t,"FOCUSABLE_INPUT_FIELDS",function(){return l}),n.d(t,"isDayUnavailable",function(){return f}),n.d(t,"isBefore",function(){return d}),n.d(t,"isAfter",function(){return p}),n.d(t,"isEqual",function(){return g}),n.d(t,"isWithinInterval",function(){return _});var r=n("/Tr7"),o=n("M34a"),a={day:"day",month:"month",year:"year"},i={day:"day",week:"week",month:"month",quarter:"quarter",year:"year"},u={MAX_YEAR:2099,MIN_YEAR:1970,YEARS_IN_GRID:16},c={TOTAL_DAYS_IN_WEEK:7,MONDAY_INDEX_IN_WEEK:1},s={NUMBER_OF_MONTHS_IN_GREGORIAN_CALENDAR:12},l={FROM_DATE:"FROM_DATE",TO_DATE:"TO_DATE"},f=function(e,t){return d(t,e.earliestDate)||p(t,e.latestDate)},d=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Object(r.a)(e),o=Object(r.a)(t);return n.getTime()<o.getTime()}(Object(o.a)(e),Object(o.a)(t))},p=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Object(r.a)(e),o=Object(r.a)(t);return n.getTime()>o.getTime()}(Object(o.a)(e),Object(o.a)(t))},g=function(e,t){return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Object(r.a)(e),o=Object(r.a)(t);return n.getTime()===o.getTime()}(Object(o.a)(e),Object(o.a)(t))},_=function(e,t){var n=t.start,a=t.end;return function(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=t||{},o=Object(r.a)(e).getTime(),a=Object(r.a)(n.start).getTime(),i=Object(r.a)(n.end).getTime();if(!(a<=i))throw new RangeError("Invalid interval");return a<=o&&o<=i}(Object(o.a)(e),{start:Object(o.a)(n),end:Object(o.a)(a)})}},kLp9:function(e,t,n){"use strict";n.r(t);var r=n("2Ktv"),o=n("tsZy"),a={name:"GeoCalendarNavigationMonth",status:"ready",release:"23.2.0",mixins:[r.a,o.a],props:{calendarNavigationSelectIcon:{type:Array,required:!0}}},i=n("KHd+"),u=Object(i.a)(a,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"geo-calendar-navigation__selects-container geo-calendar-navigation--month"},[n("geo-select-base",{ref:"selectBase",attrs:{opened:e.isYearSelectionOpened,"fixed-width":!1,"popup-class":"geo-calendar-navigation-selection","data-ut":"year-select"},on:{"click-outside":e.closeYearSelection}},[n("geo-tertiary-button",{attrs:{slot:"toggleButton"},on:{click:e.toggleYearSelection},slot:"toggleButton"},[e._v("\n "+e._s(e.currentYear)+"\n "),e.numYearsWithData?n("font-awesome-icon",{staticClass:"geo-calendar-navigation-toggle-button-icon",attrs:{"fixed-width":"",icon:e.calendarNavigationSelectIcon}}):e._e()],1),e._v(" "),n("div",e._l(e.yearsList,function(t){return n("geo-list-item",{key:t,on:{click:function(n){return e.goToYear(t)}}},[e._v("\n "+e._s(t)+"\n ")])}),1)],1)],1)},[],!1,null,null,null);t.default=u.exports},tsZy:function(e,t,n){"use strict";var r=n("YLtl"),o=n.n(r),a=n("AF4N"),i=n("cnyc"),u=n("d60l");t.a={data:function(){return{isYearSelectionOpened:!1}},computed:{earliestYearInSelect:function(){return this.earliestDate||new Date(u.YEAR_GRID_CONSTANTS.MIN_YEAR,0)},latestYearInSelect:function(){return this.latestDate||new Date(u.YEAR_GRID_CONSTANTS.MAX_YEAR,0)},numYearsWithData:function(){return Object(a.a)(this.latestYearInSelect,this.earliestYearInSelect)+1},yearsList:function(){var e=Object(i.a)(this.earliestYearInSelect);return o.a.times(this.numYearsWithData,function(t){return e++})}},methods:{closeYearSelection:function(){this.isYearSelectionOpened=!1},goToYear:function(e){this.closeYearSelection(),this.$emit("go-to-year",e)},toggleYearSelection:function(){this.isYearSelectionOpened=!this.isYearSelectionOpened}}}}},t.c=r,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=33);function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n,r});