Browse Source

5.0.24

main v5.0.24
Jānis Skarnelis 1 year ago
parent
commit
767b9a87b6
  1. 12
      CHANGELOG.md
  2. 2
      dist/carousel/carousel.autoplay.esm.js
  3. 2
      dist/carousel/carousel.autoplay.umd.js
  4. 2
      dist/carousel/carousel.esm.js
  5. 2
      dist/carousel/carousel.thumbs.esm.js
  6. 2
      dist/carousel/carousel.thumbs.umd.js
  7. 2
      dist/carousel/carousel.umd.js
  8. 1
      dist/carousel/l10n/sk.esm.js
  9. 1
      dist/carousel/l10n/sk.umd.js
  10. 2
      dist/fancybox/fancybox.esm.js
  11. 2
      dist/fancybox/fancybox.umd.js
  12. 1
      dist/fancybox/l10n/sk.esm.js
  13. 1
      dist/fancybox/l10n/sk.umd.js
  14. 2
      dist/index.esm.js
  15. 2
      dist/index.umd.js
  16. 1
      dist/panzoom/l10n/sk.esm.js
  17. 1
      dist/panzoom/l10n/sk.umd.js
  18. 2
      dist/panzoom/panzoom.esm.js
  19. 2
      dist/panzoom/panzoom.pins.esm.js
  20. 2
      dist/panzoom/panzoom.pins.umd.js
  21. 2
      dist/panzoom/panzoom.toolbar.esm.js
  22. 2
      dist/panzoom/panzoom.toolbar.umd.js
  23. 2
      dist/panzoom/panzoom.umd.js
  24. 5
      l10n/Carousel/sk.ts
  25. 20
      l10n/Fancybox/sk.ts
  26. 26
      l10n/Panzoom/sk.ts
  27. 2
      package.json
  28. 4
      types/Carousel/Carousel.d.ts
  29. 2
      types/Carousel/plugins/Autoplay/Autoplay.d.ts
  30. 6
      types/Carousel/plugins/Thumbs/Thumbs.d.ts
  31. 9
      types/Carousel/types.d.ts
  32. 5
      types/Fancybox/Fancybox.d.ts
  33. 6
      types/Fancybox/options.d.ts
  34. 6
      types/Fancybox/plugins/Html/Html.d.ts
  35. 3
      types/Fancybox/plugins/Images/Images.d.ts
  36. 12
      types/Fancybox/types.d.ts
  37. 2
      types/Panzoom/Panzoom.d.ts
  38. 6
      types/Panzoom/types.d.ts

12
CHANGELOG.md

@ -1,3 +1,15 @@
# 5.0.24 (2023-10-05)
### Bug Fixes
- **Fancybox** Exit fullscreen mode only if started by Fancybox ([520](https://github.com/fancyapps/ui/issues/520))
- **Fancybox** Fix an issue with elements inside the content that contain Panzoom data attributes
### Features
- Added Slovak translations
- **Carousel** Added event `beforeChange`, can be used to prevent slide change
# 5.0.23 (2023-09-28)
### Bug Fixes

2
dist/carousel/carousel.autoplay.esm.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.autoplay.umd.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.esm.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.thumbs.esm.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.thumbs.umd.js

File diff suppressed because one or more lines are too long

2
dist/carousel/carousel.umd.js

File diff suppressed because one or more lines are too long

1
dist/carousel/l10n/sk.esm.js

@ -0,0 +1 @@
const a={NEXT:"Ďalší",PREV:"Predchádzajúci",GOTO:"Prejsť na %d. snímok"};export{a as sk};

1
dist/carousel/l10n/sk.umd.js

@ -0,0 +1 @@
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self).Carousel=e.Carousel||{},e.Carousel.l10n=e.Carousel.l10n||{}))}(this,(function(e){"use strict";e.sk={NEXT:"Ďalší",PREV:"Predchádzajúci",GOTO:"Prejsť na %d. snímok"}}));

