From 9dd6be5e818823b20e2803d544b4adc1fb0a95ff Mon Sep 17 00:00:00 2001 From: Tony Air Date: Mon, 7 Aug 2023 15:58:23 +0200 Subject: [PATCH] FIX: Next image null title --- dist/js/app.js | 2 +- dist/records.json | 16 +++--- dist/report.html | 9 ++-- package.json | 130 +++++++++++++++++++++++----------------------- src/js/window.js | 4 +- 5 files changed, 82 insertions(+), 79 deletions(-) diff --git a/dist/js/app.js b/dist/js/app.js index 18b4d74..3bb07ae 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -1 +1 @@ -!function(){"use strict";var e={826:function(e){e.exports=function makeYoutubeEmbed(e){if("string"===typeof e){var t=function getId(e){var t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(t&&11==t[2].length)return t[2]}(e);return t?"//www.youtube.com/embed/"+t:void 0}}}},t={};function __webpack_require__(a){var n=t[a];if(void 0!==n)return n.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,__webpack_require__),r.exports}!function(){var e="ajax-load",t="load-ready";function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(e,t)}(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a0&&void 0!==arguments[0]?arguments[0]:{shown:!1},n=arguments.length>1?arguments[1]:void 0;_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),a.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),a.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,n=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r0?r--:r=t.state.collections[n].length-1,t.state.collections[n][r].click(),console.log("".concat(t.name,": prev")),a.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var n=e;n.reset(),n.setState({loading:!0}),n.show(),window.fetch(t).then((function(e){var r=e.headers.get("content-type");console.log(e),console.log("".concat(n.name,": response content-type: ").concat(r));switch(r){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":e.arrayBuffer().then((function(e){n.setContent(''),"meta-".concat(n.name,"--image"))}));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":n.setContent("".concat((!1).Content),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--json")]);break;case"video/mp4":n.setContent(''),["meta-".concat(n.name,"--image"),"meta-".concat(n.name,"--video")]);break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":n.setContent(e.data,["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--pajax")]);break;default:console.warn("".concat(n.name,": Unknown response content-type!"))}a.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var t="";if(e.response)switch(e.response.status){case 404:t="Not Found.";break;case 500:t="Server issue, please try again latter.";break;default:t="Something went wrong."}else e.request?t="No response received":console.warn("Error",e.message);n.setState({error:t}),a.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){n.setState({loading:!1}),setTimeout((function(){n.state.current.classList.remove("loading")}),1e3)}))})),_defineProperty(this,"_currIndex",(function(){var t=e,a=t.state.current,n=a.getAttribute("data-gallery");return t.state.collections[n].indexOf(a)})),_defineProperty(this,"embed",(function(t){var a=e;console.log("".concat(a.name,": embed")),a.reset(),a.setState({embed:t,loading:!1,type:["meta-".concat(a.name,"--embed"),"meta-".concat(a.name,"--video")]}),a.show()})),_defineProperty(this,"setCaption",(function(t){var a=e;console.log("".concat(a.name,": setCaption")),a.state.caption=t})),_defineProperty(this,"addExtraClass",(function(t){var a=e;t&&t.length&&(console.log("".concat(a.name,": addExtraClass(").concat(t,")")),a.state.extraClass=t)})),_defineProperty(this,"getCaption",(function(){return e.state.caption})),_defineProperty(this,"_imageEncode",(function(e){var t="";return[].slice.call(new Uint8Array(e)).forEach((function(e){t+=String.fromCharCode(e)})),window.btoa(t)})),_defineProperty(this,"setContent",(function(t,a){var n=e;console.log("".concat(n.name,": setContent"));var r=a||["meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--text")];Array.isArray(r)||(r=a.split(" ")),n.setState({content:t,type:r})})),_defineProperty(this,"getHtml",(function(){var t=e;if(t.state.embed){var a=__webpack_require__(826)(t.state.embed);t.state.content='')}return t.state.content}));var r=this;switch(r.name=r.constructor.name,console.log("".concat(r.name,": init")),r.setState(t),n){case"show":case"hide":r.hide()}a.dispatchEvent(new Event("{ui.name}.init"))}return function _createClass(e,t,a){return t&&_defineProperties(e.prototype,t),a&&_defineProperties(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}(MetaWindow,[{key:"cleanLinks",value:function cleanLinks(){document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(e){e.classList.remove("loading")}))}},{key:"collectGaleries",value:function collectGaleries(e){var t=this;e&&(t.state.collections[e]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(e,'"]')).forEach((function(a){t.state.collections[e].push(a)})))}},{key:"toggle",value:function toggle(e){var t=this;t.cleanLinks();var a=e.getAttribute("href")||e.getAttribute("data-href"),n=e.getAttribute("data-embed");e.classList.add("loading"),t.state.current=e;var r=e.getAttribute("data-title");r&&t.setCaption(r),n?t.embed(a):t.load(a),t.addExtraClass(e.getAttribute("data-lightbox-class"))}},{key:"init",value:function init(){var e=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery]').forEach((function(t){var a=t.getAttribute("data-gallery");e.collectGaleries(a),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var a=t.currentTarget;e.toggle(a)}))}))}},{key:"setState",value:function setState(e){var t=this;t.state=Object.assign({},t.state,e),t.render()}},{key:"render",value:function render(){var e,t=this,a=t.name,n=t.state.current;t.state.target.innerHTML="";var r=document.createElement("div");r.classList.add("meta-".concat(a)),(e=r.classList).add.apply(e,_toConsumableArray(t.state.type)),t.state.target.append(r);var o=document.createElement("div");o.classList.add("meta-".concat(a,"-overlay")),t.state.shown&&o.classList.add("meta-".concat(a,"-overlay--open")),t.state.loading&&o.classList.add("meta-".concat(a,"-overlay--loading")),t.state.error&&o.classList.add("meta-".concat(a,"-overlay--error")),r.append(o);var i=document.createElement("div");i.classList.add("meta-content"),o.append(i);var c=document.createElement("button");if(c.classList.add("meta-nav","meta-close","a"),c.innerHTML=' Close',c.addEventListener("click",(function(e){e.preventDefault(),t.hide()})),i.append(c),n){var s=n.getAttribute("data-gallery");if(s&&t.state.collections[s].length>1){var l=document.createElement("nav");l.classList.add("meta-navs");var d=document.createElement("button");d.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),d.innerHTML=' Previous',d.addEventListener("click",(function(e){e.preventDefault(),t.prev()})),l.append(d);var u=document.createElement("button");u.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),u.innerHTML=' Next',u.addEventListener("click",(function(e){e.preventDefault(),t.next()})),l.append(u),i.append(l)}}var m=document.createElement("section");if(m.classList.add("meta-wrap","typography"),t.state.extraClass&&m.classList.add(t.state.extraClass),m.innerHTML=t.getHtml(),i.append(m),t.state.error){var p=document.createElement("div");p.classList.add("meta-error"),p.innerHTML=t.state.error,i.append(p)}else if(t.state.caption){var f=document.createElement("div");f.classList.add("meta-caption"),f.innerHTML=t.getCaption(),i.append(f)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),t}}]),MetaWindow}(),r=n,o=document.getElementById("MetaLightboxApp");o||(console.warn("MetaWindow: missing container #MetaLightboxApp - create new one"),(o=document.createElement("div")).setAttribute("id","MetaLightboxApp"),document.querySelector("body").append(o));var i=function init(){var e=window.MetaWindow;"undefined"===typeof e&&(e=new r({target:o}),window.MetaWindow=e),e.init()};window.addEventListener("".concat(t),i),window.addEventListener("".concat(e),i),window.addEventListener("MetaWindow.initLinks",i)}()}(); \ No newline at end of file +!function(){"use strict";var e={627:function(e){e.exports=function makeYoutubeEmbed(e){if("string"===typeof e){var t=function getId(e){var t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(t&&11==t[2].length)return t[2]}(e);return t?"//www.youtube.com/embed/"+t:void 0}}}},t={};function __webpack_require__(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,__webpack_require__),r.exports}!function(){var e="ajax-load",t="load-ready";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{shown:!1},a=arguments.length>1?arguments[1]:void 0;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),n.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),n.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,a=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r0?r--:r=t.state.collections[a].length-1,t.state.collections[a][r].click(),console.log("".concat(t.name,": prev")),n.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var a=e;a.reset(),a.setState({loading:!0}),a.show(),window.fetch(t,{mode:"no-cors"}).then((function(e){var r=e.headers.get("content-type");console.log(e),console.log("".concat(a.name,": response content-type: ").concat(r));switch(r){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":e.arrayBuffer().then((function(e){a.setContent(''),"meta-".concat(a.name,"--image"))}));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":a.setContent("".concat((!1).Content),["meta-".concat(a.name,"--text"),"meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--json")]);break;case"video/mp4":a.setContent(''),["meta-".concat(a.name,"--image"),"meta-".concat(a.name,"--video")]);break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":a.setContent(e.data,["meta-".concat(a.name,"--text"),"meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--pajax")]);break;default:console.warn("".concat(a.name,": Unknown response content-type!"))}n.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var t="";if(e.response)switch(e.response.status){case 404:t="Not Found.";break;case 500:t="Server issue, please try again latter.";break;default:t="Something went wrong."}else e.request?t="No response received":console.warn("Error",e.message);a.setState({error:t}),n.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){a.setState({loading:!1}),setTimeout((function(){a.state.current.classList.remove("loading")}),1e3)}))})),_defineProperty(this,"_currIndex",(function(){var t=e,n=t.state.current,a=n.getAttribute("data-gallery");return t.state.collections[a].indexOf(n)})),_defineProperty(this,"embed",(function(t){var n=e;console.log("".concat(n.name,": embed")),n.reset(),n.setState({embed:t,loading:!1,type:["meta-".concat(n.name,"--embed"),"meta-".concat(n.name,"--video")]}),n.show()})),_defineProperty(this,"setCaption",(function(t){var n=e;console.log("".concat(n.name,": setCaption")),n.state.caption=t})),_defineProperty(this,"addExtraClass",(function(t){var n=e;t&&t.length&&(console.log("".concat(n.name,": addExtraClass(").concat(t,")")),n.state.extraClass=t)})),_defineProperty(this,"getCaption",(function(){return e.state.caption})),_defineProperty(this,"_imageEncode",(function(e){var t="";return[].slice.call(new Uint8Array(e)).forEach((function(e){t+=String.fromCharCode(e)})),window.btoa(t)})),_defineProperty(this,"setContent",(function(t,n){var a=e;console.log("".concat(a.name,": setContent"));var r=n||["meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--text")];Array.isArray(r)||(r=n.split(" ")),a.setState({content:t,type:r})})),_defineProperty(this,"getHtml",(function(){var t=e;if(t.state.embed){var n=__webpack_require__(627)(t.state.embed);t.state.content='')}return t.state.content}));var r=this;switch(r.name=r.constructor.name,console.log("".concat(r.name,": init")),r.setState(t),a){case"show":case"hide":r.hide()}n.dispatchEvent(new Event("{ui.name}.init"))}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MetaWindow,[{key:"cleanLinks",value:function cleanLinks(){document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(e){e.classList.remove("loading")}))}},{key:"collectGaleries",value:function collectGaleries(e){var t=this;e&&(t.state.collections[e]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(e,'"]')).forEach((function(n){t.state.collections[e].push(n)})))}},{key:"toggle",value:function toggle(e){var t=this;t.cleanLinks();var n=e.getAttribute("href")||e.getAttribute("data-href"),a=e.getAttribute("data-embed");e.classList.add("loading"),t.state.current=e;var r=e.getAttribute("data-title");r?t.setCaption(r):t.setCaption(""),a?t.embed(n):t.load(n),t.addExtraClass(e.getAttribute("data-lightbox-class"))}},{key:"init",value:function init(){var e=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery]').forEach((function(t){var n=t.getAttribute("data-gallery");e.collectGaleries(n),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget;e.toggle(n)}))}))}},{key:"setState",value:function setState(e){var t=this;t.state=Object.assign({},t.state,e),t.render()}},{key:"render",value:function render(){var e,t=this,n=t.name,a=t.state.current;t.state.target.innerHTML="";var r=document.createElement("div");r.classList.add("meta-".concat(n)),(e=r.classList).add.apply(e,_toConsumableArray(t.state.type)),t.state.target.append(r);var o=document.createElement("div");o.classList.add("meta-".concat(n,"-overlay")),t.state.shown&&o.classList.add("meta-".concat(n,"-overlay--open")),t.state.loading&&o.classList.add("meta-".concat(n,"-overlay--loading")),t.state.error&&o.classList.add("meta-".concat(n,"-overlay--error")),r.append(o);var i=document.createElement("div");i.classList.add("meta-content"),o.append(i);var c=document.createElement("button");if(c.classList.add("meta-nav","meta-close","a"),c.innerHTML=' Close',c.addEventListener("click",(function(e){e.preventDefault(),t.hide()})),i.append(c),a){var s=a.getAttribute("data-gallery");if(s&&t.state.collections[s].length>1){var l=document.createElement("nav");l.classList.add("meta-navs");var d=document.createElement("button");d.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),d.innerHTML=' Previous',d.addEventListener("click",(function(e){e.preventDefault(),t.prev()})),l.append(d);var u=document.createElement("button");u.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),u.innerHTML=' Next',u.addEventListener("click",(function(e){e.preventDefault(),t.next()})),l.append(u),i.append(l)}}var m=document.createElement("section");if(m.classList.add("meta-wrap","typography"),t.state.extraClass&&m.classList.add(t.state.extraClass),m.innerHTML=t.getHtml(),i.append(m),t.state.error){var p=document.createElement("div");p.classList.add("meta-error"),p.innerHTML=t.state.error,i.append(p)}else if(t.state.caption){var f=document.createElement("div");f.classList.add("meta-caption"),f.innerHTML=t.getCaption(),i.append(f)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),t}}]),MetaWindow}(),r=a,o=document.getElementById("MetaLightboxApp");o||(console.warn("MetaWindow: missing container #MetaLightboxApp - create new one"),(o=document.createElement("div")).setAttribute("id","MetaLightboxApp"),document.querySelector("body").append(o));var i=function init(){var e=window.MetaWindow;"undefined"===typeof e&&(e=new r({target:o}),window.MetaWindow=e),e.init()};window.addEventListener("".concat(t),i),window.addEventListener("".concat(e),i),window.addEventListener("MetaWindow.initLinks",i)}()}(); \ No newline at end of file diff --git a/dist/records.json b/dist/records.json index 619cc17..02d4e18 100644 --- a/dist/records.json +++ b/dist/records.json @@ -14,14 +14,14 @@ }, "modules": { "byIdentifier": { - "./node_modules/.pnpm/html-loader@3.1.0_webpack@5.72.0/node_modules/html-loader/dist/cjs.js!./src/html/meta-lightbox.html": 99, - "./node_modules/.pnpm/html-webpack-plugin@5.5.0_webpack@5.72.0/node_modules/html-webpack-plugin/lib/loader.js!./src/index.html": 813, + "./node_modules/.pnpm/html-loader@4.2.0_webpack@5.88.2/node_modules/html-loader/dist/cjs.js!./src/html/meta-lightbox.html": 696, + "./node_modules/.pnpm/html-webpack-plugin@5.5.3_webpack@5.88.2/node_modules/html-webpack-plugin/lib/loader.js!./src/index.html": 210, "javascript/esm|data:text/javascript,__webpack_public_path__ = __webpack_base_uri__ = htmlWebpackPluginPublicPath;": 163 }, "usedIds": [ - 99, 163, - 813 + 210, + 696 ] } } @@ -39,12 +39,12 @@ }, "modules": { "byIdentifier": { - "./node_modules/.pnpm/babel-loader@8.2.5_rb5fcebzp6kx3hqg3ucus54t3m/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/youtube-embed@1.0.0/node_modules/youtube-embed/index.js": 826, - "./node_modules/.pnpm/babel-loader@8.2.5_rb5fcebzp6kx3hqg3ucus54t3m/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./src/js/test-build.js|bb7e39ae93eb42f5e247580063dd4b68": 348 + "./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.22.9_webpack@5.88.2/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/youtube-embed@1.0.0/node_modules/youtube-embed/index.js": 627, + "./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.22.9_webpack@5.88.2/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./src/js/test-build.js|a115d7a7c4af8d20c48b9c4b7ae48edf": 820 }, "usedIds": [ - 348, - 826 + 627, + 820 ] } } \ No newline at end of file diff --git a/dist/report.html b/dist/report.html index a7beef0..23db428 100644 --- a/dist/report.html +++ b/dist/report.html @@ -3,7 +3,7 @@ - @a2nt/meta-lightbox-js [20 Feb 2023 at 16:53] + @a2nt/meta-lightbox-js [7 Aug 2023 at 15:58]
diff --git a/package.json b/package.json index 3a3e16b..fd404ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@a2nt/meta-lightbox-js", - "version": "4.2.4", + "version": "4.2.5", "description": "Universal lightbox", "author": "Tony Air ", "license": "BSD-2-Clause", @@ -52,108 +52,108 @@ }, "dependencies": { "es6-template": "^1.0.4", - "eslint-scope": "^7.1.1", + "eslint-scope": "^7.2.2", "material-design-color": "^2.3.2", "youtube-embed": "^1.0.0" }, "devDependencies": { "@a2nt/image-sprite-webpack-plugin": "^0.2.5", - "@babel/core": "^7.17.10", - "@babel/eslint-parser": "^7.17.0", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.17.3", - "@babel/plugin-syntax-jsx": "^7.16.7", + "@babel/core": "^7.22.9", + "@babel/eslint-parser": "^7.22.9", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.20.7", + "@babel/plugin-syntax-jsx": "^7.22.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-react-jsx": "^7.17.3", - "@babel/plugin-transform-runtime": "^7.17.10", - "@babel/preset-env": "^7.17.10", - "@babel/preset-react": "^7.16.7", - "@babel/runtime": "^7.17.9", - "@googlemaps/markerclustererplus": "*", + "@babel/plugin-transform-react-jsx": "^7.22.5", + "@babel/plugin-transform-runtime": "^7.22.9", + "@babel/preset-env": "^7.22.9", + "@babel/preset-react": "^7.22.5", + "@babel/runtime": "^7.22.6", + "@googlemaps/markerclustererplus": "^1.2.10", "@sucrase/webpack-loader": "^2.0.0", "@ungap/global-this": "^0.4.4", - "@wry/context": "^0.6.1", - "@wry/equality": "^0.5.2", - "@wry/trie": "^0.3.1", + "@wry/context": "^0.7.3", + "@wry/equality": "^0.5.6", + "@wry/trie": "^0.4.3", "animate.css": "^4.1.1", "ansi-html": "^0.0.9", "ansi-regex": "^6.0.1", - "autoprefixer": "^10.4.7", - "babel-loader": "^8.2.5", - "classnames": "^2.3.1", - "copy-webpack-plugin": "^10.2.4", + "autoprefixer": "^10.4.14", + "babel-loader": "^9.1.3", + "classnames": "^2.3.2", + "copy-webpack-plugin": "^11.0.0", "croppie": "^2.6.5", "cross-env": "^7.0.3", - "css-loader": "^6.7.1", - "css-minimizer-webpack-plugin": "^3.4.1", + "css-loader": "^6.8.1", + "css-minimizer-webpack-plugin": "^5.0.1", "debug": "^4.3.4", - "eslint": "^8.14.0", - "eslint-plugin-import": "^2.26.0", + "eslint": "^8.46.0", + "eslint-plugin-import": "^2.28.0", "eslint-plugin-jquery": "^1.5.1", - "eslint-plugin-react": "^7.29.4", + "eslint-plugin-react": "^7.33.1", "events": "^3.3.0", "exif-js": "^2.3.0", - "exports-loader": "^3.1.0", + "exports-loader": "^4.0.0", "fast-json-stable-stringify": "^2.1.0", "fast-levenshtein": "^3.0.0", - "fastest-levenshtein": "^1.0.12", - "favicons": "^6.2.2", - "favicons-webpack-plugin": "5.0.2", + "fastest-levenshtein": "^1.0.16", + "favicons": "^7.1.4", + "favicons-webpack-plugin": "6.0.0", "file-loader": "^6.2.0", "graphql-tag": "^2.12.6", "hoist-non-react-statics": "^3.3.2", - "html-dom-parser": "^1.2.0", - "html-entities": "^2.3.3", - "html-loader": "^3.1.0", - "html-react-parser": "^1.4.12", - "html-webpack-plugin": "^5.5.0", + "html-dom-parser": "^4.0.0", + "html-entities": "^2.4.0", + "html-loader": "^4.2.0", + "html-react-parser": "^4.2.0", + "html-webpack-plugin": "^5.5.3", "img-optimize-loader": "^1.0.7", - "loglevel": "^1.8.0", - "mini-css-extract-plugin": "^2.6.0", + "loglevel": "^1.8.1", + "mini-css-extract-plugin": "^2.7.6", "ms": "^2.1.3", - "msw": "^0.39.2", - "node-fetch": "^3.2.4", + "msw": "^1.2.3", + "node-fetch": "^3.3.2", "object-assign": "^4.1.1", - "optimism": "^0.16.1", - "postcss-loader": "^6.2.1", + "optimism": "^0.17.5", + "postcss-loader": "^7.3.3", "prop-types": "^15.8.1", - "punycode": "^2.1.1", + "punycode": "^2.3.0", "querystring": "^0.2.1", "raw-loader": "^4.0.2", - "react": "^18.1.0", - "react-dom": "^18.1.0", - "react-hot-loader": "^4.13.0", - "react-is": "^18.1.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-hot-loader": "^4.13.1", + "react-is": "^18.2.0", "react-lifecycles-compat": "^3.0.4", - "regenerator-runtime": "^0.13.9", + "regenerator-runtime": "^0.13.11", "resolve-url-loader": "^5.0.0", - "rimraf": "^3.0.2", + "rimraf": "^5.0.1", "routie": "0.0.1", - "sass": "*", + "sass": "^1.64.2", "sass-lint": "^1.13.1", "sass-lint-auto-fix": "^0.21.2", "sass-lint-fix": "^1.12.1", - "sass-loader": "^12.6.0", - "scheduler": "^0.22.0", + "sass-loader": "^13.3.2", + "scheduler": "^0.23.0", "shallowequal": "^1.1.0", - "strip-ansi": "^7.0.1", - "style-loader": "^3.3.1", - "sucrase": "^3.21.0", - "svg-url-loader": "^7.1.1", + "strip-ansi": "^7.1.0", + "style-loader": "^3.3.3", + "sucrase": "^3.34.0", + "svg-url-loader": "^8.0.0", "symbol-observable": "^4.0.0", - "terser-webpack-plugin": "^5.3.1", - "ts-invariant": "^0.9.4", - "tslib": "^2.4.0", - "url": "^0.11.0", + "terser-webpack-plugin": "^5.3.9", + "ts-invariant": "^0.10.3", + "tslib": "^2.6.1", + "url": "^0.11.1", "url-loader": "^4.1.1", - "webpack": "^5.72.0", - "webpack-bundle-analyzer": "^4.5.0", - "webpack-cli": "^4.9.2", - "webpack-dev-server": "^4.8.1", + "webpack": "^5.88.2", + "webpack-bundle-analyzer": "^4.9.0", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.15.1", "webpack-manifest-plugin": "^5.0.0", - "webpack-merge": "^5.8.0", - "yarn": "^1.22.18", - "zen-observable": "^0.8.15", + "webpack-merge": "^5.9.0", + "yarn": "^1.22.19", + "zen-observable": "^0.10.0", "zen-observable-ts": "^1.1.0" }, "stylelint": { diff --git a/src/js/window.js b/src/js/window.js index ab0bb54..d30cf98 100755 --- a/src/js/window.js +++ b/src/js/window.js @@ -55,6 +55,8 @@ class MetaWindow { const title = el.getAttribute('data-title') if (title) { ui.setCaption(title) + }else{ + ui.setCaption('') } if (embed) { @@ -193,7 +195,7 @@ class MetaWindow { }) ui.show() - window.fetch(link).then((resp) => { + window.fetch(link, { mode: "no-cors" }).then((resp) => { // handle success const type = resp.headers.get('content-type') console.log(resp)