ngx-animating-datepicker 1.2.1 → 2.0.0
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 +8 -0
- package/fesm2022/ngx-animating-datepicker.mjs +1534 -0
- package/fesm2022/ngx-animating-datepicker.mjs.map +1 -0
- package/package.json +32 -17
- package/types/ngx-animating-datepicker.d.ts +551 -0
- package/bundles/ngx-animating-datepicker.umd.js +0 -2611
- package/bundles/ngx-animating-datepicker.umd.js.map +0 -1
- package/bundles/ngx-animating-datepicker.umd.min.js +0 -2
- package/bundles/ngx-animating-datepicker.umd.min.js.map +0 -1
- package/esm2015/lib/components/animatepicker/animatepicker.component.js +0 -486
- package/esm2015/lib/components/datepicker/datepicker.component.js +0 -715
- package/esm2015/lib/components/datepicker/datepicker.directive.js +0 -407
- package/esm2015/lib/components/datepicker/datepicker.options.js +0 -41
- package/esm2015/lib/components/navigation/navigation.component.js +0 -233
- package/esm2015/lib/components/sub-navigation/sub-navigation.component.js +0 -48
- package/esm2015/lib/models/datepicker-options.model.js +0 -35
- package/esm2015/lib/models/datepicker.model.js +0 -75
- package/esm2015/lib/models/directive-options.model.js +0 -19
- package/esm2015/lib/ngx-animating-datepicker.module.js +0 -35
- package/esm2015/lib/services/datepicker.service.js +0 -161
- package/esm2015/lib/services/utilities.service.js +0 -56
- package/esm2015/ngx-animating-datepicker.js +0 -13
- package/esm2015/public_api.js +0 -8
- package/esm5/lib/components/animatepicker/animatepicker.component.js +0 -584
- package/esm5/lib/components/datepicker/datepicker.component.js +0 -940
- package/esm5/lib/components/datepicker/datepicker.directive.js +0 -498
- package/esm5/lib/components/datepicker/datepicker.options.js +0 -41
- package/esm5/lib/components/navigation/navigation.component.js +0 -298
- package/esm5/lib/components/sub-navigation/sub-navigation.component.js +0 -48
- package/esm5/lib/models/datepicker-options.model.js +0 -35
- package/esm5/lib/models/datepicker.model.js +0 -75
- package/esm5/lib/models/directive-options.model.js +0 -19
- package/esm5/lib/ngx-animating-datepicker.module.js +0 -39
- package/esm5/lib/services/datepicker.service.js +0 -307
- package/esm5/lib/services/utilities.service.js +0 -73
- package/esm5/ngx-animating-datepicker.js +0 -13
- package/esm5/public_api.js +0 -8
- package/fesm2015/ngx-animating-datepicker.js +0 -1911
- package/fesm2015/ngx-animating-datepicker.js.map +0 -1
- package/fesm5/ngx-animating-datepicker.js +0 -2546
- package/fesm5/ngx-animating-datepicker.js.map +0 -1
- package/lib/components/animatepicker/animatepicker.component.d.ts +0 -114
- package/lib/components/datepicker/datepicker.component.d.ts +0 -191
- package/lib/components/datepicker/datepicker.directive.d.ts +0 -92
- package/lib/components/datepicker/datepicker.options.d.ts +0 -20
- package/lib/components/navigation/navigation.component.d.ts +0 -52
- package/lib/components/sub-navigation/sub-navigation.component.d.ts +0 -8
- package/lib/models/datepicker-options.model.d.ts +0 -14
- package/lib/models/datepicker.model.d.ts +0 -29
- package/lib/models/directive-options.model.d.ts +0 -6
- package/lib/ngx-animating-datepicker.module.d.ts +0 -2
- package/lib/services/datepicker.service.d.ts +0 -77
- package/lib/services/utilities.service.d.ts +0 -12
- package/ngx-animating-datepicker-1.2.0.tgz +0 -0
- package/ngx-animating-datepicker-1.2.1.tgz +0 -0
- package/ngx-animating-datepicker.d.ts +0 -8
- package/ngx-animating-datepicker.metadata.json +0 -1
- package/public_api.d.ts +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-animating-datepicker.umd.js.map","sources":[null,"ng://ngx-animating-datepicker/lib/services/datepicker.service.ts","ng://ngx-animating-datepicker/lib/services/utilities.service.ts","ng://ngx-animating-datepicker/lib/components/datepicker/datepicker.options.ts","ng://ngx-animating-datepicker/lib/components/datepicker/datepicker.component.ts","ng://ngx-animating-datepicker/lib/components/animatepicker/animatepicker.component.ts","ng://ngx-animating-datepicker/lib/components/datepicker/datepicker.directive.ts","ng://ngx-animating-datepicker/lib/components/sub-navigation/sub-navigation.component.ts","ng://ngx-animating-datepicker/lib/components/navigation/navigation.component.ts","ng://ngx-animating-datepicker/lib/ngx-animating-datepicker.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { Day, Week } from '../models/datepicker.model';\n\n@Injectable()\nexport class DatepickerService {\n\t/**\n\t * Get the formatted weekdays\n\t *\n\t * @param language\n\t * @param format\n\t * @param start\n\t */\n\tstatic getWeekDays(language: string, format: string, start: string): string[] {\n\t\tconst days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];\n\n\t\tconst index = days.indexOf(start.toLowerCase());\n\t\tif (index < 0) {\n\t\t\tthrow new Error('Invalid week day start: ' + start);\n\t\t}\n\n\t\tconst weekdays = [];\n\t\tfor (let day = 5; day <= 11; day++) {\n\t\t\tweekdays.push(new Date(1970, 1 - 1, day + index).toLocaleString(language, { weekday: format }));\n\t\t}\n\n\t\treturn weekdays;\n\t}\n\n\t/**\n\t * Checks if is a value iso code\n\t *\n\t * @param isoCode\n\t */\n\tstatic isValidIsoCode(isoCode: string): boolean {\n\t\tconst pattern = new RegExp(/([a-z]{2})-([A-Z]{2})/);\n\t\treturn pattern.test(isoCode);\n\t}\n\n\t/**\n\t * Create a week array from the merged day arrays\n\t *\n\t * @param dayArray\n\t */\n\tstatic createWeekArray(dayArray: Day[]): Week[] {\n\t\tconst size = 7;\n\t\tconst weeks = [];\n\t\twhile (dayArray.length) {\n\t\t\tweeks.push({\n\t\t\t\tdays: dayArray.splice(0, size)\n\t\t\t});\n\t\t}\n\t\treturn weeks;\n\t}\n\n\tstatic getDaysInMonth(year: number, month: number): number {\n\t\treturn [31, DatepickerService.isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n\t}\n\n\tstatic isValidDate(value: any): boolean {\n\t\tlet validDate = true;\n\n\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\tif (!DatepickerService.isDate(value[i]) && validDate) {\n\t\t\t\tvalidDate = false;\n\t\t\t}\n\t\t}\n\n\t\treturn validDate;\n\t}\n\n\t/**\n\t * Check if year is a leap year\n\t *\n\t * @param year\n\t */\n\tstatic isLeapYear(year: number): boolean {\n\t\treturn (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n\t}\n\n\t/**\n\t * Checks to see if value is a valid date\n\t *\n\t * @param value\n\t */\n\tstatic isDate(value: Date) {\n\t\treturn value instanceof Date;\n\t}\n\n\t/**\n\t * Get the year of the next month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tstatic getYearOfNextMonth(year: number, month: number): number {\n\t\treturn month === 11 ? year + 1 : year;\n\t}\n\n\t/**\n\t * Get the next month\n\t *\n\t * @param month\n\t */\n\tstatic getNextMonth(month: number): number {\n\t\treturn month === 11 ? 0 : month + 1;\n\t}\n\n\t/**\n\t * Get the year of the previous month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tstatic getYearOfPreviousMonth(year: number, month: number): number {\n\t\treturn month === 0 ? year - 1 : year;\n\t}\n\n\t/**\n\t * Get previous motnh\n\t *\n\t * @param month\n\t */\n\tstatic getPreviousMonth(month: number): number {\n\t\treturn month === 0 ? 11 : month - 1;\n\t}\n\n\t/**\n\t * Check if a date is later\n\t *\n\t * @param date\n\t * @param compareDate\n\t */\n\tstatic isLater(date: Date, compareDate: Date): boolean {\n\t\treturn date > compareDate;\n\t}\n\n\t/**\n\t * Check if a date is ealrier\n\t *\n\t * @param date\n\t * @param compareDate\n\t */\n\tstatic isEarlier(date: Date, compareDate: Date): boolean {\n\t\treturn date < compareDate;\n\t}\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class UtilitiesService {\n\tprivate static getScrollOffset() {\n\t\tconst x = window.pageXOffset || document.documentElement.scrollLeft;\n\t\tconst y = window.pageYOffset || document.documentElement.scrollTop;\n\t\treturn { x: x, y: y };\n\t}\n\n\tstatic getPageOffset(el: HTMLElement) {\n\t\tconst scrollOffset = UtilitiesService.getScrollOffset();\n\t\tconst width = el.offsetWidth;\n\t\tconst height = el.offsetHeight;\n\n\t\tif (el.getBoundingClientRect) {\n\t\t\tconst props = el.getBoundingClientRect();\n\t\t\tconst position = {\n\t\t\t\ttop: props.top + scrollOffset.y,\n\t\t\t\tleft: props.left + scrollOffset.x,\n\t\t\t\tright: props.left + scrollOffset.x + width,\n\t\t\t\tbottom: props.top + scrollOffset.y + height,\n\t\t\t\tforRight: window.innerWidth - props.left,\n\t\t\t\tforBottom: window.innerHeight - (props.top + scrollOffset.y)\n\t\t\t};\n\n\t\t\treturn position;\n\t\t}\n\t}\n\n\tcreateArray(start: number, end: number): number[] {\n\t\treturn new Array(end - start + 1).fill(1).map((_, idx) => start + idx);\n\t}\n}\n","export const DefaultOptions = {\n\tselectMultiple: false, // Select multiple dates\n\tcloseOnSelect: false, // Close datepicker when date(s) selected\n\tanimationSpeed: 400, // Animation speed in ms\n\teasing: 'ease-in', // Easing type string\n\thideRestDays: false, // Hide the rest days\n\tdisableRestDays: true, // Disable the click on rest days\n\thideNavigation: false, // Hide the navigation\n\trange: false, // Use range functionality\n\tcurrentDate: new Date(), // Tne current displayed date (month, year)\n\ttimeoutBeforeClosing: 300, // The timeout / delay before closing\n\tweekdayFormat: 'short', // \"narrow\", \"short\", \"long\"\n\tweekStart: 'monday' // Set the week start day\n};\n\nexport const DefaultDirectiveOptions = {\n\tappendToBody: true, // Append Datepicker to body\n\topenDirection: 'bottom', // The direction it should open to\n\tcloseOnBlur: true, // Close the datepicker onBlur\n\tuseAnimatePicker: true // Use the animatepickerComponent\n};\n","import { Component, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { Options } from '../../models/datepicker-options.model';\nimport {YearMonth, Day, Month, Week} from '../../models/datepicker.model';\nimport { DatepickerService } from '../../services/datepicker.service';\nimport { UtilitiesService } from '../../services/utilities.service';\nimport { DefaultOptions } from './datepicker.options';\n\n@Component({\n\tselector: 'aa-datepicker',\n\ttemplate: `<div class=\"datepicker__wrapper\">\n\t<div>\n\t\t<aa-navigation\n\t\t\t\t[hideNavigation]=\"options.hideNavigation\"\n (previousClick)=\"goToPreviousMonth()\"\n\t\t\t\t(nextClick)=\"goToNextMonth()\"\n\t\t\t\t[language]=\"language\"\n\t\t\t\t[totalYearMonth]=\"totalYearMonth\"></aa-navigation>\n\t\t<div class=\"datepicker__weekdays-wrapper\">\n\t\t\t<div class=\"datepicker__weekdays-container\">\n\t\t\t\t<table class=\"datepicker__weekdays\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t<td class=\"datepicker__weekday\" *ngFor=\"let weekday of weekdays; index as i\">{{weekday}}</td>\n\t\t\t\t\t</thead>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"datepicker__calendar-wrapper\">\n\t\t<div *ngFor=\"let month of months;\" class=\"datepicker__calendar-container\">\n\t\t\t<table class=\"datepicker__calendar\">\n\t\t\t\t<tbody>\n\t\t\t\t<tr *ngFor=\"let week of month.weeks; index as i\">\n\t\t\t\t\t<td class=\"datepicker__day\" *ngFor=\"let day of week.days; index as i\" [ngClass]=\"{\n\t\t\t'is-first': day.isFirst,\n\t\t\t'is-last': day.isLast,\n\t\t\t'is-hidden': day.isHidden,\n\t\t\t'is-disabled': day.isDisabled,\n\t\t\t'is-today': day.isToday,\n\t\t\t'is-selected': day.isSelected,\n\t\t\t'is-in-range': day.isInRange,\n\t\t\t'is-start-date': day.isStartDate,\n\t\t\t'is-end-date': day.isEndDate,\n\t\t\t'is-rest': day.isRest\n\t\t\t}\">\n\t\t\t\t\t\t<button class=\"datepicker__button\" [disabled]=\"day.isDisabled || day.isHidden\"\n\t\t\t\t\t\t\t\t(click)=\"updateValue(day.date)\">{{day.dayNumber}}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</div>\n\t<ng-content></ng-content>\n</div>`,\n\tstyles: [`:host{font-family:Arial,Helvetica,sans-serif;border:1px solid #d9d9d8;width:300px;position:relative;display:inline-block;z-index:2;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.15);overflow:hidden;background-color:#fff;box-sizing:border-box;visibility:hidden}:host *{box-sizing:border-box}:host .datepicker__calendar-container{padding:0 10px 10px}:host .datepicker__footer{position:relative;z-index:1}:host table{width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse}:host td{padding:0}:host .datepicker__weekdays-wrapper::after,:host .datepicker__weekdays-wrapper::before{content:' ';display:table}:host .datepicker__weekdays-wrapper::after{clear:both}:host .datepicker__weekdays-container{padding:10px 10px 0;float:left}:host .datepicker__weekdays{table-layout:fixed;width:100%}:host .datepicker__weekday{color:grey;font-size:12px;height:20px;text-align:center}:host .datepicker__day{position:relative;text-align:center;height:40px;width:auto;border:1px solid #d9d9d8}:host .datepicker__day.is-rest{border:none}:host .datepicker__button{padding:0;background-color:transparent;border:none;outline:0;font-style:inherit;cursor:pointer;color:#8e8d8a;width:100%;height:100%}:host .datepicker__button:hover{border:1px solid transparent;background-color:#f2f2f2;color:#8e8d8a}:host .is-hidden{opacity:0;display:table-cell}:host .is-rest{border:none}:host .is-rest .datepicker__button{color:#c0c0be}:host .is-today .datepicker__button{background-color:#eae7dc}:host .is-in-range .datepicker__button{background-color:#e98074;color:#fff}:host .is-in-range .datepicker__button:hover{background-color:#e66c5e}:host .is-selected .datepicker__button{background-color:#e85a4f;color:#fff;font-weight:700}:host .is-selected .datepicker__button:hover{background-color:#e23022}:host .is-start-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-end-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-disabled .datepicker__button{color:#d9d9d8;cursor:default}:host .is-disabled .datepicker__button:hover{background-color:transparent}:host.is-directive{visibility:hidden;position:absolute}:host.is-open{visibility:visible}:host.is-animate{transition:height .2s ease-in;width:300px}:host.is-animate .datepicker__main{transition:height .2s ease-in}:host.is-animate .datepicker__calendar-wrapper{position:absolute;width:200%;left:0}:host.is-animate .datepicker__calendar{float:left;width:100%}:host.is-animate .datepicker__calendar-container{float:left}`]\n})\nexport class DatepickerComponent implements OnInit {\n\t/* ==============================================\n\t * Internal Properties\n\t * ============================================== */\n\tpublic date: Date = new Date();\n\tpublic year: number = null;\n\tpublic month: number = null;\n\tpublic today: Date = this.date;\n\tpublic months: Month[] = null;\n\tpublic weekdays: string[] = ['M', 'T', 'W', 'T', 'F', 'S', 'S'];\n\tpublic totalYearMonth: YearMonth[];\n\tpublic selectedRange = 'startDate';\n\tpublic startDate: Date = null;\n\tpublic endDate: Date = null;\n\tpublic initialised = false;\n\tprivate weekStartArray = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];\n\n\t/* ==============================================\n\t * Initial Options\n\t * ============================================== */\n\tpublic _options: Options = DefaultOptions;\n\t@Input('options')\n\tset options(options: Options) {\n\t\tif (options === undefined || !options) {\n\t\t\treturn;\n\t\t}\n\t\tthis._options = { ...this._options, ...options };\n\n\t\tif (options.currentDate !== undefined) {\n\t\t\tthis.date = this.options.currentDate;\n\t\t}\n\n\t\tif (this.initialised) {\n\t\t\tthis.goToDate();\n\t\t}\n\t}\n\n\tget options(): Options {\n\t\treturn this._options;\n\t}\n\n\t/* ==============================================\n\t * External Properties\n\t * ============================================== */\n\n\t/**\n\t * Set the the language manualy. A string with a BCP 47 language tag\n\t * @example nl-NL\n\t */\n\t_language = navigator.language;\n\t@Input()\n\tset language(value: string) {\n\t\tif (!value || value === undefined || !DatepickerService.isValidIsoCode(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._language = value;\n\n\t\tthis.renderWeekdays();\n\t}\n\n\tget language() {\n\t\treturn this._language;\n\t}\n\n\t/**\n\t * Minimal Date: If set the dates before it will be disabled\n\t */\n\tpublic _minDate = null;\n\t@Input()\n\tset minDate(value: Date) {\n\t\tif (value === undefined || value === this._minDate) {\n\t\t\treturn;\n\t\t}\n\t\tthis._minDate = new Date(value);\n\t\tthis.goToDate();\n\t}\n\n\tget minDate(): Date {\n\t\treturn this._minDate;\n\t}\n\n\t/**\n\t * Maximal Date: If set the dates after it will be disabled\n\t */\n\tpublic _maxDate = null;\n\t@Input()\n\tset maxDate(value: Date) {\n\t\tif (value === undefined || value === this._minDate) {\n\t\t\treturn;\n\t\t}\n\t\tthis._maxDate = new Date(value);\n\t\tthis.goToDate();\n\t}\n\n\tget maxDate(): Date {\n\t\treturn this._maxDate;\n\t}\n\n\t/**\n\t * Selected Dates: handles the selected dates array. Can be set both internally and externally\n\t */\n\tprivate _selectedDates: Date[] = [];\n\t@Output() selectedDatesChange = new EventEmitter();\n\n\t@Input()\n\tset selectedDates(value: Date[]) {\n\t\tconst _value = Array.isArray(value) ? value : [value];\n\t\tif (!DatepickerService.isValidDate(_value)) {\n\t\t\treturn;\n\t\t}\n\t\tthis._selectedDates = _value;\n\n\t\tif (this.options.range) {\n\t\t\tthis.resetRange();\n\t\t}\n\n\t\tthis.goToDate();\n\n\t\tthis.selectedDatesChange.emit(this._selectedDates);\n\t}\n\n\tget selectedDates(): Date[] {\n\t\treturn this._selectedDates;\n\t}\n\n\t/* ==============================================\n\t * Bindings and Children\n\t * ============================================== */\n\t@ViewChild('calendarContainer') public calendarContainer: ElementRef;\n\t@ViewChild('calendarTopContainer') public calendarTopContainer: ElementRef;\n\t@HostBinding('class')\n\t@Input()\n\ttheme = '';\n\t@HostBinding('class.is-open')\n\t@Input()\n\tisOpen = true;\n\t@HostBinding('class.is-directive') asDirective = false;\n\t@HostBinding('class.is-animate') animate = false;\n\t@HostBinding('style.top.px') topPosition: number = null;\n\t@HostBinding('style.left.px') leftPosition: number = null;\n\t@HostBinding('style.bottom.px') bottomPosition: number = null;\n\t@HostBinding('style.right.px') rightPosition: number = null;\n\n\tconstructor(public utils: UtilitiesService, public element: ElementRef) {}\n\n\tngOnInit() {\n\t\tthis.initialised = true;\n\n\t\tif (!this.month && !this.year) {\n\t\t\tthis.goToDate(this.options.currentDate);\n\t\t}\n\t}\n\n\t/**\n\t * Creates a day array\n\t *\n\t * @param year\n\t * @param month\n\t * @param isRestDays\n\t */\n\tcreateDayArray(year: number, month: number, isRestDays?: boolean): Day[] {\n\t\tconst days = [];\n\t\tconst daysInMonth = DatepickerService.getDaysInMonth(year, month);\n\t\tfor (let index = 0; index < daysInMonth; index++) {\n\t\t\tconst dayNumber = index + 1;\n\t\t\tconst date = new Date(year, month, dayNumber);\n\t\t\tconst day = {\n\t\t\t\tdate,\n\t\t\t\tdayNumber,\n\t\t\t\tisFirst: dayNumber === 1,\n\t\t\t\tisLast: dayNumber === daysInMonth,\n\t\t\t\tisToday: this.isToday(date),\n\t\t\t\tisSelected: this.isSelected(date),\n\t\t\t\tisRest: isRestDays,\n\t\t\t\tisHidden: isRestDays && this.options.hideRestDays,\n\t\t\t\tisDisabled:\n\t\t\t\t\t((this.minDate || this.maxDate) && this.isDisabled(date)) ||\n\t\t\t\t\t(isRestDays && this.options.disableRestDays),\n\t\t\t\tisInRange:\n\t\t\t\t\tthis.isInRange(date) ||\n\t\t\t\t\t((this.isStartDate(date) || this.isEndDate(date)) && this.startDate && this.endDate),\n\t\t\t\tisStartDate: this.isStartDate(date),\n\t\t\t\tisEndDate: this.isEndDate(date)\n\t\t\t};\n\t\t\tdays.push(day);\n\t\t}\n\n\t\treturn days;\n\t}\n\n\t/**\n\t * Get the days from the next month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetNextRestDays(year: number, month: number): Day[] {\n\t\tconst monthLength = DatepickerService.getDaysInMonth(year, month);\n\t\tconst weekStartIndex = this.weekStartArray.indexOf(this.options.weekStart);\n\n\t\t// Get the end of the month number minus the week start index\n\t\tconst endOfTheMonth = new Date(year, month, monthLength).getDay() - weekStartIndex;\n\n\t\t// Flip minus to plus when the end month number is minus.\n\t\t// this occurs when there are less rest days then the week start index\n\t\tconst _endOfTheMonth = endOfTheMonth < 0 ? 7 - Math.abs(endOfTheMonth) : endOfTheMonth;\n\t\tconst nextDays = this.createDayArray(\n\t\t\tDatepickerService.getYearOfNextMonth(year, month),\n\t\t\tDatepickerService.getNextMonth(month),\n\t\t\ttrue\n\t\t).slice(0, 7 - _endOfTheMonth);\n\t\treturn nextDays.length > 6 ? [] : nextDays;\n\t}\n\n\t/**\n\t * Get the days of the previous month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetPreviousRestDays(year: number, month: number): Day[] {\n\t\tconst startOfTheMonth = new Date(year, month, 0).getDay();\n\t\tconst previousDays = this.createDayArray(\n\t\t\tDatepickerService.getYearOfPreviousMonth(year, month),\n\t\t\tDatepickerService.getPreviousMonth(month),\n\t\t\ttrue\n\t\t);\n\t\tconst weekStartIndex = this.weekStartArray.indexOf(this.options.weekStart);\n\t\tconst _weekStartIndex = weekStartIndex === 0 ? 0 : (7 - weekStartIndex);\n\t\tlet sliceIndex = previousDays.length - startOfTheMonth - _weekStartIndex;\n\t\tsliceIndex = previousDays.length - sliceIndex >= 7 ? sliceIndex + 7 : sliceIndex\n\t\treturn previousDays.slice(sliceIndex, previousDays.length);\n\t}\n\n\t/**\n\t * Merge all the day arrays together\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetMergedDayArrays(year: number, month: number): Day[] {\n\t\treturn [\n\t\t\t...this.getPreviousRestDays(year, month),\n\t\t\t...this.createDayArray(year, month),\n\t\t\t...this.getNextRestDays(year, month)\n\t\t];\n\t}\n\n\t/**\n\t * Create the calendar array from the week arrays\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tcreateCalendarArray(year: number, month: number): [{ weeks: Week[] }] {\n\t\tconst dayArray = this.getMergedDayArrays(year, month);\n\t\tconst weeks = DatepickerService.createWeekArray(dayArray);\n\t\treturn [{ weeks: weeks }];\n\t}\n\n\t/**\n\t * Update value is being triggered\n\t *\n\t * @param date\n\t */\n\tupdateValue(date: Date): void {\n\t\tif (this.options.range) {\n\t\t\tthis.selectRange(date);\n\t\t} else if (!this.isSelected(date)) {\n\t\t\tif (this.options.selectMultiple) {\n\t\t\t\tthis.selectDate(date);\n\t\t\t} else {\n\t\t\t\tthis.toggleDate(date);\n\t\t\t}\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.deselectDate(date);\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t}\n\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Select range method - contains the logic to select the start- and endrange\n\t *\n\t * @param date\n\t */\n\tselectRange(date: Date): void {\n\t\tif (this.isSelected(date)) {\n\t\t\tthis.deselectDate(date);\n\t\t} else if (DatepickerService.isEarlier(date, this.startDate)) {\n\t\t\tif (this.startDate) {\n\t\t\t\tthis.toggleDate(date, this.startDate, true);\n\t\t\t} else {\n\t\t\t\tthis.selectDate(date);\n\t\t\t}\n\t\t\tthis.startDate = date;\n\t\t\tthis.selectEndDate();\n\t\t} else if (this.endDate && DatepickerService.isLater(date, this.endDate)) {\n\t\t\tthis.toggleDate(date, this.endDate);\n\t\t\tthis.endDate = date;\n\t\t\tthis.selectStartDate();\n\t\t} else if (this.selectedRange === 'startDate') {\n\t\t\tif (this.startDate) {\n\t\t\t\tthis.toggleDate(date, this.startDate, true);\n\t\t\t} else {\n\t\t\t\tthis.selectDate(date);\n\t\t\t}\n\t\t\tthis.startDate = date;\n\t\t\tthis.selectEndDate();\n\t\t} else if (this.selectedRange === 'endDate') {\n\t\t\tif (this.endDate) {\n\t\t\t\tthis.toggleDate(date, this.endDate);\n\t\t\t} else {\n\t\t\t\tthis.selectDate(date);\n\t\t\t}\n\t\t\tthis.endDate = date;\n\t\t\tthis.selectStartDate();\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Reset the range if the selected dates change externally\n\t */\n\tresetRange(): void {\n\t\tif (this._selectedDates.length === 1) {\n\t\t\tthis.startDate = this._selectedDates[0];\n\t\t\tthis.endDate = null;\n\t\t} else if (this._selectedDates.length === 0) {\n\t\t\tthis.startDate = null;\n\t\t\tthis.endDate = null;\n\t\t}\n\t}\n\n\t/**\n\t * Toggle a date. One in, on out.\n\t *\n\t * @param date - Date to be toggled on\n\t * @param toggleDate - Optional set specific date to toggle off\n\t * @param unshift - Optional set to unshift in the selectedDates array. is passed to selectDate method\n\t */\n\ttoggleDate(date: Date, toggleDate?: Date, unshift?: boolean): void {\n\t\tif (!toggleDate) {\n\t\t\tthis.selectedDates = [date];\n\t\t} else if (unshift) {\n\t\t\tthis._selectedDates.unshift(date);\n\t\t\tthis.selectedDates = this._selectedDates.filter(selectedDate => {\n\t\t\t\treturn selectedDate.toDateString() !== toggleDate.toDateString();\n\t\t\t});\n\t\t} else {\n\t\t\tthis._selectedDates.push(date);\n\t\t\tthis.selectedDates = this._selectedDates.filter(selectedDate => {\n\t\t\t\treturn selectedDate.toDateString() !== toggleDate.toDateString();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Select a date\n\t *\n\t * @param date\n\t * @param unshift - Optional set to unshift instead of push the date in the selectedDates array\n\t */\n\tselectDate(date: Date, unshift?: boolean): void {\n\t\tconst selectedDates = [...this.selectedDates];\n\n\t\tif (unshift) {\n\t\t\tselectedDates.unshift(date);\n\t\t} else {\n\t\t\tselectedDates.push(date);\n\t\t}\n\n\t\tthis.selectedDates = selectedDates;\n\t}\n\n\t/**\n\t * Deselect a date\n\t *\n\t * @param date\n\t */\n\tdeselectDate(date: Date): void {\n\t\tthis.selectedDates = this._selectedDates.filter(selectedDate => {\n\t\t\treturn selectedDate.toDateString() !== date.toDateString();\n\t\t});\n\t}\n\n\t/**\n\t * Go to the next month\n\t */\n\tgoToNextMonth(): void {\n\t\tthis.year = DatepickerService.getYearOfNextMonth(this.year, this.month);\n\t\tthis.month = DatepickerService.getNextMonth(this.month);\n\t\tthis.totalYearMonth = [{ month: this.month, year: this.year }];\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Go to the previous month\n\t */\n\tgoToPreviousMonth(): void {\n\t\tthis.year = DatepickerService.getYearOfPreviousMonth(this.year, this.month);\n\t\tthis.month = DatepickerService.getPreviousMonth(this.month);\n\t\tthis.totalYearMonth = [{ month: this.month, year: this.year }];\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Go to a specific month. Is also used to rerender the datepicker\n\t *\n\t * @param date - default is the current date.\n\t */\n\tgoToDate(date: Date = this.date): void {\n\t\tthis.month = date.getMonth();\n\t\tthis.year = date.getFullYear();\n\t\tthis.totalYearMonth = [{ month: this.month, year: this.year }];\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Render weekdays when options or language changes\n\t */\n\trenderWeekdays() {\n\t\tthis.weekdays = DatepickerService.getWeekDays(\n\t\t\tthis._language,\n\t\t\tthis.options.weekdayFormat,\n\t\t\tthis.options.weekStart\n\t\t);\n\t}\n\n\t/**\n\t * Set the open state to true\n\t */\n\topen(): void {\n\t\tif (this.isOpen) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isOpen = true;\n\t}\n\n\t/**\n\t * Close the datepicker\n\t *\n\t * @param useTimeout - optional timeout\n\t */\n\tclose(useTimeout?: boolean): void {\n\t\tif (!this.isOpen) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst timeout = useTimeout ? this.options.timeoutBeforeClosing : 0;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.isOpen = false;\n\t\t}, timeout);\n\t}\n\n\t/**\n\t * Select the start date - used for range functionality\n\t */\n\tselectStartDate(): void {\n\t\tthis.selectedRange = 'startDate';\n\t}\n\n\t/**\n\t * Select the end date - used for range functionality\n\t */\n\tselectEndDate(): void {\n\t\tthis.selectedRange = 'endDate';\n\t}\n\n\t// TODO: maybe output the startDate and Endate or just of internal use\n\t/**\n\t * Check if date is the start date\n\t */\n\tisStartDate(date: Date): boolean {\n\t\treturn this.startDate && date.toDateString() === this.startDate.toDateString();\n\t}\n\n\t/**\n\t * Check if date is the end date\n\t */\n\tisEndDate(date: Date): boolean {\n\t\treturn this.endDate && date.toDateString() === this.endDate.toDateString();\n\t}\n\n\t/**\n\t * Check if date is today\n\t */\n\tisToday(date: Date): boolean {\n\t\treturn date.toDateString() === this.today.toDateString();\n\t}\n\n\t/**\n\t * Check if date is selected\n\t */\n\tisSelected(dateToCheck: Date): boolean {\n\t\treturn this._selectedDates.map(date => date.toDateString()).indexOf(dateToCheck.toDateString()) !== -1;\n\t}\n\n\t/**\n\t * Check if date is disabled\n\t */\n\tisDisabled(date: Date): boolean {\n\t\tif (!this.minDate) {\n\t\t\treturn !(date < this.maxDate);\n\t\t}\n\n\t\tif (!this.maxDate) {\n\t\t\treturn !(date > this.minDate);\n\t\t}\n\n\t\treturn !(date < this.maxDate && date > this.minDate);\n\t}\n\n\t/**\n\t * Check if date is in range\n\t */\n\tisInRange(date: Date): boolean {\n\t\treturn this.startDate && this.endDate && this.startDate < date && date < this.endDate;\n\t}\n}\n","import {\n\tAfterViewInit,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tInput,\n\tOnInit,\n\tViewChild,\n} from '@angular/core';\nimport { YearMonth, Month } from '../../models/datepicker.model';\nimport { DatepickerService } from '../../services/datepicker.service';\nimport { UtilitiesService } from '../../services/utilities.service';\nimport { DatepickerComponent } from '../datepicker/datepicker.component';\n\n@Component({\n\tselector: 'aa-animatepicker',\n\ttemplate: `<div class=\"datepicker__wrapper\" [ngStyle]=\"datepickerPosition\">\n\t<div #calendarTopContainer>\n\t\t<div class=\"datepicker__header\" #header>\n\t\t\t<ng-content select=\"header\"></ng-content>\n\t\t</div>\n\t\t<aa-navigation\n\t\t\t\t(previousClick)=\"goToPreviousMonth()\"\n\t\t\t\t(nextClick)=\"goToNextMonth()\"\n\t\t\t\t(subNavigationClick)=\"goToDate($event)\"\n\t\t\t\t[language]=\"language\"\n\t\t\t\t[animate]=\"animate\"\n\t\t\t\t[translateX]=\"translateX\"\n\t\t\t\t[transition]=\"transition\"\n\t\t\t\t[leftPosition]=\"leftInnerPosition\"\n\t\t\t\t[hideNavigation]=\"options.hideNavigation\"\n\t\t\t\t[totalYearMonth]=\"totalYearMonth\"\n\t\t></aa-navigation>\n\n\t\t<div class=\"datepicker__weekdays-wrapper\">\n\t\t\t<div \t*ngFor=\"let month of numberOfMonths\"\n\t\t\t\t\t[ngStyle]=\"{\n\t\t\t\t'width.%': (100 / numberOfMonths.length)\n\t\t\t\t}\"\n\t\t\t\t\tclass=\"datepicker__weekdays-container\">\n\t\t\t\t<table class=\"datepicker__weekdays\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t<td class=\"datepicker__weekday\" *ngFor=\"let weekday of weekdays; index as i\">{{weekday}}</td>\n\t\t\t\t\t</thead>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"datepicker__main\" [ngStyle]=\"{\n\t\t'height.px': calendarHeight}\">\n\t\t<div class=\"datepicker__calendar-wrapper\" #calendarContainer [ngStyle]=\"{\n\t\t\t\t\t'transform': 'translateX(' + translateX + '%)',\n\t\t\t\t\t'transition': transition,\n\t\t\t\t\t'left.%': leftInnerPosition\n\t\t\t\t\t}\"\n\t\t>\n\t\t\t<div\n\t\t\t\t\t*ngFor=\"let month of months;\"\n\t\t\t\t\tclass=\"datepicker__calendar-container\"\n\t\t\t\t\t[ngStyle]=\"{'width.%': calendarWidth}\"\n\t\t\t>\n\t\t\t\t<table class=\"datepicker__calendar\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let week of month.weeks; index as i\" class=\"datepicker__week\">\n\t\t\t\t\t\t<td class=\"datepicker__day\" *ngFor=\"let day of week.days; index as i\"\n\t\t\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'is-first': day.isFirst,\n\t\t\t\t\t\t'is-last': day.isLast,\n\t\t\t\t\t\t'is-hidden': day.isHidden,\n\t\t\t\t\t\t'is-disabled': day.isDisabled,\n\t\t\t\t\t\t'is-today': day.isToday,\n\t\t\t\t\t\t'is-selected': day.isSelected,\n\t\t\t\t\t\t'is-in-range': day.isInRange,\n\t\t\t\t\t\t'is-start-date': day.isStartDate,\n\t\t\t\t\t\t'is-end-date': day.isEndDate,\n\t\t\t\t\t\t'is-rest': day.isRest\n\t\t\t\t\t\t}\">\n\t\t\t\t\t\t\t<button class=\"datepicker__button\" [disabled]=\"day.isDisabled || day.isHidden\"\n\t\t\t\t\t\t\t\t\t(click)=\"updateValue(day.date)\">{{day.dayNumber}}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"datepicker__footer\" #footer>\n\t\t<ng-content select=\"footer\"></ng-content>\n\t</div>\n</div>\n\t\t`,\n\tstyles: [`:host{font-family:Arial,Helvetica,sans-serif;border:1px solid #d9d9d8;width:300px;position:relative;display:inline-block;z-index:2;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.15);overflow:hidden;background-color:#fff;box-sizing:border-box;visibility:hidden}:host *{box-sizing:border-box}:host .datepicker__calendar-container{padding:0 10px 10px}:host .datepicker__footer{position:relative;z-index:1}:host table{width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse}:host td{padding:0}:host .datepicker__weekdays-wrapper::after,:host .datepicker__weekdays-wrapper::before{content:' ';display:table}:host .datepicker__weekdays-wrapper::after{clear:both}:host .datepicker__weekdays-container{padding:10px 10px 0;float:left}:host .datepicker__weekdays{table-layout:fixed;width:100%}:host .datepicker__weekday{color:grey;font-size:12px;height:20px;text-align:center}:host .datepicker__day{position:relative;text-align:center;height:40px;width:auto;border:1px solid #d9d9d8}:host .datepicker__day.is-rest{border:none}:host .datepicker__button{padding:0;background-color:transparent;border:none;outline:0;font-style:inherit;cursor:pointer;color:#8e8d8a;width:100%;height:100%}:host .datepicker__button:hover{border:1px solid transparent;background-color:#f2f2f2;color:#8e8d8a}:host .is-hidden{opacity:0;display:table-cell}:host .is-rest{border:none}:host .is-rest .datepicker__button{color:#c0c0be}:host .is-today .datepicker__button{background-color:#eae7dc}:host .is-in-range .datepicker__button{background-color:#e98074;color:#fff}:host .is-in-range .datepicker__button:hover{background-color:#e66c5e}:host .is-selected .datepicker__button{background-color:#e85a4f;color:#fff;font-weight:700}:host .is-selected .datepicker__button:hover{background-color:#e23022}:host .is-start-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-end-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-disabled .datepicker__button{color:#d9d9d8;cursor:default}:host .is-disabled .datepicker__button:hover{background-color:transparent}:host.is-directive{visibility:hidden;position:absolute}:host.is-open{visibility:visible}:host.is-animate{transition:height .2s ease-in;width:300px}:host.is-animate .datepicker__main{transition:height .2s ease-in}:host.is-animate .datepicker__calendar-wrapper{position:absolute;width:200%;left:0}:host.is-animate .datepicker__calendar{float:left;width:100%}:host.is-animate .datepicker__calendar-container{float:left}`]\n})\nexport class AnimatepickerComponent extends DatepickerComponent implements OnInit, AfterViewInit {\n\t/* ==============================================\n\t * Internal Properties\n\t * ============================================== */\n\n\tpublic animate = true;\n\tpublic initialWidth: number;\n\tpublic calendarWidth: number;\n\tpublic isAnimating = false;\n\tpublic leftInnerPosition = 0;\n\tpublic transition: string;\n\tpublic translateX: number;\n\tpublic currentYearMonth: object = null;\n\tpublic datepickerPosition: object;\n\tpublic initialised = false;\n\tpublic calendarHeight: number\n\n\t/* ==============================================\n\t * External Properties\n\t * ============================================== */\n\n\t/**\n\t * Number of months: the number of months displayed\n\t */\n\tprivate _numberOfMonths: any = new Array(1);\n\t@Input()\n\tset numberOfMonths(value) {\n\t\tif (value === undefined || value === this._numberOfMonths.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._numberOfMonths = new Array(value);\n\t\tthis.setDatePickerDimension();\n\n\t\tthis.goToDate(this.date);\n\t}\n\n\tget numberOfMonths(): Number[] {\n\t\treturn this._numberOfMonths;\n\t}\n\n\t/* ==============================================\n\t * Bindings and Children\n\t * ============================================== */\n\n\t@ViewChild('calendarContainer') public calendarContainer: ElementRef;\n\t@ViewChild('calendarTopContainer') public calendarTopContainer: ElementRef;\n\t@ViewChild('footer') public footer: ElementRef;\n\t@HostBinding('style.width.px') public datepickerWidth: number;\n\t@HostBinding('style.height.px') public datepickerHeight: number;\n\n\tconstructor(public elementRef: ElementRef, public utilities: UtilitiesService) {\n\t\tsuper(utilities, elementRef);\n\t}\n\n\tngOnInit() {\n\t\t// Get the computed width from the calendar. Set the initial width\n\t\tconst computedWidth = window\n\t\t\t.getComputedStyle(this.elementRef.nativeElement, null)\n\t\t\t.getPropertyValue('width');\n\t\tthis.initialWidth = parseInt(computedWidth, 10);\n\t\tthis.initialised = true;\n\n\t\t// Set the current year and month object\n\t\tif (!this.month && !this.year) {\n\t\t\tthis.goToDate(this.options.currentDate);\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.setDatePickerDimension();\n\t\t\tthis.setDatepickerHeight(true);\n\t\t});\n\t}\n\n\t/**\n\t * Set the height and the width properties\n\t */\n\tsetDatePickerDimension(): void {\n\t\tthis.datepickerHeight =\n\t\t\tthis.calendarContainer.nativeElement.offsetHeight +\n\t\t\tthis.calendarTopContainer.nativeElement.offsetHeight + \n\t\t\tthis.footer.nativeElement.offsetHeight;\n\t\tthis.calendarHeight = this.calendarContainer.nativeElement.offsetHeight;\n\t\tthis.datepickerWidth = this.initialWidth * this._numberOfMonths.length;\n\t}\n\n\t/**\n\t * Go to a specific month\n\t *\n\t * @param date - optional\n\t */\n\tgoToDate(date?: Date): void {\n\t\tif (date) {\n\t\t\tthis.currentYearMonth = this.getNextYearMonthArray(date.getFullYear(), date.getMonth());\n\t\t}\n\t\tthis.calendarWidth = 50 / this._numberOfMonths.length;\n\t\tthis.months = this.getNextMonthArray(this.currentYearMonth, true);\n\t\tthis.resetStyle();\n\t}\n\n\t/**\n\t * Create an array of the next year and months\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetNextYearMonthArray(year: number, month: number): YearMonth[] {\n\t\tconst array = [];\n\t\tfor (let index = 0; index < this._numberOfMonths.length; index++) {\n\t\t\tarray.push({ year: year, month: month });\n\t\t\tyear = DatepickerService.getYearOfNextMonth(year, month);\n\t\t\tmonth = DatepickerService.getNextMonth(month);\n\t\t}\n\t\treturn array;\n\t}\n\n\t/**\n\t * Create an array of the previous year and months\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetPreviousYearMonthArray(year: number, month: number): YearMonth[] {\n\t\tconst array = [];\n\t\tfor (let index = 0; index < this._numberOfMonths.length; index++) {\n\t\t\tarray.unshift({ year: year, month: month });\n\t\t\tyear = DatepickerService.getYearOfPreviousMonth(year, month);\n\t\t\tmonth = DatepickerService.getPreviousMonth(month);\n\t\t}\n\t\treturn array;\n\t}\n\n\t/**\n\t * Set the datepicker height, used when animating\n\t *\n\t * @param directionRight - Set optional when sliding to the right\n\t */\n\tsetDatepickerHeight(directionRight?: boolean): void {\n\t\tlet indexArray: number[];\n\n\t\t// TODO: Seperate this logic for readability purpose\n\t\tif (this._numberOfMonths.length > 1) {\n\t\t\tconst start = directionRight ? 0 : this._numberOfMonths.length;\n\t\t\tconst end = directionRight\n\t\t\t\t? this._numberOfMonths.length - 1\n\t\t\t\t: this._numberOfMonths.length + this._numberOfMonths.length - 1;\n\t\t\tindexArray = this.utilities.createArray(start, end);\n\t\t} else {\n\t\t\tindexArray = directionRight ? [0] : [1];\n\t\t}\n\n\t\tconst that = this;\n\t\tsetTimeout(() => {\n\t\t\tconst calendarArray = that.elementRef.nativeElement.querySelectorAll(\n\t\t\t\t'.datepicker__calendar-container'\n\t\t\t);\n\t\t\tlet offsetHeight = 0;\n\t\t\tindexArray.forEach(el => {\n\t\t\t\tif (calendarArray[el].offsetHeight > offsetHeight) {\n\t\t\t\t\toffsetHeight = calendarArray[el].offsetHeight;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t// TODO: Merge with setHeight function.\n\t\t\tthat.datepickerHeight =\n\t\t\t\toffsetHeight + that.calendarTopContainer.nativeElement.offsetHeight + that.footer.nativeElement.offsetHeight;\n\t\t\tthat.calendarHeight = offsetHeight;\n\t\t});\n\t}\n\n\t/**\n\t * Get next month array, gets multiple months.\n\t * Used when the options animate is set or multiple months are visable\n\t *\n\t * @return Month[]\n\t */\n\tgetNextMonthArray(currentYearMonth, keepDate = false, nextMonthsYearMonthArray?): Month[] {\n\t\t// Get the last index, used for selecting the right year month object\n\t\tconst lastIndex = this._numberOfMonths.length - 1;\n\n\t\t// Get next year and month in an Object\n\t\tconst nextMonths =\n\t\t\tnextMonthsYearMonthArray ||\n\t\t\tthis.getNextYearMonthArray(\n\t\t\t\tDatepickerService.getYearOfNextMonth(\n\t\t\t\t\tcurrentYearMonth[lastIndex].year,\n\t\t\t\t\tcurrentYearMonth[lastIndex].month\n\t\t\t\t),\n\t\t\t\tDatepickerService.getNextMonth(currentYearMonth[lastIndex].month)\n\t\t\t);\n\n\t\t// Concatenates the two objects to create a total year and month object\n\t\tthis.totalYearMonth = currentYearMonth.concat(nextMonths);\n\n\t\t// Create the calendar array using the total year and month Object\n\t\tconst monthArray = [];\n\t\tthis.totalYearMonth.forEach(e =>\n\t\t\tmonthArray.push(this.createCalendarArray(e.year, e.month))\n\t\t);\n\n\t\t// Set the new current year and month object.\n\t\tif (!keepDate) {\n\t\t\tthis.currentYearMonth = nextMonths;\n\t\t}\n\n\t\treturn [].concat.apply([], monthArray);\n\t}\n\n\t/**\n\t * Gets an array of previous months.\n\t * Used for animation and when more months are displayed\n\t *\n\t * @param currentYearMonth\n\t * @param keepDate\n\t */\n\tgetPreviousMonthArray(currentYearMonth, keepDate = false): Month[] {\n\t\t// Get previous year and month in an Object\n\t\tconst previousMonths = this.getPreviousYearMonthArray(\n\t\t\tDatepickerService.getYearOfPreviousMonth(\n\t\t\t\tcurrentYearMonth[0].year,\n\t\t\t\tcurrentYearMonth[0].month\n\t\t\t),\n\t\t\tDatepickerService.getPreviousMonth(currentYearMonth[0].month)\n\t\t);\n\n\t\t// Concatenates the two objects to create a total year and month object\n\t\tthis.totalYearMonth = previousMonths.concat(currentYearMonth);\n\n\t\t// Create the calendar array using the total year and month Object\n\t\tconst monthArray = [];\n\t\tthis.totalYearMonth.forEach(e => {\n\t\t\tmonthArray.push(this.createCalendarArray(e['year'], e['month']));\n\t\t});\n\n\t\t// Set the new current year and month object.\n\t\tif (!keepDate) {\n\t\t\tthis.currentYearMonth = previousMonths;\n\t\t}\n\n\t\treturn [].concat.apply([], monthArray);\n\t}\n\n\t/**\n\t * Update value is being triggered\n\t *\n\t * @param date\n\t */\n\tupdateValue(date: Date): void {\n\t\tif (this.options.range) {\n\t\t\tthis.selectRange(date);\n\t\t} else if (!this.isSelected(date)) {\n\t\t\tif (this.options.selectMultiple) {\n\t\t\t\tthis.selectDate(date);\n\t\t\t} else {\n\t\t\t\tthis.toggleDate(date);\n\t\t\t}\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.deselectDate(date);\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t}\n\t\tthis.months = this.getNextMonthArray(this.currentYearMonth, true);\n\t\tthis.resetStyle();\n\t}\n\n\t/**\n\t * Go to the next month\n\t */\n\tgoToNextMonth(): void {\n\t\tif (this.isAnimating) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.months = this.getNextMonthArray(this.currentYearMonth);\n\t\tthis.resetStyle();\n\t\tthis.setDatepickerHeight();\n\t\tthis.slideLeft();\n\t}\n\n\t/**\n\t * Go to the previous month\n\t */\n\tgoToPreviousMonth(): void {\n\t\tif (this.isAnimating) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.months = this.getPreviousMonthArray(this.currentYearMonth);\n\t\tthis.resetStyle(true);\n\t\tthis.setDatepickerHeight(true);\n\t\tthis.slideRight();\n\t}\n\n\t/**\n\t * Go to a specific month\n\t * TODO: WIP Check if date is in current range, or if it is later or earlier\n\t */\n\tgoToMonth(date: Date): void {\n\t\tconst nextMonths = this.getNextYearMonthArray(date.getFullYear(), date.getMonth());\n\t\tthis.months = this.getNextMonthArray(this.totalYearMonth, false, nextMonths);\n\t\tthis.resetStyle();\n\t\tthis.setDatepickerHeight();\n\t\tthis.slideRight();\n\t}\n\n\t/**\n\t * Slide to the right\n\t */\n\tslideRight(): void {\n\t\tthis.setIsAnimating();\n\t\tsetTimeout(() => {\n\t\t\tthis.transition =\n\t\t\t\t'transform ' + this.options.animationSpeed + 'ms ' + this.options.easing;\n\t\t\tthis.translateX = 50;\n\t\t});\n\t}\n\n\t/**\n\t * Slide to the left (criss cross)\n\t */\n\tslideLeft(): void {\n\t\tthis.setIsAnimating();\n\t\tsetTimeout(() => {\n\t\t\tthis.transition =\n\t\t\t\t'transform ' + this.options.animationSpeed + 'ms ' + this.options.easing;\n\t\t\tthis.translateX = -50;\n\t\t});\n\t}\n\n\t/**\n\t * Set animating state\n\t */\n\tsetIsAnimating(): void {\n\t\tthis.isAnimating = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.isAnimating = false;\n\t\t}, this.options.animationSpeed);\n\t}\n\n\t/**\n\t * Reset Style\n\t *\n\t * @param resetForPrevious - Optional\n\t */\n\tresetStyle(resetForPrevious?: boolean) {\n\t\tthis.transition = 'transform 0ms ease-in';\n\t\tthis.translateX = 0;\n\t\tthis.leftInnerPosition = resetForPrevious ? -100 : 0;\n\t}\n}\n","import {\n\tApplicationRef,\n\tComponentFactoryResolver,\n\tDirective,\n\tEmbeddedViewRef,\n\tEventEmitter,\n\tHostListener,\n\tInjector,\n\tInput,\n\tOptional,\n\tOutput,\n\tRenderer2,\n\tViewContainerRef\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {Options} from '../../models/datepicker-options.model';\nimport {DirectiveOptions} from '../../models/directive-options.model';\nimport {UtilitiesService} from '../../services/utilities.service';\nimport {AnimatepickerComponent} from '../animatepicker/animatepicker.component';\nimport {DatepickerComponent} from './datepicker.component';\nimport {DefaultDirectiveOptions} from './datepicker.options';\n\n@Directive({\n\tselector: '[aaDatepicker]'\n})\nexport class DatepickerDirective {\n\tdatepicker: any = null; // TODO: fix types: DatepickerComponent | AnimatepickerComponent\n\tclickListener;\n\n\t_options = DefaultDirectiveOptions;\n\n\t@Input('aaDatepicker')\n\tset options(options: DirectiveOptions) {\n\t\tif (options === undefined || !options) {\n\t\t\treturn;\n\t\t}\n\t\t// TODO: could be improved\n\t\tthis._options = {...this._options, ...options};\n\t}\n\n\tget options(): DirectiveOptions {\n\t\treturn this._options;\n\t}\n\n\tprivate _datepickerOptions;\n\t@Input('options')\n\tset datepickerOptions(options: Options) {\n\t\tthis._datepickerOptions = options;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.options = options;\n\t\t}\n\t}\n\n\tget datepickerOptions() {\n\t\treturn this._datepickerOptions;\n\t}\n\n\t/**\n\t * Set the the language manualy. A string with a BCP 47 language tag\n\t * @example nl-NL\n\t */\n\tprivate _language;\n\t@Input()\n\tset language(value: string) {\n\t\tthis._language = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.language = value;\n\t\t}\n\t}\n\n\tget language() {\n\t\treturn this._language;\n\t}\n\n\t/**\n\t * Minimal Date: If set the dates before it will be disabled\n\t */\n\tprivate _minDate;\n\t@Input()\n\tset minDate(value: Date) {\n\t\tthis._minDate = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.minDate = value;\n\t\t}\n\t}\n\n\tget minDate() {\n\t\treturn this._minDate;\n\t}\n\n\t/**\n\t * Maximal Date: If set the dates after it will be disabled\n\t */\n\tprivate _maxDate;\n\t@Input()\n\tset maxDate(value: Date) {\n\t\tthis._maxDate = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.maxDate = value;\n\t\t}\n\t}\n\n\tget maxDate() {\n\t\treturn this._minDate;\n\t}\n\n\t/**\n\t * Number of months: the number of months displayed\n\t */\n\tprivate _numberOfMonths;\n\t@Input()\n\tset numberOfMonths(value) {\n\t\tthis._numberOfMonths = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.numberOfMonths = value;\n\t\t}\n\t}\n\n\tget numberOfMonths() {\n\t\treturn this._numberOfMonths;\n\t}\n\n\t/**\n\t * Theme string is added to the host\n\t */\n\tprivate _theme;\n\t@Input()\n\tset theme(value) {\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.theme = value;\n\t\t}\n\t}\n\n\tget theme() {\n\t\treturn this._theme;\n\t}\n\n\t/**\n\t * The open state\n\t */\n\tprivate _isOpen;\n\t@Input()\n\tset isOpen(value) {\n\t\tthis._isOpen = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.isOpen = value;\n\t\t}\n\t}\n\n\tget isOpen() {\n\t\treturn this._isOpen;\n\t}\n\n\t/**\n\t * Selected Dates: handles the selected dates array. Can be set both internally and externally\n\t */\n\tprivate _selectedDates: Date[] = [];\n\t@Output() selectedDatesChange = new EventEmitter();\n\n\t@Input()\n\tset selectedDates(value: Date[]) {\n\t\tif (value === undefined || this._selectedDates === value) {\n\t\t\treturn;\n\t\t}\n\t\tthis._selectedDates = value;\n\t\tthis.selectedDatesChange.emit(this._selectedDates);\n\t}\n\n\tget selectedDates(): Date[] {\n\t\treturn this._selectedDates;\n\t}\n\n\t@HostListener('click', ['$event.target'])\n\tonClick() {\n\t\tif (!this.datepicker) {\n\t\t\tthis.datepicker = this.createDatepicker();\n\n\t\t\tthis.setDatepickerOptionsAndInputs();\n\t\t\tthis.subscribeToSelectedChanges();\n\t\t}\n\n\t\tif (!this.datepicker.isOpen) {\n\t\t\tif (this.options.appendToBody) {\n\t\t\t\tthis.setPosition();\n\t\t\t}\n\t\t\tthis.datepicker.open();\n\n\t\t\tif (this.options.closeOnBlur) {\n\t\t\t\tsetTimeout(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t(this.clickListener = this.renderer.listen('document', 'click', this.onBlurHandler.bind(this)))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tconstructor(\n\t\tpublic viewContainerRef: ViewContainerRef,\n\t\tpublic componentFactoryResolver: ComponentFactoryResolver,\n\t\tprivate appRef: ApplicationRef,\n\t\tprivate injector: Injector,\n\t\tprivate renderer: Renderer2,\n\t\t@Optional() public formControl: NgControl\n\t) {\n\t}\n\n\t/**\n\t * Add selected changes\n\t */\n\tsubscribeToSelectedChanges(): void {\n\t\tthis.datepicker.selectedDatesChange.subscribe(date => {\n\t\t\tif (this.formControl) {\n\t\t\t\tthis.formControl.control.setValue(date);\n\t\t\t} else {\n\t\t\t\tthis.selectedDates = date;\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Set all the options and inputs of the datepicker\n\t */\n\tsetDatepickerOptionsAndInputs(): void {\n\t\tthis.datepicker.options = this.datepickerOptions;\n\t\tthis.datepicker.isOpen = this.isOpen || false;\n\t\tthis.datepicker.asDirective = true;\n\t\tthis.datepicker.numberOfMonths = this.numberOfMonths;\n\t\tthis.datepicker.theme = this.theme;\n\t\tthis.datepicker._selectedDates = this.selectedDates;\n\t\tthis.datepicker.language = this.language;\n\t\tthis.datepicker.minDate = this.minDate;\n\t\tthis.datepicker.minDate = this.maxDate;\n\t}\n\n\t/**\n\t * Handles the (faked) blur event\n\t *\n\t * @param event\n\t */\n\tonBlurHandler(event: Event): void {\n\t\tif (\n\t\t\tevent.target !== this.datepicker.element.nativeElement &&\n\t\t\t!this.datepicker.element.nativeElement.contains(event.target)\n\t\t) {\n\t\t\t// check click origin\n\t\t\tthis.clickListener();\n\t\t\tthis.datepicker.close(true);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a create DatepickerComponent method\n\t */\n\tcreateDatepicker(): any {\n\t\treturn this.options.appendToBody ? this.appendToBody() : this.appendToContainer();\n\t}\n\n\t/**\n\t * Sets the position of the datepicker\n\t */\n\tsetPosition() {\n\t\tconst position = UtilitiesService.getPageOffset(this.viewContainerRef.element.nativeElement);\n\n\t\tif (this.options.openDirection === 'bottom') {\n\t\t\tthis.datepicker.topPosition = position.bottom;\n\t\t\tthis.datepicker.leftPosition = position.left;\n\t\t}\n\n\t\tif (this.options.openDirection === 'left') {\n\t\t\tthis.datepicker.topPosition = position.top;\n\t\t\tthis.datepicker.rightPosition = position.forRight;\n\t\t}\n\n\t\tif (this.options.openDirection === 'right') {\n\t\t\tthis.datepicker.topPosition = position.top;\n\t\t\tthis.datepicker.leftPosition = position.right;\n\t\t}\n\n\t\tif (this.options.openDirection === 'top') {\n\t\t\tthis.datepicker.bottomPosition = position.forBottom;\n\t\t\tthis.datepicker.leftPosition = position.left;\n\t\t}\n\t}\n\n\t/**\n\t * Appends the DatepickerComponent to the body and returns the instance\n\t */\n\tappendToBody(): any {\n\t\tconst datepickerComponent = this.options.useAnimatePicker ? AnimatepickerComponent : DatepickerComponent;\n\t\tconst componentRef = this.componentFactoryResolver\n\t\t\t.resolveComponentFactory(datepickerComponent)\n\t\t\t.create(this.injector);\n\n\t\tthis.appRef.attachView(componentRef.hostView);\n\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n\n\t\tdocument.body.appendChild(domElem);\n\n\t\treturn componentRef.instance;\n\t}\n\n\t/**\n\t * Appends the DatepickerComponent to the container and returns the instance\n\t */\n\tappendToContainer(): any {\n\t\tconst datepickerComponent = this.options.useAnimatePicker ? AnimatepickerComponent : DatepickerComponent;\n\t\tconst componentRef = this.componentFactoryResolver.resolveComponentFactory(datepickerComponent);\n\t\treturn this.viewContainerRef.createComponent(componentRef).instance;\n\t}\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { NavigationItem } from '../../models/datepicker.model';\n\n@Component({\n\tselector: 'aa-sub-navigation',\n\ttemplate: `<span (click)=\"close.emit()\">Close</span>\n<div class=\"sub-navigation__items-container\">\n <div class=\"sub-navigation__item\" *ngFor=\"let item of navigationItems;\" (click)=\"onItemCLick(item)\">\n <span class=\"sub-navigation__label\">{{item.navigationTitle}}</span>\n </div>\n</div>\n`,\n\tstyles: [`:host{position:absolute;z-index:4;top:0;left:0;width:100%;height:100%;display:block;background-color:#fff}:host .sub-navigation__items-container{display:flex;align-items:center;flex-wrap:wrap}:host .sub-navigation__item{border:1px solid #8e8d8a;height:40px;width:40px}`]\n})\nexport class SubNavigationComponent {\n\t@Output() close: EventEmitter<null> = new EventEmitter();\n\t@Output() subNavigationClick: EventEmitter<Date> = new EventEmitter();\n\t@Input() public navigationItems: NavigationItem[];\n\n\tonItemCLick(navigationItem: NavigationItem) {\n\t\tconst date = new Date(navigationItem.year, navigationItem.month);\n\t\tthis.close.emit();\n\t\tthis.subNavigationClick.emit(date);\n\t}\n}\n","import {Component, EventEmitter, HostBinding, Input, OnInit, Output} from '@angular/core';\nimport {YearMonth, NavigationItem} from '../../models/datepicker.model';\n\n@Component({\n\tselector: 'aa-navigation',\n\ttemplate: `<button *ngIf=\"!hideNavigation\" class=\"navigation__button is-previous\" (click)=\"previous()\"></button>\n<div class=\"navigation__title-wrapper\" [ngStyle]=\"{\n 'transform': 'translateX(' + translateX + '%)',\n 'transition': transition,\n 'left.%': leftPosition\n}\">\n <div *ngFor=\"let title of titles\"\n class=\"navigation__title\"\n [ngStyle]=\"{\n 'width.%': (100 / titles.length)\n }\"\n ><span (click)=\"onMonthClick(title)\">{{title.navigationTitle}}</span> <span (click)=\"onYearClick(title)\">{{title.year}}</span></div>\n</div>\n<button *ngIf=\"!hideNavigation\" class=\"navigation__button is-next\" (click)=\"next()\"></button>`,\n\tstyles: [`:host{display:block;padding:10px;height:52px}:host::after,:host::before{content:' ';display:table}:host::after{clear:both}:host .navigation__title-wrapper{position:absolute;left:0;width:100%}:host .navigation__title{width:100%;font-weight:700;text-align:center;float:left;line-height:2.2rem}:host .navigation__button{padding:0;border:1px solid #c0c0be;outline:0;font-style:inherit;cursor:pointer;position:relative;z-index:1;background-color:#fff;text-align:center;width:32px;height:32px;border-radius:4px}:host .navigation__button:hover{border-color:#8e8d8a}:host .navigation__button.is-previous{float:left}:host .navigation__button.is-previous::after{content:'<'}:host .navigation__button.is-next{float:right}:host .navigation__button.is-next::before{content:'>'}:host.is-animate .navigation__title-wrapper{width:200%}`]\n})\nexport class NavigationComponent implements OnInit {\n\t@Output() public previousClick: EventEmitter<null> = new EventEmitter();\n\t@Output() public nextClick: EventEmitter<null> = new EventEmitter();\n\t@Output() public subNavigationClick: EventEmitter<Date> = new EventEmitter();\n\t@Input() private monthFormat = 'long'; \t// \"narrow\", \"short\", \"long\";\n\n\t@Input()\n\tprivate set language(language: string) {\n\t\tthis.formatMonth = new Intl.DateTimeFormat(language, {month: this.monthFormat});\n\t\tthis._language = language;\n\n\t\tif (this.initialised) {\n\t\t\tthis.titles = this.createNavigationItems(this._totalYearMonth);\n\t\t}\n\t}\n\n\tprivate get language(): string {\n\t\treturn this._language;\n\t}\n\n\tprivate _totalYearMonth: YearMonth[];\n\t@Input()\n\tpublic set totalYearMonth(totalYearMonth: YearMonth[]) {\n\t\tthis._totalYearMonth = totalYearMonth;\n\t\tthis.titles = this.createNavigationItems(totalYearMonth);\n\t}\n\n\t@Input() public transition: string;\n\t@Input() public translateX: number;\n\t@Input() public leftPosition: number;\n\t@Input() public hideNavigation: boolean;\n\n\t@HostBinding('class.is-animate')\n\t@Input()\n\tpublic animate = false;\n\n\tprivate _language: string;\n\tprivate initialised = false;\n\tprivate formatMonth: Intl.DateTimeFormat;\n\tprivate subNavigationOpen = false;\n\tpublic navigationItems: NavigationItem[];\n\tpublic titles: NavigationItem[];\n\n\tngOnInit() {\n\t\tthis.initialised = true;\n\t}\n\n\tonMonthClick(title: NavigationItem) {\n\t\tconst monthArray = this.createMonthArray(title);\n\t\tconst formatMonth = new Intl.DateTimeFormat(this.language, {month: 'short'});\n\t\tthis.navigationItems = this.createNavigationItems(monthArray, true, formatMonth);\n\t\tthis.toggleSubNavigation();\n\t}\n\n\tonYearClick(title: NavigationItem) {\n\t\tthis.navigationItems = this.createYearArray(title);\n\t\tthis.toggleSubNavigation();\n\t}\n\n\ttoggleSubNavigation() {\n\t\tthis.subNavigationOpen = !this.subNavigationOpen;\n\t}\n\n\t/**\n\t * Sets the title\n\t *\n\t * @param totalMonthYear\n\t * @param monthType\n\t * @param formatMonth\n\t * @returns NavigationItem[]\n\t */\n\tcreateNavigationItems(totalMonthYear: YearMonth[], monthType = true, formatMonth = null): NavigationItem[] {\n\t\tconst _formatMonth = formatMonth || this.formatMonth;\n\n\t\t// TODO: copy the object / remove the reference\n\t\treturn (<NavigationItem[]>totalMonthYear).map(s => {\n\t\t\tconst date = new Date(s.year, s.month);\n\t\t\ts.navigationTitle = monthType ? _formatMonth.format(date) : s.year;\n\t\t\treturn s;\n\t\t});\n\t}\n\n\tcreateMonthArray(navigationItem: NavigationItem) {\n\t\tconst months = [],\n\t\t\tcurrentYear = navigationItem.year;\n\t\tfor (let i = 0; i < 11; i++) {\n\t\t\tmonths.push({month: i, year: currentYear});\n\t\t}\n\n\t\treturn months;\n\t}\n\n\t/**\n\t * Create an array of navigation items with year as label\n\t *\n\t * @param navigationItem\n\t * @returns NavigationItem[]\n\t */\n\tcreateYearArray(navigationItem: NavigationItem): NavigationItem[] {\n\t\tconst currentYear = navigationItem.year,\n\t\t\tyears = [{...navigationItem, navigationTitle: currentYear}];\n\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tyears.unshift({...navigationItem, navigationTitle: currentYear - (i + 1)});\n\t\t\tyears.push({...navigationItem, navigationTitle: currentYear + (i + 1)});\n\t\t}\n\n\t\treturn years;\n\t}\n\n\tonSubNavigationClick(date: Date) {\n\t\tthis.subNavigationClick.emit(date);\n\t}\n\n\t/**\n\t * Emits previous click event\n\t */\n\tprevious(): void {\n\t\tthis.previousClick.emit();\n\t}\n\n\t/**\n\t * Emits next click event\n\t */\n\tnext(): void {\n\t\tthis.nextClick.emit();\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AnimatepickerComponent } from './components/animatepicker/animatepicker.component';\nimport { DatepickerComponent } from './components/datepicker/datepicker.component';\nimport { DatepickerDirective } from './components/datepicker/datepicker.directive';\nimport { SubNavigationComponent } from './components/sub-navigation/sub-navigation.component';\nimport { NavigationComponent } from './components/navigation/navigation.component';\nimport { UtilitiesService } from './services/utilities.service';\n\n@NgModule({\n\tdeclarations: [\n\t\tDatepickerComponent,\n\t\tNavigationComponent,\n\t\tAnimatepickerComponent,\n\t\tDatepickerDirective,\n\t\tSubNavigationComponent\n\t],\n\timports: [CommonModule],\n\tproviders: [UtilitiesService],\n\texports: [\n\t\tDatepickerComponent,\n\t\tNavigationComponent,\n\t\tAnimatepickerComponent,\n\t\tDatepickerDirective\n\t],\n\tentryComponents: [DatepickerComponent, AnimatepickerComponent]\n})\nexport class AaDatepickerModule {}\n"],"names":["Injectable","EventEmitter","Component","ElementRef","Input","Output","ViewChild","HostBinding","tslib_1.__extends","Directive","ViewContainerRef","ComponentFactoryResolver","ApplicationRef","Injector","Renderer2","NgControl","Optional","HostListener","NgModule","CommonModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;IAcA;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exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-animating-datepicker",["exports","@angular/core","@angular/forms","@angular/common"],e):e(t["ngx-animating-datepicker"]={},t.ng.core,t.ng.forms,t.ng.common)}(this,function(t,s,e,i){"use strict";var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};var o=function(){return(o=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function n(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,o,a=i.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=a.next()).done;)s.push(n.value)}catch(r){o={error:r}}finally{try{n&&!n.done&&(i=a["return"])&&i.call(a)}finally{if(o)throw o.error}}return s}function r(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t}var c=function(){function n(){}return n.getWeekDays=function(t,e,i){var n=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"].indexOf(i.toLowerCase());if(n<0)throw new Error("Invalid week day start: "+i);for(var o=[],a=5;a<=11;a++)o.push(new Date(1970,0,a+n).toLocaleString(t,{weekday:e}));return o},n.isValidIsoCode=function(t){return new RegExp(/([a-z]{2})-([A-Z]{2})/).test(t)},n.createWeekArray=function(t){for(var e=[];t.length;)e.push({days:t.splice(0,7)});return e},n.getDaysInMonth=function(t,e){return[31,n.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},n.isValidDate=function(t){for(var e=!0,i=0;i<t.length;i++)!n.isDate(t[i])&&e&&(e=!1);return e},n.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},n.isDate=function(t){return t instanceof Date},n.getYearOfNextMonth=function(t,e){return 11===e?t+1:t},n.getNextMonth=function(t){return 11===t?0:t+1},n.getYearOfPreviousMonth=function(t,e){return 0===e?t-1:t},n.getPreviousMonth=function(t){return 0===t?11:t-1},n.isLater=function(t,e){return e<t},n.isEarlier=function(t,e){return t<e},n.decorators=[{type:s.Injectable}],n}(),h=function(){function a(){}return a.getScrollOffset=function(){return{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}},a.getPageOffset=function(t){var e=a.getScrollOffset(),i=t.offsetWidth,n=t.offsetHeight;if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return{top:o.top+e.y,left:o.left+e.x,right:o.left+e.x+i,bottom:o.top+e.y+n,forRight:window.innerWidth-o.left,forBottom:window.innerHeight-(o.top+e.y)}}},a.prototype.createArray=function(i,t){return new Array(t-i+1).fill(1).map(function(t,e){return i+e})},a.decorators=[{type:s.Injectable}],a}(),d={selectMultiple:!1,closeOnSelect:!1,animationSpeed:400,easing:"ease-in",hideRestDays:!1,disableRestDays:!0,hideNavigation:!1,range:!1,currentDate:new Date,timeoutBeforeClosing:300,weekdayFormat:"short",weekStart:"monday"},l={appendToBody:!0,openDirection:"bottom",closeOnBlur:!0,useAnimatePicker:!0},p=function(){function t(t,e){this.utils=t,this.element=e,this.date=new Date,this.year=null,this.month=null,this.today=this.date,this.months=null,this.weekdays=["M","T","W","T","F","S","S"],this.selectedRange="startDate",this.startDate=null,this.endDate=null,this.initialised=!1,this.weekStartArray=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],this._options=d,this._language=navigator.language,this._minDate=null,this._maxDate=null,this._selectedDates=[],this.selectedDatesChange=new s.EventEmitter,this.theme="",this.isOpen=!0,this.asDirective=!1,this.animate=!1,this.topPosition=null,this.leftPosition=null,this.bottomPosition=null,this.rightPosition=null}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){t!==undefined&&t&&(this._options=o({},this._options,t),t.currentDate!==undefined&&(this.date=this.options.currentDate),this.initialised&&this.goToDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(t){t&&t!==undefined&&c.isValidIsoCode(t)&&(this._language=t,this.renderWeekdays())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){t!==undefined&&t!==this._minDate&&(this._minDate=new Date(t),this.goToDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){t!==undefined&&t!==this._minDate&&(this._maxDate=new Date(t),this.goToDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedDates",{get:function(){return this._selectedDates},set:function(t){var e=Array.isArray(t)?t:[t];c.isValidDate(e)&&(this._selectedDates=e,this.options.range&&this.resetRange(),this.goToDate(),this.selectedDatesChange.emit(this._selectedDates))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.initialised=!0,this.month||this.year||this.goToDate(this.options.currentDate)},t.prototype.createDayArray=function(t,e,i){for(var n=[],o=c.getDaysInMonth(t,e),a=0;a<o;a++){var s=a+1,r=new Date(t,e,s),h={date:r,dayNumber:s,isFirst:1===s,isLast:s===o,isToday:this.isToday(r),isSelected:this.isSelected(r),isRest:i,isHidden:i&&this.options.hideRestDays,isDisabled:(this.minDate||this.maxDate)&&this.isDisabled(r)||i&&this.options.disableRestDays,isInRange:this.isInRange(r)||(this.isStartDate(r)||this.isEndDate(r))&&this.startDate&&this.endDate,isStartDate:this.isStartDate(r),isEndDate:this.isEndDate(r)};n.push(h)}return n},t.prototype.getNextRestDays=function(t,e){var i=c.getDaysInMonth(t,e),n=this.weekStartArray.indexOf(this.options.weekStart),o=new Date(t,e,i).getDay()-n,a=o<0?7-Math.abs(o):o,s=this.createDayArray(c.getYearOfNextMonth(t,e),c.getNextMonth(e),!0).slice(0,7-a);return 6<s.length?[]:s},t.prototype.getPreviousRestDays=function(t,e){var i=new Date(t,e,0).getDay(),n=this.createDayArray(c.getYearOfPreviousMonth(t,e),c.getPreviousMonth(e),!0),o=this.weekStartArray.indexOf(this.options.weekStart),a=0===o?0:7-o,s=n.length-i-a;return s=7<=n.length-s?s+7:s,n.slice(s,n.length)},t.prototype.getMergedDayArrays=function(t,e){return r(this.getPreviousRestDays(t,e),this.createDayArray(t,e),this.getNextRestDays(t,e))},t.prototype.createCalendarArray=function(t,e){var i=this.getMergedDayArrays(t,e);return[{weeks:c.createWeekArray(i)}]},t.prototype.updateValue=function(t){this.options.range?this.selectRange(t):(this.isSelected(t)?this.deselectDate(t):this.options.selectMultiple?this.selectDate(t):this.toggleDate(t),this.options.closeOnSelect&&this.close(!0)),this.months=this.createCalendarArray(this.year,this.month)},t.prototype.selectRange=function(t){this.isSelected(t)?this.deselectDate(t):c.isEarlier(t,this.startDate)?(this.startDate?this.toggleDate(t,this.startDate,!0):this.selectDate(t),this.startDate=t,this.selectEndDate()):this.endDate&&c.isLater(t,this.endDate)?(this.toggleDate(t,this.endDate),this.endDate=t,this.selectStartDate()):"startDate"===this.selectedRange?(this.startDate?this.toggleDate(t,this.startDate,!0):this.selectDate(t),this.startDate=t,this.selectEndDate()):"endDate"===this.selectedRange&&(this.endDate?this.toggleDate(t,this.endDate):this.selectDate(t),this.endDate=t,this.selectStartDate(),this.options.closeOnSelect&&this.close(!0))},t.prototype.resetRange=function(){1===this._selectedDates.length?(this.startDate=this._selectedDates[0],this.endDate=null):0===this._selectedDates.length&&(this.startDate=null,this.endDate=null)},t.prototype.toggleDate=function(t,e,i){this.selectedDates=e?i?(this._selectedDates.unshift(t),this._selectedDates.filter(function(t){return t.toDateString()!==e.toDateString()})):(this._selectedDates.push(t),this._selectedDates.filter(function(t){return t.toDateString()!==e.toDateString()})):[t]},t.prototype.selectDate=function(t,e){var i=r(this.selectedDates);e?i.unshift(t):i.push(t),this.selectedDates=i},t.prototype.deselectDate=function(e){this.selectedDates=this._selectedDates.filter(function(t){return t.toDateString()!==e.toDateString()})},t.prototype.goToNextMonth=function(){this.year=c.getYearOfNextMonth(this.year,this.month),this.month=c.getNextMonth(this.month),this.totalYearMonth=[{month:this.month,year:this.year}],this.months=this.createCalendarArray(this.year,this.month)},t.prototype.goToPreviousMonth=function(){this.year=c.getYearOfPreviousMonth(this.year,this.month),this.month=c.getPreviousMonth(this.month),this.totalYearMonth=[{month:this.month,year:this.year}],this.months=this.createCalendarArray(this.year,this.month)},t.prototype.goToDate=function(t){void 0===t&&(t=this.date),this.month=t.getMonth(),this.year=t.getFullYear(),this.totalYearMonth=[{month:this.month,year:this.year}],this.months=this.createCalendarArray(this.year,this.month)},t.prototype.renderWeekdays=function(){this.weekdays=c.getWeekDays(this._language,this.options.weekdayFormat,this.options.weekStart)},t.prototype.open=function(){this.isOpen||(this.isOpen=!0)},t.prototype.close=function(t){var e=this;if(this.isOpen){var i=t?this.options.timeoutBeforeClosing:0;setTimeout(function(){e.isOpen=!1},i)}},t.prototype.selectStartDate=function(){this.selectedRange="startDate"},t.prototype.selectEndDate=function(){this.selectedRange="endDate"},t.prototype.isStartDate=function(t){return this.startDate&&t.toDateString()===this.startDate.toDateString()},t.prototype.isEndDate=function(t){return this.endDate&&t.toDateString()===this.endDate.toDateString()},t.prototype.isToday=function(t){return t.toDateString()===this.today.toDateString()},t.prototype.isSelected=function(t){return-1!==this._selectedDates.map(function(t){return t.toDateString()}).indexOf(t.toDateString())},t.prototype.isDisabled=function(t){return this.minDate?this.maxDate?!(t<this.maxDate&&t>this.minDate):!(t>this.minDate):!(t<this.maxDate)},t.prototype.isInRange=function(t){return this.startDate&&this.endDate&&this.startDate<t&&t<this.endDate},t.decorators=[{type:s.Component,args:[{selector:"aa-datepicker",template:'<div class="datepicker__wrapper">\n\t<div>\n\t\t<aa-navigation\n\t\t\t\t[hideNavigation]="options.hideNavigation"\n (previousClick)="goToPreviousMonth()"\n\t\t\t\t(nextClick)="goToNextMonth()"\n\t\t\t\t[language]="language"\n\t\t\t\t[totalYearMonth]="totalYearMonth"></aa-navigation>\n\t\t<div class="datepicker__weekdays-wrapper">\n\t\t\t<div class="datepicker__weekdays-container">\n\t\t\t\t<table class="datepicker__weekdays">\n\t\t\t\t\t<thead>\n\t\t\t\t\t<td class="datepicker__weekday" *ngFor="let weekday of weekdays; index as i">{{weekday}}</td>\n\t\t\t\t\t</thead>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="datepicker__calendar-wrapper">\n\t\t<div *ngFor="let month of months;" class="datepicker__calendar-container">\n\t\t\t<table class="datepicker__calendar">\n\t\t\t\t<tbody>\n\t\t\t\t<tr *ngFor="let week of month.weeks; index as i">\n\t\t\t\t\t<td class="datepicker__day" *ngFor="let day of week.days; index as i" [ngClass]="{\n\t\t\t\'is-first\': day.isFirst,\n\t\t\t\'is-last\': day.isLast,\n\t\t\t\'is-hidden\': day.isHidden,\n\t\t\t\'is-disabled\': day.isDisabled,\n\t\t\t\'is-today\': day.isToday,\n\t\t\t\'is-selected\': day.isSelected,\n\t\t\t\'is-in-range\': day.isInRange,\n\t\t\t\'is-start-date\': day.isStartDate,\n\t\t\t\'is-end-date\': day.isEndDate,\n\t\t\t\'is-rest\': day.isRest\n\t\t\t}">\n\t\t\t\t\t\t<button class="datepicker__button" [disabled]="day.isDisabled || day.isHidden"\n\t\t\t\t\t\t\t\t(click)="updateValue(day.date)">{{day.dayNumber}}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</div>\n\t<ng-content></ng-content>\n</div>',styles:[":host{font-family:Arial,Helvetica,sans-serif;border:1px solid #d9d9d8;width:300px;position:relative;display:inline-block;z-index:2;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.15);overflow:hidden;background-color:#fff;box-sizing:border-box;visibility:hidden}:host *{box-sizing:border-box}:host .datepicker__calendar-container{padding:0 10px 10px}:host .datepicker__footer{position:relative;z-index:1}:host table{width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse}:host td{padding:0}:host .datepicker__weekdays-wrapper::after,:host .datepicker__weekdays-wrapper::before{content:' ';display:table}:host .datepicker__weekdays-wrapper::after{clear:both}:host .datepicker__weekdays-container{padding:10px 10px 0;float:left}:host .datepicker__weekdays{table-layout:fixed;width:100%}:host .datepicker__weekday{color:grey;font-size:12px;height:20px;text-align:center}:host .datepicker__day{position:relative;text-align:center;height:40px;width:auto;border:1px solid #d9d9d8}:host .datepicker__day.is-rest{border:none}:host .datepicker__button{padding:0;background-color:transparent;border:none;outline:0;font-style:inherit;cursor:pointer;color:#8e8d8a;width:100%;height:100%}:host .datepicker__button:hover{border:1px solid transparent;background-color:#f2f2f2;color:#8e8d8a}:host .is-hidden{opacity:0;display:table-cell}:host .is-rest{border:none}:host .is-rest .datepicker__button{color:#c0c0be}:host .is-today .datepicker__button{background-color:#eae7dc}:host .is-in-range .datepicker__button{background-color:#e98074;color:#fff}:host .is-in-range .datepicker__button:hover{background-color:#e66c5e}:host .is-selected .datepicker__button{background-color:#e85a4f;color:#fff;font-weight:700}:host .is-selected .datepicker__button:hover{background-color:#e23022}:host .is-start-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-end-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-disabled .datepicker__button{color:#d9d9d8;cursor:default}:host .is-disabled .datepicker__button:hover{background-color:transparent}:host.is-directive{visibility:hidden;position:absolute}:host.is-open{visibility:visible}:host.is-animate{transition:height .2s ease-in;width:300px}:host.is-animate .datepicker__main{transition:height .2s ease-in}:host.is-animate .datepicker__calendar-wrapper{position:absolute;width:200%;left:0}:host.is-animate .datepicker__calendar{float:left;width:100%}:host.is-animate .datepicker__calendar-container{float:left}"]}]}],t.ctorParameters=function(){return[{type:h},{type:s.ElementRef}]},t.propDecorators={options:[{type:s.Input,args:["options"]}],language:[{type:s.Input}],minDate:[{type:s.Input}],maxDate:[{type:s.Input}],selectedDatesChange:[{type:s.Output}],selectedDates:[{type:s.Input}],calendarContainer:[{type:s.ViewChild,args:["calendarContainer"]}],calendarTopContainer:[{type:s.ViewChild,args:["calendarTopContainer"]}],theme:[{type:s.HostBinding,args:["class"]},{type:s.Input}],isOpen:[{type:s.HostBinding,args:["class.is-open"]},{type:s.Input}],asDirective:[{type:s.HostBinding,args:["class.is-directive"]}],animate:[{type:s.HostBinding,args:["class.is-animate"]}],topPosition:[{type:s.HostBinding,args:["style.top.px"]}],leftPosition:[{type:s.HostBinding,args:["style.left.px"]}],bottomPosition:[{type:s.HostBinding,args:["style.bottom.px"]}],rightPosition:[{type:s.HostBinding,args:["style.right.px"]}]},t}(),u=function(n){function t(t,e){var i=n.call(this,e,t)||this;return i.elementRef=t,i.utilities=e,i.animate=!0,i.isAnimating=!1,i.leftInnerPosition=0,i.currentYearMonth=null,i.initialised=!1,i._numberOfMonths=new Array(1),i}return function o(t,e){function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(t,n),Object.defineProperty(t.prototype,"numberOfMonths",{get:function(){return this._numberOfMonths},set:function(t){t!==undefined&&t!==this._numberOfMonths.length&&(this._numberOfMonths=new Array(t),this.setDatePickerDimension(),this.goToDate(this.date))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=window.getComputedStyle(this.elementRef.nativeElement,null).getPropertyValue("width");this.initialWidth=parseInt(t,10),this.initialised=!0,this.month||this.year||this.goToDate(this.options.currentDate)},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout(function(){t.setDatePickerDimension(),t.setDatepickerHeight(!0)})},t.prototype.setDatePickerDimension=function(){this.datepickerHeight=this.calendarContainer.nativeElement.offsetHeight+this.calendarTopContainer.nativeElement.offsetHeight+this.footer.nativeElement.offsetHeight,this.calendarHeight=this.calendarContainer.nativeElement.offsetHeight,this.datepickerWidth=this.initialWidth*this._numberOfMonths.length},t.prototype.goToDate=function(t){t&&(this.currentYearMonth=this.getNextYearMonthArray(t.getFullYear(),t.getMonth())),this.calendarWidth=50/this._numberOfMonths.length,this.months=this.getNextMonthArray(this.currentYearMonth,!0),this.resetStyle()},t.prototype.getNextYearMonthArray=function(t,e){for(var i=[],n=0;n<this._numberOfMonths.length;n++)i.push({year:t,month:e}),t=c.getYearOfNextMonth(t,e),e=c.getNextMonth(e);return i},t.prototype.getPreviousYearMonthArray=function(t,e){for(var i=[],n=0;n<this._numberOfMonths.length;n++)i.unshift({year:t,month:e}),t=c.getYearOfPreviousMonth(t,e),e=c.getPreviousMonth(e);return i},t.prototype.setDatepickerHeight=function(t){var n;if(1<this._numberOfMonths.length){var e=t?0:this._numberOfMonths.length,i=t?this._numberOfMonths.length-1:this._numberOfMonths.length+this._numberOfMonths.length-1;n=this.utilities.createArray(e,i)}else n=t?[0]:[1];var o=this;setTimeout(function(){var e=o.elementRef.nativeElement.querySelectorAll(".datepicker__calendar-container"),i=0;n.forEach(function(t){e[t].offsetHeight>i&&(i=e[t].offsetHeight)}),o.datepickerHeight=i+o.calendarTopContainer.nativeElement.offsetHeight+o.footer.nativeElement.offsetHeight,o.calendarHeight=i})},t.prototype.getNextMonthArray=function(t,e,i){var n=this;void 0===e&&(e=!1);var o=this._numberOfMonths.length-1,a=i||this.getNextYearMonthArray(c.getYearOfNextMonth(t[o].year,t[o].month),c.getNextMonth(t[o].month));this.totalYearMonth=t.concat(a);var s=[];return this.totalYearMonth.forEach(function(t){return s.push(n.createCalendarArray(t.year,t.month))}),e||(this.currentYearMonth=a),[].concat.apply([],s)},t.prototype.getPreviousMonthArray=function(t,e){var i=this;void 0===e&&(e=!1);var n=this.getPreviousYearMonthArray(c.getYearOfPreviousMonth(t[0].year,t[0].month),c.getPreviousMonth(t[0].month));this.totalYearMonth=n.concat(t);var o=[];return this.totalYearMonth.forEach(function(t){o.push(i.createCalendarArray(t.year,t.month))}),e||(this.currentYearMonth=n),[].concat.apply([],o)},t.prototype.updateValue=function(t){this.options.range?this.selectRange(t):(this.isSelected(t)?this.deselectDate(t):this.options.selectMultiple?this.selectDate(t):this.toggleDate(t),this.options.closeOnSelect&&this.close(!0)),this.months=this.getNextMonthArray(this.currentYearMonth,!0),this.resetStyle()},t.prototype.goToNextMonth=function(){this.isAnimating||(this.months=this.getNextMonthArray(this.currentYearMonth),this.resetStyle(),this.setDatepickerHeight(),this.slideLeft())},t.prototype.goToPreviousMonth=function(){this.isAnimating||(this.months=this.getPreviousMonthArray(this.currentYearMonth),this.resetStyle(!0),this.setDatepickerHeight(!0),this.slideRight())},t.prototype.goToMonth=function(t){var e=this.getNextYearMonthArray(t.getFullYear(),t.getMonth());this.months=this.getNextMonthArray(this.totalYearMonth,!1,e),this.resetStyle(),this.setDatepickerHeight(),this.slideRight()},t.prototype.slideRight=function(){var t=this;this.setIsAnimating(),setTimeout(function(){t.transition="transform "+t.options.animationSpeed+"ms "+t.options.easing,t.translateX=50})},t.prototype.slideLeft=function(){var t=this;this.setIsAnimating(),setTimeout(function(){t.transition="transform "+t.options.animationSpeed+"ms "+t.options.easing,t.translateX=-50})},t.prototype.setIsAnimating=function(){var t=this;this.isAnimating=!0,setTimeout(function(){t.isAnimating=!1},this.options.animationSpeed)},t.prototype.resetStyle=function(t){this.transition="transform 0ms ease-in",this.translateX=0,this.leftInnerPosition=t?-100:0},t.decorators=[{type:s.Component,args:[{selector:"aa-animatepicker",template:'<div class="datepicker__wrapper" [ngStyle]="datepickerPosition">\n\t<div #calendarTopContainer>\n\t\t<div class="datepicker__header" #header>\n\t\t\t<ng-content select="header"></ng-content>\n\t\t</div>\n\t\t<aa-navigation\n\t\t\t\t(previousClick)="goToPreviousMonth()"\n\t\t\t\t(nextClick)="goToNextMonth()"\n\t\t\t\t(subNavigationClick)="goToDate($event)"\n\t\t\t\t[language]="language"\n\t\t\t\t[animate]="animate"\n\t\t\t\t[translateX]="translateX"\n\t\t\t\t[transition]="transition"\n\t\t\t\t[leftPosition]="leftInnerPosition"\n\t\t\t\t[hideNavigation]="options.hideNavigation"\n\t\t\t\t[totalYearMonth]="totalYearMonth"\n\t\t></aa-navigation>\n\n\t\t<div class="datepicker__weekdays-wrapper">\n\t\t\t<div \t*ngFor="let month of numberOfMonths"\n\t\t\t\t\t[ngStyle]="{\n\t\t\t\t\'width.%\': (100 / numberOfMonths.length)\n\t\t\t\t}"\n\t\t\t\t\tclass="datepicker__weekdays-container">\n\t\t\t\t<table class="datepicker__weekdays">\n\t\t\t\t\t<thead>\n\t\t\t\t\t<td class="datepicker__weekday" *ngFor="let weekday of weekdays; index as i">{{weekday}}</td>\n\t\t\t\t\t</thead>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="datepicker__main" [ngStyle]="{\n\t\t\'height.px\': calendarHeight}">\n\t\t<div class="datepicker__calendar-wrapper" #calendarContainer [ngStyle]="{\n\t\t\t\t\t\'transform\': \'translateX(\' + translateX + \'%)\',\n\t\t\t\t\t\'transition\': transition,\n\t\t\t\t\t\'left.%\': leftInnerPosition\n\t\t\t\t\t}"\n\t\t>\n\t\t\t<div\n\t\t\t\t\t*ngFor="let month of months;"\n\t\t\t\t\tclass="datepicker__calendar-container"\n\t\t\t\t\t[ngStyle]="{\'width.%\': calendarWidth}"\n\t\t\t>\n\t\t\t\t<table class="datepicker__calendar">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor="let week of month.weeks; index as i" class="datepicker__week">\n\t\t\t\t\t\t<td class="datepicker__day" *ngFor="let day of week.days; index as i"\n\t\t\t\t\t\t\t[ngClass]="{\n\t\t\t\t\t\t\'is-first\': day.isFirst,\n\t\t\t\t\t\t\'is-last\': day.isLast,\n\t\t\t\t\t\t\'is-hidden\': day.isHidden,\n\t\t\t\t\t\t\'is-disabled\': day.isDisabled,\n\t\t\t\t\t\t\'is-today\': day.isToday,\n\t\t\t\t\t\t\'is-selected\': day.isSelected,\n\t\t\t\t\t\t\'is-in-range\': day.isInRange,\n\t\t\t\t\t\t\'is-start-date\': day.isStartDate,\n\t\t\t\t\t\t\'is-end-date\': day.isEndDate,\n\t\t\t\t\t\t\'is-rest\': day.isRest\n\t\t\t\t\t\t}">\n\t\t\t\t\t\t\t<button class="datepicker__button" [disabled]="day.isDisabled || day.isHidden"\n\t\t\t\t\t\t\t\t\t(click)="updateValue(day.date)">{{day.dayNumber}}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="datepicker__footer" #footer>\n\t\t<ng-content select="footer"></ng-content>\n\t</div>\n</div>\n\t\t',styles:[":host{font-family:Arial,Helvetica,sans-serif;border:1px solid #d9d9d8;width:300px;position:relative;display:inline-block;z-index:2;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.15);overflow:hidden;background-color:#fff;box-sizing:border-box;visibility:hidden}:host *{box-sizing:border-box}:host .datepicker__calendar-container{padding:0 10px 10px}:host .datepicker__footer{position:relative;z-index:1}:host table{width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse}:host td{padding:0}:host .datepicker__weekdays-wrapper::after,:host .datepicker__weekdays-wrapper::before{content:' ';display:table}:host .datepicker__weekdays-wrapper::after{clear:both}:host .datepicker__weekdays-container{padding:10px 10px 0;float:left}:host .datepicker__weekdays{table-layout:fixed;width:100%}:host .datepicker__weekday{color:grey;font-size:12px;height:20px;text-align:center}:host .datepicker__day{position:relative;text-align:center;height:40px;width:auto;border:1px solid #d9d9d8}:host .datepicker__day.is-rest{border:none}:host .datepicker__button{padding:0;background-color:transparent;border:none;outline:0;font-style:inherit;cursor:pointer;color:#8e8d8a;width:100%;height:100%}:host .datepicker__button:hover{border:1px solid transparent;background-color:#f2f2f2;color:#8e8d8a}:host .is-hidden{opacity:0;display:table-cell}:host .is-rest{border:none}:host .is-rest .datepicker__button{color:#c0c0be}:host .is-today .datepicker__button{background-color:#eae7dc}:host .is-in-range .datepicker__button{background-color:#e98074;color:#fff}:host .is-in-range .datepicker__button:hover{background-color:#e66c5e}:host .is-selected .datepicker__button{background-color:#e85a4f;color:#fff;font-weight:700}:host .is-selected .datepicker__button:hover{background-color:#e23022}:host .is-start-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-end-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-disabled .datepicker__button{color:#d9d9d8;cursor:default}:host .is-disabled .datepicker__button:hover{background-color:transparent}:host.is-directive{visibility:hidden;position:absolute}:host.is-open{visibility:visible}:host.is-animate{transition:height .2s ease-in;width:300px}:host.is-animate .datepicker__main{transition:height .2s ease-in}:host.is-animate .datepicker__calendar-wrapper{position:absolute;width:200%;left:0}:host.is-animate .datepicker__calendar{float:left;width:100%}:host.is-animate .datepicker__calendar-container{float:left}"]}]}],t.ctorParameters=function(){return[{type:s.ElementRef},{type:h}]},t.propDecorators={numberOfMonths:[{type:s.Input}],calendarContainer:[{type:s.ViewChild,args:["calendarContainer"]}],calendarTopContainer:[{type:s.ViewChild,args:["calendarTopContainer"]}],footer:[{type:s.ViewChild,args:["footer"]}],datepickerWidth:[{type:s.HostBinding,args:["style.width.px"]}],datepickerHeight:[{type:s.HostBinding,args:["style.height.px"]}]},t}(p),g=function(){function t(t,e,i,n,o,a){this.viewContainerRef=t,this.componentFactoryResolver=e,this.appRef=i,this.injector=n,this.renderer=o,this.formControl=a,this.datepicker=null,this._options=l,this._selectedDates=[],this.selectedDatesChange=new s.EventEmitter}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){t!==undefined&&t&&(this._options=o({},this._options,t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datepickerOptions",{get:function(){return this._datepickerOptions},set:function(t){this._datepickerOptions=t,this.datepicker&&(this.datepicker.options=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(t){this._language=t,this.datepicker&&(this.datepicker.language=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=t,this.datepicker&&(this.datepicker.minDate=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._minDate},set:function(t){this._maxDate=t,this.datepicker&&(this.datepicker.maxDate=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numberOfMonths",{get:function(){return this._numberOfMonths},set:function(t){this._numberOfMonths=t,this.datepicker&&(this.datepicker.numberOfMonths=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"theme",{get:function(){return this._theme},set:function(t){this.datepicker&&(this.datepicker.theme=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},set:function(t){this._isOpen=t,this.datepicker&&(this.datepicker.isOpen=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedDates",{get:function(){return this._selectedDates},set:function(t){t!==undefined&&this._selectedDates!==t&&(this._selectedDates=t,this.selectedDatesChange.emit(this._selectedDates))},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t=this;this.datepicker||(this.datepicker=this.createDatepicker(),this.setDatepickerOptionsAndInputs(),this.subscribeToSelectedChanges()),this.datepicker.isOpen||(this.options.appendToBody&&this.setPosition(),this.datepicker.open(),this.options.closeOnBlur&&setTimeout(function(){return t.clickListener=t.renderer.listen("document","click",t.onBlurHandler.bind(t))}))},t.prototype.subscribeToSelectedChanges=function(){var e=this;this.datepicker.selectedDatesChange.subscribe(function(t){e.formControl?e.formControl.control.setValue(t):e.selectedDates=t})},t.prototype.setDatepickerOptionsAndInputs=function(){this.datepicker.options=this.datepickerOptions,this.datepicker.isOpen=this.isOpen||!1,this.datepicker.asDirective=!0,this.datepicker.numberOfMonths=this.numberOfMonths,this.datepicker.theme=this.theme,this.datepicker._selectedDates=this.selectedDates,this.datepicker.language=this.language,this.datepicker.minDate=this.minDate,this.datepicker.minDate=this.maxDate},t.prototype.onBlurHandler=function(t){t.target===this.datepicker.element.nativeElement||this.datepicker.element.nativeElement.contains(t.target)||(this.clickListener(),this.datepicker.close(!0))},t.prototype.createDatepicker=function(){return this.options.appendToBody?this.appendToBody():this.appendToContainer()},t.prototype.setPosition=function(){var t=h.getPageOffset(this.viewContainerRef.element.nativeElement);"bottom"===this.options.openDirection&&(this.datepicker.topPosition=t.bottom,this.datepicker.leftPosition=t.left),"left"===this.options.openDirection&&(this.datepicker.topPosition=t.top,this.datepicker.rightPosition=t.forRight),"right"===this.options.openDirection&&(this.datepicker.topPosition=t.top,this.datepicker.leftPosition=t.right),"top"===this.options.openDirection&&(this.datepicker.bottomPosition=t.forBottom,this.datepicker.leftPosition=t.left)},t.prototype.appendToBody=function(){var t=this.options.useAnimatePicker?u:p,e=this.componentFactoryResolver.resolveComponentFactory(t).create(this.injector);this.appRef.attachView(e.hostView);var i=e.hostView.rootNodes[0];return document.body.appendChild(i),e.instance},t.prototype.appendToContainer=function(){var t=this.options.useAnimatePicker?u:p,e=this.componentFactoryResolver.resolveComponentFactory(t);return this.viewContainerRef.createComponent(e).instance},t.decorators=[{type:s.Directive,args:[{selector:"[aaDatepicker]"}]}],t.ctorParameters=function(){return[{type:s.ViewContainerRef},{type:s.ComponentFactoryResolver},{type:s.ApplicationRef},{type:s.Injector},{type:s.Renderer2},{type:e.NgControl,decorators:[{type:s.Optional}]}]},t.propDecorators={options:[{type:s.Input,args:["aaDatepicker"]}],datepickerOptions:[{type:s.Input,args:["options"]}],language:[{type:s.Input}],minDate:[{type:s.Input}],maxDate:[{type:s.Input}],numberOfMonths:[{type:s.Input}],theme:[{type:s.Input}],isOpen:[{type:s.Input}],selectedDatesChange:[{type:s.Output}],selectedDates:[{type:s.Input}],onClick:[{type:s.HostListener,args:["click",["$event.target"]]}]},t}(),f=function(){function t(){this.close=new s.EventEmitter,this.subNavigationClick=new s.EventEmitter}return t.prototype.onItemCLick=function(t){var e=new Date(t.year,t.month);this.close.emit(),this.subNavigationClick.emit(e)},t.decorators=[{type:s.Component,args:[{selector:"aa-sub-navigation",template:'<span (click)="close.emit()">Close</span>\n<div class="sub-navigation__items-container">\n <div class="sub-navigation__item" *ngFor="let item of navigationItems;" (click)="onItemCLick(item)">\n <span class="sub-navigation__label">{{item.navigationTitle}}</span>\n </div>\n</div>\n',styles:[":host{position:absolute;z-index:4;top:0;left:0;width:100%;height:100%;display:block;background-color:#fff}:host .sub-navigation__items-container{display:flex;align-items:center;flex-wrap:wrap}:host .sub-navigation__item{border:1px solid #8e8d8a;height:40px;width:40px}"]}]}],t.propDecorators={close:[{type:s.Output}],subNavigationClick:[{type:s.Output}],navigationItems:[{type:s.Input}]},t}(),y=function(){function t(){this.previousClick=new s.EventEmitter,this.nextClick=new s.EventEmitter,this.subNavigationClick=new s.EventEmitter,this.monthFormat="long",this.animate=!1,this.initialised=!1,this.subNavigationOpen=!1}return Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(t){this.formatMonth=new Intl.DateTimeFormat(t,{month:this.monthFormat}),this._language=t,this.initialised&&(this.titles=this.createNavigationItems(this._totalYearMonth))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"totalYearMonth",{set:function(t){this._totalYearMonth=t,this.titles=this.createNavigationItems(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.initialised=!0},t.prototype.onMonthClick=function(t){var e=this.createMonthArray(t),i=new Intl.DateTimeFormat(this.language,{month:"short"});this.navigationItems=this.createNavigationItems(e,!0,i),this.toggleSubNavigation()},t.prototype.onYearClick=function(t){this.navigationItems=this.createYearArray(t),this.toggleSubNavigation()},t.prototype.toggleSubNavigation=function(){this.subNavigationOpen=!this.subNavigationOpen},t.prototype.createNavigationItems=function(t,i,e){void 0===i&&(i=!0),void 0===e&&(e=null);var n=e||this.formatMonth;return t.map(function(t){var e=new Date(t.year,t.month);return t.navigationTitle=i?n.format(e):t.year,t})},t.prototype.createMonthArray=function(t){for(var e=[],i=t.year,n=0;n<11;n++)e.push({month:n,year:i});return e},t.prototype.createYearArray=function(t){for(var e=t.year,i=[o({},t,{navigationTitle:e})],n=0;n<5;n++)i.unshift(o({},t,{navigationTitle:e-(n+1)})),i.push(o({},t,{navigationTitle:e+(n+1)}));return i},t.prototype.onSubNavigationClick=function(t){this.subNavigationClick.emit(t)},t.prototype.previous=function(){this.previousClick.emit()},t.prototype.next=function(){this.nextClick.emit()},t.decorators=[{type:s.Component,args:[{selector:"aa-navigation",template:'<button *ngIf="!hideNavigation" class="navigation__button is-previous" (click)="previous()"></button>\n<div class="navigation__title-wrapper" [ngStyle]="{\n \'transform\': \'translateX(\' + translateX + \'%)\',\n \'transition\': transition,\n \'left.%\': leftPosition\n}">\n <div *ngFor="let title of titles"\n class="navigation__title"\n [ngStyle]="{\n \'width.%\': (100 / titles.length)\n }"\n ><span (click)="onMonthClick(title)">{{title.navigationTitle}}</span> <span (click)="onYearClick(title)">{{title.year}}</span></div>\n</div>\n<button *ngIf="!hideNavigation" class="navigation__button is-next" (click)="next()"></button>',styles:[":host{display:block;padding:10px;height:52px}:host::after,:host::before{content:' ';display:table}:host::after{clear:both}:host .navigation__title-wrapper{position:absolute;left:0;width:100%}:host .navigation__title{width:100%;font-weight:700;text-align:center;float:left;line-height:2.2rem}:host .navigation__button{padding:0;border:1px solid #c0c0be;outline:0;font-style:inherit;cursor:pointer;position:relative;z-index:1;background-color:#fff;text-align:center;width:32px;height:32px;border-radius:4px}:host .navigation__button:hover{border-color:#8e8d8a}:host .navigation__button.is-previous{float:left}:host .navigation__button.is-previous::after{content:'<'}:host .navigation__button.is-next{float:right}:host .navigation__button.is-next::before{content:'>'}:host.is-animate .navigation__title-wrapper{width:200%}"]}]}],t.propDecorators={previousClick:[{type:s.Output}],nextClick:[{type:s.Output}],subNavigationClick:[{type:s.Output}],monthFormat:[{type:s.Input}],language:[{type:s.Input}],totalYearMonth:[{type:s.Input}],transition:[{type:s.Input}],translateX:[{type:s.Input}],leftPosition:[{type:s.Input}],hideNavigation:[{type:s.Input}],animate:[{type:s.HostBinding,args:["class.is-animate"]},{type:s.Input}]},t}(),m=function(){function t(){}return t.decorators=[{type:s.NgModule,args:[{declarations:[p,y,u,g,f],imports:[i.CommonModule],providers:[h],exports:[p,y,u,g],entryComponents:[p,u]}]}],t}();t.AaDatepickerModule=m,t.DatepickerComponent=p,t.AnimatepickerComponent=u,t.ɵc=g,t.ɵb=y,t.ɵd=f,t.ɵa=h,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
2
|
-
//# sourceMappingURL=ngx-animating-datepicker.umd.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["null","ng://ngx-animating-datepicker/lib/services/datepicker.service.ts","ng://ngx-animating-datepicker/lib/services/utilities.service.ts","ng://ngx-animating-datepicker/lib/components/datepicker/datepicker.options.ts","ng://ngx-animating-datepicker/lib/components/datepicker/datepicker.component.ts","ng://ngx-animating-datepicker/lib/components/animatepicker/animatepicker.component.ts","ng://ngx-animating-datepicker/lib/components/datepicker/datepicker.directive.ts","ng://ngx-animating-datepicker/lib/components/sub-navigation/sub-navigation.component.ts","ng://ngx-animating-datepicker/lib/components/navigation/navigation.component.ts","ng://ngx-animating-datepicker/lib/ngx-animating-datepicker.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","prototype","call","apply","this","__read","o","m","Symbol","iterator","r","e","ar","next","done","push","value","error","__spread","concat","DatepickerService","getWeekDays","language","format","start","index","indexOf","toLowerCase","Error","weekdays","day","Date","toLocaleString","weekday","isValidIsoCode","isoCode","RegExp","test","createWeekArray","dayArray","weeks","days","splice","getDaysInMonth","year","month","isLeapYear","isValidDate","validDate","isDate","getYearOfNextMonth","getNextMonth","getYearOfPreviousMonth","getPreviousMonth","isLater","date","compareDate","isEarlier","Injectable","UtilitiesService","getScrollOffset","x","window","pageXOffset","document","documentElement","scrollLeft","y","pageYOffset","scrollTop","getPageOffset","el","scrollOffset","width","offsetWidth","height","offsetHeight","getBoundingClientRect","props","top","left","right","bottom","forRight","innerWidth","forBottom","innerHeight","createArray","end","fill","map","_","idx","DefaultOptions","selectMultiple","closeOnSelect","animationSpeed","easing","hideRestDays","disableRestDays","hideNavigation","range","currentDate","timeoutBeforeClosing","weekdayFormat","weekStart","DefaultDirectiveOptions","appendToBody","openDirection","closeOnBlur","useAnimatePicker","DatepickerComponent","utils","element","today","months","selectedRange","startDate","endDate","initialised","weekStartArray","_options","_language","navigator","_minDate","_maxDate","_selectedDates","selectedDatesChange","EventEmitter","theme","isOpen","asDirective","animate","topPosition","leftPosition","bottomPosition","rightPosition","defineProperty","options","undefined","goToDate","renderWeekdays","_value","isArray","resetRange","emit","ngOnInit","createDayArray","isRestDays","daysInMonth","dayNumber","isFirst","isLast","isToday","isSelected","isRest","isHidden","isDisabled","minDate","maxDate","isInRange","isStartDate","isEndDate","getNextRestDays","monthLength","weekStartIndex","endOfTheMonth","getDay","_endOfTheMonth","Math","abs","nextDays","slice","getPreviousRestDays","startOfTheMonth","previousDays","_weekStartIndex","sliceIndex","getMergedDayArrays","createCalendarArray","updateValue","selectRange","deselectDate","selectDate","toggleDate","close","selectEndDate","selectStartDate","unshift","selectedDates","filter","selectedDate","toDateString","goToNextMonth","totalYearMonth","goToPreviousMonth","getMonth","getFullYear","open","useTimeout","_this","timeout","setTimeout","dateToCheck","Component","args","selector","template","styles","ElementRef","Input","Output","ViewChild","HostBinding","type","AnimatepickerComponent","elementRef","utilities","_super","isAnimating","leftInnerPosition","currentYearMonth","_numberOfMonths","__extends","__","constructor","create","tslib_1.__extends","setDatePickerDimension","computedWidth","getComputedStyle","nativeElement","getPropertyValue","initialWidth","parseInt","ngAfterViewInit","setDatepickerHeight","datepickerHeight","calendarContainer","calendarTopContainer","footer","calendarHeight","datepickerWidth","getNextYearMonthArray","calendarWidth","getNextMonthArray","resetStyle","array","getPreviousYearMonthArray","directionRight","indexArray","that","calendarArray","querySelectorAll","forEach","keepDate","nextMonthsYearMonthArray","lastIndex","nextMonths","monthArray","getPreviousMonthArray","previousMonths","slideLeft","slideRight","goToMonth","setIsAnimating","transition","translateX","resetForPrevious","DatepickerDirective","viewContainerRef","componentFactoryResolver","appRef","injector","renderer","formControl","datepicker","_datepickerOptions","numberOfMonths","_theme","_isOpen","onClick","createDatepicker","setDatepickerOptionsAndInputs","subscribeToSelectedChanges","setPosition","clickListener","listen","onBlurHandler","bind","subscribe","control","setValue","datepickerOptions","event","target","contains","appendToContainer","position","datepickerComponent","componentRef","resolveComponentFactory","attachView","hostView","domElem","rootNodes","body","appendChild","instance","createComponent","Directive","ViewContainerRef","ComponentFactoryResolver","ApplicationRef","Injector","Renderer2","NgControl","decorators","Optional","HostListener","SubNavigationComponent","subNavigationClick","onItemCLick","navigationItem","NavigationComponent","previousClick","nextClick","monthFormat","subNavigationOpen","formatMonth","Intl","DateTimeFormat","titles","createNavigationItems","_totalYearMonth","onMonthClick","title","createMonthArray","navigationItems","toggleSubNavigation","onYearClick","createYearArray","totalMonthYear","monthType","_formatMonth","navigationTitle","currentYear","years","onSubNavigationClick","previous","AaDatepickerModule","NgModule","declarations","imports","CommonModule","providers","exports","entryComponents"],"mappings":"iZAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IASrB,IAAIO,EAAW,WAQlB,OAPAA,EAAWN,OAAOO,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIN,KADTK,EAAIG,UAAUF,GACOV,OAAOc,UAAUT,eAAeU,KAAKN,EAAGL,KAAII,EAAEJ,GAAKK,EAAEL,IAE9E,OAAOI,IAEKQ,MAAMC,KAAML,YAGhC,SAAAM,EA+EuBC,EAAGR,GACtB,IAAIS,EAAsB,mBAAXC,QAAyBF,EAAEE,OAAOC,UACjD,I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KiU,cAAcpL,QAMpBmL,EAAAnU,UAAAY,KAAA,WACCT,KAAKkU,UAAUrL,4BA/IhB2D,EAAAA,UAASC,KAAA,CAAC,CACVC,SAAU,gBACVC,SAAU,wqBAcVC,OAAQ,CAAC,k2BAGRG,EAAAA,0BACAA,EAAAA,mCACAA,EAAAA,4BACAD,EAAAA,wBAEAA,EAAAA,8BAeAA,EAAAA,0BAMAA,EAAAA,0BACAA,EAAAA,4BACAA,EAAAA,8BACAA,EAAAA,uBAEAG,EAAAA,YAAWR,KAAA,CAAC,qBAAkB,CAAAS,KAC9BJ,EAAAA,SA8FFkH,KCpJA0B,EAAA,WASA,SAAAA,KAkBiC,2BAlBhCC,EAAAA,SAAQlJ,KAAA,CAAC,CACTmJ,aAAc,CACbjP,EACAqN,EACA7G,EACAsD,EACAmD,GAEDiC,QAAS,CAACC,EAAAA,cACVC,UAAW,CAACxS,GACZyS,QAAS,CACRrP,EACAqN,EACA7G,EACAsD,GAEDwF,gBAAiB,CAACtP,EAAqBwG,OAEPuI,EA3BjC","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { Day, Week } from '../models/datepicker.model';\n\n@Injectable()\nexport class DatepickerService {\n\t/**\n\t * Get the formatted weekdays\n\t *\n\t * @param language\n\t * @param format\n\t * @param start\n\t */\n\tstatic getWeekDays(language: string, format: string, start: string): string[] {\n\t\tconst days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];\n\n\t\tconst index = days.indexOf(start.toLowerCase());\n\t\tif (index < 0) {\n\t\t\tthrow new Error('Invalid week day start: ' + start);\n\t\t}\n\n\t\tconst weekdays = [];\n\t\tfor (let day = 5; day <= 11; day++) {\n\t\t\tweekdays.push(new Date(1970, 1 - 1, day + index).toLocaleString(language, { weekday: format }));\n\t\t}\n\n\t\treturn weekdays;\n\t}\n\n\t/**\n\t * Checks if is a value iso code\n\t *\n\t * @param isoCode\n\t */\n\tstatic isValidIsoCode(isoCode: string): boolean {\n\t\tconst pattern = new RegExp(/([a-z]{2})-([A-Z]{2})/);\n\t\treturn pattern.test(isoCode);\n\t}\n\n\t/**\n\t * Create a week array from the merged day arrays\n\t *\n\t * @param dayArray\n\t */\n\tstatic createWeekArray(dayArray: Day[]): Week[] {\n\t\tconst size = 7;\n\t\tconst weeks = [];\n\t\twhile (dayArray.length) {\n\t\t\tweeks.push({\n\t\t\t\tdays: dayArray.splice(0, size)\n\t\t\t});\n\t\t}\n\t\treturn weeks;\n\t}\n\n\tstatic getDaysInMonth(year: number, month: number): number {\n\t\treturn [31, DatepickerService.isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n\t}\n\n\tstatic isValidDate(value: any): boolean {\n\t\tlet validDate = true;\n\n\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\tif (!DatepickerService.isDate(value[i]) && validDate) {\n\t\t\t\tvalidDate = false;\n\t\t\t}\n\t\t}\n\n\t\treturn validDate;\n\t}\n\n\t/**\n\t * Check if year is a leap year\n\t *\n\t * @param year\n\t */\n\tstatic isLeapYear(year: number): boolean {\n\t\treturn (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n\t}\n\n\t/**\n\t * Checks to see if value is a valid date\n\t *\n\t * @param value\n\t */\n\tstatic isDate(value: Date) {\n\t\treturn value instanceof Date;\n\t}\n\n\t/**\n\t * Get the year of the next month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tstatic getYearOfNextMonth(year: number, month: number): number {\n\t\treturn month === 11 ? year + 1 : year;\n\t}\n\n\t/**\n\t * Get the next month\n\t *\n\t * @param month\n\t */\n\tstatic getNextMonth(month: number): number {\n\t\treturn month === 11 ? 0 : month + 1;\n\t}\n\n\t/**\n\t * Get the year of the previous month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tstatic getYearOfPreviousMonth(year: number, month: number): number {\n\t\treturn month === 0 ? year - 1 : year;\n\t}\n\n\t/**\n\t * Get previous motnh\n\t *\n\t * @param month\n\t */\n\tstatic getPreviousMonth(month: number): number {\n\t\treturn month === 0 ? 11 : month - 1;\n\t}\n\n\t/**\n\t * Check if a date is later\n\t *\n\t * @param date\n\t * @param compareDate\n\t */\n\tstatic isLater(date: Date, compareDate: Date): boolean {\n\t\treturn date > compareDate;\n\t}\n\n\t/**\n\t * Check if a date is ealrier\n\t *\n\t * @param date\n\t * @param compareDate\n\t */\n\tstatic isEarlier(date: Date, compareDate: Date): boolean {\n\t\treturn date < compareDate;\n\t}\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class UtilitiesService {\n\tprivate static getScrollOffset() {\n\t\tconst x = window.pageXOffset || document.documentElement.scrollLeft;\n\t\tconst y = window.pageYOffset || document.documentElement.scrollTop;\n\t\treturn { x: x, y: y };\n\t}\n\n\tstatic getPageOffset(el: HTMLElement) {\n\t\tconst scrollOffset = UtilitiesService.getScrollOffset();\n\t\tconst width = el.offsetWidth;\n\t\tconst height = el.offsetHeight;\n\n\t\tif (el.getBoundingClientRect) {\n\t\t\tconst props = el.getBoundingClientRect();\n\t\t\tconst position = {\n\t\t\t\ttop: props.top + scrollOffset.y,\n\t\t\t\tleft: props.left + scrollOffset.x,\n\t\t\t\tright: props.left + scrollOffset.x + width,\n\t\t\t\tbottom: props.top + scrollOffset.y + height,\n\t\t\t\tforRight: window.innerWidth - props.left,\n\t\t\t\tforBottom: window.innerHeight - (props.top + scrollOffset.y)\n\t\t\t};\n\n\t\t\treturn position;\n\t\t}\n\t}\n\n\tcreateArray(start: number, end: number): number[] {\n\t\treturn new Array(end - start + 1).fill(1).map((_, idx) => start + idx);\n\t}\n}\n","export const DefaultOptions = {\n\tselectMultiple: false, // Select multiple dates\n\tcloseOnSelect: false, // Close datepicker when date(s) selected\n\tanimationSpeed: 400, // Animation speed in ms\n\teasing: 'ease-in', // Easing type string\n\thideRestDays: false, // Hide the rest days\n\tdisableRestDays: true, // Disable the click on rest days\n\thideNavigation: false, // Hide the navigation\n\trange: false, // Use range functionality\n\tcurrentDate: new Date(), // Tne current displayed date (month, year)\n\ttimeoutBeforeClosing: 300, // The timeout / delay before closing\n\tweekdayFormat: 'short', // \"narrow\", \"short\", \"long\"\n\tweekStart: 'monday' // Set the week start day\n};\n\nexport const DefaultDirectiveOptions = {\n\tappendToBody: true, // Append Datepicker to body\n\topenDirection: 'bottom', // The direction it should open to\n\tcloseOnBlur: true, // Close the datepicker onBlur\n\tuseAnimatePicker: true // Use the animatepickerComponent\n};\n","import { Component, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { Options } from '../../models/datepicker-options.model';\nimport {YearMonth, Day, Month, Week} from '../../models/datepicker.model';\nimport { DatepickerService } from '../../services/datepicker.service';\nimport { UtilitiesService } from '../../services/utilities.service';\nimport { DefaultOptions } from './datepicker.options';\n\n@Component({\n\tselector: 'aa-datepicker',\n\ttemplate: `<div class=\"datepicker__wrapper\">\n\t<div>\n\t\t<aa-navigation\n\t\t\t\t[hideNavigation]=\"options.hideNavigation\"\n (previousClick)=\"goToPreviousMonth()\"\n\t\t\t\t(nextClick)=\"goToNextMonth()\"\n\t\t\t\t[language]=\"language\"\n\t\t\t\t[totalYearMonth]=\"totalYearMonth\"></aa-navigation>\n\t\t<div class=\"datepicker__weekdays-wrapper\">\n\t\t\t<div class=\"datepicker__weekdays-container\">\n\t\t\t\t<table class=\"datepicker__weekdays\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t<td class=\"datepicker__weekday\" *ngFor=\"let weekday of weekdays; index as i\">{{weekday}}</td>\n\t\t\t\t\t</thead>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"datepicker__calendar-wrapper\">\n\t\t<div *ngFor=\"let month of months;\" class=\"datepicker__calendar-container\">\n\t\t\t<table class=\"datepicker__calendar\">\n\t\t\t\t<tbody>\n\t\t\t\t<tr *ngFor=\"let week of month.weeks; index as i\">\n\t\t\t\t\t<td class=\"datepicker__day\" *ngFor=\"let day of week.days; index as i\" [ngClass]=\"{\n\t\t\t'is-first': day.isFirst,\n\t\t\t'is-last': day.isLast,\n\t\t\t'is-hidden': day.isHidden,\n\t\t\t'is-disabled': day.isDisabled,\n\t\t\t'is-today': day.isToday,\n\t\t\t'is-selected': day.isSelected,\n\t\t\t'is-in-range': day.isInRange,\n\t\t\t'is-start-date': day.isStartDate,\n\t\t\t'is-end-date': day.isEndDate,\n\t\t\t'is-rest': day.isRest\n\t\t\t}\">\n\t\t\t\t\t\t<button class=\"datepicker__button\" [disabled]=\"day.isDisabled || day.isHidden\"\n\t\t\t\t\t\t\t\t(click)=\"updateValue(day.date)\">{{day.dayNumber}}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t</div>\n\t<ng-content></ng-content>\n</div>`,\n\tstyles: [`:host{font-family:Arial,Helvetica,sans-serif;border:1px solid #d9d9d8;width:300px;position:relative;display:inline-block;z-index:2;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.15);overflow:hidden;background-color:#fff;box-sizing:border-box;visibility:hidden}:host *{box-sizing:border-box}:host .datepicker__calendar-container{padding:0 10px 10px}:host .datepicker__footer{position:relative;z-index:1}:host table{width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse}:host td{padding:0}:host .datepicker__weekdays-wrapper::after,:host .datepicker__weekdays-wrapper::before{content:' ';display:table}:host .datepicker__weekdays-wrapper::after{clear:both}:host .datepicker__weekdays-container{padding:10px 10px 0;float:left}:host .datepicker__weekdays{table-layout:fixed;width:100%}:host .datepicker__weekday{color:grey;font-size:12px;height:20px;text-align:center}:host .datepicker__day{position:relative;text-align:center;height:40px;width:auto;border:1px solid #d9d9d8}:host .datepicker__day.is-rest{border:none}:host .datepicker__button{padding:0;background-color:transparent;border:none;outline:0;font-style:inherit;cursor:pointer;color:#8e8d8a;width:100%;height:100%}:host .datepicker__button:hover{border:1px solid transparent;background-color:#f2f2f2;color:#8e8d8a}:host .is-hidden{opacity:0;display:table-cell}:host .is-rest{border:none}:host .is-rest .datepicker__button{color:#c0c0be}:host .is-today .datepicker__button{background-color:#eae7dc}:host .is-in-range .datepicker__button{background-color:#e98074;color:#fff}:host .is-in-range .datepicker__button:hover{background-color:#e66c5e}:host .is-selected .datepicker__button{background-color:#e85a4f;color:#fff;font-weight:700}:host .is-selected .datepicker__button:hover{background-color:#e23022}:host .is-start-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-end-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-disabled .datepicker__button{color:#d9d9d8;cursor:default}:host .is-disabled .datepicker__button:hover{background-color:transparent}:host.is-directive{visibility:hidden;position:absolute}:host.is-open{visibility:visible}:host.is-animate{transition:height .2s ease-in;width:300px}:host.is-animate .datepicker__main{transition:height .2s ease-in}:host.is-animate .datepicker__calendar-wrapper{position:absolute;width:200%;left:0}:host.is-animate .datepicker__calendar{float:left;width:100%}:host.is-animate .datepicker__calendar-container{float:left}`]\n})\nexport class DatepickerComponent implements OnInit {\n\t/* ==============================================\n\t * Internal Properties\n\t * ============================================== */\n\tpublic date: Date = new Date();\n\tpublic year: number = null;\n\tpublic month: number = null;\n\tpublic today: Date = this.date;\n\tpublic months: Month[] = null;\n\tpublic weekdays: string[] = ['M', 'T', 'W', 'T', 'F', 'S', 'S'];\n\tpublic totalYearMonth: YearMonth[];\n\tpublic selectedRange = 'startDate';\n\tpublic startDate: Date = null;\n\tpublic endDate: Date = null;\n\tpublic initialised = false;\n\tprivate weekStartArray = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];\n\n\t/* ==============================================\n\t * Initial Options\n\t * ============================================== */\n\tpublic _options: Options = DefaultOptions;\n\t@Input('options')\n\tset options(options: Options) {\n\t\tif (options === undefined || !options) {\n\t\t\treturn;\n\t\t}\n\t\tthis._options = { ...this._options, ...options };\n\n\t\tif (options.currentDate !== undefined) {\n\t\t\tthis.date = this.options.currentDate;\n\t\t}\n\n\t\tif (this.initialised) {\n\t\t\tthis.goToDate();\n\t\t}\n\t}\n\n\tget options(): Options {\n\t\treturn this._options;\n\t}\n\n\t/* ==============================================\n\t * External Properties\n\t * ============================================== */\n\n\t/**\n\t * Set the the language manualy. A string with a BCP 47 language tag\n\t * @example nl-NL\n\t */\n\t_language = navigator.language;\n\t@Input()\n\tset language(value: string) {\n\t\tif (!value || value === undefined || !DatepickerService.isValidIsoCode(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._language = value;\n\n\t\tthis.renderWeekdays();\n\t}\n\n\tget language() {\n\t\treturn this._language;\n\t}\n\n\t/**\n\t * Minimal Date: If set the dates before it will be disabled\n\t */\n\tpublic _minDate = null;\n\t@Input()\n\tset minDate(value: Date) {\n\t\tif (value === undefined || value === this._minDate) {\n\t\t\treturn;\n\t\t}\n\t\tthis._minDate = new Date(value);\n\t\tthis.goToDate();\n\t}\n\n\tget minDate(): Date {\n\t\treturn this._minDate;\n\t}\n\n\t/**\n\t * Maximal Date: If set the dates after it will be disabled\n\t */\n\tpublic _maxDate = null;\n\t@Input()\n\tset maxDate(value: Date) {\n\t\tif (value === undefined || value === this._minDate) {\n\t\t\treturn;\n\t\t}\n\t\tthis._maxDate = new Date(value);\n\t\tthis.goToDate();\n\t}\n\n\tget maxDate(): Date {\n\t\treturn this._maxDate;\n\t}\n\n\t/**\n\t * Selected Dates: handles the selected dates array. Can be set both internally and externally\n\t */\n\tprivate _selectedDates: Date[] = [];\n\t@Output() selectedDatesChange = new EventEmitter();\n\n\t@Input()\n\tset selectedDates(value: Date[]) {\n\t\tconst _value = Array.isArray(value) ? value : [value];\n\t\tif (!DatepickerService.isValidDate(_value)) {\n\t\t\treturn;\n\t\t}\n\t\tthis._selectedDates = _value;\n\n\t\tif (this.options.range) {\n\t\t\tthis.resetRange();\n\t\t}\n\n\t\tthis.goToDate();\n\n\t\tthis.selectedDatesChange.emit(this._selectedDates);\n\t}\n\n\tget selectedDates(): Date[] {\n\t\treturn this._selectedDates;\n\t}\n\n\t/* ==============================================\n\t * Bindings and Children\n\t * ============================================== */\n\t@ViewChild('calendarContainer') public calendarContainer: ElementRef;\n\t@ViewChild('calendarTopContainer') public calendarTopContainer: ElementRef;\n\t@HostBinding('class')\n\t@Input()\n\ttheme = '';\n\t@HostBinding('class.is-open')\n\t@Input()\n\tisOpen = true;\n\t@HostBinding('class.is-directive') asDirective = false;\n\t@HostBinding('class.is-animate') animate = false;\n\t@HostBinding('style.top.px') topPosition: number = null;\n\t@HostBinding('style.left.px') leftPosition: number = null;\n\t@HostBinding('style.bottom.px') bottomPosition: number = null;\n\t@HostBinding('style.right.px') rightPosition: number = null;\n\n\tconstructor(public utils: UtilitiesService, public element: ElementRef) {}\n\n\tngOnInit() {\n\t\tthis.initialised = true;\n\n\t\tif (!this.month && !this.year) {\n\t\t\tthis.goToDate(this.options.currentDate);\n\t\t}\n\t}\n\n\t/**\n\t * Creates a day array\n\t *\n\t * @param year\n\t * @param month\n\t * @param isRestDays\n\t */\n\tcreateDayArray(year: number, month: number, isRestDays?: boolean): Day[] {\n\t\tconst days = [];\n\t\tconst daysInMonth = DatepickerService.getDaysInMonth(year, month);\n\t\tfor (let index = 0; index < daysInMonth; index++) {\n\t\t\tconst dayNumber = index + 1;\n\t\t\tconst date = new Date(year, month, dayNumber);\n\t\t\tconst day = {\n\t\t\t\tdate,\n\t\t\t\tdayNumber,\n\t\t\t\tisFirst: dayNumber === 1,\n\t\t\t\tisLast: dayNumber === daysInMonth,\n\t\t\t\tisToday: this.isToday(date),\n\t\t\t\tisSelected: this.isSelected(date),\n\t\t\t\tisRest: isRestDays,\n\t\t\t\tisHidden: isRestDays && this.options.hideRestDays,\n\t\t\t\tisDisabled:\n\t\t\t\t\t((this.minDate || this.maxDate) && this.isDisabled(date)) ||\n\t\t\t\t\t(isRestDays && this.options.disableRestDays),\n\t\t\t\tisInRange:\n\t\t\t\t\tthis.isInRange(date) ||\n\t\t\t\t\t((this.isStartDate(date) || this.isEndDate(date)) && this.startDate && this.endDate),\n\t\t\t\tisStartDate: this.isStartDate(date),\n\t\t\t\tisEndDate: this.isEndDate(date)\n\t\t\t};\n\t\t\tdays.push(day);\n\t\t}\n\n\t\treturn days;\n\t}\n\n\t/**\n\t * Get the days from the next month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetNextRestDays(year: number, month: number): Day[] {\n\t\tconst monthLength = DatepickerService.getDaysInMonth(year, month);\n\t\tconst weekStartIndex = this.weekStartArray.indexOf(this.options.weekStart);\n\n\t\t// Get the end of the month number minus the week start index\n\t\tconst endOfTheMonth = new Date(year, month, monthLength).getDay() - weekStartIndex;\n\n\t\t// Flip minus to plus when the end month number is minus.\n\t\t// this occurs when there are less rest days then the week start index\n\t\tconst _endOfTheMonth = endOfTheMonth < 0 ? 7 - Math.abs(endOfTheMonth) : endOfTheMonth;\n\t\tconst nextDays = this.createDayArray(\n\t\t\tDatepickerService.getYearOfNextMonth(year, month),\n\t\t\tDatepickerService.getNextMonth(month),\n\t\t\ttrue\n\t\t).slice(0, 7 - _endOfTheMonth);\n\t\treturn nextDays.length > 6 ? [] : nextDays;\n\t}\n\n\t/**\n\t * Get the days of the previous month\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetPreviousRestDays(year: number, month: number): Day[] {\n\t\tconst startOfTheMonth = new Date(year, month, 0).getDay();\n\t\tconst previousDays = this.createDayArray(\n\t\t\tDatepickerService.getYearOfPreviousMonth(year, month),\n\t\t\tDatepickerService.getPreviousMonth(month),\n\t\t\ttrue\n\t\t);\n\t\tconst weekStartIndex = this.weekStartArray.indexOf(this.options.weekStart);\n\t\tconst _weekStartIndex = weekStartIndex === 0 ? 0 : (7 - weekStartIndex);\n\t\tlet sliceIndex = previousDays.length - startOfTheMonth - _weekStartIndex;\n\t\tsliceIndex = previousDays.length - sliceIndex >= 7 ? sliceIndex + 7 : sliceIndex\n\t\treturn previousDays.slice(sliceIndex, previousDays.length);\n\t}\n\n\t/**\n\t * Merge all the day arrays together\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetMergedDayArrays(year: number, month: number): Day[] {\n\t\treturn [\n\t\t\t...this.getPreviousRestDays(year, month),\n\t\t\t...this.createDayArray(year, month),\n\t\t\t...this.getNextRestDays(year, month)\n\t\t];\n\t}\n\n\t/**\n\t * Create the calendar array from the week arrays\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tcreateCalendarArray(year: number, month: number): [{ weeks: Week[] }] {\n\t\tconst dayArray = this.getMergedDayArrays(year, month);\n\t\tconst weeks = DatepickerService.createWeekArray(dayArray);\n\t\treturn [{ weeks: weeks }];\n\t}\n\n\t/**\n\t * Update value is being triggered\n\t *\n\t * @param date\n\t */\n\tupdateValue(date: Date): void {\n\t\tif (this.options.range) {\n\t\t\tthis.selectRange(date);\n\t\t} else if (!this.isSelected(date)) {\n\t\t\tif (this.options.selectMultiple) {\n\t\t\t\tthis.selectDate(date);\n\t\t\t} else {\n\t\t\t\tthis.toggleDate(date);\n\t\t\t}\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.deselectDate(date);\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t}\n\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Select range method - contains the logic to select the start- and endrange\n\t *\n\t * @param date\n\t */\n\tselectRange(date: Date): void {\n\t\tif (this.isSelected(date)) {\n\t\t\tthis.deselectDate(date);\n\t\t} else if (DatepickerService.isEarlier(date, this.startDate)) {\n\t\t\tif (this.startDate) {\n\t\t\t\tthis.toggleDate(date, this.startDate, true);\n\t\t\t} else {\n\t\t\t\tthis.selectDate(date);\n\t\t\t}\n\t\t\tthis.startDate = date;\n\t\t\tthis.selectEndDate();\n\t\t} else if (this.endDate && DatepickerService.isLater(date, this.endDate)) {\n\t\t\tthis.toggleDate(date, this.endDate);\n\t\t\tthis.endDate = date;\n\t\t\tthis.selectStartDate();\n\t\t} else if (this.selectedRange === 'startDate') {\n\t\t\tif (this.startDate) {\n\t\t\t\tthis.toggleDate(date, this.startDate, true);\n\t\t\t} else {\n\t\t\t\tthis.selectDate(date);\n\t\t\t}\n\t\t\tthis.startDate = date;\n\t\t\tthis.selectEndDate();\n\t\t} else if (this.selectedRange === 'endDate') {\n\t\t\tif (this.endDate) {\n\t\t\t\tthis.toggleDate(date, this.endDate);\n\t\t\t} else {\n\t\t\t\tthis.selectDate(date);\n\t\t\t}\n\t\t\tthis.endDate = date;\n\t\t\tthis.selectStartDate();\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Reset the range if the selected dates change externally\n\t */\n\tresetRange(): void {\n\t\tif (this._selectedDates.length === 1) {\n\t\t\tthis.startDate = this._selectedDates[0];\n\t\t\tthis.endDate = null;\n\t\t} else if (this._selectedDates.length === 0) {\n\t\t\tthis.startDate = null;\n\t\t\tthis.endDate = null;\n\t\t}\n\t}\n\n\t/**\n\t * Toggle a date. One in, on out.\n\t *\n\t * @param date - Date to be toggled on\n\t * @param toggleDate - Optional set specific date to toggle off\n\t * @param unshift - Optional set to unshift in the selectedDates array. is passed to selectDate method\n\t */\n\ttoggleDate(date: Date, toggleDate?: Date, unshift?: boolean): void {\n\t\tif (!toggleDate) {\n\t\t\tthis.selectedDates = [date];\n\t\t} else if (unshift) {\n\t\t\tthis._selectedDates.unshift(date);\n\t\t\tthis.selectedDates = this._selectedDates.filter(selectedDate => {\n\t\t\t\treturn selectedDate.toDateString() !== toggleDate.toDateString();\n\t\t\t});\n\t\t} else {\n\t\t\tthis._selectedDates.push(date);\n\t\t\tthis.selectedDates = this._selectedDates.filter(selectedDate => {\n\t\t\t\treturn selectedDate.toDateString() !== toggleDate.toDateString();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Select a date\n\t *\n\t * @param date\n\t * @param unshift - Optional set to unshift instead of push the date in the selectedDates array\n\t */\n\tselectDate(date: Date, unshift?: boolean): void {\n\t\tconst selectedDates = [...this.selectedDates];\n\n\t\tif (unshift) {\n\t\t\tselectedDates.unshift(date);\n\t\t} else {\n\t\t\tselectedDates.push(date);\n\t\t}\n\n\t\tthis.selectedDates = selectedDates;\n\t}\n\n\t/**\n\t * Deselect a date\n\t *\n\t * @param date\n\t */\n\tdeselectDate(date: Date): void {\n\t\tthis.selectedDates = this._selectedDates.filter(selectedDate => {\n\t\t\treturn selectedDate.toDateString() !== date.toDateString();\n\t\t});\n\t}\n\n\t/**\n\t * Go to the next month\n\t */\n\tgoToNextMonth(): void {\n\t\tthis.year = DatepickerService.getYearOfNextMonth(this.year, this.month);\n\t\tthis.month = DatepickerService.getNextMonth(this.month);\n\t\tthis.totalYearMonth = [{ month: this.month, year: this.year }];\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Go to the previous month\n\t */\n\tgoToPreviousMonth(): void {\n\t\tthis.year = DatepickerService.getYearOfPreviousMonth(this.year, this.month);\n\t\tthis.month = DatepickerService.getPreviousMonth(this.month);\n\t\tthis.totalYearMonth = [{ month: this.month, year: this.year }];\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Go to a specific month. Is also used to rerender the datepicker\n\t *\n\t * @param date - default is the current date.\n\t */\n\tgoToDate(date: Date = this.date): void {\n\t\tthis.month = date.getMonth();\n\t\tthis.year = date.getFullYear();\n\t\tthis.totalYearMonth = [{ month: this.month, year: this.year }];\n\t\tthis.months = this.createCalendarArray(this.year, this.month);\n\t}\n\n\t/**\n\t * Render weekdays when options or language changes\n\t */\n\trenderWeekdays() {\n\t\tthis.weekdays = DatepickerService.getWeekDays(\n\t\t\tthis._language,\n\t\t\tthis.options.weekdayFormat,\n\t\t\tthis.options.weekStart\n\t\t);\n\t}\n\n\t/**\n\t * Set the open state to true\n\t */\n\topen(): void {\n\t\tif (this.isOpen) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isOpen = true;\n\t}\n\n\t/**\n\t * Close the datepicker\n\t *\n\t * @param useTimeout - optional timeout\n\t */\n\tclose(useTimeout?: boolean): void {\n\t\tif (!this.isOpen) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst timeout = useTimeout ? this.options.timeoutBeforeClosing : 0;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.isOpen = false;\n\t\t}, timeout);\n\t}\n\n\t/**\n\t * Select the start date - used for range functionality\n\t */\n\tselectStartDate(): void {\n\t\tthis.selectedRange = 'startDate';\n\t}\n\n\t/**\n\t * Select the end date - used for range functionality\n\t */\n\tselectEndDate(): void {\n\t\tthis.selectedRange = 'endDate';\n\t}\n\n\t// TODO: maybe output the startDate and Endate or just of internal use\n\t/**\n\t * Check if date is the start date\n\t */\n\tisStartDate(date: Date): boolean {\n\t\treturn this.startDate && date.toDateString() === this.startDate.toDateString();\n\t}\n\n\t/**\n\t * Check if date is the end date\n\t */\n\tisEndDate(date: Date): boolean {\n\t\treturn this.endDate && date.toDateString() === this.endDate.toDateString();\n\t}\n\n\t/**\n\t * Check if date is today\n\t */\n\tisToday(date: Date): boolean {\n\t\treturn date.toDateString() === this.today.toDateString();\n\t}\n\n\t/**\n\t * Check if date is selected\n\t */\n\tisSelected(dateToCheck: Date): boolean {\n\t\treturn this._selectedDates.map(date => date.toDateString()).indexOf(dateToCheck.toDateString()) !== -1;\n\t}\n\n\t/**\n\t * Check if date is disabled\n\t */\n\tisDisabled(date: Date): boolean {\n\t\tif (!this.minDate) {\n\t\t\treturn !(date < this.maxDate);\n\t\t}\n\n\t\tif (!this.maxDate) {\n\t\t\treturn !(date > this.minDate);\n\t\t}\n\n\t\treturn !(date < this.maxDate && date > this.minDate);\n\t}\n\n\t/**\n\t * Check if date is in range\n\t */\n\tisInRange(date: Date): boolean {\n\t\treturn this.startDate && this.endDate && this.startDate < date && date < this.endDate;\n\t}\n}\n","import {\n\tAfterViewInit,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tInput,\n\tOnInit,\n\tViewChild,\n} from '@angular/core';\nimport { YearMonth, Month } from '../../models/datepicker.model';\nimport { DatepickerService } from '../../services/datepicker.service';\nimport { UtilitiesService } from '../../services/utilities.service';\nimport { DatepickerComponent } from '../datepicker/datepicker.component';\n\n@Component({\n\tselector: 'aa-animatepicker',\n\ttemplate: `<div class=\"datepicker__wrapper\" [ngStyle]=\"datepickerPosition\">\n\t<div #calendarTopContainer>\n\t\t<div class=\"datepicker__header\" #header>\n\t\t\t<ng-content select=\"header\"></ng-content>\n\t\t</div>\n\t\t<aa-navigation\n\t\t\t\t(previousClick)=\"goToPreviousMonth()\"\n\t\t\t\t(nextClick)=\"goToNextMonth()\"\n\t\t\t\t(subNavigationClick)=\"goToDate($event)\"\n\t\t\t\t[language]=\"language\"\n\t\t\t\t[animate]=\"animate\"\n\t\t\t\t[translateX]=\"translateX\"\n\t\t\t\t[transition]=\"transition\"\n\t\t\t\t[leftPosition]=\"leftInnerPosition\"\n\t\t\t\t[hideNavigation]=\"options.hideNavigation\"\n\t\t\t\t[totalYearMonth]=\"totalYearMonth\"\n\t\t></aa-navigation>\n\n\t\t<div class=\"datepicker__weekdays-wrapper\">\n\t\t\t<div \t*ngFor=\"let month of numberOfMonths\"\n\t\t\t\t\t[ngStyle]=\"{\n\t\t\t\t'width.%': (100 / numberOfMonths.length)\n\t\t\t\t}\"\n\t\t\t\t\tclass=\"datepicker__weekdays-container\">\n\t\t\t\t<table class=\"datepicker__weekdays\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t<td class=\"datepicker__weekday\" *ngFor=\"let weekday of weekdays; index as i\">{{weekday}}</td>\n\t\t\t\t\t</thead>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"datepicker__main\" [ngStyle]=\"{\n\t\t'height.px': calendarHeight}\">\n\t\t<div class=\"datepicker__calendar-wrapper\" #calendarContainer [ngStyle]=\"{\n\t\t\t\t\t'transform': 'translateX(' + translateX + '%)',\n\t\t\t\t\t'transition': transition,\n\t\t\t\t\t'left.%': leftInnerPosition\n\t\t\t\t\t}\"\n\t\t>\n\t\t\t<div\n\t\t\t\t\t*ngFor=\"let month of months;\"\n\t\t\t\t\tclass=\"datepicker__calendar-container\"\n\t\t\t\t\t[ngStyle]=\"{'width.%': calendarWidth}\"\n\t\t\t>\n\t\t\t\t<table class=\"datepicker__calendar\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr *ngFor=\"let week of month.weeks; index as i\" class=\"datepicker__week\">\n\t\t\t\t\t\t<td class=\"datepicker__day\" *ngFor=\"let day of week.days; index as i\"\n\t\t\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'is-first': day.isFirst,\n\t\t\t\t\t\t'is-last': day.isLast,\n\t\t\t\t\t\t'is-hidden': day.isHidden,\n\t\t\t\t\t\t'is-disabled': day.isDisabled,\n\t\t\t\t\t\t'is-today': day.isToday,\n\t\t\t\t\t\t'is-selected': day.isSelected,\n\t\t\t\t\t\t'is-in-range': day.isInRange,\n\t\t\t\t\t\t'is-start-date': day.isStartDate,\n\t\t\t\t\t\t'is-end-date': day.isEndDate,\n\t\t\t\t\t\t'is-rest': day.isRest\n\t\t\t\t\t\t}\">\n\t\t\t\t\t\t\t<button class=\"datepicker__button\" [disabled]=\"day.isDisabled || day.isHidden\"\n\t\t\t\t\t\t\t\t\t(click)=\"updateValue(day.date)\">{{day.dayNumber}}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"datepicker__footer\" #footer>\n\t\t<ng-content select=\"footer\"></ng-content>\n\t</div>\n</div>\n\t\t`,\n\tstyles: [`:host{font-family:Arial,Helvetica,sans-serif;border:1px solid #d9d9d8;width:300px;position:relative;display:inline-block;z-index:2;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.15);overflow:hidden;background-color:#fff;box-sizing:border-box;visibility:hidden}:host *{box-sizing:border-box}:host .datepicker__calendar-container{padding:0 10px 10px}:host .datepicker__footer{position:relative;z-index:1}:host table{width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse}:host td{padding:0}:host .datepicker__weekdays-wrapper::after,:host .datepicker__weekdays-wrapper::before{content:' ';display:table}:host .datepicker__weekdays-wrapper::after{clear:both}:host .datepicker__weekdays-container{padding:10px 10px 0;float:left}:host .datepicker__weekdays{table-layout:fixed;width:100%}:host .datepicker__weekday{color:grey;font-size:12px;height:20px;text-align:center}:host .datepicker__day{position:relative;text-align:center;height:40px;width:auto;border:1px solid #d9d9d8}:host .datepicker__day.is-rest{border:none}:host .datepicker__button{padding:0;background-color:transparent;border:none;outline:0;font-style:inherit;cursor:pointer;color:#8e8d8a;width:100%;height:100%}:host .datepicker__button:hover{border:1px solid transparent;background-color:#f2f2f2;color:#8e8d8a}:host .is-hidden{opacity:0;display:table-cell}:host .is-rest{border:none}:host .is-rest .datepicker__button{color:#c0c0be}:host .is-today .datepicker__button{background-color:#eae7dc}:host .is-in-range .datepicker__button{background-color:#e98074;color:#fff}:host .is-in-range .datepicker__button:hover{background-color:#e66c5e}:host .is-selected .datepicker__button{background-color:#e85a4f;color:#fff;font-weight:700}:host .is-selected .datepicker__button:hover{background-color:#e23022}:host .is-start-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-end-date .datepicker__button{background-color:#e85a4f;color:#fff}:host .is-disabled .datepicker__button{color:#d9d9d8;cursor:default}:host .is-disabled .datepicker__button:hover{background-color:transparent}:host.is-directive{visibility:hidden;position:absolute}:host.is-open{visibility:visible}:host.is-animate{transition:height .2s ease-in;width:300px}:host.is-animate .datepicker__main{transition:height .2s ease-in}:host.is-animate .datepicker__calendar-wrapper{position:absolute;width:200%;left:0}:host.is-animate .datepicker__calendar{float:left;width:100%}:host.is-animate .datepicker__calendar-container{float:left}`]\n})\nexport class AnimatepickerComponent extends DatepickerComponent implements OnInit, AfterViewInit {\n\t/* ==============================================\n\t * Internal Properties\n\t * ============================================== */\n\n\tpublic animate = true;\n\tpublic initialWidth: number;\n\tpublic calendarWidth: number;\n\tpublic isAnimating = false;\n\tpublic leftInnerPosition = 0;\n\tpublic transition: string;\n\tpublic translateX: number;\n\tpublic currentYearMonth: object = null;\n\tpublic datepickerPosition: object;\n\tpublic initialised = false;\n\tpublic calendarHeight: number\n\n\t/* ==============================================\n\t * External Properties\n\t * ============================================== */\n\n\t/**\n\t * Number of months: the number of months displayed\n\t */\n\tprivate _numberOfMonths: any = new Array(1);\n\t@Input()\n\tset numberOfMonths(value) {\n\t\tif (value === undefined || value === this._numberOfMonths.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._numberOfMonths = new Array(value);\n\t\tthis.setDatePickerDimension();\n\n\t\tthis.goToDate(this.date);\n\t}\n\n\tget numberOfMonths(): Number[] {\n\t\treturn this._numberOfMonths;\n\t}\n\n\t/* ==============================================\n\t * Bindings and Children\n\t * ============================================== */\n\n\t@ViewChild('calendarContainer') public calendarContainer: ElementRef;\n\t@ViewChild('calendarTopContainer') public calendarTopContainer: ElementRef;\n\t@ViewChild('footer') public footer: ElementRef;\n\t@HostBinding('style.width.px') public datepickerWidth: number;\n\t@HostBinding('style.height.px') public datepickerHeight: number;\n\n\tconstructor(public elementRef: ElementRef, public utilities: UtilitiesService) {\n\t\tsuper(utilities, elementRef);\n\t}\n\n\tngOnInit() {\n\t\t// Get the computed width from the calendar. Set the initial width\n\t\tconst computedWidth = window\n\t\t\t.getComputedStyle(this.elementRef.nativeElement, null)\n\t\t\t.getPropertyValue('width');\n\t\tthis.initialWidth = parseInt(computedWidth, 10);\n\t\tthis.initialised = true;\n\n\t\t// Set the current year and month object\n\t\tif (!this.month && !this.year) {\n\t\t\tthis.goToDate(this.options.currentDate);\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.setDatePickerDimension();\n\t\t\tthis.setDatepickerHeight(true);\n\t\t});\n\t}\n\n\t/**\n\t * Set the height and the width properties\n\t */\n\tsetDatePickerDimension(): void {\n\t\tthis.datepickerHeight =\n\t\t\tthis.calendarContainer.nativeElement.offsetHeight +\n\t\t\tthis.calendarTopContainer.nativeElement.offsetHeight + \n\t\t\tthis.footer.nativeElement.offsetHeight;\n\t\tthis.calendarHeight = this.calendarContainer.nativeElement.offsetHeight;\n\t\tthis.datepickerWidth = this.initialWidth * this._numberOfMonths.length;\n\t}\n\n\t/**\n\t * Go to a specific month\n\t *\n\t * @param date - optional\n\t */\n\tgoToDate(date?: Date): void {\n\t\tif (date) {\n\t\t\tthis.currentYearMonth = this.getNextYearMonthArray(date.getFullYear(), date.getMonth());\n\t\t}\n\t\tthis.calendarWidth = 50 / this._numberOfMonths.length;\n\t\tthis.months = this.getNextMonthArray(this.currentYearMonth, true);\n\t\tthis.resetStyle();\n\t}\n\n\t/**\n\t * Create an array of the next year and months\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetNextYearMonthArray(year: number, month: number): YearMonth[] {\n\t\tconst array = [];\n\t\tfor (let index = 0; index < this._numberOfMonths.length; index++) {\n\t\t\tarray.push({ year: year, month: month });\n\t\t\tyear = DatepickerService.getYearOfNextMonth(year, month);\n\t\t\tmonth = DatepickerService.getNextMonth(month);\n\t\t}\n\t\treturn array;\n\t}\n\n\t/**\n\t * Create an array of the previous year and months\n\t *\n\t * @param year\n\t * @param month\n\t */\n\tgetPreviousYearMonthArray(year: number, month: number): YearMonth[] {\n\t\tconst array = [];\n\t\tfor (let index = 0; index < this._numberOfMonths.length; index++) {\n\t\t\tarray.unshift({ year: year, month: month });\n\t\t\tyear = DatepickerService.getYearOfPreviousMonth(year, month);\n\t\t\tmonth = DatepickerService.getPreviousMonth(month);\n\t\t}\n\t\treturn array;\n\t}\n\n\t/**\n\t * Set the datepicker height, used when animating\n\t *\n\t * @param directionRight - Set optional when sliding to the right\n\t */\n\tsetDatepickerHeight(directionRight?: boolean): void {\n\t\tlet indexArray: number[];\n\n\t\t// TODO: Seperate this logic for readability purpose\n\t\tif (this._numberOfMonths.length > 1) {\n\t\t\tconst start = directionRight ? 0 : this._numberOfMonths.length;\n\t\t\tconst end = directionRight\n\t\t\t\t? this._numberOfMonths.length - 1\n\t\t\t\t: this._numberOfMonths.length + this._numberOfMonths.length - 1;\n\t\t\tindexArray = this.utilities.createArray(start, end);\n\t\t} else {\n\t\t\tindexArray = directionRight ? [0] : [1];\n\t\t}\n\n\t\tconst that = this;\n\t\tsetTimeout(() => {\n\t\t\tconst calendarArray = that.elementRef.nativeElement.querySelectorAll(\n\t\t\t\t'.datepicker__calendar-container'\n\t\t\t);\n\t\t\tlet offsetHeight = 0;\n\t\t\tindexArray.forEach(el => {\n\t\t\t\tif (calendarArray[el].offsetHeight > offsetHeight) {\n\t\t\t\t\toffsetHeight = calendarArray[el].offsetHeight;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t// TODO: Merge with setHeight function.\n\t\t\tthat.datepickerHeight =\n\t\t\t\toffsetHeight + that.calendarTopContainer.nativeElement.offsetHeight + that.footer.nativeElement.offsetHeight;\n\t\t\tthat.calendarHeight = offsetHeight;\n\t\t});\n\t}\n\n\t/**\n\t * Get next month array, gets multiple months.\n\t * Used when the options animate is set or multiple months are visable\n\t *\n\t * @return Month[]\n\t */\n\tgetNextMonthArray(currentYearMonth, keepDate = false, nextMonthsYearMonthArray?): Month[] {\n\t\t// Get the last index, used for selecting the right year month object\n\t\tconst lastIndex = this._numberOfMonths.length - 1;\n\n\t\t// Get next year and month in an Object\n\t\tconst nextMonths =\n\t\t\tnextMonthsYearMonthArray ||\n\t\t\tthis.getNextYearMonthArray(\n\t\t\t\tDatepickerService.getYearOfNextMonth(\n\t\t\t\t\tcurrentYearMonth[lastIndex].year,\n\t\t\t\t\tcurrentYearMonth[lastIndex].month\n\t\t\t\t),\n\t\t\t\tDatepickerService.getNextMonth(currentYearMonth[lastIndex].month)\n\t\t\t);\n\n\t\t// Concatenates the two objects to create a total year and month object\n\t\tthis.totalYearMonth = currentYearMonth.concat(nextMonths);\n\n\t\t// Create the calendar array using the total year and month Object\n\t\tconst monthArray = [];\n\t\tthis.totalYearMonth.forEach(e =>\n\t\t\tmonthArray.push(this.createCalendarArray(e.year, e.month))\n\t\t);\n\n\t\t// Set the new current year and month object.\n\t\tif (!keepDate) {\n\t\t\tthis.currentYearMonth = nextMonths;\n\t\t}\n\n\t\treturn [].concat.apply([], monthArray);\n\t}\n\n\t/**\n\t * Gets an array of previous months.\n\t * Used for animation and when more months are displayed\n\t *\n\t * @param currentYearMonth\n\t * @param keepDate\n\t */\n\tgetPreviousMonthArray(currentYearMonth, keepDate = false): Month[] {\n\t\t// Get previous year and month in an Object\n\t\tconst previousMonths = this.getPreviousYearMonthArray(\n\t\t\tDatepickerService.getYearOfPreviousMonth(\n\t\t\t\tcurrentYearMonth[0].year,\n\t\t\t\tcurrentYearMonth[0].month\n\t\t\t),\n\t\t\tDatepickerService.getPreviousMonth(currentYearMonth[0].month)\n\t\t);\n\n\t\t// Concatenates the two objects to create a total year and month object\n\t\tthis.totalYearMonth = previousMonths.concat(currentYearMonth);\n\n\t\t// Create the calendar array using the total year and month Object\n\t\tconst monthArray = [];\n\t\tthis.totalYearMonth.forEach(e => {\n\t\t\tmonthArray.push(this.createCalendarArray(e['year'], e['month']));\n\t\t});\n\n\t\t// Set the new current year and month object.\n\t\tif (!keepDate) {\n\t\t\tthis.currentYearMonth = previousMonths;\n\t\t}\n\n\t\treturn [].concat.apply([], monthArray);\n\t}\n\n\t/**\n\t * Update value is being triggered\n\t *\n\t * @param date\n\t */\n\tupdateValue(date: Date): void {\n\t\tif (this.options.range) {\n\t\t\tthis.selectRange(date);\n\t\t} else if (!this.isSelected(date)) {\n\t\t\tif (this.options.selectMultiple) {\n\t\t\t\tthis.selectDate(date);\n\t\t\t} else {\n\t\t\t\tthis.toggleDate(date);\n\t\t\t}\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.deselectDate(date);\n\n\t\t\tif (this.options.closeOnSelect) {\n\t\t\t\tthis.close(true);\n\t\t\t}\n\t\t}\n\t\tthis.months = this.getNextMonthArray(this.currentYearMonth, true);\n\t\tthis.resetStyle();\n\t}\n\n\t/**\n\t * Go to the next month\n\t */\n\tgoToNextMonth(): void {\n\t\tif (this.isAnimating) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.months = this.getNextMonthArray(this.currentYearMonth);\n\t\tthis.resetStyle();\n\t\tthis.setDatepickerHeight();\n\t\tthis.slideLeft();\n\t}\n\n\t/**\n\t * Go to the previous month\n\t */\n\tgoToPreviousMonth(): void {\n\t\tif (this.isAnimating) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.months = this.getPreviousMonthArray(this.currentYearMonth);\n\t\tthis.resetStyle(true);\n\t\tthis.setDatepickerHeight(true);\n\t\tthis.slideRight();\n\t}\n\n\t/**\n\t * Go to a specific month\n\t * TODO: WIP Check if date is in current range, or if it is later or earlier\n\t */\n\tgoToMonth(date: Date): void {\n\t\tconst nextMonths = this.getNextYearMonthArray(date.getFullYear(), date.getMonth());\n\t\tthis.months = this.getNextMonthArray(this.totalYearMonth, false, nextMonths);\n\t\tthis.resetStyle();\n\t\tthis.setDatepickerHeight();\n\t\tthis.slideRight();\n\t}\n\n\t/**\n\t * Slide to the right\n\t */\n\tslideRight(): void {\n\t\tthis.setIsAnimating();\n\t\tsetTimeout(() => {\n\t\t\tthis.transition =\n\t\t\t\t'transform ' + this.options.animationSpeed + 'ms ' + this.options.easing;\n\t\t\tthis.translateX = 50;\n\t\t});\n\t}\n\n\t/**\n\t * Slide to the left (criss cross)\n\t */\n\tslideLeft(): void {\n\t\tthis.setIsAnimating();\n\t\tsetTimeout(() => {\n\t\t\tthis.transition =\n\t\t\t\t'transform ' + this.options.animationSpeed + 'ms ' + this.options.easing;\n\t\t\tthis.translateX = -50;\n\t\t});\n\t}\n\n\t/**\n\t * Set animating state\n\t */\n\tsetIsAnimating(): void {\n\t\tthis.isAnimating = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.isAnimating = false;\n\t\t}, this.options.animationSpeed);\n\t}\n\n\t/**\n\t * Reset Style\n\t *\n\t * @param resetForPrevious - Optional\n\t */\n\tresetStyle(resetForPrevious?: boolean) {\n\t\tthis.transition = 'transform 0ms ease-in';\n\t\tthis.translateX = 0;\n\t\tthis.leftInnerPosition = resetForPrevious ? -100 : 0;\n\t}\n}\n","import {\n\tApplicationRef,\n\tComponentFactoryResolver,\n\tDirective,\n\tEmbeddedViewRef,\n\tEventEmitter,\n\tHostListener,\n\tInjector,\n\tInput,\n\tOptional,\n\tOutput,\n\tRenderer2,\n\tViewContainerRef\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {Options} from '../../models/datepicker-options.model';\nimport {DirectiveOptions} from '../../models/directive-options.model';\nimport {UtilitiesService} from '../../services/utilities.service';\nimport {AnimatepickerComponent} from '../animatepicker/animatepicker.component';\nimport {DatepickerComponent} from './datepicker.component';\nimport {DefaultDirectiveOptions} from './datepicker.options';\n\n@Directive({\n\tselector: '[aaDatepicker]'\n})\nexport class DatepickerDirective {\n\tdatepicker: any = null; // TODO: fix types: DatepickerComponent | AnimatepickerComponent\n\tclickListener;\n\n\t_options = DefaultDirectiveOptions;\n\n\t@Input('aaDatepicker')\n\tset options(options: DirectiveOptions) {\n\t\tif (options === undefined || !options) {\n\t\t\treturn;\n\t\t}\n\t\t// TODO: could be improved\n\t\tthis._options = {...this._options, ...options};\n\t}\n\n\tget options(): DirectiveOptions {\n\t\treturn this._options;\n\t}\n\n\tprivate _datepickerOptions;\n\t@Input('options')\n\tset datepickerOptions(options: Options) {\n\t\tthis._datepickerOptions = options;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.options = options;\n\t\t}\n\t}\n\n\tget datepickerOptions() {\n\t\treturn this._datepickerOptions;\n\t}\n\n\t/**\n\t * Set the the language manualy. A string with a BCP 47 language tag\n\t * @example nl-NL\n\t */\n\tprivate _language;\n\t@Input()\n\tset language(value: string) {\n\t\tthis._language = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.language = value;\n\t\t}\n\t}\n\n\tget language() {\n\t\treturn this._language;\n\t}\n\n\t/**\n\t * Minimal Date: If set the dates before it will be disabled\n\t */\n\tprivate _minDate;\n\t@Input()\n\tset minDate(value: Date) {\n\t\tthis._minDate = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.minDate = value;\n\t\t}\n\t}\n\n\tget minDate() {\n\t\treturn this._minDate;\n\t}\n\n\t/**\n\t * Maximal Date: If set the dates after it will be disabled\n\t */\n\tprivate _maxDate;\n\t@Input()\n\tset maxDate(value: Date) {\n\t\tthis._maxDate = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.maxDate = value;\n\t\t}\n\t}\n\n\tget maxDate() {\n\t\treturn this._minDate;\n\t}\n\n\t/**\n\t * Number of months: the number of months displayed\n\t */\n\tprivate _numberOfMonths;\n\t@Input()\n\tset numberOfMonths(value) {\n\t\tthis._numberOfMonths = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.numberOfMonths = value;\n\t\t}\n\t}\n\n\tget numberOfMonths() {\n\t\treturn this._numberOfMonths;\n\t}\n\n\t/**\n\t * Theme string is added to the host\n\t */\n\tprivate _theme;\n\t@Input()\n\tset theme(value) {\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.theme = value;\n\t\t}\n\t}\n\n\tget theme() {\n\t\treturn this._theme;\n\t}\n\n\t/**\n\t * The open state\n\t */\n\tprivate _isOpen;\n\t@Input()\n\tset isOpen(value) {\n\t\tthis._isOpen = value;\n\n\t\tif (this.datepicker) {\n\t\t\tthis.datepicker.isOpen = value;\n\t\t}\n\t}\n\n\tget isOpen() {\n\t\treturn this._isOpen;\n\t}\n\n\t/**\n\t * Selected Dates: handles the selected dates array. Can be set both internally and externally\n\t */\n\tprivate _selectedDates: Date[] = [];\n\t@Output() selectedDatesChange = new EventEmitter();\n\n\t@Input()\n\tset selectedDates(value: Date[]) {\n\t\tif (value === undefined || this._selectedDates === value) {\n\t\t\treturn;\n\t\t}\n\t\tthis._selectedDates = value;\n\t\tthis.selectedDatesChange.emit(this._selectedDates);\n\t}\n\n\tget selectedDates(): Date[] {\n\t\treturn this._selectedDates;\n\t}\n\n\t@HostListener('click', ['$event.target'])\n\tonClick() {\n\t\tif (!this.datepicker) {\n\t\t\tthis.datepicker = this.createDatepicker();\n\n\t\t\tthis.setDatepickerOptionsAndInputs();\n\t\t\tthis.subscribeToSelectedChanges();\n\t\t}\n\n\t\tif (!this.datepicker.isOpen) {\n\t\t\tif (this.options.appendToBody) {\n\t\t\t\tthis.setPosition();\n\t\t\t}\n\t\t\tthis.datepicker.open();\n\n\t\t\tif (this.options.closeOnBlur) {\n\t\t\t\tsetTimeout(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t(this.clickListener = this.renderer.listen('document', 'click', this.onBlurHandler.bind(this)))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tconstructor(\n\t\tpublic viewContainerRef: ViewContainerRef,\n\t\tpublic componentFactoryResolver: ComponentFactoryResolver,\n\t\tprivate appRef: ApplicationRef,\n\t\tprivate injector: Injector,\n\t\tprivate renderer: Renderer2,\n\t\t@Optional() public formControl: NgControl\n\t) {\n\t}\n\n\t/**\n\t * Add selected changes\n\t */\n\tsubscribeToSelectedChanges(): void {\n\t\tthis.datepicker.selectedDatesChange.subscribe(date => {\n\t\t\tif (this.formControl) {\n\t\t\t\tthis.formControl.control.setValue(date);\n\t\t\t} else {\n\t\t\t\tthis.selectedDates = date;\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Set all the options and inputs of the datepicker\n\t */\n\tsetDatepickerOptionsAndInputs(): void {\n\t\tthis.datepicker.options = this.datepickerOptions;\n\t\tthis.datepicker.isOpen = this.isOpen || false;\n\t\tthis.datepicker.asDirective = true;\n\t\tthis.datepicker.numberOfMonths = this.numberOfMonths;\n\t\tthis.datepicker.theme = this.theme;\n\t\tthis.datepicker._selectedDates = this.selectedDates;\n\t\tthis.datepicker.language = this.language;\n\t\tthis.datepicker.minDate = this.minDate;\n\t\tthis.datepicker.minDate = this.maxDate;\n\t}\n\n\t/**\n\t * Handles the (faked) blur event\n\t *\n\t * @param event\n\t */\n\tonBlurHandler(event: Event): void {\n\t\tif (\n\t\t\tevent.target !== this.datepicker.element.nativeElement &&\n\t\t\t!this.datepicker.element.nativeElement.contains(event.target)\n\t\t) {\n\t\t\t// check click origin\n\t\t\tthis.clickListener();\n\t\t\tthis.datepicker.close(true);\n\t\t}\n\t}\n\n\t/**\n\t * Returns a create DatepickerComponent method\n\t */\n\tcreateDatepicker(): any {\n\t\treturn this.options.appendToBody ? this.appendToBody() : this.appendToContainer();\n\t}\n\n\t/**\n\t * Sets the position of the datepicker\n\t */\n\tsetPosition() {\n\t\tconst position = UtilitiesService.getPageOffset(this.viewContainerRef.element.nativeElement);\n\n\t\tif (this.options.openDirection === 'bottom') {\n\t\t\tthis.datepicker.topPosition = position.bottom;\n\t\t\tthis.datepicker.leftPosition = position.left;\n\t\t}\n\n\t\tif (this.options.openDirection === 'left') {\n\t\t\tthis.datepicker.topPosition = position.top;\n\t\t\tthis.datepicker.rightPosition = position.forRight;\n\t\t}\n\n\t\tif (this.options.openDirection === 'right') {\n\t\t\tthis.datepicker.topPosition = position.top;\n\t\t\tthis.datepicker.leftPosition = position.right;\n\t\t}\n\n\t\tif (this.options.openDirection === 'top') {\n\t\t\tthis.datepicker.bottomPosition = position.forBottom;\n\t\t\tthis.datepicker.leftPosition = position.left;\n\t\t}\n\t}\n\n\t/**\n\t * Appends the DatepickerComponent to the body and returns the instance\n\t */\n\tappendToBody(): any {\n\t\tconst datepickerComponent = this.options.useAnimatePicker ? AnimatepickerComponent : DatepickerComponent;\n\t\tconst componentRef = this.componentFactoryResolver\n\t\t\t.resolveComponentFactory(datepickerComponent)\n\t\t\t.create(this.injector);\n\n\t\tthis.appRef.attachView(componentRef.hostView);\n\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n\n\t\tdocument.body.appendChild(domElem);\n\n\t\treturn componentRef.instance;\n\t}\n\n\t/**\n\t * Appends the DatepickerComponent to the container and returns the instance\n\t */\n\tappendToContainer(): any {\n\t\tconst datepickerComponent = this.options.useAnimatePicker ? AnimatepickerComponent : DatepickerComponent;\n\t\tconst componentRef = this.componentFactoryResolver.resolveComponentFactory(datepickerComponent);\n\t\treturn this.viewContainerRef.createComponent(componentRef).instance;\n\t}\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { NavigationItem } from '../../models/datepicker.model';\n\n@Component({\n\tselector: 'aa-sub-navigation',\n\ttemplate: `<span (click)=\"close.emit()\">Close</span>\n<div class=\"sub-navigation__items-container\">\n <div class=\"sub-navigation__item\" *ngFor=\"let item of navigationItems;\" (click)=\"onItemCLick(item)\">\n <span class=\"sub-navigation__label\">{{item.navigationTitle}}</span>\n </div>\n</div>\n`,\n\tstyles: [`:host{position:absolute;z-index:4;top:0;left:0;width:100%;height:100%;display:block;background-color:#fff}:host .sub-navigation__items-container{display:flex;align-items:center;flex-wrap:wrap}:host .sub-navigation__item{border:1px solid #8e8d8a;height:40px;width:40px}`]\n})\nexport class SubNavigationComponent {\n\t@Output() close: EventEmitter<null> = new EventEmitter();\n\t@Output() subNavigationClick: EventEmitter<Date> = new EventEmitter();\n\t@Input() public navigationItems: NavigationItem[];\n\n\tonItemCLick(navigationItem: NavigationItem) {\n\t\tconst date = new Date(navigationItem.year, navigationItem.month);\n\t\tthis.close.emit();\n\t\tthis.subNavigationClick.emit(date);\n\t}\n}\n","import {Component, EventEmitter, HostBinding, Input, OnInit, Output} from '@angular/core';\nimport {YearMonth, NavigationItem} from '../../models/datepicker.model';\n\n@Component({\n\tselector: 'aa-navigation',\n\ttemplate: `<button *ngIf=\"!hideNavigation\" class=\"navigation__button is-previous\" (click)=\"previous()\"></button>\n<div class=\"navigation__title-wrapper\" [ngStyle]=\"{\n 'transform': 'translateX(' + translateX + '%)',\n 'transition': transition,\n 'left.%': leftPosition\n}\">\n <div *ngFor=\"let title of titles\"\n class=\"navigation__title\"\n [ngStyle]=\"{\n 'width.%': (100 / titles.length)\n }\"\n ><span (click)=\"onMonthClick(title)\">{{title.navigationTitle}}</span> <span (click)=\"onYearClick(title)\">{{title.year}}</span></div>\n</div>\n<button *ngIf=\"!hideNavigation\" class=\"navigation__button is-next\" (click)=\"next()\"></button>`,\n\tstyles: [`:host{display:block;padding:10px;height:52px}:host::after,:host::before{content:' ';display:table}:host::after{clear:both}:host .navigation__title-wrapper{position:absolute;left:0;width:100%}:host .navigation__title{width:100%;font-weight:700;text-align:center;float:left;line-height:2.2rem}:host .navigation__button{padding:0;border:1px solid #c0c0be;outline:0;font-style:inherit;cursor:pointer;position:relative;z-index:1;background-color:#fff;text-align:center;width:32px;height:32px;border-radius:4px}:host .navigation__button:hover{border-color:#8e8d8a}:host .navigation__button.is-previous{float:left}:host .navigation__button.is-previous::after{content:'<'}:host .navigation__button.is-next{float:right}:host .navigation__button.is-next::before{content:'>'}:host.is-animate .navigation__title-wrapper{width:200%}`]\n})\nexport class NavigationComponent implements OnInit {\n\t@Output() public previousClick: EventEmitter<null> = new EventEmitter();\n\t@Output() public nextClick: EventEmitter<null> = new EventEmitter();\n\t@Output() public subNavigationClick: EventEmitter<Date> = new EventEmitter();\n\t@Input() private monthFormat = 'long'; \t// \"narrow\", \"short\", \"long\";\n\n\t@Input()\n\tprivate set language(language: string) {\n\t\tthis.formatMonth = new Intl.DateTimeFormat(language, {month: this.monthFormat});\n\t\tthis._language = language;\n\n\t\tif (this.initialised) {\n\t\t\tthis.titles = this.createNavigationItems(this._totalYearMonth);\n\t\t}\n\t}\n\n\tprivate get language(): string {\n\t\treturn this._language;\n\t}\n\n\tprivate _totalYearMonth: YearMonth[];\n\t@Input()\n\tpublic set totalYearMonth(totalYearMonth: YearMonth[]) {\n\t\tthis._totalYearMonth = totalYearMonth;\n\t\tthis.titles = this.createNavigationItems(totalYearMonth);\n\t}\n\n\t@Input() public transition: string;\n\t@Input() public translateX: number;\n\t@Input() public leftPosition: number;\n\t@Input() public hideNavigation: boolean;\n\n\t@HostBinding('class.is-animate')\n\t@Input()\n\tpublic animate = false;\n\n\tprivate _language: string;\n\tprivate initialised = false;\n\tprivate formatMonth: Intl.DateTimeFormat;\n\tprivate subNavigationOpen = false;\n\tpublic navigationItems: NavigationItem[];\n\tpublic titles: NavigationItem[];\n\n\tngOnInit() {\n\t\tthis.initialised = true;\n\t}\n\n\tonMonthClick(title: NavigationItem) {\n\t\tconst monthArray = this.createMonthArray(title);\n\t\tconst formatMonth = new Intl.DateTimeFormat(this.language, {month: 'short'});\n\t\tthis.navigationItems = this.createNavigationItems(monthArray, true, formatMonth);\n\t\tthis.toggleSubNavigation();\n\t}\n\n\tonYearClick(title: NavigationItem) {\n\t\tthis.navigationItems = this.createYearArray(title);\n\t\tthis.toggleSubNavigation();\n\t}\n\n\ttoggleSubNavigation() {\n\t\tthis.subNavigationOpen = !this.subNavigationOpen;\n\t}\n\n\t/**\n\t * Sets the title\n\t *\n\t * @param totalMonthYear\n\t * @param monthType\n\t * @param formatMonth\n\t * @returns NavigationItem[]\n\t */\n\tcreateNavigationItems(totalMonthYear: YearMonth[], monthType = true, formatMonth = null): NavigationItem[] {\n\t\tconst _formatMonth = formatMonth || this.formatMonth;\n\n\t\t// TODO: copy the object / remove the reference\n\t\treturn (<NavigationItem[]>totalMonthYear).map(s => {\n\t\t\tconst date = new Date(s.year, s.month);\n\t\t\ts.navigationTitle = monthType ? _formatMonth.format(date) : s.year;\n\t\t\treturn s;\n\t\t});\n\t}\n\n\tcreateMonthArray(navigationItem: NavigationItem) {\n\t\tconst months = [],\n\t\t\tcurrentYear = navigationItem.year;\n\t\tfor (let i = 0; i < 11; i++) {\n\t\t\tmonths.push({month: i, year: currentYear});\n\t\t}\n\n\t\treturn months;\n\t}\n\n\t/**\n\t * Create an array of navigation items with year as label\n\t *\n\t * @param navigationItem\n\t * @returns NavigationItem[]\n\t */\n\tcreateYearArray(navigationItem: NavigationItem): NavigationItem[] {\n\t\tconst currentYear = navigationItem.year,\n\t\t\tyears = [{...navigationItem, navigationTitle: currentYear}];\n\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tyears.unshift({...navigationItem, navigationTitle: currentYear - (i + 1)});\n\t\t\tyears.push({...navigationItem, navigationTitle: currentYear + (i + 1)});\n\t\t}\n\n\t\treturn years;\n\t}\n\n\tonSubNavigationClick(date: Date) {\n\t\tthis.subNavigationClick.emit(date);\n\t}\n\n\t/**\n\t * Emits previous click event\n\t */\n\tprevious(): void {\n\t\tthis.previousClick.emit();\n\t}\n\n\t/**\n\t * Emits next click event\n\t */\n\tnext(): void {\n\t\tthis.nextClick.emit();\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AnimatepickerComponent } from './components/animatepicker/animatepicker.component';\nimport { DatepickerComponent } from './components/datepicker/datepicker.component';\nimport { DatepickerDirective } from './components/datepicker/datepicker.directive';\nimport { SubNavigationComponent } from './components/sub-navigation/sub-navigation.component';\nimport { NavigationComponent } from './components/navigation/navigation.component';\nimport { UtilitiesService } from './services/utilities.service';\n\n@NgModule({\n\tdeclarations: [\n\t\tDatepickerComponent,\n\t\tNavigationComponent,\n\t\tAnimatepickerComponent,\n\t\tDatepickerDirective,\n\t\tSubNavigationComponent\n\t],\n\timports: [CommonModule],\n\tproviders: [UtilitiesService],\n\texports: [\n\t\tDatepickerComponent,\n\t\tNavigationComponent,\n\t\tAnimatepickerComponent,\n\t\tDatepickerDirective\n\t],\n\tentryComponents: [DatepickerComponent, AnimatepickerComponent]\n})\nexport class AaDatepickerModule {}\n"]}
|