2
dist/fancybox/fancybox.esm.js

File diff suppressed because one or more lines are too long

2
dist/fancybox/fancybox.umd.js

File diff suppressed because one or more lines are too long

1
dist/fancybox/l10n/sk.esm.js

@ -0,0 +1 @@
const a={PANUP:"Posunúť hore",PANDOWN:"Posunúť dole",PANLEFT:"Posunúť vľavo",PANRIGHT:"Posunúť vpravo",ZOOMIN:"Priblížiť",ZOOMOUT:"Oddialiť",TOGGLEZOOM:"Prepnúť úroveň priblíženia",TOGGLE1TO1:"Prepnúť úroveň priblíženia",ITERATEZOOM:"Prepnúť úroveň priblíženia",ROTATECCW:"Otočiť doľava",ROTATECW:"Otočiť doprava",FLIPX:"Prevrátiť vodorovne",FLIPY:"Prevrátiť zvisle",FITX:"Prispôsobiť na šírku",FITY:"Prispôsobiť na výšku",RESET:"Resetovať",TOGGLEFS:"Režim celej obrazovky",CLOSE:"Zavrieť",NEXT:"Ďalší",PREV:"Predchádzajúci",MODAL:"Môžete zavrieť toto okno klávesou ESC",ERROR:"Nastala chyba. Skúste to, prosím, znovu",IMAGE_ERROR:"Obrázok sa nenašiel",ELEMENT_NOT_FOUND:"HTML element sa nenašiel",AJAX_NOT_FOUND:"Chyba načítania: nenájdené",AJAX_FORBIDDEN:"Chyba načítania: zamietnuté",IFRAME_ERROR:"Chyba načítania stránky",TOGGLE_ZOOM:"Prepnúť úroveň priblíženia",TOGGLE_THUMBS:"Zobraziť/skryť miniatúry",TOGGLE_SLIDESHOW:"Spustiť/zastaviť automatické prehrávanie",TOGGLE_FULLSCREEN:"Režim celej obrazovky",DOWNLOAD:"Stiahnuť"};export{a as sk};

1
dist/fancybox/l10n/sk.umd.js

@ -0,0 +1 @@
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a(((e="undefined"!=typeof globalThis?globalThis:e||self).Fancybox=e.Fancybox||{},e.Fancybox.l10n=e.Fancybox.l10n||{}))}(this,(function(e){"use strict";const a={PANUP:"Posunúť hore",PANDOWN:"Posunúť dole",PANLEFT:"Posunúť vľavo",PANRIGHT:"Posunúť vpravo",ZOOMIN:"Priblížiť",ZOOMOUT:"Oddialiť",TOGGLEZOOM:"Prepnúť úroveň priblíženia",TOGGLE1TO1:"Prepnúť úroveň priblíženia",ITERATEZOOM:"Prepnúť úroveň priblíženia",ROTATECCW:"Otočiť doľava",ROTATECW:"Otočiť doprava",FLIPX:"Prevrátiť vodorovne",FLIPY:"Prevrátiť zvisle",FITX:"Prispôsobiť na šírku",FITY:"Prispôsobiť na výšku",RESET:"Resetovať",TOGGLEFS:"Režim celej obrazovky",CLOSE:"Zavrieť",NEXT:"Ďalší",PREV:"Predchádzajúci",MODAL:"Môžete zavrieť toto okno klávesou ESC",ERROR:"Nastala chyba. Skúste to, prosím, znovu",IMAGE_ERROR:"Obrázok sa nenašiel",ELEMENT_NOT_FOUND:"HTML element sa nenašiel",AJAX_NOT_FOUND:"Chyba načítania: nenájdené",AJAX_FORBIDDEN:"Chyba načítania: zamietnuté",IFRAME_ERROR:"Chyba načítania stránky",TOGGLE_ZOOM:"Prepnúť úroveň priblíženia",TOGGLE_THUMBS:"Zobraziť/skryť miniatúry",TOGGLE_SLIDESHOW:"Spustiť/zastaviť automatické prehrávanie",TOGGLE_FULLSCREEN:"Režim celej obrazovky",DOWNLOAD:"Stiahnuť"};e.sk=a}));

