Refactor, and stricter linting (with failures now).
This commit is contained in:
parent
7a16ac2c0a
commit
133287988e
35 changed files with 387 additions and 232 deletions
|
@ -4,9 +4,13 @@
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true
|
"browser": true
|
||||||
},
|
},
|
||||||
|
"extends": "eslint:recommended",
|
||||||
"rules": {
|
"rules": {
|
||||||
"curly": "error",
|
"curly": "error",
|
||||||
"deprecation": true,
|
"deprecation": true,
|
||||||
|
@ -26,7 +30,23 @@
|
||||||
"alphabetize": true
|
"alphabetize": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"no-unused-vars": "off",
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"vars": "all",
|
||||||
|
"args": "after-used",
|
||||||
|
"ignoreRestSiblings": false
|
||||||
|
}
|
||||||
|
],
|
||||||
"prefer-for-of": true,
|
"prefer-for-of": true,
|
||||||
|
"semi": [
|
||||||
|
"error",
|
||||||
|
"always",
|
||||||
|
{
|
||||||
|
"omitLastInOneLineBlock": false
|
||||||
|
}
|
||||||
|
],
|
||||||
"static-this": true,
|
"static-this": true,
|
||||||
"triple-equals": true,
|
"triple-equals": true,
|
||||||
"typeof-compare": true,
|
"typeof-compare": true,
|
||||||
|
|
2
dist/lib/layout_de.js
vendored
2
dist/lib/layout_de.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}({2:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_de",function(){return l});var n={4:[8,9,10,11]},u={4:[1,2,3]},o={5:[1,2,3,4]},i={1:[8,9,10,11]},f={2:[1,2,3,4]},c={2:[5,6,7,8,9,10,11]},l={code:"de",hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}},letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},n],"20,21,22,23,24":[c,n],"25,26,27,28,29":[i,u,o],"30,31,32,33,34":o,"35,36,37,38,39":[i,n,o],"40,41,42,43,44":[c,u],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[f,u],"55,56,57,58,59":[i,u]},permanent:{1:[1,2,4,5,6]},prettyName:"Deutsch",version:2};$.fritteli.uhr.register(l)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}({2:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_de",function(){return l});var n={4:[8,9,10,11]},o={4:[1,2,3]},u={5:[1,2,3,4]},i={1:[8,9,10,11]},f={2:[1,2,3,4]},c={2:[5,6,7,8,9,10,11]},l={code:"de",hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}},letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},n],"20,21,22,23,24":[c,n],"25,26,27,28,29":[i,o,u],"30,31,32,33,34":u,"35,36,37,38,39":[i,n,u],"40,41,42,43,44":[c,o],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[f,o],"55,56,57,58,59":[i,o]},permanent:{1:[1,2,4,5,6]},prettyName:"Deutsch",version:2};$.fritteli.uhr.register(l)}});
|
||||||
//# sourceMappingURL=layout_de.js.map
|
//# sourceMappingURL=layout_de.js.map
|
2
dist/lib/layout_de.js.map
vendored
2
dist/lib/layout_de.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_de_ch.js
vendored
2
dist/lib/layout_de_ch.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=3)}({3:function(e,r,t){"use strict";t.r(r),t.d(r,"Layout_de_CH",function(){return a});var n={4:[1,2]},o={3:[9,10,11]},u={4:[4,5,6,7,8]},i={1:[9,10,11]},f={2:[9,10,11]},c={2:[1,2,3,4,5,6]},l={3:[1,2,3,4,5,6]},a={code:"de_CH",hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}},letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],minutes:{"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[c,n],"20,21,22,23,24":[l,n],"25,26,27,28,29":[i,o,u],"30,31,32,33,34":u,"35,36,37,38,39":[i,n,u],"40,41,42,43,44":[l,o],"45,46,47,48,49":[c,o],"50,51,52,53,54":[f,o],"55,56,57,58,59":[i,o]},permanent:{1:[1,2,4,5,6,7]},prettyName:"Bärndütsch",version:2};$.fritteli.uhr.register(a)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}({3:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_de_CH",function(){return a});var n={4:[1,2]},o={3:[9,10,11]},u={4:[4,5,6,7,8]},i={1:[9,10,11]},f={2:[9,10,11]},c={2:[1,2,3,4,5,6]},l={3:[1,2,3,4,5,6]},a={code:"de_CH",hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}},letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],minutes:{"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[c,n],"20,21,22,23,24":[l,n],"25,26,27,28,29":[i,o,u],"30,31,32,33,34":u,"35,36,37,38,39":[i,n,u],"40,41,42,43,44":[l,o],"45,46,47,48,49":[c,o],"50,51,52,53,54":[f,o],"55,56,57,58,59":[i,o]},permanent:{1:[1,2,4,5,6,7]},prettyName:"Bärndütsch",version:2};$.fritteli.uhr.register(a)}});
|
||||||
//# sourceMappingURL=layout_de_ch.js.map
|
//# sourceMappingURL=layout_de_ch.js.map
|
2
dist/lib/layout_de_ch.js.map
vendored
2
dist/lib/layout_de_ch.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_de_ch_genau.js
vendored
2
dist/lib/layout_de_ch_genau.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var r={};function t(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var u in e)t.d(n,u,function(r){return e[r]}.bind(null,u));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=4)}({4:function(e,r,t){"use strict";t.r(r),t.d(r,"Layout_de_CH_genau",function(){return l});var n={4:[4,5]},u={4:[1,2,3]},o={4:[7,8,9,10,11]},i={1:[9,10,11]},f={2:[9,10,11]},a={2:[1,2,3,4,5,6]},c={3:[1,2,3,4,5,6]},l={code:"de_CH_genau",hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}},letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[a,n],"20,21,22,23,24":[c,n],"25,26,27,28,29":[i,u,o],"30,31,32,33,34":o,"35,36,37,38,39":[i,n,o],"40,41,42,43,44":[c,u],"45,46,47,48,49":[a,u],"50,51,52,53,54":[f,u],"55,56,57,58,59":[i,u]},permanent:{1:[1,2,4,5,6,7]},prettyName:"Bärndütsch (genau)",version:2};$.fritteli.uhr.register(l)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_de_CH_genau",function(){return l});var n={4:[4,5]},u={4:[1,2,3]},o={4:[7,8,9,10,11]},i={1:[9,10,11]},f={2:[9,10,11]},a={2:[1,2,3,4,5,6]},c={3:[1,2,3,4,5,6]},l={code:"de_CH_genau",hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}},letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[a,n],"20,21,22,23,24":[c,n],"25,26,27,28,29":[i,u,o],"30,31,32,33,34":o,"35,36,37,38,39":[i,n,o],"40,41,42,43,44":[c,u],"45,46,47,48,49":[a,u],"50,51,52,53,54":[f,u],"55,56,57,58,59":[i,u]},permanent:{1:[1,2,4,5,6,7]},prettyName:"Bärndütsch (genau)",version:2};$.fritteli.uhr.register(l)}});
|
||||||
//# sourceMappingURL=layout_de_ch_genau.js.map
|
//# sourceMappingURL=layout_de_ch_genau.js.map
|
2
dist/lib/layout_de_ch_genau.js.map
vendored
2
dist/lib/layout_de_ch_genau.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_dk.js
vendored
2
dist/lib/layout_dk.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=5)}({5:function(e,r,t){"use strict";t.r(r),t.d(r,"Layout_dk",function(){return d});var n={4:[4,5,6,7,8,9,10,11]},o={5:[8]},u={5:[4,5,6,7]},i={2:[1,2,3]},f={4:[1,2]},l={3:[4,5,6,7,8]},a={2:[4,5,6,7]},c={6:[8,9,10,11]},d={code:"dk",hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],minutes:{"5,6,7,8,9":[i,n,u],"10,11,12,13,14":[f,n,u],"15,16,17,18,19":[l,u],"20,21,22,23,24":[a,n,u],"25,26,27,28,29":[i,n,o,c],"30,31,32,33,34":[c],"35,36,37,38,39":[i,n,u,c],"40,41,42,43,44":[a,n,o],"45,46,47,48,49":[l,o],"50,51,52,53,54":[f,n,o],"55,56,57,58,59":[i,n,o]},permanent:{1:[1,2,3,4,5,6,7,9,10]},prettyName:"Dansk",version:2};$.fritteli.uhr.register(d)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}({5:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_dk",function(){return d});var n={4:[4,5,6,7,8,9,10,11]},o={5:[8]},u={5:[4,5,6,7]},i={2:[1,2,3]},f={4:[1,2]},l={3:[4,5,6,7,8]},c={2:[4,5,6,7]},a={6:[8,9,10,11]},d={code:"dk",hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],minutes:{"5,6,7,8,9":[i,n,u],"10,11,12,13,14":[f,n,u],"15,16,17,18,19":[l,u],"20,21,22,23,24":[c,n,u],"25,26,27,28,29":[i,n,o,a],"30,31,32,33,34":[a],"35,36,37,38,39":[i,n,u,a],"40,41,42,43,44":[c,n,o],"45,46,47,48,49":[l,o],"50,51,52,53,54":[f,n,o],"55,56,57,58,59":[i,n,o]},permanent:{1:[1,2,3,4,5,6,7,9,10]},prettyName:"Dansk",version:2};$.fritteli.uhr.register(d)}});
|
||||||
//# sourceMappingURL=layout_dk.js.map
|
//# sourceMappingURL=layout_dk.js.map
|
2
dist/lib/layout_dk.js.map
vendored
2
dist/lib/layout_dk.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_en.js
vendored
2
dist/lib/layout_en.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}({6:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_en",function(){return a});var n={4:[10,11]},u={5:[1,2,3,4]},o={3:[7,8,9,10]},i={4:[6,7,8]},f={2:[1,3,4,5,6,7,8,9]},l={3:[1,2,3,4,5,6]},c={3:[1,2,3,4,5,6,7,8,9,10]},a={code:"en",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[o,u],"10,11,12,13,14":[i,u],"15,16,17,18,19":[f,u],"20,21,22,23,24":[l,u],"25,26,27,28,29":[c,u],"30,31,32,33,34":[{4:[1,2,3,4]},u],"35,36,37,38,39":[c,n],"40,41,42,43,44":[l,n],"45,46,47,48,49":[f,n],"50,51,52,53,54":[i,n],"55,56,57,58,59":[o,n]},permanent:{1:[1,2,4,5]},prettyName:"English",version:2};$.fritteli.uhr.register(a)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}({6:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_en",function(){return a});var n={4:[10,11]},o={5:[1,2,3,4]},u={3:[7,8,9,10]},i={4:[6,7,8]},f={2:[1,3,4,5,6,7,8,9]},l={3:[1,2,3,4,5,6]},c={3:[1,2,3,4,5,6,7,8,9,10]},a={code:"en",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[u,o],"10,11,12,13,14":[i,o],"15,16,17,18,19":[f,o],"20,21,22,23,24":[l,o],"25,26,27,28,29":[c,o],"30,31,32,33,34":[{4:[1,2,3,4]},o],"35,36,37,38,39":[c,n],"40,41,42,43,44":[l,n],"45,46,47,48,49":[f,n],"50,51,52,53,54":[i,n],"55,56,57,58,59":[u,n]},permanent:{1:[1,2,4,5]},prettyName:"English",version:2};$.fritteli.uhr.register(a)}});
|
||||||
//# sourceMappingURL=layout_en.js.map
|
//# sourceMappingURL=layout_en.js.map
|
2
dist/lib/layout_en.js.map
vendored
2
dist/lib/layout_en.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_es.js
vendored
2
dist/lib/layout_es.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}({7:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_es",function(){return s});var n={1:[2,3,4,6,7,8]},u={7:[6]},o={7:[7,8,9,10,11]},i={9:[7,8,9,10,11]},f={8:[8,9,10,11]},l={10:[6,7,8,9,10,11]},a={8:[2,3,4,5,6,7]},c={9:[1,2,3,4,5,6,7,8,9,10,11]},s={code:"es",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":[n,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[n,{2:[1,2,3]}],"3,15":[n,{2:[5,6,7,8]}],"4,16":[n,{3:[1,2,3,4,5,6]}],"5,17":[n,{3:[7,8,9,10,11]}],"6,18":[n,{4:[1,2,3,4]}],"7,19":[n,{4:[6,7,8,9,10]}],"8,20":[n,{5:[1,2,3,4]}],"9,21":[n,{5:[5,6,7,8,9]}],"10,22":[n,{6:[3,4,5,6]}],"11,23":[n,{6:[8,9,10,11]}]},letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],minutes:{"5,6,7,8,9":[u,i],"10,11,12,13,14":[u,f],"15,16,17,18,19":[u,l],"20,21,22,23,24":[u,a],"25,26,27,28,29":[u,c],"30,31,32,33,34":[u,{10:[1,2,3,4,5]}],"35,36,37,38,39":[o,c],"40,41,42,43,44":[o,a],"45,46,47,48,49":[o,l],"50,51,52,53,54":[o,f],"55,56,57,58,59":[o,i]},permanent:null,prettyName:"Español",version:2};$.fritteli.uhr.register(s)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}({7:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_es",function(){return s});var n={1:[2,3,4,6,7,8]},o={7:[6]},u={7:[7,8,9,10,11]},i={9:[7,8,9,10,11]},f={8:[8,9,10,11]},l={10:[6,7,8,9,10,11]},c={8:[2,3,4,5,6,7]},a={9:[1,2,3,4,5,6,7,8,9,10,11]},s={code:"es",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":[n,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[n,{2:[1,2,3]}],"3,15":[n,{2:[5,6,7,8]}],"4,16":[n,{3:[1,2,3,4,5,6]}],"5,17":[n,{3:[7,8,9,10,11]}],"6,18":[n,{4:[1,2,3,4]}],"7,19":[n,{4:[6,7,8,9,10]}],"8,20":[n,{5:[1,2,3,4]}],"9,21":[n,{5:[5,6,7,8,9]}],"10,22":[n,{6:[3,4,5,6]}],"11,23":[n,{6:[8,9,10,11]}]},letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],minutes:{"5,6,7,8,9":[o,i],"10,11,12,13,14":[o,f],"15,16,17,18,19":[o,l],"20,21,22,23,24":[o,c],"25,26,27,28,29":[o,a],"30,31,32,33,34":[o,{10:[1,2,3,4,5]}],"35,36,37,38,39":[u,a],"40,41,42,43,44":[u,c],"45,46,47,48,49":[u,l],"50,51,52,53,54":[u,f],"55,56,57,58,59":[u,i]},permanent:null,prettyName:"Español",version:2};$.fritteli.uhr.register(s)}});
|
||||||
//# sourceMappingURL=layout_es.js.map
|
//# sourceMappingURL=layout_es.js.map
|
2
dist/lib/layout_es.js.map
vendored
2
dist/lib/layout_es.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_fr.js
vendored
2
dist/lib/layout_fr.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var r={};function t(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var u in e)t.d(n,u,function(r){return e[r]}.bind(null,u));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=8)}({8:function(e,r,t){"use strict";t.r(r),t.d(r,"Layout_fr",function(){return s});var n={8:[1,2]},u={7:[1,2,3,4,5]},o={6:[6,7,8,9,10,11]},i={9:[7,8,9,10]},f={7:[9,10,11]},a={8:[4,5,6,7,8]},c={9:[1,2,3,4,5]},l={9:[1,2,3,4,5,6,7,8,9,10]},s={code:"fr",getHour:function(e){var r=e.getHours();return e.getMinutes()>=35?(r+1)%24:r},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},o],"2,14":[{1:[8,9,10,11]},o],"3,15":[{2:[7,8,9,10,11]},o],"4,16":[{2:[1,2,3,4,5,6]},o],"5,17":[{4:[8,9,10,11]},o],"6,18":[{4:[5,6,7]},o],"7,19":[{3:[8,9,10,11]},o],"8,20":[{4:[1,2,3,4]},o],"9,21":[{3:[1,2,3,4]},o],"10,22":[{5:[3,4,5]},o],"11,23":[{6:[1,2,3,4]},o],12:{5:[1,2,3,4]}},letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],minutes:{"5,6,7,8,9":i,"10,11,12,13,14":f,"15,16,17,18,19":[n,a],"20,21,22,23,24":c,"25,26,27,28,29":l,"30,31,32,33,34":[n,{10:[4,5,6,7,8]}],"35,36,37,38,39":[u,l],"40,41,42,43,44":[u,c],"45,46,47,48,49":[u,{7:[7,8]},a],"50,51,52,53,54":[u,f],"55,56,57,58,59":[u,i]},permanent:{1:[1,2,4,5,6]},prettyName:"Français",version:2};$.fritteli.uhr.register(s)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8)}({8:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_fr",function(){return s});var n={8:[1,2]},o={7:[1,2,3,4,5]},u={6:[6,7,8,9,10,11]},i={9:[7,8,9,10]},f={7:[9,10,11]},a={8:[4,5,6,7,8]},c={9:[1,2,3,4,5]},l={9:[1,2,3,4,5,6,7,8,9,10]},s={code:"fr",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},u],"2,14":[{1:[8,9,10,11]},u],"3,15":[{2:[7,8,9,10,11]},u],"4,16":[{2:[1,2,3,4,5,6]},u],"5,17":[{4:[8,9,10,11]},u],"6,18":[{4:[5,6,7]},u],"7,19":[{3:[8,9,10,11]},u],"8,20":[{4:[1,2,3,4]},u],"9,21":[{3:[1,2,3,4]},u],"10,22":[{5:[3,4,5]},u],"11,23":[{6:[1,2,3,4]},u],12:{5:[1,2,3,4]}},letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],minutes:{"5,6,7,8,9":i,"10,11,12,13,14":f,"15,16,17,18,19":[n,a],"20,21,22,23,24":c,"25,26,27,28,29":l,"30,31,32,33,34":[n,{10:[4,5,6,7,8]}],"35,36,37,38,39":[o,l],"40,41,42,43,44":[o,c],"45,46,47,48,49":[o,{7:[7,8]},a],"50,51,52,53,54":[o,f],"55,56,57,58,59":[o,i]},permanent:{1:[1,2,4,5,6]},prettyName:"Français",version:2};$.fritteli.uhr.register(s)}});
|
||||||
//# sourceMappingURL=layout_fr.js.map
|
//# sourceMappingURL=layout_fr.js.map
|
2
dist/lib/layout_fr.js.map
vendored
2
dist/lib/layout_fr.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_it.js
vendored
2
dist/lib/layout_it.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}({9:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_it",function(){return s});var n={1:[1,2,3,4,6,7]},u={8:[1]},o={7:[8,9,10,11]},i={9:[6,7,8,9,10,11]},f={10:[1,2,3,4,5]},l={8:[3,4,6,7,8,9,10,11]},a={9:[1,2,3,4,5]},c={9:[1,2,3,4,5,6,7,8,9,10,11]},s={code:"it",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":[n,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[n,{2:[9,10,11]}],"3,15":[n,{3:[1,2,3]}],"4,16":[n,{6:[1,2,3,4,5,6,7]}],"5,17":[n,{7:[1,2,3,4,5,6]}],"6,18":[n,{6:[9,10,11]}],"7,19":[n,{5:[7,8,9,10,11]}],"8,20":[n,{3:[4,5,6,7]}],"9,21":[n,{3:[8,9,10,11]}],"10,22":[n,{4:[1,2,3,4,5]}],"11,23":[n,{4:[6,7,8,9,10,11]}]},letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],minutes:{"5,6,7,8,9":[u,i],"10,11,12,13,14":[u,f],"15,16,17,18,19":[u,l],"20,21,22,23,24":[u,a],"25,26,27,28,29":[u,c],"30,31,32,33,34":[u,{10:[7,8,9,10,11]}],"35,36,37,38,39":[o,c],"40,41,42,43,44":[o,a],"45,46,47,48,49":[o,l],"50,51,52,53,54":[o,f],"55,56,57,58,59":[o,i]},permanent:null,prettyName:"Italiano",version:2};$.fritteli.uhr.register(s)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}({9:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_it",function(){return s});var n={1:[1,2,3,4,6,7]},o={8:[1]},u={7:[8,9,10,11]},i={9:[6,7,8,9,10,11]},f={10:[1,2,3,4,5]},l={8:[3,4,6,7,8,9,10,11]},a={9:[1,2,3,4,5]},c={9:[1,2,3,4,5,6,7,8,9,10,11]},s={code:"it",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{"0,12":[n,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[n,{2:[9,10,11]}],"3,15":[n,{3:[1,2,3]}],"4,16":[n,{6:[1,2,3,4,5,6,7]}],"5,17":[n,{7:[1,2,3,4,5,6]}],"6,18":[n,{6:[9,10,11]}],"7,19":[n,{5:[7,8,9,10,11]}],"8,20":[n,{3:[4,5,6,7]}],"9,21":[n,{3:[8,9,10,11]}],"10,22":[n,{4:[1,2,3,4,5]}],"11,23":[n,{4:[6,7,8,9,10,11]}]},letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],minutes:{"5,6,7,8,9":[o,i],"10,11,12,13,14":[o,f],"15,16,17,18,19":[o,l],"20,21,22,23,24":[o,a],"25,26,27,28,29":[o,c],"30,31,32,33,34":[o,{10:[7,8,9,10,11]}],"35,36,37,38,39":[u,c],"40,41,42,43,44":[u,a],"45,46,47,48,49":[u,l],"50,51,52,53,54":[u,f],"55,56,57,58,59":[u,i]},permanent:null,prettyName:"Italiano",version:2};$.fritteli.uhr.register(s)}});
|
||||||
//# sourceMappingURL=layout_it.js.map
|
//# sourceMappingURL=layout_it.js.map
|
2
dist/lib/layout_it.js.map
vendored
2
dist/lib/layout_it.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_nl.js
vendored
2
dist/lib/layout_nl.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var r={};function t(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var u in e)t.d(n,u,function(r){return e[r]}.bind(null,u));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=10)}({10:function(e,r,t){"use strict";t.r(r),t.d(r,"Layout_nl",function(){return a});var n={3:[1,2,3,4]},u={2:[8,9,10,11]},o={4:[1,2,3,4]},i={1:[8,9,10,11]},f={2:[1,2,3,4]},l={3:[7,8,9,10,11]},a={code:"nl",getHour:function(e){var r=e.getHours();return e.getMinutes()>=20?(r+1)%24:r},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[l,{4:[8,9,10,11]}],"20,21,22,23,24":[f,u,o],"25,26,27,28,29":[i,u,o],"30,31,32,33,34":o,"35,36,37,38,39":[i,n,o],"40,41,42,43,44":[f,n,o],"45,46,47,48,49":[l,{5:[1,2,3,4]}],"50,51,52,53,54":[f,u],"55,56,57,58,59":[i,u]},permanent:{1:[1,2,3,5,6]},prettyName:"Nederlands",version:2};$.fritteli.uhr.register(a)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}({10:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_nl",function(){return c});var n={3:[1,2,3,4]},o={2:[8,9,10,11]},u={4:[1,2,3,4]},i={1:[8,9,10,11]},f={2:[1,2,3,4]},l={3:[7,8,9,10,11]},c={code:"nl",getHour:function(e){var t=e.getHours();return e.getMinutes()>=20?(t+1)%24:t},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[i,n],"10,11,12,13,14":[f,n],"15,16,17,18,19":[l,{4:[8,9,10,11]}],"20,21,22,23,24":[f,o,u],"25,26,27,28,29":[i,o,u],"30,31,32,33,34":u,"35,36,37,38,39":[i,n,u],"40,41,42,43,44":[f,n,u],"45,46,47,48,49":[l,{5:[1,2,3,4]}],"50,51,52,53,54":[f,o],"55,56,57,58,59":[i,o]},permanent:{1:[1,2,3,5,6]},prettyName:"Nederlands",version:2};$.fritteli.uhr.register(c)}});
|
||||||
//# sourceMappingURL=layout_nl.js.map
|
//# sourceMappingURL=layout_nl.js.map
|
2
dist/lib/layout_nl.js.map
vendored
2
dist/lib/layout_nl.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/layout_pt.js
vendored
2
dist/lib/layout_pt.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
var uhr=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}({11:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_pt",function(){return p});var n={1:[1]},u={1:[2,3,4]},o={7:[8]},i={10:[5]},f={7:[7,8,9,10,11]},l={10:[7,8,9,10,11]},c={10:[1,2,3]},a={9:[1,2,4,5,6,7,8,9]},s={8:[1,2,3,4,5]},p={code:"pt",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{0:[n,{6:[2,3,4,5,7,8,9,10,11]}],12:[n,{2:[1,2,3,4,6,7,8]}],"1,13":[n,{1:[5,6,7]}],"2,14":[u,{3:[1,2,3,4]}],"3,15":[u,{1:[8,9,10,11]}],"4,16":[u,{4:[1,2,3,4,5,6]}],"5,17":[u,{5:[1,2,3,4,5]}],"6,18":[u,{3:[4,5,6,7]}],"7,19":[u,{3:[7,8,9,10]}],"8,20":[u,{5:[5,6,7,8]}],"9,21":[u,{4:[8,9,10,11]}],"10,22":[u,{2:[9,10,11]}],"11,23":[u,{5:[8,9,10,11]}]},letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[o,l],"10,11,12,13,14":[o,c],"15,16,17,18,19":[o,a],"20,21,22,23,24":[o,s],"25,26,27,28,29":[o,s,i,l],"30,31,32,33,34":[o,{8:[8,9,10,11]}],"35,36,37,38,39":[f,s,i,l],"40,41,42,43,44":[f,s],"45,46,47,48,49":[f,a],"50,51,52,53,54":[f,c],"55,56,57,58,59":[f,l]},permanent:null,prettyName:"Português",version:2};$.fritteli.uhr.register(p)}});
|
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}({11:function(e,t,r){"use strict";r.r(t),r.d(t,"Layout_pt",function(){return p});var n={1:[1]},u={1:[2,3,4]},o={7:[8]},i={10:[5]},f={7:[7,8,9,10,11]},l={10:[7,8,9,10,11]},c={10:[1,2,3]},a={9:[1,2,4,5,6,7,8,9]},s={8:[1,2,3,4,5]},p={code:"pt",getHour:function(e){var t=e.getHours();return e.getMinutes()>=35?(t+1)%24:t},hours:{0:[n,{6:[2,3,4,5,7,8,9,10,11]}],12:[n,{2:[1,2,3,4,6,7,8]}],"1,13":[n,{1:[5,6,7]}],"2,14":[u,{3:[1,2,3,4]}],"3,15":[u,{1:[8,9,10,11]}],"4,16":[u,{4:[1,2,3,4,5,6]}],"5,17":[u,{5:[1,2,3,4,5]}],"6,18":[u,{3:[4,5,6,7]}],"7,19":[u,{3:[7,8,9,10]}],"8,20":[u,{5:[5,6,7,8]}],"9,21":[u,{4:[8,9,10,11]}],"10,22":[u,{2:[9,10,11]}],"11,23":[u,{5:[8,9,10,11]}]},letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[o,l],"10,11,12,13,14":[o,c],"15,16,17,18,19":[o,a],"20,21,22,23,24":[o,s],"25,26,27,28,29":[o,s,i,l],"30,31,32,33,34":[o,{8:[8,9,10,11]}],"35,36,37,38,39":[f,s,i,l],"40,41,42,43,44":[f,s],"45,46,47,48,49":[f,a],"50,51,52,53,54":[f,c],"55,56,57,58,59":[f,l]},permanent:null,prettyName:"Português",version:2};$.fritteli.uhr.register(p)}});
|
||||||
//# sourceMappingURL=layout_pt.js.map
|
//# sourceMappingURL=layout_pt.js.map
|
2
dist/lib/layout_pt.js.map
vendored
2
dist/lib/layout_pt.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/uhr.bundle.js
vendored
2
dist/lib/uhr.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/uhr.bundle.js.map
vendored
2
dist/lib/uhr.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/uhr.js
vendored
2
dist/lib/uhr.js
vendored
File diff suppressed because one or more lines are too long
2
dist/lib/uhr.js.map
vendored
2
dist/lib/uhr.js.map
vendored
File diff suppressed because one or more lines are too long
29
package-lock.json
generated
29
package-lock.json
generated
|
@ -83,6 +83,20 @@
|
||||||
"integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==",
|
"integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@typescript-eslint/eslint-plugin": {
|
||||||
|
"version": "1.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.7.0.tgz",
|
||||||
|
"integrity": "sha512-NUSz1aTlIzzTjFFVFyzrbo8oFjHg3K/M9MzYByqbMCxeFdErhLAcGITVfXzSz+Yvp5OOpMu3HkIttB0NyKl54Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@typescript-eslint/parser": "1.7.0",
|
||||||
|
"@typescript-eslint/typescript-estree": "1.7.0",
|
||||||
|
"eslint-utils": "^1.3.1",
|
||||||
|
"regexpp": "^2.0.1",
|
||||||
|
"requireindex": "^1.2.0",
|
||||||
|
"tsutils": "^3.7.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "1.7.0",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.7.0.tgz",
|
||||||
|
@ -6074,6 +6088,12 @@
|
||||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"requireindex": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"requires-port": {
|
"requires-port": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||||
|
@ -7392,6 +7412,15 @@
|
||||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
|
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"tsutils": {
|
||||||
|
"version": "3.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.10.0.tgz",
|
||||||
|
"integrity": "sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tty-browserify": {
|
"tty-browserify": {
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --open --config webpack.dev.js",
|
"start": "webpack-dev-server --open --config webpack.dev.js",
|
||||||
|
"lint": "eslint --ext .ts src/",
|
||||||
"build": "webpack --mode development --env development --config webpack.dev.js",
|
"build": "webpack --mode development --env development --config webpack.dev.js",
|
||||||
"build:prod": "webpack -p --mode production --env production --config webpack.prod.js"
|
"build:prod": "webpack -p --mode production --env production --config webpack.prod.js"
|
||||||
},
|
},
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
"@types/jquery": "3.3.29",
|
"@types/jquery": "3.3.29",
|
||||||
"@types/jqueryui": "1.12.7",
|
"@types/jqueryui": "1.12.7",
|
||||||
"@types/js-cookie": "2.2.2",
|
"@types/js-cookie": "2.2.2",
|
||||||
|
"@typescript-eslint/eslint-plugin": "1.7.0",
|
||||||
"@typescript-eslint/parser": "1.7.0",
|
"@typescript-eslint/parser": "1.7.0",
|
||||||
"chai": "4.2.0",
|
"chai": "4.2.0",
|
||||||
"clean-webpack-plugin": "2.0.2",
|
"clean-webpack-plugin": "2.0.2",
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
/*!
|
|
||||||
* Copyright (C) Schweizerische Bundesbahnen SBB, 2019.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
82
src/cookie-handler.ts
Normal file
82
src/cookie-handler.ts
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as Cookies from 'js-cookie';
|
||||||
|
|
||||||
|
export class CookieHandler {
|
||||||
|
constructor(private widgetId: string, private cookiePath?: string) {
|
||||||
|
}
|
||||||
|
|
||||||
|
getLayout(): string {
|
||||||
|
const oldCookie = this.getCookie('uhr-language');
|
||||||
|
if (!!oldCookie) {
|
||||||
|
// aha, old cookie is set. migrate to new one!
|
||||||
|
this.removeCookie('uhr-language');
|
||||||
|
this.setLayout(oldCookie);
|
||||||
|
}
|
||||||
|
return this.getCookie('uhr-layout');
|
||||||
|
}
|
||||||
|
|
||||||
|
setLayout(layout: string): void {
|
||||||
|
this.setCookie('uhr-layout', layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
getMode(): string {
|
||||||
|
return this.getCookie('uhr-mode');
|
||||||
|
}
|
||||||
|
|
||||||
|
setMode(mode: string): void {
|
||||||
|
this.setCookie('uhr-mode', mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getStatus(): string {
|
||||||
|
return this.getCookie('uhr-status');
|
||||||
|
}
|
||||||
|
|
||||||
|
setStatus(status: string): void {
|
||||||
|
this.setCookie('uhr-status', status);
|
||||||
|
}
|
||||||
|
|
||||||
|
getTheme(): string {
|
||||||
|
return this.getCookie('uhr-theme');
|
||||||
|
}
|
||||||
|
|
||||||
|
setTheme(theme: string): void {
|
||||||
|
this.setCookie('uhr-theme', theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
private getCookie(cookieName: string): string {
|
||||||
|
return Cookies.get(cookieName + this.widgetId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private setCookie(cookieName: string, cookieValue: string): void {
|
||||||
|
let options;
|
||||||
|
if (!!this.cookiePath) {
|
||||||
|
options = {expires: 365, path: this.cookiePath};
|
||||||
|
} else {
|
||||||
|
options = {expires: 365};
|
||||||
|
}
|
||||||
|
Cookies.set(cookieName + this.widgetId, cookieValue, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
private removeCookie(cookieName: string): void {
|
||||||
|
if (!!this.cookiePath) {
|
||||||
|
Cookies.remove(cookieName + this.widgetId, {path: this.cookiePath});
|
||||||
|
} else {
|
||||||
|
Cookies.remove(cookieName + this.widgetId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,7 +22,7 @@ export class Globals {
|
||||||
|
|
||||||
static registerTheme(name: string, styleClass: string): void {
|
static registerTheme(name: string, styleClass: string): void {
|
||||||
if (Globals.themes.some(value => value.name === name)) {
|
if (Globals.themes.some(value => value.name === name)) {
|
||||||
console.log(`Theme with name '${name}' already registered; ignoring register request for styleClass '${styleClass}'.`)
|
console.log(`Theme with name '${name}' already registered; ignoring register request for styleClass '${styleClass}'.`);
|
||||||
} else {
|
} else {
|
||||||
Globals.themes.push({
|
Globals.themes.push({
|
||||||
name,
|
name,
|
||||||
|
|
|
@ -44,7 +44,7 @@ $.widget('fritteli.uhr', {
|
||||||
this.__fritteli_uhr_instance.toggle();
|
this.__fritteli_uhr_instance.toggle();
|
||||||
},
|
},
|
||||||
language: function (key: string) {
|
language: function (key: string) {
|
||||||
this.__fritteli_uhr_instance.setLanguage(key);
|
this.__fritteli_uhr_instance.setLayout(key);
|
||||||
},
|
},
|
||||||
theme: function (styleClass: string) {
|
theme: function (styleClass: string) {
|
||||||
this.__fritteli_uhr_instance.setTheme(styleClass);
|
this.__fritteli_uhr_instance.setTheme(styleClass);
|
||||||
|
|
207
src/uhr-renderer.ts
Normal file
207
src/uhr-renderer.ts
Normal file
|
@ -0,0 +1,207 @@
|
||||||
|
/*
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {CookieHandler} from './cookie-handler';
|
||||||
|
import {Globals} from './domain/globals';
|
||||||
|
import {Options} from './widget/options';
|
||||||
|
import {Uhr} from './uhr';
|
||||||
|
|
||||||
|
export class UhrRenderer {
|
||||||
|
private cookieHandler: CookieHandler;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private uhr: Uhr,
|
||||||
|
private $element: JQuery<HTMLElement>,
|
||||||
|
private options: Options,
|
||||||
|
private id: string
|
||||||
|
) {
|
||||||
|
this.cookieHandler = new CookieHandler(id, options.cookiePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public render(): void {
|
||||||
|
this.setupHTML();
|
||||||
|
this.wireFunctionality();
|
||||||
|
}
|
||||||
|
|
||||||
|
public setWidth(width: string): void {
|
||||||
|
this.$element.css('width', width);
|
||||||
|
const realWidth: number = this.$element.width();
|
||||||
|
this.$element.width(realWidth);
|
||||||
|
this.$element.height(realWidth);
|
||||||
|
this.$element.css('font-size', (realWidth / 40) + 'px');
|
||||||
|
}
|
||||||
|
|
||||||
|
private setupHTML(): void {
|
||||||
|
// Base clock area
|
||||||
|
this.$element.addClass('uhr')
|
||||||
|
.empty()
|
||||||
|
.append('<span class="item dot dot1"></span>')
|
||||||
|
.append('<span class="item dot dot2"></span>')
|
||||||
|
.append('<span class="item dot dot3"></span>')
|
||||||
|
.append('<span class="item dot dot4"></span>')
|
||||||
|
.append('<div class="letterarea"></div>')
|
||||||
|
.append('<div class="reflection"></div>');
|
||||||
|
|
||||||
|
this.setWidth(this.options.width);
|
||||||
|
|
||||||
|
if (this.options.controls) {
|
||||||
|
const controlpanel = $(`<div class="uhr-controlpanel" id="uhr-controlpanel${this.id}"></div>`);
|
||||||
|
const content = $('<div class="content"></div>');
|
||||||
|
controlpanel.append(content);
|
||||||
|
// on/off switch
|
||||||
|
const toggleSwitch = $(`<div class="onoffswitch" id="uhr-onoffswitch${this.id}"></div>`);
|
||||||
|
toggleSwitch.append(`<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox${this.id}" checked="checked" />`);
|
||||||
|
toggleSwitch.append(`<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox${this.id}"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>`);
|
||||||
|
content.append(toggleSwitch);
|
||||||
|
|
||||||
|
// time mode switch
|
||||||
|
const modeSwitch = $(`<div class="onoffswitch" id="uhr-modeswitch${this.id}"></div>`);
|
||||||
|
modeSwitch.append(`<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox${this.id}" checked="checked" />`);
|
||||||
|
modeSwitch.append(`<label class="onoffswitch-label" for="uhr-modeswitch-checkbox${this.id}"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>`);
|
||||||
|
content.append(modeSwitch);
|
||||||
|
// language chooser
|
||||||
|
if (Globals.hasMultipleLayouts()) {
|
||||||
|
const languageChooser = $(`<select id="uhr-languagechooser${this.id}"></select>`);
|
||||||
|
Globals.getLayouts().forEach(layout => {
|
||||||
|
languageChooser.append(`<option value="${layout.code}">${layout.prettyName}</option>`);
|
||||||
|
});
|
||||||
|
content.append(languageChooser);
|
||||||
|
}
|
||||||
|
|
||||||
|
// theme chooser
|
||||||
|
if (Globals.hasMultipleThemes()) {
|
||||||
|
const themeChooser = $(`<select id="uhr-themechooser${this.id}"></select>`);
|
||||||
|
Globals.getThemes().forEach(theme => {
|
||||||
|
themeChooser.append(`<option value="${theme.styleClass}">${theme.name}</option>`);
|
||||||
|
});
|
||||||
|
content.append(themeChooser);
|
||||||
|
}
|
||||||
|
const closebutton: JQuery<HTMLElement> = $(`<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel${this.id}"></a>`);
|
||||||
|
closebutton.on({click: () => $(`#uhr-controlpanel${this.id}`).hide('fast')});
|
||||||
|
content.append(closebutton);
|
||||||
|
this.$element.after(controlpanel);
|
||||||
|
controlpanel.hide();
|
||||||
|
const configlink: JQuery<HTMLElement> = $(`<a class="uhr-configlink" id="uhr-configlink${this.id}"></a>`);
|
||||||
|
configlink.on({click: () => this.toggleConfigScreen()});
|
||||||
|
this.$element.after(configlink);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private wireFunctionality(): void {
|
||||||
|
// on/off switch
|
||||||
|
const toggleSwitch: JQuery<HTMLElement> = $(`#uhr-onoffswitch-checkbox${this.id}`);
|
||||||
|
toggleSwitch.on({click: () => this.uhr.toggle()});
|
||||||
|
let status = this.cookieHandler.getStatus();
|
||||||
|
if (status === undefined || this.options.force) {
|
||||||
|
status = this.options.status;
|
||||||
|
}
|
||||||
|
toggleSwitch.prop('checked', status === 'on');
|
||||||
|
if (status === 'on') {
|
||||||
|
this.uhr.start();
|
||||||
|
} else {
|
||||||
|
this.uhr.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
// time mode switch
|
||||||
|
const modeSwitch: JQuery<HTMLElement> = $(`#uhr-modeswitch-checkbox${this.id}`);
|
||||||
|
modeSwitch.on({
|
||||||
|
click: () => {
|
||||||
|
if (this.options.mode === 'seconds') {
|
||||||
|
this.uhr.setMode('normal');
|
||||||
|
} else {
|
||||||
|
this.uhr.setMode('seconds');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let mode = this.cookieHandler.getMode();
|
||||||
|
if (mode === undefined || this.options.force) {
|
||||||
|
mode = this.options.mode;
|
||||||
|
}
|
||||||
|
modeSwitch.prop('checked', mode !== 'seconds');
|
||||||
|
if (mode === 'seconds') {
|
||||||
|
this.uhr.setMode('seconds');
|
||||||
|
} else {
|
||||||
|
this.uhr.setMode('normal');
|
||||||
|
}
|
||||||
|
|
||||||
|
// language chooser
|
||||||
|
const languageChooser: JQuery<HTMLElement> = $(`#uhr-languagechooser${this.id}`);
|
||||||
|
languageChooser.on({
|
||||||
|
change: () => {
|
||||||
|
const languageKey = $(`#uhr-languagechooser${this.id}`).val() as string;
|
||||||
|
this.uhr.setLayout(languageKey);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let selectedLayout = this.cookieHandler.getLayout();
|
||||||
|
if (selectedLayout === undefined || this.options.force) {
|
||||||
|
selectedLayout = this.options.language;
|
||||||
|
}
|
||||||
|
let found = Globals.getLayouts().some(item => selectedLayout === item.code);
|
||||||
|
if (!found) {
|
||||||
|
let fallbackLanguage;
|
||||||
|
if (Globals.hasLayouts()) {
|
||||||
|
fallbackLanguage = Globals.getFirstLayout().code;
|
||||||
|
} else {
|
||||||
|
fallbackLanguage = '';
|
||||||
|
}
|
||||||
|
console.warn(`Language '${selectedLayout}' not found! Using fallback '${fallbackLanguage}'.`);
|
||||||
|
selectedLayout = fallbackLanguage;
|
||||||
|
}
|
||||||
|
languageChooser.val(selectedLayout);
|
||||||
|
this.options.language = '';
|
||||||
|
this.uhr.setLayout(selectedLayout);
|
||||||
|
|
||||||
|
// theme chooser
|
||||||
|
const themeChooser: JQuery<HTMLElement> = $(`#uhr-themechooser${this.id}`);
|
||||||
|
themeChooser.on({
|
||||||
|
change: () => {
|
||||||
|
const themeKey = $(`#uhr-themechooser${this.id}`).val() as string;
|
||||||
|
this.uhr.setTheme(themeKey);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let selectedTheme = this.cookieHandler.getTheme();
|
||||||
|
if (selectedTheme === undefined || this.options.force) {
|
||||||
|
selectedTheme = this.options.theme;
|
||||||
|
}
|
||||||
|
found = Globals.getThemes().some(item => selectedTheme === item.styleClass);
|
||||||
|
if (!found) {
|
||||||
|
const fallbackTheme = Globals.getFirstTheme().styleClass;
|
||||||
|
console.warn(`Theme '${selectedTheme}' not found! Using fallback '${fallbackTheme}'.`);
|
||||||
|
selectedTheme = fallbackTheme;
|
||||||
|
}
|
||||||
|
themeChooser.val(selectedTheme);
|
||||||
|
this.options.theme = '';
|
||||||
|
this.uhr.setTheme(selectedTheme);
|
||||||
|
if (this.options.autoresize) {
|
||||||
|
$(window).on({
|
||||||
|
resize: () => {
|
||||||
|
const $parent: JQuery<HTMLElement> = this.$element.parent();
|
||||||
|
const $window: JQuery<Window> = $(window);
|
||||||
|
const parentWidth: number = $parent.width();
|
||||||
|
const parentHeight: number = $parent.height();
|
||||||
|
const windowWidth: number = $window.width();
|
||||||
|
const windowHeight: number = $window.height();
|
||||||
|
const size: string = `${Math.min(parentWidth, parentHeight, windowWidth, windowHeight)}px`;
|
||||||
|
this.setWidth(size);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private toggleConfigScreen() {
|
||||||
|
$(`#uhr-controlpanel${this.id}`).toggle('fast');
|
||||||
|
};
|
||||||
|
}
|
218
src/uhr.ts
218
src/uhr.ts
|
@ -13,25 +13,29 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as Cookies from 'js-cookie';
|
|
||||||
import {EMPTY_LAYOUT, Layout} from './domain/layout';
|
import {EMPTY_LAYOUT, Layout} from './domain/layout';
|
||||||
|
import {CookieHandler} from './cookie-handler';
|
||||||
import {Globals} from './domain/globals';
|
import {Globals} from './domain/globals';
|
||||||
import {LayoutRenderer} from './layout-renderer';
|
import {LayoutRenderer} from './layout-renderer';
|
||||||
|
import {UhrRenderer} from './uhr-renderer';
|
||||||
import {WidgetPrototype} from './widget/widget-prototype';
|
import {WidgetPrototype} from './widget/widget-prototype';
|
||||||
|
|
||||||
export class Uhr {
|
export class Uhr {
|
||||||
|
|
||||||
private timer: number = null;
|
private timer: number = null;
|
||||||
private currentMinute: number = null;
|
private currentMinute: number = null;
|
||||||
|
private renderer: UhrRenderer;
|
||||||
|
private cookieHandler: CookieHandler;
|
||||||
|
|
||||||
constructor(private widgetInstance: WidgetPrototype) {
|
constructor(private widgetInstance: WidgetPrototype) {
|
||||||
const userTime = this.widgetInstance.options.time;
|
const userTime = this.widgetInstance.options.time;
|
||||||
if (this.widgetInstance.options.time === undefined) {
|
if (this.widgetInstance.options.time === undefined) {
|
||||||
this.widgetInstance.options.time = new Date();
|
this.widgetInstance.options.time = new Date();
|
||||||
}
|
}
|
||||||
|
this.cookieHandler = new CookieHandler(this.widgetInstance.uuid, this.widgetInstance.options.cookiePath);
|
||||||
this.parseHash();
|
this.parseHash();
|
||||||
this.setupHTML();
|
this.renderer = new UhrRenderer(this, this.widgetInstance.element, this.widgetInstance.options, this.widgetInstance.uuid);
|
||||||
this.wireFunctionality();
|
this.renderer.render();
|
||||||
if (userTime !== undefined) {
|
if (userTime !== undefined) {
|
||||||
this.setTime(userTime);
|
this.setTime(userTime);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +61,7 @@ export class Uhr {
|
||||||
this.update();
|
this.update();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
this.update();
|
this.update();
|
||||||
this.setCookie('uhr-status', 'on');
|
this.cookieHandler.setStatus('on');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +70,7 @@ export class Uhr {
|
||||||
window.clearInterval(this.timer);
|
window.clearInterval(this.timer);
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
this.update();
|
this.update();
|
||||||
this.setCookie('uhr-status', 'off');
|
this.cookieHandler.setStatus('off');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +82,7 @@ export class Uhr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setLanguage(key: string): void {
|
setLayout(key: string): void {
|
||||||
if (key !== this.widgetInstance.options.language) {
|
if (key !== this.widgetInstance.options.language) {
|
||||||
this.widgetInstance.options.language = key;
|
this.widgetInstance.options.language = key;
|
||||||
const renderer = new LayoutRenderer(this.getCurrentLayout(), this.widgetInstance.element.find('.letterarea'));
|
const renderer = new LayoutRenderer(this.getCurrentLayout(), this.widgetInstance.element.find('.letterarea'));
|
||||||
|
@ -86,7 +90,7 @@ export class Uhr {
|
||||||
this.currentMinute = -1;
|
this.currentMinute = -1;
|
||||||
this.update();
|
this.update();
|
||||||
});
|
});
|
||||||
this.setCookie('uhr-language', key);
|
this.cookieHandler.setLayout(key);
|
||||||
this.update();
|
this.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +100,7 @@ export class Uhr {
|
||||||
this.widgetInstance.element.removeClass(this.widgetInstance.options.theme).addClass(styleClass);
|
this.widgetInstance.element.removeClass(this.widgetInstance.options.theme).addClass(styleClass);
|
||||||
$(`#uhr-onoffswitch${this.widgetInstance.uuid}`).removeClass(this.widgetInstance.options.theme).addClass(styleClass);
|
$(`#uhr-onoffswitch${this.widgetInstance.uuid}`).removeClass(this.widgetInstance.options.theme).addClass(styleClass);
|
||||||
this.widgetInstance.options.theme = styleClass;
|
this.widgetInstance.options.theme = styleClass;
|
||||||
this.setCookie('uhr-theme', styleClass);
|
this.cookieHandler.setTheme(styleClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,197 +121,17 @@ export class Uhr {
|
||||||
this.widgetInstance.options.mode = mode;
|
this.widgetInstance.options.mode = mode;
|
||||||
this.currentMinute = null;
|
this.currentMinute = null;
|
||||||
this.update();
|
this.update();
|
||||||
this.setCookie('uhr-mode', mode);
|
this.cookieHandler.setMode(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
setWidth(width: string): void {
|
setWidth(width: string): void {
|
||||||
const e = this.widgetInstance.element;
|
this.renderer.setWidth(width);
|
||||||
e.css('width', width);
|
|
||||||
const realWidth = e.width();
|
|
||||||
e.width(realWidth);
|
|
||||||
e.height(realWidth);
|
|
||||||
e.css('font-size', (realWidth / 40) + 'px');
|
|
||||||
}
|
|
||||||
|
|
||||||
private setupHTML(): void {
|
|
||||||
const e: JQuery<HTMLElement> = this.widgetInstance.element;
|
|
||||||
// Base clock area
|
|
||||||
e.addClass('uhr')
|
|
||||||
.empty()
|
|
||||||
.append('<span class="item dot dot1"></span>')
|
|
||||||
.append('<span class="item dot dot2"></span>')
|
|
||||||
.append('<span class="item dot dot3"></span>')
|
|
||||||
.append('<span class="item dot dot4"></span>')
|
|
||||||
.append('<div class="letterarea"></div>')
|
|
||||||
.append('<div class="reflection"></div>');
|
|
||||||
|
|
||||||
this.setWidth(this.widgetInstance.options.width);
|
|
||||||
|
|
||||||
if (this.widgetInstance.options.controls) {
|
|
||||||
const controlpanel = $(`<div class="uhr-controlpanel" id="uhr-controlpanel${this.widgetInstance.uuid}"></div>`);
|
|
||||||
const content = $('<div class="content"></div>');
|
|
||||||
controlpanel.append(content);
|
|
||||||
// on/off switch
|
|
||||||
const toggleSwitch = $(`<div class="onoffswitch" id="uhr-onoffswitch${this.widgetInstance.uuid}"></div>`);
|
|
||||||
toggleSwitch.append(`<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox${this.widgetInstance.uuid}" checked="checked" />`);
|
|
||||||
toggleSwitch.append(`<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox${this.widgetInstance.uuid}"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>`);
|
|
||||||
content.append(toggleSwitch);
|
|
||||||
|
|
||||||
// time mode switch
|
|
||||||
const modeSwitch = $(`<div class="onoffswitch" id="uhr-modeswitch${this.widgetInstance.uuid}"></div>`);
|
|
||||||
modeSwitch.append(`<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox${this.widgetInstance.uuid}" checked="checked" />`);
|
|
||||||
modeSwitch.append(`<label class="onoffswitch-label" for="uhr-modeswitch-checkbox${this.widgetInstance.uuid}"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>`);
|
|
||||||
content.append(modeSwitch);
|
|
||||||
// language chooser
|
|
||||||
if (Globals.hasMultipleLayouts()) {
|
|
||||||
const languageChooser = $(`<select id="uhr-languagechooser${this.widgetInstance.uuid}"></select>`);
|
|
||||||
Globals.getLayouts().forEach(layout => {
|
|
||||||
languageChooser.append(`<option value="${layout.code}">${layout.prettyName}</option>`);
|
|
||||||
});
|
|
||||||
content.append(languageChooser);
|
|
||||||
}
|
|
||||||
|
|
||||||
// theme chooser
|
|
||||||
if (Globals.hasMultipleThemes()) {
|
|
||||||
const themeChooser = $(`<select id="uhr-themechooser${this.widgetInstance.uuid}"></select>`);
|
|
||||||
Globals.getThemes().forEach(theme => {
|
|
||||||
themeChooser.append(`<option value="${theme.styleClass}">${theme.name}</option>`);
|
|
||||||
});
|
|
||||||
content.append(themeChooser);
|
|
||||||
}
|
|
||||||
const closebutton = $(`<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel${this.widgetInstance.uuid}"></a>`);
|
|
||||||
//FIXME deprecated?!
|
|
||||||
closebutton.on('click', () => $(`#uhr-controlpanel${this.widgetInstance.uuid}`).hide('fast'));
|
|
||||||
content.append(closebutton);
|
|
||||||
e.after(controlpanel);
|
|
||||||
controlpanel.hide();
|
|
||||||
const configlink = $(`<a class="uhr-configlink" id="uhr-configlink${this.widgetInstance.uuid}"></a>`);
|
|
||||||
configlink.on({click: () => this.toggleConfigScreen()});
|
|
||||||
e.after(configlink);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private wireFunctionality(): void {
|
|
||||||
// on/off switch
|
|
||||||
const toggleSwitch = $(`#uhr-onoffswitch-checkbox${this.widgetInstance.uuid}`);
|
|
||||||
toggleSwitch.on({click: () => this.toggle()});
|
|
||||||
let status = this.getCookie('uhr-status');
|
|
||||||
if (status === undefined || this.widgetInstance.options.force) {
|
|
||||||
status = this.widgetInstance.options.status;
|
|
||||||
}
|
|
||||||
toggleSwitch.prop('checked', status === 'on');
|
|
||||||
if (status === 'on') {
|
|
||||||
this.start();
|
|
||||||
} else {
|
|
||||||
this.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
// time mode switch
|
|
||||||
const modeSwitch = $(`#uhr-modeswitch-checkbox${this.widgetInstance.uuid}`);
|
|
||||||
modeSwitch.on({
|
|
||||||
click: () => {
|
|
||||||
if (this.widgetInstance.options.mode === 'seconds') {
|
|
||||||
this.setMode('normal');
|
|
||||||
} else {
|
|
||||||
this.setMode('seconds');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
let mode = this.getCookie('uhr-mode');
|
|
||||||
if (mode === undefined || this.widgetInstance.options.force) {
|
|
||||||
mode = this.widgetInstance.options.mode;
|
|
||||||
}
|
|
||||||
modeSwitch.prop('checked', mode !== 'seconds');
|
|
||||||
if (mode === 'seconds') {
|
|
||||||
this.setMode('seconds');
|
|
||||||
} else {
|
|
||||||
this.setMode('normal');
|
|
||||||
}
|
|
||||||
|
|
||||||
// language chooser
|
|
||||||
const languageChooser = $(`#uhr-languagechooser${this.widgetInstance.uuid}`);
|
|
||||||
languageChooser.on({
|
|
||||||
change: () => {
|
|
||||||
const languageKey = $(`#uhr-languagechooser${this.widgetInstance.uuid}`).val() as string;
|
|
||||||
this.setLanguage(languageKey);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let selectedLayout = this.getCookie('uhr-language');
|
|
||||||
if (selectedLayout === undefined || this.widgetInstance.options.force) {
|
|
||||||
selectedLayout = this.widgetInstance.options.language;
|
|
||||||
}
|
|
||||||
let found = Globals.getLayouts().some(item => selectedLayout === item.code);
|
|
||||||
if (!found) {
|
|
||||||
let fallbackLanguage;
|
|
||||||
if (Globals.hasLayouts()) {
|
|
||||||
fallbackLanguage = Globals.getFirstLayout().code;
|
|
||||||
} else {
|
|
||||||
fallbackLanguage = '';
|
|
||||||
}
|
|
||||||
console.warn(`Language '${selectedLayout}' not found! Using fallback '${fallbackLanguage}'.`);
|
|
||||||
selectedLayout = fallbackLanguage;
|
|
||||||
}
|
|
||||||
languageChooser.val(selectedLayout);
|
|
||||||
this.widgetInstance.options.language = '';
|
|
||||||
this.setLanguage(selectedLayout);
|
|
||||||
|
|
||||||
// theme chooser
|
|
||||||
const themeChooser = $(`#uhr-themechooser${this.widgetInstance.uuid}`);
|
|
||||||
themeChooser.on({
|
|
||||||
change: () => {
|
|
||||||
const themeKey = $(`#uhr-themechooser${this.widgetInstance.uuid}`).val() as string;
|
|
||||||
this.setTheme(themeKey);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let selectedTheme = this.getCookie('uhr-theme');
|
|
||||||
if (selectedTheme === undefined || this.widgetInstance.options.force) {
|
|
||||||
selectedTheme = this.widgetInstance.options.theme;
|
|
||||||
}
|
|
||||||
found = Globals.getThemes().some(item => selectedTheme === item.styleClass);
|
|
||||||
if (!found) {
|
|
||||||
const fallbackTheme = Globals.getFirstTheme().styleClass;
|
|
||||||
console.warn(`Theme '${selectedTheme}' not found! Using fallback '${fallbackTheme}'.`);
|
|
||||||
selectedTheme = fallbackTheme;
|
|
||||||
}
|
|
||||||
themeChooser.val(selectedTheme);
|
|
||||||
this.widgetInstance.options.theme = '';
|
|
||||||
this.setTheme(selectedTheme);
|
|
||||||
if (this.widgetInstance.options.autoresize) {
|
|
||||||
$(window).on({
|
|
||||||
resize: () => {
|
|
||||||
const $e: JQuery<HTMLElement> = this.widgetInstance.element;
|
|
||||||
const $parent: JQuery<HTMLElement> = $e.parent();
|
|
||||||
const $window: JQuery<Window> = $(window);
|
|
||||||
const parentWidth: number = $parent.width();
|
|
||||||
const parentHeight: number = $parent.height();
|
|
||||||
const windowWidth: number = $window.width();
|
|
||||||
const windowHeight: number = $window.height();
|
|
||||||
const size: string = `${Math.min(parentWidth, parentHeight, windowWidth, windowHeight)}px`;
|
|
||||||
this.setWidth(size);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private isOn(): boolean {
|
private isOn(): boolean {
|
||||||
return this.timer !== null;
|
return this.timer !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getCookie(cookieName: string): string {
|
|
||||||
return Cookies.get(cookieName + this.widgetInstance.uuid);
|
|
||||||
}
|
|
||||||
|
|
||||||
private setCookie(cookieName: string, cookieValue: string): void {
|
|
||||||
let options;
|
|
||||||
if (this.widgetInstance.options.cookiePath !== undefined) {
|
|
||||||
options = {expires: 365, path: this.widgetInstance.options.cookiePath};
|
|
||||||
} else {
|
|
||||||
options = {expires: 365};
|
|
||||||
}
|
|
||||||
Cookies.set(cookieName + this.widgetInstance.uuid, cookieValue, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
private update(): void {
|
private update(): void {
|
||||||
if (this.isOn()) {
|
if (this.isOn()) {
|
||||||
const time = this.widgetInstance.options.time;
|
const time = this.widgetInstance.options.time;
|
||||||
|
@ -355,21 +179,21 @@ export class Uhr {
|
||||||
return this.getCurrentLayout().getSeconds(time);
|
return this.getCurrentLayout().getSeconds(time);
|
||||||
}
|
}
|
||||||
return time.getSeconds();
|
return time.getSeconds();
|
||||||
};
|
}
|
||||||
|
|
||||||
private getDotMinute(date: Date): number {
|
private getDotMinute(date: Date): number {
|
||||||
if (typeof this.getCurrentLayout().getDotMinute === 'function') {
|
if (typeof this.getCurrentLayout().getDotMinute === 'function') {
|
||||||
return this.getCurrentLayout().getDotMinute(date);
|
return this.getCurrentLayout().getDotMinute(date);
|
||||||
}
|
}
|
||||||
return date.getMinutes() % 5;
|
return date.getMinutes() % 5;
|
||||||
};
|
}
|
||||||
|
|
||||||
private getCoarseMinute(date: Date): number {
|
private getCoarseMinute(date: Date): number {
|
||||||
if (typeof this.getCurrentLayout().getCoarseMinute === 'function') {
|
if (typeof this.getCurrentLayout().getCoarseMinute === 'function') {
|
||||||
return this.getCurrentLayout().getCoarseMinute(date);
|
return this.getCurrentLayout().getCoarseMinute(date);
|
||||||
}
|
}
|
||||||
return date.getMinutes();
|
return date.getMinutes();
|
||||||
};
|
}
|
||||||
|
|
||||||
private getHour(date: Date): number {
|
private getHour(date: Date): number {
|
||||||
if (typeof this.getCurrentLayout().getHour === 'function') {
|
if (typeof this.getCurrentLayout().getHour === 'function') {
|
||||||
|
@ -380,11 +204,7 @@ export class Uhr {
|
||||||
return (hour + 1) % 24;
|
return (hour + 1) % 24;
|
||||||
}
|
}
|
||||||
return hour;
|
return hour;
|
||||||
};
|
}
|
||||||
|
|
||||||
private toggleConfigScreen() {
|
|
||||||
$(`#uhr-controlpanel${this.widgetInstance.uuid}`).toggle('fast');
|
|
||||||
};
|
|
||||||
|
|
||||||
private parseHash(): void {
|
private parseHash(): void {
|
||||||
let hash: string = window.location.hash;
|
let hash: string = window.location.hash;
|
||||||
|
@ -429,5 +249,5 @@ export class Uhr {
|
||||||
}
|
}
|
||||||
// fallback: return empty object
|
// fallback: return empty object
|
||||||
return EMPTY_LAYOUT;
|
return EMPTY_LAYOUT;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import WidgetCommonProperties = JQueryUI.WidgetCommonProperties;
|
import WidgetCommonProperties = JQueryUI.WidgetCommonProperties;
|
||||||
import {Uhr} from "../uhr";
|
import {Options} from './options';
|
||||||
import {Options} from "./options";
|
import {Uhr} from '../uhr';
|
||||||
|
|
||||||
export interface WidgetPrototype extends WidgetCommonProperties {
|
export interface WidgetPrototype extends WidgetCommonProperties {
|
||||||
options: Options;
|
options: Options;
|
||||||
|
|
|
@ -102,7 +102,6 @@ module.exports = (env, argv) => ({
|
||||||
}
|
}
|
||||||
return 'deleteme/[name]';
|
return 'deleteme/[name]';
|
||||||
},
|
},
|
||||||
library: 'uhr',
|
|
||||||
path: path.resolve(__dirname, 'dist')
|
path: path.resolve(__dirname, 'dist')
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
|
|
Loading…
Reference in a new issue