Changements dans les modules (nouvelle version Express, mysql, ..)
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
node_modules.zip
|
||||
.DS_Store
|
||||
node_modules/bcrypt.zip
|
||||
.env
|
||||
.env.prod
|
||||
|
||||
17
app.js
17
app.js
@@ -1,5 +1,5 @@
|
||||
const express = require('express')
|
||||
const mysql = require("mysql")
|
||||
const mysql = require("mysql2")
|
||||
const dotenv = require('dotenv')
|
||||
const app = express()
|
||||
const path = require("path")
|
||||
@@ -30,19 +30,10 @@ db.connect((error) => {
|
||||
app.set('view engine', 'hbs');
|
||||
app.use(express.static(publicDir));
|
||||
app.use('/css', express.static(__dirname + '/node_modules/bootstrap/dist/css'));
|
||||
app.use('/css', express.static(__dirname + '/node_modules/@eonasdan/tempus-dominus/dist/css'));
|
||||
app.use('/js', express.static(__dirname + '/node_modules/@eonasdan/tempus-dominus/dist/js'));
|
||||
app.use(bodyParser.urlencoded({extended: false}));
|
||||
app.use(express.json())
|
||||
|
||||
|
||||
async function recupListeSessions() {
|
||||
let today = functions.getNowDate("yyyymmdd");
|
||||
|
||||
// On récupère la liste des sessions actives et pour lesquelles il reste de la place
|
||||
db.query('SELECT ID, topic, DATE_FORMAT(scheduled_on, "%d/%m/%Y") as "date", DATE_FORMAT(scheduled_on, "%Hh%i") as "heure", IF(nb_of_attended-nb_of_participants=0, true, false) as "maxAtteint" FROM session WHERE DATE_FORMAT(scheduled_on, "%Y%m%d") >= ?', [today], async (error, result) => {
|
||||
if(error){ console.log(error); }
|
||||
return result;
|
||||
});
|
||||
}
|
||||
app.use(bodyParser.json());
|
||||
|
||||
|
||||
// ******************************************* Arrivée sur la page d'accueil *******************************************
|
||||
|
||||
687
node_modules/.package-lock.json
generated
vendored
687
node_modules/.package-lock.json
generated
vendored
@@ -4,6 +4,22 @@
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@eonasdan/tempus-dominus": {
|
||||
"version": "6.7.19",
|
||||
"resolved": "https://registry.npmjs.org/@eonasdan/tempus-dominus/-/tempus-dominus-6.7.19.tgz",
|
||||
"integrity": "sha512-rUHm1lTZLWdYUBAJJvic1p4Df/0h0rqV523r+DZtCkfty2ejf9NDsTYw3Vi0acSCt2kqwXom9R8jslzxxVcfOw==",
|
||||
"funding": {
|
||||
"url": "https://ko-fi.com/eonasdan"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@popperjs/core": "^2.11.6"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@popperjs/core\"": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
|
||||
@@ -41,7 +57,6 @@
|
||||
"version": "2.11.8",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
@@ -53,12 +68,12 @@
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
||||
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz",
|
||||
"integrity": "sha512-R190A3EzrS4huFOVZajhXCYZt5p5yrkaQOB4nsWzfth0cYaDcSN5J86l58FJ1dt7igp37fB/QhnuFkGAJmr+eg==",
|
||||
"dependencies": {
|
||||
"mime-types": "~2.1.34",
|
||||
"negotiator": "0.6.3"
|
||||
"mime-types": "~2.1.6",
|
||||
"negotiator": "0.5.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
@@ -147,9 +162,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/array-flatten": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.0.tgz",
|
||||
"integrity": "sha512-B9Cdx2PIqexNnAWplLzRP89pa0vcEMkHGKr6/CY0ZzuI1Z5o6E392/7OtSFyrzEIXZ/pDdoGRoDaWJHg9mJMaA=="
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
@@ -169,14 +184,6 @@
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bignumber.js": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
|
||||
"integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
@@ -186,12 +193,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "1.20.1",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
|
||||
"integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
|
||||
"version": "1.20.2",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
|
||||
"integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"content-type": "~1.0.4",
|
||||
"content-type": "~1.0.5",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"destroy": "1.2.0",
|
||||
@@ -199,7 +206,7 @@
|
||||
"iconv-lite": "0.4.24",
|
||||
"on-finished": "2.4.1",
|
||||
"qs": "6.11.0",
|
||||
"raw-body": "2.5.1",
|
||||
"raw-body": "2.5.2",
|
||||
"type-is": "~1.6.18",
|
||||
"unpipe": "1.0.0"
|
||||
},
|
||||
@@ -320,12 +327,9 @@
|
||||
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
|
||||
},
|
||||
"node_modules/content-disposition": {
|
||||
"version": "0.5.4",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
||||
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "5.2.1"
|
||||
},
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz",
|
||||
"integrity": "sha512-PWzG8GssMHTPSLBoOeK5MvPPJeWU5ZVX8omvJC16BUH/nUX6J/jM/hgm/mrPWzTXVV3B3OoBhFdHXyGLU4TgUw==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -339,11 +343,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cookie": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
|
||||
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.3.tgz",
|
||||
"integrity": "sha512-mWkFhcL+HVG1KjeCjEBVJJ7s4sAGMLiBDFSDs4bzzvgLZt7rW8BhP6XV/8b1+pNvx/skd3yYxPuaF3Z6LlQzyw==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/cookie-parser": {
|
||||
@@ -371,11 +375,6 @@
|
||||
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
||||
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
||||
},
|
||||
"node_modules/core-util-is": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"node_modules/dateformat": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz",
|
||||
@@ -410,6 +409,14 @@
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
|
||||
},
|
||||
"node_modules/denque": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
||||
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/depd": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||
@@ -456,68 +463,101 @@
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||
},
|
||||
"node_modules/encodeurl": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-html": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz",
|
||||
"integrity": "sha512-J5ahyCRC4liskWVAfkmosNWfG0eHQxI0W+Ko7k3cZaYVMfgt05dwZ68vw6S/TZM1BPvuTv3kq6CRCb7WWtBUVA=="
|
||||
},
|
||||
"node_modules/etag": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz",
|
||||
"integrity": "sha512-Mbv5pNpLNPrm1b4rzZlZlfTRpdDr31oiD43N362sIyvSWVNu5Du33EcJGzvEV4YdYLuENB1HzND907cQkFmXNw==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.18.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
|
||||
"integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
|
||||
"version": "5.0.0-alpha.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-5.0.0-alpha.2.tgz",
|
||||
"integrity": "sha512-dCv747cpHLEUBzHm5MR8y6eq43izDxmfWtpq1oaTY3vlW3nlLugPob1rzg7/mul/a7o/Svg6SNx/oc/3fz61mA==",
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.1",
|
||||
"content-disposition": "0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.5.0",
|
||||
"accepts": "~1.2.10",
|
||||
"array-flatten": "1.1.0",
|
||||
"content-disposition": "0.5.0",
|
||||
"content-type": "~1.0.1",
|
||||
"cookie": "0.1.3",
|
||||
"cookie-signature": "1.0.6",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"encodeurl": "~1.0.2",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"finalhandler": "1.2.0",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "2.0.0",
|
||||
"merge-descriptors": "1.0.1",
|
||||
"methods": "~1.1.2",
|
||||
"on-finished": "2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"path-to-regexp": "0.1.7",
|
||||
"proxy-addr": "~2.0.7",
|
||||
"qs": "6.11.0",
|
||||
"range-parser": "~1.2.1",
|
||||
"safe-buffer": "5.2.1",
|
||||
"send": "0.18.0",
|
||||
"serve-static": "1.15.0",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"type-is": "~1.6.18",
|
||||
"utils-merge": "1.0.1",
|
||||
"vary": "~1.1.2"
|
||||
"debug": "~2.2.0",
|
||||
"depd": "~1.0.1",
|
||||
"escape-html": "1.0.2",
|
||||
"etag": "~1.7.0",
|
||||
"finalhandler": "0.4.0",
|
||||
"fresh": "0.3.0",
|
||||
"merge-descriptors": "1.0.0",
|
||||
"methods": "~1.1.1",
|
||||
"on-finished": "~2.3.0",
|
||||
"parseurl": "~1.3.0",
|
||||
"path-is-absolute": "1.0.0",
|
||||
"path-to-regexp": "0.1.6",
|
||||
"proxy-addr": "~1.0.8",
|
||||
"qs": "4.0.0",
|
||||
"range-parser": "~1.0.2",
|
||||
"router": "~1.1.2",
|
||||
"send": "0.13.0",
|
||||
"serve-static": "~1.10.0",
|
||||
"type-is": "~1.6.4",
|
||||
"utils-merge": "1.0.0",
|
||||
"vary": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/debug": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
|
||||
"dependencies": {
|
||||
"ms": "0.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/depd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz",
|
||||
"integrity": "sha512-OEWAMbCkK9IWQ8pfTvHBhCSqHgR+sk5pbiYqq0FqfARG4Cy+cRsCbITx6wh5pcsmfBPiJAcbd98tfdz5fnBbag==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/ms": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
|
||||
},
|
||||
"node_modules/express/node_modules/on-finished": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||
"integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
|
||||
"dependencies": {
|
||||
"ee-first": "1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/path-is-absolute": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz",
|
||||
"integrity": "sha512-hUUTsB/vByumPhn43R+Azhsx4TQPvyQqW+XyCR6UA8ae+FGIjf5Oygj6o/FYK4ZdwnrXth2eIBKk4YlrUU0ElQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/qs": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz",
|
||||
"integrity": "sha512-8MPmJ83uBOPsQj5tQCv4g04/nTiY+d17yl9o3Bw73vC6XlEm2POIRRlOgWJ8i74bkGLII670cDJJZkgiZ2sIkg=="
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
@@ -530,39 +570,60 @@
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz",
|
||||
"integrity": "sha512-jJU2WE88OqUvwAIf/1K2G2fTdKKZ8LvSwYQyFFekDcmBnBmht38enbcmErnA7iNZktcEo/o2JAHYbe1QDOAgaA==",
|
||||
"dependencies": {
|
||||
"debug": "2.6.9",
|
||||
"encodeurl": "~1.0.2",
|
||||
"escape-html": "~1.0.3",
|
||||
"on-finished": "2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"statuses": "2.0.1",
|
||||
"debug": "~2.2.0",
|
||||
"escape-html": "1.0.2",
|
||||
"on-finished": "~2.3.0",
|
||||
"unpipe": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler/node_modules/debug": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
|
||||
"dependencies": {
|
||||
"ms": "0.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/finalhandler/node_modules/ms": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
|
||||
},
|
||||
"node_modules/finalhandler/node_modules/on-finished": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||
"integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
|
||||
"dependencies": {
|
||||
"ee-first": "1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/foreachasync": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
|
||||
"integrity": "sha512-J+ler7Ta54FwwNcx6wQRDhTIbNeyDcARMkOcguEqnEdtm0jKvN3Li3PDAb2Du3ubJYEWfYL83XMROXdsXAXycw=="
|
||||
},
|
||||
"node_modules/forwarded": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
||||
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
|
||||
"integrity": "sha512-Ua9xNhH0b8pwE3yRbFfXJvfdWF0UHNCdeyb2sbi9Ul/M+r3PTdrz7Cv4SCfZRMjmzEM9PhraqfZFbGTIg3OMyA==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/fresh": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz",
|
||||
"integrity": "sha512-akx5WBKAwMSg36qoHTuMMVncHWctlaDGslJASDYAhoLrzDUDCjZlOngNa/iC6lPm9aA0qk8pN5KnpmbJHSIIQQ==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -634,6 +695,14 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/generate-function": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
||||
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
|
||||
"dependencies": {
|
||||
"is-property": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
|
||||
@@ -858,9 +927,9 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/ipaddr.js": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
||||
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz",
|
||||
"integrity": "sha512-wBj+q+3uP78gMowwWgFLAYm/q4x5goyZmDsmuvyz+nd1u0D/ghgXXtc1OkgmTzSiWT101kiqGacwFk9eGQw6xQ==",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
@@ -911,10 +980,15 @@
|
||||
"node": ">=0.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
||||
"node_modules/is-property": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
||||
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
|
||||
},
|
||||
"node_modules/long": {
|
||||
"version": "5.2.3",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
|
||||
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
@@ -958,9 +1032,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.0.tgz",
|
||||
"integrity": "sha512-YJiZmTZTkrqvgefMsWdioTKsZdHnfAhHHkEdPg+4PCqMJEGHQo5iJQjEbMv3XyBZ6y3Z2Rj1mqq1WNKq9e0yNw=="
|
||||
},
|
||||
"node_modules/methods": {
|
||||
"version": "1.1.2",
|
||||
@@ -971,14 +1045,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mime": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
|
||||
"integrity": "sha512-sAaYXszED5ALBt665F0wMQCUXpGuZsGdopoqcHPdL39ZYdi7uHoZlhrfZfhv8WzivhBzr/oXwaj+yiK5wY8MXQ==",
|
||||
"bin": {
|
||||
"mime": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
@@ -1066,29 +1137,66 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
},
|
||||
"node_modules/mysql": {
|
||||
"version": "2.18.1",
|
||||
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
|
||||
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
|
||||
"node_modules/mysql2": {
|
||||
"version": "3.6.5",
|
||||
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.5.tgz",
|
||||
"integrity": "sha512-pS/KqIb0xlXmtmqEuTvBXTmLoQ5LmAz5NW/r8UyQ1ldvnprNEj3P9GbmuQQ2J0A4LO+ynotGi6TbscPa8OUb+w==",
|
||||
"dependencies": {
|
||||
"bignumber.js": "9.0.0",
|
||||
"readable-stream": "2.3.7",
|
||||
"safe-buffer": "5.1.2",
|
||||
"sqlstring": "2.3.1"
|
||||
"denque": "^2.1.0",
|
||||
"generate-function": "^2.3.1",
|
||||
"iconv-lite": "^0.6.3",
|
||||
"long": "^5.2.1",
|
||||
"lru-cache": "^8.0.0",
|
||||
"named-placeholders": "^1.1.3",
|
||||
"seq-queue": "^0.0.5",
|
||||
"sqlstring": "^2.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
"node": ">= 8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mysql/node_modules/safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
"node_modules/mysql2/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mysql2/node_modules/lru-cache": {
|
||||
"version": "8.0.5",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz",
|
||||
"integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==",
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
}
|
||||
},
|
||||
"node_modules/named-placeholders": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz",
|
||||
"integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^7.14.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/named-placeholders/node_modules/lru-cache": {
|
||||
"version": "7.18.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
|
||||
"integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/negotiator": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
||||
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz",
|
||||
"integrity": "sha512-oXmnazqehLNFohqgLxRyUdOQU9/UX0NpCpsnbjWUjM62ZM8oSOXYZpHc68XR130ftPNano0oQXGdREAplZRhaQ==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -1247,9 +1355,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
||||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.6.tgz",
|
||||
"integrity": "sha512-Ut++lkiF1BogIUY+3SADhfDDdvzb8EOU/D8JutrlrfEuh+DGQbo5c78P96dSuapLEfeH7rpWhiBfJCDAGvSJVQ=="
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.1",
|
||||
@@ -1262,21 +1370,16 @@
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"node_modules/proxy-addr": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.10.tgz",
|
||||
"integrity": "sha512-iq6kR9KN32aFvXjDyC8nIrm203AHeIBPjL6dpaHgSdbpTO8KoPlD0xG92xwwtkCL9+yt1LE5VwpEk43TyP38Dg==",
|
||||
"dependencies": {
|
||||
"forwarded": "0.2.0",
|
||||
"ipaddr.js": "1.9.1"
|
||||
"forwarded": "~0.1.0",
|
||||
"ipaddr.js": "1.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/pstree.remy": {
|
||||
@@ -1299,17 +1402,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz",
|
||||
"integrity": "sha512-nDsRrtIxVUO5opg/A8T2S3ebULVIfuh8ECbh4w3N4mWxIiT3QILDJDUQayPqm2e8Q8NUa0RSUkGCfe33AfjR3Q==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
|
||||
"integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
||||
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"http-errors": "2.0.0",
|
||||
@@ -1320,25 +1423,6 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "2.3.7",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
||||
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
|
||||
"dependencies": {
|
||||
"core-util-is": "~1.0.0",
|
||||
"inherits": "~2.0.3",
|
||||
"isarray": "~1.0.0",
|
||||
"process-nextick-args": "~2.0.0",
|
||||
"safe-buffer": "~5.1.1",
|
||||
"string_decoder": "~1.1.1",
|
||||
"util-deprecate": "~1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream/node_modules/safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
@@ -1364,24 +1448,50 @@
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
"node_modules/router": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/router/-/router-1.1.5.tgz",
|
||||
"integrity": "sha512-p0l/vfNVavaB7DXh3BxJv3NMZi3QKEiIYDnLVyOV5Bo/7Uo3YYk3z65T2IJHG7cfC9QV8UanGhHLOIfPoS9A5g==",
|
||||
"dependencies": {
|
||||
"array-flatten": "2.1.1",
|
||||
"debug": "~2.2.0",
|
||||
"methods": "~1.1.2",
|
||||
"parseurl": "~1.3.1",
|
||||
"path-to-regexp": "0.1.7",
|
||||
"setprototypeof": "1.0.2",
|
||||
"utils-merge": "1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/router/node_modules/array-flatten": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz",
|
||||
"integrity": "sha512-Ylfqm/V1V/VKGazsJeRDZ31wV9gdNeK3ZsvwbYBAVSNgH8o8CMLfdx/ofn9pnMVsvTMfvC3yfcBYzGpD1vxnlw=="
|
||||
},
|
||||
"node_modules/router/node_modules/debug": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
|
||||
"dependencies": {
|
||||
"ms": "0.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/router/node_modules/ms": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
|
||||
},
|
||||
"node_modules/router/node_modules/path-to-regexp": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
||||
},
|
||||
"node_modules/router/node_modules/setprototypeof": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz",
|
||||
"integrity": "sha512-mNRSo7UFE4c4tjxlZ3KxO5r+3oQUD1M/KXbp/XTwTwybL4VR9T8Ltmv5DvZX8iRz6C3hQmQftXEV0EmTKRV6mg=="
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
@@ -1403,47 +1513,180 @@
|
||||
}
|
||||
},
|
||||
"node_modules/send": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
|
||||
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
|
||||
"version": "0.13.0",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.13.0.tgz",
|
||||
"integrity": "sha512-zck2y84i0SbUUiwq2l5gGPNVpCplL48og5xIhFjNjQa09003YCTy6Vb3rKfVuG8W8PWNUtUOntjQEBdwkJ9oBw==",
|
||||
"dependencies": {
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"destroy": "1.2.0",
|
||||
"encodeurl": "~1.0.2",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "2.0.0",
|
||||
"mime": "1.6.0",
|
||||
"ms": "2.1.3",
|
||||
"on-finished": "2.4.1",
|
||||
"range-parser": "~1.2.1",
|
||||
"statuses": "2.0.1"
|
||||
"debug": "~2.2.0",
|
||||
"depd": "~1.0.1",
|
||||
"destroy": "1.0.3",
|
||||
"escape-html": "1.0.2",
|
||||
"etag": "~1.7.0",
|
||||
"fresh": "0.3.0",
|
||||
"http-errors": "~1.3.1",
|
||||
"mime": "1.3.4",
|
||||
"ms": "0.7.1",
|
||||
"on-finished": "~2.3.0",
|
||||
"range-parser": "~1.0.2",
|
||||
"statuses": "~1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/send/node_modules/debug": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
|
||||
"dependencies": {
|
||||
"ms": "0.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/send/node_modules/depd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz",
|
||||
"integrity": "sha512-OEWAMbCkK9IWQ8pfTvHBhCSqHgR+sk5pbiYqq0FqfARG4Cy+cRsCbITx6wh5pcsmfBPiJAcbd98tfdz5fnBbag==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/send/node_modules/destroy": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz",
|
||||
"integrity": "sha512-KB/AVLKRwZPOEo6/lxkDJ+Bv3jFRRrhmnRMPvpWwmIfUggpzGkQBqolyo8FRf833b/F5rzmy1uVN3fHBkjTxgw=="
|
||||
},
|
||||
"node_modules/send/node_modules/http-errors": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz",
|
||||
"integrity": "sha512-gMygNskMurDCWfoCdyh1gOeDfSbkAHXqz94QoPj5IHIUjC/BG8/xv7FSEUr7waR5RcAya4j58bft9Wu/wHNeXA==",
|
||||
"dependencies": {
|
||||
"inherits": "~2.0.1",
|
||||
"statuses": "1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/send/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
|
||||
},
|
||||
"node_modules/send/node_modules/on-finished": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||
"integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
|
||||
"dependencies": {
|
||||
"ee-first": "1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/send/node_modules/statuses": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz",
|
||||
"integrity": "sha512-pVEuxHdSGrt8QmQ3LOZXLhSA6MP/iPqKzZeO6Squ7PNGkA/9MBsSfV0/L+bIxkoDmjF4tZcLpcVq/fkqoHvuKg=="
|
||||
},
|
||||
"node_modules/seq-queue": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
|
||||
"integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
|
||||
},
|
||||
"node_modules/serve-static": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
|
||||
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
|
||||
"version": "1.10.3",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.10.3.tgz",
|
||||
"integrity": "sha512-ScsFovjz3Db+vGgpofR/U8p8UULEcGV9akqyo8TQ1mMnjcxemE7Y5Muo+dvy3tJLY/doY2v1H61eCBMYGmwfrA==",
|
||||
"dependencies": {
|
||||
"encodeurl": "~1.0.2",
|
||||
"escape-html": "~1.0.3",
|
||||
"parseurl": "~1.3.3",
|
||||
"send": "0.18.0"
|
||||
"parseurl": "~1.3.1",
|
||||
"send": "0.13.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static/node_modules/debug": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"integrity": "sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==",
|
||||
"dependencies": {
|
||||
"ms": "0.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static/node_modules/depd": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
|
||||
"integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static/node_modules/destroy": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
|
||||
"integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg=="
|
||||
},
|
||||
"node_modules/serve-static/node_modules/escape-html": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
||||
},
|
||||
"node_modules/serve-static/node_modules/http-errors": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz",
|
||||
"integrity": "sha512-gMygNskMurDCWfoCdyh1gOeDfSbkAHXqz94QoPj5IHIUjC/BG8/xv7FSEUr7waR5RcAya4j58bft9Wu/wHNeXA==",
|
||||
"dependencies": {
|
||||
"inherits": "~2.0.1",
|
||||
"statuses": "1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static/node_modules/ms": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"integrity": "sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg=="
|
||||
},
|
||||
"node_modules/serve-static/node_modules/on-finished": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||
"integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
|
||||
"dependencies": {
|
||||
"ee-first": "1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static/node_modules/send": {
|
||||
"version": "0.13.2",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.13.2.tgz",
|
||||
"integrity": "sha512-cQ0rmXHrdO2Iof08igV2bG/yXWD106ANwBg6DkGQNT2Vsznbgq6T0oAIQboy1GoFsIuy51jCim26aA9tj3Z3Zg==",
|
||||
"dependencies": {
|
||||
"debug": "~2.2.0",
|
||||
"depd": "~1.1.0",
|
||||
"destroy": "~1.0.4",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.7.0",
|
||||
"fresh": "0.3.0",
|
||||
"http-errors": "~1.3.1",
|
||||
"mime": "1.3.4",
|
||||
"ms": "0.7.1",
|
||||
"on-finished": "~2.3.0",
|
||||
"range-parser": "~1.0.3",
|
||||
"statuses": "~1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-static/node_modules/statuses": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz",
|
||||
"integrity": "sha512-pVEuxHdSGrt8QmQ3LOZXLhSA6MP/iPqKzZeO6Squ7PNGkA/9MBsSfV0/L+bIxkoDmjF4tZcLpcVq/fkqoHvuKg=="
|
||||
},
|
||||
"node_modules/set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
@@ -1506,9 +1749,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sqlstring": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
|
||||
"integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==",
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
|
||||
"integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
@@ -1663,9 +1906,9 @@
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"node_modules/utils-merge": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz",
|
||||
"integrity": "sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ==",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
@@ -1683,9 +1926,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vary": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz",
|
||||
"integrity": "sha512-yNsH+tC0r8quK2tg/yqkXqqaYzeKTkSqQ+8T6xCoWgOi/bU/omMYz+6k+I91JJJDeltJzI7oridTOq6OYkY0Tw==",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
|
||||
21
node_modules/@eonasdan/tempus-dominus/LICENSE
generated
vendored
Normal file
21
node_modules/@eonasdan/tempus-dominus/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Jonathan Peterson (@Eonasdan)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
31
node_modules/@eonasdan/tempus-dominus/README.md
generated
vendored
Normal file
31
node_modules/@eonasdan/tempus-dominus/README.md
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
[](https://ko-fi.com/R6R53OEFF)
|
||||
|
||||
# Tempus Dominus Date/Time Picker v6.7.19
|
||||
|
||||
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.
|
||||
|
||||
# Developers
|
||||
|
||||
## Building
|
||||
|
||||
Run `npm i` to install needed packages.
|
||||
|
||||
The docs folder contains the generated documentation site, don't modify this directly as it will be overwritten on build. The dist folder contains the built js/css files.
|
||||
|
||||
## Running
|
||||
|
||||
You can run `npm run serve` which will start a web server. Navigate to `http://localhost:3001/` to view the docs.
|
||||
|
||||
## Watching for changes
|
||||
|
||||
Do not run `npm run serve` at the same time.
|
||||
|
||||
Run `npm start`. This runs web server, the build and watchers for the docs, styles, and typescript.
|
||||
|
||||
## Where do you use this?
|
||||
|
||||
I'd love to know if your public site is using this plugin and list your logo on the documentation site. Leave [create a discussion](https://github.com/Eonasdan/tempus-dominus/discussions/categories/show-your-love) and let me know.
|
||||
|
||||
## Priority support is available at an hourly rate.
|
||||
|
||||
If you have an urgent request, bug or need installation help, please contact in the discord server.
|
||||
700
node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css
generated
vendored
Normal file
700
node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css
generated
vendored
Normal file
@@ -0,0 +1,700 @@
|
||||
.visually-hidden, .tempus-dominus-widget [data-action]::after {
|
||||
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;
|
||||
}
|
||||
|
||||
.tempus-dominus-widget {
|
||||
list-style: none;
|
||||
padding: 4px;
|
||||
width: 19rem;
|
||||
border-radius: 4px;
|
||||
display: none;
|
||||
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);
|
||||
}
|
||||
.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;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.tempus-dominus-widget .arrow {
|
||||
display: none;
|
||||
}
|
||||
.tempus-dominus-widget.show {
|
||||
display: block;
|
||||
}
|
||||
.tempus-dominus-widget.show.date-container {
|
||||
min-height: 315px;
|
||||
}
|
||||
.tempus-dominus-widget.show.time-container {
|
||||
min-height: 217px;
|
||||
}
|
||||
.tempus-dominus-widget .td-collapse:not(.show) {
|
||||
display: none;
|
||||
}
|
||||
.tempus-dominus-widget .td-collapsing {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
transition: height 0.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 {
|
||||
width: 54px;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
margin: 0;
|
||||
}
|
||||
.tempus-dominus-widget button[data-action] {
|
||||
padding: 6px;
|
||||
}
|
||||
.tempus-dominus-widget .toggleMeridiem {
|
||||
text-align: center;
|
||||
height: 38px;
|
||||
}
|
||||
.tempus-dominus-widget .calendar-header {
|
||||
display: grid;
|
||||
grid-template-areas: "a a a";
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.tempus-dominus-widget .calendar-header .next {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.tempus-dominus-widget .calendar-header .previous {
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.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 {
|
||||
border-radius: 999px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
.tempus-dominus-widget .date-container-days {
|
||||
display: grid;
|
||||
grid-template-areas: "a a a a a a a";
|
||||
grid-auto-rows: 40px;
|
||||
grid-auto-columns: 14.2857142857%;
|
||||
}
|
||||
.tempus-dominus-widget .date-container-days .range-in {
|
||||
background-color: #01419e !important;
|
||||
border: none;
|
||||
border-radius: 0 !important;
|
||||
box-shadow: -5px 0 0 #01419e, 5px 0 0 #01419e;
|
||||
}
|
||||
.tempus-dominus-widget .date-container-days .range-end {
|
||||
border-radius: 0 50px 50px 0 !important;
|
||||
}
|
||||
.tempus-dominus-widget .date-container-days .range-start {
|
||||
border-radius: 50px 0 0 50px !important;
|
||||
}
|
||||
.tempus-dominus-widget .date-container-days .dow {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.tempus-dominus-widget .date-container-days .cw {
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
font-size: 0.8em;
|
||||
line-height: 20px;
|
||||
cursor: default;
|
||||
}
|
||||
.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";
|
||||
grid-auto-rows: calc((19rem - 8px) / 7);
|
||||
}
|
||||
.tempus-dominus-widget .time-container-hour,
|
||||
.tempus-dominus-widget .time-container-minute,
|
||||
.tempus-dominus-widget .time-container-second {
|
||||
display: grid;
|
||||
grid-template-areas: "a a a a";
|
||||
grid-auto-rows: calc((19rem - 8px) / 7);
|
||||
}
|
||||
.tempus-dominus-widget .time-container-clock {
|
||||
display: grid;
|
||||
grid-auto-rows: calc((19rem - 8px) / 7);
|
||||
}
|
||||
.tempus-dominus-widget .time-container-clock .no-highlight {
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
}
|
||||
.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),
|
||||
.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) {
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
border-radius: 999px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
.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 {
|
||||
background: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.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,
|
||||
.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-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 {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
border: solid transparent;
|
||||
border-width: 0 0 7px 7px;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 6px;
|
||||
}
|
||||
.tempus-dominus-widget .time-container {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.tempus-dominus-widget button {
|
||||
display: inline-block;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
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;
|
||||
}
|
||||
.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=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=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=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] {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
.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=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=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=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;
|
||||
}
|
||||
.tempus-dominus-widget.light {
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
.tempus-dominus-widget.light [data-action].disabled, .tempus-dominus-widget.light [data-action].disabled:hover {
|
||||
color: #6c757d;
|
||||
}
|
||||
.tempus-dominus-widget.light .toolbar div:hover {
|
||||
background: #e9ecef;
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-days .dow {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-days .cw {
|
||||
color: rgba(0, 0, 0, 0.38);
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight):hover {
|
||||
background: #e9ecef;
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight),
|
||||
.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight),
|
||||
.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight),
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active {
|
||||
background-color: #0d6efd;
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-end:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-end:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-in:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-in:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-end:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-end:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-decades .date-container-days div.range-start:not(.no-highlight).new, .tempus-dominus-widget.light .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-years .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.light .date-container-years .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-years div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-years .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-years div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-years .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-years div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-months .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.light .date-container-months .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-months div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-months .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-months div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-months .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .date-container-months div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-second .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.light .time-container-second .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-second div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-second .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-second div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-second .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days .time-container-second div.range-start:not(.no-highlight).new {
|
||||
color: #fff;
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-in:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-end:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .date-container-days div.range-start:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).active.today:before {
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).new {
|
||||
color: rgba(0, 0, 0, 0.38);
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).disabled, .tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).disabled:hover {
|
||||
color: #6c757d;
|
||||
}
|
||||
.tempus-dominus-widget.light .date-container-decades div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .date-container-years div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .date-container-months div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .date-container-days div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .time-container-clock div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .time-container-hour div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .time-container-minute div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.light .time-container-second div:not(.no-highlight).today:before {
|
||||
border-bottom-color: #0d6efd;
|
||||
border-top-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.tempus-dominus-widget.light button {
|
||||
color: #fff;
|
||||
background-color: #0d6efd;
|
||||
border-color: #0d6efd;
|
||||
}
|
||||
.tempus-dominus-widget.dark {
|
||||
color: #e3e3e3;
|
||||
background-color: #1b1b1b;
|
||||
}
|
||||
.tempus-dominus-widget.dark [data-action].disabled, .tempus-dominus-widget.dark [data-action].disabled:hover {
|
||||
color: #6c757d;
|
||||
}
|
||||
.tempus-dominus-widget.dark .toolbar div:hover {
|
||||
background: rgb(35, 38, 39);
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-days .dow {
|
||||
color: rgba(232, 230, 227, 0.5);
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-days .range-in {
|
||||
background-color: #0071c7 !important;
|
||||
box-shadow: -5px 0 0 #0071c7, 5px 0 0 #0071c7;
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-days .cw {
|
||||
color: rgba(232, 230, 227, 0.38);
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight):hover,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight):hover {
|
||||
background: rgb(35, 38, 39);
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight),
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight),
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight),
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active,
|
||||
.tempus-dominus-widget.dark .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.dark .date-container-decades div:not(.no-highlight).active.old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-end:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-end:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-in:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-in:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-end:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-end:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-decades .date-container-days div.range-start:not(.no-highlight).new, .tempus-dominus-widget.dark .date-container-days .date-container-decades div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-years .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-years div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-months .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .date-container-months div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-clock .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-clock div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-hour .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-hour div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-minute .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-minute div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.old,
|
||||
.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.new,
|
||||
.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-in:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-end:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-second .date-container-days div.range-start:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days .time-container-second div.range-start:not(.no-highlight).new {
|
||||
color: #fff;
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-in:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-end:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .date-container-days div.range-start:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).active.today:before,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).active.today:before {
|
||||
border-bottom-color: #1b1b1b;
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).old, .tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).new,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).old,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).new {
|
||||
color: rgba(232, 230, 227, 0.38);
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).disabled, .tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).disabled:hover,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled,
|
||||
.tempus-dominus-widget.dark .time-container-second div:not(.no-highlight).disabled:hover {
|
||||
color: #6c757d;
|
||||
}
|
||||
.tempus-dominus-widget.dark .date-container-decades div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .date-container-years div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .date-container-months div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .date-container-days div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .time-container-clock div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .time-container-hour div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .time-container-minute div:not(.no-highlight).today:before,
|
||||
.tempus-dominus-widget.dark .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.dark button {
|
||||
color: #fff;
|
||||
background-color: #4db2ff;
|
||||
border-color: #4db2ff;
|
||||
}
|
||||
/*# sourceMappingURL=tempus-dominus.css.map */
|
||||
1
node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css.map
generated
vendored
Normal file
1
node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.css.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.min.css
generated
vendored
Normal file
1
node_modules/@eonasdan/tempus-dominus/dist/css/tempus-dominus.min.css
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
154
node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.js
generated
vendored
Normal file
154
node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.js
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
///<reference src="js/tempus-dominus"/>
|
||||
/*global $, tempusDominus */
|
||||
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2021 Jonathan Peterson
|
||||
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
|
||||
*/
|
||||
tempusDominus.jQueryInterface = function (option, argument) {
|
||||
if (this.length === 1) {
|
||||
return tempusDominus.jQueryHandleThis(this, option, argument);
|
||||
}
|
||||
// "this" is jquery here
|
||||
return this.each(function () {
|
||||
tempusDominus.jQueryHandleThis(this, option, argument);
|
||||
});
|
||||
};
|
||||
|
||||
tempusDominus.jQueryHandleThis = function (me, option, argument) {
|
||||
let data = $(me).data(tempusDominus.Namespace.dataKey);
|
||||
if (typeof option === 'object') {
|
||||
option = $.extend({}, tempusDominus.DefaultOptions, option);
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new tempusDominus.TempusDominus($(me)[0], option);
|
||||
$(me).data(tempusDominus.Namespace.dataKey, data);
|
||||
}
|
||||
|
||||
if (typeof option === 'string') {
|
||||
if (data[option] === undefined) {
|
||||
throw new Error(`No method named "${option}"`);
|
||||
}
|
||||
if (argument === undefined) {
|
||||
return data[option]();
|
||||
} else {
|
||||
if (option === 'date') {
|
||||
data.isDateUpdateThroughDateOptionFromClientCode = true;
|
||||
}
|
||||
const ret = data[option](argument);
|
||||
data.isDateUpdateThroughDateOptionFromClientCode = false;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
tempusDominus.getSelectorFromElement = function ($element) {
|
||||
let selector = $element.data('target'),
|
||||
$selector;
|
||||
|
||||
if (!selector) {
|
||||
selector = $element.attr('href') || '';
|
||||
selector = /^#[a-z]/i.test(selector) ? selector : null;
|
||||
}
|
||||
$selector = $(selector);
|
||||
if ($selector.length === 0) {
|
||||
return $element;
|
||||
}
|
||||
|
||||
if (!$selector.data(tempusDominus.Namespace.dataKey)) {
|
||||
$.extend({}, $selector.data(), $(this).data());
|
||||
}
|
||||
|
||||
return $selector;
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$(document)
|
||||
.on(
|
||||
`click${tempusDominus.Namespace.events.key}.data-api`,
|
||||
`[data-toggle="${tempusDominus.Namespace.dataKey}"]`,
|
||||
function () {
|
||||
const $originalTarget = $(this),
|
||||
$target = tempusDominus.getSelectorFromElement($originalTarget),
|
||||
config = $target.data(tempusDominus.Namespace.dataKey);
|
||||
if ($target.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
config._options.allowInputToggle &&
|
||||
$originalTarget.is('input[data-toggle="datetimepicker"]')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
tempusDominus.jQueryInterface.call($target, 'toggle');
|
||||
}
|
||||
)
|
||||
.on(
|
||||
tempusDominus.Namespace.events.change,
|
||||
`.${tempusDominus.Namespace.NAME}-input`,
|
||||
function (event) {
|
||||
const $target = tempusDominus.getSelectorFromElement($(this));
|
||||
if ($target.length === 0 || event.isInit) {
|
||||
return;
|
||||
}
|
||||
tempusDominus.jQueryInterface.call($target, '_change', event);
|
||||
}
|
||||
)
|
||||
.on(
|
||||
tempusDominus.Namespace.events.blur,
|
||||
`.${tempusDominus.Namespace.NAME}-input`,
|
||||
function (event) {
|
||||
const $target = tempusDominus.getSelectorFromElement($(this)),
|
||||
config = $target.data(tempusDominus.Namespace.dataKey);
|
||||
if ($target.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (config._options.debug || window.debug) {
|
||||
return;
|
||||
}
|
||||
tempusDominus.jQueryInterface.call($target, 'hide', event);
|
||||
}
|
||||
)
|
||||
/*.on(tempusDominus.Namespace.Events.keydown, `.${tempusDominus.Namespace.NAME}-input`, function (event) {
|
||||
const $target = tempusDominus.getSelectorFromElement($(this));
|
||||
if ($target.length === 0) {
|
||||
return;
|
||||
}
|
||||
tempusDominus.jQueryInterface.call($target, '_keydown', event);
|
||||
})
|
||||
.on(tempusDominus.Namespace.Events.keyup, `.${tempusDominus.Namespace.NAME}-input`, function (event) {
|
||||
const $target = tempusDominus.getSelectorFromElement($(this));
|
||||
if ($target.length === 0) {
|
||||
return;
|
||||
}
|
||||
tempusDominus.jQueryInterface.call($target, '_keyup', event);
|
||||
})*/
|
||||
.on(
|
||||
tempusDominus.Namespace.events.focus,
|
||||
`.${tempusDominus.Namespace.NAME}-input`,
|
||||
function (event) {
|
||||
const $target = tempusDominus.getSelectorFromElement($(this)),
|
||||
config = $target.data(tempusDominus.Namespace.dataKey);
|
||||
if ($target.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (!config._options.allowInputToggle) {
|
||||
return;
|
||||
}
|
||||
tempusDominus.jQueryInterface.call($target, 'show', event);
|
||||
}
|
||||
);
|
||||
const name = 'tempusDominus';
|
||||
const JQUERY_NO_CONFLICT = $.fn[name];
|
||||
$.fn[name] = tempusDominus.jQueryInterface;
|
||||
$.fn[name].Constructor = tempusDominus.TempusDominus;
|
||||
$.fn[name].noConflict = function () {
|
||||
$.fn[name] = JQUERY_NO_CONFLICT;
|
||||
return tempusDominus.jQueryInterface;
|
||||
};
|
||||
6
node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.min.js
generated
vendored
Normal file
6
node_modules/@eonasdan/tempus-dominus/dist/js/jQuery-provider.min.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2021 Jonathan Peterson
|
||||
* 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&&(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",t=$.fn[e];$.fn[e]=tempusDominus.jQueryInterface,$.fn[e].Constructor=tempusDominus.TempusDominus,$.fn[e].noConflict=function(){return $.fn[e]=t,tempusDominus.jQueryInterface};
|
||||
4673
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js
generated
vendored
Normal file
4673
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js.map
generated
vendored
Normal file
1
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.min.js
generated
vendored
Normal file
6
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.esm.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4691
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js
generated
vendored
Normal file
4691
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js.map
generated
vendored
Normal file
1
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.min.js
generated
vendored
Normal file
6
node_modules/@eonasdan/tempus-dominus/dist/js/tempus-dominus.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ar-SA.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ar-SA.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.ar_SA={})));})(this,(function(exports){'use strict';const name = 'ar-SA';
|
||||
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: 'ar-SA',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ar.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ar.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.ar={})));})(this,(function(exports){'use strict';const name = 'ar';
|
||||
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: 'ar',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'd/M/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ca.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ca.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.ca={})));})(this,(function(exports){'use strict';const name = 'ca';
|
||||
const localization = {
|
||||
today: 'Avui',
|
||||
clear: 'Esborrar selecció',
|
||||
close: 'Tancar selector',
|
||||
selectMonth: 'Seleccionar mes',
|
||||
previousMonth: 'Mes anterior',
|
||||
nextMonth: 'Pròxim mes',
|
||||
selectYear: 'Seleccionar any',
|
||||
previousYear: 'Any anterior',
|
||||
nextYear: 'Pròxim any',
|
||||
selectDecade: 'Seleccionar dècada',
|
||||
previousDecade: 'Dècada anterior',
|
||||
nextDecade: 'Pròxima dècada',
|
||||
previousCentury: 'Segle anterior',
|
||||
nextCentury: 'Pròxim segle',
|
||||
pickHour: 'Escollir hora',
|
||||
incrementHour: 'Incrementar hora',
|
||||
decrementHour: 'Decrementar hora',
|
||||
pickMinute: 'Escollir minut',
|
||||
incrementMinute: 'Incrementar minut',
|
||||
decrementMinute: 'Decrementar minut',
|
||||
pickSecond: 'Escollir segon',
|
||||
incrementSecond: 'Incrementar segon',
|
||||
decrementSecond: 'Decrementar segon',
|
||||
toggleMeridiem: 'Canviar AM/PM',
|
||||
selectTime: 'Seleccionar temps',
|
||||
selectDate: 'Seleccionar data',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
startOfTheWeek: 1,
|
||||
locale: 'ca',
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd [de] MMMM [de] yyyy',
|
||||
LLL: 'd [de] MMMM [de] yyyy H:mm',
|
||||
LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}º`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/cs.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/cs.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.cs={})));})(this,(function(exports){'use strict';const name = 'cs';
|
||||
const localization = {
|
||||
today: 'Dnes',
|
||||
clear: 'Vymazat výběr',
|
||||
close: 'Zavřít výběrové okno',
|
||||
selectMonth: 'Vybrat měsíc',
|
||||
previousMonth: 'Předchozí měsíc',
|
||||
nextMonth: 'Následující měsíc',
|
||||
selectYear: 'Vybrat rok',
|
||||
previousYear: 'Předchozí rok',
|
||||
nextYear: 'Následující rok',
|
||||
selectDecade: 'Vybrat desetiletí',
|
||||
previousDecade: 'Předchozí desetiletí',
|
||||
nextDecade: 'Následující desetiletí',
|
||||
previousCentury: 'Předchozí století',
|
||||
nextCentury: 'Následující století',
|
||||
pickHour: 'Vybrat hodinu',
|
||||
incrementHour: 'Zvýšit hodinu',
|
||||
decrementHour: 'Snížit hodinu',
|
||||
pickMinute: 'Vybrat minutu',
|
||||
incrementMinute: 'Zvýšit minutu',
|
||||
decrementMinute: 'Snížit minutu',
|
||||
pickSecond: 'Vybrat sekundu',
|
||||
incrementSecond: 'Zvýšit sekundu',
|
||||
decrementSecond: 'Snížit sekundu',
|
||||
toggleMeridiem: 'Přepnout ráno / odpoledne',
|
||||
selectTime: 'Vybrat čas',
|
||||
selectDate: 'Vybrat datum',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'de',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LTS: 'HH:mm:ss',
|
||||
LT: 'HH:mm',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM yyyy',
|
||||
LLL: 'd. MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d. MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/de.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/de.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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 Monat',
|
||||
nextMonth: 'Nächster Monat',
|
||||
selectYear: 'Jahr wählen',
|
||||
previousYear: 'Letztes Jahr',
|
||||
nextYear: 'Nächstes Jahr',
|
||||
selectDecade: 'Jahrzehnt wählen',
|
||||
previousDecade: 'Letztes Jahrzehnt',
|
||||
nextDecade: 'Nächstes Jahrzehnt',
|
||||
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,
|
||||
dateFormats: {
|
||||
LTS: 'HH:mm:ss',
|
||||
LT: 'HH:mm',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM yyyy',
|
||||
LLL: 'd. MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d. MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/es.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/es.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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' },
|
||||
startOfTheWeek: 1,
|
||||
locale: 'es',
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd [de] MMMM [de] yyyy',
|
||||
LLL: 'd [de] MMMM [de] yyyy H:mm',
|
||||
LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}º`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/fi.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/fi.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.fi={})));})(this,(function(exports){'use strict';const name = 'fi';
|
||||
const localization = {
|
||||
today: 'Tänään',
|
||||
clear: 'Tyhjennä',
|
||||
close: 'Sulje',
|
||||
selectMonth: 'Valitse kuukausi',
|
||||
previousMonth: 'Edellinen kuukausi',
|
||||
nextMonth: 'Seuraava kuukausi',
|
||||
selectYear: 'Valitse vuosi',
|
||||
previousYear: 'Edellinen vuosi',
|
||||
nextYear: 'Seuraava vuosi',
|
||||
selectDecade: 'Valitse vuosikymmen',
|
||||
previousDecade: 'Edellinen vuosikymmen',
|
||||
nextDecade: 'Seuraava vuosikymmen',
|
||||
previousCentury: 'Edellinen vuosisata',
|
||||
nextCentury: 'Seuraava vuosisata',
|
||||
pickHour: 'Valitse tunnit',
|
||||
incrementHour: 'Vähennä tunteja',
|
||||
decrementHour: 'Lisää tunteja',
|
||||
pickMinute: 'Valitse minuutit',
|
||||
incrementMinute: 'Vähennä minuutteja',
|
||||
decrementMinute: 'Lisää minuutteja',
|
||||
pickSecond: 'Valitse sekuntit',
|
||||
incrementSecond: 'Vähennä sekunteja',
|
||||
decrementSecond: 'Lisää sekunteja',
|
||||
toggleMeridiem: 'Vaihda kellonaikaa',
|
||||
selectTime: 'Valitse aika',
|
||||
selectDate: 'Valise päivä',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'fi',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH.mm',
|
||||
LTS: 'HH.mm.ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM[ta] yyyy',
|
||||
LLL: 'd. MMMM[ta] yyyy, [klo] HH.mm',
|
||||
LLLL: 'dddd, d. MMMM[ta] yyyy, [klo] HH.mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
50
node_modules/@eonasdan/tempus-dominus/dist/locales/fr.js
generated
vendored
Normal file
50
node_modules/@eonasdan/tempus-dominus/dist/locales/fr.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.fr={})));})(this,(function(exports){'use strict';const name = 'fr';
|
||||
const localization = {
|
||||
today: "Aujourd'hui",
|
||||
clear: 'Effacer la sélection',
|
||||
close: 'Fermer',
|
||||
selectMonth: 'Sélectionner le mois',
|
||||
previousMonth: 'Mois précédent',
|
||||
nextMonth: 'Mois suivant',
|
||||
selectYear: "Sélectionner l'année",
|
||||
previousYear: 'Année précédente',
|
||||
nextYear: 'Année suivante',
|
||||
selectDecade: 'Sélectionner la décennie',
|
||||
previousDecade: 'Décennie précédente',
|
||||
nextDecade: 'Décennie suivante',
|
||||
previousCentury: 'Siècle précédente',
|
||||
nextCentury: 'Siècle suivante',
|
||||
pickHour: "Sélectionner l'heure",
|
||||
incrementHour: "Incrementer l'heure",
|
||||
decrementHour: "Diminuer l'heure",
|
||||
pickMinute: 'Sélectionner les minutes',
|
||||
incrementMinute: 'Incrementer les minutes',
|
||||
decrementMinute: 'Diminuer les minutes',
|
||||
pickSecond: 'Sélectionner les secondes',
|
||||
incrementSecond: 'Incrementer les secondes',
|
||||
decrementSecond: 'Diminuer les secondes',
|
||||
toggleMeridiem: 'Basculer AM-PM',
|
||||
selectTime: "Sélectionner l'heure",
|
||||
selectDate: 'Sélectionner une date',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'fr',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => {
|
||||
const o = n === 1 ? 'er' : '';
|
||||
return `${n}${o}`;
|
||||
},
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/hy.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/hy.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.hy={})));})(this,(function(exports){'use strict';const name = 'hy';
|
||||
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: 'hy',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy թ.',
|
||||
LLL: 'd MMMM yyyy թ., H:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy թ., H:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LTS',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/it.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/it.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}º`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/nl.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/nl.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd-MM-yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `[${n}${n === 1 || n === 8 || n >= 20 ? 'ste' : 'de'}]`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/pl.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/pl.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.pl={})));})(this,(function(exports){'use strict';const name = 'pl';
|
||||
const localization = {
|
||||
today: 'Dzisiaj',
|
||||
clear: 'Wyczyść',
|
||||
close: 'Zamknij',
|
||||
selectMonth: 'Wybierz miesiąc',
|
||||
previousMonth: 'Poprzedni miesiąc',
|
||||
nextMonth: 'Następny miesiąc',
|
||||
selectYear: 'Wybierz rok',
|
||||
previousYear: 'Poprzedni rok',
|
||||
nextYear: 'Następny rok',
|
||||
selectDecade: 'Wybierz dekadę',
|
||||
previousDecade: 'Poprzednia dekada',
|
||||
nextDecade: 'Następna dekada',
|
||||
previousCentury: 'Poprzednie stulecie',
|
||||
nextCentury: 'Następne stulecie',
|
||||
pickHour: 'Wybierz godzinę',
|
||||
incrementHour: 'Kolejna godzina',
|
||||
decrementHour: 'Poprzednia godzina',
|
||||
pickMinute: 'Wybierz minutę',
|
||||
incrementMinute: 'Kolejna minuta',
|
||||
decrementMinute: 'Poprzednia minuta',
|
||||
pickSecond: 'Wybierz sekundę',
|
||||
incrementSecond: 'Kolejna sekunda',
|
||||
decrementSecond: 'Poprzednia sekunda',
|
||||
toggleMeridiem: 'Przełącz porę dnia',
|
||||
selectTime: 'Ustaw godzinę',
|
||||
selectDate: 'Ustaw datę',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'pl',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ro.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ro.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy H:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ru.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/ru.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy г.',
|
||||
LLL: 'd MMMM yyyy г., H:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy г., H:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/sl.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/sl.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.sl={})));})(this,(function(exports){'use strict';const name = 'sl';
|
||||
const localization = {
|
||||
today: 'Danes',
|
||||
clear: 'Počisti',
|
||||
close: 'Zapri',
|
||||
selectMonth: 'Izberite mesec',
|
||||
previousMonth: 'Prejšnji mesec',
|
||||
nextMonth: 'Naslednji mesec',
|
||||
selectYear: 'Izberite leto',
|
||||
previousYear: 'Prejšnje Leto',
|
||||
nextYear: 'Naslednje leto',
|
||||
selectDecade: 'Izberite desetletje',
|
||||
previousDecade: 'Prejšnje desetletje',
|
||||
nextDecade: 'Naslednje desetletje',
|
||||
previousCentury: 'Prejšnje stoletje',
|
||||
nextCentury: 'Naslednje stoletje',
|
||||
pickHour: 'Izberite uro',
|
||||
incrementHour: 'Povečaj ure',
|
||||
decrementHour: 'Zmanjšaj uro',
|
||||
pickMinute: 'Izberite minuto',
|
||||
incrementMinute: 'Povečaj minuto',
|
||||
decrementMinute: 'Zmanjšaj minuto',
|
||||
pickSecond: 'Izberite drugo',
|
||||
incrementSecond: 'Povečaj sekundo',
|
||||
decrementSecond: 'Zmanjšaj sekundo',
|
||||
toggleMeridiem: 'Preklop dopoldne/popoldne',
|
||||
selectTime: 'Izberite čas',
|
||||
selectDate: 'Izberite Datum',
|
||||
dayViewHeaderFormat: { month: 'long', year: 'numeric' },
|
||||
locale: 'sl',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM yyyy',
|
||||
LLL: 'd. MMMM yyyy H:mm',
|
||||
LLLL: 'dddd, d. MMMM yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
47
node_modules/@eonasdan/tempus-dominus/dist/locales/tr.js
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/dist/locales/tr.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.tr={})));})(this,(function(exports){'use strict';const name = 'tr';
|
||||
const localization = {
|
||||
today: 'Bugün',
|
||||
clear: 'Temizle',
|
||||
close: 'Kapat',
|
||||
selectMonth: 'Ay seçin',
|
||||
previousMonth: 'Önceki Ay',
|
||||
nextMonth: 'Sonraki Ay',
|
||||
selectYear: 'Yıl seçin',
|
||||
previousYear: 'Önceki yıl',
|
||||
nextYear: 'Sonraki yıl',
|
||||
selectDecade: 'On yıl seçin',
|
||||
previousDecade: 'Önceki on yıl',
|
||||
nextDecade: 'Sonraki on yıl',
|
||||
previousCentury: 'Önceki yüzyıl',
|
||||
nextCentury: 'Sonraki yüzyıl',
|
||||
pickHour: 'Saat seçin',
|
||||
incrementHour: 'Saati ilerlet',
|
||||
decrementHour: 'Saati gerilet',
|
||||
pickMinute: 'Dakika seçin',
|
||||
incrementMinute: 'Dakikayı ilerlet',
|
||||
decrementMinute: 'Dakikayı gerilet',
|
||||
pickSecond: 'Saniye seç',
|
||||
incrementSecond: 'Saniyeyi ilerlet',
|
||||
decrementSecond: 'Saniyeyi gerilet',
|
||||
toggleMeridiem: 'Meridemi Değiştir AM-PM',
|
||||
selectTime: 'Saat seçin',
|
||||
selectDate: 'Tarih seçin',
|
||||
dayViewHeaderFormat: { month: 'long', year: 'numeric' },
|
||||
locale: 'tr',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};exports.localization=localization;exports.name=name;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
22
node_modules/@eonasdan/tempus-dominus/dist/plugins/bi-one.js
generated
vendored
Normal file
22
node_modules/@eonasdan/tempus-dominus/dist/plugins/bi-one.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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.bi_one={})));})(this,(function(exports){'use strict';// this obviously requires the Bootstrap Icons v1 libraries to be loaded
|
||||
const biOneIcons = {
|
||||
type: 'icons',
|
||||
time: 'bi bi-clock',
|
||||
date: 'bi bi-calendar-week',
|
||||
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',
|
||||
};
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
const load = (_, __, tdFactory) => {
|
||||
tdFactory.DefaultOptions.display.icons = biOneIcons;
|
||||
};exports.biOneIcons=biOneIcons;exports.load=load;Object.defineProperty(exports,'__esModule',{value:true});}));
|
||||
8
node_modules/@eonasdan/tempus-dominus/dist/plugins/customDateFormat.js
generated
vendored
Normal file
8
node_modules/@eonasdan/tempus-dominus/dist/plugins/customDateFormat.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 Jonathan Peterson
|
||||
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
|
||||
*/
|
||||
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.customDateFormat=f()));})(this,(function(){'use strict';var index = () => {
|
||||
console.warn('This plugin has been merged with the main picker and is now longer required');
|
||||
};return index;}));
|
||||
17
node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/custom-paint-job.js
generated
vendored
Normal file
17
node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/custom-paint-job.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 Jonathan Peterson
|
||||
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
|
||||
*/
|
||||
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.custom_paint_job=f()));})(this,(function(){'use strict';/* eslint-disable */
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
var customPaintJob = (option, tdClasses, tdFactory) => {
|
||||
// noinspection JSUnusedLocalSymbols
|
||||
tdClasses.Display.prototype.paint = (unit, date, classes, element) => {
|
||||
if (unit === tdFactory.Unit.date) {
|
||||
if (date.isSame(new tdFactory.DateTime(), unit)) {
|
||||
classes.push('special-day');
|
||||
}
|
||||
}
|
||||
};
|
||||
};return customPaintJob;}));
|
||||
30
node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/sample.js
generated
vendored
Normal file
30
node_modules/@eonasdan/tempus-dominus/dist/plugins/examples/sample.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 Jonathan Peterson
|
||||
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
|
||||
*/
|
||||
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.sample=f()));})(this,(function(){'use strict';// noinspection JSUnusedGlobalSymbols
|
||||
var sample = (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
|
||||
};
|
||||
};return sample;}));
|
||||
22
node_modules/@eonasdan/tempus-dominus/dist/plugins/fa-five.js
generated
vendored
Normal file
22
node_modules/@eonasdan/tempus-dominus/dist/plugins/fa-five.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 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});}));
|
||||
20
node_modules/@eonasdan/tempus-dominus/dist/plugins/moment-parse.js
generated
vendored
Normal file
20
node_modules/@eonasdan/tempus-dominus/dist/plugins/moment-parse.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/*!
|
||||
* Tempus Dominus v6.7.19 (https://getdatepicker.com/)
|
||||
* Copyright 2013-2023 Jonathan Peterson
|
||||
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
|
||||
*/
|
||||
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.moment_parse=f()));})(this,(function(){'use strict';var index = (option, tdClasses, tdFactory) => {
|
||||
tdClasses.Dates.prototype.setFromInput = function (value, index) {
|
||||
const converted = moment(value, option);
|
||||
if (converted.isValid()) {
|
||||
const 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);
|
||||
};
|
||||
};return index;}));
|
||||
115
node_modules/@eonasdan/tempus-dominus/package.json
generated
vendored
Normal file
115
node_modules/@eonasdan/tempus-dominus/package.json
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"author": {
|
||||
"name": "Jonathan Peterson"
|
||||
},
|
||||
"name": "@eonasdan/tempus-dominus",
|
||||
"version": "6.7.19",
|
||||
"style": "dist/css/tempus-dominus.css",
|
||||
"sass": "scss/tempus-dominus.scss",
|
||||
"main": "dist/js/tempus-dominus.js",
|
||||
"module": "dist/js/tempus-dominus.esm.js",
|
||||
"types": "types/tempus-dominus.d.ts",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"src/js/**/*.ts",
|
||||
"src/js/locales/**/*.ts",
|
||||
"src/js/plugins/**/*.ts",
|
||||
"src/scss/**/*.scss",
|
||||
"types/**/*"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "npm run build && concurrently \"npm:*-watch\"",
|
||||
"test": "vitest --ui",
|
||||
"test:silent": "vitest --run --silent",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"serve": "node ./build/serve.js",
|
||||
"clean": "node ./build/utilities.js --clean ./dist && node ./build/utilities.js --clean ./types",
|
||||
"build": "npm run clean && node ./build/utilities.js --copy && npm run rollup && npm run build:declarations && npm run build:plugins-and-locales",
|
||||
"build:plugins": "node ./build/plugins.js -p",
|
||||
"build:locales": "node ./build/plugins.js -l",
|
||||
"build:plugins-and-locales": "node ./build/plugins.js",
|
||||
"build:declarations": "node ./build/utilities.js --clean ./types && tsc --declaration --emitDeclarationOnly --outDir types",
|
||||
"sass": "sass src/scss/tempus-dominus.scss ./dist/css/tempus-dominus.css",
|
||||
"rollup": "rollup -c ./build/rollup.config.js",
|
||||
"rollup-watch": "rollup -c ./build/rollup.config.js -w",
|
||||
"docs": "node ./src/docs/make.js",
|
||||
"docs-watch": "node ./src/docs/make.js --watch",
|
||||
"release": "npm run eslint && npm run test:silent && npm run build",
|
||||
"release:version": "npm run release && node build/change-version.js",
|
||||
"prepare": "husky install",
|
||||
"prettier": "prettier --ignore-unknown --write .",
|
||||
"eslint": "npm run prettier && npx eslint --ext .html,.ts ."
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*!(.d)/.ts": [
|
||||
"npm run eslint"
|
||||
],
|
||||
"**/*": [
|
||||
"npm run prettier"
|
||||
]
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eonasdan/tempus-dominus/issues"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@popperjs/core": "^2.11.6"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@popperjs/core\"": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"description": "A robust and powerful date/time picker component. For usage, installation and demos see Project Site on GitHub",
|
||||
"devDependencies": {
|
||||
"@eonasdan/parvus-server": "^1.1.9",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@rollup/plugin-node-resolve": "^14.1.0",
|
||||
"@types/node": "^18.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||
"@typescript-eslint/parser": "^5.54.0",
|
||||
"@vitest/coverage-c8": "^0.29.2",
|
||||
"@vitest/ui": "^0.29.2",
|
||||
"bootstrap": "^5.2.3",
|
||||
"chokidar": "^3.5.3",
|
||||
"clean-css": "^5.3.2",
|
||||
"concurrently": "^7.6.0",
|
||||
"dropcss": "^1.0.16",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"glob": "^7.2.3",
|
||||
"globby": "^11.1.0",
|
||||
"html-minifier-terser": "^5.1.1",
|
||||
"husky": "^8.0.3",
|
||||
"jsdom": "^20.0.3",
|
||||
"lint-staged": "^13.1.2",
|
||||
"prettier": "^2.8.4",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-ignore": "^1.0.10",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-ts": "^3.2.0",
|
||||
"sass": "^1.58.3",
|
||||
"terser": "^5.16.5",
|
||||
"tslib": "^2.5.0",
|
||||
"typescript": "~4.9.5",
|
||||
"vitest": "^0.29.2",
|
||||
"vitest-github-actions-reporter": "^0.10.0"
|
||||
},
|
||||
"homepage": "https://getdatepicker.com/",
|
||||
"keywords": [
|
||||
"datepicker",
|
||||
"datetimepicker",
|
||||
"timepicker"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Eonasdan/tempus-dominus.git"
|
||||
},
|
||||
"wallaby": {
|
||||
"filesWithNoCoverageCalculated": [
|
||||
"test/fixtures/**/*"
|
||||
]
|
||||
},
|
||||
"funding": "https://ko-fi.com/eonasdan"
|
||||
}
|
||||
379
node_modules/@eonasdan/tempus-dominus/src/js/actions.ts
generated
vendored
Normal file
379
node_modules/@eonasdan/tempus-dominus/src/js/actions.ts
generated
vendored
Normal file
@@ -0,0 +1,379 @@
|
||||
import { DateTime, Unit } from './datetime';
|
||||
import Collapse from './display/collapse';
|
||||
import Namespace from './utilities/namespace';
|
||||
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';
|
||||
import { OptionsStore } from './utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Logic for various click actions
|
||||
*/
|
||||
export default class Actions {
|
||||
private optionsStore: OptionsStore;
|
||||
private validation: Validation;
|
||||
private dates: Dates;
|
||||
private display: Display;
|
||||
private _eventEmitters: EventEmitters;
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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]
|
||||
*/
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
do(e: any, action?: ActionTypes) {
|
||||
const currentTarget = e?.currentTarget as HTMLElement;
|
||||
if (currentTarget?.classList?.contains(Namespace.css.disabled)) return;
|
||||
action = action || (currentTarget?.dataset?.action as ActionTypes);
|
||||
const lastPicked = (this.dates.lastPicked || this.optionsStore.viewDate)
|
||||
.clone;
|
||||
|
||||
switch (action) {
|
||||
case ActionTypes.next:
|
||||
case ActionTypes.previous:
|
||||
this.handleNextPrevious(action);
|
||||
break;
|
||||
case ActionTypes.changeCalendarView:
|
||||
this.display._showMode(1);
|
||||
this.display._updateCalendarHeader();
|
||||
break;
|
||||
case ActionTypes.selectMonth:
|
||||
case ActionTypes.selectYear:
|
||||
case ActionTypes.selectDecade:
|
||||
this.handleSelectCalendarMode(action, currentTarget);
|
||||
break;
|
||||
case ActionTypes.selectDay:
|
||||
this.handleSelectDay(currentTarget);
|
||||
break;
|
||||
case ActionTypes.selectHour: {
|
||||
let hour = +currentTarget.dataset.value;
|
||||
if (lastPicked.hours >= 12 && this.optionsStore.isTwelveHour)
|
||||
hour += 12;
|
||||
lastPicked.hours = hour;
|
||||
this.dates.setValue(lastPicked, this.dates.lastPickedIndex);
|
||||
this.hideOrClock(e);
|
||||
break;
|
||||
}
|
||||
case ActionTypes.selectMinute: {
|
||||
lastPicked.minutes = +currentTarget.dataset.value;
|
||||
this.dates.setValue(lastPicked, this.dates.lastPickedIndex);
|
||||
this.hideOrClock(e);
|
||||
break;
|
||||
}
|
||||
case ActionTypes.selectSecond: {
|
||||
lastPicked.seconds = +currentTarget.dataset.value;
|
||||
this.dates.setValue(lastPicked, this.dates.lastPickedIndex);
|
||||
this.hideOrClock(e);
|
||||
break;
|
||||
}
|
||||
case ActionTypes.incrementHours:
|
||||
this.manipulateAndSet(lastPicked, Unit.hours);
|
||||
break;
|
||||
case ActionTypes.incrementMinutes:
|
||||
this.manipulateAndSet(
|
||||
lastPicked,
|
||||
Unit.minutes,
|
||||
this.optionsStore.options.stepping
|
||||
);
|
||||
break;
|
||||
case ActionTypes.incrementSeconds:
|
||||
this.manipulateAndSet(lastPicked, Unit.seconds);
|
||||
break;
|
||||
case ActionTypes.decrementHours:
|
||||
this.manipulateAndSet(lastPicked, Unit.hours, -1);
|
||||
break;
|
||||
case ActionTypes.decrementMinutes:
|
||||
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,
|
||||
Unit.hours,
|
||||
this.dates.lastPicked.hours >= 12 ? -12 : 12
|
||||
);
|
||||
break;
|
||||
case ActionTypes.togglePicker:
|
||||
this.handleToggle(currentTarget);
|
||||
break;
|
||||
case ActionTypes.showClock:
|
||||
case ActionTypes.showHours:
|
||||
case ActionTypes.showMinutes:
|
||||
case ActionTypes.showSeconds:
|
||||
//make sure the clock is actually displaying
|
||||
if (
|
||||
!this.optionsStore.options.display.sideBySide &&
|
||||
this.optionsStore.currentView !== 'clock'
|
||||
) {
|
||||
//hide calendar
|
||||
Collapse.hideImmediately(this.display.dateContainer);
|
||||
//show clock
|
||||
Collapse.showImmediately(this.display.timeContainer);
|
||||
}
|
||||
this.handleShowClockContainers(action);
|
||||
break;
|
||||
case ActionTypes.clear:
|
||||
this.dates.setValue(null);
|
||||
this.display._updateCalendarHeader();
|
||||
break;
|
||||
case ActionTypes.close:
|
||||
this.display.hide();
|
||||
break;
|
||||
case ActionTypes.today: {
|
||||
const today = new DateTime().setLocalization(
|
||||
this.optionsStore.options.localization
|
||||
);
|
||||
this._eventEmitters.updateViewDate.emit(today);
|
||||
|
||||
//todo this this really a good idea?
|
||||
if (this.validation.isValid(today, Unit.date))
|
||||
this.dates.setValue(today, this.dates.lastPickedIndex);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private handleShowClockContainers(action: ActionTypes) {
|
||||
if (!this.display._hasTime) {
|
||||
Namespace.errorMessages.throwError(
|
||||
'Cannot show clock containers when time is disabled.'
|
||||
);
|
||||
/* ignore coverage: should never happen */
|
||||
return;
|
||||
}
|
||||
|
||||
this.optionsStore.currentView = 'clock';
|
||||
this.display.widget
|
||||
.querySelectorAll(`.${Namespace.css.timeContainer} > div`)
|
||||
.forEach(
|
||||
(htmlElement: HTMLElement) => (htmlElement.style.display = 'none')
|
||||
);
|
||||
|
||||
let classToUse = '';
|
||||
switch (action) {
|
||||
case ActionTypes.showClock:
|
||||
classToUse = Namespace.css.clockContainer;
|
||||
this.display._update('clock');
|
||||
break;
|
||||
case ActionTypes.showHours:
|
||||
classToUse = Namespace.css.hourContainer;
|
||||
this.display._update(Unit.hours);
|
||||
break;
|
||||
case ActionTypes.showMinutes:
|
||||
classToUse = Namespace.css.minuteContainer;
|
||||
this.display._update(Unit.minutes);
|
||||
break;
|
||||
case ActionTypes.showSeconds:
|
||||
classToUse = Namespace.css.secondContainer;
|
||||
this.display._update(Unit.seconds);
|
||||
break;
|
||||
}
|
||||
|
||||
(<HTMLElement>(
|
||||
this.display.widget.getElementsByClassName(classToUse)[0]
|
||||
)).style.display = 'grid';
|
||||
}
|
||||
|
||||
private handleNextPrevious(action: ActionTypes) {
|
||||
const { unit, step } =
|
||||
CalendarModes[this.optionsStore.currentCalendarViewMode];
|
||||
if (action === ActionTypes.next)
|
||||
this.optionsStore.viewDate.manipulate(step, unit);
|
||||
else this.optionsStore.viewDate.manipulate(step * -1, unit);
|
||||
this._eventEmitters.viewUpdate.emit();
|
||||
|
||||
this.display._showMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* After setting the value it will either show the clock or hide the widget.
|
||||
* @param e
|
||||
*/
|
||||
private hideOrClock(e) {
|
||||
if (
|
||||
!this.optionsStore.isTwelveHour &&
|
||||
!this.optionsStore.options.display.components.minutes &&
|
||||
!this.optionsStore.options.display.keepOpen &&
|
||||
!this.optionsStore.options.display.inline
|
||||
) {
|
||||
this.display.hide();
|
||||
} else {
|
||||
this.do(e, ActionTypes.showClock);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.validation.isValid(newDate, unit)) {
|
||||
this.dates.setValue(newDate, this.dates.lastPickedIndex);
|
||||
}
|
||||
}
|
||||
|
||||
private handleSelectCalendarMode(
|
||||
action:
|
||||
| ActionTypes.selectMonth
|
||||
| ActionTypes.selectYear
|
||||
| ActionTypes.selectDecade,
|
||||
currentTarget: HTMLElement
|
||||
) {
|
||||
const value = +currentTarget.dataset.value;
|
||||
switch (action) {
|
||||
case ActionTypes.selectMonth:
|
||||
this.optionsStore.viewDate.month = value;
|
||||
break;
|
||||
case ActionTypes.selectYear:
|
||||
case ActionTypes.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);
|
||||
}
|
||||
}
|
||||
|
||||
private handleToggle(currentTarget: HTMLElement) {
|
||||
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.handleShowClockContainers(ActionTypes.showClock);
|
||||
this.display._update('clock');
|
||||
}
|
||||
}
|
||||
|
||||
this.display.widget
|
||||
.querySelectorAll(
|
||||
`.${Namespace.css.dateContainer}, .${Namespace.css.timeContainer}`
|
||||
)
|
||||
.forEach((htmlElement: HTMLElement) => Collapse.toggle(htmlElement));
|
||||
this._eventEmitters.viewUpdate.emit();
|
||||
}
|
||||
|
||||
private handleSelectDay(currentTarget: HTMLElement) {
|
||||
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;
|
||||
if (this.optionsStore.options.dateRange) this.handleDateRange(day);
|
||||
else if (this.optionsStore.options.multipleDates) {
|
||||
this.handleMultiDate(day);
|
||||
} 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.optionsStore.options.dateRange
|
||||
) {
|
||||
this.display.hide();
|
||||
}
|
||||
}
|
||||
|
||||
private handleMultiDate(day: DateTime) {
|
||||
let index = this.dates.pickedIndex(day, Unit.date);
|
||||
console.log(index);
|
||||
if (index !== -1) {
|
||||
this.dates.setValue(null, index); //deselect multi-date
|
||||
} else {
|
||||
index = this.dates.lastPickedIndex + 1;
|
||||
if (this.dates.picked.length === 0) index = 0;
|
||||
|
||||
this.dates.setValue(day, index);
|
||||
}
|
||||
}
|
||||
|
||||
private handleDateRange(day: DateTime) {
|
||||
switch (this.dates.picked.length) {
|
||||
case 2: {
|
||||
this.dates.clear();
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
const other = this.dates.picked[0];
|
||||
if (day.getTime() === other.getTime()) {
|
||||
this.dates.clear();
|
||||
break;
|
||||
}
|
||||
if (day.isBefore(other)) {
|
||||
this.dates.setValue(day, 0);
|
||||
this.dates.setValue(other, 1);
|
||||
return;
|
||||
} else {
|
||||
this.dates.setValue(day, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.dates.setValue(day, 0);
|
||||
}
|
||||
}
|
||||
284
node_modules/@eonasdan/tempus-dominus/src/js/dates.ts
generated
vendored
Normal file
284
node_modules/@eonasdan/tempus-dominus/src/js/dates.ts
generated
vendored
Normal file
@@ -0,0 +1,284 @@
|
||||
import { DateTime, getFormatByUnit, Unit } from './datetime';
|
||||
import Namespace from './utilities/namespace';
|
||||
import { ChangeEvent, FailEvent } from './utilities/event-types';
|
||||
import Validation from './validation';
|
||||
import { serviceLocator } from './utilities/service-locator';
|
||||
import { EventEmitters } from './utilities/event-emitter';
|
||||
import { OptionsStore } from './utilities/optionsStore';
|
||||
import { OptionConverter } from './utilities/optionConverter';
|
||||
|
||||
export default class Dates {
|
||||
private _dates: DateTime[] = [];
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the array of selected dates
|
||||
*/
|
||||
get picked(): DateTime[] {
|
||||
return [...this._dates];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last picked value.
|
||||
*/
|
||||
get lastPicked(): DateTime {
|
||||
return this._dates[this.lastPickedIndex]?.clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the length of picked dates -1 or 0 if none are selected.
|
||||
*/
|
||||
get lastPickedIndex(): number {
|
||||
if (this._dates.length === 0) return 0;
|
||||
return this._dates.length - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a DateTime object to a string. Used when setting the input value.
|
||||
* @param date
|
||||
*/
|
||||
formatInput(date: DateTime): string {
|
||||
if (!date) return '';
|
||||
date.localization = this.optionsStore.options.localization;
|
||||
return date.format();
|
||||
}
|
||||
|
||||
/**
|
||||
* parse the value into a DateTime object.
|
||||
* this can be overwritten to supply your own parsing.
|
||||
*/
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
parseInput(value: any): DateTime {
|
||||
return OptionConverter.dateConversion(
|
||||
value,
|
||||
'input',
|
||||
this.optionsStore.options.localization
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
setFromInput(value: any, index?: number) {
|
||||
if (!value) {
|
||||
this.setValue(undefined, index);
|
||||
return;
|
||||
}
|
||||
const converted = this.parseInput(value);
|
||||
if (converted) {
|
||||
converted.setLocalization(this.optionsStore.options.localization);
|
||||
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.
|
||||
* @param targetDate
|
||||
* @param unit
|
||||
*/
|
||||
isPicked(targetDate: DateTime, unit?: Unit): boolean {
|
||||
if (!DateTime.isValid(targetDate)) return false;
|
||||
if (!unit)
|
||||
return this._dates.find((x) => x.isSame(targetDate)) !== undefined;
|
||||
|
||||
const format = getFormatByUnit(unit);
|
||||
|
||||
const innerDateFormatted = targetDate.format(format);
|
||||
|
||||
return (
|
||||
this._dates
|
||||
.map((x) => x.format(format))
|
||||
.find((x) => x === innerDateFormatted) !== undefined
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the index at which `targetDate` 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.
|
||||
* @param targetDate
|
||||
* @param unit
|
||||
*/
|
||||
pickedIndex(targetDate: DateTime, unit?: Unit): number {
|
||||
if (!DateTime.isValid(targetDate)) return -1;
|
||||
if (!unit)
|
||||
return this._dates.map((x) => x.valueOf()).indexOf(targetDate.valueOf());
|
||||
|
||||
const format = getFormatByUnit(unit);
|
||||
|
||||
const innerDateFormatted = targetDate.format(format);
|
||||
|
||||
return this._dates.map((x) => x.format(format)).indexOf(innerDateFormatted);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all selected dates.
|
||||
*/
|
||||
clear() {
|
||||
this.optionsStore.unset = true;
|
||||
this._eventEmitters.triggerEvent.emit({
|
||||
type: Namespace.events.change,
|
||||
date: undefined,
|
||||
oldDate: this.lastPicked,
|
||||
isClear: true,
|
||||
isValid: true,
|
||||
} as ChangeEvent);
|
||||
this._dates = [];
|
||||
if (this.optionsStore.input) this.optionsStore.input.value = '';
|
||||
this._eventEmitters.updateDisplay.emit('all');
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the "book end" years given a `year` and a `factor`
|
||||
* @param factor e.g. 100 for decades
|
||||
* @param year e.g. 2021
|
||||
*/
|
||||
static getStartEndYear(
|
||||
factor: number,
|
||||
year: number
|
||||
): [number, number, number] {
|
||||
const step = factor / 10,
|
||||
startYear = Math.floor(year / factor) * factor,
|
||||
endYear = startYear + step * 9,
|
||||
focusValue = Math.floor(year / step) * step;
|
||||
return [startYear, endYear, focusValue];
|
||||
}
|
||||
|
||||
updateInput(target?: DateTime) {
|
||||
if (!this.optionsStore.input) return;
|
||||
|
||||
let newValue = this.formatInput(target);
|
||||
if (
|
||||
this.optionsStore.options.multipleDates ||
|
||||
this.optionsStore.options.dateRange
|
||||
) {
|
||||
newValue = this._dates
|
||||
.map((d) => this.formatInput(d))
|
||||
.join(this.optionsStore.options.multipleDatesSeparator);
|
||||
}
|
||||
if (this.optionsStore.input.value != newValue)
|
||||
this.optionsStore.input.value = newValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
* provided the date at that index will be replaced, otherwise it is appended.
|
||||
* @param target
|
||||
* @param index
|
||||
*/
|
||||
setValue(target?: DateTime, index?: number): void {
|
||||
const noIndex = typeof index === 'undefined',
|
||||
isClear = !target && noIndex;
|
||||
let oldDate = this.optionsStore.unset ? null : this._dates[index]?.clone;
|
||||
if (!oldDate && !this.optionsStore.unset && noIndex && isClear) {
|
||||
oldDate = this.lastPicked;
|
||||
}
|
||||
|
||||
if (target && oldDate?.isSame(target)) {
|
||||
this.updateInput(target);
|
||||
return;
|
||||
}
|
||||
|
||||
// case of calling setValue(null)
|
||||
if (!target) {
|
||||
this._setValueNull(isClear, index, oldDate);
|
||||
return;
|
||||
}
|
||||
|
||||
index = index || 0;
|
||||
target = target.clone;
|
||||
|
||||
// minute stepping is being used, force the minute to the closest value
|
||||
if (this.optionsStore.options.stepping !== 1) {
|
||||
target.minutes =
|
||||
Math.round(target.minutes / this.optionsStore.options.stepping) *
|
||||
this.optionsStore.options.stepping;
|
||||
target.startOf(Unit.minutes);
|
||||
}
|
||||
|
||||
const onUpdate = (isValid: boolean) => {
|
||||
this._dates[index] = target;
|
||||
this._eventEmitters.updateViewDate.emit(target.clone);
|
||||
|
||||
this.updateInput(target);
|
||||
|
||||
this.optionsStore.unset = false;
|
||||
this._eventEmitters.updateDisplay.emit('all');
|
||||
this._eventEmitters.triggerEvent.emit({
|
||||
type: Namespace.events.change,
|
||||
date: target,
|
||||
oldDate,
|
||||
isClear,
|
||||
isValid: isValid,
|
||||
} as ChangeEvent);
|
||||
};
|
||||
|
||||
if (
|
||||
this.validation.isValid(target) &&
|
||||
this.validation.dateRangeIsValid(this.picked, index, target)
|
||||
) {
|
||||
onUpdate(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.keepInvalid) {
|
||||
onUpdate(false);
|
||||
}
|
||||
|
||||
this._eventEmitters.triggerEvent.emit({
|
||||
type: Namespace.events.error,
|
||||
reason: Namespace.errorMessages.failedToSetInvalidDate,
|
||||
date: target,
|
||||
oldDate,
|
||||
} as FailEvent);
|
||||
}
|
||||
|
||||
private _setValueNull(isClear: boolean, index: number, oldDate: DateTime) {
|
||||
if (
|
||||
!this.optionsStore.options.multipleDates ||
|
||||
this._dates.length === 1 ||
|
||||
isClear
|
||||
) {
|
||||
this.optionsStore.unset = true;
|
||||
this._dates = [];
|
||||
} else {
|
||||
this._dates.splice(index, 1);
|
||||
}
|
||||
|
||||
this.updateInput();
|
||||
|
||||
this._eventEmitters.triggerEvent.emit({
|
||||
type: Namespace.events.change,
|
||||
date: undefined,
|
||||
oldDate,
|
||||
isClear,
|
||||
isValid: true,
|
||||
} as ChangeEvent);
|
||||
|
||||
this._eventEmitters.updateDisplay.emit('all');
|
||||
}
|
||||
}
|
||||
1039
node_modules/@eonasdan/tempus-dominus/src/js/datetime.ts
generated
vendored
Normal file
1039
node_modules/@eonasdan/tempus-dominus/src/js/datetime.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
338
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/date-display.ts
generated
vendored
Normal file
338
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/date-display.ts
generated
vendored
Normal file
@@ -0,0 +1,338 @@
|
||||
import { DateTime, Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Validation from '../../validation';
|
||||
import Dates from '../../dates';
|
||||
import { Paint } from '../index';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates and updates the grid for `date`
|
||||
*/
|
||||
export default class DateDisplay {
|
||||
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
|
||||
*/
|
||||
getPicker(): HTMLElement {
|
||||
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);
|
||||
}
|
||||
|
||||
const { rangeHoverEvent, rangeHoverOutEvent } =
|
||||
this.handleMouseEvents(container);
|
||||
|
||||
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.selectDay);
|
||||
container.appendChild(div);
|
||||
|
||||
// if hover is supported then add the events
|
||||
if (
|
||||
matchMedia('(hover: hover)').matches &&
|
||||
this.optionsStore.options.dateRange
|
||||
) {
|
||||
div.addEventListener('mouseover', rangeHoverEvent);
|
||||
div.addEventListener('mouseout', rangeHoverOutEvent);
|
||||
}
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void {
|
||||
const container = widget.getElementsByClassName(
|
||||
Namespace.css.daysContainer
|
||||
)[0] as HTMLElement;
|
||||
|
||||
this._updateCalendarView(container);
|
||||
|
||||
const innerDate = this.optionsStore.viewDate.clone
|
||||
.startOf(Unit.month)
|
||||
.startOf('weekDay', this.optionsStore.options.localization.startOfTheWeek)
|
||||
.manipulate(12, Unit.hours);
|
||||
|
||||
this._handleCalendarWeeks(container, innerDate.clone);
|
||||
|
||||
container
|
||||
.querySelectorAll(`[data-action="${ActionTypes.selectDay}"]`)
|
||||
.forEach((element: HTMLElement) => {
|
||||
const classes: string[] = [];
|
||||
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.optionsStore.options.dateRange &&
|
||||
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);
|
||||
}
|
||||
|
||||
this._handleDateRange(innerDate, classes);
|
||||
|
||||
paint(Unit.date, innerDate, classes, element);
|
||||
|
||||
element.classList.remove(...element.classList);
|
||||
element.classList.add(...classes);
|
||||
element.setAttribute('data-value', this._dateToDataValue(innerDate));
|
||||
element.setAttribute('data-day', `${innerDate.date}`);
|
||||
element.innerText = innerDate.parts(undefined, {
|
||||
day: 'numeric',
|
||||
}).day;
|
||||
innerDate.manipulate(1, Unit.date);
|
||||
});
|
||||
}
|
||||
|
||||
private _dateToDataValue(date: DateTime): string {
|
||||
if (!DateTime.isValid(date)) return '';
|
||||
|
||||
return `${date.year}-${date.monthFormatted}-${date.dateFormatted}`;
|
||||
}
|
||||
|
||||
private _handleDateRange(innerDate: DateTime, classes: string[]) {
|
||||
const rangeStart = this.dates.picked[0];
|
||||
const rangeEnd = this.dates.picked[1];
|
||||
|
||||
if (this.optionsStore.options.dateRange) {
|
||||
if (innerDate.isBetween(rangeStart, rangeEnd, Unit.date)) {
|
||||
classes.push(Namespace.css.rangeIn);
|
||||
}
|
||||
|
||||
if (innerDate.isSame(rangeStart, Unit.date)) {
|
||||
classes.push(Namespace.css.rangeStart);
|
||||
}
|
||||
|
||||
if (innerDate.isSame(rangeEnd, Unit.date)) {
|
||||
classes.push(Namespace.css.rangeEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private handleMouseEvents(container: HTMLElement) {
|
||||
const rangeHoverEvent = (e: MouseEvent) => {
|
||||
const currentTarget = e?.currentTarget as HTMLElement;
|
||||
|
||||
// if we have 0 or 2 selected or if the target is disabled then ignore
|
||||
if (
|
||||
this.dates.picked.length !== 1 ||
|
||||
currentTarget.classList.contains(Namespace.css.disabled)
|
||||
)
|
||||
return;
|
||||
|
||||
// select all the date divs
|
||||
const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];
|
||||
|
||||
// get the date value from the element being hovered over
|
||||
const attributeValue = currentTarget.getAttribute('data-value');
|
||||
|
||||
// format the string to a date
|
||||
const innerDate = DateTime.fromString(attributeValue, {
|
||||
format: 'yyyy-MM-dd',
|
||||
});
|
||||
|
||||
// find the position of the target in the date container
|
||||
const dayIndex = allDays.findIndex(
|
||||
(e) => e.getAttribute('data-value') === attributeValue
|
||||
);
|
||||
|
||||
// find the first and second selected dates
|
||||
const rangeStart = this.dates.picked[0];
|
||||
const rangeEnd = this.dates.picked[1];
|
||||
|
||||
//format the start date so that it can be found by the attribute
|
||||
const rangeStartFormatted = this._dateToDataValue(rangeStart);
|
||||
const rangeStartIndex = allDays.findIndex(
|
||||
(e) => e.getAttribute('data-value') === rangeStartFormatted
|
||||
);
|
||||
const rangeStartElement = allDays[rangeStartIndex];
|
||||
|
||||
//make sure we don't leave start/end classes if we don't need them
|
||||
if (!innerDate.isSame(rangeStart, Unit.date)) {
|
||||
currentTarget.classList.remove(Namespace.css.rangeStart);
|
||||
}
|
||||
|
||||
if (!innerDate.isSame(rangeEnd, Unit.date)) {
|
||||
currentTarget.classList.remove(Namespace.css.rangeEnd);
|
||||
}
|
||||
|
||||
// the following figures out which direct from start date is selected
|
||||
// the selection "cap" classes are applied if needed
|
||||
// otherwise all the dates between will get the `rangeIn` class.
|
||||
// We make this selection based on the element's index and the rangeStart index
|
||||
|
||||
let lambda: (_, index) => boolean;
|
||||
|
||||
if (innerDate.isBefore(rangeStart)) {
|
||||
currentTarget.classList.add(Namespace.css.rangeStart);
|
||||
rangeStartElement?.classList.remove(Namespace.css.rangeStart);
|
||||
rangeStartElement?.classList.add(Namespace.css.rangeEnd);
|
||||
lambda = (_, index) => index > dayIndex && index < rangeStartIndex;
|
||||
} else {
|
||||
currentTarget.classList.add(Namespace.css.rangeEnd);
|
||||
rangeStartElement?.classList.remove(Namespace.css.rangeEnd);
|
||||
rangeStartElement?.classList.add(Namespace.css.rangeStart);
|
||||
lambda = (_, index) => index < dayIndex && index > rangeStartIndex;
|
||||
}
|
||||
|
||||
allDays.filter(lambda).forEach((e) => {
|
||||
e.classList.add(Namespace.css.rangeIn);
|
||||
});
|
||||
};
|
||||
|
||||
const rangeHoverOutEvent = (e: MouseEvent) => {
|
||||
// find all the dates in the container
|
||||
const allDays = [...container.querySelectorAll('.day')] as HTMLElement[];
|
||||
|
||||
// if only the start is selected, remove all the rangeIn classes
|
||||
// we do this because once the user hovers over a new date the range will be recalculated.
|
||||
if (this.dates.picked.length === 1)
|
||||
allDays.forEach((e) => e.classList.remove(Namespace.css.rangeIn));
|
||||
|
||||
// if we have 0 or 2 dates selected then ignore
|
||||
if (this.dates.picked.length !== 1) return;
|
||||
|
||||
const currentTarget = e?.currentTarget as HTMLElement;
|
||||
|
||||
// get the elements date from the attribute value
|
||||
const innerDate = new DateTime(currentTarget.getAttribute('data-value'));
|
||||
|
||||
// verify selections and remove invalid classes
|
||||
if (!innerDate.isSame(this.dates.picked[0], Unit.date)) {
|
||||
currentTarget.classList.remove(Namespace.css.rangeStart);
|
||||
}
|
||||
|
||||
if (!innerDate.isSame(this.dates.picked[1], Unit.date)) {
|
||||
currentTarget.classList.remove(Namespace.css.rangeEnd);
|
||||
}
|
||||
};
|
||||
|
||||
return { rangeHoverEvent, rangeHoverOutEvent };
|
||||
}
|
||||
|
||||
private _updateCalendarView(container: Element) {
|
||||
if (this.optionsStore.currentView !== 'calendar') return;
|
||||
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.optionsStore.options.display.components.month
|
||||
? switcher.classList.remove(Namespace.css.disabled)
|
||||
: switcher.classList.add(Namespace.css.disabled);
|
||||
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);
|
||||
}
|
||||
|
||||
/***
|
||||
* Generates a html row that contains the days of the week.
|
||||
* @private
|
||||
*/
|
||||
private _daysOfTheWeek(): HTMLElement[] {
|
||||
const 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
|
||||
);
|
||||
let weekDay = innerDate.format({ weekday: 'short' });
|
||||
if (this.optionsStore.options.localization.maxWeekdayLength > 0)
|
||||
weekDay = weekDay.substring(
|
||||
0,
|
||||
this.optionsStore.options.localization.maxWeekdayLength
|
||||
);
|
||||
htmlDivElement.innerText = weekDay;
|
||||
innerDate.manipulate(1, Unit.date);
|
||||
row.push(htmlDivElement);
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
private _handleCalendarWeeks(container: HTMLElement, innerDate: DateTime) {
|
||||
[...container.querySelectorAll(`.${Namespace.css.calendarWeeks}`)]
|
||||
.filter((e: HTMLElement) => e.innerText !== '#')
|
||||
.forEach((element: HTMLElement) => {
|
||||
element.innerText = `${innerDate.week}`;
|
||||
innerDate.manipulate(7, Unit.date);
|
||||
});
|
||||
}
|
||||
}
|
||||
130
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/decade-display.ts
generated
vendored
Normal file
130
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/decade-display.ts
generated
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
import Dates from '../../dates';
|
||||
import { DateTime, Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Validation from '../../validation';
|
||||
import { Paint } from '../index';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates and updates the grid for `seconds`
|
||||
*/
|
||||
export default class DecadeDisplay {
|
||||
private _startDecade: DateTime;
|
||||
private _endDecade: DateTime;
|
||||
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
|
||||
*/
|
||||
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);
|
||||
container.appendChild(div);
|
||||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: 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.optionsStore.viewDate.clone.startOf(Unit.year);
|
||||
this._endDecade.year = end;
|
||||
|
||||
const container = widget.getElementsByClassName(
|
||||
Namespace.css.decadesContainer
|
||||
)[0];
|
||||
|
||||
const [previous, switcher, next] = container.parentElement
|
||||
.getElementsByClassName(Namespace.css.calendarHeader)[0]
|
||||
.getElementsByTagName('div');
|
||||
|
||||
if (this.optionsStore.currentView === 'decades') {
|
||||
switcher.setAttribute(
|
||||
Namespace.css.decadesContainer,
|
||||
`${this._startDecade.format({
|
||||
year: 'numeric',
|
||||
})}-${this._endDecade.format({ year: 'numeric' })}`
|
||||
);
|
||||
|
||||
this.validation.isValid(this._startDecade, Unit.year)
|
||||
? previous.classList.remove(Namespace.css.disabled)
|
||||
: previous.classList.add(Namespace.css.disabled);
|
||||
this.validation.isValid(this._endDecade, Unit.year)
|
||||
? next.classList.remove(Namespace.css.disabled)
|
||||
: next.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
|
||||
const pickedYears = this.dates.picked.map((x) => x.year);
|
||||
|
||||
container
|
||||
.querySelectorAll(`[data-action="${ActionTypes.selectDecade}"]`)
|
||||
.forEach((containerClone: HTMLElement, index) => {
|
||||
if (index === 0) {
|
||||
containerClone.classList.add(Namespace.css.old);
|
||||
if (this._startDecade.year - 10 < 0) {
|
||||
containerClone.textContent = ' ';
|
||||
previous.classList.add(Namespace.css.disabled);
|
||||
containerClone.classList.add(Namespace.css.disabled);
|
||||
containerClone.setAttribute('data-value', '');
|
||||
return;
|
||||
} else {
|
||||
containerClone.innerText = this._startDecade.clone
|
||||
.manipulate(-10, Unit.year)
|
||||
.format({ year: 'numeric' });
|
||||
containerClone.setAttribute(
|
||||
'data-value',
|
||||
`${this._startDecade.year}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const classes = [];
|
||||
classes.push(Namespace.css.decade);
|
||||
const startDecadeYear = this._startDecade.year;
|
||||
const endDecadeYear = this._startDecade.year + 9;
|
||||
|
||||
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}`);
|
||||
containerClone.innerText = `${this._startDecade.format({
|
||||
year: 'numeric',
|
||||
})}`;
|
||||
|
||||
this._startDecade.manipulate(10, Unit.year);
|
||||
});
|
||||
}
|
||||
}
|
||||
105
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/month-display.ts
generated
vendored
Normal file
105
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/month-display.ts
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
import { Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Validation from '../../validation';
|
||||
import Dates from '../../dates';
|
||||
import { Paint } from '../index';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates and updates the grid for `month`
|
||||
*/
|
||||
export default class MonthDisplay {
|
||||
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
|
||||
*/
|
||||
getPicker(): HTMLElement {
|
||||
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(widget: HTMLElement, paint: Paint): void {
|
||||
const container = widget.getElementsByClassName(
|
||||
Namespace.css.monthsContainer
|
||||
)[0];
|
||||
|
||||
if (this.optionsStore.currentView === 'months') {
|
||||
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.optionsStore.options.display.components.year
|
||||
? switcher.classList.remove(Namespace.css.disabled)
|
||||
: switcher.classList.add(Namespace.css.disabled);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.year);
|
||||
|
||||
container
|
||||
.querySelectorAll(`[data-action="${ActionTypes.selectMonth}"]`)
|
||||
.forEach((containerClone: HTMLElement, index) => {
|
||||
const 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
112
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/year-display.ts
generated
vendored
Normal file
112
node_modules/@eonasdan/tempus-dominus/src/js/display/calendar/year-display.ts
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
import { DateTime, Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Dates from '../../dates';
|
||||
import Validation from '../../validation';
|
||||
import { Paint } from '../index';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates and updates the grid for `year`
|
||||
*/
|
||||
export default class YearDisplay {
|
||||
private _startYear: DateTime;
|
||||
private _endYear: DateTime;
|
||||
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
|
||||
*/
|
||||
getPicker(): HTMLElement {
|
||||
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);
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_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 = widget.getElementsByClassName(
|
||||
Namespace.css.yearsContainer
|
||||
)[0];
|
||||
|
||||
if (this.optionsStore.currentView === 'years') {
|
||||
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.optionsStore.options.display.components.decades
|
||||
? switcher.classList.remove(Namespace.css.disabled)
|
||||
: switcher.classList.add(Namespace.css.disabled);
|
||||
|
||||
this.validation.isValid(this._startYear, Unit.year)
|
||||
? previous.classList.remove(Namespace.css.disabled)
|
||||
: previous.classList.add(Namespace.css.disabled);
|
||||
this.validation.isValid(this._endYear, Unit.year)
|
||||
? next.classList.remove(Namespace.css.disabled)
|
||||
: next.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
|
||||
const innerDate = this.optionsStore.viewDate.clone
|
||||
.startOf(Unit.year)
|
||||
.manipulate(-1, Unit.year);
|
||||
|
||||
container
|
||||
.querySelectorAll(`[data-action="${ActionTypes.selectYear}"]`)
|
||||
.forEach((containerClone: HTMLElement) => {
|
||||
const classes = [];
|
||||
classes.push(Namespace.css.year);
|
||||
|
||||
if (
|
||||
!this.optionsStore.unset &&
|
||||
this.dates.isPicked(innerDate, Unit.year)
|
||||
) {
|
||||
classes.push(Namespace.css.active);
|
||||
}
|
||||
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}`);
|
||||
containerClone.innerText = innerDate.format({ year: 'numeric' });
|
||||
|
||||
innerDate.manipulate(1, Unit.year);
|
||||
});
|
||||
}
|
||||
}
|
||||
134
node_modules/@eonasdan/tempus-dominus/src/js/display/collapse.ts
generated
vendored
Normal file
134
node_modules/@eonasdan/tempus-dominus/src/js/display/collapse.ts
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
import Namespace from '../utilities/namespace';
|
||||
|
||||
/**
|
||||
* Provides a collapse functionality to the view changes
|
||||
*/
|
||||
export default class Collapse {
|
||||
/**
|
||||
* Flips the show/hide state of `target`
|
||||
* @param target html element to affect.
|
||||
*/
|
||||
static toggle(target: HTMLElement) {
|
||||
if (target.classList.contains(Namespace.css.show)) {
|
||||
this.hide(target);
|
||||
} else {
|
||||
this.show(target);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips any animation or timeouts and immediately set the element to show.
|
||||
* @param target
|
||||
*/
|
||||
static showImmediately(target: HTMLElement) {
|
||||
target.classList.remove(Namespace.css.collapsing);
|
||||
target.classList.add(Namespace.css.collapse, Namespace.css.show);
|
||||
target.style.height = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* If `target` is not already showing, then show after the animation.
|
||||
* @param target
|
||||
*/
|
||||
static show(target: HTMLElement) {
|
||||
if (
|
||||
target.classList.contains(Namespace.css.collapsing) ||
|
||||
target.classList.contains(Namespace.css.show)
|
||||
)
|
||||
return;
|
||||
|
||||
let timeOut = null;
|
||||
const complete = () => {
|
||||
Collapse.showImmediately(target);
|
||||
timeOut = null;
|
||||
};
|
||||
|
||||
target.style.height = '0';
|
||||
target.classList.remove(Namespace.css.collapse);
|
||||
target.classList.add(Namespace.css.collapsing);
|
||||
|
||||
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
timeOut = setTimeout(
|
||||
complete,
|
||||
this.getTransitionDurationFromElement(target)
|
||||
);
|
||||
target.style.height = `${target.scrollHeight}px`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips any animation or timeouts and immediately set the element to hide.
|
||||
* @param target
|
||||
*/
|
||||
static hideImmediately(target: HTMLElement) {
|
||||
if (!target) return;
|
||||
target.classList.remove(Namespace.css.collapsing, Namespace.css.show);
|
||||
target.classList.add(Namespace.css.collapse);
|
||||
}
|
||||
|
||||
/**
|
||||
* If `target` is not already hidden, then hide after the animation.
|
||||
* @param target HTML Element
|
||||
*/
|
||||
static hide(target: HTMLElement) {
|
||||
if (
|
||||
target.classList.contains(Namespace.css.collapsing) ||
|
||||
!target.classList.contains(Namespace.css.show)
|
||||
)
|
||||
return;
|
||||
|
||||
let timeOut = null;
|
||||
const complete = () => {
|
||||
Collapse.hideImmediately(target);
|
||||
timeOut = null;
|
||||
};
|
||||
|
||||
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 = '';
|
||||
|
||||
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
timeOut = 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
|
||||
*/
|
||||
private static getTransitionDurationFromElement = (element: HTMLElement) => {
|
||||
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
|
||||
);
|
||||
};
|
||||
}
|
||||
849
node_modules/@eonasdan/tempus-dominus/src/js/display/index.ts
generated
vendored
Normal file
849
node_modules/@eonasdan/tempus-dominus/src/js/display/index.ts
generated
vendored
Normal file
@@ -0,0 +1,849 @@
|
||||
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 Namespace from '../utilities/namespace';
|
||||
import { HideEvent } from '../utilities/event-types';
|
||||
import Collapse from './collapse';
|
||||
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';
|
||||
import { OptionsStore } from '../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Main class for all things display related.
|
||||
*/
|
||||
export default class Display {
|
||||
private _widget: HTMLElement;
|
||||
private _popperInstance: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
private _isVisible = false;
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the widget body or undefined
|
||||
* @private
|
||||
*/
|
||||
get widget(): HTMLElement | undefined {
|
||||
return this._widget;
|
||||
}
|
||||
|
||||
get dateContainer(): HTMLElement | undefined {
|
||||
return this.widget?.querySelector(`div.${Namespace.css.dateContainer}`);
|
||||
}
|
||||
|
||||
get timeContainer(): HTMLElement | undefined {
|
||||
return this.widget?.querySelector(`div.${Namespace.css.timeContainer}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this visible state of the picker (shown)
|
||||
*/
|
||||
get isVisible() {
|
||||
return this._isVisible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the table for a particular unit. Used when an option as changed or
|
||||
* whenever the class list might need to be refreshed.
|
||||
* @param unit
|
||||
* @private
|
||||
*/
|
||||
_update(unit: ViewUpdateValues): void {
|
||||
if (!this.widget) return;
|
||||
switch (unit) {
|
||||
case Unit.seconds:
|
||||
this.secondDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Unit.minutes:
|
||||
this.minuteDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Unit.hours:
|
||||
this.hourDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Unit.date:
|
||||
this.dateDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Unit.month:
|
||||
this.monthDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Unit.year:
|
||||
this.yearDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case 'decade':
|
||||
this.decadeDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case 'clock':
|
||||
if (!this._hasTime) break;
|
||||
this.timeDisplay._update(this.widget);
|
||||
this._update(Unit.hours);
|
||||
this._update(Unit.minutes);
|
||||
this._update(Unit.seconds);
|
||||
break;
|
||||
case 'calendar':
|
||||
this._update(Unit.date);
|
||||
this._update(Unit.year);
|
||||
this._update(Unit.month);
|
||||
this.decadeDisplay._update(this.widget, this.paint);
|
||||
this._updateCalendarHeader();
|
||||
break;
|
||||
case 'all':
|
||||
if (this._hasTime) {
|
||||
this._update('clock');
|
||||
}
|
||||
if (this._hasDate) {
|
||||
this._update('calendar');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// noinspection JSUnusedLocalSymbols
|
||||
/**
|
||||
* Allows developers to add/remove classes from an element.
|
||||
* @param _unit
|
||||
* @param _date
|
||||
* @param _classes
|
||||
* @param _element
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
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.
|
||||
* fires Events#show
|
||||
*/
|
||||
show(): void {
|
||||
if (this.widget == undefined) {
|
||||
this._showSetDefaultIfNeeded();
|
||||
|
||||
this._buildWidget();
|
||||
this._updateTheme();
|
||||
|
||||
this._showSetupViewMode();
|
||||
|
||||
if (!this.optionsStore.options.display.inline) {
|
||||
// If needed to change the parent container
|
||||
const container = this.optionsStore.options?.container || document.body;
|
||||
const placement =
|
||||
this.optionsStore.options?.display?.placement || 'bottom';
|
||||
|
||||
container.appendChild(this.widget);
|
||||
this.createPopup(this.optionsStore.element, this.widget, {
|
||||
modifiers: [{ name: 'eventListeners', enabled: true }],
|
||||
//#2400
|
||||
placement:
|
||||
document.documentElement.dir === 'rtl'
|
||||
? `${placement}-end`
|
||||
: `${placement}-start`,
|
||||
}).then();
|
||||
} else {
|
||||
this.optionsStore.element.appendChild(this.widget);
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.display.viewMode == 'clock') {
|
||||
this._eventEmitters.action.emit({
|
||||
e: null,
|
||||
action: ActionTypes.showClock,
|
||||
});
|
||||
}
|
||||
|
||||
this.widget
|
||||
.querySelectorAll('[data-action]')
|
||||
.forEach((element) =>
|
||||
element.addEventListener('click', this._actionsClickEvent)
|
||||
);
|
||||
|
||||
// show the clock when using sideBySide
|
||||
if (this._hasTime && this.optionsStore.options.display.sideBySide) {
|
||||
this.timeDisplay._update(this.widget);
|
||||
(
|
||||
this.widget.getElementsByClassName(
|
||||
Namespace.css.clockContainer
|
||||
)[0] as HTMLElement
|
||||
).style.display = 'grid';
|
||||
}
|
||||
}
|
||||
|
||||
this.widget.classList.add(Namespace.css.show);
|
||||
if (!this.optionsStore.options.display.inline) {
|
||||
this.updatePopup();
|
||||
document.addEventListener('click', this._documentClickEvent);
|
||||
}
|
||||
this._eventEmitters.triggerEvent.emit({ type: Namespace.events.show });
|
||||
this._isVisible = true;
|
||||
}
|
||||
|
||||
private _showSetupViewMode() {
|
||||
// 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.optionsStore.currentView = 'clock';
|
||||
this._eventEmitters.action.emit({
|
||||
e: null,
|
||||
action: ActionTypes.showClock,
|
||||
});
|
||||
}
|
||||
// otherwise return to the calendar view
|
||||
else if (!this.optionsStore.currentCalendarViewMode) {
|
||||
this.optionsStore.currentCalendarViewMode =
|
||||
this.optionsStore.minimumCalendarViewMode;
|
||||
}
|
||||
|
||||
if (!onlyClock && this.optionsStore.options.display.viewMode !== 'clock') {
|
||||
if (this._hasTime) {
|
||||
if (!this.optionsStore.options.display.sideBySide) {
|
||||
Collapse.hideImmediately(this.timeContainer);
|
||||
} else {
|
||||
Collapse.show(this.timeContainer);
|
||||
}
|
||||
}
|
||||
Collapse.show(this.dateContainer);
|
||||
}
|
||||
|
||||
if (this._hasDate) {
|
||||
this._showMode();
|
||||
}
|
||||
}
|
||||
|
||||
private _showSetDefaultIfNeeded() {
|
||||
if (this.dates.picked.length != 0) return;
|
||||
|
||||
if (
|
||||
this.optionsStore.options.useCurrent &&
|
||||
!this.optionsStore.options.defaultDate
|
||||
) {
|
||||
const date = new DateTime().setLocalization(
|
||||
this.optionsStore.options.localization
|
||||
);
|
||||
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) && tries > 31) {
|
||||
date.manipulate(direction, Unit.date);
|
||||
tries++;
|
||||
}
|
||||
}
|
||||
this.dates.setValue(date);
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.defaultDate) {
|
||||
this.dates.setValue(this.optionsStore.options.defaultDate);
|
||||
}
|
||||
}
|
||||
|
||||
async createPopup(
|
||||
element: HTMLElement,
|
||||
widget: HTMLElement,
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
options: any
|
||||
): Promise<void> {
|
||||
let createPopperFunction;
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
if ((window as any)?.Popper) {
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
createPopperFunction = (window as any)?.Popper?.createPopper;
|
||||
} else {
|
||||
const { createPopper } = await import('@popperjs/core');
|
||||
createPopperFunction = createPopper;
|
||||
}
|
||||
if (createPopperFunction) {
|
||||
this._popperInstance = createPopperFunction(element, widget, options);
|
||||
}
|
||||
}
|
||||
|
||||
updatePopup(): void {
|
||||
this._popperInstance?.update();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the calendar view mode. E.g. month <-> year
|
||||
* @param direction -/+ number to move currentViewMode
|
||||
* @private
|
||||
*/
|
||||
_showMode(direction?: number): void {
|
||||
if (!this.widget) {
|
||||
return;
|
||||
}
|
||||
if (direction) {
|
||||
const max = Math.max(
|
||||
this.optionsStore.minimumCalendarViewMode,
|
||||
Math.min(3, this.optionsStore.currentCalendarViewMode + direction)
|
||||
);
|
||||
if (this.optionsStore.currentCalendarViewMode == max) return;
|
||||
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: HTMLElement) => (e.style.display = 'none'));
|
||||
|
||||
const datePickerMode =
|
||||
CalendarModes[this.optionsStore.currentCalendarViewMode];
|
||||
const picker: HTMLElement = this.widget.querySelector(
|
||||
`.${datePickerMode.className}`
|
||||
);
|
||||
|
||||
switch (datePickerMode.className) {
|
||||
case Namespace.css.decadesContainer:
|
||||
this.decadeDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Namespace.css.yearsContainer:
|
||||
this.yearDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Namespace.css.monthsContainer:
|
||||
this.monthDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
case Namespace.css.daysContainer:
|
||||
this.dateDisplay._update(this.widget, this.paint);
|
||||
break;
|
||||
}
|
||||
|
||||
picker.style.display = 'grid';
|
||||
|
||||
if (this.optionsStore.options.display.sideBySide)
|
||||
(<HTMLElement>(
|
||||
this.widget.querySelectorAll(`.${Namespace.css.clockContainer}`)[0]
|
||||
)).style.display = 'grid';
|
||||
|
||||
this._updateCalendarHeader();
|
||||
this._eventEmitters.viewUpdate.emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the theme. E.g. light, dark or auto
|
||||
* @param theme the theme name
|
||||
* @private
|
||||
*/
|
||||
_updateTheme(theme?: 'light' | 'dark' | 'auto'): void {
|
||||
if (!this.widget) {
|
||||
return;
|
||||
}
|
||||
if (theme) {
|
||||
if (this.optionsStore.options.display.theme === theme) return;
|
||||
this.optionsStore.options.display.theme = theme;
|
||||
}
|
||||
|
||||
this.widget.classList.remove('light', 'dark');
|
||||
this.widget.classList.add(this._getThemeClass());
|
||||
|
||||
if (this.optionsStore.options.display.theme === 'auto') {
|
||||
window
|
||||
.matchMedia(Namespace.css.isDarkPreferredQuery)
|
||||
.addEventListener('change', () => this._updateTheme());
|
||||
} else {
|
||||
window
|
||||
.matchMedia(Namespace.css.isDarkPreferredQuery)
|
||||
.removeEventListener('change', () => this._updateTheme());
|
||||
}
|
||||
}
|
||||
|
||||
_getThemeClass(): string {
|
||||
const currentTheme = this.optionsStore.options.display.theme || 'auto';
|
||||
|
||||
const isDarkMode =
|
||||
window.matchMedia &&
|
||||
window.matchMedia(Namespace.css.isDarkPreferredQuery).matches;
|
||||
|
||||
switch (currentTheme) {
|
||||
case 'light':
|
||||
return Namespace.css.lightTheme;
|
||||
case 'dark':
|
||||
return Namespace.css.darkTheme;
|
||||
case 'auto':
|
||||
return isDarkMode ? Namespace.css.darkTheme : Namespace.css.lightTheme;
|
||||
}
|
||||
}
|
||||
|
||||
_updateCalendarHeader() {
|
||||
if (!this._hasDate) return;
|
||||
const showing = [
|
||||
...this.widget.querySelector(
|
||||
`.${Namespace.css.dateContainer} div[style*="display: grid"]`
|
||||
).classList,
|
||||
].find((x) => x.startsWith(Namespace.css.dateContainer));
|
||||
|
||||
const [previous, switcher, next] = this.widget
|
||||
.getElementsByClassName(Namespace.css.calendarHeader)[0]
|
||||
.getElementsByTagName('div');
|
||||
|
||||
switch (showing) {
|
||||
case Namespace.css.decadesContainer:
|
||||
previous.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.previousCentury
|
||||
);
|
||||
switcher.setAttribute('title', '');
|
||||
next.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.nextCentury
|
||||
);
|
||||
break;
|
||||
case Namespace.css.yearsContainer:
|
||||
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.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.optionsStore.options.localization.previousMonth
|
||||
);
|
||||
switcher.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.selectMonth
|
||||
);
|
||||
next.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.nextMonth
|
||||
);
|
||||
switcher.setAttribute(
|
||||
showing,
|
||||
this.optionsStore.viewDate.format(
|
||||
this.optionsStore.options.localization.dayViewHeaderFormat
|
||||
)
|
||||
);
|
||||
break;
|
||||
}
|
||||
switcher.innerText = switcher.getAttribute(showing);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides the picker if needed.
|
||||
* Remove document click event to hide when clicking outside the picker.
|
||||
* fires Events#hide
|
||||
*/
|
||||
hide(): void {
|
||||
if (!this.widget || !this._isVisible) return;
|
||||
|
||||
this.widget.classList.remove(Namespace.css.show);
|
||||
|
||||
if (this._isVisible) {
|
||||
this._eventEmitters.triggerEvent.emit({
|
||||
type: Namespace.events.hide,
|
||||
date: this.optionsStore.unset ? null : this.dates.lastPicked?.clone,
|
||||
} as HideEvent);
|
||||
this._isVisible = false;
|
||||
}
|
||||
|
||||
document.removeEventListener('click', this._documentClickEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the picker's open state. Fires a show/hide event depending.
|
||||
*/
|
||||
toggle() {
|
||||
return this._isVisible ? this.hide() : this.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes document and data-action click listener and reset the widget
|
||||
* @private
|
||||
*/
|
||||
_dispose() {
|
||||
document.removeEventListener('click', this._documentClickEvent);
|
||||
if (!this.widget) return;
|
||||
this.widget
|
||||
.querySelectorAll('[data-action]')
|
||||
.forEach((element) =>
|
||||
element.removeEventListener('click', this._actionsClickEvent)
|
||||
);
|
||||
this.widget.parentNode.removeChild(this.widget);
|
||||
this._widget = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the widgets html template.
|
||||
* @private
|
||||
*/
|
||||
private _buildWidget(): HTMLElement {
|
||||
const template = document.createElement('div');
|
||||
template.classList.add(Namespace.css.widget);
|
||||
|
||||
const dateView = document.createElement('div');
|
||||
dateView.classList.add(Namespace.css.dateContainer);
|
||||
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.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.getToolbarElements());
|
||||
|
||||
if (this.optionsStore.options.display.inline) {
|
||||
template.classList.add(Namespace.css.inline);
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.display.calendarWeeks) {
|
||||
template.classList.add('calendarWeeks');
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.display.sideBySide && this._hasDateAndTime) {
|
||||
this._buildWidgetSideBySide(template, dateView, timeView, toolbar);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.display.toolbarPlacement === 'top') {
|
||||
template.appendChild(toolbar);
|
||||
}
|
||||
|
||||
const setupComponentView = (hasFirst, hasSecond, element, shouldShow) => {
|
||||
if (!hasFirst) return;
|
||||
if (hasSecond) {
|
||||
element.classList.add(Namespace.css.collapse);
|
||||
if (shouldShow) element.classList.add(Namespace.css.show);
|
||||
}
|
||||
template.appendChild(element);
|
||||
};
|
||||
|
||||
setupComponentView(
|
||||
this._hasDate,
|
||||
this._hasTime,
|
||||
dateView,
|
||||
this.optionsStore.options.display.viewMode !== 'clock'
|
||||
);
|
||||
|
||||
setupComponentView(
|
||||
this._hasTime,
|
||||
this._hasDate,
|
||||
timeView,
|
||||
this.optionsStore.options.display.viewMode === 'clock'
|
||||
);
|
||||
|
||||
if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {
|
||||
template.appendChild(toolbar);
|
||||
}
|
||||
|
||||
const arrow = document.createElement('div');
|
||||
arrow.classList.add('arrow');
|
||||
arrow.setAttribute('data-popper-arrow', '');
|
||||
template.appendChild(arrow);
|
||||
|
||||
this._widget = template;
|
||||
}
|
||||
|
||||
private _buildWidgetSideBySide(
|
||||
template: HTMLDivElement,
|
||||
dateView: HTMLDivElement,
|
||||
timeView: HTMLDivElement,
|
||||
toolbar: HTMLDivElement
|
||||
) {
|
||||
template.classList.add(Namespace.css.sideBySide);
|
||||
if (this.optionsStore.options.display.toolbarPlacement === 'top') {
|
||||
template.appendChild(toolbar);
|
||||
}
|
||||
const row = document.createElement('div');
|
||||
row.classList.add('td-row');
|
||||
dateView.classList.add('td-half');
|
||||
timeView.classList.add('td-half');
|
||||
|
||||
row.appendChild(dateView);
|
||||
row.appendChild(timeView);
|
||||
template.appendChild(row);
|
||||
if (this.optionsStore.options.display.toolbarPlacement === 'bottom') {
|
||||
template.appendChild(toolbar);
|
||||
}
|
||||
this._widget = template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the hours, minutes, or seconds component is turned on
|
||||
*/
|
||||
get _hasTime(): boolean {
|
||||
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(): boolean {
|
||||
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 _hasDateAndTime(): boolean {
|
||||
return this._hasDate && this._hasTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the toolbar html based on options like buttons => today
|
||||
* @private
|
||||
*/
|
||||
getToolbarElements(): HTMLElement[] {
|
||||
const toolbar = [];
|
||||
|
||||
if (this.optionsStore.options.display.buttons.today) {
|
||||
const div = document.createElement('div');
|
||||
div.setAttribute('data-action', ActionTypes.today);
|
||||
div.setAttribute('title', this.optionsStore.options.localization.today);
|
||||
|
||||
div.appendChild(
|
||||
this._iconTag(this.optionsStore.options.display.icons.today)
|
||||
);
|
||||
toolbar.push(div);
|
||||
}
|
||||
if (
|
||||
!this.optionsStore.options.display.sideBySide &&
|
||||
this._hasDate &&
|
||||
this._hasTime
|
||||
) {
|
||||
let title, icon;
|
||||
if (this.optionsStore.options.display.viewMode === 'clock') {
|
||||
title = this.optionsStore.options.localization.selectDate;
|
||||
icon = this.optionsStore.options.display.icons.date;
|
||||
} else {
|
||||
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('title', title);
|
||||
|
||||
div.appendChild(this._iconTag(icon));
|
||||
toolbar.push(div);
|
||||
}
|
||||
if (this.optionsStore.options.display.buttons.clear) {
|
||||
const div = document.createElement('div');
|
||||
div.setAttribute('data-action', ActionTypes.clear);
|
||||
div.setAttribute('title', this.optionsStore.options.localization.clear);
|
||||
|
||||
div.appendChild(
|
||||
this._iconTag(this.optionsStore.options.display.icons.clear)
|
||||
);
|
||||
toolbar.push(div);
|
||||
}
|
||||
if (this.optionsStore.options.display.buttons.close) {
|
||||
const div = document.createElement('div');
|
||||
div.setAttribute('data-action', ActionTypes.close);
|
||||
div.setAttribute('title', this.optionsStore.options.localization.close);
|
||||
|
||||
div.appendChild(
|
||||
this._iconTag(this.optionsStore.options.display.icons.close)
|
||||
);
|
||||
toolbar.push(div);
|
||||
}
|
||||
|
||||
return toolbar;
|
||||
}
|
||||
|
||||
/***
|
||||
* Builds the base header template with next and previous icons
|
||||
* @private
|
||||
*/
|
||||
getHeadTemplate(): HTMLElement {
|
||||
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.optionsStore.options.display.icons.previous)
|
||||
);
|
||||
|
||||
const switcher = document.createElement('div');
|
||||
switcher.classList.add(Namespace.css.switch);
|
||||
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.optionsStore.options.display.icons.next)
|
||||
);
|
||||
|
||||
calendarHeader.append(previous, switcher, next);
|
||||
return calendarHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds an icon tag as either an `<i>`
|
||||
* or with icons => type is `sprites` then a svg tag instead
|
||||
* @param iconClass
|
||||
* @private
|
||||
*/
|
||||
_iconTag(iconClass: string): HTMLElement | SVGElement {
|
||||
if (this.optionsStore.options.display.icons.type === 'sprites') {
|
||||
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
|
||||
const icon = document.createElementNS(
|
||||
'http://www.w3.org/2000/svg',
|
||||
'use'
|
||||
);
|
||||
icon.setAttribute('xlink:href', iconClass); // Deprecated. Included for backward compatibility
|
||||
icon.setAttribute('href', iconClass);
|
||||
svg.appendChild(icon);
|
||||
|
||||
return svg;
|
||||
}
|
||||
const icon = document.createElement('i');
|
||||
icon.classList.add(...iconClass.split(' '));
|
||||
return icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* A document click event to hide the widget if click is outside
|
||||
* @private
|
||||
* @param e MouseEvent
|
||||
*/
|
||||
private _documentClickEvent = (e: MouseEvent) => {
|
||||
if (this.optionsStore.options.debug || (window as any).debug) return; //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
|
||||
if (
|
||||
this._isVisible &&
|
||||
!e.composedPath().includes(this.widget) && // click inside the widget
|
||||
!e.composedPath()?.includes(this.optionsStore.element) // click on the element
|
||||
) {
|
||||
this.hide();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Click event for any action like selecting a date
|
||||
* @param e MouseEvent
|
||||
* @private
|
||||
*/
|
||||
private _actionsClickEvent = (e: MouseEvent) => {
|
||||
this._eventEmitters.action.emit({ e: e });
|
||||
};
|
||||
|
||||
/**
|
||||
* Causes the widget to get rebuilt on next show. If the picker is already open
|
||||
* then hide and reshow it.
|
||||
* @private
|
||||
*/
|
||||
_rebuild() {
|
||||
const wasVisible = this._isVisible;
|
||||
this._dispose();
|
||||
if (wasVisible) this.show();
|
||||
}
|
||||
|
||||
refreshCurrentView() {
|
||||
//if the widget is not showing, just destroy it
|
||||
if (!this._isVisible) this._dispose();
|
||||
|
||||
switch (this.optionsStore.currentView) {
|
||||
case 'clock':
|
||||
this._update('clock');
|
||||
break;
|
||||
case 'calendar':
|
||||
this._update(Unit.date);
|
||||
break;
|
||||
case 'months':
|
||||
this._update(Unit.month);
|
||||
break;
|
||||
case 'years':
|
||||
this._update(Unit.year);
|
||||
break;
|
||||
case 'decades':
|
||||
this._update('decade');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type Paint = (
|
||||
unit: Unit | 'decade',
|
||||
innerDate: DateTime,
|
||||
classes: string[],
|
||||
element: HTMLElement
|
||||
) => void;
|
||||
68
node_modules/@eonasdan/tempus-dominus/src/js/display/time/hour-display.ts
generated
vendored
Normal file
68
node_modules/@eonasdan/tempus-dominus/src/js/display/time/hour-display.ts
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
import { Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Validation from '../../validation';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import { Paint } from '../index';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates and updates the grid for `hours`
|
||||
*/
|
||||
export default class HourDisplay {
|
||||
private optionsStore: OptionsStore;
|
||||
private validation: Validation;
|
||||
|
||||
constructor() {
|
||||
this.optionsStore = serviceLocator.locate(OptionsStore);
|
||||
this.validation = serviceLocator.locate(Validation);
|
||||
}
|
||||
/**
|
||||
* Build the container html for the display
|
||||
* @private
|
||||
*/
|
||||
getPicker(): HTMLElement {
|
||||
const container = document.createElement('div');
|
||||
container.classList.add(Namespace.css.hourContainer);
|
||||
|
||||
for (let i = 0; i < (this.optionsStore.isTwelveHour ? 12 : 24); i++) {
|
||||
const div = document.createElement('div');
|
||||
div.setAttribute('data-action', ActionTypes.selectHour);
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void {
|
||||
const container = widget.getElementsByClassName(
|
||||
Namespace.css.hourContainer
|
||||
)[0];
|
||||
const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.date);
|
||||
|
||||
container
|
||||
.querySelectorAll(`[data-action="${ActionTypes.selectHour}"]`)
|
||||
.forEach((containerClone: HTMLElement) => {
|
||||
const classes = [];
|
||||
classes.push(Namespace.css.hour);
|
||||
|
||||
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 = innerDate.getHoursFormatted(
|
||||
this.optionsStore.options.localization.hourCycle
|
||||
);
|
||||
innerDate.manipulate(1, Unit.hours);
|
||||
});
|
||||
}
|
||||
}
|
||||
74
node_modules/@eonasdan/tempus-dominus/src/js/display/time/minute-display.ts
generated
vendored
Normal file
74
node_modules/@eonasdan/tempus-dominus/src/js/display/time/minute-display.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import { Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Validation from '../../validation';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import { Paint } from '../index';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates and updates the grid for `minutes`
|
||||
*/
|
||||
export default class MinuteDisplay {
|
||||
private optionsStore: OptionsStore;
|
||||
private validation: Validation;
|
||||
|
||||
constructor() {
|
||||
this.optionsStore = serviceLocator.locate(OptionsStore);
|
||||
this.validation = serviceLocator.locate(Validation);
|
||||
}
|
||||
/**
|
||||
* Build the container html for the display
|
||||
* @private
|
||||
*/
|
||||
getPicker(): HTMLElement {
|
||||
const container = document.createElement('div');
|
||||
container.classList.add(Namespace.css.minuteContainer);
|
||||
|
||||
const step =
|
||||
this.optionsStore.options.stepping === 1
|
||||
? 5
|
||||
: this.optionsStore.options.stepping;
|
||||
for (let i = 0; i < 60 / step; i++) {
|
||||
const div = document.createElement('div');
|
||||
div.setAttribute('data-action', ActionTypes.selectMinute);
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void {
|
||||
const container = widget.getElementsByClassName(
|
||||
Namespace.css.minuteContainer
|
||||
)[0];
|
||||
const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.hours);
|
||||
const step =
|
||||
this.optionsStore.options.stepping === 1
|
||||
? 5
|
||||
: this.optionsStore.options.stepping;
|
||||
|
||||
container
|
||||
.querySelectorAll(`[data-action="${ActionTypes.selectMinute}"]`)
|
||||
.forEach((containerClone: HTMLElement) => {
|
||||
const classes = [];
|
||||
classes.push(Namespace.css.minute);
|
||||
|
||||
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.minutes}`);
|
||||
containerClone.innerText = innerDate.minutesFormatted;
|
||||
innerDate.manipulate(step, Unit.minutes);
|
||||
});
|
||||
}
|
||||
}
|
||||
66
node_modules/@eonasdan/tempus-dominus/src/js/display/time/second-display.ts
generated
vendored
Normal file
66
node_modules/@eonasdan/tempus-dominus/src/js/display/time/second-display.ts
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
import { Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Validation from '../../validation';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import { Paint } from '../index';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates and updates the grid for `seconds`
|
||||
*/
|
||||
export default class secondDisplay {
|
||||
private optionsStore: OptionsStore;
|
||||
private validation: Validation;
|
||||
|
||||
constructor() {
|
||||
this.optionsStore = serviceLocator.locate(OptionsStore);
|
||||
this.validation = serviceLocator.locate(Validation);
|
||||
}
|
||||
/**
|
||||
* Build the container html for the display
|
||||
* @private
|
||||
*/
|
||||
getPicker(): HTMLElement {
|
||||
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);
|
||||
container.appendChild(div);
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void {
|
||||
const container = widget.getElementsByClassName(
|
||||
Namespace.css.secondContainer
|
||||
)[0];
|
||||
const innerDate = this.optionsStore.viewDate.clone.startOf(Unit.minutes);
|
||||
|
||||
container
|
||||
.querySelectorAll(`[data-action="${ActionTypes.selectSecond}"]`)
|
||||
.forEach((containerClone: HTMLElement) => {
|
||||
const classes = [];
|
||||
classes.push(Namespace.css.second);
|
||||
|
||||
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}`);
|
||||
containerClone.innerText = innerDate.secondsFormatted;
|
||||
innerDate.manipulate(5, Unit.seconds);
|
||||
});
|
||||
}
|
||||
}
|
||||
322
node_modules/@eonasdan/tempus-dominus/src/js/display/time/time-display.ts
generated
vendored
Normal file
322
node_modules/@eonasdan/tempus-dominus/src/js/display/time/time-display.ts
generated
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
import { Unit } from '../../datetime';
|
||||
import Namespace from '../../utilities/namespace';
|
||||
import Validation from '../../validation';
|
||||
import Dates from '../../dates';
|
||||
import { serviceLocator } from '../../utilities/service-locator';
|
||||
import ActionTypes from '../../utilities/action-types';
|
||||
import { OptionsStore } from '../../utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Creates the clock display
|
||||
*/
|
||||
export default class TimeDisplay {
|
||||
private _gridColumns = '';
|
||||
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
|
||||
*/
|
||||
getPicker(iconTag: (iconClass: string) => HTMLElement): HTMLElement {
|
||||
const container = document.createElement('div');
|
||||
container.classList.add(Namespace.css.clockContainer);
|
||||
|
||||
container.append(...this._grid(iconTag));
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the various elements with in the clock display
|
||||
* like the current hour and if the manipulation icons are enabled.
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement): void {
|
||||
const timesDiv = <HTMLElement>(
|
||||
widget.getElementsByClassName(Namespace.css.clockContainer)[0]
|
||||
);
|
||||
let lastPicked = this.dates.lastPicked?.clone;
|
||||
if (!lastPicked && this.optionsStore.options.useCurrent)
|
||||
lastPicked = this.optionsStore.viewDate.clone;
|
||||
|
||||
timesDiv
|
||||
.querySelectorAll('.disabled')
|
||||
.forEach((element) => element.classList.remove(Namespace.css.disabled));
|
||||
|
||||
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}]`)
|
||||
.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
|
||||
if (
|
||||
!this.validation.isValid(
|
||||
this.optionsStore.viewDate.clone.manipulate(-1, Unit.hours),
|
||||
Unit.hours
|
||||
)
|
||||
) {
|
||||
timesDiv
|
||||
.querySelector(`[data-action=${ActionTypes.decrementHours}]`)
|
||||
.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
|
||||
timesDiv.querySelector<HTMLElement>(
|
||||
`[data-time-component=${Unit.hours}]`
|
||||
).innerText = lastPicked
|
||||
? lastPicked.getHoursFormatted(
|
||||
this.optionsStore.options.localization.hourCycle
|
||||
)
|
||||
: '--';
|
||||
}
|
||||
|
||||
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}]`)
|
||||
.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
|
||||
if (
|
||||
!this.validation.isValid(
|
||||
this.optionsStore.viewDate.clone.manipulate(-1, Unit.minutes),
|
||||
Unit.minutes
|
||||
)
|
||||
) {
|
||||
timesDiv
|
||||
.querySelector(`[data-action=${ActionTypes.decrementMinutes}]`)
|
||||
.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
timesDiv.querySelector<HTMLElement>(
|
||||
`[data-time-component=${Unit.minutes}]`
|
||||
).innerText = lastPicked ? lastPicked.minutesFormatted : '--';
|
||||
}
|
||||
|
||||
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}]`)
|
||||
.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
|
||||
if (
|
||||
!this.validation.isValid(
|
||||
this.optionsStore.viewDate.clone.manipulate(-1, Unit.seconds),
|
||||
Unit.seconds
|
||||
)
|
||||
) {
|
||||
timesDiv
|
||||
.querySelector(`[data-action=${ActionTypes.decrementSeconds}]`)
|
||||
.classList.add(Namespace.css.disabled);
|
||||
}
|
||||
timesDiv.querySelector<HTMLElement>(
|
||||
`[data-time-component=${Unit.seconds}]`
|
||||
).innerText = lastPicked ? lastPicked.secondsFormatted : '--';
|
||||
}
|
||||
|
||||
if (this.optionsStore.isTwelveHour) {
|
||||
const toggle = timesDiv.querySelector<HTMLElement>(
|
||||
`[data-action=${ActionTypes.toggleMeridiem}]`
|
||||
);
|
||||
|
||||
const meridiemDate = (lastPicked || this.optionsStore.viewDate).clone;
|
||||
|
||||
toggle.innerText = meridiemDate.meridiem();
|
||||
|
||||
if (
|
||||
!this.validation.isValid(
|
||||
meridiemDate.manipulate(
|
||||
meridiemDate.hours >= 12 ? -12 : 12,
|
||||
Unit.hours
|
||||
)
|
||||
)
|
||||
) {
|
||||
toggle.classList.add(Namespace.css.disabled);
|
||||
} else {
|
||||
toggle.classList.remove(Namespace.css.disabled);
|
||||
}
|
||||
}
|
||||
|
||||
timesDiv.style.gridTemplateAreas = `"${this._gridColumns}"`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the table for the clock display depending on what options are selected.
|
||||
* @private
|
||||
*/
|
||||
private _grid(iconTag: (iconClass: string) => HTMLElement): HTMLElement[] {
|
||||
this._gridColumns = '';
|
||||
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 = <HTMLElement>separator.cloneNode(true);
|
||||
separatorColon.innerHTML = ':';
|
||||
|
||||
const getSeparator = (colon = false): HTMLElement => {
|
||||
return colon
|
||||
? <HTMLElement>separatorColon.cloneNode(true)
|
||||
: <HTMLElement>separator.cloneNode(true);
|
||||
};
|
||||
|
||||
if (this.optionsStore.options.display.components.hours) {
|
||||
let divElement = document.createElement('div');
|
||||
divElement.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.incrementHour
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.incrementHours);
|
||||
divElement.appendChild(upIcon.cloneNode(true));
|
||||
top.push(divElement);
|
||||
|
||||
divElement = document.createElement('div');
|
||||
divElement.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.pickHour
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.showHours);
|
||||
divElement.setAttribute('data-time-component', Unit.hours);
|
||||
middle.push(divElement);
|
||||
|
||||
divElement = document.createElement('div');
|
||||
divElement.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.decrementHour
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.decrementHours);
|
||||
divElement.appendChild(downIcon.cloneNode(true));
|
||||
bottom.push(divElement);
|
||||
this._gridColumns += 'a';
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.display.components.minutes) {
|
||||
this._gridColumns += ' a';
|
||||
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.optionsStore.options.localization.incrementMinute
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.incrementMinutes);
|
||||
divElement.appendChild(upIcon.cloneNode(true));
|
||||
top.push(divElement);
|
||||
|
||||
divElement = document.createElement('div');
|
||||
divElement.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.pickMinute
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.showMinutes);
|
||||
divElement.setAttribute('data-time-component', Unit.minutes);
|
||||
middle.push(divElement);
|
||||
|
||||
divElement = document.createElement('div');
|
||||
divElement.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.decrementMinute
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.decrementMinutes);
|
||||
divElement.appendChild(downIcon.cloneNode(true));
|
||||
bottom.push(divElement);
|
||||
}
|
||||
|
||||
if (this.optionsStore.options.display.components.seconds) {
|
||||
this._gridColumns += ' a';
|
||||
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.optionsStore.options.localization.incrementSecond
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.incrementSeconds);
|
||||
divElement.appendChild(upIcon.cloneNode(true));
|
||||
top.push(divElement);
|
||||
|
||||
divElement = document.createElement('div');
|
||||
divElement.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.pickSecond
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.showSeconds);
|
||||
divElement.setAttribute('data-time-component', Unit.seconds);
|
||||
middle.push(divElement);
|
||||
|
||||
divElement = document.createElement('div');
|
||||
divElement.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.decrementSecond
|
||||
);
|
||||
divElement.setAttribute('data-action', ActionTypes.decrementSeconds);
|
||||
divElement.appendChild(downIcon.cloneNode(true));
|
||||
bottom.push(divElement);
|
||||
}
|
||||
|
||||
if (this.optionsStore.isTwelveHour) {
|
||||
this._gridColumns += ' a';
|
||||
let divElement = getSeparator();
|
||||
top.push(divElement);
|
||||
|
||||
const button = document.createElement('button');
|
||||
button.setAttribute('type', 'button');
|
||||
button.setAttribute(
|
||||
'title',
|
||||
this.optionsStore.options.localization.toggleMeridiem
|
||||
);
|
||||
button.setAttribute('data-action', ActionTypes.toggleMeridiem);
|
||||
button.setAttribute('tabindex', '-1');
|
||||
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);
|
||||
middle.push(divElement);
|
||||
|
||||
divElement = getSeparator();
|
||||
bottom.push(divElement);
|
||||
}
|
||||
|
||||
this._gridColumns = this._gridColumns.trim();
|
||||
|
||||
return [...top, ...middle, ...bottom];
|
||||
}
|
||||
}
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ar-SA.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ar-SA.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'ar-SA';
|
||||
|
||||
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: 'ar-SA',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ar.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ar.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'ar';
|
||||
|
||||
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: 'ar',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'd/M/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ca.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ca.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'ca';
|
||||
|
||||
const localization = {
|
||||
today: 'Avui',
|
||||
clear: 'Esborrar selecció',
|
||||
close: 'Tancar selector',
|
||||
selectMonth: 'Seleccionar mes',
|
||||
previousMonth: 'Mes anterior',
|
||||
nextMonth: 'Pròxim mes',
|
||||
selectYear: 'Seleccionar any',
|
||||
previousYear: 'Any anterior',
|
||||
nextYear: 'Pròxim any',
|
||||
selectDecade: 'Seleccionar dècada',
|
||||
previousDecade: 'Dècada anterior',
|
||||
nextDecade: 'Pròxima dècada',
|
||||
previousCentury: 'Segle anterior',
|
||||
nextCentury: 'Pròxim segle',
|
||||
pickHour: 'Escollir hora',
|
||||
incrementHour: 'Incrementar hora',
|
||||
decrementHour: 'Decrementar hora',
|
||||
pickMinute: 'Escollir minut',
|
||||
incrementMinute: 'Incrementar minut',
|
||||
decrementMinute: 'Decrementar minut',
|
||||
pickSecond: 'Escollir segon',
|
||||
incrementSecond: 'Incrementar segon',
|
||||
decrementSecond: 'Decrementar segon',
|
||||
toggleMeridiem: 'Canviar AM/PM',
|
||||
selectTime: 'Seleccionar temps',
|
||||
selectDate: 'Seleccionar data',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
startOfTheWeek: 1,
|
||||
locale: 'ca',
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd [de] MMMM [de] yyyy',
|
||||
LLL: 'd [de] MMMM [de] yyyy H:mm',
|
||||
LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}º`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/cs.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/cs.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'cs';
|
||||
|
||||
const localization = {
|
||||
today: 'Dnes',
|
||||
clear: 'Vymazat výběr',
|
||||
close: 'Zavřít výběrové okno',
|
||||
selectMonth: 'Vybrat měsíc',
|
||||
previousMonth: 'Předchozí měsíc',
|
||||
nextMonth: 'Následující měsíc',
|
||||
selectYear: 'Vybrat rok',
|
||||
previousYear: 'Předchozí rok',
|
||||
nextYear: 'Následující rok',
|
||||
selectDecade: 'Vybrat desetiletí',
|
||||
previousDecade: 'Předchozí desetiletí',
|
||||
nextDecade: 'Následující desetiletí',
|
||||
previousCentury: 'Předchozí století',
|
||||
nextCentury: 'Následující století',
|
||||
pickHour: 'Vybrat hodinu',
|
||||
incrementHour: 'Zvýšit hodinu',
|
||||
decrementHour: 'Snížit hodinu',
|
||||
pickMinute: 'Vybrat minutu',
|
||||
incrementMinute: 'Zvýšit minutu',
|
||||
decrementMinute: 'Snížit minutu',
|
||||
pickSecond: 'Vybrat sekundu',
|
||||
incrementSecond: 'Zvýšit sekundu',
|
||||
decrementSecond: 'Snížit sekundu',
|
||||
toggleMeridiem: 'Přepnout ráno / odpoledne',
|
||||
selectTime: 'Vybrat čas',
|
||||
selectDate: 'Vybrat datum',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'de',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LTS: 'HH:mm:ss',
|
||||
LT: 'HH:mm',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM yyyy',
|
||||
LLL: 'd. MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d. MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/de.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/de.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'de';
|
||||
|
||||
const localization = {
|
||||
today: 'Heute',
|
||||
clear: 'Auswahl löschen',
|
||||
close: 'Auswahlbox schließen',
|
||||
selectMonth: 'Monat wählen',
|
||||
previousMonth: 'Letzter Monat',
|
||||
nextMonth: 'Nächster Monat',
|
||||
selectYear: 'Jahr wählen',
|
||||
previousYear: 'Letztes Jahr',
|
||||
nextYear: 'Nächstes Jahr',
|
||||
selectDecade: 'Jahrzehnt wählen',
|
||||
previousDecade: 'Letztes Jahrzehnt',
|
||||
nextDecade: 'Nächstes Jahrzehnt',
|
||||
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,
|
||||
dateFormats: {
|
||||
LTS: 'HH:mm:ss',
|
||||
LT: 'HH:mm',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM yyyy',
|
||||
LLL: 'd. MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d. MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/es.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/es.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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' },
|
||||
startOfTheWeek: 1,
|
||||
locale: 'es',
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd [de] MMMM [de] yyyy',
|
||||
LLL: 'd [de] MMMM [de] yyyy H:mm',
|
||||
LLLL: 'dddd, d [de] MMMM [de] yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}º`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/fi.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/fi.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'fi';
|
||||
|
||||
const localization = {
|
||||
today: 'Tänään',
|
||||
clear: 'Tyhjennä',
|
||||
close: 'Sulje',
|
||||
selectMonth: 'Valitse kuukausi',
|
||||
previousMonth: 'Edellinen kuukausi',
|
||||
nextMonth: 'Seuraava kuukausi',
|
||||
selectYear: 'Valitse vuosi',
|
||||
previousYear: 'Edellinen vuosi',
|
||||
nextYear: 'Seuraava vuosi',
|
||||
selectDecade: 'Valitse vuosikymmen',
|
||||
previousDecade: 'Edellinen vuosikymmen',
|
||||
nextDecade: 'Seuraava vuosikymmen',
|
||||
previousCentury: 'Edellinen vuosisata',
|
||||
nextCentury: 'Seuraava vuosisata',
|
||||
pickHour: 'Valitse tunnit',
|
||||
incrementHour: 'Vähennä tunteja',
|
||||
decrementHour: 'Lisää tunteja',
|
||||
pickMinute: 'Valitse minuutit',
|
||||
incrementMinute: 'Vähennä minuutteja',
|
||||
decrementMinute: 'Lisää minuutteja',
|
||||
pickSecond: 'Valitse sekuntit',
|
||||
incrementSecond: 'Vähennä sekunteja',
|
||||
decrementSecond: 'Lisää sekunteja',
|
||||
toggleMeridiem: 'Vaihda kellonaikaa',
|
||||
selectTime: 'Valitse aika',
|
||||
selectDate: 'Valise päivä',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'fi',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH.mm',
|
||||
LTS: 'HH.mm.ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM[ta] yyyy',
|
||||
LLL: 'd. MMMM[ta] yyyy, [klo] HH.mm',
|
||||
LLLL: 'dddd, d. MMMM[ta] yyyy, [klo] HH.mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
48
node_modules/@eonasdan/tempus-dominus/src/js/locales/fr.ts
generated
vendored
Normal file
48
node_modules/@eonasdan/tempus-dominus/src/js/locales/fr.ts
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
const name = 'fr';
|
||||
|
||||
const localization = {
|
||||
today: "Aujourd'hui",
|
||||
clear: 'Effacer la sélection',
|
||||
close: 'Fermer',
|
||||
selectMonth: 'Sélectionner le mois',
|
||||
previousMonth: 'Mois précédent',
|
||||
nextMonth: 'Mois suivant',
|
||||
selectYear: "Sélectionner l'année",
|
||||
previousYear: 'Année précédente',
|
||||
nextYear: 'Année suivante',
|
||||
selectDecade: 'Sélectionner la décennie',
|
||||
previousDecade: 'Décennie précédente',
|
||||
nextDecade: 'Décennie suivante',
|
||||
previousCentury: 'Siècle précédente',
|
||||
nextCentury: 'Siècle suivante',
|
||||
pickHour: "Sélectionner l'heure",
|
||||
incrementHour: "Incrementer l'heure",
|
||||
decrementHour: "Diminuer l'heure",
|
||||
pickMinute: 'Sélectionner les minutes',
|
||||
incrementMinute: 'Incrementer les minutes',
|
||||
decrementMinute: 'Diminuer les minutes',
|
||||
pickSecond: 'Sélectionner les secondes',
|
||||
incrementSecond: 'Incrementer les secondes',
|
||||
decrementSecond: 'Diminuer les secondes',
|
||||
toggleMeridiem: 'Basculer AM-PM',
|
||||
selectTime: "Sélectionner l'heure",
|
||||
selectDate: 'Sélectionner une date',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'fr',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => {
|
||||
const o = n === 1 ? 'er' : '';
|
||||
return `${n}${o}`;
|
||||
},
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/hy.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/hy.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'hy';
|
||||
|
||||
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: 'hy',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy թ.',
|
||||
LLL: 'd MMMM yyyy թ., H:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy թ., H:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LTS',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/it.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/it.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd/MM/yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}º`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/nl.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/nl.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd-MM-yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `[${n}${n === 1 || n === 8 || n >= 20 ? 'ste' : 'de'}]`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/pl.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/pl.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'pl';
|
||||
|
||||
const localization = {
|
||||
today: 'Dzisiaj',
|
||||
clear: 'Wyczyść',
|
||||
close: 'Zamknij',
|
||||
selectMonth: 'Wybierz miesiąc',
|
||||
previousMonth: 'Poprzedni miesiąc',
|
||||
nextMonth: 'Następny miesiąc',
|
||||
selectYear: 'Wybierz rok',
|
||||
previousYear: 'Poprzedni rok',
|
||||
nextYear: 'Następny rok',
|
||||
selectDecade: 'Wybierz dekadę',
|
||||
previousDecade: 'Poprzednia dekada',
|
||||
nextDecade: 'Następna dekada',
|
||||
previousCentury: 'Poprzednie stulecie',
|
||||
nextCentury: 'Następne stulecie',
|
||||
pickHour: 'Wybierz godzinę',
|
||||
incrementHour: 'Kolejna godzina',
|
||||
decrementHour: 'Poprzednia godzina',
|
||||
pickMinute: 'Wybierz minutę',
|
||||
incrementMinute: 'Kolejna minuta',
|
||||
decrementMinute: 'Poprzednia minuta',
|
||||
pickSecond: 'Wybierz sekundę',
|
||||
incrementSecond: 'Kolejna sekunda',
|
||||
decrementSecond: 'Poprzednia sekunda',
|
||||
toggleMeridiem: 'Przełącz porę dnia',
|
||||
selectTime: 'Ustaw godzinę',
|
||||
selectDate: 'Ustaw datę',
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
locale: 'pl',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ro.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ro.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy H:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ru.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/ru.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy г.',
|
||||
LLL: 'd MMMM yyyy г., H:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy г., H:mm',
|
||||
},
|
||||
ordinal: (n) => n,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/sl.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/sl.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'sl';
|
||||
|
||||
const localization = {
|
||||
today: 'Danes',
|
||||
clear: 'Počisti',
|
||||
close: 'Zapri',
|
||||
selectMonth: 'Izberite mesec',
|
||||
previousMonth: 'Prejšnji mesec',
|
||||
nextMonth: 'Naslednji mesec',
|
||||
selectYear: 'Izberite leto',
|
||||
previousYear: 'Prejšnje Leto',
|
||||
nextYear: 'Naslednje leto',
|
||||
selectDecade: 'Izberite desetletje',
|
||||
previousDecade: 'Prejšnje desetletje',
|
||||
nextDecade: 'Naslednje desetletje',
|
||||
previousCentury: 'Prejšnje stoletje',
|
||||
nextCentury: 'Naslednje stoletje',
|
||||
pickHour: 'Izberite uro',
|
||||
incrementHour: 'Povečaj ure',
|
||||
decrementHour: 'Zmanjšaj uro',
|
||||
pickMinute: 'Izberite minuto',
|
||||
incrementMinute: 'Povečaj minuto',
|
||||
decrementMinute: 'Zmanjšaj minuto',
|
||||
pickSecond: 'Izberite drugo',
|
||||
incrementSecond: 'Povečaj sekundo',
|
||||
decrementSecond: 'Zmanjšaj sekundo',
|
||||
toggleMeridiem: 'Preklop dopoldne/popoldne',
|
||||
selectTime: 'Izberite čas',
|
||||
selectDate: 'Izberite Datum',
|
||||
dayViewHeaderFormat: { month: 'long', year: 'numeric' },
|
||||
locale: 'sl',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'H:mm',
|
||||
LTS: 'H:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd. MMMM yyyy',
|
||||
LLL: 'd. MMMM yyyy H:mm',
|
||||
LLLL: 'dddd, d. MMMM yyyy H:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/tr.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/locales/tr.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
const name = 'tr';
|
||||
|
||||
const localization = {
|
||||
today: 'Bugün',
|
||||
clear: 'Temizle',
|
||||
close: 'Kapat',
|
||||
selectMonth: 'Ay seçin',
|
||||
previousMonth: 'Önceki Ay',
|
||||
nextMonth: 'Sonraki Ay',
|
||||
selectYear: 'Yıl seçin',
|
||||
previousYear: 'Önceki yıl',
|
||||
nextYear: 'Sonraki yıl',
|
||||
selectDecade: 'On yıl seçin',
|
||||
previousDecade: 'Önceki on yıl',
|
||||
nextDecade: 'Sonraki on yıl',
|
||||
previousCentury: 'Önceki yüzyıl',
|
||||
nextCentury: 'Sonraki yüzyıl',
|
||||
pickHour: 'Saat seçin',
|
||||
incrementHour: 'Saati ilerlet',
|
||||
decrementHour: 'Saati gerilet',
|
||||
pickMinute: 'Dakika seçin',
|
||||
incrementMinute: 'Dakikayı ilerlet',
|
||||
decrementMinute: 'Dakikayı gerilet',
|
||||
pickSecond: 'Saniye seç',
|
||||
incrementSecond: 'Saniyeyi ilerlet',
|
||||
decrementSecond: 'Saniyeyi gerilet',
|
||||
toggleMeridiem: 'Meridemi Değiştir AM-PM',
|
||||
selectTime: 'Saat seçin',
|
||||
selectDate: 'Tarih seçin',
|
||||
dayViewHeaderFormat: { month: 'long', year: 'numeric' },
|
||||
locale: 'tr',
|
||||
startOfTheWeek: 1,
|
||||
dateFormats: {
|
||||
LT: 'HH:mm',
|
||||
LTS: 'HH:mm:ss',
|
||||
L: 'dd.MM.yyyy',
|
||||
LL: 'd MMMM yyyy',
|
||||
LLL: 'd MMMM yyyy HH:mm',
|
||||
LLLL: 'dddd, d MMMM yyyy HH:mm',
|
||||
},
|
||||
ordinal: (n) => `${n}.`,
|
||||
format: 'L LT',
|
||||
};
|
||||
|
||||
export { localization, name };
|
||||
21
node_modules/@eonasdan/tempus-dominus/src/js/plugins/bi-one/index.ts
generated
vendored
Normal file
21
node_modules/@eonasdan/tempus-dominus/src/js/plugins/bi-one/index.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// this obviously requires the Bootstrap Icons v1 libraries to be loaded
|
||||
|
||||
const biOneIcons = {
|
||||
type: 'icons',
|
||||
time: 'bi bi-clock',
|
||||
date: 'bi bi-calendar-week',
|
||||
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',
|
||||
};
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
const load = (_, __, tdFactory) => {
|
||||
tdFactory.DefaultOptions.display.icons = biOneIcons;
|
||||
};
|
||||
|
||||
export { biOneIcons, load };
|
||||
5
node_modules/@eonasdan/tempus-dominus/src/js/plugins/customDateFormat/index.ts
generated
vendored
Normal file
5
node_modules/@eonasdan/tempus-dominus/src/js/plugins/customDateFormat/index.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export default () => {
|
||||
console.warn(
|
||||
'This plugin has been merged with the main picker and is now longer required'
|
||||
);
|
||||
};
|
||||
17
node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/custom-paint-job.ts
generated
vendored
Normal file
17
node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/custom-paint-job.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/* eslint-disable */
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
export default (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');
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
28
node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/sample.ts
generated
vendored
Normal file
28
node_modules/@eonasdan/tempus-dominus/src/js/plugins/examples/sample.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
||||
export default (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
|
||||
};
|
||||
};
|
||||
21
node_modules/@eonasdan/tempus-dominus/src/js/plugins/fa-five/index.ts
generated
vendored
Normal file
21
node_modules/@eonasdan/tempus-dominus/src/js/plugins/fa-five/index.ts
generated
vendored
Normal file
@@ -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 };
|
||||
20
node_modules/@eonasdan/tempus-dominus/src/js/plugins/moment-parse/index.ts
generated
vendored
Normal file
20
node_modules/@eonasdan/tempus-dominus/src/js/plugins/moment-parse/index.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
//obviously, loading moment js is required.
|
||||
declare let moment;
|
||||
export default (option, tdClasses, tdFactory) => {
|
||||
tdClasses.Dates.prototype.setFromInput = function (value, index) {
|
||||
const converted = moment(value, option);
|
||||
if (converted.isValid()) {
|
||||
const 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);
|
||||
};
|
||||
};
|
||||
677
node_modules/@eonasdan/tempus-dominus/src/js/tempus-dominus.ts
generated
vendored
Normal file
677
node_modules/@eonasdan/tempus-dominus/src/js/tempus-dominus.ts
generated
vendored
Normal file
@@ -0,0 +1,677 @@
|
||||
import Display from './display/index';
|
||||
import Dates from './dates';
|
||||
import Actions from './actions';
|
||||
import {
|
||||
DateTime,
|
||||
DateTimeFormatOptions,
|
||||
guessHourCycle,
|
||||
Unit,
|
||||
} from './datetime';
|
||||
import Namespace from './utilities/namespace';
|
||||
import Options from './utilities/options';
|
||||
import {
|
||||
BaseEvent,
|
||||
ChangeEvent,
|
||||
ViewUpdateEvent,
|
||||
} 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, {
|
||||
DefaultEnLocalization,
|
||||
} from './utilities/default-options';
|
||||
import ActionTypes from './utilities/action-types';
|
||||
import { OptionsStore } from './utilities/optionsStore';
|
||||
import { OptionConverter } from './utilities/optionConverter';
|
||||
|
||||
/**
|
||||
* A robust and powerful date/time picker component.
|
||||
*/
|
||||
class TempusDominus {
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
_subscribers: { [key: string]: ((event: any) => Record<string, unknown>)[] } =
|
||||
{};
|
||||
private _isDisabled = false;
|
||||
private _toggle: HTMLElement;
|
||||
private _currentPromptTimeTimeout: NodeJS.Timeout;
|
||||
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.optionsStore.element = element;
|
||||
this._initializeOptions(options, DefaultOptions, true);
|
||||
this.optionsStore.viewDate.setLocalization(
|
||||
this.optionsStore.options.localization
|
||||
);
|
||||
this.optionsStore.unset = true;
|
||||
|
||||
this._initializeInput();
|
||||
this._initializeToggle();
|
||||
|
||||
if (this.optionsStore.options.display.inline) this.display.show();
|
||||
|
||||
this._eventEmitters.triggerEvent.subscribe((e) => {
|
||||
this._triggerEvent(e);
|
||||
});
|
||||
|
||||
this._eventEmitters.viewUpdate.subscribe(() => {
|
||||
this._viewUpdate();
|
||||
});
|
||||
|
||||
this._eventEmitters.updateViewDate.subscribe((dateTime) => {
|
||||
this.viewDate = dateTime;
|
||||
});
|
||||
}
|
||||
|
||||
get viewDate() {
|
||||
return this.optionsStore.viewDate;
|
||||
}
|
||||
|
||||
set viewDate(value) {
|
||||
this.optionsStore.viewDate = value;
|
||||
this.optionsStore.viewDate.setLocalization(
|
||||
this.optionsStore.options.localization
|
||||
);
|
||||
this.display._update(
|
||||
this.optionsStore.currentView === 'clock' ? 'clock' : 'calendar'
|
||||
);
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Update the picker options. If `reset` is provide `options` will be merged with DefaultOptions instead.
|
||||
* @param options
|
||||
* @param reset
|
||||
* @public
|
||||
*/
|
||||
updateOptions(options, reset = false): void {
|
||||
if (reset) this._initializeOptions(options, DefaultOptions);
|
||||
else this._initializeOptions(options, this.optionsStore.options);
|
||||
|
||||
this.optionsStore.viewDate.setLocalization(
|
||||
this.optionsStore.options.localization
|
||||
);
|
||||
this.display.refreshCurrentView();
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Toggles the picker open or closed. If the picker is disabled, nothing will happen.
|
||||
* @public
|
||||
*/
|
||||
toggle(): void {
|
||||
if (this._isDisabled) return;
|
||||
this.display.toggle();
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Shows the picker unless the picker is disabled.
|
||||
* @public
|
||||
*/
|
||||
show(): void {
|
||||
if (this._isDisabled) return;
|
||||
this.display.show();
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Hides the picker unless the picker is disabled.
|
||||
* @public
|
||||
*/
|
||||
hide(): void {
|
||||
this.display.hide();
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Disables the picker and the target input field.
|
||||
* @public
|
||||
*/
|
||||
disable(): void {
|
||||
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.optionsStore.input?.setAttribute('disabled', 'disabled');
|
||||
this.display.hide();
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Enables the picker and the target input field.
|
||||
* @public
|
||||
*/
|
||||
enable(): void {
|
||||
this._isDisabled = false;
|
||||
this.optionsStore.input?.removeAttribute('disabled');
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Clears all the selected dates
|
||||
* @public
|
||||
*/
|
||||
clear(): void {
|
||||
this.optionsStore.input.value = '';
|
||||
this.dates.clear();
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Allows for a direct subscription to picker events, without having to use addEventListener on the element.
|
||||
* @param eventTypes See Namespace.Events
|
||||
* @param callbacks Function to call when event is triggered
|
||||
* @public
|
||||
*/
|
||||
subscribe(
|
||||
eventTypes: string | string[],
|
||||
callbacks: (event: any) => void | ((event: any) => void)[] //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
): { unsubscribe: () => void } | { unsubscribe: () => void }[] {
|
||||
if (typeof eventTypes === 'string') {
|
||||
eventTypes = [eventTypes];
|
||||
}
|
||||
let callBackArray: any[]; //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
if (!Array.isArray(callbacks)) {
|
||||
callBackArray = [callbacks];
|
||||
} else {
|
||||
callBackArray = callbacks;
|
||||
}
|
||||
|
||||
if (eventTypes.length !== callBackArray.length) {
|
||||
Namespace.errorMessages.subscribeMismatch();
|
||||
}
|
||||
|
||||
const returnArray = [];
|
||||
|
||||
for (let i = 0; i < eventTypes.length; i++) {
|
||||
const eventType = eventTypes[i];
|
||||
if (!Array.isArray(this._subscribers[eventType])) {
|
||||
this._subscribers[eventType] = [];
|
||||
}
|
||||
|
||||
this._subscribers[eventType].push(callBackArray[i]);
|
||||
|
||||
returnArray.push({
|
||||
unsubscribe: this._unsubscribe.bind(
|
||||
this,
|
||||
eventType,
|
||||
this._subscribers[eventType].length - 1
|
||||
),
|
||||
});
|
||||
|
||||
if (eventTypes.length === 1) {
|
||||
return returnArray[0];
|
||||
}
|
||||
}
|
||||
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Hides the picker and removes event listeners
|
||||
*/
|
||||
dispose() {
|
||||
this.display.hide();
|
||||
// this will clear the document click event listener
|
||||
this.display._dispose();
|
||||
this._eventEmitters.destroy();
|
||||
this.optionsStore.input?.removeEventListener(
|
||||
'change',
|
||||
this._inputChangeEvent
|
||||
);
|
||||
if (this.optionsStore.options.allowInputToggle) {
|
||||
this.optionsStore.input?.removeEventListener(
|
||||
'click',
|
||||
this._openClickEvent
|
||||
);
|
||||
this.optionsStore.input?.removeEventListener(
|
||||
'focus',
|
||||
this._openClickEvent
|
||||
);
|
||||
}
|
||||
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) {
|
||||
const 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
|
||||
*/
|
||||
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;
|
||||
if (
|
||||
(date && oldDate && date.isSame(oldDate)) ||
|
||||
(!isClear && !date && !oldDate)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
this._handleAfterChangeEvent(event as ChangeEvent);
|
||||
|
||||
this.optionsStore.input?.dispatchEvent(
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
new CustomEvent('change', { detail: event as any })
|
||||
);
|
||||
}
|
||||
|
||||
this.optionsStore.element.dispatchEvent(
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
new CustomEvent(event.type, { detail: event as any })
|
||||
);
|
||||
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
if ((window as any).jQuery) {
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const $ = (window as any).jQuery;
|
||||
|
||||
if (isChangeEvent && this.optionsStore.input) {
|
||||
$(this.optionsStore.input).trigger(event);
|
||||
} else {
|
||||
$(this.optionsStore.element).trigger(event);
|
||||
}
|
||||
}
|
||||
|
||||
this._publish(event);
|
||||
}
|
||||
|
||||
private _publish(event: BaseEvent) {
|
||||
// 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.
|
||||
* @private
|
||||
*/
|
||||
private _viewUpdate() {
|
||||
this._triggerEvent({
|
||||
type: Namespace.events.update,
|
||||
viewDate: this.optionsStore.viewDate.clone,
|
||||
} as ViewUpdateEvent);
|
||||
}
|
||||
|
||||
private _unsubscribe(eventName, index) {
|
||||
this._subscribers[eventName].splice(index, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges two Option objects together and validates options type
|
||||
* @param config new Options
|
||||
* @param mergeTo Options to merge into
|
||||
* @param includeDataset When true, the elements data-td attributes will be included in the
|
||||
* @private
|
||||
*/
|
||||
private _initializeOptions(
|
||||
config: Options,
|
||||
mergeTo: Options,
|
||||
includeDataset = false
|
||||
): void {
|
||||
let newConfig = OptionConverter.deepCopy(config);
|
||||
newConfig = OptionConverter._mergeOptions(newConfig, mergeTo);
|
||||
if (includeDataset)
|
||||
newConfig = OptionConverter._dataToOptions(
|
||||
this.optionsStore.element,
|
||||
newConfig
|
||||
);
|
||||
|
||||
OptionConverter._validateConflicts(newConfig);
|
||||
|
||||
newConfig.viewDate = newConfig.viewDate.setLocalization(
|
||||
newConfig.localization
|
||||
);
|
||||
|
||||
if (!this.optionsStore.viewDate.isSame(newConfig.viewDate)) {
|
||||
this.optionsStore.viewDate = newConfig.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 (newConfig.display.components.year) {
|
||||
this.optionsStore.minimumCalendarViewMode = 2;
|
||||
}
|
||||
if (newConfig.display.components.month) {
|
||||
this.optionsStore.minimumCalendarViewMode = 1;
|
||||
}
|
||||
if (newConfig.display.components.date) {
|
||||
this.optionsStore.minimumCalendarViewMode = 0;
|
||||
}
|
||||
|
||||
this.optionsStore.currentCalendarViewMode = Math.max(
|
||||
this.optionsStore.minimumCalendarViewMode,
|
||||
this.optionsStore.currentCalendarViewMode
|
||||
);
|
||||
|
||||
// Update view mode if needed
|
||||
if (
|
||||
CalendarModes[this.optionsStore.currentCalendarViewMode].name !==
|
||||
newConfig.display.viewMode
|
||||
) {
|
||||
this.optionsStore.currentCalendarViewMode = Math.max(
|
||||
CalendarModes.findIndex((x) => x.name === newConfig.display.viewMode),
|
||||
this.optionsStore.minimumCalendarViewMode
|
||||
);
|
||||
}
|
||||
|
||||
if (this.display?.isVisible) {
|
||||
this.display._update('all');
|
||||
}
|
||||
|
||||
if (
|
||||
newConfig.display.components.useTwentyfourHour &&
|
||||
newConfig.localization.hourCycle === undefined
|
||||
)
|
||||
newConfig.localization.hourCycle = 'h24';
|
||||
else if (newConfig.localization.hourCycle === undefined) {
|
||||
newConfig.localization.hourCycle = guessHourCycle(
|
||||
newConfig.localization.locale
|
||||
);
|
||||
}
|
||||
|
||||
this.optionsStore.options = newConfig;
|
||||
|
||||
if (
|
||||
newConfig.restrictions.maxDate &&
|
||||
this.viewDate.isAfter(newConfig.restrictions.maxDate)
|
||||
)
|
||||
this.viewDate = newConfig.restrictions.maxDate;
|
||||
|
||||
if (
|
||||
newConfig.restrictions.minDate &&
|
||||
this.viewDate.isBefore(newConfig.restrictions.minDate)
|
||||
)
|
||||
this.viewDate = newConfig.restrictions.minDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an input field is being used, attempts to locate one and sets an
|
||||
* event listener if found.
|
||||
* @private
|
||||
*/
|
||||
private _initializeInput() {
|
||||
if (this.optionsStore.element.tagName == 'INPUT') {
|
||||
this.optionsStore.input = this.optionsStore.element as HTMLInputElement;
|
||||
} else {
|
||||
const query = this.optionsStore.element.dataset.tdTargetInput;
|
||||
if (query == undefined || query == 'nearest') {
|
||||
this.optionsStore.input =
|
||||
this.optionsStore.element.querySelector('input');
|
||||
} else {
|
||||
this.optionsStore.input =
|
||||
this.optionsStore.element.querySelector(query);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.optionsStore.input) return;
|
||||
|
||||
if (!this.optionsStore.input.value && this.optionsStore.options.defaultDate)
|
||||
this.optionsStore.input.value = this.dates.formatInput(
|
||||
this.optionsStore.options.defaultDate
|
||||
);
|
||||
|
||||
this.optionsStore.input.addEventListener('change', this._inputChangeEvent);
|
||||
if (this.optionsStore.options.allowInputToggle) {
|
||||
this.optionsStore.input.addEventListener('click', this._openClickEvent);
|
||||
this.optionsStore.input.addEventListener('focus', this._openClickEvent);
|
||||
}
|
||||
|
||||
if (this.optionsStore.input.value) {
|
||||
this._inputChangeEvent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to locate a toggle for the picker and sets an event listener
|
||||
* @private
|
||||
*/
|
||||
private _initializeToggle() {
|
||||
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.optionsStore.element
|
||||
: this.optionsStore.element.querySelector(query);
|
||||
this._toggle.addEventListener('click', this._toggleClickEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the option is enabled this will render the clock view after a date pick.
|
||||
* @param e change event
|
||||
* @private
|
||||
*/
|
||||
private _handleAfterChangeEvent(e: ChangeEvent) {
|
||||
if (
|
||||
// options is disabled
|
||||
!this.optionsStore.options.promptTimeOnDateChange ||
|
||||
this.optionsStore.options.multipleDates ||
|
||||
this.optionsStore.options.display.inline ||
|
||||
this.optionsStore.options.display.sideBySide ||
|
||||
// time is disabled
|
||||
!this.display._hasTime ||
|
||||
// clock component is already showing
|
||||
this.display.widget
|
||||
?.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.optionsStore.options.useCurrent) ||
|
||||
(e.oldDate && e.date?.isSame(e.oldDate))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(this._currentPromptTimeTimeout);
|
||||
this._currentPromptTimeTimeout = setTimeout(() => {
|
||||
if (this.display.widget) {
|
||||
this._eventEmitters.action.emit({
|
||||
e: {
|
||||
currentTarget: this.display.widget.querySelector(
|
||||
'[data-action="togglePicker"]'
|
||||
),
|
||||
},
|
||||
action: ActionTypes.togglePicker,
|
||||
});
|
||||
}
|
||||
}, this.optionsStore.options.promptTimeOnDateChangeTransitionDelay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Event for when the input field changes. This is a class level method so there's
|
||||
* something for the remove listener function.
|
||||
* @private
|
||||
*/
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private _inputChangeEvent = (event?: any) => {
|
||||
const internallyTriggered = event?.detail;
|
||||
if (internallyTriggered) return;
|
||||
|
||||
const setViewDate = () => {
|
||||
if (this.dates.lastPicked)
|
||||
this.optionsStore.viewDate = this.dates.lastPicked.clone;
|
||||
};
|
||||
|
||||
const value = this.optionsStore.input.value;
|
||||
if (
|
||||
this.optionsStore.options.multipleDates ||
|
||||
this.optionsStore.options.dateRange
|
||||
) {
|
||||
try {
|
||||
const valueSplit = value.split(
|
||||
this.optionsStore.options.multipleDatesSeparator
|
||||
);
|
||||
for (let i = 0; i < valueSplit.length; i++) {
|
||||
this.dates.setFromInput(valueSplit[i], i);
|
||||
}
|
||||
setViewDate();
|
||||
} catch {
|
||||
console.warn(
|
||||
'TD: Something went wrong trying to set the multipleDates values from the input field.'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
this.dates.setFromInput(value, 0);
|
||||
setViewDate();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Event for when the toggle is clicked. This is a class level method so there's
|
||||
* something for the remove listener function.
|
||||
* @private
|
||||
*/
|
||||
private _toggleClickEvent = () => {
|
||||
if (
|
||||
(this.optionsStore.element as HTMLInputElement)?.disabled ||
|
||||
this.optionsStore.input?.disabled ||
|
||||
//if we just have the input and allow input toggle is enabled, then don't cause a toggle
|
||||
(this._toggle.nodeName === 'INPUT' &&
|
||||
(this._toggle as HTMLInputElement)?.type === 'text' &&
|
||||
this.optionsStore.options.allowInputToggle)
|
||||
)
|
||||
return;
|
||||
this.toggle();
|
||||
};
|
||||
|
||||
/**
|
||||
* Event for when the toggle is clicked. This is a class level method so there's
|
||||
* something for the remove listener function.
|
||||
* @private
|
||||
*/
|
||||
private _openClickEvent = () => {
|
||||
if (
|
||||
(this.optionsStore.element as HTMLInputElement)?.disabled ||
|
||||
this.optionsStore.input?.disabled
|
||||
)
|
||||
return;
|
||||
if (!this.display.isVisible) this.show();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Whenever a locale is loaded via a plugin then store it here based on the
|
||||
* locale name. E.g. loadedLocales['ru']
|
||||
*/
|
||||
const loadedLocales = {};
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Called from a locale plugin.
|
||||
* @param l locale object for localization options
|
||||
*/
|
||||
const loadLocale = (l) => {
|
||||
if (loadedLocales[l.name]) return;
|
||||
loadedLocales[l.name] = l.localization;
|
||||
};
|
||||
|
||||
/**
|
||||
* A sets the global localization options to the provided locale name.
|
||||
* `loadLocale` MUST be called first.
|
||||
* @param l
|
||||
*/
|
||||
const locale = (l: string) => {
|
||||
const asked = loadedLocales[l];
|
||||
if (!asked) return;
|
||||
DefaultOptions.localization = asked;
|
||||
};
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
/**
|
||||
* Called from a plugin to extend or override picker defaults.
|
||||
* @param plugin
|
||||
* @param option
|
||||
*/
|
||||
const extend = function (plugin, option = undefined) {
|
||||
if (!plugin) return tempusDominus;
|
||||
if (!plugin.installed) {
|
||||
// install plugin only once
|
||||
plugin(
|
||||
option,
|
||||
{ TempusDominus, Dates, Display, DateTime, Namespace },
|
||||
tempusDominus
|
||||
);
|
||||
plugin.installed = true;
|
||||
}
|
||||
return tempusDominus;
|
||||
};
|
||||
|
||||
const version = '6.7.19';
|
||||
|
||||
const tempusDominus = {
|
||||
TempusDominus,
|
||||
extend,
|
||||
loadLocale,
|
||||
locale,
|
||||
Namespace,
|
||||
DefaultOptions,
|
||||
DateTime,
|
||||
Unit,
|
||||
version,
|
||||
DefaultEnLocalization,
|
||||
};
|
||||
|
||||
export {
|
||||
TempusDominus,
|
||||
extend,
|
||||
loadLocale,
|
||||
locale,
|
||||
Namespace,
|
||||
DefaultOptions,
|
||||
DateTime,
|
||||
Unit,
|
||||
version,
|
||||
DateTimeFormatOptions,
|
||||
Options,
|
||||
DefaultEnLocalization,
|
||||
};
|
||||
29
node_modules/@eonasdan/tempus-dominus/src/js/utilities/action-types.ts
generated
vendored
Normal file
29
node_modules/@eonasdan/tempus-dominus/src/js/utilities/action-types.ts
generated
vendored
Normal file
@@ -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;
|
||||
37
node_modules/@eonasdan/tempus-dominus/src/js/utilities/calendar-modes.ts
generated
vendored
Normal file
37
node_modules/@eonasdan/tempus-dominus/src/js/utilities/calendar-modes.ts
generated
vendored
Normal file
@@ -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;
|
||||
22
node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-format-localization.ts
generated
vendored
Normal file
22
node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-format-localization.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { FormatLocalization } from './options';
|
||||
|
||||
const DefaultFormatLocalization: FormatLocalization = {
|
||||
dateFormats: {
|
||||
LTS: 'h:mm:ss T',
|
||||
LT: 'h:mm T',
|
||||
L: 'MM/dd/yyyy',
|
||||
LL: 'MMMM d, yyyy',
|
||||
LLL: 'MMMM d, yyyy h:mm T',
|
||||
LLLL: 'dddd, MMMM d, yyyy h:mm T',
|
||||
},
|
||||
format: 'L LT',
|
||||
locale: 'default',
|
||||
hourCycle: undefined,
|
||||
ordinal: (n) => {
|
||||
const s = ['th', 'st', 'nd', 'rd'];
|
||||
const v = n % 100;
|
||||
return `[${n}${s[(v - 20) % 10] || s[v] || s[0]}]`;
|
||||
},
|
||||
};
|
||||
|
||||
export default { ...DefaultFormatLocalization };
|
||||
110
node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-options.ts
generated
vendored
Normal file
110
node_modules/@eonasdan/tempus-dominus/src/js/utilities/default-options.ts
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
import Options, { Localization } from './options';
|
||||
import { DateTime } from '../datetime';
|
||||
import DefaultFormatLocalization from './default-format-localization';
|
||||
|
||||
const defaultEnLocalization: Localization = {
|
||||
clear: 'Clear selection',
|
||||
close: 'Close the picker',
|
||||
dateFormats: DefaultFormatLocalization.dateFormats,
|
||||
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
|
||||
decrementHour: 'Decrement Hour',
|
||||
decrementMinute: 'Decrement Minute',
|
||||
decrementSecond: 'Decrement Second',
|
||||
format: DefaultFormatLocalization.format,
|
||||
hourCycle: DefaultFormatLocalization.hourCycle,
|
||||
incrementHour: 'Increment Hour',
|
||||
incrementMinute: 'Increment Minute',
|
||||
incrementSecond: 'Increment Second',
|
||||
locale: DefaultFormatLocalization.locale,
|
||||
maxWeekdayLength: 0,
|
||||
nextCentury: 'Next Century',
|
||||
nextDecade: 'Next Decade',
|
||||
nextMonth: 'Next Month',
|
||||
nextYear: 'Next Year',
|
||||
ordinal: DefaultFormatLocalization.ordinal,
|
||||
pickHour: 'Pick Hour',
|
||||
pickMinute: 'Pick Minute',
|
||||
pickSecond: 'Pick Second',
|
||||
previousCentury: 'Previous Century',
|
||||
previousDecade: 'Previous Decade',
|
||||
previousMonth: 'Previous Month',
|
||||
previousYear: 'Previous Year',
|
||||
selectDate: 'Select Date',
|
||||
selectDecade: 'Select Decade',
|
||||
selectMonth: 'Select Month',
|
||||
selectTime: 'Select Time',
|
||||
selectYear: 'Select Year',
|
||||
startOfTheWeek: 0,
|
||||
today: 'Go to today',
|
||||
toggleMeridiem: 'Toggle Meridiem',
|
||||
};
|
||||
|
||||
const DefaultOptions: Options = {
|
||||
allowInputToggle: false,
|
||||
container: undefined,
|
||||
dateRange: false,
|
||||
debug: false,
|
||||
defaultDate: undefined,
|
||||
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: false,
|
||||
calendarWeeks: false,
|
||||
viewMode: 'calendar',
|
||||
toolbarPlacement: 'bottom',
|
||||
keepOpen: false,
|
||||
buttons: {
|
||||
today: false,
|
||||
clear: false,
|
||||
close: false,
|
||||
},
|
||||
components: {
|
||||
calendar: true,
|
||||
date: true,
|
||||
month: true,
|
||||
year: true,
|
||||
decades: true,
|
||||
clock: true,
|
||||
hours: true,
|
||||
minutes: true,
|
||||
seconds: false,
|
||||
useTwentyfourHour: undefined,
|
||||
},
|
||||
inline: false,
|
||||
theme: 'auto',
|
||||
placement: 'bottom',
|
||||
},
|
||||
keepInvalid: false,
|
||||
localization: defaultEnLocalization,
|
||||
meta: {},
|
||||
multipleDates: false,
|
||||
multipleDatesSeparator: '; ',
|
||||
promptTimeOnDateChange: false,
|
||||
promptTimeOnDateChangeTransitionDelay: 200,
|
||||
restrictions: {
|
||||
minDate: undefined,
|
||||
maxDate: undefined,
|
||||
disabledDates: [],
|
||||
enabledDates: [],
|
||||
daysOfWeekDisabled: [],
|
||||
disabledTimeIntervals: [],
|
||||
disabledHours: [],
|
||||
enabledHours: [],
|
||||
},
|
||||
stepping: 1,
|
||||
useCurrent: true,
|
||||
viewDate: new DateTime(),
|
||||
};
|
||||
|
||||
export default DefaultOptions;
|
||||
export const DefaultEnLocalization = { ...defaultEnLocalization };
|
||||
184
node_modules/@eonasdan/tempus-dominus/src/js/utilities/errors.ts
generated
vendored
Normal file
184
node_modules/@eonasdan/tempus-dominus/src/js/utilities/errors.ts
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
export class TdError extends Error {
|
||||
code: number;
|
||||
}
|
||||
|
||||
export class ErrorMessages {
|
||||
private base = 'TD:';
|
||||
|
||||
//#region out to console
|
||||
|
||||
/**
|
||||
* Throws an error indicating that a key in the options object is invalid.
|
||||
* @param optionName
|
||||
*/
|
||||
unexpectedOption(optionName: string) {
|
||||
const error = new TdError(
|
||||
`${this.base} Unexpected option: ${optionName} does not match a known option.`
|
||||
);
|
||||
error.code = 1;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error indicating that one more keys in the options object is invalid.
|
||||
* @param optionName
|
||||
*/
|
||||
unexpectedOptions(optionName: string[]) {
|
||||
const error = new TdError(`${this.base}: ${optionName.join(', ')}`);
|
||||
error.code = 1;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error when an option is provide an unsupported value.
|
||||
* For example a value of 'cheese' for toolbarPlacement which only supports
|
||||
* 'top', 'bottom', 'default'.
|
||||
* @param optionName
|
||||
* @param badValue
|
||||
* @param validOptions
|
||||
*/
|
||||
unexpectedOptionValue(
|
||||
optionName: string,
|
||||
badValue: string,
|
||||
validOptions: string[]
|
||||
) {
|
||||
const error = new TdError(
|
||||
`${
|
||||
this.base
|
||||
} Unexpected option value: ${optionName} does not accept a value of "${badValue}". Valid values are: ${validOptions.join(
|
||||
', '
|
||||
)}`
|
||||
);
|
||||
error.code = 2;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error when an option value is the wrong type.
|
||||
* For example a string value was provided to multipleDates which only
|
||||
* supports true or false.
|
||||
* @param optionName
|
||||
* @param badType
|
||||
* @param expectedType
|
||||
*/
|
||||
typeMismatch(optionName: string, badType: string, expectedType: string) {
|
||||
const error = new TdError(
|
||||
`${this.base} Mismatch types: ${optionName} has a type of ${badType} instead of the required ${expectedType}`
|
||||
);
|
||||
error.code = 3;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error when an option value is outside of the expected range.
|
||||
* For example restrictions.daysOfWeekDisabled excepts a value between 0 and 6.
|
||||
* @param optionName
|
||||
* @param lower
|
||||
* @param upper
|
||||
*/
|
||||
numbersOutOfRange(optionName: string, lower: number, upper: number) {
|
||||
const error = new TdError(
|
||||
`${this.base} ${optionName} expected an array of number between ${lower} and ${upper}.`
|
||||
);
|
||||
error.code = 4;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an error when a value for a date options couldn't be parsed. Either
|
||||
* the option was an invalid string or an invalid Date object.
|
||||
* @param optionName
|
||||
* @param date
|
||||
* @param soft If true, logs a warning instead of an error.
|
||||
*/
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
failedToParseDate(optionName: string, date: any, soft = false) {
|
||||
const error = new TdError(
|
||||
`${this.base} Could not correctly parse "${date}" to a date for ${optionName}.`
|
||||
);
|
||||
error.code = 5;
|
||||
if (!soft) throw error;
|
||||
console.warn(error);
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws when an element to attach to was not provided in the constructor.
|
||||
*/
|
||||
mustProvideElement() {
|
||||
const error = new TdError(`${this.base} No element was provided.`);
|
||||
error.code = 6;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws if providing an array for the events to subscribe method doesn't have
|
||||
* the same number of callbacks. E.g., subscribe([1,2], [1])
|
||||
*/
|
||||
subscribeMismatch() {
|
||||
const error = new TdError(
|
||||
`${this.base} The subscribed events does not match the number of callbacks`
|
||||
);
|
||||
error.code = 7;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws if the configuration has conflicting rules e.g. minDate is after maxDate
|
||||
*/
|
||||
conflictingConfiguration(message?: string) {
|
||||
const error = new TdError(
|
||||
`${this.base} A configuration value conflicts with another rule. ${message}`
|
||||
);
|
||||
error.code = 8;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* customDateFormat errors
|
||||
*/
|
||||
customDateFormatError(message?: string) {
|
||||
const error = new TdError(`${this.base} Custom Date Format: ${message}`);
|
||||
error.code = 9;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs a warning if a date option value is provided as a string, instead of
|
||||
* a date/datetime object.
|
||||
*/
|
||||
dateString() {
|
||||
console.warn(
|
||||
`${this.base} Using a string for date options is not recommended unless you specify an ISO string or use the customDateFormat plugin.`
|
||||
);
|
||||
}
|
||||
|
||||
deprecatedWarning(message: string, remediation?: string) {
|
||||
console.warn(
|
||||
`${this.base} Warning ${message} is deprecated and will be removed in a future version. ${remediation}`
|
||||
);
|
||||
}
|
||||
|
||||
throwError(message) {
|
||||
const error = new TdError(`${this.base} ${message}`);
|
||||
error.code = 9;
|
||||
throw error;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region used with notify.error
|
||||
|
||||
/**
|
||||
* Used with an Error Event type if the user selects a date that
|
||||
* fails restriction validation.
|
||||
*/
|
||||
failedToSetInvalidDate = 'Failed to set invalid date';
|
||||
|
||||
/**
|
||||
* Used with an Error Event type when a user changes the value of the
|
||||
* input field directly, and does not provide a valid date.
|
||||
*/
|
||||
failedToParseInput = 'Failed parse input field';
|
||||
|
||||
//#endregion
|
||||
}
|
||||
45
node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-emitter.ts
generated
vendored
Normal file
45
node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-emitter.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import { DateTime, Unit } from '../datetime';
|
||||
import ActionTypes from './action-types';
|
||||
import { BaseEvent } from './event-types';
|
||||
|
||||
export type ViewUpdateValues = Unit | 'decade' | 'clock' | 'calendar' | 'all';
|
||||
|
||||
class EventEmitter<T> {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.subscribers = null;
|
||||
this.subscribers = [];
|
||||
}
|
||||
}
|
||||
|
||||
export class EventEmitters {
|
||||
triggerEvent = new EventEmitter<BaseEvent>();
|
||||
viewUpdate = new EventEmitter();
|
||||
updateDisplay = new EventEmitter<ViewUpdateValues>();
|
||||
action = new EventEmitter<{ e: any; action?: ActionTypes }>(); //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
updateViewDate = new EventEmitter<DateTime>();
|
||||
|
||||
destroy() {
|
||||
this.triggerEvent.destroy();
|
||||
this.viewUpdate.destroy();
|
||||
this.updateDisplay.destroy();
|
||||
this.action.destroy();
|
||||
this.updateViewDate.destroy();
|
||||
}
|
||||
}
|
||||
43
node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-types.ts
generated
vendored
Normal file
43
node_modules/@eonasdan/tempus-dominus/src/js/utilities/event-types.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
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.
|
||||
* @event FailEvent
|
||||
*/
|
||||
interface FailEvent extends BaseEvent {
|
||||
reason: string;
|
||||
date: DateTime;
|
||||
oldDate: DateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers when the picker is hidden.
|
||||
*/
|
||||
interface HideEvent extends BaseEvent {
|
||||
date: DateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers when a change is successful.
|
||||
*/
|
||||
interface ChangeEvent extends BaseEvent {
|
||||
date: DateTime | undefined;
|
||||
oldDate: DateTime;
|
||||
isClear: boolean;
|
||||
isValid: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers when the view is changed for instance from month to year.
|
||||
*/
|
||||
interface ViewUpdateEvent extends BaseEvent {
|
||||
viewDate: DateTime;
|
||||
}
|
||||
|
||||
export { BaseEvent, FailEvent, HideEvent, ChangeEvent, ViewUpdateEvent };
|
||||
294
node_modules/@eonasdan/tempus-dominus/src/js/utilities/namespace.ts
generated
vendored
Normal file
294
node_modules/@eonasdan/tempus-dominus/src/js/utilities/namespace.ts
generated
vendored
Normal file
@@ -0,0 +1,294 @@
|
||||
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',
|
||||
dataKey = 'td';
|
||||
|
||||
/**
|
||||
* Events
|
||||
*/
|
||||
class Events {
|
||||
key = `.${dataKey}`;
|
||||
|
||||
/**
|
||||
* Change event. Fired when the user selects a date.
|
||||
* See also EventTypes.ChangeEvent
|
||||
*/
|
||||
change = `change${this.key}`;
|
||||
|
||||
/**
|
||||
* Emit when the view changes for example from month view to the year view.
|
||||
* See also EventTypes.ViewUpdateEvent
|
||||
*/
|
||||
update = `update${this.key}`;
|
||||
|
||||
/**
|
||||
* Emits when a selected date or value from the input field fails to meet the provided validation rules.
|
||||
* See also EventTypes.FailEvent
|
||||
*/
|
||||
error = `error${this.key}`;
|
||||
|
||||
/**
|
||||
* Show event
|
||||
* @event Events#show
|
||||
*/
|
||||
show = `show${this.key}`;
|
||||
|
||||
/**
|
||||
* Hide event
|
||||
* @event Events#hide
|
||||
*/
|
||||
hide = `hide${this.key}`;
|
||||
|
||||
// blur and focus are used in the jQuery provider but are otherwise unused.
|
||||
// keyup/down will be used later for keybinding options
|
||||
|
||||
blur = `blur${this.key}`;
|
||||
focus = `focus${this.key}`;
|
||||
keyup = `keyup${this.key}`;
|
||||
keydown = `keydown${this.key}`;
|
||||
}
|
||||
|
||||
class Css {
|
||||
/**
|
||||
* The outer element for the widget.
|
||||
*/
|
||||
widget = `${NAME}-widget`;
|
||||
|
||||
/**
|
||||
* Hold the previous, next and switcher divs
|
||||
*/
|
||||
calendarHeader = 'calendar-header';
|
||||
|
||||
/**
|
||||
* The element for the action to change the calendar view. E.g. month -> year.
|
||||
*/
|
||||
switch = 'picker-switch';
|
||||
|
||||
/**
|
||||
* The elements for all the toolbar options
|
||||
*/
|
||||
toolbar = 'toolbar';
|
||||
|
||||
/**
|
||||
* Disables the hover and rounding affect.
|
||||
*/
|
||||
noHighlight = 'no-highlight';
|
||||
|
||||
/**
|
||||
* Applied to the widget element when the side by side option is in use.
|
||||
*/
|
||||
sideBySide = 'timepicker-sbs';
|
||||
|
||||
/**
|
||||
* The element for the action to change the calendar view, e.g. August -> July
|
||||
*/
|
||||
previous = 'previous';
|
||||
|
||||
/**
|
||||
* The element for the action to change the calendar view, e.g. August -> September
|
||||
*/
|
||||
next = 'next';
|
||||
|
||||
/**
|
||||
* Applied to any action that would violate any restriction options. ALso applied
|
||||
* to an input field if the disabled function is called.
|
||||
*/
|
||||
disabled = 'disabled';
|
||||
|
||||
/**
|
||||
* Applied to any date that is less than requested view,
|
||||
* e.g. the last day of the previous month.
|
||||
*/
|
||||
old = 'old';
|
||||
|
||||
/**
|
||||
* Applied to any date that is greater than of requested view,
|
||||
* e.g. the last day of the previous month.
|
||||
*/
|
||||
new = 'new';
|
||||
|
||||
/**
|
||||
* Applied to any date that is currently selected.
|
||||
*/
|
||||
active = 'active';
|
||||
|
||||
//#region date element
|
||||
|
||||
/**
|
||||
* The outer element for the calendar view.
|
||||
*/
|
||||
dateContainer = 'date-container';
|
||||
|
||||
/**
|
||||
* The outer element for the decades view.
|
||||
*/
|
||||
decadesContainer = `${this.dateContainer}-decades`;
|
||||
|
||||
/**
|
||||
* Applied to elements within the decade container, e.g. 2020, 2030
|
||||
*/
|
||||
decade = 'decade';
|
||||
|
||||
/**
|
||||
* The outer element for the years view.
|
||||
*/
|
||||
yearsContainer = `${this.dateContainer}-years`;
|
||||
|
||||
/**
|
||||
* Applied to elements within the years container, e.g. 2021, 2021
|
||||
*/
|
||||
year = 'year';
|
||||
|
||||
/**
|
||||
* The outer element for the month view.
|
||||
*/
|
||||
monthsContainer = `${this.dateContainer}-months`;
|
||||
|
||||
/**
|
||||
* Applied to elements within the month container, e.g. January, February
|
||||
*/
|
||||
month = 'month';
|
||||
|
||||
/**
|
||||
* The outer element for the calendar view.
|
||||
*/
|
||||
daysContainer = `${this.dateContainer}-days`;
|
||||
|
||||
/**
|
||||
* Applied to elements within the day container, e.g. 1, 2..31
|
||||
*/
|
||||
day = 'day';
|
||||
|
||||
/**
|
||||
* If display.calendarWeeks is enabled, a column displaying the week of year
|
||||
* is shown. This class is applied to each cell in that column.
|
||||
*/
|
||||
calendarWeeks = 'cw';
|
||||
|
||||
/**
|
||||
* Applied to the first row of the calendar view, e.g. Sunday, Monday
|
||||
*/
|
||||
dayOfTheWeek = 'dow';
|
||||
|
||||
/**
|
||||
* Applied to the current date on the calendar view.
|
||||
*/
|
||||
today = 'today';
|
||||
|
||||
/**
|
||||
* Applied to the locale's weekend dates on the calendar view, e.g. Sunday, Saturday
|
||||
*/
|
||||
weekend = 'weekend';
|
||||
|
||||
rangeIn = 'range-in';
|
||||
rangeStart = 'range-start';
|
||||
rangeEnd = 'range-end';
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region time element
|
||||
|
||||
/**
|
||||
* The outer element for all time related elements.
|
||||
*/
|
||||
timeContainer = 'time-container';
|
||||
|
||||
/**
|
||||
* Applied the separator columns between time elements, e.g. hour *:* minute *:* second
|
||||
*/
|
||||
separator = 'separator';
|
||||
|
||||
/**
|
||||
* The outer element for the clock view.
|
||||
*/
|
||||
clockContainer = `${this.timeContainer}-clock`;
|
||||
|
||||
/**
|
||||
* The outer element for the hours selection view.
|
||||
*/
|
||||
hourContainer = `${this.timeContainer}-hour`;
|
||||
|
||||
/**
|
||||
* The outer element for the minutes selection view.
|
||||
*/
|
||||
minuteContainer = `${this.timeContainer}-minute`;
|
||||
|
||||
/**
|
||||
* The outer element for the seconds selection view.
|
||||
*/
|
||||
secondContainer = `${this.timeContainer}-second`;
|
||||
|
||||
/**
|
||||
* Applied to each element in the hours selection view.
|
||||
*/
|
||||
hour = 'hour';
|
||||
|
||||
/**
|
||||
* Applied to each element in the minutes selection view.
|
||||
*/
|
||||
minute = 'minute';
|
||||
|
||||
/**
|
||||
* Applied to each element in the seconds selection view.
|
||||
*/
|
||||
second = 'second';
|
||||
|
||||
/**
|
||||
* Applied AM/PM toggle button.
|
||||
*/
|
||||
toggleMeridiem = 'toggleMeridiem';
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region collapse
|
||||
|
||||
/**
|
||||
* Applied the element of the current view mode, e.g. calendar or clock.
|
||||
*/
|
||||
show = 'show';
|
||||
|
||||
/**
|
||||
* Applied to the currently showing view mode during a transition
|
||||
* between calendar and clock views
|
||||
*/
|
||||
collapsing = 'td-collapsing';
|
||||
|
||||
/**
|
||||
* Applied to the currently hidden view mode.
|
||||
*/
|
||||
collapse = 'td-collapse';
|
||||
|
||||
//#endregion
|
||||
|
||||
/**
|
||||
* Applied to the widget when the option display.inline is enabled.
|
||||
*/
|
||||
inline = 'inline';
|
||||
|
||||
/**
|
||||
* Applied to the widget when the option display.theme is light.
|
||||
*/
|
||||
lightTheme = 'light';
|
||||
|
||||
/**
|
||||
* Applied to the widget when the option display.theme is dark.
|
||||
*/
|
||||
darkTheme = 'dark';
|
||||
|
||||
/**
|
||||
* Used for detecting if the system color preference is dark mode
|
||||
*/
|
||||
isDarkPreferredQuery = '(prefers-color-scheme: dark)';
|
||||
}
|
||||
|
||||
export default class Namespace {
|
||||
static NAME = NAME;
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
static dataKey = dataKey;
|
||||
|
||||
static events = new Events();
|
||||
|
||||
static css = new Css();
|
||||
|
||||
static errorMessages = new ErrorMessages();
|
||||
}
|
||||
387
node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionConverter.ts
generated
vendored
Normal file
387
node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionConverter.ts
generated
vendored
Normal file
@@ -0,0 +1,387 @@
|
||||
import Namespace from './namespace';
|
||||
import { DateTime } from '../datetime';
|
||||
import DefaultOptions from './default-options';
|
||||
import Options, { FormatLocalization } from './options';
|
||||
import { processKey } from './optionProcessor';
|
||||
import {
|
||||
convertToDateTime,
|
||||
tryConvertToDateTime,
|
||||
typeCheckDateArray,
|
||||
typeCheckNumberArray,
|
||||
} from './typeChecker';
|
||||
|
||||
export class OptionConverter {
|
||||
private static ignoreProperties = [
|
||||
'meta',
|
||||
'dayViewHeaderFormat',
|
||||
'container',
|
||||
'dateForms',
|
||||
'ordinal',
|
||||
];
|
||||
|
||||
static deepCopy(input): Options {
|
||||
const o = {};
|
||||
|
||||
Object.keys(input).forEach((key) => {
|
||||
const inputElement = input[key];
|
||||
|
||||
if (inputElement instanceof DateTime) {
|
||||
o[key] = inputElement.clone;
|
||||
return;
|
||||
} else if (inputElement instanceof Date) {
|
||||
o[key] = new Date(inputElement.valueOf());
|
||||
return;
|
||||
}
|
||||
|
||||
o[key] = inputElement;
|
||||
if (
|
||||
typeof inputElement !== 'object' ||
|
||||
inputElement instanceof HTMLElement ||
|
||||
inputElement instanceof Element
|
||||
)
|
||||
return;
|
||||
if (!Array.isArray(inputElement)) {
|
||||
o[key] = OptionConverter.deepCopy(inputElement);
|
||||
}
|
||||
});
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
private static isValue = (a) => a != null; // everything except undefined + null
|
||||
|
||||
/**
|
||||
* Finds value out of an object based on a string, period delimited, path
|
||||
* @param paths
|
||||
* @param obj
|
||||
*/
|
||||
static objectPath(paths: string, obj) {
|
||||
if (paths.charAt(0) === '.') paths = paths.slice(1);
|
||||
if (!paths) return obj;
|
||||
return paths
|
||||
.split('.')
|
||||
.reduce(
|
||||
(value, key) =>
|
||||
OptionConverter.isValue(value) || OptionConverter.isValue(value[key])
|
||||
? value[key]
|
||||
: undefined,
|
||||
obj
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The spread operator caused sub keys to be missing after merging.
|
||||
* This is to fix that issue by using spread on the child objects first.
|
||||
* Also handles complex options like disabledDates
|
||||
* @param provided An option from new providedOptions
|
||||
* @param copyTo Destination object. This was added to prevent reference copies
|
||||
* @param localization
|
||||
* @param path
|
||||
*/
|
||||
static spread(provided, copyTo, localization: FormatLocalization, path = '') {
|
||||
const defaultOptions = OptionConverter.objectPath(path, DefaultOptions);
|
||||
|
||||
const unsupportedOptions = Object.keys(provided).filter(
|
||||
(x) => !Object.keys(defaultOptions).includes(x)
|
||||
);
|
||||
|
||||
if (unsupportedOptions.length > 0) {
|
||||
const flattenedOptions = OptionConverter.getFlattenDefaultOptions();
|
||||
|
||||
const errors = unsupportedOptions.map((x) => {
|
||||
let error = `"${path}.${x}" in not a known option.`;
|
||||
const didYouMean = flattenedOptions.find((y) => y.includes(x));
|
||||
if (didYouMean) error += ` Did you mean "${didYouMean}"?`;
|
||||
return error;
|
||||
});
|
||||
Namespace.errorMessages.unexpectedOptions(errors);
|
||||
}
|
||||
|
||||
Object.keys(provided)
|
||||
.filter((key) => key !== '__proto__' && key !== 'constructor')
|
||||
.forEach((key) => {
|
||||
path += `.${key}`;
|
||||
if (path.charAt(0) === '.') path = path.slice(1);
|
||||
|
||||
const defaultOptionValue = defaultOptions[key];
|
||||
const providedType = typeof provided[key];
|
||||
const defaultType = typeof defaultOptionValue;
|
||||
const value = provided[key];
|
||||
|
||||
if (value === undefined || value === null) {
|
||||
copyTo[key] = value;
|
||||
path = path.substring(0, path.lastIndexOf(`.${key}`));
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
typeof defaultOptionValue === 'object' &&
|
||||
!Array.isArray(provided[key]) &&
|
||||
!(
|
||||
defaultOptionValue instanceof Date ||
|
||||
OptionConverter.ignoreProperties.includes(key)
|
||||
)
|
||||
) {
|
||||
OptionConverter.spread(
|
||||
provided[key],
|
||||
copyTo[key],
|
||||
localization,
|
||||
path
|
||||
);
|
||||
} else {
|
||||
copyTo[key] = OptionConverter.processKey(
|
||||
key,
|
||||
value,
|
||||
providedType,
|
||||
defaultType,
|
||||
path,
|
||||
localization
|
||||
);
|
||||
}
|
||||
|
||||
path = path.substring(0, path.lastIndexOf(`.${key}`));
|
||||
});
|
||||
}
|
||||
|
||||
static processKey(
|
||||
key: string,
|
||||
value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
providedType: string,
|
||||
defaultType: string,
|
||||
path: string,
|
||||
localization: FormatLocalization
|
||||
) {
|
||||
return processKey({
|
||||
key,
|
||||
value,
|
||||
providedType,
|
||||
defaultType,
|
||||
path,
|
||||
localization,
|
||||
});
|
||||
}
|
||||
|
||||
static _mergeOptions(providedOptions: Options, mergeTo: Options): Options {
|
||||
const newConfig = OptionConverter.deepCopy(mergeTo);
|
||||
//see if the options specify a locale
|
||||
const localization =
|
||||
mergeTo.localization?.locale !== 'default'
|
||||
? mergeTo.localization
|
||||
: providedOptions?.localization || DefaultOptions.localization;
|
||||
|
||||
OptionConverter.spread(providedOptions, newConfig, localization, '');
|
||||
|
||||
return newConfig;
|
||||
}
|
||||
|
||||
static _dataToOptions(element, options: Options): Options {
|
||||
const eData = JSON.parse(JSON.stringify(element.dataset));
|
||||
|
||||
if (eData?.tdTargetInput) delete eData.tdTargetInput;
|
||||
if (eData?.tdTargetToggle) delete eData.tdTargetToggle;
|
||||
|
||||
if (
|
||||
!eData ||
|
||||
Object.keys(eData).length === 0 ||
|
||||
eData.constructor !== DOMStringMap
|
||||
)
|
||||
return options;
|
||||
const dataOptions = {} as Options;
|
||||
|
||||
// because dataset returns camelCase including the 'td' key the option
|
||||
// key won't align
|
||||
const objectToNormalized = (object) => {
|
||||
const lowered = {};
|
||||
Object.keys(object).forEach((x) => {
|
||||
lowered[x.toLowerCase()] = x;
|
||||
});
|
||||
|
||||
return lowered;
|
||||
};
|
||||
|
||||
const normalizeObject = this.normalizeObject(objectToNormalized);
|
||||
const optionsLower = objectToNormalized(options);
|
||||
|
||||
Object.keys(eData)
|
||||
.filter((x) => x.startsWith(Namespace.dataKey))
|
||||
.map((x) => x.substring(2))
|
||||
.forEach((key) => {
|
||||
let keyOption = optionsLower[key.toLowerCase()];
|
||||
|
||||
// dataset merges dashes to camelCase... yay
|
||||
// i.e. key = display_components_seconds
|
||||
if (key.includes('_')) {
|
||||
// [display, components, seconds]
|
||||
const split = key.split('_');
|
||||
// display
|
||||
keyOption = optionsLower[split[0].toLowerCase()];
|
||||
if (
|
||||
keyOption !== undefined &&
|
||||
options[keyOption].constructor === Object
|
||||
) {
|
||||
dataOptions[keyOption] = normalizeObject(
|
||||
split,
|
||||
1,
|
||||
options[keyOption],
|
||||
eData[`td${key}`]
|
||||
);
|
||||
}
|
||||
}
|
||||
// or key = multipleDate
|
||||
else if (keyOption !== undefined) {
|
||||
dataOptions[keyOption] = eData[`td${key}`];
|
||||
}
|
||||
});
|
||||
|
||||
return this._mergeOptions(dataOptions, options);
|
||||
}
|
||||
|
||||
//todo clean this up
|
||||
private static normalizeObject(objectToNormalized: (object) => object) {
|
||||
const normalizeObject = (
|
||||
split: string[],
|
||||
index: number,
|
||||
optionSubgroup: unknown,
|
||||
value: unknown
|
||||
) => {
|
||||
// first round = display { ... }
|
||||
const normalizedOptions = objectToNormalized(optionSubgroup);
|
||||
|
||||
const keyOption = normalizedOptions[split[index].toLowerCase()];
|
||||
const internalObject = {};
|
||||
|
||||
if (keyOption === undefined) return internalObject;
|
||||
|
||||
// if this is another object, continue down the rabbit hole
|
||||
if (optionSubgroup[keyOption].constructor === Object) {
|
||||
index++;
|
||||
internalObject[keyOption] = normalizeObject(
|
||||
split,
|
||||
index,
|
||||
optionSubgroup[keyOption],
|
||||
value
|
||||
);
|
||||
} else {
|
||||
internalObject[keyOption] = value;
|
||||
}
|
||||
return internalObject;
|
||||
};
|
||||
return normalizeObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to prove `d` is a DateTime or Date or can be converted into one.
|
||||
* @param d If a string will attempt creating a date from it.
|
||||
* @param localization object containing locale and format settings. Only used with the custom formats
|
||||
* @private
|
||||
*/
|
||||
static _dateTypeCheck(
|
||||
d: any, //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
localization: FormatLocalization
|
||||
): DateTime | null {
|
||||
return tryConvertToDateTime(d, localization);
|
||||
}
|
||||
|
||||
/**
|
||||
* Type checks that `value` is an array of Date or DateTime
|
||||
* @param optionName Provides text to error messages e.g. disabledDates
|
||||
* @param value Option value
|
||||
* @param providedType Used to provide text to error messages
|
||||
* @param localization
|
||||
*/
|
||||
static _typeCheckDateArray(
|
||||
optionName: string,
|
||||
value,
|
||||
providedType: string,
|
||||
localization: FormatLocalization
|
||||
) {
|
||||
return typeCheckDateArray(optionName, value, providedType, localization);
|
||||
}
|
||||
|
||||
/**
|
||||
* Type checks that `value` is an array of numbers
|
||||
* @param optionName Provides text to error messages e.g. disabledDates
|
||||
* @param value Option value
|
||||
* @param providedType Used to provide text to error messages
|
||||
*/
|
||||
static _typeCheckNumberArray(
|
||||
optionName: string,
|
||||
value,
|
||||
providedType: string
|
||||
) {
|
||||
return typeCheckNumberArray(optionName, value, providedType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to convert `d` to a DateTime object
|
||||
* @param d value to convert
|
||||
* @param optionName Provides text to error messages e.g. disabledDates
|
||||
* @param localization object containing locale and format settings. Only used with the custom formats
|
||||
*/
|
||||
static dateConversion(
|
||||
d: any, //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
optionName: string,
|
||||
localization: FormatLocalization
|
||||
): DateTime {
|
||||
return convertToDateTime(d, optionName, localization);
|
||||
}
|
||||
|
||||
private static _flattenDefaults: string[];
|
||||
|
||||
private static getFlattenDefaultOptions(): string[] {
|
||||
if (this._flattenDefaults) return this._flattenDefaults;
|
||||
const deepKeys = (t, pre = []) => {
|
||||
if (Array.isArray(t)) return [];
|
||||
if (Object(t) === t) {
|
||||
return Object.entries(t).flatMap(([k, v]) => deepKeys(v, [...pre, k]));
|
||||
} else {
|
||||
return pre.join('.');
|
||||
}
|
||||
};
|
||||
|
||||
this._flattenDefaults = deepKeys(DefaultOptions);
|
||||
|
||||
return this._flattenDefaults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Some options conflict like min/max date. Verify that these kinds of options
|
||||
* are set correctly.
|
||||
* @param config
|
||||
*/
|
||||
static _validateConflicts(config: Options) {
|
||||
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'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.multipleDates && config.dateRange) {
|
||||
Namespace.errorMessages.conflictingConfiguration(
|
||||
'Cannot uss option "multipleDates" with "dateRange"'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
184
node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionProcessor.ts
generated
vendored
Normal file
184
node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionProcessor.ts
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
import Namespace from './namespace';
|
||||
import type { FormatLocalization } from './options';
|
||||
import {
|
||||
convertToDateTime,
|
||||
typeCheckNumberArray,
|
||||
typeCheckDateArray,
|
||||
} from './typeChecker';
|
||||
|
||||
interface OptionProcessorFunctionArguments {
|
||||
key: string;
|
||||
value: any; //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
providedType: string;
|
||||
defaultType: string;
|
||||
path: string;
|
||||
localization: FormatLocalization;
|
||||
}
|
||||
|
||||
type OptionProcessorFunction = (
|
||||
this: void,
|
||||
args: OptionProcessorFunctionArguments
|
||||
) => any; //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
|
||||
function mandatoryDate(key: string): OptionProcessorFunction {
|
||||
return ({ value, providedType, localization }) => {
|
||||
const dateTime = convertToDateTime(value, key, localization);
|
||||
if (dateTime !== undefined) {
|
||||
dateTime.setLocalization(localization);
|
||||
return dateTime;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function optionalDate(key: string): OptionProcessorFunction {
|
||||
const mandatory = mandatoryDate(key);
|
||||
return (args) => {
|
||||
if (args.value === undefined) {
|
||||
return args.value;
|
||||
}
|
||||
return mandatory(args);
|
||||
};
|
||||
}
|
||||
|
||||
function numbersInRange(
|
||||
key: string,
|
||||
lower: number,
|
||||
upper: number
|
||||
): OptionProcessorFunction {
|
||||
return ({ value, providedType }) => {
|
||||
if (value === undefined) {
|
||||
return [];
|
||||
}
|
||||
typeCheckNumberArray(key, value, providedType);
|
||||
if ((value as number[]).some((x) => x < lower || x > upper))
|
||||
Namespace.errorMessages.numbersOutOfRange(key, lower, upper);
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
||||
function validHourRange(key: string): OptionProcessorFunction {
|
||||
return numbersInRange(key, 0, 23);
|
||||
}
|
||||
|
||||
function validDateArray(key: string): OptionProcessorFunction {
|
||||
return ({ value, providedType, localization }) => {
|
||||
if (value === undefined) {
|
||||
return [];
|
||||
}
|
||||
typeCheckDateArray(key, value, providedType, localization);
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
||||
function validKeyOption(keyOptions: string[]): OptionProcessorFunction {
|
||||
return ({ value, path }) => {
|
||||
if (!keyOptions.includes(value))
|
||||
Namespace.errorMessages.unexpectedOptionValue(
|
||||
path.substring(1),
|
||||
value,
|
||||
keyOptions
|
||||
);
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
||||
const optionProcessors: { [key: string]: OptionProcessorFunction } =
|
||||
Object.freeze({
|
||||
defaultDate: mandatoryDate('defaultDate'),
|
||||
viewDate: mandatoryDate('viewDate'),
|
||||
minDate: optionalDate('restrictions.minDate'),
|
||||
maxDate: optionalDate('restrictions.maxDate'),
|
||||
disabledHours: validHourRange('restrictions.disabledHours'),
|
||||
enabledHours: validHourRange('restrictions.enabledHours'),
|
||||
disabledDates: validDateArray('restrictions.disabledDates'),
|
||||
enabledDates: validDateArray('restrictions.enabledDates'),
|
||||
daysOfWeekDisabled: numbersInRange('restrictions.daysOfWeekDisabled', 0, 6),
|
||||
disabledTimeIntervals: ({ key, value, providedType, localization }) => {
|
||||
if (value === undefined) {
|
||||
return [];
|
||||
}
|
||||
if (!Array.isArray(value)) {
|
||||
Namespace.errorMessages.typeMismatch(
|
||||
key,
|
||||
providedType,
|
||||
'array of { from: DateTime|Date, to: DateTime|Date }'
|
||||
);
|
||||
}
|
||||
const valueObject = value as { from: any; to: any }[]; //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
for (let i = 0; i < valueObject.length; i++) {
|
||||
Object.keys(valueObject[i]).forEach((vk) => {
|
||||
const subOptionName = `${key}[${i}].${vk}`;
|
||||
const d = valueObject[i][vk];
|
||||
const dateTime = convertToDateTime(d, subOptionName, localization);
|
||||
dateTime.setLocalization(localization);
|
||||
valueObject[i][vk] = dateTime;
|
||||
});
|
||||
}
|
||||
return valueObject;
|
||||
},
|
||||
toolbarPlacement: validKeyOption(['top', 'bottom', 'default']),
|
||||
type: validKeyOption(['icons', 'sprites']),
|
||||
viewMode: validKeyOption([
|
||||
'clock',
|
||||
'calendar',
|
||||
'months',
|
||||
'years',
|
||||
'decades',
|
||||
]),
|
||||
theme: validKeyOption(['light', 'dark', 'auto']),
|
||||
placement: validKeyOption(['top', 'bottom']),
|
||||
meta: ({ value }) => value,
|
||||
dayViewHeaderFormat: ({ value }) => value,
|
||||
container: ({ value, path }) => {
|
||||
if (
|
||||
value &&
|
||||
!(
|
||||
value instanceof HTMLElement ||
|
||||
value instanceof Element ||
|
||||
value?.appendChild
|
||||
)
|
||||
) {
|
||||
Namespace.errorMessages.typeMismatch(
|
||||
path.substring(1),
|
||||
typeof value,
|
||||
'HTMLElement'
|
||||
);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
useTwentyfourHour: ({ value, path, providedType, defaultType }) => {
|
||||
Namespace.errorMessages.deprecatedWarning(
|
||||
'useTwentyfourHour',
|
||||
'Please use "options.localization.hourCycle" instead'
|
||||
);
|
||||
if (value === undefined || providedType === 'boolean') return value;
|
||||
Namespace.errorMessages.typeMismatch(path, providedType, defaultType);
|
||||
},
|
||||
hourCycle: validKeyOption(['h11', 'h12', 'h23', 'h24']),
|
||||
});
|
||||
|
||||
const defaultProcessor: OptionProcessorFunction = ({
|
||||
value,
|
||||
defaultType,
|
||||
providedType,
|
||||
path,
|
||||
}) => {
|
||||
switch (defaultType) {
|
||||
case 'boolean':
|
||||
return value === 'true' || value === true;
|
||||
case 'number':
|
||||
return +value;
|
||||
case 'string':
|
||||
return value.toString();
|
||||
case 'object':
|
||||
return {};
|
||||
case 'function':
|
||||
return value;
|
||||
default:
|
||||
Namespace.errorMessages.typeMismatch(path, providedType, defaultType);
|
||||
}
|
||||
};
|
||||
|
||||
export function processKey(this: void, args: OptionProcessorFunctionArguments) {
|
||||
return (optionProcessors[args.key] || defaultProcessor)(args);
|
||||
}
|
||||
112
node_modules/@eonasdan/tempus-dominus/src/js/utilities/options.ts
generated
vendored
Normal file
112
node_modules/@eonasdan/tempus-dominus/src/js/utilities/options.ts
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
import { DateTime, DateTimeFormatOptions } from '../datetime';
|
||||
import ViewMode from './view-mode';
|
||||
|
||||
export default interface Options {
|
||||
allowInputToggle?: boolean;
|
||||
container?: HTMLElement;
|
||||
dateRange?: boolean;
|
||||
debug?: boolean;
|
||||
defaultDate?: DateTime;
|
||||
display?: {
|
||||
toolbarPlacement?: 'top' | 'bottom';
|
||||
components?: {
|
||||
calendar?: boolean;
|
||||
date?: boolean;
|
||||
month?: boolean;
|
||||
year?: boolean;
|
||||
decades?: boolean;
|
||||
clock?: boolean;
|
||||
hours?: boolean;
|
||||
minutes?: boolean;
|
||||
seconds?: boolean;
|
||||
useTwentyfourHour?: boolean;
|
||||
};
|
||||
buttons?: { today?: boolean; close?: boolean; clear?: boolean };
|
||||
calendarWeeks?: boolean;
|
||||
icons?: {
|
||||
clear?: string;
|
||||
close?: string;
|
||||
date?: string;
|
||||
down?: string;
|
||||
next?: string;
|
||||
previous?: string;
|
||||
time?: string;
|
||||
today?: string;
|
||||
type?: 'icons' | 'sprites';
|
||||
up?: string;
|
||||
};
|
||||
viewMode?: keyof ViewMode;
|
||||
sideBySide?: boolean;
|
||||
inline?: boolean;
|
||||
keepOpen?: boolean;
|
||||
theme?: 'light' | 'dark' | 'auto';
|
||||
placement?: 'top' | 'bottom';
|
||||
};
|
||||
keepInvalid?: boolean;
|
||||
localization?: Localization;
|
||||
meta?: Record<string, unknown>;
|
||||
multipleDates?: boolean;
|
||||
multipleDatesSeparator?: string;
|
||||
promptTimeOnDateChange?: boolean;
|
||||
promptTimeOnDateChangeTransitionDelay?: number;
|
||||
restrictions?: {
|
||||
minDate?: DateTime;
|
||||
maxDate?: DateTime;
|
||||
enabledDates?: DateTime[];
|
||||
disabledDates?: DateTime[];
|
||||
enabledHours?: number[];
|
||||
disabledHours?: number[];
|
||||
disabledTimeIntervals?: { from: DateTime; to: DateTime }[];
|
||||
daysOfWeekDisabled?: number[];
|
||||
};
|
||||
stepping?: number;
|
||||
useCurrent?: boolean;
|
||||
viewDate?: DateTime;
|
||||
}
|
||||
|
||||
export interface FormatLocalization {
|
||||
dateFormats?: {
|
||||
L?: string;
|
||||
LL?: string;
|
||||
LLL?: string;
|
||||
LLLL?: string;
|
||||
LT?: string;
|
||||
LTS?: string;
|
||||
};
|
||||
format?: string;
|
||||
hourCycle?: Intl.LocaleHourCycleKey;
|
||||
locale?: string;
|
||||
ordinal?: (n: number) => any; //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
|
||||
export interface Localization extends FormatLocalization {
|
||||
clear?: string;
|
||||
close?: string;
|
||||
dayViewHeaderFormat?: DateTimeFormatOptions;
|
||||
decrementHour?: string;
|
||||
decrementMinute?: string;
|
||||
decrementSecond?: string;
|
||||
incrementHour?: string;
|
||||
incrementMinute?: string;
|
||||
incrementSecond?: string;
|
||||
maxWeekdayLength?: number;
|
||||
nextCentury?: string;
|
||||
nextDecade?: string;
|
||||
nextMonth?: string;
|
||||
nextYear?: string;
|
||||
pickHour?: string;
|
||||
pickMinute?: string;
|
||||
pickSecond?: string;
|
||||
previousCentury?: string;
|
||||
previousDecade?: string;
|
||||
previousMonth?: string;
|
||||
previousYear?: string;
|
||||
selectDate?: string;
|
||||
selectDecade?: string;
|
||||
selectMonth?: string;
|
||||
selectTime?: string;
|
||||
selectYear?: string;
|
||||
startOfTheWeek?: number;
|
||||
today?: string;
|
||||
toggleMeridiem?: string;
|
||||
}
|
||||
47
node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionsStore.ts
generated
vendored
Normal file
47
node_modules/@eonasdan/tempus-dominus/src/js/utilities/optionsStore.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import { DateTime } from '../datetime';
|
||||
import CalendarModes from './calendar-modes';
|
||||
import ViewMode from './view-mode';
|
||||
import Options from './options';
|
||||
|
||||
export class OptionsStore {
|
||||
options: Options;
|
||||
element: HTMLElement;
|
||||
input: HTMLInputElement;
|
||||
unset: boolean;
|
||||
private _currentCalendarViewMode = 0;
|
||||
|
||||
get currentCalendarViewMode() {
|
||||
return this._currentCalendarViewMode;
|
||||
}
|
||||
|
||||
set currentCalendarViewMode(value) {
|
||||
this._currentCalendarViewMode = value;
|
||||
this.currentView = CalendarModes[value].name;
|
||||
}
|
||||
|
||||
_viewDate = new DateTime();
|
||||
|
||||
get viewDate() {
|
||||
return this._viewDate;
|
||||
}
|
||||
|
||||
set viewDate(v) {
|
||||
this._viewDate = v;
|
||||
if (this.options) this.options.viewDate = v;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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';
|
||||
|
||||
get isTwelveHour() {
|
||||
return ['h12', 'h11'].includes(this.options.localization.hourCycle);
|
||||
}
|
||||
}
|
||||
19
node_modules/@eonasdan/tempus-dominus/src/js/utilities/service-locator.ts
generated
vendored
Normal file
19
node_modules/@eonasdan/tempus-dominus/src/js/utilities/service-locator.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export declare type Constructable<T> = new (...args: any[]) => T;
|
||||
|
||||
class ServiceLocator {
|
||||
private cache: Map<Constructable<unknown>, unknown | symbol> = new Map();
|
||||
|
||||
locate<T>(identifier: Constructable<T>): 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;
|
||||
108
node_modules/@eonasdan/tempus-dominus/src/js/utilities/typeChecker.ts
generated
vendored
Normal file
108
node_modules/@eonasdan/tempus-dominus/src/js/utilities/typeChecker.ts
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
import Namespace from './namespace';
|
||||
import { DateTime } from '../datetime';
|
||||
import { FormatLocalization } from './options';
|
||||
import DefaultFormatLocalization from './default-format-localization';
|
||||
|
||||
/**
|
||||
* Attempts to prove `d` is a DateTime or Date or can be converted into one.
|
||||
* @param d If a string will attempt creating a date from it.
|
||||
* @param localization object containing locale and format settings. Only used with the custom formats
|
||||
* @private
|
||||
*/
|
||||
export function tryConvertToDateTime(
|
||||
this: void,
|
||||
d: DateTime | Date | string,
|
||||
localization: FormatLocalization
|
||||
): DateTime | null {
|
||||
if (!d) return null;
|
||||
if (d.constructor.name === DateTime.name) return d as DateTime;
|
||||
if (d.constructor.name === Date.name) {
|
||||
return DateTime.convert(d as Date);
|
||||
}
|
||||
if (typeof d === typeof '') {
|
||||
const dateTime = DateTime.fromString(d as unknown as string, localization);
|
||||
if (JSON.stringify(dateTime) === 'null') {
|
||||
return null;
|
||||
}
|
||||
return dateTime;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to convert `d` to a DateTime object
|
||||
* @param d value to convert
|
||||
* @param optionName Provides text to error messages e.g. disabledDates
|
||||
* @param localization object containing locale and format settings. Only used with the custom formats
|
||||
*/
|
||||
export function convertToDateTime(
|
||||
this: void,
|
||||
d: DateTime | Date | string,
|
||||
optionName: string,
|
||||
localization: FormatLocalization
|
||||
): DateTime {
|
||||
if (typeof d === typeof '' && optionName !== 'input') {
|
||||
Namespace.errorMessages.dateString();
|
||||
}
|
||||
|
||||
const converted = tryConvertToDateTime(d, localization);
|
||||
|
||||
if (!converted) {
|
||||
Namespace.errorMessages.failedToParseDate(
|
||||
optionName,
|
||||
d,
|
||||
optionName === 'input'
|
||||
);
|
||||
}
|
||||
return converted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type checks that `value` is an array of Date or DateTime
|
||||
* @param optionName Provides text to error messages e.g. disabledDates
|
||||
* @param value Option value
|
||||
* @param providedType Used to provide text to error messages
|
||||
* @param localization
|
||||
*/
|
||||
export function typeCheckDateArray(
|
||||
this: void,
|
||||
optionName: string,
|
||||
value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
providedType: string,
|
||||
localization: FormatLocalization = DefaultFormatLocalization
|
||||
) {
|
||||
if (!Array.isArray(value)) {
|
||||
Namespace.errorMessages.typeMismatch(
|
||||
optionName,
|
||||
providedType,
|
||||
'array of DateTime or Date'
|
||||
);
|
||||
}
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
const d = value[i];
|
||||
const dateTime = convertToDateTime(d, optionName, localization);
|
||||
dateTime.setLocalization(localization);
|
||||
value[i] = dateTime;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Type checks that `value` is an array of numbers
|
||||
* @param optionName Provides text to error messages e.g. disabledDates
|
||||
* @param value Option value
|
||||
* @param providedType Used to provide text to error messages
|
||||
*/
|
||||
export function typeCheckNumberArray(
|
||||
this: void,
|
||||
optionName: string,
|
||||
value: any, //eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
providedType: string
|
||||
) {
|
||||
if (!Array.isArray(value) || value.some((x) => typeof x !== typeof 0)) {
|
||||
Namespace.errorMessages.typeMismatch(
|
||||
optionName,
|
||||
providedType,
|
||||
'array of numbers'
|
||||
);
|
||||
}
|
||||
}
|
||||
9
node_modules/@eonasdan/tempus-dominus/src/js/utilities/view-mode.ts
generated
vendored
Normal file
9
node_modules/@eonasdan/tempus-dominus/src/js/utilities/view-mode.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
type ViewMode = {
|
||||
clock;
|
||||
calendar;
|
||||
months;
|
||||
years;
|
||||
decades;
|
||||
};
|
||||
|
||||
export default ViewMode;
|
||||
223
node_modules/@eonasdan/tempus-dominus/src/js/validation.ts
generated
vendored
Normal file
223
node_modules/@eonasdan/tempus-dominus/src/js/validation.ts
generated
vendored
Normal file
@@ -0,0 +1,223 @@
|
||||
import { DateTime, Unit } from './datetime';
|
||||
import { serviceLocator } from './utilities/service-locator';
|
||||
import { OptionsStore } from './utilities/optionsStore';
|
||||
|
||||
/**
|
||||
* Main class for date validation rules based on the options provided.
|
||||
*/
|
||||
export default class Validation {
|
||||
private optionsStore: OptionsStore;
|
||||
|
||||
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 provided to check portions of the date instead of the whole.
|
||||
* @param targetDate
|
||||
* @param granularity
|
||||
*/
|
||||
isValid(targetDate: DateTime, granularity?: Unit): boolean {
|
||||
if (!this._enabledDisabledDatesIsValid(granularity, targetDate))
|
||||
return false;
|
||||
|
||||
if (
|
||||
granularity !== Unit.month &&
|
||||
granularity !== Unit.year &&
|
||||
this.optionsStore.options.restrictions.daysOfWeekDisabled?.length > 0 &&
|
||||
this.optionsStore.options.restrictions.daysOfWeekDisabled.indexOf(
|
||||
targetDate.weekDay
|
||||
) !== -1
|
||||
)
|
||||
return false;
|
||||
|
||||
if (!this._minMaxIsValid(granularity, targetDate)) return false;
|
||||
|
||||
if (
|
||||
granularity === Unit.hours ||
|
||||
granularity === Unit.minutes ||
|
||||
granularity === Unit.seconds
|
||||
) {
|
||||
if (!this._enabledDisabledHoursIsValid(targetDate)) return false;
|
||||
|
||||
if (
|
||||
this.optionsStore.options.restrictions.disabledTimeIntervals?.filter(
|
||||
(internal) => targetDate.isBetween(internal.from, internal.to)
|
||||
).length !== 0
|
||||
)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private _enabledDisabledDatesIsValid(
|
||||
granularity: Unit,
|
||||
targetDate: DateTime
|
||||
): boolean {
|
||||
if (granularity !== Unit.date) return true;
|
||||
|
||||
if (
|
||||
this.optionsStore.options.restrictions.disabledDates.length > 0 &&
|
||||
this._isInDisabledDates(targetDate)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// noinspection RedundantIfStatementJS
|
||||
if (
|
||||
this.optionsStore.options.restrictions.enabledDates.length > 0 &&
|
||||
!this._isInEnabledDates(targetDate)
|
||||
) {
|
||||
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
|
||||
*/
|
||||
private _isInDisabledDates(testDate: DateTime) {
|
||||
if (
|
||||
!this.optionsStore.options.restrictions.disabledDates ||
|
||||
this.optionsStore.options.restrictions.disabledDates.length === 0
|
||||
)
|
||||
return false;
|
||||
|
||||
return !!this.optionsStore.options.restrictions.disabledDates.find((x) =>
|
||||
x.isSame(testDate, Unit.date)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
private _isInEnabledDates(testDate: DateTime) {
|
||||
if (
|
||||
!this.optionsStore.options.restrictions.enabledDates ||
|
||||
this.optionsStore.options.restrictions.enabledDates.length === 0
|
||||
)
|
||||
return true;
|
||||
|
||||
return !!this.optionsStore.options.restrictions.enabledDates.find((x) =>
|
||||
x.isSame(testDate, Unit.date)
|
||||
);
|
||||
}
|
||||
|
||||
private _minMaxIsValid(granularity: Unit, targetDate: DateTime) {
|
||||
if (
|
||||
this.optionsStore.options.restrictions.minDate &&
|
||||
targetDate.isBefore(
|
||||
this.optionsStore.options.restrictions.minDate,
|
||||
granularity
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// noinspection RedundantIfStatementJS
|
||||
if (
|
||||
this.optionsStore.options.restrictions.maxDate &&
|
||||
targetDate.isAfter(
|
||||
this.optionsStore.options.restrictions.maxDate,
|
||||
granularity
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private _enabledDisabledHoursIsValid(targetDate) {
|
||||
if (
|
||||
this.optionsStore.options.restrictions.disabledHours.length > 0 &&
|
||||
this._isInDisabledHours(targetDate)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// noinspection RedundantIfStatementJS
|
||||
if (
|
||||
this.optionsStore.options.restrictions.enabledHours.length > 0 &&
|
||||
!this._isInEnabledHours(targetDate)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
private _isInDisabledHours(testDate: DateTime) {
|
||||
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.includes(
|
||||
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
|
||||
*/
|
||||
private _isInEnabledHours(testDate: DateTime) {
|
||||
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.includes(
|
||||
formattedDate
|
||||
);
|
||||
}
|
||||
|
||||
dateRangeIsValid(dates: DateTime[], index: number, target: DateTime) {
|
||||
// if we're not using the option, then return valid
|
||||
if (!this.optionsStore.options.dateRange) return true;
|
||||
|
||||
// if we've only selected 0..1 dates, and we're not setting the end date
|
||||
// then return valid. We only want to validate the range if both are selected,
|
||||
// because the other validation on the target has already occurred.
|
||||
if (dates.length !== 2 && index !== 1) return true;
|
||||
|
||||
// initialize start date
|
||||
const start = dates[0].clone;
|
||||
// check if start date is not the same as target date
|
||||
if (start.isSame(target, Unit.date)) return true;
|
||||
|
||||
// add one day to start; start has already been validated
|
||||
start.manipulate(1, Unit.date);
|
||||
|
||||
// check each date in the range to make sure it's valid
|
||||
while (!start.isSame(target, Unit.date)) {
|
||||
const valid = this.isValid(start, Unit.date);
|
||||
if (!valid) return false;
|
||||
start.manipulate(1, Unit.date);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
35
node_modules/@eonasdan/tempus-dominus/src/scss/_variables.scss
generated
vendored
Normal file
35
node_modules/@eonasdan/tempus-dominus/src/scss/_variables.scss
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
@use 'sass:color';
|
||||
|
||||
$td-light: #fff !default;
|
||||
$td-widget-background: $td-light !default;
|
||||
$td-font-color: #000 !default;
|
||||
$td-timepicker-font-size: 1.2em !default;
|
||||
$td-active-bg: #0d6efd !default;
|
||||
$td-range-bg: color.scale($td-active-bg, $lightness: -40%);
|
||||
$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, 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, 0.5);
|
||||
|
||||
$td-dark: #1b1b1b !default;
|
||||
$td-dark-widget-background: $td-dark !default;
|
||||
$td-dark-font-color: #e3e3e3;
|
||||
$td-dark-active-bg: #4db2ff !default;
|
||||
$td-dark-range-bg: color.scale($td-dark-active-bg, $lightness: -40%);
|
||||
$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, 0.5);
|
||||
485
node_modules/@eonasdan/tempus-dominus/src/scss/tempus-dominus.scss
generated
vendored
Normal file
485
node_modules/@eonasdan/tempus-dominus/src/scss/tempus-dominus.scss
generated
vendored
Normal file
@@ -0,0 +1,485 @@
|
||||
@import 'variables';
|
||||
|
||||
.visually-hidden {
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
height: 1px !important;
|
||||
padding: 0 !important;
|
||||
margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
|
||||
overflow: hidden !important;
|
||||
clip: rect(0, 0, 0, 0) !important;
|
||||
white-space: nowrap !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.tempus-dominus-widget {
|
||||
list-style: none;
|
||||
padding: 4px;
|
||||
width: 19rem;
|
||||
border-radius: 4px;
|
||||
display: none;
|
||||
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);
|
||||
|
||||
&.calendarWeeks {
|
||||
width: 21rem;
|
||||
|
||||
& .date-container-days {
|
||||
grid-auto-columns: 12.5%;
|
||||
grid-template-areas: 'a a a a a a a a';
|
||||
}
|
||||
}
|
||||
|
||||
[data-action] {
|
||||
cursor: pointer;
|
||||
|
||||
&::after {
|
||||
@extend .visually-hidden;
|
||||
content: attr(title);
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&.disabled:hover {
|
||||
background: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
//popper
|
||||
.arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
//end popper
|
||||
|
||||
&.show {
|
||||
display: block;
|
||||
&.date-container {
|
||||
min-height: 315px;
|
||||
}
|
||||
|
||||
&.time-container {
|
||||
min-height: 217px;
|
||||
}
|
||||
}
|
||||
|
||||
.td-collapse {
|
||||
&:not(.show) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.td-collapsing {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
transition: height 0.35s ease;
|
||||
}
|
||||
|
||||
&.timepicker-sbs {
|
||||
@media (min-width: 576px) {
|
||||
width: 38em;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
width: 38em;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
width: 38em;
|
||||
}
|
||||
|
||||
.td-row {
|
||||
display: flex;
|
||||
|
||||
.td-half {
|
||||
flex: 0 0 auto;
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div[data-action]:active {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.timepicker-hour,
|
||||
.timepicker-minute,
|
||||
.timepicker-second {
|
||||
width: 54px;
|
||||
font-weight: bold;
|
||||
font-size: $td-timepicker-font-size;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
button[data-action] {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.toggleMeridiem {
|
||||
text-align: center;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.calendar-header {
|
||||
display: grid;
|
||||
grid-template-areas: 'a a a';
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
|
||||
& .next {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
& .previous {
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
& .picker-switch {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
grid-auto-rows: 40px;
|
||||
|
||||
& div {
|
||||
border-radius: $td-border-radius;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.date-container-days {
|
||||
display: grid;
|
||||
grid-template-areas: 'a a a a a a a';
|
||||
grid-auto-rows: 40px;
|
||||
grid-auto-columns: calc(100% / 7);
|
||||
|
||||
.range-in {
|
||||
@extend .active;
|
||||
background-color: $td-range-bg !important;
|
||||
border: none;
|
||||
border-radius: 0 !important;
|
||||
box-shadow: -5px 0 0 $td-range-bg, 5px 0 0 $td-range-bg;
|
||||
}
|
||||
|
||||
.range-end {
|
||||
@extend .active;
|
||||
border-radius: 0 50px 50px 0 !important;
|
||||
}
|
||||
|
||||
.range-start {
|
||||
@extend .active;
|
||||
border-radius: 50px 0 0 50px !important;
|
||||
}
|
||||
|
||||
& .dow {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
& .cw {
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
font-size: 0.8em;
|
||||
line-height: 20px;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.date-container-decades,
|
||||
.date-container-years,
|
||||
.date-container-months {
|
||||
display: grid;
|
||||
grid-template-areas: 'a a a';
|
||||
grid-auto-rows: calc(calc(19rem - 2 * 4px) / 7);
|
||||
}
|
||||
|
||||
.time-container-hour,
|
||||
.time-container-minute,
|
||||
.time-container-second {
|
||||
display: grid;
|
||||
grid-template-areas: 'a a a a';
|
||||
grid-auto-rows: calc(calc(19rem - 2 * 4px) / 7);
|
||||
}
|
||||
|
||||
.time-container-clock {
|
||||
display: grid;
|
||||
grid-auto-rows: calc(calc(19rem - 2 * 4px) / 7);
|
||||
|
||||
& .no-highlight {
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.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) {
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
border-radius: $td-border-radius;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
|
||||
&.disabled,
|
||||
&.disabled:hover {
|
||||
background: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&.today {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border: solid transparent;
|
||||
border-width: 0 0 7px 7px;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.time-container {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
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;
|
||||
}
|
||||
|
||||
&.tempus-dominus-widget-readonly {
|
||||
table td.day,
|
||||
table td.hour,
|
||||
table td.minute,
|
||||
table td.second,
|
||||
table td [data-action='incrementHours'],
|
||||
table td [data-action='incrementMinutes'],
|
||||
table td [data-action='incrementSeconds'],
|
||||
table td [data-action='decrementHours'],
|
||||
table td [data-action='decrementMinutes'],
|
||||
table td [data-action='decrementSeconds'],
|
||||
table td [data-action='showHours'],
|
||||
table td [data-action='showMinutes'],
|
||||
table td [data-action='showSeconds'],
|
||||
table td [data-action='togglePeriod'] {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.light {
|
||||
color: $td-font-color;
|
||||
background-color: $td-widget-background;
|
||||
|
||||
[data-action] {
|
||||
&.disabled,
|
||||
&.disabled:hover {
|
||||
color: $td-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
& div {
|
||||
&:hover {
|
||||
background: $td-btn-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.date-container-days {
|
||||
& .dow {
|
||||
color: $td-dow-color;
|
||||
}
|
||||
|
||||
& .cw {
|
||||
color: $td-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-btn-hover-bg;
|
||||
}
|
||||
|
||||
&.active {
|
||||
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: $td-active-border-color;
|
||||
}
|
||||
|
||||
&.old,
|
||||
&.new {
|
||||
color: $td-alternate-color;
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&.disabled:hover {
|
||||
color: $td-disabled-color;
|
||||
}
|
||||
|
||||
&.today {
|
||||
&:before {
|
||||
border-bottom-color: $td-active-bg;
|
||||
border-top-color: $td-secondary-border-color-rgba;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
color: $td-active-color;
|
||||
background-color: $td-active-bg;
|
||||
border-color: $td-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&.dark {
|
||||
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;
|
||||
}
|
||||
|
||||
.range-in {
|
||||
background-color: $td-dark-range-bg !important;
|
||||
box-shadow: -5px 0 0 $td-dark-range-bg, 5px 0 0 $td-dark-range-bg;
|
||||
}
|
||||
|
||||
& .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;
|
||||
}
|
||||
}
|
||||
}
|
||||
37
node_modules/@eonasdan/tempus-dominus/types/actions.d.ts
generated
vendored
Normal file
37
node_modules/@eonasdan/tempus-dominus/types/actions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import ActionTypes from './utilities/action-types';
|
||||
/**
|
||||
* Logic for various click actions
|
||||
*/
|
||||
export default class Actions {
|
||||
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): void;
|
||||
private handleShowClockContainers;
|
||||
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;
|
||||
private handleSelectCalendarMode;
|
||||
private handleToggle;
|
||||
private handleSelectDay;
|
||||
private handleMultiDate;
|
||||
private handleDateRange;
|
||||
}
|
||||
79
node_modules/@eonasdan/tempus-dominus/types/dates.d.ts
generated
vendored
Normal file
79
node_modules/@eonasdan/tempus-dominus/types/dates.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { DateTime, Unit } from './datetime';
|
||||
export default class Dates {
|
||||
private _dates;
|
||||
private optionsStore;
|
||||
private validation;
|
||||
private _eventEmitters;
|
||||
constructor();
|
||||
/**
|
||||
* Returns the array of selected dates
|
||||
*/
|
||||
get picked(): DateTime[];
|
||||
/**
|
||||
* Returns the last picked value.
|
||||
*/
|
||||
get lastPicked(): DateTime;
|
||||
/**
|
||||
* Returns the length of picked dates -1 or 0 if none are selected.
|
||||
*/
|
||||
get lastPickedIndex(): number;
|
||||
/**
|
||||
* Formats a DateTime object to a string. Used when setting the input value.
|
||||
* @param date
|
||||
*/
|
||||
formatInput(date: DateTime): string;
|
||||
/**
|
||||
* parse the value into a DateTime object.
|
||||
* this can be overwritten to supply your own parsing.
|
||||
*/
|
||||
parseInput(value: any): DateTime;
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
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.
|
||||
* @param targetDate
|
||||
* @param unit
|
||||
*/
|
||||
isPicked(targetDate: DateTime, unit?: Unit): boolean;
|
||||
/**
|
||||
* Returns the index at which `targetDate` 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.
|
||||
* @param targetDate
|
||||
* @param unit
|
||||
*/
|
||||
pickedIndex(targetDate: DateTime, unit?: Unit): number;
|
||||
/**
|
||||
* Clears all selected dates.
|
||||
*/
|
||||
clear(): void;
|
||||
/**
|
||||
* Find the "book end" years given a `year` and a `factor`
|
||||
* @param factor e.g. 100 for decades
|
||||
* @param year e.g. 2021
|
||||
*/
|
||||
static getStartEndYear(factor: number, year: number): [number, number, number];
|
||||
updateInput(target?: DateTime): void;
|
||||
/**
|
||||
* 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
|
||||
* provided the date at that index will be replaced, otherwise it is appended.
|
||||
* @param target
|
||||
* @param index
|
||||
*/
|
||||
setValue(target?: DateTime, index?: number): void;
|
||||
private _setValueNull;
|
||||
}
|
||||
257
node_modules/@eonasdan/tempus-dominus/types/datetime.d.ts
generated
vendored
Normal file
257
node_modules/@eonasdan/tempus-dominus/types/datetime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,257 @@
|
||||
import { FormatLocalization } from './utilities/options';
|
||||
export declare enum Unit {
|
||||
seconds = "seconds",
|
||||
minutes = "minutes",
|
||||
hours = "hours",
|
||||
date = "date",
|
||||
month = "month",
|
||||
year = "year"
|
||||
}
|
||||
export interface DateTimeFormatOptions extends Intl.DateTimeFormatOptions {
|
||||
timeStyle?: 'short' | 'medium' | 'long';
|
||||
dateStyle?: 'short' | 'medium' | 'long' | 'full';
|
||||
numberingSystem?: string;
|
||||
}
|
||||
/**
|
||||
* Returns an Intl format object based on the provided object
|
||||
* @param unit
|
||||
*/
|
||||
export declare const getFormatByUnit: (unit: Unit) => object;
|
||||
/**
|
||||
* Attempts to guess the hour cycle of the given local
|
||||
* @param locale
|
||||
*/
|
||||
export declare const guessHourCycle: (locale: string) => Intl.LocaleHourCycleKey;
|
||||
/**
|
||||
* For the most part this object behaves exactly the same way
|
||||
* as the native Date object with a little extra spice.
|
||||
*/
|
||||
export declare class DateTime extends Date {
|
||||
localization: FormatLocalization;
|
||||
/**
|
||||
* Chainable way to set the {@link locale}
|
||||
* @param value
|
||||
* @deprecated use setLocalization with a FormatLocalization object instead
|
||||
*/
|
||||
setLocale(value: string): this;
|
||||
/**
|
||||
* Chainable way to set the {@link localization}
|
||||
* @param value
|
||||
*/
|
||||
setLocalization(value: FormatLocalization): this;
|
||||
/**
|
||||
* Converts a plain JS date object to a DateTime object.
|
||||
* Doing this allows access to format, etc.
|
||||
* @param date
|
||||
* @param locale this parameter is deprecated. Use formatLocalization instead.
|
||||
* @param formatLocalization
|
||||
*/
|
||||
static convert(date: Date, locale?: string, formatLocalization?: FormatLocalization): DateTime;
|
||||
/**
|
||||
* Native date manipulations are not pure functions. This function creates a duplicate of the DateTime object.
|
||||
*/
|
||||
get clone(): DateTime;
|
||||
static isValid(d: any): boolean;
|
||||
/**
|
||||
* Sets the current date to the start of the {@link unit} provided
|
||||
* Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).startOf('month')
|
||||
* would return April 1, 2021, 12:00:00.000 AM (midnight)
|
||||
* @param unit
|
||||
* @param startOfTheWeek Allows for the changing the start of the week.
|
||||
*/
|
||||
startOf(unit: Unit | 'weekDay', startOfTheWeek?: number): this;
|
||||
/**
|
||||
* Sets the current date to the end of the {@link unit} provided
|
||||
* Example: Consider a date of "April 30, 2021, 11:45:32.984 AM" => new DateTime(2021, 3, 30, 11, 45, 32, 984).endOf('month')
|
||||
* would return April 30, 2021, 11:59:59.999 PM
|
||||
* @param unit
|
||||
* @param startOfTheWeek
|
||||
*/
|
||||
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')
|
||||
* would return May 30, 2021, 11:45:32.984 AM
|
||||
* @param value A positive or negative number
|
||||
* @param unit
|
||||
*/
|
||||
manipulate(value: number, unit: Unit): this;
|
||||
/**
|
||||
* Return true if {@link compare} is before this date
|
||||
* @param compare The Date/DateTime to compare
|
||||
* @param unit If provided, uses {@link startOf} for
|
||||
* comparison.
|
||||
*/
|
||||
isBefore(compare: DateTime, unit?: Unit): boolean;
|
||||
/**
|
||||
* Return true if {@link compare} is after this date
|
||||
* @param compare The Date/DateTime to compare
|
||||
* @param unit If provided, uses {@link startOf} for
|
||||
* comparison.
|
||||
*/
|
||||
isAfter(compare: DateTime, unit?: Unit): boolean;
|
||||
/**
|
||||
* Return true if {@link compare} is same this date
|
||||
* @param compare The Date/DateTime to compare
|
||||
* @param unit If provided, uses {@link startOf} for
|
||||
* comparison.
|
||||
*/
|
||||
isSame(compare: DateTime, unit?: Unit): boolean;
|
||||
/**
|
||||
* Check if this is between two other DateTimes, optionally looking at unit scale. The match is exclusive.
|
||||
* @param left
|
||||
* @param right
|
||||
* @param unit.
|
||||
* @param inclusivity. A [ indicates inclusion of a value. A ( indicates exclusion.
|
||||
* If the inclusivity parameter is used, both indicators must be passed.
|
||||
*/
|
||||
isBetween(left: DateTime, right: DateTime, unit?: Unit, inclusivity?: '()' | '[]' | '(]' | '[)'): boolean;
|
||||
/**
|
||||
* Returns flattened object of the date. Does not include literals
|
||||
* @param locale
|
||||
* @param template
|
||||
*/
|
||||
parts(locale?: string, template?: Record<string, unknown>): Record<string, string>;
|
||||
/**
|
||||
* Shortcut to Date.getSeconds()
|
||||
*/
|
||||
get seconds(): number;
|
||||
/**
|
||||
* Shortcut to Date.setSeconds()
|
||||
*/
|
||||
set seconds(value: number);
|
||||
/**
|
||||
* Returns two digit hours
|
||||
*/
|
||||
get secondsFormatted(): string;
|
||||
/**
|
||||
* Shortcut to Date.getMinutes()
|
||||
*/
|
||||
get minutes(): number;
|
||||
/**
|
||||
* Shortcut to Date.setMinutes()
|
||||
*/
|
||||
set minutes(value: number);
|
||||
/**
|
||||
* Returns two digit minutes
|
||||
*/
|
||||
get minutesFormatted(): string;
|
||||
/**
|
||||
* Shortcut to Date.getHours()
|
||||
*/
|
||||
get hours(): number;
|
||||
/**
|
||||
* Shortcut to Date.setHours()
|
||||
*/
|
||||
set hours(value: number);
|
||||
/**
|
||||
* Returns two digit hour, e.g. 01...10
|
||||
* @param hourCycle Providing an hour cycle will change 00 to 24 depending on the given value.
|
||||
*/
|
||||
getHoursFormatted(hourCycle?: Intl.LocaleHourCycleKey): string;
|
||||
/**
|
||||
* Get the meridiem of the date. E.g. AM or PM.
|
||||
* If the {@link locale} provides a "dayPeriod" then this will be returned,
|
||||
* otherwise it will return AM or PM.
|
||||
* @param locale
|
||||
*/
|
||||
meridiem(locale?: string): string;
|
||||
/**
|
||||
* Shortcut to Date.getDate()
|
||||
*/
|
||||
get date(): number;
|
||||
/**
|
||||
* Shortcut to Date.setDate()
|
||||
*/
|
||||
set date(value: number);
|
||||
/**
|
||||
* Return two digit date
|
||||
*/
|
||||
get dateFormatted(): string;
|
||||
/**
|
||||
* Shortcut to Date.getDay()
|
||||
*/
|
||||
get weekDay(): number;
|
||||
/**
|
||||
* Shortcut to Date.getMonth()
|
||||
*/
|
||||
get month(): number;
|
||||
/**
|
||||
* Shortcut to Date.setMonth()
|
||||
*/
|
||||
set month(value: number);
|
||||
/**
|
||||
* Return two digit, human expected month. E.g. January = 1, December = 12
|
||||
*/
|
||||
get monthFormatted(): string;
|
||||
/**
|
||||
* Shortcut to Date.getFullYear()
|
||||
*/
|
||||
get year(): number;
|
||||
/**
|
||||
* Shortcut to Date.setFullYear()
|
||||
*/
|
||||
set year(value: number);
|
||||
/**
|
||||
* Gets the week of the year
|
||||
*/
|
||||
get week(): number;
|
||||
/**
|
||||
* Returns the number of weeks in the year
|
||||
*/
|
||||
weeksInWeekYear(): 53 | 52;
|
||||
/**
|
||||
* Returns true or false depending on if the year is a leap year or not.
|
||||
*/
|
||||
get isLeapYear(): boolean;
|
||||
private computeOrdinal;
|
||||
private nonLeapLadder;
|
||||
private leapLadder;
|
||||
private dateTimeRegex;
|
||||
private formattingTokens;
|
||||
/**
|
||||
* Returns a list of month values based on the current locale
|
||||
*/
|
||||
private getAllMonths;
|
||||
/**
|
||||
* Replaces an expanded token set (e.g. LT/LTS)
|
||||
*/
|
||||
private replaceTokens;
|
||||
private match2;
|
||||
private match3;
|
||||
private match4;
|
||||
private match1to2;
|
||||
private matchSigned;
|
||||
private matchOffset;
|
||||
private matchWord;
|
||||
private parseTwoDigitYear;
|
||||
private offsetFromString;
|
||||
/**
|
||||
* z = -4, zz = -04, zzz = -0400
|
||||
* @param date
|
||||
* @param style
|
||||
* @private
|
||||
*/
|
||||
private zoneInformation;
|
||||
private zoneExpressions;
|
||||
private addInput;
|
||||
private getLocaleAfternoon;
|
||||
private meridiemMatch;
|
||||
private expressions;
|
||||
private correctHours;
|
||||
private makeParser;
|
||||
/**
|
||||
* Attempts to create a DateTime from a string.
|
||||
* @param input date as string
|
||||
* @param localization provides the date template the string is in via the format property
|
||||
*/
|
||||
static fromString(input: string, localization: FormatLocalization): DateTime;
|
||||
/**
|
||||
* Returns a string format.
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
|
||||
* for valid templates and locale objects
|
||||
* @param template An optional object. If provided, method will use Intl., otherwise the localizations format properties
|
||||
* @param locale Can be a string or an array of strings. Uses browser defaults otherwise.
|
||||
*/
|
||||
format(template?: DateTimeFormatOptions | string, locale?: string): string;
|
||||
}
|
||||
30
node_modules/@eonasdan/tempus-dominus/types/display/calendar/date-display.d.ts
generated
vendored
Normal file
30
node_modules/@eonasdan/tempus-dominus/types/display/calendar/date-display.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Paint } from '../index';
|
||||
/**
|
||||
* Creates and updates the grid for `date`
|
||||
*/
|
||||
export default class DateDisplay {
|
||||
private optionsStore;
|
||||
private dates;
|
||||
private validation;
|
||||
constructor();
|
||||
/**
|
||||
* Build the container html for the display
|
||||
* @private
|
||||
*/
|
||||
getPicker(): HTMLElement;
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void;
|
||||
private _dateToDataValue;
|
||||
private _handleDateRange;
|
||||
private handleMouseEvents;
|
||||
private _updateCalendarView;
|
||||
/***
|
||||
* Generates a html row that contains the days of the week.
|
||||
* @private
|
||||
*/
|
||||
private _daysOfTheWeek;
|
||||
private _handleCalendarWeeks;
|
||||
}
|
||||
22
node_modules/@eonasdan/tempus-dominus/types/display/calendar/decade-display.d.ts
generated
vendored
Normal file
22
node_modules/@eonasdan/tempus-dominus/types/display/calendar/decade-display.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Paint } from '../index';
|
||||
/**
|
||||
* Creates and updates the grid for `seconds`
|
||||
*/
|
||||
export default class DecadeDisplay {
|
||||
private _startDecade;
|
||||
private _endDecade;
|
||||
private optionsStore;
|
||||
private dates;
|
||||
private validation;
|
||||
constructor();
|
||||
/**
|
||||
* Build the container html for the display
|
||||
* @private
|
||||
*/
|
||||
getPicker(): HTMLDivElement;
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void;
|
||||
}
|
||||
20
node_modules/@eonasdan/tempus-dominus/types/display/calendar/month-display.d.ts
generated
vendored
Normal file
20
node_modules/@eonasdan/tempus-dominus/types/display/calendar/month-display.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Paint } from '../index';
|
||||
/**
|
||||
* Creates and updates the grid for `month`
|
||||
*/
|
||||
export default class MonthDisplay {
|
||||
private optionsStore;
|
||||
private dates;
|
||||
private validation;
|
||||
constructor();
|
||||
/**
|
||||
* Build the container html for the display
|
||||
* @private
|
||||
*/
|
||||
getPicker(): HTMLElement;
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void;
|
||||
}
|
||||
22
node_modules/@eonasdan/tempus-dominus/types/display/calendar/year-display.d.ts
generated
vendored
Normal file
22
node_modules/@eonasdan/tempus-dominus/types/display/calendar/year-display.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Paint } from '../index';
|
||||
/**
|
||||
* Creates and updates the grid for `year`
|
||||
*/
|
||||
export default class YearDisplay {
|
||||
private _startYear;
|
||||
private _endYear;
|
||||
private optionsStore;
|
||||
private dates;
|
||||
private validation;
|
||||
constructor();
|
||||
/**
|
||||
* Build the container html for the display
|
||||
* @private
|
||||
*/
|
||||
getPicker(): HTMLElement;
|
||||
/**
|
||||
* Populates the grid and updates enabled states
|
||||
* @private
|
||||
*/
|
||||
_update(widget: HTMLElement, paint: Paint): void;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user