2
dist/index.esm.js

File diff suppressed because one or more lines are too long

2
dist/index.umd.js

File diff suppressed because one or more lines are too long

1
dist/panzoom/l10n/sk.esm.js

@ -0,0 +1 @@
const o={PANUP:"Posunúť hore",PANDOWN:"Posunúť dole",PANLEFT:"Posunúť vľavo",PANRIGHT:"Posunúť vpravo",ZOOMIN:"Priblížiť",ZOOMOUT:"Oddialiť",TOGGLEZOOM:"Prepnúť úroveň priblíženia",TOGGLE1TO1:"Prepnúť úroveň priblíženia",ITERATEZOOM:"Prepnúť úroveň priblíženia",ROTATECCW:"Otočiť doľava",ROTATECW:"Otočiť doprava",FLIPX:"Prevrátiť vodorovne",FLIPY:"Prevrátiť zvisle",FITX:"Prispôsobiť na šírku",FITY:"Prispôsobiť na výšku",RESET:"Resetovať",TOGGLEFS:"Režim celej obrazovky"};export{o as sk};

1
dist/panzoom/l10n/sk.umd.js

@ -0,0 +1 @@
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((o="undefined"!=typeof globalThis?globalThis:o||self).Panzoom=o.Panzoom||{},o.Panzoom.l10n=o.Panzoom.l10n||{}))}(this,(function(o){"use strict";o.sk={PANUP:"Posunúť hore",PANDOWN:"Posunúť dole",PANLEFT:"Posunúť vľavo",PANRIGHT:"Posunúť vpravo",ZOOMIN:"Priblížiť",ZOOMOUT:"Oddialiť",TOGGLEZOOM:"Prepnúť úroveň priblíženia",TOGGLE1TO1:"Prepnúť úroveň priblíženia",ITERATEZOOM:"Prepnúť úroveň priblíženia",ROTATECCW:"Otočiť doľava",ROTATECW:"Otočiť doprava",FLIPX:"Prevrátiť vodorovne",FLIPY:"Prevrátiť zvisle",FITX:"Prispôsobiť na šírku",FITY:"Prispôsobiť na výšku",RESET:"Resetovať",TOGGLEFS:"Režim celej obrazovky"}}));

2
dist/panzoom/panzoom.esm.js

File diff suppressed because one or more lines are too long

2
dist/panzoom/panzoom.pins.esm.js

