Compare commits
13 Commits
1e350b5bb6
...
f4dcabc3bd
Author | SHA1 | Date |
---|---|---|
Jonathan Druart | f4dcabc3bd | 2 years ago |
Jonathan Druart | a91325387b | 2 years ago |
Jonathan Druart | 03884cc9f9 | 2 years ago |
Owen Leonard | 58cec67dbd | 2 years ago |
Jonathan Druart | 622b4c019b | 2 years ago |
Jonathan Druart | 6cc3e618d8 | 2 years ago |
Jonathan Druart | 4f5670c889 | 2 years ago |
Jonathan Druart | 7ed705056d | 2 years ago |
Owen Leonard | 8fb01c0453 | 2 years ago |
Jonathan Druart | bcfd3849a9 | 2 years ago |
Katrin Fischer | 106f791e61 | 2 years ago |
Thomas Klausner | 0673c73c5f | 3 years ago |
Jonathan Druart | df87d3ab23 | 2 years ago |
19 changed files with 137 additions and 69 deletions
@ -0,0 +1,2 @@ |
|||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ShortcutButtonsPlugin=e():t.ShortcutButtonsPlugin=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const o={theme:"light"};e.ShortcutButtonsPlugin=function(t){const e=Object.assign({},o,t);return t=>{let n;function o(n){n.stopPropagation(),n.preventDefault();const o=n.target;if("button"!==o.tagName.toLowerCase()||void 0===e.onClick)return;const r=parseInt(o.dataset.index,10),c=Array.isArray(e.onClick)?e.onClick:[e.onClick];for(const e of c)"function"==typeof e&&e(r,t)}return{onReady:()=>{if((n=document.createElement("div")).classList.add("shortcut-buttons-flatpickr-wrapper",e.theme),void 0!==e.label&&e.label.length){const t=document.createElement("div");t.classList.add("shortcut-buttons-flatpickr-label"),t.textContent=e.label,n.appendChild(t)}const r=document.createElement("div");r.classList.add("shortcut-buttons-flatpickr-buttons"),(Array.isArray(e.button)?e.button:[e.button]).forEach((t,e)=>{const n=document.createElement("button");n.classList.add("shortcut-buttons-flatpickr-button"),n.textContent=t.label,n.dataset.index=String(e),r.appendChild(n)}),n.appendChild(r),t.calendarContainer.appendChild(n),n.addEventListener("click",o)},onDestroy:()=>{n.removeEventListener("click",o),n=void 0}}}}}]).ShortcutButtonsPlugin}); |
|||
//# sourceMappingURL=shortcut-buttons-flatpickr.min.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue