diff --git a/.gitignore b/.gitignore index a78b4d9e7..ed9d188c6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ site *.sln *.nupkg src/docs/partials/examples/test.html -docs/ \ No newline at end of file +/docs/ +/dist/plugins/examples/ \ No newline at end of file diff --git a/README.md b/README.md index ee4885bb2..e57d8035c 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ [![Rate on Openbase](https://badges.openbase.com/js/rating/@eonasdan/tempus-dominus.svg)](https://openbase.com/js/@eonasdan/tempus-dominus?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) -# Tempus Dominus Date/Time Picker v6.0.0-beta2 +# Tempus Dominus Date/Time Picker v6.0.0-beta4 Tempus Dominus is a powerful and robust date time picker for javascript. Version 6 is another major rewrite over the previous version. V6 is written with modern browsers in mind and is written in typescript. Bootstrap, momentjs and jQuery are no longer required dependencies. Popper2 is all that is required for the picker to position correctly. If you still require jQuery (seriously, you should move off that asap) there's a jQuery provider that wraps the native js functions. -# Alpha State -The alpha version is working in my tests. There's still plenty of things that can be worked on and you can see the [rough roadmap here](https://github.com/Eonasdan/tempus-dominus/projects). +# Ready State +The beta is here. There's still plenty of things that can be worked on and you can see the [rough roadmap here](https://github.com/Eonasdan/tempus-dominus/projects). # Community diff --git a/build/banner.js b/build/banner.js index a7b777ab2..dd2d41268 100644 --- a/build/banner.js +++ b/build/banner.js @@ -6,7 +6,7 @@ const year = new Date().getFullYear() function getBanner() { return `/*! * Tempus Dominus v${pkg.version} (${pkg.homepage}) - * Copyright 2013-${year} ${pkg.author} + * Copyright 2013-${year} ${pkg.author.name} * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */` } diff --git a/build/browser-sync-config.js b/build/browser-sync-config.js index 63f3ec468..dcb4761af 100644 --- a/build/browser-sync-config.js +++ b/build/browser-sync-config.js @@ -22,10 +22,7 @@ module.exports = { ignoreInitial: true, }, server: "docs", - https: { - key: 'C:\\projects\\https\\localhost.key', - cert: 'C:\\projects\\https\\localhost.crt', - }, + https: false, proxy: false, port: 3001, middleware: false, diff --git a/build/change-version.js b/build/change-version.js index 938613276..7b335f06f 100644 --- a/build/change-version.js +++ b/build/change-version.js @@ -18,7 +18,7 @@ const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-r // These are the filetypes we only care about replacing the version const GLOB = [ - '**/*.{css,html,js,json,md,scss,txt,yml}' + '**/*.{css,html,js,json,md,scss,txt,yml,ts}' ] const GLOBBY_OPTIONS = { cwd: path.join(__dirname, '..'), diff --git a/build/plugins.js b/build/plugins.js new file mode 100644 index 000000000..26c0cf109 --- /dev/null +++ b/build/plugins.js @@ -0,0 +1,81 @@ +const rollup = require('rollup') +const genericRollup = require('./rollup-plugin.config') +const fs = require('fs') +const util = require('util') +const path = require('path') + +const { promisify } = util + +const promisifyReadDir = promisify(fs.readdir) +const promisifyReadFile = promisify(fs.readFile) +const promisifyWriteFile = promisify(fs.writeFile) + +const localeNameRegex = /\/\/ (.*) \[/ +const formatName = n => n.replace(/\.ts/, '').replace(/-/g, '_') + +const localePath = path.join(__dirname, '../src/locales') + +async function build(option) { + const bundle = await rollup.rollup(option.input) + await bundle.write(option.output) +} + +async function listLocaleJson(localeArr) { + const localeListArr = [] + await Promise.all(localeArr.map(async (l) => { + const localeData = await promisifyReadFile(path.join(localePath, l), 'utf-8') + localeListArr.push({ + key: l.slice(0, -3), + name: localeData.match(localeNameRegex)[1] + }) + })) + promisifyWriteFile(path.join(__dirname, '../locales.json'), JSON.stringify(localeListArr), 'utf8') +} + +(async () => { + try { + /* eslint-disable no-restricted-syntax, no-await-in-loop */ + // We use await-in-loop to make rollup run sequentially to save on RAM + const locales = await promisifyReadDir(localePath) + for (const l of locales) { + // run builds sequentially to limit RAM usage + await build(genericRollup({ + input: `./src/locales/${l}`, + fileName: `./dist/locales/${l.replace('.ts', '.js')}`, + name: `tempusDominus.locales.${formatName(l)}` + })) + } + + const plugins = await promisifyReadDir(path.join(__dirname, '../src/plugins')) + for (const plugin of plugins.filter(x => x !== 'examples')) { + // run builds sequentially to limit RAM usage + await build(genericRollup({ + input: `./src/plugins/${plugin}/index.ts`, + fileName: `./dist/plugins/${plugin}.js`, + name: `tempusDominus.plugins.${formatName(plugin)}` + })) + } + + const examplePlugins = await promisifyReadDir(path.join(__dirname, '../src/plugins/examples')) + for (const plugin of examplePlugins.map(x => x.replace('.ts', ''))) { + // run builds sequentially to limit RAM usage + await build(genericRollup({ + input: `./src/plugins/examples/${plugin}.ts`, + fileName: `./dist/plugins/examples/${plugin}.js`, + name: `tempusDominus.plugins.${formatName(plugin)}` + })) + } + + /* build(configFactory({ + input: './src/index.js', + fileName: './tempusDominus.min.js' + }))*/ + + //await promisify(ncp)('./types/', './') + + // list locales + // await listLocaleJson(locales) + } catch (e) { + console.error(e) // eslint-disable-line no-console + } +})() diff --git a/build/rollup-plugin.config.js b/build/rollup-plugin.config.js new file mode 100644 index 000000000..04a8d8bd6 --- /dev/null +++ b/build/rollup-plugin.config.js @@ -0,0 +1,35 @@ +const typescript = require('rollup-plugin-typescript2'); //todo investigate why the other one doesn't work +//const typescript = require('@rollup/plugin-typescript'); +//import { terser } from "rollup-plugin-terser"; + +const banner = require('./banner.js'); +const globals = { + '@popperjs/core': 'Popper', + tempusDominus: 'tempusDominus' +}; + +module.exports = (config) => { + const { input, fileName, name } = config + return { + input: { + input, + external: [ + 'tempusDominus' + ], + plugins: [ + typescript({ + declaration: true, + declarationDir: 'types' + }) + ] + }, + output: { + banner, + file: fileName, + format: 'umd', + name: name || 'tempusDominus', + globals, + compact: true + } + } +} \ No newline at end of file diff --git a/build/rollup.config.js b/build/rollup.config.js index 5dee47337..b6e0849f2 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -1,5 +1,7 @@ -import typescript from '@rollup/plugin-typescript'; +//const typescript = require('rollup-plugin-typescript2'); //this doesn't produce map files correctly ...sigh +const typescript = require('@rollup/plugin-typescript'); import postcss from 'rollup-plugin-postcss'; +import { terser } from "rollup-plugin-terser"; const pkg = require('../package.json'); const banner = require('./banner.js'); @@ -27,6 +29,22 @@ export default [ name: 'tempusDominus', sourcemap: true, globals + }, + { + banner, + file: `${pkg.main.replace('.js','')}.min.js`, + format: 'umd', + name: 'tempusDominus', + globals, + plugins: [terser()] + }, + { + banner, + file: `${pkg.module.replace('.js','')}.min.js`, + format: 'es', + name: 'tempusDominus', + globals, + plugins: [terser()] } ], external: ['@popperjs/core'], @@ -37,6 +55,15 @@ export default [ }) ] }, + { + input: 'dist/js/jQuery-provider.js', + output: [ + { + file: 'dist/js/jQuery-provider.min.js', + } + ], + plugins: [terser()] + }, { input: 'src/sass/tempus-dominus.scss', output: [ @@ -51,18 +78,20 @@ export default [ extract: true }) ] - } - /*{ + }, + { input: 'src/sass/tempus-dominus.scss', - output: { - banner, - file: 'dist/css/tempus-dominus.min.css' - }, + output: [ + { + banner, + file: 'dist/css/tempus-dominus.min.css' + } + ], plugins: [ postcss({ extract: true, minimize: true }) ] - }*/ + } ]; diff --git a/dist/css/tempus-dominus.css b/dist/css/tempus-dominus.css index 637480dc0..6aedb4765 100644 --- a/dist/css/tempus-dominus.css +++ b/dist/css/tempus-dominus.css @@ -1,6 +1,3 @@ -/* -todo look at how bootstrap loops through their vars to make a --root section - */ .visually-hidden, .tempus-dominus-widget [data-action]::after { position: absolute !important; width: 1px !important; @@ -19,8 +16,7 @@ todo look at how bootstrap loops through their vars to make a --root section width: 19rem; border-radius: 4px; display: none; - background-color: white; - /*border: 1px solid black;*/ + background-color: #fff; z-index: 9999; box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12); } @@ -29,6 +25,7 @@ todo look at how bootstrap loops through their vars to make a --root section } .tempus-dominus-widget.calendarWeeks .date-container-days { grid-auto-columns: 12.5%; + grid-template-areas: "a a a a a a a a"; } .tempus-dominus-widget [data-action] { cursor: pointer; @@ -93,7 +90,6 @@ todo look at how bootstrap loops through their vars to make a --root section } .tempus-dominus-widget .toggleMeridiem { text-align: center; - /*width: 38px;*/ height: 38px; } .tempus-dominus-widget .calendar-header { @@ -151,9 +147,6 @@ todo look at how bootstrap loops through their vars to make a --root section color: rgba(0, 0, 0, 0.38); cursor: default; } -.tempus-dominus-widget.calendarWeeks .date-container-days { - grid-template-areas: "a a a a a a a a"; -} .tempus-dominus-widget .date-container-decades, .tempus-dominus-widget .date-container-years, .tempus-dominus-widget .date-container-months { display: grid; grid-template-areas: "a a a"; @@ -195,6 +188,11 @@ todo look at how bootstrap loops through their vars to make a --root section color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } +.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.new, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.old, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.new { + color: #fff; +} .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.today:before { border-bottom-color: #fff; @@ -282,4 +280,62 @@ todo look at how bootstrap loops through their vars to make a --root section .tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]:hover { background: none; } + +@media (prefers-color-scheme: dark) { + .tempus-dominus-widget { + color: #e3e3e3; + background-color: #1b1b1b; + } + .tempus-dominus-widget [data-action].disabled, .tempus-dominus-widget [data-action].disabled:hover { + color: #6c757d; + } + .tempus-dominus-widget .toolbar div:hover { + background: #232627; + } + .tempus-dominus-widget .date-container-days .dow { + color: rgba(232, 230, 227, 0.5); + } + .tempus-dominus-widget .date-container-days .cw { + color: rgba(232, 230, 227, 0.38); + } + .tempus-dominus-widget .date-container-decades div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight):hover, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight):hover { + background: #232627; + } + .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active { + background-color: #4db2ff; + color: #fff; + text-shadow: 0 -1px 0 rgba(232, 230, 227, 0.25); + } + .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.new, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.old, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.new { + color: #fff; + } + .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.today:before, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.today:before { + border-bottom-color: #1b1b1b; + } + .tempus-dominus-widget .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).new, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).old, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).new { + color: rgba(232, 230, 227, 0.38); + } + .tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover { + color: #6c757d; + } + .tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before, +.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before { + border-bottom-color: #4db2ff; + border-top-color: rgba(232, 230, 227, 0.2); + } + .tempus-dominus-widget button { + color: #fff; + background-color: #4db2ff; + border-color: #4db2ff; + } +} /*# sourceMappingURL=tempus-dominus.css.map */ \ No newline at end of file diff --git a/dist/css/tempus-dominus.css.map b/dist/css/tempus-dominus.css.map index e01211a8a..878ede7c4 100644 --- a/dist/css/tempus-dominus.css.map +++ b/dist/css/tempus-dominus.css.map @@ -1 +1 @@ -{"version":3,"sources":["tempus-dominus.scss"],"names":[],"mappings":"AAAA;;EAEE;AACF;EACE,6BAA6B;EAC7B,qBAAqB;EACrB,sBAAsB;EACtB,qBAAqB;EACrB,uBAAuB;EACvB,2BAA2B;EAC3B,iCAAiC;EACjC,8BAA8B;EAC9B,oBAAoB;AACtB;;AAEA;EACE,gBAAgB;EAChB,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,uBAAuB;EACvB,2BAA2B;EAC3B,aAAa;EACb,gHAAgH;AAClH;AACA;EACE,YAAY;AACd;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,eAAe;AACjB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,gBAAgB;EAChB,cAAc;EACd,mBAAmB;AACrB;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,SAAS;EACT,gBAAgB;EAChB,6BAA6B;AAC/B;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,UAAU;AACZ;AACA;EACE,gBAAgB;AAClB;AACA;;;EAGE,WAAW;EACX,iBAAiB;EACjB,gBAAgB;EAChB,SAAS;AACX;AACA;EACE,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,eAAe;EACf,YAAY;AACd;AACA;EACE,aAAa;EACb,4BAA4B;EAC5B,mBAAmB;EACnB,iBAAiB;AACnB;AACA;EACE,iBAAiB;EACjB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,kBAAkB;AACpB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,oBAAoB;AACtB;AACA;EACE,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;EACtB,aAAa;AACf;AACA;EACE,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,oCAAoC;EACpC,oBAAoB;EACpB,iCAAiC;AACnC;AACA;EACE,yBAAyB;EACzB,mBAAmB;EACnB,uBAAuB;EACvB,kBAAkB;AACpB;AACA;EACE,UAAU;EACV,WAAW;EACX,mBAAmB;EACnB,uBAAuB;EACvB,aAAa;EACb,gBAAgB;EAChB,iBAAiB;EACjB,0BAA0B;EAC1B,eAAe;AACjB;AACA;EACE,sCAAsC;AACxC;AACA;EACE,aAAa;EACb,4BAA4B;EAC5B,uCAAuC;AACzC;AACA;EACE,aAAa;EACb,8BAA8B;EAC9B,uCAAuC;AACzC;AACA;EACE,aAAa;EACb,uCAAuC;AACzC;AACA;EACE,UAAU;EACV,WAAW;EACX,mBAAmB;EACnB,uBAAuB;EACvB,aAAa;AACf;AACA;;EAEE,UAAU;EACV,WAAW;EACX,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;EACtB,aAAa;AACf;AACA;;EAEE,mBAAmB;AACrB;AACA;;EAEE,yBAAyB;EACzB,WAAW;EACX,yCAAyC;AAC3C;AACA;;EAEE,yBAAyB;AAC3B;AACA;;;EAGE,0BAA0B;AAC5B;AACA;;;EAGE,gBAAgB;EAChB,cAAc;EACd,mBAAmB;AACrB;AACA;;EAEE,kBAAkB;AACpB;AACA;;EAEE,WAAW;EACX,qBAAqB;EACrB,yBAAyB;EACzB,yBAAyB;EACzB,4BAA4B;EAC5B,oCAAoC;EACpC,kBAAkB;EAClB,WAAW;EACX,UAAU;AACZ;AACA;EACE,qBAAqB;AACvB;AACA;EACE,WAAW;EACX,yBAAyB;EACzB,qBAAqB;EACrB,qBAAqB;EACrB,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;EAClB,qBAAqB;EACrB,sBAAsB;EACtB,eAAe;EACf,yBAAyB;EACzB,sBAAsB;EACtB,iBAAiB;EACjB,yBAAyB;EACzB,eAAe;EACf,sBAAsB;EACtB,qIAAqI;AACvI;AACA;;;;;;;;;;;;;;EAcE,oBAAoB;EACpB,eAAe;AACjB;AACA;;;;;;;;;;;;;;EAcE,gBAAgB;AAClB","file":"tempus-dominus.css","sourcesContent":["/*\ntodo look at how bootstrap loops through their vars to make a --root section\n */\n.visually-hidden, .tempus-dominus-widget [data-action]::after {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.tempus-dominus-widget {\n list-style: none;\n padding: 4px;\n width: 19rem;\n border-radius: 4px;\n display: none;\n background-color: white;\n /*border: 1px solid black;*/\n z-index: 9999;\n box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);\n}\n.tempus-dominus-widget.calendarWeeks {\n width: 21rem;\n}\n.tempus-dominus-widget.calendarWeeks .date-container-days {\n grid-auto-columns: 12.5%;\n}\n.tempus-dominus-widget [data-action] {\n cursor: pointer;\n}\n.tempus-dominus-widget [data-action]::after {\n content: attr(title);\n}\n.tempus-dominus-widget [data-action].disabled, .tempus-dominus-widget [data-action].disabled:hover {\n background: none;\n color: #6c757d;\n cursor: not-allowed;\n}\n.tempus-dominus-widget .arrow {\n display: none;\n}\n.tempus-dominus-widget.show {\n display: block;\n}\n.tempus-dominus-widget .td-collapse:not(.show) {\n display: none;\n}\n.tempus-dominus-widget .td-collapsing {\n height: 0;\n overflow: hidden;\n transition: height 0.35s ease;\n}\n@media (min-width: 576px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n@media (min-width: 768px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n@media (min-width: 992px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n.tempus-dominus-widget.timepicker-sbs .td-row {\n display: flex;\n}\n.tempus-dominus-widget.timepicker-sbs .td-row .td-half {\n flex: 0 0 auto;\n width: 50%;\n}\n.tempus-dominus-widget div[data-action]:active {\n box-shadow: none;\n}\n.tempus-dominus-widget .timepicker-hour,\n.tempus-dominus-widget .timepicker-minute,\n.tempus-dominus-widget .timepicker-second {\n width: 54px;\n font-weight: bold;\n font-size: 1.2em;\n margin: 0;\n}\n.tempus-dominus-widget button[data-action] {\n padding: 6px;\n}\n.tempus-dominus-widget .toggleMeridiem {\n text-align: center;\n /*width: 38px;*/\n height: 38px;\n}\n.tempus-dominus-widget .calendar-header {\n display: grid;\n grid-template-areas: \"a a a\";\n margin-bottom: 10px;\n font-weight: bold;\n}\n.tempus-dominus-widget .calendar-header .next {\n text-align: right;\n padding-right: 10px;\n}\n.tempus-dominus-widget .calendar-header .previous {\n text-align: left;\n padding-left: 10px;\n}\n.tempus-dominus-widget .calendar-header .picker-switch {\n text-align: center;\n}\n.tempus-dominus-widget .toolbar {\n display: grid;\n grid-auto-flow: column;\n grid-auto-rows: 40px;\n}\n.tempus-dominus-widget .toolbar div {\n border-radius: 999px;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n display: flex;\n}\n.tempus-dominus-widget .toolbar div:hover {\n background: #e9ecef;\n}\n.tempus-dominus-widget .date-container-days {\n display: grid;\n grid-template-areas: \"a a a a a a a\";\n grid-auto-rows: 40px;\n grid-auto-columns: 14.2857142857%;\n}\n.tempus-dominus-widget .date-container-days .dow {\n color: rgba(0, 0, 0, 0.5);\n align-items: center;\n justify-content: center;\n text-align: center;\n}\n.tempus-dominus-widget .date-container-days .cw {\n width: 90%;\n height: 90%;\n align-items: center;\n justify-content: center;\n display: flex;\n font-size: 0.8em;\n line-height: 20px;\n color: rgba(0, 0, 0, 0.38);\n cursor: default;\n}\n.tempus-dominus-widget.calendarWeeks .date-container-days {\n grid-template-areas: \"a a a a a a a a\";\n}\n.tempus-dominus-widget .date-container-decades, .tempus-dominus-widget .date-container-years, .tempus-dominus-widget .date-container-months {\n display: grid;\n grid-template-areas: \"a a a\";\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-hour, .tempus-dominus-widget .time-container-minute, .tempus-dominus-widget .time-container-second {\n display: grid;\n grid-template-areas: \"a a a a\";\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-clock {\n display: grid;\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-clock .no-highlight {\n width: 90%;\n height: 90%;\n align-items: center;\n justify-content: center;\n display: flex;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight), .tempus-dominus-widget .date-container-years div:not(.no-highlight), .tempus-dominus-widget .date-container-months div:not(.no-highlight), .tempus-dominus-widget .date-container-days div:not(.no-highlight),\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight), .tempus-dominus-widget .time-container-hour div:not(.no-highlight), .tempus-dominus-widget .time-container-minute div:not(.no-highlight), .tempus-dominus-widget .time-container-second div:not(.no-highlight) {\n width: 90%;\n height: 90%;\n border-radius: 999px;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n display: flex;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight):hover,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight):hover {\n background: #e9ecef;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active {\n background-color: #0d6efd;\n color: #fff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.today:before {\n border-bottom-color: #fff;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).new,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).old,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).new {\n color: rgba(0, 0, 0, 0.38);\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover {\n background: none;\n color: #6c757d;\n cursor: not-allowed;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today, .tempus-dominus-widget .date-container-years div:not(.no-highlight).today, .tempus-dominus-widget .date-container-months div:not(.no-highlight).today, .tempus-dominus-widget .date-container-days div:not(.no-highlight).today,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).today, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).today, .tempus-dominus-widget .time-container-second div:not(.no-highlight).today {\n position: relative;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before {\n content: \"\";\n display: inline-block;\n border: solid transparent;\n border-width: 0 0 7px 7px;\n border-bottom-color: #0d6efd;\n border-top-color: rgba(0, 0, 0, 0.2);\n position: absolute;\n bottom: 6px;\n right: 6px;\n}\n.tempus-dominus-widget .time-container {\n margin-bottom: 0.5rem;\n}\n.tempus-dominus-widget button {\n color: #fff;\n background-color: #0d6efd;\n border-color: #0d6efd;\n display: inline-block;\n font-weight: 400;\n line-height: 1.5;\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n border-radius: 0.25rem;\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n}\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod] {\n pointer-events: none;\n cursor: default;\n}\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]:hover {\n background: none;\n}"]} \ No newline at end of file +{"version":3,"sources":["tempus-dominus.scss"],"names":[],"mappings":"AAAA;EACE,6BAA6B;EAC7B,qBAAqB;EACrB,sBAAsB;EACtB,qBAAqB;EACrB,uBAAuB;EACvB,2BAA2B;EAC3B,iCAAiC;EACjC,8BAA8B;EAC9B,oBAAoB;AACtB;;AAEA;EACE,gBAAgB;EAChB,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,sBAAsB;EACtB,aAAa;EACb,gHAAgH;AAClH;AACA;EACE,YAAY;AACd;AACA;EACE,wBAAwB;EACxB,sCAAsC;AACxC;AACA;EACE,eAAe;AACjB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,gBAAgB;EAChB,cAAc;EACd,mBAAmB;AACrB;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,SAAS;EACT,gBAAgB;EAChB,6BAA6B;AAC/B;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE;IACE,WAAW;EACb;AACF;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,UAAU;AACZ;AACA;EACE,gBAAgB;AAClB;AACA;;;EAGE,WAAW;EACX,iBAAiB;EACjB,gBAAgB;EAChB,SAAS;AACX;AACA;EACE,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,aAAa;EACb,4BAA4B;EAC5B,mBAAmB;EACnB,iBAAiB;AACnB;AACA;EACE,iBAAiB;EACjB,mBAAmB;AACrB;AACA;EACE,gBAAgB;EAChB,kBAAkB;AACpB;AACA;EACE,kBAAkB;AACpB;AACA;EACE,aAAa;EACb,sBAAsB;EACtB,oBAAoB;AACtB;AACA;EACE,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;EACtB,aAAa;AACf;AACA;EACE,mBAAmB;AACrB;AACA;EACE,aAAa;EACb,oCAAoC;EACpC,oBAAoB;EACpB,iCAAiC;AACnC;AACA;EACE,yBAAyB;EACzB,mBAAmB;EACnB,uBAAuB;EACvB,kBAAkB;AACpB;AACA;EACE,UAAU;EACV,WAAW;EACX,mBAAmB;EACnB,uBAAuB;EACvB,aAAa;EACb,gBAAgB;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A;;IAEE,mBAAmB;EACrB;EACA;;IAEE,yBAAyB;IACzB,WAAW;IACX,+CAA+C;EACjD;EACA;;;IAGE,WAAW;EACb;EACA;;IAEE,4BAA4B;EAC9B;EACA;;;IAGE,gCAAgC;EAClC;EACA;;;IAGE,cAAc;EAChB;EACA;;IAEE,4BAA4B;IAC5B,0CAA0C;EAC5C;EACA;IACE,WAAW;IACX,yBAAyB;IACzB,qBAAqB;EACvB;AACF","file":"tempus-dominus.css","sourcesContent":[".visually-hidden, .tempus-dominus-widget [data-action]::after {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.tempus-dominus-widget {\n list-style: none;\n padding: 4px;\n width: 19rem;\n border-radius: 4px;\n display: none;\n background-color: #fff;\n z-index: 9999;\n box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);\n}\n.tempus-dominus-widget.calendarWeeks {\n width: 21rem;\n}\n.tempus-dominus-widget.calendarWeeks .date-container-days {\n grid-auto-columns: 12.5%;\n grid-template-areas: \"a a a a a a a a\";\n}\n.tempus-dominus-widget [data-action] {\n cursor: pointer;\n}\n.tempus-dominus-widget [data-action]::after {\n content: attr(title);\n}\n.tempus-dominus-widget [data-action].disabled, .tempus-dominus-widget [data-action].disabled:hover {\n background: none;\n color: #6c757d;\n cursor: not-allowed;\n}\n.tempus-dominus-widget .arrow {\n display: none;\n}\n.tempus-dominus-widget.show {\n display: block;\n}\n.tempus-dominus-widget .td-collapse:not(.show) {\n display: none;\n}\n.tempus-dominus-widget .td-collapsing {\n height: 0;\n overflow: hidden;\n transition: height 0.35s ease;\n}\n@media (min-width: 576px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n@media (min-width: 768px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n@media (min-width: 992px) {\n .tempus-dominus-widget.timepicker-sbs {\n width: 38em;\n }\n}\n.tempus-dominus-widget.timepicker-sbs .td-row {\n display: flex;\n}\n.tempus-dominus-widget.timepicker-sbs .td-row .td-half {\n flex: 0 0 auto;\n width: 50%;\n}\n.tempus-dominus-widget div[data-action]:active {\n box-shadow: none;\n}\n.tempus-dominus-widget .timepicker-hour,\n.tempus-dominus-widget .timepicker-minute,\n.tempus-dominus-widget .timepicker-second {\n width: 54px;\n font-weight: bold;\n font-size: 1.2em;\n margin: 0;\n}\n.tempus-dominus-widget button[data-action] {\n padding: 6px;\n}\n.tempus-dominus-widget .toggleMeridiem {\n text-align: center;\n height: 38px;\n}\n.tempus-dominus-widget .calendar-header {\n display: grid;\n grid-template-areas: \"a a a\";\n margin-bottom: 10px;\n font-weight: bold;\n}\n.tempus-dominus-widget .calendar-header .next {\n text-align: right;\n padding-right: 10px;\n}\n.tempus-dominus-widget .calendar-header .previous {\n text-align: left;\n padding-left: 10px;\n}\n.tempus-dominus-widget .calendar-header .picker-switch {\n text-align: center;\n}\n.tempus-dominus-widget .toolbar {\n display: grid;\n grid-auto-flow: column;\n grid-auto-rows: 40px;\n}\n.tempus-dominus-widget .toolbar div {\n border-radius: 999px;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n display: flex;\n}\n.tempus-dominus-widget .toolbar div:hover {\n background: #e9ecef;\n}\n.tempus-dominus-widget .date-container-days {\n display: grid;\n grid-template-areas: \"a a a a a a a\";\n grid-auto-rows: 40px;\n grid-auto-columns: 14.2857142857%;\n}\n.tempus-dominus-widget .date-container-days .dow {\n color: rgba(0, 0, 0, 0.5);\n align-items: center;\n justify-content: center;\n text-align: center;\n}\n.tempus-dominus-widget .date-container-days .cw {\n width: 90%;\n height: 90%;\n align-items: center;\n justify-content: center;\n display: flex;\n font-size: 0.8em;\n line-height: 20px;\n color: rgba(0, 0, 0, 0.38);\n cursor: default;\n}\n.tempus-dominus-widget .date-container-decades, .tempus-dominus-widget .date-container-years, .tempus-dominus-widget .date-container-months {\n display: grid;\n grid-template-areas: \"a a a\";\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-hour, .tempus-dominus-widget .time-container-minute, .tempus-dominus-widget .time-container-second {\n display: grid;\n grid-template-areas: \"a a a a\";\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-clock {\n display: grid;\n grid-auto-rows: calc((19rem - 8px) / 7);\n}\n.tempus-dominus-widget .time-container-clock .no-highlight {\n width: 90%;\n height: 90%;\n align-items: center;\n justify-content: center;\n display: flex;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight), .tempus-dominus-widget .date-container-years div:not(.no-highlight), .tempus-dominus-widget .date-container-months div:not(.no-highlight), .tempus-dominus-widget .date-container-days div:not(.no-highlight),\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight), .tempus-dominus-widget .time-container-hour div:not(.no-highlight), .tempus-dominus-widget .time-container-minute div:not(.no-highlight), .tempus-dominus-widget .time-container-second div:not(.no-highlight) {\n width: 90%;\n height: 90%;\n border-radius: 999px;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n display: flex;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight):hover,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight):hover {\n background: #e9ecef;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active {\n background-color: #0d6efd;\n color: #fff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.new,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.old,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.new {\n color: #fff;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.today:before {\n border-bottom-color: #fff;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).new,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).old,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).new {\n color: rgba(0, 0, 0, 0.38);\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover {\n background: none;\n color: #6c757d;\n cursor: not-allowed;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today, .tempus-dominus-widget .date-container-years div:not(.no-highlight).today, .tempus-dominus-widget .date-container-months div:not(.no-highlight).today, .tempus-dominus-widget .date-container-days div:not(.no-highlight).today,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).today, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).today, .tempus-dominus-widget .time-container-second div:not(.no-highlight).today {\n position: relative;\n}\n.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before {\n content: \"\";\n display: inline-block;\n border: solid transparent;\n border-width: 0 0 7px 7px;\n border-bottom-color: #0d6efd;\n border-top-color: rgba(0, 0, 0, 0.2);\n position: absolute;\n bottom: 6px;\n right: 6px;\n}\n.tempus-dominus-widget .time-container {\n margin-bottom: 0.5rem;\n}\n.tempus-dominus-widget button {\n color: #fff;\n background-color: #0d6efd;\n border-color: #0d6efd;\n display: inline-block;\n font-weight: 400;\n line-height: 1.5;\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n border-radius: 0.25rem;\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n}\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds],\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod] {\n pointer-events: none;\n cursor: default;\n}\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds]:hover,\n.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]:hover {\n background: none;\n}\n\n@media (prefers-color-scheme: dark) {\n .tempus-dominus-widget {\n color: #e3e3e3;\n background-color: #1b1b1b;\n }\n .tempus-dominus-widget [data-action].disabled, .tempus-dominus-widget [data-action].disabled:hover {\n color: #6c757d;\n }\n .tempus-dominus-widget .toolbar div:hover {\n background: #232627;\n }\n .tempus-dominus-widget .date-container-days .dow {\n color: rgba(232, 230, 227, 0.5);\n }\n .tempus-dominus-widget .date-container-days .cw {\n color: rgba(232, 230, 227, 0.38);\n }\n .tempus-dominus-widget .date-container-decades div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight):hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight):hover,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight):hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight):hover {\n background: #232627;\n }\n .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active {\n background-color: #4db2ff;\n color: #fff;\n text-shadow: 0 -1px 0 rgba(232, 230, 227, 0.25);\n }\n .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.new,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.old,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.new {\n color: #fff;\n }\n .tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).active.today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).active.today:before,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).active.today:before {\n border-bottom-color: #1b1b1b;\n }\n .tempus-dominus-widget .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).new, .tempus-dominus-widget .date-container-years div:not(.no-highlight).old, .tempus-dominus-widget .date-container-years div:not(.no-highlight).new, .tempus-dominus-widget .date-container-months div:not(.no-highlight).old, .tempus-dominus-widget .date-container-months div:not(.no-highlight).new, .tempus-dominus-widget .date-container-days div:not(.no-highlight).old, .tempus-dominus-widget .date-container-days div:not(.no-highlight).new,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).old,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).new, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).old, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).new, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).old, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).new, .tempus-dominus-widget .time-container-second div:not(.no-highlight).old, .tempus-dominus-widget .time-container-second div:not(.no-highlight).new {\n color: rgba(232, 230, 227, 0.38);\n }\n .tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled, .tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled, .tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover {\n color: #6c757d;\n }\n .tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before, .tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,\n.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before, .tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before {\n border-bottom-color: #4db2ff;\n border-top-color: rgba(232, 230, 227, 0.2);\n }\n .tempus-dominus-widget button {\n color: #fff;\n background-color: #4db2ff;\n border-color: #4db2ff;\n }\n}"]} \ No newline at end of file diff --git a/dist/css/tempus-dominus.min.css b/dist/css/tempus-dominus.min.css new file mode 100644 index 000000000..41fe6923a --- /dev/null +++ b/dist/css/tempus-dominus.min.css @@ -0,0 +1 @@ +.tempus-dominus-widget [data-action]:after,.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.tempus-dominus-widget{background-color:#fff;border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);display:none;list-style:none;padding:4px;width:19rem;z-index:9999}.tempus-dominus-widget.calendarWeeks{width:21rem}.tempus-dominus-widget.calendarWeeks .date-container-days{grid-auto-columns:12.5%;grid-template-areas:"a a a a a a a a"}.tempus-dominus-widget [data-action]{cursor:pointer}.tempus-dominus-widget [data-action]:after{content:attr(title)}.tempus-dominus-widget [data-action].disabled,.tempus-dominus-widget [data-action].disabled:hover{background:none;color:#6c757d;cursor:not-allowed}.tempus-dominus-widget .arrow{display:none}.tempus-dominus-widget.show{display:block}.tempus-dominus-widget .td-collapse:not(.show){display:none}.tempus-dominus-widget .td-collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (min-width:576px){.tempus-dominus-widget.timepicker-sbs{width:38em}}@media (min-width:768px){.tempus-dominus-widget.timepicker-sbs{width:38em}}@media (min-width:992px){.tempus-dominus-widget.timepicker-sbs{width:38em}}.tempus-dominus-widget.timepicker-sbs .td-row{display:flex}.tempus-dominus-widget.timepicker-sbs .td-row .td-half{flex:0 0 auto;width:50%}.tempus-dominus-widget div[data-action]:active{box-shadow:none}.tempus-dominus-widget .timepicker-hour,.tempus-dominus-widget .timepicker-minute,.tempus-dominus-widget .timepicker-second{font-size:1.2em;font-weight:700;margin:0;width:54px}.tempus-dominus-widget button[data-action]{padding:6px}.tempus-dominus-widget .toggleMeridiem{height:38px;text-align:center}.tempus-dominus-widget .calendar-header{display:grid;font-weight:700;grid-template-areas:"a a a";margin-bottom:10px}.tempus-dominus-widget .calendar-header .next{padding-right:10px;text-align:right}.tempus-dominus-widget .calendar-header .previous{padding-left:10px;text-align:left}.tempus-dominus-widget .calendar-header .picker-switch{text-align:center}.tempus-dominus-widget .toolbar{display:grid;grid-auto-flow:column;grid-auto-rows:40px}.tempus-dominus-widget .toolbar div{align-items:center;border-radius:999px;box-sizing:border-box;display:flex;justify-content:center}.tempus-dominus-widget .toolbar div:hover{background:#e9ecef}.tempus-dominus-widget .date-container-days{display:grid;grid-auto-columns:14.2857142857%;grid-auto-rows:40px;grid-template-areas:"a a a a a a a"}.tempus-dominus-widget .date-container-days .dow{align-items:center;color:rgba(0,0,0,.5);justify-content:center;text-align:center}.tempus-dominus-widget .date-container-days .cw{align-items:center;color:rgba(0,0,0,.38);cursor:default;display:flex;font-size:.8em;height:90%;justify-content:center;line-height:20px;width:90%}.tempus-dominus-widget .date-container-decades,.tempus-dominus-widget .date-container-months,.tempus-dominus-widget .date-container-years{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px);grid-template-areas:"a a a"}.tempus-dominus-widget .time-container-hour,.tempus-dominus-widget .time-container-minute,.tempus-dominus-widget .time-container-second{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px);grid-template-areas:"a a a a"}.tempus-dominus-widget .time-container-clock{display:grid;grid-auto-rows:calc(2.71429rem - 1.14286px)}.tempus-dominus-widget .time-container-clock .no-highlight{align-items:center;display:flex;height:90%;justify-content:center;width:90%}.tempus-dominus-widget .date-container-days div:not(.no-highlight),.tempus-dominus-widget .date-container-decades div:not(.no-highlight),.tempus-dominus-widget .date-container-months div:not(.no-highlight),.tempus-dominus-widget .date-container-years div:not(.no-highlight),.tempus-dominus-widget .time-container-clock div:not(.no-highlight),.tempus-dominus-widget .time-container-hour div:not(.no-highlight),.tempus-dominus-widget .time-container-minute div:not(.no-highlight),.tempus-dominus-widget .time-container-second div:not(.no-highlight){align-items:center;border-radius:999px;box-sizing:border-box;display:flex;height:90%;justify-content:center;width:90%}.tempus-dominus-widget .date-container-days div:not(.no-highlight):hover,.tempus-dominus-widget .date-container-decades div:not(.no-highlight):hover,.tempus-dominus-widget .date-container-months div:not(.no-highlight):hover,.tempus-dominus-widget .date-container-years div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-clock div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-hour div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-minute div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-second div:not(.no-highlight):hover{background:#e9ecef}.tempus-dominus-widget .date-container-days div:not(.no-highlight).active,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active{background-color:#0d6efd;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.tempus-dominus-widget .date-container-days div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-days div:not(.no-highlight).active.old,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.old,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active.old,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active.old{color:#fff}.tempus-dominus-widget .date-container-days div:not(.no-highlight).active.today:before,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.today:before,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active.today:before,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active.today:before{border-bottom-color:#fff}.tempus-dominus-widget .date-container-days div:not(.no-highlight).new,.tempus-dominus-widget .date-container-days div:not(.no-highlight).old,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).new,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).old,.tempus-dominus-widget .date-container-months div:not(.no-highlight).new,.tempus-dominus-widget .date-container-months div:not(.no-highlight).old,.tempus-dominus-widget .date-container-years div:not(.no-highlight).new,.tempus-dominus-widget .date-container-years div:not(.no-highlight).old,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).new,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).old,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).new,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).old,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).new,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).old,.tempus-dominus-widget .time-container-second div:not(.no-highlight).new,.tempus-dominus-widget .time-container-second div:not(.no-highlight).old{color:rgba(0,0,0,.38)}.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover{background:none;color:#6c757d;cursor:not-allowed}.tempus-dominus-widget .date-container-days div:not(.no-highlight).today,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today,.tempus-dominus-widget .date-container-months div:not(.no-highlight).today,.tempus-dominus-widget .date-container-years div:not(.no-highlight).today,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today,.tempus-dominus-widget .time-container-second div:not(.no-highlight).today{position:relative}.tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before{border-color:rgba(0,0,0,.2) transparent #0d6efd;border-style:solid;border-width:0 0 7px 7px;bottom:6px;content:"";display:inline-block;position:absolute;right:6px}.tempus-dominus-widget .time-container{margin-bottom:.5rem}.tempus-dominus-widget button{background-color:#0d6efd;border-color:#0d6efd;border-radius:.25rem;color:#fff;cursor:pointer;display:inline-block;font-size:1rem;font-weight:400;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds],.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]{cursor:default;pointer-events:none}.tempus-dominus-widget.tempus-dominus-widget-readonly table td.day:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.hour:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.minute:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td.second:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=decrementSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=incrementSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showHours]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showMinutes]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=showSeconds]:hover,.tempus-dominus-widget.tempus-dominus-widget-readonly table td [data-action=togglePeriod]:hover{background:none}@media (prefers-color-scheme:dark){.tempus-dominus-widget{background-color:#1b1b1b;color:#e3e3e3}.tempus-dominus-widget [data-action].disabled,.tempus-dominus-widget [data-action].disabled:hover{color:#6c757d}.tempus-dominus-widget .toolbar div:hover{background:#232627}.tempus-dominus-widget .date-container-days .dow{color:hsla(36,10%,90%,.5)}.tempus-dominus-widget .date-container-days .cw{color:hsla(36,10%,90%,.38)}.tempus-dominus-widget .date-container-days div:not(.no-highlight):hover,.tempus-dominus-widget .date-container-decades div:not(.no-highlight):hover,.tempus-dominus-widget .date-container-months div:not(.no-highlight):hover,.tempus-dominus-widget .date-container-years div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-clock div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-hour div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-minute div:not(.no-highlight):hover,.tempus-dominus-widget .time-container-second div:not(.no-highlight):hover{background:#232627}.tempus-dominus-widget .date-container-days div:not(.no-highlight).active,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active{background-color:#4db2ff;color:#fff;text-shadow:0 -1px 0 hsla(36,10%,90%,.25)}.tempus-dominus-widget .date-container-days div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-days div:not(.no-highlight).active.old,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.old,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active.old,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active.new,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.old,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active.new,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active.old{color:#fff}.tempus-dominus-widget .date-container-days div:not(.no-highlight).active.today:before,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).active.today:before,.tempus-dominus-widget .date-container-months div:not(.no-highlight).active.today:before,.tempus-dominus-widget .date-container-years div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).active.today:before,.tempus-dominus-widget .time-container-second div:not(.no-highlight).active.today:before{border-bottom-color:#1b1b1b}.tempus-dominus-widget .date-container-days div:not(.no-highlight).new,.tempus-dominus-widget .date-container-days div:not(.no-highlight).old,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).new,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).old,.tempus-dominus-widget .date-container-months div:not(.no-highlight).new,.tempus-dominus-widget .date-container-months div:not(.no-highlight).old,.tempus-dominus-widget .date-container-years div:not(.no-highlight).new,.tempus-dominus-widget .date-container-years div:not(.no-highlight).old,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).new,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).old,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).new,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).old,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).new,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).old,.tempus-dominus-widget .time-container-second div:not(.no-highlight).new,.tempus-dominus-widget .time-container-second div:not(.no-highlight).old{color:hsla(36,10%,90%,.38)}.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-days div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-months div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled,.tempus-dominus-widget .date-container-years div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).disabled:hover,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled,.tempus-dominus-widget .time-container-second div:not(.no-highlight).disabled:hover{color:#6c757d}.tempus-dominus-widget .date-container-days div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-decades div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-months div:not(.no-highlight).today:before,.tempus-dominus-widget .date-container-years div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-clock div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-hour div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-minute div:not(.no-highlight).today:before,.tempus-dominus-widget .time-container-second div:not(.no-highlight).today:before{border-bottom-color:#4db2ff;border-top-color:hsla(36,10%,90%,.2)}.tempus-dominus-widget button{background-color:#4db2ff;border-color:#4db2ff;color:#fff}} \ No newline at end of file diff --git a/dist/js/jQuery-provider.js b/dist/js/jQuery-provider.js index aa266c230..ac9b2936e 100644 --- a/dist/js/jQuery-provider.js +++ b/dist/js/jQuery-provider.js @@ -2,7 +2,7 @@ /*global $ */ /*! - * Tempus Dominus v6.0.0-beta2 (https://getdatepicker.com/) + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) * Copyright 2013-2021 [object Object] * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ @@ -147,7 +147,8 @@ $(document) const name = 'tempusDominus'; $.fn[name] = tempusDominus.jQueryInterface; $.fn[name].Constructor = tempusDominus.TempusDominus; +const JQUERY_NO_CONFLICT = $.fn[name]; $.fn[name].noConflict = function () { - $.fn[name] = $.fn[name]; + $.fn[name] = JQUERY_NO_CONFLICT; return tempusDominus.jQueryInterface; }; diff --git a/dist/js/jQuery-provider.min.js b/dist/js/jQuery-provider.min.js new file mode 100644 index 000000000..94015ae4b --- /dev/null +++ b/dist/js/jQuery-provider.min.js @@ -0,0 +1,6 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2021 [object Object] + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +tempusDominus.jQueryInterface=function(e,t){return 1===this.length?tempusDominus.jQueryHandleThis(this,e,t):this.each((function(){tempusDominus.jQueryHandleThis(this,e,t)}))},tempusDominus.jQueryHandleThis=function(e,t,n){let s=$(e).data(tempusDominus.Namespace.dataKey);if("object"==typeof t&&$.extend({},tempusDominus.DefaultOptions,t),s||(s=new tempusDominus.TempusDominus($(e)[0],t),$(e).data(tempusDominus.Namespace.dataKey,s)),"string"==typeof t){if(void 0===s[t])throw new Error(`No method named "${t}"`);if(void 0===n)return s[t]();{"date"===t&&(s.isDateUpdateThroughDateOptionFromClientCode=!0);const e=s[t](n);return s.isDateUpdateThroughDateOptionFromClientCode=!1,e}}},tempusDominus.getSelectorFromElement=function(e){let t,n=e.data("target");return n||(n=e.attr("href")||"",n=/^#[a-z]/i.test(n)?n:null),t=$(n),0===t.length?e:(t.data(tempusDominus.Namespace.dataKey)||$.extend({},t.data(),$(this).data()),t)},$(document).on(`click${tempusDominus.Namespace.events.key}.data-api`,`[data-toggle="${tempusDominus.Namespace.dataKey}"]`,(function(){const e=$(this),t=tempusDominus.getSelectorFromElement(e),n=t.data(tempusDominus.Namespace.dataKey);0!==t.length&&(n._options.allowInputToggle&&e.is('input[data-toggle="datetimepicker"]')||tempusDominus.jQueryInterface.call(t,"toggle"))})).on(tempusDominus.Namespace.events.change,`.${tempusDominus.Namespace.NAME}-input`,(function(e){const t=tempusDominus.getSelectorFromElement($(this));0===t.length||e.isInit||tempusDominus.jQueryInterface.call(t,"_change",e)})).on(tempusDominus.Namespace.events.blur,`.${tempusDominus.Namespace.NAME}-input`,(function(e){const t=tempusDominus.getSelectorFromElement($(this)),n=t.data(tempusDominus.Namespace.dataKey);0!==t.length&&(n._options.debug||window.debug||tempusDominus.jQueryInterface.call(t,"hide",e))})).on(tempusDominus.Namespace.events.focus,`.${tempusDominus.Namespace.NAME}-input`,(function(e){const t=tempusDominus.getSelectorFromElement($(this)),n=t.data(tempusDominus.Namespace.dataKey);0!==t.length&&n._options.allowInputToggle&&tempusDominus.jQueryInterface.call(t,"show",e)}));const e="tempusDominus";$.fn[e]=tempusDominus.jQueryInterface,$.fn[e].Constructor=tempusDominus.TempusDominus;const t=$.fn[e];$.fn[e].noConflict=function(){return $.fn[e]=t,tempusDominus.jQueryInterface}; diff --git a/dist/js/tempus-dominus.esm.js b/dist/js/tempus-dominus.esm.js index b8f824255..384724e5a 100644 --- a/dist/js/tempus-dominus.esm.js +++ b/dist/js/tempus-dominus.esm.js @@ -1,6 +1,6 @@ /*! - * Tempus Dominus v6.0.0-beta2 (https://getdatepicker.com/) - * Copyright 2013-2022 [object Object] + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ import { createPopper } from '@popperjs/core'; @@ -14,6 +14,19 @@ var Unit; Unit["month"] = "month"; Unit["year"] = "year"; })(Unit || (Unit = {})); +const getFormatByUnit = (unit) => { + switch (unit) { + case 'date': + return { dateStyle: 'short' }; + case 'month': + return { + month: 'numeric', + year: 'numeric' + }; + case 'year': + return { year: 'numeric' }; + } +}; /** * For the most part this object behaves exactly the same way * as the native Date object with a little extra spice. @@ -43,7 +56,7 @@ class DateTime extends Date { */ static convert(date, locale = 'default') { if (!date) - throw `A date is required`; + throw new Error(`A date is required`); return new DateTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).setLocale(locale); } /** @@ -61,7 +74,7 @@ class DateTime extends Date { */ startOf(unit, startOfTheWeek = 0) { if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); switch (unit) { case 'seconds': this.setMilliseconds(0); @@ -77,7 +90,12 @@ class DateTime extends Date { break; case 'weekDay': this.startOf(Unit.date); - this.manipulate(startOfTheWeek - this.weekDay, Unit.date); + if (this.weekDay === startOfTheWeek) + break; + let goBack = this.weekDay; + if (startOfTheWeek !== 0 && this.weekDay === 0) + goBack = 8 - startOfTheWeek; + this.manipulate(startOfTheWeek - goBack, Unit.date); break; case 'month': this.startOf(Unit.date); @@ -96,9 +114,9 @@ class DateTime extends Date { * would return April 30, 2021, 11:59:59.999 PM * @param unit */ - endOf(unit) { + endOf(unit, startOfTheWeek = 0) { if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); switch (unit) { case 'seconds': this.setMilliseconds(999); @@ -113,8 +131,8 @@ class DateTime extends Date { this.setHours(23, 59, 59, 999); break; case 'weekDay': - this.startOf(Unit.date); - this.manipulate(6 - this.weekDay, Unit.date); + this.endOf(Unit.date); + this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date); break; case 'month': this.endOf(Unit.date); @@ -138,7 +156,7 @@ class DateTime extends Date { */ manipulate(value, unit) { if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); this[unit] += value; return this; } @@ -162,7 +180,7 @@ class DateTime extends Date { if (!unit) return this.valueOf() < compare.valueOf(); if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); return (this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()); } /** @@ -175,7 +193,7 @@ class DateTime extends Date { if (!unit) return this.valueOf() > compare.valueOf(); if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); return (this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()); } /** @@ -188,7 +206,7 @@ class DateTime extends Date { if (!unit) return this.valueOf() === compare.valueOf(); if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); compare = DateTime.convert(compare); return (this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()); } @@ -202,7 +220,7 @@ class DateTime extends Date { */ isBetween(left, right, unit, inclusivity = '()') { if (unit && this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); const leftInclusivity = inclusivity[0] === '('; const rightInclusivity = inclusivity[1] === ')'; return (((leftInclusivity @@ -307,7 +325,7 @@ class DateTime extends Date { var _a; return (_a = new Intl.DateTimeFormat(locale, { hour: 'numeric', - hour12: true, + hour12: true }) .formatToParts(this) .find((p) => p.type === 'dayPeriod')) === null || _a === void 0 ? void 0 : _a.value; @@ -346,6 +364,12 @@ class DateTime extends Date { * Shortcut to Date.setMonth() */ set month(value) { + const targetMonth = new Date(this.year, value + 1); + targetMonth.setDate(0); + const endOfMonth = targetMonth.getDate(); + if (this.date > endOfMonth) { + this.date = endOfMonth; + } this.setMonth(value); } /** @@ -526,7 +550,7 @@ class ErrorMessages { } // this is not the way I want this to stay but nested classes seemed to blown up once its compiled. -const NAME = 'tempus-dominus', version = '6.0.0-alpha1', dataKey = 'td'; +const NAME = 'tempus-dominus', version = '6.0.0-beta4', dataKey = 'td'; /** * Events */ @@ -747,6 +771,33 @@ Namespace.events = new Events(); Namespace.css = new Css(); Namespace.errorMessages = new ErrorMessages(); +const CalendarModes = [ + { + name: 'calendar', + className: Namespace.css.daysContainer, + unit: Unit.month, + step: 1, + }, + { + name: 'months', + className: Namespace.css.monthsContainer, + unit: Unit.year, + step: 1, + }, + { + name: 'years', + className: Namespace.css.yearsContainer, + unit: Unit.year, + step: 10, + }, + { + name: 'decades', + className: Namespace.css.decadesContainer, + unit: Unit.year, + step: 100, + }, +]; + const DefaultOptions = { restrictions: { minDate: undefined, @@ -756,20 +807,20 @@ const DefaultOptions = { daysOfWeekDisabled: [], disabledTimeIntervals: [], disabledHours: [], - enabledHours: [], + enabledHours: [] }, display: { icons: { type: 'icons', - time: 'fas fa-clock', - date: 'fas fa-calendar', - up: 'fas fa-arrow-up', - down: 'fas fa-arrow-down', - previous: 'fas fa-chevron-left', - next: 'fas fa-chevron-right', - today: 'fas fa-calendar-check', - clear: 'fas fa-trash', - close: 'fas fa-times', + time: 'fa-solid fa-clock', + date: 'fa-solid fa-calendar', + up: 'fa-solid fa-arrow-up', + down: 'fa-solid fa-arrow-down', + previous: 'fa-solid fa-chevron-left', + next: 'fa-solid fa-chevron-right', + today: 'fa-solid fa-calendar-check', + clear: 'fa-solid fa-trash', + close: 'fa-solid fa-xmark' }, sideBySide: false, calendarWeeks: false, @@ -779,7 +830,7 @@ const DefaultOptions = { buttons: { today: false, clear: false, - close: false, + close: false }, components: { calendar: true, @@ -791,9 +842,9 @@ const DefaultOptions = { hours: true, minutes: true, seconds: false, - useTwentyfourHour: false, + useTwentyfourHour: false }, - inline: false, + inline: false }, stepping: 1, useCurrent: true, @@ -827,7 +878,7 @@ const DefaultOptions = { selectDate: 'Select Date', dayViewHeaderFormat: { month: 'long', year: '2-digit' }, locale: 'default', - startOfTheWeek: 0, + startOfTheWeek: 0 }, keepInvalid: false, debug: false, @@ -837,606 +888,85 @@ const DefaultOptions = { multipleDatesSeparator: '; ', promptTimeOnDateChange: false, promptTimeOnDateChangeTransitionDelay: 200, - hooks: { - inputParse: undefined, - inputFormat: undefined, - }, meta: {}, container: undefined }; -const DatePickerModes = [ - { - name: 'calendar', - className: Namespace.css.daysContainer, - unit: Unit.month, - step: 1, - }, - { - name: 'months', - className: Namespace.css.monthsContainer, - unit: Unit.year, - step: 1, - }, - { - name: 'years', - className: Namespace.css.yearsContainer, - unit: Unit.year, - step: 10, - }, - { - name: 'decades', - className: Namespace.css.decadesContainer, - unit: Unit.year, - step: 100, - }, -]; -/** - * Provides a collapse functionality to the view changes - */ -class Collapse { - /** - * Flips the show/hide state of `target` - * @param target html element to affect. - */ - static toggle(target) { - if (target.classList.contains(Namespace.css.show)) { - this.hide(target); - } - else { - this.show(target); - } +class OptionsStore { + constructor() { + this.viewDate = new DateTime(); + this._currentCalendarViewMode = 0; + this.minimumCalendarViewMode = 0; + this.currentView = 'calendar'; } - /** - * If `target` is not already showing, then show after the animation. - * @param target - */ - static show(target) { - if (target.classList.contains(Namespace.css.collapsing) || - target.classList.contains(Namespace.css.show)) - return; - const complete = () => { - target.classList.remove(Namespace.css.collapsing); - target.classList.add(Namespace.css.collapse, Namespace.css.show); - target.style.height = ''; - }; - target.style.height = '0'; - target.classList.remove(Namespace.css.collapse); - target.classList.add(Namespace.css.collapsing); - setTimeout(complete, this.getTransitionDurationFromElement(target)); - target.style.height = `${target.scrollHeight}px`; + get currentCalendarViewMode() { + return this._currentCalendarViewMode; + } + set currentCalendarViewMode(value) { + this._currentCalendarViewMode = value; + this.currentView = CalendarModes[value].name; } /** - * If `target` is not already hidden, then hide after the animation. - * @param target HTML Element + * When switching back to the calendar from the clock, + * this sets currentView to the correct calendar view. */ - static hide(target) { - if (target.classList.contains(Namespace.css.collapsing) || - !target.classList.contains(Namespace.css.show)) - return; - const complete = () => { - target.classList.remove(Namespace.css.collapsing); - target.classList.add(Namespace.css.collapse); - }; - target.style.height = `${target.getBoundingClientRect()['height']}px`; - const reflow = (element) => element.offsetHeight; - reflow(target); - target.classList.remove(Namespace.css.collapse, Namespace.css.show); - target.classList.add(Namespace.css.collapsing); - target.style.height = ''; - setTimeout(complete, this.getTransitionDurationFromElement(target)); + refreshCurrentView() { + this.currentView = CalendarModes[this.currentCalendarViewMode].name; } } -/** - * Gets the transition duration from the `element` by getting css properties - * `transition-duration` and `transition-delay` - * @param element HTML Element - */ -Collapse.getTransitionDurationFromElement = (element) => { - if (!element) { - return 0; - } - // Get transition-duration of the element - let { transitionDuration, transitionDelay } = window.getComputedStyle(element); - const floatTransitionDuration = Number.parseFloat(transitionDuration); - const floatTransitionDelay = Number.parseFloat(transitionDelay); - // Return 0 if element or transition duration is not found - if (!floatTransitionDuration && !floatTransitionDelay) { - return 0; - } - // If multiple durations are defined, take the first - transitionDuration = transitionDuration.split(',')[0]; - transitionDelay = transitionDelay.split(',')[0]; - return ((Number.parseFloat(transitionDuration) + - Number.parseFloat(transitionDelay)) * - 1000); -}; - -/** - * - */ -class Actions { - constructor(context) { - this._context = context; - } - /** - * Performs the selected `action`. See ActionTypes - * @param e This is normally a click event - * @param action If not provided, then look for a [data-action] - */ - do(e, action) { - var _a, _b; - const currentTarget = e === null || e === void 0 ? void 0 : e.currentTarget; - if ((_a = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.classList) === null || _a === void 0 ? void 0 : _a.contains(Namespace.css.disabled)) - return false; - action = action || ((_b = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.dataset) === null || _b === void 0 ? void 0 : _b.action); - const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; - /** - * Common function to manipulate {@link lastPicked} by `unit`. - * @param unit - * @param value Value to change by - */ - const manipulateAndSet = (unit, value = 1) => { - const newDate = lastPicked.manipulate(value, unit); - if (this._context._validation.isValid(newDate, unit)) { - this._context.dates._setValue(newDate, this._context.dates.lastPickedIndex); - } - }; - /** - * Common function to manipulate {@link lastPicked} by `unit`. - * After setting the value it will either show the clock or hide the widget. - * @param unit - * @param value Value to change by - */ - const hideOrClock = () => { - if (this._context._options.display.components.useTwentyfourHour && - !this._context._options.display.components.minutes && - !this._context._options.display.keepOpen && - !this._context._options.display.inline) { - this._context._display.hide(); - } - else { - this.do(e, ActionTypes.showClock); - } - }; - switch (action) { - case ActionTypes.next: - case ActionTypes.previous: - const { unit, step } = DatePickerModes[this._context._currentViewMode]; - if (action === ActionTypes.next) - this._context._viewDate.manipulate(step, unit); - else - this._context._viewDate.manipulate(step * -1, unit); - this._context._viewUpdate(unit); - this._context._display._showMode(); - break; - case ActionTypes.pickerSwitch: - this._context._display._showMode(1); - this._context._viewUpdate(DatePickerModes[this._context._currentViewMode].unit); - this._context._display._updateCalendarHeader(); - break; - case ActionTypes.selectMonth: - case ActionTypes.selectYear: - case ActionTypes.selectDecade: - const value = +currentTarget.dataset.value; - switch (action) { - case ActionTypes.selectMonth: - this._context._viewDate.month = value; - this._context._viewUpdate(Unit.month); - break; - case ActionTypes.selectYear: - this._context._viewDate.year = value; - this._context._viewUpdate(Unit.year); - break; - case ActionTypes.selectDecade: - this._context._viewDate.year = value; - this._context._viewUpdate(Unit.year); - break; - } - if (this._context._currentViewMode === this._context._minViewModeNumber) { - this._context.dates._setValue(this._context._viewDate, this._context.dates.lastPickedIndex); - if (!this._context._options.display.inline) { - this._context._display.hide(); +class OptionConverter { + static _mergeOptions(providedOptions, mergeTo) { + var _a; + const newOptions = {}; + let path = ''; + const ignoreProperties = ['meta', 'dayViewHeaderFormat', 'container']; + //see if the options specify a locale + const locale = mergeTo.localization.locale !== 'default' + ? mergeTo.localization.locale + : ((_a = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.localization) === null || _a === void 0 ? void 0 : _a.locale) || 'default'; + const processKey = (key, value, providedType, defaultType) => { + switch (key) { + case 'defaultDate': { + const dateTime = this.dateConversion(value, 'defaultDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; } + Namespace.errorMessages.typeMismatch('defaultDate', providedType, 'DateTime or Date'); + break; } - else { - this._context._display._showMode(-1); - } - break; - case ActionTypes.selectDay: - const day = this._context._viewDate.clone; - if (currentTarget.classList.contains(Namespace.css.old)) { - day.manipulate(-1, Unit.month); - } - if (currentTarget.classList.contains(Namespace.css.new)) { - day.manipulate(1, Unit.month); + case 'viewDate': { + const dateTime = this.dateConversion(value, 'viewDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; + } + Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); + break; } - day.date = +currentTarget.dataset.day; - let index = 0; - if (this._context._options.multipleDates) { - index = this._context.dates.pickedIndex(day, Unit.date); - if (index !== -1) { - this._context.dates._setValue(null, index); //deselect multi-date + case 'minDate': { + if (value === undefined) { + return value; } - else { - this._context.dates._setValue(day, this._context.dates.lastPickedIndex + 1); + const dateTime = this.dateConversion(value, 'restrictions.minDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; } + Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); + break; } - else { - this._context.dates._setValue(day, this._context.dates.lastPickedIndex); - } - if (!this._context._display._hasTime && - !this._context._options.display.keepOpen && - !this._context._options.display.inline && - !this._context._options.multipleDates) { - this._context._display.hide(); - } - break; - case ActionTypes.selectHour: - let hour = +currentTarget.dataset.value; - if (lastPicked.hours >= 12 && - !this._context._options.display.components.useTwentyfourHour) - hour += 12; - lastPicked.hours = hour; - this._context.dates._setValue(lastPicked, this._context.dates.lastPickedIndex); - hideOrClock(); - break; - case ActionTypes.selectMinute: - lastPicked.minutes = +currentTarget.dataset.value; - this._context.dates._setValue(lastPicked, this._context.dates.lastPickedIndex); - hideOrClock(); - break; - case ActionTypes.selectSecond: - lastPicked.seconds = +currentTarget.dataset.value; - this._context.dates._setValue(lastPicked, this._context.dates.lastPickedIndex); - hideOrClock(); - break; - case ActionTypes.incrementHours: - manipulateAndSet(Unit.hours); - break; - case ActionTypes.incrementMinutes: - manipulateAndSet(Unit.minutes, this._context._options.stepping); - break; - case ActionTypes.incrementSeconds: - manipulateAndSet(Unit.seconds); - break; - case ActionTypes.decrementHours: - manipulateAndSet(Unit.hours, -1); - break; - case ActionTypes.decrementMinutes: - manipulateAndSet(Unit.minutes, this._context._options.stepping * -1); - break; - case ActionTypes.decrementSeconds: - manipulateAndSet(Unit.seconds, -1); - break; - case ActionTypes.toggleMeridiem: - manipulateAndSet(Unit.hours, this._context.dates.lastPicked.hours >= 12 ? -12 : 12); - break; - case ActionTypes.togglePicker: - if (currentTarget.getAttribute('title') === - this._context._options.localization.selectDate) { - currentTarget.setAttribute('title', this._context._options.localization.selectTime); - currentTarget.innerHTML = this._context._display._iconTag(this._context._options.display.icons.time).outerHTML; - this._context._display._updateCalendarHeader(); - } - else { - currentTarget.setAttribute('title', this._context._options.localization.selectDate); - currentTarget.innerHTML = this._context._display._iconTag(this._context._options.display.icons.date).outerHTML; - if (this._context._display._hasTime) { - this.do(e, ActionTypes.showClock); - this._context._display._update('clock'); + case 'maxDate': { + if (value === undefined) { + return value; + } + const dateTime = this.dateConversion(value, 'restrictions.maxDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; } - } - this._context._display.widget - .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) - .forEach((htmlElement) => Collapse.toggle(htmlElement)); - break; - case ActionTypes.showClock: - case ActionTypes.showHours: - case ActionTypes.showMinutes: - case ActionTypes.showSeconds: - this._context._display.widget - .querySelectorAll(`.${Namespace.css.timeContainer} > div`) - .forEach((htmlElement) => (htmlElement.style.display = 'none')); - let classToUse = ''; - switch (action) { - case ActionTypes.showClock: - classToUse = Namespace.css.clockContainer; - this._context._display._update('clock'); - break; - case ActionTypes.showHours: - classToUse = Namespace.css.hourContainer; - this._context._display._update(Unit.hours); - break; - case ActionTypes.showMinutes: - classToUse = Namespace.css.minuteContainer; - this._context._display._update(Unit.minutes); - break; - case ActionTypes.showSeconds: - classToUse = Namespace.css.secondContainer; - this._context._display._update(Unit.seconds); - break; - } - (this._context._display.widget.getElementsByClassName(classToUse)[0]).style.display = 'grid'; - break; - case ActionTypes.clear: - this._context.dates._setValue(null); - this._context._display._updateCalendarHeader(); - break; - case ActionTypes.close: - this._context._display.hide(); - break; - case ActionTypes.today: - const today = new DateTime().setLocale(this._context._options.localization.locale); - this._context._viewDate = today; - if (this._context._validation.isValid(today, Unit.date)) - this._context.dates._setValue(today, this._context.dates.lastPickedIndex); - break; - } - } -} -var ActionTypes; -(function (ActionTypes) { - ActionTypes["next"] = "next"; - ActionTypes["previous"] = "previous"; - ActionTypes["pickerSwitch"] = "pickerSwitch"; - ActionTypes["selectMonth"] = "selectMonth"; - ActionTypes["selectYear"] = "selectYear"; - ActionTypes["selectDecade"] = "selectDecade"; - ActionTypes["selectDay"] = "selectDay"; - ActionTypes["selectHour"] = "selectHour"; - ActionTypes["selectMinute"] = "selectMinute"; - ActionTypes["selectSecond"] = "selectSecond"; - ActionTypes["incrementHours"] = "incrementHours"; - ActionTypes["incrementMinutes"] = "incrementMinutes"; - ActionTypes["incrementSeconds"] = "incrementSeconds"; - ActionTypes["decrementHours"] = "decrementHours"; - ActionTypes["decrementMinutes"] = "decrementMinutes"; - ActionTypes["decrementSeconds"] = "decrementSeconds"; - ActionTypes["toggleMeridiem"] = "toggleMeridiem"; - ActionTypes["togglePicker"] = "togglePicker"; - ActionTypes["showClock"] = "showClock"; - ActionTypes["showHours"] = "showHours"; - ActionTypes["showMinutes"] = "showMinutes"; - ActionTypes["showSeconds"] = "showSeconds"; - ActionTypes["clear"] = "clear"; - ActionTypes["close"] = "close"; - ActionTypes["today"] = "today"; -})(ActionTypes || (ActionTypes = {})); - -/** - * Creates and updates the grid for `date` - */ -class DateDisplay { - constructor(context) { - this._context = context; - } - /** - * Build the container html for the display - * @private - */ - get _picker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.daysContainer); - container.append(...this._daysOfTheWeek()); - if (this._context._options.display.calendarWeeks) { - const div = document.createElement('div'); - div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); - container.appendChild(div); - } - for (let i = 0; i < 42; i++) { - if (i !== 0 && i % 7 === 0) { - if (this._context._options.display.calendarWeeks) { - const div = document.createElement('div'); - div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); - container.appendChild(div); - } - } - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectDay); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.daysContainer)[0]; - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName('div'); - switcher.setAttribute(Namespace.css.daysContainer, this._context._viewDate.format(this._context._options.localization.dayViewHeaderFormat)); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.month), Unit.month) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.month), Unit.month) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone - .startOf(Unit.month) - .startOf('weekDay', this._context._options.localization.startOfTheWeek) - .manipulate(12, Unit.hours); - container - .querySelectorAll(`[data-action="${ActionTypes.selectDay}"], .${Namespace.css.calendarWeeks}`) - .forEach((containerClone, index) => { - if (this._context._options.display.calendarWeeks && - containerClone.classList.contains(Namespace.css.calendarWeeks)) { - if (containerClone.innerText === '#') - return; - containerClone.innerText = `${innerDate.week}`; - return; - } - let classes = []; - classes.push(Namespace.css.day); - if (innerDate.isBefore(this._context._viewDate, Unit.month)) { - classes.push(Namespace.css.old); - } - if (innerDate.isAfter(this._context._viewDate, Unit.month)) { - classes.push(Namespace.css.new); - } - if (!this._context._unset && - this._context.dates.isPicked(innerDate, Unit.date)) { - classes.push(Namespace.css.active); - } - if (!this._context._validation.isValid(innerDate, Unit.date)) { - classes.push(Namespace.css.disabled); - } - if (innerDate.isSame(new DateTime(), Unit.date)) { - classes.push(Namespace.css.today); - } - if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { - classes.push(Namespace.css.weekend); - } - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`); - containerClone.setAttribute('data-day', `${innerDate.date}`); - containerClone.innerText = innerDate.format({ day: 'numeric' }); - innerDate.manipulate(1, Unit.date); - }); - } - /*** - * Generates an html row that contains the days of the week. - * @private - */ - _daysOfTheWeek() { - let innerDate = this._context._viewDate.clone - .startOf('weekDay', this._context._options.localization.startOfTheWeek) - .startOf(Unit.date); - const row = []; - document.createElement('div'); - if (this._context._options.display.calendarWeeks) { - const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); - htmlDivElement.innerText = '#'; - row.push(htmlDivElement); - } - for (let i = 0; i < 7; i++) { - const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.css.dayOfTheWeek, Namespace.css.noHighlight); - htmlDivElement.innerText = innerDate.format({ weekday: 'short' }); - innerDate.manipulate(1, Unit.date); - row.push(htmlDivElement); - } - return row; - } -} - -/** - * Creates and updates the grid for `month` - */ -class MonthDisplay { - constructor(context) { - this._context = context; - } - /** - * Build the container html for the display - * @private - */ - get _picker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.monthsContainer); - for (let i = 0; i < 12; i++) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectMonth); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName('div'); - switcher.setAttribute(Namespace.css.monthsContainer, this._context._viewDate.format({ year: 'numeric' })); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.year), Unit.year) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.year), Unit.year) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone.startOf(Unit.year); - container - .querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`) - .forEach((containerClone, index) => { - let classes = []; - classes.push(Namespace.css.month); - if (!this._context._unset && - this._context.dates.isPicked(innerDate, Unit.month)) { - classes.push(Namespace.css.active); - } - if (!this._context._validation.isValid(innerDate, Unit.month)) { - classes.push(Namespace.css.disabled); - } - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${index}`); - containerClone.innerText = `${innerDate.format({ month: 'short' })}`; - innerDate.manipulate(1, Unit.month); - }); - } -} - -class OptionConverter { - static _mergeOptions(providedOptions, mergeTo) { - var _a; - const newOptions = {}; - let path = ''; - const ignoreProperties = [ - 'inputParse', - 'inputFormat', - 'meta', - 'dayViewHeaderFormat', - 'container' - ]; - //see if the options specify a locale - const locale = mergeTo.localization.locale !== 'default' ? mergeTo.localization.locale : - ((_a = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.localization) === null || _a === void 0 ? void 0 : _a.locale) || 'default'; - const processKey = (key, value, providedType, defaultType) => { - switch (key) { - case 'defaultDate': { - const dateTime = this._dateConversion(value, 'defaultDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('defaultDate', providedType, 'DateTime or Date'); - } - case 'viewDate': { - const dateTime = this._dateConversion(value, 'viewDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); - } - case 'minDate': { - if (value === undefined) { - return value; - } - const dateTime = this._dateConversion(value, 'restrictions.minDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); - } - case 'maxDate': { - if (value === undefined) { - return value; - } - const dateTime = this._dateConversion(value, 'restrictions.maxDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); + break; } case 'disabledHours': if (value === undefined) { @@ -1486,7 +1016,7 @@ class OptionConverter { Object.keys(valueObject[i]).forEach((vk) => { const subOptionName = `${key}[${i}].${vk}`; let d = valueObject[i][vk]; - const dateTime = this._dateConversion(d, subOptionName); + const dateTime = this.dateConversion(d, subOptionName); if (!dateTime) { Namespace.errorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); } @@ -1507,13 +1037,14 @@ class OptionConverter { if (!keyOptions.includes(value)) Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); return value; - case 'inputParse': - case 'inputFormat': case 'meta': case 'dayViewHeaderFormat': return value; case 'container': - if (value && !(value instanceof HTMLElement || value instanceof Element || (value === null || value === void 0 ? void 0 : value.appendChild))) { + if (value && + !(value instanceof HTMLElement || + value instanceof Element || + (value === null || value === void 0 ? void 0 : value.appendChild))) { Namespace.errorMessages.typeMismatch(path.substring(1), typeof value, 'HTMLElement'); } return value; @@ -1545,7 +1076,7 @@ class OptionConverter { const spread = (provided, mergeOption, copyTo) => { const unsupportedOptions = Object.keys(provided).filter((x) => !Object.keys(mergeOption).includes(x)); if (unsupportedOptions.length > 0) { - const flattenedOptions = OptionConverter._flattenDefaultOptions; + const flattenedOptions = OptionConverter.getFlattenDefaultOptions(); const errors = unsupportedOptions.map((x) => { let error = `"${path.substring(1)}.${x}" in not a known option.`; let didYouMean = flattenedOptions.find((y) => y.includes(x)); @@ -1587,7 +1118,7 @@ class OptionConverter { return newOptions; } static _dataToOptions(element, options) { - const eData = element.dataset; + const eData = JSON.parse(JSON.stringify(element.dataset)); if (eData === null || eData === void 0 ? void 0 : eData.tdTargetInput) delete eData.tdTargetInput; if (eData === null || eData === void 0 ? void 0 : eData.tdTargetToggle) @@ -1673,6 +1204,7 @@ class OptionConverter { * @param optionName Provides text to error messages e.g. disabledDates * @param value Option value * @param providedType Used to provide text to error messages + * @param locale */ static _typeCheckDateArray(optionName, value, providedType, locale = 'default') { if (!Array.isArray(value)) { @@ -1680,7 +1212,7 @@ class OptionConverter { } for (let i = 0; i < value.length; i++) { let d = value[i]; - const dateTime = this._dateConversion(d, optionName); + const dateTime = this.dateConversion(d, optionName); if (!dateTime) { Namespace.errorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); } @@ -1705,7 +1237,7 @@ class OptionConverter { * @param d value to convert * @param optionName Provides text to error messages e.g. disabledDates */ - static _dateConversion(d, optionName) { + static dateConversion(d, optionName) { if (typeof d === typeof '' && optionName !== 'input') { Namespace.errorMessages.dateString(); } @@ -1715,7 +1247,7 @@ class OptionConverter { } return converted; } - static get _flattenDefaultOptions() { + static getFlattenDefaultOptions() { if (this._flatback) return this._flatback; const deepKeys = (t, pre = []) => Array.isArray(t) @@ -1726,33 +1258,205 @@ class OptionConverter { this._flatback = deepKeys(DefaultOptions); return this._flatback; } - /** - * Some options conflict like min/max date. Verify that these kinds of options - * are set correctly. - * @param config - */ - static _validateConflcits(config) { - if (config.display.sideBySide && (!config.display.components.clock || - !(config.display.components.hours || - config.display.components.minutes || - config.display.components.seconds))) { - Namespace.errorMessages.conflictingConfiguration('Cannot use side by side mode without the clock components'); - } - if (config.restrictions.minDate && config.restrictions.maxDate) { - if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { - Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); - } - if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { - Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); - } - } + /** + * Some options conflict like min/max date. Verify that these kinds of options + * are set correctly. + * @param config + */ + static _validateConflcits(config) { + if (config.display.sideBySide && + (!config.display.components.clock || + !(config.display.components.hours || + config.display.components.minutes || + config.display.components.seconds))) { + Namespace.errorMessages.conflictingConfiguration('Cannot use side by side mode without the clock components'); + } + if (config.restrictions.minDate && config.restrictions.maxDate) { + if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { + Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); + } + if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { + Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); + } + } + } +} + +class ServiceLocator { + constructor() { + this.cache = new Map(); + } + locate(identifier) { + const service = this.cache.get(identifier); + if (service) + return service; + const value = new identifier(); + this.cache.set(identifier, value); + return value; + } +} +const setupServiceLocator = () => { + serviceLocator = new ServiceLocator(); +}; +let serviceLocator; + +/** + * Main class for date validation rules based on the options provided. + */ +class Validation { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + } + /** + * Checks to see if the target date is valid based on the rules provided in the options. + * Granularity can be provide to chek portions of the date instead of the whole. + * @param targetDate + * @param granularity + */ + isValid(targetDate, granularity) { + var _a; + if (this.optionsStore.options.restrictions.disabledDates.length > 0 && + this._isInDisabledDates(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.enabledDates.length > 0 && + !this._isInEnabledDates(targetDate)) { + return false; + } + if (granularity !== Unit.month && + granularity !== Unit.year && + ((_a = this.optionsStore.options.restrictions.daysOfWeekDisabled) === null || _a === void 0 ? void 0 : _a.length) > 0 && + this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1) { + return false; + } + if (this.optionsStore.options.restrictions.minDate && + targetDate.isBefore(this.optionsStore.options.restrictions.minDate, granularity)) { + return false; + } + if (this.optionsStore.options.restrictions.maxDate && + targetDate.isAfter(this.optionsStore.options.restrictions.maxDate, granularity)) { + return false; + } + if (granularity === Unit.hours || + granularity === Unit.minutes || + granularity === Unit.seconds) { + if (this.optionsStore.options.restrictions.disabledHours.length > 0 && + this._isInDisabledHours(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.enabledHours.length > 0 && + !this._isInEnabledHours(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0) { + for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) { + if (targetDate.isBetween(disabledTimeIntervals.from, disabledTimeIntervals.to)) + return false; + } + } + } + return true; + } + /** + * Checks to see if the disabledDates option is in use and returns true (meaning invalid) + * if the `testDate` is with in the array. Granularity is by date. + * @param testDate + * @private + */ + _isInDisabledDates(testDate) { + if (!this.optionsStore.options.restrictions.disabledDates || + this.optionsStore.options.restrictions.disabledDates.length === 0) + return false; + const formattedDate = testDate.format(getFormatByUnit(Unit.date)); + return this.optionsStore.options.restrictions.disabledDates + .map((x) => x.format(getFormatByUnit(Unit.date))) + .find((x) => x === formattedDate); + } + /** + * Checks to see if the enabledDates option is in use and returns true (meaning valid) + * if the `testDate` is with in the array. Granularity is by date. + * @param testDate + * @private + */ + _isInEnabledDates(testDate) { + if (!this.optionsStore.options.restrictions.enabledDates || + this.optionsStore.options.restrictions.enabledDates.length === 0) + return true; + const formattedDate = testDate.format(getFormatByUnit(Unit.date)); + return this.optionsStore.options.restrictions.enabledDates + .map((x) => x.format(getFormatByUnit(Unit.date))) + .find((x) => x === formattedDate); + } + /** + * Checks to see if the disabledHours option is in use and returns true (meaning invalid) + * if the `testDate` is with in the array. Granularity is by hours. + * @param testDate + * @private + */ + _isInDisabledHours(testDate) { + if (!this.optionsStore.options.restrictions.disabledHours || + this.optionsStore.options.restrictions.disabledHours.length === 0) + return false; + const formattedDate = testDate.hours; + return this.optionsStore.options.restrictions.disabledHours.find((x) => x === formattedDate); + } + /** + * Checks to see if the enabledHours option is in use and returns true (meaning valid) + * if the `testDate` is with in the array. Granularity is by hours. + * @param testDate + * @private + */ + _isInEnabledHours(testDate) { + if (!this.optionsStore.options.restrictions.enabledHours || + this.optionsStore.options.restrictions.enabledHours.length === 0) + return true; + const formattedDate = testDate.hours; + return this.optionsStore.options.restrictions.enabledHours.find((x) => x === formattedDate); + } +} + +class EventEmitter { + constructor() { + this.subscribers = []; + } + subscribe(callback) { + this.subscribers.push(callback); + return this.unsubscribe.bind(this, this.subscribers.length - 1); + } + unsubscribe(index) { + this.subscribers.splice(index, 1); + } + emit(value) { + this.subscribers.forEach((callback) => { + callback(value); + }); + } + destory() { + this.subscribers = null; + this.subscribers = []; + } +} +class EventEmitters { + constructor() { + this.triggerEvent = new EventEmitter(); + this.viewUpdate = new EventEmitter(); + this.updateDisplay = new EventEmitter(); + this.action = new EventEmitter(); + } + destory() { + this.triggerEvent.destory(); + this.viewUpdate.destory(); + this.updateDisplay.destory(); + this.action.destory(); } } class Dates { - constructor(context) { + constructor() { this._dates = []; - this._context = context; + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this._eventEmitters = serviceLocator.locate(EventEmitters); } /** * Returns the array of selected dates @@ -1775,28 +1479,51 @@ class Dates { return this._dates.length - 1; } /** - * Adds a new DateTime to selected dates array + * Formats a DateTime object to a string. Used when setting the input value. * @param date */ - add(date) { - this._dates.push(date); + formatInput(date) { + const components = this.optionsStore.options.display.components; + if (!date) + return ''; + return date.format({ + year: components.calendar && components.year ? 'numeric' : undefined, + month: components.calendar && components.month ? '2-digit' : undefined, + day: components.calendar && components.date ? '2-digit' : undefined, + hour: components.clock && components.hours + ? components.useTwentyfourHour + ? '2-digit' + : 'numeric' + : undefined, + minute: components.clock && components.minutes ? '2-digit' : undefined, + second: components.clock && components.seconds ? '2-digit' : undefined, + hour12: !components.useTwentyfourHour, + }); } /** * Tries to convert the provided value to a DateTime object. * If value is null|undefined then clear the value of the provided index (or 0). * @param value Value to convert or null|undefined * @param index When using multidates this is the index in the array - * @param from Used in the warning message, useful for debugging. */ - set(value, index, from = 'date.set') { - if (!value) - this._setValue(value, index); - const converted = OptionConverter._dateConversion(value, from); + setFromInput(value, index) { + if (!value) { + this.setValue(undefined, index); + return; + } + const converted = OptionConverter.dateConversion(value, 'input'); if (converted) { - converted.setLocale(this._context._options.localization.locale); - this._setValue(converted, index); + converted.setLocale(this.optionsStore.options.localization.locale); + this.setValue(converted, index); } } + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date) { + this._dates.push(date); + } /** * Returns true if the `targetDate` is part of the selected dates array. * If `unit` is provided then a granularity to that unit will be used. @@ -1806,7 +1533,7 @@ class Dates { isPicked(targetDate, unit) { if (!unit) return this._dates.find((x) => x === targetDate) !== undefined; - const format = Dates.getFormatByUnit(unit); + const format = getFormatByUnit(unit); let innerDateFormatted = targetDate.format(format); return (this._dates .map((x) => x.format(format)) @@ -1822,7 +1549,7 @@ class Dates { pickedIndex(targetDate, unit) { if (!unit) return this._dates.indexOf(targetDate); - const format = Dates.getFormatByUnit(unit); + const format = getFormatByUnit(unit); let innerDateFormatted = targetDate.format(format); return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted); } @@ -1830,8 +1557,8 @@ class Dates { * Clears all selected dates. */ clear() { - this._context._unset = true; - this._context._triggerEvent({ + this.optionsStore.unset = true; + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: undefined, oldDate: this.lastPicked, @@ -1850,7 +1577,7 @@ class Dates { return [startYear, endYear, focusValue]; } /** - * Do not use direectly. Attempts to either clear or set the `target` date at `index`. + * Attempts to either clear or set the `target` date at `index`. * If the `target` is null then the date will be cleared. * If multi-date is being used then it will be removed from the array. * If `target` is valid and multi-date is used then if `index` is @@ -1858,23 +1585,23 @@ class Dates { * @param target * @param index */ - _setValue(target, index) { + setValue(target, index) { const noIndex = typeof index === 'undefined', isClear = !target && noIndex; - let oldDate = this._context._unset ? null : this._dates[index]; - if (!oldDate && !this._context._unset && noIndex && isClear) { + let oldDate = this.optionsStore.unset ? null : this._dates[index]; + if (!oldDate && !this.optionsStore.unset && noIndex && isClear) { oldDate = this.lastPicked; } const updateInput = () => { - if (!this._context._input) + if (!this.optionsStore.input) return; - let newValue = this._context._options.hooks.inputFormat(this._context, target); - if (this._context._options.multipleDates) { + let newValue = this.formatInput(target); + if (this.optionsStore.options.multipleDates) { newValue = this._dates - .map((d) => this._context._options.hooks.inputFormat(this._context, d)) - .join(this._context._options.multipleDatesSeparator); + .map((d) => this.formatInput(d)) + .join(this.optionsStore.options.multipleDatesSeparator); } - if (this._context._input.value != newValue) - this._context._input.value = newValue; + if (this.optionsStore.input.value != newValue) + this.optionsStore.input.value = newValue; }; if (target && (oldDate === null || oldDate === void 0 ? void 0 : oldDate.isSame(target))) { updateInput(); @@ -1882,16 +1609,16 @@ class Dates { } // case of calling setValue(null) if (!target) { - if (!this._context._options.multipleDates || + if (!this.optionsStore.options.multipleDates || this._dates.length === 1 || isClear) { - this._context._unset = true; + this.optionsStore.unset = true; this._dates = []; } else { this._dates.splice(index, 1); } - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: undefined, oldDate, @@ -1899,25 +1626,25 @@ class Dates { isValid: true, }); updateInput(); - this._context._display._update('all'); + this._eventEmitters.updateDisplay.emit('all'); return; } index = index || 0; target = target.clone; // minute stepping is being used, force the minute to the closest value - if (this._context._options.stepping !== 1) { + if (this.optionsStore.options.stepping !== 1) { target.minutes = - Math.round(target.minutes / this._context._options.stepping) * - this._context._options.stepping; + Math.round(target.minutes / this.optionsStore.options.stepping) * + this.optionsStore.options.stepping; target.seconds = 0; } - if (this._context._validation.isValid(target)) { + if (this.validation.isValid(target)) { this._dates[index] = target; - this._context._viewDate = target.clone; + this.optionsStore.viewDate = target.clone; updateInput(); - this._context._unset = false; - this._context._display._update('all'); - this._context._triggerEvent({ + this.optionsStore.unset = false; + this._eventEmitters.updateDisplay.emit('all'); + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: target, oldDate, @@ -1926,11 +1653,11 @@ class Dates { }); return; } - if (this._context._options.keepInvalid) { + if (this.optionsStore.options.keepInvalid) { this._dates[index] = target; - this._context._viewDate = target.clone; + this.optionsStore.viewDate = target.clone; updateInput(); - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: target, oldDate, @@ -1938,29 +1665,227 @@ class Dates { isValid: false, }); } - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.error, reason: Namespace.errorMessages.failedToSetInvalidDate, date: target, oldDate, }); } +} + +var ActionTypes; +(function (ActionTypes) { + ActionTypes["next"] = "next"; + ActionTypes["previous"] = "previous"; + ActionTypes["changeCalendarView"] = "changeCalendarView"; + ActionTypes["selectMonth"] = "selectMonth"; + ActionTypes["selectYear"] = "selectYear"; + ActionTypes["selectDecade"] = "selectDecade"; + ActionTypes["selectDay"] = "selectDay"; + ActionTypes["selectHour"] = "selectHour"; + ActionTypes["selectMinute"] = "selectMinute"; + ActionTypes["selectSecond"] = "selectSecond"; + ActionTypes["incrementHours"] = "incrementHours"; + ActionTypes["incrementMinutes"] = "incrementMinutes"; + ActionTypes["incrementSeconds"] = "incrementSeconds"; + ActionTypes["decrementHours"] = "decrementHours"; + ActionTypes["decrementMinutes"] = "decrementMinutes"; + ActionTypes["decrementSeconds"] = "decrementSeconds"; + ActionTypes["toggleMeridiem"] = "toggleMeridiem"; + ActionTypes["togglePicker"] = "togglePicker"; + ActionTypes["showClock"] = "showClock"; + ActionTypes["showHours"] = "showHours"; + ActionTypes["showMinutes"] = "showMinutes"; + ActionTypes["showSeconds"] = "showSeconds"; + ActionTypes["clear"] = "clear"; + ActionTypes["close"] = "close"; + ActionTypes["today"] = "today"; +})(ActionTypes || (ActionTypes = {})); +var ActionTypes$1 = ActionTypes; + +/** + * Creates and updates the grid for `date` + */ +class DateDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } /** - * Returns a format object based on the granularity of `unit` - * @param unit + * Build the container html for the display + * @private */ - static getFormatByUnit(unit) { - switch (unit) { - case 'date': - return { dateStyle: 'short' }; - case 'month': - return { - month: 'numeric', - year: 'numeric', - }; - case 'year': - return { year: 'numeric' }; + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.daysContainer); + container.append(...this._daysOfTheWeek()); + if (this.optionsStore.options.display.calendarWeeks) { + const div = document.createElement('div'); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); + container.appendChild(div); + } + for (let i = 0; i < 42; i++) { + if (i !== 0 && i % 7 === 0) { + if (this.optionsStore.options.display.calendarWeeks) { + const div = document.createElement('div'); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); + container.appendChild(div); + } + } + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectDay); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.daysContainer)[0]; + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName('div'); + switcher.setAttribute(Namespace.css.daysContainer, this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.month), Unit.month) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.month), Unit.month) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + let innerDate = this.optionsStore.viewDate.clone + .startOf(Unit.month) + .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek) + .manipulate(12, Unit.hours); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectDay}"], .${Namespace.css.calendarWeeks}`) + .forEach((containerClone) => { + if (this.optionsStore.options.display.calendarWeeks && + containerClone.classList.contains(Namespace.css.calendarWeeks)) { + if (containerClone.innerText === '#') + return; + containerClone.innerText = `${innerDate.week}`; + return; + } + let classes = []; + classes.push(Namespace.css.day); + if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) { + classes.push(Namespace.css.old); + } + if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) { + classes.push(Namespace.css.new); + } + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, Unit.date)) { + classes.push(Namespace.css.active); + } + if (!this.validation.isValid(innerDate, Unit.date)) { + classes.push(Namespace.css.disabled); + } + if (innerDate.isSame(new DateTime(), Unit.date)) { + classes.push(Namespace.css.today); + } + if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { + classes.push(Namespace.css.weekend); + } + paint(Unit.date, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`); + containerClone.setAttribute('data-day', `${innerDate.date}`); + containerClone.innerText = innerDate.format({ day: 'numeric' }); + innerDate.manipulate(1, Unit.date); + }); + } + /*** + * Generates an html row that contains the days of the week. + * @private + */ + _daysOfTheWeek() { + let innerDate = this.optionsStore.viewDate.clone + .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek) + .startOf(Unit.date); + const row = []; + document.createElement('div'); + if (this.optionsStore.options.display.calendarWeeks) { + const htmlDivElement = document.createElement('div'); + htmlDivElement.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); + htmlDivElement.innerText = '#'; + row.push(htmlDivElement); + } + for (let i = 0; i < 7; i++) { + const htmlDivElement = document.createElement('div'); + htmlDivElement.classList.add(Namespace.css.dayOfTheWeek, Namespace.css.noHighlight); + htmlDivElement.innerText = innerDate.format({ weekday: 'short' }); + innerDate.manipulate(1, Unit.date); + row.push(htmlDivElement); + } + return row; + } +} + +/** + * Creates and updates the grid for `month` + */ +class MonthDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.monthsContainer); + for (let i = 0; i < 12; i++) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectMonth); + container.appendChild(div); } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName('div'); + switcher.setAttribute(Namespace.css.monthsContainer, this.optionsStore.viewDate.format({ year: 'numeric' })); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.year), Unit.year) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.year), Unit.year) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectMonth}"]`) + .forEach((containerClone, index) => { + let classes = []; + classes.push(Namespace.css.month); + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, Unit.month)) { + classes.push(Namespace.css.active); + } + if (!this.validation.isValid(innerDate, Unit.month)) { + classes.push(Namespace.css.disabled); + } + paint(Unit.month, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${index}`); + containerClone.innerText = `${innerDate.format({ month: 'short' })}`; + innerDate.manipulate(1, Unit.month); + }); } } @@ -1968,19 +1893,21 @@ class Dates { * Creates and updates the grid for `year` */ class YearDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.yearsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectYear); + div.setAttribute('data-action', ActionTypes$1.selectYear); container.appendChild(div); } return container; @@ -1989,36 +1916,36 @@ class YearDisplay { * Populates the grid and updates enabled states * @private */ - _update() { - Dates.getStartEndYear(10, this._context._viewDate.year); - this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year); - this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year); - const container = this._context._display.widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; + _update(widget, paint) { + this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year); + this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year); + const container = widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; const [previous, switcher, next] = container.parentElement .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); switcher.setAttribute(Namespace.css.yearsContainer, `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({ year: 'numeric' })}`); - this._context._validation.isValid(this._startYear, Unit.year) + this.validation.isValid(this._startYear, Unit.year) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._endYear, Unit.year) + this.validation.isValid(this._endYear, Unit.year) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone + let innerDate = this.optionsStore.viewDate.clone .startOf(Unit.year) .manipulate(-1, Unit.year); container - .querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectYear}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.year); - if (!this._context._unset && - this._context.dates.isPicked(innerDate, Unit.year)) { + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, Unit.year)) { classes.push(Namespace.css.active); } - if (!this._context._validation.isValid(innerDate, Unit.year)) { + if (!this.validation.isValid(innerDate, Unit.year)) { classes.push(Namespace.css.disabled); } + paint(Unit.year, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.year}`); @@ -2032,19 +1959,21 @@ class YearDisplay { * Creates and updates the grid for `seconds` */ class DecadeDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.decadesContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectDecade); + div.setAttribute('data-action', ActionTypes$1.selectDecade); container.appendChild(div); } return container; @@ -2053,26 +1982,26 @@ class DecadeDisplay { * Populates the grid and updates enabled states * @private */ - _update() { - const [start, end] = Dates.getStartEndYear(100, this._context._viewDate.year); - this._startDecade = this._context._viewDate.clone.startOf(Unit.year); + _update(widget, paint) { + const [start, end] = Dates.getStartEndYear(100, this.optionsStore.viewDate.year); + this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year); this._startDecade.year = start; - this._endDecade = this._context._viewDate.clone.startOf(Unit.year); + this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year); this._endDecade.year = end; - const container = this._context._display.widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; + const container = widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; const [previous, switcher, next] = container.parentElement .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); switcher.setAttribute(Namespace.css.decadesContainer, `${this._startDecade.format({ year: 'numeric' })}-${this._endDecade.format({ year: 'numeric' })}`); - this._context._validation.isValid(this._startDecade, Unit.year) + this.validation.isValid(this._startDecade, Unit.year) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._endDecade, Unit.year) + this.validation.isValid(this._endDecade, Unit.year) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - const pickedYears = this._context.dates.picked.map((x) => x.year); + const pickedYears = this.dates.picked.map((x) => x.year); container - .querySelectorAll(`[data-action="${ActionTypes.selectDecade}"]`) + .querySelectorAll(`[data-action="${ActionTypes$1.selectDecade}"]`) .forEach((containerClone, index) => { if (index === 0) { containerClone.classList.add(Namespace.css.old); @@ -2093,11 +2022,12 @@ class DecadeDisplay { classes.push(Namespace.css.decade); const startDecadeYear = this._startDecade.year; const endDecadeYear = this._startDecade.year + 9; - if (!this._context._unset && + if (!this.optionsStore.unset && pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) .length > 0) { classes.push(Namespace.css.active); } + paint('decade', this._startDecade, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${this._startDecade.year}`); @@ -2111,18 +2041,20 @@ class DecadeDisplay { * Creates the clock display */ class TimeDisplay { - constructor(context) { + constructor() { this._gridColumns = ''; - this._context = context; + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the clock display * @private */ - get _picker() { + getPicker(iconTag) { const container = document.createElement('div'); container.classList.add(Namespace.css.clockContainer); - container.append(...this._grid()); + container.append(...this._grid(iconTag)); return container; } /** @@ -2130,59 +2062,57 @@ class TimeDisplay { * like the current hour and if the manipulation icons are enabled. * @private */ - _update() { - if (!this._context._display._hasTime) - return; - const timesDiv = (this._context._display.widget.getElementsByClassName(Namespace.css.clockContainer)[0]); - const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; + _update(widget) { + const timesDiv = (widget.getElementsByClassName(Namespace.css.clockContainer)[0]); + const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate).clone; timesDiv .querySelectorAll('.disabled') .forEach((element) => element.classList.remove(Namespace.css.disabled)); - if (this._context._options.display.components.hours) { - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.hours), Unit.hours)) { + if (this.optionsStore.options.display.components.hours) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.hours), Unit.hours)) { timesDiv - .querySelector(`[data-action=${ActionTypes.incrementHours}]`) + .querySelector(`[data-action=${ActionTypes$1.incrementHours}]`) .classList.add(Namespace.css.disabled); } - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.hours), Unit.hours)) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours), Unit.hours)) { timesDiv - .querySelector(`[data-action=${ActionTypes.decrementHours}]`) + .querySelector(`[data-action=${ActionTypes$1.decrementHours}]`) .classList.add(Namespace.css.disabled); } - timesDiv.querySelector(`[data-time-component=${Unit.hours}]`).innerText = this._context._options.display.components.useTwentyfourHour + timesDiv.querySelector(`[data-time-component=${Unit.hours}]`).innerText = this.optionsStore.options.display.components.useTwentyfourHour ? lastPicked.hoursFormatted : lastPicked.twelveHoursFormatted; } - if (this._context._options.display.components.minutes) { - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.minutes), Unit.minutes)) { + if (this.optionsStore.options.display.components.minutes) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes), Unit.minutes)) { timesDiv - .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`) + .querySelector(`[data-action=${ActionTypes$1.incrementMinutes}]`) .classList.add(Namespace.css.disabled); } - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.minutes), Unit.minutes)) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes), Unit.minutes)) { timesDiv - .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`) + .querySelector(`[data-action=${ActionTypes$1.decrementMinutes}]`) .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.minutes}]`).innerText = lastPicked.minutesFormatted; } - if (this._context._options.display.components.seconds) { - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, Unit.seconds), Unit.seconds)) { + if (this.optionsStore.options.display.components.seconds) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds), Unit.seconds)) { timesDiv - .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`) + .querySelector(`[data-action=${ActionTypes$1.incrementSeconds}]`) .classList.add(Namespace.css.disabled); } - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, Unit.seconds), Unit.seconds)) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds), Unit.seconds)) { timesDiv - .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`) + .querySelector(`[data-action=${ActionTypes$1.decrementSeconds}]`) .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${Unit.seconds}]`).innerText = lastPicked.secondsFormatted; } - if (!this._context._options.display.components.useTwentyfourHour) { - const toggle = timesDiv.querySelector(`[data-action=${ActionTypes.toggleMeridiem}]`); + if (!this.optionsStore.options.display.components.useTwentyfourHour) { + const toggle = timesDiv.querySelector(`[data-action=${ActionTypes$1.toggleMeridiem}]`); toggle.innerText = lastPicked.meridiem(); - if (!this._context._validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, Unit.hours))) { + if (!this.validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, Unit.hours))) { toggle.classList.add(Namespace.css.disabled); } else { @@ -2195,9 +2125,9 @@ class TimeDisplay { * Creates the table for the clock display depending on what options are selected. * @private */ - _grid() { + _grid(iconTag) { this._gridColumns = ''; - const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = this._context._display._iconTag(this._context._options.display.icons.up), downIcon = this._context._display._iconTag(this._context._options.display.icons.down); + const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = iconTag(this.optionsStore.options.display.icons.up), downIcon = iconTag(this.optionsStore.options.display.icons.down); separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); const separatorColon = separator.cloneNode(true); separatorColon.innerHTML = ':'; @@ -2206,81 +2136,85 @@ class TimeDisplay { ? separatorColon.cloneNode(true) : separator.cloneNode(true); }; - if (this._context._options.display.components.hours) { + if (this.optionsStore.options.display.components.hours) { let divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.incrementHour); - divElement.setAttribute('data-action', ActionTypes.incrementHours); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementHour); + divElement.setAttribute('data-action', ActionTypes$1.incrementHours); divElement.appendChild(upIcon.cloneNode(true)); top.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.pickHour); - divElement.setAttribute('data-action', ActionTypes.showHours); + divElement.setAttribute('title', this.optionsStore.options.localization.pickHour); + divElement.setAttribute('data-action', ActionTypes$1.showHours); divElement.setAttribute('data-time-component', Unit.hours); middle.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.decrementHour); - divElement.setAttribute('data-action', ActionTypes.decrementHours); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementHour); + divElement.setAttribute('data-action', ActionTypes$1.decrementHours); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); this._gridColumns += 'a'; } - if (this._context._options.display.components.minutes) { + if (this.optionsStore.options.display.components.minutes) { this._gridColumns += ' a'; - if (this._context._options.display.components.hours) { + if (this.optionsStore.options.display.components.hours) { top.push(getSeparator()); middle.push(getSeparator(true)); bottom.push(getSeparator()); this._gridColumns += ' a'; } let divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.incrementMinute); - divElement.setAttribute('data-action', ActionTypes.incrementMinutes); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementMinute); + divElement.setAttribute('data-action', ActionTypes$1.incrementMinutes); divElement.appendChild(upIcon.cloneNode(true)); top.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.pickMinute); - divElement.setAttribute('data-action', ActionTypes.showMinutes); + divElement.setAttribute('title', this.optionsStore.options.localization.pickMinute); + divElement.setAttribute('data-action', ActionTypes$1.showMinutes); divElement.setAttribute('data-time-component', Unit.minutes); middle.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.decrementMinute); - divElement.setAttribute('data-action', ActionTypes.decrementMinutes); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementMinute); + divElement.setAttribute('data-action', ActionTypes$1.decrementMinutes); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); } - if (this._context._options.display.components.seconds) { + if (this.optionsStore.options.display.components.seconds) { this._gridColumns += ' a'; - if (this._context._options.display.components.minutes) { + if (this.optionsStore.options.display.components.minutes) { top.push(getSeparator()); middle.push(getSeparator(true)); bottom.push(getSeparator()); this._gridColumns += ' a'; } let divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.incrementSecond); - divElement.setAttribute('data-action', ActionTypes.incrementSeconds); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementSecond); + divElement.setAttribute('data-action', ActionTypes$1.incrementSeconds); divElement.appendChild(upIcon.cloneNode(true)); top.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.pickSecond); - divElement.setAttribute('data-action', ActionTypes.showSeconds); + divElement.setAttribute('title', this.optionsStore.options.localization.pickSecond); + divElement.setAttribute('data-action', ActionTypes$1.showSeconds); divElement.setAttribute('data-time-component', Unit.seconds); middle.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.decrementSecond); - divElement.setAttribute('data-action', ActionTypes.decrementSeconds); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementSecond); + divElement.setAttribute('data-action', ActionTypes$1.decrementSeconds); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); } - if (!this._context._options.display.components.useTwentyfourHour) { + if (!this.optionsStore.options.display.components.useTwentyfourHour) { this._gridColumns += ' a'; let divElement = getSeparator(); top.push(divElement); let button = document.createElement('button'); - button.setAttribute('title', this._context._options.localization.toggleMeridiem); - button.setAttribute('data-action', ActionTypes.toggleMeridiem); + button.setAttribute('title', this.optionsStore.options.localization.toggleMeridiem); + button.setAttribute('data-action', ActionTypes$1.toggleMeridiem); button.setAttribute('tabindex', '-1'); - button.classList.add(Namespace.css.toggleMeridiem); + if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function? + button.classList.add(...Namespace.css.toggleMeridiem.split(',')); + } + else + button.classList.add(Namespace.css.toggleMeridiem); divElement = document.createElement('div'); divElement.classList.add(Namespace.css.noHighlight); divElement.appendChild(button); @@ -2297,20 +2231,21 @@ class TimeDisplay { * Creates and updates the grid for `hours` */ class HourDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.hourContainer); for (let i = 0; i < - (this._context._options.display.components.useTwentyfourHour ? 24 : 12); i++) { + (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12); i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectHour); + div.setAttribute('data-action', ActionTypes$1.selectHour); container.appendChild(div); } return container; @@ -2319,21 +2254,22 @@ class HourDisplay { * Populates the grid and updates enabled states * @private */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.hourContainer)[0]; - let innerDate = this._context._viewDate.clone.startOf(Unit.date); + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.hourContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date); container - .querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectHour}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.hour); - if (!this._context._validation.isValid(innerDate, Unit.hours)) { + if (!this.validation.isValid(innerDate, Unit.hours)) { classes.push(Namespace.css.disabled); } + paint(Unit.hours, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.hours}`); - containerClone.innerText = this._context._options.display.components + containerClone.innerText = this.optionsStore.options.display.components .useTwentyfourHour ? innerDate.hoursFormatted : innerDate.twelveHoursFormatted; @@ -2346,22 +2282,23 @@ class HourDisplay { * Creates and updates the grid for `minutes` */ class MinuteDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.minuteContainer); - let step = this._context._options.stepping === 1 + let step = this.optionsStore.options.stepping === 1 ? 5 - : this._context._options.stepping; + : this.optionsStore.options.stepping; for (let i = 0; i < 60 / step; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectMinute); + div.setAttribute('data-action', ActionTypes$1.selectMinute); container.appendChild(div); } return container; @@ -2370,20 +2307,21 @@ class MinuteDisplay { * Populates the grid and updates enabled states * @private */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; - let innerDate = this._context._viewDate.clone.startOf(Unit.hours); - let step = this._context._options.stepping === 1 + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours); + let step = this.optionsStore.options.stepping === 1 ? 5 - : this._context._options.stepping; + : this.optionsStore.options.stepping; container - .querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectMinute}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.minute); - if (!this._context._validation.isValid(innerDate, Unit.minutes)) { + if (!this.validation.isValid(innerDate, Unit.minutes)) { classes.push(Namespace.css.disabled); } + paint(Unit.minutes, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.minutesFormatted}`); @@ -2397,19 +2335,20 @@ class MinuteDisplay { * Creates and updates the grid for `seconds` */ class secondDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.secondContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectSecond); + div.setAttribute('data-action', ActionTypes$1.selectSecond); container.appendChild(div); } return container; @@ -2418,17 +2357,18 @@ class secondDisplay { * Populates the grid and updates enabled states * @private */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.secondContainer)[0]; - let innerDate = this._context._viewDate.clone.startOf(Unit.minutes); + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.secondContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes); container - .querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectSecond}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.second); - if (!this._context._validation.isValid(innerDate, Unit.seconds)) { + if (!this.validation.isValid(innerDate, Unit.seconds)) { classes.push(Namespace.css.disabled); } + paint(Unit.seconds, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.seconds}`); @@ -2438,11 +2378,92 @@ class secondDisplay { } } +/** + * Provides a collapse functionality to the view changes + */ +class Collapse { + /** + * Flips the show/hide state of `target` + * @param target html element to affect. + */ + static toggle(target) { + if (target.classList.contains(Namespace.css.show)) { + this.hide(target); + } + else { + this.show(target); + } + } + /** + * If `target` is not already showing, then show after the animation. + * @param target + */ + static show(target) { + if (target.classList.contains(Namespace.css.collapsing) || + target.classList.contains(Namespace.css.show)) + return; + const complete = () => { + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse, Namespace.css.show); + target.style.height = ''; + }; + target.style.height = '0'; + target.classList.remove(Namespace.css.collapse); + target.classList.add(Namespace.css.collapsing); + setTimeout(complete, this.getTransitionDurationFromElement(target)); + target.style.height = `${target.scrollHeight}px`; + } + /** + * If `target` is not already hidden, then hide after the animation. + * @param target HTML Element + */ + static hide(target) { + if (target.classList.contains(Namespace.css.collapsing) || + !target.classList.contains(Namespace.css.show)) + return; + const complete = () => { + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse); + }; + target.style.height = `${target.getBoundingClientRect()['height']}px`; + const reflow = (element) => element.offsetHeight; + reflow(target); + target.classList.remove(Namespace.css.collapse, Namespace.css.show); + target.classList.add(Namespace.css.collapsing); + target.style.height = ''; + setTimeout(complete, this.getTransitionDurationFromElement(target)); + } +} +/** + * Gets the transition duration from the `element` by getting css properties + * `transition-duration` and `transition-delay` + * @param element HTML Element + */ +Collapse.getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + // Get transition-duration of the element + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + // Return 0 if element or transition duration is not found + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + // If multiple durations are defined, take the first + transitionDuration = transitionDuration.split(',')[0]; + transitionDelay = transitionDelay.split(',')[0]; + return ((Number.parseFloat(transitionDuration) + + Number.parseFloat(transitionDelay)) * + 1000); +}; + /** * Main class for all things display related. */ class Display { - constructor(context) { + constructor() { this._isVisible = false; /** * A document click event to hide the widget if click is outside @@ -2451,11 +2472,11 @@ class Display { */ this._documentClickEvent = (e) => { var _a; - if (this._context._options.debug || window.debug) + if (this.optionsStore.options.debug || window.debug) return; if (this._isVisible && !e.composedPath().includes(this.widget) && // click inside the widget - !((_a = e.composedPath()) === null || _a === void 0 ? void 0 : _a.includes(this._context._element)) // click on the element + !((_a = e.composedPath()) === null || _a === void 0 ? void 0 : _a.includes(this.optionsStore.element)) // click on the element ) { this.hide(); } @@ -2466,18 +2487,24 @@ class Display { * @private */ this._actionsClickEvent = (e) => { - this._context._action.do(e); + this._eventEmitters.action.emit({ e: e }); }; - this._context = context; - this._dateDisplay = new DateDisplay(context); - this._monthDisplay = new MonthDisplay(context); - this._yearDisplay = new YearDisplay(context); - this._decadeDisplay = new DecadeDisplay(context); - this._timeDisplay = new TimeDisplay(context); - this._hourDisplay = new HourDisplay(context); - this._minuteDisplay = new MinuteDisplay(context); - this._secondDisplay = new secondDisplay(context); + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this.dates = serviceLocator.locate(Dates); + this.dateDisplay = serviceLocator.locate(DateDisplay); + this.monthDisplay = serviceLocator.locate(MonthDisplay); + this.yearDisplay = serviceLocator.locate(YearDisplay); + this.decadeDisplay = serviceLocator.locate(DecadeDisplay); + this.timeDisplay = serviceLocator.locate(TimeDisplay); + this.hourDisplay = serviceLocator.locate(HourDisplay); + this.minuteDisplay = serviceLocator.locate(MinuteDisplay); + this.secondDisplay = serviceLocator.locate(secondDisplay); + this._eventEmitters = serviceLocator.locate(EventEmitters); this._widget = undefined; + this._eventEmitters.updateDisplay.subscribe((result) => { + this._update(result); + }); } /** * Returns the widget body or undefined @@ -2504,27 +2531,27 @@ class Display { //todo do I want some kind of error catching or other guards here? switch (unit) { case Unit.seconds: - this._secondDisplay._update(); + this.secondDisplay._update(this.widget, this.paint); break; case Unit.minutes: - this._minuteDisplay._update(); + this.minuteDisplay._update(this.widget, this.paint); break; case Unit.hours: - this._hourDisplay._update(); + this.hourDisplay._update(this.widget, this.paint); break; case Unit.date: - this._dateDisplay._update(); + this.dateDisplay._update(this.widget, this.paint); break; case Unit.month: - this._monthDisplay._update(); + this.monthDisplay._update(this.widget, this.paint); break; case Unit.year: - this._yearDisplay._update(); + this.yearDisplay._update(this.widget, this.paint); break; case 'clock': if (!this._hasTime) break; - this._timeDisplay._update(); + this.timeDisplay._update(this.widget); this._update(Unit.hours); this._update(Unit.minutes); this._update(Unit.seconds); @@ -2533,7 +2560,7 @@ class Display { this._update(Unit.date); this._update(Unit.year); this._update(Unit.month); - this._decadeDisplay._update(); + this.decadeDisplay._update(this.widget, this.paint); this._updateCalendarHeader(); break; case 'all': @@ -2545,88 +2572,109 @@ class Display { } } } + // noinspection JSUnusedLocalSymbols + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit, _date, _classes, _element) { + // implemented in plugin + } /** * Shows the picker and creates a Popper instance if needed. * Add document click event to hide when clicking outside the picker. * @fires Events#show */ show() { - var _a, _b, _c; + var _a, _b; if (this.widget == undefined) { - if (this._context._options.useCurrent && - !this._context._options.defaultDate && - !((_a = this._context._input) === null || _a === void 0 ? void 0 : _a.value)) { - //todo in the td4 branch a pr changed this to allow granularity - const date = new DateTime().setLocale(this._context._options.localization.locale); - if (!this._context._options.keepInvalid) { - let tries = 0; - let direction = 1; - if ((_b = this._context._options.restrictions.maxDate) === null || _b === void 0 ? void 0 : _b.isBefore(date)) { - direction = -1; - } - while (!this._context._validation.isValid(date)) { - date.manipulate(direction, Unit.date); - if (tries > 31) - break; - tries++; + if (this.dates.picked.length == 0) { + if (this.optionsStore.options.useCurrent && + !this.optionsStore.options.defaultDate) { + const date = new DateTime().setLocale(this.optionsStore.options.localization.locale); + if (!this.optionsStore.options.keepInvalid) { + let tries = 0; + let direction = 1; + if ((_a = this.optionsStore.options.restrictions.maxDate) === null || _a === void 0 ? void 0 : _a.isBefore(date)) { + direction = -1; + } + while (!this.validation.isValid(date)) { + date.manipulate(direction, Unit.date); + if (tries > 31) + break; + tries++; + } } + this.dates.setValue(date); + } + if (this.optionsStore.options.defaultDate) { + this.dates.setValue(this.optionsStore.options.defaultDate); } - this._context.dates._setValue(date); - } - if (this._context._options.defaultDate) { - this._context.dates._setValue(this._context._options.defaultDate); } this._buildWidget(); // If modeView is only clock const onlyClock = this._hasTime && !this._hasDate; // reset the view to the clock if there's no date components if (onlyClock) { - this._context._action.do(null, ActionTypes.showClock); + this.optionsStore.currentView = 'clock'; + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes$1.showClock, + }); } // otherwise return to the calendar view - this._context._currentViewMode = this._context._minViewModeNumber; + if (!this.optionsStore.currentCalendarViewMode) { + this.optionsStore.currentCalendarViewMode = + this.optionsStore.minimumCalendarViewMode; + } if (!onlyClock) { if (this._hasTime) { - Collapse.hide(this._context._display.widget.querySelector(`div.${Namespace.css.timeContainer}`)); + Collapse.hide(this.widget.querySelector(`div.${Namespace.css.timeContainer}`)); } - Collapse.show(this._context._display.widget.querySelector(`div.${Namespace.css.dateContainer}`)); + Collapse.show(this.widget.querySelector(`div.${Namespace.css.dateContainer}`)); } if (this._hasDate) { this._showMode(); } - if (!this._context._options.display.inline) { + if (!this.optionsStore.options.display.inline) { // If needed to change the parent container - const container = ((_c = this._context._options) === null || _c === void 0 ? void 0 : _c.container) || document.body; + const container = ((_b = this.optionsStore.options) === null || _b === void 0 ? void 0 : _b.container) || document.body; container.appendChild(this.widget); - this._popperInstance = createPopper(this._context._element, this.widget, { + this._popperInstance = createPopper(this.optionsStore.element, this.widget, { modifiers: [{ name: 'eventListeners', enabled: true }], //#2400 placement: document.documentElement.dir === 'rtl' ? 'bottom-end' - : 'bottom-start' + : 'bottom-start', }); } else { - this._context._element.appendChild(this.widget); + this.optionsStore.element.appendChild(this.widget); } - if (this._context._options.display.viewMode == 'clock') { - this._context._action.do(null, ActionTypes.showClock); + if (this.optionsStore.options.display.viewMode == 'clock') { + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes$1.showClock, + }); } this.widget .querySelectorAll('[data-action]') .forEach((element) => element.addEventListener('click', this._actionsClickEvent)); // show the clock when using sideBySide - if (this._context._options.display.sideBySide) { - this._timeDisplay._update(); + if (this._hasTime && this.optionsStore.options.display.sideBySide) { + this.timeDisplay._update(this.widget); this.widget.getElementsByClassName(Namespace.css.clockContainer)[0].style.display = 'grid'; } } this.widget.classList.add(Namespace.css.show); - if (!this._context._options.display.inline) { + if (!this.optionsStore.options.display.inline) { this._popperInstance.update(); document.addEventListener('click', this._documentClickEvent); } - this._context._triggerEvent({ type: Namespace.events.show }); + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show }); this._isVisible = true; } /** @@ -2639,61 +2687,62 @@ class Display { return; } if (direction) { - const max = Math.max(this._context._minViewModeNumber, Math.min(3, this._context._currentViewMode + direction)); - if (this._context._currentViewMode == max) + const max = Math.max(this.optionsStore.minimumCalendarViewMode, Math.min(3, this.optionsStore.currentCalendarViewMode + direction)); + if (this.optionsStore.currentCalendarViewMode == max) return; - this._context._currentViewMode = max; + this.optionsStore.currentCalendarViewMode = max; } this.widget .querySelectorAll(`.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`) .forEach((e) => (e.style.display = 'none')); - const datePickerMode = DatePickerModes[this._context._currentViewMode]; + const datePickerMode = CalendarModes[this.optionsStore.currentCalendarViewMode]; let picker = this.widget.querySelector(`.${datePickerMode.className}`); switch (datePickerMode.className) { case Namespace.css.decadesContainer: - this._decadeDisplay._update(); + this.decadeDisplay._update(this.widget, this.paint); break; case Namespace.css.yearsContainer: - this._yearDisplay._update(); + this.yearDisplay._update(this.widget, this.paint); break; case Namespace.css.monthsContainer: - this._monthDisplay._update(); + this.monthDisplay._update(this.widget, this.paint); break; case Namespace.css.daysContainer: - this._dateDisplay._update(); + this.dateDisplay._update(this.widget, this.paint); break; } picker.style.display = 'grid'; this._updateCalendarHeader(); + this._eventEmitters.viewUpdate.emit(); } _updateCalendarHeader() { const showing = [ - ...this.widget.querySelector(`.${Namespace.css.dateContainer} div[style*="display: grid"]`).classList + ...this.widget.querySelector(`.${Namespace.css.dateContainer} div[style*="display: grid"]`).classList, ].find((x) => x.startsWith(Namespace.css.dateContainer)); - const [previous, switcher, next] = this._context._display.widget + const [previous, switcher, next] = this.widget .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); switch (showing) { case Namespace.css.decadesContainer: - previous.setAttribute('title', this._context._options.localization.previousCentury); + previous.setAttribute('title', this.optionsStore.options.localization.previousCentury); switcher.setAttribute('title', ''); - next.setAttribute('title', this._context._options.localization.nextCentury); + next.setAttribute('title', this.optionsStore.options.localization.nextCentury); break; case Namespace.css.yearsContainer: - previous.setAttribute('title', this._context._options.localization.previousDecade); - switcher.setAttribute('title', this._context._options.localization.selectDecade); - next.setAttribute('title', this._context._options.localization.nextDecade); + previous.setAttribute('title', this.optionsStore.options.localization.previousDecade); + switcher.setAttribute('title', this.optionsStore.options.localization.selectDecade); + next.setAttribute('title', this.optionsStore.options.localization.nextDecade); break; case Namespace.css.monthsContainer: - previous.setAttribute('title', this._context._options.localization.previousYear); - switcher.setAttribute('title', this._context._options.localization.selectYear); - next.setAttribute('title', this._context._options.localization.nextYear); + previous.setAttribute('title', this.optionsStore.options.localization.previousYear); + switcher.setAttribute('title', this.optionsStore.options.localization.selectYear); + next.setAttribute('title', this.optionsStore.options.localization.nextYear); break; case Namespace.css.daysContainer: - previous.setAttribute('title', this._context._options.localization.previousMonth); - switcher.setAttribute('title', this._context._options.localization.selectMonth); - next.setAttribute('title', this._context._options.localization.nextMonth); - switcher.innerText = this._context._viewDate.format(this._context._options.localization.dayViewHeaderFormat); + previous.setAttribute('title', this.optionsStore.options.localization.previousMonth); + switcher.setAttribute('title', this.optionsStore.options.localization.selectMonth); + next.setAttribute('title', this.optionsStore.options.localization.nextMonth); + switcher.innerText = this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat); break; } switcher.innerText = switcher.getAttribute(showing); @@ -2708,13 +2757,13 @@ class Display { return; this.widget.classList.remove(Namespace.css.show); if (this._isVisible) { - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.hide, - date: this._context._unset + date: this.optionsStore.unset ? null - : this._context.dates.lastPicked - ? this._context.dates.lastPicked.clone - : void 0 + : this.dates.lastPicked + ? this.dates.lastPicked.clone + : void 0, }); this._isVisible = false; } @@ -2749,27 +2798,27 @@ class Display { template.classList.add(Namespace.css.widget); const dateView = document.createElement('div'); dateView.classList.add(Namespace.css.dateContainer); - dateView.append(this._headTemplate, this._decadeDisplay._picker, this._yearDisplay._picker, this._monthDisplay._picker, this._dateDisplay._picker); + dateView.append(this.getHeadTemplate(), this.decadeDisplay.getPicker(), this.yearDisplay.getPicker(), this.monthDisplay.getPicker(), this.dateDisplay.getPicker()); const timeView = document.createElement('div'); timeView.classList.add(Namespace.css.timeContainer); - timeView.appendChild(this._timeDisplay._picker); - timeView.appendChild(this._hourDisplay._picker); - timeView.appendChild(this._minuteDisplay._picker); - timeView.appendChild(this._secondDisplay._picker); + timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))); + timeView.appendChild(this.hourDisplay.getPicker()); + timeView.appendChild(this.minuteDisplay.getPicker()); + timeView.appendChild(this.secondDisplay.getPicker()); const toolbar = document.createElement('div'); toolbar.classList.add(Namespace.css.toolbar); - toolbar.append(...this._toolbar); - if (this._context._options.display.inline) { + toolbar.append(...this.getToolbarElements()); + if (this.optionsStore.options.display.inline) { template.classList.add(Namespace.css.inline); } - if (this._context._options.display.calendarWeeks) { + if (this.optionsStore.options.display.calendarWeeks) { template.classList.add('calendarWeeks'); } - if (this._context._options.display.sideBySide && + if (this.optionsStore.options.display.sideBySide && this._hasDate && this._hasTime) { template.classList.add(Namespace.css.sideBySide); - if (this._context._options.display.toolbarPlacement === 'top') { + if (this.optionsStore.options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } const row = document.createElement('div'); @@ -2779,19 +2828,19 @@ class Display { row.appendChild(dateView); row.appendChild(timeView); template.appendChild(row); - if (this._context._options.display.toolbarPlacement === 'bottom') { + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { template.appendChild(toolbar); } this._widget = template; return; } - if (this._context._options.display.toolbarPlacement === 'top') { + if (this.optionsStore.options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } if (this._hasDate) { if (this._hasTime) { dateView.classList.add(Namespace.css.collapse); - if (this._context._options.display.viewMode !== 'clock') + if (this.optionsStore.options.display.viewMode !== 'clock') dateView.classList.add(Namespace.css.show); } template.appendChild(dateView); @@ -2799,12 +2848,12 @@ class Display { if (this._hasTime) { if (this._hasDate) { timeView.classList.add(Namespace.css.collapse); - if (this._context._options.display.viewMode === 'clock') + if (this.optionsStore.options.display.viewMode === 'clock') timeView.classList.add(Namespace.css.show); } template.appendChild(timeView); } - if (this._context._options.display.toolbarPlacement === 'bottom') { + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { template.appendChild(toolbar); } const arrow = document.createElement('div'); @@ -2817,63 +2866,63 @@ class Display { * Returns true if the hours, minutes, or seconds component is turned on */ get _hasTime() { - return (this._context._options.display.components.clock && - (this._context._options.display.components.hours || - this._context._options.display.components.minutes || - this._context._options.display.components.seconds)); + return (this.optionsStore.options.display.components.clock && + (this.optionsStore.options.display.components.hours || + this.optionsStore.options.display.components.minutes || + this.optionsStore.options.display.components.seconds)); } /** * Returns true if the year, month, or date component is turned on */ get _hasDate() { - return (this._context._options.display.components.calendar && - (this._context._options.display.components.year || - this._context._options.display.components.month || - this._context._options.display.components.date)); + return (this.optionsStore.options.display.components.calendar && + (this.optionsStore.options.display.components.year || + this.optionsStore.options.display.components.month || + this.optionsStore.options.display.components.date)); } /** * Get the toolbar html based on options like buttons.today * @private */ - get _toolbar() { + getToolbarElements() { const toolbar = []; - if (this._context._options.display.buttons.today) { + if (this.optionsStore.options.display.buttons.today) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.today); - div.setAttribute('title', this._context._options.localization.today); - div.appendChild(this._iconTag(this._context._options.display.icons.today)); + div.setAttribute('data-action', ActionTypes$1.today); + div.setAttribute('title', this.optionsStore.options.localization.today); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)); toolbar.push(div); } - if (!this._context._options.display.sideBySide && + if (!this.optionsStore.options.display.sideBySide && this._hasDate && this._hasTime) { let title, icon; - if (this._context._options.display.viewMode === 'clock') { - title = this._context._options.localization.selectDate; - icon = this._context._options.display.icons.date; + if (this.optionsStore.options.display.viewMode === 'clock') { + title = this.optionsStore.options.localization.selectDate; + icon = this.optionsStore.options.display.icons.date; } else { - title = this._context._options.localization.selectTime; - icon = this._context._options.display.icons.time; + title = this.optionsStore.options.localization.selectTime; + icon = this.optionsStore.options.display.icons.time; } const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.togglePicker); + div.setAttribute('data-action', ActionTypes$1.togglePicker); div.setAttribute('title', title); div.appendChild(this._iconTag(icon)); toolbar.push(div); } - if (this._context._options.display.buttons.clear) { + if (this.optionsStore.options.display.buttons.clear) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.clear); - div.setAttribute('title', this._context._options.localization.clear); - div.appendChild(this._iconTag(this._context._options.display.icons.clear)); + div.setAttribute('data-action', ActionTypes$1.clear); + div.setAttribute('title', this.optionsStore.options.localization.clear); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)); toolbar.push(div); } - if (this._context._options.display.buttons.close) { + if (this.optionsStore.options.display.buttons.close) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.close); - div.setAttribute('title', this._context._options.localization.close); - div.appendChild(this._iconTag(this._context._options.display.icons.close)); + div.setAttribute('data-action', ActionTypes$1.close); + div.setAttribute('title', this.optionsStore.options.localization.close); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)); toolbar.push(div); } return toolbar; @@ -2882,20 +2931,20 @@ class Display { * Builds the base header template with next and previous icons * @private */ - get _headTemplate() { + getHeadTemplate() { const calendarHeader = document.createElement('div'); calendarHeader.classList.add(Namespace.css.calendarHeader); const previous = document.createElement('div'); previous.classList.add(Namespace.css.previous); - previous.setAttribute('data-action', ActionTypes.previous); - previous.appendChild(this._iconTag(this._context._options.display.icons.previous)); + previous.setAttribute('data-action', ActionTypes$1.previous); + previous.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous)); const switcher = document.createElement('div'); switcher.classList.add(Namespace.css.switch); - switcher.setAttribute('data-action', ActionTypes.pickerSwitch); + switcher.setAttribute('data-action', ActionTypes$1.changeCalendarView); const next = document.createElement('div'); next.classList.add(Namespace.css.next); - next.setAttribute('data-action', ActionTypes.next); - next.appendChild(this._iconTag(this._context._options.display.icons.next)); + next.setAttribute('data-action', ActionTypes$1.next); + next.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)); calendarHeader.append(previous, switcher, next); return calendarHeader; } @@ -2906,7 +2955,7 @@ class Display { * @private */ _iconTag(iconClass) { - if (this._context._options.display.icons.type === 'sprites') { + if (this.optionsStore.options.display.icons.type === 'sprites') { const svg = document.createElement('svg'); svg.innerHTML = ``; return svg; @@ -2932,117 +2981,234 @@ class Display { } /** - * Main class for date validation rules based on the options provided. + * */ -class Validation { - constructor(context) { - this._context = context; +class Actions { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + this.display = serviceLocator.locate(Display); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this._eventEmitters.action.subscribe((result) => { + this.do(result.e, result.action); + }); } /** - * Checks to see if the target date is valid based on the rules provided in the options. - * Granularity can be provide to chek portions of the date instead of the whole. - * @param targetDate - * @param granularity + * Performs the selected `action`. See ActionTypes + * @param e This is normally a click event + * @param action If not provided, then look for a [data-action] */ - isValid(targetDate, granularity) { - var _a; - if (this._context._options.restrictions.disabledDates.length > 0 && - this._isInDisabledDates(targetDate)) { - return false; - } - if (this._context._options.restrictions.enabledDates.length > 0 && - !this._isInEnabledDates(targetDate)) { - return false; - } - if (granularity !== Unit.month && - granularity !== Unit.year && - ((_a = this._context._options.restrictions.daysOfWeekDisabled) === null || _a === void 0 ? void 0 : _a.length) > 0 && - this._context._options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1) { - return false; - } - if (this._context._options.restrictions.minDate && - targetDate.isBefore(this._context._options.restrictions.minDate, granularity)) { - return false; - } - if (this._context._options.restrictions.maxDate && - targetDate.isAfter(this._context._options.restrictions.maxDate, granularity)) { + do(e, action) { + var _a, _b; + const currentTarget = e === null || e === void 0 ? void 0 : e.currentTarget; + if ((_a = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.classList) === null || _a === void 0 ? void 0 : _a.contains(Namespace.css.disabled)) return false; - } - if (granularity === Unit.hours || - granularity === Unit.minutes || - granularity === Unit.seconds) { - if (this._context._options.restrictions.disabledHours.length > 0 && - this._isInDisabledHours(targetDate)) { - return false; - } - if (this._context._options.restrictions.enabledHours.length > 0 && - !this._isInEnabledHours(targetDate)) { - return false; - } - if (this._context._options.restrictions.disabledTimeIntervals.length > 0) { - for (let i = 0; i < this._context._options.restrictions.disabledTimeIntervals.length; i++) { - if (targetDate.isBetween(this._context._options.restrictions.disabledTimeIntervals[i].from, this._context._options.restrictions.disabledTimeIntervals[i].to)) - return false; + action = action || ((_b = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.dataset) === null || _b === void 0 ? void 0 : _b.action); + const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate) + .clone; + switch (action) { + case ActionTypes$1.next: + case ActionTypes$1.previous: + this.handleNextPrevious(action); + break; + case ActionTypes$1.changeCalendarView: + this.display._showMode(1); + this.display._updateCalendarHeader(); + break; + case ActionTypes$1.selectMonth: + case ActionTypes$1.selectYear: + case ActionTypes$1.selectDecade: + const value = +currentTarget.dataset.value; + switch (action) { + case ActionTypes$1.selectMonth: + this.optionsStore.viewDate.month = value; + break; + case ActionTypes$1.selectYear: + case ActionTypes$1.selectDecade: + this.optionsStore.viewDate.year = value; + break; } - } + if (this.optionsStore.currentCalendarViewMode === + this.optionsStore.minimumCalendarViewMode) { + this.dates.setValue(this.optionsStore.viewDate, this.dates.lastPickedIndex); + if (!this.optionsStore.options.display.inline) { + this.display.hide(); + } + } + else { + this.display._showMode(-1); + } + break; + case ActionTypes$1.selectDay: + const day = this.optionsStore.viewDate.clone; + if (currentTarget.classList.contains(Namespace.css.old)) { + day.manipulate(-1, Unit.month); + } + if (currentTarget.classList.contains(Namespace.css.new)) { + day.manipulate(1, Unit.month); + } + day.date = +currentTarget.dataset.day; + let index = 0; + if (this.optionsStore.options.multipleDates) { + index = this.dates.pickedIndex(day, Unit.date); + if (index !== -1) { + this.dates.setValue(null, index); //deselect multi-date + } + else { + this.dates.setValue(day, this.dates.lastPickedIndex + 1); + } + } + else { + this.dates.setValue(day, this.dates.lastPickedIndex); + } + if (!this.display._hasTime && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline && + !this.optionsStore.options.multipleDates) { + this.display.hide(); + } + break; + case ActionTypes$1.selectHour: + let hour = +currentTarget.dataset.value; + if (lastPicked.hours >= 12 && + !this.optionsStore.options.display.components.useTwentyfourHour) + hour += 12; + lastPicked.hours = hour; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.selectMinute: + lastPicked.minutes = +currentTarget.dataset.value; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.selectSecond: + lastPicked.seconds = +currentTarget.dataset.value; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.incrementHours: + this.manipulateAndSet(lastPicked, Unit.hours); + break; + case ActionTypes$1.incrementMinutes: + this.manipulateAndSet(lastPicked, Unit.minutes, this.optionsStore.options.stepping); + break; + case ActionTypes$1.incrementSeconds: + this.manipulateAndSet(lastPicked, Unit.seconds); + break; + case ActionTypes$1.decrementHours: + this.manipulateAndSet(lastPicked, Unit.hours, -1); + break; + case ActionTypes$1.decrementMinutes: + this.manipulateAndSet(lastPicked, Unit.minutes, this.optionsStore.options.stepping * -1); + break; + case ActionTypes$1.decrementSeconds: + this.manipulateAndSet(lastPicked, Unit.seconds, -1); + break; + case ActionTypes$1.toggleMeridiem: + this.manipulateAndSet(lastPicked, Unit.hours, this.dates.lastPicked.hours >= 12 ? -12 : 12); + break; + case ActionTypes$1.togglePicker: + if (currentTarget.getAttribute('title') === + this.optionsStore.options.localization.selectDate) { + currentTarget.setAttribute('title', this.optionsStore.options.localization.selectTime); + currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML; + this.display._updateCalendarHeader(); + this.optionsStore.refreshCurrentView(); + } + else { + currentTarget.setAttribute('title', this.optionsStore.options.localization.selectDate); + currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML; + if (this.display._hasTime) { + this.do(e, ActionTypes$1.showClock); + this.display._update('clock'); + } + } + this.display.widget + .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) + .forEach((htmlElement) => Collapse.toggle(htmlElement)); + this._eventEmitters.viewUpdate.emit(); + break; + case ActionTypes$1.showClock: + case ActionTypes$1.showHours: + case ActionTypes$1.showMinutes: + case ActionTypes$1.showSeconds: + this.optionsStore.currentView = 'clock'; + this.display.widget + .querySelectorAll(`.${Namespace.css.timeContainer} > div`) + .forEach((htmlElement) => (htmlElement.style.display = 'none')); + let classToUse = ''; + switch (action) { + case ActionTypes$1.showClock: + classToUse = Namespace.css.clockContainer; + this.display._update('clock'); + break; + case ActionTypes$1.showHours: + classToUse = Namespace.css.hourContainer; + this.display._update(Unit.hours); + break; + case ActionTypes$1.showMinutes: + classToUse = Namespace.css.minuteContainer; + this.display._update(Unit.minutes); + break; + case ActionTypes$1.showSeconds: + classToUse = Namespace.css.secondContainer; + this.display._update(Unit.seconds); + break; + } + (this.display.widget.getElementsByClassName(classToUse)[0]).style.display = 'grid'; + break; + case ActionTypes$1.clear: + this.dates.setValue(null); + this.display._updateCalendarHeader(); + break; + case ActionTypes$1.close: + this.display.hide(); + break; + case ActionTypes$1.today: + const today = new DateTime().setLocale(this.optionsStore.options.localization.locale); + this.optionsStore.viewDate = today; + if (this.validation.isValid(today, Unit.date)) + this.dates.setValue(today, this.dates.lastPickedIndex); + break; } - return true; - } - /** - * Checks to see if the disabledDates option is in use and returns true (meaning invalid) - * if the `testDate` is with in the array. Granularity is by date. - * @param testDate - * @private - */ - _isInDisabledDates(testDate) { - if (!this._context._options.restrictions.disabledDates || - this._context._options.restrictions.disabledDates.length === 0) - return false; - const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date)); - return this._context._options.restrictions.disabledDates - .map((x) => x.format(Dates.getFormatByUnit(Unit.date))) - .find((x) => x === formattedDate); } - /** - * Checks to see if the enabledDates option is in use and returns true (meaning valid) - * if the `testDate` is with in the array. Granularity is by date. - * @param testDate - * @private - */ - _isInEnabledDates(testDate) { - if (!this._context._options.restrictions.enabledDates || - this._context._options.restrictions.enabledDates.length === 0) - return true; - const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date)); - return this._context._options.restrictions.enabledDates - .map((x) => x.format(Dates.getFormatByUnit(Unit.date))) - .find((x) => x === formattedDate); + handleNextPrevious(action) { + const { unit, step } = CalendarModes[this.optionsStore.currentCalendarViewMode]; + if (action === ActionTypes$1.next) + this.optionsStore.viewDate.manipulate(step, unit); + else + this.optionsStore.viewDate.manipulate(step * -1, unit); + this._eventEmitters.viewUpdate.emit(); + this.display._showMode(); } /** - * Checks to see if the disabledHours option is in use and returns true (meaning invalid) - * if the `testDate` is with in the array. Granularity is by hours. - * @param testDate - * @private + * After setting the value it will either show the clock or hide the widget. + * @param e */ - _isInDisabledHours(testDate) { - if (!this._context._options.restrictions.disabledHours || - this._context._options.restrictions.disabledHours.length === 0) - return false; - const formattedDate = testDate.hours; - return this._context._options.restrictions.disabledHours.find((x) => x === formattedDate); + hideOrClock(e) { + if (this.optionsStore.options.display.components.useTwentyfourHour && + !this.optionsStore.options.display.components.minutes && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline) { + this.display.hide(); + } + else { + this.do(e, ActionTypes$1.showClock); + } } /** - * Checks to see if the enabledHours option is in use and returns true (meaning valid) - * if the `testDate` is with in the array. Granularity is by hours. - * @param testDate - * @private + * Common function to manipulate {@link lastPicked} by `unit`. + * @param lastPicked + * @param unit + * @param value Value to change by */ - _isInEnabledHours(testDate) { - if (!this._context._options.restrictions.enabledHours || - this._context._options.restrictions.enabledHours.length === 0) - return true; - const formattedDate = testDate.hours; - return this._context._options.restrictions.enabledHours.find((x) => x === formattedDate); + manipulateAndSet(lastPicked, unit, value = 1) { + const newDate = lastPicked.manipulate(value, unit); + if (this.validation.isValid(newDate, unit)) { + this.dates.setValue(newDate, this.dates.lastPickedIndex); + } } } @@ -3051,12 +3217,8 @@ class Validation { */ class TempusDominus { constructor(element, options = {}) { - this._currentViewMode = 0; this._subscribers = {}; - this._minViewModeNumber = 0; this._isDisabled = false; - this._notifyChangeEventContext = 0; - this._viewDate = new DateTime(); /** * Event for when the input field changes. This is a class level method so there's * something for the remove listener function. @@ -3065,19 +3227,14 @@ class TempusDominus { this._inputChangeEvent = () => { const setViewDate = () => { if (this.dates.lastPicked) - this._viewDate = this.dates.lastPicked; + this.optionsStore.viewDate = this.dates.lastPicked; }; - const value = this._input.value; - if (this._options.multipleDates) { + const value = this.optionsStore.input.value; + if (this.optionsStore.options.multipleDates) { try { - const valueSplit = value.split(this._options.multipleDatesSeparator); + const valueSplit = value.split(this.optionsStore.options.multipleDatesSeparator); for (let i = 0; i < valueSplit.length; i++) { - if (this._options.hooks.inputParse) { - this.dates.set(this._options.hooks.inputParse(this, valueSplit[i]), i, 'input'); - } - else { - this.dates.set(valueSplit[i], i, 'input'); - } + this.dates.setFromInput(valueSplit[i], i); } setViewDate(); } @@ -3086,12 +3243,7 @@ class TempusDominus { } } else { - if (this._options.hooks.inputParse) { - this.dates.set(this._options.hooks.inputParse(this, value), 0, 'input'); - } - else { - this.dates.set(value, 0, 'input'); - } + this.dates.setFromInput(value, 0); setViewDate(); } }; @@ -3103,24 +3255,32 @@ class TempusDominus { this._toggleClickEvent = () => { this.toggle(); }; + setupServiceLocator(); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this.optionsStore = serviceLocator.locate(OptionsStore); + this.display = serviceLocator.locate(Display); + this.dates = serviceLocator.locate(Dates); + this.actions = serviceLocator.locate(Actions); if (!element) { - Namespace.errorMessages.mustProvideElement; - } - this._element = element; - this._options = this._initializeOptions(options, DefaultOptions, true); - this._viewDate.setLocale(this._options.localization.locale); - this._unset = true; - this._display = new Display(this); - this._validation = new Validation(this); - this.dates = new Dates(this); - this._action = new Actions(this); + Namespace.errorMessages.mustProvideElement(); + } + this.optionsStore.element = element; + this._initializeOptions(options, DefaultOptions, true); + this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale); + this.optionsStore.unset = true; this._initializeInput(); this._initializeToggle(); - if (this._options.display.inline) - this._display.show(); + if (this.optionsStore.options.display.inline) + this.display.show(); + this._eventEmitters.triggerEvent.subscribe((e) => { + this._triggerEvent(e); + }); + this._eventEmitters.viewUpdate.subscribe(() => { + this._viewUpdate(); + }); } get viewDate() { - return this._viewDate; + return this.optionsStore.viewDate; } // noinspection JSUnusedGlobalSymbols /** @@ -3131,10 +3291,10 @@ class TempusDominus { */ updateOptions(options, reset = false) { if (reset) - this._options = this._initializeOptions(options, DefaultOptions); + this._initializeOptions(options, DefaultOptions); else - this._options = this._initializeOptions(options, this._options); - this._display._rebuild(); + this._initializeOptions(options, this.optionsStore.options); + this.display._rebuild(); } // noinspection JSUnusedGlobalSymbols /** @@ -3144,7 +3304,7 @@ class TempusDominus { toggle() { if (this._isDisabled) return; - this._display.toggle(); + this.display.toggle(); } // noinspection JSUnusedGlobalSymbols /** @@ -3154,7 +3314,7 @@ class TempusDominus { show() { if (this._isDisabled) return; - this._display.show(); + this.display.show(); } // noinspection JSUnusedGlobalSymbols /** @@ -3162,7 +3322,7 @@ class TempusDominus { * @public */ hide() { - this._display.hide(); + this.display.hide(); } // noinspection JSUnusedGlobalSymbols /** @@ -3174,8 +3334,8 @@ class TempusDominus { this._isDisabled = true; // todo this might be undesired. If a dev disables the input field to // only allow using the picker, this will break that. - (_a = this._input) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled'); - this._display.hide(); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled'); + this.display.hide(); } // noinspection JSUnusedGlobalSymbols /** @@ -3185,7 +3345,7 @@ class TempusDominus { enable() { var _a; this._isDisabled = false; - (_a = this._input) === null || _a === void 0 ? void 0 : _a.removeAttribute('disabled'); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeAttribute('disabled'); } // noinspection JSUnusedGlobalSymbols /** @@ -3214,7 +3374,7 @@ class TempusDominus { callBackArray = callbacks; } if (eventTypes.length !== callBackArray.length) { - Namespace.errorMessages.subscribeMismatch; + Namespace.errorMessages.subscribeMismatch(); } const returnArray = []; for (let i = 0; i < eventTypes.length; i++) { @@ -3237,17 +3397,30 @@ class TempusDominus { * Hides the picker and removes event listeners */ dispose() { - var _a, _b; - this._display.hide(); + var _a, _b, _c; + this.display.hide(); // this will clear the document click event listener - this._display._dispose(); - (_a = this._input) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this._inputChangeEvent); - if (this._options.allowInputToggle) { - (_b = this._input) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this._toggleClickEvent); + this.display._dispose(); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this._inputChangeEvent); + if (this.optionsStore.options.allowInputToggle) { + (_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this._toggleClickEvent); } - this._toggle.removeEventListener('click', this._toggleClickEvent); + (_c = this._toggle) === null || _c === void 0 ? void 0 : _c.removeEventListener('click', this._toggleClickEvent); this._subscribers = {}; } + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language) { + let asked = loadedLocales[language]; + if (!asked) + return; + this.updateOptions({ + localization: asked, + }); + } /** * Triggers an event like ChangeEvent when the picker has updated the value * of a selected date. @@ -3255,49 +3428,49 @@ class TempusDominus { * @private */ _triggerEvent(event) { - // checking hasOwnProperty because the BasicEvent also falls through here otherwise - if (event && event.hasOwnProperty('date')) { + var _a; + event.viewMode = this.optionsStore.currentView; + const isChangeEvent = event.type === Namespace.events.change; + if (isChangeEvent) { const { date, oldDate, isClear } = event; - // this was to prevent a max call stack error - // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb - // todo see if this is still needed or if there's a cleaner way - this._notifyChangeEventContext++; if ((date && oldDate && date.isSame(oldDate)) || - (!isClear && !date && !oldDate) || - this._notifyChangeEventContext > 1) { - this._notifyChangeEventContext = 0; + (!isClear && !date && !oldDate)) { return; } this._handleAfterChangeEvent(event); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent(event.type, { detail: event })); } - this._element.dispatchEvent(new CustomEvent(event.type, { detail: event })); + this.optionsStore.element.dispatchEvent(new CustomEvent(event.type, { detail: event })); if (window.jQuery) { const $ = window.jQuery; - $(this._element).trigger(event); - } - const publish = () => { - // return if event is not subscribed - if (!Array.isArray(this._subscribers[event.type])) { - return; + if (isChangeEvent && this.optionsStore.input) { + $(this.optionsStore.input).trigger(event); } - // Trigger callback for each subscriber - this._subscribers[event.type].forEach((callback) => { - callback(event); - }); - }; - publish(); - this._notifyChangeEventContext = 0; + else { + $(this.optionsStore.element).trigger(event); + } + } + this._publish(event); + } + _publish(event) { + // return if event is not subscribed + if (!Array.isArray(this._subscribers[event.type])) { + return; + } + // Trigger callback for each subscriber + this._subscribers[event.type].forEach((callback) => { + callback(event); + }); } /** * Fires a ViewUpdate event when, for example, the month view is changed. * @param {Unit} unit * @private */ - _viewUpdate(unit) { + _viewUpdate() { this._triggerEvent({ type: Namespace.events.update, - change: unit, - viewDate: this._viewDate.clone, + viewDate: this.optionsStore.viewDate.clone, }); } _unsubscribe(eventName, index) { @@ -3314,55 +3487,35 @@ class TempusDominus { var _a; config = OptionConverter._mergeOptions(config, mergeTo); if (includeDataset) - config = OptionConverter._dataToOptions(this._element, config); + config = OptionConverter._dataToOptions(this.optionsStore.element, config); OptionConverter._validateConflcits(config); config.viewDate = config.viewDate.setLocale(config.localization.locale); - if (!this._viewDate.isSame(config.viewDate)) { - this._viewDate = config.viewDate; + if (!this.optionsStore.viewDate.isSame(config.viewDate)) { + this.optionsStore.viewDate = config.viewDate; } /** * Sets the minimum view allowed by the picker. For example the case of only * allowing year and month to be selected but not date. */ if (config.display.components.year) { - this._minViewModeNumber = 2; + this.optionsStore.minimumCalendarViewMode = 2; } if (config.display.components.month) { - this._minViewModeNumber = 1; + this.optionsStore.minimumCalendarViewMode = 1; } if (config.display.components.date) { - this._minViewModeNumber = 0; + this.optionsStore.minimumCalendarViewMode = 0; } - this._currentViewMode = Math.max(this._minViewModeNumber, this._currentViewMode); + this.optionsStore.currentCalendarViewMode = Math.max(this.optionsStore.minimumCalendarViewMode, this.optionsStore.currentCalendarViewMode); // Update view mode if needed - if (DatePickerModes[this._currentViewMode].name !== config.display.viewMode) { - this._currentViewMode = Math.max(DatePickerModes.findIndex((x) => x.name === config.display.viewMode), this._minViewModeNumber); - } - // defaults the input format based on the components enabled - if (config.hooks.inputFormat === undefined) { - const components = config.display.components; - config.hooks.inputFormat = (_, date) => { - if (!date) - return ''; - return date.format({ - year: components.calendar && components.year ? 'numeric' : undefined, - month: components.calendar && components.month ? '2-digit' : undefined, - day: components.calendar && components.date ? '2-digit' : undefined, - hour: components.clock && components.hours - ? components.useTwentyfourHour - ? '2-digit' - : 'numeric' - : undefined, - minute: components.clock && components.minutes ? '2-digit' : undefined, - second: components.clock && components.seconds ? '2-digit' : undefined, - hour12: !components.useTwentyfourHour, - }); - }; + if (CalendarModes[this.optionsStore.currentCalendarViewMode].name !== + config.display.viewMode) { + this.optionsStore.currentCalendarViewMode = Math.max(CalendarModes.findIndex((x) => x.name === config.display.viewMode), this.optionsStore.minimumCalendarViewMode); } - if ((_a = this._display) === null || _a === void 0 ? void 0 : _a.isVisible) { - this._display._update('all'); + if ((_a = this.display) === null || _a === void 0 ? void 0 : _a.isVisible) { + this.display._update('all'); } - return config; + this.optionsStore.options = config; } /** * Checks if an input field is being used, attempts to locate one and sets an @@ -3370,25 +3523,27 @@ class TempusDominus { * @private */ _initializeInput() { - if (this._element.tagName == 'INPUT') { - this._input = this._element; + if (this.optionsStore.element.tagName == 'INPUT') { + this.optionsStore.input = this.optionsStore.element; } else { - let query = this._element.dataset.tdTargetInput; + let query = this.optionsStore.element.dataset.tdTargetInput; if (query == undefined || query == 'nearest') { - this._input = this._element.querySelector('input'); + this.optionsStore.input = + this.optionsStore.element.querySelector('input'); } else { - this._input = this._element.querySelector(query); + this.optionsStore.input = + this.optionsStore.element.querySelector(query); } } - if (!this._input) + if (!this.optionsStore.input) return; - this._input.addEventListener('change', this._inputChangeEvent); - if (this._options.allowInputToggle) { - this._input.addEventListener('click', this._toggleClickEvent); + this.optionsStore.input.addEventListener('change', this._inputChangeEvent); + if (this.optionsStore.options.allowInputToggle) { + this.optionsStore.input.addEventListener('click', this._toggleClickEvent); } - if (this._input.value) { + if (this.optionsStore.input.value) { this._inputChangeEvent(); } } @@ -3397,14 +3552,16 @@ class TempusDominus { * @private */ _initializeToggle() { - if (this._options.display.inline) + if (this.optionsStore.options.display.inline) return; - let query = this._element.dataset.tdTargetToggle; + let query = this.optionsStore.element.dataset.tdTargetToggle; if (query == 'nearest') { query = '[data-td-toggle="datetimepicker"]'; } this._toggle = - query == undefined ? this._element : this._element.querySelector(query); + query == undefined + ? this.optionsStore.element + : this.optionsStore.element.querySelector(query); this._toggle.addEventListener('click', this._toggleClickEvent); } /** @@ -3416,32 +3573,69 @@ class TempusDominus { var _a, _b; if ( // options is disabled - !this._options.promptTimeOnDateChange || - this._options.display.inline || - this._options.display.sideBySide || + !this.optionsStore.options.promptTimeOnDateChange || + this.optionsStore.options.display.inline || + this.optionsStore.options.display.sideBySide || // time is disabled - !this._display._hasTime || + !this.display._hasTime || ( // clock component is already showing - (_a = this._display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.css.show)[0].classList.contains(Namespace.css.timeContainer))) + (_a = this.display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.css.show)[0].classList.contains(Namespace.css.timeContainer))) return; // First time ever. If useCurrent option is set to true (default), do nothing // because the first date is selected automatically. // or date didn't change (time did) or date changed because time did. - if ((!e.oldDate && this._options.useCurrent) || + if ((!e.oldDate && this.optionsStore.options.useCurrent) || (e.oldDate && ((_b = e.date) === null || _b === void 0 ? void 0 : _b.isSame(e.oldDate)))) { return; } clearTimeout(this._currentPromptTimeTimeout); this._currentPromptTimeTimeout = setTimeout(() => { - if (this._display.widget) { - this._action.do({ - currentTarget: this._display.widget.querySelector(`.${Namespace.css.switch} div`), - }, ActionTypes.togglePicker); + if (this.display.widget) { + this._eventEmitters.action.emit({ + e: { + currentTarget: this.display.widget.querySelector(`.${Namespace.css.switch} div`), + }, + action: ActionTypes$1.togglePicker, + }); } - }, this._options.promptTimeOnDateChangeTransitionDelay); + }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay); } } +/** + * Whenever a locale is loaded via a plugin then store it here based on the + * locale name. E.g. loadedLocales['ru'] + */ +const loadedLocales = {}; +/** + * Called from a locale plugin. + * @param locale locale object for localization options + * @param name name of the language e.g 'ru', 'en-gb' + */ +const loadLocale = (locale) => { + if (loadedLocales[locale.name]) + return; + loadedLocales[locale.name] = locale.localization; +}; +/** + * A sets the global localization options to the provided locale name. + * `locadLocale` MUST be called first. + * @param locale + */ +const locale = (locale) => { + let asked = loadedLocales[locale]; + if (!asked) + return; + DefaultOptions.localization = asked; +}; +const extend = function (plugin, option) { + if (!plugin.$i) { + // install plugin only once + plugin.load(option, { TempusDominus, Dates, Display }, this); + plugin.$i = true; + } + return this; +}; -export { DateTime, DefaultOptions, Namespace, TempusDominus, Unit }; +export { DateTime, DefaultOptions, Namespace, TempusDominus, Unit, extend, loadLocale, locale }; //# sourceMappingURL=tempus-dominus.esm.js.map diff --git a/dist/js/tempus-dominus.esm.js.map b/dist/js/tempus-dominus.esm.js.map index 2e18eb36b..0a542cb5f 100644 --- a/dist/js/tempus-dominus.esm.js.map +++ b/dist/js/tempus-dominus.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"tempus-dominus.esm.js","sources":["../../src/js/datetime.ts","../../src/js/errors.ts","../../src/js/namespace.ts","../../src/js/conts.ts","../../src/js/display/collapse.ts","../../src/js/actions.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/options.ts","../../src/js/dates.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/index.ts","../../src/js/validation.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n numberingSystem?: string;\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n /**\n * Used with Intl.DateTimeFormat\n */\n locale = 'default';\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n */\n setLocale(value: string): this {\n this.locale = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n */\n static convert(date: Date, locale: string = 'default'): DateTime {\n if (!date) throw `A date is required`;\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ).setLocale(locale);\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocale(this.locale);\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n * @param startOfTheWeek Allows for the changing the start of the week.\n */\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(startOfTheWeek - this.weekDay, Unit.date);\n break;\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n */\n endOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(6 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.year);\n this.setDate(0);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n this[unit] += value;\n return this;\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An object. Uses browser defaults otherwise.\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(template: DateTimeFormatOptions, locale = this.locale): string {\n return new Intl.DateTimeFormat(locale, template).format(this);\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n if (unit && this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n return (\n ((leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit)) &&\n (rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit))) ||\n ((leftInclusivity\n ? this.isBefore(left, unit)\n : !this.isAfter(left, unit)) &&\n (rightInclusivity\n ? this.isAfter(right, unit)\n : !this.isBefore(right, unit)))\n );\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.locale,\n template: any = { dateStyle: 'full', timeStyle: 'long' }\n ): any {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit minutes\n */\n get minutesFormatted(): string {\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hours\n */\n get hoursFormatted(): string {\n let formatted = this.format({ hour: '2-digit', hour12: false });\n if (formatted === '24') formatted = '00';\n return formatted;\n }\n\n /**\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\n */\n get twelveHoursFormatted(): string {\n let hour = this.parts().hour;\n if (hour.length === 1) hour = `0${hour}`;\n return hour;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.locale): string {\n return new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true,\n } as any)\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n\n // borrowed a bunch of stuff from Luxon\n /**\n * Gets the week of the year\n */\n get week(): number {\n const ordinal = this.computeOrdinal(),\n weekday = this.getUTCDay();\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\n\n if (weekNumber < 1) {\n weekNumber = this.weeksInWeekYear( this.year - 1);\n } else if (weekNumber > this. weeksInWeekYear(this.year)) {\n weekNumber = 1;\n }\n\n return weekNumber;\n }\n\n weeksInWeekYear(weekYear) {\n const p1 =\n (weekYear +\n Math.floor(weekYear / 4) -\n Math.floor(weekYear / 100) +\n Math.floor(weekYear / 400)) %\n 7,\n last = weekYear - 1,\n p2 =\n (last +\n Math.floor(last / 4) -\n Math.floor(last / 100) +\n Math.floor(last / 400)) %\n 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n }\n\n get isLeapYear() {\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\n }\n\n private computeOrdinal() {\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\n }\n\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n}\n","import Namespace from './namespace';\n\nexport class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalide string or an invalid Date object.\n * @param optionName\n * @param date\n * @param soft If true, logs a warning instead of an error.\n */\n failedToParseDate(optionName: string, date: any, soft = false) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\n );\n error.code = 5;\n if (!soft) throw error;\n console.warn(error);\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\n );\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-alpha1',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n /**\n * Applied AM/PM toggle button.\n */\n toggleMeridiem = 'toggleMeridiem';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { DateTime, Unit } from './datetime';\r\nimport Namespace from './namespace';\r\nimport Options from './options';\r\n\r\nconst DefaultOptions: Options = {\r\n restrictions: {\r\n minDate: undefined,\r\n maxDate: undefined,\r\n disabledDates: [],\r\n enabledDates: [],\r\n daysOfWeekDisabled: [],\r\n disabledTimeIntervals: [],\r\n disabledHours: [],\r\n enabledHours: [],\r\n },\r\n display: {\r\n icons: {\r\n type: 'icons',\r\n time: 'fas fa-clock',\r\n date: 'fas fa-calendar',\r\n up: 'fas fa-arrow-up',\r\n down: 'fas fa-arrow-down',\r\n previous: 'fas fa-chevron-left',\r\n next: 'fas fa-chevron-right',\r\n today: 'fas fa-calendar-check',\r\n clear: 'fas fa-trash',\r\n close: 'fas fa-times',\r\n },\r\n sideBySide: false,\r\n calendarWeeks: false,\r\n viewMode: 'calendar',\r\n toolbarPlacement: 'bottom',\r\n keepOpen: false,\r\n buttons: {\r\n today: false,\r\n clear: false,\r\n close: false,\r\n },\r\n components: {\r\n calendar: true,\r\n date: true,\r\n month: true,\r\n year: true,\r\n decades: true,\r\n clock: true,\r\n hours: true,\r\n minutes: true,\r\n seconds: false,\r\n useTwentyfourHour: false,\r\n },\r\n inline: false,\r\n },\r\n stepping: 1,\r\n useCurrent: true,\r\n defaultDate: undefined,\r\n localization: {\r\n today: 'Go to today',\r\n clear: 'Clear selection',\r\n close: 'Close the picker',\r\n selectMonth: 'Select Month',\r\n previousMonth: 'Previous Month',\r\n nextMonth: 'Next Month',\r\n selectYear: 'Select Year',\r\n previousYear: 'Previous Year',\r\n nextYear: 'Next Year',\r\n selectDecade: 'Select Decade',\r\n previousDecade: 'Previous Decade',\r\n nextDecade: 'Next Decade',\r\n previousCentury: 'Previous Century',\r\n nextCentury: 'Next Century',\r\n pickHour: 'Pick Hour',\r\n incrementHour: 'Increment Hour',\r\n decrementHour: 'Decrement Hour',\r\n pickMinute: 'Pick Minute',\r\n incrementMinute: 'Increment Minute',\r\n decrementMinute: 'Decrement Minute',\r\n pickSecond: 'Pick Second',\r\n incrementSecond: 'Increment Second',\r\n decrementSecond: 'Decrement Second',\r\n toggleMeridiem: 'Toggle Meridiem',\r\n selectTime: 'Select Time',\r\n selectDate: 'Select Date',\r\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\r\n locale: 'default',\r\n startOfTheWeek: 0,\r\n },\r\n keepInvalid: false,\r\n debug: false,\r\n allowInputToggle: false,\r\n viewDate: new DateTime(),\r\n multipleDates: false,\r\n multipleDatesSeparator: '; ',\r\n promptTimeOnDateChange: false,\r\n promptTimeOnDateChangeTransitionDelay: 200,\r\n hooks: {\r\n inputParse: undefined,\r\n inputFormat: undefined,\r\n },\r\n meta: {},\r\n container: undefined\r\n};\r\n\r\nconst DatePickerModes: {\r\n name: string;\r\n className: string;\r\n unit: Unit;\r\n step: number;\r\n}[] = [\r\n {\r\n name: 'calendar',\r\n className: Namespace.css.daysContainer,\r\n unit: Unit.month,\r\n step: 1,\r\n },\r\n {\r\n name: 'months',\r\n className: Namespace.css.monthsContainer,\r\n unit: Unit.year,\r\n step: 1,\r\n },\r\n {\r\n name: 'years',\r\n className: Namespace.css.yearsContainer,\r\n unit: Unit.year,\r\n step: 10,\r\n },\r\n {\r\n name: 'decades',\r\n className: Namespace.css.decadesContainer,\r\n unit: Unit.year,\r\n step: 100,\r\n },\r\n];\r\n\r\nexport { DefaultOptions, DatePickerModes, Namespace };\r\n","import Namespace from '../namespace';\n\n/**\n * Provides a collapse functionality to the view changes\n */\nexport default class Collapse {\n /**\n * Flips the show/hide state of `target`\n * @param target html element to affect.\n */\n static toggle(target: HTMLElement) {\n if (target.classList.contains(Namespace.css.show)) {\n this.hide(target);\n } else {\n this.show(target);\n }\n }\n\n /**\n * If `target` is not already showing, then show after the animation.\n * @param target\n */\n static show(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\n target.style.height = '';\n timeOut = null;\n };\n\n target.style.height = '0';\n target.classList.remove(Namespace.css.collapse);\n target.classList.add(Namespace.css.collapsing);\n\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n target.style.height = `${target.scrollHeight}px`;\n }\n\n /**\n * If `target` is not already hidden, then hide after the animation.\n * @param target HTML Element\n */\n static hide(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n !target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse);\n timeOut = null;\n };\n\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\n\n const reflow = (element) => element.offsetHeight;\n\n reflow(target);\n\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\n target.classList.add(Namespace.css.collapsing);\n target.style.height = '';\n\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n }\n\n /**\n * Gets the transition duration from the `element` by getting css properties\n * `transition-duration` and `transition-delay`\n * @param element HTML Element\n */\n private static getTransitionDurationFromElement = (element: HTMLElement) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } =\n window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) +\n Number.parseFloat(transitionDelay)) *\n 1000\n );\n };\n}\n","import { DatePickerModes } from './conts.js';\nimport { DateTime, Unit } from './datetime';\nimport { TempusDominus } from './tempus-dominus';\nimport Collapse from './display/collapse';\nimport Namespace from './namespace';\n\n/**\n *\n */\nexport default class Actions {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e?.currentTarget;\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\n return false;\n action = action || currentTarget?.dataset?.action;\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * @param unit\n * @param value Value to change by\n */\n const manipulateAndSet = (unit: Unit, value = 1) => {\n const newDate = lastPicked.manipulate(value, unit);\n if (this._context._validation.isValid(newDate, unit)) {\n this._context.dates._setValue(\n newDate,\n this._context.dates.lastPickedIndex\n );\n }\n };\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * After setting the value it will either show the clock or hide the widget.\n * @param unit\n * @param value Value to change by\n */\n const hideOrClock = () => {\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.minutes &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n };\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n const { unit, step } = DatePickerModes[this._context._currentViewMode];\n if (action === ActionTypes.next)\n this._context._viewDate.manipulate(step, unit);\n else this._context._viewDate.manipulate(step * -1, unit);\n this._context._viewUpdate(unit);\n\n this._context._display._showMode();\n break;\n case ActionTypes.pickerSwitch:\n this._context._display._showMode(1);\n this._context._viewUpdate(\n DatePickerModes[this._context._currentViewMode].unit\n );\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.dataset.value;\n switch (action) {\n case ActionTypes.selectMonth:\n this._context._viewDate.month = value;\n this._context._viewUpdate(Unit.month);\n break;\n case ActionTypes.selectYear:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n case ActionTypes.selectDecade:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n }\n\n if (\n this._context._currentViewMode === this._context._minViewModeNumber\n ) {\n this._context.dates._setValue(\n this._context._viewDate,\n this._context.dates.lastPickedIndex\n );\n if (!this._context._options.display.inline) {\n this._context._display.hide();\n }\n } else {\n this._context._display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this._context._viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.dataset.day;\n let index = 0;\n if (this._context._options.multipleDates) {\n index = this._context.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this._context.dates._setValue(null, index); //deselect multi-date\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex + 1\n );\n }\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex\n );\n }\n\n if (\n !this._context._display._hasTime &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline &&\n !this._context._options.multipleDates\n ) {\n this._context._display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.dataset.value;\n if (\n lastPicked.hours >= 12 &&\n !this._context._options.display.components.useTwentyfourHour\n )\n hour += 12;\n lastPicked.hours = hour;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n hideOrClock();\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.dataset.value;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n hideOrClock();\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.dataset.value;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n hideOrClock();\n break;\n case ActionTypes.incrementHours:\n manipulateAndSet(Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping);\n break;\n case ActionTypes.incrementSeconds:\n manipulateAndSet(Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n manipulateAndSet(Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping * -1);\n break;\n case ActionTypes.decrementSeconds:\n manipulateAndSet(Unit.seconds, -1);\n break;\n case ActionTypes.toggleMeridiem:\n manipulateAndSet(\n Unit.hours,\n this._context.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n if (\n currentTarget.getAttribute('title') ===\n this._context._options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectTime\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.time\n ).outerHTML;\n\n this._context._display._updateCalendarHeader();\n } else {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectDate\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.date\n ).outerHTML;\n if (this._context._display._hasTime) {\n this.do(e, ActionTypes.showClock);\n this._context._display._update('clock');\n }\n }\n this._context._display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this._context._display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this._context._display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this._context._display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this._context._display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this._context._display._update(Unit.seconds);\n break;\n }\n\n ((\n this._context._display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this._context.dates._setValue(null);\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this._context._display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n this._context._viewDate = today;\n if (this._context._validation.isValid(today, Unit.date))\n this._context.dates._setValue(\n today,\n this._context.dates.lastPickedIndex\n );\n break;\n }\n }\n}\n\nexport enum ActionTypes {\n next = 'next',\n previous = 'previous',\n pickerSwitch = 'pickerSwitch',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n toggleMeridiem = 'toggleMeridiem',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this._context._viewDate.format(\n this._context._options.localization.dayViewHeaderFormat\n )\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay', this._context._options.localization.startOfTheWeek)\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement, index) => {\n if (\n this._context._options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.setAttribute('data-day', `${innerDate.date}`);\n containerClone.innerText = innerDate.format({ day: 'numeric' });\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this._context._viewDate.clone\n .startOf('weekDay', this._context._options.localization.startOfTheWeek)\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this._context._options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this._context._viewDate.format({ year: 'numeric' })\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { DateTime, DateTimeFormatOptions } from './datetime';\r\nimport Namespace from './namespace';\r\nimport { DefaultOptions } from './conts';\r\nimport { TempusDominus } from './tempus-dominus';\r\n\r\nexport default interface Options {\r\n restrictions?: {\r\n minDate?: DateTime;\r\n maxDate?: DateTime;\r\n enabledDates?: DateTime[];\r\n disabledDates?: DateTime[];\r\n enabledHours?: number[];\r\n disabledHours?: number[];\r\n disabledTimeIntervals?: { from: DateTime; to: DateTime }[];\r\n daysOfWeekDisabled?: number[];\r\n };\r\n display?: {\r\n toolbarPlacement?: 'top' | 'bottom';\r\n components?: {\r\n calendar?: boolean;\r\n date?: boolean;\r\n month?: boolean;\r\n year?: boolean;\r\n decades?: boolean;\r\n clock?: boolean;\r\n hours?: boolean;\r\n minutes?: boolean;\r\n seconds?: boolean;\r\n useTwentyfourHour?: boolean;\r\n };\r\n buttons?: { today?: boolean; close?: boolean; clear?: boolean };\r\n calendarWeeks?: boolean;\r\n icons?: {\r\n date?: string;\r\n next?: string;\r\n previous?: string;\r\n today?: string;\r\n clear?: string;\r\n time?: string;\r\n up?: string;\r\n type?: 'icons' | 'sprites';\r\n down?: string;\r\n close?: string;\r\n };\r\n viewMode?: 'clock' | 'calendar' | 'months' | 'years' | 'decades';\r\n sideBySide?: boolean;\r\n inline?: boolean;\r\n keepOpen?: boolean;\r\n };\r\n stepping?: number;\r\n useCurrent?: boolean;\r\n defaultDate?: DateTime;\r\n localization?: {\r\n nextMonth?: string;\r\n pickHour?: string;\r\n incrementSecond?: string;\r\n nextDecade?: string;\r\n selectDecade?: string;\r\n dayViewHeaderFormat?: DateTimeFormatOptions;\r\n decrementHour?: string;\r\n selectDate?: string;\r\n incrementHour?: string;\r\n previousCentury?: string;\r\n decrementSecond?: string;\r\n today?: string;\r\n previousMonth?: string;\r\n selectYear?: string;\r\n pickSecond?: string;\r\n nextCentury?: string;\r\n close?: string;\r\n incrementMinute?: string;\r\n selectTime?: string;\r\n clear?: string;\r\n toggleMeridiem?: string;\r\n selectMonth?: string;\r\n decrementMinute?: string;\r\n pickMinute?: string;\r\n nextYear?: string;\r\n previousYear?: string;\r\n previousDecade?: string;\r\n locale?: string;\r\n startOfTheWeek?: number;\r\n };\r\n keepInvalid?: boolean;\r\n debug?: boolean;\r\n allowInputToggle?: boolean;\r\n viewDate?: DateTime;\r\n multipleDates?: boolean;\r\n multipleDatesSeparator?: string;\r\n promptTimeOnDateChange?: boolean;\r\n promptTimeOnDateChangeTransitionDelay?: number;\r\n hooks?: {\r\n inputParse?: (context: TempusDominus, value: any) => DateTime;\r\n inputFormat?: (context: TempusDominus, date: DateTime) => string;\r\n };\r\n meta?: {};\r\n container?: HTMLElement;\r\n}\r\n\r\nexport class OptionConverter {\r\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\r\n const newOptions = {} as Options;\r\n let path = '';\r\n const ignoreProperties = [\r\n 'inputParse',\r\n 'inputFormat',\r\n 'meta',\r\n 'dayViewHeaderFormat',\r\n 'container'\r\n ];\r\n\r\n //see if the options specify a locale\r\n const locale =\r\n mergeTo.localization.locale !== 'default' ? mergeTo.localization.locale :\r\n providedOptions?.localization?.locale || 'default';\r\n\r\n const processKey = (key, value, providedType, defaultType) => {\r\n switch (key) {\r\n case 'defaultDate': {\r\n const dateTime = this._dateConversion(value, 'defaultDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'defaultDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'viewDate': {\r\n const dateTime = this._dateConversion(value, 'viewDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'viewDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'minDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this._dateConversion(value, 'restrictions.minDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.minDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'maxDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this._dateConversion(value, 'restrictions.maxDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.maxDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'disabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.disabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.disabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'enabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.enabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.enabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'daysOfWeekDisabled':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.daysOfWeekDisabled',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 6).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.daysOfWeekDisabled',\r\n 0,\r\n 6\r\n );\r\n return value;\r\n case 'enabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.enabledDates',\r\n value,\r\n providedType,\r\n locale\r\n );\r\n return value;\r\n case 'disabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.disabledDates',\r\n value,\r\n providedType,\r\n locale\r\n );\r\n return value;\r\n case 'disabledTimeIntervals':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n key,\r\n providedType,\r\n 'array of { from: DateTime|Date, to: DateTime|Date }'\r\n );\r\n }\r\n const valueObject = value as { from: any; to: any }[];\r\n for (let i = 0; i < valueObject.length; i++) {\r\n Object.keys(valueObject[i]).forEach((vk) => {\r\n const subOptionName = `${key}[${i}].${vk}`;\r\n let d = valueObject[i][vk];\r\n const dateTime = this._dateConversion(d, subOptionName);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n subOptionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(locale);\r\n valueObject[i][vk] = dateTime;\r\n });\r\n }\r\n return valueObject;\r\n case 'toolbarPlacement':\r\n case 'type':\r\n case 'viewMode':\r\n const optionValues = {\r\n toolbarPlacement: ['top', 'bottom', 'default'],\r\n type: ['icons', 'sprites'],\r\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\r\n };\r\n const keyOptions = optionValues[key];\r\n if (!keyOptions.includes(value))\r\n Namespace.errorMessages.unexpectedOptionValue(\r\n path.substring(1),\r\n value,\r\n keyOptions\r\n );\r\n\r\n return value;\r\n case 'inputParse':\r\n case 'inputFormat':\r\n case 'meta':\r\n case 'dayViewHeaderFormat':\r\n return value;\r\n case 'container':\r\n if (value && !(value instanceof HTMLElement || value instanceof Element || value?.appendChild)) {\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n typeof value,\r\n 'HTMLElement'\r\n );\r\n }\r\n return value;\r\n default:\r\n switch (defaultType) {\r\n case 'boolean':\r\n return value === 'true' || value === true;\r\n case 'number':\r\n return +value;\r\n case 'string':\r\n return value.toString();\r\n case 'object':\r\n return {};\r\n case 'function':\r\n return value;\r\n default:\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n providedType,\r\n defaultType\r\n );\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * The spread operator caused sub keys to be missing after merging.\r\n * This is to fix that issue by using spread on the child objects first.\r\n * Also handles complex options like disabledDates\r\n * @param provided An option from new providedOptions\r\n * @param mergeOption Default option to compare types against\r\n * @param copyTo Destination object. This was add to prevent reference copies\r\n */\r\n const spread = (provided, mergeOption, copyTo) => {\r\n const unsupportedOptions = Object.keys(provided).filter(\r\n (x) => !Object.keys(mergeOption).includes(x)\r\n );\r\n if (unsupportedOptions.length > 0) {\r\n const flattenedOptions = OptionConverter._flattenDefaultOptions;\r\n\r\n const errors = unsupportedOptions.map((x) => {\r\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\r\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\r\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\r\n return error;\r\n });\r\n Namespace.errorMessages.unexpectedOptions(errors);\r\n }\r\n Object.keys(mergeOption).forEach((key) => {\r\n const defaultOptionValue = mergeOption[key];\r\n let providedType = typeof provided[key];\r\n let defaultType = typeof defaultOptionValue;\r\n let value = provided[key];\r\n if (!provided.hasOwnProperty(key)) {\r\n if (\r\n defaultType === 'undefined' ||\r\n (value?.length === 0 && Array.isArray(defaultOptionValue))\r\n ) {\r\n copyTo[key] = defaultOptionValue;\r\n return;\r\n }\r\n provided[key] = defaultOptionValue;\r\n value = provided[key];\r\n }\r\n path += `.${key}`;\r\n copyTo[key] = processKey(key, value, providedType, defaultType);\r\n\r\n if (\r\n typeof defaultOptionValue !== 'object' ||\r\n ignoreProperties.includes(key)\r\n ) {\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n return;\r\n }\r\n if (!Array.isArray(provided[key])) {\r\n spread(provided[key], defaultOptionValue, copyTo[key]);\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n }\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n });\r\n };\r\n spread(providedOptions, mergeTo, newOptions);\r\n\r\n return newOptions;\r\n }\r\n\r\n static _dataToOptions(element, options: Options): Options {\r\n const eData = element.dataset;\r\n\r\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\r\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\r\n\r\n if (\r\n !eData ||\r\n Object.keys(eData).length === 0 ||\r\n eData.constructor !== DOMStringMap\r\n )\r\n return options;\r\n let dataOptions = {} as Options;\r\n\r\n // because dataset returns camelCase including the 'td' key the option\r\n // key won't align\r\n const objectToNormalized = (object) => {\r\n const lowered = {};\r\n Object.keys(object).forEach((x) => {\r\n lowered[x.toLowerCase()] = x;\r\n });\r\n\r\n return lowered;\r\n };\r\n\r\n const rabbitHole = (\r\n split: string[],\r\n index: number,\r\n optionSubgroup: {},\r\n value: any\r\n ) => {\r\n // first round = display { ... }\r\n const normalizedOptions = objectToNormalized(optionSubgroup);\r\n\r\n const keyOption = normalizedOptions[split[index].toLowerCase()];\r\n const internalObject = {};\r\n\r\n if (keyOption === undefined) return internalObject;\r\n\r\n // if this is another object, continue down the rabbit hole\r\n if (optionSubgroup[keyOption].constructor === Object) {\r\n index++;\r\n internalObject[keyOption] = rabbitHole(\r\n split,\r\n index,\r\n optionSubgroup[keyOption],\r\n value\r\n );\r\n } else {\r\n internalObject[keyOption] = value;\r\n }\r\n return internalObject;\r\n };\r\n const optionsLower = objectToNormalized(options);\r\n\r\n Object.keys(eData)\r\n .filter((x) => x.startsWith(Namespace.dataKey))\r\n .map((x) => x.substring(2))\r\n .forEach((key) => {\r\n let keyOption = optionsLower[key.toLowerCase()];\r\n\r\n // dataset merges dashes to camelCase... yay\r\n // i.e. key = display_components_seconds\r\n if (key.includes('_')) {\r\n // [display, components, seconds]\r\n const split = key.split('_');\r\n // display\r\n keyOption = optionsLower[split[0].toLowerCase()];\r\n if (\r\n keyOption !== undefined &&\r\n options[keyOption].constructor === Object\r\n ) {\r\n dataOptions[keyOption] = rabbitHole(\r\n split,\r\n 1,\r\n options[keyOption],\r\n eData[`td${key}`]\r\n );\r\n }\r\n }\r\n // or key = multipleDate\r\n else if (keyOption !== undefined) {\r\n dataOptions[keyOption] = eData[`td${key}`];\r\n }\r\n });\r\n\r\n return this._mergeOptions(dataOptions, options);\r\n }\r\n\r\n /**\r\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\r\n * @param d If a string will attempt creating a date from it.\r\n * @private\r\n */\r\n static _dateTypeCheck(d: any): DateTime | null {\r\n if (d.constructor.name === DateTime.name) return d;\r\n if (d.constructor.name === Date.name) {\r\n return DateTime.convert(d);\r\n }\r\n if (typeof d === typeof '') {\r\n const dateTime = new DateTime(d);\r\n if (JSON.stringify(dateTime) === 'null') {\r\n return null;\r\n }\r\n return dateTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of Date or DateTime\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckDateArray(\r\n optionName: string,\r\n value,\r\n providedType: string,\r\n locale: string = 'default'\r\n ) {\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of DateTime or Date'\r\n );\r\n }\r\n for (let i = 0; i < value.length; i++) {\r\n let d = value[i];\r\n const dateTime = this._dateConversion(d, optionName);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(locale);\r\n value[i] = dateTime;\r\n }\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of numbers\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckNumberArray(\r\n optionName: string,\r\n value,\r\n providedType: string\r\n ) {\r\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of numbers'\r\n );\r\n }\r\n return;\r\n }\r\n\r\n /**\r\n * Attempts to convert `d` to a DateTime object\r\n * @param d value to convert\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n */\r\n static _dateConversion(d: any, optionName: string) {\r\n if (typeof d === typeof '' && optionName !== 'input') {\r\n Namespace.errorMessages.dateString();\r\n }\r\n\r\n const converted = this._dateTypeCheck(d);\r\n\r\n if (!converted) {\r\n Namespace.errorMessages.failedToParseDate(\r\n optionName,\r\n d,\r\n optionName === 'input'\r\n );\r\n }\r\n return converted;\r\n }\r\n\r\n private static _flatback: string[];\r\n\r\n private static get _flattenDefaultOptions(): string[] {\r\n if (this._flatback) return this._flatback;\r\n const deepKeys = (t, pre = []) =>\r\n Array.isArray(t)\r\n ? []\r\n : Object(t) === t\r\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\r\n : pre.join('.');\r\n\r\n this._flatback = deepKeys(DefaultOptions);\r\n\r\n return this._flatback;\r\n }\r\n\r\n /**\r\n * Some options conflict like min/max date. Verify that these kinds of options\r\n * are set correctly.\r\n * @param config\r\n */\r\n static _validateConflcits(config: Options) {\r\n if (config.display.sideBySide && (!config.display.components.clock ||\r\n !(config.display.components.hours ||\r\n config.display.components.minutes ||\r\n config.display.components.seconds)\r\n )) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'Cannot use side by side mode without the clock components'\r\n );\r\n }\r\n\r\n\r\n if (config.restrictions.minDate && config.restrictions.maxDate) {\r\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'minDate is after maxDate'\r\n );\r\n }\r\n\r\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'maxDate is before minDate'\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { TempusDominus } from './tempus-dominus';\r\nimport { DateTime, Unit } from './datetime';\r\nimport Namespace from './namespace';\r\nimport { ChangeEvent, FailEvent } from './event-types';\r\nimport { OptionConverter } from './options';\r\n\r\nexport default class Dates {\r\n private _dates: DateTime[] = [];\r\n private _context: TempusDominus;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n }\r\n\r\n /**\r\n * Returns the array of selected dates\r\n */\r\n get picked(): DateTime[] {\r\n return this._dates;\r\n }\r\n\r\n /**\r\n * Returns the last picked value.\r\n */\r\n get lastPicked(): DateTime {\r\n return this._dates[this.lastPickedIndex];\r\n }\r\n\r\n /**\r\n * Returns the length of picked dates -1 or 0 if none are selected.\r\n */\r\n get lastPickedIndex(): number {\r\n if (this._dates.length === 0) return 0;\r\n return this._dates.length - 1;\r\n }\r\n\r\n /**\r\n * Adds a new DateTime to selected dates array\r\n * @param date\r\n */\r\n add(date: DateTime): void {\r\n this._dates.push(date);\r\n }\r\n\r\n /**\r\n * Tries to convert the provided value to a DateTime object.\r\n * If value is null|undefined then clear the value of the provided index (or 0).\r\n * @param value Value to convert or null|undefined\r\n * @param index When using multidates this is the index in the array\r\n * @param from Used in the warning message, useful for debugging.\r\n */\r\n set(value: any, index?: number, from: string = 'date.set') {\r\n if (!value) this._setValue(value, index);\r\n const converted = OptionConverter._dateConversion(value, from);\r\n if (converted) {\r\n converted.setLocale(this._context._options.localization.locale);\r\n this._setValue(converted, index);\r\n }\r\n }\r\n\r\n /**\r\n * Returns true if the `targetDate` is part of the selected dates array.\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\r\n\r\n const format = Dates.getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return (\r\n this._dates\r\n .map((x) => x.format(format))\r\n .find((x) => x === innerDateFormatted) !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the index at which `targetDate` is in the array.\r\n * This is used for updating or removing a date when multi-date is used\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\r\n if (!unit) return this._dates.indexOf(targetDate);\r\n\r\n const format = Dates.getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\r\n }\r\n\r\n /**\r\n * Clears all selected dates.\r\n */\r\n clear() {\r\n this._context._unset = true;\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate: this.lastPicked,\r\n isClear: true,\r\n isValid: true,\r\n } as ChangeEvent);\r\n this._dates = [];\r\n }\r\n\r\n /**\r\n * Find the \"book end\" years given a `year` and a `factor`\r\n * @param factor e.g. 100 for decades\r\n * @param year e.g. 2021\r\n */\r\n static getStartEndYear(\r\n factor: number,\r\n year: number\r\n ): [number, number, number] {\r\n const step = factor / 10,\r\n startYear = Math.floor(year / factor) * factor,\r\n endYear = startYear + step * 9,\r\n focusValue = Math.floor(year / step) * step;\r\n return [startYear, endYear, focusValue];\r\n }\r\n\r\n /**\r\n * Do not use direectly. Attempts to either clear or set the `target` date at `index`.\r\n * If the `target` is null then the date will be cleared.\r\n * If multi-date is being used then it will be removed from the array.\r\n * If `target` is valid and multi-date is used then if `index` is\r\n * provided the date at that index will be replaced, otherwise it is appended.\r\n * @param target\r\n * @param index\r\n */\r\n _setValue(target?: DateTime, index?: number): void {\r\n const noIndex = typeof index === 'undefined',\r\n isClear = !target && noIndex;\r\n let oldDate = this._context._unset ? null : this._dates[index];\r\n if (!oldDate && !this._context._unset && noIndex && isClear) {\r\n oldDate = this.lastPicked;\r\n }\r\n\r\n const updateInput = () => {\r\n if (!this._context._input) return;\r\n\r\n let newValue = this._context._options.hooks.inputFormat(\r\n this._context,\r\n target\r\n );\r\n if (this._context._options.multipleDates) {\r\n newValue = this._dates\r\n .map((d) =>\r\n this._context._options.hooks.inputFormat(this._context, d)\r\n )\r\n .join(this._context._options.multipleDatesSeparator);\r\n }\r\n if (this._context._input.value != newValue)\r\n this._context._input.value = newValue;\r\n };\r\n\r\n if (target && oldDate?.isSame(target)) {\r\n updateInput();\r\n return;\r\n }\r\n\r\n // case of calling setValue(null)\r\n if (!target) {\r\n if (\r\n !this._context._options.multipleDates ||\r\n this._dates.length === 1 ||\r\n isClear\r\n ) {\r\n this._context._unset = true;\r\n this._dates = [];\r\n } else {\r\n this._dates.splice(index, 1);\r\n }\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n\r\n updateInput();\r\n this._context._display._update('all');\r\n return;\r\n }\r\n\r\n index = index || 0;\r\n target = target.clone;\r\n\r\n // minute stepping is being used, force the minute to the closest value\r\n if (this._context._options.stepping !== 1) {\r\n target.minutes =\r\n Math.round(target.minutes / this._context._options.stepping) *\r\n this._context._options.stepping;\r\n target.seconds = 0;\r\n }\r\n\r\n if (this._context._validation.isValid(target)) {\r\n this._dates[index] = target;\r\n this._context._viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._context._unset = false;\r\n this._context._display._update('all');\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n return;\r\n }\r\n\r\n if (this._context._options.keepInvalid) {\r\n this._dates[index] = target;\r\n this._context._viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: false,\r\n } as ChangeEvent);\r\n }\r\n this._context._triggerEvent({\r\n type: Namespace.events.error,\r\n reason: Namespace.errorMessages.failedToSetInvalidDate,\r\n date: target,\r\n oldDate,\r\n } as FailEvent);\r\n }\r\n\r\n /**\r\n * Returns a format object based on the granularity of `unit`\r\n * @param unit\r\n */\r\n static getFormatByUnit(unit: Unit): object {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric',\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n }\r\n}\r\n","import { TempusDominus } from '../../tempus-dominus';\r\nimport { DateTime, Unit } from '../../datetime';\r\nimport { ActionTypes } from '../../actions';\r\nimport Namespace from '../../namespace';\r\nimport Dates from '../../dates';\r\n\r\n/**\r\n * Creates and updates the grid for `year`\r\n */\r\nexport default class YearDisplay {\r\n private _context: TempusDominus;\r\n private _startYear: DateTime;\r\n private _endYear: DateTime;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n get _picker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.yearsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectYear);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update() {\r\n const [start, end] = Dates.getStartEndYear(\r\n 10,\r\n this._context._viewDate.year\r\n );\r\n this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year);\r\n this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year);\r\n\r\n const container = this._context._display.widget.getElementsByClassName(\r\n Namespace.css.yearsContainer\r\n )[0];\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.yearsContainer,\r\n `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({ year: 'numeric' })}`\r\n );\r\n\r\n this._context._validation.isValid(this._startYear, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this._context._validation.isValid(this._endYear, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n let innerDate = this._context._viewDate.clone\r\n .startOf(Unit.year)\r\n .manipulate(-1, Unit.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n let classes = [];\r\n classes.push(Namespace.css.year);\r\n\r\n if (\r\n !this._context._unset &&\r\n this._context.dates.isPicked(innerDate, Unit.year)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this._context._validation.isValid(innerDate, Unit.year)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.year}`);\r\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\r\n\r\n innerDate.manipulate(1, Unit.year);\r\n });\r\n }\r\n}\r\n","import { TempusDominus } from '../../tempus-dominus';\r\nimport Dates from '../../dates';\r\nimport { DateTime, Unit } from '../../datetime';\r\nimport { ActionTypes } from '../../actions';\r\nimport Namespace from '../../namespace';\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class DecadeDisplay {\r\n private _context: TempusDominus;\r\n private _startDecade: DateTime;\r\n private _endDecade: DateTime;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n get _picker() {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.decadesContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectDecade);\r\n container.appendChild(div);\r\n }\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update() {\r\n const [start, end] = Dates.getStartEndYear(\r\n 100,\r\n this._context._viewDate.year\r\n );\r\n this._startDecade = this._context._viewDate.clone.startOf(Unit.year);\r\n this._startDecade.year = start;\r\n this._endDecade = this._context._viewDate.clone.startOf(Unit.year);\r\n this._endDecade.year = end;\r\n\r\n const container = this._context._display.widget.getElementsByClassName(\r\n Namespace.css.decadesContainer\r\n )[0];\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.decadesContainer,\r\n `${this._startDecade.format({ year: 'numeric' })}-${this._endDecade.format({ year: 'numeric' })}`\r\n );\r\n\r\n this._context._validation.isValid(this._startDecade, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this._context._validation.isValid(this._endDecade, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n const pickedYears = this._context.dates.picked.map((x) => x.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n if (index === 0) {\r\n containerClone.classList.add(Namespace.css.old);\r\n if (this._startDecade.year - 10 < 0) {\r\n containerClone.textContent = ' ';\r\n previous.classList.add(Namespace.css.disabled);\r\n containerClone.classList.add(Namespace.css.disabled);\r\n containerClone.setAttribute('data-value', ``);\r\n return;\r\n } else {\r\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: 'numeric' });\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${this._startDecade.year}`\r\n );\r\n return;\r\n }\r\n }\r\n\r\n let classes = [];\r\n classes.push(Namespace.css.decade);\r\n const startDecadeYear = this._startDecade.year;\r\n const endDecadeYear = this._startDecade.year + 9;\r\n\r\n if (\r\n !this._context._unset &&\r\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\r\n .length > 0\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${this._startDecade.year}`\r\n );\r\n containerClone.innerText = `${this._startDecade.format({ year: 'numeric' })}`;\r\n\r\n this._startDecade.manipulate(10, Unit.year);\r\n });\r\n }\r\n}\r\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _context: TempusDominus;\n private _gridColumns = '';\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid());\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(): void {\n if (!this._context._display._hasTime) return;\n const timesDiv = (\n this._context._display.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0]\n );\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this._context._options.display.components.hours) {\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this._context._options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this._context._options.display.components.minutes) {\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this._context._options.display.components.seconds) {\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.toggleMeridiem}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this._context._validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(): HTMLElement[] {\n this._gridColumns = '';\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = this._context._display._iconTag(\n this._context._options.display.icons.up\n ),\n downIcon = this._context._display._iconTag(\n this._context._options.display.icons.down\n );\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this._context._options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n this._gridColumns += 'a';\n }\n\n if (this._context._options.display.components.minutes) {\n this._gridColumns += ' a';\n if (this._context._options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.seconds) {\n this._gridColumns += ' a';\n if (this._context._options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n this._gridColumns += ' a';\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this._context._options.localization.toggleMeridiem\n );\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\n button.setAttribute('tabindex', '-1');\n button.classList.add(Namespace.css.toggleMeridiem);\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n this._gridColumns = this._gridColumns.trim();\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this._context._options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this._context._validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this._context._options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.hours);\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this._context._validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.minutesFormatted}`\n );\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.second);\n\n if (!this._context._validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport { DatePickerModes } from '../conts';\r\nimport { TempusDominus } from '../tempus-dominus';\r\nimport { ActionTypes } from '../actions';\r\nimport { createPopper } from '@popperjs/core';\r\nimport Namespace from '../namespace';\r\nimport { HideEvent } from '../event-types';\r\nimport Collapse from './collapse';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _context: TempusDominus;\r\n private _dateDisplay: DateDisplay;\r\n private _monthDisplay: MonthDisplay;\r\n private _yearDisplay: YearDisplay;\r\n private _decadeDisplay: DecadeDisplay;\r\n private _timeDisplay: TimeDisplay;\r\n private _widget: HTMLElement;\r\n private _hourDisplay: HourDisplay;\r\n private _minuteDisplay: MinuteDisplay;\r\n private _secondDisplay: SecondDisplay;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n this._dateDisplay = new DateDisplay(context);\r\n this._monthDisplay = new MonthDisplay(context);\r\n this._yearDisplay = new YearDisplay(context);\r\n this._decadeDisplay = new DecadeDisplay(context);\r\n this._timeDisplay = new TimeDisplay(context);\r\n this._hourDisplay = new HourDisplay(context);\r\n this._minuteDisplay = new MinuteDisplay(context);\r\n this._secondDisplay = new SecondDisplay(context);\r\n\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: Unit | 'clock' | 'calendar' | 'all'): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this._secondDisplay._update();\r\n break;\r\n case Unit.minutes:\r\n this._minuteDisplay._update();\r\n break;\r\n case Unit.hours:\r\n this._hourDisplay._update();\r\n break;\r\n case Unit.date:\r\n this._dateDisplay._update();\r\n break;\r\n case Unit.month:\r\n this._monthDisplay._update();\r\n break;\r\n case Unit.year:\r\n this._yearDisplay._update();\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this._timeDisplay._update();\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this._decadeDisplay._update();\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * @fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (\r\n this._context._options.useCurrent &&\r\n !this._context._options.defaultDate &&\r\n !this._context._input?.value\r\n ) {\r\n //todo in the td4 branch a pr changed this to allow granularity\r\n const date = new DateTime().setLocale(\r\n this._context._options.localization.locale\r\n );\r\n if (!this._context._options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (this._context._options.restrictions.maxDate?.isBefore(date)) {\r\n direction = -1;\r\n }\r\n while (!this._context._validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this._context.dates._setValue(date);\r\n }\r\n\r\n if (this._context._options.defaultDate) {\r\n this._context.dates._setValue(this._context._options.defaultDate);\r\n }\r\n\r\n this._buildWidget();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this._context._action.do(null, ActionTypes.showClock);\r\n }\r\n\r\n // otherwise return to the calendar view\r\n this._context._currentViewMode = this._context._minViewModeNumber;\r\n\r\n if (!onlyClock) {\r\n if (this._hasTime) {\r\n Collapse.hide(this._context._display.widget.querySelector(`div.${Namespace.css.timeContainer}`));\r\n }\r\n Collapse.show(this._context._display.widget.querySelector(`div.${Namespace.css.dateContainer}`));\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this._context._options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this._context._options?.container || document.body;\r\n container.appendChild(this.widget);\r\n\r\n this._popperInstance = createPopper(\r\n this._context._element,\r\n this.widget,\r\n {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start'\r\n }\r\n );\r\n } else {\r\n this._context._element.appendChild(this.widget);\r\n }\r\n\r\n if (this._context._options.display.viewMode == 'clock') {\r\n this._context._action.do(null, ActionTypes.showClock);\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._context._options.display.sideBySide) {\r\n this._timeDisplay._update();\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this._context._options.display.inline) {\r\n this._popperInstance.update();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._context._triggerEvent({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this._context._minViewModeNumber,\r\n Math.min(3, this._context._currentViewMode + direction)\r\n );\r\n if (this._context._currentViewMode == max) return;\r\n this._context._currentViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode = DatePickerModes[this._context._currentViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this._decadeDisplay._update();\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this._yearDisplay._update();\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this._monthDisplay._update();\r\n break;\r\n case Namespace.css.daysContainer:\r\n this._dateDisplay._update();\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this._context._display.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this._context._options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this._context._options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this._context._options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextMonth\r\n );\r\n switcher.innerText = this._context._viewDate.format(this._context._options.localization.dayViewHeaderFormat);\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * @fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._context._triggerEvent({\r\n type: Namespace.events.hide,\r\n date: this._context._unset\r\n ? null\r\n : this._context.dates.lastPicked\r\n ? this._context.dates.lastPicked.clone\r\n : void 0\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this._headTemplate,\r\n this._decadeDisplay._picker,\r\n this._yearDisplay._picker,\r\n this._monthDisplay._picker,\r\n this._dateDisplay._picker\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this._timeDisplay._picker);\r\n timeView.appendChild(this._hourDisplay._picker);\r\n timeView.appendChild(this._minuteDisplay._picker);\r\n timeView.appendChild(this._secondDisplay._picker);\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this._toolbar);\r\n\r\n if (this._context._options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this._context._options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this._context._options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this._context._options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this._context._options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this._context._options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this._context._options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this._context._options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this._context._options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this._context._options.display.components.clock &&\r\n (this._context._options.display.components.hours ||\r\n this._context._options.display.components.minutes ||\r\n this._context._options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this._context._options.display.components.calendar &&\r\n (this._context._options.display.components.year ||\r\n this._context._options.display.components.month ||\r\n this._context._options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n get _toolbar(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this._context._options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this._context._options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this._context._options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this._context._options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this._context._options.display.viewMode === 'clock') {\r\n title = this._context._options.localization.selectDate;\r\n icon = this._context._options.display.icons.date;\r\n } else {\r\n title = this._context._options.localization.selectTime;\r\n icon = this._context._options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this._context._options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this._context._options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this._context._options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this._context._options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this._context._options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this._context._options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n get _headTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this._context._options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.pickerSwitch);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(this._iconTag(this._context._options.display.icons.next));\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then an svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement {\r\n if (this._context._options.display.icons.type === 'sprites') {\r\n const svg = document.createElement('svg');\r\n svg.innerHTML = ``;\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this._context._options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this._context._element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._context._action.do(e);\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Dates from './dates';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provide to chek portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (\n this._context._options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n if (\n granularity !== Unit.month &&\n granularity !== Unit.year &&\n this._context._options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this._context._options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n ) {\n return false;\n }\n\n if (\n this._context._options.restrictions.minDate &&\n targetDate.isBefore(\n this._context._options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.maxDate &&\n targetDate.isAfter(\n this._context._options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (\n this._context._options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.disabledTimeIntervals.length > 0\n ) {\n for (\n let i = 0;\n i < this._context._options.restrictions.disabledTimeIntervals.length;\n i++\n ) {\n if (\n targetDate.isBetween(\n this._context._options.restrictions.disabledTimeIntervals[i].from,\n this._context._options.restrictions.disabledTimeIntervals[i].to\n )\n )\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledDates ||\n this._context._options.restrictions.disabledDates.length === 0\n )\n return false;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.disabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledDates ||\n this._context._options.restrictions.enabledDates.length === 0\n )\n return true;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.enabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledHours ||\n this._context._options.restrictions.disabledHours.length === 0\n )\n return false;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.disabledHours.find(\n (x) => x === formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledHours ||\n this._context._options.restrictions.enabledHours.length === 0\n )\n return true;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.enabledHours.find(\n (x) => x === formattedDate\n );\n }\n}\n","import Display from './display/index';\nimport Validation from './validation';\nimport Dates from './dates';\nimport Actions, { ActionTypes } from './actions';\nimport { DatePickerModes, DefaultOptions } from './conts';\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options, { OptionConverter } from './options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n FailEvent,\n} from './event-types';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n dates: Dates;\n\n _options: Options;\n _currentViewMode = 0;\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\n _element: HTMLElement;\n _input: HTMLInputElement;\n _unset: boolean;\n _minViewModeNumber = 0;\n _display: Display;\n _validation: Validation;\n _action: Actions;\n private _isDisabled = false;\n private _notifyChangeEventContext = 0;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: any;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n if (!element) {\n Namespace.errorMessages.mustProvideElement;\n }\n this._element = element;\n this._options = this._initializeOptions(options, DefaultOptions, true);\n this._viewDate.setLocale(this._options.localization.locale);\n this._unset = true;\n\n this._display = new Display(this);\n this._validation = new Validation(this);\n this.dates = new Dates(this);\n this._action = new Actions(this);\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this._options.display.inline) this._display.show();\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._options = this._initializeOptions(options, DefaultOptions);\n else this._options = this._initializeOptions(options, this._options);\n this._display._rebuild();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this._display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this._display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this._input?.setAttribute('disabled', 'disabled');\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this._input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => void | ((event: any) => void)[]\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray = [];\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.errorMessages.subscribeMismatch;\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this._display.hide();\n // this will clear the document click event listener\n this._display._dispose();\n this._input?.removeEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.removeEventListener('click', this._toggleClickEvent);\n }\n this._toggle.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n _triggerEvent(event: BaseEvent) {\n // checking hasOwnProperty because the BasicEvent also falls through here otherwise\n if ((event as ChangeEvent) && event.hasOwnProperty('date')) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n // this was to prevent a max call stack error\n // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb\n // todo see if this is still needed or if there's a cleaner way\n this._notifyChangeEventContext++;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate) ||\n this._notifyChangeEventContext > 1\n ) {\n this._notifyChangeEventContext = 0;\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n }\n\n this._element.dispatchEvent(\n new CustomEvent(event.type, { detail: event as any })\n );\n\n if ((window as any).jQuery) {\n const $ = (window as any).jQuery;\n $(this._element).trigger(event);\n }\n\n const publish = () => {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n };\n\n publish();\n\n this._notifyChangeEventContext = 0;\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @param {Unit} unit\n * @private\n */\n _viewUpdate(unit: Unit) {\n this._triggerEvent({\n type: Namespace.events.update,\n change: unit,\n viewDate: this._viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): Options {\n config = OptionConverter._mergeOptions(config, mergeTo);\n if (includeDataset)\n config = OptionConverter._dataToOptions(this._element, config);\n\n OptionConverter._validateConflcits(config);\n\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\n\n if (!this._viewDate.isSame(config.viewDate)) {\n this._viewDate = config.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (config.display.components.year) {\n this._minViewModeNumber = 2;\n }\n if (config.display.components.month) {\n this._minViewModeNumber = 1;\n }\n if (config.display.components.date) {\n this._minViewModeNumber = 0;\n }\n\n this._currentViewMode = Math.max(\n this._minViewModeNumber,\n this._currentViewMode\n );\n\n // Update view mode if needed\n if (\n DatePickerModes[this._currentViewMode].name !== config.display.viewMode\n ) {\n this._currentViewMode = Math.max(\n DatePickerModes.findIndex((x) => x.name === config.display.viewMode),\n this._minViewModeNumber\n );\n }\n\n // defaults the input format based on the components enabled\n if (config.hooks.inputFormat === undefined) {\n const components = config.display.components;\n config.hooks.inputFormat = (_, date: DateTime) => {\n if (!date) return '';\n return date.format({\n year: components.calendar && components.year ? 'numeric' : undefined,\n month:\n components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute:\n components.clock && components.minutes ? '2-digit' : undefined,\n second:\n components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n });\n };\n }\n\n if (this._display?.isVisible) {\n this._display._update('all');\n }\n\n return config;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this._element.tagName == 'INPUT') {\n this._input = this._element as HTMLInputElement;\n } else {\n let query = this._element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this._input = this._element.querySelector('input');\n } else {\n this._input = this._element.querySelector(query);\n }\n }\n\n if (!this._input) return;\n\n this._input.addEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input.addEventListener('click', this._toggleClickEvent);\n }\n\n if (this._input.value) {\n this._inputChangeEvent();\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this._options.display.inline) return;\n let query = this._element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined ? this._element : this._element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this._options.promptTimeOnDateChange ||\n this._options.display.inline ||\n this._options.display.sideBySide ||\n // time is disabled\n !this._display._hasTime ||\n // clock component is already showing\n this._display.widget\n ?.getElementsByClassName(Namespace.css.show)[0]\n .classList.contains(Namespace.css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this._options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this._display.widget) {\n this._action.do(\n {\n currentTarget: this._display.widget.querySelector(\n `.${Namespace.css.switch} div`\n ),\n },\n ActionTypes.togglePicker\n );\n }\n }, this._options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _inputChangeEvent = () => {\n const setViewDate = () => {\n if (this.dates.lastPicked) this._viewDate = this.dates.lastPicked;\n };\n\n const value = this._input.value;\n if (this._options.multipleDates) {\n try {\n const valueSplit = value.split(this._options.multipleDatesSeparator);\n for (let i = 0; i < valueSplit.length; i++) {\n if (this._options.hooks.inputParse) {\n this.dates.set(\n this._options.hooks.inputParse(this, valueSplit[i]),\n i,\n 'input'\n );\n } else {\n this.dates.set(valueSplit[i], i, 'input');\n }\n }\n setViewDate();\n } catch {\n console.warn(\n 'TD: Something went wrong trying to set the multidate values from the input field.'\n );\n }\n } else {\n if (this._options.hooks.inputParse) {\n this.dates.set(this._options.hooks.inputParse(this, value), 0, 'input');\n } else {\n this.dates.set(value, 0, 'input');\n }\n setViewDate();\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n this.toggle();\n };\n}\n\nexport {\n TempusDominus,\n Namespace,\n DefaultOptions,\n DateTime,\n Options,\n Unit,\n DateTimeFormatOptions,\n};\n"],"names":["SecondDisplay"],"mappings":";;;;;;;IAAY;AAAZ,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,2BAAmB,CAAA;IACnB,uBAAe,CAAA;IACf,qBAAa,CAAA;IACb,uBAAe,CAAA;IACf,qBAAa,CAAA;AACf,CAAC,EAPW,IAAI,KAAJ,IAAI,QAOf;AAQD;;;;MAIa,QAAS,SAAQ,IAAI;IAAlC;;;;;QAIE,WAAM,GAAG,SAAS,CAAC;QAmbX,kBAAa,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACxE,eAAU,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;KAC9E;;;;;IA/aC,SAAS,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,OAAO,IAAI,CAAC;KACb;;;;;;IAOD,OAAO,OAAO,CAAC,IAAU,EAAE,SAAiB,SAAS;QACnD,IAAI,CAAC,IAAI;YAAE,MAAM,oBAAoB,CAAC;QACtC,OAAO,IAAI,QAAQ,CACjB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAAC,OAAO,EAAE,EACd,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,eAAe,EAAE,CACvB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;;;YAEvB,MAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,0CAChB,sBAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAC7C,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;YAElD,OAAO;;;;QAKT,IACE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU;aACtC,CAAC,CAAC,OAAO,KAAI,MAAA,CAAC,CAAC,IAAI,0CAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA,CAAC,EACxC;YACA,OAAO;SACR;QAED,YAAY,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC7C,IAAI,CAAC,yBAAyB,GAAG,UAAU,CAAC;YAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;gBACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CACb;oBACE,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAC/C,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,MAAM,CAC/B;iBACF,EACD,WAAW,CAAC,YAAY,CACzB,CAAC;aACH;SACF,EAAE,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC;KACzD;;;;;"} \ No newline at end of file +{"version":3,"file":"tempus-dominus.esm.js","sources":["../../src/js/datetime.ts","../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/calendar-modes.ts","../../src/js/utilities/default-options.ts","../../src/js/utilities/options.ts","../../src/js/utilities/service-locator.ts","../../src/js/validation.ts","../../src/js/utilities/event-emitter.ts","../../src/js/dates.ts","../../src/js/utilities/action-types.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/collapse.ts","../../src/js/display/index.ts","../../src/js/actions.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\r\n seconds = 'seconds',\r\n minutes = 'minutes',\r\n hours = 'hours',\r\n date = 'date',\r\n month = 'month',\r\n year = 'year',\r\n}\r\n\r\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\r\n timeStyle?: 'short' | 'medium' | 'long';\r\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\r\n numberingSystem?: string;\r\n}\r\n\r\nexport const getFormatByUnit = (unit: Unit): object => {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric'\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n};\r\n\r\n/**\r\n * For the most part this object behaves exactly the same way\r\n * as the native Date object with a little extra spice.\r\n */\r\nexport class DateTime extends Date {\r\n /**\r\n * Used with Intl.DateTimeFormat\r\n */\r\n locale = 'default';\r\n\r\n /**\r\n * Chainable way to set the {@link locale}\r\n * @param value\r\n */\r\n setLocale(value: string): this {\r\n this.locale = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts a plain JS date object to a DateTime object.\r\n * Doing this allows access to format, etc.\r\n * @param date\r\n */\r\n static convert(date: Date, locale: string = 'default'): DateTime {\r\n if (!date) throw new Error(`A date is required`);\r\n return new DateTime(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds()\r\n ).setLocale(locale);\r\n }\r\n\r\n /**\r\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\r\n */\r\n get clone() {\r\n return new DateTime(\r\n this.year,\r\n this.month,\r\n this.date,\r\n this.hours,\r\n this.minutes,\r\n this.seconds,\r\n this.getMilliseconds()\r\n ).setLocale(this.locale);\r\n }\r\n\r\n /**\r\n * Sets the current date to the start of the {@link unit} provided\r\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\r\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\r\n * @param unit\r\n * @param startOfTheWeek Allows for the changing the start of the week.\r\n */\r\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(0);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(0, 0);\r\n break;\r\n case 'hours':\r\n this.setMinutes(0, 0, 0);\r\n break;\r\n case 'date':\r\n this.setHours(0, 0, 0, 0);\r\n break;\r\n case 'weekDay':\r\n this.startOf(Unit.date);\r\n if (this.weekDay === startOfTheWeek) break;\r\n let goBack = this.weekDay;\r\n if (startOfTheWeek !== 0 && this.weekDay === 0) goBack = 8 - startOfTheWeek;\r\n this.manipulate(startOfTheWeek - goBack, Unit.date);\r\n break;\r\n case 'month':\r\n this.startOf(Unit.date);\r\n this.setDate(1);\r\n break;\r\n case 'year':\r\n this.startOf(Unit.date);\r\n this.setMonth(0, 1);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the current date to the end of the {@link unit} provided\r\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\r\n * would return April 30, 2021, 11:59:59.999 PM\r\n * @param unit\r\n */\r\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(999);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(59, 999);\r\n break;\r\n case 'hours':\r\n this.setMinutes(59, 59, 999);\r\n break;\r\n case 'date':\r\n this.setHours(23, 59, 59, 999);\r\n break;\r\n case 'weekDay':\r\n this.endOf(Unit.date);\r\n this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date);\r\n break;\r\n case 'month':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.month);\r\n this.setDate(0);\r\n break;\r\n case 'year':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.year);\r\n this.setDate(0);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Change a {@link unit} value. Value can be positive or negative\r\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\r\n * would return May 30, 2021, 11:45:32.984 AM\r\n * @param value A positive or negative number\r\n * @param unit\r\n */\r\n manipulate(value: number, unit: Unit): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n this[unit] += value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a string format.\r\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\r\n * for valid templates and locale objects\r\n * @param template An object. Uses browser defaults otherwise.\r\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\r\n */\r\n format(template: DateTimeFormatOptions, locale = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, template).format(this);\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is before this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isBefore(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() < compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is after this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isAfter(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() > compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is same this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isSame(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() === compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n compare = DateTime.convert(compare);\r\n return (\r\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\r\n * @param left\r\n * @param right\r\n * @param unit.\r\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\r\n * If the inclusivity parameter is used, both indicators must be passed.\r\n */\r\n isBetween(\r\n left: DateTime,\r\n right: DateTime,\r\n unit?: Unit,\r\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\r\n ): boolean {\r\n if (unit && this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n const leftInclusivity = inclusivity[0] === '(';\r\n const rightInclusivity = inclusivity[1] === ')';\r\n\r\n return (\r\n ((leftInclusivity\r\n ? this.isAfter(left, unit)\r\n : !this.isBefore(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isBefore(right, unit)\r\n : !this.isAfter(right, unit))) ||\r\n ((leftInclusivity\r\n ? this.isBefore(left, unit)\r\n : !this.isAfter(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isAfter(right, unit)\r\n : !this.isBefore(right, unit)))\r\n );\r\n }\r\n\r\n /**\r\n * Returns flattened object of the date. Does not include literals\r\n * @param locale\r\n * @param template\r\n */\r\n parts(\r\n locale = this.locale,\r\n template: any = { dateStyle: 'full', timeStyle: 'long' }\r\n ): any {\r\n const parts = {};\r\n new Intl.DateTimeFormat(locale, template)\r\n .formatToParts(this)\r\n .filter((x) => x.type !== 'literal')\r\n .forEach((x) => (parts[x.type] = x.value));\r\n return parts;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getSeconds()\r\n */\r\n get seconds(): number {\r\n return this.getSeconds();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setSeconds()\r\n */\r\n set seconds(value: number) {\r\n this.setSeconds(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get secondsFormatted(): string {\r\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMinutes()\r\n */\r\n get minutes(): number {\r\n return this.getMinutes();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMinutes()\r\n */\r\n set minutes(value: number) {\r\n this.setMinutes(value);\r\n }\r\n\r\n /**\r\n * Returns two digit minutes\r\n */\r\n get minutesFormatted(): string {\r\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getHours()\r\n */\r\n get hours(): number {\r\n return this.getHours();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setHours()\r\n */\r\n set hours(value: number) {\r\n this.setHours(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get hoursFormatted(): string {\r\n let formatted = this.format({ hour: '2-digit', hour12: false });\r\n if (formatted === '24') formatted = '00';\r\n return formatted;\r\n }\r\n\r\n /**\r\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\r\n */\r\n get twelveHoursFormatted(): string {\r\n let hour = this.parts().hour;\r\n if (hour.length === 1) hour = `0${hour}`;\r\n return hour;\r\n }\r\n\r\n /**\r\n * Get the meridiem of the date. E.g. AM or PM.\r\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\r\n * otherwise it will return AM or PM.\r\n * @param locale\r\n */\r\n meridiem(locale: string = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, {\r\n hour: 'numeric',\r\n hour12: true\r\n } as any)\r\n .formatToParts(this)\r\n .find((p) => p.type === 'dayPeriod')?.value;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDate()\r\n */\r\n get date(): number {\r\n return this.getDate();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setDate()\r\n */\r\n set date(value: number) {\r\n this.setDate(value);\r\n }\r\n\r\n /**\r\n * Return two digit date\r\n */\r\n get dateFormatted(): string {\r\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDay()\r\n */\r\n get weekDay(): number {\r\n return this.getDay();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMonth()\r\n */\r\n get month(): number {\r\n return this.getMonth();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMonth()\r\n */\r\n set month(value: number) {\r\n const targetMonth = new Date(this.year, value + 1);\r\n targetMonth.setDate(0);\r\n const endOfMonth = targetMonth.getDate();\r\n if (this.date > endOfMonth) {\r\n this.date = endOfMonth;\r\n }\r\n this.setMonth(value);\r\n }\r\n\r\n /**\r\n * Return two digit, human expected month. E.g. January = 1, December = 12\r\n */\r\n get monthFormatted(): string {\r\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getFullYear()\r\n */\r\n get year(): number {\r\n return this.getFullYear();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setFullYear()\r\n */\r\n set year(value: number) {\r\n this.setFullYear(value);\r\n }\r\n\r\n // borrowed a bunch of stuff from Luxon\r\n /**\r\n * Gets the week of the year\r\n */\r\n get week(): number {\r\n const ordinal = this.computeOrdinal(),\r\n weekday = this.getUTCDay();\r\n\r\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\r\n\r\n if (weekNumber < 1) {\r\n weekNumber = this.weeksInWeekYear(this.year - 1);\r\n } else if (weekNumber > this.weeksInWeekYear(this.year)) {\r\n weekNumber = 1;\r\n }\r\n\r\n return weekNumber;\r\n }\r\n\r\n weeksInWeekYear(weekYear) {\r\n const p1 =\r\n (weekYear +\r\n Math.floor(weekYear / 4) -\r\n Math.floor(weekYear / 100) +\r\n Math.floor(weekYear / 400)) %\r\n 7,\r\n last = weekYear - 1,\r\n p2 =\r\n (last +\r\n Math.floor(last / 4) -\r\n Math.floor(last / 100) +\r\n Math.floor(last / 400)) %\r\n 7;\r\n return p1 === 4 || p2 === 3 ? 53 : 52;\r\n }\r\n\r\n get isLeapYear() {\r\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\r\n }\r\n\r\n private computeOrdinal() {\r\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\r\n }\r\n\r\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\r\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\r\n}\r\n","import Namespace from './namespace';\r\n\r\nexport class TdError extends Error {\r\n code: number;\r\n}\r\n\r\nexport class ErrorMessages {\r\n private base = 'TD:';\r\n\r\n //#region out to console\r\n\r\n /**\r\n * Throws an error indicating that a key in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOption(optionName: string) {\r\n const error = new TdError(\r\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\r\n );\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error indicating that one more keys in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOptions(optionName: string[]) {\r\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option is provide an unsupported value.\r\n * For example a value of 'cheese' for toolbarPlacement which only supports\r\n * 'top', 'bottom', 'default'.\r\n * @param optionName\r\n * @param badValue\r\n * @param validOptions\r\n */\r\n unexpectedOptionValue(\r\n optionName: string,\r\n badValue: string,\r\n validOptions: string[]\r\n ) {\r\n const error = new TdError(\r\n `${\r\n this.base\r\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\r\n ', '\r\n )}`\r\n );\r\n error.code = 2;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is the wrong type.\r\n * For example a string value was provided to multipleDates which only\r\n * supports true or false.\r\n * @param optionName\r\n * @param badType\r\n * @param expectedType\r\n */\r\n typeMismatch(optionName: string, badType: string, expectedType: string) {\r\n const error = new TdError(\r\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\r\n );\r\n error.code = 3;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is outside of the expected range.\r\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\r\n * @param optionName\r\n * @param lower\r\n * @param upper\r\n */\r\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\r\n const error = new TdError(\r\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\r\n );\r\n error.code = 4;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when a value for a date options couldn't be parsed. Either\r\n * the option was an invalide string or an invalid Date object.\r\n * @param optionName\r\n * @param date\r\n * @param soft If true, logs a warning instead of an error.\r\n */\r\n failedToParseDate(optionName: string, date: any, soft = false) {\r\n const error = new TdError(\r\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\r\n );\r\n error.code = 5;\r\n if (!soft) throw error;\r\n console.warn(error);\r\n }\r\n\r\n /**\r\n * Throws when an element to attach to was not provided in the constructor.\r\n */\r\n mustProvideElement() {\r\n const error = new TdError(`${this.base} No element was provided.`);\r\n error.code = 6;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if providing an array for the events to subscribe method doesn't have\r\n * the same number of callbacks. E.g., subscribe([1,2], [1])\r\n */\r\n subscribeMismatch() {\r\n const error = new TdError(\r\n `${this.base} The subscribed events does not match the number of callbacks`\r\n );\r\n error.code = 7;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\r\n */\r\n conflictingConfiguration(message?: string) {\r\n const error = new TdError(\r\n `${this.base} A configuration value conflicts with another rule. ${message}`\r\n );\r\n error.code = 8;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Logs a warning if a date option value is provided as a string, instead of\r\n * a date/datetime object.\r\n */\r\n dateString() {\r\n console.warn(\r\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\r\n );\r\n }\r\n\r\n //#endregion\r\n\r\n //#region used with notify.error\r\n\r\n /**\r\n * Used with an Error Event type if the user selects a date that\r\n * fails restriction validation.\r\n */\r\n failedToSetInvalidDate = 'Failed to set invalid date';\r\n\r\n /**\r\n * Used with an Error Event type when a user changes the value of the\r\n * input field directly, and does not provide a valid date.\r\n */\r\n failedToParseInput = 'Failed parse input field';\r\n\r\n //#endregion\r\n}\r\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-beta4',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n /**\n * Applied AM/PM toggle button.\n */\n toggleMeridiem = 'toggleMeridiem';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { Unit } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\n\nconst CalendarModes: {\n name: keyof ViewMode;\n className: string;\n unit: Unit;\n step: number;\n}[] = [\n {\n name: 'calendar',\n className: Namespace.css.daysContainer,\n unit: Unit.month,\n step: 1,\n },\n {\n name: 'months',\n className: Namespace.css.monthsContainer,\n unit: Unit.year,\n step: 1,\n },\n {\n name: 'years',\n className: Namespace.css.yearsContainer,\n unit: Unit.year,\n step: 10,\n },\n {\n name: 'decades',\n className: Namespace.css.decadesContainer,\n unit: Unit.year,\n step: 100,\n },\n];\n\nexport default CalendarModes;\n","import Options from './options';\nimport { DateTime } from '../datetime';\n\nconst DefaultOptions: Options = {\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: []\n },\n display: {\n icons: {\n type: 'icons',\n time: 'fa-solid fa-clock',\n date: 'fa-solid fa-calendar',\n up: 'fa-solid fa-arrow-up',\n down: 'fa-solid fa-arrow-down',\n previous: 'fa-solid fa-chevron-left',\n next: 'fa-solid fa-chevron-right',\n today: 'fa-solid fa-calendar-check',\n clear: 'fa-solid fa-trash',\n close: 'fa-solid fa-xmark'\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: false\n },\n inline: false\n },\n stepping: 1,\n useCurrent: true,\n defaultDate: undefined,\n localization: {\n today: 'Go to today',\n clear: 'Clear selection',\n close: 'Close the picker',\n selectMonth: 'Select Month',\n previousMonth: 'Previous Month',\n nextMonth: 'Next Month',\n selectYear: 'Select Year',\n previousYear: 'Previous Year',\n nextYear: 'Next Year',\n selectDecade: 'Select Decade',\n previousDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n previousCentury: 'Previous Century',\n nextCentury: 'Next Century',\n pickHour: 'Pick Hour',\n incrementHour: 'Increment Hour',\n decrementHour: 'Decrement Hour',\n pickMinute: 'Pick Minute',\n incrementMinute: 'Increment Minute',\n decrementMinute: 'Decrement Minute',\n pickSecond: 'Pick Second',\n incrementSecond: 'Increment Second',\n decrementSecond: 'Decrement Second',\n toggleMeridiem: 'Toggle Meridiem',\n selectTime: 'Select Time',\n selectDate: 'Select Date',\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\n locale: 'default',\n startOfTheWeek: 0\n },\n keepInvalid: false,\n debug: false,\n allowInputToggle: false,\n viewDate: new DateTime(),\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n meta: {},\n container: undefined\n};\n\nexport default DefaultOptions;","import { DateTime, DateTimeFormatOptions } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\nimport CalendarModes from './calendar-modes';\nimport DefaultOptions from './default-options';\n\nexport class OptionsStore {\n options: Options;\n element: HTMLElement;\n viewDate = new DateTime();\n input: HTMLInputElement;\n unset: boolean;\n private _currentCalendarViewMode = 0;\n get currentCalendarViewMode() {\n return this._currentCalendarViewMode;\n }\n\n set currentCalendarViewMode(value) {\n this._currentCalendarViewMode = value;\n this.currentView = CalendarModes[value].name;\n }\n\n /**\n * When switching back to the calendar from the clock,\n * this sets currentView to the correct calendar view.\n */\n refreshCurrentView() {\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\n }\n\n minimumCalendarViewMode = 0;\n currentView: keyof ViewMode = 'calendar';\n}\n\nexport default interface Options {\n restrictions?: {\n minDate?: DateTime;\n maxDate?: DateTime;\n enabledDates?: DateTime[];\n disabledDates?: DateTime[];\n enabledHours?: number[];\n disabledHours?: number[];\n disabledTimeIntervals?: { from: DateTime; to: DateTime }[];\n daysOfWeekDisabled?: number[];\n };\n display?: {\n toolbarPlacement?: 'top' | 'bottom';\n components?: {\n calendar?: boolean;\n date?: boolean;\n month?: boolean;\n year?: boolean;\n decades?: boolean;\n clock?: boolean;\n hours?: boolean;\n minutes?: boolean;\n seconds?: boolean;\n useTwentyfourHour?: boolean;\n };\n buttons?: { today?: boolean; close?: boolean; clear?: boolean };\n calendarWeeks?: boolean;\n icons?: {\n date?: string;\n next?: string;\n previous?: string;\n today?: string;\n clear?: string;\n time?: string;\n up?: string;\n type?: 'icons' | 'sprites';\n down?: string;\n close?: string;\n };\n viewMode?: keyof ViewMode | undefined;\n sideBySide?: boolean;\n inline?: boolean;\n keepOpen?: boolean;\n };\n stepping?: number;\n useCurrent?: boolean;\n defaultDate?: DateTime;\n localization?: {\n nextMonth?: string;\n pickHour?: string;\n incrementSecond?: string;\n nextDecade?: string;\n selectDecade?: string;\n dayViewHeaderFormat?: DateTimeFormatOptions;\n decrementHour?: string;\n selectDate?: string;\n incrementHour?: string;\n previousCentury?: string;\n decrementSecond?: string;\n today?: string;\n previousMonth?: string;\n selectYear?: string;\n pickSecond?: string;\n nextCentury?: string;\n close?: string;\n incrementMinute?: string;\n selectTime?: string;\n clear?: string;\n toggleMeridiem?: string;\n selectMonth?: string;\n decrementMinute?: string;\n pickMinute?: string;\n nextYear?: string;\n previousYear?: string;\n previousDecade?: string;\n locale?: string;\n startOfTheWeek?: number;\n };\n keepInvalid?: boolean;\n debug?: boolean;\n allowInputToggle?: boolean;\n viewDate?: DateTime;\n multipleDates?: boolean;\n multipleDatesSeparator?: string;\n promptTimeOnDateChange?: boolean;\n promptTimeOnDateChangeTransitionDelay?: number;\n meta?: {};\n container?: HTMLElement;\n}\n\nexport class OptionConverter {\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newOptions = {} as Options;\n let path = '';\n const ignoreProperties = ['meta', 'dayViewHeaderFormat', 'container'];\n\n //see if the options specify a locale\n const locale =\n mergeTo.localization.locale !== 'default'\n ? mergeTo.localization.locale\n : providedOptions?.localization?.locale || 'default';\n\n const processKey = (key, value, providedType, defaultType) => {\n switch (key) {\n case 'defaultDate': {\n const dateTime = this.dateConversion(value, 'defaultDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'defaultDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'viewDate': {\n const dateTime = this.dateConversion(value, 'viewDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'viewDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'minDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this.dateConversion(value, 'restrictions.minDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.minDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'maxDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this.dateConversion(value, 'restrictions.maxDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.maxDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'disabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.disabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.disabledHours',\n 0,\n 23\n );\n return value;\n case 'enabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.enabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.enabledHours',\n 0,\n 23\n );\n return value;\n case 'daysOfWeekDisabled':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.daysOfWeekDisabled',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 6).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.daysOfWeekDisabled',\n 0,\n 6\n );\n return value;\n case 'enabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.enabledDates',\n value,\n providedType,\n locale\n );\n return value;\n case 'disabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.disabledDates',\n value,\n providedType,\n locale\n );\n return value;\n case 'disabledTimeIntervals':\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[];\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n let d = valueObject[i][vk];\n const dateTime = this.dateConversion(d, subOptionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n subOptionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n dateTime.setLocale(locale);\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n case 'toolbarPlacement':\n case 'type':\n case 'viewMode':\n const optionValues = {\n toolbarPlacement: ['top', 'bottom', 'default'],\n type: ['icons', 'sprites'],\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\n };\n const keyOptions = optionValues[key];\n if (!keyOptions.includes(value))\n Namespace.errorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n\n return value;\n case 'meta':\n case 'dayViewHeaderFormat':\n return value;\n case 'container':\n if (\n value &&\n !(\n value instanceof HTMLElement ||\n value instanceof Element ||\n value?.appendChild\n )\n ) {\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n typeof value,\n 'HTMLElement'\n );\n }\n return value;\n default:\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n providedType,\n defaultType\n );\n }\n }\n };\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param mergeOption Default option to compare types against\n * @param copyTo Destination object. This was add to prevent reference copies\n */\n const spread = (provided, mergeOption, copyTo) => {\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(mergeOption).includes(x)\n );\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.errorMessages.unexpectedOptions(errors);\n }\n Object.keys(mergeOption).forEach((key) => {\n const defaultOptionValue = mergeOption[key];\n let providedType = typeof provided[key];\n let defaultType = typeof defaultOptionValue;\n let value = provided[key];\n if (!provided.hasOwnProperty(key)) {\n if (\n defaultType === 'undefined' ||\n (value?.length === 0 && Array.isArray(defaultOptionValue))\n ) {\n copyTo[key] = defaultOptionValue;\n return;\n }\n provided[key] = defaultOptionValue;\n value = provided[key];\n }\n path += `.${key}`;\n copyTo[key] = processKey(key, value, providedType, defaultType);\n\n if (\n typeof defaultOptionValue !== 'object' ||\n ignoreProperties.includes(key)\n ) {\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n if (!Array.isArray(provided[key])) {\n spread(provided[key], defaultOptionValue, copyTo[key]);\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n }\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n };\n spread(providedOptions, mergeTo, newOptions);\n\n return newOptions;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = JSON.parse(JSON.stringify(element.dataset));\n\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\n\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n let dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const rabbitHole = (\n split: string[],\n index: number,\n optionSubgroup: {},\n value: any\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = rabbitHole(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = rabbitHole(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @private\n */\n static _dateTypeCheck(d: any): DateTime | null {\n if (d.constructor.name === DateTime.name) return d;\n if (d.constructor.name === Date.name) {\n return DateTime.convert(d);\n }\n if (typeof d === typeof '') {\n const dateTime = new DateTime(d);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n * @param locale\n */\n static _typeCheckDateArray(\n optionName: string,\n value,\n providedType: string,\n locale: string = 'default'\n ) {\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n let d = value[i];\n const dateTime = this.dateConversion(d, optionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n dateTime.setLocale(locale);\n value[i] = dateTime;\n }\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n return;\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n */\n static dateConversion(d: any, optionName: string): DateTime {\n if (typeof d === typeof '' && optionName !== 'input') {\n Namespace.errorMessages.dateString();\n }\n\n const converted = this._dateTypeCheck(d);\n\n if (!converted) {\n Namespace.errorMessages.failedToParseDate(\n optionName,\n d,\n optionName === 'input'\n );\n }\n return converted;\n }\n\n private static _flatback: string[];\n\n private static getFlattenDefaultOptions(): string[] {\n if (this._flatback) return this._flatback;\n const deepKeys = (t, pre = []) =>\n Array.isArray(t)\n ? []\n : Object(t) === t\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\n : pre.join('.');\n\n this._flatback = deepKeys(DefaultOptions);\n\n return this._flatback;\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflcits(config: Options) {\n if (\n config.display.sideBySide &&\n (!config.display.components.clock ||\n !(\n config.display.components.hours ||\n config.display.components.minutes ||\n config.display.components.seconds\n ))\n ) {\n Namespace.errorMessages.conflictingConfiguration(\n 'Cannot use side by side mode without the clock components'\n );\n }\n\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n }\n}\n","export declare type Constructable = new (...args: any[]) => T;\r\n\r\nclass ServiceLocator {\r\n private cache: Map, unknown | Symbol> = new Map();\r\n\r\n locate(identifier: Constructable): T {\r\n const service = this.cache.get(identifier);\r\n if (service) return service as T;\r\n const value = new identifier();\r\n this.cache.set(identifier, value);\r\n return value;\r\n }\r\n}\r\nexport const setupServiceLocator = () => {\r\n serviceLocator = new ServiceLocator();\r\n}\r\n\r\nexport let serviceLocator: ServiceLocator;","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport { OptionsStore } from './utilities/options';\r\nimport { serviceLocator } from './utilities/service-locator';\r\n\r\n/**\r\n * Main class for date validation rules based on the options provided.\r\n */\r\nexport default class Validation {\r\n private optionsStore: OptionsStore;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n }\r\n\r\n /**\r\n * Checks to see if the target date is valid based on the rules provided in the options.\r\n * Granularity can be provide to chek portions of the date instead of the whole.\r\n * @param targetDate\r\n * @param granularity\r\n */\r\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\r\n if (\r\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\r\n this._isInDisabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\r\n !this._isInEnabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n granularity !== Unit.month &&\r\n granularity !== Unit.year &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\r\n targetDate.weekDay\r\n ) !== -1\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.optionsStore.options.restrictions.minDate &&\r\n targetDate.isBefore(\r\n this.optionsStore.options.restrictions.minDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.maxDate &&\r\n targetDate.isAfter(\r\n this.optionsStore.options.restrictions.maxDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n granularity === Unit.hours ||\r\n granularity === Unit.minutes ||\r\n granularity === Unit.seconds\r\n ) {\r\n if (\r\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\r\n this._isInDisabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\r\n !this._isInEnabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0\r\n ) {\r\n for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) {\r\n if (\r\n targetDate.isBetween(\r\n disabledTimeIntervals.from,\r\n disabledTimeIntervals.to\r\n )\r\n )\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledDates ||\r\n this.optionsStore.options.restrictions.disabledDates.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.disabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledDates ||\r\n this.optionsStore.options.restrictions.enabledDates.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.enabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledHours ||\r\n this.optionsStore.options.restrictions.disabledHours.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.disabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledHours ||\r\n this.optionsStore.options.restrictions.enabledHours.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.enabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n}\r\n","import { Unit } from '../datetime';\nimport ActionTypes from './action-types';\nimport { BaseEvent } from './event-types';\n\nexport type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all';\n\nexport class EventEmitter {\n private subscribers: ((value?: T) => void)[] = [];\n\n subscribe(callback: (value: T) => void) {\n this.subscribers.push(callback);\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\n }\n\n unsubscribe(index: number) {\n this.subscribers.splice(index, 1);\n }\n\n emit(value?: T) {\n this.subscribers.forEach((callback) => {\n callback(value);\n });\n }\n\n destory() {\n this.subscribers = null;\n this.subscribers = [];\n }\n}\n\nexport class EventEmitters {\n triggerEvent = new EventEmitter();\n viewUpdate = new EventEmitter();\n updateDisplay = new EventEmitter();\n action = new EventEmitter<{ e: any; action?: ActionTypes }>();\n\n destory() {\n this.triggerEvent.destory();\n this.viewUpdate.destory();\n this.updateDisplay.destory();\n this.action.destory();\n }\n}\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\nimport Namespace from './utilities/namespace';\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\nimport { OptionConverter, OptionsStore } from './utilities/options';\nimport Validation from './validation';\nimport { serviceLocator } from './utilities/service-locator';\nimport { EventEmitters } from './utilities/event-emitter';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private optionsStore: OptionsStore;\n private validation: Validation;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return this._dates;\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex];\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Formats a DateTime object to a string. Used when setting the input value.\n * @param date\n */\n formatInput(date: DateTime): string {\n const components = this.optionsStore.options.display.components;\n if (!date) return '';\n return date.format({\n year: components.calendar && components.year ? 'numeric' : undefined,\n month: components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute: components.clock && components.minutes ? '2-digit' : undefined,\n second: components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n });\n }\n\n /**\n * Tries to convert the provided value to a DateTime object.\n * If value is null|undefined then clear the value of the provided index (or 0).\n * @param value Value to convert or null|undefined\n * @param index When using multidates this is the index in the array\n */\n setFromInput(value: any, index?: number) {\n if (!value) {\n this.setValue(undefined, index);\n return;\n }\n const converted = OptionConverter.dateConversion(value, 'input');\n if (converted) {\n converted.setLocale(this.optionsStore.options.localization.locale);\n this.setValue(converted, index);\n }\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\n\n const format = getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!unit) return this._dates.indexOf(targetDate);\n\n const format = getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this.optionsStore.unset = true;\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this.optionsStore.unset ? null : this._dates[index];\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n const updateInput = () => {\n if (!this.optionsStore.input) return;\n\n let newValue = this.formatInput(target);\n if (this.optionsStore.options.multipleDates) {\n newValue = this._dates\n .map((d) => this.formatInput(d))\n .join(this.optionsStore.options.multipleDatesSeparator);\n }\n if (this.optionsStore.input.value != newValue)\n this.optionsStore.input.value = newValue;\n };\n\n if (target && oldDate?.isSame(target)) {\n updateInput();\n return;\n }\n\n // case of calling setValue(null)\n if (!target) {\n if (\n !this.optionsStore.options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this.optionsStore.unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n updateInput();\n this._eventEmitters.updateDisplay.emit('all');\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this.optionsStore.options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this.optionsStore.options.stepping) *\n this.optionsStore.options.stepping;\n target.seconds = 0;\n }\n\n if (this.validation.isValid(target)) {\n this._dates[index] = target;\n this.optionsStore.viewDate = target.clone;\n\n updateInput();\n\n this.optionsStore.unset = false;\n this._eventEmitters.updateDisplay.emit('all');\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n return;\n }\n\n if (this.optionsStore.options.keepInvalid) {\n this._dates[index] = target;\n this.optionsStore.viewDate = target.clone;\n\n updateInput();\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: false,\n } as ChangeEvent);\n }\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n}\n","enum ActionTypes {\n next = 'next',\n previous = 'previous',\n changeCalendarView = 'changeCalendarView',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n toggleMeridiem = 'toggleMeridiem',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n\nexport default ActionTypes;\n","import { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this.optionsStore.viewDate.format(\n this.optionsStore.options.localization.dayViewHeaderFormat\n )\n );\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement) => {\n if (\n this.optionsStore.options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes: string[] = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n paint(Unit.date, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.setAttribute('data-day', `${innerDate.date}`);\n containerClone.innerText = innerDate.format({ day: 'numeric' });\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this.optionsStore.viewDate.clone\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this.optionsStore.viewDate.format({ year: 'numeric' })\n );\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.month, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Dates from '../../dates';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _startYear: DateTime;\n private _endYear: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year);\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\n\n const container = widget.getElementsByClassName(\n Namespace.css.yearsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.yearsContainer,\n `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({ year: 'numeric' })}`\n );\n\n this.validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.year);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.year, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this.optionsStore.viewDate.year\n );\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = widget.getElementsByClassName(\n Namespace.css.decadesContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.decadesContainer,\n `${this._startDecade.format({ year: 'numeric' })}-${this._endDecade.format({ year: 'numeric' })}`\n );\n\n this.validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n const pickedYears = this.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.css.disabled);\n containerClone.classList.add(Namespace.css.disabled);\n containerClone.setAttribute('data-value', ``);\n return;\n } else {\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: 'numeric' });\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year}`\n );\n return;\n }\n }\n\n let classes = [];\n classes.push(Namespace.css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this.optionsStore.unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.css.active);\n }\n\n paint('decade', this._startDecade, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year}`\n );\n containerClone.innerText = `${this._startDecade.format({ year: 'numeric' })}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _gridColumns = '';\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid(iconTag));\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(widget: HTMLElement): void {\n const timesDiv = (\n widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0]\n );\n const lastPicked = (\n this.dates.lastPicked || this.optionsStore.viewDate\n ).clone;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this.optionsStore.options.display.components.hours) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this.optionsStore.options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.toggleMeridiem}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this.validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\n this._gridColumns = '';\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = iconTag(\n this.optionsStore.options.display.icons.up\n ),\n downIcon = iconTag(\n this.optionsStore.options.display.icons.down\n );\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this.optionsStore.options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n this._gridColumns += 'a';\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\n this._gridColumns += ' a';\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this.optionsStore.options.localization.toggleMeridiem\n );\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\n button.setAttribute('tabindex', '-1');\n if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function?\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\n }\n else button.classList.add(Namespace.css.toggleMeridiem);\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n this._gridColumns = this._gridColumns.trim();\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this.validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.hours, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this.optionsStore.options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n let step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\n let step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.minutes, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.minutesFormatted}`\n );\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.second);\n\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.seconds, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import Namespace from '../utilities/namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n static toggle(target: HTMLElement) {\r\n if (target.classList.contains(Namespace.css.show)) {\r\n this.hide(target);\r\n } else {\r\n this.show(target);\r\n }\r\n }\r\n\r\n /**\r\n * If `target` is not already showing, then show after the animation.\r\n * @param target\r\n */\r\n static show(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.css.collapsing) ||\r\n target.classList.contains(Namespace.css.show)\r\n )\r\n return;\r\n\r\n let timeOut = null;\r\n const complete = () => {\r\n target.classList.remove(Namespace.css.collapsing);\r\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\r\n target.style.height = '';\r\n timeOut = null;\r\n };\r\n\r\n target.style.height = '0';\r\n target.classList.remove(Namespace.css.collapse);\r\n target.classList.add(Namespace.css.collapsing);\r\n\r\n timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n target.style.height = `${target.scrollHeight}px`;\r\n }\r\n\r\n /**\r\n * If `target` is not already hidden, then hide after the animation.\r\n * @param target HTML Element\r\n */\r\n static hide(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.css.collapsing) ||\r\n !target.classList.contains(Namespace.css.show)\r\n )\r\n return;\r\n\r\n let timeOut = null;\r\n const complete = () => {\r\n target.classList.remove(Namespace.css.collapsing);\r\n target.classList.add(Namespace.css.collapse);\r\n timeOut = null;\r\n };\r\n\r\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\r\n\r\n const reflow = (element) => element.offsetHeight;\r\n\r\n reflow(target);\r\n\r\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\r\n target.classList.add(Namespace.css.collapsing);\r\n target.style.height = '';\r\n\r\n timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n }\r\n\r\n /**\r\n * Gets the transition duration from the `element` by getting css properties\r\n * `transition-duration` and `transition-delay`\r\n * @param element HTML Element\r\n */\r\n private static getTransitionDurationFromElement = (element: HTMLElement) => {\r\n if (!element) {\r\n return 0;\r\n }\r\n\r\n // Get transition-duration of the element\r\n let { transitionDuration, transitionDelay } =\r\n window.getComputedStyle(element);\r\n\r\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\r\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\r\n\r\n // Return 0 if element or transition duration is not found\r\n if (!floatTransitionDuration && !floatTransitionDelay) {\r\n return 0;\r\n }\r\n\r\n // If multiple durations are defined, take the first\r\n transitionDuration = transitionDuration.split(',')[0];\r\n transitionDelay = transitionDelay.split(',')[0];\r\n\r\n return (\r\n (Number.parseFloat(transitionDuration) +\r\n Number.parseFloat(transitionDelay)) *\r\n 1000\r\n );\r\n };\r\n}\r\n","import DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport { createPopper } from '@popperjs/core';\r\nimport Namespace from '../utilities/namespace';\r\nimport { HideEvent } from '../utilities/event-types';\r\nimport Collapse from './collapse';\r\nimport { OptionsStore } from '../utilities/options';\r\nimport Validation from '../validation';\r\nimport Dates from '../dates';\r\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\r\nimport { serviceLocator } from '../utilities/service-locator';\r\nimport ActionTypes from '../utilities/action-types';\r\nimport CalendarModes from '../utilities/calendar-modes';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _widget: HTMLElement;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n dateDisplay: DateDisplay;\r\n monthDisplay: MonthDisplay;\r\n yearDisplay: YearDisplay;\r\n decadeDisplay: DecadeDisplay;\r\n timeDisplay: TimeDisplay;\r\n hourDisplay: HourDisplay;\r\n minuteDisplay: MinuteDisplay;\r\n secondDisplay: SecondDisplay;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.dates = serviceLocator.locate(Dates);\r\n\r\n this.dateDisplay = serviceLocator.locate(DateDisplay);\r\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\r\n this.yearDisplay = serviceLocator.locate(YearDisplay);\r\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\r\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\r\n this.hourDisplay = serviceLocator.locate(HourDisplay);\r\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\r\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this._widget = undefined;\r\n\r\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\r\n this._update(result);\r\n });\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: ViewUpdateValues): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this.secondDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.minutes:\r\n this.minuteDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.hours:\r\n this.hourDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.date:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.month:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.year:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this.timeDisplay._update(this.widget);\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n // noinspection JSUnusedLocalSymbols\r\n /**\r\n * Allows developers to add/remove classes from an element.\r\n * @param _unit\r\n * @param _date\r\n * @param _classes\r\n * @param _element\r\n */\r\n paint(_unit: Unit | 'decade', _date: DateTime, _classes: string[], _element: HTMLElement) {\r\n // implemented in plugin\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * @fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (this.dates.picked.length == 0) {\r\n if (\r\n this.optionsStore.options.useCurrent &&\r\n !this.optionsStore.options.defaultDate\r\n ) {\r\n const date = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n if (!this.optionsStore.options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (this.optionsStore.options.restrictions.maxDate?.isBefore(date)) {\r\n direction = -1;\r\n }\r\n while (!this.validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this.dates.setValue(date);\r\n }\r\n \r\n if (this.optionsStore.options.defaultDate) {\r\n this.dates.setValue(this.optionsStore.options.defaultDate);\r\n }\r\n }\r\n\r\n this._buildWidget();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this.optionsStore.currentView = 'clock';\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n // otherwise return to the calendar view\r\n if (!this.optionsStore.currentCalendarViewMode) {\r\n this.optionsStore.currentCalendarViewMode =\r\n this.optionsStore.minimumCalendarViewMode;\r\n }\r\n\r\n if (!onlyClock) {\r\n if (this._hasTime) {\r\n Collapse.hide(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n }\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.dateContainer}`)\r\n );\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this.optionsStore.options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this.optionsStore.options?.container || document.body;\r\n container.appendChild(this.widget);\r\n\r\n this._popperInstance = createPopper(\r\n this.optionsStore.element,\r\n this.widget,\r\n {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start',\r\n }\r\n );\r\n } else {\r\n this.optionsStore.element.appendChild(this.widget);\r\n }\r\n\r\n if (this.optionsStore.options.display.viewMode == 'clock') {\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\r\n this.timeDisplay._update(this.widget);\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this.optionsStore.options.display.inline) {\r\n this._popperInstance.update();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\r\n );\r\n if (this.optionsStore.currentCalendarViewMode == max) return;\r\n this.optionsStore.currentCalendarViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.daysContainer:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n this._eventEmitters.viewUpdate.emit();\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList,\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextMonth\r\n );\r\n switcher.innerText = this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n );\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * @fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.hide,\r\n date: this.optionsStore.unset\r\n ? null\r\n : this.dates.lastPicked\r\n ? this.dates.lastPicked.clone\r\n : void 0,\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this.getHeadTemplate(),\r\n this.decadeDisplay.getPicker(),\r\n this.yearDisplay.getPicker(),\r\n this.monthDisplay.getPicker(),\r\n this.dateDisplay.getPicker()\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\r\n timeView.appendChild(this.hourDisplay.getPicker());\r\n timeView.appendChild(this.minuteDisplay.getPicker());\r\n timeView.appendChild(this.secondDisplay.getPicker());\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this.getToolbarElements());\r\n\r\n if (this.optionsStore.options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.clock &&\r\n (this.optionsStore.options.display.components.hours ||\r\n this.optionsStore.options.display.components.minutes ||\r\n this.optionsStore.options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.calendar &&\r\n (this.optionsStore.options.display.components.year ||\r\n this.optionsStore.options.display.components.month ||\r\n this.optionsStore.options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n getToolbarElements(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this.optionsStore.options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this.optionsStore.options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this.optionsStore.options.display.viewMode === 'clock') {\r\n title = this.optionsStore.options.localization.selectDate;\r\n icon = this.optionsStore.options.display.icons.date;\r\n } else {\r\n title = this.optionsStore.options.localization.selectTime;\r\n icon = this.optionsStore.options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this.optionsStore.options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this.optionsStore.options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n getHeadTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.next)\r\n );\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then an svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement {\r\n if (this.optionsStore.options.display.icons.type === 'sprites') {\r\n const svg = document.createElement('svg');\r\n svg.innerHTML = ``;\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this.optionsStore.options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._eventEmitters.action.emit({ e: e });\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n\r\nexport type Paint = (\r\n unit: Unit | 'decade',\r\n innerDate: DateTime,\r\n classes: string[],\r\n element: HTMLElement\r\n) => void;\r\n","import { DateTime, Unit } from './datetime';\nimport Collapse from './display/collapse';\nimport Namespace from './utilities/namespace';\nimport { OptionsStore } from './utilities/options';\nimport Dates from './dates';\nimport Validation from './validation';\nimport Display from './display';\nimport { EventEmitters } from './utilities/event-emitter';\nimport { serviceLocator } from './utilities/service-locator.js';\nimport ActionTypes from './utilities/action-types';\nimport CalendarModes from './utilities/calendar-modes';\n\n/**\n *\n */\nexport default class Actions {\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n private display: Display;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n this.display = serviceLocator.locate(Display);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n\n this._eventEmitters.action.subscribe((result) => {\n this.do(result.e, result.action);\n });\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e?.currentTarget;\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\n return false;\n action = action || currentTarget?.dataset?.action;\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\n .clone;\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n this.handleNextPrevious(action);\n break;\n case ActionTypes.changeCalendarView:\n this.display._showMode(1);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.dataset.value;\n switch (action) {\n case ActionTypes.selectMonth:\n this.optionsStore.viewDate.month = value;\n break;\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n this.optionsStore.viewDate.year = value;\n break;\n }\n\n if (\n this.optionsStore.currentCalendarViewMode ===\n this.optionsStore.minimumCalendarViewMode\n ) {\n this.dates.setValue(\n this.optionsStore.viewDate,\n this.dates.lastPickedIndex\n );\n if (!this.optionsStore.options.display.inline) {\n this.display.hide();\n }\n } else {\n this.display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this.optionsStore.viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.dataset.day;\n let index = 0;\n if (this.optionsStore.options.multipleDates) {\n index = this.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this.dates.setValue(null, index); //deselect multi-date\n } else {\n this.dates.setValue(day, this.dates.lastPickedIndex + 1);\n }\n } else {\n this.dates.setValue(day, this.dates.lastPickedIndex);\n }\n\n if (\n !this.display._hasTime &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline &&\n !this.optionsStore.options.multipleDates\n ) {\n this.display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.dataset.value;\n if (\n lastPicked.hours >= 12 &&\n !this.optionsStore.options.display.components.useTwentyfourHour\n )\n hour += 12;\n lastPicked.hours = hour;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n case ActionTypes.incrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping\n );\n break;\n case ActionTypes.incrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping * -1\n );\n break;\n case ActionTypes.decrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\n break;\n case ActionTypes.toggleMeridiem:\n this.manipulateAndSet(\n lastPicked,\n Unit.hours,\n this.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n if (\n currentTarget.getAttribute('title') ===\n this.optionsStore.options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectTime\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.time\n ).outerHTML;\n\n this.display._updateCalendarHeader();\n this.optionsStore.refreshCurrentView();\n } \n else {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectDate\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.date\n ).outerHTML;\n if (this.display._hasTime) {\n this.do(e, ActionTypes.showClock);\n this.display._update('clock');\n }\n }\n this.display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\n this._eventEmitters.viewUpdate.emit();\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this.optionsStore.currentView = 'clock';\n this.display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this.display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this.display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this.display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this.display._update(Unit.seconds);\n break;\n }\n\n ((\n this.display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this.dates.setValue(null);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this.display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this.optionsStore.options.localization.locale\n );\n this.optionsStore.viewDate = today;\n if (this.validation.isValid(today, Unit.date))\n this.dates.setValue(today, this.dates.lastPickedIndex);\n break;\n }\n }\n\n private handleNextPrevious(action: ActionTypes) {\n const { unit, step } =\n CalendarModes[this.optionsStore.currentCalendarViewMode];\n if (action === ActionTypes.next)\n this.optionsStore.viewDate.manipulate(step, unit);\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\n this._eventEmitters.viewUpdate.emit();\n\n this.display._showMode();\n }\n\n /**\n * After setting the value it will either show the clock or hide the widget.\n * @param e\n */\n private hideOrClock(e) {\n if (\n this.optionsStore.options.display.components.useTwentyfourHour &&\n !this.optionsStore.options.display.components.minutes &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline\n ) {\n this.display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n }\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * @param lastPicked\n * @param unit\n * @param value Value to change by\n */\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\n const newDate = lastPicked.manipulate(value, unit);\n if (this.validation.isValid(newDate, unit)) {\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\n }\n }\n}\n","import Display from './display/index';\r\nimport Validation from './validation';\r\nimport Dates from './dates';\r\nimport Actions from './actions';\r\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport Options, { OptionConverter, OptionsStore } from './utilities/options';\r\nimport {\r\n BaseEvent,\r\n ChangeEvent,\r\n ViewUpdateEvent,\r\n FailEvent,\r\n} from './utilities/event-types';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {\r\n serviceLocator,\r\n setupServiceLocator,\r\n} from './utilities/service-locator';\r\nimport CalendarModes from './utilities/calendar-modes';\r\nimport DefaultOptions from './utilities/default-options';\r\nimport ActionTypes from './utilities/action-types';\r\n\r\n/**\r\n * A robust and powerful date/time picker component.\r\n */\r\nclass TempusDominus {\r\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\r\n private _isDisabled = false;\r\n private _toggle: HTMLElement;\r\n private _currentPromptTimeTimeout: any;\r\n private actions: Actions;\r\n private optionsStore: OptionsStore;\r\n private _eventEmitters: EventEmitters;\r\n display: Display;\r\n dates: Dates;\r\n\r\n constructor(element: HTMLElement, options: Options = {} as Options) {\r\n setupServiceLocator();\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.display = serviceLocator.locate(Display);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.actions = serviceLocator.locate(Actions);\r\n\r\n if (!element) {\r\n Namespace.errorMessages.mustProvideElement();\r\n }\r\n\r\n this.optionsStore.element = element;\r\n this._initializeOptions(options, DefaultOptions, true);\r\n this.optionsStore.viewDate.setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.unset = true;\r\n\r\n this._initializeInput();\r\n this._initializeToggle();\r\n\r\n if (this.optionsStore.options.display.inline) this.display.show();\r\n\r\n this._eventEmitters.triggerEvent.subscribe((e) => {\r\n this._triggerEvent(e);\r\n });\r\n\r\n this._eventEmitters.viewUpdate.subscribe(() => {\r\n this._viewUpdate();\r\n });\r\n }\r\n\r\n get viewDate() {\r\n return this.optionsStore.viewDate;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\r\n * @param options\r\n * @param reset\r\n * @public\r\n */\r\n updateOptions(options, reset = false): void {\r\n if (reset) this._initializeOptions(options, DefaultOptions);\r\n else this._initializeOptions(options, this.optionsStore.options);\r\n this.display._rebuild();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\r\n * @public\r\n */\r\n toggle(): void {\r\n if (this._isDisabled) return;\r\n this.display.toggle();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Shows the picker unless the picker is disabled.\r\n * @public\r\n */\r\n show(): void {\r\n if (this._isDisabled) return;\r\n this.display.show();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker unless the picker is disabled.\r\n * @public\r\n */\r\n hide(): void {\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Disables the picker and the target input field.\r\n * @public\r\n */\r\n disable(): void {\r\n this._isDisabled = true;\r\n // todo this might be undesired. If a dev disables the input field to\r\n // only allow using the picker, this will break that.\r\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Enables the picker and the target input field.\r\n * @public\r\n */\r\n enable(): void {\r\n this._isDisabled = false;\r\n this.optionsStore.input?.removeAttribute('disabled');\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Clears all the selected dates\r\n * @public\r\n */\r\n clear(): void {\r\n this.dates.clear();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\r\n * @param eventTypes See Namespace.Events\r\n * @param callbacks Function to call when event is triggered\r\n * @public\r\n */\r\n subscribe(\r\n eventTypes: string | string[],\r\n callbacks: (event: any) => void | ((event: any) => void)[]\r\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\r\n if (typeof eventTypes === 'string') {\r\n eventTypes = [eventTypes];\r\n }\r\n let callBackArray = [];\r\n if (!Array.isArray(callbacks)) {\r\n callBackArray = [callbacks];\r\n } else {\r\n callBackArray = callbacks;\r\n }\r\n\r\n if (eventTypes.length !== callBackArray.length) {\r\n Namespace.errorMessages.subscribeMismatch();\r\n }\r\n\r\n const returnArray = [];\r\n\r\n for (let i = 0; i < eventTypes.length; i++) {\r\n const eventType = eventTypes[i];\r\n if (!Array.isArray(this._subscribers[eventType])) {\r\n this._subscribers[eventType] = [];\r\n }\r\n\r\n this._subscribers[eventType].push(callBackArray[i]);\r\n\r\n returnArray.push({\r\n unsubscribe: this._unsubscribe.bind(\r\n this,\r\n eventType,\r\n this._subscribers[eventType].length - 1\r\n ),\r\n });\r\n\r\n if (eventTypes.length === 1) {\r\n return returnArray[0];\r\n }\r\n }\r\n\r\n return returnArray;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker and removes event listeners\r\n */\r\n dispose() {\r\n this.display.hide();\r\n // this will clear the document click event listener\r\n this.display._dispose();\r\n this.optionsStore.input?.removeEventListener(\r\n 'change',\r\n this._inputChangeEvent\r\n );\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input?.removeEventListener(\r\n 'click',\r\n this._toggleClickEvent\r\n );\r\n }\r\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\r\n this._subscribers = {};\r\n }\r\n\r\n /**\r\n * Updates the options to use the provided language.\r\n * THe language file must be loaded first.\r\n * @param language\r\n */\r\n locale(language: string) {\r\n let asked = loadedLocales[language];\r\n if (!asked) return;\r\n this.updateOptions({\r\n localization: asked,\r\n });\r\n }\r\n\r\n /**\r\n * Triggers an event like ChangeEvent when the picker has updated the value\r\n * of a selected date.\r\n * @param event Accepts a BaseEvent object.\r\n * @private\r\n */\r\n private _triggerEvent(event: BaseEvent) {\r\n event.viewMode = this.optionsStore.currentView;\r\n\r\n const isChangeEvent = event.type === Namespace.events.change;\r\n if (isChangeEvent) {\r\n const { date, oldDate, isClear } = event as ChangeEvent;\r\n if (\r\n (date && oldDate && date.isSame(oldDate)) ||\r\n (!isClear && !date && !oldDate)\r\n ) {\r\n return;\r\n }\r\n this._handleAfterChangeEvent(event as ChangeEvent);\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n }\r\n\r\n this.optionsStore.element.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n if ((window as any).jQuery) {\r\n const $ = (window as any).jQuery;\r\n\r\n if (isChangeEvent && this.optionsStore.input) {\r\n $(this.optionsStore.input).trigger(event);\r\n } else {\r\n $(this.optionsStore.element).trigger(event);\r\n }\r\n }\r\n\r\n this._publish(event);\r\n }\r\n\r\n private _publish(event: BaseEvent) {\r\n // return if event is not subscribed\r\n if (!Array.isArray(this._subscribers[event.type])) {\r\n return;\r\n }\r\n\r\n // Trigger callback for each subscriber\r\n this._subscribers[event.type].forEach((callback) => {\r\n callback(event);\r\n });\r\n }\r\n\r\n /**\r\n * Fires a ViewUpdate event when, for example, the month view is changed.\r\n * @param {Unit} unit\r\n * @private\r\n */\r\n private _viewUpdate() {\r\n this._triggerEvent({\r\n type: Namespace.events.update,\r\n viewDate: this.optionsStore.viewDate.clone,\r\n } as ViewUpdateEvent);\r\n }\r\n\r\n private _unsubscribe(eventName, index) {\r\n this._subscribers[eventName].splice(index, 1);\r\n }\r\n\r\n /**\r\n * Merges two Option objects together and validates options type\r\n * @param config new Options\r\n * @param mergeTo Options to merge into\r\n * @param includeDataset When true, the elements data-td attributes will be included in the\r\n * @private\r\n */\r\n private _initializeOptions(\r\n config: Options,\r\n mergeTo: Options,\r\n includeDataset = false\r\n ): void {\r\n config = OptionConverter._mergeOptions(config, mergeTo);\r\n if (includeDataset)\r\n config = OptionConverter._dataToOptions(\r\n this.optionsStore.element,\r\n config\r\n );\r\n\r\n OptionConverter._validateConflcits(config);\r\n\r\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\r\n\r\n if (!this.optionsStore.viewDate.isSame(config.viewDate)) {\r\n this.optionsStore.viewDate = config.viewDate;\r\n }\r\n\r\n /**\r\n * Sets the minimum view allowed by the picker. For example the case of only\r\n * allowing year and month to be selected but not date.\r\n */\r\n if (config.display.components.year) {\r\n this.optionsStore.minimumCalendarViewMode = 2;\r\n }\r\n if (config.display.components.month) {\r\n this.optionsStore.minimumCalendarViewMode = 1;\r\n }\r\n if (config.display.components.date) {\r\n this.optionsStore.minimumCalendarViewMode = 0;\r\n }\r\n\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n this.optionsStore.currentCalendarViewMode\r\n );\r\n\r\n // Update view mode if needed\r\n if (\r\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\r\n config.display.viewMode\r\n ) {\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n CalendarModes.findIndex((x) => x.name === config.display.viewMode),\r\n this.optionsStore.minimumCalendarViewMode\r\n );\r\n }\r\n\r\n if (this.display?.isVisible) {\r\n this.display._update('all');\r\n }\r\n\r\n this.optionsStore.options = config;\r\n }\r\n\r\n /**\r\n * Checks if an input field is being used, attempts to locate one and sets an\r\n * event listener if found.\r\n * @private\r\n */\r\n private _initializeInput() {\r\n if (this.optionsStore.element.tagName == 'INPUT') {\r\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\r\n } else {\r\n let query = this.optionsStore.element.dataset.tdTargetInput;\r\n if (query == undefined || query == 'nearest') {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector('input');\r\n } else {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector(query);\r\n }\r\n }\r\n\r\n if (!this.optionsStore.input) return;\r\n\r\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n if (this.optionsStore.input.value) {\r\n this._inputChangeEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to locate a toggle for the picker and sets an event listener\r\n * @private\r\n */\r\n private _initializeToggle() {\r\n if (this.optionsStore.options.display.inline) return;\r\n let query = this.optionsStore.element.dataset.tdTargetToggle;\r\n if (query == 'nearest') {\r\n query = '[data-td-toggle=\"datetimepicker\"]';\r\n }\r\n this._toggle =\r\n query == undefined\r\n ? this.optionsStore.element\r\n : this.optionsStore.element.querySelector(query);\r\n this._toggle.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n /**\r\n * If the option is enabled this will render the clock view after a date pick.\r\n * @param e change event\r\n * @private\r\n */\r\n private _handleAfterChangeEvent(e: ChangeEvent) {\r\n if (\r\n // options is disabled\r\n !this.optionsStore.options.promptTimeOnDateChange ||\r\n this.optionsStore.options.display.inline ||\r\n this.optionsStore.options.display.sideBySide ||\r\n // time is disabled\r\n !this.display._hasTime ||\r\n // clock component is already showing\r\n this.display.widget\r\n ?.getElementsByClassName(Namespace.css.show)[0]\r\n .classList.contains(Namespace.css.timeContainer)\r\n )\r\n return;\r\n\r\n // First time ever. If useCurrent option is set to true (default), do nothing\r\n // because the first date is selected automatically.\r\n // or date didn't change (time did) or date changed because time did.\r\n if (\r\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\r\n (e.oldDate && e.date?.isSame(e.oldDate))\r\n ) {\r\n return;\r\n }\r\n\r\n clearTimeout(this._currentPromptTimeTimeout);\r\n this._currentPromptTimeTimeout = setTimeout(() => {\r\n if (this.display.widget) {\r\n this._eventEmitters.action.emit({\r\n e: {\r\n currentTarget: this.display.widget.querySelector(\r\n `.${Namespace.css.switch} div`\r\n ),\r\n },\r\n action: ActionTypes.togglePicker,\r\n });\r\n }\r\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\r\n }\r\n\r\n /**\r\n * Event for when the input field changes. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _inputChangeEvent = () => {\r\n const setViewDate = () => {\r\n if (this.dates.lastPicked)\r\n this.optionsStore.viewDate = this.dates.lastPicked;\r\n };\r\n\r\n const value = this.optionsStore.input.value;\r\n if (this.optionsStore.options.multipleDates) {\r\n try {\r\n const valueSplit = value.split(\r\n this.optionsStore.options.multipleDatesSeparator\r\n );\r\n for (let i = 0; i < valueSplit.length; i++) {\r\n this.dates.setFromInput(valueSplit[i], i);\r\n }\r\n setViewDate();\r\n } catch {\r\n console.warn(\r\n 'TD: Something went wrong trying to set the multidate values from the input field.'\r\n );\r\n }\r\n } else {\r\n this.dates.setFromInput(value, 0);\r\n setViewDate();\r\n }\r\n };\r\n\r\n /**\r\n * Event for when the toggle is clicked. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _toggleClickEvent = () => {\r\n this.toggle();\r\n };\r\n}\r\n\r\n/**\r\n * Whenever a locale is loaded via a plugin then store it here based on the\r\n * locale name. E.g. loadedLocales['ru']\r\n */\r\nconst loadedLocales = {};\r\n\r\n/**\r\n * Called from a locale plugin.\r\n * @param locale locale object for localization options\r\n * @param name name of the language e.g 'ru', 'en-gb'\r\n */\r\nconst loadLocale = (locale) => {\r\n if (loadedLocales[locale.name]) return;\r\n loadedLocales[locale.name] = locale.localization;\r\n};\r\n\r\n/**\r\n * A sets the global localization options to the provided locale name.\r\n * `locadLocale` MUST be called first.\r\n * @param locale\r\n */\r\nconst locale = (locale: string) => {\r\n let asked = loadedLocales[locale];\r\n if (!asked) return;\r\n DefaultOptions.localization = asked;\r\n};\r\n\r\nconst extend = function (plugin, option) {\r\n if (!plugin.$i) {\r\n // install plugin only once\r\n plugin.load(option, { TempusDominus, Dates, Display }, this);\r\n plugin.$i = true;\r\n }\r\n return this;\r\n};\r\n\r\nexport {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\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;;;AAIA,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB;;;;;MAKM,UAAU,GAAG,CAAC,MAAM;IACxB,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO;IACvC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;AACnD,EAAE;AAEF;;;;;MAKM,MAAM,GAAG,CAAC,MAAc;IAC5B,IAAI,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,cAAc,CAAC,YAAY,GAAG,KAAK,CAAC;AACtC,EAAE;MAEI,MAAM,GAAG,UAAU,MAAM,EAAE,MAAM;IACrC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;;QAEd,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QAC7D,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;KAClB;IACD,OAAO,IAAI,CAAC;AACd;;;;"} \ No newline at end of file diff --git a/dist/js/tempus-dominus.esm.min.js b/dist/js/tempus-dominus.esm.min.js new file mode 100644 index 000000000..178e54c76 --- /dev/null +++ b/dist/js/tempus-dominus.esm.min.js @@ -0,0 +1,6 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +import{createPopper as t}from"@popperjs/core";var e;!function(t){t.seconds="seconds",t.minutes="minutes",t.hours="hours",t.date="date",t.month="month",t.year="year"}(e||(e={}));const s=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}};class i extends Date{constructor(){super(...arguments),this.locale="default",this.nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],this.leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335]}setLocale(t){return this.locale=t,this}static convert(t,e="default"){if(!t)throw new Error("A date is required");return new i(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocale(e)}get clone(){return new i(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocale(this.locale)}startOf(t,s=0){if(void 0===this[t])throw new Error(`Unit '${t}' is not valid`);switch(t){case"seconds":this.setMilliseconds(0);break;case"minutes":this.setSeconds(0,0);break;case"hours":this.setMinutes(0,0,0);break;case"date":this.setHours(0,0,0,0);break;case"weekDay":if(this.startOf(e.date),this.weekDay===s)break;let t=this.weekDay;0!==s&&0===this.weekDay&&(t=8-s),this.manipulate(s-t,e.date);break;case"month":this.startOf(e.date),this.setDate(1);break;case"year":this.startOf(e.date),this.setMonth(0,1)}return this}endOf(t,s=0){if(void 0===this[t])throw new Error(`Unit '${t}' is not valid`);switch(t){case"seconds":this.setMilliseconds(999);break;case"minutes":this.setSeconds(59,999);break;case"hours":this.setMinutes(59,59,999);break;case"date":this.setHours(23,59,59,999);break;case"weekDay":this.endOf(e.date),this.manipulate(6+s-this.weekDay,e.date);break;case"month":this.endOf(e.date),this.manipulate(1,e.month),this.setDate(0);break;case"year":this.endOf(e.date),this.manipulate(1,e.year),this.setDate(0)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}format(t,e=this.locale){return new Intl.DateTimeFormat(e,t).format(this)}isBefore(t,e){if(!e)return this.valueOf()t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this.clone.startOf(e).valueOf()>t.clone.startOf(e).valueOf()}isSame(t,e){if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=i.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1];return(o?this.isAfter(t,s):!this.isBefore(t,s))&&(a?this.isBefore(e,s):!this.isAfter(e,s))||(o?this.isBefore(t,s):!this.isAfter(t,s))&&(a?this.isAfter(e,s):!this.isBefore(e,s))}parts(t=this.locale,e={dateStyle:"full",timeStyle:"long"}){const s={};return new Intl.DateTimeFormat(t,e).formatToParts(this).filter((t=>"literal"!==t.type)).forEach((t=>s[t.type]=t.value)),s}get seconds(){return this.getSeconds()}set seconds(t){this.setSeconds(t)}get secondsFormatted(){return this.seconds<10?`0${this.seconds}`:`${this.seconds}`}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.minutes<10?`0${this.minutes}`:`${this.minutes}`}get hours(){return this.getHours()}set hours(t){this.setHours(t)}get hoursFormatted(){let t=this.format({hour:"2-digit",hour12:!1});return"24"===t&&(t="00"),t}get twelveHoursFormatted(){let t=this.parts().hour;return 1===t.length&&(t=`0${t}`),t}meridiem(t=this.locale){var e;return null===(e=new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0}).formatToParts(this).find((t=>"dayPeriod"===t.type)))||void 0===e?void 0:e.value}get date(){return this.getDate()}set date(t){this.setDate(t)}get dateFormatted(){return this.date<10?`0${this.date}`:`${this.date}`}get weekDay(){return this.getDay()}get month(){return this.getMonth()}set month(t){const e=new Date(this.year,t+1);e.setDate(0);const s=e.getDate();this.date>s&&(this.date=s),this.setMonth(t)}get monthFormatted(){return this.month+1<10?`0${this.month}`:`${this.month}`}get year(){return this.getFullYear()}set year(t){this.setFullYear(t)}get week(){const t=this.computeOrdinal(),e=this.getUTCDay();let s=Math.floor((t-e+10)/7);return s<1?s=this.weeksInWeekYear(this.year-1):s>this.weeksInWeekYear(this.year)&&(s=1),s}weeksInWeekYear(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,s=t-1,i=(s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400))%7;return 4===e||3===i?53:52}get isLeapYear(){return this.year%4==0&&(this.year%100!=0||this.year%400==0)}computeOrdinal(){return this.date+(this.isLeapYear?this.leapLadder:this.nonLeapLadder)[this.month]}}class o extends Error{}const a="tempus-dominus";class n{}n.NAME=a,n.version="6.0.0-beta4",n.dataKey="td",n.events=new class{constructor(){this.key=".td",this.change=`change${this.key}`,this.update=`update${this.key}`,this.error=`error${this.key}`,this.show=`show${this.key}`,this.hide=`hide${this.key}`,this.blur=`blur${this.key}`,this.focus=`focus${this.key}`,this.keyup=`keyup${this.key}`,this.keydown=`keydown${this.key}`}},n.css=new class{constructor(){this.widget=`${a}-widget`,this.calendarHeader="calendar-header",this.switch="picker-switch",this.toolbar="toolbar",this.noHighlight="no-highlight",this.sideBySide="timepicker-sbs",this.previous="previous",this.next="next",this.disabled="disabled",this.old="old",this.new="new",this.active="active",this.dateContainer="date-container",this.decadesContainer=`${this.dateContainer}-decades`,this.decade="decade",this.yearsContainer=`${this.dateContainer}-years`,this.year="year",this.monthsContainer=`${this.dateContainer}-months`,this.month="month",this.daysContainer=`${this.dateContainer}-days`,this.day="day",this.calendarWeeks="cw",this.dayOfTheWeek="dow",this.today="today",this.weekend="weekend",this.timeContainer="time-container",this.separator="separator",this.clockContainer=`${this.timeContainer}-clock`,this.hourContainer=`${this.timeContainer}-hour`,this.minuteContainer=`${this.timeContainer}-minute`,this.secondContainer=`${this.timeContainer}-second`,this.hour="hour",this.minute="minute",this.second="second",this.toggleMeridiem="toggleMeridiem",this.show="show",this.collapsing="td-collapsing",this.collapse="td-collapse",this.inline="inline"}},n.errorMessages=new class{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(t){const e=new o(`${this.base} Unexpected option: ${t} does not match a known option.`);throw e.code=1,e}unexpectedOptions(t){const e=new o(`${this.base}: ${t.join(", ")}`);throw e.code=1,e}unexpectedOptionValue(t,e,s){const i=new o(`${this.base} Unexpected option value: ${t} does not accept a value of "${e}". Valid values are: ${s.join(", ")}`);throw i.code=2,i}typeMismatch(t,e,s){const i=new o(`${this.base} Mismatch types: ${t} has a type of ${e} instead of the required ${s}`);throw i.code=3,i}numbersOutOfRage(t,e,s){const i=new o(`${this.base} ${t} expected an array of number between ${e} and ${s}.`);throw i.code=4,i}failedToParseDate(t,e,s=!1){const i=new o(`${this.base} Could not correctly parse "${e}" to a date for ${t}.`);if(i.code=5,!s)throw i;console.warn(i)}mustProvideElement(){const t=new o(`${this.base} No element was provided.`);throw t.code=6,t}subscribeMismatch(){const t=new o(`${this.base} The subscribed events does not match the number of callbacks`);throw t.code=7,t}conflictingConfiguration(t){const e=new o(`${this.base} A configuration value conflicts with another rule. ${t}`);throw e.code=8,e}dateString(){console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string.`)}};const r=[{name:"calendar",className:n.css.daysContainer,unit:e.month,step:1},{name:"months",className:n.css.monthsContainer,unit:e.year,step:1},{name:"years",className:n.css.yearsContainer,unit:e.year,step:10},{name:"decades",className:n.css.decadesContainer,unit:e.year,step:100}],d={restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},display:{icons:{type:"icons",time:"fa-solid fa-clock",date:"fa-solid fa-calendar",up:"fa-solid fa-arrow-up",down:"fa-solid fa-arrow-down",previous:"fa-solid fa-chevron-left",next:"fa-solid fa-chevron-right",today:"fa-solid fa-calendar-check",clear:"fa-solid fa-trash",close:"fa-solid fa-xmark"},sideBySide:!1,calendarWeeks:!1,viewMode:"calendar",toolbarPlacement:"bottom",keepOpen:!1,buttons:{today:!1,clear:!1,close:!1},components:{calendar:!0,date:!0,month:!0,year:!0,decades:!0,clock:!0,hours:!0,minutes:!0,seconds:!1,useTwentyfourHour:!1},inline:!1},stepping:1,useCurrent:!0,defaultDate:void 0,localization:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",previousMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",previousYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",previousDecade:"Previous Decade",nextDecade:"Next Decade",previousCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",toggleMeridiem:"Toggle Meridiem",selectTime:"Select Time",selectDate:"Select Date",dayViewHeaderFormat:{month:"long",year:"2-digit"},locale:"default",startOfTheWeek:0},keepInvalid:!1,debug:!1,allowInputToggle:!1,viewDate:new i,multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,meta:{},container:void 0};class l{constructor(){this.viewDate=new i,this._currentCalendarViewMode=0,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=r[t].name}refreshCurrentView(){this.currentView=r[this.currentCalendarViewMode].name}}class c{static _mergeOptions(t,e){var s;const i={};let o="";const a=["meta","dayViewHeaderFormat","container"],r="default"!==e.localization.locale?e.localization.locale:(null===(s=null==t?void 0:t.localization)||void 0===s?void 0:s.locale)||"default",d=(t,e,s,i)=>{switch(t){case"defaultDate":{const t=this.dateConversion(e,"defaultDate");if(void 0!==t)return t.setLocale(r),t;n.errorMessages.typeMismatch("defaultDate",s,"DateTime or Date");break}case"viewDate":{const t=this.dateConversion(e,"viewDate");if(void 0!==t)return t.setLocale(r),t;n.errorMessages.typeMismatch("viewDate",s,"DateTime or Date");break}case"minDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.minDate");if(void 0!==t)return t.setLocale(r),t;n.errorMessages.typeMismatch("restrictions.minDate",s,"DateTime or Date");break}case"maxDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.maxDate");if(void 0!==t)return t.setLocale(r),t;n.errorMessages.typeMismatch("restrictions.maxDate",s,"DateTime or Date");break}case"disabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.disabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&n.errorMessages.numbersOutOfRage("restrictions.disabledHours",0,23),e);case"enabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.enabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&n.errorMessages.numbersOutOfRage("restrictions.enabledHours",0,23),e);case"daysOfWeekDisabled":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.daysOfWeekDisabled",e,s),e.filter((t=>t<0||t>6)).length>0&&n.errorMessages.numbersOutOfRage("restrictions.daysOfWeekDisabled",0,6),e);case"enabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.enabledDates",e,s,r),e);case"disabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.disabledDates",e,s,r),e);case"disabledTimeIntervals":if(void 0===e)return[];Array.isArray(e)||n.errorMessages.typeMismatch(t,s,"array of { from: DateTime|Date, to: DateTime|Date }");const a=e;for(let e=0;e{const i=`${t}[${e}].${s}`;let o=a[e][s];const d=this.dateConversion(o,i);d||n.errorMessages.typeMismatch(i,typeof o,"DateTime or Date"),d.setLocale(r),a[e][s]=d}));return a;case"toolbarPlacement":case"type":case"viewMode":const d={toolbarPlacement:["top","bottom","default"],type:["icons","sprites"],viewMode:["clock","calendar","months","years","decades"]}[t];return d.includes(e)||n.errorMessages.unexpectedOptionValue(o.substring(1),e,d),e;case"meta":case"dayViewHeaderFormat":return e;case"container":return e&&!(e instanceof HTMLElement||e instanceof Element||(null==e?void 0:e.appendChild))&&n.errorMessages.typeMismatch(o.substring(1),typeof e,"HTMLElement"),e;default:switch(i){case"boolean":return"true"===e||!0===e;case"number":return+e;case"string":return e.toString();case"object":return{};case"function":return e;default:n.errorMessages.typeMismatch(o.substring(1),s,i)}}},l=(t,e,s)=>{const i=Object.keys(t).filter((t=>!Object.keys(e).includes(t)));if(i.length>0){const t=c.getFlattenDefaultOptions(),e=i.map((e=>{let s=`"${o.substring(1)}.${e}" in not a known option.`,i=t.find((t=>t.includes(e)));return i&&(s+=`Did you mean "${i}"?`),s}));n.errorMessages.unexpectedOptions(e)}Object.keys(e).forEach((i=>{const n=e[i];let r=typeof t[i],c=typeof n,h=t[i];if(!t.hasOwnProperty(i)){if("undefined"===c||0===(null==h?void 0:h.length)&&Array.isArray(n))return void(s[i]=n);t[i]=n,h=t[i]}o+=`.${i}`,s[i]=d(i,h,r,c),"object"!=typeof n||a.includes(i)||Array.isArray(t[i])||(l(t[i],n,s[i]),o=o.substring(0,o.lastIndexOf(`.${i}`))),o=o.substring(0,o.lastIndexOf(`.${i}`))}))};return l(t,e,i),i}static _dataToOptions(t,e){const s=JSON.parse(JSON.stringify(t.dataset));if((null==s?void 0:s.tdTargetInput)&&delete s.tdTargetInput,(null==s?void 0:s.tdTargetToggle)&&delete s.tdTargetToggle,!s||0===Object.keys(s).length||s.constructor!==DOMStringMap)return e;let i={};const o=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},a=(t,e,s,i)=>{const n=o(s)[t[e].toLowerCase()],r={};return void 0===n||(s[n].constructor===Object?(e++,r[n]=a(t,e,s[n],i)):r[n]=i),r},r=o(e);return Object.keys(s).filter((t=>t.startsWith(n.dataKey))).map((t=>t.substring(2))).forEach((t=>{let o=r[t.toLowerCase()];if(t.includes("_")){const n=t.split("_");o=r[n[0].toLowerCase()],void 0!==o&&e[o].constructor===Object&&(i[o]=a(n,1,e[o],s[`td${t}`]))}else void 0!==o&&(i[o]=s[`td${t}`])})),this._mergeOptions(i,e)}static _dateTypeCheck(t){if(t.constructor.name===i.name)return t;if(t.constructor.name===Date.name)return i.convert(t);if("string"==typeof t){const e=new i(t);return"null"===JSON.stringify(e)?null:e}return null}static _typeCheckDateArray(t,e,s,i="default"){Array.isArray(e)||n.errorMessages.typeMismatch(t,s,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||n.errorMessages.typeMismatch(t,s,"array of numbers")}static dateConversion(t,e){"string"==typeof t&&"input"!==e&&n.errorMessages.dateString();const s=this._dateTypeCheck(t);return s||n.errorMessages.failedToParseDate(e,t,"input"===e),s}static getFlattenDefaultOptions(){if(this._flatback)return this._flatback;const t=(e,s=[])=>Array.isArray(e)?[]:Object(e)===e?Object.entries(e).flatMap((([e,i])=>t(i,[...s,e]))):s.join(".");return this._flatback=t(d),this._flatback}static _validateConflcits(t){!t.display.sideBySide||t.display.components.clock&&(t.display.components.hours||t.display.components.minutes||t.display.components.seconds)||n.errorMessages.conflictingConfiguration("Cannot use side by side mode without the clock components"),t.restrictions.minDate&&t.restrictions.maxDate&&(t.restrictions.minDate.isAfter(t.restrictions.maxDate)&&n.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&n.errorMessages.conflictingConfiguration("maxDate is before minDate"))}}class h{constructor(){this.cache=new Map}locate(t){const e=this.cache.get(t);if(e)return e;const s=new t;return this.cache.set(t,s),s}}let p;class u{constructor(){this.optionsStore=p.locate(l)}isValid(t,s){var i;if(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(t))return!1;if(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(t))return!1;if(s!==e.month&&s!==e.year&&(null===(i=this.optionsStore.options.restrictions.daysOfWeekDisabled)||void 0===i?void 0:i.length)>0&&-1!==this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(t.weekDay))return!1;if(this.optionsStore.options.restrictions.minDate&&t.isBefore(this.optionsStore.options.restrictions.minDate,s))return!1;if(this.optionsStore.options.restrictions.maxDate&&t.isAfter(this.optionsStore.options.restrictions.maxDate,s))return!1;if(s===e.hours||s===e.minutes||s===e.seconds){if(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(t))return!1;if(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(t))return!1;if(this.optionsStore.options.restrictions.disabledTimeIntervals.length>0)for(let e of this.optionsStore.options.restrictions.disabledTimeIntervals)if(t.isBetween(e.from,e.to))return!1}return!0}_isInDisabledDates(t){if(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)return!1;const i=t.format(s(e.date));return this.optionsStore.options.restrictions.disabledDates.map((t=>t.format(s(e.date)))).find((t=>t===i))}_isInEnabledDates(t){if(!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length)return!0;const i=t.format(s(e.date));return this.optionsStore.options.restrictions.enabledDates.map((t=>t.format(s(e.date)))).find((t=>t===i))}_isInDisabledHours(t){if(!this.optionsStore.options.restrictions.disabledHours||0===this.optionsStore.options.restrictions.disabledHours.length)return!1;const e=t.hours;return this.optionsStore.options.restrictions.disabledHours.find((t=>t===e))}_isInEnabledHours(t){if(!this.optionsStore.options.restrictions.enabledHours||0===this.optionsStore.options.restrictions.enabledHours.length)return!0;const e=t.hours;return this.optionsStore.options.restrictions.enabledHours.find((t=>t===e))}}class m{constructor(){this.subscribers=[]}subscribe(t){return this.subscribers.push(t),this.unsubscribe.bind(this,this.subscribers.length-1)}unsubscribe(t){this.subscribers.splice(t,1)}emit(t){this.subscribers.forEach((e=>{e(t)}))}destory(){this.subscribers=null,this.subscribers=[]}}class y{constructor(){this.triggerEvent=new m,this.viewUpdate=new m,this.updateDisplay=new m,this.action=new m}destory(){this.triggerEvent.destory(),this.viewUpdate.destory(),this.updateDisplay.destory(),this.action.destory()}}class v{constructor(){this._dates=[],this.optionsStore=p.locate(l),this.validation=p.locate(u),this._eventEmitters=p.locate(y)}get picked(){return this._dates}get lastPicked(){return this._dates[this.lastPickedIndex]}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){const e=this.optionsStore.options.display.components;return t?t.format({year:e.calendar&&e.year?"numeric":void 0,month:e.calendar&&e.month?"2-digit":void 0,day:e.calendar&&e.date?"2-digit":void 0,hour:e.clock&&e.hours?e.useTwentyfourHour?"2-digit":"numeric":void 0,minute:e.clock&&e.minutes?"2-digit":void 0,second:e.clock&&e.seconds?"2-digit":void 0,hour12:!e.useTwentyfourHour}):""}setFromInput(t,e){if(!t)return void this.setValue(void 0,e);const s=c.dateConversion(t,"input");s&&(s.setLocale(this.optionsStore.options.localization.locale),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!e)return void 0!==this._dates.find((e=>e===t));const i=s(e);let o=t.format(i);return void 0!==this._dates.map((t=>t.format(i))).find((t=>t===o))}pickedIndex(t,e){if(!e)return this._dates.indexOf(t);const i=s(e);let o=t.format(i);return this._dates.map((t=>t.format(i))).indexOf(o)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:n.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[]}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}setValue(t,e){const s=void 0===e,i=!t&&s;let o=this.optionsStore.unset?null:this._dates[e];!o&&!this.optionsStore.unset&&s&&i&&(o=this.lastPicked);const a=()=>{if(!this.optionsStore.input)return;let e=this.formatInput(t);this.optionsStore.options.multipleDates&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)};if(t&&(null==o?void 0:o.isSame(t)))a();else{if(!t)return!this.optionsStore.options.multipleDates||1===this._dates.length||i?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),this._eventEmitters.triggerEvent.emit({type:n.events.change,date:void 0,oldDate:o,isClear:i,isValid:!0}),a(),void this._eventEmitters.updateDisplay.emit("all");if(e=e||0,t=t.clone,1!==this.optionsStore.options.stepping&&(t.minutes=Math.round(t.minutes/this.optionsStore.options.stepping)*this.optionsStore.options.stepping,t.seconds=0),this.validation.isValid(t))return this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),void this._eventEmitters.triggerEvent.emit({type:n.events.change,date:t,oldDate:o,isClear:i,isValid:!0});this.optionsStore.options.keepInvalid&&(this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this._eventEmitters.triggerEvent.emit({type:n.events.change,date:t,oldDate:o,isClear:i,isValid:!1})),this._eventEmitters.triggerEvent.emit({type:n.events.error,reason:n.errorMessages.failedToSetInvalidDate,date:t,oldDate:o})}}}var g;!function(t){t.next="next",t.previous="previous",t.changeCalendarView="changeCalendarView",t.selectMonth="selectMonth",t.selectYear="selectYear",t.selectDecade="selectDecade",t.selectDay="selectDay",t.selectHour="selectHour",t.selectMinute="selectMinute",t.selectSecond="selectSecond",t.incrementHours="incrementHours",t.incrementMinutes="incrementMinutes",t.incrementSeconds="incrementSeconds",t.decrementHours="decrementHours",t.decrementMinutes="decrementMinutes",t.decrementSeconds="decrementSeconds",t.toggleMeridiem="toggleMeridiem",t.togglePicker="togglePicker",t.showClock="showClock",t.showHours="showHours",t.showMinutes="showMinutes",t.showSeconds="showSeconds",t.clear="clear",t.close="close",t.today="today"}(g||(g={}));var S=g;class b{constructor(){this.optionsStore=p.locate(l),this.dates=p.locate(v),this.validation=p.locate(u)}getPicker(){const t=document.createElement("div");if(t.classList.add(n.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(n.css.calendarWeeks,n.css.noHighlight),t.appendChild(e)}for(let e=0;e<42;e++){if(0!==e&&e%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(n.css.calendarWeeks,n.css.noHighlight),t.appendChild(e)}const s=document.createElement("div");s.setAttribute("data-action",S.selectDay),t.appendChild(s)}return t}_update(t,s){const o=t.getElementsByClassName(n.css.daysContainer)[0],[a,r,d]=o.parentElement.getElementsByClassName(n.css.calendarHeader)[0].getElementsByTagName("div");r.setAttribute(n.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.month),e.month)?a.classList.remove(n.css.disabled):a.classList.add(n.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.month),e.month)?d.classList.remove(n.css.disabled):d.classList.add(n.css.disabled);let l=this.optionsStore.viewDate.clone.startOf(e.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,e.hours);o.querySelectorAll(`[data-action="${S.selectDay}"], .${n.css.calendarWeeks}`).forEach((t=>{if(this.optionsStore.options.display.calendarWeeks&&t.classList.contains(n.css.calendarWeeks)){if("#"===t.innerText)return;return void(t.innerText=`${l.week}`)}let o=[];o.push(n.css.day),l.isBefore(this.optionsStore.viewDate,e.month)&&o.push(n.css.old),l.isAfter(this.optionsStore.viewDate,e.month)&&o.push(n.css.new),!this.optionsStore.unset&&this.dates.isPicked(l,e.date)&&o.push(n.css.active),this.validation.isValid(l,e.date)||o.push(n.css.disabled),l.isSame(new i,e.date)&&o.push(n.css.today),0!==l.weekDay&&6!==l.weekDay||o.push(n.css.weekend),s(e.date,l,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${l.year}-${l.monthFormatted}-${l.dateFormatted}`),t.setAttribute("data-day",`${l.date}`),t.innerText=l.format({day:"numeric"}),l.manipulate(1,e.date)}))}_daysOfTheWeek(){let t=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(e.date);const s=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(n.css.calendarWeeks,n.css.noHighlight),t.innerText="#",s.push(t)}for(let i=0;i<7;i++){const i=document.createElement("div");i.classList.add(n.css.dayOfTheWeek,n.css.noHighlight),i.innerText=t.format({weekday:"short"}),t.manipulate(1,e.date),s.push(i)}return s}}class f{constructor(){this.optionsStore=p.locate(l),this.dates=p.locate(v),this.validation=p.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(n.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectMonth),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(n.css.monthsContainer)[0],[o,a,r]=i.parentElement.getElementsByClassName(n.css.calendarHeader)[0].getElementsByTagName("div");a.setAttribute(n.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.year),e.year)?o.classList.remove(n.css.disabled):o.classList.add(n.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.year),e.year)?r.classList.remove(n.css.disabled):r.classList.add(n.css.disabled);let d=this.optionsStore.viewDate.clone.startOf(e.year);i.querySelectorAll(`[data-action="${S.selectMonth}"]`).forEach(((t,i)=>{let o=[];o.push(n.css.month),!this.optionsStore.unset&&this.dates.isPicked(d,e.month)&&o.push(n.css.active),this.validation.isValid(d,e.month)||o.push(n.css.disabled),s(e.month,d,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${i}`),t.innerText=`${d.format({month:"short"})}`,d.manipulate(1,e.month)}))}}class w{constructor(){this.optionsStore=p.locate(l),this.dates=p.locate(v),this.validation=p.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(n.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectYear),t.appendChild(e)}return t}_update(t,s){this._startYear=this.optionsStore.viewDate.clone.manipulate(-1,e.year),this._endYear=this.optionsStore.viewDate.clone.manipulate(10,e.year);const i=t.getElementsByClassName(n.css.yearsContainer)[0],[o,a,r]=i.parentElement.getElementsByClassName(n.css.calendarHeader)[0].getElementsByTagName("div");a.setAttribute(n.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.validation.isValid(this._startYear,e.year)?o.classList.remove(n.css.disabled):o.classList.add(n.css.disabled),this.validation.isValid(this._endYear,e.year)?r.classList.remove(n.css.disabled):r.classList.add(n.css.disabled);let d=this.optionsStore.viewDate.clone.startOf(e.year).manipulate(-1,e.year);i.querySelectorAll(`[data-action="${S.selectYear}"]`).forEach((t=>{let i=[];i.push(n.css.year),!this.optionsStore.unset&&this.dates.isPicked(d,e.year)&&i.push(n.css.active),this.validation.isValid(d,e.year)||i.push(n.css.disabled),s(e.year,d,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${d.year}`),t.innerText=d.format({year:"numeric"}),d.manipulate(1,e.year)}))}}class D{constructor(){this.optionsStore=p.locate(l),this.dates=p.locate(v),this.validation=p.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(n.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectDecade),t.appendChild(e)}return t}_update(t,s){const[i,o]=v.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(e.year),this._startDecade.year=i,this._endDecade=this.optionsStore.viewDate.clone.startOf(e.year),this._endDecade.year=o;const a=t.getElementsByClassName(n.css.decadesContainer)[0],[r,d,l]=a.parentElement.getElementsByClassName(n.css.calendarHeader)[0].getElementsByTagName("div");d.setAttribute(n.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,e.year)?r.classList.remove(n.css.disabled):r.classList.add(n.css.disabled),this.validation.isValid(this._endDecade,e.year)?l.classList.remove(n.css.disabled):l.classList.add(n.css.disabled);const c=this.dates.picked.map((t=>t.year));a.querySelectorAll(`[data-action="${S.selectDecade}"]`).forEach(((t,i)=>{if(0===i)return t.classList.add(n.css.old),this._startDecade.year-10<0?(t.textContent=" ",r.classList.add(n.css.disabled),t.classList.add(n.css.disabled),void t.setAttribute("data-value","")):(t.innerText=this._startDecade.clone.manipulate(-10,e.year).format({year:"numeric"}),void t.setAttribute("data-value",`${this._startDecade.year}`));let o=[];o.push(n.css.decade);const a=this._startDecade.year,d=this._startDecade.year+9;!this.optionsStore.unset&&c.filter((t=>t>=a&&t<=d)).length>0&&o.push(n.css.active),s("decade",this._startDecade,o,t),t.classList.remove(...t.classList),t.classList.add(...o),t.setAttribute("data-value",`${this._startDecade.year}`),t.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,e.year)}))}}class k{constructor(){this._gridColumns="",this.optionsStore=p.locate(l),this.dates=p.locate(v),this.validation=p.locate(u)}getPicker(t){const e=document.createElement("div");return e.classList.add(n.css.clockContainer),e.append(...this._grid(t)),e}_update(t){const s=t.getElementsByClassName(n.css.clockContainer)[0],i=(this.dates.lastPicked||this.optionsStore.viewDate).clone;if(s.querySelectorAll(".disabled").forEach((t=>t.classList.remove(n.css.disabled))),this.optionsStore.options.display.components.hours&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.hours),e.hours)||s.querySelector(`[data-action=${S.incrementHours}]`).classList.add(n.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.hours),e.hours)||s.querySelector(`[data-action=${S.decrementHours}]`).classList.add(n.css.disabled),s.querySelector(`[data-time-component=${e.hours}]`).innerText=this.optionsStore.options.display.components.useTwentyfourHour?i.hoursFormatted:i.twelveHoursFormatted),this.optionsStore.options.display.components.minutes&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.minutes),e.minutes)||s.querySelector(`[data-action=${S.incrementMinutes}]`).classList.add(n.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.minutes),e.minutes)||s.querySelector(`[data-action=${S.decrementMinutes}]`).classList.add(n.css.disabled),s.querySelector(`[data-time-component=${e.minutes}]`).innerText=i.minutesFormatted),this.optionsStore.options.display.components.seconds&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,e.seconds),e.seconds)||s.querySelector(`[data-action=${S.incrementSeconds}]`).classList.add(n.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,e.seconds),e.seconds)||s.querySelector(`[data-action=${S.decrementSeconds}]`).classList.add(n.css.disabled),s.querySelector(`[data-time-component=${e.seconds}]`).innerText=i.secondsFormatted),!this.optionsStore.options.display.components.useTwentyfourHour){const t=s.querySelector(`[data-action=${S.toggleMeridiem}]`);t.innerText=i.meridiem(),this.validation.isValid(i.clone.manipulate(i.hours>=12?-12:12,e.hours))?t.classList.remove(n.css.disabled):t.classList.add(n.css.disabled)}s.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(t){this._gridColumns="";const s=[],i=[],o=[],a=document.createElement("div"),r=t(this.optionsStore.options.display.icons.up),d=t(this.optionsStore.options.display.icons.down);a.classList.add(n.css.separator,n.css.noHighlight);const l=a.cloneNode(!0);l.innerHTML=":";const c=(t=!1)=>t?l.cloneNode(!0):a.cloneNode(!0);if(this.optionsStore.options.display.components.hours){let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementHour),t.setAttribute("data-action",S.incrementHours),t.appendChild(r.cloneNode(!0)),s.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickHour),t.setAttribute("data-action",S.showHours),t.setAttribute("data-time-component",e.hours),i.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementHour),t.setAttribute("data-action",S.decrementHours),t.appendChild(d.cloneNode(!0)),o.push(t),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(s.push(c()),i.push(c(!0)),o.push(c()),this._gridColumns+=" a");let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementMinute),t.setAttribute("data-action",S.incrementMinutes),t.appendChild(r.cloneNode(!0)),s.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickMinute),t.setAttribute("data-action",S.showMinutes),t.setAttribute("data-time-component",e.minutes),i.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementMinute),t.setAttribute("data-action",S.decrementMinutes),t.appendChild(d.cloneNode(!0)),o.push(t)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(s.push(c()),i.push(c(!0)),o.push(c()),this._gridColumns+=" a");let t=document.createElement("div");t.setAttribute("title",this.optionsStore.options.localization.incrementSecond),t.setAttribute("data-action",S.incrementSeconds),t.appendChild(r.cloneNode(!0)),s.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.pickSecond),t.setAttribute("data-action",S.showSeconds),t.setAttribute("data-time-component",e.seconds),i.push(t),t=document.createElement("div"),t.setAttribute("title",this.optionsStore.options.localization.decrementSecond),t.setAttribute("data-action",S.decrementSeconds),t.appendChild(d.cloneNode(!0)),o.push(t)}if(!this.optionsStore.options.display.components.useTwentyfourHour){this._gridColumns+=" a";let t=c();s.push(t);let e=document.createElement("button");e.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),e.setAttribute("data-action",S.toggleMeridiem),e.setAttribute("tabindex","-1"),n.css.toggleMeridiem.includes(",")?e.classList.add(...n.css.toggleMeridiem.split(",")):e.classList.add(n.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(n.css.noHighlight),t.appendChild(e),i.push(t),t=c(),o.push(t)}return this._gridColumns=this._gridColumns.trim(),[...s,...i,...o]}}class _{constructor(){this.optionsStore=p.locate(l),this.validation=p.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(n.css.hourContainer);for(let e=0;e<(this.optionsStore.options.display.components.useTwentyfourHour?24:12);e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectHour),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(n.css.hourContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(e.date);i.querySelectorAll(`[data-action="${S.selectHour}"]`).forEach((t=>{let i=[];i.push(n.css.hour),this.validation.isValid(o,e.hours)||i.push(n.css.disabled),s(e.hours,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.hours}`),t.innerText=this.optionsStore.options.display.components.useTwentyfourHour?o.hoursFormatted:o.twelveHoursFormatted,o.manipulate(1,e.hours)}))}}class C{constructor(){this.optionsStore=p.locate(l),this.validation=p.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(n.css.minuteContainer);let e=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;for(let s=0;s<60/e;s++){const e=document.createElement("div");e.setAttribute("data-action",S.selectMinute),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(n.css.minuteContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(e.hours),a=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;i.querySelectorAll(`[data-action="${S.selectMinute}"]`).forEach((t=>{let i=[];i.push(n.css.minute),this.validation.isValid(o,e.minutes)||i.push(n.css.disabled),s(e.minutes,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.minutesFormatted}`),t.innerText=o.minutesFormatted,o.manipulate(a,e.minutes)}))}}class E{constructor(){this.optionsStore=p.locate(l),this.validation=p.locate(u)}getPicker(){const t=document.createElement("div");t.classList.add(n.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectSecond),t.appendChild(e)}return t}_update(t,s){const i=t.getElementsByClassName(n.css.secondContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(e.minutes);i.querySelectorAll(`[data-action="${S.selectSecond}"]`).forEach((t=>{let i=[];i.push(n.css.second),this.validation.isValid(o,e.seconds)||i.push(n.css.disabled),s(e.seconds,o,i,t),t.classList.remove(...t.classList),t.classList.add(...i),t.setAttribute("data-value",`${o.seconds}`),t.innerText=o.secondsFormatted,o.manipulate(5,e.seconds)}))}}class M{static toggle(t){t.classList.contains(n.css.show)?this.hide(t):this.show(t)}static show(t){if(t.classList.contains(n.css.collapsing)||t.classList.contains(n.css.show))return;t.style.height="0",t.classList.remove(n.css.collapse),t.classList.add(n.css.collapsing),setTimeout((()=>{t.classList.remove(n.css.collapsing),t.classList.add(n.css.collapse,n.css.show),t.style.height=""}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hide(t){if(t.classList.contains(n.css.collapsing)||!t.classList.contains(n.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(n.css.collapse,n.css.show),t.classList.add(n.css.collapsing),t.style.height="",setTimeout((()=>{t.classList.remove(n.css.collapsing),t.classList.add(n.css.collapse)}),this.getTransitionDurationFromElement(t))}}M.getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),o=Number.parseFloat(s);return i||o?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0};class L{constructor(){this._isVisible=!1,this._documentClickEvent=t=>{var e;this.optionsStore.options.debug||window.debug||!this._isVisible||t.composedPath().includes(this.widget)||(null===(e=t.composedPath())||void 0===e?void 0:e.includes(this.optionsStore.element))||this.hide()},this._actionsClickEvent=t=>{this._eventEmitters.action.emit({e:t})},this.optionsStore=p.locate(l),this.validation=p.locate(u),this.dates=p.locate(v),this.dateDisplay=p.locate(b),this.monthDisplay=p.locate(f),this.yearDisplay=p.locate(w),this.decadeDisplay=p.locate(D),this.timeDisplay=p.locate(k),this.hourDisplay=p.locate(_),this.minuteDisplay=p.locate(C),this.secondDisplay=p.locate(E),this._eventEmitters=p.locate(y),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get isVisible(){return this._isVisible}_update(t){if(this.widget)switch(t){case e.seconds:this.secondDisplay._update(this.widget,this.paint);break;case e.minutes:this.minuteDisplay._update(this.widget,this.paint);break;case e.hours:this.hourDisplay._update(this.widget,this.paint);break;case e.date:this.dateDisplay._update(this.widget,this.paint);break;case e.month:this.monthDisplay._update(this.widget,this.paint);break;case e.year:this.yearDisplay._update(this.widget,this.paint);break;case"clock":if(!this._hasTime)break;this.timeDisplay._update(this.widget),this._update(e.hours),this._update(e.minutes),this._update(e.seconds);break;case"calendar":this._update(e.date),this._update(e.year),this._update(e.month),this.decadeDisplay._update(this.widget,this.paint),this._updateCalendarHeader();break;case"all":this._hasTime&&this._update("clock"),this._hasDate&&this._update("calendar")}}paint(t,e,s,i){}show(){var s,o;if(null==this.widget){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const t=(new i).setLocale(this.optionsStore.options.localization.locale);if(!this.optionsStore.options.keepInvalid){let i=0,o=1;for((null===(s=this.optionsStore.options.restrictions.maxDate)||void 0===s?void 0:s.isBefore(t))&&(o=-1);!(this.validation.isValid(t)||(t.manipulate(o,e.date),i>31));)i++}this.dates.setValue(t)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}this._buildWidget();const a=this._hasTime&&!this._hasDate;if(a&&(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:S.showClock})),this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),a||(this._hasTime&&M.hide(this.widget.querySelector(`div.${n.css.timeContainer}`)),M.show(this.widget.querySelector(`div.${n.css.dateContainer}`))),this._hasDate&&this._showMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{((null===(o=this.optionsStore.options)||void 0===o?void 0:o.container)||document.body).appendChild(this.widget),this._popperInstance=t(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?"bottom-end":"bottom-start"})}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:S.showClock}),this.widget.querySelectorAll("[data-action]").forEach((t=>t.addEventListener("click",this._actionsClickEvent))),this._hasTime&&this.optionsStore.options.display.sideBySide&&(this.timeDisplay._update(this.widget),this.widget.getElementsByClassName(n.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(n.css.show),this.optionsStore.options.display.inline||(this._popperInstance.update(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:n.events.show}),this._isVisible=!0}_showMode(t){if(!this.widget)return;if(t){const e=Math.max(this.optionsStore.minimumCalendarViewMode,Math.min(3,this.optionsStore.currentCalendarViewMode+t));if(this.optionsStore.currentCalendarViewMode==e)return;this.optionsStore.currentCalendarViewMode=e}this.widget.querySelectorAll(`.${n.css.dateContainer} > div:not(.${n.css.calendarHeader}), .${n.css.timeContainer} > div:not(.${n.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=r[this.optionsStore.currentCalendarViewMode];let s=this.widget.querySelector(`.${e.className}`);switch(e.className){case n.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case n.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case n.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case n.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}s.style.display="grid",this._updateCalendarHeader(),this._eventEmitters.viewUpdate.emit()}_updateCalendarHeader(){const t=[...this.widget.querySelector(`.${n.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(n.css.dateContainer))),[e,s,i]=this.widget.getElementsByClassName(n.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case n.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),s.setAttribute("title",""),i.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case n.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),s.setAttribute("title",this.optionsStore.options.localization.selectDecade),i.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case n.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),s.setAttribute("title",this.optionsStore.options.localization.selectYear),i.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case n.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),s.setAttribute("title",this.optionsStore.options.localization.selectMonth),i.setAttribute("title",this.optionsStore.options.localization.nextMonth),s.innerText=this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)}s.innerText=s.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(n.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:n.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?this.dates.lastPicked.clone:void 0}),this._isVisible=!1),document.removeEventListener("click",this._documentClickEvent))}toggle(){return this._isVisible?this.hide():this.show()}_dispose(){document.removeEventListener("click",this._documentClickEvent),this.widget&&(this.widget.querySelectorAll("[data-action]").forEach((t=>t.removeEventListener("click",this._actionsClickEvent))),this.widget.parentNode.removeChild(this.widget),this._widget=void 0)}_buildWidget(){const t=document.createElement("div");t.classList.add(n.css.widget);const e=document.createElement("div");e.classList.add(n.css.dateContainer),e.append(this.getHeadTemplate(),this.decadeDisplay.getPicker(),this.yearDisplay.getPicker(),this.monthDisplay.getPicker(),this.dateDisplay.getPicker());const s=document.createElement("div");s.classList.add(n.css.timeContainer),s.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))),s.appendChild(this.hourDisplay.getPicker()),s.appendChild(this.minuteDisplay.getPicker()),s.appendChild(this.secondDisplay.getPicker());const i=document.createElement("div");if(i.classList.add(n.css.toolbar),i.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(n.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){t.classList.add(n.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");return o.classList.add("td-row"),e.classList.add("td-half"),s.classList.add("td-half"),o.appendChild(e),o.appendChild(s),t.appendChild(o),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),void(this._widget=t)}"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),this._hasDate&&(this._hasTime&&(e.classList.add(n.css.collapse),"clock"!==this.optionsStore.options.display.viewMode&&e.classList.add(n.css.show)),t.appendChild(e)),this._hasTime&&(this._hasDate&&(s.classList.add(n.css.collapse),"clock"===this.optionsStore.options.display.viewMode&&s.classList.add(n.css.show)),t.appendChild(s)),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");o.classList.add("arrow"),o.setAttribute("data-popper-arrow",""),t.appendChild(o),this._widget=t}get _hasTime(){return this.optionsStore.options.display.components.clock&&(this.optionsStore.options.display.components.hours||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.components.seconds)}get _hasDate(){return this.optionsStore.options.display.components.calendar&&(this.optionsStore.options.display.components.year||this.optionsStore.options.display.components.month||this.optionsStore.options.display.components.date)}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",S.today),e.setAttribute("title",this.optionsStore.options.localization.today),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)),t.push(e)}if(!this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){let e,s;"clock"===this.optionsStore.options.display.viewMode?(e=this.optionsStore.options.localization.selectDate,s=this.optionsStore.options.display.icons.date):(e=this.optionsStore.options.localization.selectTime,s=this.optionsStore.options.display.icons.time);const i=document.createElement("div");i.setAttribute("data-action",S.togglePicker),i.setAttribute("title",e),i.appendChild(this._iconTag(s)),t.push(i)}if(this.optionsStore.options.display.buttons.clear){const e=document.createElement("div");e.setAttribute("data-action",S.clear),e.setAttribute("title",this.optionsStore.options.localization.clear),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)),t.push(e)}if(this.optionsStore.options.display.buttons.close){const e=document.createElement("div");e.setAttribute("data-action",S.close),e.setAttribute("title",this.optionsStore.options.localization.close),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)),t.push(e)}return t}getHeadTemplate(){const t=document.createElement("div");t.classList.add(n.css.calendarHeader);const e=document.createElement("div");e.classList.add(n.css.previous),e.setAttribute("data-action",S.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const s=document.createElement("div");s.classList.add(n.css.switch),s.setAttribute("data-action",S.changeCalendarView);const i=document.createElement("div");return i.classList.add(n.css.next),i.setAttribute("data-action",S.next),i.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,s,i),t}_iconTag(t){if("sprites"===this.optionsStore.options.display.icons.type){const e=document.createElement("svg");return e.innerHTML=``,e}const e=document.createElement("i");return DOMTokenList.prototype.add.apply(e.classList,t.split(" ")),e}_rebuild(){const t=this._isVisible;t&&this.hide(),this._dispose(),t&&this.show()}}class T{constructor(){this.optionsStore=p.locate(l),this.dates=p.locate(v),this.validation=p.locate(u),this.display=p.locate(L),this._eventEmitters=p.locate(y),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(t,s){var o,a;const r=null==t?void 0:t.currentTarget;if(null===(o=null==r?void 0:r.classList)||void 0===o?void 0:o.contains(n.css.disabled))return!1;s=s||(null===(a=null==r?void 0:r.dataset)||void 0===a?void 0:a.action);const d=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(s){case S.next:case S.previous:this.handleNextPrevious(s);break;case S.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case S.selectMonth:case S.selectYear:case S.selectDecade:const o=+r.dataset.value;switch(s){case S.selectMonth:this.optionsStore.viewDate.month=o;break;case S.selectYear:case S.selectDecade:this.optionsStore.viewDate.year=o}this.optionsStore.currentCalendarViewMode===this.optionsStore.minimumCalendarViewMode?(this.dates.setValue(this.optionsStore.viewDate,this.dates.lastPickedIndex),this.optionsStore.options.display.inline||this.display.hide()):this.display._showMode(-1);break;case S.selectDay:const a=this.optionsStore.viewDate.clone;r.classList.contains(n.css.old)&&a.manipulate(-1,e.month),r.classList.contains(n.css.new)&&a.manipulate(1,e.month),a.date=+r.dataset.day;let l=0;this.optionsStore.options.multipleDates?(l=this.dates.pickedIndex(a,e.date),-1!==l?this.dates.setValue(null,l):this.dates.setValue(a,this.dates.lastPickedIndex+1)):this.dates.setValue(a,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.display.hide();break;case S.selectHour:let c=+r.dataset.value;d.hours>=12&&!this.optionsStore.options.display.components.useTwentyfourHour&&(c+=12),d.hours=c,this.dates.setValue(d,this.dates.lastPickedIndex),this.hideOrClock(t);break;case S.selectMinute:d.minutes=+r.dataset.value,this.dates.setValue(d,this.dates.lastPickedIndex),this.hideOrClock(t);break;case S.selectSecond:d.seconds=+r.dataset.value,this.dates.setValue(d,this.dates.lastPickedIndex),this.hideOrClock(t);break;case S.incrementHours:this.manipulateAndSet(d,e.hours);break;case S.incrementMinutes:this.manipulateAndSet(d,e.minutes,this.optionsStore.options.stepping);break;case S.incrementSeconds:this.manipulateAndSet(d,e.seconds);break;case S.decrementHours:this.manipulateAndSet(d,e.hours,-1);break;case S.decrementMinutes:this.manipulateAndSet(d,e.minutes,-1*this.optionsStore.options.stepping);break;case S.decrementSeconds:this.manipulateAndSet(d,e.seconds,-1);break;case S.toggleMeridiem:this.manipulateAndSet(d,e.hours,this.dates.lastPicked.hours>=12?-12:12);break;case S.togglePicker:r.getAttribute("title")===this.optionsStore.options.localization.selectDate?(r.setAttribute("title",this.optionsStore.options.localization.selectTime),r.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(r.setAttribute("title",this.optionsStore.options.localization.selectDate),r.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.do(t,S.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${n.css.dateContainer}, .${n.css.timeContainer}`).forEach((t=>M.toggle(t))),this._eventEmitters.viewUpdate.emit();break;case S.showClock:case S.showHours:case S.showMinutes:case S.showSeconds:this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${n.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let h="";switch(s){case S.showClock:h=n.css.clockContainer,this.display._update("clock");break;case S.showHours:h=n.css.hourContainer,this.display._update(e.hours);break;case S.showMinutes:h=n.css.minuteContainer,this.display._update(e.minutes);break;case S.showSeconds:h=n.css.secondContainer,this.display._update(e.seconds)}this.display.widget.getElementsByClassName(h)[0].style.display="grid";break;case S.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case S.close:this.display.hide();break;case S.today:const p=(new i).setLocale(this.optionsStore.options.localization.locale);this.optionsStore.viewDate=p,this.validation.isValid(p,e.date)&&this.dates.setValue(p,this.dates.lastPickedIndex)}}handleNextPrevious(t){const{unit:e,step:s}=r[this.optionsStore.currentCalendarViewMode];t===S.next?this.optionsStore.viewDate.manipulate(s,e):this.optionsStore.viewDate.manipulate(-1*s,e),this._eventEmitters.viewUpdate.emit(),this.display._showMode()}hideOrClock(t){!this.optionsStore.options.display.components.useTwentyfourHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,S.showClock):this.display.hide()}manipulateAndSet(t,e,s=1){const i=t.manipulate(s,e);this.validation.isValid(i,e)&&this.dates.setValue(i,this.dates.lastPickedIndex)}}class A{constructor(t,e={}){this._subscribers={},this._isDisabled=!1,this._inputChangeEvent=()=>{const t=()=>{this.dates.lastPicked&&(this.optionsStore.viewDate=this.dates.lastPicked)},e=this.optionsStore.input.value;if(this.optionsStore.options.multipleDates)try{const s=e.split(this.optionsStore.options.multipleDatesSeparator);for(let t=0;t{this.toggle()},p=new h,this._eventEmitters=p.locate(y),this.optionsStore=p.locate(l),this.display=p.locate(L),this.dates=p.locate(v),this.actions=p.locate(T),t||n.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,d,!0),this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale),this.optionsStore.unset=!0,this._initializeInput(),this._initializeToggle(),this.optionsStore.options.display.inline&&this.display.show(),this._eventEmitters.triggerEvent.subscribe((t=>{this._triggerEvent(t)})),this._eventEmitters.viewUpdate.subscribe((()=>{this._viewUpdate()}))}get viewDate(){return this.optionsStore.viewDate}updateOptions(t,e=!1){e?this._initializeOptions(t,d):this._initializeOptions(t,this.optionsStore.options),this.display._rebuild()}toggle(){this._isDisabled||this.display.toggle()}show(){this._isDisabled||this.display.show()}hide(){this.display.hide()}disable(){var t;this._isDisabled=!0,null===(t=this.optionsStore.input)||void 0===t||t.setAttribute("disabled","disabled"),this.display.hide()}enable(){var t;this._isDisabled=!1,null===(t=this.optionsStore.input)||void 0===t||t.removeAttribute("disabled")}clear(){this.dates.clear()}subscribe(t,e){"string"==typeof t&&(t=[t]);let s=[];s=Array.isArray(e)?e:[e],t.length!==s.length&&n.errorMessages.subscribeMismatch();const i=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:n.events.update,viewDate:this.optionsStore.viewDate.clone})}_unsubscribe(t,e){this._subscribers[t].splice(e,1)}_initializeOptions(t,e,s=!1){var i;t=c._mergeOptions(t,e),s&&(t=c._dataToOptions(this.optionsStore.element,t)),c._validateConflcits(t),t.viewDate=t.viewDate.setLocale(t.localization.locale),this.optionsStore.viewDate.isSame(t.viewDate)||(this.optionsStore.viewDate=t.viewDate),t.display.components.year&&(this.optionsStore.minimumCalendarViewMode=2),t.display.components.month&&(this.optionsStore.minimumCalendarViewMode=1),t.display.components.date&&(this.optionsStore.minimumCalendarViewMode=0),this.optionsStore.currentCalendarViewMode=Math.max(this.optionsStore.minimumCalendarViewMode,this.optionsStore.currentCalendarViewMode),r[this.optionsStore.currentCalendarViewMode].name!==t.display.viewMode&&(this.optionsStore.currentCalendarViewMode=Math.max(r.findIndex((e=>e.name===t.display.viewMode)),this.optionsStore.minimumCalendarViewMode)),(null===(i=this.display)||void 0===i?void 0:i.isVisible)&&this.display._update("all"),this.optionsStore.options=t}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{let t=this.optionsStore.element.dataset.tdTargetInput;this.optionsStore.input=null==t||"nearest"==t?this.optionsStore.element.querySelector("input"):this.optionsStore.element.querySelector(t)}this.optionsStore.input&&(this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&this.optionsStore.input.addEventListener("click",this._toggleClickEvent),this.optionsStore.input.value&&this._inputChangeEvent())}_initializeToggle(){if(this.optionsStore.options.display.inline)return;let t=this.optionsStore.element.dataset.tdTargetToggle;"nearest"==t&&(t='[data-td-toggle="datetimepicker"]'),this._toggle=null==t?this.optionsStore.element:this.optionsStore.element.querySelector(t),this._toggle.addEventListener("click",this._toggleClickEvent)}_handleAfterChangeEvent(t){var e,s;!this.optionsStore.options.promptTimeOnDateChange||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||(null===(e=this.display.widget)||void 0===e?void 0:e.getElementsByClassName(n.css.show)[0].classList.contains(n.css.timeContainer))||!t.oldDate&&this.optionsStore.options.useCurrent||t.oldDate&&(null===(s=t.date)||void 0===s?void 0:s.isSame(t.oldDate))||(clearTimeout(this._currentPromptTimeTimeout),this._currentPromptTimeTimeout=setTimeout((()=>{this.display.widget&&this._eventEmitters.action.emit({e:{currentTarget:this.display.widget.querySelector(`.${n.css.switch} div`)},action:S.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const $={},O=t=>{$[t.name]||($[t.name]=t.localization)},H=t=>{let e=$[t];e&&(d.localization=e)},V=function(t,e){return t.$i||(t.load(e,{TempusDominus:A,Dates:v,Display:L},this),t.$i=!0),this};export{i as DateTime,d as DefaultOptions,n as Namespace,A as TempusDominus,e as Unit,V as extend,O as loadLocale,H as locale}; diff --git a/dist/js/tempus-dominus.js b/dist/js/tempus-dominus.js index 899f7dcd0..5b4d0f975 100644 --- a/dist/js/tempus-dominus.js +++ b/dist/js/tempus-dominus.js @@ -1,6 +1,6 @@ /*! - * Tempus Dominus v6.0.0-beta2 (https://getdatepicker.com/) - * Copyright 2013-2022 [object Object] + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ (function (global, factory) { @@ -18,6 +18,19 @@ Unit["month"] = "month"; Unit["year"] = "year"; })(exports.Unit || (exports.Unit = {})); + const getFormatByUnit = (unit) => { + switch (unit) { + case 'date': + return { dateStyle: 'short' }; + case 'month': + return { + month: 'numeric', + year: 'numeric' + }; + case 'year': + return { year: 'numeric' }; + } + }; /** * For the most part this object behaves exactly the same way * as the native Date object with a little extra spice. @@ -47,7 +60,7 @@ */ static convert(date, locale = 'default') { if (!date) - throw `A date is required`; + throw new Error(`A date is required`); return new DateTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()).setLocale(locale); } /** @@ -65,7 +78,7 @@ */ startOf(unit, startOfTheWeek = 0) { if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); switch (unit) { case 'seconds': this.setMilliseconds(0); @@ -81,7 +94,12 @@ break; case 'weekDay': this.startOf(exports.Unit.date); - this.manipulate(startOfTheWeek - this.weekDay, exports.Unit.date); + if (this.weekDay === startOfTheWeek) + break; + let goBack = this.weekDay; + if (startOfTheWeek !== 0 && this.weekDay === 0) + goBack = 8 - startOfTheWeek; + this.manipulate(startOfTheWeek - goBack, exports.Unit.date); break; case 'month': this.startOf(exports.Unit.date); @@ -100,9 +118,9 @@ * would return April 30, 2021, 11:59:59.999 PM * @param unit */ - endOf(unit) { + endOf(unit, startOfTheWeek = 0) { if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); switch (unit) { case 'seconds': this.setMilliseconds(999); @@ -117,8 +135,8 @@ this.setHours(23, 59, 59, 999); break; case 'weekDay': - this.startOf(exports.Unit.date); - this.manipulate(6 - this.weekDay, exports.Unit.date); + this.endOf(exports.Unit.date); + this.manipulate((6 + startOfTheWeek) - this.weekDay, exports.Unit.date); break; case 'month': this.endOf(exports.Unit.date); @@ -142,7 +160,7 @@ */ manipulate(value, unit) { if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); this[unit] += value; return this; } @@ -166,7 +184,7 @@ if (!unit) return this.valueOf() < compare.valueOf(); if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); return (this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()); } /** @@ -179,7 +197,7 @@ if (!unit) return this.valueOf() > compare.valueOf(); if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); return (this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()); } /** @@ -192,7 +210,7 @@ if (!unit) return this.valueOf() === compare.valueOf(); if (this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); compare = DateTime.convert(compare); return (this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()); } @@ -206,7 +224,7 @@ */ isBetween(left, right, unit, inclusivity = '()') { if (unit && this[unit] === undefined) - throw `Unit '${unit}' is not valid`; + throw new Error(`Unit '${unit}' is not valid`); const leftInclusivity = inclusivity[0] === '('; const rightInclusivity = inclusivity[1] === ')'; return (((leftInclusivity @@ -311,7 +329,7 @@ var _a; return (_a = new Intl.DateTimeFormat(locale, { hour: 'numeric', - hour12: true, + hour12: true }) .formatToParts(this) .find((p) => p.type === 'dayPeriod')) === null || _a === void 0 ? void 0 : _a.value; @@ -350,6 +368,12 @@ * Shortcut to Date.setMonth() */ set month(value) { + const targetMonth = new Date(this.year, value + 1); + targetMonth.setDate(0); + const endOfMonth = targetMonth.getDate(); + if (this.date > endOfMonth) { + this.date = endOfMonth; + } this.setMonth(value); } /** @@ -530,7 +554,7 @@ } // this is not the way I want this to stay but nested classes seemed to blown up once its compiled. - const NAME = 'tempus-dominus', version = '6.0.0-alpha1', dataKey = 'td'; + const NAME = 'tempus-dominus', version = '6.0.0-beta4', dataKey = 'td'; /** * Events */ @@ -751,6 +775,33 @@ Namespace.css = new Css(); Namespace.errorMessages = new ErrorMessages(); + const CalendarModes = [ + { + name: 'calendar', + className: Namespace.css.daysContainer, + unit: exports.Unit.month, + step: 1, + }, + { + name: 'months', + className: Namespace.css.monthsContainer, + unit: exports.Unit.year, + step: 1, + }, + { + name: 'years', + className: Namespace.css.yearsContainer, + unit: exports.Unit.year, + step: 10, + }, + { + name: 'decades', + className: Namespace.css.decadesContainer, + unit: exports.Unit.year, + step: 100, + }, + ]; + const DefaultOptions = { restrictions: { minDate: undefined, @@ -760,20 +811,20 @@ daysOfWeekDisabled: [], disabledTimeIntervals: [], disabledHours: [], - enabledHours: [], + enabledHours: [] }, display: { icons: { type: 'icons', - time: 'fas fa-clock', - date: 'fas fa-calendar', - up: 'fas fa-arrow-up', - down: 'fas fa-arrow-down', - previous: 'fas fa-chevron-left', - next: 'fas fa-chevron-right', - today: 'fas fa-calendar-check', - clear: 'fas fa-trash', - close: 'fas fa-times', + time: 'fa-solid fa-clock', + date: 'fa-solid fa-calendar', + up: 'fa-solid fa-arrow-up', + down: 'fa-solid fa-arrow-down', + previous: 'fa-solid fa-chevron-left', + next: 'fa-solid fa-chevron-right', + today: 'fa-solid fa-calendar-check', + clear: 'fa-solid fa-trash', + close: 'fa-solid fa-xmark' }, sideBySide: false, calendarWeeks: false, @@ -783,7 +834,7 @@ buttons: { today: false, clear: false, - close: false, + close: false }, components: { calendar: true, @@ -795,9 +846,9 @@ hours: true, minutes: true, seconds: false, - useTwentyfourHour: false, + useTwentyfourHour: false }, - inline: false, + inline: false }, stepping: 1, useCurrent: true, @@ -831,7 +882,7 @@ selectDate: 'Select Date', dayViewHeaderFormat: { month: 'long', year: '2-digit' }, locale: 'default', - startOfTheWeek: 0, + startOfTheWeek: 0 }, keepInvalid: false, debug: false, @@ -841,606 +892,85 @@ multipleDatesSeparator: '; ', promptTimeOnDateChange: false, promptTimeOnDateChangeTransitionDelay: 200, - hooks: { - inputParse: undefined, - inputFormat: undefined, - }, meta: {}, container: undefined }; - const DatePickerModes = [ - { - name: 'calendar', - className: Namespace.css.daysContainer, - unit: exports.Unit.month, - step: 1, - }, - { - name: 'months', - className: Namespace.css.monthsContainer, - unit: exports.Unit.year, - step: 1, - }, - { - name: 'years', - className: Namespace.css.yearsContainer, - unit: exports.Unit.year, - step: 10, - }, - { - name: 'decades', - className: Namespace.css.decadesContainer, - unit: exports.Unit.year, - step: 100, - }, - ]; - /** - * Provides a collapse functionality to the view changes - */ - class Collapse { - /** - * Flips the show/hide state of `target` - * @param target html element to affect. - */ - static toggle(target) { - if (target.classList.contains(Namespace.css.show)) { - this.hide(target); - } - else { - this.show(target); - } + class OptionsStore { + constructor() { + this.viewDate = new DateTime(); + this._currentCalendarViewMode = 0; + this.minimumCalendarViewMode = 0; + this.currentView = 'calendar'; } - /** - * If `target` is not already showing, then show after the animation. - * @param target - */ - static show(target) { - if (target.classList.contains(Namespace.css.collapsing) || - target.classList.contains(Namespace.css.show)) - return; - const complete = () => { - target.classList.remove(Namespace.css.collapsing); - target.classList.add(Namespace.css.collapse, Namespace.css.show); - target.style.height = ''; - }; - target.style.height = '0'; - target.classList.remove(Namespace.css.collapse); - target.classList.add(Namespace.css.collapsing); - setTimeout(complete, this.getTransitionDurationFromElement(target)); - target.style.height = `${target.scrollHeight}px`; + get currentCalendarViewMode() { + return this._currentCalendarViewMode; + } + set currentCalendarViewMode(value) { + this._currentCalendarViewMode = value; + this.currentView = CalendarModes[value].name; } /** - * If `target` is not already hidden, then hide after the animation. - * @param target HTML Element + * When switching back to the calendar from the clock, + * this sets currentView to the correct calendar view. */ - static hide(target) { - if (target.classList.contains(Namespace.css.collapsing) || - !target.classList.contains(Namespace.css.show)) - return; - const complete = () => { - target.classList.remove(Namespace.css.collapsing); - target.classList.add(Namespace.css.collapse); - }; - target.style.height = `${target.getBoundingClientRect()['height']}px`; - const reflow = (element) => element.offsetHeight; - reflow(target); - target.classList.remove(Namespace.css.collapse, Namespace.css.show); - target.classList.add(Namespace.css.collapsing); - target.style.height = ''; - setTimeout(complete, this.getTransitionDurationFromElement(target)); + refreshCurrentView() { + this.currentView = CalendarModes[this.currentCalendarViewMode].name; } } - /** - * Gets the transition duration from the `element` by getting css properties - * `transition-duration` and `transition-delay` - * @param element HTML Element - */ - Collapse.getTransitionDurationFromElement = (element) => { - if (!element) { - return 0; - } - // Get transition-duration of the element - let { transitionDuration, transitionDelay } = window.getComputedStyle(element); - const floatTransitionDuration = Number.parseFloat(transitionDuration); - const floatTransitionDelay = Number.parseFloat(transitionDelay); - // Return 0 if element or transition duration is not found - if (!floatTransitionDuration && !floatTransitionDelay) { - return 0; - } - // If multiple durations are defined, take the first - transitionDuration = transitionDuration.split(',')[0]; - transitionDelay = transitionDelay.split(',')[0]; - return ((Number.parseFloat(transitionDuration) + - Number.parseFloat(transitionDelay)) * - 1000); - }; - - /** - * - */ - class Actions { - constructor(context) { - this._context = context; - } - /** - * Performs the selected `action`. See ActionTypes - * @param e This is normally a click event - * @param action If not provided, then look for a [data-action] - */ - do(e, action) { - var _a, _b; - const currentTarget = e === null || e === void 0 ? void 0 : e.currentTarget; - if ((_a = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.classList) === null || _a === void 0 ? void 0 : _a.contains(Namespace.css.disabled)) - return false; - action = action || ((_b = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.dataset) === null || _b === void 0 ? void 0 : _b.action); - const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; - /** - * Common function to manipulate {@link lastPicked} by `unit`. - * @param unit - * @param value Value to change by - */ - const manipulateAndSet = (unit, value = 1) => { - const newDate = lastPicked.manipulate(value, unit); - if (this._context._validation.isValid(newDate, unit)) { - this._context.dates._setValue(newDate, this._context.dates.lastPickedIndex); - } - }; - /** - * Common function to manipulate {@link lastPicked} by `unit`. - * After setting the value it will either show the clock or hide the widget. - * @param unit - * @param value Value to change by - */ - const hideOrClock = () => { - if (this._context._options.display.components.useTwentyfourHour && - !this._context._options.display.components.minutes && - !this._context._options.display.keepOpen && - !this._context._options.display.inline) { - this._context._display.hide(); - } - else { - this.do(e, ActionTypes.showClock); - } - }; - switch (action) { - case ActionTypes.next: - case ActionTypes.previous: - const { unit, step } = DatePickerModes[this._context._currentViewMode]; - if (action === ActionTypes.next) - this._context._viewDate.manipulate(step, unit); - else - this._context._viewDate.manipulate(step * -1, unit); - this._context._viewUpdate(unit); - this._context._display._showMode(); - break; - case ActionTypes.pickerSwitch: - this._context._display._showMode(1); - this._context._viewUpdate(DatePickerModes[this._context._currentViewMode].unit); - this._context._display._updateCalendarHeader(); - break; - case ActionTypes.selectMonth: - case ActionTypes.selectYear: - case ActionTypes.selectDecade: - const value = +currentTarget.dataset.value; - switch (action) { - case ActionTypes.selectMonth: - this._context._viewDate.month = value; - this._context._viewUpdate(exports.Unit.month); - break; - case ActionTypes.selectYear: - this._context._viewDate.year = value; - this._context._viewUpdate(exports.Unit.year); - break; - case ActionTypes.selectDecade: - this._context._viewDate.year = value; - this._context._viewUpdate(exports.Unit.year); - break; - } - if (this._context._currentViewMode === this._context._minViewModeNumber) { - this._context.dates._setValue(this._context._viewDate, this._context.dates.lastPickedIndex); - if (!this._context._options.display.inline) { - this._context._display.hide(); + class OptionConverter { + static _mergeOptions(providedOptions, mergeTo) { + var _a; + const newOptions = {}; + let path = ''; + const ignoreProperties = ['meta', 'dayViewHeaderFormat', 'container']; + //see if the options specify a locale + const locale = mergeTo.localization.locale !== 'default' + ? mergeTo.localization.locale + : ((_a = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.localization) === null || _a === void 0 ? void 0 : _a.locale) || 'default'; + const processKey = (key, value, providedType, defaultType) => { + switch (key) { + case 'defaultDate': { + const dateTime = this.dateConversion(value, 'defaultDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; } + Namespace.errorMessages.typeMismatch('defaultDate', providedType, 'DateTime or Date'); + break; } - else { - this._context._display._showMode(-1); - } - break; - case ActionTypes.selectDay: - const day = this._context._viewDate.clone; - if (currentTarget.classList.contains(Namespace.css.old)) { - day.manipulate(-1, exports.Unit.month); - } - if (currentTarget.classList.contains(Namespace.css.new)) { - day.manipulate(1, exports.Unit.month); + case 'viewDate': { + const dateTime = this.dateConversion(value, 'viewDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; + } + Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); + break; } - day.date = +currentTarget.dataset.day; - let index = 0; - if (this._context._options.multipleDates) { - index = this._context.dates.pickedIndex(day, exports.Unit.date); - if (index !== -1) { - this._context.dates._setValue(null, index); //deselect multi-date + case 'minDate': { + if (value === undefined) { + return value; } - else { - this._context.dates._setValue(day, this._context.dates.lastPickedIndex + 1); + const dateTime = this.dateConversion(value, 'restrictions.minDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; } + Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); + break; } - else { - this._context.dates._setValue(day, this._context.dates.lastPickedIndex); - } - if (!this._context._display._hasTime && - !this._context._options.display.keepOpen && - !this._context._options.display.inline && - !this._context._options.multipleDates) { - this._context._display.hide(); - } - break; - case ActionTypes.selectHour: - let hour = +currentTarget.dataset.value; - if (lastPicked.hours >= 12 && - !this._context._options.display.components.useTwentyfourHour) - hour += 12; - lastPicked.hours = hour; - this._context.dates._setValue(lastPicked, this._context.dates.lastPickedIndex); - hideOrClock(); - break; - case ActionTypes.selectMinute: - lastPicked.minutes = +currentTarget.dataset.value; - this._context.dates._setValue(lastPicked, this._context.dates.lastPickedIndex); - hideOrClock(); - break; - case ActionTypes.selectSecond: - lastPicked.seconds = +currentTarget.dataset.value; - this._context.dates._setValue(lastPicked, this._context.dates.lastPickedIndex); - hideOrClock(); - break; - case ActionTypes.incrementHours: - manipulateAndSet(exports.Unit.hours); - break; - case ActionTypes.incrementMinutes: - manipulateAndSet(exports.Unit.minutes, this._context._options.stepping); - break; - case ActionTypes.incrementSeconds: - manipulateAndSet(exports.Unit.seconds); - break; - case ActionTypes.decrementHours: - manipulateAndSet(exports.Unit.hours, -1); - break; - case ActionTypes.decrementMinutes: - manipulateAndSet(exports.Unit.minutes, this._context._options.stepping * -1); - break; - case ActionTypes.decrementSeconds: - manipulateAndSet(exports.Unit.seconds, -1); - break; - case ActionTypes.toggleMeridiem: - manipulateAndSet(exports.Unit.hours, this._context.dates.lastPicked.hours >= 12 ? -12 : 12); - break; - case ActionTypes.togglePicker: - if (currentTarget.getAttribute('title') === - this._context._options.localization.selectDate) { - currentTarget.setAttribute('title', this._context._options.localization.selectTime); - currentTarget.innerHTML = this._context._display._iconTag(this._context._options.display.icons.time).outerHTML; - this._context._display._updateCalendarHeader(); - } - else { - currentTarget.setAttribute('title', this._context._options.localization.selectDate); - currentTarget.innerHTML = this._context._display._iconTag(this._context._options.display.icons.date).outerHTML; - if (this._context._display._hasTime) { - this.do(e, ActionTypes.showClock); - this._context._display._update('clock'); + case 'maxDate': { + if (value === undefined) { + return value; + } + const dateTime = this.dateConversion(value, 'restrictions.maxDate'); + if (dateTime !== undefined) { + dateTime.setLocale(locale); + return dateTime; } - } - this._context._display.widget - .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) - .forEach((htmlElement) => Collapse.toggle(htmlElement)); - break; - case ActionTypes.showClock: - case ActionTypes.showHours: - case ActionTypes.showMinutes: - case ActionTypes.showSeconds: - this._context._display.widget - .querySelectorAll(`.${Namespace.css.timeContainer} > div`) - .forEach((htmlElement) => (htmlElement.style.display = 'none')); - let classToUse = ''; - switch (action) { - case ActionTypes.showClock: - classToUse = Namespace.css.clockContainer; - this._context._display._update('clock'); - break; - case ActionTypes.showHours: - classToUse = Namespace.css.hourContainer; - this._context._display._update(exports.Unit.hours); - break; - case ActionTypes.showMinutes: - classToUse = Namespace.css.minuteContainer; - this._context._display._update(exports.Unit.minutes); - break; - case ActionTypes.showSeconds: - classToUse = Namespace.css.secondContainer; - this._context._display._update(exports.Unit.seconds); - break; - } - (this._context._display.widget.getElementsByClassName(classToUse)[0]).style.display = 'grid'; - break; - case ActionTypes.clear: - this._context.dates._setValue(null); - this._context._display._updateCalendarHeader(); - break; - case ActionTypes.close: - this._context._display.hide(); - break; - case ActionTypes.today: - const today = new DateTime().setLocale(this._context._options.localization.locale); - this._context._viewDate = today; - if (this._context._validation.isValid(today, exports.Unit.date)) - this._context.dates._setValue(today, this._context.dates.lastPickedIndex); - break; - } - } - } - var ActionTypes; - (function (ActionTypes) { - ActionTypes["next"] = "next"; - ActionTypes["previous"] = "previous"; - ActionTypes["pickerSwitch"] = "pickerSwitch"; - ActionTypes["selectMonth"] = "selectMonth"; - ActionTypes["selectYear"] = "selectYear"; - ActionTypes["selectDecade"] = "selectDecade"; - ActionTypes["selectDay"] = "selectDay"; - ActionTypes["selectHour"] = "selectHour"; - ActionTypes["selectMinute"] = "selectMinute"; - ActionTypes["selectSecond"] = "selectSecond"; - ActionTypes["incrementHours"] = "incrementHours"; - ActionTypes["incrementMinutes"] = "incrementMinutes"; - ActionTypes["incrementSeconds"] = "incrementSeconds"; - ActionTypes["decrementHours"] = "decrementHours"; - ActionTypes["decrementMinutes"] = "decrementMinutes"; - ActionTypes["decrementSeconds"] = "decrementSeconds"; - ActionTypes["toggleMeridiem"] = "toggleMeridiem"; - ActionTypes["togglePicker"] = "togglePicker"; - ActionTypes["showClock"] = "showClock"; - ActionTypes["showHours"] = "showHours"; - ActionTypes["showMinutes"] = "showMinutes"; - ActionTypes["showSeconds"] = "showSeconds"; - ActionTypes["clear"] = "clear"; - ActionTypes["close"] = "close"; - ActionTypes["today"] = "today"; - })(ActionTypes || (ActionTypes = {})); - - /** - * Creates and updates the grid for `date` - */ - class DateDisplay { - constructor(context) { - this._context = context; - } - /** - * Build the container html for the display - * @private - */ - get _picker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.daysContainer); - container.append(...this._daysOfTheWeek()); - if (this._context._options.display.calendarWeeks) { - const div = document.createElement('div'); - div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); - container.appendChild(div); - } - for (let i = 0; i < 42; i++) { - if (i !== 0 && i % 7 === 0) { - if (this._context._options.display.calendarWeeks) { - const div = document.createElement('div'); - div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); - container.appendChild(div); - } - } - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectDay); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.daysContainer)[0]; - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName('div'); - switcher.setAttribute(Namespace.css.daysContainer, this._context._viewDate.format(this._context._options.localization.dayViewHeaderFormat)); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, exports.Unit.month), exports.Unit.month) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, exports.Unit.month), exports.Unit.month) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone - .startOf(exports.Unit.month) - .startOf('weekDay', this._context._options.localization.startOfTheWeek) - .manipulate(12, exports.Unit.hours); - container - .querySelectorAll(`[data-action="${ActionTypes.selectDay}"], .${Namespace.css.calendarWeeks}`) - .forEach((containerClone, index) => { - if (this._context._options.display.calendarWeeks && - containerClone.classList.contains(Namespace.css.calendarWeeks)) { - if (containerClone.innerText === '#') - return; - containerClone.innerText = `${innerDate.week}`; - return; - } - let classes = []; - classes.push(Namespace.css.day); - if (innerDate.isBefore(this._context._viewDate, exports.Unit.month)) { - classes.push(Namespace.css.old); - } - if (innerDate.isAfter(this._context._viewDate, exports.Unit.month)) { - classes.push(Namespace.css.new); - } - if (!this._context._unset && - this._context.dates.isPicked(innerDate, exports.Unit.date)) { - classes.push(Namespace.css.active); - } - if (!this._context._validation.isValid(innerDate, exports.Unit.date)) { - classes.push(Namespace.css.disabled); - } - if (innerDate.isSame(new DateTime(), exports.Unit.date)) { - classes.push(Namespace.css.today); - } - if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { - classes.push(Namespace.css.weekend); - } - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`); - containerClone.setAttribute('data-day', `${innerDate.date}`); - containerClone.innerText = innerDate.format({ day: 'numeric' }); - innerDate.manipulate(1, exports.Unit.date); - }); - } - /*** - * Generates an html row that contains the days of the week. - * @private - */ - _daysOfTheWeek() { - let innerDate = this._context._viewDate.clone - .startOf('weekDay', this._context._options.localization.startOfTheWeek) - .startOf(exports.Unit.date); - const row = []; - document.createElement('div'); - if (this._context._options.display.calendarWeeks) { - const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); - htmlDivElement.innerText = '#'; - row.push(htmlDivElement); - } - for (let i = 0; i < 7; i++) { - const htmlDivElement = document.createElement('div'); - htmlDivElement.classList.add(Namespace.css.dayOfTheWeek, Namespace.css.noHighlight); - htmlDivElement.innerText = innerDate.format({ weekday: 'short' }); - innerDate.manipulate(1, exports.Unit.date); - row.push(htmlDivElement); - } - return row; - } - } - - /** - * Creates and updates the grid for `month` - */ - class MonthDisplay { - constructor(context) { - this._context = context; - } - /** - * Build the container html for the display - * @private - */ - get _picker() { - const container = document.createElement('div'); - container.classList.add(Namespace.css.monthsContainer); - for (let i = 0; i < 12; i++) { - const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectMonth); - container.appendChild(div); - } - return container; - } - /** - * Populates the grid and updates enabled states - * @private - */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; - const [previous, switcher, next] = container.parentElement - .getElementsByClassName(Namespace.css.calendarHeader)[0] - .getElementsByTagName('div'); - switcher.setAttribute(Namespace.css.monthsContainer, this._context._viewDate.format({ year: 'numeric' })); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, exports.Unit.year), exports.Unit.year) - ? previous.classList.remove(Namespace.css.disabled) - : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, exports.Unit.year), exports.Unit.year) - ? next.classList.remove(Namespace.css.disabled) - : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone.startOf(exports.Unit.year); - container - .querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`) - .forEach((containerClone, index) => { - let classes = []; - classes.push(Namespace.css.month); - if (!this._context._unset && - this._context.dates.isPicked(innerDate, exports.Unit.month)) { - classes.push(Namespace.css.active); - } - if (!this._context._validation.isValid(innerDate, exports.Unit.month)) { - classes.push(Namespace.css.disabled); - } - containerClone.classList.remove(...containerClone.classList); - containerClone.classList.add(...classes); - containerClone.setAttribute('data-value', `${index}`); - containerClone.innerText = `${innerDate.format({ month: 'short' })}`; - innerDate.manipulate(1, exports.Unit.month); - }); - } - } - - class OptionConverter { - static _mergeOptions(providedOptions, mergeTo) { - var _a; - const newOptions = {}; - let path = ''; - const ignoreProperties = [ - 'inputParse', - 'inputFormat', - 'meta', - 'dayViewHeaderFormat', - 'container' - ]; - //see if the options specify a locale - const locale = mergeTo.localization.locale !== 'default' ? mergeTo.localization.locale : - ((_a = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.localization) === null || _a === void 0 ? void 0 : _a.locale) || 'default'; - const processKey = (key, value, providedType, defaultType) => { - switch (key) { - case 'defaultDate': { - const dateTime = this._dateConversion(value, 'defaultDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('defaultDate', providedType, 'DateTime or Date'); - } - case 'viewDate': { - const dateTime = this._dateConversion(value, 'viewDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('viewDate', providedType, 'DateTime or Date'); - } - case 'minDate': { - if (value === undefined) { - return value; - } - const dateTime = this._dateConversion(value, 'restrictions.minDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('restrictions.minDate', providedType, 'DateTime or Date'); - } - case 'maxDate': { - if (value === undefined) { - return value; - } - const dateTime = this._dateConversion(value, 'restrictions.maxDate'); - if (dateTime !== undefined) { - dateTime.setLocale(locale); - return dateTime; - } - Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); + Namespace.errorMessages.typeMismatch('restrictions.maxDate', providedType, 'DateTime or Date'); + break; } case 'disabledHours': if (value === undefined) { @@ -1490,7 +1020,7 @@ Object.keys(valueObject[i]).forEach((vk) => { const subOptionName = `${key}[${i}].${vk}`; let d = valueObject[i][vk]; - const dateTime = this._dateConversion(d, subOptionName); + const dateTime = this.dateConversion(d, subOptionName); if (!dateTime) { Namespace.errorMessages.typeMismatch(subOptionName, typeof d, 'DateTime or Date'); } @@ -1511,13 +1041,14 @@ if (!keyOptions.includes(value)) Namespace.errorMessages.unexpectedOptionValue(path.substring(1), value, keyOptions); return value; - case 'inputParse': - case 'inputFormat': case 'meta': case 'dayViewHeaderFormat': return value; case 'container': - if (value && !(value instanceof HTMLElement || value instanceof Element || (value === null || value === void 0 ? void 0 : value.appendChild))) { + if (value && + !(value instanceof HTMLElement || + value instanceof Element || + (value === null || value === void 0 ? void 0 : value.appendChild))) { Namespace.errorMessages.typeMismatch(path.substring(1), typeof value, 'HTMLElement'); } return value; @@ -1549,7 +1080,7 @@ const spread = (provided, mergeOption, copyTo) => { const unsupportedOptions = Object.keys(provided).filter((x) => !Object.keys(mergeOption).includes(x)); if (unsupportedOptions.length > 0) { - const flattenedOptions = OptionConverter._flattenDefaultOptions; + const flattenedOptions = OptionConverter.getFlattenDefaultOptions(); const errors = unsupportedOptions.map((x) => { let error = `"${path.substring(1)}.${x}" in not a known option.`; let didYouMean = flattenedOptions.find((y) => y.includes(x)); @@ -1591,7 +1122,7 @@ return newOptions; } static _dataToOptions(element, options) { - const eData = element.dataset; + const eData = JSON.parse(JSON.stringify(element.dataset)); if (eData === null || eData === void 0 ? void 0 : eData.tdTargetInput) delete eData.tdTargetInput; if (eData === null || eData === void 0 ? void 0 : eData.tdTargetToggle) @@ -1677,6 +1208,7 @@ * @param optionName Provides text to error messages e.g. disabledDates * @param value Option value * @param providedType Used to provide text to error messages + * @param locale */ static _typeCheckDateArray(optionName, value, providedType, locale = 'default') { if (!Array.isArray(value)) { @@ -1684,7 +1216,7 @@ } for (let i = 0; i < value.length; i++) { let d = value[i]; - const dateTime = this._dateConversion(d, optionName); + const dateTime = this.dateConversion(d, optionName); if (!dateTime) { Namespace.errorMessages.typeMismatch(optionName, typeof d, 'DateTime or Date'); } @@ -1709,7 +1241,7 @@ * @param d value to convert * @param optionName Provides text to error messages e.g. disabledDates */ - static _dateConversion(d, optionName) { + static dateConversion(d, optionName) { if (typeof d === typeof '' && optionName !== 'input') { Namespace.errorMessages.dateString(); } @@ -1719,7 +1251,7 @@ } return converted; } - static get _flattenDefaultOptions() { + static getFlattenDefaultOptions() { if (this._flatback) return this._flatback; const deepKeys = (t, pre = []) => Array.isArray(t) @@ -1730,33 +1262,205 @@ this._flatback = deepKeys(DefaultOptions); return this._flatback; } - /** - * Some options conflict like min/max date. Verify that these kinds of options - * are set correctly. - * @param config - */ - static _validateConflcits(config) { - if (config.display.sideBySide && (!config.display.components.clock || - !(config.display.components.hours || - config.display.components.minutes || - config.display.components.seconds))) { - Namespace.errorMessages.conflictingConfiguration('Cannot use side by side mode without the clock components'); - } - if (config.restrictions.minDate && config.restrictions.maxDate) { - if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { - Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); - } - if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { - Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); - } - } + /** + * Some options conflict like min/max date. Verify that these kinds of options + * are set correctly. + * @param config + */ + static _validateConflcits(config) { + if (config.display.sideBySide && + (!config.display.components.clock || + !(config.display.components.hours || + config.display.components.minutes || + config.display.components.seconds))) { + Namespace.errorMessages.conflictingConfiguration('Cannot use side by side mode without the clock components'); + } + if (config.restrictions.minDate && config.restrictions.maxDate) { + if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { + Namespace.errorMessages.conflictingConfiguration('minDate is after maxDate'); + } + if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) { + Namespace.errorMessages.conflictingConfiguration('maxDate is before minDate'); + } + } + } + } + + class ServiceLocator { + constructor() { + this.cache = new Map(); + } + locate(identifier) { + const service = this.cache.get(identifier); + if (service) + return service; + const value = new identifier(); + this.cache.set(identifier, value); + return value; + } + } + const setupServiceLocator = () => { + serviceLocator = new ServiceLocator(); + }; + let serviceLocator; + + /** + * Main class for date validation rules based on the options provided. + */ + class Validation { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + } + /** + * Checks to see if the target date is valid based on the rules provided in the options. + * Granularity can be provide to chek portions of the date instead of the whole. + * @param targetDate + * @param granularity + */ + isValid(targetDate, granularity) { + var _a; + if (this.optionsStore.options.restrictions.disabledDates.length > 0 && + this._isInDisabledDates(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.enabledDates.length > 0 && + !this._isInEnabledDates(targetDate)) { + return false; + } + if (granularity !== exports.Unit.month && + granularity !== exports.Unit.year && + ((_a = this.optionsStore.options.restrictions.daysOfWeekDisabled) === null || _a === void 0 ? void 0 : _a.length) > 0 && + this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1) { + return false; + } + if (this.optionsStore.options.restrictions.minDate && + targetDate.isBefore(this.optionsStore.options.restrictions.minDate, granularity)) { + return false; + } + if (this.optionsStore.options.restrictions.maxDate && + targetDate.isAfter(this.optionsStore.options.restrictions.maxDate, granularity)) { + return false; + } + if (granularity === exports.Unit.hours || + granularity === exports.Unit.minutes || + granularity === exports.Unit.seconds) { + if (this.optionsStore.options.restrictions.disabledHours.length > 0 && + this._isInDisabledHours(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.enabledHours.length > 0 && + !this._isInEnabledHours(targetDate)) { + return false; + } + if (this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0) { + for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) { + if (targetDate.isBetween(disabledTimeIntervals.from, disabledTimeIntervals.to)) + return false; + } + } + } + return true; + } + /** + * Checks to see if the disabledDates option is in use and returns true (meaning invalid) + * if the `testDate` is with in the array. Granularity is by date. + * @param testDate + * @private + */ + _isInDisabledDates(testDate) { + if (!this.optionsStore.options.restrictions.disabledDates || + this.optionsStore.options.restrictions.disabledDates.length === 0) + return false; + const formattedDate = testDate.format(getFormatByUnit(exports.Unit.date)); + return this.optionsStore.options.restrictions.disabledDates + .map((x) => x.format(getFormatByUnit(exports.Unit.date))) + .find((x) => x === formattedDate); + } + /** + * Checks to see if the enabledDates option is in use and returns true (meaning valid) + * if the `testDate` is with in the array. Granularity is by date. + * @param testDate + * @private + */ + _isInEnabledDates(testDate) { + if (!this.optionsStore.options.restrictions.enabledDates || + this.optionsStore.options.restrictions.enabledDates.length === 0) + return true; + const formattedDate = testDate.format(getFormatByUnit(exports.Unit.date)); + return this.optionsStore.options.restrictions.enabledDates + .map((x) => x.format(getFormatByUnit(exports.Unit.date))) + .find((x) => x === formattedDate); + } + /** + * Checks to see if the disabledHours option is in use and returns true (meaning invalid) + * if the `testDate` is with in the array. Granularity is by hours. + * @param testDate + * @private + */ + _isInDisabledHours(testDate) { + if (!this.optionsStore.options.restrictions.disabledHours || + this.optionsStore.options.restrictions.disabledHours.length === 0) + return false; + const formattedDate = testDate.hours; + return this.optionsStore.options.restrictions.disabledHours.find((x) => x === formattedDate); + } + /** + * Checks to see if the enabledHours option is in use and returns true (meaning valid) + * if the `testDate` is with in the array. Granularity is by hours. + * @param testDate + * @private + */ + _isInEnabledHours(testDate) { + if (!this.optionsStore.options.restrictions.enabledHours || + this.optionsStore.options.restrictions.enabledHours.length === 0) + return true; + const formattedDate = testDate.hours; + return this.optionsStore.options.restrictions.enabledHours.find((x) => x === formattedDate); + } + } + + class EventEmitter { + constructor() { + this.subscribers = []; + } + subscribe(callback) { + this.subscribers.push(callback); + return this.unsubscribe.bind(this, this.subscribers.length - 1); + } + unsubscribe(index) { + this.subscribers.splice(index, 1); + } + emit(value) { + this.subscribers.forEach((callback) => { + callback(value); + }); + } + destory() { + this.subscribers = null; + this.subscribers = []; + } + } + class EventEmitters { + constructor() { + this.triggerEvent = new EventEmitter(); + this.viewUpdate = new EventEmitter(); + this.updateDisplay = new EventEmitter(); + this.action = new EventEmitter(); + } + destory() { + this.triggerEvent.destory(); + this.viewUpdate.destory(); + this.updateDisplay.destory(); + this.action.destory(); } } class Dates { - constructor(context) { + constructor() { this._dates = []; - this._context = context; + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this._eventEmitters = serviceLocator.locate(EventEmitters); } /** * Returns the array of selected dates @@ -1779,28 +1483,51 @@ return this._dates.length - 1; } /** - * Adds a new DateTime to selected dates array + * Formats a DateTime object to a string. Used when setting the input value. * @param date */ - add(date) { - this._dates.push(date); + formatInput(date) { + const components = this.optionsStore.options.display.components; + if (!date) + return ''; + return date.format({ + year: components.calendar && components.year ? 'numeric' : undefined, + month: components.calendar && components.month ? '2-digit' : undefined, + day: components.calendar && components.date ? '2-digit' : undefined, + hour: components.clock && components.hours + ? components.useTwentyfourHour + ? '2-digit' + : 'numeric' + : undefined, + minute: components.clock && components.minutes ? '2-digit' : undefined, + second: components.clock && components.seconds ? '2-digit' : undefined, + hour12: !components.useTwentyfourHour, + }); } /** * Tries to convert the provided value to a DateTime object. * If value is null|undefined then clear the value of the provided index (or 0). * @param value Value to convert or null|undefined * @param index When using multidates this is the index in the array - * @param from Used in the warning message, useful for debugging. */ - set(value, index, from = 'date.set') { - if (!value) - this._setValue(value, index); - const converted = OptionConverter._dateConversion(value, from); + setFromInput(value, index) { + if (!value) { + this.setValue(undefined, index); + return; + } + const converted = OptionConverter.dateConversion(value, 'input'); if (converted) { - converted.setLocale(this._context._options.localization.locale); - this._setValue(converted, index); + converted.setLocale(this.optionsStore.options.localization.locale); + this.setValue(converted, index); } } + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date) { + this._dates.push(date); + } /** * Returns true if the `targetDate` is part of the selected dates array. * If `unit` is provided then a granularity to that unit will be used. @@ -1810,7 +1537,7 @@ isPicked(targetDate, unit) { if (!unit) return this._dates.find((x) => x === targetDate) !== undefined; - const format = Dates.getFormatByUnit(unit); + const format = getFormatByUnit(unit); let innerDateFormatted = targetDate.format(format); return (this._dates .map((x) => x.format(format)) @@ -1826,7 +1553,7 @@ pickedIndex(targetDate, unit) { if (!unit) return this._dates.indexOf(targetDate); - const format = Dates.getFormatByUnit(unit); + const format = getFormatByUnit(unit); let innerDateFormatted = targetDate.format(format); return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted); } @@ -1834,8 +1561,8 @@ * Clears all selected dates. */ clear() { - this._context._unset = true; - this._context._triggerEvent({ + this.optionsStore.unset = true; + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: undefined, oldDate: this.lastPicked, @@ -1854,7 +1581,7 @@ return [startYear, endYear, focusValue]; } /** - * Do not use direectly. Attempts to either clear or set the `target` date at `index`. + * Attempts to either clear or set the `target` date at `index`. * If the `target` is null then the date will be cleared. * If multi-date is being used then it will be removed from the array. * If `target` is valid and multi-date is used then if `index` is @@ -1862,23 +1589,23 @@ * @param target * @param index */ - _setValue(target, index) { + setValue(target, index) { const noIndex = typeof index === 'undefined', isClear = !target && noIndex; - let oldDate = this._context._unset ? null : this._dates[index]; - if (!oldDate && !this._context._unset && noIndex && isClear) { + let oldDate = this.optionsStore.unset ? null : this._dates[index]; + if (!oldDate && !this.optionsStore.unset && noIndex && isClear) { oldDate = this.lastPicked; } const updateInput = () => { - if (!this._context._input) + if (!this.optionsStore.input) return; - let newValue = this._context._options.hooks.inputFormat(this._context, target); - if (this._context._options.multipleDates) { + let newValue = this.formatInput(target); + if (this.optionsStore.options.multipleDates) { newValue = this._dates - .map((d) => this._context._options.hooks.inputFormat(this._context, d)) - .join(this._context._options.multipleDatesSeparator); + .map((d) => this.formatInput(d)) + .join(this.optionsStore.options.multipleDatesSeparator); } - if (this._context._input.value != newValue) - this._context._input.value = newValue; + if (this.optionsStore.input.value != newValue) + this.optionsStore.input.value = newValue; }; if (target && (oldDate === null || oldDate === void 0 ? void 0 : oldDate.isSame(target))) { updateInput(); @@ -1886,16 +1613,16 @@ } // case of calling setValue(null) if (!target) { - if (!this._context._options.multipleDates || + if (!this.optionsStore.options.multipleDates || this._dates.length === 1 || isClear) { - this._context._unset = true; + this.optionsStore.unset = true; this._dates = []; } else { this._dates.splice(index, 1); } - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: undefined, oldDate, @@ -1903,25 +1630,25 @@ isValid: true, }); updateInput(); - this._context._display._update('all'); + this._eventEmitters.updateDisplay.emit('all'); return; } index = index || 0; target = target.clone; // minute stepping is being used, force the minute to the closest value - if (this._context._options.stepping !== 1) { + if (this.optionsStore.options.stepping !== 1) { target.minutes = - Math.round(target.minutes / this._context._options.stepping) * - this._context._options.stepping; + Math.round(target.minutes / this.optionsStore.options.stepping) * + this.optionsStore.options.stepping; target.seconds = 0; } - if (this._context._validation.isValid(target)) { + if (this.validation.isValid(target)) { this._dates[index] = target; - this._context._viewDate = target.clone; + this.optionsStore.viewDate = target.clone; updateInput(); - this._context._unset = false; - this._context._display._update('all'); - this._context._triggerEvent({ + this.optionsStore.unset = false; + this._eventEmitters.updateDisplay.emit('all'); + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: target, oldDate, @@ -1930,11 +1657,11 @@ }); return; } - if (this._context._options.keepInvalid) { + if (this.optionsStore.options.keepInvalid) { this._dates[index] = target; - this._context._viewDate = target.clone; + this.optionsStore.viewDate = target.clone; updateInput(); - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: target, oldDate, @@ -1942,29 +1669,227 @@ isValid: false, }); } - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.error, reason: Namespace.errorMessages.failedToSetInvalidDate, date: target, oldDate, }); } + } + + var ActionTypes; + (function (ActionTypes) { + ActionTypes["next"] = "next"; + ActionTypes["previous"] = "previous"; + ActionTypes["changeCalendarView"] = "changeCalendarView"; + ActionTypes["selectMonth"] = "selectMonth"; + ActionTypes["selectYear"] = "selectYear"; + ActionTypes["selectDecade"] = "selectDecade"; + ActionTypes["selectDay"] = "selectDay"; + ActionTypes["selectHour"] = "selectHour"; + ActionTypes["selectMinute"] = "selectMinute"; + ActionTypes["selectSecond"] = "selectSecond"; + ActionTypes["incrementHours"] = "incrementHours"; + ActionTypes["incrementMinutes"] = "incrementMinutes"; + ActionTypes["incrementSeconds"] = "incrementSeconds"; + ActionTypes["decrementHours"] = "decrementHours"; + ActionTypes["decrementMinutes"] = "decrementMinutes"; + ActionTypes["decrementSeconds"] = "decrementSeconds"; + ActionTypes["toggleMeridiem"] = "toggleMeridiem"; + ActionTypes["togglePicker"] = "togglePicker"; + ActionTypes["showClock"] = "showClock"; + ActionTypes["showHours"] = "showHours"; + ActionTypes["showMinutes"] = "showMinutes"; + ActionTypes["showSeconds"] = "showSeconds"; + ActionTypes["clear"] = "clear"; + ActionTypes["close"] = "close"; + ActionTypes["today"] = "today"; + })(ActionTypes || (ActionTypes = {})); + var ActionTypes$1 = ActionTypes; + + /** + * Creates and updates the grid for `date` + */ + class DateDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } /** - * Returns a format object based on the granularity of `unit` - * @param unit + * Build the container html for the display + * @private */ - static getFormatByUnit(unit) { - switch (unit) { - case 'date': - return { dateStyle: 'short' }; - case 'month': - return { - month: 'numeric', - year: 'numeric', - }; - case 'year': - return { year: 'numeric' }; + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.daysContainer); + container.append(...this._daysOfTheWeek()); + if (this.optionsStore.options.display.calendarWeeks) { + const div = document.createElement('div'); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); + container.appendChild(div); + } + for (let i = 0; i < 42; i++) { + if (i !== 0 && i % 7 === 0) { + if (this.optionsStore.options.display.calendarWeeks) { + const div = document.createElement('div'); + div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); + container.appendChild(div); + } + } + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectDay); + container.appendChild(div); + } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.daysContainer)[0]; + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName('div'); + switcher.setAttribute(Namespace.css.daysContainer, this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.month), exports.Unit.month) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.month), exports.Unit.month) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + let innerDate = this.optionsStore.viewDate.clone + .startOf(exports.Unit.month) + .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek) + .manipulate(12, exports.Unit.hours); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectDay}"], .${Namespace.css.calendarWeeks}`) + .forEach((containerClone) => { + if (this.optionsStore.options.display.calendarWeeks && + containerClone.classList.contains(Namespace.css.calendarWeeks)) { + if (containerClone.innerText === '#') + return; + containerClone.innerText = `${innerDate.week}`; + return; + } + let classes = []; + classes.push(Namespace.css.day); + if (innerDate.isBefore(this.optionsStore.viewDate, exports.Unit.month)) { + classes.push(Namespace.css.old); + } + if (innerDate.isAfter(this.optionsStore.viewDate, exports.Unit.month)) { + classes.push(Namespace.css.new); + } + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, exports.Unit.date)) { + classes.push(Namespace.css.active); + } + if (!this.validation.isValid(innerDate, exports.Unit.date)) { + classes.push(Namespace.css.disabled); + } + if (innerDate.isSame(new DateTime(), exports.Unit.date)) { + classes.push(Namespace.css.today); + } + if (innerDate.weekDay === 0 || innerDate.weekDay === 6) { + classes.push(Namespace.css.weekend); + } + paint(exports.Unit.date, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`); + containerClone.setAttribute('data-day', `${innerDate.date}`); + containerClone.innerText = innerDate.format({ day: 'numeric' }); + innerDate.manipulate(1, exports.Unit.date); + }); + } + /*** + * Generates an html row that contains the days of the week. + * @private + */ + _daysOfTheWeek() { + let innerDate = this.optionsStore.viewDate.clone + .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek) + .startOf(exports.Unit.date); + const row = []; + document.createElement('div'); + if (this.optionsStore.options.display.calendarWeeks) { + const htmlDivElement = document.createElement('div'); + htmlDivElement.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); + htmlDivElement.innerText = '#'; + row.push(htmlDivElement); + } + for (let i = 0; i < 7; i++) { + const htmlDivElement = document.createElement('div'); + htmlDivElement.classList.add(Namespace.css.dayOfTheWeek, Namespace.css.noHighlight); + htmlDivElement.innerText = innerDate.format({ weekday: 'short' }); + innerDate.manipulate(1, exports.Unit.date); + row.push(htmlDivElement); + } + return row; + } + } + + /** + * Creates and updates the grid for `month` + */ + class MonthDisplay { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + } + /** + * Build the container html for the display + * @private + */ + getPicker() { + const container = document.createElement('div'); + container.classList.add(Namespace.css.monthsContainer); + for (let i = 0; i < 12; i++) { + const div = document.createElement('div'); + div.setAttribute('data-action', ActionTypes$1.selectMonth); + container.appendChild(div); } + return container; + } + /** + * Populates the grid and updates enabled states + * @private + */ + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.monthsContainer)[0]; + const [previous, switcher, next] = container.parentElement + .getElementsByClassName(Namespace.css.calendarHeader)[0] + .getElementsByTagName('div'); + switcher.setAttribute(Namespace.css.monthsContainer, this.optionsStore.viewDate.format({ year: 'numeric' })); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.year), exports.Unit.year) + ? previous.classList.remove(Namespace.css.disabled) + : previous.classList.add(Namespace.css.disabled); + this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.year), exports.Unit.year) + ? next.classList.remove(Namespace.css.disabled) + : next.classList.add(Namespace.css.disabled); + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); + container + .querySelectorAll(`[data-action="${ActionTypes$1.selectMonth}"]`) + .forEach((containerClone, index) => { + let classes = []; + classes.push(Namespace.css.month); + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, exports.Unit.month)) { + classes.push(Namespace.css.active); + } + if (!this.validation.isValid(innerDate, exports.Unit.month)) { + classes.push(Namespace.css.disabled); + } + paint(exports.Unit.month, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); + containerClone.classList.add(...classes); + containerClone.setAttribute('data-value', `${index}`); + containerClone.innerText = `${innerDate.format({ month: 'short' })}`; + innerDate.manipulate(1, exports.Unit.month); + }); } } @@ -1972,19 +1897,21 @@ * Creates and updates the grid for `year` */ class YearDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.yearsContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectYear); + div.setAttribute('data-action', ActionTypes$1.selectYear); container.appendChild(div); } return container; @@ -1993,36 +1920,36 @@ * Populates the grid and updates enabled states * @private */ - _update() { - Dates.getStartEndYear(10, this._context._viewDate.year); - this._startYear = this._context._viewDate.clone.manipulate(-1, exports.Unit.year); - this._endYear = this._context._viewDate.clone.manipulate(10, exports.Unit.year); - const container = this._context._display.widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; + _update(widget, paint) { + this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.year); + this._endYear = this.optionsStore.viewDate.clone.manipulate(10, exports.Unit.year); + const container = widget.getElementsByClassName(Namespace.css.yearsContainer)[0]; const [previous, switcher, next] = container.parentElement .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); switcher.setAttribute(Namespace.css.yearsContainer, `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({ year: 'numeric' })}`); - this._context._validation.isValid(this._startYear, exports.Unit.year) + this.validation.isValid(this._startYear, exports.Unit.year) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._endYear, exports.Unit.year) + this.validation.isValid(this._endYear, exports.Unit.year) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone + let innerDate = this.optionsStore.viewDate.clone .startOf(exports.Unit.year) .manipulate(-1, exports.Unit.year); container - .querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectYear}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.year); - if (!this._context._unset && - this._context.dates.isPicked(innerDate, exports.Unit.year)) { + if (!this.optionsStore.unset && + this.dates.isPicked(innerDate, exports.Unit.year)) { classes.push(Namespace.css.active); } - if (!this._context._validation.isValid(innerDate, exports.Unit.year)) { + if (!this.validation.isValid(innerDate, exports.Unit.year)) { classes.push(Namespace.css.disabled); } + paint(exports.Unit.year, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.year}`); @@ -2036,19 +1963,21 @@ * Creates and updates the grid for `seconds` */ class DecadeDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.decadesContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectDecade); + div.setAttribute('data-action', ActionTypes$1.selectDecade); container.appendChild(div); } return container; @@ -2057,26 +1986,26 @@ * Populates the grid and updates enabled states * @private */ - _update() { - const [start, end] = Dates.getStartEndYear(100, this._context._viewDate.year); - this._startDecade = this._context._viewDate.clone.startOf(exports.Unit.year); + _update(widget, paint) { + const [start, end] = Dates.getStartEndYear(100, this.optionsStore.viewDate.year); + this._startDecade = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); this._startDecade.year = start; - this._endDecade = this._context._viewDate.clone.startOf(exports.Unit.year); + this._endDecade = this.optionsStore.viewDate.clone.startOf(exports.Unit.year); this._endDecade.year = end; - const container = this._context._display.widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; + const container = widget.getElementsByClassName(Namespace.css.decadesContainer)[0]; const [previous, switcher, next] = container.parentElement .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); switcher.setAttribute(Namespace.css.decadesContainer, `${this._startDecade.format({ year: 'numeric' })}-${this._endDecade.format({ year: 'numeric' })}`); - this._context._validation.isValid(this._startDecade, exports.Unit.year) + this.validation.isValid(this._startDecade, exports.Unit.year) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._endDecade, exports.Unit.year) + this.validation.isValid(this._endDecade, exports.Unit.year) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - const pickedYears = this._context.dates.picked.map((x) => x.year); + const pickedYears = this.dates.picked.map((x) => x.year); container - .querySelectorAll(`[data-action="${ActionTypes.selectDecade}"]`) + .querySelectorAll(`[data-action="${ActionTypes$1.selectDecade}"]`) .forEach((containerClone, index) => { if (index === 0) { containerClone.classList.add(Namespace.css.old); @@ -2097,11 +2026,12 @@ classes.push(Namespace.css.decade); const startDecadeYear = this._startDecade.year; const endDecadeYear = this._startDecade.year + 9; - if (!this._context._unset && + if (!this.optionsStore.unset && pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) .length > 0) { classes.push(Namespace.css.active); } + paint('decade', this._startDecade, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${this._startDecade.year}`); @@ -2115,18 +2045,20 @@ * Creates the clock display */ class TimeDisplay { - constructor(context) { + constructor() { this._gridColumns = ''; - this._context = context; + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the clock display * @private */ - get _picker() { + getPicker(iconTag) { const container = document.createElement('div'); container.classList.add(Namespace.css.clockContainer); - container.append(...this._grid()); + container.append(...this._grid(iconTag)); return container; } /** @@ -2134,59 +2066,57 @@ * like the current hour and if the manipulation icons are enabled. * @private */ - _update() { - if (!this._context._display._hasTime) - return; - const timesDiv = (this._context._display.widget.getElementsByClassName(Namespace.css.clockContainer)[0]); - const lastPicked = (this._context.dates.lastPicked || this._context._viewDate).clone; + _update(widget) { + const timesDiv = (widget.getElementsByClassName(Namespace.css.clockContainer)[0]); + const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate).clone; timesDiv .querySelectorAll('.disabled') .forEach((element) => element.classList.remove(Namespace.css.disabled)); - if (this._context._options.display.components.hours) { - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, exports.Unit.hours), exports.Unit.hours)) { + if (this.optionsStore.options.display.components.hours) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.hours), exports.Unit.hours)) { timesDiv - .querySelector(`[data-action=${ActionTypes.incrementHours}]`) + .querySelector(`[data-action=${ActionTypes$1.incrementHours}]`) .classList.add(Namespace.css.disabled); } - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, exports.Unit.hours), exports.Unit.hours)) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.hours), exports.Unit.hours)) { timesDiv - .querySelector(`[data-action=${ActionTypes.decrementHours}]`) + .querySelector(`[data-action=${ActionTypes$1.decrementHours}]`) .classList.add(Namespace.css.disabled); } - timesDiv.querySelector(`[data-time-component=${exports.Unit.hours}]`).innerText = this._context._options.display.components.useTwentyfourHour + timesDiv.querySelector(`[data-time-component=${exports.Unit.hours}]`).innerText = this.optionsStore.options.display.components.useTwentyfourHour ? lastPicked.hoursFormatted : lastPicked.twelveHoursFormatted; } - if (this._context._options.display.components.minutes) { - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, exports.Unit.minutes), exports.Unit.minutes)) { + if (this.optionsStore.options.display.components.minutes) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.minutes), exports.Unit.minutes)) { timesDiv - .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`) + .querySelector(`[data-action=${ActionTypes$1.incrementMinutes}]`) .classList.add(Namespace.css.disabled); } - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, exports.Unit.minutes), exports.Unit.minutes)) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.minutes), exports.Unit.minutes)) { timesDiv - .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`) + .querySelector(`[data-action=${ActionTypes$1.decrementMinutes}]`) .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${exports.Unit.minutes}]`).innerText = lastPicked.minutesFormatted; } - if (this._context._options.display.components.seconds) { - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(1, exports.Unit.seconds), exports.Unit.seconds)) { + if (this.optionsStore.options.display.components.seconds) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1, exports.Unit.seconds), exports.Unit.seconds)) { timesDiv - .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`) + .querySelector(`[data-action=${ActionTypes$1.incrementSeconds}]`) .classList.add(Namespace.css.disabled); } - if (!this._context._validation.isValid(this._context._viewDate.clone.manipulate(-1, exports.Unit.seconds), exports.Unit.seconds)) { + if (!this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1, exports.Unit.seconds), exports.Unit.seconds)) { timesDiv - .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`) + .querySelector(`[data-action=${ActionTypes$1.decrementSeconds}]`) .classList.add(Namespace.css.disabled); } timesDiv.querySelector(`[data-time-component=${exports.Unit.seconds}]`).innerText = lastPicked.secondsFormatted; } - if (!this._context._options.display.components.useTwentyfourHour) { - const toggle = timesDiv.querySelector(`[data-action=${ActionTypes.toggleMeridiem}]`); + if (!this.optionsStore.options.display.components.useTwentyfourHour) { + const toggle = timesDiv.querySelector(`[data-action=${ActionTypes$1.toggleMeridiem}]`); toggle.innerText = lastPicked.meridiem(); - if (!this._context._validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, exports.Unit.hours))) { + if (!this.validation.isValid(lastPicked.clone.manipulate(lastPicked.hours >= 12 ? -12 : 12, exports.Unit.hours))) { toggle.classList.add(Namespace.css.disabled); } else { @@ -2199,9 +2129,9 @@ * Creates the table for the clock display depending on what options are selected. * @private */ - _grid() { + _grid(iconTag) { this._gridColumns = ''; - const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = this._context._display._iconTag(this._context._options.display.icons.up), downIcon = this._context._display._iconTag(this._context._options.display.icons.down); + const top = [], middle = [], bottom = [], separator = document.createElement('div'), upIcon = iconTag(this.optionsStore.options.display.icons.up), downIcon = iconTag(this.optionsStore.options.display.icons.down); separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); const separatorColon = separator.cloneNode(true); separatorColon.innerHTML = ':'; @@ -2210,81 +2140,85 @@ ? separatorColon.cloneNode(true) : separator.cloneNode(true); }; - if (this._context._options.display.components.hours) { + if (this.optionsStore.options.display.components.hours) { let divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.incrementHour); - divElement.setAttribute('data-action', ActionTypes.incrementHours); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementHour); + divElement.setAttribute('data-action', ActionTypes$1.incrementHours); divElement.appendChild(upIcon.cloneNode(true)); top.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.pickHour); - divElement.setAttribute('data-action', ActionTypes.showHours); + divElement.setAttribute('title', this.optionsStore.options.localization.pickHour); + divElement.setAttribute('data-action', ActionTypes$1.showHours); divElement.setAttribute('data-time-component', exports.Unit.hours); middle.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.decrementHour); - divElement.setAttribute('data-action', ActionTypes.decrementHours); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementHour); + divElement.setAttribute('data-action', ActionTypes$1.decrementHours); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); this._gridColumns += 'a'; } - if (this._context._options.display.components.minutes) { + if (this.optionsStore.options.display.components.minutes) { this._gridColumns += ' a'; - if (this._context._options.display.components.hours) { + if (this.optionsStore.options.display.components.hours) { top.push(getSeparator()); middle.push(getSeparator(true)); bottom.push(getSeparator()); this._gridColumns += ' a'; } let divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.incrementMinute); - divElement.setAttribute('data-action', ActionTypes.incrementMinutes); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementMinute); + divElement.setAttribute('data-action', ActionTypes$1.incrementMinutes); divElement.appendChild(upIcon.cloneNode(true)); top.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.pickMinute); - divElement.setAttribute('data-action', ActionTypes.showMinutes); + divElement.setAttribute('title', this.optionsStore.options.localization.pickMinute); + divElement.setAttribute('data-action', ActionTypes$1.showMinutes); divElement.setAttribute('data-time-component', exports.Unit.minutes); middle.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.decrementMinute); - divElement.setAttribute('data-action', ActionTypes.decrementMinutes); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementMinute); + divElement.setAttribute('data-action', ActionTypes$1.decrementMinutes); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); } - if (this._context._options.display.components.seconds) { + if (this.optionsStore.options.display.components.seconds) { this._gridColumns += ' a'; - if (this._context._options.display.components.minutes) { + if (this.optionsStore.options.display.components.minutes) { top.push(getSeparator()); middle.push(getSeparator(true)); bottom.push(getSeparator()); this._gridColumns += ' a'; } let divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.incrementSecond); - divElement.setAttribute('data-action', ActionTypes.incrementSeconds); + divElement.setAttribute('title', this.optionsStore.options.localization.incrementSecond); + divElement.setAttribute('data-action', ActionTypes$1.incrementSeconds); divElement.appendChild(upIcon.cloneNode(true)); top.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.pickSecond); - divElement.setAttribute('data-action', ActionTypes.showSeconds); + divElement.setAttribute('title', this.optionsStore.options.localization.pickSecond); + divElement.setAttribute('data-action', ActionTypes$1.showSeconds); divElement.setAttribute('data-time-component', exports.Unit.seconds); middle.push(divElement); divElement = document.createElement('div'); - divElement.setAttribute('title', this._context._options.localization.decrementSecond); - divElement.setAttribute('data-action', ActionTypes.decrementSeconds); + divElement.setAttribute('title', this.optionsStore.options.localization.decrementSecond); + divElement.setAttribute('data-action', ActionTypes$1.decrementSeconds); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); } - if (!this._context._options.display.components.useTwentyfourHour) { + if (!this.optionsStore.options.display.components.useTwentyfourHour) { this._gridColumns += ' a'; let divElement = getSeparator(); top.push(divElement); let button = document.createElement('button'); - button.setAttribute('title', this._context._options.localization.toggleMeridiem); - button.setAttribute('data-action', ActionTypes.toggleMeridiem); + button.setAttribute('title', this.optionsStore.options.localization.toggleMeridiem); + button.setAttribute('data-action', ActionTypes$1.toggleMeridiem); button.setAttribute('tabindex', '-1'); - button.classList.add(Namespace.css.toggleMeridiem); + if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function? + button.classList.add(...Namespace.css.toggleMeridiem.split(',')); + } + else + button.classList.add(Namespace.css.toggleMeridiem); divElement = document.createElement('div'); divElement.classList.add(Namespace.css.noHighlight); divElement.appendChild(button); @@ -2301,20 +2235,21 @@ * Creates and updates the grid for `hours` */ class HourDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.hourContainer); for (let i = 0; i < - (this._context._options.display.components.useTwentyfourHour ? 24 : 12); i++) { + (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12); i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectHour); + div.setAttribute('data-action', ActionTypes$1.selectHour); container.appendChild(div); } return container; @@ -2323,21 +2258,22 @@ * Populates the grid and updates enabled states * @private */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.hourContainer)[0]; - let innerDate = this._context._viewDate.clone.startOf(exports.Unit.date); + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.hourContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.date); container - .querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectHour}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.hour); - if (!this._context._validation.isValid(innerDate, exports.Unit.hours)) { + if (!this.validation.isValid(innerDate, exports.Unit.hours)) { classes.push(Namespace.css.disabled); } + paint(exports.Unit.hours, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.hours}`); - containerClone.innerText = this._context._options.display.components + containerClone.innerText = this.optionsStore.options.display.components .useTwentyfourHour ? innerDate.hoursFormatted : innerDate.twelveHoursFormatted; @@ -2350,22 +2286,23 @@ * Creates and updates the grid for `minutes` */ class MinuteDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.minuteContainer); - let step = this._context._options.stepping === 1 + let step = this.optionsStore.options.stepping === 1 ? 5 - : this._context._options.stepping; + : this.optionsStore.options.stepping; for (let i = 0; i < 60 / step; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectMinute); + div.setAttribute('data-action', ActionTypes$1.selectMinute); container.appendChild(div); } return container; @@ -2374,20 +2311,21 @@ * Populates the grid and updates enabled states * @private */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; - let innerDate = this._context._viewDate.clone.startOf(exports.Unit.hours); - let step = this._context._options.stepping === 1 + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.minuteContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.hours); + let step = this.optionsStore.options.stepping === 1 ? 5 - : this._context._options.stepping; + : this.optionsStore.options.stepping; container - .querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectMinute}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.minute); - if (!this._context._validation.isValid(innerDate, exports.Unit.minutes)) { + if (!this.validation.isValid(innerDate, exports.Unit.minutes)) { classes.push(Namespace.css.disabled); } + paint(exports.Unit.minutes, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.minutesFormatted}`); @@ -2401,19 +2339,20 @@ * Creates and updates the grid for `seconds` */ class secondDisplay { - constructor(context) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.secondContainer); for (let i = 0; i < 12; i++) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.selectSecond); + div.setAttribute('data-action', ActionTypes$1.selectSecond); container.appendChild(div); } return container; @@ -2422,17 +2361,18 @@ * Populates the grid and updates enabled states * @private */ - _update() { - const container = this._context._display.widget.getElementsByClassName(Namespace.css.secondContainer)[0]; - let innerDate = this._context._viewDate.clone.startOf(exports.Unit.minutes); + _update(widget, paint) { + const container = widget.getElementsByClassName(Namespace.css.secondContainer)[0]; + let innerDate = this.optionsStore.viewDate.clone.startOf(exports.Unit.minutes); container - .querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`) - .forEach((containerClone, index) => { + .querySelectorAll(`[data-action="${ActionTypes$1.selectSecond}"]`) + .forEach((containerClone) => { let classes = []; classes.push(Namespace.css.second); - if (!this._context._validation.isValid(innerDate, exports.Unit.seconds)) { + if (!this.validation.isValid(innerDate, exports.Unit.seconds)) { classes.push(Namespace.css.disabled); } + paint(exports.Unit.seconds, innerDate, classes, containerClone); containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.seconds}`); @@ -2442,11 +2382,92 @@ } } + /** + * Provides a collapse functionality to the view changes + */ + class Collapse { + /** + * Flips the show/hide state of `target` + * @param target html element to affect. + */ + static toggle(target) { + if (target.classList.contains(Namespace.css.show)) { + this.hide(target); + } + else { + this.show(target); + } + } + /** + * If `target` is not already showing, then show after the animation. + * @param target + */ + static show(target) { + if (target.classList.contains(Namespace.css.collapsing) || + target.classList.contains(Namespace.css.show)) + return; + const complete = () => { + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse, Namespace.css.show); + target.style.height = ''; + }; + target.style.height = '0'; + target.classList.remove(Namespace.css.collapse); + target.classList.add(Namespace.css.collapsing); + setTimeout(complete, this.getTransitionDurationFromElement(target)); + target.style.height = `${target.scrollHeight}px`; + } + /** + * If `target` is not already hidden, then hide after the animation. + * @param target HTML Element + */ + static hide(target) { + if (target.classList.contains(Namespace.css.collapsing) || + !target.classList.contains(Namespace.css.show)) + return; + const complete = () => { + target.classList.remove(Namespace.css.collapsing); + target.classList.add(Namespace.css.collapse); + }; + target.style.height = `${target.getBoundingClientRect()['height']}px`; + const reflow = (element) => element.offsetHeight; + reflow(target); + target.classList.remove(Namespace.css.collapse, Namespace.css.show); + target.classList.add(Namespace.css.collapsing); + target.style.height = ''; + setTimeout(complete, this.getTransitionDurationFromElement(target)); + } + } + /** + * Gets the transition duration from the `element` by getting css properties + * `transition-duration` and `transition-delay` + * @param element HTML Element + */ + Collapse.getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + // Get transition-duration of the element + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + // Return 0 if element or transition duration is not found + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + // If multiple durations are defined, take the first + transitionDuration = transitionDuration.split(',')[0]; + transitionDelay = transitionDelay.split(',')[0]; + return ((Number.parseFloat(transitionDuration) + + Number.parseFloat(transitionDelay)) * + 1000); + }; + /** * Main class for all things display related. */ class Display { - constructor(context) { + constructor() { this._isVisible = false; /** * A document click event to hide the widget if click is outside @@ -2455,11 +2476,11 @@ */ this._documentClickEvent = (e) => { var _a; - if (this._context._options.debug || window.debug) + if (this.optionsStore.options.debug || window.debug) return; if (this._isVisible && !e.composedPath().includes(this.widget) && // click inside the widget - !((_a = e.composedPath()) === null || _a === void 0 ? void 0 : _a.includes(this._context._element)) // click on the element + !((_a = e.composedPath()) === null || _a === void 0 ? void 0 : _a.includes(this.optionsStore.element)) // click on the element ) { this.hide(); } @@ -2470,18 +2491,24 @@ * @private */ this._actionsClickEvent = (e) => { - this._context._action.do(e); + this._eventEmitters.action.emit({ e: e }); }; - this._context = context; - this._dateDisplay = new DateDisplay(context); - this._monthDisplay = new MonthDisplay(context); - this._yearDisplay = new YearDisplay(context); - this._decadeDisplay = new DecadeDisplay(context); - this._timeDisplay = new TimeDisplay(context); - this._hourDisplay = new HourDisplay(context); - this._minuteDisplay = new MinuteDisplay(context); - this._secondDisplay = new secondDisplay(context); + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this.dates = serviceLocator.locate(Dates); + this.dateDisplay = serviceLocator.locate(DateDisplay); + this.monthDisplay = serviceLocator.locate(MonthDisplay); + this.yearDisplay = serviceLocator.locate(YearDisplay); + this.decadeDisplay = serviceLocator.locate(DecadeDisplay); + this.timeDisplay = serviceLocator.locate(TimeDisplay); + this.hourDisplay = serviceLocator.locate(HourDisplay); + this.minuteDisplay = serviceLocator.locate(MinuteDisplay); + this.secondDisplay = serviceLocator.locate(secondDisplay); + this._eventEmitters = serviceLocator.locate(EventEmitters); this._widget = undefined; + this._eventEmitters.updateDisplay.subscribe((result) => { + this._update(result); + }); } /** * Returns the widget body or undefined @@ -2508,27 +2535,27 @@ //todo do I want some kind of error catching or other guards here? switch (unit) { case exports.Unit.seconds: - this._secondDisplay._update(); + this.secondDisplay._update(this.widget, this.paint); break; case exports.Unit.minutes: - this._minuteDisplay._update(); + this.minuteDisplay._update(this.widget, this.paint); break; case exports.Unit.hours: - this._hourDisplay._update(); + this.hourDisplay._update(this.widget, this.paint); break; case exports.Unit.date: - this._dateDisplay._update(); + this.dateDisplay._update(this.widget, this.paint); break; case exports.Unit.month: - this._monthDisplay._update(); + this.monthDisplay._update(this.widget, this.paint); break; case exports.Unit.year: - this._yearDisplay._update(); + this.yearDisplay._update(this.widget, this.paint); break; case 'clock': if (!this._hasTime) break; - this._timeDisplay._update(); + this.timeDisplay._update(this.widget); this._update(exports.Unit.hours); this._update(exports.Unit.minutes); this._update(exports.Unit.seconds); @@ -2537,7 +2564,7 @@ this._update(exports.Unit.date); this._update(exports.Unit.year); this._update(exports.Unit.month); - this._decadeDisplay._update(); + this.decadeDisplay._update(this.widget, this.paint); this._updateCalendarHeader(); break; case 'all': @@ -2549,88 +2576,109 @@ } } } + // noinspection JSUnusedLocalSymbols + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit, _date, _classes, _element) { + // implemented in plugin + } /** * Shows the picker and creates a Popper instance if needed. * Add document click event to hide when clicking outside the picker. * @fires Events#show */ show() { - var _a, _b, _c; + var _a, _b; if (this.widget == undefined) { - if (this._context._options.useCurrent && - !this._context._options.defaultDate && - !((_a = this._context._input) === null || _a === void 0 ? void 0 : _a.value)) { - //todo in the td4 branch a pr changed this to allow granularity - const date = new DateTime().setLocale(this._context._options.localization.locale); - if (!this._context._options.keepInvalid) { - let tries = 0; - let direction = 1; - if ((_b = this._context._options.restrictions.maxDate) === null || _b === void 0 ? void 0 : _b.isBefore(date)) { - direction = -1; - } - while (!this._context._validation.isValid(date)) { - date.manipulate(direction, exports.Unit.date); - if (tries > 31) - break; - tries++; + if (this.dates.picked.length == 0) { + if (this.optionsStore.options.useCurrent && + !this.optionsStore.options.defaultDate) { + const date = new DateTime().setLocale(this.optionsStore.options.localization.locale); + if (!this.optionsStore.options.keepInvalid) { + let tries = 0; + let direction = 1; + if ((_a = this.optionsStore.options.restrictions.maxDate) === null || _a === void 0 ? void 0 : _a.isBefore(date)) { + direction = -1; + } + while (!this.validation.isValid(date)) { + date.manipulate(direction, exports.Unit.date); + if (tries > 31) + break; + tries++; + } } + this.dates.setValue(date); + } + if (this.optionsStore.options.defaultDate) { + this.dates.setValue(this.optionsStore.options.defaultDate); } - this._context.dates._setValue(date); - } - if (this._context._options.defaultDate) { - this._context.dates._setValue(this._context._options.defaultDate); } this._buildWidget(); // If modeView is only clock const onlyClock = this._hasTime && !this._hasDate; // reset the view to the clock if there's no date components if (onlyClock) { - this._context._action.do(null, ActionTypes.showClock); + this.optionsStore.currentView = 'clock'; + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes$1.showClock, + }); } // otherwise return to the calendar view - this._context._currentViewMode = this._context._minViewModeNumber; + if (!this.optionsStore.currentCalendarViewMode) { + this.optionsStore.currentCalendarViewMode = + this.optionsStore.minimumCalendarViewMode; + } if (!onlyClock) { if (this._hasTime) { - Collapse.hide(this._context._display.widget.querySelector(`div.${Namespace.css.timeContainer}`)); + Collapse.hide(this.widget.querySelector(`div.${Namespace.css.timeContainer}`)); } - Collapse.show(this._context._display.widget.querySelector(`div.${Namespace.css.dateContainer}`)); + Collapse.show(this.widget.querySelector(`div.${Namespace.css.dateContainer}`)); } if (this._hasDate) { this._showMode(); } - if (!this._context._options.display.inline) { + if (!this.optionsStore.options.display.inline) { // If needed to change the parent container - const container = ((_c = this._context._options) === null || _c === void 0 ? void 0 : _c.container) || document.body; + const container = ((_b = this.optionsStore.options) === null || _b === void 0 ? void 0 : _b.container) || document.body; container.appendChild(this.widget); - this._popperInstance = core.createPopper(this._context._element, this.widget, { + this._popperInstance = core.createPopper(this.optionsStore.element, this.widget, { modifiers: [{ name: 'eventListeners', enabled: true }], //#2400 placement: document.documentElement.dir === 'rtl' ? 'bottom-end' - : 'bottom-start' + : 'bottom-start', }); } else { - this._context._element.appendChild(this.widget); + this.optionsStore.element.appendChild(this.widget); } - if (this._context._options.display.viewMode == 'clock') { - this._context._action.do(null, ActionTypes.showClock); + if (this.optionsStore.options.display.viewMode == 'clock') { + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes$1.showClock, + }); } this.widget .querySelectorAll('[data-action]') .forEach((element) => element.addEventListener('click', this._actionsClickEvent)); // show the clock when using sideBySide - if (this._context._options.display.sideBySide) { - this._timeDisplay._update(); + if (this._hasTime && this.optionsStore.options.display.sideBySide) { + this.timeDisplay._update(this.widget); this.widget.getElementsByClassName(Namespace.css.clockContainer)[0].style.display = 'grid'; } } this.widget.classList.add(Namespace.css.show); - if (!this._context._options.display.inline) { + if (!this.optionsStore.options.display.inline) { this._popperInstance.update(); document.addEventListener('click', this._documentClickEvent); } - this._context._triggerEvent({ type: Namespace.events.show }); + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show }); this._isVisible = true; } /** @@ -2643,61 +2691,62 @@ return; } if (direction) { - const max = Math.max(this._context._minViewModeNumber, Math.min(3, this._context._currentViewMode + direction)); - if (this._context._currentViewMode == max) + const max = Math.max(this.optionsStore.minimumCalendarViewMode, Math.min(3, this.optionsStore.currentCalendarViewMode + direction)); + if (this.optionsStore.currentCalendarViewMode == max) return; - this._context._currentViewMode = max; + this.optionsStore.currentCalendarViewMode = max; } this.widget .querySelectorAll(`.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`) .forEach((e) => (e.style.display = 'none')); - const datePickerMode = DatePickerModes[this._context._currentViewMode]; + const datePickerMode = CalendarModes[this.optionsStore.currentCalendarViewMode]; let picker = this.widget.querySelector(`.${datePickerMode.className}`); switch (datePickerMode.className) { case Namespace.css.decadesContainer: - this._decadeDisplay._update(); + this.decadeDisplay._update(this.widget, this.paint); break; case Namespace.css.yearsContainer: - this._yearDisplay._update(); + this.yearDisplay._update(this.widget, this.paint); break; case Namespace.css.monthsContainer: - this._monthDisplay._update(); + this.monthDisplay._update(this.widget, this.paint); break; case Namespace.css.daysContainer: - this._dateDisplay._update(); + this.dateDisplay._update(this.widget, this.paint); break; } picker.style.display = 'grid'; this._updateCalendarHeader(); + this._eventEmitters.viewUpdate.emit(); } _updateCalendarHeader() { const showing = [ - ...this.widget.querySelector(`.${Namespace.css.dateContainer} div[style*="display: grid"]`).classList + ...this.widget.querySelector(`.${Namespace.css.dateContainer} div[style*="display: grid"]`).classList, ].find((x) => x.startsWith(Namespace.css.dateContainer)); - const [previous, switcher, next] = this._context._display.widget + const [previous, switcher, next] = this.widget .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); switch (showing) { case Namespace.css.decadesContainer: - previous.setAttribute('title', this._context._options.localization.previousCentury); + previous.setAttribute('title', this.optionsStore.options.localization.previousCentury); switcher.setAttribute('title', ''); - next.setAttribute('title', this._context._options.localization.nextCentury); + next.setAttribute('title', this.optionsStore.options.localization.nextCentury); break; case Namespace.css.yearsContainer: - previous.setAttribute('title', this._context._options.localization.previousDecade); - switcher.setAttribute('title', this._context._options.localization.selectDecade); - next.setAttribute('title', this._context._options.localization.nextDecade); + previous.setAttribute('title', this.optionsStore.options.localization.previousDecade); + switcher.setAttribute('title', this.optionsStore.options.localization.selectDecade); + next.setAttribute('title', this.optionsStore.options.localization.nextDecade); break; case Namespace.css.monthsContainer: - previous.setAttribute('title', this._context._options.localization.previousYear); - switcher.setAttribute('title', this._context._options.localization.selectYear); - next.setAttribute('title', this._context._options.localization.nextYear); + previous.setAttribute('title', this.optionsStore.options.localization.previousYear); + switcher.setAttribute('title', this.optionsStore.options.localization.selectYear); + next.setAttribute('title', this.optionsStore.options.localization.nextYear); break; case Namespace.css.daysContainer: - previous.setAttribute('title', this._context._options.localization.previousMonth); - switcher.setAttribute('title', this._context._options.localization.selectMonth); - next.setAttribute('title', this._context._options.localization.nextMonth); - switcher.innerText = this._context._viewDate.format(this._context._options.localization.dayViewHeaderFormat); + previous.setAttribute('title', this.optionsStore.options.localization.previousMonth); + switcher.setAttribute('title', this.optionsStore.options.localization.selectMonth); + next.setAttribute('title', this.optionsStore.options.localization.nextMonth); + switcher.innerText = this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat); break; } switcher.innerText = switcher.getAttribute(showing); @@ -2712,13 +2761,13 @@ return; this.widget.classList.remove(Namespace.css.show); if (this._isVisible) { - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.hide, - date: this._context._unset + date: this.optionsStore.unset ? null - : this._context.dates.lastPicked - ? this._context.dates.lastPicked.clone - : void 0 + : this.dates.lastPicked + ? this.dates.lastPicked.clone + : void 0, }); this._isVisible = false; } @@ -2753,27 +2802,27 @@ template.classList.add(Namespace.css.widget); const dateView = document.createElement('div'); dateView.classList.add(Namespace.css.dateContainer); - dateView.append(this._headTemplate, this._decadeDisplay._picker, this._yearDisplay._picker, this._monthDisplay._picker, this._dateDisplay._picker); + dateView.append(this.getHeadTemplate(), this.decadeDisplay.getPicker(), this.yearDisplay.getPicker(), this.monthDisplay.getPicker(), this.dateDisplay.getPicker()); const timeView = document.createElement('div'); timeView.classList.add(Namespace.css.timeContainer); - timeView.appendChild(this._timeDisplay._picker); - timeView.appendChild(this._hourDisplay._picker); - timeView.appendChild(this._minuteDisplay._picker); - timeView.appendChild(this._secondDisplay._picker); + timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))); + timeView.appendChild(this.hourDisplay.getPicker()); + timeView.appendChild(this.minuteDisplay.getPicker()); + timeView.appendChild(this.secondDisplay.getPicker()); const toolbar = document.createElement('div'); toolbar.classList.add(Namespace.css.toolbar); - toolbar.append(...this._toolbar); - if (this._context._options.display.inline) { + toolbar.append(...this.getToolbarElements()); + if (this.optionsStore.options.display.inline) { template.classList.add(Namespace.css.inline); } - if (this._context._options.display.calendarWeeks) { + if (this.optionsStore.options.display.calendarWeeks) { template.classList.add('calendarWeeks'); } - if (this._context._options.display.sideBySide && + if (this.optionsStore.options.display.sideBySide && this._hasDate && this._hasTime) { template.classList.add(Namespace.css.sideBySide); - if (this._context._options.display.toolbarPlacement === 'top') { + if (this.optionsStore.options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } const row = document.createElement('div'); @@ -2783,19 +2832,19 @@ row.appendChild(dateView); row.appendChild(timeView); template.appendChild(row); - if (this._context._options.display.toolbarPlacement === 'bottom') { + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { template.appendChild(toolbar); } this._widget = template; return; } - if (this._context._options.display.toolbarPlacement === 'top') { + if (this.optionsStore.options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } if (this._hasDate) { if (this._hasTime) { dateView.classList.add(Namespace.css.collapse); - if (this._context._options.display.viewMode !== 'clock') + if (this.optionsStore.options.display.viewMode !== 'clock') dateView.classList.add(Namespace.css.show); } template.appendChild(dateView); @@ -2803,12 +2852,12 @@ if (this._hasTime) { if (this._hasDate) { timeView.classList.add(Namespace.css.collapse); - if (this._context._options.display.viewMode === 'clock') + if (this.optionsStore.options.display.viewMode === 'clock') timeView.classList.add(Namespace.css.show); } template.appendChild(timeView); } - if (this._context._options.display.toolbarPlacement === 'bottom') { + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { template.appendChild(toolbar); } const arrow = document.createElement('div'); @@ -2821,63 +2870,63 @@ * Returns true if the hours, minutes, or seconds component is turned on */ get _hasTime() { - return (this._context._options.display.components.clock && - (this._context._options.display.components.hours || - this._context._options.display.components.minutes || - this._context._options.display.components.seconds)); + return (this.optionsStore.options.display.components.clock && + (this.optionsStore.options.display.components.hours || + this.optionsStore.options.display.components.minutes || + this.optionsStore.options.display.components.seconds)); } /** * Returns true if the year, month, or date component is turned on */ get _hasDate() { - return (this._context._options.display.components.calendar && - (this._context._options.display.components.year || - this._context._options.display.components.month || - this._context._options.display.components.date)); + return (this.optionsStore.options.display.components.calendar && + (this.optionsStore.options.display.components.year || + this.optionsStore.options.display.components.month || + this.optionsStore.options.display.components.date)); } /** * Get the toolbar html based on options like buttons.today * @private */ - get _toolbar() { + getToolbarElements() { const toolbar = []; - if (this._context._options.display.buttons.today) { + if (this.optionsStore.options.display.buttons.today) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.today); - div.setAttribute('title', this._context._options.localization.today); - div.appendChild(this._iconTag(this._context._options.display.icons.today)); + div.setAttribute('data-action', ActionTypes$1.today); + div.setAttribute('title', this.optionsStore.options.localization.today); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)); toolbar.push(div); } - if (!this._context._options.display.sideBySide && + if (!this.optionsStore.options.display.sideBySide && this._hasDate && this._hasTime) { let title, icon; - if (this._context._options.display.viewMode === 'clock') { - title = this._context._options.localization.selectDate; - icon = this._context._options.display.icons.date; + if (this.optionsStore.options.display.viewMode === 'clock') { + title = this.optionsStore.options.localization.selectDate; + icon = this.optionsStore.options.display.icons.date; } else { - title = this._context._options.localization.selectTime; - icon = this._context._options.display.icons.time; + title = this.optionsStore.options.localization.selectTime; + icon = this.optionsStore.options.display.icons.time; } const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.togglePicker); + div.setAttribute('data-action', ActionTypes$1.togglePicker); div.setAttribute('title', title); div.appendChild(this._iconTag(icon)); toolbar.push(div); } - if (this._context._options.display.buttons.clear) { + if (this.optionsStore.options.display.buttons.clear) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.clear); - div.setAttribute('title', this._context._options.localization.clear); - div.appendChild(this._iconTag(this._context._options.display.icons.clear)); + div.setAttribute('data-action', ActionTypes$1.clear); + div.setAttribute('title', this.optionsStore.options.localization.clear); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)); toolbar.push(div); } - if (this._context._options.display.buttons.close) { + if (this.optionsStore.options.display.buttons.close) { const div = document.createElement('div'); - div.setAttribute('data-action', ActionTypes.close); - div.setAttribute('title', this._context._options.localization.close); - div.appendChild(this._iconTag(this._context._options.display.icons.close)); + div.setAttribute('data-action', ActionTypes$1.close); + div.setAttribute('title', this.optionsStore.options.localization.close); + div.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)); toolbar.push(div); } return toolbar; @@ -2886,20 +2935,20 @@ * Builds the base header template with next and previous icons * @private */ - get _headTemplate() { + getHeadTemplate() { const calendarHeader = document.createElement('div'); calendarHeader.classList.add(Namespace.css.calendarHeader); const previous = document.createElement('div'); previous.classList.add(Namespace.css.previous); - previous.setAttribute('data-action', ActionTypes.previous); - previous.appendChild(this._iconTag(this._context._options.display.icons.previous)); + previous.setAttribute('data-action', ActionTypes$1.previous); + previous.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous)); const switcher = document.createElement('div'); switcher.classList.add(Namespace.css.switch); - switcher.setAttribute('data-action', ActionTypes.pickerSwitch); + switcher.setAttribute('data-action', ActionTypes$1.changeCalendarView); const next = document.createElement('div'); next.classList.add(Namespace.css.next); - next.setAttribute('data-action', ActionTypes.next); - next.appendChild(this._iconTag(this._context._options.display.icons.next)); + next.setAttribute('data-action', ActionTypes$1.next); + next.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)); calendarHeader.append(previous, switcher, next); return calendarHeader; } @@ -2910,7 +2959,7 @@ * @private */ _iconTag(iconClass) { - if (this._context._options.display.icons.type === 'sprites') { + if (this.optionsStore.options.display.icons.type === 'sprites') { const svg = document.createElement('svg'); svg.innerHTML = ``; return svg; @@ -2936,117 +2985,234 @@ } /** - * Main class for date validation rules based on the options provided. + * */ - class Validation { - constructor(context) { - this._context = context; + class Actions { + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + this.display = serviceLocator.locate(Display); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this._eventEmitters.action.subscribe((result) => { + this.do(result.e, result.action); + }); } /** - * Checks to see if the target date is valid based on the rules provided in the options. - * Granularity can be provide to chek portions of the date instead of the whole. - * @param targetDate - * @param granularity + * Performs the selected `action`. See ActionTypes + * @param e This is normally a click event + * @param action If not provided, then look for a [data-action] */ - isValid(targetDate, granularity) { - var _a; - if (this._context._options.restrictions.disabledDates.length > 0 && - this._isInDisabledDates(targetDate)) { - return false; - } - if (this._context._options.restrictions.enabledDates.length > 0 && - !this._isInEnabledDates(targetDate)) { - return false; - } - if (granularity !== exports.Unit.month && - granularity !== exports.Unit.year && - ((_a = this._context._options.restrictions.daysOfWeekDisabled) === null || _a === void 0 ? void 0 : _a.length) > 0 && - this._context._options.restrictions.daysOfWeekDisabled.indexOf(targetDate.weekDay) !== -1) { - return false; - } - if (this._context._options.restrictions.minDate && - targetDate.isBefore(this._context._options.restrictions.minDate, granularity)) { - return false; - } - if (this._context._options.restrictions.maxDate && - targetDate.isAfter(this._context._options.restrictions.maxDate, granularity)) { + do(e, action) { + var _a, _b; + const currentTarget = e === null || e === void 0 ? void 0 : e.currentTarget; + if ((_a = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.classList) === null || _a === void 0 ? void 0 : _a.contains(Namespace.css.disabled)) return false; - } - if (granularity === exports.Unit.hours || - granularity === exports.Unit.minutes || - granularity === exports.Unit.seconds) { - if (this._context._options.restrictions.disabledHours.length > 0 && - this._isInDisabledHours(targetDate)) { - return false; - } - if (this._context._options.restrictions.enabledHours.length > 0 && - !this._isInEnabledHours(targetDate)) { - return false; - } - if (this._context._options.restrictions.disabledTimeIntervals.length > 0) { - for (let i = 0; i < this._context._options.restrictions.disabledTimeIntervals.length; i++) { - if (targetDate.isBetween(this._context._options.restrictions.disabledTimeIntervals[i].from, this._context._options.restrictions.disabledTimeIntervals[i].to)) - return false; + action = action || ((_b = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.dataset) === null || _b === void 0 ? void 0 : _b.action); + const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate) + .clone; + switch (action) { + case ActionTypes$1.next: + case ActionTypes$1.previous: + this.handleNextPrevious(action); + break; + case ActionTypes$1.changeCalendarView: + this.display._showMode(1); + this.display._updateCalendarHeader(); + break; + case ActionTypes$1.selectMonth: + case ActionTypes$1.selectYear: + case ActionTypes$1.selectDecade: + const value = +currentTarget.dataset.value; + switch (action) { + case ActionTypes$1.selectMonth: + this.optionsStore.viewDate.month = value; + break; + case ActionTypes$1.selectYear: + case ActionTypes$1.selectDecade: + this.optionsStore.viewDate.year = value; + break; } - } + if (this.optionsStore.currentCalendarViewMode === + this.optionsStore.minimumCalendarViewMode) { + this.dates.setValue(this.optionsStore.viewDate, this.dates.lastPickedIndex); + if (!this.optionsStore.options.display.inline) { + this.display.hide(); + } + } + else { + this.display._showMode(-1); + } + break; + case ActionTypes$1.selectDay: + const day = this.optionsStore.viewDate.clone; + if (currentTarget.classList.contains(Namespace.css.old)) { + day.manipulate(-1, exports.Unit.month); + } + if (currentTarget.classList.contains(Namespace.css.new)) { + day.manipulate(1, exports.Unit.month); + } + day.date = +currentTarget.dataset.day; + let index = 0; + if (this.optionsStore.options.multipleDates) { + index = this.dates.pickedIndex(day, exports.Unit.date); + if (index !== -1) { + this.dates.setValue(null, index); //deselect multi-date + } + else { + this.dates.setValue(day, this.dates.lastPickedIndex + 1); + } + } + else { + this.dates.setValue(day, this.dates.lastPickedIndex); + } + if (!this.display._hasTime && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline && + !this.optionsStore.options.multipleDates) { + this.display.hide(); + } + break; + case ActionTypes$1.selectHour: + let hour = +currentTarget.dataset.value; + if (lastPicked.hours >= 12 && + !this.optionsStore.options.display.components.useTwentyfourHour) + hour += 12; + lastPicked.hours = hour; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.selectMinute: + lastPicked.minutes = +currentTarget.dataset.value; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.selectSecond: + lastPicked.seconds = +currentTarget.dataset.value; + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); + this.hideOrClock(e); + break; + case ActionTypes$1.incrementHours: + this.manipulateAndSet(lastPicked, exports.Unit.hours); + break; + case ActionTypes$1.incrementMinutes: + this.manipulateAndSet(lastPicked, exports.Unit.minutes, this.optionsStore.options.stepping); + break; + case ActionTypes$1.incrementSeconds: + this.manipulateAndSet(lastPicked, exports.Unit.seconds); + break; + case ActionTypes$1.decrementHours: + this.manipulateAndSet(lastPicked, exports.Unit.hours, -1); + break; + case ActionTypes$1.decrementMinutes: + this.manipulateAndSet(lastPicked, exports.Unit.minutes, this.optionsStore.options.stepping * -1); + break; + case ActionTypes$1.decrementSeconds: + this.manipulateAndSet(lastPicked, exports.Unit.seconds, -1); + break; + case ActionTypes$1.toggleMeridiem: + this.manipulateAndSet(lastPicked, exports.Unit.hours, this.dates.lastPicked.hours >= 12 ? -12 : 12); + break; + case ActionTypes$1.togglePicker: + if (currentTarget.getAttribute('title') === + this.optionsStore.options.localization.selectDate) { + currentTarget.setAttribute('title', this.optionsStore.options.localization.selectTime); + currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML; + this.display._updateCalendarHeader(); + this.optionsStore.refreshCurrentView(); + } + else { + currentTarget.setAttribute('title', this.optionsStore.options.localization.selectDate); + currentTarget.innerHTML = this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML; + if (this.display._hasTime) { + this.do(e, ActionTypes$1.showClock); + this.display._update('clock'); + } + } + this.display.widget + .querySelectorAll(`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`) + .forEach((htmlElement) => Collapse.toggle(htmlElement)); + this._eventEmitters.viewUpdate.emit(); + break; + case ActionTypes$1.showClock: + case ActionTypes$1.showHours: + case ActionTypes$1.showMinutes: + case ActionTypes$1.showSeconds: + this.optionsStore.currentView = 'clock'; + this.display.widget + .querySelectorAll(`.${Namespace.css.timeContainer} > div`) + .forEach((htmlElement) => (htmlElement.style.display = 'none')); + let classToUse = ''; + switch (action) { + case ActionTypes$1.showClock: + classToUse = Namespace.css.clockContainer; + this.display._update('clock'); + break; + case ActionTypes$1.showHours: + classToUse = Namespace.css.hourContainer; + this.display._update(exports.Unit.hours); + break; + case ActionTypes$1.showMinutes: + classToUse = Namespace.css.minuteContainer; + this.display._update(exports.Unit.minutes); + break; + case ActionTypes$1.showSeconds: + classToUse = Namespace.css.secondContainer; + this.display._update(exports.Unit.seconds); + break; + } + (this.display.widget.getElementsByClassName(classToUse)[0]).style.display = 'grid'; + break; + case ActionTypes$1.clear: + this.dates.setValue(null); + this.display._updateCalendarHeader(); + break; + case ActionTypes$1.close: + this.display.hide(); + break; + case ActionTypes$1.today: + const today = new DateTime().setLocale(this.optionsStore.options.localization.locale); + this.optionsStore.viewDate = today; + if (this.validation.isValid(today, exports.Unit.date)) + this.dates.setValue(today, this.dates.lastPickedIndex); + break; } - return true; - } - /** - * Checks to see if the disabledDates option is in use and returns true (meaning invalid) - * if the `testDate` is with in the array. Granularity is by date. - * @param testDate - * @private - */ - _isInDisabledDates(testDate) { - if (!this._context._options.restrictions.disabledDates || - this._context._options.restrictions.disabledDates.length === 0) - return false; - const formattedDate = testDate.format(Dates.getFormatByUnit(exports.Unit.date)); - return this._context._options.restrictions.disabledDates - .map((x) => x.format(Dates.getFormatByUnit(exports.Unit.date))) - .find((x) => x === formattedDate); } - /** - * Checks to see if the enabledDates option is in use and returns true (meaning valid) - * if the `testDate` is with in the array. Granularity is by date. - * @param testDate - * @private - */ - _isInEnabledDates(testDate) { - if (!this._context._options.restrictions.enabledDates || - this._context._options.restrictions.enabledDates.length === 0) - return true; - const formattedDate = testDate.format(Dates.getFormatByUnit(exports.Unit.date)); - return this._context._options.restrictions.enabledDates - .map((x) => x.format(Dates.getFormatByUnit(exports.Unit.date))) - .find((x) => x === formattedDate); + handleNextPrevious(action) { + const { unit, step } = CalendarModes[this.optionsStore.currentCalendarViewMode]; + if (action === ActionTypes$1.next) + this.optionsStore.viewDate.manipulate(step, unit); + else + this.optionsStore.viewDate.manipulate(step * -1, unit); + this._eventEmitters.viewUpdate.emit(); + this.display._showMode(); } /** - * Checks to see if the disabledHours option is in use and returns true (meaning invalid) - * if the `testDate` is with in the array. Granularity is by hours. - * @param testDate - * @private + * After setting the value it will either show the clock or hide the widget. + * @param e */ - _isInDisabledHours(testDate) { - if (!this._context._options.restrictions.disabledHours || - this._context._options.restrictions.disabledHours.length === 0) - return false; - const formattedDate = testDate.hours; - return this._context._options.restrictions.disabledHours.find((x) => x === formattedDate); + hideOrClock(e) { + if (this.optionsStore.options.display.components.useTwentyfourHour && + !this.optionsStore.options.display.components.minutes && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline) { + this.display.hide(); + } + else { + this.do(e, ActionTypes$1.showClock); + } } /** - * Checks to see if the enabledHours option is in use and returns true (meaning valid) - * if the `testDate` is with in the array. Granularity is by hours. - * @param testDate - * @private + * Common function to manipulate {@link lastPicked} by `unit`. + * @param lastPicked + * @param unit + * @param value Value to change by */ - _isInEnabledHours(testDate) { - if (!this._context._options.restrictions.enabledHours || - this._context._options.restrictions.enabledHours.length === 0) - return true; - const formattedDate = testDate.hours; - return this._context._options.restrictions.enabledHours.find((x) => x === formattedDate); + manipulateAndSet(lastPicked, unit, value = 1) { + const newDate = lastPicked.manipulate(value, unit); + if (this.validation.isValid(newDate, unit)) { + this.dates.setValue(newDate, this.dates.lastPickedIndex); + } } } @@ -3055,12 +3221,8 @@ */ class TempusDominus { constructor(element, options = {}) { - this._currentViewMode = 0; this._subscribers = {}; - this._minViewModeNumber = 0; this._isDisabled = false; - this._notifyChangeEventContext = 0; - this._viewDate = new DateTime(); /** * Event for when the input field changes. This is a class level method so there's * something for the remove listener function. @@ -3069,19 +3231,14 @@ this._inputChangeEvent = () => { const setViewDate = () => { if (this.dates.lastPicked) - this._viewDate = this.dates.lastPicked; + this.optionsStore.viewDate = this.dates.lastPicked; }; - const value = this._input.value; - if (this._options.multipleDates) { + const value = this.optionsStore.input.value; + if (this.optionsStore.options.multipleDates) { try { - const valueSplit = value.split(this._options.multipleDatesSeparator); + const valueSplit = value.split(this.optionsStore.options.multipleDatesSeparator); for (let i = 0; i < valueSplit.length; i++) { - if (this._options.hooks.inputParse) { - this.dates.set(this._options.hooks.inputParse(this, valueSplit[i]), i, 'input'); - } - else { - this.dates.set(valueSplit[i], i, 'input'); - } + this.dates.setFromInput(valueSplit[i], i); } setViewDate(); } @@ -3090,12 +3247,7 @@ } } else { - if (this._options.hooks.inputParse) { - this.dates.set(this._options.hooks.inputParse(this, value), 0, 'input'); - } - else { - this.dates.set(value, 0, 'input'); - } + this.dates.setFromInput(value, 0); setViewDate(); } }; @@ -3107,24 +3259,32 @@ this._toggleClickEvent = () => { this.toggle(); }; + setupServiceLocator(); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this.optionsStore = serviceLocator.locate(OptionsStore); + this.display = serviceLocator.locate(Display); + this.dates = serviceLocator.locate(Dates); + this.actions = serviceLocator.locate(Actions); if (!element) { - Namespace.errorMessages.mustProvideElement; - } - this._element = element; - this._options = this._initializeOptions(options, DefaultOptions, true); - this._viewDate.setLocale(this._options.localization.locale); - this._unset = true; - this._display = new Display(this); - this._validation = new Validation(this); - this.dates = new Dates(this); - this._action = new Actions(this); + Namespace.errorMessages.mustProvideElement(); + } + this.optionsStore.element = element; + this._initializeOptions(options, DefaultOptions, true); + this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale); + this.optionsStore.unset = true; this._initializeInput(); this._initializeToggle(); - if (this._options.display.inline) - this._display.show(); + if (this.optionsStore.options.display.inline) + this.display.show(); + this._eventEmitters.triggerEvent.subscribe((e) => { + this._triggerEvent(e); + }); + this._eventEmitters.viewUpdate.subscribe(() => { + this._viewUpdate(); + }); } get viewDate() { - return this._viewDate; + return this.optionsStore.viewDate; } // noinspection JSUnusedGlobalSymbols /** @@ -3135,10 +3295,10 @@ */ updateOptions(options, reset = false) { if (reset) - this._options = this._initializeOptions(options, DefaultOptions); + this._initializeOptions(options, DefaultOptions); else - this._options = this._initializeOptions(options, this._options); - this._display._rebuild(); + this._initializeOptions(options, this.optionsStore.options); + this.display._rebuild(); } // noinspection JSUnusedGlobalSymbols /** @@ -3148,7 +3308,7 @@ toggle() { if (this._isDisabled) return; - this._display.toggle(); + this.display.toggle(); } // noinspection JSUnusedGlobalSymbols /** @@ -3158,7 +3318,7 @@ show() { if (this._isDisabled) return; - this._display.show(); + this.display.show(); } // noinspection JSUnusedGlobalSymbols /** @@ -3166,7 +3326,7 @@ * @public */ hide() { - this._display.hide(); + this.display.hide(); } // noinspection JSUnusedGlobalSymbols /** @@ -3178,8 +3338,8 @@ this._isDisabled = true; // todo this might be undesired. If a dev disables the input field to // only allow using the picker, this will break that. - (_a = this._input) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled'); - this._display.hide(); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled'); + this.display.hide(); } // noinspection JSUnusedGlobalSymbols /** @@ -3189,7 +3349,7 @@ enable() { var _a; this._isDisabled = false; - (_a = this._input) === null || _a === void 0 ? void 0 : _a.removeAttribute('disabled'); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeAttribute('disabled'); } // noinspection JSUnusedGlobalSymbols /** @@ -3218,7 +3378,7 @@ callBackArray = callbacks; } if (eventTypes.length !== callBackArray.length) { - Namespace.errorMessages.subscribeMismatch; + Namespace.errorMessages.subscribeMismatch(); } const returnArray = []; for (let i = 0; i < eventTypes.length; i++) { @@ -3241,17 +3401,30 @@ * Hides the picker and removes event listeners */ dispose() { - var _a, _b; - this._display.hide(); + var _a, _b, _c; + this.display.hide(); // this will clear the document click event listener - this._display._dispose(); - (_a = this._input) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this._inputChangeEvent); - if (this._options.allowInputToggle) { - (_b = this._input) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this._toggleClickEvent); + this.display._dispose(); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this._inputChangeEvent); + if (this.optionsStore.options.allowInputToggle) { + (_b = this.optionsStore.input) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this._toggleClickEvent); } - this._toggle.removeEventListener('click', this._toggleClickEvent); + (_c = this._toggle) === null || _c === void 0 ? void 0 : _c.removeEventListener('click', this._toggleClickEvent); this._subscribers = {}; } + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language) { + let asked = loadedLocales[language]; + if (!asked) + return; + this.updateOptions({ + localization: asked, + }); + } /** * Triggers an event like ChangeEvent when the picker has updated the value * of a selected date. @@ -3259,49 +3432,49 @@ * @private */ _triggerEvent(event) { - // checking hasOwnProperty because the BasicEvent also falls through here otherwise - if (event && event.hasOwnProperty('date')) { + var _a; + event.viewMode = this.optionsStore.currentView; + const isChangeEvent = event.type === Namespace.events.change; + if (isChangeEvent) { const { date, oldDate, isClear } = event; - // this was to prevent a max call stack error - // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb - // todo see if this is still needed or if there's a cleaner way - this._notifyChangeEventContext++; if ((date && oldDate && date.isSame(oldDate)) || - (!isClear && !date && !oldDate) || - this._notifyChangeEventContext > 1) { - this._notifyChangeEventContext = 0; + (!isClear && !date && !oldDate)) { return; } this._handleAfterChangeEvent(event); + (_a = this.optionsStore.input) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new CustomEvent(event.type, { detail: event })); } - this._element.dispatchEvent(new CustomEvent(event.type, { detail: event })); + this.optionsStore.element.dispatchEvent(new CustomEvent(event.type, { detail: event })); if (window.jQuery) { const $ = window.jQuery; - $(this._element).trigger(event); - } - const publish = () => { - // return if event is not subscribed - if (!Array.isArray(this._subscribers[event.type])) { - return; + if (isChangeEvent && this.optionsStore.input) { + $(this.optionsStore.input).trigger(event); } - // Trigger callback for each subscriber - this._subscribers[event.type].forEach((callback) => { - callback(event); - }); - }; - publish(); - this._notifyChangeEventContext = 0; + else { + $(this.optionsStore.element).trigger(event); + } + } + this._publish(event); + } + _publish(event) { + // return if event is not subscribed + if (!Array.isArray(this._subscribers[event.type])) { + return; + } + // Trigger callback for each subscriber + this._subscribers[event.type].forEach((callback) => { + callback(event); + }); } /** * Fires a ViewUpdate event when, for example, the month view is changed. * @param {Unit} unit * @private */ - _viewUpdate(unit) { + _viewUpdate() { this._triggerEvent({ type: Namespace.events.update, - change: unit, - viewDate: this._viewDate.clone, + viewDate: this.optionsStore.viewDate.clone, }); } _unsubscribe(eventName, index) { @@ -3318,55 +3491,35 @@ var _a; config = OptionConverter._mergeOptions(config, mergeTo); if (includeDataset) - config = OptionConverter._dataToOptions(this._element, config); + config = OptionConverter._dataToOptions(this.optionsStore.element, config); OptionConverter._validateConflcits(config); config.viewDate = config.viewDate.setLocale(config.localization.locale); - if (!this._viewDate.isSame(config.viewDate)) { - this._viewDate = config.viewDate; + if (!this.optionsStore.viewDate.isSame(config.viewDate)) { + this.optionsStore.viewDate = config.viewDate; } /** * Sets the minimum view allowed by the picker. For example the case of only * allowing year and month to be selected but not date. */ if (config.display.components.year) { - this._minViewModeNumber = 2; + this.optionsStore.minimumCalendarViewMode = 2; } if (config.display.components.month) { - this._minViewModeNumber = 1; + this.optionsStore.minimumCalendarViewMode = 1; } if (config.display.components.date) { - this._minViewModeNumber = 0; + this.optionsStore.minimumCalendarViewMode = 0; } - this._currentViewMode = Math.max(this._minViewModeNumber, this._currentViewMode); + this.optionsStore.currentCalendarViewMode = Math.max(this.optionsStore.minimumCalendarViewMode, this.optionsStore.currentCalendarViewMode); // Update view mode if needed - if (DatePickerModes[this._currentViewMode].name !== config.display.viewMode) { - this._currentViewMode = Math.max(DatePickerModes.findIndex((x) => x.name === config.display.viewMode), this._minViewModeNumber); - } - // defaults the input format based on the components enabled - if (config.hooks.inputFormat === undefined) { - const components = config.display.components; - config.hooks.inputFormat = (_, date) => { - if (!date) - return ''; - return date.format({ - year: components.calendar && components.year ? 'numeric' : undefined, - month: components.calendar && components.month ? '2-digit' : undefined, - day: components.calendar && components.date ? '2-digit' : undefined, - hour: components.clock && components.hours - ? components.useTwentyfourHour - ? '2-digit' - : 'numeric' - : undefined, - minute: components.clock && components.minutes ? '2-digit' : undefined, - second: components.clock && components.seconds ? '2-digit' : undefined, - hour12: !components.useTwentyfourHour, - }); - }; + if (CalendarModes[this.optionsStore.currentCalendarViewMode].name !== + config.display.viewMode) { + this.optionsStore.currentCalendarViewMode = Math.max(CalendarModes.findIndex((x) => x.name === config.display.viewMode), this.optionsStore.minimumCalendarViewMode); } - if ((_a = this._display) === null || _a === void 0 ? void 0 : _a.isVisible) { - this._display._update('all'); + if ((_a = this.display) === null || _a === void 0 ? void 0 : _a.isVisible) { + this.display._update('all'); } - return config; + this.optionsStore.options = config; } /** * Checks if an input field is being used, attempts to locate one and sets an @@ -3374,25 +3527,27 @@ * @private */ _initializeInput() { - if (this._element.tagName == 'INPUT') { - this._input = this._element; + if (this.optionsStore.element.tagName == 'INPUT') { + this.optionsStore.input = this.optionsStore.element; } else { - let query = this._element.dataset.tdTargetInput; + let query = this.optionsStore.element.dataset.tdTargetInput; if (query == undefined || query == 'nearest') { - this._input = this._element.querySelector('input'); + this.optionsStore.input = + this.optionsStore.element.querySelector('input'); } else { - this._input = this._element.querySelector(query); + this.optionsStore.input = + this.optionsStore.element.querySelector(query); } } - if (!this._input) + if (!this.optionsStore.input) return; - this._input.addEventListener('change', this._inputChangeEvent); - if (this._options.allowInputToggle) { - this._input.addEventListener('click', this._toggleClickEvent); + this.optionsStore.input.addEventListener('change', this._inputChangeEvent); + if (this.optionsStore.options.allowInputToggle) { + this.optionsStore.input.addEventListener('click', this._toggleClickEvent); } - if (this._input.value) { + if (this.optionsStore.input.value) { this._inputChangeEvent(); } } @@ -3401,14 +3556,16 @@ * @private */ _initializeToggle() { - if (this._options.display.inline) + if (this.optionsStore.options.display.inline) return; - let query = this._element.dataset.tdTargetToggle; + let query = this.optionsStore.element.dataset.tdTargetToggle; if (query == 'nearest') { query = '[data-td-toggle="datetimepicker"]'; } this._toggle = - query == undefined ? this._element : this._element.querySelector(query); + query == undefined + ? this.optionsStore.element + : this.optionsStore.element.querySelector(query); this._toggle.addEventListener('click', this._toggleClickEvent); } /** @@ -3420,37 +3577,77 @@ var _a, _b; if ( // options is disabled - !this._options.promptTimeOnDateChange || - this._options.display.inline || - this._options.display.sideBySide || + !this.optionsStore.options.promptTimeOnDateChange || + this.optionsStore.options.display.inline || + this.optionsStore.options.display.sideBySide || // time is disabled - !this._display._hasTime || + !this.display._hasTime || ( // clock component is already showing - (_a = this._display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.css.show)[0].classList.contains(Namespace.css.timeContainer))) + (_a = this.display.widget) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(Namespace.css.show)[0].classList.contains(Namespace.css.timeContainer))) return; // First time ever. If useCurrent option is set to true (default), do nothing // because the first date is selected automatically. // or date didn't change (time did) or date changed because time did. - if ((!e.oldDate && this._options.useCurrent) || + if ((!e.oldDate && this.optionsStore.options.useCurrent) || (e.oldDate && ((_b = e.date) === null || _b === void 0 ? void 0 : _b.isSame(e.oldDate)))) { return; } clearTimeout(this._currentPromptTimeTimeout); this._currentPromptTimeTimeout = setTimeout(() => { - if (this._display.widget) { - this._action.do({ - currentTarget: this._display.widget.querySelector(`.${Namespace.css.switch} div`), - }, ActionTypes.togglePicker); + if (this.display.widget) { + this._eventEmitters.action.emit({ + e: { + currentTarget: this.display.widget.querySelector(`.${Namespace.css.switch} div`), + }, + action: ActionTypes$1.togglePicker, + }); } - }, this._options.promptTimeOnDateChangeTransitionDelay); + }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay); } } + /** + * Whenever a locale is loaded via a plugin then store it here based on the + * locale name. E.g. loadedLocales['ru'] + */ + const loadedLocales = {}; + /** + * Called from a locale plugin. + * @param locale locale object for localization options + * @param name name of the language e.g 'ru', 'en-gb' + */ + const loadLocale = (locale) => { + if (loadedLocales[locale.name]) + return; + loadedLocales[locale.name] = locale.localization; + }; + /** + * A sets the global localization options to the provided locale name. + * `locadLocale` MUST be called first. + * @param locale + */ + const locale = (locale) => { + let asked = loadedLocales[locale]; + if (!asked) + return; + DefaultOptions.localization = asked; + }; + const extend = function (plugin, option) { + if (!plugin.$i) { + // install plugin only once + plugin.load(option, { TempusDominus, Dates, Display }, this); + plugin.$i = true; + } + return this; + }; exports.DateTime = DateTime; exports.DefaultOptions = DefaultOptions; exports.Namespace = Namespace; exports.TempusDominus = TempusDominus; + exports.extend = extend; + exports.loadLocale = loadLocale; + exports.locale = locale; Object.defineProperty(exports, '__esModule', { value: true }); diff --git a/dist/js/tempus-dominus.js.map b/dist/js/tempus-dominus.js.map index 8c225bd2c..e7ed70887 100644 --- a/dist/js/tempus-dominus.js.map +++ b/dist/js/tempus-dominus.js.map @@ -1 +1 @@ -{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/datetime.ts","../../src/js/errors.ts","../../src/js/namespace.ts","../../src/js/conts.ts","../../src/js/display/collapse.ts","../../src/js/actions.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/options.ts","../../src/js/dates.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/index.ts","../../src/js/validation.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\n seconds = 'seconds',\n minutes = 'minutes',\n hours = 'hours',\n date = 'date',\n month = 'month',\n year = 'year',\n}\n\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\n timeStyle?: 'short' | 'medium' | 'long';\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\n numberingSystem?: string;\n}\n\n/**\n * For the most part this object behaves exactly the same way\n * as the native Date object with a little extra spice.\n */\nexport class DateTime extends Date {\n /**\n * Used with Intl.DateTimeFormat\n */\n locale = 'default';\n\n /**\n * Chainable way to set the {@link locale}\n * @param value\n */\n setLocale(value: string): this {\n this.locale = value;\n return this;\n }\n\n /**\n * Converts a plain JS date object to a DateTime object.\n * Doing this allows access to format, etc.\n * @param date\n */\n static convert(date: Date, locale: string = 'default'): DateTime {\n if (!date) throw `A date is required`;\n return new DateTime(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ).setLocale(locale);\n }\n\n /**\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\n */\n get clone() {\n return new DateTime(\n this.year,\n this.month,\n this.date,\n this.hours,\n this.minutes,\n this.seconds,\n this.getMilliseconds()\n ).setLocale(this.locale);\n }\n\n /**\n * Sets the current date to the start of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\n * @param unit\n * @param startOfTheWeek Allows for the changing the start of the week.\n */\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(0);\n break;\n case 'minutes':\n this.setSeconds(0, 0);\n break;\n case 'hours':\n this.setMinutes(0, 0, 0);\n break;\n case 'date':\n this.setHours(0, 0, 0, 0);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(startOfTheWeek - this.weekDay, Unit.date);\n break;\n case 'month':\n this.startOf(Unit.date);\n this.setDate(1);\n break;\n case 'year':\n this.startOf(Unit.date);\n this.setMonth(0, 1);\n break;\n }\n return this;\n }\n\n /**\n * Sets the current date to the end of the {@link unit} provided\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\n * would return April 30, 2021, 11:59:59.999 PM\n * @param unit\n */\n endOf(unit: Unit | 'weekDay'): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n switch (unit) {\n case 'seconds':\n this.setMilliseconds(999);\n break;\n case 'minutes':\n this.setSeconds(59, 999);\n break;\n case 'hours':\n this.setMinutes(59, 59, 999);\n break;\n case 'date':\n this.setHours(23, 59, 59, 999);\n break;\n case 'weekDay':\n this.startOf(Unit.date);\n this.manipulate(6 - this.weekDay, Unit.date);\n break;\n case 'month':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.month);\n this.setDate(0);\n break;\n case 'year':\n this.endOf(Unit.date);\n this.manipulate(1, Unit.year);\n this.setDate(0);\n break;\n }\n return this;\n }\n\n /**\n * Change a {@link unit} value. Value can be positive or negative\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\n * would return May 30, 2021, 11:45:32.984 AM\n * @param value A positive or negative number\n * @param unit\n */\n manipulate(value: number, unit: Unit): this {\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n this[unit] += value;\n return this;\n }\n\n /**\n * Returns a string format.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * for valid templates and locale objects\n * @param template An object. Uses browser defaults otherwise.\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\n */\n format(template: DateTimeFormatOptions, locale = this.locale): string {\n return new Intl.DateTimeFormat(locale, template).format(this);\n }\n\n /**\n * Return true if {@link compare} is before this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isBefore(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() < compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is after this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isAfter(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() > compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n return (\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\n );\n }\n\n /**\n * Return true if {@link compare} is same this date\n * @param compare The Date/DateTime to compare\n * @param unit If provided, uses {@link startOf} for\n * comparision.\n */\n isSame(compare: DateTime, unit?: Unit): boolean {\n if (!unit) return this.valueOf() === compare.valueOf();\n if (this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n compare = DateTime.convert(compare);\n return (\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\n );\n }\n\n /**\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\n * @param left\n * @param right\n * @param unit.\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\n * If the inclusivity parameter is used, both indicators must be passed.\n */\n isBetween(\n left: DateTime,\n right: DateTime,\n unit?: Unit,\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\n ): boolean {\n if (unit && this[unit] === undefined) throw `Unit '${unit}' is not valid`;\n const leftInclusivity = inclusivity[0] === '(';\n const rightInclusivity = inclusivity[1] === ')';\n\n return (\n ((leftInclusivity\n ? this.isAfter(left, unit)\n : !this.isBefore(left, unit)) &&\n (rightInclusivity\n ? this.isBefore(right, unit)\n : !this.isAfter(right, unit))) ||\n ((leftInclusivity\n ? this.isBefore(left, unit)\n : !this.isAfter(left, unit)) &&\n (rightInclusivity\n ? this.isAfter(right, unit)\n : !this.isBefore(right, unit)))\n );\n }\n\n /**\n * Returns flattened object of the date. Does not include literals\n * @param locale\n * @param template\n */\n parts(\n locale = this.locale,\n template: any = { dateStyle: 'full', timeStyle: 'long' }\n ): any {\n const parts = {};\n new Intl.DateTimeFormat(locale, template)\n .formatToParts(this)\n .filter((x) => x.type !== 'literal')\n .forEach((x) => (parts[x.type] = x.value));\n return parts;\n }\n\n /**\n * Shortcut to Date.getSeconds()\n */\n get seconds(): number {\n return this.getSeconds();\n }\n\n /**\n * Shortcut to Date.setSeconds()\n */\n set seconds(value: number) {\n this.setSeconds(value);\n }\n\n /**\n * Returns two digit hours\n */\n get secondsFormatted(): string {\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\n }\n\n /**\n * Shortcut to Date.getMinutes()\n */\n get minutes(): number {\n return this.getMinutes();\n }\n\n /**\n * Shortcut to Date.setMinutes()\n */\n set minutes(value: number) {\n this.setMinutes(value);\n }\n\n /**\n * Returns two digit minutes\n */\n get minutesFormatted(): string {\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\n }\n\n /**\n * Shortcut to Date.getHours()\n */\n get hours(): number {\n return this.getHours();\n }\n\n /**\n * Shortcut to Date.setHours()\n */\n set hours(value: number) {\n this.setHours(value);\n }\n\n /**\n * Returns two digit hours\n */\n get hoursFormatted(): string {\n let formatted = this.format({ hour: '2-digit', hour12: false });\n if (formatted === '24') formatted = '00';\n return formatted;\n }\n\n /**\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\n */\n get twelveHoursFormatted(): string {\n let hour = this.parts().hour;\n if (hour.length === 1) hour = `0${hour}`;\n return hour;\n }\n\n /**\n * Get the meridiem of the date. E.g. AM or PM.\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\n * otherwise it will return AM or PM.\n * @param locale\n */\n meridiem(locale: string = this.locale): string {\n return new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true,\n } as any)\n .formatToParts(this)\n .find((p) => p.type === 'dayPeriod')?.value;\n }\n\n /**\n * Shortcut to Date.getDate()\n */\n get date(): number {\n return this.getDate();\n }\n\n /**\n * Shortcut to Date.setDate()\n */\n set date(value: number) {\n this.setDate(value);\n }\n\n /**\n * Return two digit date\n */\n get dateFormatted(): string {\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\n }\n\n /**\n * Shortcut to Date.getDay()\n */\n get weekDay(): number {\n return this.getDay();\n }\n\n /**\n * Shortcut to Date.getMonth()\n */\n get month(): number {\n return this.getMonth();\n }\n\n /**\n * Shortcut to Date.setMonth()\n */\n set month(value: number) {\n this.setMonth(value);\n }\n\n /**\n * Return two digit, human expected month. E.g. January = 1, December = 12\n */\n get monthFormatted(): string {\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\n }\n\n /**\n * Shortcut to Date.getFullYear()\n */\n get year(): number {\n return this.getFullYear();\n }\n\n /**\n * Shortcut to Date.setFullYear()\n */\n set year(value: number) {\n this.setFullYear(value);\n }\n\n // borrowed a bunch of stuff from Luxon\n /**\n * Gets the week of the year\n */\n get week(): number {\n const ordinal = this.computeOrdinal(),\n weekday = this.getUTCDay();\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\n\n if (weekNumber < 1) {\n weekNumber = this.weeksInWeekYear( this.year - 1);\n } else if (weekNumber > this. weeksInWeekYear(this.year)) {\n weekNumber = 1;\n }\n\n return weekNumber;\n }\n\n weeksInWeekYear(weekYear) {\n const p1 =\n (weekYear +\n Math.floor(weekYear / 4) -\n Math.floor(weekYear / 100) +\n Math.floor(weekYear / 400)) %\n 7,\n last = weekYear - 1,\n p2 =\n (last +\n Math.floor(last / 4) -\n Math.floor(last / 100) +\n Math.floor(last / 400)) %\n 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n }\n\n get isLeapYear() {\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\n }\n\n private computeOrdinal() {\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\n }\n\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n}\n","import Namespace from './namespace';\n\nexport class TdError extends Error {\n code: number;\n}\n\nexport class ErrorMessages {\n private base = 'TD:';\n\n //#region out to console\n\n /**\n * Throws an error indicating that a key in the options object is invalid.\n * @param optionName\n */\n unexpectedOption(optionName: string) {\n const error = new TdError(\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\n );\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error indicating that one more keys in the options object is invalid.\n * @param optionName\n */\n unexpectedOptions(optionName: string[]) {\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\n error.code = 1;\n throw error;\n }\n\n /**\n * Throws an error when an option is provide an unsupported value.\n * For example a value of 'cheese' for toolbarPlacement which only supports\n * 'top', 'bottom', 'default'.\n * @param optionName\n * @param badValue\n * @param validOptions\n */\n unexpectedOptionValue(\n optionName: string,\n badValue: string,\n validOptions: string[]\n ) {\n const error = new TdError(\n `${\n this.base\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\n ', '\n )}`\n );\n error.code = 2;\n throw error;\n }\n\n /**\n * Throws an error when an option value is the wrong type.\n * For example a string value was provided to multipleDates which only\n * supports true or false.\n * @param optionName\n * @param badType\n * @param expectedType\n */\n typeMismatch(optionName: string, badType: string, expectedType: string) {\n const error = new TdError(\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\n );\n error.code = 3;\n throw error;\n }\n\n /**\n * Throws an error when an option value is outside of the expected range.\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\n * @param optionName\n * @param lower\n * @param upper\n */\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\n const error = new TdError(\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\n );\n error.code = 4;\n throw error;\n }\n\n /**\n * Throws an error when a value for a date options couldn't be parsed. Either\n * the option was an invalide string or an invalid Date object.\n * @param optionName\n * @param date\n * @param soft If true, logs a warning instead of an error.\n */\n failedToParseDate(optionName: string, date: any, soft = false) {\n const error = new TdError(\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\n );\n error.code = 5;\n if (!soft) throw error;\n console.warn(error);\n }\n\n /**\n * Throws when an element to attach to was not provided in the constructor.\n */\n mustProvideElement() {\n const error = new TdError(`${this.base} No element was provided.`);\n error.code = 6;\n throw error;\n }\n\n /**\n * Throws if providing an array for the events to subscribe method doesn't have\n * the same number of callbacks. E.g., subscribe([1,2], [1])\n */\n subscribeMismatch() {\n const error = new TdError(\n `${this.base} The subscribed events does not match the number of callbacks`\n );\n error.code = 7;\n throw error;\n }\n\n /**\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\n */\n conflictingConfiguration(message?: string) {\n const error = new TdError(\n `${this.base} A configuration value conflicts with another rule. ${message}`\n );\n error.code = 8;\n throw error;\n }\n\n /**\n * Logs a warning if a date option value is provided as a string, instead of\n * a date/datetime object.\n */\n dateString() {\n console.warn(\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\n );\n }\n\n //#endregion\n\n //#region used with notify.error\n\n /**\n * Used with an Error Event type if the user selects a date that\n * fails restriction validation.\n */\n failedToSetInvalidDate = 'Failed to set invalid date';\n\n /**\n * Used with an Error Event type when a user changes the value of the\n * input field directly, and does not provide a valid date.\n */\n failedToParseInput = 'Failed parse input field';\n\n //#endregion\n}\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-alpha1',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n /**\n * Applied AM/PM toggle button.\n */\n toggleMeridiem = 'toggleMeridiem';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { DateTime, Unit } from './datetime';\r\nimport Namespace from './namespace';\r\nimport Options from './options';\r\n\r\nconst DefaultOptions: Options = {\r\n restrictions: {\r\n minDate: undefined,\r\n maxDate: undefined,\r\n disabledDates: [],\r\n enabledDates: [],\r\n daysOfWeekDisabled: [],\r\n disabledTimeIntervals: [],\r\n disabledHours: [],\r\n enabledHours: [],\r\n },\r\n display: {\r\n icons: {\r\n type: 'icons',\r\n time: 'fas fa-clock',\r\n date: 'fas fa-calendar',\r\n up: 'fas fa-arrow-up',\r\n down: 'fas fa-arrow-down',\r\n previous: 'fas fa-chevron-left',\r\n next: 'fas fa-chevron-right',\r\n today: 'fas fa-calendar-check',\r\n clear: 'fas fa-trash',\r\n close: 'fas fa-times',\r\n },\r\n sideBySide: false,\r\n calendarWeeks: false,\r\n viewMode: 'calendar',\r\n toolbarPlacement: 'bottom',\r\n keepOpen: false,\r\n buttons: {\r\n today: false,\r\n clear: false,\r\n close: false,\r\n },\r\n components: {\r\n calendar: true,\r\n date: true,\r\n month: true,\r\n year: true,\r\n decades: true,\r\n clock: true,\r\n hours: true,\r\n minutes: true,\r\n seconds: false,\r\n useTwentyfourHour: false,\r\n },\r\n inline: false,\r\n },\r\n stepping: 1,\r\n useCurrent: true,\r\n defaultDate: undefined,\r\n localization: {\r\n today: 'Go to today',\r\n clear: 'Clear selection',\r\n close: 'Close the picker',\r\n selectMonth: 'Select Month',\r\n previousMonth: 'Previous Month',\r\n nextMonth: 'Next Month',\r\n selectYear: 'Select Year',\r\n previousYear: 'Previous Year',\r\n nextYear: 'Next Year',\r\n selectDecade: 'Select Decade',\r\n previousDecade: 'Previous Decade',\r\n nextDecade: 'Next Decade',\r\n previousCentury: 'Previous Century',\r\n nextCentury: 'Next Century',\r\n pickHour: 'Pick Hour',\r\n incrementHour: 'Increment Hour',\r\n decrementHour: 'Decrement Hour',\r\n pickMinute: 'Pick Minute',\r\n incrementMinute: 'Increment Minute',\r\n decrementMinute: 'Decrement Minute',\r\n pickSecond: 'Pick Second',\r\n incrementSecond: 'Increment Second',\r\n decrementSecond: 'Decrement Second',\r\n toggleMeridiem: 'Toggle Meridiem',\r\n selectTime: 'Select Time',\r\n selectDate: 'Select Date',\r\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\r\n locale: 'default',\r\n startOfTheWeek: 0,\r\n },\r\n keepInvalid: false,\r\n debug: false,\r\n allowInputToggle: false,\r\n viewDate: new DateTime(),\r\n multipleDates: false,\r\n multipleDatesSeparator: '; ',\r\n promptTimeOnDateChange: false,\r\n promptTimeOnDateChangeTransitionDelay: 200,\r\n hooks: {\r\n inputParse: undefined,\r\n inputFormat: undefined,\r\n },\r\n meta: {},\r\n container: undefined\r\n};\r\n\r\nconst DatePickerModes: {\r\n name: string;\r\n className: string;\r\n unit: Unit;\r\n step: number;\r\n}[] = [\r\n {\r\n name: 'calendar',\r\n className: Namespace.css.daysContainer,\r\n unit: Unit.month,\r\n step: 1,\r\n },\r\n {\r\n name: 'months',\r\n className: Namespace.css.monthsContainer,\r\n unit: Unit.year,\r\n step: 1,\r\n },\r\n {\r\n name: 'years',\r\n className: Namespace.css.yearsContainer,\r\n unit: Unit.year,\r\n step: 10,\r\n },\r\n {\r\n name: 'decades',\r\n className: Namespace.css.decadesContainer,\r\n unit: Unit.year,\r\n step: 100,\r\n },\r\n];\r\n\r\nexport { DefaultOptions, DatePickerModes, Namespace };\r\n","import Namespace from '../namespace';\n\n/**\n * Provides a collapse functionality to the view changes\n */\nexport default class Collapse {\n /**\n * Flips the show/hide state of `target`\n * @param target html element to affect.\n */\n static toggle(target: HTMLElement) {\n if (target.classList.contains(Namespace.css.show)) {\n this.hide(target);\n } else {\n this.show(target);\n }\n }\n\n /**\n * If `target` is not already showing, then show after the animation.\n * @param target\n */\n static show(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\n target.style.height = '';\n timeOut = null;\n };\n\n target.style.height = '0';\n target.classList.remove(Namespace.css.collapse);\n target.classList.add(Namespace.css.collapsing);\n\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n target.style.height = `${target.scrollHeight}px`;\n }\n\n /**\n * If `target` is not already hidden, then hide after the animation.\n * @param target HTML Element\n */\n static hide(target: HTMLElement) {\n if (\n target.classList.contains(Namespace.css.collapsing) ||\n !target.classList.contains(Namespace.css.show)\n )\n return;\n\n let timeOut = null;\n const complete = () => {\n target.classList.remove(Namespace.css.collapsing);\n target.classList.add(Namespace.css.collapse);\n timeOut = null;\n };\n\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\n\n const reflow = (element) => element.offsetHeight;\n\n reflow(target);\n\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\n target.classList.add(Namespace.css.collapsing);\n target.style.height = '';\n\n timeOut = setTimeout(\n complete,\n this.getTransitionDurationFromElement(target)\n );\n }\n\n /**\n * Gets the transition duration from the `element` by getting css properties\n * `transition-duration` and `transition-delay`\n * @param element HTML Element\n */\n private static getTransitionDurationFromElement = (element: HTMLElement) => {\n if (!element) {\n return 0;\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } =\n window.getComputedStyle(element);\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n\n return (\n (Number.parseFloat(transitionDuration) +\n Number.parseFloat(transitionDelay)) *\n 1000\n );\n };\n}\n","import { DatePickerModes } from './conts.js';\nimport { DateTime, Unit } from './datetime';\nimport { TempusDominus } from './tempus-dominus';\nimport Collapse from './display/collapse';\nimport Namespace from './namespace';\n\n/**\n *\n */\nexport default class Actions {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e?.currentTarget;\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\n return false;\n action = action || currentTarget?.dataset?.action;\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * @param unit\n * @param value Value to change by\n */\n const manipulateAndSet = (unit: Unit, value = 1) => {\n const newDate = lastPicked.manipulate(value, unit);\n if (this._context._validation.isValid(newDate, unit)) {\n this._context.dates._setValue(\n newDate,\n this._context.dates.lastPickedIndex\n );\n }\n };\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * After setting the value it will either show the clock or hide the widget.\n * @param unit\n * @param value Value to change by\n */\n const hideOrClock = () => {\n if (\n this._context._options.display.components.useTwentyfourHour &&\n !this._context._options.display.components.minutes &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline\n ) {\n this._context._display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n };\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n const { unit, step } = DatePickerModes[this._context._currentViewMode];\n if (action === ActionTypes.next)\n this._context._viewDate.manipulate(step, unit);\n else this._context._viewDate.manipulate(step * -1, unit);\n this._context._viewUpdate(unit);\n\n this._context._display._showMode();\n break;\n case ActionTypes.pickerSwitch:\n this._context._display._showMode(1);\n this._context._viewUpdate(\n DatePickerModes[this._context._currentViewMode].unit\n );\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.dataset.value;\n switch (action) {\n case ActionTypes.selectMonth:\n this._context._viewDate.month = value;\n this._context._viewUpdate(Unit.month);\n break;\n case ActionTypes.selectYear:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n case ActionTypes.selectDecade:\n this._context._viewDate.year = value;\n this._context._viewUpdate(Unit.year);\n break;\n }\n\n if (\n this._context._currentViewMode === this._context._minViewModeNumber\n ) {\n this._context.dates._setValue(\n this._context._viewDate,\n this._context.dates.lastPickedIndex\n );\n if (!this._context._options.display.inline) {\n this._context._display.hide();\n }\n } else {\n this._context._display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this._context._viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.dataset.day;\n let index = 0;\n if (this._context._options.multipleDates) {\n index = this._context.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this._context.dates._setValue(null, index); //deselect multi-date\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex + 1\n );\n }\n } else {\n this._context.dates._setValue(\n day,\n this._context.dates.lastPickedIndex\n );\n }\n\n if (\n !this._context._display._hasTime &&\n !this._context._options.display.keepOpen &&\n !this._context._options.display.inline &&\n !this._context._options.multipleDates\n ) {\n this._context._display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.dataset.value;\n if (\n lastPicked.hours >= 12 &&\n !this._context._options.display.components.useTwentyfourHour\n )\n hour += 12;\n lastPicked.hours = hour;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n hideOrClock();\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.dataset.value;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n hideOrClock();\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.dataset.value;\n this._context.dates._setValue(\n lastPicked,\n this._context.dates.lastPickedIndex\n );\n hideOrClock();\n break;\n case ActionTypes.incrementHours:\n manipulateAndSet(Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping);\n break;\n case ActionTypes.incrementSeconds:\n manipulateAndSet(Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n manipulateAndSet(Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n manipulateAndSet(Unit.minutes, this._context._options.stepping * -1);\n break;\n case ActionTypes.decrementSeconds:\n manipulateAndSet(Unit.seconds, -1);\n break;\n case ActionTypes.toggleMeridiem:\n manipulateAndSet(\n Unit.hours,\n this._context.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n if (\n currentTarget.getAttribute('title') ===\n this._context._options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectTime\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.time\n ).outerHTML;\n\n this._context._display._updateCalendarHeader();\n } else {\n currentTarget.setAttribute(\n 'title',\n this._context._options.localization.selectDate\n );\n currentTarget.innerHTML = this._context._display._iconTag(\n this._context._options.display.icons.date\n ).outerHTML;\n if (this._context._display._hasTime) {\n this.do(e, ActionTypes.showClock);\n this._context._display._update('clock');\n }\n }\n this._context._display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this._context._display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this._context._display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this._context._display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this._context._display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this._context._display._update(Unit.seconds);\n break;\n }\n\n ((\n this._context._display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this._context.dates._setValue(null);\n this._context._display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this._context._display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this._context._options.localization.locale\n );\n this._context._viewDate = today;\n if (this._context._validation.isValid(today, Unit.date))\n this._context.dates._setValue(\n today,\n this._context.dates.lastPickedIndex\n );\n break;\n }\n }\n}\n\nexport enum ActionTypes {\n next = 'next',\n previous = 'previous',\n pickerSwitch = 'pickerSwitch',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n toggleMeridiem = 'toggleMeridiem',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { DateTime, Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this._context._options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this._context._viewDate.format(\n this._context._options.localization.dayViewHeaderFormat\n )\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay', this._context._options.localization.startOfTheWeek)\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement, index) => {\n if (\n this._context._options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this._context._viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.setAttribute('data-day', `${innerDate.date}`);\n containerClone.innerText = innerDate.format({ day: 'numeric' });\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this._context._viewDate.clone\n .startOf('weekDay', this._context._options.localization.startOfTheWeek)\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this._context._options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this._context._viewDate.format({ year: 'numeric' })\n );\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this._context._viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this._context._unset &&\n this._context.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this._context._validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { DateTime, DateTimeFormatOptions } from './datetime';\r\nimport Namespace from './namespace';\r\nimport { DefaultOptions } from './conts';\r\nimport { TempusDominus } from './tempus-dominus';\r\n\r\nexport default interface Options {\r\n restrictions?: {\r\n minDate?: DateTime;\r\n maxDate?: DateTime;\r\n enabledDates?: DateTime[];\r\n disabledDates?: DateTime[];\r\n enabledHours?: number[];\r\n disabledHours?: number[];\r\n disabledTimeIntervals?: { from: DateTime; to: DateTime }[];\r\n daysOfWeekDisabled?: number[];\r\n };\r\n display?: {\r\n toolbarPlacement?: 'top' | 'bottom';\r\n components?: {\r\n calendar?: boolean;\r\n date?: boolean;\r\n month?: boolean;\r\n year?: boolean;\r\n decades?: boolean;\r\n clock?: boolean;\r\n hours?: boolean;\r\n minutes?: boolean;\r\n seconds?: boolean;\r\n useTwentyfourHour?: boolean;\r\n };\r\n buttons?: { today?: boolean; close?: boolean; clear?: boolean };\r\n calendarWeeks?: boolean;\r\n icons?: {\r\n date?: string;\r\n next?: string;\r\n previous?: string;\r\n today?: string;\r\n clear?: string;\r\n time?: string;\r\n up?: string;\r\n type?: 'icons' | 'sprites';\r\n down?: string;\r\n close?: string;\r\n };\r\n viewMode?: 'clock' | 'calendar' | 'months' | 'years' | 'decades';\r\n sideBySide?: boolean;\r\n inline?: boolean;\r\n keepOpen?: boolean;\r\n };\r\n stepping?: number;\r\n useCurrent?: boolean;\r\n defaultDate?: DateTime;\r\n localization?: {\r\n nextMonth?: string;\r\n pickHour?: string;\r\n incrementSecond?: string;\r\n nextDecade?: string;\r\n selectDecade?: string;\r\n dayViewHeaderFormat?: DateTimeFormatOptions;\r\n decrementHour?: string;\r\n selectDate?: string;\r\n incrementHour?: string;\r\n previousCentury?: string;\r\n decrementSecond?: string;\r\n today?: string;\r\n previousMonth?: string;\r\n selectYear?: string;\r\n pickSecond?: string;\r\n nextCentury?: string;\r\n close?: string;\r\n incrementMinute?: string;\r\n selectTime?: string;\r\n clear?: string;\r\n toggleMeridiem?: string;\r\n selectMonth?: string;\r\n decrementMinute?: string;\r\n pickMinute?: string;\r\n nextYear?: string;\r\n previousYear?: string;\r\n previousDecade?: string;\r\n locale?: string;\r\n startOfTheWeek?: number;\r\n };\r\n keepInvalid?: boolean;\r\n debug?: boolean;\r\n allowInputToggle?: boolean;\r\n viewDate?: DateTime;\r\n multipleDates?: boolean;\r\n multipleDatesSeparator?: string;\r\n promptTimeOnDateChange?: boolean;\r\n promptTimeOnDateChangeTransitionDelay?: number;\r\n hooks?: {\r\n inputParse?: (context: TempusDominus, value: any) => DateTime;\r\n inputFormat?: (context: TempusDominus, date: DateTime) => string;\r\n };\r\n meta?: {};\r\n container?: HTMLElement;\r\n}\r\n\r\nexport class OptionConverter {\r\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\r\n const newOptions = {} as Options;\r\n let path = '';\r\n const ignoreProperties = [\r\n 'inputParse',\r\n 'inputFormat',\r\n 'meta',\r\n 'dayViewHeaderFormat',\r\n 'container'\r\n ];\r\n\r\n //see if the options specify a locale\r\n const locale =\r\n mergeTo.localization.locale !== 'default' ? mergeTo.localization.locale :\r\n providedOptions?.localization?.locale || 'default';\r\n\r\n const processKey = (key, value, providedType, defaultType) => {\r\n switch (key) {\r\n case 'defaultDate': {\r\n const dateTime = this._dateConversion(value, 'defaultDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'defaultDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'viewDate': {\r\n const dateTime = this._dateConversion(value, 'viewDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'viewDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'minDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this._dateConversion(value, 'restrictions.minDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.minDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'maxDate': {\r\n if (value === undefined) {\r\n return value;\r\n }\r\n const dateTime = this._dateConversion(value, 'restrictions.maxDate');\r\n if (dateTime !== undefined) {\r\n dateTime.setLocale(locale);\r\n return dateTime;\r\n }\r\n Namespace.errorMessages.typeMismatch(\r\n 'restrictions.maxDate',\r\n providedType,\r\n 'DateTime or Date'\r\n );\r\n }\r\n case 'disabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.disabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.disabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'enabledHours':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.enabledHours',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 24).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.enabledHours',\r\n 0,\r\n 23\r\n );\r\n return value;\r\n case 'daysOfWeekDisabled':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckNumberArray(\r\n 'restrictions.daysOfWeekDisabled',\r\n value,\r\n providedType\r\n );\r\n if (value.filter((x) => x < 0 || x > 6).length > 0)\r\n Namespace.errorMessages.numbersOutOfRage(\r\n 'restrictions.daysOfWeekDisabled',\r\n 0,\r\n 6\r\n );\r\n return value;\r\n case 'enabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.enabledDates',\r\n value,\r\n providedType,\r\n locale\r\n );\r\n return value;\r\n case 'disabledDates':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n this._typeCheckDateArray(\r\n 'restrictions.disabledDates',\r\n value,\r\n providedType,\r\n locale\r\n );\r\n return value;\r\n case 'disabledTimeIntervals':\r\n if (value === undefined) {\r\n return [];\r\n }\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n key,\r\n providedType,\r\n 'array of { from: DateTime|Date, to: DateTime|Date }'\r\n );\r\n }\r\n const valueObject = value as { from: any; to: any }[];\r\n for (let i = 0; i < valueObject.length; i++) {\r\n Object.keys(valueObject[i]).forEach((vk) => {\r\n const subOptionName = `${key}[${i}].${vk}`;\r\n let d = valueObject[i][vk];\r\n const dateTime = this._dateConversion(d, subOptionName);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n subOptionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(locale);\r\n valueObject[i][vk] = dateTime;\r\n });\r\n }\r\n return valueObject;\r\n case 'toolbarPlacement':\r\n case 'type':\r\n case 'viewMode':\r\n const optionValues = {\r\n toolbarPlacement: ['top', 'bottom', 'default'],\r\n type: ['icons', 'sprites'],\r\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\r\n };\r\n const keyOptions = optionValues[key];\r\n if (!keyOptions.includes(value))\r\n Namespace.errorMessages.unexpectedOptionValue(\r\n path.substring(1),\r\n value,\r\n keyOptions\r\n );\r\n\r\n return value;\r\n case 'inputParse':\r\n case 'inputFormat':\r\n case 'meta':\r\n case 'dayViewHeaderFormat':\r\n return value;\r\n case 'container':\r\n if (value && !(value instanceof HTMLElement || value instanceof Element || value?.appendChild)) {\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n typeof value,\r\n 'HTMLElement'\r\n );\r\n }\r\n return value;\r\n default:\r\n switch (defaultType) {\r\n case 'boolean':\r\n return value === 'true' || value === true;\r\n case 'number':\r\n return +value;\r\n case 'string':\r\n return value.toString();\r\n case 'object':\r\n return {};\r\n case 'function':\r\n return value;\r\n default:\r\n Namespace.errorMessages.typeMismatch(\r\n path.substring(1),\r\n providedType,\r\n defaultType\r\n );\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * The spread operator caused sub keys to be missing after merging.\r\n * This is to fix that issue by using spread on the child objects first.\r\n * Also handles complex options like disabledDates\r\n * @param provided An option from new providedOptions\r\n * @param mergeOption Default option to compare types against\r\n * @param copyTo Destination object. This was add to prevent reference copies\r\n */\r\n const spread = (provided, mergeOption, copyTo) => {\r\n const unsupportedOptions = Object.keys(provided).filter(\r\n (x) => !Object.keys(mergeOption).includes(x)\r\n );\r\n if (unsupportedOptions.length > 0) {\r\n const flattenedOptions = OptionConverter._flattenDefaultOptions;\r\n\r\n const errors = unsupportedOptions.map((x) => {\r\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\r\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\r\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\r\n return error;\r\n });\r\n Namespace.errorMessages.unexpectedOptions(errors);\r\n }\r\n Object.keys(mergeOption).forEach((key) => {\r\n const defaultOptionValue = mergeOption[key];\r\n let providedType = typeof provided[key];\r\n let defaultType = typeof defaultOptionValue;\r\n let value = provided[key];\r\n if (!provided.hasOwnProperty(key)) {\r\n if (\r\n defaultType === 'undefined' ||\r\n (value?.length === 0 && Array.isArray(defaultOptionValue))\r\n ) {\r\n copyTo[key] = defaultOptionValue;\r\n return;\r\n }\r\n provided[key] = defaultOptionValue;\r\n value = provided[key];\r\n }\r\n path += `.${key}`;\r\n copyTo[key] = processKey(key, value, providedType, defaultType);\r\n\r\n if (\r\n typeof defaultOptionValue !== 'object' ||\r\n ignoreProperties.includes(key)\r\n ) {\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n return;\r\n }\r\n if (!Array.isArray(provided[key])) {\r\n spread(provided[key], defaultOptionValue, copyTo[key]);\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n }\r\n path = path.substring(0, path.lastIndexOf(`.${key}`));\r\n });\r\n };\r\n spread(providedOptions, mergeTo, newOptions);\r\n\r\n return newOptions;\r\n }\r\n\r\n static _dataToOptions(element, options: Options): Options {\r\n const eData = element.dataset;\r\n\r\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\r\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\r\n\r\n if (\r\n !eData ||\r\n Object.keys(eData).length === 0 ||\r\n eData.constructor !== DOMStringMap\r\n )\r\n return options;\r\n let dataOptions = {} as Options;\r\n\r\n // because dataset returns camelCase including the 'td' key the option\r\n // key won't align\r\n const objectToNormalized = (object) => {\r\n const lowered = {};\r\n Object.keys(object).forEach((x) => {\r\n lowered[x.toLowerCase()] = x;\r\n });\r\n\r\n return lowered;\r\n };\r\n\r\n const rabbitHole = (\r\n split: string[],\r\n index: number,\r\n optionSubgroup: {},\r\n value: any\r\n ) => {\r\n // first round = display { ... }\r\n const normalizedOptions = objectToNormalized(optionSubgroup);\r\n\r\n const keyOption = normalizedOptions[split[index].toLowerCase()];\r\n const internalObject = {};\r\n\r\n if (keyOption === undefined) return internalObject;\r\n\r\n // if this is another object, continue down the rabbit hole\r\n if (optionSubgroup[keyOption].constructor === Object) {\r\n index++;\r\n internalObject[keyOption] = rabbitHole(\r\n split,\r\n index,\r\n optionSubgroup[keyOption],\r\n value\r\n );\r\n } else {\r\n internalObject[keyOption] = value;\r\n }\r\n return internalObject;\r\n };\r\n const optionsLower = objectToNormalized(options);\r\n\r\n Object.keys(eData)\r\n .filter((x) => x.startsWith(Namespace.dataKey))\r\n .map((x) => x.substring(2))\r\n .forEach((key) => {\r\n let keyOption = optionsLower[key.toLowerCase()];\r\n\r\n // dataset merges dashes to camelCase... yay\r\n // i.e. key = display_components_seconds\r\n if (key.includes('_')) {\r\n // [display, components, seconds]\r\n const split = key.split('_');\r\n // display\r\n keyOption = optionsLower[split[0].toLowerCase()];\r\n if (\r\n keyOption !== undefined &&\r\n options[keyOption].constructor === Object\r\n ) {\r\n dataOptions[keyOption] = rabbitHole(\r\n split,\r\n 1,\r\n options[keyOption],\r\n eData[`td${key}`]\r\n );\r\n }\r\n }\r\n // or key = multipleDate\r\n else if (keyOption !== undefined) {\r\n dataOptions[keyOption] = eData[`td${key}`];\r\n }\r\n });\r\n\r\n return this._mergeOptions(dataOptions, options);\r\n }\r\n\r\n /**\r\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\r\n * @param d If a string will attempt creating a date from it.\r\n * @private\r\n */\r\n static _dateTypeCheck(d: any): DateTime | null {\r\n if (d.constructor.name === DateTime.name) return d;\r\n if (d.constructor.name === Date.name) {\r\n return DateTime.convert(d);\r\n }\r\n if (typeof d === typeof '') {\r\n const dateTime = new DateTime(d);\r\n if (JSON.stringify(dateTime) === 'null') {\r\n return null;\r\n }\r\n return dateTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of Date or DateTime\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckDateArray(\r\n optionName: string,\r\n value,\r\n providedType: string,\r\n locale: string = 'default'\r\n ) {\r\n if (!Array.isArray(value)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of DateTime or Date'\r\n );\r\n }\r\n for (let i = 0; i < value.length; i++) {\r\n let d = value[i];\r\n const dateTime = this._dateConversion(d, optionName);\r\n if (!dateTime) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n typeof d,\r\n 'DateTime or Date'\r\n );\r\n }\r\n dateTime.setLocale(locale);\r\n value[i] = dateTime;\r\n }\r\n }\r\n\r\n /**\r\n * Type checks that `value` is an array of numbers\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n * @param value Option value\r\n * @param providedType Used to provide text to error messages\r\n */\r\n static _typeCheckNumberArray(\r\n optionName: string,\r\n value,\r\n providedType: string\r\n ) {\r\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\r\n Namespace.errorMessages.typeMismatch(\r\n optionName,\r\n providedType,\r\n 'array of numbers'\r\n );\r\n }\r\n return;\r\n }\r\n\r\n /**\r\n * Attempts to convert `d` to a DateTime object\r\n * @param d value to convert\r\n * @param optionName Provides text to error messages e.g. disabledDates\r\n */\r\n static _dateConversion(d: any, optionName: string) {\r\n if (typeof d === typeof '' && optionName !== 'input') {\r\n Namespace.errorMessages.dateString();\r\n }\r\n\r\n const converted = this._dateTypeCheck(d);\r\n\r\n if (!converted) {\r\n Namespace.errorMessages.failedToParseDate(\r\n optionName,\r\n d,\r\n optionName === 'input'\r\n );\r\n }\r\n return converted;\r\n }\r\n\r\n private static _flatback: string[];\r\n\r\n private static get _flattenDefaultOptions(): string[] {\r\n if (this._flatback) return this._flatback;\r\n const deepKeys = (t, pre = []) =>\r\n Array.isArray(t)\r\n ? []\r\n : Object(t) === t\r\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\r\n : pre.join('.');\r\n\r\n this._flatback = deepKeys(DefaultOptions);\r\n\r\n return this._flatback;\r\n }\r\n\r\n /**\r\n * Some options conflict like min/max date. Verify that these kinds of options\r\n * are set correctly.\r\n * @param config\r\n */\r\n static _validateConflcits(config: Options) {\r\n if (config.display.sideBySide && (!config.display.components.clock ||\r\n !(config.display.components.hours ||\r\n config.display.components.minutes ||\r\n config.display.components.seconds)\r\n )) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'Cannot use side by side mode without the clock components'\r\n );\r\n }\r\n\r\n\r\n if (config.restrictions.minDate && config.restrictions.maxDate) {\r\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'minDate is after maxDate'\r\n );\r\n }\r\n\r\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\r\n Namespace.errorMessages.conflictingConfiguration(\r\n 'maxDate is before minDate'\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { TempusDominus } from './tempus-dominus';\r\nimport { DateTime, Unit } from './datetime';\r\nimport Namespace from './namespace';\r\nimport { ChangeEvent, FailEvent } from './event-types';\r\nimport { OptionConverter } from './options';\r\n\r\nexport default class Dates {\r\n private _dates: DateTime[] = [];\r\n private _context: TempusDominus;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n }\r\n\r\n /**\r\n * Returns the array of selected dates\r\n */\r\n get picked(): DateTime[] {\r\n return this._dates;\r\n }\r\n\r\n /**\r\n * Returns the last picked value.\r\n */\r\n get lastPicked(): DateTime {\r\n return this._dates[this.lastPickedIndex];\r\n }\r\n\r\n /**\r\n * Returns the length of picked dates -1 or 0 if none are selected.\r\n */\r\n get lastPickedIndex(): number {\r\n if (this._dates.length === 0) return 0;\r\n return this._dates.length - 1;\r\n }\r\n\r\n /**\r\n * Adds a new DateTime to selected dates array\r\n * @param date\r\n */\r\n add(date: DateTime): void {\r\n this._dates.push(date);\r\n }\r\n\r\n /**\r\n * Tries to convert the provided value to a DateTime object.\r\n * If value is null|undefined then clear the value of the provided index (or 0).\r\n * @param value Value to convert or null|undefined\r\n * @param index When using multidates this is the index in the array\r\n * @param from Used in the warning message, useful for debugging.\r\n */\r\n set(value: any, index?: number, from: string = 'date.set') {\r\n if (!value) this._setValue(value, index);\r\n const converted = OptionConverter._dateConversion(value, from);\r\n if (converted) {\r\n converted.setLocale(this._context._options.localization.locale);\r\n this._setValue(converted, index);\r\n }\r\n }\r\n\r\n /**\r\n * Returns true if the `targetDate` is part of the selected dates array.\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\r\n\r\n const format = Dates.getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return (\r\n this._dates\r\n .map((x) => x.format(format))\r\n .find((x) => x === innerDateFormatted) !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Returns the index at which `targetDate` is in the array.\r\n * This is used for updating or removing a date when multi-date is used\r\n * If `unit` is provided then a granularity to that unit will be used.\r\n * @param targetDate\r\n * @param unit\r\n */\r\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\r\n if (!unit) return this._dates.indexOf(targetDate);\r\n\r\n const format = Dates.getFormatByUnit(unit);\r\n\r\n let innerDateFormatted = targetDate.format(format);\r\n\r\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\r\n }\r\n\r\n /**\r\n * Clears all selected dates.\r\n */\r\n clear() {\r\n this._context._unset = true;\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate: this.lastPicked,\r\n isClear: true,\r\n isValid: true,\r\n } as ChangeEvent);\r\n this._dates = [];\r\n }\r\n\r\n /**\r\n * Find the \"book end\" years given a `year` and a `factor`\r\n * @param factor e.g. 100 for decades\r\n * @param year e.g. 2021\r\n */\r\n static getStartEndYear(\r\n factor: number,\r\n year: number\r\n ): [number, number, number] {\r\n const step = factor / 10,\r\n startYear = Math.floor(year / factor) * factor,\r\n endYear = startYear + step * 9,\r\n focusValue = Math.floor(year / step) * step;\r\n return [startYear, endYear, focusValue];\r\n }\r\n\r\n /**\r\n * Do not use direectly. Attempts to either clear or set the `target` date at `index`.\r\n * If the `target` is null then the date will be cleared.\r\n * If multi-date is being used then it will be removed from the array.\r\n * If `target` is valid and multi-date is used then if `index` is\r\n * provided the date at that index will be replaced, otherwise it is appended.\r\n * @param target\r\n * @param index\r\n */\r\n _setValue(target?: DateTime, index?: number): void {\r\n const noIndex = typeof index === 'undefined',\r\n isClear = !target && noIndex;\r\n let oldDate = this._context._unset ? null : this._dates[index];\r\n if (!oldDate && !this._context._unset && noIndex && isClear) {\r\n oldDate = this.lastPicked;\r\n }\r\n\r\n const updateInput = () => {\r\n if (!this._context._input) return;\r\n\r\n let newValue = this._context._options.hooks.inputFormat(\r\n this._context,\r\n target\r\n );\r\n if (this._context._options.multipleDates) {\r\n newValue = this._dates\r\n .map((d) =>\r\n this._context._options.hooks.inputFormat(this._context, d)\r\n )\r\n .join(this._context._options.multipleDatesSeparator);\r\n }\r\n if (this._context._input.value != newValue)\r\n this._context._input.value = newValue;\r\n };\r\n\r\n if (target && oldDate?.isSame(target)) {\r\n updateInput();\r\n return;\r\n }\r\n\r\n // case of calling setValue(null)\r\n if (!target) {\r\n if (\r\n !this._context._options.multipleDates ||\r\n this._dates.length === 1 ||\r\n isClear\r\n ) {\r\n this._context._unset = true;\r\n this._dates = [];\r\n } else {\r\n this._dates.splice(index, 1);\r\n }\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: undefined,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n\r\n updateInput();\r\n this._context._display._update('all');\r\n return;\r\n }\r\n\r\n index = index || 0;\r\n target = target.clone;\r\n\r\n // minute stepping is being used, force the minute to the closest value\r\n if (this._context._options.stepping !== 1) {\r\n target.minutes =\r\n Math.round(target.minutes / this._context._options.stepping) *\r\n this._context._options.stepping;\r\n target.seconds = 0;\r\n }\r\n\r\n if (this._context._validation.isValid(target)) {\r\n this._dates[index] = target;\r\n this._context._viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._context._unset = false;\r\n this._context._display._update('all');\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: true,\r\n } as ChangeEvent);\r\n return;\r\n }\r\n\r\n if (this._context._options.keepInvalid) {\r\n this._dates[index] = target;\r\n this._context._viewDate = target.clone;\r\n\r\n updateInput();\r\n\r\n this._context._triggerEvent({\r\n type: Namespace.events.change,\r\n date: target,\r\n oldDate,\r\n isClear,\r\n isValid: false,\r\n } as ChangeEvent);\r\n }\r\n this._context._triggerEvent({\r\n type: Namespace.events.error,\r\n reason: Namespace.errorMessages.failedToSetInvalidDate,\r\n date: target,\r\n oldDate,\r\n } as FailEvent);\r\n }\r\n\r\n /**\r\n * Returns a format object based on the granularity of `unit`\r\n * @param unit\r\n */\r\n static getFormatByUnit(unit: Unit): object {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric',\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n }\r\n}\r\n","import { TempusDominus } from '../../tempus-dominus';\r\nimport { DateTime, Unit } from '../../datetime';\r\nimport { ActionTypes } from '../../actions';\r\nimport Namespace from '../../namespace';\r\nimport Dates from '../../dates';\r\n\r\n/**\r\n * Creates and updates the grid for `year`\r\n */\r\nexport default class YearDisplay {\r\n private _context: TempusDominus;\r\n private _startYear: DateTime;\r\n private _endYear: DateTime;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n get _picker(): HTMLElement {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.yearsContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectYear);\r\n container.appendChild(div);\r\n }\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update() {\r\n const [start, end] = Dates.getStartEndYear(\r\n 10,\r\n this._context._viewDate.year\r\n );\r\n this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year);\r\n this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year);\r\n\r\n const container = this._context._display.widget.getElementsByClassName(\r\n Namespace.css.yearsContainer\r\n )[0];\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.yearsContainer,\r\n `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({ year: 'numeric' })}`\r\n );\r\n\r\n this._context._validation.isValid(this._startYear, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this._context._validation.isValid(this._endYear, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n let innerDate = this._context._viewDate.clone\r\n .startOf(Unit.year)\r\n .manipulate(-1, Unit.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n let classes = [];\r\n classes.push(Namespace.css.year);\r\n\r\n if (\r\n !this._context._unset &&\r\n this._context.dates.isPicked(innerDate, Unit.year)\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n if (!this._context._validation.isValid(innerDate, Unit.year)) {\r\n classes.push(Namespace.css.disabled);\r\n }\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute('data-value', `${innerDate.year}`);\r\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\r\n\r\n innerDate.manipulate(1, Unit.year);\r\n });\r\n }\r\n}\r\n","import { TempusDominus } from '../../tempus-dominus';\r\nimport Dates from '../../dates';\r\nimport { DateTime, Unit } from '../../datetime';\r\nimport { ActionTypes } from '../../actions';\r\nimport Namespace from '../../namespace';\r\n\r\n/**\r\n * Creates and updates the grid for `seconds`\r\n */\r\nexport default class DecadeDisplay {\r\n private _context: TempusDominus;\r\n private _startDecade: DateTime;\r\n private _endDecade: DateTime;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n }\r\n\r\n /**\r\n * Build the container html for the display\r\n * @private\r\n */\r\n get _picker() {\r\n const container = document.createElement('div');\r\n container.classList.add(Namespace.css.decadesContainer);\r\n\r\n for (let i = 0; i < 12; i++) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.selectDecade);\r\n container.appendChild(div);\r\n }\r\n return container;\r\n }\r\n\r\n /**\r\n * Populates the grid and updates enabled states\r\n * @private\r\n */\r\n _update() {\r\n const [start, end] = Dates.getStartEndYear(\r\n 100,\r\n this._context._viewDate.year\r\n );\r\n this._startDecade = this._context._viewDate.clone.startOf(Unit.year);\r\n this._startDecade.year = start;\r\n this._endDecade = this._context._viewDate.clone.startOf(Unit.year);\r\n this._endDecade.year = end;\r\n\r\n const container = this._context._display.widget.getElementsByClassName(\r\n Namespace.css.decadesContainer\r\n )[0];\r\n const [previous, switcher, next] = container.parentElement\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switcher.setAttribute(\r\n Namespace.css.decadesContainer,\r\n `${this._startDecade.format({ year: 'numeric' })}-${this._endDecade.format({ year: 'numeric' })}`\r\n );\r\n\r\n this._context._validation.isValid(this._startDecade, Unit.year)\r\n ? previous.classList.remove(Namespace.css.disabled)\r\n : previous.classList.add(Namespace.css.disabled);\r\n this._context._validation.isValid(this._endDecade, Unit.year)\r\n ? next.classList.remove(Namespace.css.disabled)\r\n : next.classList.add(Namespace.css.disabled);\r\n\r\n const pickedYears = this._context.dates.picked.map((x) => x.year);\r\n\r\n container\r\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\r\n .forEach((containerClone: HTMLElement, index) => {\r\n if (index === 0) {\r\n containerClone.classList.add(Namespace.css.old);\r\n if (this._startDecade.year - 10 < 0) {\r\n containerClone.textContent = ' ';\r\n previous.classList.add(Namespace.css.disabled);\r\n containerClone.classList.add(Namespace.css.disabled);\r\n containerClone.setAttribute('data-value', ``);\r\n return;\r\n } else {\r\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: 'numeric' });\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${this._startDecade.year}`\r\n );\r\n return;\r\n }\r\n }\r\n\r\n let classes = [];\r\n classes.push(Namespace.css.decade);\r\n const startDecadeYear = this._startDecade.year;\r\n const endDecadeYear = this._startDecade.year + 9;\r\n\r\n if (\r\n !this._context._unset &&\r\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\r\n .length > 0\r\n ) {\r\n classes.push(Namespace.css.active);\r\n }\r\n\r\n containerClone.classList.remove(...containerClone.classList);\r\n containerClone.classList.add(...classes);\r\n containerClone.setAttribute(\r\n 'data-value',\r\n `${this._startDecade.year}`\r\n );\r\n containerClone.innerText = `${this._startDecade.format({ year: 'numeric' })}`;\r\n\r\n this._startDecade.manipulate(10, Unit.year);\r\n });\r\n }\r\n}\r\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _context: TempusDominus;\n private _gridColumns = '';\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid());\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(): void {\n if (!this._context._display._hasTime) return;\n const timesDiv = (\n this._context._display.widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0]\n );\n const lastPicked = (\n this._context.dates.lastPicked || this._context._viewDate\n ).clone;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this._context._options.display.components.hours) {\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this._context._options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this._context._options.display.components.minutes) {\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this._context._options.display.components.seconds) {\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this._context._validation.isValid(\n this._context._viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.toggleMeridiem}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this._context._validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(): HTMLElement[] {\n this._gridColumns = '';\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = this._context._display._iconTag(\n this._context._options.display.icons.up\n ),\n downIcon = this._context._display._iconTag(\n this._context._options.display.icons.down\n );\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this._context._options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n this._gridColumns += 'a';\n }\n\n if (this._context._options.display.components.minutes) {\n this._gridColumns += ' a';\n if (this._context._options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this._context._options.display.components.seconds) {\n this._gridColumns += ' a';\n if (this._context._options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this._context._options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this._context._options.display.components.useTwentyfourHour) {\n this._gridColumns += ' a';\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this._context._options.localization.toggleMeridiem\n );\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\n button.setAttribute('tabindex', '-1');\n button.classList.add(Namespace.css.toggleMeridiem);\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n this._gridColumns = this._gridColumns.trim();\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this._context._options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this._context._validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this._context._options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.hours);\n let step =\n this._context._options.stepping === 1\n ? 5\n : this._context._options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this._context._validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.minutesFormatted}`\n );\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { TempusDominus } from '../../tempus-dominus';\nimport { Unit } from '../../datetime';\nimport { ActionTypes } from '../../actions';\nimport Namespace from '../../namespace';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n get _picker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(): void {\n const container = this._context._display.widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n let innerDate = this._context._viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.second);\n\n if (!this._context._validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport { DatePickerModes } from '../conts';\r\nimport { TempusDominus } from '../tempus-dominus';\r\nimport { ActionTypes } from '../actions';\r\nimport { createPopper } from '@popperjs/core';\r\nimport Namespace from '../namespace';\r\nimport { HideEvent } from '../event-types';\r\nimport Collapse from './collapse';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _context: TempusDominus;\r\n private _dateDisplay: DateDisplay;\r\n private _monthDisplay: MonthDisplay;\r\n private _yearDisplay: YearDisplay;\r\n private _decadeDisplay: DecadeDisplay;\r\n private _timeDisplay: TimeDisplay;\r\n private _widget: HTMLElement;\r\n private _hourDisplay: HourDisplay;\r\n private _minuteDisplay: MinuteDisplay;\r\n private _secondDisplay: SecondDisplay;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n\r\n constructor(context: TempusDominus) {\r\n this._context = context;\r\n this._dateDisplay = new DateDisplay(context);\r\n this._monthDisplay = new MonthDisplay(context);\r\n this._yearDisplay = new YearDisplay(context);\r\n this._decadeDisplay = new DecadeDisplay(context);\r\n this._timeDisplay = new TimeDisplay(context);\r\n this._hourDisplay = new HourDisplay(context);\r\n this._minuteDisplay = new MinuteDisplay(context);\r\n this._secondDisplay = new SecondDisplay(context);\r\n\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: Unit | 'clock' | 'calendar' | 'all'): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this._secondDisplay._update();\r\n break;\r\n case Unit.minutes:\r\n this._minuteDisplay._update();\r\n break;\r\n case Unit.hours:\r\n this._hourDisplay._update();\r\n break;\r\n case Unit.date:\r\n this._dateDisplay._update();\r\n break;\r\n case Unit.month:\r\n this._monthDisplay._update();\r\n break;\r\n case Unit.year:\r\n this._yearDisplay._update();\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this._timeDisplay._update();\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this._decadeDisplay._update();\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * @fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (\r\n this._context._options.useCurrent &&\r\n !this._context._options.defaultDate &&\r\n !this._context._input?.value\r\n ) {\r\n //todo in the td4 branch a pr changed this to allow granularity\r\n const date = new DateTime().setLocale(\r\n this._context._options.localization.locale\r\n );\r\n if (!this._context._options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (this._context._options.restrictions.maxDate?.isBefore(date)) {\r\n direction = -1;\r\n }\r\n while (!this._context._validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this._context.dates._setValue(date);\r\n }\r\n\r\n if (this._context._options.defaultDate) {\r\n this._context.dates._setValue(this._context._options.defaultDate);\r\n }\r\n\r\n this._buildWidget();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this._context._action.do(null, ActionTypes.showClock);\r\n }\r\n\r\n // otherwise return to the calendar view\r\n this._context._currentViewMode = this._context._minViewModeNumber;\r\n\r\n if (!onlyClock) {\r\n if (this._hasTime) {\r\n Collapse.hide(this._context._display.widget.querySelector(`div.${Namespace.css.timeContainer}`));\r\n }\r\n Collapse.show(this._context._display.widget.querySelector(`div.${Namespace.css.dateContainer}`));\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this._context._options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this._context._options?.container || document.body;\r\n container.appendChild(this.widget);\r\n\r\n this._popperInstance = createPopper(\r\n this._context._element,\r\n this.widget,\r\n {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start'\r\n }\r\n );\r\n } else {\r\n this._context._element.appendChild(this.widget);\r\n }\r\n\r\n if (this._context._options.display.viewMode == 'clock') {\r\n this._context._action.do(null, ActionTypes.showClock);\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._context._options.display.sideBySide) {\r\n this._timeDisplay._update();\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this._context._options.display.inline) {\r\n this._popperInstance.update();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._context._triggerEvent({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this._context._minViewModeNumber,\r\n Math.min(3, this._context._currentViewMode + direction)\r\n );\r\n if (this._context._currentViewMode == max) return;\r\n this._context._currentViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode = DatePickerModes[this._context._currentViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this._decadeDisplay._update();\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this._yearDisplay._update();\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this._monthDisplay._update();\r\n break;\r\n case Namespace.css.daysContainer:\r\n this._dateDisplay._update();\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this._context._display.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this._context._options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this._context._options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this._context._options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this._context._options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this._context._options.localization.nextMonth\r\n );\r\n switcher.innerText = this._context._viewDate.format(this._context._options.localization.dayViewHeaderFormat);\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * @fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._context._triggerEvent({\r\n type: Namespace.events.hide,\r\n date: this._context._unset\r\n ? null\r\n : this._context.dates.lastPicked\r\n ? this._context.dates.lastPicked.clone\r\n : void 0\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this._headTemplate,\r\n this._decadeDisplay._picker,\r\n this._yearDisplay._picker,\r\n this._monthDisplay._picker,\r\n this._dateDisplay._picker\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this._timeDisplay._picker);\r\n timeView.appendChild(this._hourDisplay._picker);\r\n timeView.appendChild(this._minuteDisplay._picker);\r\n timeView.appendChild(this._secondDisplay._picker);\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this._toolbar);\r\n\r\n if (this._context._options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this._context._options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this._context._options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this._context._options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this._context._options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this._context._options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this._context._options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this._context._options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this._context._options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this._context._options.display.components.clock &&\r\n (this._context._options.display.components.hours ||\r\n this._context._options.display.components.minutes ||\r\n this._context._options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this._context._options.display.components.calendar &&\r\n (this._context._options.display.components.year ||\r\n this._context._options.display.components.month ||\r\n this._context._options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n get _toolbar(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this._context._options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this._context._options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this._context._options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this._context._options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this._context._options.display.viewMode === 'clock') {\r\n title = this._context._options.localization.selectDate;\r\n icon = this._context._options.display.icons.date;\r\n } else {\r\n title = this._context._options.localization.selectTime;\r\n icon = this._context._options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this._context._options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this._context._options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this._context._options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this._context._options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this._context._options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this._context._options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n get _headTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this._context._options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.pickerSwitch);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(this._iconTag(this._context._options.display.icons.next));\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then an svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement {\r\n if (this._context._options.display.icons.type === 'sprites') {\r\n const svg = document.createElement('svg');\r\n svg.innerHTML = ``;\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this._context._options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this._context._element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._context._action.do(e);\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n","import { TempusDominus } from './tempus-dominus';\nimport { DateTime, Unit } from './datetime';\nimport Dates from './dates';\n\n/**\n * Main class for date validation rules based on the options provided.\n */\nexport default class Validation {\n private _context: TempusDominus;\n\n constructor(context: TempusDominus) {\n this._context = context;\n }\n\n /**\n * Checks to see if the target date is valid based on the rules provided in the options.\n * Granularity can be provide to chek portions of the date instead of the whole.\n * @param targetDate\n * @param granularity\n */\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\n if (\n this._context._options.restrictions.disabledDates.length > 0 &&\n this._isInDisabledDates(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledDates.length > 0 &&\n !this._isInEnabledDates(targetDate)\n ) {\n return false;\n }\n if (\n granularity !== Unit.month &&\n granularity !== Unit.year &&\n this._context._options.restrictions.daysOfWeekDisabled?.length > 0 &&\n this._context._options.restrictions.daysOfWeekDisabled.indexOf(\n targetDate.weekDay\n ) !== -1\n ) {\n return false;\n }\n\n if (\n this._context._options.restrictions.minDate &&\n targetDate.isBefore(\n this._context._options.restrictions.minDate,\n granularity\n )\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.maxDate &&\n targetDate.isAfter(\n this._context._options.restrictions.maxDate,\n granularity\n )\n ) {\n return false;\n }\n\n if (\n granularity === Unit.hours ||\n granularity === Unit.minutes ||\n granularity === Unit.seconds\n ) {\n if (\n this._context._options.restrictions.disabledHours.length > 0 &&\n this._isInDisabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.enabledHours.length > 0 &&\n !this._isInEnabledHours(targetDate)\n ) {\n return false;\n }\n if (\n this._context._options.restrictions.disabledTimeIntervals.length > 0\n ) {\n for (\n let i = 0;\n i < this._context._options.restrictions.disabledTimeIntervals.length;\n i++\n ) {\n if (\n targetDate.isBetween(\n this._context._options.restrictions.disabledTimeIntervals[i].from,\n this._context._options.restrictions.disabledTimeIntervals[i].to\n )\n )\n return false;\n }\n }\n }\n\n return true;\n }\n\n /**\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInDisabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledDates ||\n this._context._options.restrictions.disabledDates.length === 0\n )\n return false;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.disabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by date.\n * @param testDate\n * @private\n */\n private _isInEnabledDates(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledDates ||\n this._context._options.restrictions.enabledDates.length === 0\n )\n return true;\n const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date));\n return this._context._options.restrictions.enabledDates\n .map((x) => x.format(Dates.getFormatByUnit(Unit.date)))\n .find((x) => x === formattedDate);\n }\n\n /**\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInDisabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.disabledHours ||\n this._context._options.restrictions.disabledHours.length === 0\n )\n return false;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.disabledHours.find(\n (x) => x === formattedDate\n );\n }\n\n /**\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\n * if the `testDate` is with in the array. Granularity is by hours.\n * @param testDate\n * @private\n */\n private _isInEnabledHours(testDate: DateTime) {\n if (\n !this._context._options.restrictions.enabledHours ||\n this._context._options.restrictions.enabledHours.length === 0\n )\n return true;\n const formattedDate = testDate.hours;\n return this._context._options.restrictions.enabledHours.find(\n (x) => x === formattedDate\n );\n }\n}\n","import Display from './display/index';\nimport Validation from './validation';\nimport Dates from './dates';\nimport Actions, { ActionTypes } from './actions';\nimport { DatePickerModes, DefaultOptions } from './conts';\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\nimport Namespace from './namespace';\nimport Options, { OptionConverter } from './options';\nimport {\n BaseEvent,\n ChangeEvent,\n ViewUpdateEvent,\n FailEvent,\n} from './event-types';\n\n/**\n * A robust and powerful date/time picker component.\n */\nclass TempusDominus {\n dates: Dates;\n\n _options: Options;\n _currentViewMode = 0;\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\n _element: HTMLElement;\n _input: HTMLInputElement;\n _unset: boolean;\n _minViewModeNumber = 0;\n _display: Display;\n _validation: Validation;\n _action: Actions;\n private _isDisabled = false;\n private _notifyChangeEventContext = 0;\n private _toggle: HTMLElement;\n private _currentPromptTimeTimeout: any;\n\n constructor(element: HTMLElement, options: Options = {} as Options) {\n if (!element) {\n Namespace.errorMessages.mustProvideElement;\n }\n this._element = element;\n this._options = this._initializeOptions(options, DefaultOptions, true);\n this._viewDate.setLocale(this._options.localization.locale);\n this._unset = true;\n\n this._display = new Display(this);\n this._validation = new Validation(this);\n this.dates = new Dates(this);\n this._action = new Actions(this);\n\n this._initializeInput();\n this._initializeToggle();\n\n if (this._options.display.inline) this._display.show();\n }\n\n _viewDate = new DateTime();\n\n get viewDate() {\n return this._viewDate;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\n * @param options\n * @param reset\n * @public\n */\n updateOptions(options, reset = false): void {\n if (reset) this._options = this._initializeOptions(options, DefaultOptions);\n else this._options = this._initializeOptions(options, this._options);\n this._display._rebuild();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\n * @public\n */\n toggle(): void {\n if (this._isDisabled) return;\n this._display.toggle();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Shows the picker unless the picker is disabled.\n * @public\n */\n show(): void {\n if (this._isDisabled) return;\n this._display.show();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker unless the picker is disabled.\n * @public\n */\n hide(): void {\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Disables the picker and the target input field.\n * @public\n */\n disable(): void {\n this._isDisabled = true;\n // todo this might be undesired. If a dev disables the input field to\n // only allow using the picker, this will break that.\n this._input?.setAttribute('disabled', 'disabled');\n this._display.hide();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Enables the picker and the target input field.\n * @public\n */\n enable(): void {\n this._isDisabled = false;\n this._input?.removeAttribute('disabled');\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Clears all the selected dates\n * @public\n */\n clear(): void {\n this.dates.clear();\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\n * @param eventTypes See Namespace.Events\n * @param callbacks Function to call when event is triggered\n * @public\n */\n subscribe(\n eventTypes: string | string[],\n callbacks: (event: any) => void | ((event: any) => void)[]\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\n if (typeof eventTypes === 'string') {\n eventTypes = [eventTypes];\n }\n let callBackArray = [];\n if (!Array.isArray(callbacks)) {\n callBackArray = [callbacks];\n } else {\n callBackArray = callbacks;\n }\n\n if (eventTypes.length !== callBackArray.length) {\n Namespace.errorMessages.subscribeMismatch;\n }\n\n const returnArray = [];\n\n for (let i = 0; i < eventTypes.length; i++) {\n const eventType = eventTypes[i];\n if (!Array.isArray(this._subscribers[eventType])) {\n this._subscribers[eventType] = [];\n }\n\n this._subscribers[eventType].push(callBackArray[i]);\n\n returnArray.push({\n unsubscribe: this._unsubscribe.bind(\n this,\n eventType,\n this._subscribers[eventType].length - 1\n ),\n });\n\n if (eventTypes.length === 1) {\n return returnArray[0];\n }\n }\n\n return returnArray;\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Hides the picker and removes event listeners\n */\n dispose() {\n this._display.hide();\n // this will clear the document click event listener\n this._display._dispose();\n this._input?.removeEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input?.removeEventListener('click', this._toggleClickEvent);\n }\n this._toggle.removeEventListener('click', this._toggleClickEvent);\n this._subscribers = {};\n }\n\n /**\n * Triggers an event like ChangeEvent when the picker has updated the value\n * of a selected date.\n * @param event Accepts a BaseEvent object.\n * @private\n */\n _triggerEvent(event: BaseEvent) {\n // checking hasOwnProperty because the BasicEvent also falls through here otherwise\n if ((event as ChangeEvent) && event.hasOwnProperty('date')) {\n const { date, oldDate, isClear } = event as ChangeEvent;\n // this was to prevent a max call stack error\n // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb\n // todo see if this is still needed or if there's a cleaner way\n this._notifyChangeEventContext++;\n if (\n (date && oldDate && date.isSame(oldDate)) ||\n (!isClear && !date && !oldDate) ||\n this._notifyChangeEventContext > 1\n ) {\n this._notifyChangeEventContext = 0;\n return;\n }\n this._handleAfterChangeEvent(event as ChangeEvent);\n }\n\n this._element.dispatchEvent(\n new CustomEvent(event.type, { detail: event as any })\n );\n\n if ((window as any).jQuery) {\n const $ = (window as any).jQuery;\n $(this._element).trigger(event);\n }\n\n const publish = () => {\n // return if event is not subscribed\n if (!Array.isArray(this._subscribers[event.type])) {\n return;\n }\n\n // Trigger callback for each subscriber\n this._subscribers[event.type].forEach((callback) => {\n callback(event);\n });\n };\n\n publish();\n\n this._notifyChangeEventContext = 0;\n }\n\n /**\n * Fires a ViewUpdate event when, for example, the month view is changed.\n * @param {Unit} unit\n * @private\n */\n _viewUpdate(unit: Unit) {\n this._triggerEvent({\n type: Namespace.events.update,\n change: unit,\n viewDate: this._viewDate.clone,\n } as ViewUpdateEvent);\n }\n\n private _unsubscribe(eventName, index) {\n this._subscribers[eventName].splice(index, 1);\n }\n\n /**\n * Merges two Option objects together and validates options type\n * @param config new Options\n * @param mergeTo Options to merge into\n * @param includeDataset When true, the elements data-td attributes will be included in the\n * @private\n */\n private _initializeOptions(\n config: Options,\n mergeTo: Options,\n includeDataset = false\n ): Options {\n config = OptionConverter._mergeOptions(config, mergeTo);\n if (includeDataset)\n config = OptionConverter._dataToOptions(this._element, config);\n\n OptionConverter._validateConflcits(config);\n\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\n\n if (!this._viewDate.isSame(config.viewDate)) {\n this._viewDate = config.viewDate;\n }\n\n /**\n * Sets the minimum view allowed by the picker. For example the case of only\n * allowing year and month to be selected but not date.\n */\n if (config.display.components.year) {\n this._minViewModeNumber = 2;\n }\n if (config.display.components.month) {\n this._minViewModeNumber = 1;\n }\n if (config.display.components.date) {\n this._minViewModeNumber = 0;\n }\n\n this._currentViewMode = Math.max(\n this._minViewModeNumber,\n this._currentViewMode\n );\n\n // Update view mode if needed\n if (\n DatePickerModes[this._currentViewMode].name !== config.display.viewMode\n ) {\n this._currentViewMode = Math.max(\n DatePickerModes.findIndex((x) => x.name === config.display.viewMode),\n this._minViewModeNumber\n );\n }\n\n // defaults the input format based on the components enabled\n if (config.hooks.inputFormat === undefined) {\n const components = config.display.components;\n config.hooks.inputFormat = (_, date: DateTime) => {\n if (!date) return '';\n return date.format({\n year: components.calendar && components.year ? 'numeric' : undefined,\n month:\n components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute:\n components.clock && components.minutes ? '2-digit' : undefined,\n second:\n components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n });\n };\n }\n\n if (this._display?.isVisible) {\n this._display._update('all');\n }\n\n return config;\n }\n\n /**\n * Checks if an input field is being used, attempts to locate one and sets an\n * event listener if found.\n * @private\n */\n private _initializeInput() {\n if (this._element.tagName == 'INPUT') {\n this._input = this._element as HTMLInputElement;\n } else {\n let query = this._element.dataset.tdTargetInput;\n if (query == undefined || query == 'nearest') {\n this._input = this._element.querySelector('input');\n } else {\n this._input = this._element.querySelector(query);\n }\n }\n\n if (!this._input) return;\n\n this._input.addEventListener('change', this._inputChangeEvent);\n if (this._options.allowInputToggle) {\n this._input.addEventListener('click', this._toggleClickEvent);\n }\n\n if (this._input.value) {\n this._inputChangeEvent();\n }\n }\n\n /**\n * Attempts to locate a toggle for the picker and sets an event listener\n * @private\n */\n private _initializeToggle() {\n if (this._options.display.inline) return;\n let query = this._element.dataset.tdTargetToggle;\n if (query == 'nearest') {\n query = '[data-td-toggle=\"datetimepicker\"]';\n }\n this._toggle =\n query == undefined ? this._element : this._element.querySelector(query);\n this._toggle.addEventListener('click', this._toggleClickEvent);\n }\n\n /**\n * If the option is enabled this will render the clock view after a date pick.\n * @param e change event\n * @private\n */\n private _handleAfterChangeEvent(e: ChangeEvent) {\n if (\n // options is disabled\n !this._options.promptTimeOnDateChange ||\n this._options.display.inline ||\n this._options.display.sideBySide ||\n // time is disabled\n !this._display._hasTime ||\n // clock component is already showing\n this._display.widget\n ?.getElementsByClassName(Namespace.css.show)[0]\n .classList.contains(Namespace.css.timeContainer)\n )\n return;\n\n // First time ever. If useCurrent option is set to true (default), do nothing\n // because the first date is selected automatically.\n // or date didn't change (time did) or date changed because time did.\n if (\n (!e.oldDate && this._options.useCurrent) ||\n (e.oldDate && e.date?.isSame(e.oldDate))\n ) {\n return;\n }\n\n clearTimeout(this._currentPromptTimeTimeout);\n this._currentPromptTimeTimeout = setTimeout(() => {\n if (this._display.widget) {\n this._action.do(\n {\n currentTarget: this._display.widget.querySelector(\n `.${Namespace.css.switch} div`\n ),\n },\n ActionTypes.togglePicker\n );\n }\n }, this._options.promptTimeOnDateChangeTransitionDelay);\n }\n\n /**\n * Event for when the input field changes. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _inputChangeEvent = () => {\n const setViewDate = () => {\n if (this.dates.lastPicked) this._viewDate = this.dates.lastPicked;\n };\n\n const value = this._input.value;\n if (this._options.multipleDates) {\n try {\n const valueSplit = value.split(this._options.multipleDatesSeparator);\n for (let i = 0; i < valueSplit.length; i++) {\n if (this._options.hooks.inputParse) {\n this.dates.set(\n this._options.hooks.inputParse(this, valueSplit[i]),\n i,\n 'input'\n );\n } else {\n this.dates.set(valueSplit[i], i, 'input');\n }\n }\n setViewDate();\n } catch {\n console.warn(\n 'TD: Something went wrong trying to set the multidate values from the input field.'\n );\n }\n } else {\n if (this._options.hooks.inputParse) {\n this.dates.set(this._options.hooks.inputParse(this, value), 0, 'input');\n } else {\n this.dates.set(value, 0, 'input');\n }\n setViewDate();\n }\n };\n\n /**\n * Event for when the toggle is clicked. This is a class level method so there's\n * something for the remove listener function.\n * @private\n */\n private _toggleClickEvent = () => {\n this.toggle();\n };\n}\n\nexport {\n TempusDominus,\n Namespace,\n DefaultOptions,\n DateTime,\n Options,\n Unit,\n DateTimeFormatOptions,\n};\n"],"names":["Unit","SecondDisplay","createPopper"],"mappings":";;;;;;;;;;;AAAYA;IAAZ,WAAY,IAAI;QACd,2BAAmB,CAAA;QACnB,2BAAmB,CAAA;QACnB,uBAAe,CAAA;QACf,qBAAa,CAAA;QACb,uBAAe,CAAA;QACf,qBAAa,CAAA;IACf,CAAC,EAPWA,YAAI,KAAJA,YAAI,QAOf;IAQD;;;;UAIa,QAAS,SAAQ,IAAI;QAAlC;;;;;YAIE,WAAM,GAAG,SAAS,CAAC;YAmbX,kBA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C/B;qBACF,EACD,WAAW,CAAC,YAAY,CACzB,CAAC;iBACH;aACF,EAAE,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC;SACzD;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tempus-dominus.js","sources":["../../src/js/datetime.ts","../../src/js/utilities/errors.ts","../../src/js/utilities/namespace.ts","../../src/js/utilities/calendar-modes.ts","../../src/js/utilities/default-options.ts","../../src/js/utilities/options.ts","../../src/js/utilities/service-locator.ts","../../src/js/validation.ts","../../src/js/utilities/event-emitter.ts","../../src/js/dates.ts","../../src/js/utilities/action-types.ts","../../src/js/display/calendar/date-display.ts","../../src/js/display/calendar/month-display.ts","../../src/js/display/calendar/year-display.ts","../../src/js/display/calendar/decade-display.ts","../../src/js/display/time/time-display.ts","../../src/js/display/time/hour-display.ts","../../src/js/display/time/minute-display.ts","../../src/js/display/time/second-display.ts","../../src/js/display/collapse.ts","../../src/js/display/index.ts","../../src/js/actions.ts","../../src/js/tempus-dominus.ts"],"sourcesContent":["export enum Unit {\r\n seconds = 'seconds',\r\n minutes = 'minutes',\r\n hours = 'hours',\r\n date = 'date',\r\n month = 'month',\r\n year = 'year',\r\n}\r\n\r\nexport interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {\r\n timeStyle?: 'short' | 'medium' | 'long';\r\n dateStyle?: 'short' | 'medium' | 'long' | 'full';\r\n numberingSystem?: string;\r\n}\r\n\r\nexport const getFormatByUnit = (unit: Unit): object => {\r\n switch (unit) {\r\n case 'date':\r\n return { dateStyle: 'short' };\r\n case 'month':\r\n return {\r\n month: 'numeric',\r\n year: 'numeric'\r\n };\r\n case 'year':\r\n return { year: 'numeric' };\r\n }\r\n};\r\n\r\n/**\r\n * For the most part this object behaves exactly the same way\r\n * as the native Date object with a little extra spice.\r\n */\r\nexport class DateTime extends Date {\r\n /**\r\n * Used with Intl.DateTimeFormat\r\n */\r\n locale = 'default';\r\n\r\n /**\r\n * Chainable way to set the {@link locale}\r\n * @param value\r\n */\r\n setLocale(value: string): this {\r\n this.locale = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts a plain JS date object to a DateTime object.\r\n * Doing this allows access to format, etc.\r\n * @param date\r\n */\r\n static convert(date: Date, locale: string = 'default'): DateTime {\r\n if (!date) throw new Error(`A date is required`);\r\n return new DateTime(\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds()\r\n ).setLocale(locale);\r\n }\r\n\r\n /**\r\n * Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.\r\n */\r\n get clone() {\r\n return new DateTime(\r\n this.year,\r\n this.month,\r\n this.date,\r\n this.hours,\r\n this.minutes,\r\n this.seconds,\r\n this.getMilliseconds()\r\n ).setLocale(this.locale);\r\n }\r\n\r\n /**\r\n * Sets the current date to the start of the {@link unit} provided\r\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')\r\n * would return April 1, 2021, 12:00:00.000 AM (midnight)\r\n * @param unit\r\n * @param startOfTheWeek Allows for the changing the start of the week.\r\n */\r\n startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(0);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(0, 0);\r\n break;\r\n case 'hours':\r\n this.setMinutes(0, 0, 0);\r\n break;\r\n case 'date':\r\n this.setHours(0, 0, 0, 0);\r\n break;\r\n case 'weekDay':\r\n this.startOf(Unit.date);\r\n if (this.weekDay === startOfTheWeek) break;\r\n let goBack = this.weekDay;\r\n if (startOfTheWeek !== 0 && this.weekDay === 0) goBack = 8 - startOfTheWeek;\r\n this.manipulate(startOfTheWeek - goBack, Unit.date);\r\n break;\r\n case 'month':\r\n this.startOf(Unit.date);\r\n this.setDate(1);\r\n break;\r\n case 'year':\r\n this.startOf(Unit.date);\r\n this.setMonth(0, 1);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the current date to the end of the {@link unit} provided\r\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')\r\n * would return April 30, 2021, 11:59:59.999 PM\r\n * @param unit\r\n */\r\n endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n switch (unit) {\r\n case 'seconds':\r\n this.setMilliseconds(999);\r\n break;\r\n case 'minutes':\r\n this.setSeconds(59, 999);\r\n break;\r\n case 'hours':\r\n this.setMinutes(59, 59, 999);\r\n break;\r\n case 'date':\r\n this.setHours(23, 59, 59, 999);\r\n break;\r\n case 'weekDay':\r\n this.endOf(Unit.date);\r\n this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date);\r\n break;\r\n case 'month':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.month);\r\n this.setDate(0);\r\n break;\r\n case 'year':\r\n this.endOf(Unit.date);\r\n this.manipulate(1, Unit.year);\r\n this.setDate(0);\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Change a {@link unit} value. Value can be positive or negative\r\n * Example: Consider a date of \"April 30, 2021, 11:45:32.984 AM\" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month')\r\n * would return May 30, 2021, 11:45:32.984 AM\r\n * @param value A positive or negative number\r\n * @param unit\r\n */\r\n manipulate(value: number, unit: Unit): this {\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n this[unit] += value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a string format.\r\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\r\n * for valid templates and locale objects\r\n * @param template An object. Uses browser defaults otherwise.\r\n * @param locale Can be a string or an array of strings. Uses browser defaults otherwise.\r\n */\r\n format(template: DateTimeFormatOptions, locale = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, template).format(this);\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is before this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isBefore(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() < compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is after this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isAfter(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() > compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n return (\r\n this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Return true if {@link compare} is same this date\r\n * @param compare The Date/DateTime to compare\r\n * @param unit If provided, uses {@link startOf} for\r\n * comparision.\r\n */\r\n isSame(compare: DateTime, unit?: Unit): boolean {\r\n if (!unit) return this.valueOf() === compare.valueOf();\r\n if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n compare = DateTime.convert(compare);\r\n return (\r\n this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf()\r\n );\r\n }\r\n\r\n /**\r\n * Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.\r\n * @param left\r\n * @param right\r\n * @param unit.\r\n * @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.\r\n * If the inclusivity parameter is used, both indicators must be passed.\r\n */\r\n isBetween(\r\n left: DateTime,\r\n right: DateTime,\r\n unit?: Unit,\r\n inclusivity: '()' | '[]' | '(]' | '[)' = '()'\r\n ): boolean {\r\n if (unit && this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`);\r\n const leftInclusivity = inclusivity[0] === '(';\r\n const rightInclusivity = inclusivity[1] === ')';\r\n\r\n return (\r\n ((leftInclusivity\r\n ? this.isAfter(left, unit)\r\n : !this.isBefore(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isBefore(right, unit)\r\n : !this.isAfter(right, unit))) ||\r\n ((leftInclusivity\r\n ? this.isBefore(left, unit)\r\n : !this.isAfter(left, unit)) &&\r\n (rightInclusivity\r\n ? this.isAfter(right, unit)\r\n : !this.isBefore(right, unit)))\r\n );\r\n }\r\n\r\n /**\r\n * Returns flattened object of the date. Does not include literals\r\n * @param locale\r\n * @param template\r\n */\r\n parts(\r\n locale = this.locale,\r\n template: any = { dateStyle: 'full', timeStyle: 'long' }\r\n ): any {\r\n const parts = {};\r\n new Intl.DateTimeFormat(locale, template)\r\n .formatToParts(this)\r\n .filter((x) => x.type !== 'literal')\r\n .forEach((x) => (parts[x.type] = x.value));\r\n return parts;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getSeconds()\r\n */\r\n get seconds(): number {\r\n return this.getSeconds();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setSeconds()\r\n */\r\n set seconds(value: number) {\r\n this.setSeconds(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get secondsFormatted(): string {\r\n return this.seconds < 10 ? `0${this.seconds}` : `${this.seconds}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMinutes()\r\n */\r\n get minutes(): number {\r\n return this.getMinutes();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMinutes()\r\n */\r\n set minutes(value: number) {\r\n this.setMinutes(value);\r\n }\r\n\r\n /**\r\n * Returns two digit minutes\r\n */\r\n get minutesFormatted(): string {\r\n return this.minutes < 10 ? `0${this.minutes}` : `${this.minutes}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getHours()\r\n */\r\n get hours(): number {\r\n return this.getHours();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setHours()\r\n */\r\n set hours(value: number) {\r\n this.setHours(value);\r\n }\r\n\r\n /**\r\n * Returns two digit hours\r\n */\r\n get hoursFormatted(): string {\r\n let formatted = this.format({ hour: '2-digit', hour12: false });\r\n if (formatted === '24') formatted = '00';\r\n return formatted;\r\n }\r\n\r\n /**\r\n * Returns two digit hours but in twelve hour mode e.g. 13 -> 1\r\n */\r\n get twelveHoursFormatted(): string {\r\n let hour = this.parts().hour;\r\n if (hour.length === 1) hour = `0${hour}`;\r\n return hour;\r\n }\r\n\r\n /**\r\n * Get the meridiem of the date. E.g. AM or PM.\r\n * If the {@link locale} provides a \"dayPeriod\" then this will be returned,\r\n * otherwise it will return AM or PM.\r\n * @param locale\r\n */\r\n meridiem(locale: string = this.locale): string {\r\n return new Intl.DateTimeFormat(locale, {\r\n hour: 'numeric',\r\n hour12: true\r\n } as any)\r\n .formatToParts(this)\r\n .find((p) => p.type === 'dayPeriod')?.value;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDate()\r\n */\r\n get date(): number {\r\n return this.getDate();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setDate()\r\n */\r\n set date(value: number) {\r\n this.setDate(value);\r\n }\r\n\r\n /**\r\n * Return two digit date\r\n */\r\n get dateFormatted(): string {\r\n return this.date < 10 ? `0${this.date}` : `${this.date}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getDay()\r\n */\r\n get weekDay(): number {\r\n return this.getDay();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getMonth()\r\n */\r\n get month(): number {\r\n return this.getMonth();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setMonth()\r\n */\r\n set month(value: number) {\r\n const targetMonth = new Date(this.year, value + 1);\r\n targetMonth.setDate(0);\r\n const endOfMonth = targetMonth.getDate();\r\n if (this.date > endOfMonth) {\r\n this.date = endOfMonth;\r\n }\r\n this.setMonth(value);\r\n }\r\n\r\n /**\r\n * Return two digit, human expected month. E.g. January = 1, December = 12\r\n */\r\n get monthFormatted(): string {\r\n return this.month + 1 < 10 ? `0${this.month}` : `${this.month}`;\r\n }\r\n\r\n /**\r\n * Shortcut to Date.getFullYear()\r\n */\r\n get year(): number {\r\n return this.getFullYear();\r\n }\r\n\r\n /**\r\n * Shortcut to Date.setFullYear()\r\n */\r\n set year(value: number) {\r\n this.setFullYear(value);\r\n }\r\n\r\n // borrowed a bunch of stuff from Luxon\r\n /**\r\n * Gets the week of the year\r\n */\r\n get week(): number {\r\n const ordinal = this.computeOrdinal(),\r\n weekday = this.getUTCDay();\r\n\r\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7);\r\n\r\n if (weekNumber < 1) {\r\n weekNumber = this.weeksInWeekYear(this.year - 1);\r\n } else if (weekNumber > this.weeksInWeekYear(this.year)) {\r\n weekNumber = 1;\r\n }\r\n\r\n return weekNumber;\r\n }\r\n\r\n weeksInWeekYear(weekYear) {\r\n const p1 =\r\n (weekYear +\r\n Math.floor(weekYear / 4) -\r\n Math.floor(weekYear / 100) +\r\n Math.floor(weekYear / 400)) %\r\n 7,\r\n last = weekYear - 1,\r\n p2 =\r\n (last +\r\n Math.floor(last / 4) -\r\n Math.floor(last / 100) +\r\n Math.floor(last / 400)) %\r\n 7;\r\n return p1 === 4 || p2 === 3 ? 53 : 52;\r\n }\r\n\r\n get isLeapYear() {\r\n return this.year % 4 === 0 && (this.year % 100 !== 0 || this.year % 400 === 0);\r\n }\r\n\r\n private computeOrdinal() {\r\n return this.date + (this.isLeapYear ? this.leapLadder : this.nonLeapLadder)[this.month];\r\n }\r\n\r\n private nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\r\n private leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\r\n}\r\n","import Namespace from './namespace';\r\n\r\nexport class TdError extends Error {\r\n code: number;\r\n}\r\n\r\nexport class ErrorMessages {\r\n private base = 'TD:';\r\n\r\n //#region out to console\r\n\r\n /**\r\n * Throws an error indicating that a key in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOption(optionName: string) {\r\n const error = new TdError(\r\n `${this.base} Unexpected option: ${optionName} does not match a known option.`\r\n );\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error indicating that one more keys in the options object is invalid.\r\n * @param optionName\r\n */\r\n unexpectedOptions(optionName: string[]) {\r\n const error = new TdError(`${this.base}: ${optionName.join(', ')}`);\r\n error.code = 1;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option is provide an unsupported value.\r\n * For example a value of 'cheese' for toolbarPlacement which only supports\r\n * 'top', 'bottom', 'default'.\r\n * @param optionName\r\n * @param badValue\r\n * @param validOptions\r\n */\r\n unexpectedOptionValue(\r\n optionName: string,\r\n badValue: string,\r\n validOptions: string[]\r\n ) {\r\n const error = new TdError(\r\n `${\r\n this.base\r\n } Unexpected option value: ${optionName} does not accept a value of \"${badValue}\". Valid values are: ${validOptions.join(\r\n ', '\r\n )}`\r\n );\r\n error.code = 2;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is the wrong type.\r\n * For example a string value was provided to multipleDates which only\r\n * supports true or false.\r\n * @param optionName\r\n * @param badType\r\n * @param expectedType\r\n */\r\n typeMismatch(optionName: string, badType: string, expectedType: string) {\r\n const error = new TdError(\r\n `${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`\r\n );\r\n error.code = 3;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when an option value is outside of the expected range.\r\n * For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.\r\n * @param optionName\r\n * @param lower\r\n * @param upper\r\n */\r\n numbersOutOfRage(optionName: string, lower: number, upper: number) {\r\n const error = new TdError(\r\n `${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`\r\n );\r\n error.code = 4;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws an error when a value for a date options couldn't be parsed. Either\r\n * the option was an invalide string or an invalid Date object.\r\n * @param optionName\r\n * @param date\r\n * @param soft If true, logs a warning instead of an error.\r\n */\r\n failedToParseDate(optionName: string, date: any, soft = false) {\r\n const error = new TdError(\r\n `${this.base} Could not correctly parse \"${date}\" to a date for ${optionName}.`\r\n );\r\n error.code = 5;\r\n if (!soft) throw error;\r\n console.warn(error);\r\n }\r\n\r\n /**\r\n * Throws when an element to attach to was not provided in the constructor.\r\n */\r\n mustProvideElement() {\r\n const error = new TdError(`${this.base} No element was provided.`);\r\n error.code = 6;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if providing an array for the events to subscribe method doesn't have\r\n * the same number of callbacks. E.g., subscribe([1,2], [1])\r\n */\r\n subscribeMismatch() {\r\n const error = new TdError(\r\n `${this.base} The subscribed events does not match the number of callbacks`\r\n );\r\n error.code = 7;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Throws if the configuration has conflicting rules e.g. minDate is after maxDate\r\n */\r\n conflictingConfiguration(message?: string) {\r\n const error = new TdError(\r\n `${this.base} A configuration value conflicts with another rule. ${message}`\r\n );\r\n error.code = 8;\r\n throw error;\r\n }\r\n\r\n /**\r\n * Logs a warning if a date option value is provided as a string, instead of\r\n * a date/datetime object.\r\n */\r\n dateString() {\r\n console.warn(\r\n `${this.base} Using a string for date options is not recommended unless you specify an ISO string.`\r\n );\r\n }\r\n\r\n //#endregion\r\n\r\n //#region used with notify.error\r\n\r\n /**\r\n * Used with an Error Event type if the user selects a date that\r\n * fails restriction validation.\r\n */\r\n failedToSetInvalidDate = 'Failed to set invalid date';\r\n\r\n /**\r\n * Used with an Error Event type when a user changes the value of the\r\n * input field directly, and does not provide a valid date.\r\n */\r\n failedToParseInput = 'Failed parse input field';\r\n\r\n //#endregion\r\n}\r\n","import { ErrorMessages } from './errors';\n// this is not the way I want this to stay but nested classes seemed to blown up once its compiled.\nconst NAME = 'tempus-dominus',\n version = '6.0.0-beta4',\n dataKey = 'td';\n\n/**\n * Events\n */\nclass Events {\n key = `.${dataKey}`;\n\n /**\n * Change event. Fired when the user selects a date.\n * See also EventTypes.ChangeEvent\n */\n change = `change${this.key}`;\n\n /**\n * Emit when the view changes for example from month view to the year view.\n * See also EventTypes.ViewUpdateEvent\n */\n update = `update${this.key}`;\n\n /**\n * Emits when a selected date or value from the input field fails to meet the provided validation rules.\n * See also EventTypes.FailEvent\n */\n error = `error${this.key}`;\n\n /**\n * Show event\n * @event Events#show\n */\n show = `show${this.key}`;\n\n /**\n * Hide event\n * @event Events#hide\n */\n hide = `hide${this.key}`;\n\n // blur and focus are used in the jQuery provider but are otherwise unused.\n // keyup/down will be used later for keybinding options\n\n blur = `blur${this.key}`;\n focus = `focus${this.key}`;\n keyup = `keyup${this.key}`;\n keydown = `keydown${this.key}`;\n}\n\nclass Css {\n /**\n * The outer element for the widget.\n */\n widget = `${NAME}-widget`;\n\n /**\n * Hold the previous, next and switcher divs\n */\n calendarHeader = 'calendar-header';\n\n /**\n * The element for the action to change the calendar view. E.g. month -> year.\n */\n switch = 'picker-switch';\n\n /**\n * The elements for all of the toolbar options\n */\n toolbar = 'toolbar';\n\n /**\n * Disables the hover and rounding affect.\n */\n noHighlight = 'no-highlight';\n\n /**\n * Applied to the widget element when the side by side option is in use.\n */\n sideBySide = 'timepicker-sbs';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> July\n */\n previous = 'previous';\n\n /**\n * The element for the action to change the calendar view, e.g. August -> September\n */\n next = 'next';\n\n /**\n * Applied to any action that would violate any restriction options. ALso applied\n * to an input field if the disabled function is called.\n */\n disabled = 'disabled';\n\n /**\n * Applied to any date that is less than requested view,\n * e.g. the last day of the previous month.\n */\n old = 'old';\n\n /**\n * Applied to any date that is greater than of requested view,\n * e.g. the last day of the previous month.\n */\n new = 'new';\n\n /**\n * Applied to any date that is currently selected.\n */\n active = 'active';\n\n //#region date element\n\n /**\n * The outer most element for the calendar view.\n */\n dateContainer = 'date-container';\n\n /**\n * The outer most element for the decades view.\n */\n decadesContainer = `${this.dateContainer}-decades`;\n\n /**\n * Applied to elements within the decades container, e.g. 2020, 2030\n */\n decade = 'decade';\n\n /**\n * The outer most element for the years view.\n */\n yearsContainer = `${this.dateContainer}-years`;\n\n /**\n * Applied to elements within the years container, e.g. 2021, 2021\n */\n year = 'year';\n\n /**\n * The outer most element for the month view.\n */\n monthsContainer = `${this.dateContainer}-months`;\n\n /**\n * Applied to elements within the month container, e.g. January, February\n */\n month = 'month';\n\n /**\n * The outer most element for the calendar view.\n */\n daysContainer = `${this.dateContainer}-days`;\n\n /**\n * Applied to elements within the day container, e.g. 1, 2..31\n */\n day = 'day';\n\n /**\n * If display.calendarWeeks is enabled, a column displaying the week of year\n * is shown. This class is applied to each cell in that column.\n */\n calendarWeeks = 'cw';\n\n /**\n * Applied to the first row of the calendar view, e.g. Sunday, Monday\n */\n dayOfTheWeek = 'dow';\n\n /**\n * Applied to the current date on the calendar view.\n */\n today = 'today';\n\n /**\n * Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday\n */\n weekend = 'weekend';\n\n //#endregion\n\n //#region time element\n\n /**\n * The outer most element for all time related elements.\n */\n timeContainer = 'time-container';\n\n /**\n * Applied the separator columns between time elements, e.g. hour *:* minute *:* second\n */\n separator = 'separator';\n\n /**\n * The outer most element for the clock view.\n */\n clockContainer = `${this.timeContainer}-clock`;\n\n /**\n * The outer most element for the hours selection view.\n */\n hourContainer = `${this.timeContainer}-hour`;\n\n /**\n * The outer most element for the minutes selection view.\n */\n minuteContainer = `${this.timeContainer}-minute`;\n\n /**\n * The outer most element for the seconds selection view.\n */\n secondContainer = `${this.timeContainer}-second`;\n\n /**\n * Applied to each element in the hours selection view.\n */\n hour = 'hour';\n\n /**\n * Applied to each element in the minutes selection view.\n */\n minute = 'minute';\n\n /**\n * Applied to each element in the seconds selection view.\n */\n second = 'second';\n\n /**\n * Applied AM/PM toggle button.\n */\n toggleMeridiem = 'toggleMeridiem';\n\n //#endregion\n\n //#region collapse\n\n /**\n * Applied the element of the current view mode, e.g. calendar or clock.\n */\n show = 'show';\n\n /**\n * Applied to the currently showing view mode during a transition\n * between calendar and clock views\n */\n collapsing = 'td-collapsing';\n\n /**\n * Applied to the currently hidden view mode.\n */\n collapse = 'td-collapse';\n\n //#endregion\n\n /**\n * Applied to the widget when the option display.inline is enabled.\n */\n inline = 'inline';\n}\n\nexport default class Namespace {\n static NAME = NAME;\n // noinspection JSUnusedGlobalSymbols\n static version = version;\n static dataKey = dataKey;\n\n static events = new Events();\n\n static css = new Css();\n\n static errorMessages = new ErrorMessages();\n}\n","import { Unit } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\n\nconst CalendarModes: {\n name: keyof ViewMode;\n className: string;\n unit: Unit;\n step: number;\n}[] = [\n {\n name: 'calendar',\n className: Namespace.css.daysContainer,\n unit: Unit.month,\n step: 1,\n },\n {\n name: 'months',\n className: Namespace.css.monthsContainer,\n unit: Unit.year,\n step: 1,\n },\n {\n name: 'years',\n className: Namespace.css.yearsContainer,\n unit: Unit.year,\n step: 10,\n },\n {\n name: 'decades',\n className: Namespace.css.decadesContainer,\n unit: Unit.year,\n step: 100,\n },\n];\n\nexport default CalendarModes;\n","import Options from './options';\nimport { DateTime } from '../datetime';\n\nconst DefaultOptions: Options = {\n restrictions: {\n minDate: undefined,\n maxDate: undefined,\n disabledDates: [],\n enabledDates: [],\n daysOfWeekDisabled: [],\n disabledTimeIntervals: [],\n disabledHours: [],\n enabledHours: []\n },\n display: {\n icons: {\n type: 'icons',\n time: 'fa-solid fa-clock',\n date: 'fa-solid fa-calendar',\n up: 'fa-solid fa-arrow-up',\n down: 'fa-solid fa-arrow-down',\n previous: 'fa-solid fa-chevron-left',\n next: 'fa-solid fa-chevron-right',\n today: 'fa-solid fa-calendar-check',\n clear: 'fa-solid fa-trash',\n close: 'fa-solid fa-xmark'\n },\n sideBySide: false,\n calendarWeeks: false,\n viewMode: 'calendar',\n toolbarPlacement: 'bottom',\n keepOpen: false,\n buttons: {\n today: false,\n clear: false,\n close: false\n },\n components: {\n calendar: true,\n date: true,\n month: true,\n year: true,\n decades: true,\n clock: true,\n hours: true,\n minutes: true,\n seconds: false,\n useTwentyfourHour: false\n },\n inline: false\n },\n stepping: 1,\n useCurrent: true,\n defaultDate: undefined,\n localization: {\n today: 'Go to today',\n clear: 'Clear selection',\n close: 'Close the picker',\n selectMonth: 'Select Month',\n previousMonth: 'Previous Month',\n nextMonth: 'Next Month',\n selectYear: 'Select Year',\n previousYear: 'Previous Year',\n nextYear: 'Next Year',\n selectDecade: 'Select Decade',\n previousDecade: 'Previous Decade',\n nextDecade: 'Next Decade',\n previousCentury: 'Previous Century',\n nextCentury: 'Next Century',\n pickHour: 'Pick Hour',\n incrementHour: 'Increment Hour',\n decrementHour: 'Decrement Hour',\n pickMinute: 'Pick Minute',\n incrementMinute: 'Increment Minute',\n decrementMinute: 'Decrement Minute',\n pickSecond: 'Pick Second',\n incrementSecond: 'Increment Second',\n decrementSecond: 'Decrement Second',\n toggleMeridiem: 'Toggle Meridiem',\n selectTime: 'Select Time',\n selectDate: 'Select Date',\n dayViewHeaderFormat: { month: 'long', year: '2-digit' },\n locale: 'default',\n startOfTheWeek: 0\n },\n keepInvalid: false,\n debug: false,\n allowInputToggle: false,\n viewDate: new DateTime(),\n multipleDates: false,\n multipleDatesSeparator: '; ',\n promptTimeOnDateChange: false,\n promptTimeOnDateChangeTransitionDelay: 200,\n meta: {},\n container: undefined\n};\n\nexport default DefaultOptions;","import { DateTime, DateTimeFormatOptions } from '../datetime';\nimport Namespace from './namespace';\nimport ViewMode from './view-mode';\nimport CalendarModes from './calendar-modes';\nimport DefaultOptions from './default-options';\n\nexport class OptionsStore {\n options: Options;\n element: HTMLElement;\n viewDate = new DateTime();\n input: HTMLInputElement;\n unset: boolean;\n private _currentCalendarViewMode = 0;\n get currentCalendarViewMode() {\n return this._currentCalendarViewMode;\n }\n\n set currentCalendarViewMode(value) {\n this._currentCalendarViewMode = value;\n this.currentView = CalendarModes[value].name;\n }\n\n /**\n * When switching back to the calendar from the clock,\n * this sets currentView to the correct calendar view.\n */\n refreshCurrentView() {\n this.currentView = CalendarModes[this.currentCalendarViewMode].name;\n }\n\n minimumCalendarViewMode = 0;\n currentView: keyof ViewMode = 'calendar';\n}\n\nexport default interface Options {\n restrictions?: {\n minDate?: DateTime;\n maxDate?: DateTime;\n enabledDates?: DateTime[];\n disabledDates?: DateTime[];\n enabledHours?: number[];\n disabledHours?: number[];\n disabledTimeIntervals?: { from: DateTime; to: DateTime }[];\n daysOfWeekDisabled?: number[];\n };\n display?: {\n toolbarPlacement?: 'top' | 'bottom';\n components?: {\n calendar?: boolean;\n date?: boolean;\n month?: boolean;\n year?: boolean;\n decades?: boolean;\n clock?: boolean;\n hours?: boolean;\n minutes?: boolean;\n seconds?: boolean;\n useTwentyfourHour?: boolean;\n };\n buttons?: { today?: boolean; close?: boolean; clear?: boolean };\n calendarWeeks?: boolean;\n icons?: {\n date?: string;\n next?: string;\n previous?: string;\n today?: string;\n clear?: string;\n time?: string;\n up?: string;\n type?: 'icons' | 'sprites';\n down?: string;\n close?: string;\n };\n viewMode?: keyof ViewMode | undefined;\n sideBySide?: boolean;\n inline?: boolean;\n keepOpen?: boolean;\n };\n stepping?: number;\n useCurrent?: boolean;\n defaultDate?: DateTime;\n localization?: {\n nextMonth?: string;\n pickHour?: string;\n incrementSecond?: string;\n nextDecade?: string;\n selectDecade?: string;\n dayViewHeaderFormat?: DateTimeFormatOptions;\n decrementHour?: string;\n selectDate?: string;\n incrementHour?: string;\n previousCentury?: string;\n decrementSecond?: string;\n today?: string;\n previousMonth?: string;\n selectYear?: string;\n pickSecond?: string;\n nextCentury?: string;\n close?: string;\n incrementMinute?: string;\n selectTime?: string;\n clear?: string;\n toggleMeridiem?: string;\n selectMonth?: string;\n decrementMinute?: string;\n pickMinute?: string;\n nextYear?: string;\n previousYear?: string;\n previousDecade?: string;\n locale?: string;\n startOfTheWeek?: number;\n };\n keepInvalid?: boolean;\n debug?: boolean;\n allowInputToggle?: boolean;\n viewDate?: DateTime;\n multipleDates?: boolean;\n multipleDatesSeparator?: string;\n promptTimeOnDateChange?: boolean;\n promptTimeOnDateChangeTransitionDelay?: number;\n meta?: {};\n container?: HTMLElement;\n}\n\nexport class OptionConverter {\n static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {\n const newOptions = {} as Options;\n let path = '';\n const ignoreProperties = ['meta', 'dayViewHeaderFormat', 'container'];\n\n //see if the options specify a locale\n const locale =\n mergeTo.localization.locale !== 'default'\n ? mergeTo.localization.locale\n : providedOptions?.localization?.locale || 'default';\n\n const processKey = (key, value, providedType, defaultType) => {\n switch (key) {\n case 'defaultDate': {\n const dateTime = this.dateConversion(value, 'defaultDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'defaultDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'viewDate': {\n const dateTime = this.dateConversion(value, 'viewDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'viewDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'minDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this.dateConversion(value, 'restrictions.minDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.minDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'maxDate': {\n if (value === undefined) {\n return value;\n }\n const dateTime = this.dateConversion(value, 'restrictions.maxDate');\n if (dateTime !== undefined) {\n dateTime.setLocale(locale);\n return dateTime;\n }\n Namespace.errorMessages.typeMismatch(\n 'restrictions.maxDate',\n providedType,\n 'DateTime or Date'\n );\n break;\n }\n case 'disabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.disabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.disabledHours',\n 0,\n 23\n );\n return value;\n case 'enabledHours':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.enabledHours',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 24).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.enabledHours',\n 0,\n 23\n );\n return value;\n case 'daysOfWeekDisabled':\n if (value === undefined) {\n return [];\n }\n this._typeCheckNumberArray(\n 'restrictions.daysOfWeekDisabled',\n value,\n providedType\n );\n if (value.filter((x) => x < 0 || x > 6).length > 0)\n Namespace.errorMessages.numbersOutOfRage(\n 'restrictions.daysOfWeekDisabled',\n 0,\n 6\n );\n return value;\n case 'enabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.enabledDates',\n value,\n providedType,\n locale\n );\n return value;\n case 'disabledDates':\n if (value === undefined) {\n return [];\n }\n this._typeCheckDateArray(\n 'restrictions.disabledDates',\n value,\n providedType,\n locale\n );\n return value;\n case 'disabledTimeIntervals':\n if (value === undefined) {\n return [];\n }\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n key,\n providedType,\n 'array of { from: DateTime|Date, to: DateTime|Date }'\n );\n }\n const valueObject = value as { from: any; to: any }[];\n for (let i = 0; i < valueObject.length; i++) {\n Object.keys(valueObject[i]).forEach((vk) => {\n const subOptionName = `${key}[${i}].${vk}`;\n let d = valueObject[i][vk];\n const dateTime = this.dateConversion(d, subOptionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n subOptionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n dateTime.setLocale(locale);\n valueObject[i][vk] = dateTime;\n });\n }\n return valueObject;\n case 'toolbarPlacement':\n case 'type':\n case 'viewMode':\n const optionValues = {\n toolbarPlacement: ['top', 'bottom', 'default'],\n type: ['icons', 'sprites'],\n viewMode: ['clock', 'calendar', 'months', 'years', 'decades'],\n };\n const keyOptions = optionValues[key];\n if (!keyOptions.includes(value))\n Namespace.errorMessages.unexpectedOptionValue(\n path.substring(1),\n value,\n keyOptions\n );\n\n return value;\n case 'meta':\n case 'dayViewHeaderFormat':\n return value;\n case 'container':\n if (\n value &&\n !(\n value instanceof HTMLElement ||\n value instanceof Element ||\n value?.appendChild\n )\n ) {\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n typeof value,\n 'HTMLElement'\n );\n }\n return value;\n default:\n switch (defaultType) {\n case 'boolean':\n return value === 'true' || value === true;\n case 'number':\n return +value;\n case 'string':\n return value.toString();\n case 'object':\n return {};\n case 'function':\n return value;\n default:\n Namespace.errorMessages.typeMismatch(\n path.substring(1),\n providedType,\n defaultType\n );\n }\n }\n };\n\n /**\n * The spread operator caused sub keys to be missing after merging.\n * This is to fix that issue by using spread on the child objects first.\n * Also handles complex options like disabledDates\n * @param provided An option from new providedOptions\n * @param mergeOption Default option to compare types against\n * @param copyTo Destination object. This was add to prevent reference copies\n */\n const spread = (provided, mergeOption, copyTo) => {\n const unsupportedOptions = Object.keys(provided).filter(\n (x) => !Object.keys(mergeOption).includes(x)\n );\n if (unsupportedOptions.length > 0) {\n const flattenedOptions = OptionConverter.getFlattenDefaultOptions();\n\n const errors = unsupportedOptions.map((x) => {\n let error = `\"${path.substring(1)}.${x}\" in not a known option.`;\n let didYouMean = flattenedOptions.find((y) => y.includes(x));\n if (didYouMean) error += `Did you mean \"${didYouMean}\"?`;\n return error;\n });\n Namespace.errorMessages.unexpectedOptions(errors);\n }\n Object.keys(mergeOption).forEach((key) => {\n const defaultOptionValue = mergeOption[key];\n let providedType = typeof provided[key];\n let defaultType = typeof defaultOptionValue;\n let value = provided[key];\n if (!provided.hasOwnProperty(key)) {\n if (\n defaultType === 'undefined' ||\n (value?.length === 0 && Array.isArray(defaultOptionValue))\n ) {\n copyTo[key] = defaultOptionValue;\n return;\n }\n provided[key] = defaultOptionValue;\n value = provided[key];\n }\n path += `.${key}`;\n copyTo[key] = processKey(key, value, providedType, defaultType);\n\n if (\n typeof defaultOptionValue !== 'object' ||\n ignoreProperties.includes(key)\n ) {\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n return;\n }\n if (!Array.isArray(provided[key])) {\n spread(provided[key], defaultOptionValue, copyTo[key]);\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n }\n path = path.substring(0, path.lastIndexOf(`.${key}`));\n });\n };\n spread(providedOptions, mergeTo, newOptions);\n\n return newOptions;\n }\n\n static _dataToOptions(element, options: Options): Options {\n const eData = JSON.parse(JSON.stringify(element.dataset));\n\n if (eData?.tdTargetInput) delete eData.tdTargetInput;\n if (eData?.tdTargetToggle) delete eData.tdTargetToggle;\n\n if (\n !eData ||\n Object.keys(eData).length === 0 ||\n eData.constructor !== DOMStringMap\n )\n return options;\n let dataOptions = {} as Options;\n\n // because dataset returns camelCase including the 'td' key the option\n // key won't align\n const objectToNormalized = (object) => {\n const lowered = {};\n Object.keys(object).forEach((x) => {\n lowered[x.toLowerCase()] = x;\n });\n\n return lowered;\n };\n\n const rabbitHole = (\n split: string[],\n index: number,\n optionSubgroup: {},\n value: any\n ) => {\n // first round = display { ... }\n const normalizedOptions = objectToNormalized(optionSubgroup);\n\n const keyOption = normalizedOptions[split[index].toLowerCase()];\n const internalObject = {};\n\n if (keyOption === undefined) return internalObject;\n\n // if this is another object, continue down the rabbit hole\n if (optionSubgroup[keyOption].constructor === Object) {\n index++;\n internalObject[keyOption] = rabbitHole(\n split,\n index,\n optionSubgroup[keyOption],\n value\n );\n } else {\n internalObject[keyOption] = value;\n }\n return internalObject;\n };\n const optionsLower = objectToNormalized(options);\n\n Object.keys(eData)\n .filter((x) => x.startsWith(Namespace.dataKey))\n .map((x) => x.substring(2))\n .forEach((key) => {\n let keyOption = optionsLower[key.toLowerCase()];\n\n // dataset merges dashes to camelCase... yay\n // i.e. key = display_components_seconds\n if (key.includes('_')) {\n // [display, components, seconds]\n const split = key.split('_');\n // display\n keyOption = optionsLower[split[0].toLowerCase()];\n if (\n keyOption !== undefined &&\n options[keyOption].constructor === Object\n ) {\n dataOptions[keyOption] = rabbitHole(\n split,\n 1,\n options[keyOption],\n eData[`td${key}`]\n );\n }\n }\n // or key = multipleDate\n else if (keyOption !== undefined) {\n dataOptions[keyOption] = eData[`td${key}`];\n }\n });\n\n return this._mergeOptions(dataOptions, options);\n }\n\n /**\n * Attempts to prove `d` is a DateTime or Date or can be converted into one.\n * @param d If a string will attempt creating a date from it.\n * @private\n */\n static _dateTypeCheck(d: any): DateTime | null {\n if (d.constructor.name === DateTime.name) return d;\n if (d.constructor.name === Date.name) {\n return DateTime.convert(d);\n }\n if (typeof d === typeof '') {\n const dateTime = new DateTime(d);\n if (JSON.stringify(dateTime) === 'null') {\n return null;\n }\n return dateTime;\n }\n return null;\n }\n\n /**\n * Type checks that `value` is an array of Date or DateTime\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n * @param locale\n */\n static _typeCheckDateArray(\n optionName: string,\n value,\n providedType: string,\n locale: string = 'default'\n ) {\n if (!Array.isArray(value)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of DateTime or Date'\n );\n }\n for (let i = 0; i < value.length; i++) {\n let d = value[i];\n const dateTime = this.dateConversion(d, optionName);\n if (!dateTime) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n typeof d,\n 'DateTime or Date'\n );\n }\n dateTime.setLocale(locale);\n value[i] = dateTime;\n }\n }\n\n /**\n * Type checks that `value` is an array of numbers\n * @param optionName Provides text to error messages e.g. disabledDates\n * @param value Option value\n * @param providedType Used to provide text to error messages\n */\n static _typeCheckNumberArray(\n optionName: string,\n value,\n providedType: string\n ) {\n if (!Array.isArray(value) || value.find((x) => typeof x !== typeof 0)) {\n Namespace.errorMessages.typeMismatch(\n optionName,\n providedType,\n 'array of numbers'\n );\n }\n return;\n }\n\n /**\n * Attempts to convert `d` to a DateTime object\n * @param d value to convert\n * @param optionName Provides text to error messages e.g. disabledDates\n */\n static dateConversion(d: any, optionName: string): DateTime {\n if (typeof d === typeof '' && optionName !== 'input') {\n Namespace.errorMessages.dateString();\n }\n\n const converted = this._dateTypeCheck(d);\n\n if (!converted) {\n Namespace.errorMessages.failedToParseDate(\n optionName,\n d,\n optionName === 'input'\n );\n }\n return converted;\n }\n\n private static _flatback: string[];\n\n private static getFlattenDefaultOptions(): string[] {\n if (this._flatback) return this._flatback;\n const deepKeys = (t, pre = []) =>\n Array.isArray(t)\n ? []\n : Object(t) === t\n ? Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]))\n : pre.join('.');\n\n this._flatback = deepKeys(DefaultOptions);\n\n return this._flatback;\n }\n\n /**\n * Some options conflict like min/max date. Verify that these kinds of options\n * are set correctly.\n * @param config\n */\n static _validateConflcits(config: Options) {\n if (\n config.display.sideBySide &&\n (!config.display.components.clock ||\n !(\n config.display.components.hours ||\n config.display.components.minutes ||\n config.display.components.seconds\n ))\n ) {\n Namespace.errorMessages.conflictingConfiguration(\n 'Cannot use side by side mode without the clock components'\n );\n }\n\n if (config.restrictions.minDate && config.restrictions.maxDate) {\n if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'minDate is after maxDate'\n );\n }\n\n if (config.restrictions.maxDate.isBefore(config.restrictions.minDate)) {\n Namespace.errorMessages.conflictingConfiguration(\n 'maxDate is before minDate'\n );\n }\n }\n }\n}\n","export declare type Constructable = new (...args: any[]) => T;\r\n\r\nclass ServiceLocator {\r\n private cache: Map, unknown | Symbol> = new Map();\r\n\r\n locate(identifier: Constructable): T {\r\n const service = this.cache.get(identifier);\r\n if (service) return service as T;\r\n const value = new identifier();\r\n this.cache.set(identifier, value);\r\n return value;\r\n }\r\n}\r\nexport const setupServiceLocator = () => {\r\n serviceLocator = new ServiceLocator();\r\n}\r\n\r\nexport let serviceLocator: ServiceLocator;","import { DateTime, getFormatByUnit, Unit } from './datetime';\r\nimport { OptionsStore } from './utilities/options';\r\nimport { serviceLocator } from './utilities/service-locator';\r\n\r\n/**\r\n * Main class for date validation rules based on the options provided.\r\n */\r\nexport default class Validation {\r\n private optionsStore: OptionsStore;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n }\r\n\r\n /**\r\n * Checks to see if the target date is valid based on the rules provided in the options.\r\n * Granularity can be provide to chek portions of the date instead of the whole.\r\n * @param targetDate\r\n * @param granularity\r\n */\r\n isValid(targetDate: DateTime, granularity?: Unit): boolean {\r\n if (\r\n this.optionsStore.options.restrictions.disabledDates.length > 0 &&\r\n this._isInDisabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledDates.length > 0 &&\r\n !this._isInEnabledDates(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n granularity !== Unit.month &&\r\n granularity !== Unit.year &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&\r\n this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(\r\n targetDate.weekDay\r\n ) !== -1\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n this.optionsStore.options.restrictions.minDate &&\r\n targetDate.isBefore(\r\n this.optionsStore.options.restrictions.minDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.maxDate &&\r\n targetDate.isAfter(\r\n this.optionsStore.options.restrictions.maxDate,\r\n granularity\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n granularity === Unit.hours ||\r\n granularity === Unit.minutes ||\r\n granularity === Unit.seconds\r\n ) {\r\n if (\r\n this.optionsStore.options.restrictions.disabledHours.length > 0 &&\r\n this._isInDisabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.enabledHours.length > 0 &&\r\n !this._isInEnabledHours(targetDate)\r\n ) {\r\n return false;\r\n }\r\n if (\r\n this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0\r\n ) {\r\n for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) {\r\n if (\r\n targetDate.isBetween(\r\n disabledTimeIntervals.from,\r\n disabledTimeIntervals.to\r\n )\r\n )\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledDates option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledDates ||\r\n this.optionsStore.options.restrictions.disabledDates.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.disabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledDates option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by date.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledDates(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledDates ||\r\n this.optionsStore.options.restrictions.enabledDates.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.format(getFormatByUnit(Unit.date));\r\n return this.optionsStore.options.restrictions.enabledDates\r\n .map((x) => x.format(getFormatByUnit(Unit.date)))\r\n .find((x) => x === formattedDate);\r\n }\r\n\r\n /**\r\n * Checks to see if the disabledHours option is in use and returns true (meaning invalid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInDisabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.disabledHours ||\r\n this.optionsStore.options.restrictions.disabledHours.length === 0\r\n )\r\n return false;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.disabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n\r\n /**\r\n * Checks to see if the enabledHours option is in use and returns true (meaning valid)\r\n * if the `testDate` is with in the array. Granularity is by hours.\r\n * @param testDate\r\n * @private\r\n */\r\n private _isInEnabledHours(testDate: DateTime) {\r\n if (\r\n !this.optionsStore.options.restrictions.enabledHours ||\r\n this.optionsStore.options.restrictions.enabledHours.length === 0\r\n )\r\n return true;\r\n const formattedDate = testDate.hours;\r\n return this.optionsStore.options.restrictions.enabledHours.find(\r\n (x) => x === formattedDate\r\n );\r\n }\r\n}\r\n","import { Unit } from '../datetime';\nimport ActionTypes from './action-types';\nimport { BaseEvent } from './event-types';\n\nexport type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all';\n\nexport class EventEmitter {\n private subscribers: ((value?: T) => void)[] = [];\n\n subscribe(callback: (value: T) => void) {\n this.subscribers.push(callback);\n return this.unsubscribe.bind(this, this.subscribers.length - 1);\n }\n\n unsubscribe(index: number) {\n this.subscribers.splice(index, 1);\n }\n\n emit(value?: T) {\n this.subscribers.forEach((callback) => {\n callback(value);\n });\n }\n\n destory() {\n this.subscribers = null;\n this.subscribers = [];\n }\n}\n\nexport class EventEmitters {\n triggerEvent = new EventEmitter();\n viewUpdate = new EventEmitter();\n updateDisplay = new EventEmitter();\n action = new EventEmitter<{ e: any; action?: ActionTypes }>();\n\n destory() {\n this.triggerEvent.destory();\n this.viewUpdate.destory();\n this.updateDisplay.destory();\n this.action.destory();\n }\n}\n","import { DateTime, getFormatByUnit, Unit } from './datetime';\nimport Namespace from './utilities/namespace';\nimport { ChangeEvent, FailEvent } from './utilities/event-types';\nimport { OptionConverter, OptionsStore } from './utilities/options';\nimport Validation from './validation';\nimport { serviceLocator } from './utilities/service-locator';\nimport { EventEmitters } from './utilities/event-emitter';\n\nexport default class Dates {\n private _dates: DateTime[] = [];\n private optionsStore: OptionsStore;\n private validation: Validation;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n }\n\n /**\n * Returns the array of selected dates\n */\n get picked(): DateTime[] {\n return this._dates;\n }\n\n /**\n * Returns the last picked value.\n */\n get lastPicked(): DateTime {\n return this._dates[this.lastPickedIndex];\n }\n\n /**\n * Returns the length of picked dates -1 or 0 if none are selected.\n */\n get lastPickedIndex(): number {\n if (this._dates.length === 0) return 0;\n return this._dates.length - 1;\n }\n\n /**\n * Formats a DateTime object to a string. Used when setting the input value.\n * @param date\n */\n formatInput(date: DateTime): string {\n const components = this.optionsStore.options.display.components;\n if (!date) return '';\n return date.format({\n year: components.calendar && components.year ? 'numeric' : undefined,\n month: components.calendar && components.month ? '2-digit' : undefined,\n day: components.calendar && components.date ? '2-digit' : undefined,\n hour:\n components.clock && components.hours\n ? components.useTwentyfourHour\n ? '2-digit'\n : 'numeric'\n : undefined,\n minute: components.clock && components.minutes ? '2-digit' : undefined,\n second: components.clock && components.seconds ? '2-digit' : undefined,\n hour12: !components.useTwentyfourHour,\n });\n }\n\n /**\n * Tries to convert the provided value to a DateTime object.\n * If value is null|undefined then clear the value of the provided index (or 0).\n * @param value Value to convert or null|undefined\n * @param index When using multidates this is the index in the array\n */\n setFromInput(value: any, index?: number) {\n if (!value) {\n this.setValue(undefined, index);\n return;\n }\n const converted = OptionConverter.dateConversion(value, 'input');\n if (converted) {\n converted.setLocale(this.optionsStore.options.localization.locale);\n this.setValue(converted, index);\n }\n }\n\n /**\n * Adds a new DateTime to selected dates array\n * @param date\n */\n add(date: DateTime): void {\n this._dates.push(date);\n }\n\n /**\n * Returns true if the `targetDate` is part of the selected dates array.\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n isPicked(targetDate: DateTime, unit?: Unit): boolean {\n if (!unit) return this._dates.find((x) => x === targetDate) !== undefined;\n\n const format = getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return (\n this._dates\n .map((x) => x.format(format))\n .find((x) => x === innerDateFormatted) !== undefined\n );\n }\n\n /**\n * Returns the index at which `targetDate` is in the array.\n * This is used for updating or removing a date when multi-date is used\n * If `unit` is provided then a granularity to that unit will be used.\n * @param targetDate\n * @param unit\n */\n pickedIndex(targetDate: DateTime, unit?: Unit): number {\n if (!unit) return this._dates.indexOf(targetDate);\n\n const format = getFormatByUnit(unit);\n\n let innerDateFormatted = targetDate.format(format);\n\n return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);\n }\n\n /**\n * Clears all selected dates.\n */\n clear() {\n this.optionsStore.unset = true;\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate: this.lastPicked,\n isClear: true,\n isValid: true,\n } as ChangeEvent);\n this._dates = [];\n }\n\n /**\n * Find the \"book end\" years given a `year` and a `factor`\n * @param factor e.g. 100 for decades\n * @param year e.g. 2021\n */\n static getStartEndYear(\n factor: number,\n year: number\n ): [number, number, number] {\n const step = factor / 10,\n startYear = Math.floor(year / factor) * factor,\n endYear = startYear + step * 9,\n focusValue = Math.floor(year / step) * step;\n return [startYear, endYear, focusValue];\n }\n\n /**\n * Attempts to either clear or set the `target` date at `index`.\n * If the `target` is null then the date will be cleared.\n * If multi-date is being used then it will be removed from the array.\n * If `target` is valid and multi-date is used then if `index` is\n * provided the date at that index will be replaced, otherwise it is appended.\n * @param target\n * @param index\n */\n setValue(target?: DateTime, index?: number): void {\n const noIndex = typeof index === 'undefined',\n isClear = !target && noIndex;\n let oldDate = this.optionsStore.unset ? null : this._dates[index];\n if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {\n oldDate = this.lastPicked;\n }\n\n const updateInput = () => {\n if (!this.optionsStore.input) return;\n\n let newValue = this.formatInput(target);\n if (this.optionsStore.options.multipleDates) {\n newValue = this._dates\n .map((d) => this.formatInput(d))\n .join(this.optionsStore.options.multipleDatesSeparator);\n }\n if (this.optionsStore.input.value != newValue)\n this.optionsStore.input.value = newValue;\n };\n\n if (target && oldDate?.isSame(target)) {\n updateInput();\n return;\n }\n\n // case of calling setValue(null)\n if (!target) {\n if (\n !this.optionsStore.options.multipleDates ||\n this._dates.length === 1 ||\n isClear\n ) {\n this.optionsStore.unset = true;\n this._dates = [];\n } else {\n this._dates.splice(index, 1);\n }\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: undefined,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n\n updateInput();\n this._eventEmitters.updateDisplay.emit('all');\n return;\n }\n\n index = index || 0;\n target = target.clone;\n\n // minute stepping is being used, force the minute to the closest value\n if (this.optionsStore.options.stepping !== 1) {\n target.minutes =\n Math.round(target.minutes / this.optionsStore.options.stepping) *\n this.optionsStore.options.stepping;\n target.seconds = 0;\n }\n\n if (this.validation.isValid(target)) {\n this._dates[index] = target;\n this.optionsStore.viewDate = target.clone;\n\n updateInput();\n\n this.optionsStore.unset = false;\n this._eventEmitters.updateDisplay.emit('all');\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: true,\n } as ChangeEvent);\n return;\n }\n\n if (this.optionsStore.options.keepInvalid) {\n this._dates[index] = target;\n this.optionsStore.viewDate = target.clone;\n\n updateInput();\n\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.change,\n date: target,\n oldDate,\n isClear,\n isValid: false,\n } as ChangeEvent);\n }\n this._eventEmitters.triggerEvent.emit({\n type: Namespace.events.error,\n reason: Namespace.errorMessages.failedToSetInvalidDate,\n date: target,\n oldDate,\n } as FailEvent);\n }\n}\n","enum ActionTypes {\n next = 'next',\n previous = 'previous',\n changeCalendarView = 'changeCalendarView',\n selectMonth = 'selectMonth',\n selectYear = 'selectYear',\n selectDecade = 'selectDecade',\n selectDay = 'selectDay',\n selectHour = 'selectHour',\n selectMinute = 'selectMinute',\n selectSecond = 'selectSecond',\n incrementHours = 'incrementHours',\n incrementMinutes = 'incrementMinutes',\n incrementSeconds = 'incrementSeconds',\n decrementHours = 'decrementHours',\n decrementMinutes = 'decrementMinutes',\n decrementSeconds = 'decrementSeconds',\n toggleMeridiem = 'toggleMeridiem',\n togglePicker = 'togglePicker',\n showClock = 'showClock',\n showHours = 'showHours',\n showMinutes = 'showMinutes',\n showSeconds = 'showSeconds',\n clear = 'clear',\n close = 'close',\n today = 'today',\n}\n\nexport default ActionTypes;\n","import { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `date`\n */\nexport default class DateDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.daysContainer);\n\n container.append(...this._daysOfTheWeek());\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight);\n container.appendChild(div);\n }\n\n for (let i = 0; i < 42; i++) {\n if (i !== 0 && i % 7 === 0) {\n if (this.optionsStore.options.display.calendarWeeks) {\n const div = document.createElement('div');\n div.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n container.appendChild(div);\n }\n }\n\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDay);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.daysContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.daysContainer,\n this.optionsStore.viewDate.format(\n this.optionsStore.options.localization.dayViewHeaderFormat\n )\n );\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.month),\n Unit.month\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.month),\n Unit.month\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.month)\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .manipulate(12, Unit.hours);\n\n container\n .querySelectorAll(\n `[data-action=\"${ActionTypes.selectDay}\"], .${Namespace.css.calendarWeeks}`\n )\n .forEach((containerClone: HTMLElement) => {\n if (\n this.optionsStore.options.display.calendarWeeks &&\n containerClone.classList.contains(Namespace.css.calendarWeeks)\n ) {\n if (containerClone.innerText === '#') return;\n containerClone.innerText = `${innerDate.week}`;\n return;\n }\n\n let classes: string[] = [];\n classes.push(Namespace.css.day);\n\n if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.old);\n }\n if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) {\n classes.push(Namespace.css.new);\n }\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.date)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.date)) {\n classes.push(Namespace.css.disabled);\n }\n if (innerDate.isSame(new DateTime(), Unit.date)) {\n classes.push(Namespace.css.today);\n }\n if (innerDate.weekDay === 0 || innerDate.weekDay === 6) {\n classes.push(Namespace.css.weekend);\n }\n\n paint(Unit.date, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.year}-${innerDate.monthFormatted}-${innerDate.dateFormatted}`\n );\n containerClone.setAttribute('data-day', `${innerDate.date}`);\n containerClone.innerText = innerDate.format({ day: 'numeric' });\n innerDate.manipulate(1, Unit.date);\n });\n }\n\n /***\n * Generates an html row that contains the days of the week.\n * @private\n */\n private _daysOfTheWeek(): HTMLElement[] {\n let innerDate = this.optionsStore.viewDate.clone\n .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)\n .startOf(Unit.date);\n const row = [];\n document.createElement('div');\n\n if (this.optionsStore.options.display.calendarWeeks) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.calendarWeeks,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = '#';\n row.push(htmlDivElement);\n }\n\n for (let i = 0; i < 7; i++) {\n const htmlDivElement = document.createElement('div');\n htmlDivElement.classList.add(\n Namespace.css.dayOfTheWeek,\n Namespace.css.noHighlight\n );\n htmlDivElement.innerText = innerDate.format({ weekday: 'short' });\n innerDate.manipulate(1, Unit.date);\n row.push(htmlDivElement);\n }\n\n return row;\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `month`\n */\nexport default class MonthDisplay {\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.monthsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMonth);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.monthsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.monthsContainer,\n this.optionsStore.viewDate.format({ year: 'numeric' })\n );\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.year),\n Unit.year\n )\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n\n this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.year),\n Unit.year\n )\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMonth}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n let classes = [];\n classes.push(Namespace.css.month);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.month)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.month)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.month, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${index}`);\n containerClone.innerText = `${innerDate.format({ month: 'short' })}`;\n innerDate.manipulate(1, Unit.month);\n });\n }\n}\n","import { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport Dates from '../../dates';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `year`\n */\nexport default class YearDisplay {\n private _startYear: DateTime;\n private _endYear: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.yearsContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectYear);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year);\n this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year);\n\n const container = widget.getElementsByClassName(\n Namespace.css.yearsContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.yearsContainer,\n `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({ year: 'numeric' })}`\n );\n\n this.validation.isValid(this._startYear, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endYear, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n let innerDate = this.optionsStore.viewDate.clone\n .startOf(Unit.year)\n .manipulate(-1, Unit.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectYear}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.year);\n\n if (\n !this.optionsStore.unset &&\n this.dates.isPicked(innerDate, Unit.year)\n ) {\n classes.push(Namespace.css.active);\n }\n if (!this.validation.isValid(innerDate, Unit.year)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.year, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.year}`);\n containerClone.innerText = innerDate.format({ year: \"numeric\" });\n\n innerDate.manipulate(1, Unit.year);\n });\n }\n}\n","import Dates from '../../dates';\nimport { DateTime, Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { Paint } from '../index';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class DecadeDisplay {\n private _startDecade: DateTime;\n private _endDecade: DateTime;\n private optionsStore: OptionsStore;\n private dates: Dates;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the display\n * @private\n */\n getPicker() {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.decadesContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectDecade);\n container.appendChild(div);\n }\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint) {\n const [start, end] = Dates.getStartEndYear(\n 100,\n this.optionsStore.viewDate.year\n );\n this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._startDecade.year = start;\n this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year);\n this._endDecade.year = end;\n\n const container = widget.getElementsByClassName(\n Namespace.css.decadesContainer\n )[0];\n const [previous, switcher, next] = container.parentElement\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\n .getElementsByTagName('div');\n\n switcher.setAttribute(\n Namespace.css.decadesContainer,\n `${this._startDecade.format({ year: 'numeric' })}-${this._endDecade.format({ year: 'numeric' })}`\n );\n\n this.validation.isValid(this._startDecade, Unit.year)\n ? previous.classList.remove(Namespace.css.disabled)\n : previous.classList.add(Namespace.css.disabled);\n this.validation.isValid(this._endDecade, Unit.year)\n ? next.classList.remove(Namespace.css.disabled)\n : next.classList.add(Namespace.css.disabled);\n\n const pickedYears = this.dates.picked.map((x) => x.year);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectDecade}\"]`)\n .forEach((containerClone: HTMLElement, index) => {\n if (index === 0) {\n containerClone.classList.add(Namespace.css.old);\n if (this._startDecade.year - 10 < 0) {\n containerClone.textContent = ' ';\n previous.classList.add(Namespace.css.disabled);\n containerClone.classList.add(Namespace.css.disabled);\n containerClone.setAttribute('data-value', ``);\n return;\n } else {\n containerClone.innerText = this._startDecade.clone.manipulate(-10, Unit.year).format({ year: 'numeric' });\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year}`\n );\n return;\n }\n }\n\n let classes = [];\n classes.push(Namespace.css.decade);\n const startDecadeYear = this._startDecade.year;\n const endDecadeYear = this._startDecade.year + 9;\n\n if (\n !this.optionsStore.unset &&\n pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear)\n .length > 0\n ) {\n classes.push(Namespace.css.active);\n }\n\n paint('decade', this._startDecade, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${this._startDecade.year}`\n );\n containerClone.innerText = `${this._startDecade.format({ year: 'numeric' })}`;\n\n this._startDecade.manipulate(10, Unit.year);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport Dates from '../../dates';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates the clock display\n */\nexport default class TimeDisplay {\n private _gridColumns = '';\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n }\n\n /**\n * Build the container html for the clock display\n * @private\n */\n getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.clockContainer);\n\n container.append(...this._grid(iconTag));\n\n return container;\n }\n\n /**\n * Populates the various elements with in the clock display\n * like the current hour and if the manipulation icons are enabled.\n * @private\n */\n _update(widget: HTMLElement): void {\n const timesDiv = (\n widget.getElementsByClassName(\n Namespace.css.clockContainer\n )[0]\n );\n const lastPicked = (\n this.dates.lastPicked || this.optionsStore.viewDate\n ).clone;\n\n timesDiv\n .querySelectorAll('.disabled')\n .forEach((element) => element.classList.remove(Namespace.css.disabled));\n\n if (this.optionsStore.options.display.components.hours) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),\n Unit.hours\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementHours}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.hours}]`\n ).innerText = this.optionsStore.options.display.components.useTwentyfourHour\n ? lastPicked.hoursFormatted\n : lastPicked.twelveHoursFormatted;\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),\n Unit.minutes\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.minutes}]`\n ).innerText = lastPicked.minutesFormatted;\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.incrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n\n if (\n !this.validation.isValid(\n this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),\n Unit.seconds\n )\n ) {\n timesDiv\n .querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)\n .classList.add(Namespace.css.disabled);\n }\n timesDiv.querySelector(\n `[data-time-component=${Unit.seconds}]`\n ).innerText = lastPicked.secondsFormatted;\n }\n\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\n const toggle = timesDiv.querySelector(\n `[data-action=${ActionTypes.toggleMeridiem}]`\n );\n\n toggle.innerText = lastPicked.meridiem();\n\n if (\n !this.validation.isValid(\n lastPicked.clone.manipulate(\n lastPicked.hours >= 12 ? -12 : 12,\n Unit.hours\n )\n )\n ) {\n toggle.classList.add(Namespace.css.disabled);\n } else {\n toggle.classList.remove(Namespace.css.disabled);\n }\n }\n\n timesDiv.style.gridTemplateAreas = `\"${this._gridColumns}\"`;\n }\n\n /**\n * Creates the table for the clock display depending on what options are selected.\n * @private\n */\n private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {\n this._gridColumns = '';\n const top = [],\n middle = [],\n bottom = [],\n separator = document.createElement('div'),\n upIcon = iconTag(\n this.optionsStore.options.display.icons.up\n ),\n downIcon = iconTag(\n this.optionsStore.options.display.icons.down\n );\n\n separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight);\n const separatorColon = separator.cloneNode(true);\n separatorColon.innerHTML = ':';\n\n const getSeparator = (colon = false): HTMLElement => {\n return colon\n ? separatorColon.cloneNode(true)\n : separator.cloneNode(true);\n };\n\n if (this.optionsStore.options.display.components.hours) {\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.incrementHours);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickHour\n );\n divElement.setAttribute('data-action', ActionTypes.showHours);\n divElement.setAttribute('data-time-component', Unit.hours);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementHour\n );\n divElement.setAttribute('data-action', ActionTypes.decrementHours);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n this._gridColumns += 'a';\n }\n\n if (this.optionsStore.options.display.components.minutes) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.hours) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.incrementMinutes);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickMinute\n );\n divElement.setAttribute('data-action', ActionTypes.showMinutes);\n divElement.setAttribute('data-time-component', Unit.minutes);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementMinute\n );\n divElement.setAttribute('data-action', ActionTypes.decrementMinutes);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (this.optionsStore.options.display.components.seconds) {\n this._gridColumns += ' a';\n if (this.optionsStore.options.display.components.minutes) {\n top.push(getSeparator());\n middle.push(getSeparator(true));\n bottom.push(getSeparator());\n this._gridColumns += ' a';\n }\n let divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.incrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.incrementSeconds);\n divElement.appendChild(upIcon.cloneNode(true));\n top.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.pickSecond\n );\n divElement.setAttribute('data-action', ActionTypes.showSeconds);\n divElement.setAttribute('data-time-component', Unit.seconds);\n middle.push(divElement);\n\n divElement = document.createElement('div');\n divElement.setAttribute(\n 'title',\n this.optionsStore.options.localization.decrementSecond\n );\n divElement.setAttribute('data-action', ActionTypes.decrementSeconds);\n divElement.appendChild(downIcon.cloneNode(true));\n bottom.push(divElement);\n }\n\n if (!this.optionsStore.options.display.components.useTwentyfourHour) {\n this._gridColumns += ' a';\n let divElement = getSeparator();\n top.push(divElement);\n\n let button = document.createElement('button');\n button.setAttribute(\n 'title',\n this.optionsStore.options.localization.toggleMeridiem\n );\n button.setAttribute('data-action', ActionTypes.toggleMeridiem);\n button.setAttribute('tabindex', '-1');\n if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function?\n button.classList.add(...Namespace.css.toggleMeridiem.split(','));\n }\n else button.classList.add(Namespace.css.toggleMeridiem);\n\n divElement = document.createElement('div');\n divElement.classList.add(Namespace.css.noHighlight);\n divElement.appendChild(button);\n middle.push(divElement);\n\n divElement = getSeparator();\n bottom.push(divElement);\n }\n\n this._gridColumns = this._gridColumns.trim();\n\n return [...top, ...middle, ...bottom];\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `hours`\n */\nexport default class HourDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.hourContainer);\n\n for (\n let i = 0;\n i <\n (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12);\n i++\n ) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectHour);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.hourContainer\n )[0];\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectHour}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.hour);\n\n if (!this.validation.isValid(innerDate, Unit.hours)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.hours, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.hours}`);\n containerClone.innerText = this.optionsStore.options.display.components\n .useTwentyfourHour\n ? innerDate.hoursFormatted\n : innerDate.twelveHoursFormatted;\n innerDate.manipulate(1, Unit.hours);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `minutes`\n */\nexport default class MinuteDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.minuteContainer);\n\n let step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n for (let i = 0; i < 60 / step; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectMinute);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.minuteContainer\n )[0];\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);\n let step =\n this.optionsStore.options.stepping === 1\n ? 5\n : this.optionsStore.options.stepping;\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectMinute}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.minute);\n\n if (!this.validation.isValid(innerDate, Unit.minutes)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.minutes, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute(\n 'data-value',\n `${innerDate.minutesFormatted}`\n );\n containerClone.innerText = innerDate.minutesFormatted;\n innerDate.manipulate(step, Unit.minutes);\n });\n }\n}\n","import { Unit } from '../../datetime';\nimport Namespace from '../../utilities/namespace';\nimport { OptionsStore } from '../../utilities/options';\nimport Validation from '../../validation';\nimport { serviceLocator } from '../../utilities/service-locator';\nimport { Paint } from '../index';\nimport ActionTypes from '../../utilities/action-types';\n\n/**\n * Creates and updates the grid for `seconds`\n */\nexport default class secondDisplay {\n private optionsStore: OptionsStore;\n private validation: Validation;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.validation = serviceLocator.locate(Validation);\n }\n /**\n * Build the container html for the display\n * @private\n */\n getPicker(): HTMLElement {\n const container = document.createElement('div');\n container.classList.add(Namespace.css.secondContainer);\n\n for (let i = 0; i < 12; i++) {\n const div = document.createElement('div');\n div.setAttribute('data-action', ActionTypes.selectSecond);\n container.appendChild(div);\n }\n\n return container;\n }\n\n /**\n * Populates the grid and updates enabled states\n * @private\n */\n _update(widget: HTMLElement, paint: Paint): void {\n const container = widget.getElementsByClassName(\n Namespace.css.secondContainer\n )[0];\n let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);\n\n container\n .querySelectorAll(`[data-action=\"${ActionTypes.selectSecond}\"]`)\n .forEach((containerClone: HTMLElement) => {\n let classes = [];\n classes.push(Namespace.css.second);\n\n if (!this.validation.isValid(innerDate, Unit.seconds)) {\n classes.push(Namespace.css.disabled);\n }\n\n paint(Unit.seconds, innerDate, classes, containerClone);\n\n containerClone.classList.remove(...containerClone.classList);\n containerClone.classList.add(...classes);\n containerClone.setAttribute('data-value', `${innerDate.seconds}`);\n containerClone.innerText = innerDate.secondsFormatted;\n innerDate.manipulate(5, Unit.seconds);\n });\n }\n}\n","import Namespace from '../utilities/namespace';\r\n\r\n/**\r\n * Provides a collapse functionality to the view changes\r\n */\r\nexport default class Collapse {\r\n /**\r\n * Flips the show/hide state of `target`\r\n * @param target html element to affect.\r\n */\r\n static toggle(target: HTMLElement) {\r\n if (target.classList.contains(Namespace.css.show)) {\r\n this.hide(target);\r\n } else {\r\n this.show(target);\r\n }\r\n }\r\n\r\n /**\r\n * If `target` is not already showing, then show after the animation.\r\n * @param target\r\n */\r\n static show(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.css.collapsing) ||\r\n target.classList.contains(Namespace.css.show)\r\n )\r\n return;\r\n\r\n let timeOut = null;\r\n const complete = () => {\r\n target.classList.remove(Namespace.css.collapsing);\r\n target.classList.add(Namespace.css.collapse, Namespace.css.show);\r\n target.style.height = '';\r\n timeOut = null;\r\n };\r\n\r\n target.style.height = '0';\r\n target.classList.remove(Namespace.css.collapse);\r\n target.classList.add(Namespace.css.collapsing);\r\n\r\n timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n target.style.height = `${target.scrollHeight}px`;\r\n }\r\n\r\n /**\r\n * If `target` is not already hidden, then hide after the animation.\r\n * @param target HTML Element\r\n */\r\n static hide(target: HTMLElement) {\r\n if (\r\n target.classList.contains(Namespace.css.collapsing) ||\r\n !target.classList.contains(Namespace.css.show)\r\n )\r\n return;\r\n\r\n let timeOut = null;\r\n const complete = () => {\r\n target.classList.remove(Namespace.css.collapsing);\r\n target.classList.add(Namespace.css.collapse);\r\n timeOut = null;\r\n };\r\n\r\n target.style.height = `${target.getBoundingClientRect()['height']}px`;\r\n\r\n const reflow = (element) => element.offsetHeight;\r\n\r\n reflow(target);\r\n\r\n target.classList.remove(Namespace.css.collapse, Namespace.css.show);\r\n target.classList.add(Namespace.css.collapsing);\r\n target.style.height = '';\r\n\r\n timeOut = setTimeout(\r\n complete,\r\n this.getTransitionDurationFromElement(target)\r\n );\r\n }\r\n\r\n /**\r\n * Gets the transition duration from the `element` by getting css properties\r\n * `transition-duration` and `transition-delay`\r\n * @param element HTML Element\r\n */\r\n private static getTransitionDurationFromElement = (element: HTMLElement) => {\r\n if (!element) {\r\n return 0;\r\n }\r\n\r\n // Get transition-duration of the element\r\n let { transitionDuration, transitionDelay } =\r\n window.getComputedStyle(element);\r\n\r\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\r\n const floatTransitionDelay = Number.parseFloat(transitionDelay);\r\n\r\n // Return 0 if element or transition duration is not found\r\n if (!floatTransitionDuration && !floatTransitionDelay) {\r\n return 0;\r\n }\r\n\r\n // If multiple durations are defined, take the first\r\n transitionDuration = transitionDuration.split(',')[0];\r\n transitionDelay = transitionDelay.split(',')[0];\r\n\r\n return (\r\n (Number.parseFloat(transitionDuration) +\r\n Number.parseFloat(transitionDelay)) *\r\n 1000\r\n );\r\n };\r\n}\r\n","import DateDisplay from './calendar/date-display';\r\nimport MonthDisplay from './calendar/month-display';\r\nimport YearDisplay from './calendar/year-display';\r\nimport DecadeDisplay from './calendar/decade-display';\r\nimport TimeDisplay from './time/time-display';\r\nimport HourDisplay from './time/hour-display';\r\nimport MinuteDisplay from './time/minute-display';\r\nimport SecondDisplay from './time/second-display';\r\nimport { DateTime, Unit } from '../datetime';\r\nimport { createPopper } from '@popperjs/core';\r\nimport Namespace from '../utilities/namespace';\r\nimport { HideEvent } from '../utilities/event-types';\r\nimport Collapse from './collapse';\r\nimport { OptionsStore } from '../utilities/options';\r\nimport Validation from '../validation';\r\nimport Dates from '../dates';\r\nimport { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter';\r\nimport { serviceLocator } from '../utilities/service-locator';\r\nimport ActionTypes from '../utilities/action-types';\r\nimport CalendarModes from '../utilities/calendar-modes';\r\n\r\n/**\r\n * Main class for all things display related.\r\n */\r\nexport default class Display {\r\n private _widget: HTMLElement;\r\n private _popperInstance: any;\r\n private _isVisible = false;\r\n private optionsStore: OptionsStore;\r\n private validation: Validation;\r\n private dates: Dates;\r\n\r\n dateDisplay: DateDisplay;\r\n monthDisplay: MonthDisplay;\r\n yearDisplay: YearDisplay;\r\n decadeDisplay: DecadeDisplay;\r\n timeDisplay: TimeDisplay;\r\n hourDisplay: HourDisplay;\r\n minuteDisplay: MinuteDisplay;\r\n secondDisplay: SecondDisplay;\r\n private _eventEmitters: EventEmitters;\r\n\r\n constructor() {\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.validation = serviceLocator.locate(Validation);\r\n this.dates = serviceLocator.locate(Dates);\r\n\r\n this.dateDisplay = serviceLocator.locate(DateDisplay);\r\n this.monthDisplay = serviceLocator.locate(MonthDisplay);\r\n this.yearDisplay = serviceLocator.locate(YearDisplay);\r\n this.decadeDisplay = serviceLocator.locate(DecadeDisplay);\r\n this.timeDisplay = serviceLocator.locate(TimeDisplay);\r\n this.hourDisplay = serviceLocator.locate(HourDisplay);\r\n this.minuteDisplay = serviceLocator.locate(MinuteDisplay);\r\n this.secondDisplay = serviceLocator.locate(SecondDisplay);\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this._widget = undefined;\r\n\r\n this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => {\r\n this._update(result);\r\n });\r\n }\r\n\r\n /**\r\n * Returns the widget body or undefined\r\n * @private\r\n */\r\n get widget(): HTMLElement | undefined {\r\n return this._widget;\r\n }\r\n\r\n /**\r\n * Returns this visible state of the picker (shown)\r\n */\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n\r\n /**\r\n * Updates the table for a particular unit. Used when an option as changed or\r\n * whenever the class list might need to be refreshed.\r\n * @param unit\r\n * @private\r\n */\r\n _update(unit: ViewUpdateValues): void {\r\n if (!this.widget) return;\r\n //todo do I want some kind of error catching or other guards here?\r\n switch (unit) {\r\n case Unit.seconds:\r\n this.secondDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.minutes:\r\n this.minuteDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.hours:\r\n this.hourDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.date:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.month:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Unit.year:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case 'clock':\r\n if (!this._hasTime) break;\r\n this.timeDisplay._update(this.widget);\r\n this._update(Unit.hours);\r\n this._update(Unit.minutes);\r\n this._update(Unit.seconds);\r\n break;\r\n case 'calendar':\r\n this._update(Unit.date);\r\n this._update(Unit.year);\r\n this._update(Unit.month);\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n this._updateCalendarHeader();\r\n break;\r\n case 'all':\r\n if (this._hasTime) {\r\n this._update('clock');\r\n }\r\n if (this._hasDate) {\r\n this._update('calendar');\r\n }\r\n }\r\n }\r\n\r\n // noinspection JSUnusedLocalSymbols\r\n /**\r\n * Allows developers to add/remove classes from an element.\r\n * @param _unit\r\n * @param _date\r\n * @param _classes\r\n * @param _element\r\n */\r\n paint(_unit: Unit | 'decade', _date: DateTime, _classes: string[], _element: HTMLElement) {\r\n // implemented in plugin\r\n }\r\n\r\n /**\r\n * Shows the picker and creates a Popper instance if needed.\r\n * Add document click event to hide when clicking outside the picker.\r\n * @fires Events#show\r\n */\r\n show(): void {\r\n if (this.widget == undefined) {\r\n if (this.dates.picked.length == 0) {\r\n if (\r\n this.optionsStore.options.useCurrent &&\r\n !this.optionsStore.options.defaultDate\r\n ) {\r\n const date = new DateTime().setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n if (!this.optionsStore.options.keepInvalid) {\r\n let tries = 0;\r\n let direction = 1;\r\n if (this.optionsStore.options.restrictions.maxDate?.isBefore(date)) {\r\n direction = -1;\r\n }\r\n while (!this.validation.isValid(date)) {\r\n date.manipulate(direction, Unit.date);\r\n if (tries > 31) break;\r\n tries++;\r\n }\r\n }\r\n this.dates.setValue(date);\r\n }\r\n \r\n if (this.optionsStore.options.defaultDate) {\r\n this.dates.setValue(this.optionsStore.options.defaultDate);\r\n }\r\n }\r\n\r\n this._buildWidget();\r\n\r\n // If modeView is only clock\r\n const onlyClock = this._hasTime && !this._hasDate;\r\n\r\n // reset the view to the clock if there's no date components\r\n if (onlyClock) {\r\n this.optionsStore.currentView = 'clock';\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n // otherwise return to the calendar view\r\n if (!this.optionsStore.currentCalendarViewMode) {\r\n this.optionsStore.currentCalendarViewMode =\r\n this.optionsStore.minimumCalendarViewMode;\r\n }\r\n\r\n if (!onlyClock) {\r\n if (this._hasTime) {\r\n Collapse.hide(\r\n this.widget.querySelector(`div.${Namespace.css.timeContainer}`)\r\n );\r\n }\r\n Collapse.show(\r\n this.widget.querySelector(`div.${Namespace.css.dateContainer}`)\r\n );\r\n }\r\n\r\n if (this._hasDate) {\r\n this._showMode();\r\n }\r\n\r\n if (!this.optionsStore.options.display.inline) {\r\n // If needed to change the parent container\r\n const container = this.optionsStore.options?.container || document.body;\r\n container.appendChild(this.widget);\r\n\r\n this._popperInstance = createPopper(\r\n this.optionsStore.element,\r\n this.widget,\r\n {\r\n modifiers: [{ name: 'eventListeners', enabled: true }],\r\n //#2400\r\n placement:\r\n document.documentElement.dir === 'rtl'\r\n ? 'bottom-end'\r\n : 'bottom-start',\r\n }\r\n );\r\n } else {\r\n this.optionsStore.element.appendChild(this.widget);\r\n }\r\n\r\n if (this.optionsStore.options.display.viewMode == 'clock') {\r\n this._eventEmitters.action.emit({\r\n e: null,\r\n action: ActionTypes.showClock,\r\n });\r\n }\r\n\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.addEventListener('click', this._actionsClickEvent)\r\n );\r\n\r\n // show the clock when using sideBySide\r\n if (this._hasTime && this.optionsStore.options.display.sideBySide) {\r\n this.timeDisplay._update(this.widget);\r\n (\r\n this.widget.getElementsByClassName(\r\n Namespace.css.clockContainer\r\n )[0] as HTMLElement\r\n ).style.display = 'grid';\r\n }\r\n }\r\n\r\n this.widget.classList.add(Namespace.css.show);\r\n if (!this.optionsStore.options.display.inline) {\r\n this._popperInstance.update();\r\n document.addEventListener('click', this._documentClickEvent);\r\n }\r\n this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });\r\n this._isVisible = true;\r\n }\r\n\r\n /**\r\n * Changes the calendar view mode. E.g. month <-> year\r\n * @param direction -/+ number to move currentViewMode\r\n * @private\r\n */\r\n _showMode(direction?: number): void {\r\n if (!this.widget) {\r\n return;\r\n }\r\n if (direction) {\r\n const max = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n Math.min(3, this.optionsStore.currentCalendarViewMode + direction)\r\n );\r\n if (this.optionsStore.currentCalendarViewMode == max) return;\r\n this.optionsStore.currentCalendarViewMode = max;\r\n }\r\n\r\n this.widget\r\n .querySelectorAll(\r\n `.${Namespace.css.dateContainer} > div:not(.${Namespace.css.calendarHeader}), .${Namespace.css.timeContainer} > div:not(.${Namespace.css.clockContainer})`\r\n )\r\n .forEach((e: HTMLElement) => (e.style.display = 'none'));\r\n\r\n const datePickerMode =\r\n CalendarModes[this.optionsStore.currentCalendarViewMode];\r\n let picker: HTMLElement = this.widget.querySelector(\r\n `.${datePickerMode.className}`\r\n );\r\n\r\n switch (datePickerMode.className) {\r\n case Namespace.css.decadesContainer:\r\n this.decadeDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.yearsContainer:\r\n this.yearDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.monthsContainer:\r\n this.monthDisplay._update(this.widget, this.paint);\r\n break;\r\n case Namespace.css.daysContainer:\r\n this.dateDisplay._update(this.widget, this.paint);\r\n break;\r\n }\r\n\r\n picker.style.display = 'grid';\r\n this._updateCalendarHeader();\r\n this._eventEmitters.viewUpdate.emit();\r\n }\r\n\r\n _updateCalendarHeader() {\r\n const showing = [\r\n ...this.widget.querySelector(\r\n `.${Namespace.css.dateContainer} div[style*=\"display: grid\"]`\r\n ).classList,\r\n ].find((x) => x.startsWith(Namespace.css.dateContainer));\r\n\r\n const [previous, switcher, next] = this.widget\r\n .getElementsByClassName(Namespace.css.calendarHeader)[0]\r\n .getElementsByTagName('div');\r\n\r\n switch (showing) {\r\n case Namespace.css.decadesContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousCentury\r\n );\r\n switcher.setAttribute('title', '');\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextCentury\r\n );\r\n break;\r\n case Namespace.css.yearsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousDecade\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectDecade\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextDecade\r\n );\r\n break;\r\n case Namespace.css.monthsContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousYear\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectYear\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextYear\r\n );\r\n break;\r\n case Namespace.css.daysContainer:\r\n previous.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.previousMonth\r\n );\r\n switcher.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.selectMonth\r\n );\r\n next.setAttribute(\r\n 'title',\r\n this.optionsStore.options.localization.nextMonth\r\n );\r\n switcher.innerText = this.optionsStore.viewDate.format(\r\n this.optionsStore.options.localization.dayViewHeaderFormat\r\n );\r\n break;\r\n }\r\n switcher.innerText = switcher.getAttribute(showing);\r\n }\r\n\r\n /**\r\n * Hides the picker if needed.\r\n * Remove document click event to hide when clicking outside the picker.\r\n * @fires Events#hide\r\n */\r\n hide(): void {\r\n if (!this.widget || !this._isVisible) return;\r\n\r\n this.widget.classList.remove(Namespace.css.show);\r\n\r\n if (this._isVisible) {\r\n this._eventEmitters.triggerEvent.emit({\r\n type: Namespace.events.hide,\r\n date: this.optionsStore.unset\r\n ? null\r\n : this.dates.lastPicked\r\n ? this.dates.lastPicked.clone\r\n : void 0,\r\n } as HideEvent);\r\n this._isVisible = false;\r\n }\r\n\r\n document.removeEventListener('click', this._documentClickEvent);\r\n }\r\n\r\n /**\r\n * Toggles the picker's open state. Fires a show/hide event depending.\r\n */\r\n toggle() {\r\n return this._isVisible ? this.hide() : this.show();\r\n }\r\n\r\n /**\r\n * Removes document and data-action click listener and reset the widget\r\n * @private\r\n */\r\n _dispose() {\r\n document.removeEventListener('click', this._documentClickEvent);\r\n if (!this.widget) return;\r\n this.widget\r\n .querySelectorAll('[data-action]')\r\n .forEach((element) =>\r\n element.removeEventListener('click', this._actionsClickEvent)\r\n );\r\n this.widget.parentNode.removeChild(this.widget);\r\n this._widget = undefined;\r\n }\r\n\r\n /**\r\n * Builds the widgets html template.\r\n * @private\r\n */\r\n private _buildWidget(): HTMLElement {\r\n const template = document.createElement('div');\r\n template.classList.add(Namespace.css.widget);\r\n\r\n const dateView = document.createElement('div');\r\n dateView.classList.add(Namespace.css.dateContainer);\r\n dateView.append(\r\n this.getHeadTemplate(),\r\n this.decadeDisplay.getPicker(),\r\n this.yearDisplay.getPicker(),\r\n this.monthDisplay.getPicker(),\r\n this.dateDisplay.getPicker()\r\n );\r\n\r\n const timeView = document.createElement('div');\r\n timeView.classList.add(Namespace.css.timeContainer);\r\n timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this)));\r\n timeView.appendChild(this.hourDisplay.getPicker());\r\n timeView.appendChild(this.minuteDisplay.getPicker());\r\n timeView.appendChild(this.secondDisplay.getPicker());\r\n\r\n const toolbar = document.createElement('div');\r\n toolbar.classList.add(Namespace.css.toolbar);\r\n toolbar.append(...this.getToolbarElements());\r\n\r\n if (this.optionsStore.options.display.inline) {\r\n template.classList.add(Namespace.css.inline);\r\n }\r\n\r\n if (this.optionsStore.options.display.calendarWeeks) {\r\n template.classList.add('calendarWeeks');\r\n }\r\n\r\n if (\r\n this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n template.classList.add(Namespace.css.sideBySide);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n const row = document.createElement('div');\r\n row.classList.add('td-row');\r\n dateView.classList.add('td-half');\r\n timeView.classList.add('td-half');\r\n\r\n row.appendChild(dateView);\r\n row.appendChild(timeView);\r\n template.appendChild(row);\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n this._widget = template;\r\n return;\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'top') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n if (this._hasDate) {\r\n if (this._hasTime) {\r\n dateView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode !== 'clock')\r\n dateView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(dateView);\r\n }\r\n\r\n if (this._hasTime) {\r\n if (this._hasDate) {\r\n timeView.classList.add(Namespace.css.collapse);\r\n if (this.optionsStore.options.display.viewMode === 'clock')\r\n timeView.classList.add(Namespace.css.show);\r\n }\r\n template.appendChild(timeView);\r\n }\r\n\r\n if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {\r\n template.appendChild(toolbar);\r\n }\r\n\r\n const arrow = document.createElement('div');\r\n arrow.classList.add('arrow');\r\n arrow.setAttribute('data-popper-arrow', '');\r\n template.appendChild(arrow);\r\n\r\n this._widget = template;\r\n }\r\n\r\n /**\r\n * Returns true if the hours, minutes, or seconds component is turned on\r\n */\r\n get _hasTime(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.clock &&\r\n (this.optionsStore.options.display.components.hours ||\r\n this.optionsStore.options.display.components.minutes ||\r\n this.optionsStore.options.display.components.seconds)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the year, month, or date component is turned on\r\n */\r\n get _hasDate(): boolean {\r\n return (\r\n this.optionsStore.options.display.components.calendar &&\r\n (this.optionsStore.options.display.components.year ||\r\n this.optionsStore.options.display.components.month ||\r\n this.optionsStore.options.display.components.date)\r\n );\r\n }\r\n\r\n /**\r\n * Get the toolbar html based on options like buttons.today\r\n * @private\r\n */\r\n getToolbarElements(): HTMLElement[] {\r\n const toolbar = [];\r\n\r\n if (this.optionsStore.options.display.buttons.today) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.today);\r\n div.setAttribute('title', this.optionsStore.options.localization.today);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.today)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (\r\n !this.optionsStore.options.display.sideBySide &&\r\n this._hasDate &&\r\n this._hasTime\r\n ) {\r\n let title, icon;\r\n if (this.optionsStore.options.display.viewMode === 'clock') {\r\n title = this.optionsStore.options.localization.selectDate;\r\n icon = this.optionsStore.options.display.icons.date;\r\n } else {\r\n title = this.optionsStore.options.localization.selectTime;\r\n icon = this.optionsStore.options.display.icons.time;\r\n }\r\n\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.togglePicker);\r\n div.setAttribute('title', title);\r\n\r\n div.appendChild(this._iconTag(icon));\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.clear) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.clear);\r\n div.setAttribute('title', this.optionsStore.options.localization.clear);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.clear)\r\n );\r\n toolbar.push(div);\r\n }\r\n if (this.optionsStore.options.display.buttons.close) {\r\n const div = document.createElement('div');\r\n div.setAttribute('data-action', ActionTypes.close);\r\n div.setAttribute('title', this.optionsStore.options.localization.close);\r\n\r\n div.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.close)\r\n );\r\n toolbar.push(div);\r\n }\r\n\r\n return toolbar;\r\n }\r\n\r\n /***\r\n * Builds the base header template with next and previous icons\r\n * @private\r\n */\r\n getHeadTemplate(): HTMLElement {\r\n const calendarHeader = document.createElement('div');\r\n calendarHeader.classList.add(Namespace.css.calendarHeader);\r\n\r\n const previous = document.createElement('div');\r\n previous.classList.add(Namespace.css.previous);\r\n previous.setAttribute('data-action', ActionTypes.previous);\r\n previous.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.previous)\r\n );\r\n\r\n const switcher = document.createElement('div');\r\n switcher.classList.add(Namespace.css.switch);\r\n switcher.setAttribute('data-action', ActionTypes.changeCalendarView);\r\n\r\n const next = document.createElement('div');\r\n next.classList.add(Namespace.css.next);\r\n next.setAttribute('data-action', ActionTypes.next);\r\n next.appendChild(\r\n this._iconTag(this.optionsStore.options.display.icons.next)\r\n );\r\n\r\n calendarHeader.append(previous, switcher, next);\r\n return calendarHeader;\r\n }\r\n\r\n /**\r\n * Builds an icon tag as either an ``\r\n * or with icons.type is `sprites` then an svg tag instead\r\n * @param iconClass\r\n * @private\r\n */\r\n _iconTag(iconClass: string): HTMLElement {\r\n if (this.optionsStore.options.display.icons.type === 'sprites') {\r\n const svg = document.createElement('svg');\r\n svg.innerHTML = ``;\r\n return svg;\r\n }\r\n const icon = document.createElement('i');\r\n DOMTokenList.prototype.add.apply(icon.classList, iconClass.split(' '));\r\n return icon;\r\n }\r\n\r\n /**\r\n * A document click event to hide the widget if click is outside\r\n * @private\r\n * @param e MouseEvent\r\n */\r\n private _documentClickEvent = (e: MouseEvent) => {\r\n if (this.optionsStore.options.debug || (window as any).debug) return;\r\n\r\n if (\r\n this._isVisible &&\r\n !e.composedPath().includes(this.widget) && // click inside the widget\r\n !e.composedPath()?.includes(this.optionsStore.element) // click on the element\r\n ) {\r\n this.hide();\r\n }\r\n };\r\n\r\n /**\r\n * Click event for any action like selecting a date\r\n * @param e MouseEvent\r\n * @private\r\n */\r\n private _actionsClickEvent = (e: MouseEvent) => {\r\n this._eventEmitters.action.emit({ e: e });\r\n };\r\n\r\n /**\r\n * Causes the widget to get rebuilt on next show. If the picker is already open\r\n * then hide and reshow it.\r\n * @private\r\n */\r\n _rebuild() {\r\n const wasVisible = this._isVisible;\r\n if (wasVisible) this.hide();\r\n this._dispose();\r\n if (wasVisible) {\r\n this.show();\r\n }\r\n }\r\n}\r\n\r\nexport type Paint = (\r\n unit: Unit | 'decade',\r\n innerDate: DateTime,\r\n classes: string[],\r\n element: HTMLElement\r\n) => void;\r\n","import { DateTime, Unit } from './datetime';\nimport Collapse from './display/collapse';\nimport Namespace from './utilities/namespace';\nimport { OptionsStore } from './utilities/options';\nimport Dates from './dates';\nimport Validation from './validation';\nimport Display from './display';\nimport { EventEmitters } from './utilities/event-emitter';\nimport { serviceLocator } from './utilities/service-locator.js';\nimport ActionTypes from './utilities/action-types';\nimport CalendarModes from './utilities/calendar-modes';\n\n/**\n *\n */\nexport default class Actions {\n private optionsStore: OptionsStore;\n private validation: Validation;\n private dates: Dates;\n private display: Display;\n private _eventEmitters: EventEmitters;\n\n constructor() {\n this.optionsStore = serviceLocator.locate(OptionsStore);\n this.dates = serviceLocator.locate(Dates);\n this.validation = serviceLocator.locate(Validation);\n this.display = serviceLocator.locate(Display);\n this._eventEmitters = serviceLocator.locate(EventEmitters);\n\n this._eventEmitters.action.subscribe((result) => {\n this.do(result.e, result.action);\n });\n }\n\n /**\n * Performs the selected `action`. See ActionTypes\n * @param e This is normally a click event\n * @param action If not provided, then look for a [data-action]\n */\n do(e: any, action?: ActionTypes) {\n const currentTarget = e?.currentTarget;\n if (currentTarget?.classList?.contains(Namespace.css.disabled))\n return false;\n action = action || currentTarget?.dataset?.action;\n const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)\n .clone;\n\n switch (action) {\n case ActionTypes.next:\n case ActionTypes.previous:\n this.handleNextPrevious(action);\n break;\n case ActionTypes.changeCalendarView:\n this.display._showMode(1);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.selectMonth:\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n const value = +currentTarget.dataset.value;\n switch (action) {\n case ActionTypes.selectMonth:\n this.optionsStore.viewDate.month = value;\n break;\n case ActionTypes.selectYear:\n case ActionTypes.selectDecade:\n this.optionsStore.viewDate.year = value;\n break;\n }\n\n if (\n this.optionsStore.currentCalendarViewMode ===\n this.optionsStore.minimumCalendarViewMode\n ) {\n this.dates.setValue(\n this.optionsStore.viewDate,\n this.dates.lastPickedIndex\n );\n if (!this.optionsStore.options.display.inline) {\n this.display.hide();\n }\n } else {\n this.display._showMode(-1);\n }\n break;\n case ActionTypes.selectDay:\n const day = this.optionsStore.viewDate.clone;\n if (currentTarget.classList.contains(Namespace.css.old)) {\n day.manipulate(-1, Unit.month);\n }\n if (currentTarget.classList.contains(Namespace.css.new)) {\n day.manipulate(1, Unit.month);\n }\n\n day.date = +currentTarget.dataset.day;\n let index = 0;\n if (this.optionsStore.options.multipleDates) {\n index = this.dates.pickedIndex(day, Unit.date);\n if (index !== -1) {\n this.dates.setValue(null, index); //deselect multi-date\n } else {\n this.dates.setValue(day, this.dates.lastPickedIndex + 1);\n }\n } else {\n this.dates.setValue(day, this.dates.lastPickedIndex);\n }\n\n if (\n !this.display._hasTime &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline &&\n !this.optionsStore.options.multipleDates\n ) {\n this.display.hide();\n }\n break;\n case ActionTypes.selectHour:\n let hour = +currentTarget.dataset.value;\n if (\n lastPicked.hours >= 12 &&\n !this.optionsStore.options.display.components.useTwentyfourHour\n )\n hour += 12;\n lastPicked.hours = hour;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n case ActionTypes.selectMinute:\n lastPicked.minutes = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n case ActionTypes.selectSecond:\n lastPicked.seconds = +currentTarget.dataset.value;\n this.dates.setValue(lastPicked, this.dates.lastPickedIndex);\n this.hideOrClock(e);\n break;\n case ActionTypes.incrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours);\n break;\n case ActionTypes.incrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping\n );\n break;\n case ActionTypes.incrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds);\n break;\n case ActionTypes.decrementHours:\n this.manipulateAndSet(lastPicked, Unit.hours, -1);\n break;\n case ActionTypes.decrementMinutes:\n this.manipulateAndSet(\n lastPicked,\n Unit.minutes,\n this.optionsStore.options.stepping * -1\n );\n break;\n case ActionTypes.decrementSeconds:\n this.manipulateAndSet(lastPicked, Unit.seconds, -1);\n break;\n case ActionTypes.toggleMeridiem:\n this.manipulateAndSet(\n lastPicked,\n Unit.hours,\n this.dates.lastPicked.hours >= 12 ? -12 : 12\n );\n break;\n case ActionTypes.togglePicker:\n if (\n currentTarget.getAttribute('title') ===\n this.optionsStore.options.localization.selectDate\n ) {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectTime\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.time\n ).outerHTML;\n\n this.display._updateCalendarHeader();\n this.optionsStore.refreshCurrentView();\n } \n else {\n currentTarget.setAttribute(\n 'title',\n this.optionsStore.options.localization.selectDate\n );\n currentTarget.innerHTML = this.display._iconTag(\n this.optionsStore.options.display.icons.date\n ).outerHTML;\n if (this.display._hasTime) {\n this.do(e, ActionTypes.showClock);\n this.display._update('clock');\n }\n }\n this.display.widget\n .querySelectorAll(\n `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`\n )\n .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));\n this._eventEmitters.viewUpdate.emit();\n break;\n case ActionTypes.showClock:\n case ActionTypes.showHours:\n case ActionTypes.showMinutes:\n case ActionTypes.showSeconds:\n this.optionsStore.currentView = 'clock';\n this.display.widget\n .querySelectorAll(`.${Namespace.css.timeContainer} > div`)\n .forEach(\n (htmlElement: HTMLElement) => (htmlElement.style.display = 'none')\n );\n\n let classToUse = '';\n switch (action) {\n case ActionTypes.showClock:\n classToUse = Namespace.css.clockContainer;\n this.display._update('clock');\n break;\n case ActionTypes.showHours:\n classToUse = Namespace.css.hourContainer;\n this.display._update(Unit.hours);\n break;\n case ActionTypes.showMinutes:\n classToUse = Namespace.css.minuteContainer;\n this.display._update(Unit.minutes);\n break;\n case ActionTypes.showSeconds:\n classToUse = Namespace.css.secondContainer;\n this.display._update(Unit.seconds);\n break;\n }\n\n ((\n this.display.widget.getElementsByClassName(classToUse)[0]\n )).style.display = 'grid';\n break;\n case ActionTypes.clear:\n this.dates.setValue(null);\n this.display._updateCalendarHeader();\n break;\n case ActionTypes.close:\n this.display.hide();\n break;\n case ActionTypes.today:\n const today = new DateTime().setLocale(\n this.optionsStore.options.localization.locale\n );\n this.optionsStore.viewDate = today;\n if (this.validation.isValid(today, Unit.date))\n this.dates.setValue(today, this.dates.lastPickedIndex);\n break;\n }\n }\n\n private handleNextPrevious(action: ActionTypes) {\n const { unit, step } =\n CalendarModes[this.optionsStore.currentCalendarViewMode];\n if (action === ActionTypes.next)\n this.optionsStore.viewDate.manipulate(step, unit);\n else this.optionsStore.viewDate.manipulate(step * -1, unit);\n this._eventEmitters.viewUpdate.emit();\n\n this.display._showMode();\n }\n\n /**\n * After setting the value it will either show the clock or hide the widget.\n * @param e\n */\n private hideOrClock(e) {\n if (\n this.optionsStore.options.display.components.useTwentyfourHour &&\n !this.optionsStore.options.display.components.minutes &&\n !this.optionsStore.options.display.keepOpen &&\n !this.optionsStore.options.display.inline\n ) {\n this.display.hide();\n } else {\n this.do(e, ActionTypes.showClock);\n }\n }\n\n /**\n * Common function to manipulate {@link lastPicked} by `unit`.\n * @param lastPicked\n * @param unit\n * @param value Value to change by\n */\n private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) {\n const newDate = lastPicked.manipulate(value, unit);\n if (this.validation.isValid(newDate, unit)) {\n this.dates.setValue(newDate, this.dates.lastPickedIndex);\n }\n }\n}\n","import Display from './display/index';\r\nimport Validation from './validation';\r\nimport Dates from './dates';\r\nimport Actions from './actions';\r\nimport { DateTime, DateTimeFormatOptions, Unit } from './datetime';\r\nimport Namespace from './utilities/namespace';\r\nimport Options, { OptionConverter, OptionsStore } from './utilities/options';\r\nimport {\r\n BaseEvent,\r\n ChangeEvent,\r\n ViewUpdateEvent,\r\n FailEvent,\r\n} from './utilities/event-types';\r\nimport { EventEmitters } from './utilities/event-emitter';\r\nimport {\r\n serviceLocator,\r\n setupServiceLocator,\r\n} from './utilities/service-locator';\r\nimport CalendarModes from './utilities/calendar-modes';\r\nimport DefaultOptions from './utilities/default-options';\r\nimport ActionTypes from './utilities/action-types';\r\n\r\n/**\r\n * A robust and powerful date/time picker component.\r\n */\r\nclass TempusDominus {\r\n _subscribers: { [key: string]: ((event: any) => {})[] } = {};\r\n private _isDisabled = false;\r\n private _toggle: HTMLElement;\r\n private _currentPromptTimeTimeout: any;\r\n private actions: Actions;\r\n private optionsStore: OptionsStore;\r\n private _eventEmitters: EventEmitters;\r\n display: Display;\r\n dates: Dates;\r\n\r\n constructor(element: HTMLElement, options: Options = {} as Options) {\r\n setupServiceLocator();\r\n this._eventEmitters = serviceLocator.locate(EventEmitters);\r\n this.optionsStore = serviceLocator.locate(OptionsStore);\r\n this.display = serviceLocator.locate(Display);\r\n this.dates = serviceLocator.locate(Dates);\r\n this.actions = serviceLocator.locate(Actions);\r\n\r\n if (!element) {\r\n Namespace.errorMessages.mustProvideElement();\r\n }\r\n\r\n this.optionsStore.element = element;\r\n this._initializeOptions(options, DefaultOptions, true);\r\n this.optionsStore.viewDate.setLocale(\r\n this.optionsStore.options.localization.locale\r\n );\r\n this.optionsStore.unset = true;\r\n\r\n this._initializeInput();\r\n this._initializeToggle();\r\n\r\n if (this.optionsStore.options.display.inline) this.display.show();\r\n\r\n this._eventEmitters.triggerEvent.subscribe((e) => {\r\n this._triggerEvent(e);\r\n });\r\n\r\n this._eventEmitters.viewUpdate.subscribe(() => {\r\n this._viewUpdate();\r\n });\r\n }\r\n\r\n get viewDate() {\r\n return this.optionsStore.viewDate;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.\r\n * @param options\r\n * @param reset\r\n * @public\r\n */\r\n updateOptions(options, reset = false): void {\r\n if (reset) this._initializeOptions(options, DefaultOptions);\r\n else this._initializeOptions(options, this.optionsStore.options);\r\n this.display._rebuild();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Toggles the picker open or closed. If the picker is disabled, nothing will happen.\r\n * @public\r\n */\r\n toggle(): void {\r\n if (this._isDisabled) return;\r\n this.display.toggle();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Shows the picker unless the picker is disabled.\r\n * @public\r\n */\r\n show(): void {\r\n if (this._isDisabled) return;\r\n this.display.show();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker unless the picker is disabled.\r\n * @public\r\n */\r\n hide(): void {\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Disables the picker and the target input field.\r\n * @public\r\n */\r\n disable(): void {\r\n this._isDisabled = true;\r\n // todo this might be undesired. If a dev disables the input field to\r\n // only allow using the picker, this will break that.\r\n this.optionsStore.input?.setAttribute('disabled', 'disabled');\r\n this.display.hide();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Enables the picker and the target input field.\r\n * @public\r\n */\r\n enable(): void {\r\n this._isDisabled = false;\r\n this.optionsStore.input?.removeAttribute('disabled');\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Clears all the selected dates\r\n * @public\r\n */\r\n clear(): void {\r\n this.dates.clear();\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Allows for a direct subscription to picker events, without having to use addEventListener on the element.\r\n * @param eventTypes See Namespace.Events\r\n * @param callbacks Function to call when event is triggered\r\n * @public\r\n */\r\n subscribe(\r\n eventTypes: string | string[],\r\n callbacks: (event: any) => void | ((event: any) => void)[]\r\n ): { unsubscribe: () => void } | { unsubscribe: () => void }[] {\r\n if (typeof eventTypes === 'string') {\r\n eventTypes = [eventTypes];\r\n }\r\n let callBackArray = [];\r\n if (!Array.isArray(callbacks)) {\r\n callBackArray = [callbacks];\r\n } else {\r\n callBackArray = callbacks;\r\n }\r\n\r\n if (eventTypes.length !== callBackArray.length) {\r\n Namespace.errorMessages.subscribeMismatch();\r\n }\r\n\r\n const returnArray = [];\r\n\r\n for (let i = 0; i < eventTypes.length; i++) {\r\n const eventType = eventTypes[i];\r\n if (!Array.isArray(this._subscribers[eventType])) {\r\n this._subscribers[eventType] = [];\r\n }\r\n\r\n this._subscribers[eventType].push(callBackArray[i]);\r\n\r\n returnArray.push({\r\n unsubscribe: this._unsubscribe.bind(\r\n this,\r\n eventType,\r\n this._subscribers[eventType].length - 1\r\n ),\r\n });\r\n\r\n if (eventTypes.length === 1) {\r\n return returnArray[0];\r\n }\r\n }\r\n\r\n return returnArray;\r\n }\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n /**\r\n * Hides the picker and removes event listeners\r\n */\r\n dispose() {\r\n this.display.hide();\r\n // this will clear the document click event listener\r\n this.display._dispose();\r\n this.optionsStore.input?.removeEventListener(\r\n 'change',\r\n this._inputChangeEvent\r\n );\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input?.removeEventListener(\r\n 'click',\r\n this._toggleClickEvent\r\n );\r\n }\r\n this._toggle?.removeEventListener('click', this._toggleClickEvent);\r\n this._subscribers = {};\r\n }\r\n\r\n /**\r\n * Updates the options to use the provided language.\r\n * THe language file must be loaded first.\r\n * @param language\r\n */\r\n locale(language: string) {\r\n let asked = loadedLocales[language];\r\n if (!asked) return;\r\n this.updateOptions({\r\n localization: asked,\r\n });\r\n }\r\n\r\n /**\r\n * Triggers an event like ChangeEvent when the picker has updated the value\r\n * of a selected date.\r\n * @param event Accepts a BaseEvent object.\r\n * @private\r\n */\r\n private _triggerEvent(event: BaseEvent) {\r\n event.viewMode = this.optionsStore.currentView;\r\n\r\n const isChangeEvent = event.type === Namespace.events.change;\r\n if (isChangeEvent) {\r\n const { date, oldDate, isClear } = event as ChangeEvent;\r\n if (\r\n (date && oldDate && date.isSame(oldDate)) ||\r\n (!isClear && !date && !oldDate)\r\n ) {\r\n return;\r\n }\r\n this._handleAfterChangeEvent(event as ChangeEvent);\r\n\r\n this.optionsStore.input?.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n }\r\n\r\n this.optionsStore.element.dispatchEvent(\r\n new CustomEvent(event.type, { detail: event as any })\r\n );\r\n\r\n if ((window as any).jQuery) {\r\n const $ = (window as any).jQuery;\r\n\r\n if (isChangeEvent && this.optionsStore.input) {\r\n $(this.optionsStore.input).trigger(event);\r\n } else {\r\n $(this.optionsStore.element).trigger(event);\r\n }\r\n }\r\n\r\n this._publish(event);\r\n }\r\n\r\n private _publish(event: BaseEvent) {\r\n // return if event is not subscribed\r\n if (!Array.isArray(this._subscribers[event.type])) {\r\n return;\r\n }\r\n\r\n // Trigger callback for each subscriber\r\n this._subscribers[event.type].forEach((callback) => {\r\n callback(event);\r\n });\r\n }\r\n\r\n /**\r\n * Fires a ViewUpdate event when, for example, the month view is changed.\r\n * @param {Unit} unit\r\n * @private\r\n */\r\n private _viewUpdate() {\r\n this._triggerEvent({\r\n type: Namespace.events.update,\r\n viewDate: this.optionsStore.viewDate.clone,\r\n } as ViewUpdateEvent);\r\n }\r\n\r\n private _unsubscribe(eventName, index) {\r\n this._subscribers[eventName].splice(index, 1);\r\n }\r\n\r\n /**\r\n * Merges two Option objects together and validates options type\r\n * @param config new Options\r\n * @param mergeTo Options to merge into\r\n * @param includeDataset When true, the elements data-td attributes will be included in the\r\n * @private\r\n */\r\n private _initializeOptions(\r\n config: Options,\r\n mergeTo: Options,\r\n includeDataset = false\r\n ): void {\r\n config = OptionConverter._mergeOptions(config, mergeTo);\r\n if (includeDataset)\r\n config = OptionConverter._dataToOptions(\r\n this.optionsStore.element,\r\n config\r\n );\r\n\r\n OptionConverter._validateConflcits(config);\r\n\r\n config.viewDate = config.viewDate.setLocale(config.localization.locale);\r\n\r\n if (!this.optionsStore.viewDate.isSame(config.viewDate)) {\r\n this.optionsStore.viewDate = config.viewDate;\r\n }\r\n\r\n /**\r\n * Sets the minimum view allowed by the picker. For example the case of only\r\n * allowing year and month to be selected but not date.\r\n */\r\n if (config.display.components.year) {\r\n this.optionsStore.minimumCalendarViewMode = 2;\r\n }\r\n if (config.display.components.month) {\r\n this.optionsStore.minimumCalendarViewMode = 1;\r\n }\r\n if (config.display.components.date) {\r\n this.optionsStore.minimumCalendarViewMode = 0;\r\n }\r\n\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n this.optionsStore.minimumCalendarViewMode,\r\n this.optionsStore.currentCalendarViewMode\r\n );\r\n\r\n // Update view mode if needed\r\n if (\r\n CalendarModes[this.optionsStore.currentCalendarViewMode].name !==\r\n config.display.viewMode\r\n ) {\r\n this.optionsStore.currentCalendarViewMode = Math.max(\r\n CalendarModes.findIndex((x) => x.name === config.display.viewMode),\r\n this.optionsStore.minimumCalendarViewMode\r\n );\r\n }\r\n\r\n if (this.display?.isVisible) {\r\n this.display._update('all');\r\n }\r\n\r\n this.optionsStore.options = config;\r\n }\r\n\r\n /**\r\n * Checks if an input field is being used, attempts to locate one and sets an\r\n * event listener if found.\r\n * @private\r\n */\r\n private _initializeInput() {\r\n if (this.optionsStore.element.tagName == 'INPUT') {\r\n this.optionsStore.input = this.optionsStore.element as HTMLInputElement;\r\n } else {\r\n let query = this.optionsStore.element.dataset.tdTargetInput;\r\n if (query == undefined || query == 'nearest') {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector('input');\r\n } else {\r\n this.optionsStore.input =\r\n this.optionsStore.element.querySelector(query);\r\n }\r\n }\r\n\r\n if (!this.optionsStore.input) return;\r\n\r\n this.optionsStore.input.addEventListener('change', this._inputChangeEvent);\r\n if (this.optionsStore.options.allowInputToggle) {\r\n this.optionsStore.input.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n if (this.optionsStore.input.value) {\r\n this._inputChangeEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Attempts to locate a toggle for the picker and sets an event listener\r\n * @private\r\n */\r\n private _initializeToggle() {\r\n if (this.optionsStore.options.display.inline) return;\r\n let query = this.optionsStore.element.dataset.tdTargetToggle;\r\n if (query == 'nearest') {\r\n query = '[data-td-toggle=\"datetimepicker\"]';\r\n }\r\n this._toggle =\r\n query == undefined\r\n ? this.optionsStore.element\r\n : this.optionsStore.element.querySelector(query);\r\n this._toggle.addEventListener('click', this._toggleClickEvent);\r\n }\r\n\r\n /**\r\n * If the option is enabled this will render the clock view after a date pick.\r\n * @param e change event\r\n * @private\r\n */\r\n private _handleAfterChangeEvent(e: ChangeEvent) {\r\n if (\r\n // options is disabled\r\n !this.optionsStore.options.promptTimeOnDateChange ||\r\n this.optionsStore.options.display.inline ||\r\n this.optionsStore.options.display.sideBySide ||\r\n // time is disabled\r\n !this.display._hasTime ||\r\n // clock component is already showing\r\n this.display.widget\r\n ?.getElementsByClassName(Namespace.css.show)[0]\r\n .classList.contains(Namespace.css.timeContainer)\r\n )\r\n return;\r\n\r\n // First time ever. If useCurrent option is set to true (default), do nothing\r\n // because the first date is selected automatically.\r\n // or date didn't change (time did) or date changed because time did.\r\n if (\r\n (!e.oldDate && this.optionsStore.options.useCurrent) ||\r\n (e.oldDate && e.date?.isSame(e.oldDate))\r\n ) {\r\n return;\r\n }\r\n\r\n clearTimeout(this._currentPromptTimeTimeout);\r\n this._currentPromptTimeTimeout = setTimeout(() => {\r\n if (this.display.widget) {\r\n this._eventEmitters.action.emit({\r\n e: {\r\n currentTarget: this.display.widget.querySelector(\r\n `.${Namespace.css.switch} div`\r\n ),\r\n },\r\n action: ActionTypes.togglePicker,\r\n });\r\n }\r\n }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);\r\n }\r\n\r\n /**\r\n * Event for when the input field changes. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _inputChangeEvent = () => {\r\n const setViewDate = () => {\r\n if (this.dates.lastPicked)\r\n this.optionsStore.viewDate = this.dates.lastPicked;\r\n };\r\n\r\n const value = this.optionsStore.input.value;\r\n if (this.optionsStore.options.multipleDates) {\r\n try {\r\n const valueSplit = value.split(\r\n this.optionsStore.options.multipleDatesSeparator\r\n );\r\n for (let i = 0; i < valueSplit.length; i++) {\r\n this.dates.setFromInput(valueSplit[i], i);\r\n }\r\n setViewDate();\r\n } catch {\r\n console.warn(\r\n 'TD: Something went wrong trying to set the multidate values from the input field.'\r\n );\r\n }\r\n } else {\r\n this.dates.setFromInput(value, 0);\r\n setViewDate();\r\n }\r\n };\r\n\r\n /**\r\n * Event for when the toggle is clicked. This is a class level method so there's\r\n * something for the remove listener function.\r\n * @private\r\n */\r\n private _toggleClickEvent = () => {\r\n this.toggle();\r\n };\r\n}\r\n\r\n/**\r\n * Whenever a locale is loaded via a plugin then store it here based on the\r\n * locale name. E.g. loadedLocales['ru']\r\n */\r\nconst loadedLocales = {};\r\n\r\n/**\r\n * Called from a locale plugin.\r\n * @param locale locale object for localization options\r\n * @param name name of the language e.g 'ru', 'en-gb'\r\n */\r\nconst loadLocale = (locale) => {\r\n if (loadedLocales[locale.name]) return;\r\n loadedLocales[locale.name] = locale.localization;\r\n};\r\n\r\n/**\r\n * A sets the global localization options to the provided locale name.\r\n * `locadLocale` MUST be called first.\r\n * @param locale\r\n */\r\nconst locale = (locale: string) => {\r\n let asked = loadedLocales[locale];\r\n if (!asked) return;\r\n DefaultOptions.localization = asked;\r\n};\r\n\r\nconst extend = function (plugin, option) {\r\n if (!plugin.$i) {\r\n // install plugin only once\r\n plugin.load(option, { TempusDominus, Dates, Display }, this);\r\n plugin.$i = true;\r\n }\r\n return this;\r\n};\r\n\r\nexport {\r\n TempusDominus,\r\n extend,\r\n loadLocale,\r\n locale,\r\n Namespace,\r\n DefaultOptions,\r\n DateTime,\r\n Options,\r\n Unit,\r\n DateTimeFormatOptions,\r\n};\r\n"],"names":["Unit","ActionTypes","SecondDisplay","createPopper"],"mappings":";;;;;;;;;;;AAAYA;IAAZ,WAAY,IAAI;QACd,2BAAmB,CAAA;QACnB,2BAAmB,CAAA;QACnB,uBAAe,CAAA;QACf,qBAAa,CAAA;QACb,uBAAe,CAAA;QACf,qBAAa,CAAA;IACf,CAAC,EAPWA,YAAI,KAAJA,YAAI,QAOf;IAQM,MAAM,eAAe,GAAG,CAAC,IAAU;QACxC,QAAQ,IAAI;YACV,KAAK,MAAM;gBACT,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;YAChC,KAAK,OAAO;gBACV,OAAO;oBACL,KAAK,EAAE,SAAS;oBAChB,IAAI,EAAE,SAAS;iBAChB,CAAC;YACJ,KAAK,MAAM;gBACT,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;SAC9B;IACH,CAAC,CAAC;IAEF;;;;UAIa,QAAS,SAAQ,IAAI;QAAlC;;;;;YAIE,WAAM,GAAG,SAAS,CAAC;YA4bX,kBAAa,GAAG,CAAC,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AC,EAAE;4BACD,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAC9C,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,MAAM,CAC/B;yBACF;wBACD,MAAM,EAAEA,aAAW,CAAC,YAAY;qBACjC,CAAC,CAAC;iBACJ;aACF,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC;SACrE;KA0CF;IAED;;;;IAIA,MAAM,aAAa,GAAG,EAAE,CAAC;IAEzB;;;;;UAKM,UAAU,GAAG,CAAC,MAAM;QACxB,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,OAAO;QACvC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;IACnD,EAAE;IAEF;;;;;UAKM,MAAM,GAAG,CAAC,MAAc;QAC5B,IAAI,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,cAAc,CAAC,YAAY,GAAG,KAAK,CAAC;IACtC,EAAE;UAEI,MAAM,GAAG,UAAU,MAAM,EAAE,MAAM;QACrC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;;YAEd,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;SAClB;QACD,OAAO,IAAI,CAAC;IACd;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/js/tempus-dominus.min.js b/dist/js/tempus-dominus.min.js new file mode 100644 index 000000000..838c27f53 --- /dev/null +++ b/dist/js/tempus-dominus.min.js @@ -0,0 +1,6 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@popperjs/core")):"function"==typeof define&&define.amd?define(["exports","@popperjs/core"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tempusDominus={},t.Popper)}(this,(function(t,e){"use strict";var s;t.Unit=void 0,(s=t.Unit||(t.Unit={})).seconds="seconds",s.minutes="minutes",s.hours="hours",s.date="date",s.month="month",s.year="year";const i=t=>{switch(t){case"date":return{dateStyle:"short"};case"month":return{month:"numeric",year:"numeric"};case"year":return{year:"numeric"}}};class o extends Date{constructor(){super(...arguments),this.locale="default",this.nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],this.leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335]}setLocale(t){return this.locale=t,this}static convert(t,e="default"){if(!t)throw new Error("A date is required");return new o(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()).setLocale(e)}get clone(){return new o(this.year,this.month,this.date,this.hours,this.minutes,this.seconds,this.getMilliseconds()).setLocale(this.locale)}startOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(0);break;case"minutes":this.setSeconds(0,0);break;case"hours":this.setMinutes(0,0,0);break;case"date":this.setHours(0,0,0,0);break;case"weekDay":if(this.startOf(t.Unit.date),this.weekDay===s)break;let e=this.weekDay;0!==s&&0===this.weekDay&&(e=8-s),this.manipulate(s-e,t.Unit.date);break;case"month":this.startOf(t.Unit.date),this.setDate(1);break;case"year":this.startOf(t.Unit.date),this.setMonth(0,1)}return this}endOf(e,s=0){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);switch(e){case"seconds":this.setMilliseconds(999);break;case"minutes":this.setSeconds(59,999);break;case"hours":this.setMinutes(59,59,999);break;case"date":this.setHours(23,59,59,999);break;case"weekDay":this.endOf(t.Unit.date),this.manipulate(6+s-this.weekDay,t.Unit.date);break;case"month":this.endOf(t.Unit.date),this.manipulate(1,t.Unit.month),this.setDate(0);break;case"year":this.endOf(t.Unit.date),this.manipulate(1,t.Unit.year),this.setDate(0)}return this}manipulate(t,e){if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this[e]+=t,this}format(t,e=this.locale){return new Intl.DateTimeFormat(e,t).format(this)}isBefore(t,e){if(!e)return this.valueOf()t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return this.clone.startOf(e).valueOf()>t.clone.startOf(e).valueOf()}isSame(t,e){if(!e)return this.valueOf()===t.valueOf();if(void 0===this[e])throw new Error(`Unit '${e}' is not valid`);return t=o.convert(t),this.clone.startOf(e).valueOf()===t.startOf(e).valueOf()}isBetween(t,e,s,i="()"){if(s&&void 0===this[s])throw new Error(`Unit '${s}' is not valid`);const o="("===i[0],a=")"===i[1];return(o?this.isAfter(t,s):!this.isBefore(t,s))&&(a?this.isBefore(e,s):!this.isAfter(e,s))||(o?this.isBefore(t,s):!this.isAfter(t,s))&&(a?this.isAfter(e,s):!this.isBefore(e,s))}parts(t=this.locale,e={dateStyle:"full",timeStyle:"long"}){const s={};return new Intl.DateTimeFormat(t,e).formatToParts(this).filter((t=>"literal"!==t.type)).forEach((t=>s[t.type]=t.value)),s}get seconds(){return this.getSeconds()}set seconds(t){this.setSeconds(t)}get secondsFormatted(){return this.seconds<10?`0${this.seconds}`:`${this.seconds}`}get minutes(){return this.getMinutes()}set minutes(t){this.setMinutes(t)}get minutesFormatted(){return this.minutes<10?`0${this.minutes}`:`${this.minutes}`}get hours(){return this.getHours()}set hours(t){this.setHours(t)}get hoursFormatted(){let t=this.format({hour:"2-digit",hour12:!1});return"24"===t&&(t="00"),t}get twelveHoursFormatted(){let t=this.parts().hour;return 1===t.length&&(t=`0${t}`),t}meridiem(t=this.locale){var e;return null===(e=new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0}).formatToParts(this).find((t=>"dayPeriod"===t.type)))||void 0===e?void 0:e.value}get date(){return this.getDate()}set date(t){this.setDate(t)}get dateFormatted(){return this.date<10?`0${this.date}`:`${this.date}`}get weekDay(){return this.getDay()}get month(){return this.getMonth()}set month(t){const e=new Date(this.year,t+1);e.setDate(0);const s=e.getDate();this.date>s&&(this.date=s),this.setMonth(t)}get monthFormatted(){return this.month+1<10?`0${this.month}`:`${this.month}`}get year(){return this.getFullYear()}set year(t){this.setFullYear(t)}get week(){const t=this.computeOrdinal(),e=this.getUTCDay();let s=Math.floor((t-e+10)/7);return s<1?s=this.weeksInWeekYear(this.year-1):s>this.weeksInWeekYear(this.year)&&(s=1),s}weeksInWeekYear(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,s=t-1,i=(s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400))%7;return 4===e||3===i?53:52}get isLeapYear(){return this.year%4==0&&(this.year%100!=0||this.year%400==0)}computeOrdinal(){return this.date+(this.isLeapYear?this.leapLadder:this.nonLeapLadder)[this.month]}}class a extends Error{}const n="tempus-dominus";class r{}r.NAME=n,r.version="6.0.0-beta4",r.dataKey="td",r.events=new class{constructor(){this.key=".td",this.change=`change${this.key}`,this.update=`update${this.key}`,this.error=`error${this.key}`,this.show=`show${this.key}`,this.hide=`hide${this.key}`,this.blur=`blur${this.key}`,this.focus=`focus${this.key}`,this.keyup=`keyup${this.key}`,this.keydown=`keydown${this.key}`}},r.css=new class{constructor(){this.widget=`${n}-widget`,this.calendarHeader="calendar-header",this.switch="picker-switch",this.toolbar="toolbar",this.noHighlight="no-highlight",this.sideBySide="timepicker-sbs",this.previous="previous",this.next="next",this.disabled="disabled",this.old="old",this.new="new",this.active="active",this.dateContainer="date-container",this.decadesContainer=`${this.dateContainer}-decades`,this.decade="decade",this.yearsContainer=`${this.dateContainer}-years`,this.year="year",this.monthsContainer=`${this.dateContainer}-months`,this.month="month",this.daysContainer=`${this.dateContainer}-days`,this.day="day",this.calendarWeeks="cw",this.dayOfTheWeek="dow",this.today="today",this.weekend="weekend",this.timeContainer="time-container",this.separator="separator",this.clockContainer=`${this.timeContainer}-clock`,this.hourContainer=`${this.timeContainer}-hour`,this.minuteContainer=`${this.timeContainer}-minute`,this.secondContainer=`${this.timeContainer}-second`,this.hour="hour",this.minute="minute",this.second="second",this.toggleMeridiem="toggleMeridiem",this.show="show",this.collapsing="td-collapsing",this.collapse="td-collapse",this.inline="inline"}},r.errorMessages=new class{constructor(){this.base="TD:",this.failedToSetInvalidDate="Failed to set invalid date",this.failedToParseInput="Failed parse input field"}unexpectedOption(t){const e=new a(`${this.base} Unexpected option: ${t} does not match a known option.`);throw e.code=1,e}unexpectedOptions(t){const e=new a(`${this.base}: ${t.join(", ")}`);throw e.code=1,e}unexpectedOptionValue(t,e,s){const i=new a(`${this.base} Unexpected option value: ${t} does not accept a value of "${e}". Valid values are: ${s.join(", ")}`);throw i.code=2,i}typeMismatch(t,e,s){const i=new a(`${this.base} Mismatch types: ${t} has a type of ${e} instead of the required ${s}`);throw i.code=3,i}numbersOutOfRage(t,e,s){const i=new a(`${this.base} ${t} expected an array of number between ${e} and ${s}.`);throw i.code=4,i}failedToParseDate(t,e,s=!1){const i=new a(`${this.base} Could not correctly parse "${e}" to a date for ${t}.`);if(i.code=5,!s)throw i;console.warn(i)}mustProvideElement(){const t=new a(`${this.base} No element was provided.`);throw t.code=6,t}subscribeMismatch(){const t=new a(`${this.base} The subscribed events does not match the number of callbacks`);throw t.code=7,t}conflictingConfiguration(t){const e=new a(`${this.base} A configuration value conflicts with another rule. ${t}`);throw e.code=8,e}dateString(){console.warn(`${this.base} Using a string for date options is not recommended unless you specify an ISO string.`)}};const d=[{name:"calendar",className:r.css.daysContainer,unit:t.Unit.month,step:1},{name:"months",className:r.css.monthsContainer,unit:t.Unit.year,step:1},{name:"years",className:r.css.yearsContainer,unit:t.Unit.year,step:10},{name:"decades",className:r.css.decadesContainer,unit:t.Unit.year,step:100}],l={restrictions:{minDate:void 0,maxDate:void 0,disabledDates:[],enabledDates:[],daysOfWeekDisabled:[],disabledTimeIntervals:[],disabledHours:[],enabledHours:[]},display:{icons:{type:"icons",time:"fa-solid fa-clock",date:"fa-solid fa-calendar",up:"fa-solid fa-arrow-up",down:"fa-solid fa-arrow-down",previous:"fa-solid fa-chevron-left",next:"fa-solid fa-chevron-right",today:"fa-solid fa-calendar-check",clear:"fa-solid fa-trash",close:"fa-solid fa-xmark"},sideBySide:!1,calendarWeeks:!1,viewMode:"calendar",toolbarPlacement:"bottom",keepOpen:!1,buttons:{today:!1,clear:!1,close:!1},components:{calendar:!0,date:!0,month:!0,year:!0,decades:!0,clock:!0,hours:!0,minutes:!0,seconds:!1,useTwentyfourHour:!1},inline:!1},stepping:1,useCurrent:!0,defaultDate:void 0,localization:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",previousMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",previousYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",previousDecade:"Previous Decade",nextDecade:"Next Decade",previousCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",toggleMeridiem:"Toggle Meridiem",selectTime:"Select Time",selectDate:"Select Date",dayViewHeaderFormat:{month:"long",year:"2-digit"},locale:"default",startOfTheWeek:0},keepInvalid:!1,debug:!1,allowInputToggle:!1,viewDate:new o,multipleDates:!1,multipleDatesSeparator:"; ",promptTimeOnDateChange:!1,promptTimeOnDateChangeTransitionDelay:200,meta:{},container:void 0};class c{constructor(){this.viewDate=new o,this._currentCalendarViewMode=0,this.minimumCalendarViewMode=0,this.currentView="calendar"}get currentCalendarViewMode(){return this._currentCalendarViewMode}set currentCalendarViewMode(t){this._currentCalendarViewMode=t,this.currentView=d[t].name}refreshCurrentView(){this.currentView=d[this.currentCalendarViewMode].name}}class h{static _mergeOptions(t,e){var s;const i={};let o="";const a=["meta","dayViewHeaderFormat","container"],n="default"!==e.localization.locale?e.localization.locale:(null===(s=null==t?void 0:t.localization)||void 0===s?void 0:s.locale)||"default",d=(t,e,s,i)=>{switch(t){case"defaultDate":{const t=this.dateConversion(e,"defaultDate");if(void 0!==t)return t.setLocale(n),t;r.errorMessages.typeMismatch("defaultDate",s,"DateTime or Date");break}case"viewDate":{const t=this.dateConversion(e,"viewDate");if(void 0!==t)return t.setLocale(n),t;r.errorMessages.typeMismatch("viewDate",s,"DateTime or Date");break}case"minDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.minDate");if(void 0!==t)return t.setLocale(n),t;r.errorMessages.typeMismatch("restrictions.minDate",s,"DateTime or Date");break}case"maxDate":{if(void 0===e)return e;const t=this.dateConversion(e,"restrictions.maxDate");if(void 0!==t)return t.setLocale(n),t;r.errorMessages.typeMismatch("restrictions.maxDate",s,"DateTime or Date");break}case"disabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.disabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&r.errorMessages.numbersOutOfRage("restrictions.disabledHours",0,23),e);case"enabledHours":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.enabledHours",e,s),e.filter((t=>t<0||t>24)).length>0&&r.errorMessages.numbersOutOfRage("restrictions.enabledHours",0,23),e);case"daysOfWeekDisabled":return void 0===e?[]:(this._typeCheckNumberArray("restrictions.daysOfWeekDisabled",e,s),e.filter((t=>t<0||t>6)).length>0&&r.errorMessages.numbersOutOfRage("restrictions.daysOfWeekDisabled",0,6),e);case"enabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.enabledDates",e,s,n),e);case"disabledDates":return void 0===e?[]:(this._typeCheckDateArray("restrictions.disabledDates",e,s,n),e);case"disabledTimeIntervals":if(void 0===e)return[];Array.isArray(e)||r.errorMessages.typeMismatch(t,s,"array of { from: DateTime|Date, to: DateTime|Date }");const a=e;for(let e=0;e{const i=`${t}[${e}].${s}`;let o=a[e][s];const d=this.dateConversion(o,i);d||r.errorMessages.typeMismatch(i,typeof o,"DateTime or Date"),d.setLocale(n),a[e][s]=d}));return a;case"toolbarPlacement":case"type":case"viewMode":const d={toolbarPlacement:["top","bottom","default"],type:["icons","sprites"],viewMode:["clock","calendar","months","years","decades"]}[t];return d.includes(e)||r.errorMessages.unexpectedOptionValue(o.substring(1),e,d),e;case"meta":case"dayViewHeaderFormat":return e;case"container":return e&&!(e instanceof HTMLElement||e instanceof Element||(null==e?void 0:e.appendChild))&&r.errorMessages.typeMismatch(o.substring(1),typeof e,"HTMLElement"),e;default:switch(i){case"boolean":return"true"===e||!0===e;case"number":return+e;case"string":return e.toString();case"object":return{};case"function":return e;default:r.errorMessages.typeMismatch(o.substring(1),s,i)}}},l=(t,e,s)=>{const i=Object.keys(t).filter((t=>!Object.keys(e).includes(t)));if(i.length>0){const t=h.getFlattenDefaultOptions(),e=i.map((e=>{let s=`"${o.substring(1)}.${e}" in not a known option.`,i=t.find((t=>t.includes(e)));return i&&(s+=`Did you mean "${i}"?`),s}));r.errorMessages.unexpectedOptions(e)}Object.keys(e).forEach((i=>{const n=e[i];let r=typeof t[i],c=typeof n,h=t[i];if(!t.hasOwnProperty(i)){if("undefined"===c||0===(null==h?void 0:h.length)&&Array.isArray(n))return void(s[i]=n);t[i]=n,h=t[i]}o+=`.${i}`,s[i]=d(i,h,r,c),"object"!=typeof n||a.includes(i)||Array.isArray(t[i])||(l(t[i],n,s[i]),o=o.substring(0,o.lastIndexOf(`.${i}`))),o=o.substring(0,o.lastIndexOf(`.${i}`))}))};return l(t,e,i),i}static _dataToOptions(t,e){const s=JSON.parse(JSON.stringify(t.dataset));if((null==s?void 0:s.tdTargetInput)&&delete s.tdTargetInput,(null==s?void 0:s.tdTargetToggle)&&delete s.tdTargetToggle,!s||0===Object.keys(s).length||s.constructor!==DOMStringMap)return e;let i={};const o=t=>{const e={};return Object.keys(t).forEach((t=>{e[t.toLowerCase()]=t})),e},a=(t,e,s,i)=>{const n=o(s)[t[e].toLowerCase()],r={};return void 0===n||(s[n].constructor===Object?(e++,r[n]=a(t,e,s[n],i)):r[n]=i),r},n=o(e);return Object.keys(s).filter((t=>t.startsWith(r.dataKey))).map((t=>t.substring(2))).forEach((t=>{let o=n[t.toLowerCase()];if(t.includes("_")){const r=t.split("_");o=n[r[0].toLowerCase()],void 0!==o&&e[o].constructor===Object&&(i[o]=a(r,1,e[o],s[`td${t}`]))}else void 0!==o&&(i[o]=s[`td${t}`])})),this._mergeOptions(i,e)}static _dateTypeCheck(t){if(t.constructor.name===o.name)return t;if(t.constructor.name===Date.name)return o.convert(t);if("string"==typeof t){const e=new o(t);return"null"===JSON.stringify(e)?null:e}return null}static _typeCheckDateArray(t,e,s,i="default"){Array.isArray(e)||r.errorMessages.typeMismatch(t,s,"array of DateTime or Date");for(let s=0;s"number"!=typeof t))||r.errorMessages.typeMismatch(t,s,"array of numbers")}static dateConversion(t,e){"string"==typeof t&&"input"!==e&&r.errorMessages.dateString();const s=this._dateTypeCheck(t);return s||r.errorMessages.failedToParseDate(e,t,"input"===e),s}static getFlattenDefaultOptions(){if(this._flatback)return this._flatback;const t=(e,s=[])=>Array.isArray(e)?[]:Object(e)===e?Object.entries(e).flatMap((([e,i])=>t(i,[...s,e]))):s.join(".");return this._flatback=t(l),this._flatback}static _validateConflcits(t){!t.display.sideBySide||t.display.components.clock&&(t.display.components.hours||t.display.components.minutes||t.display.components.seconds)||r.errorMessages.conflictingConfiguration("Cannot use side by side mode without the clock components"),t.restrictions.minDate&&t.restrictions.maxDate&&(t.restrictions.minDate.isAfter(t.restrictions.maxDate)&&r.errorMessages.conflictingConfiguration("minDate is after maxDate"),t.restrictions.maxDate.isBefore(t.restrictions.minDate)&&r.errorMessages.conflictingConfiguration("maxDate is before minDate"))}}class p{constructor(){this.cache=new Map}locate(t){const e=this.cache.get(t);if(e)return e;const s=new t;return this.cache.set(t,s),s}}let u;class m{constructor(){this.optionsStore=u.locate(c)}isValid(e,s){var i;if(this.optionsStore.options.restrictions.disabledDates.length>0&&this._isInDisabledDates(e))return!1;if(this.optionsStore.options.restrictions.enabledDates.length>0&&!this._isInEnabledDates(e))return!1;if(s!==t.Unit.month&&s!==t.Unit.year&&(null===(i=this.optionsStore.options.restrictions.daysOfWeekDisabled)||void 0===i?void 0:i.length)>0&&-1!==this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(e.weekDay))return!1;if(this.optionsStore.options.restrictions.minDate&&e.isBefore(this.optionsStore.options.restrictions.minDate,s))return!1;if(this.optionsStore.options.restrictions.maxDate&&e.isAfter(this.optionsStore.options.restrictions.maxDate,s))return!1;if(s===t.Unit.hours||s===t.Unit.minutes||s===t.Unit.seconds){if(this.optionsStore.options.restrictions.disabledHours.length>0&&this._isInDisabledHours(e))return!1;if(this.optionsStore.options.restrictions.enabledHours.length>0&&!this._isInEnabledHours(e))return!1;if(this.optionsStore.options.restrictions.disabledTimeIntervals.length>0)for(let t of this.optionsStore.options.restrictions.disabledTimeIntervals)if(e.isBetween(t.from,t.to))return!1}return!0}_isInDisabledDates(e){if(!this.optionsStore.options.restrictions.disabledDates||0===this.optionsStore.options.restrictions.disabledDates.length)return!1;const s=e.format(i(t.Unit.date));return this.optionsStore.options.restrictions.disabledDates.map((e=>e.format(i(t.Unit.date)))).find((t=>t===s))}_isInEnabledDates(e){if(!this.optionsStore.options.restrictions.enabledDates||0===this.optionsStore.options.restrictions.enabledDates.length)return!0;const s=e.format(i(t.Unit.date));return this.optionsStore.options.restrictions.enabledDates.map((e=>e.format(i(t.Unit.date)))).find((t=>t===s))}_isInDisabledHours(t){if(!this.optionsStore.options.restrictions.disabledHours||0===this.optionsStore.options.restrictions.disabledHours.length)return!1;const e=t.hours;return this.optionsStore.options.restrictions.disabledHours.find((t=>t===e))}_isInEnabledHours(t){if(!this.optionsStore.options.restrictions.enabledHours||0===this.optionsStore.options.restrictions.enabledHours.length)return!0;const e=t.hours;return this.optionsStore.options.restrictions.enabledHours.find((t=>t===e))}}class y{constructor(){this.subscribers=[]}subscribe(t){return this.subscribers.push(t),this.unsubscribe.bind(this,this.subscribers.length-1)}unsubscribe(t){this.subscribers.splice(t,1)}emit(t){this.subscribers.forEach((e=>{e(t)}))}destory(){this.subscribers=null,this.subscribers=[]}}class v{constructor(){this.triggerEvent=new y,this.viewUpdate=new y,this.updateDisplay=new y,this.action=new y}destory(){this.triggerEvent.destory(),this.viewUpdate.destory(),this.updateDisplay.destory(),this.action.destory()}}class g{constructor(){this._dates=[],this.optionsStore=u.locate(c),this.validation=u.locate(m),this._eventEmitters=u.locate(v)}get picked(){return this._dates}get lastPicked(){return this._dates[this.lastPickedIndex]}get lastPickedIndex(){return 0===this._dates.length?0:this._dates.length-1}formatInput(t){const e=this.optionsStore.options.display.components;return t?t.format({year:e.calendar&&e.year?"numeric":void 0,month:e.calendar&&e.month?"2-digit":void 0,day:e.calendar&&e.date?"2-digit":void 0,hour:e.clock&&e.hours?e.useTwentyfourHour?"2-digit":"numeric":void 0,minute:e.clock&&e.minutes?"2-digit":void 0,second:e.clock&&e.seconds?"2-digit":void 0,hour12:!e.useTwentyfourHour}):""}setFromInput(t,e){if(!t)return void this.setValue(void 0,e);const s=h.dateConversion(t,"input");s&&(s.setLocale(this.optionsStore.options.localization.locale),this.setValue(s,e))}add(t){this._dates.push(t)}isPicked(t,e){if(!e)return void 0!==this._dates.find((e=>e===t));const s=i(e);let o=t.format(s);return void 0!==this._dates.map((t=>t.format(s))).find((t=>t===o))}pickedIndex(t,e){if(!e)return this._dates.indexOf(t);const s=i(e);let o=t.format(s);return this._dates.map((t=>t.format(s))).indexOf(o)}clear(){this.optionsStore.unset=!0,this._eventEmitters.triggerEvent.emit({type:r.events.change,date:void 0,oldDate:this.lastPicked,isClear:!0,isValid:!0}),this._dates=[]}static getStartEndYear(t,e){const s=t/10,i=Math.floor(e/t)*t;return[i,i+9*s,Math.floor(e/s)*s]}setValue(t,e){const s=void 0===e,i=!t&&s;let o=this.optionsStore.unset?null:this._dates[e];!o&&!this.optionsStore.unset&&s&&i&&(o=this.lastPicked);const a=()=>{if(!this.optionsStore.input)return;let e=this.formatInput(t);this.optionsStore.options.multipleDates&&(e=this._dates.map((t=>this.formatInput(t))).join(this.optionsStore.options.multipleDatesSeparator)),this.optionsStore.input.value!=e&&(this.optionsStore.input.value=e)};if(t&&(null==o?void 0:o.isSame(t)))a();else{if(!t)return!this.optionsStore.options.multipleDates||1===this._dates.length||i?(this.optionsStore.unset=!0,this._dates=[]):this._dates.splice(e,1),this._eventEmitters.triggerEvent.emit({type:r.events.change,date:void 0,oldDate:o,isClear:i,isValid:!0}),a(),void this._eventEmitters.updateDisplay.emit("all");if(e=e||0,t=t.clone,1!==this.optionsStore.options.stepping&&(t.minutes=Math.round(t.minutes/this.optionsStore.options.stepping)*this.optionsStore.options.stepping,t.seconds=0),this.validation.isValid(t))return this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this.optionsStore.unset=!1,this._eventEmitters.updateDisplay.emit("all"),void this._eventEmitters.triggerEvent.emit({type:r.events.change,date:t,oldDate:o,isClear:i,isValid:!0});this.optionsStore.options.keepInvalid&&(this._dates[e]=t,this.optionsStore.viewDate=t.clone,a(),this._eventEmitters.triggerEvent.emit({type:r.events.change,date:t,oldDate:o,isClear:i,isValid:!1})),this._eventEmitters.triggerEvent.emit({type:r.events.error,reason:r.errorMessages.failedToSetInvalidDate,date:t,oldDate:o})}}}var b;!function(t){t.next="next",t.previous="previous",t.changeCalendarView="changeCalendarView",t.selectMonth="selectMonth",t.selectYear="selectYear",t.selectDecade="selectDecade",t.selectDay="selectDay",t.selectHour="selectHour",t.selectMinute="selectMinute",t.selectSecond="selectSecond",t.incrementHours="incrementHours",t.incrementMinutes="incrementMinutes",t.incrementSeconds="incrementSeconds",t.decrementHours="decrementHours",t.decrementMinutes="decrementMinutes",t.decrementSeconds="decrementSeconds",t.toggleMeridiem="toggleMeridiem",t.togglePicker="togglePicker",t.showClock="showClock",t.showHours="showHours",t.showMinutes="showMinutes",t.showSeconds="showSeconds",t.clear="clear",t.close="close",t.today="today"}(b||(b={}));var S=b;class f{constructor(){this.optionsStore=u.locate(c),this.dates=u.locate(g),this.validation=u.locate(m)}getPicker(){const t=document.createElement("div");if(t.classList.add(r.css.daysContainer),t.append(...this._daysOfTheWeek()),this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(r.css.calendarWeeks,r.css.noHighlight),t.appendChild(e)}for(let e=0;e<42;e++){if(0!==e&&e%7==0&&this.optionsStore.options.display.calendarWeeks){const e=document.createElement("div");e.classList.add(r.css.calendarWeeks,r.css.noHighlight),t.appendChild(e)}const s=document.createElement("div");s.setAttribute("data-action",S.selectDay),t.appendChild(s)}return t}_update(e,s){const i=e.getElementsByClassName(r.css.daysContainer)[0],[a,n,d]=i.parentElement.getElementsByClassName(r.css.calendarHeader)[0].getElementsByTagName("div");n.setAttribute(r.css.daysContainer,this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.month),t.Unit.month)?a.classList.remove(r.css.disabled):a.classList.add(r.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.month),t.Unit.month)?d.classList.remove(r.css.disabled):d.classList.add(r.css.disabled);let l=this.optionsStore.viewDate.clone.startOf(t.Unit.month).startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).manipulate(12,t.Unit.hours);i.querySelectorAll(`[data-action="${S.selectDay}"], .${r.css.calendarWeeks}`).forEach((e=>{if(this.optionsStore.options.display.calendarWeeks&&e.classList.contains(r.css.calendarWeeks)){if("#"===e.innerText)return;return void(e.innerText=`${l.week}`)}let i=[];i.push(r.css.day),l.isBefore(this.optionsStore.viewDate,t.Unit.month)&&i.push(r.css.old),l.isAfter(this.optionsStore.viewDate,t.Unit.month)&&i.push(r.css.new),!this.optionsStore.unset&&this.dates.isPicked(l,t.Unit.date)&&i.push(r.css.active),this.validation.isValid(l,t.Unit.date)||i.push(r.css.disabled),l.isSame(new o,t.Unit.date)&&i.push(r.css.today),0!==l.weekDay&&6!==l.weekDay||i.push(r.css.weekend),s(t.Unit.date,l,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${l.year}-${l.monthFormatted}-${l.dateFormatted}`),e.setAttribute("data-day",`${l.date}`),e.innerText=l.format({day:"numeric"}),l.manipulate(1,t.Unit.date)}))}_daysOfTheWeek(){let e=this.optionsStore.viewDate.clone.startOf("weekDay",this.optionsStore.options.localization.startOfTheWeek).startOf(t.Unit.date);const s=[];if(document.createElement("div"),this.optionsStore.options.display.calendarWeeks){const t=document.createElement("div");t.classList.add(r.css.calendarWeeks,r.css.noHighlight),t.innerText="#",s.push(t)}for(let i=0;i<7;i++){const i=document.createElement("div");i.classList.add(r.css.dayOfTheWeek,r.css.noHighlight),i.innerText=e.format({weekday:"short"}),e.manipulate(1,t.Unit.date),s.push(i)}return s}}class w{constructor(){this.optionsStore=u.locate(c),this.dates=u.locate(g),this.validation=u.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(r.css.monthsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectMonth),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(r.css.monthsContainer)[0],[o,a,n]=i.parentElement.getElementsByClassName(r.css.calendarHeader)[0].getElementsByTagName("div");a.setAttribute(r.css.monthsContainer,this.optionsStore.viewDate.format({year:"numeric"})),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.year),t.Unit.year)?o.classList.remove(r.css.disabled):o.classList.add(r.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.year),t.Unit.year)?n.classList.remove(r.css.disabled):n.classList.add(r.css.disabled);let d=this.optionsStore.viewDate.clone.startOf(t.Unit.year);i.querySelectorAll(`[data-action="${S.selectMonth}"]`).forEach(((e,i)=>{let o=[];o.push(r.css.month),!this.optionsStore.unset&&this.dates.isPicked(d,t.Unit.month)&&o.push(r.css.active),this.validation.isValid(d,t.Unit.month)||o.push(r.css.disabled),s(t.Unit.month,d,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${i}`),e.innerText=`${d.format({month:"short"})}`,d.manipulate(1,t.Unit.month)}))}}class D{constructor(){this.optionsStore=u.locate(c),this.dates=u.locate(g),this.validation=u.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(r.css.yearsContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectYear),t.appendChild(e)}return t}_update(e,s){this._startYear=this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.year),this._endYear=this.optionsStore.viewDate.clone.manipulate(10,t.Unit.year);const i=e.getElementsByClassName(r.css.yearsContainer)[0],[o,a,n]=i.parentElement.getElementsByClassName(r.css.calendarHeader)[0].getElementsByTagName("div");a.setAttribute(r.css.yearsContainer,`${this._startYear.format({year:"numeric"})}-${this._endYear.format({year:"numeric"})}`),this.validation.isValid(this._startYear,t.Unit.year)?o.classList.remove(r.css.disabled):o.classList.add(r.css.disabled),this.validation.isValid(this._endYear,t.Unit.year)?n.classList.remove(r.css.disabled):n.classList.add(r.css.disabled);let d=this.optionsStore.viewDate.clone.startOf(t.Unit.year).manipulate(-1,t.Unit.year);i.querySelectorAll(`[data-action="${S.selectYear}"]`).forEach((e=>{let i=[];i.push(r.css.year),!this.optionsStore.unset&&this.dates.isPicked(d,t.Unit.year)&&i.push(r.css.active),this.validation.isValid(d,t.Unit.year)||i.push(r.css.disabled),s(t.Unit.year,d,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${d.year}`),e.innerText=d.format({year:"numeric"}),d.manipulate(1,t.Unit.year)}))}}class k{constructor(){this.optionsStore=u.locate(c),this.dates=u.locate(g),this.validation=u.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(r.css.decadesContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectDecade),t.appendChild(e)}return t}_update(e,s){const[i,o]=g.getStartEndYear(100,this.optionsStore.viewDate.year);this._startDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._startDecade.year=i,this._endDecade=this.optionsStore.viewDate.clone.startOf(t.Unit.year),this._endDecade.year=o;const a=e.getElementsByClassName(r.css.decadesContainer)[0],[n,d,l]=a.parentElement.getElementsByClassName(r.css.calendarHeader)[0].getElementsByTagName("div");d.setAttribute(r.css.decadesContainer,`${this._startDecade.format({year:"numeric"})}-${this._endDecade.format({year:"numeric"})}`),this.validation.isValid(this._startDecade,t.Unit.year)?n.classList.remove(r.css.disabled):n.classList.add(r.css.disabled),this.validation.isValid(this._endDecade,t.Unit.year)?l.classList.remove(r.css.disabled):l.classList.add(r.css.disabled);const c=this.dates.picked.map((t=>t.year));a.querySelectorAll(`[data-action="${S.selectDecade}"]`).forEach(((e,i)=>{if(0===i)return e.classList.add(r.css.old),this._startDecade.year-10<0?(e.textContent=" ",n.classList.add(r.css.disabled),e.classList.add(r.css.disabled),void e.setAttribute("data-value","")):(e.innerText=this._startDecade.clone.manipulate(-10,t.Unit.year).format({year:"numeric"}),void e.setAttribute("data-value",`${this._startDecade.year}`));let o=[];o.push(r.css.decade);const a=this._startDecade.year,d=this._startDecade.year+9;!this.optionsStore.unset&&c.filter((t=>t>=a&&t<=d)).length>0&&o.push(r.css.active),s("decade",this._startDecade,o,e),e.classList.remove(...e.classList),e.classList.add(...o),e.setAttribute("data-value",`${this._startDecade.year}`),e.innerText=`${this._startDecade.format({year:"numeric"})}`,this._startDecade.manipulate(10,t.Unit.year)}))}}class _{constructor(){this._gridColumns="",this.optionsStore=u.locate(c),this.dates=u.locate(g),this.validation=u.locate(m)}getPicker(t){const e=document.createElement("div");return e.classList.add(r.css.clockContainer),e.append(...this._grid(t)),e}_update(e){const s=e.getElementsByClassName(r.css.clockContainer)[0],i=(this.dates.lastPicked||this.optionsStore.viewDate).clone;if(s.querySelectorAll(".disabled").forEach((t=>t.classList.remove(r.css.disabled))),this.optionsStore.options.display.components.hours&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.hours),t.Unit.hours)||s.querySelector(`[data-action=${S.incrementHours}]`).classList.add(r.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.hours),t.Unit.hours)||s.querySelector(`[data-action=${S.decrementHours}]`).classList.add(r.css.disabled),s.querySelector(`[data-time-component=${t.Unit.hours}]`).innerText=this.optionsStore.options.display.components.useTwentyfourHour?i.hoursFormatted:i.twelveHoursFormatted),this.optionsStore.options.display.components.minutes&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.minutes),t.Unit.minutes)||s.querySelector(`[data-action=${S.incrementMinutes}]`).classList.add(r.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.minutes),t.Unit.minutes)||s.querySelector(`[data-action=${S.decrementMinutes}]`).classList.add(r.css.disabled),s.querySelector(`[data-time-component=${t.Unit.minutes}]`).innerText=i.minutesFormatted),this.optionsStore.options.display.components.seconds&&(this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(1,t.Unit.seconds),t.Unit.seconds)||s.querySelector(`[data-action=${S.incrementSeconds}]`).classList.add(r.css.disabled),this.validation.isValid(this.optionsStore.viewDate.clone.manipulate(-1,t.Unit.seconds),t.Unit.seconds)||s.querySelector(`[data-action=${S.decrementSeconds}]`).classList.add(r.css.disabled),s.querySelector(`[data-time-component=${t.Unit.seconds}]`).innerText=i.secondsFormatted),!this.optionsStore.options.display.components.useTwentyfourHour){const e=s.querySelector(`[data-action=${S.toggleMeridiem}]`);e.innerText=i.meridiem(),this.validation.isValid(i.clone.manipulate(i.hours>=12?-12:12,t.Unit.hours))?e.classList.remove(r.css.disabled):e.classList.add(r.css.disabled)}s.style.gridTemplateAreas=`"${this._gridColumns}"`}_grid(e){this._gridColumns="";const s=[],i=[],o=[],a=document.createElement("div"),n=e(this.optionsStore.options.display.icons.up),d=e(this.optionsStore.options.display.icons.down);a.classList.add(r.css.separator,r.css.noHighlight);const l=a.cloneNode(!0);l.innerHTML=":";const c=(t=!1)=>t?l.cloneNode(!0):a.cloneNode(!0);if(this.optionsStore.options.display.components.hours){let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementHour),e.setAttribute("data-action",S.incrementHours),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickHour),e.setAttribute("data-action",S.showHours),e.setAttribute("data-time-component",t.Unit.hours),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementHour),e.setAttribute("data-action",S.decrementHours),e.appendChild(d.cloneNode(!0)),o.push(e),this._gridColumns+="a"}if(this.optionsStore.options.display.components.minutes){this._gridColumns+=" a",this.optionsStore.options.display.components.hours&&(s.push(c()),i.push(c(!0)),o.push(c()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementMinute),e.setAttribute("data-action",S.incrementMinutes),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickMinute),e.setAttribute("data-action",S.showMinutes),e.setAttribute("data-time-component",t.Unit.minutes),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementMinute),e.setAttribute("data-action",S.decrementMinutes),e.appendChild(d.cloneNode(!0)),o.push(e)}if(this.optionsStore.options.display.components.seconds){this._gridColumns+=" a",this.optionsStore.options.display.components.minutes&&(s.push(c()),i.push(c(!0)),o.push(c()),this._gridColumns+=" a");let e=document.createElement("div");e.setAttribute("title",this.optionsStore.options.localization.incrementSecond),e.setAttribute("data-action",S.incrementSeconds),e.appendChild(n.cloneNode(!0)),s.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.pickSecond),e.setAttribute("data-action",S.showSeconds),e.setAttribute("data-time-component",t.Unit.seconds),i.push(e),e=document.createElement("div"),e.setAttribute("title",this.optionsStore.options.localization.decrementSecond),e.setAttribute("data-action",S.decrementSeconds),e.appendChild(d.cloneNode(!0)),o.push(e)}if(!this.optionsStore.options.display.components.useTwentyfourHour){this._gridColumns+=" a";let t=c();s.push(t);let e=document.createElement("button");e.setAttribute("title",this.optionsStore.options.localization.toggleMeridiem),e.setAttribute("data-action",S.toggleMeridiem),e.setAttribute("tabindex","-1"),r.css.toggleMeridiem.includes(",")?e.classList.add(...r.css.toggleMeridiem.split(",")):e.classList.add(r.css.toggleMeridiem),t=document.createElement("div"),t.classList.add(r.css.noHighlight),t.appendChild(e),i.push(t),t=c(),o.push(t)}return this._gridColumns=this._gridColumns.trim(),[...s,...i,...o]}}class C{constructor(){this.optionsStore=u.locate(c),this.validation=u.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(r.css.hourContainer);for(let e=0;e<(this.optionsStore.options.display.components.useTwentyfourHour?24:12);e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectHour),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(r.css.hourContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.date);i.querySelectorAll(`[data-action="${S.selectHour}"]`).forEach((e=>{let i=[];i.push(r.css.hour),this.validation.isValid(o,t.Unit.hours)||i.push(r.css.disabled),s(t.Unit.hours,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.hours}`),e.innerText=this.optionsStore.options.display.components.useTwentyfourHour?o.hoursFormatted:o.twelveHoursFormatted,o.manipulate(1,t.Unit.hours)}))}}class E{constructor(){this.optionsStore=u.locate(c),this.validation=u.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(r.css.minuteContainer);let e=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;for(let s=0;s<60/e;s++){const e=document.createElement("div");e.setAttribute("data-action",S.selectMinute),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(r.css.minuteContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.hours),a=1===this.optionsStore.options.stepping?5:this.optionsStore.options.stepping;i.querySelectorAll(`[data-action="${S.selectMinute}"]`).forEach((e=>{let i=[];i.push(r.css.minute),this.validation.isValid(o,t.Unit.minutes)||i.push(r.css.disabled),s(t.Unit.minutes,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.minutesFormatted}`),e.innerText=o.minutesFormatted,o.manipulate(a,t.Unit.minutes)}))}}class M{constructor(){this.optionsStore=u.locate(c),this.validation=u.locate(m)}getPicker(){const t=document.createElement("div");t.classList.add(r.css.secondContainer);for(let e=0;e<12;e++){const e=document.createElement("div");e.setAttribute("data-action",S.selectSecond),t.appendChild(e)}return t}_update(e,s){const i=e.getElementsByClassName(r.css.secondContainer)[0];let o=this.optionsStore.viewDate.clone.startOf(t.Unit.minutes);i.querySelectorAll(`[data-action="${S.selectSecond}"]`).forEach((e=>{let i=[];i.push(r.css.second),this.validation.isValid(o,t.Unit.seconds)||i.push(r.css.disabled),s(t.Unit.seconds,o,i,e),e.classList.remove(...e.classList),e.classList.add(...i),e.setAttribute("data-value",`${o.seconds}`),e.innerText=o.secondsFormatted,o.manipulate(5,t.Unit.seconds)}))}}class L{static toggle(t){t.classList.contains(r.css.show)?this.hide(t):this.show(t)}static show(t){if(t.classList.contains(r.css.collapsing)||t.classList.contains(r.css.show))return;t.style.height="0",t.classList.remove(r.css.collapse),t.classList.add(r.css.collapsing),setTimeout((()=>{t.classList.remove(r.css.collapsing),t.classList.add(r.css.collapse,r.css.show),t.style.height=""}),this.getTransitionDurationFromElement(t)),t.style.height=`${t.scrollHeight}px`}static hide(t){if(t.classList.contains(r.css.collapsing)||!t.classList.contains(r.css.show))return;t.style.height=`${t.getBoundingClientRect().height}px`;t.offsetHeight,t.classList.remove(r.css.collapse,r.css.show),t.classList.add(r.css.collapsing),t.style.height="",setTimeout((()=>{t.classList.remove(r.css.collapsing),t.classList.add(r.css.collapse)}),this.getTransitionDurationFromElement(t))}}L.getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),o=Number.parseFloat(s);return i||o?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0};class T{constructor(){this._isVisible=!1,this._documentClickEvent=t=>{var e;this.optionsStore.options.debug||window.debug||!this._isVisible||t.composedPath().includes(this.widget)||(null===(e=t.composedPath())||void 0===e?void 0:e.includes(this.optionsStore.element))||this.hide()},this._actionsClickEvent=t=>{this._eventEmitters.action.emit({e:t})},this.optionsStore=u.locate(c),this.validation=u.locate(m),this.dates=u.locate(g),this.dateDisplay=u.locate(f),this.monthDisplay=u.locate(w),this.yearDisplay=u.locate(D),this.decadeDisplay=u.locate(k),this.timeDisplay=u.locate(_),this.hourDisplay=u.locate(C),this.minuteDisplay=u.locate(E),this.secondDisplay=u.locate(M),this._eventEmitters=u.locate(v),this._widget=void 0,this._eventEmitters.updateDisplay.subscribe((t=>{this._update(t)}))}get widget(){return this._widget}get isVisible(){return this._isVisible}_update(e){if(this.widget)switch(e){case t.Unit.seconds:this.secondDisplay._update(this.widget,this.paint);break;case t.Unit.minutes:this.minuteDisplay._update(this.widget,this.paint);break;case t.Unit.hours:this.hourDisplay._update(this.widget,this.paint);break;case t.Unit.date:this.dateDisplay._update(this.widget,this.paint);break;case t.Unit.month:this.monthDisplay._update(this.widget,this.paint);break;case t.Unit.year:this.yearDisplay._update(this.widget,this.paint);break;case"clock":if(!this._hasTime)break;this.timeDisplay._update(this.widget),this._update(t.Unit.hours),this._update(t.Unit.minutes),this._update(t.Unit.seconds);break;case"calendar":this._update(t.Unit.date),this._update(t.Unit.year),this._update(t.Unit.month),this.decadeDisplay._update(this.widget,this.paint),this._updateCalendarHeader();break;case"all":this._hasTime&&this._update("clock"),this._hasDate&&this._update("calendar")}}paint(t,e,s,i){}show(){var s,i;if(null==this.widget){if(0==this.dates.picked.length){if(this.optionsStore.options.useCurrent&&!this.optionsStore.options.defaultDate){const e=(new o).setLocale(this.optionsStore.options.localization.locale);if(!this.optionsStore.options.keepInvalid){let i=0,o=1;for((null===(s=this.optionsStore.options.restrictions.maxDate)||void 0===s?void 0:s.isBefore(e))&&(o=-1);!(this.validation.isValid(e)||(e.manipulate(o,t.Unit.date),i>31));)i++}this.dates.setValue(e)}this.optionsStore.options.defaultDate&&this.dates.setValue(this.optionsStore.options.defaultDate)}this._buildWidget();const a=this._hasTime&&!this._hasDate;if(a&&(this.optionsStore.currentView="clock",this._eventEmitters.action.emit({e:null,action:S.showClock})),this.optionsStore.currentCalendarViewMode||(this.optionsStore.currentCalendarViewMode=this.optionsStore.minimumCalendarViewMode),a||(this._hasTime&&L.hide(this.widget.querySelector(`div.${r.css.timeContainer}`)),L.show(this.widget.querySelector(`div.${r.css.dateContainer}`))),this._hasDate&&this._showMode(),this.optionsStore.options.display.inline)this.optionsStore.element.appendChild(this.widget);else{((null===(i=this.optionsStore.options)||void 0===i?void 0:i.container)||document.body).appendChild(this.widget),this._popperInstance=e.createPopper(this.optionsStore.element,this.widget,{modifiers:[{name:"eventListeners",enabled:!0}],placement:"rtl"===document.documentElement.dir?"bottom-end":"bottom-start"})}"clock"==this.optionsStore.options.display.viewMode&&this._eventEmitters.action.emit({e:null,action:S.showClock}),this.widget.querySelectorAll("[data-action]").forEach((t=>t.addEventListener("click",this._actionsClickEvent))),this._hasTime&&this.optionsStore.options.display.sideBySide&&(this.timeDisplay._update(this.widget),this.widget.getElementsByClassName(r.css.clockContainer)[0].style.display="grid")}this.widget.classList.add(r.css.show),this.optionsStore.options.display.inline||(this._popperInstance.update(),document.addEventListener("click",this._documentClickEvent)),this._eventEmitters.triggerEvent.emit({type:r.events.show}),this._isVisible=!0}_showMode(t){if(!this.widget)return;if(t){const e=Math.max(this.optionsStore.minimumCalendarViewMode,Math.min(3,this.optionsStore.currentCalendarViewMode+t));if(this.optionsStore.currentCalendarViewMode==e)return;this.optionsStore.currentCalendarViewMode=e}this.widget.querySelectorAll(`.${r.css.dateContainer} > div:not(.${r.css.calendarHeader}), .${r.css.timeContainer} > div:not(.${r.css.clockContainer})`).forEach((t=>t.style.display="none"));const e=d[this.optionsStore.currentCalendarViewMode];let s=this.widget.querySelector(`.${e.className}`);switch(e.className){case r.css.decadesContainer:this.decadeDisplay._update(this.widget,this.paint);break;case r.css.yearsContainer:this.yearDisplay._update(this.widget,this.paint);break;case r.css.monthsContainer:this.monthDisplay._update(this.widget,this.paint);break;case r.css.daysContainer:this.dateDisplay._update(this.widget,this.paint)}s.style.display="grid",this._updateCalendarHeader(),this._eventEmitters.viewUpdate.emit()}_updateCalendarHeader(){const t=[...this.widget.querySelector(`.${r.css.dateContainer} div[style*="display: grid"]`).classList].find((t=>t.startsWith(r.css.dateContainer))),[e,s,i]=this.widget.getElementsByClassName(r.css.calendarHeader)[0].getElementsByTagName("div");switch(t){case r.css.decadesContainer:e.setAttribute("title",this.optionsStore.options.localization.previousCentury),s.setAttribute("title",""),i.setAttribute("title",this.optionsStore.options.localization.nextCentury);break;case r.css.yearsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousDecade),s.setAttribute("title",this.optionsStore.options.localization.selectDecade),i.setAttribute("title",this.optionsStore.options.localization.nextDecade);break;case r.css.monthsContainer:e.setAttribute("title",this.optionsStore.options.localization.previousYear),s.setAttribute("title",this.optionsStore.options.localization.selectYear),i.setAttribute("title",this.optionsStore.options.localization.nextYear);break;case r.css.daysContainer:e.setAttribute("title",this.optionsStore.options.localization.previousMonth),s.setAttribute("title",this.optionsStore.options.localization.selectMonth),i.setAttribute("title",this.optionsStore.options.localization.nextMonth),s.innerText=this.optionsStore.viewDate.format(this.optionsStore.options.localization.dayViewHeaderFormat)}s.innerText=s.getAttribute(t)}hide(){this.widget&&this._isVisible&&(this.widget.classList.remove(r.css.show),this._isVisible&&(this._eventEmitters.triggerEvent.emit({type:r.events.hide,date:this.optionsStore.unset?null:this.dates.lastPicked?this.dates.lastPicked.clone:void 0}),this._isVisible=!1),document.removeEventListener("click",this._documentClickEvent))}toggle(){return this._isVisible?this.hide():this.show()}_dispose(){document.removeEventListener("click",this._documentClickEvent),this.widget&&(this.widget.querySelectorAll("[data-action]").forEach((t=>t.removeEventListener("click",this._actionsClickEvent))),this.widget.parentNode.removeChild(this.widget),this._widget=void 0)}_buildWidget(){const t=document.createElement("div");t.classList.add(r.css.widget);const e=document.createElement("div");e.classList.add(r.css.dateContainer),e.append(this.getHeadTemplate(),this.decadeDisplay.getPicker(),this.yearDisplay.getPicker(),this.monthDisplay.getPicker(),this.dateDisplay.getPicker());const s=document.createElement("div");s.classList.add(r.css.timeContainer),s.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))),s.appendChild(this.hourDisplay.getPicker()),s.appendChild(this.minuteDisplay.getPicker()),s.appendChild(this.secondDisplay.getPicker());const i=document.createElement("div");if(i.classList.add(r.css.toolbar),i.append(...this.getToolbarElements()),this.optionsStore.options.display.inline&&t.classList.add(r.css.inline),this.optionsStore.options.display.calendarWeeks&&t.classList.add("calendarWeeks"),this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){t.classList.add(r.css.sideBySide),"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");return o.classList.add("td-row"),e.classList.add("td-half"),s.classList.add("td-half"),o.appendChild(e),o.appendChild(s),t.appendChild(o),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),void(this._widget=t)}"top"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i),this._hasDate&&(this._hasTime&&(e.classList.add(r.css.collapse),"clock"!==this.optionsStore.options.display.viewMode&&e.classList.add(r.css.show)),t.appendChild(e)),this._hasTime&&(this._hasDate&&(s.classList.add(r.css.collapse),"clock"===this.optionsStore.options.display.viewMode&&s.classList.add(r.css.show)),t.appendChild(s)),"bottom"===this.optionsStore.options.display.toolbarPlacement&&t.appendChild(i);const o=document.createElement("div");o.classList.add("arrow"),o.setAttribute("data-popper-arrow",""),t.appendChild(o),this._widget=t}get _hasTime(){return this.optionsStore.options.display.components.clock&&(this.optionsStore.options.display.components.hours||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.components.seconds)}get _hasDate(){return this.optionsStore.options.display.components.calendar&&(this.optionsStore.options.display.components.year||this.optionsStore.options.display.components.month||this.optionsStore.options.display.components.date)}getToolbarElements(){const t=[];if(this.optionsStore.options.display.buttons.today){const e=document.createElement("div");e.setAttribute("data-action",S.today),e.setAttribute("title",this.optionsStore.options.localization.today),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.today)),t.push(e)}if(!this.optionsStore.options.display.sideBySide&&this._hasDate&&this._hasTime){let e,s;"clock"===this.optionsStore.options.display.viewMode?(e=this.optionsStore.options.localization.selectDate,s=this.optionsStore.options.display.icons.date):(e=this.optionsStore.options.localization.selectTime,s=this.optionsStore.options.display.icons.time);const i=document.createElement("div");i.setAttribute("data-action",S.togglePicker),i.setAttribute("title",e),i.appendChild(this._iconTag(s)),t.push(i)}if(this.optionsStore.options.display.buttons.clear){const e=document.createElement("div");e.setAttribute("data-action",S.clear),e.setAttribute("title",this.optionsStore.options.localization.clear),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.clear)),t.push(e)}if(this.optionsStore.options.display.buttons.close){const e=document.createElement("div");e.setAttribute("data-action",S.close),e.setAttribute("title",this.optionsStore.options.localization.close),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.close)),t.push(e)}return t}getHeadTemplate(){const t=document.createElement("div");t.classList.add(r.css.calendarHeader);const e=document.createElement("div");e.classList.add(r.css.previous),e.setAttribute("data-action",S.previous),e.appendChild(this._iconTag(this.optionsStore.options.display.icons.previous));const s=document.createElement("div");s.classList.add(r.css.switch),s.setAttribute("data-action",S.changeCalendarView);const i=document.createElement("div");return i.classList.add(r.css.next),i.setAttribute("data-action",S.next),i.appendChild(this._iconTag(this.optionsStore.options.display.icons.next)),t.append(e,s,i),t}_iconTag(t){if("sprites"===this.optionsStore.options.display.icons.type){const e=document.createElement("svg");return e.innerHTML=``,e}const e=document.createElement("i");return DOMTokenList.prototype.add.apply(e.classList,t.split(" ")),e}_rebuild(){const t=this._isVisible;t&&this.hide(),this._dispose(),t&&this.show()}}class U{constructor(){this.optionsStore=u.locate(c),this.dates=u.locate(g),this.validation=u.locate(m),this.display=u.locate(T),this._eventEmitters=u.locate(v),this._eventEmitters.action.subscribe((t=>{this.do(t.e,t.action)}))}do(e,s){var i,a;const n=null==e?void 0:e.currentTarget;if(null===(i=null==n?void 0:n.classList)||void 0===i?void 0:i.contains(r.css.disabled))return!1;s=s||(null===(a=null==n?void 0:n.dataset)||void 0===a?void 0:a.action);const d=(this.dates.lastPicked||this.optionsStore.viewDate).clone;switch(s){case S.next:case S.previous:this.handleNextPrevious(s);break;case S.changeCalendarView:this.display._showMode(1),this.display._updateCalendarHeader();break;case S.selectMonth:case S.selectYear:case S.selectDecade:const i=+n.dataset.value;switch(s){case S.selectMonth:this.optionsStore.viewDate.month=i;break;case S.selectYear:case S.selectDecade:this.optionsStore.viewDate.year=i}this.optionsStore.currentCalendarViewMode===this.optionsStore.minimumCalendarViewMode?(this.dates.setValue(this.optionsStore.viewDate,this.dates.lastPickedIndex),this.optionsStore.options.display.inline||this.display.hide()):this.display._showMode(-1);break;case S.selectDay:const a=this.optionsStore.viewDate.clone;n.classList.contains(r.css.old)&&a.manipulate(-1,t.Unit.month),n.classList.contains(r.css.new)&&a.manipulate(1,t.Unit.month),a.date=+n.dataset.day;let l=0;this.optionsStore.options.multipleDates?(l=this.dates.pickedIndex(a,t.Unit.date),-1!==l?this.dates.setValue(null,l):this.dates.setValue(a,this.dates.lastPickedIndex+1)):this.dates.setValue(a,this.dates.lastPickedIndex),this.display._hasTime||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline||this.optionsStore.options.multipleDates||this.display.hide();break;case S.selectHour:let c=+n.dataset.value;d.hours>=12&&!this.optionsStore.options.display.components.useTwentyfourHour&&(c+=12),d.hours=c,this.dates.setValue(d,this.dates.lastPickedIndex),this.hideOrClock(e);break;case S.selectMinute:d.minutes=+n.dataset.value,this.dates.setValue(d,this.dates.lastPickedIndex),this.hideOrClock(e);break;case S.selectSecond:d.seconds=+n.dataset.value,this.dates.setValue(d,this.dates.lastPickedIndex),this.hideOrClock(e);break;case S.incrementHours:this.manipulateAndSet(d,t.Unit.hours);break;case S.incrementMinutes:this.manipulateAndSet(d,t.Unit.minutes,this.optionsStore.options.stepping);break;case S.incrementSeconds:this.manipulateAndSet(d,t.Unit.seconds);break;case S.decrementHours:this.manipulateAndSet(d,t.Unit.hours,-1);break;case S.decrementMinutes:this.manipulateAndSet(d,t.Unit.minutes,-1*this.optionsStore.options.stepping);break;case S.decrementSeconds:this.manipulateAndSet(d,t.Unit.seconds,-1);break;case S.toggleMeridiem:this.manipulateAndSet(d,t.Unit.hours,this.dates.lastPicked.hours>=12?-12:12);break;case S.togglePicker:n.getAttribute("title")===this.optionsStore.options.localization.selectDate?(n.setAttribute("title",this.optionsStore.options.localization.selectTime),n.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.time).outerHTML,this.display._updateCalendarHeader(),this.optionsStore.refreshCurrentView()):(n.setAttribute("title",this.optionsStore.options.localization.selectDate),n.innerHTML=this.display._iconTag(this.optionsStore.options.display.icons.date).outerHTML,this.display._hasTime&&(this.do(e,S.showClock),this.display._update("clock"))),this.display.widget.querySelectorAll(`.${r.css.dateContainer}, .${r.css.timeContainer}`).forEach((t=>L.toggle(t))),this._eventEmitters.viewUpdate.emit();break;case S.showClock:case S.showHours:case S.showMinutes:case S.showSeconds:this.optionsStore.currentView="clock",this.display.widget.querySelectorAll(`.${r.css.timeContainer} > div`).forEach((t=>t.style.display="none"));let h="";switch(s){case S.showClock:h=r.css.clockContainer,this.display._update("clock");break;case S.showHours:h=r.css.hourContainer,this.display._update(t.Unit.hours);break;case S.showMinutes:h=r.css.minuteContainer,this.display._update(t.Unit.minutes);break;case S.showSeconds:h=r.css.secondContainer,this.display._update(t.Unit.seconds)}this.display.widget.getElementsByClassName(h)[0].style.display="grid";break;case S.clear:this.dates.setValue(null),this.display._updateCalendarHeader();break;case S.close:this.display.hide();break;case S.today:const p=(new o).setLocale(this.optionsStore.options.localization.locale);this.optionsStore.viewDate=p,this.validation.isValid(p,t.Unit.date)&&this.dates.setValue(p,this.dates.lastPickedIndex)}}handleNextPrevious(t){const{unit:e,step:s}=d[this.optionsStore.currentCalendarViewMode];t===S.next?this.optionsStore.viewDate.manipulate(s,e):this.optionsStore.viewDate.manipulate(-1*s,e),this._eventEmitters.viewUpdate.emit(),this.display._showMode()}hideOrClock(t){!this.optionsStore.options.display.components.useTwentyfourHour||this.optionsStore.options.display.components.minutes||this.optionsStore.options.display.keepOpen||this.optionsStore.options.display.inline?this.do(t,S.showClock):this.display.hide()}manipulateAndSet(t,e,s=1){const i=t.manipulate(s,e);this.validation.isValid(i,e)&&this.dates.setValue(i,this.dates.lastPickedIndex)}}class A{constructor(t,e={}){this._subscribers={},this._isDisabled=!1,this._inputChangeEvent=()=>{const t=()=>{this.dates.lastPicked&&(this.optionsStore.viewDate=this.dates.lastPicked)},e=this.optionsStore.input.value;if(this.optionsStore.options.multipleDates)try{const s=e.split(this.optionsStore.options.multipleDatesSeparator);for(let t=0;t{this.toggle()},u=new p,this._eventEmitters=u.locate(v),this.optionsStore=u.locate(c),this.display=u.locate(T),this.dates=u.locate(g),this.actions=u.locate(U),t||r.errorMessages.mustProvideElement(),this.optionsStore.element=t,this._initializeOptions(e,l,!0),this.optionsStore.viewDate.setLocale(this.optionsStore.options.localization.locale),this.optionsStore.unset=!0,this._initializeInput(),this._initializeToggle(),this.optionsStore.options.display.inline&&this.display.show(),this._eventEmitters.triggerEvent.subscribe((t=>{this._triggerEvent(t)})),this._eventEmitters.viewUpdate.subscribe((()=>{this._viewUpdate()}))}get viewDate(){return this.optionsStore.viewDate}updateOptions(t,e=!1){e?this._initializeOptions(t,l):this._initializeOptions(t,this.optionsStore.options),this.display._rebuild()}toggle(){this._isDisabled||this.display.toggle()}show(){this._isDisabled||this.display.show()}hide(){this.display.hide()}disable(){var t;this._isDisabled=!0,null===(t=this.optionsStore.input)||void 0===t||t.setAttribute("disabled","disabled"),this.display.hide()}enable(){var t;this._isDisabled=!1,null===(t=this.optionsStore.input)||void 0===t||t.removeAttribute("disabled")}clear(){this.dates.clear()}subscribe(t,e){"string"==typeof t&&(t=[t]);let s=[];s=Array.isArray(e)?e:[e],t.length!==s.length&&r.errorMessages.subscribeMismatch();const i=[];for(let e=0;e{e(t)}))}_viewUpdate(){this._triggerEvent({type:r.events.update,viewDate:this.optionsStore.viewDate.clone})}_unsubscribe(t,e){this._subscribers[t].splice(e,1)}_initializeOptions(t,e,s=!1){var i;t=h._mergeOptions(t,e),s&&(t=h._dataToOptions(this.optionsStore.element,t)),h._validateConflcits(t),t.viewDate=t.viewDate.setLocale(t.localization.locale),this.optionsStore.viewDate.isSame(t.viewDate)||(this.optionsStore.viewDate=t.viewDate),t.display.components.year&&(this.optionsStore.minimumCalendarViewMode=2),t.display.components.month&&(this.optionsStore.minimumCalendarViewMode=1),t.display.components.date&&(this.optionsStore.minimumCalendarViewMode=0),this.optionsStore.currentCalendarViewMode=Math.max(this.optionsStore.minimumCalendarViewMode,this.optionsStore.currentCalendarViewMode),d[this.optionsStore.currentCalendarViewMode].name!==t.display.viewMode&&(this.optionsStore.currentCalendarViewMode=Math.max(d.findIndex((e=>e.name===t.display.viewMode)),this.optionsStore.minimumCalendarViewMode)),(null===(i=this.display)||void 0===i?void 0:i.isVisible)&&this.display._update("all"),this.optionsStore.options=t}_initializeInput(){if("INPUT"==this.optionsStore.element.tagName)this.optionsStore.input=this.optionsStore.element;else{let t=this.optionsStore.element.dataset.tdTargetInput;this.optionsStore.input=null==t||"nearest"==t?this.optionsStore.element.querySelector("input"):this.optionsStore.element.querySelector(t)}this.optionsStore.input&&(this.optionsStore.input.addEventListener("change",this._inputChangeEvent),this.optionsStore.options.allowInputToggle&&this.optionsStore.input.addEventListener("click",this._toggleClickEvent),this.optionsStore.input.value&&this._inputChangeEvent())}_initializeToggle(){if(this.optionsStore.options.display.inline)return;let t=this.optionsStore.element.dataset.tdTargetToggle;"nearest"==t&&(t='[data-td-toggle="datetimepicker"]'),this._toggle=null==t?this.optionsStore.element:this.optionsStore.element.querySelector(t),this._toggle.addEventListener("click",this._toggleClickEvent)}_handleAfterChangeEvent(t){var e,s;!this.optionsStore.options.promptTimeOnDateChange||this.optionsStore.options.display.inline||this.optionsStore.options.display.sideBySide||!this.display._hasTime||(null===(e=this.display.widget)||void 0===e?void 0:e.getElementsByClassName(r.css.show)[0].classList.contains(r.css.timeContainer))||!t.oldDate&&this.optionsStore.options.useCurrent||t.oldDate&&(null===(s=t.date)||void 0===s?void 0:s.isSame(t.oldDate))||(clearTimeout(this._currentPromptTimeTimeout),this._currentPromptTimeTimeout=setTimeout((()=>{this.display.widget&&this._eventEmitters.action.emit({e:{currentTarget:this.display.widget.querySelector(`.${r.css.switch} div`)},action:S.togglePicker})}),this.optionsStore.options.promptTimeOnDateChangeTransitionDelay))}}const $={};t.DateTime=o,t.DefaultOptions=l,t.Namespace=r,t.TempusDominus=A,t.extend=function(t,e){return t.$i||(t.load(e,{TempusDominus:A,Dates:g,Display:T},this),t.$i=!0),this},t.loadLocale=t=>{$[t.name]||($[t.name]=t.localization)},t.locale=t=>{let e=$[t];e&&(l.localization=e)},Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/locales/de.js b/dist/locales/de.js new file mode 100644 index 000000000..1e6b8f08b --- /dev/null +++ b/dist/locales/de.js @@ -0,0 +1,37 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.locales=g.tempusDominus.locales||{},g.tempusDominus.locales.de={})));})(this,(function(exports){'use strict';const name = 'de'; +const localization = { + today: 'Heute', + clear: 'Auswahl löschen', + close: 'Auswahlbox schließen', + selectMonth: 'Monat wählen', + previousMonth: 'Letzter Montat', + nextMonth: 'Nächster Monat', + selectYear: 'Jahr wählen', + previousYear: 'Letztes Jahr', + nextYear: 'Nächstes Jahr', + selectDecade: 'Jahrzehnt wählen', + previousDecade: 'Letztes Jahrzent', + nextDecade: 'Nächstes Jahrzent', + previousCentury: 'Letztes Jahrhundert', + nextCentury: 'Nächstes Jahrhundert', + pickHour: 'Stunde wählen', + incrementHour: 'Stunde erhöhen', + decrementHour: 'Stunde verringern', + pickMinute: 'Minute wählen', + incrementMinute: 'Minute erhöhen', + decrementMinute: 'Minute verringern', + pickSecond: 'Sekunde wählen', + incrementSecond: 'Sekunde erhöhen', + decrementSecond: 'Sekunde verringern', + toggleMeridiem: 'Tageszeit umschalten', + selectTime: 'Zeit wählen', + selectDate: 'Datum wählen', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'de', + startOfTheWeek: 1 +};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/locales/es.js b/dist/locales/es.js new file mode 100644 index 000000000..cc822f80e --- /dev/null +++ b/dist/locales/es.js @@ -0,0 +1,37 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.locales=g.tempusDominus.locales||{},g.tempusDominus.locales.es={})));})(this,(function(exports){'use strict';const name = 'es'; +const localization = { + today: 'Hoy', + clear: 'Borrar selección', + close: 'Cerrar selector', + selectMonth: 'Seleccionar mes', + previousMonth: 'Mes anterior', + nextMonth: 'Próximo mes', + selectYear: 'Seleccionar año', + previousYear: 'Año anterior', + nextYear: 'Próximo año', + selectDecade: 'Seleccionar década', + previousDecade: 'Década anterior', + nextDecade: 'Próxima década', + previousCentury: 'Siglo anterior', + nextCentury: 'Próximo siglo', + pickHour: 'Elegir hora', + incrementHour: 'Incrementar hora', + decrementHour: 'Decrementar hora', + pickMinute: 'Elegir minuto', + incrementMinute: 'Incrementar minuto', + decrementMinute: 'Decrementar minuto', + pickSecond: 'Elegir segundo', + incrementSecond: 'Incrementar segundo', + decrementSecond: 'Decrementar segundo', + toggleMeridiem: 'Cambiar AM/PM', + selectTime: 'Seleccionar tiempo', + selectDate: 'Seleccionar fecha', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'es', + startOfTheWeek: 1 +};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/locales/it.js b/dist/locales/it.js new file mode 100644 index 000000000..c70f327cc --- /dev/null +++ b/dist/locales/it.js @@ -0,0 +1,37 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.locales=g.tempusDominus.locales||{},g.tempusDominus.locales.it={})));})(this,(function(exports){'use strict';const name = 'it'; +const localization = { + today: 'Oggi', + clear: 'Cancella selezione', + close: 'Chiudi', + selectMonth: 'Seleziona mese', + previousMonth: 'Mese precedente', + nextMonth: 'Mese successivo', + selectYear: 'Seleziona anno', + previousYear: 'Anno precedente', + nextYear: 'Anno successivo', + selectDecade: 'Seleziona Decennio', + previousDecade: 'Decennio precedente', + nextDecade: 'Decennio successivo', + previousCentury: 'Secolo precedente', + nextCentury: 'Secolo successivo', + pickHour: "Seleziona l'ora", + incrementHour: "Incrementa l'ora", + decrementHour: "Decrementa l'ora", + pickMinute: 'Seleziona i minuti', + incrementMinute: 'Incrementa i minuti', + decrementMinute: 'Decrementa i minuti', + pickSecond: 'Seleziona i secondi', + incrementSecond: 'Incrementa i secondi', + decrementSecond: 'Decrementa i secondi', + toggleMeridiem: 'Scambia AM-PM', + selectTime: "Seleziona l'ora", + selectDate: 'Seleziona una data', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'it', + startOfTheWeek: 1 +};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/locales/nl.js b/dist/locales/nl.js new file mode 100644 index 000000000..09d772603 --- /dev/null +++ b/dist/locales/nl.js @@ -0,0 +1,37 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.locales=g.tempusDominus.locales||{},g.tempusDominus.locales.nl={})));})(this,(function(exports){'use strict';const name = 'nl'; +const localization = { + today: 'Vandaag', + clear: 'Verwijder selectie', + close: 'Sluit de picker', + selectMonth: 'Selecteer een maand', + previousMonth: 'Vorige maand', + nextMonth: 'Volgende maand', + selectYear: 'Selecteer een jaar', + previousYear: 'Vorige jaar', + nextYear: 'Volgende jaar', + selectDecade: 'Selecteer decennium', + previousDecade: 'Vorige decennium', + nextDecade: 'Volgende decennium', + previousCentury: 'Vorige eeuw', + nextCentury: 'Volgende eeuw', + pickHour: 'Kies een uur', + incrementHour: 'Verhoog uur', + decrementHour: 'Verlaag uur', + pickMinute: 'Kies een minute', + incrementMinute: 'Verhoog minuut', + decrementMinute: 'Verlaag minuut', + pickSecond: 'Kies een seconde', + incrementSecond: 'Verhoog seconde', + decrementSecond: 'Verlaag seconde', + toggleMeridiem: 'Schakel tussen AM/PM', + selectTime: 'Selecteer een tijd', + selectDate: 'Selecteer een datum', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'nl', + startOfTheWeek: 1 +};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/locales/ro.js b/dist/locales/ro.js new file mode 100644 index 000000000..546c19b85 --- /dev/null +++ b/dist/locales/ro.js @@ -0,0 +1,37 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.locales=g.tempusDominus.locales||{},g.tempusDominus.locales.ro={})));})(this,(function(exports){'use strict';const name = 'ro'; +const localization = { + today: 'Mergi la ziua de astăzi', + clear: 'Șterge selecția', + close: 'Închide calendarul', + selectMonth: 'Selectează luna', + previousMonth: 'Luna precedentă', + nextMonth: 'Luna următoare', + selectYear: 'Selectează anul', + previousYear: 'Anul precedent', + nextYear: 'Anul următor', + selectDecade: 'Selectează deceniul', + previousDecade: 'Deceniul precedent', + nextDecade: 'Deceniul următor', + previousCentury: 'Secolul precedent', + nextCentury: 'Secolul următor', + pickHour: 'Alege ora', + incrementHour: 'Incrementează ora', + decrementHour: 'Decrementează ora', + pickMinute: 'Alege minutul', + incrementMinute: 'Incrementează minutul', + decrementMinute: 'Decrementează minutul', + pickSecond: 'Alege secunda', + incrementSecond: 'Incrementează secunda', + decrementSecond: 'Decrementează secunda', + toggleMeridiem: 'Comută modul AM/PM', + selectTime: 'Selectează ora', + selectDate: 'Selectează data', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'ro', + startOfTheWeek: 1 +};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/locales/ru.js b/dist/locales/ru.js new file mode 100644 index 000000000..e05a4fabe --- /dev/null +++ b/dist/locales/ru.js @@ -0,0 +1,37 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.locales=g.tempusDominus.locales||{},g.tempusDominus.locales.ru={})));})(this,(function(exports){'use strict';const name = 'ru'; +const localization = { + today: 'Перейти сегодня', + clear: 'Очистить выделение', + close: 'Закрыть сборщик', + selectMonth: 'Выбрать месяц', + previousMonth: 'Предыдущий месяц', + nextMonth: 'В следующем месяце', + selectYear: 'Выбрать год', + previousYear: 'Предыдущий год', + nextYear: 'В следующем году', + selectDecade: 'Выбрать десятилетие', + previousDecade: 'Предыдущее десятилетие', + nextDecade: 'Следующее десятилетие', + previousCentury: 'Предыдущий век', + nextCentury: 'Следующий век', + pickHour: 'Выберите час', + incrementHour: 'Время увеличения', + decrementHour: 'Уменьшить час', + pickMinute: 'Выбрать минуту', + incrementMinute: 'Минута приращения', + decrementMinute: 'Уменьшить минуту', + pickSecond: 'Выбрать второй', + incrementSecond: 'Увеличение секунды', + decrementSecond: 'Уменьшение секунды', + toggleMeridiem: 'Переключить период', + selectTime: 'Выбрать время', + selectDate: 'Выбрать дату', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'ru', + startOfTheWeek: 1 +};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/plugins/examples/sample.js b/dist/plugins/examples/sample.js new file mode 100644 index 000000000..25d27d8be --- /dev/null +++ b/dist/plugins/examples/sample.js @@ -0,0 +1,30 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.sample={})));})(this,(function(exports){'use strict';// noinspection JSUnusedGlobalSymbols +const load = (option, tdClasses, tdFactory) => { + // extend the picker + // e.g. add new tempusDominus.TempusDominus(...).someFunction() + tdClasses.TempusDominus.prototype.someFunction = (a, logger) => { + logger = logger || console.log; + logger(a); + }; + // extend tempusDominus + // e.g. add tempusDominus.example() + tdFactory.example = (a, logger) => { + logger = logger || console.log; + logger(a); + }; + // overriding existing API + // e.g. extend new tempusDominus.TempusDominus(...).show() + const oldShow = tdClasses.TempusDominus.prototype.show; + tdClasses.TempusDominus.prototype.show = function (a, logger) { + logger = logger || console.log; + alert('from plugin'); + logger(a); + oldShow.bind(this)(); + // return modified result + }; +};exports.load=load;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/plugins/fa-five.js b/dist/plugins/fa-five.js new file mode 100644 index 000000000..80e4423e8 --- /dev/null +++ b/dist/plugins/fa-five.js @@ -0,0 +1,22 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.fa_five={})));})(this,(function(exports){'use strict';// this obviously requires the FA 6 libraries to be loaded +const faFiveIcons = { + type: 'icons', + time: 'fas fa-clock', + date: 'fas fa-calendar', + up: 'fas fa-arrow-up', + down: 'fas fa-arrow-down', + previous: 'fas fa-chevron-left', + next: 'fas fa-chevron-right', + today: 'fas fa-calendar-check', + clear: 'fas fa-trash', + close: 'fas fa-times', +}; +// noinspection JSUnusedGlobalSymbols +const load = (_, __, tdFactory) => { + tdFactory.DefaultOptions.display.icons = faFiveIcons; +};exports.faFiveIcons=faFiveIcons;exports.load=load;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/dist/plugins/moment-parse.js b/dist/plugins/moment-parse.js new file mode 100644 index 000000000..55a67579c --- /dev/null +++ b/dist/plugins/moment-parse.js @@ -0,0 +1,20 @@ +/*! + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) + * Copyright 2013-2022 Jonathan Peterson + * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f((g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.moment_parse={})));})(this,(function(exports){'use strict';const load = (option, tdClasses, tdFactory) => { + tdClasses.Dates.prototype.setFromInput = function (value, index) { + let converted = moment(value, option); + if (converted.isValid()) { + let date = tdFactory.DateTime.convert(converted.toDate(), this.optionsStore.options.localization.locale); + this.setValue(date, index); + } + else { + console.warn('Momentjs failed to parse the input date.'); + } + }; + tdClasses.Dates.prototype.formatInput = function (date) { + return moment(date).format(option); + }; +};exports.load=load;Object.defineProperty(exports,'__esModule',{value:true});})); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e79d77787..44f59d0fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@eonasdan/tempus-dominus", - "version": "6.0.0-beta2", + "version": "6.0.0-beta4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@eonasdan/tempus-dominus", - "version": "6.0.0-beta2", + "version": "6.0.0-beta4", "license": "MIT", "devDependencies": { "@popperjs/core": "^2.11.2", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-typescript": "^8.3.0", + "@rollup/plugin-typescript": "^8.3.1", "@types/node": "^17.0.8", "bootstrap": "^5.1.3", "browser-sync": "^2.27.7", @@ -27,6 +27,8 @@ "prettier": "^2.5.1", "rollup": "^2.64.0", "rollup-plugin-postcss": "^4.0.2", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-typescript2": "0.31.1", "sass": "^1.48.0", "terser": "^5.10.0", "tslib": "^2.3.1", @@ -39,6 +41,94 @@ "@popperjs/core": "^2.10.1" } }, + "node_modules/@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -114,9 +204,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz", - "integrity": "sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.1.tgz", + "integrity": "sha512-84rExe3ICUBXzqNX48WZV2Jp3OddjTMX97O2Py6D1KJaGSwWp0mDHXj+bCGNJqWHIEKDIT2U0sDjhP4czKi6cA==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -163,6 +253,28 @@ "node": ">=10.13.0" } }, + "node_modules/@ts-type/package-dts": { + "version": "1.0.58", + "resolved": "https://registry.npmjs.org/@ts-type/package-dts/-/package-dts-1.0.58.tgz", + "integrity": "sha512-Ry5RPZDAnSz/gyLtjd2a2yNC07CZ/PCOsuDzYj3phOolIgEH68HXRw6SbsDlavnVUEenDYj5GUM10gQ5iVEbVQ==", + "dev": true, + "dependencies": { + "@types/semver": "^7.3.9", + "ts-type": "^2.1.4" + }, + "peerDependencies": { + "@types/bluebird": "*", + "@types/node": "*", + "ts-toolbelt": "*" + } + }, + "node_modules/@types/bluebird": { + "version": "3.5.36", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz", + "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", + "dev": true, + "peer": true + }, "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -175,6 +287,27 @@ "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.3.9", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", + "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==", + "dev": true + }, + "node_modules/@yarn-tool/resolve-package": { + "version": "1.0.42", + "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.42.tgz", + "integrity": "sha512-1BAsoiD6jGAaPc7mRH0UxIVXgRSTv7fnhwfKkaFUYpqsU4ZR7KIigZTMcb2bujtlzKQbNneMPQGjiqe3F8cmlw==", + "dev": true, + "dependencies": { + "@ts-type/package-dts": "^1.0.58", + "pkg-dir": "< 6 >= 5", + "tslib": "^2.3.1", + "upath2": "^3.1.12" + }, + "peerDependencies": { + "@types/node": "*" + } + }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -776,6 +909,12 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, "node_modules/component-bind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", @@ -1668,6 +1807,35 @@ "ms": "2.0.0" } }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-cache-dir/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -1682,9 +1850,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", "dev": true, "funding": [ { @@ -1876,6 +2044,15 @@ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", "dev": true }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -2274,6 +2451,47 @@ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", "dev": true }, + "node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "node_modules/jsdom": { "version": "18.1.1", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-18.1.1.tgz", @@ -2514,12 +2732,33 @@ "tslib": "^2.0.3" } }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mdn-data": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2915,12 +3154,30 @@ "node": ">=0.10.0" } }, + "node_modules/path-is-network-drive": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.13.tgz", + "integrity": "sha512-Hg74mRN6mmXV+gTm3INjFK40ncAmC/Lo4qoQaSZ+GT3hZzlKdWQSqAjqyPeW0SvObP2W073WyYEBWY9d3wOm3A==", + "dev": true, + "dependencies": { + "tslib": "^2.3.1" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-strip-sep": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.10.tgz", + "integrity": "sha512-JpCy+8LAJQQTO1bQsb/84s1g+/Stm3h39aOpPRBQ/paMUGVPPZChLTOTKHoaCkc/6sKuF7yVsnq5Pe1S6xQGcA==", + "dev": true, + "dependencies": { + "tslib": "^2.3.1" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -2954,6 +3211,79 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "dependencies": { + "find-up": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/portscanner": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", @@ -3609,6 +3939,15 @@ "node": ">= 0.8" } }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -3664,13 +4003,16 @@ "dev": true }, "node_modules/resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, "dependencies": { - "is-core-module": "^2.1.0", + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-from": { @@ -3808,6 +4150,87 @@ "node": ">=8" } }, + "node_modules/rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0" + } + }, + "node_modules/rollup-plugin-typescript2": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.1.tgz", + "integrity": "sha512-sklqXuQwQX+stKi4kDfEkneVESPi3YM/2S899vfRdF9Yi40vcC50Oq4A4cSZJNXsAQE/UsBZl5fAOsBLziKmjw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^4.1.0", + "@yarn-tool/resolve-package": "^1.0.36", + "find-cache-dir": "^3.3.1", + "fs-extra": "8.1.0", + "resolve": "1.20.0", + "tslib": "2.2.0" + }, + "peerDependencies": { + "rollup": ">=1.26.3", + "typescript": ">=2.4.0" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", + "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/rollup-plugin-typescript2/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "dev": true + }, "node_modules/rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -3917,6 +4340,15 @@ "node": ">=10" } }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", @@ -3986,6 +4418,15 @@ "node": ">= 0.6" } }, + "node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -4479,6 +4920,28 @@ "tree-kill": "cli.js" } }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "dev": true, + "peer": true + }, + "node_modules/ts-type": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/ts-type/-/ts-type-2.1.4.tgz", + "integrity": "sha512-wnajiiIMhn/RHJ1oPld95siKmMJrOgaT6+rMmC8vO1LORgDFEzKP2nBmEFM5b4XVe7Q0J5KcU9oRJFzju7UzrA==", + "dev": true, + "dependencies": { + "tslib": "^2.3.1", + "typedarray-dts": "^1.0.0" + }, + "peerDependencies": { + "@types/bluebird": "*", + "@types/node": "*", + "ts-toolbelt": "^9.6.0" + } + }, "node_modules/tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -4497,6 +4960,12 @@ "node": ">= 0.8.0" } }, + "node_modules/typedarray-dts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz", + "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==", + "dev": true + }, "node_modules/typescript": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", @@ -4565,6 +5034,20 @@ "node": ">= 0.8" } }, + "node_modules/upath2": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.12.tgz", + "integrity": "sha512-yC3eZeCyCXFWjy7Nu4pgjLhXNYjuzuUmJiRgSSw6TJp8Emc+E4951HGPJf+bldFC5SL7oBLeNbtm1fGzXn2gxw==", + "dev": true, + "dependencies": { + "path-is-network-drive": "^1.0.13", + "path-strip-sep": "^1.0.10", + "tslib": "^2.3.1" + }, + "peerDependencies": { + "@types/node": "*" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -4910,9 +5393,93 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.16.7" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -4971,9 +5538,9 @@ } }, "@rollup/plugin-typescript": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz", - "integrity": "sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.1.tgz", + "integrity": "sha512-84rExe3ICUBXzqNX48WZV2Jp3OddjTMX97O2Py6D1KJaGSwWp0mDHXj+bCGNJqWHIEKDIT2U0sDjhP4czKi6cA==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -5003,6 +5570,23 @@ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", "dev": true }, + "@ts-type/package-dts": { + "version": "1.0.58", + "resolved": "https://registry.npmjs.org/@ts-type/package-dts/-/package-dts-1.0.58.tgz", + "integrity": "sha512-Ry5RPZDAnSz/gyLtjd2a2yNC07CZ/PCOsuDzYj3phOolIgEH68HXRw6SbsDlavnVUEenDYj5GUM10gQ5iVEbVQ==", + "dev": true, + "requires": { + "@types/semver": "^7.3.9", + "ts-type": "^2.1.4" + } + }, + "@types/bluebird": { + "version": "3.5.36", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz", + "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", + "dev": true, + "peer": true + }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -5015,6 +5599,24 @@ "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", "dev": true }, + "@types/semver": { + "version": "7.3.9", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", + "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==", + "dev": true + }, + "@yarn-tool/resolve-package": { + "version": "1.0.42", + "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.42.tgz", + "integrity": "sha512-1BAsoiD6jGAaPc7mRH0UxIVXgRSTv7fnhwfKkaFUYpqsU4ZR7KIigZTMcb2bujtlzKQbNneMPQGjiqe3F8cmlw==", + "dev": true, + "requires": { + "@ts-type/package-dts": "^1.0.58", + "pkg-dir": "< 6 >= 5", + "tslib": "^2.3.1", + "upath2": "^3.1.12" + } + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -5506,6 +6108,12 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, "component-bind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", @@ -6203,6 +6811,28 @@ } } }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "dependencies": { + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + } + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6214,9 +6844,9 @@ } }, "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", "dev": true }, "form-data": { @@ -6357,6 +6987,12 @@ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", "dev": true }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -6674,6 +7310,40 @@ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", "dev": true }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "jsdom": { "version": "18.1.1", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-18.1.1.tgz", @@ -6861,12 +7531,27 @@ "tslib": "^2.0.3" } }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, "mdn-data": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -7177,12 +7862,30 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-network-drive": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.13.tgz", + "integrity": "sha512-Hg74mRN6mmXV+gTm3INjFK40ncAmC/Lo4qoQaSZ+GT3hZzlKdWQSqAjqyPeW0SvObP2W073WyYEBWY9d3wOm3A==", + "dev": true, + "requires": { + "tslib": "^2.3.1" + } + }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-strip-sep": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.10.tgz", + "integrity": "sha512-JpCy+8LAJQQTO1bQsb/84s1g+/Stm3h39aOpPRBQ/paMUGVPPZChLTOTKHoaCkc/6sKuF7yVsnq5Pe1S6xQGcA==", + "dev": true, + "requires": { + "tslib": "^2.3.1" + } + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -7201,6 +7904,54 @@ "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", "dev": true }, + "pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "requires": { + "find-up": "^5.0.0" + }, + "dependencies": { + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + } + } + }, "portscanner": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", @@ -7612,6 +8363,15 @@ "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=", "dev": true }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -7655,12 +8415,12 @@ "dev": true }, "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, "requires": { - "is-core-module": "^2.1.0", + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } }, @@ -7763,6 +8523,76 @@ } } }, + "rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + } + }, + "rollup-plugin-typescript2": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.1.tgz", + "integrity": "sha512-sklqXuQwQX+stKi4kDfEkneVESPi3YM/2S899vfRdF9Yi40vcC50Oq4A4cSZJNXsAQE/UsBZl5fAOsBLziKmjw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^4.1.0", + "@yarn-tool/resolve-package": "^1.0.36", + "find-cache-dir": "^3.3.1", + "fs-extra": "8.1.0", + "resolve": "1.20.0", + "tslib": "2.2.0" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", + "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", + "dev": true, + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "tslib": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "dev": true + } + } + }, "rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -7850,6 +8680,12 @@ "xmlchars": "^2.2.0" } }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", @@ -7912,6 +8748,15 @@ } } }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -8320,6 +9165,23 @@ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, + "ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "dev": true, + "peer": true + }, + "ts-type": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/ts-type/-/ts-type-2.1.4.tgz", + "integrity": "sha512-wnajiiIMhn/RHJ1oPld95siKmMJrOgaT6+rMmC8vO1LORgDFEzKP2nBmEFM5b4XVe7Q0J5KcU9oRJFzju7UzrA==", + "dev": true, + "requires": { + "tslib": "^2.3.1", + "typedarray-dts": "^1.0.0" + } + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -8335,6 +9197,12 @@ "prelude-ls": "~1.1.2" } }, + "typedarray-dts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz", + "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==", + "dev": true + }, "typescript": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", @@ -8374,6 +9242,17 @@ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, + "upath2": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.12.tgz", + "integrity": "sha512-yC3eZeCyCXFWjy7Nu4pgjLhXNYjuzuUmJiRgSSw6TJp8Emc+E4951HGPJf+bldFC5SL7oBLeNbtm1fGzXn2gxw==", + "dev": true, + "requires": { + "path-is-network-drive": "^1.0.13", + "path-strip-sep": "^1.0.10", + "tslib": "^2.3.1" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -8638,6 +9517,12 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index f06f0117d..b9f328e14 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "Jonathan Peterson" }, "name": "@eonasdan/tempus-dominus", - "version": "6.0.0-beta2", + "version": "6.0.0-beta4", "style": "dist/css/tempus-dominus.css", "sass": "scss/tempus-dominus.scss", "main": "dist/js/tempus-dominus.js", @@ -18,7 +18,8 @@ "scripts": { "start": "npm run build && concurrently \"npm:*-watch\" \"npm run serve\"", "serve": "browser-sync start --config build/browser-sync-config.js", - "build": "npm run rollup && node ./build/copyToDist.js", + "build": "node ./build/copyToDist.js && npm run rollup", + "build:plugins": "node ./build/plugins.js", "build:declarations": "tsc --declaration --emitDeclarationOnly --outDir types", "sass": "sass ./src/sass/tempus-dominus.scss ./dist/css/tempus-dominus.css", "rollup": "rollup -c ./build/rollup.config.js", @@ -26,8 +27,8 @@ "prettier": "prettier --write .", "docs": "node ./src/docs/make.js", "docs-watch": "node ./src/docs/make.js --watch", - "release": "npm run build && npm run build:declarations", - "release-version": "npm run release && node build/change-version.js" + "release": "npm run build && npm run build:plugins && npm run build:declarations", + "release:version": "npm run release && node build/change-version.js" }, "bugs": { "url": "https://github.com/eonasdan/tempus-dominus/issues" @@ -39,7 +40,6 @@ "devDependencies": { "@popperjs/core": "^2.11.2", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-typescript": "^8.3.0", "@types/node": "^17.0.8", "bootstrap": "^5.1.3", "browser-sync": "^2.27.7", @@ -55,10 +55,13 @@ "prettier": "^2.5.1", "rollup": "^2.64.0", "rollup-plugin-postcss": "^4.0.2", + "rollup-plugin-typescript2": "0.31.1", "sass": "^1.48.0", "terser": "^5.10.0", "tslib": "^2.3.1", - "typescript": "~4.5.4" + "typescript": "~4.5.4", + "rollup-plugin-terser":"^7.0.2", + "@rollup/plugin-typescript": "^8.3.1" }, "homepage": "https://getdatepicker.com/", "keywords": [ diff --git a/src/docs/make.js b/src/docs/make.js index 5674ce7fc..828ed5319 100644 --- a/src/docs/make.js +++ b/src/docs/make.js @@ -174,10 +174,16 @@ class Build { entry.isDirectory() ? this.copyDirectory(sourcePath, destinationPath) - : fs.copyFileSync(sourcePath, destinationPath); + : this.copyFileAndEnsurePathExists(sourcePath, destinationPath); }); } + copyFileAndEnsurePathExists(filePath, content) { + fs.mkdirSync(path.dirname(filePath), { recursive: true }); + + fs.copyFileSync(filePath, content); + } + writeFileAndEnsurePathExists(filePath, content) { fs.mkdirSync(path.dirname(filePath), { recursive: true }); @@ -567,6 +573,8 @@ ${this.siteMap} updateDist() { this.copyDirectory(path.join('.','dist', 'js'), path.join('.', siteConfig.output, 'js')); this.copyDirectory(path.join('.','dist', 'css'), path.join('.', siteConfig.output, 'css')); + this.copyDirectory(path.join('.','dist', 'plugins'), path.join('.', siteConfig.output, 'js', 'plugins')); + this.copyDirectory(path.join('.','dist', 'locales'), path.join('.', siteConfig.output, 'js', 'locales')); } /** @@ -626,11 +634,11 @@ builder.updateAll(); if (process.argv.slice(2)[0] === '--watch') { const watcher = chokidar.watch( [ - 'src/docs/partials', - 'src/docs/styles', - 'src/docs/templates', - 'src/docs/js', - 'src/docs/assets', + path.join('src', 'docs', 'partials'), + path.join('src', 'docs', 'styles'), + path.join('src', 'docs', 'templates'), + path.join('src', 'docs', 'js'), + path.join('src', 'docs', 'assets'), 'dist/', ], { @@ -643,39 +651,39 @@ if (process.argv.slice(2)[0] === '--watch') { let lastChange = ''; let lastChangeFile = ''; - const handleChange = (event, path) => { - if (path.includes('.map.')) return; - log(`${event}: ${path}`); + const handleChange = (event, file) => { + if (file.includes('.map.')) return; + log(`${event}: ${file}`); try { - if (path.startsWith('dist')) { + if (file.startsWith('dist')) { builder.updateDist(); } - if (path.startsWith('src/docs/assets')) { + if (file.startsWith(path.join('src', 'docs', 'assets'))) { builder.copyAssets(); } - if (path.startsWith('src/docs/partials')) { + if (file.startsWith(path.join('src', 'docs', 'partials'))) { //reading the file stats seems to trigger this twice, so if the same file changed in less then a second, ignore if ( lastChange === formatter.format(new Date()) && - lastChangeFile === path + lastChangeFile === file ) { log(`Skipping duplicate trigger`); return; } builder.updatePages(); } - if (path.startsWith('src/docs/styles')) { + if (file.startsWith(path.join('src', 'docs', 'styles'))) { builder.updateCss(); } - if (path.startsWith('src/docs/templates')) { + if (file.startsWith(path.join('src', 'docs', 'templates'))) { builder.updateAll(); } - if (path.startsWith('src/docs/js')) { + if (file.startsWith(path.join('src', 'docs', 'js'))) { builder.minifyJs().then(); } log('\x1b[32m Update successful'); lastChange = formatter.format(new Date()); - lastChangeFile = path; + lastChangeFile = file; console.log(''); } catch (e) { log('Something went wrong'); diff --git a/src/docs/partials/change-log.html b/src/docs/partials/change-log.html index 7d567a015..caf576183 100644 --- a/src/docs/partials/change-log.html +++ b/src/docs/partials/change-log.html @@ -1,11 +1,63 @@

Version 6

+

Version 6-beta4

+

New

+
    +
  • Dark mode! The picker now has dark mode when the user's preference is dark.
  • +
  • Wrote a tiny service locator/di container in an effort to make plugins better
  • +
  • Added a momentjs plugin
  • +
  • Added DE, ES, IT, NL, RO locales thanks to @jcompagner via #2484. +
  • +
  • toggleMeridiem supports a comma separated list. #2399. +
  • +
  • + All event types now provide viewMode which provides + 'clock' | 'calendar' | 'months' | 'years' | 'decades' depending what view + the event occurred. + #2428. +
  • +
+

Breaking changes

+
    +
  • Plugins work a little differently now. Hopefully they are a bit cleaner to work with now
  • +
  • Hooks have been removed. Plugins are a better way to handle this. You can look at the momentjs plugin for a + guide. +
  • +
  • Locale loading and authoring has changed a bit as well.
  • +
  • ViewUpdateEvent no longer provides change: Unit.
  • +
+

Bug fixes

+
    +
  • Fixed event 'hide.td' not triggered when input is empty. #2424. +
  • +
  • Fixed input change event trigger. #2401. +
  • +
  • Fixed dataset deletion issue. #2483. +
  • +
  • Fixed month manipulation issue #2474. 2486. +
  • +
  • Fixed Wrong calendar rendering when startOfTheWeek #2473. +
  • +
  • Fixed viewMode option not respected (#2466) thanks @jmolinap via #2494. +
  • +

Version 6-beta3

New

  • Allow to change parent container for the widget via #2462.
  • + href='https://github.com/Eonasdan/tempus-dominus/pull/2462'>via #2462. +
  • Moved docs to gh-pages and setup a github action to move compiled docs to that branch.

Bug fixes

diff --git a/src/docs/partials/examples/index.html b/src/docs/partials/examples/index.html index 9f5dca19d..508a21a54 100644 --- a/src/docs/partials/examples/index.html +++ b/src/docs/partials/examples/index.html @@ -1,44 +1,48 @@ -
-

- Version 6 removes the need for an input field, Bootstrap, jQuery and MomemntJs. -

-

- If you still need jQuery, check out the jQuery examples. -

-
-
-

Minimum Setup

- -

- All you need is an element to atach the picker to. -

- -
- -
-
+
+

+ Version 6 removes the need for an input field, Bootstrap, jQuery and MomemntJs. + Each example comes code section that can be toggled by clicking on . +

+

+ If you still need jQuery, check out the jQuery examples. +

+
+ +
+

Minimum Setup

+ +

+ All you need is an element to attach the picker to. +

+ + -
-
- Events will display as you manipulate the picker. -
-
-
-
-
-
-
+
+
+
- + +
+
-
-
- -
- -
-

Simple Setup - - - - - - -

- -

- This is the simplest setup you can have with Bootstrap and Font Awesome 5. The picker defaults to FA 5 Solid - icons, however you can overwrite the defaults globally. -

- -
- -
-
+ +
+ +
+

Simple Setup + + + + + + +

+ +

+ This is the simplest setup you can have with Bootstrap and Font Awesome 5. The picker defaults to FA 5 Solid + icons, however you can overwrite the defaults globally. +

+ +
+ +
+
            
  <div
@@ -143,72 +150,75 @@ 

Simple Setup data-td-target='#datetimepicker1' data-td-toggle='datetimepicker' > - <span class='fas fa-calendar'></span> + <span class='fa-solid fa-calendar'></span> </span> </div>

-
-
+
+
            
  new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'));
            
          
+
+
+
+ Events will display as you manipulate the picker. +
+
+
-
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Using Locales

- -

- You can provide localization options to override the tooltips as well as the day/month display. -

-

- You could also set this globally via tempusDominus.DefaultOptions.localization = { ... } or by - creating a variable e.g. const ru = { today:'Перейти сегодня' ... }; then provide the options as -

-
+        
+    
+ +
+

Using Locales

+ +

+ You can provide localization options to override the tooltips as well as the day/month display. +

+

+ You could also set this globally via tempusDominus.DefaultOptions.localization = { ... } or by + creating a variable e.g. const ru = { today:'Перейти сегодня' ... }; then provide the options + as +

+
          
  new tempusDominus.TempusDominus(document.getElementById('datetimepicker2'), {
    localization: ru
@@ -216,30 +226,32 @@ 

Using Locales

-
- -
-
+
+ +
+ -
+
+
            
  new tempusDominus.TempusDominus(document.getElementById('datetimepicker2'), {
      localization: {
-       today: "Перейти сегодня",
-       clear: 'Очистить выделение',
-       close: 'Закрыть сборщик',
-       selectMonth: 'Выбрать месяц',
-       previousMonth: "Предыдущий месяц",
-       nextMonth: "В следующем месяце",
-       selectYear: 'Выбрать год',
-       previousYear: 'Предыдущий год',
-       nextYear: 'В следующем году',
-       selectDecade: 'Выбрать десятилетие',
-       previousDecade: 'Предыдущее десятилетие',
-       nextDecade: 'Следующее десятилетие',
-       previousCentury: 'Предыдущий век',
-       nextCentury: 'Следующий век',
-       pickHour: "Выберите час",
-       incrementHour: 'Время увеличения',
-       decrementHour: 'Уменьшить час',
-       pickMinute: 'Выбрать минуту',
-       incrementMinute: 'Минута приращения',
-       decrementMinute: 'Уменьшить минуту',
-       pickSecond: 'Выбрать второй',
-       incrementSecond: 'Увеличение секунды',
-       decrementSecond: 'Уменьшение секунды',
-       toggleMeridiem: 'Переключить период',
-       selectTime: 'Выбрать время',
-       selectDate: 'Выбрать дату',
-       dayViewHeaderFormat: 'long',
-       locale: 'ru'
+        today: 'Перейти сегодня',
+        clear: 'Очистить выделение',
+        close: 'Закрыть сборщик',
+        selectMonth: 'Выбрать месяц',
+        previousMonth: 'Предыдущий месяц',
+        nextMonth: 'В следующем месяце',
+        selectYear: 'Выбрать год',
+        previousYear: 'Предыдущий год',
+        nextYear: 'В следующем году',
+        selectDecade: 'Выбрать десятилетие',
+        previousDecade: 'Предыдущее десятилетие',
+        nextDecade: 'Следующее десятилетие',
+        previousCentury: 'Предыдущий век',
+        nextCentury: 'Следующий век',
+        pickHour: 'Выберите час',
+        incrementHour: 'Время увеличения',
+        decrementHour: 'Уменьшить час',
+        pickMinute: 'Выбрать минуту',
+        incrementMinute: 'Минута приращения',
+        decrementMinute: 'Уменьшить минуту',
+        pickSecond: 'Выбрать второй',
+        incrementSecond: 'Увеличение секунды',
+        decrementSecond: 'Уменьшение секунды',
+        toggleMeridiem: 'Переключить период',
+        selectTime: 'Выбрать время',
+        selectDate: 'Выбрать дату',
+        dayViewHeaderFormat: { month: 'long', year: '2-digit' },
+        locale: 'ru',
+        startOfTheWeek: 1
      }
  });
            
          
+
+
+
+ Events will display as you manipulate the picker. +
+
+
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Time Only

- -

- Version 6 no longer uses MomentJs so selecting the what to display is now done via the - display.components. -

- -
- -
-
+ +
+ +
+

Time Only

+ +

+ Version 6 no longer uses MomentJs so selecting the what to display is now done via the + display.components. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Date Only

- -

- Version 6 no longer uses MomentJs so selecting the what to display is now done via the - display.components. -

- -
- -
-
+ +
+ +
+

Date Only

+ +

+ Version 6 no longer uses MomentJs so selecting what to display is now done via the + display.components. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Input Only

- -

- An input group and icon are not required for the picker to function, you can also simply use an input field. -

- -
- -
-
+ +
+ +
+

Input Only

+ +

+ An input group and icon are not required for the picker to function, you can also simply use an input field. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- - + +
+
+
+ + +
+
-
-
- -
- -
-

Enabled/Disabled Dates

- -

- You can provide an array of dates to enable or dates to disable. -

- -
- -
-
+ +
+ +
+

Enabled/Disabled Dates

+ +

+ You can provide an array of dates to enable or dates to disable. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Linked pickers

- -

- You can use event listeners or the subscribe method to link two pickers together. For example, a hotel stay booking. -

- -
- -
-
+ +
+ +
+

Linked pickers

+ +

+ You can use event listeners or the subscribe method to link two pickers together. For example, a hotel stay + booking. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
-
-
- -
- - - +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Custom Icons

- -

- You can change the icons from the Font Awesome default to another icon - set like Bootstrap's Icon -

- -
- -
-
+ +
+ +
+

Custom Icons

+ +

+ You can change the icons from the Font Awesome default to another icon + set like Bootstrap's Icon +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - + +
+
+
+ +
+ + -
+
+
+
-
-
- -
- -
-

View Mode

- -

- The view mode options allows you to show a different initial view. For example selecting a date of birth. -

- -
- -
-
+ +
+ +
+

View Mode

+ +

+ The view mode options allows you to show a different initial view. For example selecting a date of birth. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
-
-

Minimum View

- -

- You can set the minimum view mode by turning off lower level components. If you only want your user to select - month and year, display.components.date: false. The display.components object also - provides convenience shortcuts. For instance if you don't want any of the time picker components to be available - simple set display.components.clock: false. Do be aware that display.components.clock - must be true (default) in order to display the time components regardless of display.components.hours|minutes|seconds - is true. The same applies for display.components.calendar -

- -
- -
-
+ +
+ +
+

Minimum View

+ +

+ You can set the minimum view mode by turning off lower level components. If you only want your user to + select + month and year, display.components.date: false. The display.components object also + provides convenience shortcuts. For instance if you don't want any of the time picker components to be + available + simple set display.components.clock: false. Do be aware that + display.components.clock + must be true (default) in order to display the time components regardless of display.components.hours|minutes|seconds + is true. The same applies for display.components.calendar +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Disabled Days of the Week

- -

- This is the simplest setup you can have with Bootstrap and Font Awesome 5. The picker defaults to FA 5 Solid - icons, however you can overwrite the defaults globally. -

- -
- -
-
+ +
+ +
+

Disabled Days of the Week

+ +

+ This is the simplest setup you can have with Bootstrap and Font Awesome 5. The picker defaults to FA 5 Solid + icons, however you can overwrite the defaults globally. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- - -
-

Inline

- -

- You can also use the picker inline -

- -
- -
-
+ +
+ +
+

Inline

+ +

+ You can also use the picker inline +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
-
+ +
+
+
+ +
+
+
+
-
-
- -
- - -
-

Multiple Dates

- -

- The picker allows for multiple dates to be selected. -

- -
- -
-
+ +
+ +
+

Multiple Dates

+ +

+ The picker allows for multiple dates to be selected. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
+
+
+
-
-
- -
- -
-

Update options

- -

- You can provide a new set of options by calling updateOptions([newOptions]). This function also allows you to reset the options back to the default or merge the new options with the default instead of the existing uptions by passing true as the section parameter. -

- -
- -
-
+ +
+ +
+

Update options

+ +

+ You can provide a new set of options by calling updateOptions([newOptions]). This function also + allows you to reset the options back to the default or merge the new options with the default instead of the + existing uptions by passing true as the section parameter. +

+ + -
-
- Events will display as you manipulate the picker. -
-
- - - -
-
-
- -
- - - + +
+
+
+ +
+ + + -
-
-
-
-
- +
+
+
+
+
+ +
+
-
-
- -
- -
-

Example with container parameter

- -

- All you need is an element to atach the picker to and a parent container. -

- -
- -
-
+ +
+ +
+

Example with container parameter

+ +

+ All you need is an element to attach the picker to and a parent container. +

+ +
+ +
+
            
 <div id='parent-container' class='relative p-5' style='overflow: auto; height: 100px; width: 100%;'>
@@ -1930,13 +1987,14 @@ 

Example with container parameter

-
-
+
+
+
-
-
- Events will display as you manipulate the picker. -
+ +
+
+
+
+ +
+ + + + +
+
+
+
-
- - -
-
-
-
-
- - - + +
+ +
+

Plugins + + + +

+ +

+ Plugins allow you to extend the picker by adding new functionality to either Tempus Dominus globally, + the plugin or by overwritting existing functionality. Check the events tab to see the logs. +

+ +
+ +
+
+
+           
+ <div
+     class='input-group'
+     id='plugins'
+     data-td-target-input='nearest'
+     data-td-target-toggle='nearest'
+ >
+   <input
+     id='pluginsInput'
+     type='text'
+     class='form-control'
+     data-td-target='#plugins'
+   />
+   <span
+     class='input-group-text'
+     data-td-target='#plugins'
+     data-td-toggle='datetimepicker'
+   >
+     <span class='fa-solid fa-calendar'></span>
+   </span>
+ </div>
+           
+         
+
+
+
+           
+/*
+* the bulk of this code isn't really needed. The main requirement is loading the plugin, and calling extend
+* <script src="/path/to/plugin.js"></script>
+* tempusDominus.extend(window.tempusDominus_plugin_PLUGINNAME);
+*/
+const loadPluginButton = document.getElementById('loadPlugin');
+const plugins = new tempusDominus.TempusDominus(document.getElementById('plugins'));
+
+const doLog = (value)=>
+{
+	logger(document.getElementById('plugins-example').getElementsByClassName('logger')[0],
+	  'log',
+	  `from plugin:`, value);
+};
+loadPluginButton.addEventListener('click', () => {
+	const script = document.createElement('script');
+	script.onload = function () {
+	  tempusDominus.extend(window.tempusDominus_plugin_example);
+	  tempusDominus.example('hi', doLog);
+	  plugins.someFunction('world', doLog);
+	  plugins.show('hello world', doLog);
+	};
+	script.src = '/6/js/plugins/example.js';
+
+	document.body.appendChild(script);
+});
+           
+         
+
+
+
+ Events will display as you manipulate the picker. +
+
+
+
+ +
+
+
+ +
+ + + + +
+
+
+
+
+ +
-
- - - -
- - + +
+ +
- Examples - 07/08/2021 - 07/08/2021 - How to use Tempus Dominus datetime picker - - datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + Examples + 07/08/2021 + 02/05/20222 + How to use Tempus Dominus datetime picker + + datepicker, javascript, open source, tempus dominus, eonasdan + diff --git a/src/docs/partials/examples/jquery.html b/src/docs/partials/examples/jquery.html index 689799b57..dddd85057 100644 --- a/src/docs/partials/examples/jquery.html +++ b/src/docs/partials/examples/jquery.html @@ -3,6 +3,7 @@ integrity='sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==' crossorigin='anonymous' referrerpolicy='no-referrer'> +

This page outlines using the picker with jQuery. The jQuery-provider.js file must be included after @@ -17,88 +18,15 @@ With jQuery, you will access those values e.[date|oldDate|ect].

-
-

Minimum Setup

- -

- All you need is an element to atach the picker to. -

- -
- -
-
-
-           
- <span
-   id='icon-only'
-   class='log-event'
-   style='display: inline-block'
- >
-   <i class='fas fa-calendar fa-9x'></i>
- </span>
-           
-         
-
-
-
-           
- $('#icon-only').tempusDominus();
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- - - -
-
-
- -

Simple Setup

- + class='fas fa-anchor' aria-hidden="true">
+ + + +

This is the simplest setup you can have with Bootstrap and Font Awesome 5. The picker defaults to FA 5 Solid icons, however you can overwrite the defaults globally. @@ -200,1788 +128,13 @@

Simple Setup

- -
-

Using Locales

- -

- You can provide localization options to override the tooltips as well as the day/month display. -

-

- You could also set this globally via tempusDominus.DefaultOptions.localization = { ... } or by - creating a variable e.g. const ru = { today:'Перейти сегодня' ... }; then provide the options as -

-
-         
-$('#datetimepicker2').tempusDominus({
-   localization: ru
- }
-         
-     
- -
- -
-
-
-           
- <label for='datetimepicker2Input' class='form-label'>Russian locale</label>
- <div
-   class='input-group log-event'
-   id='datetimepicker2'
-   data-td-target-input='nearest'
-   data-td-target-toggle='nearest'
- >
-   <input
-     id='datetimepicker2Input'
-     type='text'
-     class='form-control'
-     data-td-target='#datetimepicker2'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#datetimepicker2'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#datetimepicker2').tempusDominus({
-     localization: {
-       today: "Перейти сегодня",
-       clear: 'Очистить выделение',
-       close: 'Закрыть сборщик',
-       selectMonth: 'Выбрать месяц',
-       previousMonth: "Предыдущий месяц",
-       nextMonth: "В следующем месяце",
-       selectYear: 'Выбрать год',
-       previousYear: 'Предыдущий год',
-       nextYear: 'В следующем году',
-       selectDecade: 'Выбрать десятилетие',
-       previousDecade: 'Предыдущее десятилетие',
-       nextDecade: 'Следующее десятилетие',
-       previousCentury: 'Предыдущий век',
-       nextCentury: 'Следующий век',
-       pickHour: "Выберите час",
-       incrementHour: 'Время увеличения',
-       decrementHour: 'Уменьшить час',
-       pickMinute: 'Выбрать минуту',
-       incrementMinute: 'Минута приращения',
-       decrementMinute: 'Уменьшить минуту',
-       pickSecond: 'Выбрать второй',
-       incrementSecond: 'Увеличение секунды',
-       decrementSecond: 'Уменьшение секунды',
-       togglePeriod: 'Переключить период',
-       selectTime: 'Выбрать время',
-       selectDate: 'Выбрать дату',
-       dayViewHeaderFormat: 'long',
-       locale: 'ru'
-     }
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- -
-

Time Only

- -

- Version 6 no longer uses MomentJs so selecting the what to display is now done via the - display.components. -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='datetimepicker3'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='datetimepicker3Input'
-     type='text'
-     class='form-control'
-     data-td-target='#datetimepicker3'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#datetimepicker3'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-clock'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#datetimepicker3').tempusDominus({
-   display: {
-     viewMode: 'clock',
-     components: {
-       decades: false,
-       year: false,
-       month: false,
-       date: false,
-       hours: true,
-       minutes: true,
-       seconds: false
-     }
-   }
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- -
-

Date Only

- -

- Version 6 no longer uses MomentJs so selecting the what to display is now done via the - display.components. -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='datetimepicker4'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='datetimepicker4Input'
-     type='text'
-     class='form-control'
-     data-td-target='#datetimepicker4'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#datetimepicker4'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#datetimepicker4').tempusDominus({
-   display: {
-     viewMode: 'clock',
-     components: {
-       decades: true,
-       year: true,
-       month: true,
-       date: true,
-       hours: false,
-       minutes: false,
-       seconds: false,
-     }
-   }
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- -
-

Input Only

- -

- An input group and icon are not required for the picker to function, you can also simply use an input field. -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='datetimepicker5'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='datetimepicker5Input'
-     type='text'
-     class='form-control'
-     data-td-target='#datetimepicker5'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#datetimepicker5'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
- $('#datetimepicker5').tempusDominus();
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- - -
-
-
- -
- -
-

Enabled/Disabled Dates

- -

- You can provide an array of dates to enable or dates to disable. -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='enabledDisabled'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='enabledDisabledInput'
-     type='text'
-     class='form-control'
-     data-td-target='#enabledDisabled'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#enabledDisabled'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-const tomorrow = new Date();
-tomorrow.setDate(tomorrow.getDate()+1);
-$('#enabledDisabled').tempusDominus({
- restrictions: {
-   disabledDates: [
-     tomorrow,
-     new tempusDominus.DateTime().manipulate(2, 'date')
-   ]
- }
-});
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- -
-

Linked pickers

- -

- You can use event listeners or the subscribe method to link two pickers together. For example, a hotel stay - booking. -

- -
- -
-
-
-           
-<div class='row'>
-	<div class='col-sm-6'>
-	  <label for='linkedPickers1Input' class='form-label'>From</label>
-	  <div
-		class='input-group log-event'
-		id='linkedPickers1'
-		data-td-target-input='nearest'
-		data-td-target-toggle='nearest'
-	  >
-		<input
-		  id='linkedPickers1Input'
-		  type='text'
-		  class='form-control'
-		  data-td-target='#linkedPickers1'
-		/>
-		<span
-		  class='input-group-text'
-		  data-td-target='#linkedPickers1'
-		  data-td-toggle='datetimepicker'
-		>
-		   <span class='fas fa-calendar'></span>
-		 </span>
-	  </div>
-	</div>
-	<div class='col-sm-6'>
-	  <label for='linkedPickers2Input' class='form-label'>To</label>
-	  <div
-		class='input-group log-event'
-		id='linkedPickers2'
-		data-td-target-input='nearest'
-		data-td-target-toggle='nearest'
-	  >
-		<input
-		  id='linkedPickers2Input'
-		  type='text'
-		  class='form-control'
-		  data-td-target='#linkedPickers2'
-		/>
-		<span
-		  class='input-group-text'
-		  data-td-target='#linkedPickers2'
-		  data-td-toggle='datetimepicker'
-		>
-		   <span class='fas fa-calendar'></span>
-		 </span>
-	  </div>
-	</div>
-</div>
-           
-         
-
-
-
-           
-const linkedPicker1Element = $('#linkedPickers1');
-const linkedPicker2Element = $('#linkedPickers2');
-linkedPicker1Element.tempusDominus();
-linkedPicker2Element.tempusDominus({
-  useCurrent: false
-});
-
-linkedPicker1Element.on(tempusDominus.Namespace.events.change, (e) => {
-  linkedPicker2Element.tempusDominus('updateOptions',{
-    restrictions: {
-      minDate: e.date
-    }
-  });
-});
-
-linkedPicker2Element.on(tempusDominus.Namespace.events.change, (e) => {
-  linkedPicker2Element.tempusDominus('updateOptions',{
-    restrictions: {
-      maxDate: e.date
-    }
-  });
-});
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
- -
- - - - -
-
-
-
- -
- -
-

Custom Icons

- -

- You can change the icons from the Font Awesome default to another icon - set like Bootstrap's Icon -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='customIcons'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='customIconsInput'
-     type='text'
-     class='form-control'
-     data-td-target='#customIcons'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#customIcons'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='bi bi-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#customIcons').tempusDominus({
- display: {
-   icons: {
-     time: 'bi bi-clock',
-     date: 'bi bi-calendar',
-     up: 'bi bi-arrow-up',
-     down: 'bi bi-arrow-down',
-     previous: 'bi bi-chevron-left',
-     next: 'bi bi-chevron-right',
-     today: 'bi bi-calendar-check',
-     clear: 'bi bi-trash',
-     close: 'bi bi-x',
-   },
-   buttons: {
-     today: true,
-     clear: true,
-     close: true,
-   },
- }
-});
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- -
-

View Mode

- -

- The view mode options allows you to show a different initial view. For example selecting a date of birth. -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='viewMode'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='viewModeInput'
-     type='text'
-     class='form-control'
-     data-td-target='#viewMode'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#viewMode'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#viewMode').tempusDominus({
-   display: {
-     viewMode: 'years'
-   }
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
-
-

Minimum View

- -

- You can set the minimum view mode by turning off lower level components. If you only want your user to select - month and year,display.components.date: false. The display.components object also - provides convenience shortcuts. For instance if you don't want any of the time picker components to be available - simple set display.components.clock: false. Do be aware that display.components.clock - must be true (default) in order to display the time components regardless of display.components.hours|minutes|seconds - is true. The same applies for display.components.calendar -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='minViewMode'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='minViewModeInput'
-     type='text'
-     class='form-control'
-     data-td-target='#minViewMode'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#minViewMode'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#minViewMode').tempusDominus({
-   display: {
-     components: {
-       clock:false,
-       date: false,
-     }
-   }
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- -
-

Disabled Days of the Week

- -

- This is the simplest setup you can have with Bootstrap and Font Awesome 5. The picker defaults to FA 5 Solid - icons, however you can overwrite the defaults globally. -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='disabledDow'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='disabledDowInput'
-     type='text'
-     class='form-control'
-     data-td-target='#disabledDow'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#disabledDow'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#disabledDow').tempusDominus({
-   restrictions: {
-     daysOfWeekDisabled: [0, 6]
-   }
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- - -
-

Inline

- -

- You can also use the picker inline -

- -
- -
-
-
-           
- <div
-   class='log-event'
-   id='inlinePicker'
- >
- </div>
-           
-         
-
-
-
-           
-$('#inlinePicker').tempusDominus({
-   display: {
-     inline: true
-   }
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
-
-
-
-
- -
- - -
-

Multiple Dates

- -

- The picker allows for multiple dates to be selected. -

- -
- -
-
-
-           
- <div
-     class='input-group'
-     id='multipleDate'
-     data-td-target-input='nearest'
-     data-td-target-toggle='nearest'
- >
-   <input
-     id='multipleDateInput'
-     type='text'
-     class='form-control'
-     data-td-target='#multipleDate'
-   />
-   <span
-     class='input-group-text'
-     data-td-target='#multipleDate'
-     data-td-toggle='datetimepicker'
-   >
-     <span class='fas fa-calendar'></span>
-   </span>
- </div>
-           
-         
-
-
-
-           
-$('#multipleDatePicker').tempusDominus({
-   multipleDates: true
- });
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
- -
- -
-

Updating Options

- -

- You can provide a new set of options by calling updateOptions([newOptions]). This function also - allows you to reset the options back to the default or merge the new options with the default instead of the - existing uptions by passing true as the section parameter. -

- -
- -
-
-
-          
-<div
-    class='input-group'
-    id='settingOptions'
-    data-td-target-input='nearest'
-    data-td-target-toggle='nearest'
->
-  <input
-    id='settingOptionsInput'
-    type='text'
-    class='form-control'
-    data-td-target='#settingOptions'
-  />
-  <span
-    class='input-group-text'
-    data-td-target='#settingOptions'
-    data-td-toggle='datetimepicker'
-  >
-    <span class='fas fa-calendar'></span>
-  </span>
-</div>
-          
-        
-
-
-
-          
-const changeOptionsButton = document.getElementById('changeOptions');
-const settingOptionsPicker = $('#settingOptions').tempusDominus();
-
-let on = false
-changeOptionsButton.addEventListener('click', () => {
-  settingOptionsPicker.updateOptions({
-    restrictions: {
-      daysOfWeekDisabled: on ? [] : [0, 6]
-    }
-  });
-  on = !on;
-  changeOptionsButton.classList.toggle('btn-primary');
-  changeOptionsButton.classList.toggle('btn-secondary');
-});
-          
-        
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
- -
- - - - -
-
-
-
-
- -
-
-
- -
- -
-

Example with container parameter

- -

- All you need is an element to atach the picker to and a parent container. -

- -
- -
-
-
-           
-<div id='parent-container' class='relative p-5' style='overflow: auto; height: 100px; width: 100%;'>
-  <div class='input-group log-event' id='containerDatePicker' data-td-target-input='nearest'
-    data-td-target-toggle='nearest'>
-    <input id='containerDatePickerInput' type='text' class='form-control' />
-    <span class='input-group-text' data-td-target='#settingOptions' data-td-toggle='datetimepicker'>
-      <span class='fas fa-calendar'></span>
-  </div>
-</div>
-           
-         
-
-
-
-           
-$('#containerDatePicker').tempusDominus({
-  container: $('div[id="parent-container"]')[0],
-});
-           
-         
-
-
-
- Events will display as you manipulate the picker. -
-
-
-
- -
-
-
-
-
- - - -
-
-
-
-
- -
- - Examples using jQuery 07/08/2021 - 07/08/2021 + 02/05/2022 How to use Tempus Dominus datetime picker with jquery datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + diff --git a/src/docs/partials/functions.html b/src/docs/partials/functions.html index e3bdf1e49..491c906d4 100644 --- a/src/docs/partials/functions.html +++ b/src/docs/partials/functions.html @@ -28,12 +28,12 @@ data-td-target='#datetimepicker1' data-td-toggle='datetimepicker' > - + @@ -41,43 +41,43 @@

Dates - +

Getting the View Date - +

picker.viewDate returns the pickers current view date.

picker.dates - +

There are a number of function here that allow for retrieving the selected dates or adding to them.

picked - +

Returns an array of DateTime of the selected date(s).

lastPicked - +

Returns the last picked DateTime of the selected date(s).

lastPickedIndex - +

Returns the length of picked dates -1 or 0 if none are selected.

add(DateTime) - +

Adds a new DateTime to selected dates array. Use this function with caution. It will not automatically @@ -85,36 +85,54 @@

add(DateTime) the widget or do any validation.

-
set(value, index, frrom) - +
setValue(value: DateTime, index?: number) +

- Tries to convert the provided value to a DateTime object. If value is null|undefined then clear the value of the provided index (or 0). + Sets the select date index (or the first, if not provided) to the provided DateTime object.

+ +
formatInput(value: DateTime): string + +
+

+ Formats a DateTime object to a string. Used when setting the input value. It is possible to overwrite this + to provide more complex formatting with moment/dayjs or by hand. +

+ +
setFromInput(value: any, index?: number) + +
+

+ Tries to convert the provided value to a DateTime object. + If value is null|undefined then clear the value of the provided index (or 0). It is possible to overwrite + this + to provide more complex formatting with moment/dayjs or by hand. +

+
isPicked(DateTime, Unit?) - +

Returns true if the target date is part of the selected dates array. If unit is provided then a granularity - to - that unit will be used. + to that unit will be used.

pickedIndex(DateTime, Unit?) + class="fa-solid fa-anchor" aria-hidden="true">

Returns the index at which target date is in the array. This is used for updating or removing a date when multi-date is used. If unit is provided then a granularity to that unit will be used.

clear - +

Clears all selected dates.

- Emits Namespace.Events.change with the last picked date. + Emits Namespace.events.change with the last picked date.

@@ -124,7 +142,7 @@
clear

updateOptions(object, boolean?) - +

In previous version there was a function to read/write to each of the provided options. This made it easy to use @@ -139,7 +157,7 @@

updateOptions(object, boolean?)

Display - +

@@ -148,72 +166,72 @@

toggle

Emits

  • -

    Namespace.Events.hide - if the widget is hidden after the toggle call

    +

    Namespace.events.hide - if the widget is hidden after the toggle call

  • -

    Namespace.Events.show - if the widget is show after the toggle call

    +

    Namespace.events.show - if the widget is show after the toggle call

  • -

    Namespace.Events.change - if the widget is opened for the first time and the input element - is - empty and options.useCurrent != false

    +

    Namespace.events.change - if the widget is opened for the first time and the input element + is empty and options.useCurrent != false

show -

+

Shows the widget

Emits

  • -

    Namespace.Events.show - if the widget was hidden before that call

    +

    Namespace.events.show - if the widget was hidden before that call

  • -

    Namespace.Events.change - if the widget is opened for the first time and the +

    Namespace.events.change - if the widget is opened for the first time and the useCurrent is set to true or to a granularity value and the input element the component is attached to has an empty value

hide -

+

Hides the widget

Emits

    -
  • Namespace.Events.hide - if the widget was visible before that call
  • +
  • Namespace.events.hide - if the widget was visible before that call
+

dispose -

+

Destroys the widget and removes all attached event listeners. If the picker is open it will be hidden and the event fired.

disable -

+

Disables the input element and the component is attached to, by adding a disabled="true" attribute to it. If the widget was visible before that call it is hidden.

Emits

    -
  • Namespace.Events.hide - if the widget was visible before this call
  • +
  • Namespace.events.hide - if the widget was visible before this call

enable -

+

Enables the input element and the component is attached to, by removing disabled attribute from it.

clear -

+

Clears all selected dates. This is a short cut to picker.dates.clear()

subscribe(event | events[], callback | callbacks[]) -

+

Instead of adding event listeners to the pickers element, you can use the subscribe method. You can provide a single event to listen for or an array of events. When providing an array the number of callbacks must be the @@ -226,7 +244,7 @@

subscribe(event | events[], callback | callbacks[])

       
-const subscription = picker.subscribe(tempusdominus.Namespace.Events.change, (e) => {
+const subscription = picker.subscribe(tempusdominus.Namespace.events.change, (e) => {
   console.log(e);
 });
 
@@ -235,7 +253,7 @@ 

subscribe(event | events[], callback | callbacks[]) //you can also provide multiple events: const subscriptions = picker.subscribe( - [tempusdominus.Namespace.Events.show,tempusdominus.Namespace.Events.hide], + [tempusdominus.Namespace.events.show,tempusdominus.Namespace.events.hide], [(e)=> console.log(e), (e) => console.log(e)] ) @@ -250,4 +268,4 @@

subscribe(event | events[], callback | callbacks[]) How to use Tempus Dominus datetime picker datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + diff --git a/src/docs/partials/index.html b/src/docs/partials/index.html index 6af84abae..d838ed125 100644 --- a/src/docs/partials/index.html +++ b/src/docs/partials/index.html @@ -1,5 +1,21 @@ - Full page coming soon +
+

+ Tempus Dominus is the successor to the very popular "eonasdan/bootstrap-datetimepicker". The plugin provides a wide array of options that allow developers to provide date and or time selections to users as simple pickers, date of birth selection, appointments and more. +

+

+ If you're looking for installation instructions check out the download page. +

+

+ Once you get it installed there are plenty of examples and a stackblitz. +

+

Get involved

+ +
Introduction @@ -8,4 +24,4 @@ Introduction to Eonasdan's date time picker. datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + diff --git a/src/docs/partials/installing.html b/src/docs/partials/installing.html index 4d8c7dd83..bafb9cdde 100644 --- a/src/docs/partials/installing.html +++ b/src/docs/partials/installing.html @@ -3,29 +3,43 @@

No matter how you choose to get the files, make sure that Popper is include before the picker's main script file.

-

-
-

Compiled Code

- You can grab the compiled js and css from GitHub + You will also want a font library. The picker defaults to Font Awesome 6, but you can provide a different icon set via the configuration or a plugin.

-

You still need to get Popper yourself.

-

Via CDN

-
+    

Via CDN

+
     
 <!-- Popperjs -->
-<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js" integrity="sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp" crossorigin="anonymous"></script>
+<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.2/dist/umd/popper.min.js"
+      crossorigin="anonymous"></script>
 <!-- Tempus Dominus JavaScript -->
-<script src="https://cdn.jsdelivr.net/gh/Eonasdan/tempus-dominus@v6-alpha14/dist/js/tempus-dominus.js" crossorigin="anonymous"></script>
+<script src="https://cdn.jsdelivr.net/gh/Eonasdan/tempus-dominus@master/dist/js/tempus-dominus.js"
+      crossorigin="anonymous"></script>
 
 <!-- Tempus Dominus Styles -->
-<link href="https://cdn.jsdelivr.net/gh/Eonasdan/tempus-dominus@v6-alpha14/dist/css/tempus-dominus.css" rel="stylesheet" crossorigin="anonymous">
+<link href="https://cdn.jsdelivr.net/gh/Eonasdan/tempus-dominus@master/dist/css/tempus-dominus.css"
+      rel="stylesheet" crossorigin="anonymous">
+    
+
+
+
+

Via NPM

+
+    
+npm install @popperjs/core @eonasdan/tempus-dominus
     
 
+
+

Compiled Code

+

+ You can grab the compiled js and css from GitHub +

+

You still need to get Popper yourself.

+

Nuget Package

diff --git a/src/docs/partials/locale.html b/src/docs/partials/locale.html new file mode 100644 index 000000000..f9ec1651d --- /dev/null +++ b/src/docs/partials/locale.html @@ -0,0 +1,98 @@ + +

+

Introduction

+

+ The locale files offer a simple way to globally or individually set the localization options without the need to + hand code that everytime. +

+
+
+
+
+
+ +
+ + + + +
+
+
+
+ + +
+
+

Creating plugins

+

+ There are a few examples in the source like this +

+
+      
+const name = 'ru';
+
+const localization = {
+  today: 'Перейти сегодня',
+  //...
+  locale: 'ru',
+  startOfTheWeek: 1
+};
+
+export { localization, name };
+      
+    
+
+
+

Using a locale

+

Load the locale file.

+
+      
+<script src="/path/to/locale.js"></script>
+      
+    
+

+ You can then either set the global default or you can it indvidually. +

+
+      
+//load the RU locale
+tempusDominus.loadLocale(tempusDominus.locales.ru);
+
+//globally
+tempusDominus.locale(tempusDominus.locales.ru.name);//set the default options to use Russian from the plugin
+
+//picker
+const datetimepicker1 = new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'));
+datetimepicker1.locale(tempusDominus.locales.ru.name);
+      
+    
+
+ + + + Locales + 01/19/2022 + 02/05/2022 + How to use plugins with Tempus Dominus. + + datepicker, javascript, open source, tempus dominus, eonasdan + \ No newline at end of file diff --git a/src/docs/partials/migration.html b/src/docs/partials/migration.html index af9ece147..9ce204ce6 100644 --- a/src/docs/partials/migration.html +++ b/src/docs/partials/migration.html @@ -38,7 +38,7 @@
- +
@@ -54,13 +54,13 @@
-
+
- +
@@ -123,4 +123,4 @@

Exception 2

How to use Tempus Dominus datetime picker datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + diff --git a/src/docs/partials/namespace/css.html b/src/docs/partials/namespace/css.html index 08a54889c..70154af72 100644 --- a/src/docs/partials/namespace/css.html +++ b/src/docs/partials/namespace/css.html @@ -4,212 +4,212 @@

widget

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer element for the widget.

calendarHeader

+ class="fa-solid fa-anchor" aria-hidden="true">

The element for the calendar view header, next and previous actions.

switch

+ class="fa-solid fa-anchor" aria-hidden="true">

The element for the action to change the calendar view. E.g. month -> year.

sideBySide

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to the widget element when the side by side option is in use.

previous

+ class="fa-solid fa-anchor" aria-hidden="true">

The element for the action to change the calendar view, e.g. August -> July

-

next

+

next

The element for the action to change the calendar view, e.g. August -> September

disabled

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to any action that would violate any restriction options. ALso applied to an input field if the disabled function is called.

-

old

+

old

Applied to any date that is less than requested view, e.g. the last day of the previous month.

-

new

+

new

Applied to any date that is greater than of requested view, e.g. the last day of the previous month.

active

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to any date that is currently selected.

dateContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the calendar view.

decadesContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the decades view.

decade

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to elements within the decades container, e.g. 2020, 2030

yearsContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the years view.

-

year

+

year

Applied to elements within the years container, e.g. 2021, 2021

monthsContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the month view.

-

month +

month

Applied to elements within the month container, e.g. January, February

daysContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the calendar view.

-

day

+

day

Applied to elements within the day container, e.g. 1, 2..31

calendarWeeks

+ class="fa-solid fa-anchor" aria-hidden="true">

If display.calendarWeeks is enabled, a column displaying the week of year is shown. This class is applied to each cell in that column.

dayOfTheWeek

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to the first row of the calendar view, e.g. Sunday, Monday

-

today +

today

Applied to the current date on the calendar view.

-

weekend +

weekend

Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday

timeContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for all time related elements.

separator

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied the separator columns between time elements, e.g. hour *:* minute *:* second

clockContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the clock view.

hourContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the hours selection view.

minuteContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the minutes selection view.

secondContainer

+ class="fa-solid fa-anchor" aria-hidden="true">

The outer most element for the seconds selection view.

-

hour

+

hour

Applied to each element in the hours selection view.

minute

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to each element in the minutes selection view.

second

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to each element in the seconds selection view.

-

show

+

show

Applied the element of the current view mode, e.g. calendar or clock.

collapsing

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to the currently showing view mode during a transition between calendar and clock views

collapse

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to the currently hidden view mode.

inline

+ class="fa-solid fa-anchor" aria-hidden="true">

Applied to the widget when the option display.inline is enabled.

@@ -225,4 +225,4 @@

inline unexpectedOption (code: 1)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error indicating that a key in the options object is invalid.

unexpectedOptions (code: 1)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error indicating that one more keys in the options object is invalid.

@@ -28,7 +28,7 @@

unexpectedOptions (code: 1)unexpectedOptionValue (code: 2)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error when an option is provide an unsupported value. For example a value of 'cheese' for toolbarPlacement which only supports 'top', 'bottom', 'default'. @@ -36,7 +36,7 @@

unexpectedOptionValue (code: 2)typeMismatch (code: 3)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error when an option value is the wrong type. For example a string value was provided to multipleDates which only @@ -45,7 +45,7 @@

typeMismatch (code: 3)numbersOutOfRage (code: 4)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error when an option value is outside of the expected range. For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6. @@ -53,7 +53,7 @@

numbersOutOfRage (code: 4)failedToParseDate (code: 5)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error when a value for a date options couldn't be parsed. Either the option was an invalide string or an invalid Date object. @@ -61,14 +61,14 @@

failedToParseDate (code: 5)mustProvideElement (code: 6)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error when an element to attach to was not provided in the constructor.

subscribeMismatch (code: 7)

+ class="fa-solid fa-anchor" aria-hidden="true">

An error if providing an array for the events to subscribe method doesn't have the same number of callbacks. E.g., subscribe([1,2], [1]) @@ -77,13 +77,13 @@

subscribeMismatch (code: 7)conflictingConfiguration (code: 8)

+ class="fa-solid fa-anchor" aria-hidden="true">

The configuration has conflicting rules e.g. minDate is after maxDate

dateString

+ class="fa-solid fa-anchor" aria-hidden="true">

Logs a warning if a date option value is provided as a string, instead of a date/datetime object. @@ -96,7 +96,7 @@

Error Messages

failedToSetInvalidDate

+ class="fa-solid fa-anchor" aria-hidden="true">

Used with an Error Event type if the user selects a date that fails restriction @@ -105,7 +105,7 @@

failedToSetInvalidDatefailedToParseInput

+ class="fa-solid fa-anchor" aria-hidden="true">

Used with an Error Event type when a user changes the value of the input field directly, and does not provide a valid date. @@ -122,4 +122,4 @@

failedToParseInput07/08/2021 Overview of the errors thrown and error messages from Tempius Dominus. datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + diff --git a/src/docs/partials/namespace/events.html b/src/docs/partials/namespace/events.html index 53c815191..2cd6d6080 100644 --- a/src/docs/partials/namespace/events.html +++ b/src/docs/partials/namespace/events.html @@ -12,11 +12,12 @@ interface BaseEvent { type: string; //e.g. change.td + viewMode?: keyof ViewMode //'clock' | 'calendar' | 'months' | 'years' | 'decades' }

change.td

+ class='fas fa-anchor' aria-hidden="true">

Emit when the date selection is changed.

@@ -31,20 +32,19 @@

change.td

+ class='fas fa-anchor' aria-hidden="true">

Emits when the view changes for example from month view to the year view.

     
 interface ViewUpdateEvent extends BaseEvent {
-  change: Unit;
   viewDate: DateTime;
 }
     
   

error.td

+ class='fas fa-anchor' aria-hidden="true">

Emits when a selected date or value from the input field fails to meet the provided validation rules.

@@ -58,12 +58,12 @@

error.td

+ class='fas fa-anchor' aria-hidden="true">

Emits when then picker widget is displayed.

hide.td

+ class='fas fa-anchor' aria-hidden="true">

Emits when the picker widget is hidden.

@@ -83,4 +83,4 @@

hide.td 07/08/2021 Overview of the events fired from Tempius Dominus Datetime picker. datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + diff --git a/src/docs/partials/namespace/unit.html b/src/docs/partials/namespace/unit.html new file mode 100644 index 000000000..692e11b8b --- /dev/null +++ b/src/docs/partials/namespace/unit.html @@ -0,0 +1,26 @@ + +

+ The picker uses the following enum to represent a breakdown of date/time. +

+
+
    +
  • seconds
  • +
  • minutes
  • +
  • hours
  • +
  • date
  • +
  • month
  • +
  • year
  • +
+
+ +
+ + + Unit Enum + 02/05/2022 + 02/05/2022 + + A break down of the Unit enum in Tempus Dominus. + + datepicker, javascript, open source, tempus dominus, eonasdan + \ No newline at end of file diff --git a/src/docs/partials/options.html b/src/docs/partials/options.html index a7887ad84..4776a71c4 100644 --- a/src/docs/partials/options.html +++ b/src/docs/partials/options.html @@ -22,14 +22,14 @@

restrictions

+ class="fa-solid fa-anchor" aria-hidden="true">

minDate - +

Accepts: string | Date | DateTime Defaults: undefined
@@ -45,7 +45,7 @@

minDate

maxDate

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: string | Date | DateTime Defaults: undefined
Prevents the user from selecting a date/time after this value. Set to undefined to remove the @@ -57,7 +57,7 @@

maxDate enabledDates/disabledDates - +

Accepts: array of string | Date | DateTime Defaults: undefined
@@ -82,7 +82,7 @@

disabledDates

enabledHours/disabledHours - +

Accepts: array of number from 0-24 Defaults: undefined
@@ -108,7 +108,7 @@

disabledHours

disabledTimeIntervals + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: array of an object with from: DateTime, to: DateTime Defaults: @@ -128,7 +128,7 @@

disabledTimeIntervals

daysOfWeekDisabled + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: array of numbers from 0-6
@@ -144,14 +144,14 @@

daysOfWeekDisabled

display + class="fa-solid fa-anchor" aria-hidden="true">

toolbarPlacement

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: 'top' | 'bottom' Defaults: bottom
@@ -164,7 +164,7 @@

toolbarPlacement

components

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: true|false

@@ -177,7 +177,7 @@

components

calendar

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: true
A convenience flag that can enable or disable all of the calendar components like date, month, year, @@ -187,7 +187,7 @@

calendardate

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: true
Date View @@ -195,7 +195,7 @@

datemonth + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: true
@@ -205,7 +205,7 @@

monthyear

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: true
Year View @@ -213,7 +213,7 @@

yeardecades + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: true
@@ -222,7 +222,7 @@

decadesclock + class="fa-solid fa-anchor" aria-hidden="true">

Time View @@ -236,7 +236,7 @@

clockhours + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: true
@@ -245,7 +245,7 @@

hoursminutes + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: true
@@ -254,7 +254,7 @@

minutesseconds + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: false
@@ -263,7 +263,7 @@

secondsuseTwentyfourHour

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: false
Twenty-four View @@ -272,7 +272,7 @@

useTwentyfourHourbuttons + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: true|false

@@ -282,7 +282,7 @@

buttons

today + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: false
@@ -291,7 +291,7 @@

todayclose + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: false
@@ -300,7 +300,7 @@

closeclear + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: false
@@ -311,7 +311,7 @@

clear

calendarWeeks

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: true|false Defaults: false
Calendar View @@ -319,7 +319,7 @@

calendarWeeksicons + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: string @@ -333,7 +333,7 @@

icons

type

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts either "icons" or "sprites"
Defaults to "icons". If "sprites" is used as the value, the icons will be render with an svg element @@ -342,75 +342,75 @@

type

time

+ class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-clock)
+ Defaults: (fas fa-clock)
This icon is used to change the view from the calendar view to the clock view.

date

+ class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-calendar)
+ Defaults: (fas fa-calendar)
This icon is used to change the view from the clock view to the calendar view.

up

+ class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-arrow-up)
+ Defaults: (fas fa-arrow-up)
This icon is used to incremeant hours, minutes and seconds in the clock view.

down

+ class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-arrow-down)
+ Defaults: (fas fa-arrow-down)
This icon is used to decremeant hours, minutes and seconds in the clock view.

next

+ class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-chevron-right)
+ Defaults: (fas fa-chevron-right)
This icon is used to navigation forward in the calendar, month, year, and decade views.

previous

+ class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-chevron-left)
+ Defaults: (fas fa-chevron-left)
This icon is used to navigation backwards in the calendar, month, year, and decade views.

today + class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-calendar-check)
+ Defaults: (fas fa-calendar-check)
This icon is used to change the date and view to now.

clear + class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-trash)
+ Defaults: (fas fa-trash)
This icon is used to clear the currently selected date.

close + class="fa-solid fa-anchor" aria-hidden="true">

- Defaults: (fas fa-times)
+ Defaults: (fas fa-times)
This icon is used to close the picker.

viewMode

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: 'clock' | 'calendar' | 'months' | 'years' | 'decades' Defaults: calendar
@@ -418,21 +418,21 @@

viewMode

sideBySide

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: true|false Defaults: false
Side by Side View Displays the date and time pickers side by side.

inline + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: Defaults:boolean
Displays the picker in a inline div instead of a popup.

keepOpen

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: true|false Defaults: false
Keep the picker window open even after a date selection. The picker can still be closed by the target or @@ -443,14 +443,14 @@

keepOpenhooks + class="fa-solid fa-anchor" aria-hidden="true">

inputFormat + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: (context: TempusDominus, date: DateTime) => string or undefined @@ -471,7 +471,7 @@

inputFormatinputParse + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: (context: TempusDominus, value: any) => DateTime or undefined Defaults: @@ -492,7 +492,7 @@

inputParse

-

stepping +

stepping

Accepts number Defaults: 1
@@ -500,14 +500,14 @@

steppinguseCurrent

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts true|false Defaults: true
Determines if the current date/time should be used as the default value when the picker is opened.

defaultDate

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: string | Date | DateTime Defaults: undefined
Sets the picker default date/time. Overrides useCurrent @@ -518,7 +518,7 @@

defaultDate

localization

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts: string Most of the localization options are for title tooltips over icons. @@ -543,21 +543,21 @@

localization

today + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Go to today

clear + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Clear selection

close + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Close the picker
@@ -565,168 +565,168 @@

closeselectMonth

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Select Month

previousMonth

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Previous Month

nextMonth

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Next Month

selectYear

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Select Year

previousYear

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Previous Year

nextYear

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Next Year

selectDecade

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Select Decade

previousDecade

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Previous Decade

nextDecade

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Next Decade

previousCentury

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Previous Century

nextCentury

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Next Century

pickHour

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Pick Hour

incrementHour

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Increment Hour

decrementHour

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Decrement Hour

pickMinute

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Pick Minute

incrementMinute

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Increment Minute

decrementMinute

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Decrement Minute

pickSecond

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Pick Second

incrementSecond

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Increment Second

decrementSecond

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Decrement Second

togglePeriod

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Toggle Period

selectTime

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Select Time

selectDate

+ class="fa-solid fa-anchor" aria-hidden="true">

Defaults: Select Date

dayViewHeaderFormat + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: DateTimeFormatOptions Defaults: @@ -735,7 +735,7 @@

dayViewHeaderFormatlocale + class="fa-solid fa-anchor" aria-hidden="true">

Defaults: default
@@ -744,7 +744,7 @@

localestartOfTheWeek + class="fa-solid fa-anchor" aria-hidden="true">

Accepts: 0-6 Defaults: 0
@@ -758,14 +758,14 @@

startOfTheWeek

keepInvalid

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts true|false Defaults: false
Allows for the user to select a date that is invalid coording to the rules. For instance, if a user enters a date pasted the maxDate.

-

debug

+

debug

Accepts true|false Defaults: false
Similar to display.keepOpen, if true the picker won't close during any event where that would normally @@ -775,13 +775,13 @@

debug<

allowInputToggle

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts true|false Defaults: false
If true, the picker will show on textbox focus.

-

viewDate +

viewDate

Accepts: string | Date | DateTime Defaults: now
@@ -789,14 +789,14 @@

viewDatemultipleDates

+ class="fa-solid fa-anchor" aria-hidden="true">

Accepts true|false Defaults: false
Allows multiple dates to be selected.

multipleDatesSeparator + href='#multipleDatesSeparator'>

Accepts: string Defaults: ;
@@ -805,7 +805,7 @@

multipleDatesSeparator

promptTimeOnDateChange + href='#promptTimeOnDateChange'>

Accepts true|false Defaults: false
@@ -815,7 +815,7 @@

promptTimeOnDateChangepromptTimeOnDateChangeTransitionDelay - +

@@ -826,7 +826,7 @@

promptTimeOnDateChangeTransitionD

meta - +

@@ -836,7 +836,7 @@

meta

container - +

@@ -853,4 +853,4 @@

container How to use Tempus Dominus datetime picker datepicker, javascript, open source, tempus dominus, eonasdan - \ No newline at end of file + diff --git a/src/docs/partials/plugins/fa5.html b/src/docs/partials/plugins/fa5.html new file mode 100644 index 000000000..dbaeb9c1b --- /dev/null +++ b/src/docs/partials/plugins/fa5.html @@ -0,0 +1,131 @@ + +
+

Font Awesome 5

+

+ You can use this plugin to set the global default icons to FA5. This plugin requires the FA5 resources to be + loaded. +

+
+
+
+
+ +
+ + + + +
+
+
+
+ + +
+
+
+//example picker
+const datetimepicker1 = new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'));
+
+//to set globally
+tempusDominus.extend(window.tempusDominus.plugins.fa_five);
+//or
+import {load, fasixIcons} from 'tempusDominus/plugins/fa-five'
+tempusDominus.extend(load);
+
+// otherwise to set icons to an individual picker
+datetimepicker1.updateOptions({ display: icons: window.tempusDominus.plugins.fa_five.fasixIcons});
+//or
+datetimepicker1.updateOptions({ display: icons: faFiveIcons});
+
+    
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FA icons
OptionValue
typeicons
timefas fa-clock
datefas fa-calendar
upfas fa-arrow-up
downfas fa-arrow-down
previousfas fa-chevron-left
nextfas fa-chevron-right
todayfas fa-calendar-check
clearfas fa-trash
closefas fa-xmark
+
+ + +
+ + + Plugins - Font Awesome 6 + 01/19/2022 + 01/19/2022 + How to use font awesome 6 plugin with Tempus Dominus. + + datepicker, javascript, open source, tempus dominus, eonasdan + diff --git a/src/docs/partials/plugins/index.html b/src/docs/partials/plugins/index.html new file mode 100644 index 000000000..a7c713703 --- /dev/null +++ b/src/docs/partials/plugins/index.html @@ -0,0 +1,79 @@ + +
+

Introduction

+

+ Plugins allow you to extend the picker by adding new functionality to either Tempus Dominus globally, + a single picker or by overwritting existing functionality. +

+
+
+

Creating plugins

+

+ There are a few examples in the source like this +

+
+      
+export const load = (option, tdClasses, tdFactory) => {
+  // extend the picker
+  // e.g. add new tempusDominus.TempusDominus(...).someFunction()
+  tdClasses.TempusDominus.prototype.someFunction = (a, logger) => {
+    logger = logger || console.log
+    logger(a);
+  }
+
+  // extend tempusDominus
+  // e.g. add tempusDominus.example()
+  tdFactory.example = (a, logger) => {
+    logger = logger || console.log
+    logger(a);
+  }
+
+  // overriding existing API
+  // e.g. extend new tempusDominus.TempusDominus(...).show()
+  const oldShow = tdClasses.TempusDominus.prototype.show;
+  tdClasses.TempusDominus.prototype.show = function(a, logger) {
+    logger = logger || console.log
+    alert('from plugin');
+    logger(a);
+    oldShow.bind(this)()
+    // return modified result
+  }
+}
+      
+    
+

Using a plugin

+

+ Using a plugin is easy. Load the plugin script file after you load Tempus Dominus +

+
+      
+<script src="/path/to/plugin.js"></script>
+      
+      
+tempusDominus.extend(window.tempusDominus.plugins.PLUGINNAME);
+      
+    
+ +

+ You can also use plugins in Typescript or Node. +

+
+      
+const example = require('tempusDominus/plugins/examples/sample')
+// or
+import example from 'tempusDominus/plugins/examples/sample'
+
+tempusDominus.extend(example) // use plugin
+      
+    
+
+
+ + + Plugins + 01/19/2022 + 02/05/2022 + How to use plugins with Tempus Dominus. + + datepicker, javascript, open source, tempus dominus, eonasdan + \ No newline at end of file diff --git a/src/docs/partials/plugins/moment.html b/src/docs/partials/plugins/moment.html new file mode 100644 index 000000000..4fe999a8a --- /dev/null +++ b/src/docs/partials/plugins/moment.html @@ -0,0 +1,60 @@ + +
+

+ If you still need to use momentjs, you can load this plugin to use moment to parse input dates. +

+
+
+
+
+ +
+ + + + +
+
+
+
+ + + +
+
+
+//example picker
+//note that you can optionally provide the format to use.
+tempusDominus.extend(tempusDominus.plugins.moment_parse, 'DD.MM.yyyy hh:mm a');
+const datetimepicker1 = new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'));
+
+    
+
+
+ + + Plugins - Moment + 02/05/2022 + 02/05/2022 + How to use momentjs plugin with Tempus Dominus. + + datepicker, javascript, open source, tempus dominus, eonasdan + \ No newline at end of file diff --git a/src/docs/partials/plugins/paint.html b/src/docs/partials/plugins/paint.html new file mode 100644 index 000000000..91510f874 --- /dev/null +++ b/src/docs/partials/plugins/paint.html @@ -0,0 +1,77 @@ + +
+

+ You can customize the css classes applied to dates by overwritting the display.paint. + The fuunction provides a Unit value (extended to include "decade"), + the date involved and an array of string that represents the classes that will be applied. +

+
+
+
+
+ +
+ + + + +
+
+
+
+ + +
+
+
+//example picker
+const datetimepicker1 = new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'));
+
+datetimepicker1.display.paint = (unit, date, classes, element) => {
+  if (unit === tempusDominus.Unit.date) {
+    //highlight tomorrow
+    if (date.isSame(new tempusDominus.DateTime().manipulate(1, 'date'), unit)) {
+      classes.push('special-day');
+    }
+  }
+}
+
+    
+
+
+ + + Plugins - Paint + 02/05/2022 + 03/21/2022 + How to use add custom classes with Tempus Dominus. + + datepicker, javascript, open source, tempus dominus, eonasdan + diff --git a/src/docs/styles/bs5_docs.scss b/src/docs/styles/bs5_docs.scss index 27636e0a0..391964391 100644 --- a/src/docs/styles/bs5_docs.scss +++ b/src/docs/styles/bs5_docs.scss @@ -509,7 +509,6 @@ .anchorjs-link { font-size: 1.4rem; font-weight: 400; - color: rgba(13, 110, 253, 0.5); transition: color 0.15s ease-in-out; padding-left: 0.375em; diff --git a/src/docs/styles/styles.css b/src/docs/styles/styles.css deleted file mode 100644 index 13864be6c..000000000 --- a/src/docs/styles/styles.css +++ /dev/null @@ -1,10752 +0,0 @@ -@charset "UTF-8"; -@import "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900"; -/*! - * Bootstrap v5.0.2 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors - * Copyright 2011-2021 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */ -@import "docs.css"; -:root { - --bs-blue: #0d6efd; - --bs-indigo: #6610f2; - --bs-purple: #6f42c1; - --bs-pink: #d63384; - --bs-red: #dc3545; - --bs-orange: #fd7e14; - --bs-yellow: #ffc107; - --bs-green: #198754; - --bs-teal: #20c997; - --bs-cyan: #0dcaf0; - --bs-white: #fff; - --bs-gray: #6c757d; - --bs-gray-dark: #343a40; - --bs-primary: #0d6efd; - --bs-secondary: #6c757d; - --bs-success: #198754; - --bs-info: #0dcaf0; - --bs-warning: #ffc107; - --bs-danger: #dc3545; - --bs-light: #f8f9fa; - --bs-dark: #212529; - --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); -} - -*, -*::before, -*::after { - box-sizing: border-box; -} - -@media (prefers-reduced-motion: no-preference) { - :root { - scroll-behavior: smooth; - } -} - -body { - margin: 0; - font-family: var(--bs-font-sans-serif); - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - color: #212529; - background-color: #fff; - -webkit-text-size-adjust: 100%; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -hr { - margin: 1rem 0; - color: inherit; - background-color: currentColor; - border: 0; - opacity: 0.25; -} - -hr:not([size]) { - height: 1px; -} - -h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 { - margin-top: 0; - margin-bottom: 0.5rem; - font-weight: 500; - line-height: 1.2; -} - -h1, .h1 { - font-size: calc(1.375rem + 1.5vw); -} -@media (min-width: 1200px) { - h1, .h1 { - font-size: 2.5rem; - } -} - -h2, .h2 { - font-size: calc(1.325rem + 0.9vw); -} -@media (min-width: 1200px) { - h2, .h2 { - font-size: 2rem; - } -} - -h3, .h3 { - font-size: calc(1.3rem + 0.6vw); -} -@media (min-width: 1200px) { - h3, .h3 { - font-size: 1.75rem; - } -} - -h4, .h4 { - font-size: calc(1.275rem + 0.3vw); -} -@media (min-width: 1200px) { - h4, .h4 { - font-size: 1.5rem; - } -} - -h5, .h5 { - font-size: 1.25rem; -} - -h6, .h6 { - font-size: 1rem; -} - -p { - margin-top: 0; - margin-bottom: 1rem; -} - -abbr[title], -abbr[data-bs-original-title] { - text-decoration: underline dotted; - cursor: help; - text-decoration-skip-ink: none; -} - -address { - margin-bottom: 1rem; - font-style: normal; - line-height: inherit; -} - -ol, -ul { - padding-left: 2rem; -} - -ol, -ul, -dl { - margin-top: 0; - margin-bottom: 1rem; -} - -ol ol, -ul ul, -ol ul, -ul ol { - margin-bottom: 0; -} - -dt { - font-weight: 700; -} - -dd { - margin-bottom: 0.5rem; - margin-left: 0; -} - -blockquote { - margin: 0 0 1rem; -} - -b, -strong { - font-weight: bolder; -} - -small, .small { - font-size: 0.875em; -} - -mark, .mark { - padding: 0.2em; - background-color: #fcf8e3; -} - -sub, -sup { - position: relative; - font-size: 0.75em; - line-height: 0; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -a { - color: #0d6efd; - text-decoration: underline; -} -a:hover { - color: #0a58ca; -} - -a:not([href]):not([class]), a:not([href]):not([class]):hover { - color: inherit; - text-decoration: none; -} - -pre, -code, -kbd, -samp { - font-family: var(--bs-font-monospace); - font-size: 1em; - direction: ltr /* rtl:ignore */; - unicode-bidi: bidi-override; -} - -pre { - display: block; - margin-top: 0; - margin-bottom: 1rem; - overflow: auto; - font-size: 0.875em; -} -pre code { - font-size: inherit; - color: inherit; - word-break: normal; -} - -code { - font-size: 0.875em; - color: #d63384; - word-wrap: break-word; -} -a > code { - color: inherit; -} - -kbd { - padding: 0.2rem 0.4rem; - font-size: 0.875em; - color: #fff; - background-color: #212529; - border-radius: 0.2rem; -} -kbd kbd { - padding: 0; - font-size: 1em; - font-weight: 700; -} - -figure { - margin: 0 0 1rem; -} - -img, -svg { - vertical-align: middle; -} - -table { - caption-side: bottom; - border-collapse: collapse; -} - -caption { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - color: #6c757d; - text-align: left; -} - -th { - text-align: inherit; - text-align: -webkit-match-parent; -} - -thead, -tbody, -tfoot, -tr, -td, -th { - border-color: inherit; - border-style: solid; - border-width: 0; -} - -label { - display: inline-block; -} - -button { - border-radius: 0; -} - -button:focus:not(:focus-visible) { - outline: 0; -} - -input, -button, -select, -optgroup, -textarea { - margin: 0; - font-family: inherit; - font-size: inherit; - line-height: inherit; -} - -button, -select { - text-transform: none; -} - -[role=button] { - cursor: pointer; -} - -select { - word-wrap: normal; -} -select:disabled { - opacity: 1; -} - -[list]::-webkit-calendar-picker-indicator { - display: none; -} - -button, -[type=button], -[type=reset], -[type=submit] { - -webkit-appearance: button; -} -button:not(:disabled), -[type=button]:not(:disabled), -[type=reset]:not(:disabled), -[type=submit]:not(:disabled) { - cursor: pointer; -} - -::-moz-focus-inner { - padding: 0; - border-style: none; -} - -textarea { - resize: vertical; -} - -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; -} - -legend { - float: left; - width: 100%; - padding: 0; - margin-bottom: 0.5rem; - font-size: calc(1.275rem + 0.3vw); - line-height: inherit; -} -@media (min-width: 1200px) { - legend { - font-size: 1.5rem; - } -} -legend + * { - clear: left; -} - -::-webkit-datetime-edit-fields-wrapper, -::-webkit-datetime-edit-text, -::-webkit-datetime-edit-minute, -::-webkit-datetime-edit-hour-field, -::-webkit-datetime-edit-day-field, -::-webkit-datetime-edit-month-field, -::-webkit-datetime-edit-year-field { - padding: 0; -} - -::-webkit-inner-spin-button { - height: auto; -} - -[type=search] { - outline-offset: -2px; - -webkit-appearance: textfield; -} - -/* rtl:raw: -[type="tel"], -[type="url"], -[type="email"], -[type="number"] { - direction: ltr; -} -*/ -::-webkit-search-decoration { - -webkit-appearance: none; -} - -::-webkit-color-swatch-wrapper { - padding: 0; -} - -::file-selector-button { - font: inherit; -} - -::-webkit-file-upload-button { - font: inherit; - -webkit-appearance: button; -} - -output { - display: inline-block; -} - -iframe { - border: 0; -} - -summary { - display: list-item; - cursor: pointer; -} - -progress { - vertical-align: baseline; -} - -[hidden] { - display: none !important; -} - -.lead { - font-size: 1.25rem; - font-weight: 300; -} - -.display-1 { - font-size: calc(1.625rem + 4.5vw); - font-weight: 300; - line-height: 1.2; -} -@media (min-width: 1200px) { - .display-1 { - font-size: 5rem; - } -} - -.display-2 { - font-size: calc(1.575rem + 3.9vw); - font-weight: 300; - line-height: 1.2; -} -@media (min-width: 1200px) { - .display-2 { - font-size: 4.5rem; - } -} - -.display-3 { - font-size: calc(1.525rem + 3.3vw); - font-weight: 300; - line-height: 1.2; -} -@media (min-width: 1200px) { - .display-3 { - font-size: 4rem; - } -} - -.display-4 { - font-size: calc(1.475rem + 2.7vw); - font-weight: 300; - line-height: 1.2; -} -@media (min-width: 1200px) { - .display-4 { - font-size: 3.5rem; - } -} - -.display-5 { - font-size: calc(1.425rem + 2.1vw); - font-weight: 300; - line-height: 1.2; -} -@media (min-width: 1200px) { - .display-5 { - font-size: 3rem; - } -} - -.display-6 { - font-size: calc(1.375rem + 1.5vw); - font-weight: 300; - line-height: 1.2; -} -@media (min-width: 1200px) { - .display-6 { - font-size: 2.5rem; - } -} - -.list-unstyled { - padding-left: 0; - list-style: none; -} - -.list-inline { - padding-left: 0; - list-style: none; -} - -.list-inline-item { - display: inline-block; -} -.list-inline-item:not(:last-child) { - margin-right: 0.5rem; -} - -.initialism { - font-size: 0.875em; - text-transform: uppercase; -} - -.blockquote { - margin-bottom: 1rem; - font-size: 1.25rem; -} -.blockquote > :last-child { - margin-bottom: 0; -} - -.blockquote-footer { - margin-top: -1rem; - margin-bottom: 1rem; - font-size: 0.875em; - color: #6c757d; -} -.blockquote-footer::before { - content: "— "; -} - -.img-fluid { - max-width: 100%; - height: auto; -} - -.img-thumbnail { - padding: 0.25rem; - background-color: #fff; - border: 1px solid #dee2e6; - border-radius: 0.25rem; - max-width: 100%; - height: auto; -} - -.figure { - display: inline-block; -} - -.figure-img { - margin-bottom: 0.5rem; - line-height: 1; -} - -.figure-caption { - font-size: 0.875em; - color: #6c757d; -} - -.container, -.container-fluid, -.container-xxl, -.container-xl, -.container-lg, -.container-md, -.container-sm { - width: 100%; - padding-right: var(--bs-gutter-x, 0.75rem); - padding-left: var(--bs-gutter-x, 0.75rem); - margin-right: auto; - margin-left: auto; -} - -@media (min-width: 576px) { - .container-sm, .container { - max-width: 540px; - } -} -@media (min-width: 768px) { - .container-md, .container-sm, .container { - max-width: 720px; - } -} -@media (min-width: 992px) { - .container-lg, .container-md, .container-sm, .container { - max-width: 960px; - } -} -@media (min-width: 1200px) { - .container-xl, .container-lg, .container-md, .container-sm, .container { - max-width: 1140px; - } -} -@media (min-width: 1400px) { - .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { - max-width: 1320px; - } -} -.row { - --bs-gutter-x: 1.5rem; - --bs-gutter-y: 0; - display: flex; - flex-wrap: wrap; - margin-top: calc(var(--bs-gutter-y) * -1); - margin-right: calc(var(--bs-gutter-x) * -.5); - margin-left: calc(var(--bs-gutter-x) * -.5); -} -.row > * { - flex-shrink: 0; - width: 100%; - max-width: 100%; - padding-right: calc(var(--bs-gutter-x) * .5); - padding-left: calc(var(--bs-gutter-x) * .5); - margin-top: var(--bs-gutter-y); -} - -.col { - flex: 1 0 0%; -} - -.row-cols-auto > * { - flex: 0 0 auto; - width: auto; -} - -.row-cols-1 > * { - flex: 0 0 auto; - width: 100%; -} - -.row-cols-2 > * { - flex: 0 0 auto; - width: 50%; -} - -.row-cols-3 > * { - flex: 0 0 auto; - width: 33.3333333333%; -} - -.row-cols-4 > * { - flex: 0 0 auto; - width: 25%; -} - -.row-cols-5 > * { - flex: 0 0 auto; - width: 20%; -} - -.row-cols-6 > * { - flex: 0 0 auto; - width: 16.6666666667%; -} - -@media (min-width: 576px) { - .col-sm { - flex: 1 0 0%; - } - - .row-cols-sm-auto > * { - flex: 0 0 auto; - width: auto; - } - - .row-cols-sm-1 > * { - flex: 0 0 auto; - width: 100%; - } - - .row-cols-sm-2 > * { - flex: 0 0 auto; - width: 50%; - } - - .row-cols-sm-3 > * { - flex: 0 0 auto; - width: 33.3333333333%; - } - - .row-cols-sm-4 > * { - flex: 0 0 auto; - width: 25%; - } - - .row-cols-sm-5 > * { - flex: 0 0 auto; - width: 20%; - } - - .row-cols-sm-6 > * { - flex: 0 0 auto; - width: 16.6666666667%; - } -} -@media (min-width: 768px) { - .col-md { - flex: 1 0 0%; - } - - .row-cols-md-auto > * { - flex: 0 0 auto; - width: auto; - } - - .row-cols-md-1 > * { - flex: 0 0 auto; - width: 100%; - } - - .row-cols-md-2 > * { - flex: 0 0 auto; - width: 50%; - } - - .row-cols-md-3 > * { - flex: 0 0 auto; - width: 33.3333333333%; - } - - .row-cols-md-4 > * { - flex: 0 0 auto; - width: 25%; - } - - .row-cols-md-5 > * { - flex: 0 0 auto; - width: 20%; - } - - .row-cols-md-6 > * { - flex: 0 0 auto; - width: 16.6666666667%; - } -} -@media (min-width: 992px) { - .col-lg { - flex: 1 0 0%; - } - - .row-cols-lg-auto > * { - flex: 0 0 auto; - width: auto; - } - - .row-cols-lg-1 > * { - flex: 0 0 auto; - width: 100%; - } - - .row-cols-lg-2 > * { - flex: 0 0 auto; - width: 50%; - } - - .row-cols-lg-3 > * { - flex: 0 0 auto; - width: 33.3333333333%; - } - - .row-cols-lg-4 > * { - flex: 0 0 auto; - width: 25%; - } - - .row-cols-lg-5 > * { - flex: 0 0 auto; - width: 20%; - } - - .row-cols-lg-6 > * { - flex: 0 0 auto; - width: 16.6666666667%; - } -} -@media (min-width: 1200px) { - .col-xl { - flex: 1 0 0%; - } - - .row-cols-xl-auto > * { - flex: 0 0 auto; - width: auto; - } - - .row-cols-xl-1 > * { - flex: 0 0 auto; - width: 100%; - } - - .row-cols-xl-2 > * { - flex: 0 0 auto; - width: 50%; - } - - .row-cols-xl-3 > * { - flex: 0 0 auto; - width: 33.3333333333%; - } - - .row-cols-xl-4 > * { - flex: 0 0 auto; - width: 25%; - } - - .row-cols-xl-5 > * { - flex: 0 0 auto; - width: 20%; - } - - .row-cols-xl-6 > * { - flex: 0 0 auto; - width: 16.6666666667%; - } -} -@media (min-width: 1400px) { - .col-xxl { - flex: 1 0 0%; - } - - .row-cols-xxl-auto > * { - flex: 0 0 auto; - width: auto; - } - - .row-cols-xxl-1 > * { - flex: 0 0 auto; - width: 100%; - } - - .row-cols-xxl-2 > * { - flex: 0 0 auto; - width: 50%; - } - - .row-cols-xxl-3 > * { - flex: 0 0 auto; - width: 33.3333333333%; - } - - .row-cols-xxl-4 > * { - flex: 0 0 auto; - width: 25%; - } - - .row-cols-xxl-5 > * { - flex: 0 0 auto; - width: 20%; - } - - .row-cols-xxl-6 > * { - flex: 0 0 auto; - width: 16.6666666667%; - } -} -.col-auto { - flex: 0 0 auto; - width: auto; -} - -.col-1 { - flex: 0 0 auto; - width: 8.33333333%; -} - -.col-2 { - flex: 0 0 auto; - width: 16.66666667%; -} - -.col-3 { - flex: 0 0 auto; - width: 25%; -} - -.col-4 { - flex: 0 0 auto; - width: 33.33333333%; -} - -.col-5 { - flex: 0 0 auto; - width: 41.66666667%; -} - -.col-6 { - flex: 0 0 auto; - width: 50%; -} - -.col-7 { - flex: 0 0 auto; - width: 58.33333333%; -} - -.col-8 { - flex: 0 0 auto; - width: 66.66666667%; -} - -.col-9 { - flex: 0 0 auto; - width: 75%; -} - -.col-10 { - flex: 0 0 auto; - width: 83.33333333%; -} - -.col-11 { - flex: 0 0 auto; - width: 91.66666667%; -} - -.col-12 { - flex: 0 0 auto; - width: 100%; -} - -.offset-1 { - margin-left: 8.33333333%; -} - -.offset-2 { - margin-left: 16.66666667%; -} - -.offset-3 { - margin-left: 25%; -} - -.offset-4 { - margin-left: 33.33333333%; -} - -.offset-5 { - margin-left: 41.66666667%; -} - -.offset-6 { - margin-left: 50%; -} - -.offset-7 { - margin-left: 58.33333333%; -} - -.offset-8 { - margin-left: 66.66666667%; -} - -.offset-9 { - margin-left: 75%; -} - -.offset-10 { - margin-left: 83.33333333%; -} - -.offset-11 { - margin-left: 91.66666667%; -} - -.g-0, -.gx-0 { - --bs-gutter-x: 0; -} - -.g-0, -.gy-0 { - --bs-gutter-y: 0; -} - -.g-1, -.gx-1 { - --bs-gutter-x: 0.25rem; -} - -.g-1, -.gy-1 { - --bs-gutter-y: 0.25rem; -} - -.g-2, -.gx-2 { - --bs-gutter-x: 0.5rem; -} - -.g-2, -.gy-2 { - --bs-gutter-y: 0.5rem; -} - -.g-3, -.gx-3 { - --bs-gutter-x: 1rem; -} - -.g-3, -.gy-3 { - --bs-gutter-y: 1rem; -} - -.g-4, -.gx-4 { - --bs-gutter-x: 1.5rem; -} - -.g-4, -.gy-4 { - --bs-gutter-y: 1.5rem; -} - -.g-5, -.gx-5 { - --bs-gutter-x: 3rem; -} - -.g-5, -.gy-5 { - --bs-gutter-y: 3rem; -} - -@media (min-width: 576px) { - .col-sm-auto { - flex: 0 0 auto; - width: auto; - } - - .col-sm-1 { - flex: 0 0 auto; - width: 8.33333333%; - } - - .col-sm-2 { - flex: 0 0 auto; - width: 16.66666667%; - } - - .col-sm-3 { - flex: 0 0 auto; - width: 25%; - } - - .col-sm-4 { - flex: 0 0 auto; - width: 33.33333333%; - } - - .col-sm-5 { - flex: 0 0 auto; - width: 41.66666667%; - } - - .col-sm-6 { - flex: 0 0 auto; - width: 50%; - } - - .col-sm-7 { - flex: 0 0 auto; - width: 58.33333333%; - } - - .col-sm-8 { - flex: 0 0 auto; - width: 66.66666667%; - } - - .col-sm-9 { - flex: 0 0 auto; - width: 75%; - } - - .col-sm-10 { - flex: 0 0 auto; - width: 83.33333333%; - } - - .col-sm-11 { - flex: 0 0 auto; - width: 91.66666667%; - } - - .col-sm-12 { - flex: 0 0 auto; - width: 100%; - } - - .offset-sm-0 { - margin-left: 0; - } - - .offset-sm-1 { - margin-left: 8.33333333%; - } - - .offset-sm-2 { - margin-left: 16.66666667%; - } - - .offset-sm-3 { - margin-left: 25%; - } - - .offset-sm-4 { - margin-left: 33.33333333%; - } - - .offset-sm-5 { - margin-left: 41.66666667%; - } - - .offset-sm-6 { - margin-left: 50%; - } - - .offset-sm-7 { - margin-left: 58.33333333%; - } - - .offset-sm-8 { - margin-left: 66.66666667%; - } - - .offset-sm-9 { - margin-left: 75%; - } - - .offset-sm-10 { - margin-left: 83.33333333%; - } - - .offset-sm-11 { - margin-left: 91.66666667%; - } - - .g-sm-0, -.gx-sm-0 { - --bs-gutter-x: 0; - } - - .g-sm-0, -.gy-sm-0 { - --bs-gutter-y: 0; - } - - .g-sm-1, -.gx-sm-1 { - --bs-gutter-x: 0.25rem; - } - - .g-sm-1, -.gy-sm-1 { - --bs-gutter-y: 0.25rem; - } - - .g-sm-2, -.gx-sm-2 { - --bs-gutter-x: 0.5rem; - } - - .g-sm-2, -.gy-sm-2 { - --bs-gutter-y: 0.5rem; - } - - .g-sm-3, -.gx-sm-3 { - --bs-gutter-x: 1rem; - } - - .g-sm-3, -.gy-sm-3 { - --bs-gutter-y: 1rem; - } - - .g-sm-4, -.gx-sm-4 { - --bs-gutter-x: 1.5rem; - } - - .g-sm-4, -.gy-sm-4 { - --bs-gutter-y: 1.5rem; - } - - .g-sm-5, -.gx-sm-5 { - --bs-gutter-x: 3rem; - } - - .g-sm-5, -.gy-sm-5 { - --bs-gutter-y: 3rem; - } -} -@media (min-width: 768px) { - .col-md-auto { - flex: 0 0 auto; - width: auto; - } - - .col-md-1 { - flex: 0 0 auto; - width: 8.33333333%; - } - - .col-md-2 { - flex: 0 0 auto; - width: 16.66666667%; - } - - .col-md-3 { - flex: 0 0 auto; - width: 25%; - } - - .col-md-4 { - flex: 0 0 auto; - width: 33.33333333%; - } - - .col-md-5 { - flex: 0 0 auto; - width: 41.66666667%; - } - - .col-md-6 { - flex: 0 0 auto; - width: 50%; - } - - .col-md-7 { - flex: 0 0 auto; - width: 58.33333333%; - } - - .col-md-8 { - flex: 0 0 auto; - width: 66.66666667%; - } - - .col-md-9 { - flex: 0 0 auto; - width: 75%; - } - - .col-md-10 { - flex: 0 0 auto; - width: 83.33333333%; - } - - .col-md-11 { - flex: 0 0 auto; - width: 91.66666667%; - } - - .col-md-12 { - flex: 0 0 auto; - width: 100%; - } - - .offset-md-0 { - margin-left: 0; - } - - .offset-md-1 { - margin-left: 8.33333333%; - } - - .offset-md-2 { - margin-left: 16.66666667%; - } - - .offset-md-3 { - margin-left: 25%; - } - - .offset-md-4 { - margin-left: 33.33333333%; - } - - .offset-md-5 { - margin-left: 41.66666667%; - } - - .offset-md-6 { - margin-left: 50%; - } - - .offset-md-7 { - margin-left: 58.33333333%; - } - - .offset-md-8 { - margin-left: 66.66666667%; - } - - .offset-md-9 { - margin-left: 75%; - } - - .offset-md-10 { - margin-left: 83.33333333%; - } - - .offset-md-11 { - margin-left: 91.66666667%; - } - - .g-md-0, -.gx-md-0 { - --bs-gutter-x: 0; - } - - .g-md-0, -.gy-md-0 { - --bs-gutter-y: 0; - } - - .g-md-1, -.gx-md-1 { - --bs-gutter-x: 0.25rem; - } - - .g-md-1, -.gy-md-1 { - --bs-gutter-y: 0.25rem; - } - - .g-md-2, -.gx-md-2 { - --bs-gutter-x: 0.5rem; - } - - .g-md-2, -.gy-md-2 { - --bs-gutter-y: 0.5rem; - } - - .g-md-3, -.gx-md-3 { - --bs-gutter-x: 1rem; - } - - .g-md-3, -.gy-md-3 { - --bs-gutter-y: 1rem; - } - - .g-md-4, -.gx-md-4 { - --bs-gutter-x: 1.5rem; - } - - .g-md-4, -.gy-md-4 { - --bs-gutter-y: 1.5rem; - } - - .g-md-5, -.gx-md-5 { - --bs-gutter-x: 3rem; - } - - .g-md-5, -.gy-md-5 { - --bs-gutter-y: 3rem; - } -} -@media (min-width: 992px) { - .col-lg-auto { - flex: 0 0 auto; - width: auto; - } - - .col-lg-1 { - flex: 0 0 auto; - width: 8.33333333%; - } - - .col-lg-2 { - flex: 0 0 auto; - width: 16.66666667%; - } - - .col-lg-3 { - flex: 0 0 auto; - width: 25%; - } - - .col-lg-4 { - flex: 0 0 auto; - width: 33.33333333%; - } - - .col-lg-5 { - flex: 0 0 auto; - width: 41.66666667%; - } - - .col-lg-6 { - flex: 0 0 auto; - width: 50%; - } - - .col-lg-7 { - flex: 0 0 auto; - width: 58.33333333%; - } - - .col-lg-8 { - flex: 0 0 auto; - width: 66.66666667%; - } - - .col-lg-9 { - flex: 0 0 auto; - width: 75%; - } - - .col-lg-10 { - flex: 0 0 auto; - width: 83.33333333%; - } - - .col-lg-11 { - flex: 0 0 auto; - width: 91.66666667%; - } - - .col-lg-12 { - flex: 0 0 auto; - width: 100%; - } - - .offset-lg-0 { - margin-left: 0; - } - - .offset-lg-1 { - margin-left: 8.33333333%; - } - - .offset-lg-2 { - margin-left: 16.66666667%; - } - - .offset-lg-3 { - margin-left: 25%; - } - - .offset-lg-4 { - margin-left: 33.33333333%; - } - - .offset-lg-5 { - margin-left: 41.66666667%; - } - - .offset-lg-6 { - margin-left: 50%; - } - - .offset-lg-7 { - margin-left: 58.33333333%; - } - - .offset-lg-8 { - margin-left: 66.66666667%; - } - - .offset-lg-9 { - margin-left: 75%; - } - - .offset-lg-10 { - margin-left: 83.33333333%; - } - - .offset-lg-11 { - margin-left: 91.66666667%; - } - - .g-lg-0, -.gx-lg-0 { - --bs-gutter-x: 0; - } - - .g-lg-0, -.gy-lg-0 { - --bs-gutter-y: 0; - } - - .g-lg-1, -.gx-lg-1 { - --bs-gutter-x: 0.25rem; - } - - .g-lg-1, -.gy-lg-1 { - --bs-gutter-y: 0.25rem; - } - - .g-lg-2, -.gx-lg-2 { - --bs-gutter-x: 0.5rem; - } - - .g-lg-2, -.gy-lg-2 { - --bs-gutter-y: 0.5rem; - } - - .g-lg-3, -.gx-lg-3 { - --bs-gutter-x: 1rem; - } - - .g-lg-3, -.gy-lg-3 { - --bs-gutter-y: 1rem; - } - - .g-lg-4, -.gx-lg-4 { - --bs-gutter-x: 1.5rem; - } - - .g-lg-4, -.gy-lg-4 { - --bs-gutter-y: 1.5rem; - } - - .g-lg-5, -.gx-lg-5 { - --bs-gutter-x: 3rem; - } - - .g-lg-5, -.gy-lg-5 { - --bs-gutter-y: 3rem; - } -} -@media (min-width: 1200px) { - .col-xl-auto { - flex: 0 0 auto; - width: auto; - } - - .col-xl-1 { - flex: 0 0 auto; - width: 8.33333333%; - } - - .col-xl-2 { - flex: 0 0 auto; - width: 16.66666667%; - } - - .col-xl-3 { - flex: 0 0 auto; - width: 25%; - } - - .col-xl-4 { - flex: 0 0 auto; - width: 33.33333333%; - } - - .col-xl-5 { - flex: 0 0 auto; - width: 41.66666667%; - } - - .col-xl-6 { - flex: 0 0 auto; - width: 50%; - } - - .col-xl-7 { - flex: 0 0 auto; - width: 58.33333333%; - } - - .col-xl-8 { - flex: 0 0 auto; - width: 66.66666667%; - } - - .col-xl-9 { - flex: 0 0 auto; - width: 75%; - } - - .col-xl-10 { - flex: 0 0 auto; - width: 83.33333333%; - } - - .col-xl-11 { - flex: 0 0 auto; - width: 91.66666667%; - } - - .col-xl-12 { - flex: 0 0 auto; - width: 100%; - } - - .offset-xl-0 { - margin-left: 0; - } - - .offset-xl-1 { - margin-left: 8.33333333%; - } - - .offset-xl-2 { - margin-left: 16.66666667%; - } - - .offset-xl-3 { - margin-left: 25%; - } - - .offset-xl-4 { - margin-left: 33.33333333%; - } - - .offset-xl-5 { - margin-left: 41.66666667%; - } - - .offset-xl-6 { - margin-left: 50%; - } - - .offset-xl-7 { - margin-left: 58.33333333%; - } - - .offset-xl-8 { - margin-left: 66.66666667%; - } - - .offset-xl-9 { - margin-left: 75%; - } - - .offset-xl-10 { - margin-left: 83.33333333%; - } - - .offset-xl-11 { - margin-left: 91.66666667%; - } - - .g-xl-0, -.gx-xl-0 { - --bs-gutter-x: 0; - } - - .g-xl-0, -.gy-xl-0 { - --bs-gutter-y: 0; - } - - .g-xl-1, -.gx-xl-1 { - --bs-gutter-x: 0.25rem; - } - - .g-xl-1, -.gy-xl-1 { - --bs-gutter-y: 0.25rem; - } - - .g-xl-2, -.gx-xl-2 { - --bs-gutter-x: 0.5rem; - } - - .g-xl-2, -.gy-xl-2 { - --bs-gutter-y: 0.5rem; - } - - .g-xl-3, -.gx-xl-3 { - --bs-gutter-x: 1rem; - } - - .g-xl-3, -.gy-xl-3 { - --bs-gutter-y: 1rem; - } - - .g-xl-4, -.gx-xl-4 { - --bs-gutter-x: 1.5rem; - } - - .g-xl-4, -.gy-xl-4 { - --bs-gutter-y: 1.5rem; - } - - .g-xl-5, -.gx-xl-5 { - --bs-gutter-x: 3rem; - } - - .g-xl-5, -.gy-xl-5 { - --bs-gutter-y: 3rem; - } -} -@media (min-width: 1400px) { - .col-xxl-auto { - flex: 0 0 auto; - width: auto; - } - - .col-xxl-1 { - flex: 0 0 auto; - width: 8.33333333%; - } - - .col-xxl-2 { - flex: 0 0 auto; - width: 16.66666667%; - } - - .col-xxl-3 { - flex: 0 0 auto; - width: 25%; - } - - .col-xxl-4 { - flex: 0 0 auto; - width: 33.33333333%; - } - - .col-xxl-5 { - flex: 0 0 auto; - width: 41.66666667%; - } - - .col-xxl-6 { - flex: 0 0 auto; - width: 50%; - } - - .col-xxl-7 { - flex: 0 0 auto; - width: 58.33333333%; - } - - .col-xxl-8 { - flex: 0 0 auto; - width: 66.66666667%; - } - - .col-xxl-9 { - flex: 0 0 auto; - width: 75%; - } - - .col-xxl-10 { - flex: 0 0 auto; - width: 83.33333333%; - } - - .col-xxl-11 { - flex: 0 0 auto; - width: 91.66666667%; - } - - .col-xxl-12 { - flex: 0 0 auto; - width: 100%; - } - - .offset-xxl-0 { - margin-left: 0; - } - - .offset-xxl-1 { - margin-left: 8.33333333%; - } - - .offset-xxl-2 { - margin-left: 16.66666667%; - } - - .offset-xxl-3 { - margin-left: 25%; - } - - .offset-xxl-4 { - margin-left: 33.33333333%; - } - - .offset-xxl-5 { - margin-left: 41.66666667%; - } - - .offset-xxl-6 { - margin-left: 50%; - } - - .offset-xxl-7 { - margin-left: 58.33333333%; - } - - .offset-xxl-8 { - margin-left: 66.66666667%; - } - - .offset-xxl-9 { - margin-left: 75%; - } - - .offset-xxl-10 { - margin-left: 83.33333333%; - } - - .offset-xxl-11 { - margin-left: 91.66666667%; - } - - .g-xxl-0, -.gx-xxl-0 { - --bs-gutter-x: 0; - } - - .g-xxl-0, -.gy-xxl-0 { - --bs-gutter-y: 0; - } - - .g-xxl-1, -.gx-xxl-1 { - --bs-gutter-x: 0.25rem; - } - - .g-xxl-1, -.gy-xxl-1 { - --bs-gutter-y: 0.25rem; - } - - .g-xxl-2, -.gx-xxl-2 { - --bs-gutter-x: 0.5rem; - } - - .g-xxl-2, -.gy-xxl-2 { - --bs-gutter-y: 0.5rem; - } - - .g-xxl-3, -.gx-xxl-3 { - --bs-gutter-x: 1rem; - } - - .g-xxl-3, -.gy-xxl-3 { - --bs-gutter-y: 1rem; - } - - .g-xxl-4, -.gx-xxl-4 { - --bs-gutter-x: 1.5rem; - } - - .g-xxl-4, -.gy-xxl-4 { - --bs-gutter-y: 1.5rem; - } - - .g-xxl-5, -.gx-xxl-5 { - --bs-gutter-x: 3rem; - } - - .g-xxl-5, -.gy-xxl-5 { - --bs-gutter-y: 3rem; - } -} -.table { - --bs-table-bg: transparent; - --bs-table-accent-bg: transparent; - --bs-table-striped-color: #212529; - --bs-table-striped-bg: rgba(0, 0, 0, 0.05); - --bs-table-active-color: #212529; - --bs-table-active-bg: rgba(0, 0, 0, 0.1); - --bs-table-hover-color: #212529; - --bs-table-hover-bg: rgba(0, 0, 0, 0.075); - width: 100%; - margin-bottom: 1rem; - color: #212529; - vertical-align: top; - border-color: #dee2e6; -} -.table > :not(caption) > * > * { - padding: 0.5rem 0.5rem; - background-color: var(--bs-table-bg); - border-bottom-width: 1px; - box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); -} -.table > tbody { - vertical-align: inherit; -} -.table > thead { - vertical-align: bottom; -} -.table > :not(:last-child) > :last-child > * { - border-bottom-color: currentColor; -} - -.caption-top { - caption-side: top; -} - -.table-sm > :not(caption) > * > * { - padding: 0.25rem 0.25rem; -} - -.table-bordered > :not(caption) > * { - border-width: 1px 0; -} -.table-bordered > :not(caption) > * > * { - border-width: 0 1px; -} - -.table-borderless > :not(caption) > * > * { - border-bottom-width: 0; -} - -.table-striped > tbody > tr:nth-of-type(odd) { - --bs-table-accent-bg: var(--bs-table-striped-bg); - color: var(--bs-table-striped-color); -} - -.table-active { - --bs-table-accent-bg: var(--bs-table-active-bg); - color: var(--bs-table-active-color); -} - -.table-hover > tbody > tr:hover { - --bs-table-accent-bg: var(--bs-table-hover-bg); - color: var(--bs-table-hover-color); -} - -.table-primary { - --bs-table-bg: #cfe2ff; - --bs-table-striped-bg: #c5d7f2; - --bs-table-striped-color: #000; - --bs-table-active-bg: #bacbe6; - --bs-table-active-color: #000; - --bs-table-hover-bg: #bfd1ec; - --bs-table-hover-color: #000; - color: #000; - border-color: #bacbe6; -} - -.table-secondary { - --bs-table-bg: #e2e3e5; - --bs-table-striped-bg: #d7d8da; - --bs-table-striped-color: #000; - --bs-table-active-bg: #cbccce; - --bs-table-active-color: #000; - --bs-table-hover-bg: #d1d2d4; - --bs-table-hover-color: #000; - color: #000; - border-color: #cbccce; -} - -.table-success { - --bs-table-bg: #d1e7dd; - --bs-table-striped-bg: #c7dbd2; - --bs-table-striped-color: #000; - --bs-table-active-bg: #bcd0c7; - --bs-table-active-color: #000; - --bs-table-hover-bg: #c1d6cc; - --bs-table-hover-color: #000; - color: #000; - border-color: #bcd0c7; -} - -.table-info { - --bs-table-bg: #cff4fc; - --bs-table-striped-bg: #c5e8ef; - --bs-table-striped-color: #000; - --bs-table-active-bg: #badce3; - --bs-table-active-color: #000; - --bs-table-hover-bg: #bfe2e9; - --bs-table-hover-color: #000; - color: #000; - border-color: #badce3; -} - -.table-warning { - --bs-table-bg: #fff3cd; - --bs-table-striped-bg: #f2e7c3; - --bs-table-striped-color: #000; - --bs-table-active-bg: #e6dbb9; - --bs-table-active-color: #000; - --bs-table-hover-bg: #ece1be; - --bs-table-hover-color: #000; - color: #000; - border-color: #e6dbb9; -} - -.table-danger { - --bs-table-bg: #f8d7da; - --bs-table-striped-bg: #eccccf; - --bs-table-striped-color: #000; - --bs-table-active-bg: #dfc2c4; - --bs-table-active-color: #000; - --bs-table-hover-bg: #e5c7ca; - --bs-table-hover-color: #000; - color: #000; - border-color: #dfc2c4; -} - -.table-light { - --bs-table-bg: #f8f9fa; - --bs-table-striped-bg: #ecedee; - --bs-table-striped-color: #000; - --bs-table-active-bg: #dfe0e1; - --bs-table-active-color: #000; - --bs-table-hover-bg: #e5e6e7; - --bs-table-hover-color: #000; - color: #000; - border-color: #dfe0e1; -} - -.table-dark { - --bs-table-bg: #212529; - --bs-table-striped-bg: #2c3034; - --bs-table-striped-color: #fff; - --bs-table-active-bg: #373b3e; - --bs-table-active-color: #fff; - --bs-table-hover-bg: #323539; - --bs-table-hover-color: #fff; - color: #fff; - border-color: #373b3e; -} - -.table-responsive { - overflow-x: auto; - -webkit-overflow-scrolling: touch; -} - -@media (max-width: 575.98px) { - .table-responsive-sm { - overflow-x: auto; - -webkit-overflow-scrolling: touch; - } -} -@media (max-width: 767.98px) { - .table-responsive-md { - overflow-x: auto; - -webkit-overflow-scrolling: touch; - } -} -@media (max-width: 991.98px) { - .table-responsive-lg { - overflow-x: auto; - -webkit-overflow-scrolling: touch; - } -} -@media (max-width: 1199.98px) { - .table-responsive-xl { - overflow-x: auto; - -webkit-overflow-scrolling: touch; - } -} -@media (max-width: 1399.98px) { - .table-responsive-xxl { - overflow-x: auto; - -webkit-overflow-scrolling: touch; - } -} -.form-label { - margin-bottom: 0.5rem; -} - -.col-form-label { - padding-top: calc(0.375rem + 1px); - padding-bottom: calc(0.375rem + 1px); - margin-bottom: 0; - font-size: inherit; - line-height: 1.5; -} - -.col-form-label-lg { - padding-top: calc(0.5rem + 1px); - padding-bottom: calc(0.5rem + 1px); - font-size: 1.25rem; -} - -.col-form-label-sm { - padding-top: calc(0.25rem + 1px); - padding-bottom: calc(0.25rem + 1px); - font-size: 0.875rem; -} - -.form-text { - margin-top: 0.25rem; - font-size: 0.875em; - color: #6c757d; -} - -.form-control { - display: block; - width: 100%; - padding: 0.375rem 0.75rem; - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - color: #212529; - background-color: #fff; - background-clip: padding-box; - border: 1px solid #ced4da; - appearance: none; - border-radius: 0.25rem; - transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .form-control { - transition: none; - } -} -.form-control[type=file] { - overflow: hidden; -} -.form-control[type=file]:not(:disabled):not([readonly]) { - cursor: pointer; -} -.form-control:focus { - color: #212529; - background-color: #fff; - border-color: #86b7fe; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} -.form-control::-webkit-date-and-time-value { - height: 1.5em; -} -.form-control::placeholder { - color: #6c757d; - opacity: 1; -} -.form-control:disabled, .form-control[readonly] { - background-color: #e9ecef; - opacity: 1; -} -.form-control::file-selector-button { - padding: 0.375rem 0.75rem; - margin: -0.375rem -0.75rem; - margin-inline-end: 0.75rem; - color: #212529; - background-color: #e9ecef; - pointer-events: none; - border-color: inherit; - border-style: solid; - border-width: 0; - border-inline-end-width: 1px; - border-radius: 0; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .form-control::file-selector-button { - transition: none; - } -} -.form-control:hover:not(:disabled):not([readonly])::file-selector-button { - background-color: #dde0e3; -} -.form-control::-webkit-file-upload-button { - padding: 0.375rem 0.75rem; - margin: -0.375rem -0.75rem; - margin-inline-end: 0.75rem; - color: #212529; - background-color: #e9ecef; - pointer-events: none; - border-color: inherit; - border-style: solid; - border-width: 0; - border-inline-end-width: 1px; - border-radius: 0; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .form-control::-webkit-file-upload-button { - transition: none; - } -} -.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button { - background-color: #dde0e3; -} - -.form-control-plaintext { - display: block; - width: 100%; - padding: 0.375rem 0; - margin-bottom: 0; - line-height: 1.5; - color: #212529; - background-color: transparent; - border: solid transparent; - border-width: 1px 0; -} -.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg { - padding-right: 0; - padding-left: 0; -} - -.form-control-sm { - min-height: calc(1.5em + (0.5rem + 2px)); - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - border-radius: 0.2rem; -} -.form-control-sm::file-selector-button { - padding: 0.25rem 0.5rem; - margin: -0.25rem -0.5rem; - margin-inline-end: 0.5rem; -} -.form-control-sm::-webkit-file-upload-button { - padding: 0.25rem 0.5rem; - margin: -0.25rem -0.5rem; - margin-inline-end: 0.5rem; -} - -.form-control-lg { - min-height: calc(1.5em + (1rem + 2px)); - padding: 0.5rem 1rem; - font-size: 1.25rem; - border-radius: 0.3rem; -} -.form-control-lg::file-selector-button { - padding: 0.5rem 1rem; - margin: -0.5rem -1rem; - margin-inline-end: 1rem; -} -.form-control-lg::-webkit-file-upload-button { - padding: 0.5rem 1rem; - margin: -0.5rem -1rem; - margin-inline-end: 1rem; -} - -textarea.form-control { - min-height: calc(1.5em + (0.75rem + 2px)); -} -textarea.form-control-sm { - min-height: calc(1.5em + (0.5rem + 2px)); -} -textarea.form-control-lg { - min-height: calc(1.5em + (1rem + 2px)); -} - -.form-control-color { - max-width: 3rem; - height: auto; - padding: 0.375rem; -} -.form-control-color:not(:disabled):not([readonly]) { - cursor: pointer; -} -.form-control-color::-moz-color-swatch { - height: 1.5em; - border-radius: 0.25rem; -} -.form-control-color::-webkit-color-swatch { - height: 1.5em; - border-radius: 0.25rem; -} - -.form-select { - display: block; - width: 100%; - padding: 0.375rem 2.25rem 0.375rem 0.75rem; - -moz-padding-start: calc(0.75rem - 3px); - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - color: #212529; - background-color: #fff; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); - background-repeat: no-repeat; - background-position: right 0.75rem center; - background-size: 16px 12px; - border: 1px solid #ced4da; - border-radius: 0.25rem; - transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - appearance: none; -} -@media (prefers-reduced-motion: reduce) { - .form-select { - transition: none; - } -} -.form-select:focus { - border-color: #86b7fe; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} -.form-select[multiple], .form-select[size]:not([size="1"]) { - padding-right: 0.75rem; - background-image: none; -} -.form-select:disabled { - background-color: #e9ecef; -} -.form-select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 #212529; -} - -.form-select-sm { - padding-top: 0.25rem; - padding-bottom: 0.25rem; - padding-left: 0.5rem; - font-size: 0.875rem; -} - -.form-select-lg { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - padding-left: 1rem; - font-size: 1.25rem; -} - -.form-check { - display: block; - min-height: 1.5rem; - padding-left: 1.5em; - margin-bottom: 0.125rem; -} -.form-check .form-check-input { - float: left; - margin-left: -1.5em; -} - -.form-check-input { - width: 1em; - height: 1em; - margin-top: 0.25em; - vertical-align: top; - background-color: #fff; - background-repeat: no-repeat; - background-position: center; - background-size: contain; - border: 1px solid rgba(0, 0, 0, 0.25); - appearance: none; - color-adjust: exact; -} -.form-check-input[type=checkbox] { - border-radius: 0.25em; -} -.form-check-input[type=radio] { - border-radius: 50%; -} -.form-check-input:active { - filter: brightness(90%); -} -.form-check-input:focus { - border-color: #86b7fe; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} -.form-check-input:checked { - background-color: #0d6efd; - border-color: #0d6efd; -} -.form-check-input:checked[type=checkbox] { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e"); -} -.form-check-input:checked[type=radio] { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e"); -} -.form-check-input[type=checkbox]:indeterminate { - background-color: #0d6efd; - border-color: #0d6efd; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e"); -} -.form-check-input:disabled { - pointer-events: none; - filter: none; - opacity: 0.5; -} -.form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label { - opacity: 0.5; -} - -.form-switch { - padding-left: 2.5em; -} -.form-switch .form-check-input { - width: 2em; - margin-left: -2.5em; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); - background-position: left center; - border-radius: 2em; - transition: background-position 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .form-switch .form-check-input { - transition: none; - } -} -.form-switch .form-check-input:focus { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e"); -} -.form-switch .form-check-input:checked { - background-position: right center; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); -} - -.form-check-inline { - display: inline-block; - margin-right: 1rem; -} - -.btn-check { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none; -} -.btn-check[disabled] + .btn, .btn-check:disabled + .btn { - pointer-events: none; - filter: none; - opacity: 0.65; -} - -.form-range { - width: 100%; - height: 1.5rem; - padding: 0; - background-color: transparent; - appearance: none; -} -.form-range:focus { - outline: 0; -} -.form-range:focus::-webkit-slider-thumb { - box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} -.form-range:focus::-moz-range-thumb { - box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} -.form-range::-moz-focus-outer { - border: 0; -} -.form-range::-webkit-slider-thumb { - width: 1rem; - height: 1rem; - margin-top: -0.25rem; - background-color: #0d6efd; - border: 0; - border-radius: 1rem; - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - appearance: none; -} -@media (prefers-reduced-motion: reduce) { - .form-range::-webkit-slider-thumb { - transition: none; - } -} -.form-range::-webkit-slider-thumb:active { - background-color: #b6d4fe; -} -.form-range::-webkit-slider-runnable-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: #dee2e6; - border-color: transparent; - border-radius: 1rem; -} -.form-range::-moz-range-thumb { - width: 1rem; - height: 1rem; - background-color: #0d6efd; - border: 0; - border-radius: 1rem; - transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - appearance: none; -} -@media (prefers-reduced-motion: reduce) { - .form-range::-moz-range-thumb { - transition: none; - } -} -.form-range::-moz-range-thumb:active { - background-color: #b6d4fe; -} -.form-range::-moz-range-track { - width: 100%; - height: 0.5rem; - color: transparent; - cursor: pointer; - background-color: #dee2e6; - border-color: transparent; - border-radius: 1rem; -} -.form-range:disabled { - pointer-events: none; -} -.form-range:disabled::-webkit-slider-thumb { - background-color: #adb5bd; -} -.form-range:disabled::-moz-range-thumb { - background-color: #adb5bd; -} - -.form-floating { - position: relative; -} -.form-floating > .form-control, -.form-floating > .form-select { - height: calc(3.5rem + 2px); - line-height: 1.25; -} -.form-floating > label { - position: absolute; - top: 0; - left: 0; - height: 100%; - padding: 1rem 0.75rem; - pointer-events: none; - border: 1px solid transparent; - transform-origin: 0 0; - transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .form-floating > label { - transition: none; - } -} -.form-floating > .form-control { - padding: 1rem 0.75rem; -} -.form-floating > .form-control::placeholder { - color: transparent; -} -.form-floating > .form-control:focus, .form-floating > .form-control:not(:placeholder-shown) { - padding-top: 1.625rem; - padding-bottom: 0.625rem; -} -.form-floating > .form-control:-webkit-autofill { - padding-top: 1.625rem; - padding-bottom: 0.625rem; -} -.form-floating > .form-select { - padding-top: 1.625rem; - padding-bottom: 0.625rem; -} -.form-floating > .form-control:focus ~ label, -.form-floating > .form-control:not(:placeholder-shown) ~ label, -.form-floating > .form-select ~ label { - opacity: 0.65; - transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); -} -.form-floating > .form-control:-webkit-autofill ~ label { - opacity: 0.65; - transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); -} - -.input-group { - position: relative; - display: flex; - flex-wrap: wrap; - align-items: stretch; - width: 100%; -} -.input-group > .form-control, -.input-group > .form-select { - position: relative; - flex: 1 1 auto; - width: 1%; - min-width: 0; -} -.input-group > .form-control:focus, -.input-group > .form-select:focus { - z-index: 3; -} -.input-group .btn { - position: relative; - z-index: 2; -} -.input-group .btn:focus { - z-index: 3; -} - -.input-group-text { - display: flex; - align-items: center; - padding: 0.375rem 0.75rem; - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - color: #212529; - text-align: center; - white-space: nowrap; - background-color: #e9ecef; - border: 1px solid #ced4da; - border-radius: 0.25rem; -} - -.input-group-lg > .form-control, -.input-group-lg > .form-select, -.input-group-lg > .input-group-text, -.input-group-lg > .btn { - padding: 0.5rem 1rem; - font-size: 1.25rem; - border-radius: 0.3rem; -} - -.input-group-sm > .form-control, -.input-group-sm > .form-select, -.input-group-sm > .input-group-text, -.input-group-sm > .btn { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - border-radius: 0.2rem; -} - -.input-group-lg > .form-select, -.input-group-sm > .form-select { - padding-right: 3rem; -} - -.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu), -.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu), -.input-group.has-validation > .dropdown-toggle:nth-last-child(n+4) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { - margin-left: -1px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -.valid-feedback { - display: none; - width: 100%; - margin-top: 0.25rem; - font-size: 0.875em; - color: #198754; -} - -.valid-tooltip { - position: absolute; - top: 100%; - z-index: 5; - display: none; - max-width: 100%; - padding: 0.25rem 0.5rem; - margin-top: 0.1rem; - font-size: 0.875rem; - color: #fff; - background-color: rgba(25, 135, 84, 0.9); - border-radius: 0.25rem; -} - -.was-validated :valid ~ .valid-feedback, -.was-validated :valid ~ .valid-tooltip, -.is-valid ~ .valid-feedback, -.is-valid ~ .valid-tooltip { - display: block; -} - -.was-validated .form-control:valid, .form-control.is-valid { - border-color: #198754; - padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); - background-repeat: no-repeat; - background-position: right calc(0.375em + 0.1875rem) center; - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); -} -.was-validated .form-control:valid:focus, .form-control.is-valid:focus { - border-color: #198754; - box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); -} - -.was-validated textarea.form-control:valid, textarea.form-control.is-valid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); -} - -.was-validated .form-select:valid, .form-select.is-valid { - border-color: #198754; -} -.was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] { - padding-right: 4.125rem; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); - background-position: right 0.75rem center, center right 2.25rem; - background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); -} -.was-validated .form-select:valid:focus, .form-select.is-valid:focus { - border-color: #198754; - box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); -} - -.was-validated .form-check-input:valid, .form-check-input.is-valid { - border-color: #198754; -} -.was-validated .form-check-input:valid:checked, .form-check-input.is-valid:checked { - background-color: #198754; -} -.was-validated .form-check-input:valid:focus, .form-check-input.is-valid:focus { - box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); -} -.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label { - color: #198754; -} - -.form-check-inline .form-check-input ~ .valid-feedback { - margin-left: 0.5em; -} - -.was-validated .input-group .form-control:valid, .input-group .form-control.is-valid, -.was-validated .input-group .form-select:valid, -.input-group .form-select.is-valid { - z-index: 1; -} -.was-validated .input-group .form-control:valid:focus, .input-group .form-control.is-valid:focus, -.was-validated .input-group .form-select:valid:focus, -.input-group .form-select.is-valid:focus { - z-index: 3; -} - -.invalid-feedback { - display: none; - width: 100%; - margin-top: 0.25rem; - font-size: 0.875em; - color: #dc3545; -} - -.invalid-tooltip { - position: absolute; - top: 100%; - z-index: 5; - display: none; - max-width: 100%; - padding: 0.25rem 0.5rem; - margin-top: 0.1rem; - font-size: 0.875rem; - color: #fff; - background-color: rgba(220, 53, 69, 0.9); - border-radius: 0.25rem; -} - -.was-validated :invalid ~ .invalid-feedback, -.was-validated :invalid ~ .invalid-tooltip, -.is-invalid ~ .invalid-feedback, -.is-invalid ~ .invalid-tooltip { - display: block; -} - -.was-validated .form-control:invalid, .form-control.is-invalid { - border-color: #dc3545; - padding-right: calc(1.5em + 0.75rem); - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); - background-repeat: no-repeat; - background-position: right calc(0.375em + 0.1875rem) center; - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); -} -.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { - border-color: #dc3545; - box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); -} - -.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem); -} - -.was-validated .form-select:invalid, .form-select.is-invalid { - border-color: #dc3545; -} -.was-validated .form-select:invalid:not([multiple]):not([size]), .was-validated .form-select:invalid:not([multiple])[size="1"], .form-select.is-invalid:not([multiple]):not([size]), .form-select.is-invalid:not([multiple])[size="1"] { - padding-right: 4.125rem; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); - background-position: right 0.75rem center, center right 2.25rem; - background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); -} -.was-validated .form-select:invalid:focus, .form-select.is-invalid:focus { - border-color: #dc3545; - box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); -} - -.was-validated .form-check-input:invalid, .form-check-input.is-invalid { - border-color: #dc3545; -} -.was-validated .form-check-input:invalid:checked, .form-check-input.is-invalid:checked { - background-color: #dc3545; -} -.was-validated .form-check-input:invalid:focus, .form-check-input.is-invalid:focus { - box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); -} -.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label { - color: #dc3545; -} - -.form-check-inline .form-check-input ~ .invalid-feedback { - margin-left: 0.5em; -} - -.was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid, -.was-validated .input-group .form-select:invalid, -.input-group .form-select.is-invalid { - z-index: 2; -} -.was-validated .input-group .form-control:invalid:focus, .input-group .form-control.is-invalid:focus, -.was-validated .input-group .form-select:invalid:focus, -.input-group .form-select.is-invalid:focus { - z-index: 3; -} - -.btn { - display: inline-block; - font-weight: 400; - line-height: 1.5; - color: #212529; - text-align: center; - text-decoration: none; - vertical-align: middle; - cursor: pointer; - user-select: none; - background-color: transparent; - border: 1px solid transparent; - padding: 0.375rem 0.75rem; - font-size: 1rem; - border-radius: 0.25rem; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .btn { - transition: none; - } -} -.btn:hover { - color: #212529; -} -.btn-check:focus + .btn, .btn:focus { - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} -.btn:disabled, .btn.disabled, fieldset:disabled .btn { - pointer-events: none; - opacity: 0.65; -} - -.btn-primary { - color: #fff; - background-color: #0d6efd; - border-color: #0d6efd; -} -.btn-primary:hover { - color: #fff; - background-color: #0b5ed7; - border-color: #0a58ca; -} -.btn-check:focus + .btn-primary, .btn-primary:focus { - color: #fff; - background-color: #0b5ed7; - border-color: #0a58ca; - box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, 0.5); -} -.btn-check:checked + .btn-primary, .btn-check:active + .btn-primary, .btn-primary:active, .btn-primary.active, .show > .btn-primary.dropdown-toggle { - color: #fff; - background-color: #0a58ca; - border-color: #0a53be; -} -.btn-check:checked + .btn-primary:focus, .btn-check:active + .btn-primary:focus, .btn-primary:active:focus, .btn-primary.active:focus, .show > .btn-primary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, 0.5); -} -.btn-primary:disabled, .btn-primary.disabled { - color: #fff; - background-color: #0d6efd; - border-color: #0d6efd; -} - -.btn-secondary { - color: #fff; - background-color: #6c757d; - border-color: #6c757d; -} -.btn-secondary:hover { - color: #fff; - background-color: #5c636a; - border-color: #565e64; -} -.btn-check:focus + .btn-secondary, .btn-secondary:focus { - color: #fff; - background-color: #5c636a; - border-color: #565e64; - box-shadow: 0 0 0 0.25rem rgba(130, 138, 145, 0.5); -} -.btn-check:checked + .btn-secondary, .btn-check:active + .btn-secondary, .btn-secondary:active, .btn-secondary.active, .show > .btn-secondary.dropdown-toggle { - color: #fff; - background-color: #565e64; - border-color: #51585e; -} -.btn-check:checked + .btn-secondary:focus, .btn-check:active + .btn-secondary:focus, .btn-secondary:active:focus, .btn-secondary.active:focus, .show > .btn-secondary.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(130, 138, 145, 0.5); -} -.btn-secondary:disabled, .btn-secondary.disabled { - color: #fff; - background-color: #6c757d; - border-color: #6c757d; -} - -.btn-success { - color: #fff; - background-color: #198754; - border-color: #198754; -} -.btn-success:hover { - color: #fff; - background-color: #157347; - border-color: #146c43; -} -.btn-check:focus + .btn-success, .btn-success:focus { - color: #fff; - background-color: #157347; - border-color: #146c43; - box-shadow: 0 0 0 0.25rem rgba(60, 153, 110, 0.5); -} -.btn-check:checked + .btn-success, .btn-check:active + .btn-success, .btn-success:active, .btn-success.active, .show > .btn-success.dropdown-toggle { - color: #fff; - background-color: #146c43; - border-color: #13653f; -} -.btn-check:checked + .btn-success:focus, .btn-check:active + .btn-success:focus, .btn-success:active:focus, .btn-success.active:focus, .show > .btn-success.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(60, 153, 110, 0.5); -} -.btn-success:disabled, .btn-success.disabled { - color: #fff; - background-color: #198754; - border-color: #198754; -} - -.btn-info { - color: #000; - background-color: #0dcaf0; - border-color: #0dcaf0; -} -.btn-info:hover { - color: #000; - background-color: #31d2f2; - border-color: #25cff2; -} -.btn-check:focus + .btn-info, .btn-info:focus { - color: #000; - background-color: #31d2f2; - border-color: #25cff2; - box-shadow: 0 0 0 0.25rem rgba(11, 172, 204, 0.5); -} -.btn-check:checked + .btn-info, .btn-check:active + .btn-info, .btn-info:active, .btn-info.active, .show > .btn-info.dropdown-toggle { - color: #000; - background-color: #3dd5f3; - border-color: #25cff2; -} -.btn-check:checked + .btn-info:focus, .btn-check:active + .btn-info:focus, .btn-info:active:focus, .btn-info.active:focus, .show > .btn-info.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(11, 172, 204, 0.5); -} -.btn-info:disabled, .btn-info.disabled { - color: #000; - background-color: #0dcaf0; - border-color: #0dcaf0; -} - -.btn-warning { - color: #000; - background-color: #ffc107; - border-color: #ffc107; -} -.btn-warning:hover { - color: #000; - background-color: #ffca2c; - border-color: #ffc720; -} -.btn-check:focus + .btn-warning, .btn-warning:focus { - color: #000; - background-color: #ffca2c; - border-color: #ffc720; - box-shadow: 0 0 0 0.25rem rgba(217, 164, 6, 0.5); -} -.btn-check:checked + .btn-warning, .btn-check:active + .btn-warning, .btn-warning:active, .btn-warning.active, .show > .btn-warning.dropdown-toggle { - color: #000; - background-color: #ffcd39; - border-color: #ffc720; -} -.btn-check:checked + .btn-warning:focus, .btn-check:active + .btn-warning:focus, .btn-warning:active:focus, .btn-warning.active:focus, .show > .btn-warning.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(217, 164, 6, 0.5); -} -.btn-warning:disabled, .btn-warning.disabled { - color: #000; - background-color: #ffc107; - border-color: #ffc107; -} - -.btn-danger { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; -} -.btn-danger:hover { - color: #fff; - background-color: #bb2d3b; - border-color: #b02a37; -} -.btn-check:focus + .btn-danger, .btn-danger:focus { - color: #fff; - background-color: #bb2d3b; - border-color: #b02a37; - box-shadow: 0 0 0 0.25rem rgba(225, 83, 97, 0.5); -} -.btn-check:checked + .btn-danger, .btn-check:active + .btn-danger, .btn-danger:active, .btn-danger.active, .show > .btn-danger.dropdown-toggle { - color: #fff; - background-color: #b02a37; - border-color: #a52834; -} -.btn-check:checked + .btn-danger:focus, .btn-check:active + .btn-danger:focus, .btn-danger:active:focus, .btn-danger.active:focus, .show > .btn-danger.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(225, 83, 97, 0.5); -} -.btn-danger:disabled, .btn-danger.disabled { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; -} - -.btn-light { - color: #000; - background-color: #f8f9fa; - border-color: #f8f9fa; -} -.btn-light:hover { - color: #000; - background-color: #f9fafb; - border-color: #f9fafb; -} -.btn-check:focus + .btn-light, .btn-light:focus { - color: #000; - background-color: #f9fafb; - border-color: #f9fafb; - box-shadow: 0 0 0 0.25rem rgba(211, 212, 213, 0.5); -} -.btn-check:checked + .btn-light, .btn-check:active + .btn-light, .btn-light:active, .btn-light.active, .show > .btn-light.dropdown-toggle { - color: #000; - background-color: #f9fafb; - border-color: #f9fafb; -} -.btn-check:checked + .btn-light:focus, .btn-check:active + .btn-light:focus, .btn-light:active:focus, .btn-light.active:focus, .show > .btn-light.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(211, 212, 213, 0.5); -} -.btn-light:disabled, .btn-light.disabled { - color: #000; - background-color: #f8f9fa; - border-color: #f8f9fa; -} - -.btn-dark { - color: #fff; - background-color: #212529; - border-color: #212529; -} -.btn-dark:hover { - color: #fff; - background-color: #1c1f23; - border-color: #1a1e21; -} -.btn-check:focus + .btn-dark, .btn-dark:focus { - color: #fff; - background-color: #1c1f23; - border-color: #1a1e21; - box-shadow: 0 0 0 0.25rem rgba(66, 70, 73, 0.5); -} -.btn-check:checked + .btn-dark, .btn-check:active + .btn-dark, .btn-dark:active, .btn-dark.active, .show > .btn-dark.dropdown-toggle { - color: #fff; - background-color: #1a1e21; - border-color: #191c1f; -} -.btn-check:checked + .btn-dark:focus, .btn-check:active + .btn-dark:focus, .btn-dark:active:focus, .btn-dark.active:focus, .show > .btn-dark.dropdown-toggle:focus { - box-shadow: 0 0 0 0.25rem rgba(66, 70, 73, 0.5); -} -.btn-dark:disabled, .btn-dark.disabled { - color: #fff; - background-color: #212529; - border-color: #212529; -} - -.btn-outline-primary { - color: #0d6efd; - border-color: #0d6efd; -} -.btn-outline-primary:hover { - color: #fff; - background-color: #0d6efd; - border-color: #0d6efd; -} -.btn-check:focus + .btn-outline-primary, .btn-outline-primary:focus { - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.5); -} -.btn-check:checked + .btn-outline-primary, .btn-check:active + .btn-outline-primary, .btn-outline-primary:active, .btn-outline-primary.active, .btn-outline-primary.dropdown-toggle.show { - color: #fff; - background-color: #0d6efd; - border-color: #0d6efd; -} -.btn-check:checked + .btn-outline-primary:focus, .btn-check:active + .btn-outline-primary:focus, .btn-outline-primary:active:focus, .btn-outline-primary.active:focus, .btn-outline-primary.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.5); -} -.btn-outline-primary:disabled, .btn-outline-primary.disabled { - color: #0d6efd; - background-color: transparent; -} - -.btn-outline-secondary { - color: #6c757d; - border-color: #6c757d; -} -.btn-outline-secondary:hover { - color: #fff; - background-color: #6c757d; - border-color: #6c757d; -} -.btn-check:focus + .btn-outline-secondary, .btn-outline-secondary:focus { - box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.5); -} -.btn-check:checked + .btn-outline-secondary, .btn-check:active + .btn-outline-secondary, .btn-outline-secondary:active, .btn-outline-secondary.active, .btn-outline-secondary.dropdown-toggle.show { - color: #fff; - background-color: #6c757d; - border-color: #6c757d; -} -.btn-check:checked + .btn-outline-secondary:focus, .btn-check:active + .btn-outline-secondary:focus, .btn-outline-secondary:active:focus, .btn-outline-secondary.active:focus, .btn-outline-secondary.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.5); -} -.btn-outline-secondary:disabled, .btn-outline-secondary.disabled { - color: #6c757d; - background-color: transparent; -} - -.btn-outline-success { - color: #198754; - border-color: #198754; -} -.btn-outline-success:hover { - color: #fff; - background-color: #198754; - border-color: #198754; -} -.btn-check:focus + .btn-outline-success, .btn-outline-success:focus { - box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.5); -} -.btn-check:checked + .btn-outline-success, .btn-check:active + .btn-outline-success, .btn-outline-success:active, .btn-outline-success.active, .btn-outline-success.dropdown-toggle.show { - color: #fff; - background-color: #198754; - border-color: #198754; -} -.btn-check:checked + .btn-outline-success:focus, .btn-check:active + .btn-outline-success:focus, .btn-outline-success:active:focus, .btn-outline-success.active:focus, .btn-outline-success.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.5); -} -.btn-outline-success:disabled, .btn-outline-success.disabled { - color: #198754; - background-color: transparent; -} - -.btn-outline-info { - color: #0dcaf0; - border-color: #0dcaf0; -} -.btn-outline-info:hover { - color: #000; - background-color: #0dcaf0; - border-color: #0dcaf0; -} -.btn-check:focus + .btn-outline-info, .btn-outline-info:focus { - box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.5); -} -.btn-check:checked + .btn-outline-info, .btn-check:active + .btn-outline-info, .btn-outline-info:active, .btn-outline-info.active, .btn-outline-info.dropdown-toggle.show { - color: #000; - background-color: #0dcaf0; - border-color: #0dcaf0; -} -.btn-check:checked + .btn-outline-info:focus, .btn-check:active + .btn-outline-info:focus, .btn-outline-info:active:focus, .btn-outline-info.active:focus, .btn-outline-info.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.5); -} -.btn-outline-info:disabled, .btn-outline-info.disabled { - color: #0dcaf0; - background-color: transparent; -} - -.btn-outline-warning { - color: #ffc107; - border-color: #ffc107; -} -.btn-outline-warning:hover { - color: #000; - background-color: #ffc107; - border-color: #ffc107; -} -.btn-check:focus + .btn-outline-warning, .btn-outline-warning:focus { - box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.5); -} -.btn-check:checked + .btn-outline-warning, .btn-check:active + .btn-outline-warning, .btn-outline-warning:active, .btn-outline-warning.active, .btn-outline-warning.dropdown-toggle.show { - color: #000; - background-color: #ffc107; - border-color: #ffc107; -} -.btn-check:checked + .btn-outline-warning:focus, .btn-check:active + .btn-outline-warning:focus, .btn-outline-warning:active:focus, .btn-outline-warning.active:focus, .btn-outline-warning.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.5); -} -.btn-outline-warning:disabled, .btn-outline-warning.disabled { - color: #ffc107; - background-color: transparent; -} - -.btn-outline-danger { - color: #dc3545; - border-color: #dc3545; -} -.btn-outline-danger:hover { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; -} -.btn-check:focus + .btn-outline-danger, .btn-outline-danger:focus { - box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.5); -} -.btn-check:checked + .btn-outline-danger, .btn-check:active + .btn-outline-danger, .btn-outline-danger:active, .btn-outline-danger.active, .btn-outline-danger.dropdown-toggle.show { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; -} -.btn-check:checked + .btn-outline-danger:focus, .btn-check:active + .btn-outline-danger:focus, .btn-outline-danger:active:focus, .btn-outline-danger.active:focus, .btn-outline-danger.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.5); -} -.btn-outline-danger:disabled, .btn-outline-danger.disabled { - color: #dc3545; - background-color: transparent; -} - -.btn-outline-light { - color: #f8f9fa; - border-color: #f8f9fa; -} -.btn-outline-light:hover { - color: #000; - background-color: #f8f9fa; - border-color: #f8f9fa; -} -.btn-check:focus + .btn-outline-light, .btn-outline-light:focus { - box-shadow: 0 0 0 0.25rem rgba(248, 249, 250, 0.5); -} -.btn-check:checked + .btn-outline-light, .btn-check:active + .btn-outline-light, .btn-outline-light:active, .btn-outline-light.active, .btn-outline-light.dropdown-toggle.show { - color: #000; - background-color: #f8f9fa; - border-color: #f8f9fa; -} -.btn-check:checked + .btn-outline-light:focus, .btn-check:active + .btn-outline-light:focus, .btn-outline-light:active:focus, .btn-outline-light.active:focus, .btn-outline-light.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(248, 249, 250, 0.5); -} -.btn-outline-light:disabled, .btn-outline-light.disabled { - color: #f8f9fa; - background-color: transparent; -} - -.btn-outline-dark { - color: #212529; - border-color: #212529; -} -.btn-outline-dark:hover { - color: #fff; - background-color: #212529; - border-color: #212529; -} -.btn-check:focus + .btn-outline-dark, .btn-outline-dark:focus { - box-shadow: 0 0 0 0.25rem rgba(33, 37, 41, 0.5); -} -.btn-check:checked + .btn-outline-dark, .btn-check:active + .btn-outline-dark, .btn-outline-dark:active, .btn-outline-dark.active, .btn-outline-dark.dropdown-toggle.show { - color: #fff; - background-color: #212529; - border-color: #212529; -} -.btn-check:checked + .btn-outline-dark:focus, .btn-check:active + .btn-outline-dark:focus, .btn-outline-dark:active:focus, .btn-outline-dark.active:focus, .btn-outline-dark.dropdown-toggle.show:focus { - box-shadow: 0 0 0 0.25rem rgba(33, 37, 41, 0.5); -} -.btn-outline-dark:disabled, .btn-outline-dark.disabled { - color: #212529; - background-color: transparent; -} - -.btn-link { - font-weight: 400; - color: #0d6efd; - text-decoration: underline; -} -.btn-link:hover { - color: #0a58ca; -} -.btn-link:disabled, .btn-link.disabled { - color: #6c757d; -} - -.btn-lg, .btn-group-lg > .btn { - padding: 0.5rem 1rem; - font-size: 1.25rem; - border-radius: 0.3rem; -} - -.btn-sm, .btn-group-sm > .btn { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - border-radius: 0.2rem; -} - -.fade { - transition: opacity 0.15s linear; -} -@media (prefers-reduced-motion: reduce) { - .fade { - transition: none; - } -} -.fade:not(.show) { - opacity: 0; -} - -.collapse:not(.show) { - display: none; -} - -.collapsing { - height: 0; - overflow: hidden; - transition: height 0.35s ease; -} -@media (prefers-reduced-motion: reduce) { - .collapsing { - transition: none; - } -} - -.dropup, -.dropend, -.dropdown, -.dropstart { - position: relative; -} - -.dropdown-toggle { - white-space: nowrap; -} -.dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid; - border-right: 0.3em solid transparent; - border-bottom: 0; - border-left: 0.3em solid transparent; -} -.dropdown-toggle:empty::after { - margin-left: 0; -} - -.dropdown-menu { - position: absolute; - z-index: 1000; - display: none; - min-width: 10rem; - padding: 0.5rem 0; - margin: 0; - font-size: 1rem; - color: #212529; - text-align: left; - list-style: none; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 0.25rem; -} -.dropdown-menu[data-bs-popper] { - top: 100%; - left: 0; - margin-top: 0.125rem; -} - -.dropdown-menu-start { - --bs-position: start; -} -.dropdown-menu-start[data-bs-popper] { - right: auto; - left: 0; -} - -.dropdown-menu-end { - --bs-position: end; -} -.dropdown-menu-end[data-bs-popper] { - right: 0; - left: auto; -} - -@media (min-width: 576px) { - .dropdown-menu-sm-start { - --bs-position: start; - } - .dropdown-menu-sm-start[data-bs-popper] { - right: auto; - left: 0; - } - - .dropdown-menu-sm-end { - --bs-position: end; - } - .dropdown-menu-sm-end[data-bs-popper] { - right: 0; - left: auto; - } -} -@media (min-width: 768px) { - .dropdown-menu-md-start { - --bs-position: start; - } - .dropdown-menu-md-start[data-bs-popper] { - right: auto; - left: 0; - } - - .dropdown-menu-md-end { - --bs-position: end; - } - .dropdown-menu-md-end[data-bs-popper] { - right: 0; - left: auto; - } -} -@media (min-width: 992px) { - .dropdown-menu-lg-start { - --bs-position: start; - } - .dropdown-menu-lg-start[data-bs-popper] { - right: auto; - left: 0; - } - - .dropdown-menu-lg-end { - --bs-position: end; - } - .dropdown-menu-lg-end[data-bs-popper] { - right: 0; - left: auto; - } -} -@media (min-width: 1200px) { - .dropdown-menu-xl-start { - --bs-position: start; - } - .dropdown-menu-xl-start[data-bs-popper] { - right: auto; - left: 0; - } - - .dropdown-menu-xl-end { - --bs-position: end; - } - .dropdown-menu-xl-end[data-bs-popper] { - right: 0; - left: auto; - } -} -@media (min-width: 1400px) { - .dropdown-menu-xxl-start { - --bs-position: start; - } - .dropdown-menu-xxl-start[data-bs-popper] { - right: auto; - left: 0; - } - - .dropdown-menu-xxl-end { - --bs-position: end; - } - .dropdown-menu-xxl-end[data-bs-popper] { - right: 0; - left: auto; - } -} -.dropup .dropdown-menu[data-bs-popper] { - top: auto; - bottom: 100%; - margin-top: 0; - margin-bottom: 0.125rem; -} -.dropup .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0; - border-right: 0.3em solid transparent; - border-bottom: 0.3em solid; - border-left: 0.3em solid transparent; -} -.dropup .dropdown-toggle:empty::after { - margin-left: 0; -} - -.dropend .dropdown-menu[data-bs-popper] { - top: 0; - right: auto; - left: 100%; - margin-top: 0; - margin-left: 0.125rem; -} -.dropend .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid transparent; - border-right: 0; - border-bottom: 0.3em solid transparent; - border-left: 0.3em solid; -} -.dropend .dropdown-toggle:empty::after { - margin-left: 0; -} -.dropend .dropdown-toggle::after { - vertical-align: 0; -} - -.dropstart .dropdown-menu[data-bs-popper] { - top: 0; - right: 100%; - left: auto; - margin-top: 0; - margin-right: 0.125rem; -} -.dropstart .dropdown-toggle::after { - display: inline-block; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; -} -.dropstart .dropdown-toggle::after { - display: none; -} -.dropstart .dropdown-toggle::before { - display: inline-block; - margin-right: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid transparent; - border-right: 0.3em solid; - border-bottom: 0.3em solid transparent; -} -.dropstart .dropdown-toggle:empty::after { - margin-left: 0; -} -.dropstart .dropdown-toggle::before { - vertical-align: 0; -} - -.dropdown-divider { - height: 0; - margin: 0.5rem 0; - overflow: hidden; - border-top: 1px solid rgba(0, 0, 0, 0.15); -} - -.dropdown-item { - display: block; - width: 100%; - padding: 0.25rem 1rem; - clear: both; - font-weight: 400; - color: #212529; - text-align: inherit; - text-decoration: none; - white-space: nowrap; - background-color: transparent; - border: 0; -} -.dropdown-item:hover, .dropdown-item:focus { - color: #1e2125; - background-color: #e9ecef; -} -.dropdown-item.active, .dropdown-item:active { - color: #fff; - text-decoration: none; - background-color: #0d6efd; -} -.dropdown-item.disabled, .dropdown-item:disabled { - color: #adb5bd; - pointer-events: none; - background-color: transparent; -} - -.dropdown-menu.show { - display: block; -} - -.dropdown-header { - display: block; - padding: 0.5rem 1rem; - margin-bottom: 0; - font-size: 0.875rem; - color: #6c757d; - white-space: nowrap; -} - -.dropdown-item-text { - display: block; - padding: 0.25rem 1rem; - color: #212529; -} - -.dropdown-menu-dark { - color: #dee2e6; - background-color: #343a40; - border-color: rgba(0, 0, 0, 0.15); -} -.dropdown-menu-dark .dropdown-item { - color: #dee2e6; -} -.dropdown-menu-dark .dropdown-item:hover, .dropdown-menu-dark .dropdown-item:focus { - color: #fff; - background-color: rgba(255, 255, 255, 0.15); -} -.dropdown-menu-dark .dropdown-item.active, .dropdown-menu-dark .dropdown-item:active { - color: #fff; - background-color: #0d6efd; -} -.dropdown-menu-dark .dropdown-item.disabled, .dropdown-menu-dark .dropdown-item:disabled { - color: #adb5bd; -} -.dropdown-menu-dark .dropdown-divider { - border-color: rgba(0, 0, 0, 0.15); -} -.dropdown-menu-dark .dropdown-item-text { - color: #dee2e6; -} -.dropdown-menu-dark .dropdown-header { - color: #adb5bd; -} - -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-flex; - vertical-align: middle; -} -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - flex: 1 1 auto; -} -.btn-group > .btn-check:checked + .btn, -.btn-group > .btn-check:focus + .btn, -.btn-group > .btn:hover, -.btn-group > .btn:focus, -.btn-group > .btn:active, -.btn-group > .btn.active, -.btn-group-vertical > .btn-check:checked + .btn, -.btn-group-vertical > .btn-check:focus + .btn, -.btn-group-vertical > .btn:hover, -.btn-group-vertical > .btn:focus, -.btn-group-vertical > .btn:active, -.btn-group-vertical > .btn.active { - z-index: 1; -} - -.btn-toolbar { - display: flex; - flex-wrap: wrap; - justify-content: flex-start; -} -.btn-toolbar .input-group { - width: auto; -} - -.btn-group > .btn:not(:first-child), -.btn-group > .btn-group:not(:first-child) { - margin-left: -1px; -} -.btn-group > .btn:not(:last-child):not(.dropdown-toggle), -.btn-group > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn:nth-child(n+3), -.btn-group > :not(.btn-check) + .btn, -.btn-group > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -.dropdown-toggle-split { - padding-right: 0.5625rem; - padding-left: 0.5625rem; -} -.dropdown-toggle-split::after, .dropup .dropdown-toggle-split::after, .dropend .dropdown-toggle-split::after { - margin-left: 0; -} -.dropstart .dropdown-toggle-split::before { - margin-right: 0; -} - -.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { - padding-right: 0.375rem; - padding-left: 0.375rem; -} - -.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split { - padding-right: 0.75rem; - padding-left: 0.75rem; -} - -.btn-group-vertical { - flex-direction: column; - align-items: flex-start; - justify-content: center; -} -.btn-group-vertical > .btn, -.btn-group-vertical > .btn-group { - width: 100%; -} -.btn-group-vertical > .btn:not(:first-child), -.btn-group-vertical > .btn-group:not(:first-child) { - margin-top: -1px; -} -.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), -.btn-group-vertical > .btn-group:not(:last-child) > .btn { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn ~ .btn, -.btn-group-vertical > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-top-right-radius: 0; -} - -.nav { - display: flex; - flex-wrap: wrap; - padding-left: 0; - margin-bottom: 0; - list-style: none; -} - -.nav-link { - display: block; - padding: 0.5rem 1rem; - color: #0d6efd; - text-decoration: none; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .nav-link { - transition: none; - } -} -.nav-link:hover, .nav-link:focus { - color: #0a58ca; -} -.nav-link.disabled { - color: #6c757d; - pointer-events: none; - cursor: default; -} - -.nav-tabs { - border-bottom: 1px solid #dee2e6; -} -.nav-tabs .nav-link { - margin-bottom: -1px; - background: none; - border: 1px solid transparent; - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; -} -.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { - border-color: #e9ecef #e9ecef #dee2e6; - isolation: isolate; -} -.nav-tabs .nav-link.disabled { - color: #6c757d; - background-color: transparent; - border-color: transparent; -} -.nav-tabs .nav-link.active, -.nav-tabs .nav-item.show .nav-link { - color: #495057; - background-color: #fff; - border-color: #dee2e6 #dee2e6 #fff; -} -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} - -.nav-pills .nav-link { - background: none; - border: 0; - border-radius: 0.25rem; -} -.nav-pills .nav-link.active, -.nav-pills .show > .nav-link { - color: #fff; - background-color: #0d6efd; -} - -.nav-fill > .nav-link, -.nav-fill .nav-item { - flex: 1 1 auto; - text-align: center; -} - -.nav-justified > .nav-link, -.nav-justified .nav-item { - flex-basis: 0; - flex-grow: 1; - text-align: center; -} - -.nav-fill .nav-item .nav-link, -.nav-justified .nav-item .nav-link { - width: 100%; -} - -.tab-content > .tab-pane { - display: none; -} -.tab-content > .active { - display: block; -} - -.navbar { - position: relative; - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: space-between; - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} -.navbar > .container, -.navbar > .container-fluid, -.navbar > .container-sm, -.navbar > .container-md, -.navbar > .container-lg, -.navbar > .container-xl, -.navbar > .container-xxl { - display: flex; - flex-wrap: inherit; - align-items: center; - justify-content: space-between; -} -.navbar-brand { - padding-top: 0.3125rem; - padding-bottom: 0.3125rem; - margin-right: 1rem; - font-size: 1.25rem; - text-decoration: none; - white-space: nowrap; -} -.navbar-nav { - display: flex; - flex-direction: column; - padding-left: 0; - margin-bottom: 0; - list-style: none; -} -.navbar-nav .nav-link { - padding-right: 0; - padding-left: 0; -} -.navbar-nav .dropdown-menu { - position: static; -} - -.navbar-text { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} - -.navbar-collapse { - flex-basis: 100%; - flex-grow: 1; - align-items: center; -} - -.navbar-toggler { - padding: 0.25rem 0.75rem; - font-size: 1.25rem; - line-height: 1; - background-color: transparent; - border: 1px solid transparent; - border-radius: 0.25rem; - transition: box-shadow 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .navbar-toggler { - transition: none; - } -} -.navbar-toggler:hover { - text-decoration: none; -} -.navbar-toggler:focus { - text-decoration: none; - outline: 0; - box-shadow: 0 0 0 0.25rem; -} - -.navbar-toggler-icon { - display: inline-block; - width: 1.5em; - height: 1.5em; - vertical-align: middle; - background-repeat: no-repeat; - background-position: center; - background-size: 100%; -} - -.navbar-nav-scroll { - max-height: var(--bs-scroll-height, 75vh); - overflow-y: auto; -} - -@media (min-width: 576px) { - .navbar-expand-sm { - flex-wrap: nowrap; - justify-content: flex-start; - } - .navbar-expand-sm .navbar-nav { - flex-direction: row; - } - .navbar-expand-sm .navbar-nav .dropdown-menu { - position: absolute; - } - .navbar-expand-sm .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; - } - .navbar-expand-sm .navbar-nav-scroll { - overflow: visible; - } - .navbar-expand-sm .navbar-collapse { - display: flex !important; - flex-basis: auto; - } - .navbar-expand-sm .navbar-toggler { - display: none; - } -} -@media (min-width: 768px) { - .navbar-expand-md { - flex-wrap: nowrap; - justify-content: flex-start; - } - .navbar-expand-md .navbar-nav { - flex-direction: row; - } - .navbar-expand-md .navbar-nav .dropdown-menu { - position: absolute; - } - .navbar-expand-md .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; - } - .navbar-expand-md .navbar-nav-scroll { - overflow: visible; - } - .navbar-expand-md .navbar-collapse { - display: flex !important; - flex-basis: auto; - } - .navbar-expand-md .navbar-toggler { - display: none; - } -} -@media (min-width: 992px) { - .navbar-expand-lg { - flex-wrap: nowrap; - justify-content: flex-start; - } - .navbar-expand-lg .navbar-nav { - flex-direction: row; - } - .navbar-expand-lg .navbar-nav .dropdown-menu { - position: absolute; - } - .navbar-expand-lg .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; - } - .navbar-expand-lg .navbar-nav-scroll { - overflow: visible; - } - .navbar-expand-lg .navbar-collapse { - display: flex !important; - flex-basis: auto; - } - .navbar-expand-lg .navbar-toggler { - display: none; - } -} -@media (min-width: 1200px) { - .navbar-expand-xl { - flex-wrap: nowrap; - justify-content: flex-start; - } - .navbar-expand-xl .navbar-nav { - flex-direction: row; - } - .navbar-expand-xl .navbar-nav .dropdown-menu { - position: absolute; - } - .navbar-expand-xl .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; - } - .navbar-expand-xl .navbar-nav-scroll { - overflow: visible; - } - .navbar-expand-xl .navbar-collapse { - display: flex !important; - flex-basis: auto; - } - .navbar-expand-xl .navbar-toggler { - display: none; - } -} -@media (min-width: 1400px) { - .navbar-expand-xxl { - flex-wrap: nowrap; - justify-content: flex-start; - } - .navbar-expand-xxl .navbar-nav { - flex-direction: row; - } - .navbar-expand-xxl .navbar-nav .dropdown-menu { - position: absolute; - } - .navbar-expand-xxl .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; - } - .navbar-expand-xxl .navbar-nav-scroll { - overflow: visible; - } - .navbar-expand-xxl .navbar-collapse { - display: flex !important; - flex-basis: auto; - } - .navbar-expand-xxl .navbar-toggler { - display: none; - } -} -.navbar-expand { - flex-wrap: nowrap; - justify-content: flex-start; -} -.navbar-expand .navbar-nav { - flex-direction: row; -} -.navbar-expand .navbar-nav .dropdown-menu { - position: absolute; -} -.navbar-expand .navbar-nav .nav-link { - padding-right: 0.5rem; - padding-left: 0.5rem; -} -.navbar-expand .navbar-nav-scroll { - overflow: visible; -} -.navbar-expand .navbar-collapse { - display: flex !important; - flex-basis: auto; -} -.navbar-expand .navbar-toggler { - display: none; -} - -.navbar-light .navbar-brand { - color: rgba(0, 0, 0, 0.9); -} -.navbar-light .navbar-brand:hover, .navbar-light .navbar-brand:focus { - color: rgba(0, 0, 0, 0.9); -} -.navbar-light .navbar-nav .nav-link { - color: rgba(0, 0, 0, 0.55); -} -.navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus { - color: rgba(0, 0, 0, 0.7); -} -.navbar-light .navbar-nav .nav-link.disabled { - color: rgba(0, 0, 0, 0.3); -} -.navbar-light .navbar-nav .show > .nav-link, -.navbar-light .navbar-nav .nav-link.active { - color: rgba(0, 0, 0, 0.9); -} -.navbar-light .navbar-toggler { - color: rgba(0, 0, 0, 0.55); - border-color: rgba(0, 0, 0, 0.1); -} -.navbar-light .navbar-toggler-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); -} -.navbar-light .navbar-text { - color: rgba(0, 0, 0, 0.55); -} -.navbar-light .navbar-text a, -.navbar-light .navbar-text a:hover, -.navbar-light .navbar-text a:focus { - color: rgba(0, 0, 0, 0.9); -} - -.navbar-dark .navbar-brand { - color: #fff; -} -.navbar-dark .navbar-brand:hover, .navbar-dark .navbar-brand:focus { - color: #fff; -} -.navbar-dark .navbar-nav .nav-link { - color: rgba(255, 255, 255, 0.55); -} -.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus { - color: rgba(255, 255, 255, 0.75); -} -.navbar-dark .navbar-nav .nav-link.disabled { - color: rgba(255, 255, 255, 0.25); -} -.navbar-dark .navbar-nav .show > .nav-link, -.navbar-dark .navbar-nav .nav-link.active { - color: #fff; -} -.navbar-dark .navbar-toggler { - color: rgba(255, 255, 255, 0.55); - border-color: rgba(255, 255, 255, 0.1); -} -.navbar-dark .navbar-toggler-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); -} -.navbar-dark .navbar-text { - color: rgba(255, 255, 255, 0.55); -} -.navbar-dark .navbar-text a, -.navbar-dark .navbar-text a:hover, -.navbar-dark .navbar-text a:focus { - color: #fff; -} - -.card { - position: relative; - display: flex; - flex-direction: column; - min-width: 0; - word-wrap: break-word; - background-color: #fff; - background-clip: border-box; - border: 1px solid rgba(0, 0, 0, 0.125); - border-radius: 0.25rem; -} -.card > hr { - margin-right: 0; - margin-left: 0; -} -.card > .list-group { - border-top: inherit; - border-bottom: inherit; -} -.card > .list-group:first-child { - border-top-width: 0; - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); -} -.card > .list-group:last-child { - border-bottom-width: 0; - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); -} -.card > .card-header + .list-group, -.card > .list-group + .card-footer { - border-top: 0; -} - -.card-body { - flex: 1 1 auto; - padding: 1rem 1rem; -} - -.card-title { - margin-bottom: 0.5rem; -} - -.card-subtitle { - margin-top: -0.25rem; - margin-bottom: 0; -} - -.card-text:last-child { - margin-bottom: 0; -} - -.card-link:hover { - text-decoration: none; -} -.card-link + .card-link { - margin-left: 1rem; -} - -.card-header { - padding: 0.5rem 1rem; - margin-bottom: 0; - background-color: rgba(0, 0, 0, 0.03); - border-bottom: 1px solid rgba(0, 0, 0, 0.125); -} -.card-header:first-child { - border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0; -} - -.card-footer { - padding: 0.5rem 1rem; - background-color: rgba(0, 0, 0, 0.03); - border-top: 1px solid rgba(0, 0, 0, 0.125); -} -.card-footer:last-child { - border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px); -} - -.card-header-tabs { - margin-right: -0.5rem; - margin-bottom: -0.5rem; - margin-left: -0.5rem; - border-bottom: 0; -} - -.card-header-pills { - margin-right: -0.5rem; - margin-left: -0.5rem; -} - -.card-img-overlay { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - padding: 1rem; - border-radius: calc(0.25rem - 1px); -} - -.card-img, -.card-img-top, -.card-img-bottom { - width: 100%; -} - -.card-img, -.card-img-top { - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); -} - -.card-img, -.card-img-bottom { - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); -} - -.card-group > .card { - margin-bottom: 0.75rem; -} -@media (min-width: 576px) { - .card-group { - display: flex; - flex-flow: row wrap; - } - .card-group > .card { - flex: 1 0 0%; - margin-bottom: 0; - } - .card-group > .card + .card { - margin-left: 0; - border-left: 0; - } - .card-group > .card:not(:last-child) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - .card-group > .card:not(:last-child) .card-img-top, -.card-group > .card:not(:last-child) .card-header { - border-top-right-radius: 0; - } - .card-group > .card:not(:last-child) .card-img-bottom, -.card-group > .card:not(:last-child) .card-footer { - border-bottom-right-radius: 0; - } - .card-group > .card:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - .card-group > .card:not(:first-child) .card-img-top, -.card-group > .card:not(:first-child) .card-header { - border-top-left-radius: 0; - } - .card-group > .card:not(:first-child) .card-img-bottom, -.card-group > .card:not(:first-child) .card-footer { - border-bottom-left-radius: 0; - } -} - -.accordion-button { - position: relative; - display: flex; - align-items: center; - width: 100%; - padding: 1rem 1.25rem; - font-size: 1rem; - color: #212529; - text-align: left; - background-color: #fff; - border: 0; - border-radius: 0; - overflow-anchor: none; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease; -} -@media (prefers-reduced-motion: reduce) { - .accordion-button { - transition: none; - } -} -.accordion-button:not(.collapsed) { - color: #0c63e4; - background-color: #e7f1ff; - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125); -} -.accordion-button:not(.collapsed)::after { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); - transform: rotate(-180deg); -} -.accordion-button::after { - flex-shrink: 0; - width: 1.25rem; - height: 1.25rem; - margin-left: auto; - content: ""; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); - background-repeat: no-repeat; - background-size: 1.25rem; - transition: transform 0.2s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .accordion-button::after { - transition: none; - } -} -.accordion-button:hover { - z-index: 2; -} -.accordion-button:focus { - z-index: 3; - border-color: #86b7fe; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} - -.accordion-header { - margin-bottom: 0; -} - -.accordion-item { - background-color: #fff; - border: 1px solid rgba(0, 0, 0, 0.125); -} -.accordion-item:first-of-type { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; -} -.accordion-item:first-of-type .accordion-button { - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); -} -.accordion-item:not(:first-of-type) { - border-top: 0; -} -.accordion-item:last-of-type { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; -} -.accordion-item:last-of-type .accordion-button.collapsed { - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); -} -.accordion-item:last-of-type .accordion-collapse { - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; -} - -.accordion-body { - padding: 1rem 1.25rem; -} - -.accordion-flush .accordion-collapse { - border-width: 0; -} -.accordion-flush .accordion-item { - border-right: 0; - border-left: 0; - border-radius: 0; -} -.accordion-flush .accordion-item:first-child { - border-top: 0; -} -.accordion-flush .accordion-item:last-child { - border-bottom: 0; -} -.accordion-flush .accordion-item .accordion-button { - border-radius: 0; -} - -.breadcrumb { - display: flex; - flex-wrap: wrap; - padding: 0 0; - margin-bottom: 1rem; - list-style: none; -} - -.breadcrumb-item + .breadcrumb-item { - padding-left: 0.5rem; -} -.breadcrumb-item + .breadcrumb-item::before { - float: left; - padding-right: 0.5rem; - color: #6c757d; - content: var(--bs-breadcrumb-divider, "/") /* rtl: var(--bs-breadcrumb-divider, "/") */; -} -.breadcrumb-item.active { - color: #6c757d; -} - -.pagination { - display: flex; - padding-left: 0; - list-style: none; -} - -.page-link { - position: relative; - display: block; - color: #0d6efd; - text-decoration: none; - background-color: #fff; - border: 1px solid #dee2e6; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .page-link { - transition: none; - } -} -.page-link:hover { - z-index: 2; - color: #0a58ca; - background-color: #e9ecef; - border-color: #dee2e6; -} -.page-link:focus { - z-index: 3; - color: #0a58ca; - background-color: #e9ecef; - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); -} - -.page-item:not(:first-child) .page-link { - margin-left: -1px; -} -.page-item.active .page-link { - z-index: 3; - color: #fff; - background-color: #0d6efd; - border-color: #0d6efd; -} -.page-item.disabled .page-link { - color: #6c757d; - pointer-events: none; - background-color: #fff; - border-color: #dee2e6; -} - -.page-link { - padding: 0.375rem 0.75rem; -} - -.page-item:first-child .page-link { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; -} -.page-item:last-child .page-link { - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; -} - -.pagination-lg .page-link { - padding: 0.75rem 1.5rem; - font-size: 1.25rem; -} -.pagination-lg .page-item:first-child .page-link { - border-top-left-radius: 0.3rem; - border-bottom-left-radius: 0.3rem; -} -.pagination-lg .page-item:last-child .page-link { - border-top-right-radius: 0.3rem; - border-bottom-right-radius: 0.3rem; -} - -.pagination-sm .page-link { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; -} -.pagination-sm .page-item:first-child .page-link { - border-top-left-radius: 0.2rem; - border-bottom-left-radius: 0.2rem; -} -.pagination-sm .page-item:last-child .page-link { - border-top-right-radius: 0.2rem; - border-bottom-right-radius: 0.2rem; -} - -.badge { - display: inline-block; - padding: 0.35em 0.65em; - font-size: 0.75em; - font-weight: 700; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: 0.25rem; -} -.badge:empty { - display: none; -} - -.btn .badge { - position: relative; - top: -1px; -} - -.alert { - position: relative; - padding: 1rem 1rem; - margin-bottom: 1rem; - border: 1px solid transparent; - border-radius: 0.25rem; -} - -.alert-heading { - color: inherit; -} - -.alert-link { - font-weight: 700; -} - -.alert-dismissible { - padding-right: 3rem; -} -.alert-dismissible .btn-close { - position: absolute; - top: 0; - right: 0; - z-index: 2; - padding: 1.25rem 1rem; -} - -.alert-primary { - color: #084298; - background-color: #cfe2ff; - border-color: #b6d4fe; -} -.alert-primary .alert-link { - color: #06357a; -} - -.alert-secondary { - color: #41464b; - background-color: #e2e3e5; - border-color: #d3d6d8; -} -.alert-secondary .alert-link { - color: #34383c; -} - -.alert-success { - color: #0f5132; - background-color: #d1e7dd; - border-color: #badbcc; -} -.alert-success .alert-link { - color: #0c4128; -} - -.alert-info { - color: #055160; - background-color: #cff4fc; - border-color: #b6effb; -} -.alert-info .alert-link { - color: #04414d; -} - -.alert-warning { - color: #664d03; - background-color: #fff3cd; - border-color: #ffecb5; -} -.alert-warning .alert-link { - color: #523e02; -} - -.alert-danger { - color: #842029; - background-color: #f8d7da; - border-color: #f5c2c7; -} -.alert-danger .alert-link { - color: #6a1a21; -} - -.alert-light { - color: #636464; - background-color: #fefefe; - border-color: #fdfdfe; -} -.alert-light .alert-link { - color: #4f5050; -} - -.alert-dark { - color: #141619; - background-color: #d3d3d4; - border-color: #bcbebf; -} -.alert-dark .alert-link { - color: #101214; -} - -@keyframes progress-bar-stripes { - 0% { - background-position-x: 1rem; - } -} -.progress { - display: flex; - height: 1rem; - overflow: hidden; - font-size: 0.75rem; - background-color: #e9ecef; - border-radius: 0.25rem; -} - -.progress-bar { - display: flex; - flex-direction: column; - justify-content: center; - overflow: hidden; - color: #fff; - text-align: center; - white-space: nowrap; - background-color: #0d6efd; - transition: width 0.6s ease; -} -@media (prefers-reduced-motion: reduce) { - .progress-bar { - transition: none; - } -} - -.progress-bar-striped { - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 1rem 1rem; -} - -.progress-bar-animated { - animation: 1s linear infinite progress-bar-stripes; -} -@media (prefers-reduced-motion: reduce) { - .progress-bar-animated { - animation: none; - } -} - -.list-group { - display: flex; - flex-direction: column; - padding-left: 0; - margin-bottom: 0; - border-radius: 0.25rem; -} - -.list-group-numbered { - list-style-type: none; - counter-reset: section; -} -.list-group-numbered > li::before { - content: counters(section, ".") ". "; - counter-increment: section; -} - -.list-group-item-action { - width: 100%; - color: #495057; - text-align: inherit; -} -.list-group-item-action:hover, .list-group-item-action:focus { - z-index: 1; - color: #495057; - text-decoration: none; - background-color: #f8f9fa; -} -.list-group-item-action:active { - color: #212529; - background-color: #e9ecef; -} - -.list-group-item { - position: relative; - display: block; - padding: 0.5rem 1rem; - color: #212529; - text-decoration: none; - background-color: #fff; - border: 1px solid rgba(0, 0, 0, 0.125); -} -.list-group-item:first-child { - border-top-left-radius: inherit; - border-top-right-radius: inherit; -} -.list-group-item:last-child { - border-bottom-right-radius: inherit; - border-bottom-left-radius: inherit; -} -.list-group-item.disabled, .list-group-item:disabled { - color: #6c757d; - pointer-events: none; - background-color: #fff; -} -.list-group-item.active { - z-index: 2; - color: #fff; - background-color: #0d6efd; - border-color: #0d6efd; -} -.list-group-item + .list-group-item { - border-top-width: 0; -} -.list-group-item + .list-group-item.active { - margin-top: -1px; - border-top-width: 1px; -} - -.list-group-horizontal { - flex-direction: row; -} -.list-group-horizontal > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; -} -.list-group-horizontal > .list-group-item:last-child { - border-top-right-radius: 0.25rem; - border-bottom-left-radius: 0; -} -.list-group-horizontal > .list-group-item.active { - margin-top: 0; -} -.list-group-horizontal > .list-group-item + .list-group-item { - border-top-width: 1px; - border-left-width: 0; -} -.list-group-horizontal > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; -} - -@media (min-width: 576px) { - .list-group-horizontal-sm { - flex-direction: row; - } - .list-group-horizontal-sm > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-sm > .list-group-item:last-child { - border-top-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } - .list-group-horizontal-sm > .list-group-item.active { - margin-top: 0; - } - .list-group-horizontal-sm > .list-group-item + .list-group-item { - border-top-width: 1px; - border-left-width: 0; - } - .list-group-horizontal-sm > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; - } -} -@media (min-width: 768px) { - .list-group-horizontal-md { - flex-direction: row; - } - .list-group-horizontal-md > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-md > .list-group-item:last-child { - border-top-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } - .list-group-horizontal-md > .list-group-item.active { - margin-top: 0; - } - .list-group-horizontal-md > .list-group-item + .list-group-item { - border-top-width: 1px; - border-left-width: 0; - } - .list-group-horizontal-md > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; - } -} -@media (min-width: 992px) { - .list-group-horizontal-lg { - flex-direction: row; - } - .list-group-horizontal-lg > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-lg > .list-group-item:last-child { - border-top-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } - .list-group-horizontal-lg > .list-group-item.active { - margin-top: 0; - } - .list-group-horizontal-lg > .list-group-item + .list-group-item { - border-top-width: 1px; - border-left-width: 0; - } - .list-group-horizontal-lg > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; - } -} -@media (min-width: 1200px) { - .list-group-horizontal-xl { - flex-direction: row; - } - .list-group-horizontal-xl > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-xl > .list-group-item:last-child { - border-top-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } - .list-group-horizontal-xl > .list-group-item.active { - margin-top: 0; - } - .list-group-horizontal-xl > .list-group-item + .list-group-item { - border-top-width: 1px; - border-left-width: 0; - } - .list-group-horizontal-xl > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; - } -} -@media (min-width: 1400px) { - .list-group-horizontal-xxl { - flex-direction: row; - } - .list-group-horizontal-xxl > .list-group-item:first-child { - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-xxl > .list-group-item:last-child { - border-top-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } - .list-group-horizontal-xxl > .list-group-item.active { - margin-top: 0; - } - .list-group-horizontal-xxl > .list-group-item + .list-group-item { - border-top-width: 1px; - border-left-width: 0; - } - .list-group-horizontal-xxl > .list-group-item + .list-group-item.active { - margin-left: -1px; - border-left-width: 1px; - } -} -.list-group-flush { - border-radius: 0; -} -.list-group-flush > .list-group-item { - border-width: 0 0 1px; -} -.list-group-flush > .list-group-item:last-child { - border-bottom-width: 0; -} - -.list-group-item-primary { - color: #084298; - background-color: #cfe2ff; -} -.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus { - color: #084298; - background-color: #bacbe6; -} -.list-group-item-primary.list-group-item-action.active { - color: #fff; - background-color: #084298; - border-color: #084298; -} - -.list-group-item-secondary { - color: #41464b; - background-color: #e2e3e5; -} -.list-group-item-secondary.list-group-item-action:hover, .list-group-item-secondary.list-group-item-action:focus { - color: #41464b; - background-color: #cbccce; -} -.list-group-item-secondary.list-group-item-action.active { - color: #fff; - background-color: #41464b; - border-color: #41464b; -} - -.list-group-item-success { - color: #0f5132; - background-color: #d1e7dd; -} -.list-group-item-success.list-group-item-action:hover, .list-group-item-success.list-group-item-action:focus { - color: #0f5132; - background-color: #bcd0c7; -} -.list-group-item-success.list-group-item-action.active { - color: #fff; - background-color: #0f5132; - border-color: #0f5132; -} - -.list-group-item-info { - color: #055160; - background-color: #cff4fc; -} -.list-group-item-info.list-group-item-action:hover, .list-group-item-info.list-group-item-action:focus { - color: #055160; - background-color: #badce3; -} -.list-group-item-info.list-group-item-action.active { - color: #fff; - background-color: #055160; - border-color: #055160; -} - -.list-group-item-warning { - color: #664d03; - background-color: #fff3cd; -} -.list-group-item-warning.list-group-item-action:hover, .list-group-item-warning.list-group-item-action:focus { - color: #664d03; - background-color: #e6dbb9; -} -.list-group-item-warning.list-group-item-action.active { - color: #fff; - background-color: #664d03; - border-color: #664d03; -} - -.list-group-item-danger { - color: #842029; - background-color: #f8d7da; -} -.list-group-item-danger.list-group-item-action:hover, .list-group-item-danger.list-group-item-action:focus { - color: #842029; - background-color: #dfc2c4; -} -.list-group-item-danger.list-group-item-action.active { - color: #fff; - background-color: #842029; - border-color: #842029; -} - -.list-group-item-light { - color: #636464; - background-color: #fefefe; -} -.list-group-item-light.list-group-item-action:hover, .list-group-item-light.list-group-item-action:focus { - color: #636464; - background-color: #e5e5e5; -} -.list-group-item-light.list-group-item-action.active { - color: #fff; - background-color: #636464; - border-color: #636464; -} - -.list-group-item-dark { - color: #141619; - background-color: #d3d3d4; -} -.list-group-item-dark.list-group-item-action:hover, .list-group-item-dark.list-group-item-action:focus { - color: #141619; - background-color: #bebebf; -} -.list-group-item-dark.list-group-item-action.active { - color: #fff; - background-color: #141619; - border-color: #141619; -} - -.btn-close { - box-sizing: content-box; - width: 1em; - height: 1em; - padding: 0.25em 0.25em; - color: #000; - background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; - border: 0; - border-radius: 0.25rem; - opacity: 0.5; -} -.btn-close:hover { - color: #000; - text-decoration: none; - opacity: 0.75; -} -.btn-close:focus { - outline: 0; - box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); - opacity: 1; -} -.btn-close:disabled, .btn-close.disabled { - pointer-events: none; - user-select: none; - opacity: 0.25; -} - -.btn-close-white { - filter: invert(1) grayscale(100%) brightness(200%); -} - -.toast { - width: 350px; - max-width: 100%; - font-size: 0.875rem; - pointer-events: auto; - background-color: rgba(255, 255, 255, 0.85); - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.1); - box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); - border-radius: 0.25rem; -} -.toast:not(.showing):not(.show) { - opacity: 0; -} -.toast.hide { - display: none; -} - -.toast-container { - width: max-content; - max-width: 100%; - pointer-events: none; -} -.toast-container > :not(:last-child) { - margin-bottom: 0.75rem; -} - -.toast-header { - display: flex; - align-items: center; - padding: 0.5rem 0.75rem; - color: #6c757d; - background-color: rgba(255, 255, 255, 0.85); - background-clip: padding-box; - border-bottom: 1px solid rgba(0, 0, 0, 0.05); - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); -} -.toast-header .btn-close { - margin-right: -0.375rem; - margin-left: 0.75rem; -} - -.toast-body { - padding: 0.75rem; - word-wrap: break-word; -} - -.modal { - position: fixed; - top: 0; - left: 0; - z-index: 1060; - display: none; - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - outline: 0; -} - -.modal-dialog { - position: relative; - width: auto; - margin: 0.5rem; - pointer-events: none; -} -.modal.fade .modal-dialog { - transition: transform 0.3s ease-out; - transform: translate(0, -50px); -} -@media (prefers-reduced-motion: reduce) { - .modal.fade .modal-dialog { - transition: none; - } -} -.modal.show .modal-dialog { - transform: none; -} -.modal.modal-static .modal-dialog { - transform: scale(1.02); -} - -.modal-dialog-scrollable { - height: calc(100% - 1rem); -} -.modal-dialog-scrollable .modal-content { - max-height: 100%; - overflow: hidden; -} -.modal-dialog-scrollable .modal-body { - overflow-y: auto; -} - -.modal-dialog-centered { - display: flex; - align-items: center; - min-height: calc(100% - 1rem); -} - -.modal-content { - position: relative; - display: flex; - flex-direction: column; - width: 100%; - pointer-events: auto; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 0.3rem; - outline: 0; -} - -.modal-backdrop { - position: fixed; - top: 0; - left: 0; - z-index: 1040; - width: 100vw; - height: 100vh; - background-color: #000; -} -.modal-backdrop.fade { - opacity: 0; -} -.modal-backdrop.show { - opacity: 0.5; -} - -.modal-header { - display: flex; - flex-shrink: 0; - align-items: center; - justify-content: space-between; - padding: 1rem 1rem; - border-bottom: 1px solid #dee2e6; - border-top-left-radius: calc(0.3rem - 1px); - border-top-right-radius: calc(0.3rem - 1px); -} -.modal-header .btn-close { - padding: 0.5rem 0.5rem; - margin: -0.5rem -0.5rem -0.5rem auto; -} - -.modal-title { - margin-bottom: 0; - line-height: 1.5; -} - -.modal-body { - position: relative; - flex: 1 1 auto; - padding: 1rem; -} - -.modal-footer { - display: flex; - flex-wrap: wrap; - flex-shrink: 0; - align-items: center; - justify-content: flex-end; - padding: 0.75rem; - border-top: 1px solid #dee2e6; - border-bottom-right-radius: calc(0.3rem - 1px); - border-bottom-left-radius: calc(0.3rem - 1px); -} -.modal-footer > * { - margin: 0.25rem; -} - -@media (min-width: 576px) { - .modal-dialog { - max-width: 500px; - margin: 1.75rem auto; - } - - .modal-dialog-scrollable { - height: calc(100% - 3.5rem); - } - - .modal-dialog-centered { - min-height: calc(100% - 3.5rem); - } - - .modal-sm { - max-width: 300px; - } -} -@media (min-width: 992px) { - .modal-lg, -.modal-xl { - max-width: 800px; - } -} -@media (min-width: 1200px) { - .modal-xl { - max-width: 1140px; - } -} -.modal-fullscreen { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; -} -.modal-fullscreen .modal-content { - height: 100%; - border: 0; - border-radius: 0; -} -.modal-fullscreen .modal-header { - border-radius: 0; -} -.modal-fullscreen .modal-body { - overflow-y: auto; -} -.modal-fullscreen .modal-footer { - border-radius: 0; -} - -@media (max-width: 575.98px) { - .modal-fullscreen-sm-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; - } - .modal-fullscreen-sm-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; - } - .modal-fullscreen-sm-down .modal-header { - border-radius: 0; - } - .modal-fullscreen-sm-down .modal-body { - overflow-y: auto; - } - .modal-fullscreen-sm-down .modal-footer { - border-radius: 0; - } -} -@media (max-width: 767.98px) { - .modal-fullscreen-md-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; - } - .modal-fullscreen-md-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; - } - .modal-fullscreen-md-down .modal-header { - border-radius: 0; - } - .modal-fullscreen-md-down .modal-body { - overflow-y: auto; - } - .modal-fullscreen-md-down .modal-footer { - border-radius: 0; - } -} -@media (max-width: 991.98px) { - .modal-fullscreen-lg-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; - } - .modal-fullscreen-lg-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; - } - .modal-fullscreen-lg-down .modal-header { - border-radius: 0; - } - .modal-fullscreen-lg-down .modal-body { - overflow-y: auto; - } - .modal-fullscreen-lg-down .modal-footer { - border-radius: 0; - } -} -@media (max-width: 1199.98px) { - .modal-fullscreen-xl-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; - } - .modal-fullscreen-xl-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; - } - .modal-fullscreen-xl-down .modal-header { - border-radius: 0; - } - .modal-fullscreen-xl-down .modal-body { - overflow-y: auto; - } - .modal-fullscreen-xl-down .modal-footer { - border-radius: 0; - } -} -@media (max-width: 1399.98px) { - .modal-fullscreen-xxl-down { - width: 100vw; - max-width: none; - height: 100%; - margin: 0; - } - .modal-fullscreen-xxl-down .modal-content { - height: 100%; - border: 0; - border-radius: 0; - } - .modal-fullscreen-xxl-down .modal-header { - border-radius: 0; - } - .modal-fullscreen-xxl-down .modal-body { - overflow-y: auto; - } - .modal-fullscreen-xxl-down .modal-footer { - border-radius: 0; - } -} -.tooltip { - position: absolute; - z-index: 1080; - display: block; - margin: 0; - font-family: var(--bs-font-sans-serif); - font-style: normal; - font-weight: 400; - line-height: 1.5; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - white-space: normal; - line-break: auto; - font-size: 0.875rem; - word-wrap: break-word; - opacity: 0; -} -.tooltip.show { - opacity: 0.9; -} -.tooltip .tooltip-arrow { - position: absolute; - display: block; - width: 0.8rem; - height: 0.4rem; -} -.tooltip .tooltip-arrow::before { - position: absolute; - content: ""; - border-color: transparent; - border-style: solid; -} - -.bs-tooltip-top, .bs-tooltip-auto[data-popper-placement^=top] { - padding: 0.4rem 0; -} -.bs-tooltip-top .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow { - bottom: 0; -} -.bs-tooltip-top .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before { - top: -1px; - border-width: 0.4rem 0.4rem 0; - border-top-color: #000; -} - -.bs-tooltip-end, .bs-tooltip-auto[data-popper-placement^=right] { - padding: 0 0.4rem; -} -.bs-tooltip-end .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow { - left: 0; - width: 0.4rem; - height: 0.8rem; -} -.bs-tooltip-end .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before { - right: -1px; - border-width: 0.4rem 0.4rem 0.4rem 0; - border-right-color: #000; -} - -.bs-tooltip-bottom, .bs-tooltip-auto[data-popper-placement^=bottom] { - padding: 0.4rem 0; -} -.bs-tooltip-bottom .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow { - top: 0; -} -.bs-tooltip-bottom .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before { - bottom: -1px; - border-width: 0 0.4rem 0.4rem; - border-bottom-color: #000; -} - -.bs-tooltip-start, .bs-tooltip-auto[data-popper-placement^=left] { - padding: 0 0.4rem; -} -.bs-tooltip-start .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow { - right: 0; - width: 0.4rem; - height: 0.8rem; -} -.bs-tooltip-start .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before { - left: -1px; - border-width: 0.4rem 0 0.4rem 0.4rem; - border-left-color: #000; -} - -.tooltip-inner { - max-width: 200px; - padding: 0.25rem 0.5rem; - color: #fff; - text-align: center; - background-color: #000; - border-radius: 0.25rem; -} - -.popover { - position: absolute; - top: 0; - left: 0 /* rtl:ignore */; - z-index: 1070; - display: block; - max-width: 276px; - font-family: var(--bs-font-sans-serif); - font-style: normal; - font-weight: 400; - line-height: 1.5; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - white-space: normal; - line-break: auto; - font-size: 0.875rem; - word-wrap: break-word; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 0.3rem; -} -.popover .popover-arrow { - position: absolute; - display: block; - width: 1rem; - height: 0.5rem; -} -.popover .popover-arrow::before, .popover .popover-arrow::after { - position: absolute; - display: block; - content: ""; - border-color: transparent; - border-style: solid; -} - -.bs-popover-top > .popover-arrow, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow { - bottom: calc(-0.5rem - 1px); -} -.bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::before { - bottom: 0; - border-width: 0.5rem 0.5rem 0; - border-top-color: rgba(0, 0, 0, 0.25); -} -.bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { - bottom: 1px; - border-width: 0.5rem 0.5rem 0; - border-top-color: #fff; -} - -.bs-popover-end > .popover-arrow, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow { - left: calc(-0.5rem - 1px); - width: 0.5rem; - height: 1rem; -} -.bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::before { - left: 0; - border-width: 0.5rem 0.5rem 0.5rem 0; - border-right-color: rgba(0, 0, 0, 0.25); -} -.bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { - left: 1px; - border-width: 0.5rem 0.5rem 0.5rem 0; - border-right-color: #fff; -} - -.bs-popover-bottom > .popover-arrow, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow { - top: calc(-0.5rem - 1px); -} -.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::before { - top: 0; - border-width: 0 0.5rem 0.5rem 0.5rem; - border-bottom-color: rgba(0, 0, 0, 0.25); -} -.bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { - top: 1px; - border-width: 0 0.5rem 0.5rem 0.5rem; - border-bottom-color: #fff; -} -.bs-popover-bottom .popover-header::before, .bs-popover-auto[data-popper-placement^=bottom] .popover-header::before { - position: absolute; - top: 0; - left: 50%; - display: block; - width: 1rem; - margin-left: -0.5rem; - content: ""; - border-bottom: 1px solid #f0f0f0; -} - -.bs-popover-start > .popover-arrow, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow { - right: calc(-0.5rem - 1px); - width: 0.5rem; - height: 1rem; -} -.bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::before { - right: 0; - border-width: 0.5rem 0 0.5rem 0.5rem; - border-left-color: rgba(0, 0, 0, 0.25); -} -.bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { - right: 1px; - border-width: 0.5rem 0 0.5rem 0.5rem; - border-left-color: #fff; -} - -.popover-header { - padding: 0.5rem 1rem; - margin-bottom: 0; - font-size: 1rem; - background-color: #f0f0f0; - border-bottom: 1px solid rgba(0, 0, 0, 0.2); - border-top-left-radius: calc(0.3rem - 1px); - border-top-right-radius: calc(0.3rem - 1px); -} -.popover-header:empty { - display: none; -} - -.popover-body { - padding: 1rem 1rem; - color: #212529; -} - -.carousel { - position: relative; -} - -.carousel.pointer-event { - touch-action: pan-y; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} -.carousel-inner::after { - display: block; - clear: both; - content: ""; -} - -.carousel-item { - position: relative; - display: none; - float: left; - width: 100%; - margin-right: -100%; - backface-visibility: hidden; - transition: transform 0.6s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .carousel-item { - transition: none; - } -} - -.carousel-item.active, -.carousel-item-next, -.carousel-item-prev { - display: block; -} - -/* rtl:begin:ignore */ -.carousel-item-next:not(.carousel-item-start), -.active.carousel-item-end { - transform: translateX(100%); -} - -.carousel-item-prev:not(.carousel-item-end), -.active.carousel-item-start { - transform: translateX(-100%); -} - -/* rtl:end:ignore */ -.carousel-fade .carousel-item { - opacity: 0; - transition-property: opacity; - transform: none; -} -.carousel-fade .carousel-item.active, -.carousel-fade .carousel-item-next.carousel-item-start, -.carousel-fade .carousel-item-prev.carousel-item-end { - z-index: 1; - opacity: 1; -} -.carousel-fade .active.carousel-item-start, -.carousel-fade .active.carousel-item-end { - z-index: 0; - opacity: 0; - transition: opacity 0s 0.6s; -} -@media (prefers-reduced-motion: reduce) { - .carousel-fade .active.carousel-item-start, -.carousel-fade .active.carousel-item-end { - transition: none; - } -} - -.carousel-control-prev, -.carousel-control-next { - position: absolute; - top: 0; - bottom: 0; - z-index: 1; - display: flex; - align-items: center; - justify-content: center; - width: 15%; - padding: 0; - color: #fff; - text-align: center; - background: none; - border: 0; - opacity: 0.5; - transition: opacity 0.15s ease; -} -@media (prefers-reduced-motion: reduce) { - .carousel-control-prev, -.carousel-control-next { - transition: none; - } -} -.carousel-control-prev:hover, .carousel-control-prev:focus, -.carousel-control-next:hover, -.carousel-control-next:focus { - color: #fff; - text-decoration: none; - outline: 0; - opacity: 0.9; -} - -.carousel-control-prev { - left: 0; -} - -.carousel-control-next { - right: 0; -} - -.carousel-control-prev-icon, -.carousel-control-next-icon { - display: inline-block; - width: 2rem; - height: 2rem; - background-repeat: no-repeat; - background-position: 50%; - background-size: 100% 100%; -} - -/* rtl:options: { - "autoRename": true, - "stringMap":[ { - "name" : "prev-next", - "search" : "prev", - "replace" : "next" - } ] -} */ -.carousel-control-prev-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); -} - -.carousel-control-next-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); -} - -.carousel-indicators { - position: absolute; - right: 0; - bottom: 0; - left: 0; - z-index: 2; - display: flex; - justify-content: center; - padding: 0; - margin-right: 15%; - margin-bottom: 1rem; - margin-left: 15%; - list-style: none; -} -.carousel-indicators [data-bs-target] { - box-sizing: content-box; - flex: 0 1 auto; - width: 30px; - height: 3px; - padding: 0; - margin-right: 3px; - margin-left: 3px; - text-indent: -999px; - cursor: pointer; - background-color: #fff; - background-clip: padding-box; - border: 0; - border-top: 10px solid transparent; - border-bottom: 10px solid transparent; - opacity: 0.5; - transition: opacity 0.6s ease; -} -@media (prefers-reduced-motion: reduce) { - .carousel-indicators [data-bs-target] { - transition: none; - } -} -.carousel-indicators .active { - opacity: 1; -} - -.carousel-caption { - position: absolute; - right: 15%; - bottom: 1.25rem; - left: 15%; - padding-top: 1.25rem; - padding-bottom: 1.25rem; - color: #fff; - text-align: center; -} - -.carousel-dark .carousel-control-prev-icon, -.carousel-dark .carousel-control-next-icon { - filter: invert(1) grayscale(100); -} -.carousel-dark .carousel-indicators [data-bs-target] { - background-color: #000; -} -.carousel-dark .carousel-caption { - color: #000; -} - -@keyframes spinner-border { - to { - transform: rotate(360deg) /* rtl:ignore */; - } -} -.spinner-border { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: -0.125em; - border: 0.25em solid currentColor; - border-right-color: transparent; - border-radius: 50%; - animation: 0.75s linear infinite spinner-border; -} - -.spinner-border-sm { - width: 1rem; - height: 1rem; - border-width: 0.2em; -} - -@keyframes spinner-grow { - 0% { - transform: scale(0); - } - 50% { - opacity: 1; - transform: none; - } -} -.spinner-grow { - display: inline-block; - width: 2rem; - height: 2rem; - vertical-align: -0.125em; - background-color: currentColor; - border-radius: 50%; - opacity: 0; - animation: 0.75s linear infinite spinner-grow; -} - -.spinner-grow-sm { - width: 1rem; - height: 1rem; -} - -@media (prefers-reduced-motion: reduce) { - .spinner-border, -.spinner-grow { - animation-duration: 1.5s; - } -} -.offcanvas { - position: fixed; - bottom: 0; - z-index: 1050; - display: flex; - flex-direction: column; - max-width: 100%; - visibility: hidden; - background-color: #fff; - background-clip: padding-box; - outline: 0; - transition: transform 0.3s ease-in-out; -} -@media (prefers-reduced-motion: reduce) { - .offcanvas { - transition: none; - } -} - -.offcanvas-header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 1rem 1rem; -} -.offcanvas-header .btn-close { - padding: 0.5rem 0.5rem; - margin-top: -0.5rem; - margin-right: -0.5rem; - margin-bottom: -0.5rem; -} - -.offcanvas-title { - margin-bottom: 0; - line-height: 1.5; -} - -.offcanvas-body { - flex-grow: 1; - padding: 1rem 1rem; - overflow-y: auto; -} - -.offcanvas-start { - top: 0; - left: 0; - width: 400px; - border-right: 1px solid rgba(0, 0, 0, 0.2); - transform: translateX(-100%); -} - -.offcanvas-end { - top: 0; - right: 0; - width: 400px; - border-left: 1px solid rgba(0, 0, 0, 0.2); - transform: translateX(100%); -} - -.offcanvas-top { - top: 0; - right: 0; - left: 0; - height: 30vh; - max-height: 100%; - border-bottom: 1px solid rgba(0, 0, 0, 0.2); - transform: translateY(-100%); -} - -.offcanvas-bottom { - right: 0; - left: 0; - height: 30vh; - max-height: 100%; - border-top: 1px solid rgba(0, 0, 0, 0.2); - transform: translateY(100%); -} - -.offcanvas.show { - transform: none; -} - -.clearfix::after { - display: block; - clear: both; - content: ""; -} - -.link-primary { - color: #0d6efd; -} -.link-primary:hover, .link-primary:focus { - color: #0a58ca; -} - -.link-secondary { - color: #6c757d; -} -.link-secondary:hover, .link-secondary:focus { - color: #565e64; -} - -.link-success { - color: #198754; -} -.link-success:hover, .link-success:focus { - color: #146c43; -} - -.link-info { - color: #0dcaf0; -} -.link-info:hover, .link-info:focus { - color: #3dd5f3; -} - -.link-warning { - color: #ffc107; -} -.link-warning:hover, .link-warning:focus { - color: #ffcd39; -} - -.link-danger { - color: #dc3545; -} -.link-danger:hover, .link-danger:focus { - color: #b02a37; -} - -.link-light { - color: #f8f9fa; -} -.link-light:hover, .link-light:focus { - color: #f9fafb; -} - -.link-dark { - color: #212529; -} -.link-dark:hover, .link-dark:focus { - color: #1a1e21; -} - -.ratio { - position: relative; - width: 100%; -} -.ratio::before { - display: block; - padding-top: var(--bs-aspect-ratio); - content: ""; -} -.ratio > * { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.ratio-1x1 { - --bs-aspect-ratio: 100%; -} - -.ratio-4x3 { - --bs-aspect-ratio: calc(3 / 4 * 100%); -} - -.ratio-16x9 { - --bs-aspect-ratio: calc(9 / 16 * 100%); -} - -.ratio-21x9 { - --bs-aspect-ratio: calc(9 / 21 * 100%); -} - -.fixed-top { - position: fixed; - top: 0; - right: 0; - left: 0; - z-index: 1030; -} - -.fixed-bottom { - position: fixed; - right: 0; - bottom: 0; - left: 0; - z-index: 1030; -} - -.sticky-top { - position: sticky; - top: 0; - z-index: 1020; -} - -@media (min-width: 576px) { - .sticky-sm-top { - position: sticky; - top: 0; - z-index: 1020; - } -} -@media (min-width: 768px) { - .sticky-md-top { - position: sticky; - top: 0; - z-index: 1020; - } -} -@media (min-width: 992px) { - .sticky-lg-top { - position: sticky; - top: 0; - z-index: 1020; - } -} -@media (min-width: 1200px) { - .sticky-xl-top { - position: sticky; - top: 0; - z-index: 1020; - } -} -@media (min-width: 1400px) { - .sticky-xxl-top { - position: sticky; - top: 0; - z-index: 1020; - } -} -.visually-hidden, -.visually-hidden-focusable:not(:focus):not(:focus-within) { - position: absolute !important; - width: 1px !important; - height: 1px !important; - padding: 0 !important; - margin: -1px !important; - overflow: hidden !important; - clip: rect(0, 0, 0, 0) !important; - white-space: nowrap !important; - border: 0 !important; -} - -.stretched-link::after { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1; - content: ""; -} - -.text-truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.align-baseline { - vertical-align: baseline !important; -} - -.align-top { - vertical-align: top !important; -} - -.align-middle { - vertical-align: middle !important; -} - -.align-bottom { - vertical-align: bottom !important; -} - -.align-text-bottom { - vertical-align: text-bottom !important; -} - -.align-text-top { - vertical-align: text-top !important; -} - -.float-start { - float: left !important; -} - -.float-end { - float: right !important; -} - -.float-none { - float: none !important; -} - -.overflow-auto { - overflow: auto !important; -} - -.overflow-hidden { - overflow: hidden !important; -} - -.overflow-visible { - overflow: visible !important; -} - -.overflow-scroll { - overflow: scroll !important; -} - -.d-inline { - display: inline !important; -} - -.d-inline-block { - display: inline-block !important; -} - -.d-block { - display: block !important; -} - -.d-grid { - display: grid !important; -} - -.d-table { - display: table !important; -} - -.d-table-row { - display: table-row !important; -} - -.d-table-cell { - display: table-cell !important; -} - -.d-flex { - display: flex !important; -} - -.d-inline-flex { - display: inline-flex !important; -} - -.d-none { - display: none !important; -} - -.shadow { - box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; -} - -.shadow-sm { - box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; -} - -.shadow-lg { - box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; -} - -.shadow-none { - box-shadow: none !important; -} - -.position-static { - position: static !important; -} - -.position-relative { - position: relative !important; -} - -.position-absolute { - position: absolute !important; -} - -.position-fixed { - position: fixed !important; -} - -.position-sticky { - position: sticky !important; -} - -.top-0 { - top: 0 !important; -} - -.top-50 { - top: 50% !important; -} - -.top-100 { - top: 100% !important; -} - -.bottom-0 { - bottom: 0 !important; -} - -.bottom-50 { - bottom: 50% !important; -} - -.bottom-100 { - bottom: 100% !important; -} - -.start-0 { - left: 0 !important; -} - -.start-50 { - left: 50% !important; -} - -.start-100 { - left: 100% !important; -} - -.end-0 { - right: 0 !important; -} - -.end-50 { - right: 50% !important; -} - -.end-100 { - right: 100% !important; -} - -.translate-middle { - transform: translate(-50%, -50%) !important; -} - -.translate-middle-x { - transform: translateX(-50%) !important; -} - -.translate-middle-y { - transform: translateY(-50%) !important; -} - -.border { - border: 1px solid #dee2e6 !important; -} - -.border-0 { - border: 0 !important; -} - -.border-top { - border-top: 1px solid #dee2e6 !important; -} - -.border-top-0 { - border-top: 0 !important; -} - -.border-end { - border-right: 1px solid #dee2e6 !important; -} - -.border-end-0 { - border-right: 0 !important; -} - -.border-bottom { - border-bottom: 1px solid #dee2e6 !important; -} - -.border-bottom-0 { - border-bottom: 0 !important; -} - -.border-start { - border-left: 1px solid #dee2e6 !important; -} - -.border-start-0 { - border-left: 0 !important; -} - -.border-primary { - border-color: #0d6efd !important; -} - -.border-secondary { - border-color: #6c757d !important; -} - -.border-success { - border-color: #198754 !important; -} - -.border-info { - border-color: #0dcaf0 !important; -} - -.border-warning { - border-color: #ffc107 !important; -} - -.border-danger { - border-color: #dc3545 !important; -} - -.border-light { - border-color: #f8f9fa !important; -} - -.border-dark { - border-color: #212529 !important; -} - -.border-white { - border-color: #fff !important; -} - -.border-1 { - border-width: 1px !important; -} - -.border-2 { - border-width: 2px !important; -} - -.border-3 { - border-width: 3px !important; -} - -.border-4 { - border-width: 4px !important; -} - -.border-5 { - border-width: 5px !important; -} - -.w-25 { - width: 25% !important; -} - -.w-50 { - width: 50% !important; -} - -.w-75 { - width: 75% !important; -} - -.w-100 { - width: 100% !important; -} - -.w-auto { - width: auto !important; -} - -.mw-100 { - max-width: 100% !important; -} - -.vw-100 { - width: 100vw !important; -} - -.min-vw-100 { - min-width: 100vw !important; -} - -.h-25 { - height: 25% !important; -} - -.h-50 { - height: 50% !important; -} - -.h-75 { - height: 75% !important; -} - -.h-100 { - height: 100% !important; -} - -.h-auto { - height: auto !important; -} - -.mh-100 { - max-height: 100% !important; -} - -.vh-100 { - height: 100vh !important; -} - -.min-vh-100 { - min-height: 100vh !important; -} - -.flex-fill { - flex: 1 1 auto !important; -} - -.flex-row { - flex-direction: row !important; -} - -.flex-column { - flex-direction: column !important; -} - -.flex-row-reverse { - flex-direction: row-reverse !important; -} - -.flex-column-reverse { - flex-direction: column-reverse !important; -} - -.flex-grow-0 { - flex-grow: 0 !important; -} - -.flex-grow-1 { - flex-grow: 1 !important; -} - -.flex-shrink-0 { - flex-shrink: 0 !important; -} - -.flex-shrink-1 { - flex-shrink: 1 !important; -} - -.flex-wrap { - flex-wrap: wrap !important; -} - -.flex-nowrap { - flex-wrap: nowrap !important; -} - -.flex-wrap-reverse { - flex-wrap: wrap-reverse !important; -} - -.gap-0 { - gap: 0 !important; -} - -.gap-1 { - gap: 0.25rem !important; -} - -.gap-2 { - gap: 0.5rem !important; -} - -.gap-3 { - gap: 1rem !important; -} - -.gap-4 { - gap: 1.5rem !important; -} - -.gap-5 { - gap: 3rem !important; -} - -.justify-content-start { - justify-content: flex-start !important; -} - -.justify-content-end { - justify-content: flex-end !important; -} - -.justify-content-center { - justify-content: center !important; -} - -.justify-content-between { - justify-content: space-between !important; -} - -.justify-content-around { - justify-content: space-around !important; -} - -.justify-content-evenly { - justify-content: space-evenly !important; -} - -.align-items-start { - align-items: flex-start !important; -} - -.align-items-end { - align-items: flex-end !important; -} - -.align-items-center { - align-items: center !important; -} - -.align-items-baseline { - align-items: baseline !important; -} - -.align-items-stretch { - align-items: stretch !important; -} - -.align-content-start { - align-content: flex-start !important; -} - -.align-content-end { - align-content: flex-end !important; -} - -.align-content-center { - align-content: center !important; -} - -.align-content-between { - align-content: space-between !important; -} - -.align-content-around { - align-content: space-around !important; -} - -.align-content-stretch { - align-content: stretch !important; -} - -.align-self-auto { - align-self: auto !important; -} - -.align-self-start { - align-self: flex-start !important; -} - -.align-self-end { - align-self: flex-end !important; -} - -.align-self-center { - align-self: center !important; -} - -.align-self-baseline { - align-self: baseline !important; -} - -.align-self-stretch { - align-self: stretch !important; -} - -.order-first { - order: -1 !important; -} - -.order-0 { - order: 0 !important; -} - -.order-1 { - order: 1 !important; -} - -.order-2 { - order: 2 !important; -} - -.order-3 { - order: 3 !important; -} - -.order-4 { - order: 4 !important; -} - -.order-5 { - order: 5 !important; -} - -.order-last { - order: 6 !important; -} - -.m-0 { - margin: 0 !important; -} - -.m-1 { - margin: 0.25rem !important; -} - -.m-2 { - margin: 0.5rem !important; -} - -.m-3 { - margin: 1rem !important; -} - -.m-4 { - margin: 1.5rem !important; -} - -.m-5 { - margin: 3rem !important; -} - -.m-auto { - margin: auto !important; -} - -.mx-0 { - margin-right: 0 !important; - margin-left: 0 !important; -} - -.mx-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; -} - -.mx-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; -} - -.mx-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; -} - -.mx-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; -} - -.mx-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; -} - -.mx-auto { - margin-right: auto !important; - margin-left: auto !important; -} - -.my-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -.my-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; -} - -.my-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; -} - -.my-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; -} - -.my-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; -} - -.my-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; -} - -.my-auto { - margin-top: auto !important; - margin-bottom: auto !important; -} - -.mt-0 { - margin-top: 0 !important; -} - -.mt-1 { - margin-top: 0.25rem !important; -} - -.mt-2 { - margin-top: 0.5rem !important; -} - -.mt-3 { - margin-top: 1rem !important; -} - -.mt-4 { - margin-top: 1.5rem !important; -} - -.mt-5 { - margin-top: 3rem !important; -} - -.mt-auto { - margin-top: auto !important; -} - -.me-0 { - margin-right: 0 !important; -} - -.me-1 { - margin-right: 0.25rem !important; -} - -.me-2 { - margin-right: 0.5rem !important; -} - -.me-3 { - margin-right: 1rem !important; -} - -.me-4 { - margin-right: 1.5rem !important; -} - -.me-5 { - margin-right: 3rem !important; -} - -.me-auto { - margin-right: auto !important; -} - -.mb-0 { - margin-bottom: 0 !important; -} - -.mb-1 { - margin-bottom: 0.25rem !important; -} - -.mb-2 { - margin-bottom: 0.5rem !important; -} - -.mb-3 { - margin-bottom: 1rem !important; -} - -.mb-4 { - margin-bottom: 1.5rem !important; -} - -.mb-5 { - margin-bottom: 3rem !important; -} - -.mb-auto { - margin-bottom: auto !important; -} - -.ms-0 { - margin-left: 0 !important; -} - -.ms-1 { - margin-left: 0.25rem !important; -} - -.ms-2 { - margin-left: 0.5rem !important; -} - -.ms-3 { - margin-left: 1rem !important; -} - -.ms-4 { - margin-left: 1.5rem !important; -} - -.ms-5 { - margin-left: 3rem !important; -} - -.ms-auto { - margin-left: auto !important; -} - -.p-0 { - padding: 0 !important; -} - -.p-1 { - padding: 0.25rem !important; -} - -.p-2 { - padding: 0.5rem !important; -} - -.p-3 { - padding: 1rem !important; -} - -.p-4 { - padding: 1.5rem !important; -} - -.p-5 { - padding: 3rem !important; -} - -.px-0 { - padding-right: 0 !important; - padding-left: 0 !important; -} - -.px-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; -} - -.px-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; -} - -.px-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; -} - -.px-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; -} - -.px-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; -} - -.py-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; -} - -.py-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; -} - -.py-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; -} - -.py-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; -} - -.py-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; -} - -.py-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; -} - -.pt-0 { - padding-top: 0 !important; -} - -.pt-1 { - padding-top: 0.25rem !important; -} - -.pt-2 { - padding-top: 0.5rem !important; -} - -.pt-3 { - padding-top: 1rem !important; -} - -.pt-4 { - padding-top: 1.5rem !important; -} - -.pt-5 { - padding-top: 3rem !important; -} - -.pe-0 { - padding-right: 0 !important; -} - -.pe-1 { - padding-right: 0.25rem !important; -} - -.pe-2 { - padding-right: 0.5rem !important; -} - -.pe-3 { - padding-right: 1rem !important; -} - -.pe-4 { - padding-right: 1.5rem !important; -} - -.pe-5 { - padding-right: 3rem !important; -} - -.pb-0 { - padding-bottom: 0 !important; -} - -.pb-1 { - padding-bottom: 0.25rem !important; -} - -.pb-2 { - padding-bottom: 0.5rem !important; -} - -.pb-3 { - padding-bottom: 1rem !important; -} - -.pb-4 { - padding-bottom: 1.5rem !important; -} - -.pb-5 { - padding-bottom: 3rem !important; -} - -.ps-0 { - padding-left: 0 !important; -} - -.ps-1 { - padding-left: 0.25rem !important; -} - -.ps-2 { - padding-left: 0.5rem !important; -} - -.ps-3 { - padding-left: 1rem !important; -} - -.ps-4 { - padding-left: 1.5rem !important; -} - -.ps-5 { - padding-left: 3rem !important; -} - -.font-monospace { - font-family: var(--bs-font-monospace) !important; -} - -.fs-1 { - font-size: calc(1.375rem + 1.5vw) !important; -} - -.fs-2 { - font-size: calc(1.325rem + 0.9vw) !important; -} - -.fs-3 { - font-size: calc(1.3rem + 0.6vw) !important; -} - -.fs-4 { - font-size: calc(1.275rem + 0.3vw) !important; -} - -.fs-5 { - font-size: 1.25rem !important; -} - -.fs-6 { - font-size: 1rem !important; -} - -.fst-italic { - font-style: italic !important; -} - -.fst-normal { - font-style: normal !important; -} - -.fw-light { - font-weight: 300 !important; -} - -.fw-lighter { - font-weight: lighter !important; -} - -.fw-normal { - font-weight: 400 !important; -} - -.fw-bold { - font-weight: 700 !important; -} - -.fw-bolder { - font-weight: bolder !important; -} - -.lh-1 { - line-height: 1 !important; -} - -.lh-sm { - line-height: 1.25 !important; -} - -.lh-base { - line-height: 1.5 !important; -} - -.lh-lg { - line-height: 2 !important; -} - -.text-start { - text-align: left !important; -} - -.text-end { - text-align: right !important; -} - -.text-center { - text-align: center !important; -} - -.text-decoration-none { - text-decoration: none !important; -} - -.text-decoration-underline { - text-decoration: underline !important; -} - -.text-decoration-line-through { - text-decoration: line-through !important; -} - -.text-lowercase { - text-transform: lowercase !important; -} - -.text-uppercase { - text-transform: uppercase !important; -} - -.text-capitalize { - text-transform: capitalize !important; -} - -.text-wrap { - white-space: normal !important; -} - -.text-nowrap { - white-space: nowrap !important; -} - -/* rtl:begin:remove */ -.text-break { - word-wrap: break-word !important; - word-break: break-word !important; -} - -/* rtl:end:remove */ -.text-primary { - color: #0d6efd !important; -} - -.text-secondary { - color: #6c757d !important; -} - -.text-success { - color: #198754 !important; -} - -.text-info { - color: #0dcaf0 !important; -} - -.text-warning { - color: #ffc107 !important; -} - -.text-danger { - color: #dc3545 !important; -} - -.text-light { - color: #f8f9fa !important; -} - -.text-dark { - color: #212529 !important; -} - -.text-white { - color: #fff !important; -} - -.text-body { - color: #212529 !important; -} - -.text-muted { - color: #6c757d !important; -} - -.text-black-50 { - color: rgba(0, 0, 0, 0.5) !important; -} - -.text-white-50 { - color: rgba(255, 255, 255, 0.5) !important; -} - -.text-reset { - color: inherit !important; -} - -.bg-primary { - background-color: #0d6efd !important; -} - -.bg-secondary { - background-color: #6c757d !important; -} - -.bg-success { - background-color: #198754 !important; -} - -.bg-info { - background-color: #0dcaf0 !important; -} - -.bg-warning { - background-color: #ffc107 !important; -} - -.bg-danger { - background-color: #dc3545 !important; -} - -.bg-light { - background-color: #f8f9fa !important; -} - -.bg-dark { - background-color: #212529 !important; -} - -.bg-body { - background-color: #fff !important; -} - -.bg-white { - background-color: #fff !important; -} - -.bg-transparent { - background-color: transparent !important; -} - -.bg-gradient { - background-image: var(--bs-gradient) !important; -} - -.user-select-all { - user-select: all !important; -} - -.user-select-auto { - user-select: auto !important; -} - -.user-select-none { - user-select: none !important; -} - -.pe-none { - pointer-events: none !important; -} - -.pe-auto { - pointer-events: auto !important; -} - -.rounded { - border-radius: 0.25rem !important; -} - -.rounded-0 { - border-radius: 0 !important; -} - -.rounded-1 { - border-radius: 0.2rem !important; -} - -.rounded-2 { - border-radius: 0.25rem !important; -} - -.rounded-3 { - border-radius: 0.3rem !important; -} - -.rounded-circle { - border-radius: 50% !important; -} - -.rounded-pill { - border-radius: 50rem !important; -} - -.rounded-top { - border-top-left-radius: 0.25rem !important; - border-top-right-radius: 0.25rem !important; -} - -.rounded-end { - border-top-right-radius: 0.25rem !important; - border-bottom-right-radius: 0.25rem !important; -} - -.rounded-bottom { - border-bottom-right-radius: 0.25rem !important; - border-bottom-left-radius: 0.25rem !important; -} - -.rounded-start { - border-bottom-left-radius: 0.25rem !important; - border-top-left-radius: 0.25rem !important; -} - -.visible { - visibility: visible !important; -} - -.invisible { - visibility: hidden !important; -} - -@media (min-width: 576px) { - .float-sm-start { - float: left !important; - } - - .float-sm-end { - float: right !important; - } - - .float-sm-none { - float: none !important; - } - - .d-sm-inline { - display: inline !important; - } - - .d-sm-inline-block { - display: inline-block !important; - } - - .d-sm-block { - display: block !important; - } - - .d-sm-grid { - display: grid !important; - } - - .d-sm-table { - display: table !important; - } - - .d-sm-table-row { - display: table-row !important; - } - - .d-sm-table-cell { - display: table-cell !important; - } - - .d-sm-flex { - display: flex !important; - } - - .d-sm-inline-flex { - display: inline-flex !important; - } - - .d-sm-none { - display: none !important; - } - - .flex-sm-fill { - flex: 1 1 auto !important; - } - - .flex-sm-row { - flex-direction: row !important; - } - - .flex-sm-column { - flex-direction: column !important; - } - - .flex-sm-row-reverse { - flex-direction: row-reverse !important; - } - - .flex-sm-column-reverse { - flex-direction: column-reverse !important; - } - - .flex-sm-grow-0 { - flex-grow: 0 !important; - } - - .flex-sm-grow-1 { - flex-grow: 1 !important; - } - - .flex-sm-shrink-0 { - flex-shrink: 0 !important; - } - - .flex-sm-shrink-1 { - flex-shrink: 1 !important; - } - - .flex-sm-wrap { - flex-wrap: wrap !important; - } - - .flex-sm-nowrap { - flex-wrap: nowrap !important; - } - - .flex-sm-wrap-reverse { - flex-wrap: wrap-reverse !important; - } - - .gap-sm-0 { - gap: 0 !important; - } - - .gap-sm-1 { - gap: 0.25rem !important; - } - - .gap-sm-2 { - gap: 0.5rem !important; - } - - .gap-sm-3 { - gap: 1rem !important; - } - - .gap-sm-4 { - gap: 1.5rem !important; - } - - .gap-sm-5 { - gap: 3rem !important; - } - - .justify-content-sm-start { - justify-content: flex-start !important; - } - - .justify-content-sm-end { - justify-content: flex-end !important; - } - - .justify-content-sm-center { - justify-content: center !important; - } - - .justify-content-sm-between { - justify-content: space-between !important; - } - - .justify-content-sm-around { - justify-content: space-around !important; - } - - .justify-content-sm-evenly { - justify-content: space-evenly !important; - } - - .align-items-sm-start { - align-items: flex-start !important; - } - - .align-items-sm-end { - align-items: flex-end !important; - } - - .align-items-sm-center { - align-items: center !important; - } - - .align-items-sm-baseline { - align-items: baseline !important; - } - - .align-items-sm-stretch { - align-items: stretch !important; - } - - .align-content-sm-start { - align-content: flex-start !important; - } - - .align-content-sm-end { - align-content: flex-end !important; - } - - .align-content-sm-center { - align-content: center !important; - } - - .align-content-sm-between { - align-content: space-between !important; - } - - .align-content-sm-around { - align-content: space-around !important; - } - - .align-content-sm-stretch { - align-content: stretch !important; - } - - .align-self-sm-auto { - align-self: auto !important; - } - - .align-self-sm-start { - align-self: flex-start !important; - } - - .align-self-sm-end { - align-self: flex-end !important; - } - - .align-self-sm-center { - align-self: center !important; - } - - .align-self-sm-baseline { - align-self: baseline !important; - } - - .align-self-sm-stretch { - align-self: stretch !important; - } - - .order-sm-first { - order: -1 !important; - } - - .order-sm-0 { - order: 0 !important; - } - - .order-sm-1 { - order: 1 !important; - } - - .order-sm-2 { - order: 2 !important; - } - - .order-sm-3 { - order: 3 !important; - } - - .order-sm-4 { - order: 4 !important; - } - - .order-sm-5 { - order: 5 !important; - } - - .order-sm-last { - order: 6 !important; - } - - .m-sm-0 { - margin: 0 !important; - } - - .m-sm-1 { - margin: 0.25rem !important; - } - - .m-sm-2 { - margin: 0.5rem !important; - } - - .m-sm-3 { - margin: 1rem !important; - } - - .m-sm-4 { - margin: 1.5rem !important; - } - - .m-sm-5 { - margin: 3rem !important; - } - - .m-sm-auto { - margin: auto !important; - } - - .mx-sm-0 { - margin-right: 0 !important; - margin-left: 0 !important; - } - - .mx-sm-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; - } - - .mx-sm-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; - } - - .mx-sm-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; - } - - .mx-sm-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; - } - - .mx-sm-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; - } - - .mx-sm-auto { - margin-right: auto !important; - margin-left: auto !important; - } - - .my-sm-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; - } - - .my-sm-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; - } - - .my-sm-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; - } - - .my-sm-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; - } - - .my-sm-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; - } - - .my-sm-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; - } - - .my-sm-auto { - margin-top: auto !important; - margin-bottom: auto !important; - } - - .mt-sm-0 { - margin-top: 0 !important; - } - - .mt-sm-1 { - margin-top: 0.25rem !important; - } - - .mt-sm-2 { - margin-top: 0.5rem !important; - } - - .mt-sm-3 { - margin-top: 1rem !important; - } - - .mt-sm-4 { - margin-top: 1.5rem !important; - } - - .mt-sm-5 { - margin-top: 3rem !important; - } - - .mt-sm-auto { - margin-top: auto !important; - } - - .me-sm-0 { - margin-right: 0 !important; - } - - .me-sm-1 { - margin-right: 0.25rem !important; - } - - .me-sm-2 { - margin-right: 0.5rem !important; - } - - .me-sm-3 { - margin-right: 1rem !important; - } - - .me-sm-4 { - margin-right: 1.5rem !important; - } - - .me-sm-5 { - margin-right: 3rem !important; - } - - .me-sm-auto { - margin-right: auto !important; - } - - .mb-sm-0 { - margin-bottom: 0 !important; - } - - .mb-sm-1 { - margin-bottom: 0.25rem !important; - } - - .mb-sm-2 { - margin-bottom: 0.5rem !important; - } - - .mb-sm-3 { - margin-bottom: 1rem !important; - } - - .mb-sm-4 { - margin-bottom: 1.5rem !important; - } - - .mb-sm-5 { - margin-bottom: 3rem !important; - } - - .mb-sm-auto { - margin-bottom: auto !important; - } - - .ms-sm-0 { - margin-left: 0 !important; - } - - .ms-sm-1 { - margin-left: 0.25rem !important; - } - - .ms-sm-2 { - margin-left: 0.5rem !important; - } - - .ms-sm-3 { - margin-left: 1rem !important; - } - - .ms-sm-4 { - margin-left: 1.5rem !important; - } - - .ms-sm-5 { - margin-left: 3rem !important; - } - - .ms-sm-auto { - margin-left: auto !important; - } - - .p-sm-0 { - padding: 0 !important; - } - - .p-sm-1 { - padding: 0.25rem !important; - } - - .p-sm-2 { - padding: 0.5rem !important; - } - - .p-sm-3 { - padding: 1rem !important; - } - - .p-sm-4 { - padding: 1.5rem !important; - } - - .p-sm-5 { - padding: 3rem !important; - } - - .px-sm-0 { - padding-right: 0 !important; - padding-left: 0 !important; - } - - .px-sm-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; - } - - .px-sm-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; - } - - .px-sm-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; - } - - .px-sm-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; - } - - .px-sm-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; - } - - .py-sm-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; - } - - .py-sm-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; - } - - .py-sm-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; - } - - .py-sm-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; - } - - .py-sm-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; - } - - .py-sm-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; - } - - .pt-sm-0 { - padding-top: 0 !important; - } - - .pt-sm-1 { - padding-top: 0.25rem !important; - } - - .pt-sm-2 { - padding-top: 0.5rem !important; - } - - .pt-sm-3 { - padding-top: 1rem !important; - } - - .pt-sm-4 { - padding-top: 1.5rem !important; - } - - .pt-sm-5 { - padding-top: 3rem !important; - } - - .pe-sm-0 { - padding-right: 0 !important; - } - - .pe-sm-1 { - padding-right: 0.25rem !important; - } - - .pe-sm-2 { - padding-right: 0.5rem !important; - } - - .pe-sm-3 { - padding-right: 1rem !important; - } - - .pe-sm-4 { - padding-right: 1.5rem !important; - } - - .pe-sm-5 { - padding-right: 3rem !important; - } - - .pb-sm-0 { - padding-bottom: 0 !important; - } - - .pb-sm-1 { - padding-bottom: 0.25rem !important; - } - - .pb-sm-2 { - padding-bottom: 0.5rem !important; - } - - .pb-sm-3 { - padding-bottom: 1rem !important; - } - - .pb-sm-4 { - padding-bottom: 1.5rem !important; - } - - .pb-sm-5 { - padding-bottom: 3rem !important; - } - - .ps-sm-0 { - padding-left: 0 !important; - } - - .ps-sm-1 { - padding-left: 0.25rem !important; - } - - .ps-sm-2 { - padding-left: 0.5rem !important; - } - - .ps-sm-3 { - padding-left: 1rem !important; - } - - .ps-sm-4 { - padding-left: 1.5rem !important; - } - - .ps-sm-5 { - padding-left: 3rem !important; - } - - .text-sm-start { - text-align: left !important; - } - - .text-sm-end { - text-align: right !important; - } - - .text-sm-center { - text-align: center !important; - } -} -@media (min-width: 768px) { - .float-md-start { - float: left !important; - } - - .float-md-end { - float: right !important; - } - - .float-md-none { - float: none !important; - } - - .d-md-inline { - display: inline !important; - } - - .d-md-inline-block { - display: inline-block !important; - } - - .d-md-block { - display: block !important; - } - - .d-md-grid { - display: grid !important; - } - - .d-md-table { - display: table !important; - } - - .d-md-table-row { - display: table-row !important; - } - - .d-md-table-cell { - display: table-cell !important; - } - - .d-md-flex { - display: flex !important; - } - - .d-md-inline-flex { - display: inline-flex !important; - } - - .d-md-none { - display: none !important; - } - - .flex-md-fill { - flex: 1 1 auto !important; - } - - .flex-md-row { - flex-direction: row !important; - } - - .flex-md-column { - flex-direction: column !important; - } - - .flex-md-row-reverse { - flex-direction: row-reverse !important; - } - - .flex-md-column-reverse { - flex-direction: column-reverse !important; - } - - .flex-md-grow-0 { - flex-grow: 0 !important; - } - - .flex-md-grow-1 { - flex-grow: 1 !important; - } - - .flex-md-shrink-0 { - flex-shrink: 0 !important; - } - - .flex-md-shrink-1 { - flex-shrink: 1 !important; - } - - .flex-md-wrap { - flex-wrap: wrap !important; - } - - .flex-md-nowrap { - flex-wrap: nowrap !important; - } - - .flex-md-wrap-reverse { - flex-wrap: wrap-reverse !important; - } - - .gap-md-0 { - gap: 0 !important; - } - - .gap-md-1 { - gap: 0.25rem !important; - } - - .gap-md-2 { - gap: 0.5rem !important; - } - - .gap-md-3 { - gap: 1rem !important; - } - - .gap-md-4 { - gap: 1.5rem !important; - } - - .gap-md-5 { - gap: 3rem !important; - } - - .justify-content-md-start { - justify-content: flex-start !important; - } - - .justify-content-md-end { - justify-content: flex-end !important; - } - - .justify-content-md-center { - justify-content: center !important; - } - - .justify-content-md-between { - justify-content: space-between !important; - } - - .justify-content-md-around { - justify-content: space-around !important; - } - - .justify-content-md-evenly { - justify-content: space-evenly !important; - } - - .align-items-md-start { - align-items: flex-start !important; - } - - .align-items-md-end { - align-items: flex-end !important; - } - - .align-items-md-center { - align-items: center !important; - } - - .align-items-md-baseline { - align-items: baseline !important; - } - - .align-items-md-stretch { - align-items: stretch !important; - } - - .align-content-md-start { - align-content: flex-start !important; - } - - .align-content-md-end { - align-content: flex-end !important; - } - - .align-content-md-center { - align-content: center !important; - } - - .align-content-md-between { - align-content: space-between !important; - } - - .align-content-md-around { - align-content: space-around !important; - } - - .align-content-md-stretch { - align-content: stretch !important; - } - - .align-self-md-auto { - align-self: auto !important; - } - - .align-self-md-start { - align-self: flex-start !important; - } - - .align-self-md-end { - align-self: flex-end !important; - } - - .align-self-md-center { - align-self: center !important; - } - - .align-self-md-baseline { - align-self: baseline !important; - } - - .align-self-md-stretch { - align-self: stretch !important; - } - - .order-md-first { - order: -1 !important; - } - - .order-md-0 { - order: 0 !important; - } - - .order-md-1 { - order: 1 !important; - } - - .order-md-2 { - order: 2 !important; - } - - .order-md-3 { - order: 3 !important; - } - - .order-md-4 { - order: 4 !important; - } - - .order-md-5 { - order: 5 !important; - } - - .order-md-last { - order: 6 !important; - } - - .m-md-0 { - margin: 0 !important; - } - - .m-md-1 { - margin: 0.25rem !important; - } - - .m-md-2 { - margin: 0.5rem !important; - } - - .m-md-3 { - margin: 1rem !important; - } - - .m-md-4 { - margin: 1.5rem !important; - } - - .m-md-5 { - margin: 3rem !important; - } - - .m-md-auto { - margin: auto !important; - } - - .mx-md-0 { - margin-right: 0 !important; - margin-left: 0 !important; - } - - .mx-md-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; - } - - .mx-md-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; - } - - .mx-md-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; - } - - .mx-md-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; - } - - .mx-md-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; - } - - .mx-md-auto { - margin-right: auto !important; - margin-left: auto !important; - } - - .my-md-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; - } - - .my-md-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; - } - - .my-md-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; - } - - .my-md-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; - } - - .my-md-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; - } - - .my-md-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; - } - - .my-md-auto { - margin-top: auto !important; - margin-bottom: auto !important; - } - - .mt-md-0 { - margin-top: 0 !important; - } - - .mt-md-1 { - margin-top: 0.25rem !important; - } - - .mt-md-2 { - margin-top: 0.5rem !important; - } - - .mt-md-3 { - margin-top: 1rem !important; - } - - .mt-md-4 { - margin-top: 1.5rem !important; - } - - .mt-md-5 { - margin-top: 3rem !important; - } - - .mt-md-auto { - margin-top: auto !important; - } - - .me-md-0 { - margin-right: 0 !important; - } - - .me-md-1 { - margin-right: 0.25rem !important; - } - - .me-md-2 { - margin-right: 0.5rem !important; - } - - .me-md-3 { - margin-right: 1rem !important; - } - - .me-md-4 { - margin-right: 1.5rem !important; - } - - .me-md-5 { - margin-right: 3rem !important; - } - - .me-md-auto { - margin-right: auto !important; - } - - .mb-md-0 { - margin-bottom: 0 !important; - } - - .mb-md-1 { - margin-bottom: 0.25rem !important; - } - - .mb-md-2 { - margin-bottom: 0.5rem !important; - } - - .mb-md-3 { - margin-bottom: 1rem !important; - } - - .mb-md-4 { - margin-bottom: 1.5rem !important; - } - - .mb-md-5 { - margin-bottom: 3rem !important; - } - - .mb-md-auto { - margin-bottom: auto !important; - } - - .ms-md-0 { - margin-left: 0 !important; - } - - .ms-md-1 { - margin-left: 0.25rem !important; - } - - .ms-md-2 { - margin-left: 0.5rem !important; - } - - .ms-md-3 { - margin-left: 1rem !important; - } - - .ms-md-4 { - margin-left: 1.5rem !important; - } - - .ms-md-5 { - margin-left: 3rem !important; - } - - .ms-md-auto { - margin-left: auto !important; - } - - .p-md-0 { - padding: 0 !important; - } - - .p-md-1 { - padding: 0.25rem !important; - } - - .p-md-2 { - padding: 0.5rem !important; - } - - .p-md-3 { - padding: 1rem !important; - } - - .p-md-4 { - padding: 1.5rem !important; - } - - .p-md-5 { - padding: 3rem !important; - } - - .px-md-0 { - padding-right: 0 !important; - padding-left: 0 !important; - } - - .px-md-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; - } - - .px-md-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; - } - - .px-md-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; - } - - .px-md-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; - } - - .px-md-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; - } - - .py-md-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; - } - - .py-md-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; - } - - .py-md-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; - } - - .py-md-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; - } - - .py-md-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; - } - - .py-md-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; - } - - .pt-md-0 { - padding-top: 0 !important; - } - - .pt-md-1 { - padding-top: 0.25rem !important; - } - - .pt-md-2 { - padding-top: 0.5rem !important; - } - - .pt-md-3 { - padding-top: 1rem !important; - } - - .pt-md-4 { - padding-top: 1.5rem !important; - } - - .pt-md-5 { - padding-top: 3rem !important; - } - - .pe-md-0 { - padding-right: 0 !important; - } - - .pe-md-1 { - padding-right: 0.25rem !important; - } - - .pe-md-2 { - padding-right: 0.5rem !important; - } - - .pe-md-3 { - padding-right: 1rem !important; - } - - .pe-md-4 { - padding-right: 1.5rem !important; - } - - .pe-md-5 { - padding-right: 3rem !important; - } - - .pb-md-0 { - padding-bottom: 0 !important; - } - - .pb-md-1 { - padding-bottom: 0.25rem !important; - } - - .pb-md-2 { - padding-bottom: 0.5rem !important; - } - - .pb-md-3 { - padding-bottom: 1rem !important; - } - - .pb-md-4 { - padding-bottom: 1.5rem !important; - } - - .pb-md-5 { - padding-bottom: 3rem !important; - } - - .ps-md-0 { - padding-left: 0 !important; - } - - .ps-md-1 { - padding-left: 0.25rem !important; - } - - .ps-md-2 { - padding-left: 0.5rem !important; - } - - .ps-md-3 { - padding-left: 1rem !important; - } - - .ps-md-4 { - padding-left: 1.5rem !important; - } - - .ps-md-5 { - padding-left: 3rem !important; - } - - .text-md-start { - text-align: left !important; - } - - .text-md-end { - text-align: right !important; - } - - .text-md-center { - text-align: center !important; - } -} -@media (min-width: 992px) { - .float-lg-start { - float: left !important; - } - - .float-lg-end { - float: right !important; - } - - .float-lg-none { - float: none !important; - } - - .d-lg-inline { - display: inline !important; - } - - .d-lg-inline-block { - display: inline-block !important; - } - - .d-lg-block { - display: block !important; - } - - .d-lg-grid { - display: grid !important; - } - - .d-lg-table { - display: table !important; - } - - .d-lg-table-row { - display: table-row !important; - } - - .d-lg-table-cell { - display: table-cell !important; - } - - .d-lg-flex { - display: flex !important; - } - - .d-lg-inline-flex { - display: inline-flex !important; - } - - .d-lg-none { - display: none !important; - } - - .flex-lg-fill { - flex: 1 1 auto !important; - } - - .flex-lg-row { - flex-direction: row !important; - } - - .flex-lg-column { - flex-direction: column !important; - } - - .flex-lg-row-reverse { - flex-direction: row-reverse !important; - } - - .flex-lg-column-reverse { - flex-direction: column-reverse !important; - } - - .flex-lg-grow-0 { - flex-grow: 0 !important; - } - - .flex-lg-grow-1 { - flex-grow: 1 !important; - } - - .flex-lg-shrink-0 { - flex-shrink: 0 !important; - } - - .flex-lg-shrink-1 { - flex-shrink: 1 !important; - } - - .flex-lg-wrap { - flex-wrap: wrap !important; - } - - .flex-lg-nowrap { - flex-wrap: nowrap !important; - } - - .flex-lg-wrap-reverse { - flex-wrap: wrap-reverse !important; - } - - .gap-lg-0 { - gap: 0 !important; - } - - .gap-lg-1 { - gap: 0.25rem !important; - } - - .gap-lg-2 { - gap: 0.5rem !important; - } - - .gap-lg-3 { - gap: 1rem !important; - } - - .gap-lg-4 { - gap: 1.5rem !important; - } - - .gap-lg-5 { - gap: 3rem !important; - } - - .justify-content-lg-start { - justify-content: flex-start !important; - } - - .justify-content-lg-end { - justify-content: flex-end !important; - } - - .justify-content-lg-center { - justify-content: center !important; - } - - .justify-content-lg-between { - justify-content: space-between !important; - } - - .justify-content-lg-around { - justify-content: space-around !important; - } - - .justify-content-lg-evenly { - justify-content: space-evenly !important; - } - - .align-items-lg-start { - align-items: flex-start !important; - } - - .align-items-lg-end { - align-items: flex-end !important; - } - - .align-items-lg-center { - align-items: center !important; - } - - .align-items-lg-baseline { - align-items: baseline !important; - } - - .align-items-lg-stretch { - align-items: stretch !important; - } - - .align-content-lg-start { - align-content: flex-start !important; - } - - .align-content-lg-end { - align-content: flex-end !important; - } - - .align-content-lg-center { - align-content: center !important; - } - - .align-content-lg-between { - align-content: space-between !important; - } - - .align-content-lg-around { - align-content: space-around !important; - } - - .align-content-lg-stretch { - align-content: stretch !important; - } - - .align-self-lg-auto { - align-self: auto !important; - } - - .align-self-lg-start { - align-self: flex-start !important; - } - - .align-self-lg-end { - align-self: flex-end !important; - } - - .align-self-lg-center { - align-self: center !important; - } - - .align-self-lg-baseline { - align-self: baseline !important; - } - - .align-self-lg-stretch { - align-self: stretch !important; - } - - .order-lg-first { - order: -1 !important; - } - - .order-lg-0 { - order: 0 !important; - } - - .order-lg-1 { - order: 1 !important; - } - - .order-lg-2 { - order: 2 !important; - } - - .order-lg-3 { - order: 3 !important; - } - - .order-lg-4 { - order: 4 !important; - } - - .order-lg-5 { - order: 5 !important; - } - - .order-lg-last { - order: 6 !important; - } - - .m-lg-0 { - margin: 0 !important; - } - - .m-lg-1 { - margin: 0.25rem !important; - } - - .m-lg-2 { - margin: 0.5rem !important; - } - - .m-lg-3 { - margin: 1rem !important; - } - - .m-lg-4 { - margin: 1.5rem !important; - } - - .m-lg-5 { - margin: 3rem !important; - } - - .m-lg-auto { - margin: auto !important; - } - - .mx-lg-0 { - margin-right: 0 !important; - margin-left: 0 !important; - } - - .mx-lg-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; - } - - .mx-lg-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; - } - - .mx-lg-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; - } - - .mx-lg-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; - } - - .mx-lg-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; - } - - .mx-lg-auto { - margin-right: auto !important; - margin-left: auto !important; - } - - .my-lg-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; - } - - .my-lg-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; - } - - .my-lg-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; - } - - .my-lg-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; - } - - .my-lg-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; - } - - .my-lg-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; - } - - .my-lg-auto { - margin-top: auto !important; - margin-bottom: auto !important; - } - - .mt-lg-0 { - margin-top: 0 !important; - } - - .mt-lg-1 { - margin-top: 0.25rem !important; - } - - .mt-lg-2 { - margin-top: 0.5rem !important; - } - - .mt-lg-3 { - margin-top: 1rem !important; - } - - .mt-lg-4 { - margin-top: 1.5rem !important; - } - - .mt-lg-5 { - margin-top: 3rem !important; - } - - .mt-lg-auto { - margin-top: auto !important; - } - - .me-lg-0 { - margin-right: 0 !important; - } - - .me-lg-1 { - margin-right: 0.25rem !important; - } - - .me-lg-2 { - margin-right: 0.5rem !important; - } - - .me-lg-3 { - margin-right: 1rem !important; - } - - .me-lg-4 { - margin-right: 1.5rem !important; - } - - .me-lg-5 { - margin-right: 3rem !important; - } - - .me-lg-auto { - margin-right: auto !important; - } - - .mb-lg-0 { - margin-bottom: 0 !important; - } - - .mb-lg-1 { - margin-bottom: 0.25rem !important; - } - - .mb-lg-2 { - margin-bottom: 0.5rem !important; - } - - .mb-lg-3 { - margin-bottom: 1rem !important; - } - - .mb-lg-4 { - margin-bottom: 1.5rem !important; - } - - .mb-lg-5 { - margin-bottom: 3rem !important; - } - - .mb-lg-auto { - margin-bottom: auto !important; - } - - .ms-lg-0 { - margin-left: 0 !important; - } - - .ms-lg-1 { - margin-left: 0.25rem !important; - } - - .ms-lg-2 { - margin-left: 0.5rem !important; - } - - .ms-lg-3 { - margin-left: 1rem !important; - } - - .ms-lg-4 { - margin-left: 1.5rem !important; - } - - .ms-lg-5 { - margin-left: 3rem !important; - } - - .ms-lg-auto { - margin-left: auto !important; - } - - .p-lg-0 { - padding: 0 !important; - } - - .p-lg-1 { - padding: 0.25rem !important; - } - - .p-lg-2 { - padding: 0.5rem !important; - } - - .p-lg-3 { - padding: 1rem !important; - } - - .p-lg-4 { - padding: 1.5rem !important; - } - - .p-lg-5 { - padding: 3rem !important; - } - - .px-lg-0 { - padding-right: 0 !important; - padding-left: 0 !important; - } - - .px-lg-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; - } - - .px-lg-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; - } - - .px-lg-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; - } - - .px-lg-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; - } - - .px-lg-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; - } - - .py-lg-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; - } - - .py-lg-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; - } - - .py-lg-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; - } - - .py-lg-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; - } - - .py-lg-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; - } - - .py-lg-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; - } - - .pt-lg-0 { - padding-top: 0 !important; - } - - .pt-lg-1 { - padding-top: 0.25rem !important; - } - - .pt-lg-2 { - padding-top: 0.5rem !important; - } - - .pt-lg-3 { - padding-top: 1rem !important; - } - - .pt-lg-4 { - padding-top: 1.5rem !important; - } - - .pt-lg-5 { - padding-top: 3rem !important; - } - - .pe-lg-0 { - padding-right: 0 !important; - } - - .pe-lg-1 { - padding-right: 0.25rem !important; - } - - .pe-lg-2 { - padding-right: 0.5rem !important; - } - - .pe-lg-3 { - padding-right: 1rem !important; - } - - .pe-lg-4 { - padding-right: 1.5rem !important; - } - - .pe-lg-5 { - padding-right: 3rem !important; - } - - .pb-lg-0 { - padding-bottom: 0 !important; - } - - .pb-lg-1 { - padding-bottom: 0.25rem !important; - } - - .pb-lg-2 { - padding-bottom: 0.5rem !important; - } - - .pb-lg-3 { - padding-bottom: 1rem !important; - } - - .pb-lg-4 { - padding-bottom: 1.5rem !important; - } - - .pb-lg-5 { - padding-bottom: 3rem !important; - } - - .ps-lg-0 { - padding-left: 0 !important; - } - - .ps-lg-1 { - padding-left: 0.25rem !important; - } - - .ps-lg-2 { - padding-left: 0.5rem !important; - } - - .ps-lg-3 { - padding-left: 1rem !important; - } - - .ps-lg-4 { - padding-left: 1.5rem !important; - } - - .ps-lg-5 { - padding-left: 3rem !important; - } - - .text-lg-start { - text-align: left !important; - } - - .text-lg-end { - text-align: right !important; - } - - .text-lg-center { - text-align: center !important; - } -} -@media (min-width: 1200px) { - .float-xl-start { - float: left !important; - } - - .float-xl-end { - float: right !important; - } - - .float-xl-none { - float: none !important; - } - - .d-xl-inline { - display: inline !important; - } - - .d-xl-inline-block { - display: inline-block !important; - } - - .d-xl-block { - display: block !important; - } - - .d-xl-grid { - display: grid !important; - } - - .d-xl-table { - display: table !important; - } - - .d-xl-table-row { - display: table-row !important; - } - - .d-xl-table-cell { - display: table-cell !important; - } - - .d-xl-flex { - display: flex !important; - } - - .d-xl-inline-flex { - display: inline-flex !important; - } - - .d-xl-none { - display: none !important; - } - - .flex-xl-fill { - flex: 1 1 auto !important; - } - - .flex-xl-row { - flex-direction: row !important; - } - - .flex-xl-column { - flex-direction: column !important; - } - - .flex-xl-row-reverse { - flex-direction: row-reverse !important; - } - - .flex-xl-column-reverse { - flex-direction: column-reverse !important; - } - - .flex-xl-grow-0 { - flex-grow: 0 !important; - } - - .flex-xl-grow-1 { - flex-grow: 1 !important; - } - - .flex-xl-shrink-0 { - flex-shrink: 0 !important; - } - - .flex-xl-shrink-1 { - flex-shrink: 1 !important; - } - - .flex-xl-wrap { - flex-wrap: wrap !important; - } - - .flex-xl-nowrap { - flex-wrap: nowrap !important; - } - - .flex-xl-wrap-reverse { - flex-wrap: wrap-reverse !important; - } - - .gap-xl-0 { - gap: 0 !important; - } - - .gap-xl-1 { - gap: 0.25rem !important; - } - - .gap-xl-2 { - gap: 0.5rem !important; - } - - .gap-xl-3 { - gap: 1rem !important; - } - - .gap-xl-4 { - gap: 1.5rem !important; - } - - .gap-xl-5 { - gap: 3rem !important; - } - - .justify-content-xl-start { - justify-content: flex-start !important; - } - - .justify-content-xl-end { - justify-content: flex-end !important; - } - - .justify-content-xl-center { - justify-content: center !important; - } - - .justify-content-xl-between { - justify-content: space-between !important; - } - - .justify-content-xl-around { - justify-content: space-around !important; - } - - .justify-content-xl-evenly { - justify-content: space-evenly !important; - } - - .align-items-xl-start { - align-items: flex-start !important; - } - - .align-items-xl-end { - align-items: flex-end !important; - } - - .align-items-xl-center { - align-items: center !important; - } - - .align-items-xl-baseline { - align-items: baseline !important; - } - - .align-items-xl-stretch { - align-items: stretch !important; - } - - .align-content-xl-start { - align-content: flex-start !important; - } - - .align-content-xl-end { - align-content: flex-end !important; - } - - .align-content-xl-center { - align-content: center !important; - } - - .align-content-xl-between { - align-content: space-between !important; - } - - .align-content-xl-around { - align-content: space-around !important; - } - - .align-content-xl-stretch { - align-content: stretch !important; - } - - .align-self-xl-auto { - align-self: auto !important; - } - - .align-self-xl-start { - align-self: flex-start !important; - } - - .align-self-xl-end { - align-self: flex-end !important; - } - - .align-self-xl-center { - align-self: center !important; - } - - .align-self-xl-baseline { - align-self: baseline !important; - } - - .align-self-xl-stretch { - align-self: stretch !important; - } - - .order-xl-first { - order: -1 !important; - } - - .order-xl-0 { - order: 0 !important; - } - - .order-xl-1 { - order: 1 !important; - } - - .order-xl-2 { - order: 2 !important; - } - - .order-xl-3 { - order: 3 !important; - } - - .order-xl-4 { - order: 4 !important; - } - - .order-xl-5 { - order: 5 !important; - } - - .order-xl-last { - order: 6 !important; - } - - .m-xl-0 { - margin: 0 !important; - } - - .m-xl-1 { - margin: 0.25rem !important; - } - - .m-xl-2 { - margin: 0.5rem !important; - } - - .m-xl-3 { - margin: 1rem !important; - } - - .m-xl-4 { - margin: 1.5rem !important; - } - - .m-xl-5 { - margin: 3rem !important; - } - - .m-xl-auto { - margin: auto !important; - } - - .mx-xl-0 { - margin-right: 0 !important; - margin-left: 0 !important; - } - - .mx-xl-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; - } - - .mx-xl-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; - } - - .mx-xl-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; - } - - .mx-xl-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; - } - - .mx-xl-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; - } - - .mx-xl-auto { - margin-right: auto !important; - margin-left: auto !important; - } - - .my-xl-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; - } - - .my-xl-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; - } - - .my-xl-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; - } - - .my-xl-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; - } - - .my-xl-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; - } - - .my-xl-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; - } - - .my-xl-auto { - margin-top: auto !important; - margin-bottom: auto !important; - } - - .mt-xl-0 { - margin-top: 0 !important; - } - - .mt-xl-1 { - margin-top: 0.25rem !important; - } - - .mt-xl-2 { - margin-top: 0.5rem !important; - } - - .mt-xl-3 { - margin-top: 1rem !important; - } - - .mt-xl-4 { - margin-top: 1.5rem !important; - } - - .mt-xl-5 { - margin-top: 3rem !important; - } - - .mt-xl-auto { - margin-top: auto !important; - } - - .me-xl-0 { - margin-right: 0 !important; - } - - .me-xl-1 { - margin-right: 0.25rem !important; - } - - .me-xl-2 { - margin-right: 0.5rem !important; - } - - .me-xl-3 { - margin-right: 1rem !important; - } - - .me-xl-4 { - margin-right: 1.5rem !important; - } - - .me-xl-5 { - margin-right: 3rem !important; - } - - .me-xl-auto { - margin-right: auto !important; - } - - .mb-xl-0 { - margin-bottom: 0 !important; - } - - .mb-xl-1 { - margin-bottom: 0.25rem !important; - } - - .mb-xl-2 { - margin-bottom: 0.5rem !important; - } - - .mb-xl-3 { - margin-bottom: 1rem !important; - } - - .mb-xl-4 { - margin-bottom: 1.5rem !important; - } - - .mb-xl-5 { - margin-bottom: 3rem !important; - } - - .mb-xl-auto { - margin-bottom: auto !important; - } - - .ms-xl-0 { - margin-left: 0 !important; - } - - .ms-xl-1 { - margin-left: 0.25rem !important; - } - - .ms-xl-2 { - margin-left: 0.5rem !important; - } - - .ms-xl-3 { - margin-left: 1rem !important; - } - - .ms-xl-4 { - margin-left: 1.5rem !important; - } - - .ms-xl-5 { - margin-left: 3rem !important; - } - - .ms-xl-auto { - margin-left: auto !important; - } - - .p-xl-0 { - padding: 0 !important; - } - - .p-xl-1 { - padding: 0.25rem !important; - } - - .p-xl-2 { - padding: 0.5rem !important; - } - - .p-xl-3 { - padding: 1rem !important; - } - - .p-xl-4 { - padding: 1.5rem !important; - } - - .p-xl-5 { - padding: 3rem !important; - } - - .px-xl-0 { - padding-right: 0 !important; - padding-left: 0 !important; - } - - .px-xl-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; - } - - .px-xl-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; - } - - .px-xl-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; - } - - .px-xl-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; - } - - .px-xl-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; - } - - .py-xl-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; - } - - .py-xl-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; - } - - .py-xl-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; - } - - .py-xl-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; - } - - .py-xl-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; - } - - .py-xl-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; - } - - .pt-xl-0 { - padding-top: 0 !important; - } - - .pt-xl-1 { - padding-top: 0.25rem !important; - } - - .pt-xl-2 { - padding-top: 0.5rem !important; - } - - .pt-xl-3 { - padding-top: 1rem !important; - } - - .pt-xl-4 { - padding-top: 1.5rem !important; - } - - .pt-xl-5 { - padding-top: 3rem !important; - } - - .pe-xl-0 { - padding-right: 0 !important; - } - - .pe-xl-1 { - padding-right: 0.25rem !important; - } - - .pe-xl-2 { - padding-right: 0.5rem !important; - } - - .pe-xl-3 { - padding-right: 1rem !important; - } - - .pe-xl-4 { - padding-right: 1.5rem !important; - } - - .pe-xl-5 { - padding-right: 3rem !important; - } - - .pb-xl-0 { - padding-bottom: 0 !important; - } - - .pb-xl-1 { - padding-bottom: 0.25rem !important; - } - - .pb-xl-2 { - padding-bottom: 0.5rem !important; - } - - .pb-xl-3 { - padding-bottom: 1rem !important; - } - - .pb-xl-4 { - padding-bottom: 1.5rem !important; - } - - .pb-xl-5 { - padding-bottom: 3rem !important; - } - - .ps-xl-0 { - padding-left: 0 !important; - } - - .ps-xl-1 { - padding-left: 0.25rem !important; - } - - .ps-xl-2 { - padding-left: 0.5rem !important; - } - - .ps-xl-3 { - padding-left: 1rem !important; - } - - .ps-xl-4 { - padding-left: 1.5rem !important; - } - - .ps-xl-5 { - padding-left: 3rem !important; - } - - .text-xl-start { - text-align: left !important; - } - - .text-xl-end { - text-align: right !important; - } - - .text-xl-center { - text-align: center !important; - } -} -@media (min-width: 1400px) { - .float-xxl-start { - float: left !important; - } - - .float-xxl-end { - float: right !important; - } - - .float-xxl-none { - float: none !important; - } - - .d-xxl-inline { - display: inline !important; - } - - .d-xxl-inline-block { - display: inline-block !important; - } - - .d-xxl-block { - display: block !important; - } - - .d-xxl-grid { - display: grid !important; - } - - .d-xxl-table { - display: table !important; - } - - .d-xxl-table-row { - display: table-row !important; - } - - .d-xxl-table-cell { - display: table-cell !important; - } - - .d-xxl-flex { - display: flex !important; - } - - .d-xxl-inline-flex { - display: inline-flex !important; - } - - .d-xxl-none { - display: none !important; - } - - .flex-xxl-fill { - flex: 1 1 auto !important; - } - - .flex-xxl-row { - flex-direction: row !important; - } - - .flex-xxl-column { - flex-direction: column !important; - } - - .flex-xxl-row-reverse { - flex-direction: row-reverse !important; - } - - .flex-xxl-column-reverse { - flex-direction: column-reverse !important; - } - - .flex-xxl-grow-0 { - flex-grow: 0 !important; - } - - .flex-xxl-grow-1 { - flex-grow: 1 !important; - } - - .flex-xxl-shrink-0 { - flex-shrink: 0 !important; - } - - .flex-xxl-shrink-1 { - flex-shrink: 1 !important; - } - - .flex-xxl-wrap { - flex-wrap: wrap !important; - } - - .flex-xxl-nowrap { - flex-wrap: nowrap !important; - } - - .flex-xxl-wrap-reverse { - flex-wrap: wrap-reverse !important; - } - - .gap-xxl-0 { - gap: 0 !important; - } - - .gap-xxl-1 { - gap: 0.25rem !important; - } - - .gap-xxl-2 { - gap: 0.5rem !important; - } - - .gap-xxl-3 { - gap: 1rem !important; - } - - .gap-xxl-4 { - gap: 1.5rem !important; - } - - .gap-xxl-5 { - gap: 3rem !important; - } - - .justify-content-xxl-start { - justify-content: flex-start !important; - } - - .justify-content-xxl-end { - justify-content: flex-end !important; - } - - .justify-content-xxl-center { - justify-content: center !important; - } - - .justify-content-xxl-between { - justify-content: space-between !important; - } - - .justify-content-xxl-around { - justify-content: space-around !important; - } - - .justify-content-xxl-evenly { - justify-content: space-evenly !important; - } - - .align-items-xxl-start { - align-items: flex-start !important; - } - - .align-items-xxl-end { - align-items: flex-end !important; - } - - .align-items-xxl-center { - align-items: center !important; - } - - .align-items-xxl-baseline { - align-items: baseline !important; - } - - .align-items-xxl-stretch { - align-items: stretch !important; - } - - .align-content-xxl-start { - align-content: flex-start !important; - } - - .align-content-xxl-end { - align-content: flex-end !important; - } - - .align-content-xxl-center { - align-content: center !important; - } - - .align-content-xxl-between { - align-content: space-between !important; - } - - .align-content-xxl-around { - align-content: space-around !important; - } - - .align-content-xxl-stretch { - align-content: stretch !important; - } - - .align-self-xxl-auto { - align-self: auto !important; - } - - .align-self-xxl-start { - align-self: flex-start !important; - } - - .align-self-xxl-end { - align-self: flex-end !important; - } - - .align-self-xxl-center { - align-self: center !important; - } - - .align-self-xxl-baseline { - align-self: baseline !important; - } - - .align-self-xxl-stretch { - align-self: stretch !important; - } - - .order-xxl-first { - order: -1 !important; - } - - .order-xxl-0 { - order: 0 !important; - } - - .order-xxl-1 { - order: 1 !important; - } - - .order-xxl-2 { - order: 2 !important; - } - - .order-xxl-3 { - order: 3 !important; - } - - .order-xxl-4 { - order: 4 !important; - } - - .order-xxl-5 { - order: 5 !important; - } - - .order-xxl-last { - order: 6 !important; - } - - .m-xxl-0 { - margin: 0 !important; - } - - .m-xxl-1 { - margin: 0.25rem !important; - } - - .m-xxl-2 { - margin: 0.5rem !important; - } - - .m-xxl-3 { - margin: 1rem !important; - } - - .m-xxl-4 { - margin: 1.5rem !important; - } - - .m-xxl-5 { - margin: 3rem !important; - } - - .m-xxl-auto { - margin: auto !important; - } - - .mx-xxl-0 { - margin-right: 0 !important; - margin-left: 0 !important; - } - - .mx-xxl-1 { - margin-right: 0.25rem !important; - margin-left: 0.25rem !important; - } - - .mx-xxl-2 { - margin-right: 0.5rem !important; - margin-left: 0.5rem !important; - } - - .mx-xxl-3 { - margin-right: 1rem !important; - margin-left: 1rem !important; - } - - .mx-xxl-4 { - margin-right: 1.5rem !important; - margin-left: 1.5rem !important; - } - - .mx-xxl-5 { - margin-right: 3rem !important; - margin-left: 3rem !important; - } - - .mx-xxl-auto { - margin-right: auto !important; - margin-left: auto !important; - } - - .my-xxl-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; - } - - .my-xxl-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; - } - - .my-xxl-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; - } - - .my-xxl-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; - } - - .my-xxl-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; - } - - .my-xxl-5 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; - } - - .my-xxl-auto { - margin-top: auto !important; - margin-bottom: auto !important; - } - - .mt-xxl-0 { - margin-top: 0 !important; - } - - .mt-xxl-1 { - margin-top: 0.25rem !important; - } - - .mt-xxl-2 { - margin-top: 0.5rem !important; - } - - .mt-xxl-3 { - margin-top: 1rem !important; - } - - .mt-xxl-4 { - margin-top: 1.5rem !important; - } - - .mt-xxl-5 { - margin-top: 3rem !important; - } - - .mt-xxl-auto { - margin-top: auto !important; - } - - .me-xxl-0 { - margin-right: 0 !important; - } - - .me-xxl-1 { - margin-right: 0.25rem !important; - } - - .me-xxl-2 { - margin-right: 0.5rem !important; - } - - .me-xxl-3 { - margin-right: 1rem !important; - } - - .me-xxl-4 { - margin-right: 1.5rem !important; - } - - .me-xxl-5 { - margin-right: 3rem !important; - } - - .me-xxl-auto { - margin-right: auto !important; - } - - .mb-xxl-0 { - margin-bottom: 0 !important; - } - - .mb-xxl-1 { - margin-bottom: 0.25rem !important; - } - - .mb-xxl-2 { - margin-bottom: 0.5rem !important; - } - - .mb-xxl-3 { - margin-bottom: 1rem !important; - } - - .mb-xxl-4 { - margin-bottom: 1.5rem !important; - } - - .mb-xxl-5 { - margin-bottom: 3rem !important; - } - - .mb-xxl-auto { - margin-bottom: auto !important; - } - - .ms-xxl-0 { - margin-left: 0 !important; - } - - .ms-xxl-1 { - margin-left: 0.25rem !important; - } - - .ms-xxl-2 { - margin-left: 0.5rem !important; - } - - .ms-xxl-3 { - margin-left: 1rem !important; - } - - .ms-xxl-4 { - margin-left: 1.5rem !important; - } - - .ms-xxl-5 { - margin-left: 3rem !important; - } - - .ms-xxl-auto { - margin-left: auto !important; - } - - .p-xxl-0 { - padding: 0 !important; - } - - .p-xxl-1 { - padding: 0.25rem !important; - } - - .p-xxl-2 { - padding: 0.5rem !important; - } - - .p-xxl-3 { - padding: 1rem !important; - } - - .p-xxl-4 { - padding: 1.5rem !important; - } - - .p-xxl-5 { - padding: 3rem !important; - } - - .px-xxl-0 { - padding-right: 0 !important; - padding-left: 0 !important; - } - - .px-xxl-1 { - padding-right: 0.25rem !important; - padding-left: 0.25rem !important; - } - - .px-xxl-2 { - padding-right: 0.5rem !important; - padding-left: 0.5rem !important; - } - - .px-xxl-3 { - padding-right: 1rem !important; - padding-left: 1rem !important; - } - - .px-xxl-4 { - padding-right: 1.5rem !important; - padding-left: 1.5rem !important; - } - - .px-xxl-5 { - padding-right: 3rem !important; - padding-left: 3rem !important; - } - - .py-xxl-0 { - padding-top: 0 !important; - padding-bottom: 0 !important; - } - - .py-xxl-1 { - padding-top: 0.25rem !important; - padding-bottom: 0.25rem !important; - } - - .py-xxl-2 { - padding-top: 0.5rem !important; - padding-bottom: 0.5rem !important; - } - - .py-xxl-3 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; - } - - .py-xxl-4 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; - } - - .py-xxl-5 { - padding-top: 3rem !important; - padding-bottom: 3rem !important; - } - - .pt-xxl-0 { - padding-top: 0 !important; - } - - .pt-xxl-1 { - padding-top: 0.25rem !important; - } - - .pt-xxl-2 { - padding-top: 0.5rem !important; - } - - .pt-xxl-3 { - padding-top: 1rem !important; - } - - .pt-xxl-4 { - padding-top: 1.5rem !important; - } - - .pt-xxl-5 { - padding-top: 3rem !important; - } - - .pe-xxl-0 { - padding-right: 0 !important; - } - - .pe-xxl-1 { - padding-right: 0.25rem !important; - } - - .pe-xxl-2 { - padding-right: 0.5rem !important; - } - - .pe-xxl-3 { - padding-right: 1rem !important; - } - - .pe-xxl-4 { - padding-right: 1.5rem !important; - } - - .pe-xxl-5 { - padding-right: 3rem !important; - } - - .pb-xxl-0 { - padding-bottom: 0 !important; - } - - .pb-xxl-1 { - padding-bottom: 0.25rem !important; - } - - .pb-xxl-2 { - padding-bottom: 0.5rem !important; - } - - .pb-xxl-3 { - padding-bottom: 1rem !important; - } - - .pb-xxl-4 { - padding-bottom: 1.5rem !important; - } - - .pb-xxl-5 { - padding-bottom: 3rem !important; - } - - .ps-xxl-0 { - padding-left: 0 !important; - } - - .ps-xxl-1 { - padding-left: 0.25rem !important; - } - - .ps-xxl-2 { - padding-left: 0.5rem !important; - } - - .ps-xxl-3 { - padding-left: 1rem !important; - } - - .ps-xxl-4 { - padding-left: 1.5rem !important; - } - - .ps-xxl-5 { - padding-left: 3rem !important; - } - - .text-xxl-start { - text-align: left !important; - } - - .text-xxl-end { - text-align: right !important; - } - - .text-xxl-center { - text-align: center !important; - } -} -@media (min-width: 1200px) { - .fs-1 { - font-size: 2.5rem !important; - } - - .fs-2 { - font-size: 2rem !important; - } - - .fs-3 { - font-size: 1.75rem !important; - } - - .fs-4 { - font-size: 1.5rem !important; - } -} -@media print { - .d-print-inline { - display: inline !important; - } - - .d-print-inline-block { - display: inline-block !important; - } - - .d-print-block { - display: block !important; - } - - .d-print-grid { - display: grid !important; - } - - .d-print-table { - display: table !important; - } - - .d-print-table-row { - display: table-row !important; - } - - .d-print-table-cell { - display: table-cell !important; - } - - .d-print-flex { - display: flex !important; - } - - .d-print-inline-flex { - display: inline-flex !important; - } - - .d-print-none { - display: none !important; - } -} - -/*# sourceMappingURL=styles.css.map */ diff --git a/src/docs/styles/styles.css.map b/src/docs/styles/styles.css.map deleted file mode 100644 index fdb86639d..000000000 --- a/src/docs/styles/styles.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sourceRoot":"","sources":["styles.scss","../../../node_modules/bootstrap/scss/bootstrap.scss","../../../node_modules/bootstrap/scss/_root.scss","../../../node_modules/bootstrap/scss/_reboot.scss","../../../node_modules/bootstrap/scss/_variables.scss","../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../node_modules/bootstrap/scss/_type.scss","../../../node_modules/bootstrap/scss/mixins/_lists.scss","../../../node_modules/bootstrap/scss/_images.scss","../../../node_modules/bootstrap/scss/mixins/_image.scss","../../../node_modules/bootstrap/scss/_containers.scss","../../../node_modules/bootstrap/scss/mixins/_container.scss","../../../node_modules/bootstrap/scss/mixins/_breakpoints.scss","../../../node_modules/bootstrap/scss/_grid.scss","../../../node_modules/bootstrap/scss/mixins/_grid.scss","../../../node_modules/bootstrap/scss/_tables.scss","../../../node_modules/bootstrap/scss/mixins/_table-variants.scss","../../../node_modules/bootstrap/scss/forms/_labels.scss","../../../node_modules/bootstrap/scss/forms/_form-text.scss","../../../node_modules/bootstrap/scss/forms/_form-control.scss","../../../node_modules/bootstrap/scss/mixins/_transition.scss","../../../node_modules/bootstrap/scss/mixins/_gradients.scss","../../../node_modules/bootstrap/scss/forms/_form-select.scss","../../../node_modules/bootstrap/scss/forms/_form-check.scss","../../../node_modules/bootstrap/scss/forms/_form-range.scss","../../../node_modules/bootstrap/scss/forms/_floating-labels.scss","../../../node_modules/bootstrap/scss/forms/_input-group.scss","../../../node_modules/bootstrap/scss/mixins/_forms.scss","../../../node_modules/bootstrap/scss/_buttons.scss","../../../node_modules/bootstrap/scss/mixins/_buttons.scss","../../../node_modules/bootstrap/scss/_transitions.scss","../../../node_modules/bootstrap/scss/_dropdown.scss","../../../node_modules/bootstrap/scss/mixins/_caret.scss","../../../node_modules/bootstrap/scss/_button-group.scss","../../../node_modules/bootstrap/scss/_nav.scss","../../../node_modules/bootstrap/scss/_navbar.scss","../../../node_modules/bootstrap/scss/_card.scss","../../../node_modules/bootstrap/scss/_accordion.scss","../../../node_modules/bootstrap/scss/_breadcrumb.scss","../../../node_modules/bootstrap/scss/_pagination.scss","../../../node_modules/bootstrap/scss/mixins/_pagination.scss","../../../node_modules/bootstrap/scss/_badge.scss","../../../node_modules/bootstrap/scss/_alert.scss","../../../node_modules/bootstrap/scss/mixins/_alert.scss","../../../node_modules/bootstrap/scss/_progress.scss","../../../node_modules/bootstrap/scss/_list-group.scss","../../../node_modules/bootstrap/scss/mixins/_list-group.scss","../../../node_modules/bootstrap/scss/_close.scss","../../../node_modules/bootstrap/scss/_toasts.scss","../../../node_modules/bootstrap/scss/_modal.scss","../../../node_modules/bootstrap/scss/_tooltip.scss","../../../node_modules/bootstrap/scss/mixins/_reset-text.scss","../../../node_modules/bootstrap/scss/_popover.scss","../../../node_modules/bootstrap/scss/_carousel.scss","../../../node_modules/bootstrap/scss/mixins/_clearfix.scss","../../../node_modules/bootstrap/scss/_spinners.scss","../../../node_modules/bootstrap/scss/_offcanvas.scss","../../../node_modules/bootstrap/scss/helpers/_colored-links.scss","../../../node_modules/bootstrap/scss/helpers/_ratio.scss","../../../node_modules/bootstrap/scss/helpers/_position.scss","../../../node_modules/bootstrap/scss/helpers/_visually-hidden.scss","../../../node_modules/bootstrap/scss/mixins/_visually-hidden.scss","../../../node_modules/bootstrap/scss/helpers/_stretched-link.scss","../../../node_modules/bootstrap/scss/helpers/_text-truncation.scss","../../../node_modules/bootstrap/scss/mixins/_text-truncate.scss","../../../node_modules/bootstrap/scss/mixins/_utilities.scss","../../../node_modules/bootstrap/scss/utilities/_api.scss"],"names":[],"mappings":";AAAQ;ACAR;AAAA;AAAA;AAAA;AAAA;AAAA;ADEQ;AEFR;EAGI;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAIA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAKF;EACA;EACA;;;ACCF;AAAA;AAAA;EAGE;;;AAaE;EAJJ;IAKM;;;;AAaN;EACE;EACA,aCsX4B;EChIxB,WALI;EF/OR,aCgY4B;ED/X5B,aCqY4B;EDpY5B,OClCS;EDoCT,kBC7CS;ED8CT;EACA;;;AASF;EACE;EACA,OCqb4B;EDpb5B;EACA;EACA,SCob4B;;;ADjb9B;EACE,QC+R4B;;;ADrR9B;EACE;EACA,eC0X4B;EDvX5B,aC0X4B;EDzX5B,aC0X4B;;;ADtX9B;EE4MQ;;AAlKJ;EF1CJ;IEmNQ;;;;AF9MR;EEuMQ;;AAlKJ;EFrCJ;IE8MQ;;;;AFzMR;EEkMQ;;AAlKJ;EFhCJ;IEyMQ;;;;AFpMR;EE6LQ;;AAlKJ;EF3BJ;IEoMQ;;;;AF/LR;EEoLM,WALI;;;AF1KV;EE+KM,WALI;;;AF/JV;EACE;EACA,eCyK0B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AA;AAAA;ECHA;EACA;EACA;EACA;EACA;;;ACwDE;EF5CE;IACE,WPoTe;;;ASzQnB;EF5CE;IACE,WPoTe;;;ASzQnB;EF5CE;IACE,WPoTe;;;ASzQnB;EF5CE;IACE,WPoTe;;;ASzQnB;EF5CE;IACE,WPoTe;;;AUnUrB;ECAA;EACA;EACA;EACA;EACA;EACA;EACA;;ADHE;ECYF;EACA;EACA;EACA;EACA;EACA;;;AA+CI;EACE;;;AAGF;EApCJ;EACA;;;AAcA;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AAFF;EACE;EACA;;;AFMA;EESE;IACE;;;EAGF;IApCJ;IACA;;;EAcA;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;AFMA;EESE;IACE;;;EAGF;IApCJ;IACA;;;EAcA;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;AFMA;EESE;IACE;;;EAGF;IApCJ;IACA;;;EAcA;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;AFMA;EESE;IACE;;;EAGF;IApCJ;IACA;;;EAcA;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;AFMA;EESE;IACE;;;EAGF;IApCJ;IACA;;;EAcA;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;EAFF;IACE;IACA;;;AAqCE;EAtDJ;EACA;;;AA2DQ;EAtEN;EACA;;;AAqEM;EAtEN;EACA;;;AAqEM;EAtEN;EACA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5CjMF;;;A6ClBJ;EACE;EACA,S/C64BkC;E+C54BlC;EACA,Q/CunCkC;EgD3nClC,ahDoa4B;EgDla5B;EACA,ahD6a4B;EgD5a5B,ahDkb4B;EgDjb5B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E/CsRI,WALI;E8CrRR;EACA;;AAEA;EAAS,S/C2mCyB;;A+CzmClC;EACE;EACA;EACA,O/C2mCgC;E+C1mChC,Q/C2mCgC;;A+CzmChC;EACE;EACA;EACA;EACA;;;AAKN;EACE;;AAEA;EACE;;AAEA;EACE;EACA;EACA,kB/CtBK;;;A+C2BX;EACE;;AAEA;EACE;EACA,O/C6kCgC;E+C5kChC,Q/C2kCgC;;A+CzkChC;EACE;EACA;EACA,oB/CtCK;;;A+C2CX;EACE;;AAEA;EACE;;AAEA;EACE;EACA;EACA,qB/CpDK;;;A+CyDX;EACE;;AAEA;EACE;EACA,O/C+iCgC;E+C9iChC,Q/C6iCgC;;A+C3iChC;EACE;EACA;EACA,mB/CpEK;;;A+CyFX;EACE,W/CygCkC;E+CxgClC;EACA,O/CtGS;E+CuGT;EACA,kB/C9FS;EECP;;;A+CnBJ;EACE;EACA;EACA;EACA,SjD24BkC;EiD14BlC;EACA,WjD6oCkC;EgDlpClC,ahDoa4B;EgDla5B;EACA,ahD6a4B;EgD5a5B,ahDkb4B;EgDjb5B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E/CsRI,WALI;EgDpRR;EACA,kBjDLS;EiDMT;EACA;E/CIE;;A+CAF;EACE;EACA;EACA,OjD6oCgC;EiD5oChC,QjD6oCgC;;AiD3oChC;EAEE;EACA;EACA;EACA;EACA;;;AAMJ;EACE;;AAEA;EACE;EACA;EACA,kBjD4nC8B;;AiDznChC;EACE,QjDyTwB;EiDxTxB;EACA,kBjDzCK;;;AiD+CT;EACE;EACA,OjD2mCgC;EiD1mChC,QjDymCgC;;AiDvmChC;EACE;EACA;EACA,oBjDwmC8B;;AiDrmChC;EACE,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FJ;IAEI;IAAA;;;EAFJ;IAEI;IAAA;;;EAFJ;IAEI;IAAA;;;EAFJ;IAEI;IAAA;;;EAFJ;IAEI;IAAA;;;EAFJ;IAEI;IAAA;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;AChCV;ED8BM;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;ACbV;EDWM;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI;;;EAFJ;IAEI","file":"styles.css"} \ No newline at end of file diff --git a/src/docs/styles/styles.scss b/src/docs/styles/styles.scss index 3d090873c..a17821344 100644 --- a/src/docs/styles/styles.scss +++ b/src/docs/styles/styles.scss @@ -60,4 +60,74 @@ section h2 { max-height: initial; overflow-y: initial; } +} + +@media (prefers-color-scheme: dark) { + $dark-background: #171717; + $dark-font:#e3e3e3; + $dark-background-alt: #2d2d2d; + $dark-font-alt: #4db2ff; + + body, .form-control { + background-color: $dark-background; + color: $dark-font; + } + + a, .show-code, .nav-link { + color: $dark-font-alt; + } + + .bd-links .btn, .bd-links .btn[aria-expanded=true], .bd-links .active, .bd-links a, .bd-footer a, .bd-masthead .lead, + .table > :not(caption) > * > * { + color: $dark-font; + } + + .bd-links a:hover, .bd-links a:focus, .bd-links .btn:hover, .bd-links .btn:focus, .input-group-text, .form-control:disabled, .form-control[readonly] { + background-color: $dark-background-alt; + color: $dark-font; + } + + .input-group-text { + border-color: $dark-background-alt; + } + + .bd-links .btn:focus { + box-shadow: 0 0 0 1px rgb(0 0 0 / 5%); + } + + .form-control { + border-color: rgb(60, 65, 68); + } + + .bd-subnavbar { + background-color: rgba(24, 26, 27, 0.95); + box-shadow: rgb(0 0 0 / 5%) 0 0.5rem 1rem, rgb(0 0 0 / 15%) 0px -1px 0px inset; + } + + .btn { + color: $dark-font; + + &:hover { + color: $dark-font; + } + } + + .bd-links .btn::before { + content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28227, 227, 227,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); + } + + .bg-light, .text-muted, .table-striped > tbody > tr:nth-of-type(odd) > *, .nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { + background-color: $dark-background-alt !important; + color: $dark-font !important; + } + + .nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { + border-color: rgb(56, 61, 63) rgb(56, 61, 63) rgb(48, 52, 54); + } + + .btn-bd-download:hover, .btn-bd-download:active { + color: rgb(205, 200, 194); + background-color: rgb(125, 97, 0); + border-color: rgb(139, 108, 0); + } } \ No newline at end of file diff --git a/src/docs/templates/index.html b/src/docs/templates/index.html index 82aa719cd..2dfa393df 100644 --- a/src/docs/templates/index.html +++ b/src/docs/templates/index.html @@ -16,11 +16,9 @@

Powerful and robust date and time picker

Download

- Currently v6.0.0-beta2 + Currently v6.0.0-beta4 · v5 docs -

@@ -33,7 +31,7 @@

Powerful and robust date and time picker

- +

Installation

@@ -49,7 +47,7 @@

Installation

- +

jsDelivr

@@ -87,26 +85,26 @@

Get awesome Dashboard Templates

Creative Tim

@@ -117,7 +115,7 @@

Flatlogic

- \ No newline at end of file + diff --git a/src/docs/templates/page-template.html b/src/docs/templates/page-template.html index 1e867a9d2..64a4457de 100644 --- a/src/docs/templates/page-template.html +++ b/src/docs/templates/page-template.html @@ -21,6 +21,8 @@ class='d-inline-flex align-items-center rounded' aria-current='page'>Options
  • DateTime
  • +
  • Locales
  • @@ -38,6 +40,7 @@
  • Errors
  • Events
  • +
  • Unit
  • @@ -57,6 +60,22 @@ +
  • + + + +
  • @@ -75,4 +94,4 @@

    Introduction

    - \ No newline at end of file + diff --git a/src/docs/templates/shell.html b/src/docs/templates/shell.html index f4995084f..66bc184f2 100644 --- a/src/docs/templates/shell.html +++ b/src/docs/templates/shell.html @@ -67,7 +67,7 @@
    -
    Community
    - - - + + + + - - \ No newline at end of file + diff --git a/src/js/actions.ts b/src/js/actions.ts index b3d1a1218..5aa2eb0f9 100644 --- a/src/js/actions.ts +++ b/src/js/actions.ts @@ -1,17 +1,35 @@ -import { DatePickerModes } from './conts.js'; import { DateTime, Unit } from './datetime'; -import { TempusDominus } from './tempus-dominus'; import Collapse from './display/collapse'; -import Namespace from './namespace'; +import Namespace from './utilities/namespace'; +import { OptionsStore } from './utilities/options'; +import Dates from './dates'; +import Validation from './validation'; +import Display from './display'; +import { EventEmitters } from './utilities/event-emitter'; +import { serviceLocator } from './utilities/service-locator.js'; +import ActionTypes from './utilities/action-types'; +import CalendarModes from './utilities/calendar-modes'; /** * */ export default class Actions { - private _context: TempusDominus; + private optionsStore: OptionsStore; + private validation: Validation; + private dates: Dates; + private display: Display; + private _eventEmitters: EventEmitters; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); + this.display = serviceLocator.locate(Display); + this._eventEmitters = serviceLocator.locate(EventEmitters); + + this._eventEmitters.action.subscribe((result) => { + this.do(result.e, result.action); + }); } /** @@ -24,21 +42,17 @@ export default class Actions { if (currentTarget?.classList?.contains(Namespace.css.disabled)) return false; action = action || currentTarget?.dataset?.action; - const lastPicked = ( - this._context.dates.lastPicked || this._context._viewDate - ).clone; + const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate) + .clone; switch (action) { case ActionTypes.next: case ActionTypes.previous: this.handleNextPrevious(action); break; - case ActionTypes.pickerSwitch: - this._context._display._showMode(1); - this._context._viewUpdate( - DatePickerModes[this._context._currentViewMode].unit - ); - this._context._display._updateCalendarHeader(); + case ActionTypes.changeCalendarView: + this.display._showMode(1); + this.display._updateCalendarHeader(); break; case ActionTypes.selectMonth: case ActionTypes.selectYear: @@ -46,32 +60,31 @@ export default class Actions { const value = +currentTarget.dataset.value; switch (action) { case ActionTypes.selectMonth: - this._context._viewDate.month = value; - this._context._viewUpdate(Unit.month); + this.optionsStore.viewDate.month = value; break; case ActionTypes.selectYear: case ActionTypes.selectDecade: - this._context._viewDate.year = value; - this._context._viewUpdate(Unit.year); + this.optionsStore.viewDate.year = value; break; } if ( - this._context._currentViewMode === this._context._minViewModeNumber + this.optionsStore.currentCalendarViewMode === + this.optionsStore.minimumCalendarViewMode ) { - this._context.dates._setValue( - this._context._viewDate, - this._context.dates.lastPickedIndex + this.dates.setValue( + this.optionsStore.viewDate, + this.dates.lastPickedIndex ); - if (!this._context._options.display.inline) { - this._context._display.hide(); + if (!this.optionsStore.options.display.inline) { + this.display.hide(); } } else { - this._context._display._showMode(-1); + this.display._showMode(-1); } break; case ActionTypes.selectDay: - const day = this._context._viewDate.clone; + const day = this.optionsStore.viewDate.clone; if (currentTarget.classList.contains(Namespace.css.old)) { day.manipulate(-1, Unit.month); } @@ -81,67 +94,56 @@ export default class Actions { day.date = +currentTarget.dataset.day; let index = 0; - if (this._context._options.multipleDates) { - index = this._context.dates.pickedIndex(day, Unit.date); + if (this.optionsStore.options.multipleDates) { + index = this.dates.pickedIndex(day, Unit.date); if (index !== -1) { - this._context.dates._setValue(null, index); //deselect multi-date + this.dates.setValue(null, index); //deselect multi-date } else { - this._context.dates._setValue( - day, - this._context.dates.lastPickedIndex + 1 - ); + this.dates.setValue(day, this.dates.lastPickedIndex + 1); } } else { - this._context.dates._setValue( - day, - this._context.dates.lastPickedIndex - ); + this.dates.setValue(day, this.dates.lastPickedIndex); } if ( - !this._context._display._hasTime && - !this._context._options.display.keepOpen && - !this._context._options.display.inline && - !this._context._options.multipleDates + !this.display._hasTime && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline && + !this.optionsStore.options.multipleDates ) { - this._context._display.hide(); + this.display.hide(); } break; case ActionTypes.selectHour: let hour = +currentTarget.dataset.value; if ( lastPicked.hours >= 12 && - !this._context._options.display.components.useTwentyfourHour + !this.optionsStore.options.display.components.useTwentyfourHour ) hour += 12; lastPicked.hours = hour; - this._context.dates._setValue( - lastPicked, - this._context.dates.lastPickedIndex - ); + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); this.hideOrClock(e); break; case ActionTypes.selectMinute: lastPicked.minutes = +currentTarget.dataset.value; - this._context.dates._setValue( - lastPicked, - this._context.dates.lastPickedIndex - ); + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); this.hideOrClock(e); break; case ActionTypes.selectSecond: lastPicked.seconds = +currentTarget.dataset.value; - this._context.dates._setValue( - lastPicked, - this._context.dates.lastPickedIndex - ); + this.dates.setValue(lastPicked, this.dates.lastPickedIndex); this.hideOrClock(e); break; case ActionTypes.incrementHours: - this.manipulateAndSet(lastPicked, Unit.hours); + this.manipulateAndSet(lastPicked, Unit.hours); break; case ActionTypes.incrementMinutes: - this.manipulateAndSet(lastPicked, Unit.minutes, this._context._options.stepping); + this.manipulateAndSet( + lastPicked, + Unit.minutes, + this.optionsStore.options.stepping + ); break; case ActionTypes.incrementSeconds: this.manipulateAndSet(lastPicked, Unit.seconds); @@ -150,55 +152,64 @@ export default class Actions { this.manipulateAndSet(lastPicked, Unit.hours, -1); break; case ActionTypes.decrementMinutes: - this.manipulateAndSet(lastPicked, Unit.minutes, this._context._options.stepping * -1); + this.manipulateAndSet( + lastPicked, + Unit.minutes, + this.optionsStore.options.stepping * -1 + ); break; case ActionTypes.decrementSeconds: this.manipulateAndSet(lastPicked, Unit.seconds, -1); break; case ActionTypes.toggleMeridiem: - this.manipulateAndSet(lastPicked, + this.manipulateAndSet( + lastPicked, Unit.hours, - this._context.dates.lastPicked.hours >= 12 ? -12 : 12 + this.dates.lastPicked.hours >= 12 ? -12 : 12 ); break; case ActionTypes.togglePicker: if ( currentTarget.getAttribute('title') === - this._context._options.localization.selectDate + this.optionsStore.options.localization.selectDate ) { currentTarget.setAttribute( 'title', - this._context._options.localization.selectTime + this.optionsStore.options.localization.selectTime ); - currentTarget.innerHTML = this._context._display._iconTag( - this._context._options.display.icons.time + currentTarget.innerHTML = this.display._iconTag( + this.optionsStore.options.display.icons.time ).outerHTML; - this._context._display._updateCalendarHeader(); - } else { + this.display._updateCalendarHeader(); + this.optionsStore.refreshCurrentView(); + } + else { currentTarget.setAttribute( 'title', - this._context._options.localization.selectDate + this.optionsStore.options.localization.selectDate ); - currentTarget.innerHTML = this._context._display._iconTag( - this._context._options.display.icons.date + currentTarget.innerHTML = this.display._iconTag( + this.optionsStore.options.display.icons.date ).outerHTML; - if (this._context._display._hasTime) { + if (this.display._hasTime) { this.do(e, ActionTypes.showClock); - this._context._display._update('clock'); + this.display._update('clock'); } } - this._context._display.widget + this.display.widget .querySelectorAll( `.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}` ) .forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement)); + this._eventEmitters.viewUpdate.emit(); break; case ActionTypes.showClock: case ActionTypes.showHours: case ActionTypes.showMinutes: case ActionTypes.showSeconds: - this._context._display.widget + this.optionsStore.currentView = 'clock'; + this.display.widget .querySelectorAll(`.${Namespace.css.timeContainer} > div`) .forEach( (htmlElement: HTMLElement) => (htmlElement.style.display = 'none') @@ -208,71 +219,67 @@ export default class Actions { switch (action) { case ActionTypes.showClock: classToUse = Namespace.css.clockContainer; - this._context._display._update('clock'); + this.display._update('clock'); break; case ActionTypes.showHours: classToUse = Namespace.css.hourContainer; - this._context._display._update(Unit.hours); + this.display._update(Unit.hours); break; case ActionTypes.showMinutes: classToUse = Namespace.css.minuteContainer; - this._context._display._update(Unit.minutes); + this.display._update(Unit.minutes); break; case ActionTypes.showSeconds: classToUse = Namespace.css.secondContainer; - this._context._display._update(Unit.seconds); + this.display._update(Unit.seconds); break; } (( - this._context._display.widget.getElementsByClassName(classToUse)[0] + this.display.widget.getElementsByClassName(classToUse)[0] )).style.display = 'grid'; break; case ActionTypes.clear: - this._context.dates._setValue(null); - this._context._display._updateCalendarHeader(); + this.dates.setValue(null); + this.display._updateCalendarHeader(); break; case ActionTypes.close: - this._context._display.hide(); + this.display.hide(); break; case ActionTypes.today: const today = new DateTime().setLocale( - this._context._options.localization.locale + this.optionsStore.options.localization.locale ); - this._context._viewDate = today; - if (this._context._validation.isValid(today, Unit.date)) - this._context.dates._setValue( - today, - this._context.dates.lastPickedIndex - ); + this.optionsStore.viewDate = today; + if (this.validation.isValid(today, Unit.date)) + this.dates.setValue(today, this.dates.lastPickedIndex); break; } } private handleNextPrevious(action: ActionTypes) { - const { unit, step } = DatePickerModes[this._context._currentViewMode]; + const { unit, step } = + CalendarModes[this.optionsStore.currentCalendarViewMode]; if (action === ActionTypes.next) - this._context._viewDate.manipulate(step, unit); - else this._context._viewDate.manipulate(step * -1, unit); - this._context._viewUpdate(unit); + this.optionsStore.viewDate.manipulate(step, unit); + else this.optionsStore.viewDate.manipulate(step * -1, unit); + this._eventEmitters.viewUpdate.emit(); - this._context._display._showMode(); + this.display._showMode(); } /** - * Common function to manipulate {@link lastPicked} by `unit`. * After setting the value it will either show the clock or hide the widget. - * @param unit - * @param value Value to change by + * @param e */ private hideOrClock(e) { if ( - this._context._options.display.components.useTwentyfourHour && - !this._context._options.display.components.minutes && - !this._context._options.display.keepOpen && - !this._context._options.display.inline + this.optionsStore.options.display.components.useTwentyfourHour && + !this.optionsStore.options.display.components.minutes && + !this.optionsStore.options.display.keepOpen && + !this.optionsStore.options.display.inline ) { - this._context._display.hide(); + this.display.hide(); } else { this.do(e, ActionTypes.showClock); } @@ -280,44 +287,14 @@ export default class Actions { /** * Common function to manipulate {@link lastPicked} by `unit`. + * @param lastPicked * @param unit * @param value Value to change by */ private manipulateAndSet(lastPicked: DateTime, unit: Unit, value = 1) { const newDate = lastPicked.manipulate(value, unit); - if (this._context._validation.isValid(newDate, unit)) { - this._context.dates._setValue( - newDate, - this._context.dates.lastPickedIndex - ); + if (this.validation.isValid(newDate, unit)) { + this.dates.setValue(newDate, this.dates.lastPickedIndex); } } } - -export enum ActionTypes { - next = 'next', - previous = 'previous', - pickerSwitch = 'pickerSwitch', - selectMonth = 'selectMonth', - selectYear = 'selectYear', - selectDecade = 'selectDecade', - selectDay = 'selectDay', - selectHour = 'selectHour', - selectMinute = 'selectMinute', - selectSecond = 'selectSecond', - incrementHours = 'incrementHours', - incrementMinutes = 'incrementMinutes', - incrementSeconds = 'incrementSeconds', - decrementHours = 'decrementHours', - decrementMinutes = 'decrementMinutes', - decrementSeconds = 'decrementSeconds', - toggleMeridiem = 'toggleMeridiem', - togglePicker = 'togglePicker', - showClock = 'showClock', - showHours = 'showHours', - showMinutes = 'showMinutes', - showSeconds = 'showSeconds', - clear = 'clear', - close = 'close', - today = 'today', -} diff --git a/src/js/dates.ts b/src/js/dates.ts index 87c170dd7..e22ceb283 100644 --- a/src/js/dates.ts +++ b/src/js/dates.ts @@ -1,15 +1,21 @@ -import { TempusDominus } from './tempus-dominus'; -import { DateTime, Unit } from './datetime'; -import Namespace from './namespace'; -import { ChangeEvent, FailEvent } from './event-types'; -import { OptionConverter } from './options'; +import { DateTime, getFormatByUnit, Unit } from './datetime'; +import Namespace from './utilities/namespace'; +import { ChangeEvent, FailEvent } from './utilities/event-types'; +import { OptionConverter, OptionsStore } from './utilities/options'; +import Validation from './validation'; +import { serviceLocator } from './utilities/service-locator'; +import { EventEmitters } from './utilities/event-emitter'; export default class Dates { private _dates: DateTime[] = []; - private _context: TempusDominus; - - constructor(context: TempusDominus) { - this._context = context; + private optionsStore: OptionsStore; + private validation: Validation; + private _eventEmitters: EventEmitters; + + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this._eventEmitters = serviceLocator.locate(EventEmitters); } /** @@ -35,11 +41,26 @@ export default class Dates { } /** - * Adds a new DateTime to selected dates array + * Formats a DateTime object to a string. Used when setting the input value. * @param date */ - add(date: DateTime): void { - this._dates.push(date); + formatInput(date: DateTime): string { + const components = this.optionsStore.options.display.components; + if (!date) return ''; + return date.format({ + year: components.calendar && components.year ? 'numeric' : undefined, + month: components.calendar && components.month ? '2-digit' : undefined, + day: components.calendar && components.date ? '2-digit' : undefined, + hour: + components.clock && components.hours + ? components.useTwentyfourHour + ? '2-digit' + : 'numeric' + : undefined, + minute: components.clock && components.minutes ? '2-digit' : undefined, + second: components.clock && components.seconds ? '2-digit' : undefined, + hour12: !components.useTwentyfourHour, + }); } /** @@ -47,17 +68,27 @@ export default class Dates { * If value is null|undefined then clear the value of the provided index (or 0). * @param value Value to convert or null|undefined * @param index When using multidates this is the index in the array - * @param from Used in the warning message, useful for debugging. */ - set(value: any, index?: number, from: string = 'date.set') { - if (!value) this._setValue(value, index); - const converted = OptionConverter._dateConversion(value, from); + setFromInput(value: any, index?: number) { + if (!value) { + this.setValue(undefined, index); + return; + } + const converted = OptionConverter.dateConversion(value, 'input'); if (converted) { - converted.setLocale(this._context._options.localization.locale); - this._setValue(converted, index); + converted.setLocale(this.optionsStore.options.localization.locale); + this.setValue(converted, index); } } + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date: DateTime): void { + this._dates.push(date); + } + /** * Returns true if the `targetDate` is part of the selected dates array. * If `unit` is provided then a granularity to that unit will be used. @@ -67,7 +98,7 @@ export default class Dates { isPicked(targetDate: DateTime, unit?: Unit): boolean { if (!unit) return this._dates.find((x) => x === targetDate) !== undefined; - const format = Dates.getFormatByUnit(unit); + const format = getFormatByUnit(unit); let innerDateFormatted = targetDate.format(format); @@ -88,7 +119,7 @@ export default class Dates { pickedIndex(targetDate: DateTime, unit?: Unit): number { if (!unit) return this._dates.indexOf(targetDate); - const format = Dates.getFormatByUnit(unit); + const format = getFormatByUnit(unit); let innerDateFormatted = targetDate.format(format); @@ -99,8 +130,8 @@ export default class Dates { * Clears all selected dates. */ clear() { - this._context._unset = true; - this._context._triggerEvent({ + this.optionsStore.unset = true; + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: undefined, oldDate: this.lastPicked, @@ -127,7 +158,7 @@ export default class Dates { } /** - * Do not use direectly. Attempts to either clear or set the `target` date at `index`. + * Attempts to either clear or set the `target` date at `index`. * If the `target` is null then the date will be cleared. * If multi-date is being used then it will be removed from the array. * If `target` is valid and multi-date is used then if `index` is @@ -135,30 +166,25 @@ export default class Dates { * @param target * @param index */ - _setValue(target?: DateTime, index?: number): void { + setValue(target?: DateTime, index?: number): void { const noIndex = typeof index === 'undefined', isClear = !target && noIndex; - let oldDate = this._context._unset ? null : this._dates[index]; - if (!oldDate && !this._context._unset && noIndex && isClear) { + let oldDate = this.optionsStore.unset ? null : this._dates[index]; + if (!oldDate && !this.optionsStore.unset && noIndex && isClear) { oldDate = this.lastPicked; } const updateInput = () => { - if (!this._context._input) return; + if (!this.optionsStore.input) return; - let newValue = this._context._options.hooks.inputFormat( - this._context, - target - ); - if (this._context._options.multipleDates) { + let newValue = this.formatInput(target); + if (this.optionsStore.options.multipleDates) { newValue = this._dates - .map((d) => - this._context._options.hooks.inputFormat(this._context, d) - ) - .join(this._context._options.multipleDatesSeparator); + .map((d) => this.formatInput(d)) + .join(this.optionsStore.options.multipleDatesSeparator); } - if (this._context._input.value != newValue) - this._context._input.value = newValue; + if (this.optionsStore.input.value != newValue) + this.optionsStore.input.value = newValue; }; if (target && oldDate?.isSame(target)) { @@ -169,16 +195,17 @@ export default class Dates { // case of calling setValue(null) if (!target) { if ( - !this._context._options.multipleDates || + !this.optionsStore.options.multipleDates || this._dates.length === 1 || isClear ) { - this._context._unset = true; + this.optionsStore.unset = true; this._dates = []; } else { this._dates.splice(index, 1); } - this._context._triggerEvent({ + + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: undefined, oldDate, @@ -187,7 +214,7 @@ export default class Dates { } as ChangeEvent); updateInput(); - this._context._display._update('all'); + this._eventEmitters.updateDisplay.emit('all'); return; } @@ -195,22 +222,22 @@ export default class Dates { target = target.clone; // minute stepping is being used, force the minute to the closest value - if (this._context._options.stepping !== 1) { + if (this.optionsStore.options.stepping !== 1) { target.minutes = - Math.round(target.minutes / this._context._options.stepping) * - this._context._options.stepping; + Math.round(target.minutes / this.optionsStore.options.stepping) * + this.optionsStore.options.stepping; target.seconds = 0; } - if (this._context._validation.isValid(target)) { + if (this.validation.isValid(target)) { this._dates[index] = target; - this._context._viewDate = target.clone; + this.optionsStore.viewDate = target.clone; updateInput(); - this._context._unset = false; - this._context._display._update('all'); - this._context._triggerEvent({ + this.optionsStore.unset = false; + this._eventEmitters.updateDisplay.emit('all'); + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: target, oldDate, @@ -220,13 +247,13 @@ export default class Dates { return; } - if (this._context._options.keepInvalid) { + if (this.optionsStore.options.keepInvalid) { this._dates[index] = target; - this._context._viewDate = target.clone; + this.optionsStore.viewDate = target.clone; updateInput(); - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.change, date: target, oldDate, @@ -234,29 +261,11 @@ export default class Dates { isValid: false, } as ChangeEvent); } - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.error, reason: Namespace.errorMessages.failedToSetInvalidDate, date: target, oldDate, } as FailEvent); } - - /** - * Returns a format object based on the granularity of `unit` - * @param unit - */ - static getFormatByUnit(unit: Unit): object { - switch (unit) { - case 'date': - return { dateStyle: 'short' }; - case 'month': - return { - month: 'numeric', - year: 'numeric', - }; - case 'year': - return { year: 'numeric' }; - } - } } diff --git a/src/js/datetime.ts b/src/js/datetime.ts index 80050bb9d..fe58e8358 100644 --- a/src/js/datetime.ts +++ b/src/js/datetime.ts @@ -13,6 +13,20 @@ export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { numberingSystem?: string; } +export const getFormatByUnit = (unit: Unit): object => { + switch (unit) { + case 'date': + return { dateStyle: 'short' }; + case 'month': + return { + month: 'numeric', + year: 'numeric' + }; + case 'year': + return { year: 'numeric' }; + } +}; + /** * For the most part this object behaves exactly the same way * as the native Date object with a little extra spice. @@ -38,7 +52,7 @@ export class DateTime extends Date { * @param date */ static convert(date: Date, locale: string = 'default'): DateTime { - if (!date) throw `A date is required`; + if (!date) throw new Error(`A date is required`); return new DateTime( date.getFullYear(), date.getMonth(), @@ -73,7 +87,7 @@ export class DateTime extends Date { * @param startOfTheWeek Allows for the changing the start of the week. */ startOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this { - if (this[unit] === undefined) throw `Unit '${unit}' is not valid`; + if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`); switch (unit) { case 'seconds': this.setMilliseconds(0); @@ -89,7 +103,10 @@ export class DateTime extends Date { break; case 'weekDay': this.startOf(Unit.date); - this.manipulate(startOfTheWeek - this.weekDay, Unit.date); + if (this.weekDay === startOfTheWeek) break; + let goBack = this.weekDay; + if (startOfTheWeek !== 0 && this.weekDay === 0) goBack = 8 - startOfTheWeek; + this.manipulate(startOfTheWeek - goBack, Unit.date); break; case 'month': this.startOf(Unit.date); @@ -109,8 +126,8 @@ export class DateTime extends Date { * would return April 30, 2021, 11:59:59.999 PM * @param unit */ - endOf(unit: Unit | 'weekDay'): this { - if (this[unit] === undefined) throw `Unit '${unit}' is not valid`; + endOf(unit: Unit | 'weekDay', startOfTheWeek = 0): this { + if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`); switch (unit) { case 'seconds': this.setMilliseconds(999); @@ -125,8 +142,8 @@ export class DateTime extends Date { this.setHours(23, 59, 59, 999); break; case 'weekDay': - this.startOf(Unit.date); - this.manipulate(6 - this.weekDay, Unit.date); + this.endOf(Unit.date); + this.manipulate((6 + startOfTheWeek) - this.weekDay, Unit.date); break; case 'month': this.endOf(Unit.date); @@ -150,7 +167,7 @@ export class DateTime extends Date { * @param unit */ manipulate(value: number, unit: Unit): this { - if (this[unit] === undefined) throw `Unit '${unit}' is not valid`; + if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`); this[unit] += value; return this; } @@ -174,7 +191,7 @@ export class DateTime extends Date { */ isBefore(compare: DateTime, unit?: Unit): boolean { if (!unit) return this.valueOf() < compare.valueOf(); - if (this[unit] === undefined) throw `Unit '${unit}' is not valid`; + if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`); return ( this.clone.startOf(unit).valueOf() < compare.clone.startOf(unit).valueOf() ); @@ -188,7 +205,7 @@ export class DateTime extends Date { */ isAfter(compare: DateTime, unit?: Unit): boolean { if (!unit) return this.valueOf() > compare.valueOf(); - if (this[unit] === undefined) throw `Unit '${unit}' is not valid`; + if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`); return ( this.clone.startOf(unit).valueOf() > compare.clone.startOf(unit).valueOf() ); @@ -202,7 +219,7 @@ export class DateTime extends Date { */ isSame(compare: DateTime, unit?: Unit): boolean { if (!unit) return this.valueOf() === compare.valueOf(); - if (this[unit] === undefined) throw `Unit '${unit}' is not valid`; + if (this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`); compare = DateTime.convert(compare); return ( this.clone.startOf(unit).valueOf() === compare.startOf(unit).valueOf() @@ -223,20 +240,20 @@ export class DateTime extends Date { unit?: Unit, inclusivity: '()' | '[]' | '(]' | '[)' = '()' ): boolean { - if (unit && this[unit] === undefined) throw `Unit '${unit}' is not valid`; + if (unit && this[unit] === undefined) throw new Error(`Unit '${unit}' is not valid`); const leftInclusivity = inclusivity[0] === '('; const rightInclusivity = inclusivity[1] === ')'; return ( ((leftInclusivity - ? this.isAfter(left, unit) - : !this.isBefore(left, unit)) && + ? this.isAfter(left, unit) + : !this.isBefore(left, unit)) && (rightInclusivity ? this.isBefore(right, unit) : !this.isAfter(right, unit))) || ((leftInclusivity - ? this.isBefore(left, unit) - : !this.isAfter(left, unit)) && + ? this.isBefore(left, unit) + : !this.isAfter(left, unit)) && (rightInclusivity ? this.isAfter(right, unit) : !this.isBefore(right, unit))) @@ -343,7 +360,7 @@ export class DateTime extends Date { meridiem(locale: string = this.locale): string { return new Intl.DateTimeFormat(locale, { hour: 'numeric', - hour12: true, + hour12: true } as any) .formatToParts(this) .find((p) => p.type === 'dayPeriod')?.value; @@ -388,6 +405,12 @@ export class DateTime extends Date { * Shortcut to Date.setMonth() */ set month(value: number) { + const targetMonth = new Date(this.year, value + 1); + targetMonth.setDate(0); + const endOfMonth = targetMonth.getDate(); + if (this.date > endOfMonth) { + this.date = endOfMonth; + } this.setMonth(value); } @@ -423,8 +446,8 @@ export class DateTime extends Date { let weekNumber = Math.floor((ordinal - weekday + 10) / 7); if (weekNumber < 1) { - weekNumber = this.weeksInWeekYear( this.year - 1); - } else if (weekNumber > this. weeksInWeekYear(this.year)) { + weekNumber = this.weeksInWeekYear(this.year - 1); + } else if (weekNumber > this.weeksInWeekYear(this.year)) { weekNumber = 1; } diff --git a/src/js/display/calendar/date-display.ts b/src/js/display/calendar/date-display.ts index 46a9edf23..643f04a8f 100644 --- a/src/js/display/calendar/date-display.ts +++ b/src/js/display/calendar/date-display.ts @@ -1,29 +1,37 @@ -import { TempusDominus } from '../../tempus-dominus'; import { DateTime, Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import Dates from '../../dates'; +import { Paint } from '../index'; +import { serviceLocator } from '../../utilities/service-locator'; +import ActionTypes from '../../utilities/action-types'; /** * Creates and updates the grid for `date` */ export default class DateDisplay { - private _context: TempusDominus; - - constructor(context: TempusDominus) { - this._context = context; + private optionsStore: OptionsStore; + private dates: Dates; + private validation: Validation; + + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker(): HTMLElement { + getPicker(): HTMLElement { const container = document.createElement('div'); container.classList.add(Namespace.css.daysContainer); container.append(...this._daysOfTheWeek()); - if (this._context._options.display.calendarWeeks) { + if (this.optionsStore.options.display.calendarWeeks) { const div = document.createElement('div'); div.classList.add(Namespace.css.calendarWeeks, Namespace.css.noHighlight); container.appendChild(div); @@ -31,7 +39,7 @@ export default class DateDisplay { for (let i = 0; i < 42; i++) { if (i !== 0 && i % 7 === 0) { - if (this._context._options.display.calendarWeeks) { + if (this.optionsStore.options.display.calendarWeeks) { const div = document.createElement('div'); div.classList.add( Namespace.css.calendarWeeks, @@ -53,8 +61,8 @@ export default class DateDisplay { * Populates the grid and updates enabled states * @private */ - _update(): void { - const container = this._context._display.widget.getElementsByClassName( + _update(widget: HTMLElement, paint: Paint): void { + const container = widget.getElementsByClassName( Namespace.css.daysContainer )[0]; const [previous, switcher, next] = container.parentElement @@ -63,37 +71,37 @@ export default class DateDisplay { switcher.setAttribute( Namespace.css.daysContainer, - this._context._viewDate.format( - this._context._options.localization.dayViewHeaderFormat + this.optionsStore.viewDate.format( + this.optionsStore.options.localization.dayViewHeaderFormat ) ); - this._context._validation.isValid( - this._context._viewDate.clone.manipulate(-1, Unit.month), + this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(-1, Unit.month), Unit.month ) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid( - this._context._viewDate.clone.manipulate(1, Unit.month), + this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(1, Unit.month), Unit.month ) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone + let innerDate = this.optionsStore.viewDate.clone .startOf(Unit.month) - .startOf('weekDay', this._context._options.localization.startOfTheWeek) + .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek) .manipulate(12, Unit.hours); container .querySelectorAll( `[data-action="${ActionTypes.selectDay}"], .${Namespace.css.calendarWeeks}` ) - .forEach((containerClone: HTMLElement, index) => { + .forEach((containerClone: HTMLElement) => { if ( - this._context._options.display.calendarWeeks && + this.optionsStore.options.display.calendarWeeks && containerClone.classList.contains(Namespace.css.calendarWeeks) ) { if (containerClone.innerText === '#') return; @@ -101,23 +109,23 @@ export default class DateDisplay { return; } - let classes = []; + let classes: string[] = []; classes.push(Namespace.css.day); - if (innerDate.isBefore(this._context._viewDate, Unit.month)) { + if (innerDate.isBefore(this.optionsStore.viewDate, Unit.month)) { classes.push(Namespace.css.old); } - if (innerDate.isAfter(this._context._viewDate, Unit.month)) { + if (innerDate.isAfter(this.optionsStore.viewDate, Unit.month)) { classes.push(Namespace.css.new); } if ( - !this._context._unset && - this._context.dates.isPicked(innerDate, Unit.date) + !this.optionsStore.unset && + this.dates.isPicked(innerDate, Unit.date) ) { classes.push(Namespace.css.active); } - if (!this._context._validation.isValid(innerDate, Unit.date)) { + if (!this.validation.isValid(innerDate, Unit.date)) { classes.push(Namespace.css.disabled); } if (innerDate.isSame(new DateTime(), Unit.date)) { @@ -127,6 +135,8 @@ export default class DateDisplay { classes.push(Namespace.css.weekend); } + paint(Unit.date, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute( @@ -144,13 +154,13 @@ export default class DateDisplay { * @private */ private _daysOfTheWeek(): HTMLElement[] { - let innerDate = this._context._viewDate.clone - .startOf('weekDay', this._context._options.localization.startOfTheWeek) + let innerDate = this.optionsStore.viewDate.clone + .startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek) .startOf(Unit.date); const row = []; document.createElement('div'); - if (this._context._options.display.calendarWeeks) { + if (this.optionsStore.options.display.calendarWeeks) { const htmlDivElement = document.createElement('div'); htmlDivElement.classList.add( Namespace.css.calendarWeeks, diff --git a/src/js/display/calendar/decade-display.ts b/src/js/display/calendar/decade-display.ts index 7fef3fb25..536689283 100644 --- a/src/js/display/calendar/decade-display.ts +++ b/src/js/display/calendar/decade-display.ts @@ -1,26 +1,33 @@ -import { TempusDominus } from '../../tempus-dominus'; import Dates from '../../dates'; import { DateTime, Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import { Paint } from '../index'; +import { serviceLocator } from '../../utilities/service-locator'; +import ActionTypes from '../../utilities/action-types'; /** * Creates and updates the grid for `seconds` */ export default class DecadeDisplay { - private _context: TempusDominus; private _startDecade: DateTime; private _endDecade: DateTime; + private optionsStore: OptionsStore; + private dates: Dates; + private validation: Validation; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the display * @private */ - get _picker() { + getPicker() { const container = document.createElement('div'); container.classList.add(Namespace.css.decadesContainer); @@ -36,17 +43,17 @@ export default class DecadeDisplay { * Populates the grid and updates enabled states * @private */ - _update() { + _update(widget: HTMLElement, paint: Paint) { const [start, end] = Dates.getStartEndYear( 100, - this._context._viewDate.year + this.optionsStore.viewDate.year ); - this._startDecade = this._context._viewDate.clone.startOf(Unit.year); + this._startDecade = this.optionsStore.viewDate.clone.startOf(Unit.year); this._startDecade.year = start; - this._endDecade = this._context._viewDate.clone.startOf(Unit.year); + this._endDecade = this.optionsStore.viewDate.clone.startOf(Unit.year); this._endDecade.year = end; - const container = this._context._display.widget.getElementsByClassName( + const container = widget.getElementsByClassName( Namespace.css.decadesContainer )[0]; const [previous, switcher, next] = container.parentElement @@ -58,14 +65,14 @@ export default class DecadeDisplay { `${this._startDecade.format({ year: 'numeric' })}-${this._endDecade.format({ year: 'numeric' })}` ); - this._context._validation.isValid(this._startDecade, Unit.year) + this.validation.isValid(this._startDecade, Unit.year) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._endDecade, Unit.year) + this.validation.isValid(this._endDecade, Unit.year) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - const pickedYears = this._context.dates.picked.map((x) => x.year); + const pickedYears = this.dates.picked.map((x) => x.year); container .querySelectorAll(`[data-action="${ActionTypes.selectDecade}"]`) @@ -94,13 +101,15 @@ export default class DecadeDisplay { const endDecadeYear = this._startDecade.year + 9; if ( - !this._context._unset && + !this.optionsStore.unset && pickedYears.filter((x) => x >= startDecadeYear && x <= endDecadeYear) .length > 0 ) { classes.push(Namespace.css.active); } + paint('decade', this._startDecade, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute( diff --git a/src/js/display/calendar/month-display.ts b/src/js/display/calendar/month-display.ts index d4a60141a..2a90aae14 100644 --- a/src/js/display/calendar/month-display.ts +++ b/src/js/display/calendar/month-display.ts @@ -1,23 +1,30 @@ -import { TempusDominus } from '../../tempus-dominus'; import { Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import Dates from '../../dates'; +import { Paint } from '../index'; +import { serviceLocator } from '../../utilities/service-locator'; +import ActionTypes from '../../utilities/action-types'; /** * Creates and updates the grid for `month` */ export default class MonthDisplay { - private _context: TempusDominus; + private optionsStore: OptionsStore; + private dates: Dates; + private validation: Validation; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } - /** * Build the container html for the display * @private */ - get _picker(): HTMLElement { + getPicker(): HTMLElement { const container = document.createElement('div'); container.classList.add(Namespace.css.monthsContainer); @@ -34,8 +41,8 @@ export default class MonthDisplay { * Populates the grid and updates enabled states * @private */ - _update(): void { - const container = this._context._display.widget.getElementsByClassName( + _update(widget: HTMLElement, paint: Paint): void { + const container = widget.getElementsByClassName( Namespace.css.monthsContainer )[0]; const [previous, switcher, next] = container.parentElement @@ -44,24 +51,24 @@ export default class MonthDisplay { switcher.setAttribute( Namespace.css.monthsContainer, - this._context._viewDate.format({ year: 'numeric' }) + this.optionsStore.viewDate.format({ year: 'numeric' }) ); - this._context._validation.isValid( - this._context._viewDate.clone.manipulate(-1, Unit.year), + this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(-1, Unit.year), Unit.year ) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid( - this._context._viewDate.clone.manipulate(1, Unit.year), + this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(1, Unit.year), Unit.year ) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone.startOf(Unit.year); + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year); container .querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`) @@ -70,15 +77,17 @@ export default class MonthDisplay { classes.push(Namespace.css.month); if ( - !this._context._unset && - this._context.dates.isPicked(innerDate, Unit.month) + !this.optionsStore.unset && + this.dates.isPicked(innerDate, Unit.month) ) { classes.push(Namespace.css.active); } - if (!this._context._validation.isValid(innerDate, Unit.month)) { + if (!this.validation.isValid(innerDate, Unit.month)) { classes.push(Namespace.css.disabled); } + paint(Unit.month, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${index}`); diff --git a/src/js/display/calendar/year-display.ts b/src/js/display/calendar/year-display.ts index 06265e6c8..2567c115c 100644 --- a/src/js/display/calendar/year-display.ts +++ b/src/js/display/calendar/year-display.ts @@ -1,26 +1,32 @@ -import { TempusDominus } from '../../tempus-dominus'; import { DateTime, Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; import Dates from '../../dates'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import { Paint } from '../index'; +import { serviceLocator } from '../../utilities/service-locator'; +import ActionTypes from '../../utilities/action-types'; /** * Creates and updates the grid for `year` */ export default class YearDisplay { - private _context: TempusDominus; private _startYear: DateTime; private _endYear: DateTime; + private optionsStore: OptionsStore; + private dates: Dates; + private validation: Validation; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } - /** * Build the container html for the display * @private */ - get _picker(): HTMLElement { + getPicker(): HTMLElement { const container = document.createElement('div'); container.classList.add(Namespace.css.yearsContainer); @@ -37,15 +43,11 @@ export default class YearDisplay { * Populates the grid and updates enabled states * @private */ - _update() { - const [start, end] = Dates.getStartEndYear( - 10, - this._context._viewDate.year - ); - this._startYear = this._context._viewDate.clone.manipulate(-1, Unit.year); - this._endYear = this._context._viewDate.clone.manipulate(10, Unit.year); + _update(widget: HTMLElement, paint: Paint) { + this._startYear = this.optionsStore.viewDate.clone.manipulate(-1, Unit.year); + this._endYear = this.optionsStore.viewDate.clone.manipulate(10, Unit.year); - const container = this._context._display.widget.getElementsByClassName( + const container = widget.getElementsByClassName( Namespace.css.yearsContainer )[0]; const [previous, switcher, next] = container.parentElement @@ -57,33 +59,35 @@ export default class YearDisplay { `${this._startYear.format({ year: 'numeric' })}-${this._endYear.format({ year: 'numeric' })}` ); - this._context._validation.isValid(this._startYear, Unit.year) + this.validation.isValid(this._startYear, Unit.year) ? previous.classList.remove(Namespace.css.disabled) : previous.classList.add(Namespace.css.disabled); - this._context._validation.isValid(this._endYear, Unit.year) + this.validation.isValid(this._endYear, Unit.year) ? next.classList.remove(Namespace.css.disabled) : next.classList.add(Namespace.css.disabled); - let innerDate = this._context._viewDate.clone + let innerDate = this.optionsStore.viewDate.clone .startOf(Unit.year) .manipulate(-1, Unit.year); container .querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`) - .forEach((containerClone: HTMLElement, index) => { + .forEach((containerClone: HTMLElement) => { let classes = []; classes.push(Namespace.css.year); if ( - !this._context._unset && - this._context.dates.isPicked(innerDate, Unit.year) + !this.optionsStore.unset && + this.dates.isPicked(innerDate, Unit.year) ) { classes.push(Namespace.css.active); } - if (!this._context._validation.isValid(innerDate, Unit.year)) { + if (!this.validation.isValid(innerDate, Unit.year)) { classes.push(Namespace.css.disabled); } + paint(Unit.year, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.year}`); diff --git a/src/js/display/collapse.ts b/src/js/display/collapse.ts index 8aa4837eb..b4bda3f4d 100644 --- a/src/js/display/collapse.ts +++ b/src/js/display/collapse.ts @@ -1,4 +1,4 @@ -import Namespace from '../namespace'; +import Namespace from '../utilities/namespace'; /** * Provides a collapse functionality to the view changes diff --git a/src/js/display/index.ts b/src/js/display/index.ts index 3fbd50cd8..fc4c2553b 100644 --- a/src/js/display/index.ts +++ b/src/js/display/index.ts @@ -7,43 +7,58 @@ import HourDisplay from './time/hour-display'; import MinuteDisplay from './time/minute-display'; import SecondDisplay from './time/second-display'; import { DateTime, Unit } from '../datetime'; -import { DatePickerModes } from '../conts'; -import { TempusDominus } from '../tempus-dominus'; -import { ActionTypes } from '../actions'; import { createPopper } from '@popperjs/core'; -import Namespace from '../namespace'; -import { HideEvent } from '../event-types'; +import Namespace from '../utilities/namespace'; +import { HideEvent } from '../utilities/event-types'; import Collapse from './collapse'; +import { OptionsStore } from '../utilities/options'; +import Validation from '../validation'; +import Dates from '../dates'; +import { EventEmitters, ViewUpdateValues } from '../utilities/event-emitter'; +import { serviceLocator } from '../utilities/service-locator'; +import ActionTypes from '../utilities/action-types'; +import CalendarModes from '../utilities/calendar-modes'; /** * Main class for all things display related. */ export default class Display { - private _context: TempusDominus; - private _dateDisplay: DateDisplay; - private _monthDisplay: MonthDisplay; - private _yearDisplay: YearDisplay; - private _decadeDisplay: DecadeDisplay; - private _timeDisplay: TimeDisplay; private _widget: HTMLElement; - private _hourDisplay: HourDisplay; - private _minuteDisplay: MinuteDisplay; - private _secondDisplay: SecondDisplay; private _popperInstance: any; private _isVisible = false; - - constructor(context: TempusDominus) { - this._context = context; - this._dateDisplay = new DateDisplay(context); - this._monthDisplay = new MonthDisplay(context); - this._yearDisplay = new YearDisplay(context); - this._decadeDisplay = new DecadeDisplay(context); - this._timeDisplay = new TimeDisplay(context); - this._hourDisplay = new HourDisplay(context); - this._minuteDisplay = new MinuteDisplay(context); - this._secondDisplay = new SecondDisplay(context); - + private optionsStore: OptionsStore; + private validation: Validation; + private dates: Dates; + + dateDisplay: DateDisplay; + monthDisplay: MonthDisplay; + yearDisplay: YearDisplay; + decadeDisplay: DecadeDisplay; + timeDisplay: TimeDisplay; + hourDisplay: HourDisplay; + minuteDisplay: MinuteDisplay; + secondDisplay: SecondDisplay; + private _eventEmitters: EventEmitters; + + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); + this.dates = serviceLocator.locate(Dates); + + this.dateDisplay = serviceLocator.locate(DateDisplay); + this.monthDisplay = serviceLocator.locate(MonthDisplay); + this.yearDisplay = serviceLocator.locate(YearDisplay); + this.decadeDisplay = serviceLocator.locate(DecadeDisplay); + this.timeDisplay = serviceLocator.locate(TimeDisplay); + this.hourDisplay = serviceLocator.locate(HourDisplay); + this.minuteDisplay = serviceLocator.locate(MinuteDisplay); + this.secondDisplay = serviceLocator.locate(SecondDisplay); + this._eventEmitters = serviceLocator.locate(EventEmitters); this._widget = undefined; + + this._eventEmitters.updateDisplay.subscribe((result: ViewUpdateValues) => { + this._update(result); + }); } /** @@ -67,31 +82,31 @@ export default class Display { * @param unit * @private */ - _update(unit: Unit | 'clock' | 'calendar' | 'all'): void { + _update(unit: ViewUpdateValues): void { if (!this.widget) return; //todo do I want some kind of error catching or other guards here? switch (unit) { case Unit.seconds: - this._secondDisplay._update(); + this.secondDisplay._update(this.widget, this.paint); break; case Unit.minutes: - this._minuteDisplay._update(); + this.minuteDisplay._update(this.widget, this.paint); break; case Unit.hours: - this._hourDisplay._update(); + this.hourDisplay._update(this.widget, this.paint); break; case Unit.date: - this._dateDisplay._update(); + this.dateDisplay._update(this.widget, this.paint); break; case Unit.month: - this._monthDisplay._update(); + this.monthDisplay._update(this.widget, this.paint); break; case Unit.year: - this._yearDisplay._update(); + this.yearDisplay._update(this.widget, this.paint); break; case 'clock': if (!this._hasTime) break; - this._timeDisplay._update(); + this.timeDisplay._update(this.widget); this._update(Unit.hours); this._update(Unit.minutes); this._update(Unit.seconds); @@ -100,7 +115,7 @@ export default class Display { this._update(Unit.date); this._update(Unit.year); this._update(Unit.month); - this._decadeDisplay._update(); + this.decadeDisplay._update(this.widget, this.paint); this._updateCalendarHeader(); break; case 'all': @@ -113,6 +128,18 @@ export default class Display { } } + // noinspection JSUnusedLocalSymbols + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit: Unit | 'decade', _date: DateTime, _classes: string[], _element: HTMLElement) { + // implemented in plugin + } + /** * Shows the picker and creates a Popper instance if needed. * Add document click event to hide when clicking outside the picker. @@ -120,32 +147,32 @@ export default class Display { */ show(): void { if (this.widget == undefined) { - if ( - this._context._options.useCurrent && - !this._context._options.defaultDate && - !this._context._input?.value - ) { - //todo in the td4 branch a pr changed this to allow granularity - const date = new DateTime().setLocale( - this._context._options.localization.locale - ); - if (!this._context._options.keepInvalid) { - let tries = 0; - let direction = 1; - if (this._context._options.restrictions.maxDate?.isBefore(date)) { - direction = -1; + if (this.dates.picked.length == 0) { + if ( + this.optionsStore.options.useCurrent && + !this.optionsStore.options.defaultDate + ) { + const date = new DateTime().setLocale( + this.optionsStore.options.localization.locale + ); + if (!this.optionsStore.options.keepInvalid) { + let tries = 0; + let direction = 1; + if (this.optionsStore.options.restrictions.maxDate?.isBefore(date)) { + direction = -1; + } + while (!this.validation.isValid(date)) { + date.manipulate(direction, Unit.date); + if (tries > 31) break; + tries++; + } + } + this.dates.setValue(date); } - while (!this._context._validation.isValid(date)) { - date.manipulate(direction, Unit.date); - if (tries > 31) break; - tries++; + + if (this.optionsStore.options.defaultDate) { + this.dates.setValue(this.optionsStore.options.defaultDate); } - } - this._context.dates._setValue(date); - } - - if (this._context._options.defaultDate) { - this._context.dates._setValue(this._context._options.defaultDate); } this._buildWidget(); @@ -155,30 +182,41 @@ export default class Display { // reset the view to the clock if there's no date components if (onlyClock) { - this._context._action.do(null, ActionTypes.showClock); + this.optionsStore.currentView = 'clock'; + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes.showClock, + }); } // otherwise return to the calendar view - this._context._currentViewMode = this._context._minViewModeNumber; + if (!this.optionsStore.currentCalendarViewMode) { + this.optionsStore.currentCalendarViewMode = + this.optionsStore.minimumCalendarViewMode; + } if (!onlyClock) { if (this._hasTime) { - Collapse.hide(this._context._display.widget.querySelector(`div.${Namespace.css.timeContainer}`)); + Collapse.hide( + this.widget.querySelector(`div.${Namespace.css.timeContainer}`) + ); } - Collapse.show(this._context._display.widget.querySelector(`div.${Namespace.css.dateContainer}`)); + Collapse.show( + this.widget.querySelector(`div.${Namespace.css.dateContainer}`) + ); } if (this._hasDate) { this._showMode(); } - if (!this._context._options.display.inline) { + if (!this.optionsStore.options.display.inline) { // If needed to change the parent container - const container = this._context._options?.container || document.body; + const container = this.optionsStore.options?.container || document.body; container.appendChild(this.widget); this._popperInstance = createPopper( - this._context._element, + this.optionsStore.element, this.widget, { modifiers: [{ name: 'eventListeners', enabled: true }], @@ -186,15 +224,18 @@ export default class Display { placement: document.documentElement.dir === 'rtl' ? 'bottom-end' - : 'bottom-start' + : 'bottom-start', } ); } else { - this._context._element.appendChild(this.widget); + this.optionsStore.element.appendChild(this.widget); } - if (this._context._options.display.viewMode == 'clock') { - this._context._action.do(null, ActionTypes.showClock); + if (this.optionsStore.options.display.viewMode == 'clock') { + this._eventEmitters.action.emit({ + e: null, + action: ActionTypes.showClock, + }); } this.widget @@ -204,8 +245,8 @@ export default class Display { ); // show the clock when using sideBySide - if (this._context._options.display.sideBySide) { - this._timeDisplay._update(); + if (this._hasTime && this.optionsStore.options.display.sideBySide) { + this.timeDisplay._update(this.widget); ( this.widget.getElementsByClassName( Namespace.css.clockContainer @@ -215,11 +256,11 @@ export default class Display { } this.widget.classList.add(Namespace.css.show); - if (!this._context._options.display.inline) { + if (!this.optionsStore.options.display.inline) { this._popperInstance.update(); document.addEventListener('click', this._documentClickEvent); } - this._context._triggerEvent({ type: Namespace.events.show }); + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show }); this._isVisible = true; } @@ -234,11 +275,11 @@ export default class Display { } if (direction) { const max = Math.max( - this._context._minViewModeNumber, - Math.min(3, this._context._currentViewMode + direction) + this.optionsStore.minimumCalendarViewMode, + Math.min(3, this.optionsStore.currentCalendarViewMode + direction) ); - if (this._context._currentViewMode == max) return; - this._context._currentViewMode = max; + if (this.optionsStore.currentCalendarViewMode == max) return; + this.optionsStore.currentCalendarViewMode = max; } this.widget @@ -247,38 +288,40 @@ export default class Display { ) .forEach((e: HTMLElement) => (e.style.display = 'none')); - const datePickerMode = DatePickerModes[this._context._currentViewMode]; + const datePickerMode = + CalendarModes[this.optionsStore.currentCalendarViewMode]; let picker: HTMLElement = this.widget.querySelector( `.${datePickerMode.className}` ); switch (datePickerMode.className) { case Namespace.css.decadesContainer: - this._decadeDisplay._update(); + this.decadeDisplay._update(this.widget, this.paint); break; case Namespace.css.yearsContainer: - this._yearDisplay._update(); + this.yearDisplay._update(this.widget, this.paint); break; case Namespace.css.monthsContainer: - this._monthDisplay._update(); + this.monthDisplay._update(this.widget, this.paint); break; case Namespace.css.daysContainer: - this._dateDisplay._update(); + this.dateDisplay._update(this.widget, this.paint); break; } picker.style.display = 'grid'; this._updateCalendarHeader(); + this._eventEmitters.viewUpdate.emit(); } _updateCalendarHeader() { const showing = [ ...this.widget.querySelector( `.${Namespace.css.dateContainer} div[style*="display: grid"]` - ).classList + ).classList, ].find((x) => x.startsWith(Namespace.css.dateContainer)); - const [previous, switcher, next] = this._context._display.widget + const [previous, switcher, next] = this.widget .getElementsByClassName(Namespace.css.calendarHeader)[0] .getElementsByTagName('div'); @@ -286,56 +329,58 @@ export default class Display { case Namespace.css.decadesContainer: previous.setAttribute( 'title', - this._context._options.localization.previousCentury + this.optionsStore.options.localization.previousCentury ); switcher.setAttribute('title', ''); next.setAttribute( 'title', - this._context._options.localization.nextCentury + this.optionsStore.options.localization.nextCentury ); break; case Namespace.css.yearsContainer: previous.setAttribute( 'title', - this._context._options.localization.previousDecade + this.optionsStore.options.localization.previousDecade ); switcher.setAttribute( 'title', - this._context._options.localization.selectDecade + this.optionsStore.options.localization.selectDecade ); next.setAttribute( 'title', - this._context._options.localization.nextDecade + this.optionsStore.options.localization.nextDecade ); break; case Namespace.css.monthsContainer: previous.setAttribute( 'title', - this._context._options.localization.previousYear + this.optionsStore.options.localization.previousYear ); switcher.setAttribute( 'title', - this._context._options.localization.selectYear + this.optionsStore.options.localization.selectYear ); next.setAttribute( 'title', - this._context._options.localization.nextYear + this.optionsStore.options.localization.nextYear ); break; case Namespace.css.daysContainer: previous.setAttribute( 'title', - this._context._options.localization.previousMonth + this.optionsStore.options.localization.previousMonth ); switcher.setAttribute( 'title', - this._context._options.localization.selectMonth + this.optionsStore.options.localization.selectMonth ); next.setAttribute( 'title', - this._context._options.localization.nextMonth + this.optionsStore.options.localization.nextMonth + ); + switcher.innerText = this.optionsStore.viewDate.format( + this.optionsStore.options.localization.dayViewHeaderFormat ); - switcher.innerText = this._context._viewDate.format(this._context._options.localization.dayViewHeaderFormat); break; } switcher.innerText = switcher.getAttribute(showing); @@ -352,13 +397,13 @@ export default class Display { this.widget.classList.remove(Namespace.css.show); if (this._isVisible) { - this._context._triggerEvent({ + this._eventEmitters.triggerEvent.emit({ type: Namespace.events.hide, - date: this._context._unset + date: this.optionsStore.unset ? null - : this._context.dates.lastPicked - ? this._context.dates.lastPicked.clone - : void 0 + : this.dates.lastPicked + ? this.dates.lastPicked.clone + : void 0, } as HideEvent); this._isVisible = false; } @@ -400,39 +445,39 @@ export default class Display { const dateView = document.createElement('div'); dateView.classList.add(Namespace.css.dateContainer); dateView.append( - this._headTemplate, - this._decadeDisplay._picker, - this._yearDisplay._picker, - this._monthDisplay._picker, - this._dateDisplay._picker + this.getHeadTemplate(), + this.decadeDisplay.getPicker(), + this.yearDisplay.getPicker(), + this.monthDisplay.getPicker(), + this.dateDisplay.getPicker() ); const timeView = document.createElement('div'); timeView.classList.add(Namespace.css.timeContainer); - timeView.appendChild(this._timeDisplay._picker); - timeView.appendChild(this._hourDisplay._picker); - timeView.appendChild(this._minuteDisplay._picker); - timeView.appendChild(this._secondDisplay._picker); + timeView.appendChild(this.timeDisplay.getPicker(this._iconTag.bind(this))); + timeView.appendChild(this.hourDisplay.getPicker()); + timeView.appendChild(this.minuteDisplay.getPicker()); + timeView.appendChild(this.secondDisplay.getPicker()); const toolbar = document.createElement('div'); toolbar.classList.add(Namespace.css.toolbar); - toolbar.append(...this._toolbar); + toolbar.append(...this.getToolbarElements()); - if (this._context._options.display.inline) { + if (this.optionsStore.options.display.inline) { template.classList.add(Namespace.css.inline); } - if (this._context._options.display.calendarWeeks) { + if (this.optionsStore.options.display.calendarWeeks) { template.classList.add('calendarWeeks'); } if ( - this._context._options.display.sideBySide && + this.optionsStore.options.display.sideBySide && this._hasDate && this._hasTime ) { template.classList.add(Namespace.css.sideBySide); - if (this._context._options.display.toolbarPlacement === 'top') { + if (this.optionsStore.options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } const row = document.createElement('div'); @@ -443,21 +488,21 @@ export default class Display { row.appendChild(dateView); row.appendChild(timeView); template.appendChild(row); - if (this._context._options.display.toolbarPlacement === 'bottom') { + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { template.appendChild(toolbar); } this._widget = template; return; } - if (this._context._options.display.toolbarPlacement === 'top') { + if (this.optionsStore.options.display.toolbarPlacement === 'top') { template.appendChild(toolbar); } if (this._hasDate) { if (this._hasTime) { dateView.classList.add(Namespace.css.collapse); - if (this._context._options.display.viewMode !== 'clock') + if (this.optionsStore.options.display.viewMode !== 'clock') dateView.classList.add(Namespace.css.show); } template.appendChild(dateView); @@ -466,13 +511,13 @@ export default class Display { if (this._hasTime) { if (this._hasDate) { timeView.classList.add(Namespace.css.collapse); - if (this._context._options.display.viewMode === 'clock') + if (this.optionsStore.options.display.viewMode === 'clock') timeView.classList.add(Namespace.css.show); } template.appendChild(timeView); } - if (this._context._options.display.toolbarPlacement === 'bottom') { + if (this.optionsStore.options.display.toolbarPlacement === 'bottom') { template.appendChild(toolbar); } @@ -489,10 +534,10 @@ export default class Display { */ get _hasTime(): boolean { return ( - this._context._options.display.components.clock && - (this._context._options.display.components.hours || - this._context._options.display.components.minutes || - this._context._options.display.components.seconds) + this.optionsStore.options.display.components.clock && + (this.optionsStore.options.display.components.hours || + this.optionsStore.options.display.components.minutes || + this.optionsStore.options.display.components.seconds) ); } @@ -501,10 +546,10 @@ export default class Display { */ get _hasDate(): boolean { return ( - this._context._options.display.components.calendar && - (this._context._options.display.components.year || - this._context._options.display.components.month || - this._context._options.display.components.date) + this.optionsStore.options.display.components.calendar && + (this.optionsStore.options.display.components.year || + this.optionsStore.options.display.components.month || + this.optionsStore.options.display.components.date) ); } @@ -512,31 +557,31 @@ export default class Display { * Get the toolbar html based on options like buttons.today * @private */ - get _toolbar(): HTMLElement[] { + getToolbarElements(): HTMLElement[] { const toolbar = []; - if (this._context._options.display.buttons.today) { + if (this.optionsStore.options.display.buttons.today) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.today); - div.setAttribute('title', this._context._options.localization.today); + div.setAttribute('title', this.optionsStore.options.localization.today); div.appendChild( - this._iconTag(this._context._options.display.icons.today) + this._iconTag(this.optionsStore.options.display.icons.today) ); toolbar.push(div); } if ( - !this._context._options.display.sideBySide && + !this.optionsStore.options.display.sideBySide && this._hasDate && this._hasTime ) { let title, icon; - if (this._context._options.display.viewMode === 'clock') { - title = this._context._options.localization.selectDate; - icon = this._context._options.display.icons.date; + if (this.optionsStore.options.display.viewMode === 'clock') { + title = this.optionsStore.options.localization.selectDate; + icon = this.optionsStore.options.display.icons.date; } else { - title = this._context._options.localization.selectTime; - icon = this._context._options.display.icons.time; + title = this.optionsStore.options.localization.selectTime; + icon = this.optionsStore.options.display.icons.time; } const div = document.createElement('div'); @@ -546,23 +591,23 @@ export default class Display { div.appendChild(this._iconTag(icon)); toolbar.push(div); } - if (this._context._options.display.buttons.clear) { + if (this.optionsStore.options.display.buttons.clear) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.clear); - div.setAttribute('title', this._context._options.localization.clear); + div.setAttribute('title', this.optionsStore.options.localization.clear); div.appendChild( - this._iconTag(this._context._options.display.icons.clear) + this._iconTag(this.optionsStore.options.display.icons.clear) ); toolbar.push(div); } - if (this._context._options.display.buttons.close) { + if (this.optionsStore.options.display.buttons.close) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.close); - div.setAttribute('title', this._context._options.localization.close); + div.setAttribute('title', this.optionsStore.options.localization.close); div.appendChild( - this._iconTag(this._context._options.display.icons.close) + this._iconTag(this.optionsStore.options.display.icons.close) ); toolbar.push(div); } @@ -574,7 +619,7 @@ export default class Display { * Builds the base header template with next and previous icons * @private */ - get _headTemplate(): HTMLElement { + getHeadTemplate(): HTMLElement { const calendarHeader = document.createElement('div'); calendarHeader.classList.add(Namespace.css.calendarHeader); @@ -582,17 +627,19 @@ export default class Display { previous.classList.add(Namespace.css.previous); previous.setAttribute('data-action', ActionTypes.previous); previous.appendChild( - this._iconTag(this._context._options.display.icons.previous) + this._iconTag(this.optionsStore.options.display.icons.previous) ); const switcher = document.createElement('div'); switcher.classList.add(Namespace.css.switch); - switcher.setAttribute('data-action', ActionTypes.pickerSwitch); + switcher.setAttribute('data-action', ActionTypes.changeCalendarView); const next = document.createElement('div'); next.classList.add(Namespace.css.next); next.setAttribute('data-action', ActionTypes.next); - next.appendChild(this._iconTag(this._context._options.display.icons.next)); + next.appendChild( + this._iconTag(this.optionsStore.options.display.icons.next) + ); calendarHeader.append(previous, switcher, next); return calendarHeader; @@ -605,7 +652,7 @@ export default class Display { * @private */ _iconTag(iconClass: string): HTMLElement { - if (this._context._options.display.icons.type === 'sprites') { + if (this.optionsStore.options.display.icons.type === 'sprites') { const svg = document.createElement('svg'); svg.innerHTML = ``; return svg; @@ -621,12 +668,12 @@ export default class Display { * @param e MouseEvent */ private _documentClickEvent = (e: MouseEvent) => { - if (this._context._options.debug || (window as any).debug) return; + if (this.optionsStore.options.debug || (window as any).debug) return; if ( this._isVisible && !e.composedPath().includes(this.widget) && // click inside the widget - !e.composedPath()?.includes(this._context._element) // click on the element + !e.composedPath()?.includes(this.optionsStore.element) // click on the element ) { this.hide(); } @@ -638,7 +685,7 @@ export default class Display { * @private */ private _actionsClickEvent = (e: MouseEvent) => { - this._context._action.do(e); + this._eventEmitters.action.emit({ e: e }); }; /** @@ -655,3 +702,10 @@ export default class Display { } } } + +export type Paint = ( + unit: Unit | 'decade', + innerDate: DateTime, + classes: string[], + element: HTMLElement +) => void; diff --git a/src/js/display/time/hour-display.ts b/src/js/display/time/hour-display.ts index 12318158a..6a53e04d8 100644 --- a/src/js/display/time/hour-display.ts +++ b/src/js/display/time/hour-display.ts @@ -1,30 +1,34 @@ -import { TempusDominus } from '../../tempus-dominus'; import { Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import { serviceLocator } from '../../utilities/service-locator'; +import { Paint } from '../index'; +import ActionTypes from '../../utilities/action-types'; /** * Creates and updates the grid for `hours` */ export default class HourDisplay { - private _context: TempusDominus; + private optionsStore: OptionsStore; + private validation: Validation; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } - /** * Build the container html for the display * @private */ - get _picker(): HTMLElement { + getPicker(): HTMLElement { const container = document.createElement('div'); container.classList.add(Namespace.css.hourContainer); for ( let i = 0; i < - (this._context._options.display.components.useTwentyfourHour ? 24 : 12); + (this.optionsStore.options.display.components.useTwentyfourHour ? 24 : 12); i++ ) { const div = document.createElement('div'); @@ -39,26 +43,28 @@ export default class HourDisplay { * Populates the grid and updates enabled states * @private */ - _update(): void { - const container = this._context._display.widget.getElementsByClassName( + _update(widget: HTMLElement, paint: Paint): void { + const container = widget.getElementsByClassName( Namespace.css.hourContainer )[0]; - let innerDate = this._context._viewDate.clone.startOf(Unit.date); + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date); container .querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`) - .forEach((containerClone: HTMLElement, index) => { + .forEach((containerClone: HTMLElement) => { let classes = []; classes.push(Namespace.css.hour); - if (!this._context._validation.isValid(innerDate, Unit.hours)) { + if (!this.validation.isValid(innerDate, Unit.hours)) { classes.push(Namespace.css.disabled); } + paint(Unit.hours, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.hours}`); - containerClone.innerText = this._context._options.display.components + containerClone.innerText = this.optionsStore.options.display.components .useTwentyfourHour ? innerDate.hoursFormatted : innerDate.twelveHoursFormatted; diff --git a/src/js/display/time/minute-display.ts b/src/js/display/time/minute-display.ts index 529ef3f5b..12bb89afd 100644 --- a/src/js/display/time/minute-display.ts +++ b/src/js/display/time/minute-display.ts @@ -1,30 +1,34 @@ -import { TempusDominus } from '../../tempus-dominus'; import { Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import { serviceLocator } from '../../utilities/service-locator'; +import { Paint } from '../index'; +import ActionTypes from '../../utilities/action-types'; /** * Creates and updates the grid for `minutes` */ export default class MinuteDisplay { - private _context: TempusDominus; + private optionsStore: OptionsStore; + private validation: Validation; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } - /** * Build the container html for the display * @private */ - get _picker(): HTMLElement { + getPicker(): HTMLElement { const container = document.createElement('div'); container.classList.add(Namespace.css.minuteContainer); let step = - this._context._options.stepping === 1 + this.optionsStore.options.stepping === 1 ? 5 - : this._context._options.stepping; + : this.optionsStore.options.stepping; for (let i = 0; i < 60 / step; i++) { const div = document.createElement('div'); div.setAttribute('data-action', ActionTypes.selectMinute); @@ -38,26 +42,28 @@ export default class MinuteDisplay { * Populates the grid and updates enabled states * @private */ - _update(): void { - const container = this._context._display.widget.getElementsByClassName( + _update(widget: HTMLElement, paint: Paint): void { + const container = widget.getElementsByClassName( Namespace.css.minuteContainer )[0]; - let innerDate = this._context._viewDate.clone.startOf(Unit.hours); + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours); let step = - this._context._options.stepping === 1 + this.optionsStore.options.stepping === 1 ? 5 - : this._context._options.stepping; + : this.optionsStore.options.stepping; container .querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`) - .forEach((containerClone: HTMLElement, index) => { + .forEach((containerClone: HTMLElement) => { let classes = []; classes.push(Namespace.css.minute); - if (!this._context._validation.isValid(innerDate, Unit.minutes)) { + if (!this.validation.isValid(innerDate, Unit.minutes)) { classes.push(Namespace.css.disabled); } + paint(Unit.minutes, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute( diff --git a/src/js/display/time/second-display.ts b/src/js/display/time/second-display.ts index 808e61cae..c5a5b6a79 100644 --- a/src/js/display/time/second-display.ts +++ b/src/js/display/time/second-display.ts @@ -1,23 +1,27 @@ -import { TempusDominus } from '../../tempus-dominus'; import { Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import { serviceLocator } from '../../utilities/service-locator'; +import { Paint } from '../index'; +import ActionTypes from '../../utilities/action-types'; /** * Creates and updates the grid for `seconds` */ export default class secondDisplay { - private _context: TempusDominus; + private optionsStore: OptionsStore; + private validation: Validation; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.validation = serviceLocator.locate(Validation); } - /** * Build the container html for the display * @private */ - get _picker(): HTMLElement { + getPicker(): HTMLElement { const container = document.createElement('div'); container.classList.add(Namespace.css.secondContainer); @@ -34,22 +38,24 @@ export default class secondDisplay { * Populates the grid and updates enabled states * @private */ - _update(): void { - const container = this._context._display.widget.getElementsByClassName( + _update(widget: HTMLElement, paint: Paint): void { + const container = widget.getElementsByClassName( Namespace.css.secondContainer )[0]; - let innerDate = this._context._viewDate.clone.startOf(Unit.minutes); + let innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes); container .querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`) - .forEach((containerClone: HTMLElement, index) => { + .forEach((containerClone: HTMLElement) => { let classes = []; classes.push(Namespace.css.second); - if (!this._context._validation.isValid(innerDate, Unit.seconds)) { + if (!this.validation.isValid(innerDate, Unit.seconds)) { classes.push(Namespace.css.disabled); } + paint(Unit.seconds, innerDate, classes, containerClone); + containerClone.classList.remove(...containerClone.classList); containerClone.classList.add(...classes); containerClone.setAttribute('data-value', `${innerDate.seconds}`); diff --git a/src/js/display/time/time-display.ts b/src/js/display/time/time-display.ts index 7e528de9f..c70011113 100644 --- a/src/js/display/time/time-display.ts +++ b/src/js/display/time/time-display.ts @@ -1,27 +1,35 @@ -import { TempusDominus } from '../../tempus-dominus'; import { Unit } from '../../datetime'; -import { ActionTypes } from '../../actions'; -import Namespace from '../../namespace'; +import Namespace from '../../utilities/namespace'; +import { OptionsStore } from '../../utilities/options'; +import Validation from '../../validation'; +import Dates from '../../dates'; +import { serviceLocator } from '../../utilities/service-locator'; +import ActionTypes from '../../utilities/action-types'; /** * Creates the clock display */ export default class TimeDisplay { - private _context: TempusDominus; private _gridColumns = ''; - constructor(context: TempusDominus) { - this._context = context; + private optionsStore: OptionsStore; + private validation: Validation; + private dates: Dates; + + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); + this.dates = serviceLocator.locate(Dates); + this.validation = serviceLocator.locate(Validation); } /** * Build the container html for the clock display * @private */ - get _picker(): HTMLElement { + getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement { const container = document.createElement('div'); container.classList.add(Namespace.css.clockContainer); - container.append(...this._grid()); + container.append(...this._grid(iconTag)); return container; } @@ -31,25 +39,24 @@ export default class TimeDisplay { * like the current hour and if the manipulation icons are enabled. * @private */ - _update(): void { - if (!this._context._display._hasTime) return; + _update(widget: HTMLElement): void { const timesDiv = ( - this._context._display.widget.getElementsByClassName( + widget.getElementsByClassName( Namespace.css.clockContainer )[0] ); const lastPicked = ( - this._context.dates.lastPicked || this._context._viewDate + this.dates.lastPicked || this.optionsStore.viewDate ).clone; timesDiv .querySelectorAll('.disabled') .forEach((element) => element.classList.remove(Namespace.css.disabled)); - if (this._context._options.display.components.hours) { + if (this.optionsStore.options.display.components.hours) { if ( - !this._context._validation.isValid( - this._context._viewDate.clone.manipulate(1, Unit.hours), + !this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(1, Unit.hours), Unit.hours ) ) { @@ -59,8 +66,8 @@ export default class TimeDisplay { } if ( - !this._context._validation.isValid( - this._context._viewDate.clone.manipulate(-1, Unit.hours), + !this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours), Unit.hours ) ) { @@ -70,15 +77,15 @@ export default class TimeDisplay { } timesDiv.querySelector( `[data-time-component=${Unit.hours}]` - ).innerText = this._context._options.display.components.useTwentyfourHour + ).innerText = this.optionsStore.options.display.components.useTwentyfourHour ? lastPicked.hoursFormatted : lastPicked.twelveHoursFormatted; } - if (this._context._options.display.components.minutes) { + if (this.optionsStore.options.display.components.minutes) { if ( - !this._context._validation.isValid( - this._context._viewDate.clone.manipulate(1, Unit.minutes), + !this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(1, Unit.minutes), Unit.minutes ) ) { @@ -88,8 +95,8 @@ export default class TimeDisplay { } if ( - !this._context._validation.isValid( - this._context._viewDate.clone.manipulate(-1, Unit.minutes), + !this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes), Unit.minutes ) ) { @@ -102,10 +109,10 @@ export default class TimeDisplay { ).innerText = lastPicked.minutesFormatted; } - if (this._context._options.display.components.seconds) { + if (this.optionsStore.options.display.components.seconds) { if ( - !this._context._validation.isValid( - this._context._viewDate.clone.manipulate(1, Unit.seconds), + !this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(1, Unit.seconds), Unit.seconds ) ) { @@ -115,8 +122,8 @@ export default class TimeDisplay { } if ( - !this._context._validation.isValid( - this._context._viewDate.clone.manipulate(-1, Unit.seconds), + !this.validation.isValid( + this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds), Unit.seconds ) ) { @@ -129,7 +136,7 @@ export default class TimeDisplay { ).innerText = lastPicked.secondsFormatted; } - if (!this._context._options.display.components.useTwentyfourHour) { + if (!this.optionsStore.options.display.components.useTwentyfourHour) { const toggle = timesDiv.querySelector( `[data-action=${ActionTypes.toggleMeridiem}]` ); @@ -137,7 +144,7 @@ export default class TimeDisplay { toggle.innerText = lastPicked.meridiem(); if ( - !this._context._validation.isValid( + !this.validation.isValid( lastPicked.clone.manipulate( lastPicked.hours >= 12 ? -12 : 12, Unit.hours @@ -157,17 +164,17 @@ export default class TimeDisplay { * Creates the table for the clock display depending on what options are selected. * @private */ - private _grid(): HTMLElement[] { + private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] { this._gridColumns = ''; const top = [], middle = [], bottom = [], separator = document.createElement('div'), - upIcon = this._context._display._iconTag( - this._context._options.display.icons.up + upIcon = iconTag( + this.optionsStore.options.display.icons.up ), - downIcon = this._context._display._iconTag( - this._context._options.display.icons.down + downIcon = iconTag( + this.optionsStore.options.display.icons.down ); separator.classList.add(Namespace.css.separator, Namespace.css.noHighlight); @@ -180,11 +187,11 @@ export default class TimeDisplay { : separator.cloneNode(true); }; - if (this._context._options.display.components.hours) { + if (this.optionsStore.options.display.components.hours) { let divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.incrementHour + this.optionsStore.options.localization.incrementHour ); divElement.setAttribute('data-action', ActionTypes.incrementHours); divElement.appendChild(upIcon.cloneNode(true)); @@ -193,7 +200,7 @@ export default class TimeDisplay { divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.pickHour + this.optionsStore.options.localization.pickHour ); divElement.setAttribute('data-action', ActionTypes.showHours); divElement.setAttribute('data-time-component', Unit.hours); @@ -202,7 +209,7 @@ export default class TimeDisplay { divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.decrementHour + this.optionsStore.options.localization.decrementHour ); divElement.setAttribute('data-action', ActionTypes.decrementHours); divElement.appendChild(downIcon.cloneNode(true)); @@ -210,9 +217,9 @@ export default class TimeDisplay { this._gridColumns += 'a'; } - if (this._context._options.display.components.minutes) { + if (this.optionsStore.options.display.components.minutes) { this._gridColumns += ' a'; - if (this._context._options.display.components.hours) { + if (this.optionsStore.options.display.components.hours) { top.push(getSeparator()); middle.push(getSeparator(true)); bottom.push(getSeparator()); @@ -221,7 +228,7 @@ export default class TimeDisplay { let divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.incrementMinute + this.optionsStore.options.localization.incrementMinute ); divElement.setAttribute('data-action', ActionTypes.incrementMinutes); divElement.appendChild(upIcon.cloneNode(true)); @@ -230,7 +237,7 @@ export default class TimeDisplay { divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.pickMinute + this.optionsStore.options.localization.pickMinute ); divElement.setAttribute('data-action', ActionTypes.showMinutes); divElement.setAttribute('data-time-component', Unit.minutes); @@ -239,16 +246,16 @@ export default class TimeDisplay { divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.decrementMinute + this.optionsStore.options.localization.decrementMinute ); divElement.setAttribute('data-action', ActionTypes.decrementMinutes); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); } - if (this._context._options.display.components.seconds) { + if (this.optionsStore.options.display.components.seconds) { this._gridColumns += ' a'; - if (this._context._options.display.components.minutes) { + if (this.optionsStore.options.display.components.minutes) { top.push(getSeparator()); middle.push(getSeparator(true)); bottom.push(getSeparator()); @@ -257,7 +264,7 @@ export default class TimeDisplay { let divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.incrementSecond + this.optionsStore.options.localization.incrementSecond ); divElement.setAttribute('data-action', ActionTypes.incrementSeconds); divElement.appendChild(upIcon.cloneNode(true)); @@ -266,7 +273,7 @@ export default class TimeDisplay { divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.pickSecond + this.optionsStore.options.localization.pickSecond ); divElement.setAttribute('data-action', ActionTypes.showSeconds); divElement.setAttribute('data-time-component', Unit.seconds); @@ -275,14 +282,14 @@ export default class TimeDisplay { divElement = document.createElement('div'); divElement.setAttribute( 'title', - this._context._options.localization.decrementSecond + this.optionsStore.options.localization.decrementSecond ); divElement.setAttribute('data-action', ActionTypes.decrementSeconds); divElement.appendChild(downIcon.cloneNode(true)); bottom.push(divElement); } - if (!this._context._options.display.components.useTwentyfourHour) { + if (!this.optionsStore.options.display.components.useTwentyfourHour) { this._gridColumns += ' a'; let divElement = getSeparator(); top.push(divElement); @@ -290,11 +297,14 @@ export default class TimeDisplay { let button = document.createElement('button'); button.setAttribute( 'title', - this._context._options.localization.toggleMeridiem + this.optionsStore.options.localization.toggleMeridiem ); button.setAttribute('data-action', ActionTypes.toggleMeridiem); button.setAttribute('tabindex', '-1'); - button.classList.add(Namespace.css.toggleMeridiem); + if (Namespace.css.toggleMeridiem.includes(',')) { //todo move this to paint function? + button.classList.add(...Namespace.css.toggleMeridiem.split(',')); + } + else button.classList.add(Namespace.css.toggleMeridiem); divElement = document.createElement('div'); divElement.classList.add(Namespace.css.noHighlight); diff --git a/src/js/jQuery-provider.js b/src/js/jQuery-provider.js index 1be73d2f4..ac9b2936e 100644 --- a/src/js/jQuery-provider.js +++ b/src/js/jQuery-provider.js @@ -2,7 +2,7 @@ /*global $ */ /*! - * Tempus Dominus v6.0.0-beta2 (https://getdatepicker.com/) + * Tempus Dominus v6.0.0-beta4 (https://getdatepicker.com/) * Copyright 2013-2021 [object Object] * Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE) */ diff --git a/src/js/tempus-dominus.ts b/src/js/tempus-dominus.ts index 4c5efca54..3be5b0aac 100644 --- a/src/js/tempus-dominus.ts +++ b/src/js/tempus-dominus.ts @@ -1,63 +1,74 @@ import Display from './display/index'; import Validation from './validation'; import Dates from './dates'; -import Actions, { ActionTypes } from './actions'; -import { DatePickerModes, DefaultOptions } from './conts'; +import Actions from './actions'; import { DateTime, DateTimeFormatOptions, Unit } from './datetime'; -import Namespace from './namespace'; -import Options, { OptionConverter } from './options'; +import Namespace from './utilities/namespace'; +import Options, { OptionConverter, OptionsStore } from './utilities/options'; import { BaseEvent, ChangeEvent, ViewUpdateEvent, FailEvent, -} from './event-types'; +} from './utilities/event-types'; +import { EventEmitters } from './utilities/event-emitter'; +import { + serviceLocator, + setupServiceLocator, +} from './utilities/service-locator'; +import CalendarModes from './utilities/calendar-modes'; +import DefaultOptions from './utilities/default-options'; +import ActionTypes from './utilities/action-types'; /** * A robust and powerful date/time picker component. */ class TempusDominus { - dates: Dates; - - _options: Options; - _currentViewMode = 0; _subscribers: { [key: string]: ((event: any) => {})[] } = {}; - _element: HTMLElement; - _input: HTMLInputElement; - _unset: boolean; - _minViewModeNumber = 0; - _display: Display; - _validation: Validation; - _action: Actions; private _isDisabled = false; - private _notifyChangeEventContext = 0; private _toggle: HTMLElement; private _currentPromptTimeTimeout: any; + private actions: Actions; + private optionsStore: OptionsStore; + private _eventEmitters: EventEmitters; + display: Display; + dates: Dates; constructor(element: HTMLElement, options: Options = {} as Options) { + setupServiceLocator(); + this._eventEmitters = serviceLocator.locate(EventEmitters); + this.optionsStore = serviceLocator.locate(OptionsStore); + this.display = serviceLocator.locate(Display); + this.dates = serviceLocator.locate(Dates); + this.actions = serviceLocator.locate(Actions); + if (!element) { Namespace.errorMessages.mustProvideElement(); } - this._element = element; - this._options = this._initializeOptions(options, DefaultOptions, true); - this._viewDate.setLocale(this._options.localization.locale); - this._unset = true; - this._display = new Display(this); - this._validation = new Validation(this); - this.dates = new Dates(this); - this._action = new Actions(this); + this.optionsStore.element = element; + this._initializeOptions(options, DefaultOptions, true); + this.optionsStore.viewDate.setLocale( + this.optionsStore.options.localization.locale + ); + this.optionsStore.unset = true; this._initializeInput(); this._initializeToggle(); - if (this._options.display.inline) this._display.show(); - } + if (this.optionsStore.options.display.inline) this.display.show(); - _viewDate = new DateTime(); + this._eventEmitters.triggerEvent.subscribe((e) => { + this._triggerEvent(e); + }); + + this._eventEmitters.viewUpdate.subscribe(() => { + this._viewUpdate(); + }); + } get viewDate() { - return this._viewDate; + return this.optionsStore.viewDate; } // noinspection JSUnusedGlobalSymbols @@ -68,9 +79,9 @@ class TempusDominus { * @public */ updateOptions(options, reset = false): void { - if (reset) this._options = this._initializeOptions(options, DefaultOptions); - else this._options = this._initializeOptions(options, this._options); - this._display._rebuild(); + if (reset) this._initializeOptions(options, DefaultOptions); + else this._initializeOptions(options, this.optionsStore.options); + this.display._rebuild(); } // noinspection JSUnusedGlobalSymbols @@ -80,7 +91,7 @@ class TempusDominus { */ toggle(): void { if (this._isDisabled) return; - this._display.toggle(); + this.display.toggle(); } // noinspection JSUnusedGlobalSymbols @@ -90,7 +101,7 @@ class TempusDominus { */ show(): void { if (this._isDisabled) return; - this._display.show(); + this.display.show(); } // noinspection JSUnusedGlobalSymbols @@ -99,7 +110,7 @@ class TempusDominus { * @public */ hide(): void { - this._display.hide(); + this.display.hide(); } // noinspection JSUnusedGlobalSymbols @@ -111,8 +122,8 @@ class TempusDominus { this._isDisabled = true; // todo this might be undesired. If a dev disables the input field to // only allow using the picker, this will break that. - this._input?.setAttribute('disabled', 'disabled'); - this._display.hide(); + this.optionsStore.input?.setAttribute('disabled', 'disabled'); + this.display.hide(); } // noinspection JSUnusedGlobalSymbols @@ -122,7 +133,7 @@ class TempusDominus { */ enable(): void { this._isDisabled = false; - this._input?.removeAttribute('disabled'); + this.optionsStore.input?.removeAttribute('disabled'); } // noinspection JSUnusedGlobalSymbols @@ -190,66 +201,88 @@ class TempusDominus { * Hides the picker and removes event listeners */ dispose() { - this._display.hide(); + this.display.hide(); // this will clear the document click event listener - this._display._dispose(); - this._input?.removeEventListener('change', this._inputChangeEvent); - if (this._options.allowInputToggle) { - this._input?.removeEventListener('click', this._toggleClickEvent); + this.display._dispose(); + this.optionsStore.input?.removeEventListener( + 'change', + this._inputChangeEvent + ); + if (this.optionsStore.options.allowInputToggle) { + this.optionsStore.input?.removeEventListener( + 'click', + this._toggleClickEvent + ); } - this._toggle.removeEventListener('click', this._toggleClickEvent); + this._toggle?.removeEventListener('click', this._toggleClickEvent); this._subscribers = {}; } + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language: string) { + let asked = loadedLocales[language]; + if (!asked) return; + this.updateOptions({ + localization: asked, + }); + } + /** * Triggers an event like ChangeEvent when the picker has updated the value * of a selected date. * @param event Accepts a BaseEvent object. * @private */ - _triggerEvent(event: BaseEvent) { - // checking hasOwnProperty because the BasicEvent also falls through here otherwise - if ((event as ChangeEvent) && event.hasOwnProperty('date')) { + private _triggerEvent(event: BaseEvent) { + event.viewMode = this.optionsStore.currentView; + + const isChangeEvent = event.type === Namespace.events.change; + if (isChangeEvent) { const { date, oldDate, isClear } = event as ChangeEvent; - // this was to prevent a max call stack error - // https://github.com/tempusdominus/core/commit/15a280507f5277b31b0b3319ab1edc7c19a000fb - // todo see if this is still needed or if there's a cleaner way - this._notifyChangeEventContext++; if ( (date && oldDate && date.isSame(oldDate)) || - (!isClear && !date && !oldDate) || - this._notifyChangeEventContext > 1 + (!isClear && !date && !oldDate) ) { - this._notifyChangeEventContext = 0; return; } this._handleAfterChangeEvent(event as ChangeEvent); + + this.optionsStore.input?.dispatchEvent( + new CustomEvent(event.type, { detail: event as any }) + ); } - this._element.dispatchEvent( + this.optionsStore.element.dispatchEvent( new CustomEvent(event.type, { detail: event as any }) ); if ((window as any).jQuery) { const $ = (window as any).jQuery; - $(this._element).trigger(event); - } - const publish = () => { - // return if event is not subscribed - if (!Array.isArray(this._subscribers[event.type])) { - return; + if (isChangeEvent && this.optionsStore.input) { + $(this.optionsStore.input).trigger(event); + } else { + $(this.optionsStore.element).trigger(event); } + } - // Trigger callback for each subscriber - this._subscribers[event.type].forEach((callback) => { - callback(event); - }); - }; + this._publish(event); + } - publish(); + private _publish(event: BaseEvent) { + // return if event is not subscribed + if (!Array.isArray(this._subscribers[event.type])) { + return; + } - this._notifyChangeEventContext = 0; + // Trigger callback for each subscriber + this._subscribers[event.type].forEach((callback) => { + callback(event); + }); } /** @@ -257,11 +290,10 @@ class TempusDominus { * @param {Unit} unit * @private */ - _viewUpdate(unit: Unit) { + private _viewUpdate() { this._triggerEvent({ type: Namespace.events.update, - change: unit, - viewDate: this._viewDate.clone, + viewDate: this.optionsStore.viewDate.clone, } as ViewUpdateEvent); } @@ -280,17 +312,20 @@ class TempusDominus { config: Options, mergeTo: Options, includeDataset = false - ): Options { + ): void { config = OptionConverter._mergeOptions(config, mergeTo); if (includeDataset) - config = OptionConverter._dataToOptions(this._element, config); + config = OptionConverter._dataToOptions( + this.optionsStore.element, + config + ); OptionConverter._validateConflcits(config); config.viewDate = config.viewDate.setLocale(config.localization.locale); - if (!this._viewDate.isSame(config.viewDate)) { - this._viewDate = config.viewDate; + if (!this.optionsStore.viewDate.isSame(config.viewDate)) { + this.optionsStore.viewDate = config.viewDate; } /** @@ -298,60 +333,36 @@ class TempusDominus { * allowing year and month to be selected but not date. */ if (config.display.components.year) { - this._minViewModeNumber = 2; + this.optionsStore.minimumCalendarViewMode = 2; } if (config.display.components.month) { - this._minViewModeNumber = 1; + this.optionsStore.minimumCalendarViewMode = 1; } if (config.display.components.date) { - this._minViewModeNumber = 0; + this.optionsStore.minimumCalendarViewMode = 0; } - this._currentViewMode = Math.max( - this._minViewModeNumber, - this._currentViewMode + this.optionsStore.currentCalendarViewMode = Math.max( + this.optionsStore.minimumCalendarViewMode, + this.optionsStore.currentCalendarViewMode ); // Update view mode if needed if ( - DatePickerModes[this._currentViewMode].name !== config.display.viewMode + CalendarModes[this.optionsStore.currentCalendarViewMode].name !== + config.display.viewMode ) { - this._currentViewMode = Math.max( - DatePickerModes.findIndex((x) => x.name === config.display.viewMode), - this._minViewModeNumber + this.optionsStore.currentCalendarViewMode = Math.max( + CalendarModes.findIndex((x) => x.name === config.display.viewMode), + this.optionsStore.minimumCalendarViewMode ); } - // defaults the input format based on the components enabled - if (config.hooks.inputFormat === undefined) { - const components = config.display.components; - config.hooks.inputFormat = (_, date: DateTime) => { - if (!date) return ''; - return date.format({ - year: components.calendar && components.year ? 'numeric' : undefined, - month: - components.calendar && components.month ? '2-digit' : undefined, - day: components.calendar && components.date ? '2-digit' : undefined, - hour: - components.clock && components.hours - ? components.useTwentyfourHour - ? '2-digit' - : 'numeric' - : undefined, - minute: - components.clock && components.minutes ? '2-digit' : undefined, - second: - components.clock && components.seconds ? '2-digit' : undefined, - hour12: !components.useTwentyfourHour, - }); - }; + if (this.display?.isVisible) { + this.display._update('all'); } - if (this._display?.isVisible) { - this._display._update('all'); - } - - return config; + this.optionsStore.options = config; } /** @@ -360,25 +371,27 @@ class TempusDominus { * @private */ private _initializeInput() { - if (this._element.tagName == 'INPUT') { - this._input = this._element as HTMLInputElement; + if (this.optionsStore.element.tagName == 'INPUT') { + this.optionsStore.input = this.optionsStore.element as HTMLInputElement; } else { - let query = this._element.dataset.tdTargetInput; + let query = this.optionsStore.element.dataset.tdTargetInput; if (query == undefined || query == 'nearest') { - this._input = this._element.querySelector('input'); + this.optionsStore.input = + this.optionsStore.element.querySelector('input'); } else { - this._input = this._element.querySelector(query); + this.optionsStore.input = + this.optionsStore.element.querySelector(query); } } - if (!this._input) return; + if (!this.optionsStore.input) return; - this._input.addEventListener('change', this._inputChangeEvent); - if (this._options.allowInputToggle) { - this._input.addEventListener('click', this._toggleClickEvent); + this.optionsStore.input.addEventListener('change', this._inputChangeEvent); + if (this.optionsStore.options.allowInputToggle) { + this.optionsStore.input.addEventListener('click', this._toggleClickEvent); } - if (this._input.value) { + if (this.optionsStore.input.value) { this._inputChangeEvent(); } } @@ -388,13 +401,15 @@ class TempusDominus { * @private */ private _initializeToggle() { - if (this._options.display.inline) return; - let query = this._element.dataset.tdTargetToggle; + if (this.optionsStore.options.display.inline) return; + let query = this.optionsStore.element.dataset.tdTargetToggle; if (query == 'nearest') { query = '[data-td-toggle="datetimepicker"]'; } this._toggle = - query == undefined ? this._element : this._element.querySelector(query); + query == undefined + ? this.optionsStore.element + : this.optionsStore.element.querySelector(query); this._toggle.addEventListener('click', this._toggleClickEvent); } @@ -406,13 +421,13 @@ class TempusDominus { private _handleAfterChangeEvent(e: ChangeEvent) { if ( // options is disabled - !this._options.promptTimeOnDateChange || - this._options.display.inline || - this._options.display.sideBySide || + !this.optionsStore.options.promptTimeOnDateChange || + this.optionsStore.options.display.inline || + this.optionsStore.options.display.sideBySide || // time is disabled - !this._display._hasTime || + !this.display._hasTime || // clock component is already showing - this._display.widget + this.display.widget ?.getElementsByClassName(Namespace.css.show)[0] .classList.contains(Namespace.css.timeContainer) ) @@ -422,7 +437,7 @@ class TempusDominus { // because the first date is selected automatically. // or date didn't change (time did) or date changed because time did. if ( - (!e.oldDate && this._options.useCurrent) || + (!e.oldDate && this.optionsStore.options.useCurrent) || (e.oldDate && e.date?.isSame(e.oldDate)) ) { return; @@ -430,17 +445,17 @@ class TempusDominus { clearTimeout(this._currentPromptTimeTimeout); this._currentPromptTimeTimeout = setTimeout(() => { - if (this._display.widget) { - this._action.do( - { - currentTarget: this._display.widget.querySelector( + if (this.display.widget) { + this._eventEmitters.action.emit({ + e: { + currentTarget: this.display.widget.querySelector( `.${Namespace.css.switch} div` ), }, - ActionTypes.togglePicker - ); + action: ActionTypes.togglePicker, + }); } - }, this._options.promptTimeOnDateChangeTransitionDelay); + }, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay); } /** @@ -450,23 +465,18 @@ class TempusDominus { */ private _inputChangeEvent = () => { const setViewDate = () => { - if (this.dates.lastPicked) this._viewDate = this.dates.lastPicked; + if (this.dates.lastPicked) + this.optionsStore.viewDate = this.dates.lastPicked; }; - const value = this._input.value; - if (this._options.multipleDates) { + const value = this.optionsStore.input.value; + if (this.optionsStore.options.multipleDates) { try { - const valueSplit = value.split(this._options.multipleDatesSeparator); + const valueSplit = value.split( + this.optionsStore.options.multipleDatesSeparator + ); for (let i = 0; i < valueSplit.length; i++) { - if (this._options.hooks.inputParse) { - this.dates.set( - this._options.hooks.inputParse(this, valueSplit[i]), - i, - 'input' - ); - } else { - this.dates.set(valueSplit[i], i, 'input'); - } + this.dates.setFromInput(valueSplit[i], i); } setViewDate(); } catch { @@ -475,11 +485,7 @@ class TempusDominus { ); } } else { - if (this._options.hooks.inputParse) { - this.dates.set(this._options.hooks.inputParse(this, value), 0, 'input'); - } else { - this.dates.set(value, 0, 'input'); - } + this.dates.setFromInput(value, 0); setViewDate(); } }; @@ -494,8 +500,47 @@ class TempusDominus { }; } +/** + * Whenever a locale is loaded via a plugin then store it here based on the + * locale name. E.g. loadedLocales['ru'] + */ +const loadedLocales = {}; + +/** + * Called from a locale plugin. + * @param locale locale object for localization options + * @param name name of the language e.g 'ru', 'en-gb' + */ +const loadLocale = (locale) => { + if (loadedLocales[locale.name]) return; + loadedLocales[locale.name] = locale.localization; +}; + +/** + * A sets the global localization options to the provided locale name. + * `locadLocale` MUST be called first. + * @param locale + */ +const locale = (locale: string) => { + let asked = loadedLocales[locale]; + if (!asked) return; + DefaultOptions.localization = asked; +}; + +const extend = function (plugin, option) { + if (!plugin.$i) { + // install plugin only once + plugin.load(option, { TempusDominus, Dates, Display }, this); + plugin.$i = true; + } + return this; +}; + export { TempusDominus, + extend, + loadLocale, + locale, Namespace, DefaultOptions, DateTime, diff --git a/src/js/utilities/action-types.ts b/src/js/utilities/action-types.ts new file mode 100644 index 000000000..e183f68b6 --- /dev/null +++ b/src/js/utilities/action-types.ts @@ -0,0 +1,29 @@ +enum ActionTypes { + next = 'next', + previous = 'previous', + changeCalendarView = 'changeCalendarView', + selectMonth = 'selectMonth', + selectYear = 'selectYear', + selectDecade = 'selectDecade', + selectDay = 'selectDay', + selectHour = 'selectHour', + selectMinute = 'selectMinute', + selectSecond = 'selectSecond', + incrementHours = 'incrementHours', + incrementMinutes = 'incrementMinutes', + incrementSeconds = 'incrementSeconds', + decrementHours = 'decrementHours', + decrementMinutes = 'decrementMinutes', + decrementSeconds = 'decrementSeconds', + toggleMeridiem = 'toggleMeridiem', + togglePicker = 'togglePicker', + showClock = 'showClock', + showHours = 'showHours', + showMinutes = 'showMinutes', + showSeconds = 'showSeconds', + clear = 'clear', + close = 'close', + today = 'today', +} + +export default ActionTypes; diff --git a/src/js/utilities/calendar-modes.ts b/src/js/utilities/calendar-modes.ts new file mode 100644 index 000000000..cf8eb6ade --- /dev/null +++ b/src/js/utilities/calendar-modes.ts @@ -0,0 +1,37 @@ +import { Unit } from '../datetime'; +import Namespace from './namespace'; +import ViewMode from './view-mode'; + +const CalendarModes: { + name: keyof ViewMode; + className: string; + unit: Unit; + step: number; +}[] = [ + { + name: 'calendar', + className: Namespace.css.daysContainer, + unit: Unit.month, + step: 1, + }, + { + name: 'months', + className: Namespace.css.monthsContainer, + unit: Unit.year, + step: 1, + }, + { + name: 'years', + className: Namespace.css.yearsContainer, + unit: Unit.year, + step: 10, + }, + { + name: 'decades', + className: Namespace.css.decadesContainer, + unit: Unit.year, + step: 100, + }, +]; + +export default CalendarModes; diff --git a/src/js/conts.ts b/src/js/utilities/default-options.ts similarity index 63% rename from src/js/conts.ts rename to src/js/utilities/default-options.ts index 1936ebe3a..d68407c82 100644 --- a/src/js/conts.ts +++ b/src/js/utilities/default-options.ts @@ -1,6 +1,5 @@ -import { DateTime, Unit } from './datetime'; -import Namespace from './namespace'; import Options from './options'; +import { DateTime } from '../datetime'; const DefaultOptions: Options = { restrictions: { @@ -11,20 +10,20 @@ const DefaultOptions: Options = { daysOfWeekDisabled: [], disabledTimeIntervals: [], disabledHours: [], - enabledHours: [], + enabledHours: [] }, display: { icons: { type: 'icons', - time: 'fas fa-clock', - date: 'fas fa-calendar', - up: 'fas fa-arrow-up', - down: 'fas fa-arrow-down', - previous: 'fas fa-chevron-left', - next: 'fas fa-chevron-right', - today: 'fas fa-calendar-check', - clear: 'fas fa-trash', - close: 'fas fa-times', + time: 'fa-solid fa-clock', + date: 'fa-solid fa-calendar', + up: 'fa-solid fa-arrow-up', + down: 'fa-solid fa-arrow-down', + previous: 'fa-solid fa-chevron-left', + next: 'fa-solid fa-chevron-right', + today: 'fa-solid fa-calendar-check', + clear: 'fa-solid fa-trash', + close: 'fa-solid fa-xmark' }, sideBySide: false, calendarWeeks: false, @@ -34,7 +33,7 @@ const DefaultOptions: Options = { buttons: { today: false, clear: false, - close: false, + close: false }, components: { calendar: true, @@ -46,9 +45,9 @@ const DefaultOptions: Options = { hours: true, minutes: true, seconds: false, - useTwentyfourHour: false, + useTwentyfourHour: false }, - inline: false, + inline: false }, stepping: 1, useCurrent: true, @@ -82,7 +81,7 @@ const DefaultOptions: Options = { selectDate: 'Select Date', dayViewHeaderFormat: { month: 'long', year: '2-digit' }, locale: 'default', - startOfTheWeek: 0, + startOfTheWeek: 0 }, keepInvalid: false, debug: false, @@ -92,44 +91,8 @@ const DefaultOptions: Options = { multipleDatesSeparator: '; ', promptTimeOnDateChange: false, promptTimeOnDateChangeTransitionDelay: 200, - hooks: { - inputParse: undefined, - inputFormat: undefined, - }, meta: {}, container: undefined }; -const DatePickerModes: { - name: string; - className: string; - unit: Unit; - step: number; -}[] = [ - { - name: 'calendar', - className: Namespace.css.daysContainer, - unit: Unit.month, - step: 1, - }, - { - name: 'months', - className: Namespace.css.monthsContainer, - unit: Unit.year, - step: 1, - }, - { - name: 'years', - className: Namespace.css.yearsContainer, - unit: Unit.year, - step: 10, - }, - { - name: 'decades', - className: Namespace.css.decadesContainer, - unit: Unit.year, - step: 100, - }, -]; - -export { DefaultOptions, DatePickerModes, Namespace }; +export default DefaultOptions; \ No newline at end of file diff --git a/src/js/errors.ts b/src/js/utilities/errors.ts similarity index 100% rename from src/js/errors.ts rename to src/js/utilities/errors.ts diff --git a/src/js/utilities/event-emitter.ts b/src/js/utilities/event-emitter.ts new file mode 100644 index 000000000..a9be0fa78 --- /dev/null +++ b/src/js/utilities/event-emitter.ts @@ -0,0 +1,43 @@ +import { Unit } from '../datetime'; +import ActionTypes from './action-types'; +import { BaseEvent } from './event-types'; + +export type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all'; + +export class EventEmitter { + private subscribers: ((value?: T) => void)[] = []; + + subscribe(callback: (value: T) => void) { + this.subscribers.push(callback); + return this.unsubscribe.bind(this, this.subscribers.length - 1); + } + + unsubscribe(index: number) { + this.subscribers.splice(index, 1); + } + + emit(value?: T) { + this.subscribers.forEach((callback) => { + callback(value); + }); + } + + destory() { + this.subscribers = null; + this.subscribers = []; + } +} + +export class EventEmitters { + triggerEvent = new EventEmitter(); + viewUpdate = new EventEmitter(); + updateDisplay = new EventEmitter(); + action = new EventEmitter<{ e: any; action?: ActionTypes }>(); + + destory() { + this.triggerEvent.destory(); + this.viewUpdate.destory(); + this.updateDisplay.destory(); + this.action.destory(); + } +} diff --git a/src/js/event-types.ts b/src/js/utilities/event-types.ts similarity index 87% rename from src/js/event-types.ts rename to src/js/utilities/event-types.ts index 1f4b45860..190ccacba 100644 --- a/src/js/event-types.ts +++ b/src/js/utilities/event-types.ts @@ -1,7 +1,9 @@ -import { DateTime, Unit } from './datetime'; +import { DateTime, Unit } from '../datetime'; +import ViewMode from './view-mode'; interface BaseEvent { type: string; + viewMode?: keyof ViewMode; } /** @@ -35,7 +37,6 @@ interface ChangeEvent extends BaseEvent { * Triggers when the view is changed for instance from month to year. */ interface ViewUpdateEvent extends BaseEvent { - change: Unit; viewDate: DateTime; } diff --git a/src/js/namespace.ts b/src/js/utilities/namespace.ts similarity index 99% rename from src/js/namespace.ts rename to src/js/utilities/namespace.ts index 6d5ad8d19..c4fff12d0 100644 --- a/src/js/namespace.ts +++ b/src/js/utilities/namespace.ts @@ -1,7 +1,7 @@ import { ErrorMessages } from './errors'; // this is not the way I want this to stay but nested classes seemed to blown up once its compiled. const NAME = 'tempus-dominus', - version = '6.0.0-alpha1', + version = '6.0.0-beta4', dataKey = 'td'; /** diff --git a/src/js/options.ts b/src/js/utilities/options.ts similarity index 87% rename from src/js/options.ts rename to src/js/utilities/options.ts index 61c9fd663..a87190695 100644 --- a/src/js/options.ts +++ b/src/js/utilities/options.ts @@ -1,7 +1,36 @@ -import { DateTime, DateTimeFormatOptions } from './datetime'; +import { DateTime, DateTimeFormatOptions } from '../datetime'; import Namespace from './namespace'; -import { DefaultOptions } from './conts'; -import { TempusDominus } from './tempus-dominus'; +import ViewMode from './view-mode'; +import CalendarModes from './calendar-modes'; +import DefaultOptions from './default-options'; + +export class OptionsStore { + options: Options; + element: HTMLElement; + viewDate = new DateTime(); + input: HTMLInputElement; + unset: boolean; + private _currentCalendarViewMode = 0; + get currentCalendarViewMode() { + return this._currentCalendarViewMode; + } + + set currentCalendarViewMode(value) { + this._currentCalendarViewMode = value; + this.currentView = CalendarModes[value].name; + } + + /** + * When switching back to the calendar from the clock, + * this sets currentView to the correct calendar view. + */ + refreshCurrentView() { + this.currentView = CalendarModes[this.currentCalendarViewMode].name; + } + + minimumCalendarViewMode = 0; + currentView: keyof ViewMode = 'calendar'; +} export default interface Options { restrictions?: { @@ -42,7 +71,7 @@ export default interface Options { down?: string; close?: string; }; - viewMode?: 'clock' | 'calendar' | 'months' | 'years' | 'decades'; + viewMode?: keyof ViewMode | undefined; sideBySide?: boolean; inline?: boolean; keepOpen?: boolean; @@ -89,10 +118,6 @@ export default interface Options { multipleDatesSeparator?: string; promptTimeOnDateChange?: boolean; promptTimeOnDateChangeTransitionDelay?: number; - hooks?: { - inputParse?: (context: TempusDominus, value: any) => DateTime; - inputFormat?: (context: TempusDominus, date: DateTime) => string; - }; meta?: {}; container?: HTMLElement; } @@ -101,23 +126,18 @@ export class OptionConverter { static _mergeOptions(providedOptions: Options, mergeTo: Options): Options { const newOptions = {} as Options; let path = ''; - const ignoreProperties = [ - 'inputParse', - 'inputFormat', - 'meta', - 'dayViewHeaderFormat', - 'container' - ]; + const ignoreProperties = ['meta', 'dayViewHeaderFormat', 'container']; //see if the options specify a locale const locale = - mergeTo.localization.locale !== 'default' ? mergeTo.localization.locale : - providedOptions?.localization?.locale || 'default'; + mergeTo.localization.locale !== 'default' + ? mergeTo.localization.locale + : providedOptions?.localization?.locale || 'default'; const processKey = (key, value, providedType, defaultType) => { switch (key) { case 'defaultDate': { - const dateTime = this._dateConversion(value, 'defaultDate'); + const dateTime = this.dateConversion(value, 'defaultDate'); if (dateTime !== undefined) { dateTime.setLocale(locale); return dateTime; @@ -127,9 +147,10 @@ export class OptionConverter { providedType, 'DateTime or Date' ); + break; } case 'viewDate': { - const dateTime = this._dateConversion(value, 'viewDate'); + const dateTime = this.dateConversion(value, 'viewDate'); if (dateTime !== undefined) { dateTime.setLocale(locale); return dateTime; @@ -139,12 +160,13 @@ export class OptionConverter { providedType, 'DateTime or Date' ); + break; } case 'minDate': { if (value === undefined) { return value; } - const dateTime = this._dateConversion(value, 'restrictions.minDate'); + const dateTime = this.dateConversion(value, 'restrictions.minDate'); if (dateTime !== undefined) { dateTime.setLocale(locale); return dateTime; @@ -154,12 +176,13 @@ export class OptionConverter { providedType, 'DateTime or Date' ); + break; } case 'maxDate': { if (value === undefined) { return value; } - const dateTime = this._dateConversion(value, 'restrictions.maxDate'); + const dateTime = this.dateConversion(value, 'restrictions.maxDate'); if (dateTime !== undefined) { dateTime.setLocale(locale); return dateTime; @@ -169,6 +192,7 @@ export class OptionConverter { providedType, 'DateTime or Date' ); + break; } case 'disabledHours': if (value === undefined) { @@ -256,7 +280,7 @@ export class OptionConverter { Object.keys(valueObject[i]).forEach((vk) => { const subOptionName = `${key}[${i}].${vk}`; let d = valueObject[i][vk]; - const dateTime = this._dateConversion(d, subOptionName); + const dateTime = this.dateConversion(d, subOptionName); if (!dateTime) { Namespace.errorMessages.typeMismatch( subOptionName, @@ -286,13 +310,18 @@ export class OptionConverter { ); return value; - case 'inputParse': - case 'inputFormat': case 'meta': case 'dayViewHeaderFormat': return value; case 'container': - if (value && !(value instanceof HTMLElement || value instanceof Element || value?.appendChild)) { + if ( + value && + !( + value instanceof HTMLElement || + value instanceof Element || + value?.appendChild + ) + ) { Namespace.errorMessages.typeMismatch( path.substring(1), typeof value, @@ -335,7 +364,7 @@ export class OptionConverter { (x) => !Object.keys(mergeOption).includes(x) ); if (unsupportedOptions.length > 0) { - const flattenedOptions = OptionConverter._flattenDefaultOptions; + const flattenedOptions = OptionConverter.getFlattenDefaultOptions(); const errors = unsupportedOptions.map((x) => { let error = `"${path.substring(1)}.${x}" in not a known option.`; @@ -384,7 +413,7 @@ export class OptionConverter { } static _dataToOptions(element, options: Options): Options { - const eData = element.dataset; + const eData = JSON.parse(JSON.stringify(element.dataset)); if (eData?.tdTargetInput) delete eData.tdTargetInput; if (eData?.tdTargetToggle) delete eData.tdTargetToggle; @@ -497,6 +526,7 @@ export class OptionConverter { * @param optionName Provides text to error messages e.g. disabledDates * @param value Option value * @param providedType Used to provide text to error messages + * @param locale */ static _typeCheckDateArray( optionName: string, @@ -513,7 +543,7 @@ export class OptionConverter { } for (let i = 0; i < value.length; i++) { let d = value[i]; - const dateTime = this._dateConversion(d, optionName); + const dateTime = this.dateConversion(d, optionName); if (!dateTime) { Namespace.errorMessages.typeMismatch( optionName, @@ -552,7 +582,7 @@ export class OptionConverter { * @param d value to convert * @param optionName Provides text to error messages e.g. disabledDates */ - static _dateConversion(d: any, optionName: string) { + static dateConversion(d: any, optionName: string): DateTime { if (typeof d === typeof '' && optionName !== 'input') { Namespace.errorMessages.dateString(); } @@ -571,7 +601,7 @@ export class OptionConverter { private static _flatback: string[]; - private static get _flattenDefaultOptions(): string[] { + private static getFlattenDefaultOptions(): string[] { if (this._flatback) return this._flatback; const deepKeys = (t, pre = []) => Array.isArray(t) @@ -591,17 +621,20 @@ export class OptionConverter { * @param config */ static _validateConflcits(config: Options) { - if (config.display.sideBySide && (!config.display.components.clock || - !(config.display.components.hours || - config.display.components.minutes || - config.display.components.seconds) - )) { + if ( + config.display.sideBySide && + (!config.display.components.clock || + !( + config.display.components.hours || + config.display.components.minutes || + config.display.components.seconds + )) + ) { Namespace.errorMessages.conflictingConfiguration( 'Cannot use side by side mode without the clock components' ); } - if (config.restrictions.minDate && config.restrictions.maxDate) { if (config.restrictions.minDate.isAfter(config.restrictions.maxDate)) { Namespace.errorMessages.conflictingConfiguration( diff --git a/src/js/utilities/service-locator.ts b/src/js/utilities/service-locator.ts new file mode 100644 index 000000000..385ea1a70 --- /dev/null +++ b/src/js/utilities/service-locator.ts @@ -0,0 +1,18 @@ +export declare type Constructable = new (...args: any[]) => T; + +class ServiceLocator { + private cache: Map, unknown | Symbol> = new Map(); + + locate(identifier: Constructable): T { + const service = this.cache.get(identifier); + if (service) return service as T; + const value = new identifier(); + this.cache.set(identifier, value); + return value; + } +} +export const setupServiceLocator = () => { + serviceLocator = new ServiceLocator(); +} + +export let serviceLocator: ServiceLocator; \ No newline at end of file diff --git a/src/js/utilities/view-mode.ts b/src/js/utilities/view-mode.ts new file mode 100644 index 000000000..98090362f --- /dev/null +++ b/src/js/utilities/view-mode.ts @@ -0,0 +1,9 @@ +type ViewMode = { + clock; + calendar; + months; + years; + decades; +}; + +export default ViewMode; diff --git a/src/js/validation.ts b/src/js/validation.ts index 469a51440..0266f8720 100644 --- a/src/js/validation.ts +++ b/src/js/validation.ts @@ -1,15 +1,15 @@ -import { TempusDominus } from './tempus-dominus'; -import { DateTime, Unit } from './datetime'; -import Dates from './dates'; +import { DateTime, getFormatByUnit, Unit } from './datetime'; +import { OptionsStore } from './utilities/options'; +import { serviceLocator } from './utilities/service-locator'; /** * Main class for date validation rules based on the options provided. */ export default class Validation { - private _context: TempusDominus; + private optionsStore: OptionsStore; - constructor(context: TempusDominus) { - this._context = context; + constructor() { + this.optionsStore = serviceLocator.locate(OptionsStore); } /** @@ -20,13 +20,13 @@ export default class Validation { */ isValid(targetDate: DateTime, granularity?: Unit): boolean { if ( - this._context._options.restrictions.disabledDates.length > 0 && + this.optionsStore.options.restrictions.disabledDates.length > 0 && this._isInDisabledDates(targetDate) ) { return false; } if ( - this._context._options.restrictions.enabledDates.length > 0 && + this.optionsStore.options.restrictions.enabledDates.length > 0 && !this._isInEnabledDates(targetDate) ) { return false; @@ -34,8 +34,8 @@ export default class Validation { if ( granularity !== Unit.month && granularity !== Unit.year && - this._context._options.restrictions.daysOfWeekDisabled?.length > 0 && - this._context._options.restrictions.daysOfWeekDisabled.indexOf( + this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 && + this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf( targetDate.weekDay ) !== -1 ) { @@ -43,18 +43,18 @@ export default class Validation { } if ( - this._context._options.restrictions.minDate && + this.optionsStore.options.restrictions.minDate && targetDate.isBefore( - this._context._options.restrictions.minDate, + this.optionsStore.options.restrictions.minDate, granularity ) ) { return false; } if ( - this._context._options.restrictions.maxDate && + this.optionsStore.options.restrictions.maxDate && targetDate.isAfter( - this._context._options.restrictions.maxDate, + this.optionsStore.options.restrictions.maxDate, granularity ) ) { @@ -67,29 +67,25 @@ export default class Validation { granularity === Unit.seconds ) { if ( - this._context._options.restrictions.disabledHours.length > 0 && + this.optionsStore.options.restrictions.disabledHours.length > 0 && this._isInDisabledHours(targetDate) ) { return false; } if ( - this._context._options.restrictions.enabledHours.length > 0 && + this.optionsStore.options.restrictions.enabledHours.length > 0 && !this._isInEnabledHours(targetDate) ) { return false; } if ( - this._context._options.restrictions.disabledTimeIntervals.length > 0 + this.optionsStore.options.restrictions.disabledTimeIntervals.length > 0 ) { - for ( - let i = 0; - i < this._context._options.restrictions.disabledTimeIntervals.length; - i++ - ) { + for (let disabledTimeIntervals of this.optionsStore.options.restrictions.disabledTimeIntervals) { if ( targetDate.isBetween( - this._context._options.restrictions.disabledTimeIntervals[i].from, - this._context._options.restrictions.disabledTimeIntervals[i].to + disabledTimeIntervals.from, + disabledTimeIntervals.to ) ) return false; @@ -108,13 +104,13 @@ export default class Validation { */ private _isInDisabledDates(testDate: DateTime) { if ( - !this._context._options.restrictions.disabledDates || - this._context._options.restrictions.disabledDates.length === 0 + !this.optionsStore.options.restrictions.disabledDates || + this.optionsStore.options.restrictions.disabledDates.length === 0 ) return false; - const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date)); - return this._context._options.restrictions.disabledDates - .map((x) => x.format(Dates.getFormatByUnit(Unit.date))) + const formattedDate = testDate.format(getFormatByUnit(Unit.date)); + return this.optionsStore.options.restrictions.disabledDates + .map((x) => x.format(getFormatByUnit(Unit.date))) .find((x) => x === formattedDate); } @@ -126,13 +122,13 @@ export default class Validation { */ private _isInEnabledDates(testDate: DateTime) { if ( - !this._context._options.restrictions.enabledDates || - this._context._options.restrictions.enabledDates.length === 0 + !this.optionsStore.options.restrictions.enabledDates || + this.optionsStore.options.restrictions.enabledDates.length === 0 ) return true; - const formattedDate = testDate.format(Dates.getFormatByUnit(Unit.date)); - return this._context._options.restrictions.enabledDates - .map((x) => x.format(Dates.getFormatByUnit(Unit.date))) + const formattedDate = testDate.format(getFormatByUnit(Unit.date)); + return this.optionsStore.options.restrictions.enabledDates + .map((x) => x.format(getFormatByUnit(Unit.date))) .find((x) => x === formattedDate); } @@ -144,12 +140,12 @@ export default class Validation { */ private _isInDisabledHours(testDate: DateTime) { if ( - !this._context._options.restrictions.disabledHours || - this._context._options.restrictions.disabledHours.length === 0 + !this.optionsStore.options.restrictions.disabledHours || + this.optionsStore.options.restrictions.disabledHours.length === 0 ) return false; const formattedDate = testDate.hours; - return this._context._options.restrictions.disabledHours.find( + return this.optionsStore.options.restrictions.disabledHours.find( (x) => x === formattedDate ); } @@ -162,12 +158,12 @@ export default class Validation { */ private _isInEnabledHours(testDate: DateTime) { if ( - !this._context._options.restrictions.enabledHours || - this._context._options.restrictions.enabledHours.length === 0 + !this.optionsStore.options.restrictions.enabledHours || + this.optionsStore.options.restrictions.enabledHours.length === 0 ) return true; const formattedDate = testDate.hours; - return this._context._options.restrictions.enabledHours.find( + return this.optionsStore.options.restrictions.enabledHours.find( (x) => x === formattedDate ); } diff --git a/src/locales/de.ts b/src/locales/de.ts new file mode 100644 index 000000000..6a1bbc114 --- /dev/null +++ b/src/locales/de.ts @@ -0,0 +1,35 @@ +const name = 'de'; + +const localization = { + today: 'Heute', + clear: 'Auswahl löschen', + close: 'Auswahlbox schließen', + selectMonth: 'Monat wählen', + previousMonth: 'Letzter Montat', + nextMonth: 'Nächster Monat', + selectYear: 'Jahr wählen', + previousYear: 'Letztes Jahr', + nextYear: 'Nächstes Jahr', + selectDecade: 'Jahrzehnt wählen', + previousDecade: 'Letztes Jahrzent', + nextDecade: 'Nächstes Jahrzent', + previousCentury: 'Letztes Jahrhundert', + nextCentury: 'Nächstes Jahrhundert', + pickHour: 'Stunde wählen', + incrementHour: 'Stunde erhöhen', + decrementHour: 'Stunde verringern', + pickMinute: 'Minute wählen', + incrementMinute: 'Minute erhöhen', + decrementMinute: 'Minute verringern', + pickSecond: 'Sekunde wählen', + incrementSecond: 'Sekunde erhöhen', + decrementSecond: 'Sekunde verringern', + toggleMeridiem: 'Tageszeit umschalten', + selectTime: 'Zeit wählen', + selectDate: 'Datum wählen', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'de', + startOfTheWeek: 1 +}; + +export { localization, name }; \ No newline at end of file diff --git a/src/locales/es.ts b/src/locales/es.ts new file mode 100644 index 000000000..2c84e56df --- /dev/null +++ b/src/locales/es.ts @@ -0,0 +1,35 @@ +const name = 'es'; + +const localization = { + today: 'Hoy', + clear: 'Borrar selección', + close: 'Cerrar selector', + selectMonth: 'Seleccionar mes', + previousMonth: 'Mes anterior', + nextMonth: 'Próximo mes', + selectYear: 'Seleccionar año', + previousYear: 'Año anterior', + nextYear: 'Próximo año', + selectDecade: 'Seleccionar década', + previousDecade: 'Década anterior', + nextDecade: 'Próxima década', + previousCentury: 'Siglo anterior', + nextCentury: 'Próximo siglo', + pickHour: 'Elegir hora', + incrementHour: 'Incrementar hora', + decrementHour: 'Decrementar hora', + pickMinute: 'Elegir minuto', + incrementMinute: 'Incrementar minuto', + decrementMinute: 'Decrementar minuto', + pickSecond: 'Elegir segundo', + incrementSecond: 'Incrementar segundo', + decrementSecond: 'Decrementar segundo', + toggleMeridiem: 'Cambiar AM/PM', + selectTime: 'Seleccionar tiempo', + selectDate: 'Seleccionar fecha', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'es', + startOfTheWeek: 1 +}; + +export { localization, name }; \ No newline at end of file diff --git a/src/locales/it.ts b/src/locales/it.ts new file mode 100644 index 000000000..fc8afa55d --- /dev/null +++ b/src/locales/it.ts @@ -0,0 +1,35 @@ +const name = 'it'; + +const localization = { + today: 'Oggi', + clear: 'Cancella selezione', + close: 'Chiudi', + selectMonth: 'Seleziona mese', + previousMonth: 'Mese precedente', + nextMonth: 'Mese successivo', + selectYear: 'Seleziona anno', + previousYear: 'Anno precedente', + nextYear: 'Anno successivo', + selectDecade: 'Seleziona Decennio', + previousDecade: 'Decennio precedente', + nextDecade: 'Decennio successivo', + previousCentury: 'Secolo precedente', + nextCentury: 'Secolo successivo', + pickHour: "Seleziona l'ora", + incrementHour: "Incrementa l'ora", + decrementHour: "Decrementa l'ora", + pickMinute: 'Seleziona i minuti', + incrementMinute: 'Incrementa i minuti', + decrementMinute: 'Decrementa i minuti', + pickSecond: 'Seleziona i secondi', + incrementSecond: 'Incrementa i secondi', + decrementSecond: 'Decrementa i secondi', + toggleMeridiem: 'Scambia AM-PM', + selectTime: "Seleziona l'ora", + selectDate: 'Seleziona una data', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'it', + startOfTheWeek: 1 +}; + +export { localization, name }; \ No newline at end of file diff --git a/src/locales/nl.ts b/src/locales/nl.ts new file mode 100644 index 000000000..76536cf1d --- /dev/null +++ b/src/locales/nl.ts @@ -0,0 +1,35 @@ +const name = 'nl'; + +const localization = { + today: 'Vandaag', + clear: 'Verwijder selectie', + close: 'Sluit de picker', + selectMonth: 'Selecteer een maand', + previousMonth: 'Vorige maand', + nextMonth: 'Volgende maand', + selectYear: 'Selecteer een jaar', + previousYear: 'Vorige jaar', + nextYear: 'Volgende jaar', + selectDecade: 'Selecteer decennium', + previousDecade: 'Vorige decennium', + nextDecade: 'Volgende decennium', + previousCentury: 'Vorige eeuw', + nextCentury: 'Volgende eeuw', + pickHour: 'Kies een uur', + incrementHour: 'Verhoog uur', + decrementHour: 'Verlaag uur', + pickMinute: 'Kies een minute', + incrementMinute: 'Verhoog minuut', + decrementMinute: 'Verlaag minuut', + pickSecond: 'Kies een seconde', + incrementSecond: 'Verhoog seconde', + decrementSecond: 'Verlaag seconde', + toggleMeridiem: 'Schakel tussen AM/PM', + selectTime: 'Selecteer een tijd', + selectDate: 'Selecteer een datum', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'nl', + startOfTheWeek: 1 +}; + +export { localization, name }; \ No newline at end of file diff --git a/src/locales/ro.ts b/src/locales/ro.ts new file mode 100644 index 000000000..481e4ef70 --- /dev/null +++ b/src/locales/ro.ts @@ -0,0 +1,35 @@ +const name = 'ro'; + +const localization = { + today: 'Mergi la ziua de astăzi', + clear: 'Șterge selecția', + close: 'Închide calendarul', + selectMonth: 'Selectează luna', + previousMonth: 'Luna precedentă', + nextMonth: 'Luna următoare', + selectYear: 'Selectează anul', + previousYear: 'Anul precedent', + nextYear: 'Anul următor', + selectDecade: 'Selectează deceniul', + previousDecade: 'Deceniul precedent', + nextDecade: 'Deceniul următor', + previousCentury: 'Secolul precedent', + nextCentury: 'Secolul următor', + pickHour: 'Alege ora', + incrementHour: 'Incrementează ora', + decrementHour: 'Decrementează ora', + pickMinute: 'Alege minutul', + incrementMinute: 'Incrementează minutul', + decrementMinute: 'Decrementează minutul', + pickSecond: 'Alege secunda', + incrementSecond: 'Incrementează secunda', + decrementSecond: 'Decrementează secunda', + toggleMeridiem: 'Comută modul AM/PM', + selectTime: 'Selectează ora', + selectDate: 'Selectează data', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'ro', + startOfTheWeek: 1 +}; + +export { localization, name }; \ No newline at end of file diff --git a/src/locales/ru.ts b/src/locales/ru.ts new file mode 100644 index 000000000..1be5596e1 --- /dev/null +++ b/src/locales/ru.ts @@ -0,0 +1,35 @@ +const name = 'ru'; + +const localization = { + today: 'Перейти сегодня', + clear: 'Очистить выделение', + close: 'Закрыть сборщик', + selectMonth: 'Выбрать месяц', + previousMonth: 'Предыдущий месяц', + nextMonth: 'В следующем месяце', + selectYear: 'Выбрать год', + previousYear: 'Предыдущий год', + nextYear: 'В следующем году', + selectDecade: 'Выбрать десятилетие', + previousDecade: 'Предыдущее десятилетие', + nextDecade: 'Следующее десятилетие', + previousCentury: 'Предыдущий век', + nextCentury: 'Следующий век', + pickHour: 'Выберите час', + incrementHour: 'Время увеличения', + decrementHour: 'Уменьшить час', + pickMinute: 'Выбрать минуту', + incrementMinute: 'Минута приращения', + decrementMinute: 'Уменьшить минуту', + pickSecond: 'Выбрать второй', + incrementSecond: 'Увеличение секунды', + decrementSecond: 'Уменьшение секунды', + toggleMeridiem: 'Переключить период', + selectTime: 'Выбрать время', + selectDate: 'Выбрать дату', + dayViewHeaderFormat: { month: 'long', year: '2-digit' }, + locale: 'ru', + startOfTheWeek: 1 +}; + +export { localization, name }; \ No newline at end of file diff --git a/src/plugins/examples/custom-paint-job.ts b/src/plugins/examples/custom-paint-job.ts new file mode 100644 index 000000000..ff4459e64 --- /dev/null +++ b/src/plugins/examples/custom-paint-job.ts @@ -0,0 +1,11 @@ +// noinspection JSUnusedGlobalSymbols +export const load = (option, tdClasses, tdFactory) => { + // noinspection JSUnusedLocalSymbols + tdClasses.Display.prototype.paint = (unit, date, classes: string[], element: HTMLElement) => { + if (unit === tdFactory.Unit.date) { + if (date.isSame(new tdFactory.DateTime(), unit)) { + classes.push('special-day'); + } + } + }; +}; diff --git a/src/plugins/examples/sample.ts b/src/plugins/examples/sample.ts new file mode 100644 index 000000000..6b06683d5 --- /dev/null +++ b/src/plugins/examples/sample.ts @@ -0,0 +1,28 @@ +// noinspection JSUnusedGlobalSymbols + +export const load = (option, tdClasses, tdFactory) => { + // extend the picker + // e.g. add new tempusDominus.TempusDominus(...).someFunction() + tdClasses.TempusDominus.prototype.someFunction = (a, logger) => { + logger = logger || console.log + logger(a); + } + + // extend tempusDominus + // e.g. add tempusDominus.example() + tdFactory.example = (a, logger) => { + logger = logger || console.log + logger(a); + } + + // overriding existing API + // e.g. extend new tempusDominus.TempusDominus(...).show() + const oldShow = tdClasses.TempusDominus.prototype.show; + tdClasses.TempusDominus.prototype.show = function(a, logger) { + logger = logger || console.log + alert('from plugin'); + logger(a); + oldShow.bind(this)() + // return modified result + } +} \ No newline at end of file diff --git a/src/plugins/fa-five/index.ts b/src/plugins/fa-five/index.ts new file mode 100644 index 000000000..3e9e4ab42 --- /dev/null +++ b/src/plugins/fa-five/index.ts @@ -0,0 +1,21 @@ +// this obviously requires the FA 6 libraries to be loaded + +const faFiveIcons = { + type: 'icons', + time: 'fas fa-clock', + date: 'fas fa-calendar', + up: 'fas fa-arrow-up', + down: 'fas fa-arrow-down', + previous: 'fas fa-chevron-left', + next: 'fas fa-chevron-right', + today: 'fas fa-calendar-check', + clear: 'fas fa-trash', + close: 'fas fa-times', +}; + +// noinspection JSUnusedGlobalSymbols +const load = (_, __, tdFactory) => { + tdFactory.DefaultOptions.display.icons = faFiveIcons; +}; + +export { faFiveIcons, load }; diff --git a/src/plugins/moment-parse/index.ts b/src/plugins/moment-parse/index.ts new file mode 100644 index 000000000..2d4ab2ca6 --- /dev/null +++ b/src/plugins/moment-parse/index.ts @@ -0,0 +1,18 @@ +//obviously, loading moment js is required. +declare var moment; +export const load = (option, tdClasses, tdFactory) => { + tdClasses.Dates.prototype.setFromInput = function(value, index) { + let converted = moment(value, option); + if (converted.isValid()) { + let date = tdFactory.DateTime.convert(converted.toDate(), this.optionsStore.options.localization.locale); + this.setValue(date, index); + } + else { + console.warn('Momentjs failed to parse the input date.'); + } + } + + tdClasses.Dates.prototype.formatInput = function(date) { + return moment(date).format(option); + } +} \ No newline at end of file diff --git a/src/sass/_variables.scss b/src/sass/_variables.scss new file mode 100644 index 000000000..bf20989bd --- /dev/null +++ b/src/sass/_variables.scss @@ -0,0 +1,30 @@ +$td-light: #fff !default; +$td-widget-background: $td-light !default; +$td-timepicker-font-size: 1.2em !default; +$td-active-bg: #0d6efd !default; +$td-active-color: $td-light !default; +$td-active-border-color: $td-light; +$td-border-radius: 999px !default; +$td-btn-hover-bg: #e9ecef !default; +$td-disabled-color: #6c757d !default; +$td-alternate-color: rgba(0, 0, 0, .38) !default; +$td-secondary-border-color: #ccc !default; +$td-secondary-border-color-rgba: rgba(0, 0, 0, 0.2) !default; +$td-primary-border-color: $td-light !default; +$td-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) !default; +$td-dow-color: rgba(0, 0, 0, .50); + +$td-dark: #1b1b1b !default; +$td-dark-widget-background: $td-dark !default; +$td-dark-font-color: #e3e3e3; +$td-dark-active-bg: #4db2ff !default; +$td-dark-active-color: #fff !default; +$td-dark-active-border-color: $td-dark; +$td-dark-btn-hover-bg: rgb(35, 38, 39) !default; +$td-dark-disabled-color: #6c757d !default; +$td-dark-alternate-color: rgba(232, 230, 227, 0.38) !default; +$td-dark-secondary-border-color: #ccc !default; +$td-dark-secondary-border-color-rgba: rgba(232, 230, 227, 0.2) !default; +$td-dark-primary-border-color: $td-dark !default; +$td-dark-text-shadow: 0 -1px 0 rgba(232, 230, 227, 0.25) !default; +$td-dark-dow-color: rgba(232, 230, 227, .50); \ No newline at end of file diff --git a/src/sass/tempus-dominus.scss b/src/sass/tempus-dominus.scss index 35bf7b510..9e3d6de27 100644 --- a/src/sass/tempus-dominus.scss +++ b/src/sass/tempus-dominus.scss @@ -1,18 +1,4 @@ -$td-timepicker-font-size: 1.2em !default; -$td-active-bg: #0d6efd !default; -$td-active-color: #fff !default; -$td-border-radius: 999px !default; -$td-btn-hover-bg: #e9ecef !default; -$td-disabled-color: #6c757d !default; -$td-alternate-color: rgba(0,0,0,.38) !default; -$td-secondary-border-color: #ccc !default; -$td-secondary-border-color-rgba: rgba(0, 0, 0, 0.2) !default; -$td-primary-border-color: white !default; -$td-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) !default; - -/* -todo look at how bootstrap loops through their vars to make a --root section - */ +@import 'variables'; .visually-hidden { position: absolute !important; @@ -32,16 +18,16 @@ todo look at how bootstrap loops through their vars to make a --root section width: 19rem; border-radius: 4px; display: none; - background-color: white; - /*border: 1px solid black;*/ + background-color: $td-widget-background; z-index: 9999; - box-shadow: 0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12); + box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); &.calendarWeeks { width: 21rem; - & .date-container-days { + & .date-container-days { grid-auto-columns: 12.5%; + grid-template-areas: "a a a a a a a a"; } } @@ -66,7 +52,7 @@ todo look at how bootstrap loops through their vars to make a --root section display: none; } - //end popper + //end popper &.show { display: block; @@ -126,7 +112,6 @@ todo look at how bootstrap loops through their vars to make a --root section .toggleMeridiem { text-align: center; - /*width: 38px;*/ height: 38px; } @@ -140,10 +125,12 @@ todo look at how bootstrap loops through their vars to make a --root section text-align: right; padding-right: 10px; } + & .previous { text-align: left; padding-left: 10px; } + & .picker-switch { text-align: center; } @@ -174,7 +161,7 @@ todo look at how bootstrap loops through their vars to make a --root section grid-auto-columns: calc(100% / 7); & .dow { - color: rgba(0,0,0,.50); + color: $td-dow-color; align-items: center; justify-content: center; text-align: center; @@ -193,10 +180,6 @@ todo look at how bootstrap loops through their vars to make a --root section } } - &.calendarWeeks .date-container-days { - grid-template-areas: "a a a a a a a a"; - } - .date-container-decades, .date-container-years, .date-container-months { display: grid; grid-template-areas: "a a a"; @@ -241,10 +224,15 @@ todo look at how bootstrap loops through their vars to make a --root section background-color: $td-active-bg; color: $td-active-color; text-shadow: $td-text-shadow; + + &.old, + &.new { + color: $td-active-color; + } } &.active.today:before { - border-bottom-color: #fff; + border-bottom-color: $td-active-border-color; } &.old, @@ -259,9 +247,6 @@ todo look at how bootstrap loops through their vars to make a --root section cursor: not-allowed; } - &.day { - } - &.today { position: relative; @@ -285,9 +270,9 @@ todo look at how bootstrap loops through their vars to make a --root section } button { - color: #fff; - background-color: #0d6efd; - border-color: #0d6efd; + color: $td-active-color; + background-color: $td-active-bg; + border-color: $td-active-bg; display: inline-block; font-weight: 400; line-height: 1.5; @@ -302,7 +287,7 @@ todo look at how bootstrap loops through their vars to make a --root section font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, - border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } &.tempus-dominus-widget-readonly { @@ -329,3 +314,83 @@ todo look at how bootstrap loops through their vars to make a --root section } } } + + +@media (prefers-color-scheme: dark) { + .tempus-dominus-widget { + color: $td-dark-font-color; + background-color: $td-dark-widget-background; + + [data-action] { + &.disabled, + &.disabled:hover { + color: $td-dark-disabled-color; + } + } + + .toolbar { + & div { + &:hover { + background: $td-dark-btn-hover-bg; + } + } + } + + .date-container-days { + & .dow { + color: $td-dark-dow-color; + } + + & .cw { + color: $td-dark-alternate-color; + } + } + + .date-container-decades, .date-container-years, .date-container-months, .date-container-days, + .time-container-clock, .time-container-hour, .time-container-minute, .time-container-second { + div:not(.no-highlight) { + &:hover { + background: $td-dark-btn-hover-bg; + } + + &.active { + background-color: $td-dark-active-bg; + color: $td-dark-active-color; + text-shadow: $td-dark-text-shadow; + + &.old, + &.new { + color: $td-dark-active-color; + } + } + + &.active.today:before { + border-bottom-color: $td-dark-active-border-color; + } + + &.old, + &.new { + color: $td-dark-alternate-color; + } + + &.disabled, + &.disabled:hover { + color: $td-dark-disabled-color; + } + + &.today { + &:before { + border-bottom-color: $td-dark-active-bg; + border-top-color: $td-dark-secondary-border-color-rgba; + } + } + } + } + + button { + color: $td-dark-active-color; + background-color: $td-dark-active-bg; + border-color: $td-dark-active-bg; + } + } +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 573ef1c9b..e6648c2a6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,9 @@ "lib": ["es6", "dom", "es2016", "es2017", "dom.iterable", "es2019"], "moduleResolution": "node", "rootDir": "./src/js", - "declarationDir": "./types" + "declarationDir": "./types", + "emitDecoratorMetadata": true, + "experimentalDecorators": true }, "include": ["./src/js/**/*.ts"], "exclude": ["node_modules"] diff --git a/types/actions.d.ts b/types/actions.d.ts index b51d9feef..d4ac371be 100644 --- a/types/actions.d.ts +++ b/types/actions.d.ts @@ -1,41 +1,31 @@ -import { TempusDominus } from './tempus-dominus'; +import ActionTypes from './utilities/action-types'; /** * */ export default class Actions { - private _context; - constructor(context: TempusDominus); + private optionsStore; + private validation; + private dates; + private display; + private _eventEmitters; + constructor(); /** * Performs the selected `action`. See ActionTypes * @param e This is normally a click event * @param action If not provided, then look for a [data-action] */ do(e: any, action?: ActionTypes): boolean; -} -export declare enum ActionTypes { - next = "next", - previous = "previous", - pickerSwitch = "pickerSwitch", - selectMonth = "selectMonth", - selectYear = "selectYear", - selectDecade = "selectDecade", - selectDay = "selectDay", - selectHour = "selectHour", - selectMinute = "selectMinute", - selectSecond = "selectSecond", - incrementHours = "incrementHours", - incrementMinutes = "incrementMinutes", - incrementSeconds = "incrementSeconds", - decrementHours = "decrementHours", - decrementMinutes = "decrementMinutes", - decrementSeconds = "decrementSeconds", - toggleMeridiem = "toggleMeridiem", - togglePicker = "togglePicker", - showClock = "showClock", - showHours = "showHours", - showMinutes = "showMinutes", - showSeconds = "showSeconds", - clear = "clear", - close = "close", - today = "today" + private handleNextPrevious; + /** + * After setting the value it will either show the clock or hide the widget. + * @param e + */ + private hideOrClock; + /** + * Common function to manipulate {@link lastPicked} by `unit`. + * @param lastPicked + * @param unit + * @param value Value to change by + */ + private manipulateAndSet; } diff --git a/types/dates.d.ts b/types/dates.d.ts index 40e5d35b9..6a8bdd0e0 100644 --- a/types/dates.d.ts +++ b/types/dates.d.ts @@ -1,9 +1,10 @@ -import { TempusDominus } from './tempus-dominus'; import { DateTime, Unit } from './datetime'; export default class Dates { private _dates; - private _context; - constructor(context: TempusDominus); + private optionsStore; + private validation; + private _eventEmitters; + constructor(); /** * Returns the array of selected dates */ @@ -17,18 +18,22 @@ export default class Dates { */ get lastPickedIndex(): number; /** - * Adds a new DateTime to selected dates array + * Formats a DateTime object to a string. Used when setting the input value. * @param date */ - add(date: DateTime): void; + formatInput(date: DateTime): string; /** * Tries to convert the provided value to a DateTime object. * If value is null|undefined then clear the value of the provided index (or 0). * @param value Value to convert or null|undefined * @param index When using multidates this is the index in the array - * @param from Used in the warning message, useful for debugging. */ - set(value: any, index?: number, from?: string): void; + setFromInput(value: any, index?: number): void; + /** + * Adds a new DateTime to selected dates array + * @param date + */ + add(date: DateTime): void; /** * Returns true if the `targetDate` is part of the selected dates array. * If `unit` is provided then a granularity to that unit will be used. @@ -55,7 +60,7 @@ export default class Dates { */ static getStartEndYear(factor: number, year: number): [number, number, number]; /** - * Do not use direectly. Attempts to either clear or set the `target` date at `index`. + * Attempts to either clear or set the `target` date at `index`. * If the `target` is null then the date will be cleared. * If multi-date is being used then it will be removed from the array. * If `target` is valid and multi-date is used then if `index` is @@ -63,10 +68,5 @@ export default class Dates { * @param target * @param index */ - _setValue(target?: DateTime, index?: number): void; - /** - * Returns a format object based on the granularity of `unit` - * @param unit - */ - static getFormatByUnit(unit: Unit): object; + setValue(target?: DateTime, index?: number): void; } diff --git a/types/datetime.d.ts b/types/datetime.d.ts index 64e570c0f..96b81628a 100644 --- a/types/datetime.d.ts +++ b/types/datetime.d.ts @@ -11,6 +11,7 @@ export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions { dateStyle?: 'short' | 'medium' | 'long' | 'full'; numberingSystem?: string; } +export declare const getFormatByUnit: (unit: Unit) => object; /** * For the most part this object behaves exactly the same way * as the native Date object with a little extra spice. @@ -49,7 +50,7 @@ export declare class DateTime extends Date { * would return April 30, 2021, 11:59:59.999 PM * @param unit */ - endOf(unit: Unit | 'weekDay'): this; + endOf(unit: Unit | 'weekDay', startOfTheWeek?: number): this; /** * Change a {@link unit} value. Value can be positive or negative * Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).manipulate(1, 'month') diff --git a/types/display/calendar/date-display.d.ts b/types/display/calendar/date-display.d.ts index 71a1a4673..560771180 100644 --- a/types/display/calendar/date-display.d.ts +++ b/types/display/calendar/date-display.d.ts @@ -1,20 +1,22 @@ -import { TempusDominus } from '../../tempus-dominus'; +import { Paint } from '../index'; /** * Creates and updates the grid for `date` */ export default class DateDisplay { - private _context; - constructor(context: TempusDominus); + private optionsStore; + private dates; + private validation; + constructor(); /** * Build the container html for the display * @private */ - get _picker(): HTMLElement; + getPicker(): HTMLElement; /** * Populates the grid and updates enabled states * @private */ - _update(): void; + _update(widget: HTMLElement, paint: Paint): void; /*** * Generates an html row that contains the days of the week. * @private diff --git a/types/display/calendar/decade-display.d.ts b/types/display/calendar/decade-display.d.ts index 737ed9f3f..11587f8d4 100644 --- a/types/display/calendar/decade-display.d.ts +++ b/types/display/calendar/decade-display.d.ts @@ -1,20 +1,22 @@ -import { TempusDominus } from '../../tempus-dominus'; +import { Paint } from '../index'; /** * Creates and updates the grid for `seconds` */ export default class DecadeDisplay { - private _context; private _startDecade; private _endDecade; - constructor(context: TempusDominus); + private optionsStore; + private dates; + private validation; + constructor(); /** * Build the container html for the display * @private */ - get _picker(): HTMLDivElement; + getPicker(): HTMLDivElement; /** * Populates the grid and updates enabled states * @private */ - _update(): void; + _update(widget: HTMLElement, paint: Paint): void; } diff --git a/types/display/calendar/month-display.d.ts b/types/display/calendar/month-display.d.ts index ba7da7997..54580a22e 100644 --- a/types/display/calendar/month-display.d.ts +++ b/types/display/calendar/month-display.d.ts @@ -1,18 +1,20 @@ -import { TempusDominus } from '../../tempus-dominus'; +import { Paint } from '../index'; /** * Creates and updates the grid for `month` */ export default class MonthDisplay { - private _context; - constructor(context: TempusDominus); + private optionsStore; + private dates; + private validation; + constructor(); /** * Build the container html for the display * @private */ - get _picker(): HTMLElement; + getPicker(): HTMLElement; /** * Populates the grid and updates enabled states * @private */ - _update(): void; + _update(widget: HTMLElement, paint: Paint): void; } diff --git a/types/display/calendar/year-display.d.ts b/types/display/calendar/year-display.d.ts index 5e669faef..35e646342 100644 --- a/types/display/calendar/year-display.d.ts +++ b/types/display/calendar/year-display.d.ts @@ -1,20 +1,22 @@ -import { TempusDominus } from '../../tempus-dominus'; +import { Paint } from '../index'; /** * Creates and updates the grid for `year` */ export default class YearDisplay { - private _context; private _startYear; private _endYear; - constructor(context: TempusDominus); + private optionsStore; + private dates; + private validation; + constructor(); /** * Build the container html for the display * @private */ - get _picker(): HTMLElement; + getPicker(): HTMLElement; /** * Populates the grid and updates enabled states * @private */ - _update(): void; + _update(widget: HTMLElement, paint: Paint): void; } diff --git a/types/display/index.d.ts b/types/display/index.d.ts index ef508512b..b6fa6daa4 100644 --- a/types/display/index.d.ts +++ b/types/display/index.d.ts @@ -1,22 +1,33 @@ -import { Unit } from '../datetime'; -import { TempusDominus } from '../tempus-dominus'; +import DateDisplay from './calendar/date-display'; +import MonthDisplay from './calendar/month-display'; +import YearDisplay from './calendar/year-display'; +import DecadeDisplay from './calendar/decade-display'; +import TimeDisplay from './time/time-display'; +import HourDisplay from './time/hour-display'; +import MinuteDisplay from './time/minute-display'; +import SecondDisplay from './time/second-display'; +import { DateTime, Unit } from '../datetime'; +import { ViewUpdateValues } from '../utilities/event-emitter'; /** * Main class for all things display related. */ export default class Display { - private _context; - private _dateDisplay; - private _monthDisplay; - private _yearDisplay; - private _decadeDisplay; - private _timeDisplay; private _widget; - private _hourDisplay; - private _minuteDisplay; - private _secondDisplay; private _popperInstance; private _isVisible; - constructor(context: TempusDominus); + private optionsStore; + private validation; + private dates; + dateDisplay: DateDisplay; + monthDisplay: MonthDisplay; + yearDisplay: YearDisplay; + decadeDisplay: DecadeDisplay; + timeDisplay: TimeDisplay; + hourDisplay: HourDisplay; + minuteDisplay: MinuteDisplay; + secondDisplay: SecondDisplay; + private _eventEmitters; + constructor(); /** * Returns the widget body or undefined * @private @@ -32,7 +43,15 @@ export default class Display { * @param unit * @private */ - _update(unit: Unit | 'clock' | 'calendar' | 'all'): void; + _update(unit: ViewUpdateValues): void; + /** + * Allows developers to add/remove classes from an element. + * @param _unit + * @param _date + * @param _classes + * @param _element + */ + paint(_unit: Unit | 'decade', _date: DateTime, _classes: string[], _element: HTMLElement): void; /** * Shows the picker and creates a Popper instance if needed. * Add document click event to hide when clicking outside the picker. @@ -78,12 +97,12 @@ export default class Display { * Get the toolbar html based on options like buttons.today * @private */ - get _toolbar(): HTMLElement[]; + getToolbarElements(): HTMLElement[]; /*** * Builds the base header template with next and previous icons * @private */ - get _headTemplate(): HTMLElement; + getHeadTemplate(): HTMLElement; /** * Builds an icon tag as either an `` * or with icons.type is `sprites` then an svg tag instead @@ -110,3 +129,4 @@ export default class Display { */ _rebuild(): void; } +export declare type Paint = (unit: Unit | 'decade', innerDate: DateTime, classes: string[], element: HTMLElement) => void; diff --git a/types/display/time/hour-display.d.ts b/types/display/time/hour-display.d.ts index b91a5348e..740b9ed06 100644 --- a/types/display/time/hour-display.d.ts +++ b/types/display/time/hour-display.d.ts @@ -1,18 +1,19 @@ -import { TempusDominus } from '../../tempus-dominus'; +import { Paint } from '../index'; /** * Creates and updates the grid for `hours` */ export default class HourDisplay { - private _context; - constructor(context: TempusDominus); + private optionsStore; + private validation; + constructor(); /** * Build the container html for the display * @private */ - get _picker(): HTMLElement; + getPicker(): HTMLElement; /** * Populates the grid and updates enabled states * @private */ - _update(): void; + _update(widget: HTMLElement, paint: Paint): void; } diff --git a/types/display/time/minute-display.d.ts b/types/display/time/minute-display.d.ts index 804871169..b1eb8b2d7 100644 --- a/types/display/time/minute-display.d.ts +++ b/types/display/time/minute-display.d.ts @@ -1,18 +1,19 @@ -import { TempusDominus } from '../../tempus-dominus'; +import { Paint } from '../index'; /** * Creates and updates the grid for `minutes` */ export default class MinuteDisplay { - private _context; - constructor(context: TempusDominus); + private optionsStore; + private validation; + constructor(); /** * Build the container html for the display * @private */ - get _picker(): HTMLElement; + getPicker(): HTMLElement; /** * Populates the grid and updates enabled states * @private */ - _update(): void; + _update(widget: HTMLElement, paint: Paint): void; } diff --git a/types/display/time/second-display.d.ts b/types/display/time/second-display.d.ts index 827350d07..275152220 100644 --- a/types/display/time/second-display.d.ts +++ b/types/display/time/second-display.d.ts @@ -1,18 +1,19 @@ -import { TempusDominus } from '../../tempus-dominus'; +import { Paint } from '../index'; /** * Creates and updates the grid for `seconds` */ export default class secondDisplay { - private _context; - constructor(context: TempusDominus); + private optionsStore; + private validation; + constructor(); /** * Build the container html for the display * @private */ - get _picker(): HTMLElement; + getPicker(): HTMLElement; /** * Populates the grid and updates enabled states * @private */ - _update(): void; + _update(widget: HTMLElement, paint: Paint): void; } diff --git a/types/display/time/time-display.d.ts b/types/display/time/time-display.d.ts index f6c3e7d98..4ae29b232 100644 --- a/types/display/time/time-display.d.ts +++ b/types/display/time/time-display.d.ts @@ -1,22 +1,23 @@ -import { TempusDominus } from '../../tempus-dominus'; /** * Creates the clock display */ export default class TimeDisplay { - private _context; private _gridColumns; - constructor(context: TempusDominus); + private optionsStore; + private validation; + private dates; + constructor(); /** * Build the container html for the clock display * @private */ - get _picker(): HTMLElement; + getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement; /** * Populates the various elements with in the clock display * like the current hour and if the manipulation icons are enabled. * @private */ - _update(): void; + _update(widget: HTMLElement): void; /** * Creates the table for the clock display depending on what options are selected. * @private diff --git a/types/tempus-dominus.d.ts b/types/tempus-dominus.d.ts index 8be350717..a987145a4 100644 --- a/types/tempus-dominus.d.ts +++ b/types/tempus-dominus.d.ts @@ -1,35 +1,25 @@ import Display from './display/index'; -import Validation from './validation'; import Dates from './dates'; -import Actions from './actions'; -import { DefaultOptions } from './conts'; import { DateTime, DateTimeFormatOptions, Unit } from './datetime'; -import Namespace from './namespace'; -import Options from './options'; -import { BaseEvent } from './event-types'; +import Namespace from './utilities/namespace'; +import Options from './utilities/options'; +import DefaultOptions from './utilities/default-options'; /** * A robust and powerful date/time picker component. */ declare class TempusDominus { - dates: Dates; - _options: Options; - _currentViewMode: number; _subscribers: { [key: string]: ((event: any) => {})[]; }; - _element: HTMLElement; - _input: HTMLInputElement; - _unset: boolean; - _minViewModeNumber: number; - _display: Display; - _validation: Validation; - _action: Actions; private _isDisabled; - private _notifyChangeEventContext; private _toggle; private _currentPromptTimeTimeout; + private actions; + private optionsStore; + private _eventEmitters; + display: Display; + dates: Dates; constructor(element: HTMLElement, options?: Options); - _viewDate: DateTime; get viewDate(): DateTime; /** * Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead. @@ -83,19 +73,26 @@ declare class TempusDominus { * Hides the picker and removes event listeners */ dispose(): void; + /** + * Updates the options to use the provided language. + * THe language file must be loaded first. + * @param language + */ + locale(language: string): void; /** * Triggers an event like ChangeEvent when the picker has updated the value * of a selected date. * @param event Accepts a BaseEvent object. * @private */ - _triggerEvent(event: BaseEvent): void; + private _triggerEvent; + private _publish; /** * Fires a ViewUpdate event when, for example, the month view is changed. * @param {Unit} unit * @private */ - _viewUpdate(unit: Unit): void; + private _viewUpdate; private _unsubscribe; /** * Merges two Option objects together and validates options type @@ -135,4 +132,17 @@ declare class TempusDominus { */ private _toggleClickEvent; } -export { TempusDominus, Namespace, DefaultOptions, DateTime, Options, Unit, DateTimeFormatOptions, }; +/** + * Called from a locale plugin. + * @param locale locale object for localization options + * @param name name of the language e.g 'ru', 'en-gb' + */ +declare const loadLocale: (locale: any) => void; +/** + * A sets the global localization options to the provided locale name. + * `locadLocale` MUST be called first. + * @param locale + */ +declare const locale: (locale: string) => void; +declare const extend: (plugin: any, option: any) => any; +export { TempusDominus, extend, loadLocale, locale, Namespace, DefaultOptions, DateTime, Options, Unit, DateTimeFormatOptions, }; diff --git a/types/utilities/action-types.d.ts b/types/utilities/action-types.d.ts new file mode 100644 index 000000000..c54bd82a4 --- /dev/null +++ b/types/utilities/action-types.d.ts @@ -0,0 +1,28 @@ +declare enum ActionTypes { + next = "next", + previous = "previous", + changeCalendarView = "changeCalendarView", + selectMonth = "selectMonth", + selectYear = "selectYear", + selectDecade = "selectDecade", + selectDay = "selectDay", + selectHour = "selectHour", + selectMinute = "selectMinute", + selectSecond = "selectSecond", + incrementHours = "incrementHours", + incrementMinutes = "incrementMinutes", + incrementSeconds = "incrementSeconds", + decrementHours = "decrementHours", + decrementMinutes = "decrementMinutes", + decrementSeconds = "decrementSeconds", + toggleMeridiem = "toggleMeridiem", + togglePicker = "togglePicker", + showClock = "showClock", + showHours = "showHours", + showMinutes = "showMinutes", + showSeconds = "showSeconds", + clear = "clear", + close = "close", + today = "today" +} +export default ActionTypes; diff --git a/types/utilities/actionTypes.d.ts b/types/utilities/actionTypes.d.ts new file mode 100644 index 000000000..f3b9091f4 --- /dev/null +++ b/types/utilities/actionTypes.d.ts @@ -0,0 +1,27 @@ +export declare enum ActionTypes { + next = "next", + previous = "previous", + pickerSwitch = "pickerSwitch", + selectMonth = "selectMonth", + selectYear = "selectYear", + selectDecade = "selectDecade", + selectDay = "selectDay", + selectHour = "selectHour", + selectMinute = "selectMinute", + selectSecond = "selectSecond", + incrementHours = "incrementHours", + incrementMinutes = "incrementMinutes", + incrementSeconds = "incrementSeconds", + decrementHours = "decrementHours", + decrementMinutes = "decrementMinutes", + decrementSeconds = "decrementSeconds", + toggleMeridiem = "toggleMeridiem", + togglePicker = "togglePicker", + showClock = "showClock", + showHours = "showHours", + showMinutes = "showMinutes", + showSeconds = "showSeconds", + clear = "clear", + close = "close", + today = "today" +} diff --git a/types/utilities/calendar-modes.d.ts b/types/utilities/calendar-modes.d.ts new file mode 100644 index 000000000..1ffb0c114 --- /dev/null +++ b/types/utilities/calendar-modes.d.ts @@ -0,0 +1,9 @@ +import { Unit } from '../datetime'; +import ViewMode from './view-mode'; +declare const CalendarModes: { + name: keyof ViewMode; + className: string; + unit: Unit; + step: number; +}[]; +export default CalendarModes; diff --git a/types/conts.d.ts b/types/utilities/conts.d.ts similarity index 59% rename from types/conts.d.ts rename to types/utilities/conts.d.ts index 388533a0a..b513d4d81 100644 --- a/types/conts.d.ts +++ b/types/utilities/conts.d.ts @@ -1,5 +1,4 @@ -import { Unit } from './datetime'; -import Namespace from './namespace'; +import { Unit } from '../datetime'; import Options from './options'; declare const DefaultOptions: Options; declare const DatePickerModes: { @@ -8,4 +7,4 @@ declare const DatePickerModes: { unit: Unit; step: number; }[]; -export { DefaultOptions, DatePickerModes, Namespace }; +export { DefaultOptions, DatePickerModes }; diff --git a/types/utilities/default-options.d.ts b/types/utilities/default-options.d.ts new file mode 100644 index 000000000..383758f40 --- /dev/null +++ b/types/utilities/default-options.d.ts @@ -0,0 +1,3 @@ +import Options from './options'; +declare const DefaultOptions: Options; +export default DefaultOptions; diff --git a/types/errors.d.ts b/types/utilities/errors.d.ts similarity index 100% rename from types/errors.d.ts rename to types/utilities/errors.d.ts diff --git a/types/utilities/event-emitter.d.ts b/types/utilities/event-emitter.d.ts new file mode 100644 index 000000000..daf5921ee --- /dev/null +++ b/types/utilities/event-emitter.d.ts @@ -0,0 +1,21 @@ +import { Unit } from '../datetime'; +import ActionTypes from './action-types'; +import { BaseEvent } from './event-types'; +export declare type ViewUpdateValues = Unit | 'clock' | 'calendar' | 'all'; +export declare class EventEmitter { + private subscribers; + subscribe(callback: (value: T) => void): any; + unsubscribe(index: number): void; + emit(value?: T): void; + destory(): void; +} +export declare class EventEmitters { + triggerEvent: EventEmitter; + viewUpdate: EventEmitter; + updateDisplay: EventEmitter; + action: EventEmitter<{ + e: any; + action?: ActionTypes; + }>; + destory(): void; +} diff --git a/types/event-types.d.ts b/types/utilities/event-types.d.ts similarity index 87% rename from types/event-types.d.ts rename to types/utilities/event-types.d.ts index 5b03fcb94..bc621f7f2 100644 --- a/types/event-types.d.ts +++ b/types/utilities/event-types.d.ts @@ -1,6 +1,8 @@ -import { DateTime, Unit } from './datetime'; +import { DateTime } from '../datetime'; +import ViewMode from './view-mode'; interface BaseEvent { type: string; + viewMode?: keyof ViewMode; } /** * Triggers when setValue fails because of validation rules etc. @@ -30,7 +32,6 @@ interface ChangeEvent extends BaseEvent { * Triggers when the view is changed for instance from month to year. */ interface ViewUpdateEvent extends BaseEvent { - change: Unit; viewDate: DateTime; } export { BaseEvent, FailEvent, HideEvent, ChangeEvent, ViewUpdateEvent }; diff --git a/types/namespace.d.ts b/types/utilities/namespace.d.ts similarity index 100% rename from types/namespace.d.ts rename to types/utilities/namespace.d.ts diff --git a/types/options.d.ts b/types/utilities/options.d.ts similarity index 83% rename from types/options.d.ts rename to types/utilities/options.d.ts index b126e1833..6502c5241 100644 --- a/types/options.d.ts +++ b/types/utilities/options.d.ts @@ -1,5 +1,22 @@ -import { DateTime, DateTimeFormatOptions } from './datetime'; -import { TempusDominus } from './tempus-dominus'; +import { DateTime, DateTimeFormatOptions } from '../datetime'; +import ViewMode from './view-mode'; +export declare class OptionsStore { + options: Options; + element: HTMLElement; + viewDate: DateTime; + input: HTMLInputElement; + unset: boolean; + private _currentCalendarViewMode; + get currentCalendarViewMode(): number; + set currentCalendarViewMode(value: number); + /** + * When switching back to the calendar from the clock, + * this sets currentView to the correct calendar view. + */ + refreshCurrentView(): void; + minimumCalendarViewMode: number; + currentView: keyof ViewMode; +} export default interface Options { restrictions?: { minDate?: DateTime; @@ -46,7 +63,7 @@ export default interface Options { down?: string; close?: string; }; - viewMode?: 'clock' | 'calendar' | 'months' | 'years' | 'decades'; + viewMode?: keyof ViewMode | undefined; sideBySide?: boolean; inline?: boolean; keepOpen?: boolean; @@ -93,10 +110,6 @@ export default interface Options { multipleDatesSeparator?: string; promptTimeOnDateChange?: boolean; promptTimeOnDateChangeTransitionDelay?: number; - hooks?: { - inputParse?: (context: TempusDominus, value: any) => DateTime; - inputFormat?: (context: TempusDominus, date: DateTime) => string; - }; meta?: {}; container?: HTMLElement; } @@ -114,6 +127,7 @@ export declare class OptionConverter { * @param optionName Provides text to error messages e.g. disabledDates * @param value Option value * @param providedType Used to provide text to error messages + * @param locale */ static _typeCheckDateArray(optionName: string, value: any, providedType: string, locale?: string): void; /** @@ -128,9 +142,9 @@ export declare class OptionConverter { * @param d value to convert * @param optionName Provides text to error messages e.g. disabledDates */ - static _dateConversion(d: any, optionName: string): DateTime; + static dateConversion(d: any, optionName: string): DateTime; private static _flatback; - private static get _flattenDefaultOptions(); + private static getFlattenDefaultOptions; /** * Some options conflict like min/max date. Verify that these kinds of options * are set correctly. diff --git a/types/utilities/service-locator.d.ts b/types/utilities/service-locator.d.ts new file mode 100644 index 000000000..4f6b2babe --- /dev/null +++ b/types/utilities/service-locator.d.ts @@ -0,0 +1,8 @@ +export declare type Constructable = new (...args: any[]) => T; +declare class ServiceLocator { + private cache; + locate(identifier: Constructable): T; +} +export declare const setupServiceLocator: () => void; +export declare let serviceLocator: ServiceLocator; +export {}; diff --git a/types/utilities/view-mode.d.ts b/types/utilities/view-mode.d.ts new file mode 100644 index 000000000..7f680b5db --- /dev/null +++ b/types/utilities/view-mode.d.ts @@ -0,0 +1,8 @@ +declare type ViewMode = { + clock: any; + calendar: any; + months: any; + years: any; + decades: any; +}; +export default ViewMode; diff --git a/types/validation.d.ts b/types/validation.d.ts index 373b4189d..8b43aeaff 100644 --- a/types/validation.d.ts +++ b/types/validation.d.ts @@ -1,11 +1,10 @@ -import { TempusDominus } from './tempus-dominus'; import { DateTime, Unit } from './datetime'; /** * Main class for date validation rules based on the options provided. */ export default class Validation { - private _context; - constructor(context: TempusDominus); + private optionsStore; + constructor(); /** * Checks to see if the target date is valid based on the rules provided in the options. * Granularity can be provide to chek portions of the date instead of the whole.