@ -1 +1 @@
const t=(e,...s)=>{const n=s.length;for(let r=0;r<n;r++){const n=s[r]||{};Object.entries(n).forEach((([s,n])=>{const r=Array.isArray(n)?[]:{};var i;e[s]||Object.assign(e,{[s]:r}),"object"==typeof(i=n)&&null!==i&&i.constructor===Object&&"[object Object]"===Object.prototype.toString.call(i)?Object.assign(e[s],t(r,n)):Array.isArray(n)?Object.assign(e,{[s]:[...n]}):Object.assign(e,{[s]:n})}))}return e},e=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class s{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(e){this.options=e?t({},this.constructor.defaults,e):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...s){let n=e(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...s)),n}optionFor(t,s,n,...r){let i=e(s,t);var o;"string"!=typeof(o=i)||isNaN(o)||isNaN(parseFloat(o))||(i=parseFloat(i)),"true"===i&&(i=!0),"false"===i&&(i=!1),i&&"function"==typeof i&&(i=i.call(this,this,t,...r));let a=e(s,this.options);return a&&"function"==typeof a?i=a.call(this,this,t,...r,i):void 0===i&&(i=a),void 0===i?n:i}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(s,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.23"}),Object.defineProperty(s,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class n extends s{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class r extends n{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:r,fullWidth:i,fullHeight:o}=t.contentRect,a=s.dataset.x||"",l=s.dataset.y||"";let c=0,f=0;c=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/i*n,c-=.5*n,f=l.includes("%")?r*(parseFloat(l)/100):parseFloat(l)/o*r,f-=.5*r;const h=new DOMPoint(c,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${h.x||0}px, ${h.y||0}px, 0)`}var e}attach(){const t=this.instance;this.pins=Array.from(t.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(t.container.classList.add("has-pins"),t.on(["afterTransform","refresh"],this.onTransform))}detach(){const t=this.instance;this.pins=[],t.container.classList.remove("has-pins"),t.off(["afterTransform","refresh"],this.onTransform)}}Object.defineProperty(r,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});export{r as Pins};
const t=(e,...s)=>{const n=s.length;for(let r=0;r<n;r++){const n=s[r]||{};Object.entries(n).forEach((([s,n])=>{const r=Array.isArray(n)?[]:{};var i;e[s]||Object.assign(e,{[s]:r}),"object"==typeof(i=n)&&null!==i&&i.constructor===Object&&"[object Object]"===Object.prototype.toString.call(i)?Object.assign(e[s],t(r,n)):Array.isArray(n)?Object.assign(e,{[s]:[...n]}):Object.assign(e,{[s]:n})}))}return e},e=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class s{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(e){this.options=e?t({},this.constructor.defaults,e):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...s){let n=e(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...s)),n}optionFor(t,s,n,...r){let i=e(s,t);var o;"string"!=typeof(o=i)||isNaN(o)||isNaN(parseFloat(o))||(i=parseFloat(i)),"true"===i&&(i=!0),"false"===i&&(i=!1),i&&"function"==typeof i&&(i=i.call(this,this,t,...r));let a=e(s,this.options);return a&&"function"==typeof a?i=a.call(this,this,t,...r,i):void 0===i&&(i=a),void 0===i?n:i}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(s,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.24"}),Object.defineProperty(s,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class n extends s{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class r extends n{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:r,fullWidth:i,fullHeight:o}=t.contentRect,a=s.dataset.x||"",l=s.dataset.y||"";let c=0,f=0;c=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/i*n,c-=.5*n,f=l.includes("%")?r*(parseFloat(l)/100):parseFloat(l)/o*r,f-=.5*r;const h=new DOMPoint(c,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${h.x||0}px, ${h.y||0}px, 0)`}var e}attach(){const t=this.instance;this.pins=Array.from(t.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(t.container.classList.add("has-pins"),t.on(["afterTransform","refresh"],this.onTransform))}detach(){const t=this.instance;this.pins=[],t.container.classList.remove("has-pins"),t.off(["afterTransform","refresh"],this.onTransform)}}Object.defineProperty(r,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});export{r as Pins};

2
dist/panzoom/panzoom.pins.umd.js

@ -1 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";const e=(t,...s)=>{const n=s.length;for(let i=0;i<n;i++){const n=s[i]||{};Object.entries(n).forEach((([s,n])=>{const i=Array.isArray(n)?[]:{};var r;t[s]||Object.assign(t,{[s]:i}),"object"==typeof(r=n)&&null!==r&&r.constructor===Object&&"[object Object]"===Object.prototype.toString.call(r)?Object.assign(t[s],e(i,n)):Array.isArray(n)?Object.assign(t,{[s]:[...n]}):Object.assign(t,{[s]:n})}))}return t},s=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class n{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?e({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let n=s(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...e)),n}optionFor(t,e,n,...i){let r=s(e,t);var o;"string"!=typeof(o=r)||isNaN(o)||isNaN(parseFloat(o))||(r=parseFloat(r)),"true"===r&&(r=!0),"false"===r&&(r=!1),r&&"function"==typeof r&&(r=r.call(this,this,t,...i));let a=s(e,this.options);return a&&"function"==typeof a?r=a.call(this,this,t,...i,r):void 0===r&&(r=a),void 0===r?n:r}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(n,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.23"}),Object.defineProperty(n,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class i extends n{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class r extends i{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:i,fullWidth:r,fullHeight:o}=t.contentRect,a=s.dataset.x||"",l=s.dataset.y||"";let c=0,f=0;c=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/r*n,c-=.5*n,f=l.includes("%")?i*(parseFloat(l)/100):parseFloat(l)/o*i,f-=.5*i;const p=new DOMPoint(c,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${p.x||0}px, ${p.y||0}px, 0)`}var e}attach(){const t=this.instance;this.pins=Array.from(t.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(t.container.classList.add("has-pins"),t.on(["afterTransform","refresh"],this.onTransform))}detach(){const t=this.instance;this.pins=[],t.container.classList.remove("has-pins"),t.off(["afterTransform","refresh"],this.onTransform)}}Object.defineProperty(r,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),t.Pins=r}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";const e=(t,...s)=>{const n=s.length;for(let i=0;i<n;i++){const n=s[i]||{};Object.entries(n).forEach((([s,n])=>{const i=Array.isArray(n)?[]:{};var r;t[s]||Object.assign(t,{[s]:i}),"object"==typeof(r=n)&&null!==r&&r.constructor===Object&&"[object Object]"===Object.prototype.toString.call(r)?Object.assign(t[s],e(i,n)):Array.isArray(n)?Object.assign(t,{[s]:[...n]}):Object.assign(t,{[s]:n})}))}return t},s=function(t,e){return t.split(".").reduce(((t,e)=>"object"==typeof t?t[e]:void 0),e)};class n{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(t){this.options=t?e({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let n=s(t,this.options);return n&&"function"==typeof n&&(n=n.call(this,this,...e)),n}optionFor(t,e,n,...i){let r=s(e,t);var o;"string"!=typeof(o=r)||isNaN(o)||isNaN(parseFloat(o))||(r=parseFloat(r)),"true"===r&&(r=!0),"false"===r&&(r=!1),r&&"function"==typeof r&&(r=r.call(this,this,t,...i));let a=s(e,this.options);return a&&"function"==typeof a?r=a.call(this,this,t,...i,r):void 0===r&&(r=a),void 0===r?n:r}cn(t){const e=this.options.classes;return e&&e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,s)=>{let n="";return s?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${s}`):e&&(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let s=0;s<e.length;s++)t=t.split(e[s][0]).join(e[s][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=>e))}on(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),this.events||(this.events=new Map),s.forEach((t=>{let s=this.events.get(t);s||(this.events.set(t,[]),s=[]),s.includes(e)||s.push(e),this.events.set(t,s)}))}off(t,e){let s=[];"string"==typeof t?s=t.split(" "):Array.isArray(t)&&(s=t),s.forEach((t=>{const s=this.events.get(t);if(Array.isArray(s)){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=>t(this,...e))),"*"!==t&&this.emit("*",t,...e)}}Object.defineProperty(n,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.24"}),Object.defineProperty(n,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class i extends n{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}class r extends i{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pins",{enumerable:!0,configurable:!0,writable:!0,value:[]})}onTransform(t){for(const s of this.pins){if(!((e=s)&&null!==e&&e instanceof Element&&"nodeType"in e))continue;const{fitWidth:n,fitHeight:i,fullWidth:r,fullHeight:o}=t.contentRect,a=s.dataset.x||"",l=s.dataset.y||"";let c=0,f=0;c=a.includes("%")?n*(parseFloat(a)/100):parseFloat(a)/r*n,c-=.5*n,f=l.includes("%")?i*(parseFloat(l)/100):parseFloat(l)/o*i,f-=.5*i;const p=new DOMPoint(c,f).matrixTransform(t.getMatrix());s.style.transform=`translate3d(${p.x||0}px, ${p.y||0}px, 0)`}var e}attach(){const t=this.instance;this.pins=Array.from(t.container.querySelectorAll("[data-panzoom-pin]")),this.pins.length&&(t.container.classList.add("has-pins"),t.on(["afterTransform","refresh"],this.onTransform))}detach(){const t=this.instance;this.pins=[],t.container.classList.remove("has-pins"),t.off(["afterTransform","refresh"],this.onTransform)}}Object.defineProperty(r,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),t.Pins=r}));

2
dist/panzoom/panzoom.toolbar.esm.js

File diff suppressed because one or more lines are too long

2
dist/panzoom/panzoom.toolbar.umd.js

File diff suppressed because one or more lines are too long

2
dist/panzoom/panzoom.umd.js

File diff suppressed because one or more lines are too long

5
l10n/Carousel/sk.ts

@ -0,0 +1,5 @@
export const sk = {
NEXT: "Ďalší",
PREV: "Predchádzajúci",
GOTO: "Prejsť na %d. snímok",
};

20
l10n/Fancybox/sk.ts

@ -0,0 +1,20 @@
import { sk as PANZOOM_SK } from "../Panzoom/sk";
export const sk = {
...PANZOOM_SK,
CLOSE: "Zavrieť",
NEXT: "Ďalší",
PREV: "Predchádzajúci",
MODAL: "Môžete zavrieť toto okno klávesou ESC",
ERROR: "Nastala chyba. Skúste to, prosím, znovu",
IMAGE_ERROR: "Obrázok sa nenašiel",
ELEMENT_NOT_FOUND: "HTML element sa nenašiel",
AJAX_NOT_FOUND: "Chyba načítania: nenájdené",
AJAX_FORBIDDEN: "Chyba načítania: zamietnuté",
IFRAME_ERROR: "Chyba načítania stránky",
TOGGLE_ZOOM: "Prepnúť úroveň priblíženia",
TOGGLE_THUMBS: "Zobraziť/skryť miniatúry",
TOGGLE_SLIDESHOW: "Spustiť/zastaviť automatické prehrávanie",
TOGGLE_FULLSCREEN: "Režim celej obrazovky",
DOWNLOAD: "Stiahnuť",
};

26
l10n/Panzoom/sk.ts

@ -0,0 +1,26 @@
export const sk = {
PANUP: "Posunúť hore",
PANDOWN: "Posunúť dole",
PANLEFT: "Posunúť vľavo",
PANRIGHT: "Posunúť vpravo",
ZOOMIN: "Priblížiť",
ZOOMOUT: "Oddialiť",
TOGGLEZOOM: "Prepnúť úroveň priblíženia",
TOGGLE1TO1: "Prepnúť úroveň priblíženia",
ITERATEZOOM: "Prepnúť úroveň priblíženia",
ROTATECCW: "Otočiť doľava",
ROTATECW: "Otočiť doprava",
FLIPX: "Prevrátiť vodorovne",
FLIPY: "Prevrátiť zvisle",
FITX: "Prispôsobiť na šírku",
FITY: "Prispôsobiť na výšku",
RESET: "Resetovať",
TOGGLEFS: "Režim celej obrazovky",
};

2
package.json

@ -1,6 +1,6 @@
{
"name": "@fancyapps/ui",
"version": "5.0.23",
"version": "5.0.24",
"description": "Robust JavaScript UI Component Library",
"files": [
"dist",

4
types/Carousel/Carousel.d.ts

@ -7,11 +7,11 @@ export declare class Carousel extends Component<OptionsType, CarouselEventsType>
static Panzoom: typeof Panzoom;
static defaults: Partial<OptionsType>;
static Plugins: PluginsType;
private userOptions;
private userPlugins;
private bp;
private lp;
private get axis();
userOptions: Partial<OptionsType>;
userPlugins: PluginsType;
/**
* Current state of the instance
*/

2
types/Carousel/plugins/Autoplay/Autoplay.d.ts

@ -1,6 +1,6 @@
import { Plugin } from "../../../shared/Base/Plugin";
import { Carousel } from "../../Carousel";
type AutoplayEventsType = "set" | "pause" | "resume" | "stop";
type AutoplayEventsType = "start" | "set" | "pause" | "resume" | "stop";
type AutoplayEvents = Record<AutoplayEventsType, (...args: any[]) => void>;
export type AutoplayOptionsType = {
/**

6
types/Carousel/plugins/Thumbs/Thumbs.d.ts

@ -58,10 +58,9 @@ declare module "../../../Carousel/types" {
export declare enum States {
Init = 0,
Ready = 1,
Hidden = 2,
Disabled = 3
Hidden = 2
}
export declare class Thumbs extends Plugin<Carousel, ThumbsOptionsType, "ready"> {
export declare class Thumbs extends Plugin<Carousel, ThumbsOptionsType, "ready" | "createSlide"> {
static defaults: ThumbsOptionsType;
type: "modern" | "classic";
container: HTMLElement | null;
@ -91,6 +90,7 @@ export declare class Thumbs extends Plugin<Carousel, ThumbsOptionsType, "ready">
private lazyLoadModern;
private resizeModernSlide;
private getModernThumbPos;
isDisabled(): Boolean;
build(): void;
cleanup(): void;
attach(): void;

9
types/Carousel/types.d.ts

@ -1,8 +1,9 @@
export interface slideType {
html: string;
html: string | HTMLElement;
el: HTMLElement | null;
isDom: boolean;
class: string;
customClass: string;
index: number;
dim: number;
gap: number;
@ -17,7 +18,7 @@ import { Constructor } from "../shared/Base/types";
import { Plugin } from "../shared/Base/Plugin";
import { Carousel } from "./Carousel";
export type PluginsType = Record<string, Constructor<Plugin<Carousel, any, any>>>;
export type userSlideType = String | HTMLElement | Partial<slideType>;
export type userSlideType = string | HTMLElement | Partial<slideType>;
export type pageType = {
index: number;
slides: Array<slideType>;
@ -67,6 +68,10 @@ export type CarouselEventsType = ComponentEventsType
* Carousel metrics have been updated
*/
| "refresh"
/**
* Right before the active page of the carousel is changed
*/
| "beforeChange"
/**
* The active page of the carousel is changed
*/

5
types/Fancybox/Fancybox.d.ts

@ -13,7 +13,7 @@ declare module "../Carousel/types" {
display?: string;
error?: string;
filter?: string;
caption?: string;
caption?: string | HTMLElement;
downloadSrc?: string;
downloadFilename?: string;
contentEl?: HTMLElement;
@ -50,7 +50,7 @@ export declare class Fancybox extends Component<OptionsType, EventsType> {
fsAPI: {
request: (el: Element) => Promise<void>;
exit: () => Promise<void> | undefined;
isFullscreen: () => boolean;
isFullscreen: () => HTMLElement | undefined;
} | undefined;
get isIdle(): boolean;
get isCompact(): boolean;
@ -60,6 +60,7 @@ export declare class Fancybox extends Component<OptionsType, EventsType> {
private initCarousel;
private attachEvents;
private detachEvents;
private scale;
private onClick;
private onWheel;
private onKeydown;

6
types/Fancybox/options.d.ts

@ -34,7 +34,7 @@ export interface ComponentOptionsType {
/**
* Change caption per slide
*/
caption?: string | ((instance: Fancybox, slide: slideType, caption?: string) => string);
caption?: string | HTMLElement | false | ((instance: Fancybox, slide: slideType, caption?: string | HTMLElement) => string | HTMLElement | false);
/**
* Optional object to extend options for main Carousel
*/
@ -62,7 +62,7 @@ export interface ComponentOptionsType {
/**
* Default content type
*/
defaultType: "image" | "iframe" | "video" | "inline" | "html";
defaultType: "image" | "iframe" | "youtube" | "vimeo" | "inline" | "html";
/**
* The default value of the CSS `display` property for hidden inline elements
*/
@ -164,7 +164,7 @@ export interface ComponentOptionsType {
*/
wheel: "zoom" | "pan" | "close" | "slide" | false | ((instance: Fancybox, event: MouseEvent) => "zoom" | "pan" | "close" | "slide" | false);
event?: MouseEvent | undefined;
trigger?: HTMLElement | null;
triggerEl?: HTMLElement | null;
delegate?: HTMLElement | null;
Hash?: any;
Html?: any;

6
types/Fancybox/plugins/Html/Html.d.ts

@ -63,8 +63,8 @@ declare module "../../../Fancybox/options" {
}
}
export declare const defaultOptions: HtmlOptionsType;
export declare const contentTypes: readonly ["image", "html", "ajax", "inline", "clone", "iframe", "map", "pdf", "html5video", "youtube", "vimeo", "video"];
type contentType = typeof contentTypes[number];
export declare const contentTypes: readonly ["image", "html", "ajax", "inline", "clone", "iframe", "map", "pdf", "html5video", "youtube", "vimeo"];
type contentType = (typeof contentTypes)[number];
declare module "../../../Carousel/types" {
interface slideType {
type?: contentType;
@ -86,7 +86,7 @@ export declare class Html extends Plugin<Fancybox, HtmlOptionsType, ""> {
static defaults: HtmlOptionsType;
private onInitSlide;
private onCreateSlide;
private onRemoveSlide;
private onClearContent;
private onSelectSlide;
private onUnselectSlide;
private onDone;

3
types/Fancybox/plugins/Images/Images.d.ts

@ -51,7 +51,8 @@ export declare class Images extends Plugin<Fancybox, ImagesOptionsType, ""> {
onRemoveSlide(_fancybox: Fancybox, _carousel: Carousel, slide: slideType): void;
onChange(_fancybox: Fancybox, carousel: Carousel, page: number, _prevPage: number): void;
onClose(): void;
setContent(slide: slideType, imageSrc: string): Promise<Panzoom>;
setImage(slide: slideType, imageSrc: string): void;
process(slide: slideType, imageSrc: string): Promise<Panzoom>;
zoomIn(slide: slideType): Promise<Panzoom>;
getZoomInfo(slide: slideType): false | {
x: number;

12
types/Fancybox/types.d.ts

@ -41,6 +41,10 @@ export type EventsType = ComponentEventsType
* Content is revealed on one of the slides
*/
| "done"
/**
* Cleared content inside the slide
*/
| "clearContent"
/**
* The idle state is activated
*/
@ -49,6 +53,10 @@ export type EventsType = ComponentEventsType
* The idle state is deactivated
*/
| "endIdle"
/**
* The slideshow has been deactivated
*/
| "endSlideshow"
/**
* A keyboard button is pressed
*/
@ -69,6 +77,10 @@ export type EventsType = ComponentEventsType
* Closing has begun and can be prevented
*/
| "shouldClose"
/**
* The slideshow is activated
*/
| "startSlideshow"
/**
* Closing is ongoing
*/

2
types/Panzoom/Panzoom.d.ts

@ -108,7 +108,7 @@ export declare class Panzoom extends Component<OptionsType, EventsType> {
/**
* Current pan mode - `mousemove` or `drag`
*/
get panMode(): "drag" | "mousemove";
get panMode(): "mousemove" | "drag";
/**
* If the content can be dragged when it fits into the container
*/

6
types/Panzoom/types.d.ts

@ -1,6 +1,6 @@
import { MatrixKeys } from "./consts";
export type MatrixValues = {
[K in typeof MatrixKeys[number]]: number;
[K in (typeof MatrixKeys)[number]]: number;
};
export type Bounds = {
x: {
@ -107,7 +107,7 @@ export type ClickAction = "toggleZoom" | "toggleCover" | "toggleMax" | "zoomToFi
export type WheelAction = "zoom" | "pan" | false;
export type ZoomOptions = {
friction?: number | "auto";
originX?: number;
originY?: number;
originX?: number | "auto";
originY?: number | "auto";
event?: Event & MouseEvent;
};

Loading…
Cancel
Save