diff --git a/dist/js/app.js b/dist/js/app.js index d944aab..fe0386a 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -!function(){var u={155:function(u,y,p){var v,_,b,g;function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return y};var u,y={},p=Object.prototype,v=p.hasOwnProperty,_=Object.defineProperty||function(u,y,p){u[y]=p.value},b="function"==typeof Symbol?Symbol:{},g=b.iterator||"@@iterator",w=b.asyncIterator||"@@asyncIterator",k=b.toStringTag||"@@toStringTag";function define(u,y,p){return Object.defineProperty(u,y,{value:p,enumerable:!0,configurable:!0,writable:!0}),u[y]}try{define({},"")}catch(u){define=function define(u,y,p){return u[y]=p}}function wrap(u,y,p,v){var b=y&&y.prototype instanceof Generator?y:Generator,g=Object.create(b.prototype),w=new Context(v||[]);return _(g,"_invoke",{value:makeInvokeMethod(u,p,w)}),g}function tryCatch(u,y,p){try{return{type:"normal",arg:u.call(y,p)}}catch(u){return{type:"throw",arg:u}}}y.wrap=wrap;var x="suspendedStart",S="suspendedYield",O="executing",E="completed",L={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var A={};define(A,g,(function(){return this}));var j=Object.getPrototypeOf,I=j&&j(j(values([])));I&&I!==p&&v.call(I,g)&&(A=I);var P=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(A);function defineIteratorMethods(u){["next","throw","return"].forEach((function(y){define(u,y,(function(u){return this._invoke(y,u)}))}))}function AsyncIterator(u,y){function invoke(p,_,b,g){var w=tryCatch(u[p],u,_);if("throw"!==w.type){var k=w.arg,x=k.value;return x&&"object"==_typeof(x)&&v.call(x,"__await")?y.resolve(x.__await).then((function(u){invoke("next",u,b,g)}),(function(u){invoke("throw",u,b,g)})):y.resolve(x).then((function(u){k.value=u,b(k)}),(function(u){return invoke("throw",u,b,g)}))}g(w.arg)}var p;_(this,"_invoke",{value:function value(u,v){function callInvokeWithMethodAndArg(){return new y((function(y,p){invoke(u,v,y,p)}))}return p=p?p.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(y,p,v){var _=x;return function(b,g){if(_===O)throw Error("Generator is already running");if(_===E){if("throw"===b)throw g;return{value:u,done:!0}}for(v.method=b,v.arg=g;;){var w=v.delegate;if(w){var k=maybeInvokeDelegate(w,v);if(k){if(k===L)continue;return k}}if("next"===v.method)v.sent=v._sent=v.arg;else if("throw"===v.method){if(_===x)throw _=E,v.arg;v.dispatchException(v.arg)}else"return"===v.method&&v.abrupt("return",v.arg);_=O;var A=tryCatch(y,p,v);if("normal"===A.type){if(_=v.done?E:S,A.arg===L)continue;return{value:A.arg,done:v.done}}"throw"===A.type&&(_=E,v.method="throw",v.arg=A.arg)}}}function maybeInvokeDelegate(y,p){var v=p.method,_=y.iterator[v];if(_===u)return p.delegate=null,"throw"===v&&y.iterator.return&&(p.method="return",p.arg=u,maybeInvokeDelegate(y,p),"throw"===p.method)||"return"!==v&&(p.method="throw",p.arg=new TypeError("The iterator does not provide a '"+v+"' method")),L;var b=tryCatch(_,y.iterator,p.arg);if("throw"===b.type)return p.method="throw",p.arg=b.arg,p.delegate=null,L;var g=b.arg;return g?g.done?(p[y.resultName]=g.value,p.next=y.nextLoc,"return"!==p.method&&(p.method="next",p.arg=u),p.delegate=null,L):g:(p.method="throw",p.arg=new TypeError("iterator result is not an object"),p.delegate=null,L)}function pushTryEntry(u){var y={tryLoc:u[0]};1 in u&&(y.catchLoc=u[1]),2 in u&&(y.finallyLoc=u[2],y.afterLoc=u[3]),this.tryEntries.push(y)}function resetTryEntry(u){var y=u.completion||{};y.type="normal",delete y.arg,u.completion=y}function Context(u){this.tryEntries=[{tryLoc:"root"}],u.forEach(pushTryEntry,this),this.reset(!0)}function values(y){if(y||""===y){var p=y[g];if(p)return p.call(y);if("function"==typeof y.next)return y;if(!isNaN(y.length)){var _=-1,b=function next(){for(;++_=0;--_){var b=this.tryEntries[_],g=b.completion;if("root"===b.tryLoc)return handle("end");if(b.tryLoc<=this.prev){var w=v.call(b,"catchLoc"),k=v.call(b,"finallyLoc");if(w&&k){if(this.prev=0;--p){var _=this.tryEntries[p];if(_.tryLoc<=this.prev&&v.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var b=_;break}}b&&("break"===u||"continue"===u)&&b.tryLoc<=y&&y<=b.finallyLoc&&(b=null);var g=b?b.completion:{};return g.type=u,g.arg=y,b?(this.method="next",this.next=b.finallyLoc,L):this.complete(g)},complete:function complete(u,y){if("throw"===u.type)throw u.arg;return"break"===u.type||"continue"===u.type?this.next=u.arg:"return"===u.type?(this.rval=this.arg=u.arg,this.method="return",this.next="end"):"normal"===u.type&&y&&(this.next=y),L},finish:function finish(u){for(var y=this.tryEntries.length-1;y>=0;--y){var p=this.tryEntries[y];if(p.finallyLoc===u)return this.complete(p.completion,p.afterLoc),resetTryEntry(p),L}},catch:function _catch(u){for(var y=this.tryEntries.length-1;y>=0;--y){var p=this.tryEntries[y];if(p.tryLoc===u){var v=p.completion;if("throw"===v.type){var _=v.arg;resetTryEntry(p)}return _}}throw Error("illegal catch attempt")},delegateYield:function delegateYield(y,p,v){return this.delegate={iterator:values(y),resultName:p,nextLoc:v},"next"===this.method&&(this.arg=u),L}},y}function ownKeys(u,y){var p=Object.keys(u);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(u);y&&(v=v.filter((function(y){return Object.getOwnPropertyDescriptor(u,y).enumerable}))),p.push.apply(p,v)}return p}function _objectSpread(u){for(var y=1;y=u.length?{done:!0}:{done:!1,value:u[v++]}},e:function e(u){throw u},f:_}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,g=!0,w=!1;return{s:function s(){p=p.call(u)},n:function n(){var u=p.next();return g=u.done,u},e:function e(u){w=!0,b=u},f:function f(){try{g||null==p.return||p.return()}finally{if(w)throw b}}}}function _unsupportedIterableToArray(u,y){if(u){if("string"==typeof u)return _arrayLikeToArray(u,y);var p={}.toString.call(u).slice(8,-1);return"Object"===p&&u.constructor&&(p=u.constructor.name),"Map"===p||"Set"===p?Array.from(u):"Arguments"===p||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?_arrayLikeToArray(u,y):void 0}}function _arrayLikeToArray(u,y){(null==y||y>u.length)&&(y=u.length);for(var p=0,v=Array(y);p1&&void 0!==arguments[1]?arguments[1]:{};!function _classCallCheck(u,y){if(!(u instanceof y))throw new TypeError("Cannot call a class as a function")}(this,m),_defineProperty(this,"_eventListener",{select:[],save:[],show:[],clear:[],hide:[]}),this.options=a(m.DEFAULT_OPTIONS,y),this.element=u,this._preBuild(),this.element&&this.options.iconSource.length>0?(this._binEvents(),this._renderdIcons(),this._createModal()):this._catchError("iconSourceMissing")}),[{key:"_preBuild",value:function _preBuild(){var u;this.element=(u=this.element)instanceof HTMLElement?u:"string"==typeof u?document.querySelector(u):null,this.root=function c(u){var y,p=u.theme,v=u.i18n,_=u.closeOnSelect,b=function(u){var y=function t(u,y){var p=u.getAttribute(y);return u.removeAttribute(y),p},p=function i(u){var v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_=y(u,"data-element");_&&(v[_]=u);for(var b=0,g=Array.from(u.children);b\n
\n
\n ').concat("string"==typeof v["text:title"]&&""!==v["text:title"]?"

".concat(v["text:title"],"

"):"",'\n \n \n
\n \n \n \n
\n \n ').concat(_?"":'\n "),"\n
\n \n "));return p.includes("bootstrap")&&(null!==(y=b.save)&&void 0!==y&&y.classList.add("btn","btn-primary"),b.search.classList.add("form-control")),b}(this.options),!Array.isArray(this.options.iconSource)&&this.options.iconSource.length>0&&(this.options.iconSource=[this.options.iconSource])}},{key:"_binEvents",value:function _binEvents(){var u,y,v=this,_=this.options,b=this.root,g=this.element,w=[];this._eventBindings=[p(g,"click",(function(){return v.show()})),p(b.close,"click",(function(){return v.hide()})),p(b.modal,"click",(function(u){u.target===b.modal&&v.hide()})),p(b.search,"keyup",(u=function r(u){var y=v.availableIcons.filter((function(y){var p;return y.value.includes(u.target.value.toLowerCase())||(null===(p=y.categories)||void 0===p?void 0:p.filter((function(y){return y.includes(u.target.value.toLowerCase())})).length)>0}));w.length||(w=document.querySelectorAll(".icon-element")),w.forEach((function(u){u.hidden=!0,y.forEach((function(y){u.classList.contains(y.value)&&(u.hidden=!1)}))}));var r=b.content.querySelector(".is-empty");y.length>0?r&&r.remove():r||b.content.appendChild(o('
'.concat(_.i18n["text:empty"],"
")))},function(){var p=arguments,v=this;clearTimeout(y),y=setTimeout((function(){u.apply(v,p)}),250)}))],_.closeOnSelect||this._eventBindings.push(p(b.save,"click",(function(){return v._onSave()})))}},{key:"hide",value:function hide(){return!!this.isOpen()&&(this.root.modal.classList.remove("is-visible"),this._emit("hide"),this)}},{key:"show",value:function show(){return!this.isOpen()&&(this.root.modal.classList.add("is-visible"),this._emit("show"),this)}},{key:"clear",value:function clear(){this.initialized&&this.currentlySelectName&&(this.currentlySelectName=null,this._emit("clear"))}},{key:"isOpen",value:function isOpen(){return this.root.modal.classList.contains("is-visible")}},{key:"destroy",value:function destroy(){var u=this,y=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.initialized=!1,this._eventBindings.forEach((function(u){return v.apply(void 0,_toConsumableArray(u))})),y&&Object.keys(this).forEach((function(y){return delete u[y]}))}},{key:"_emit",value:function _emit(u){for(var y=this,p=arguments.length,v=new Array(p>1?p-1:0),_=1;_0){_=[];for(var j=0,I=Object.entries(b.categories);j0?_.push(P.toLowerCase()):_=[P.toLowerCase()])}}if(b.chars&&(A.dataset.unicode=l(b.chars,E)),"i"!==g&&L.body)if("markup"===g){var T=document.createElement("template");T.innerHTML=L.body,w=T.content}else(w=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("height","24"),w.setAttribute("width","24"),w.setAttribute("viewBox","0 0 ".concat(L.width?L.width:b.width," ").concat(L.height?L.height:b.height)),w.innerHTML=L.body;else(w=document.createElement("i")).setAttribute("class",A.dataset.value);A.append(w),u.content.appendChild(A),k.availableIcons.push(_objectSpread({value:E,body:w.outerHTML},_.length>0&&{categories:_})),A.addEventListener("click",(function(u){k.currentlySelectName!==u.currentTarget.firstChild.className&&(u.currentTarget.classList.add("is-selected"),v=u.currentTarget,k.currentlySelectName=v.dataset.value,k.SVGString=w.outerHTML,k.emitValues={name:E,value:k.currentlySelectName,svg:k.SVGString},b.chars&&(k.emitValues.unicode=w.dataset.unicode),k._emit("select",k.emitValues)),p&&p.classList.remove("is-selected"),y.closeOnSelect&&k._onSave(),p=v}))},x=0,S=Object.entries(b.icons);x0&&void 0!==arguments[0]?arguments[0]:this.currentlySelectName,y=this.element;y instanceof HTMLInputElement&&this.currentlySelectName&&(y.value=u)}}]);var u,y}();return _defineProperty(g,"DEFAULT_OPTIONS",{theme:"default",closeOnSelect:!0,defaultValue:null,iconSource:[],i18n:{"input:placeholder":"Search icon\u2026","text:title":"Select icon","text:empty":"No results found\u2026","btn:save":"Save"}}),y.default}()},"object"==_typeof(y)&&"object"==_typeof(u)?u.exports=g():(_=[],void 0===(b="function"===typeof(v=g)?v.apply(y,_):v)||(u.exports=b))}},y={};function __webpack_require__(p){var v=y[p];if(void 0!==v)return v.exports;var _=y[p]={id:p,loaded:!1,exports:{}};return u[p](_,_.exports,__webpack_require__),_.loaded=!0,_.exports}__webpack_require__.n=function(u){var y=u&&u.__esModule?function(){return u.default}:function(){return u};return __webpack_require__.d(y,{a:y}),y},__webpack_require__.d=function(u,y){for(var p in y)__webpack_require__.o(y,p)&&!__webpack_require__.o(u,p)&&Object.defineProperty(u,p,{enumerable:!0,get:y[p]})},__webpack_require__.o=function(u,y){return Object.prototype.hasOwnProperty.call(u,y)},__webpack_require__.nmd=function(u){return u.paths=[],u.children||(u.children=[]),u},function(){"use strict";var u=__webpack_require__(155),y=__webpack_require__.n(u);jQuery.entwine((function($){$(".icp-auto").entwine({onmatch:function onmatch(){new(y())($(".icp-auto")[0],{theme:"bootstrap-5",iconSource:[],closeOnSelect:!0,defaultValue:null,i18n:{"input:placeholder":"Search icon\u2026","text:title":"Select icon","text:empty":"No results found\u2026","btn:save":"Save"}})}})}))}()}(); \ No newline at end of file +!function(){var u={155:function(u,y,p){var v,_,b,g;function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return y};var u,y={},p=Object.prototype,v=p.hasOwnProperty,_=Object.defineProperty||function(u,y,p){u[y]=p.value},b="function"==typeof Symbol?Symbol:{},g=b.iterator||"@@iterator",w=b.asyncIterator||"@@asyncIterator",k=b.toStringTag||"@@toStringTag";function define(u,y,p){return Object.defineProperty(u,y,{value:p,enumerable:!0,configurable:!0,writable:!0}),u[y]}try{define({},"")}catch(u){define=function define(u,y,p){return u[y]=p}}function wrap(u,y,p,v){var b=y&&y.prototype instanceof Generator?y:Generator,g=Object.create(b.prototype),w=new Context(v||[]);return _(g,"_invoke",{value:makeInvokeMethod(u,p,w)}),g}function tryCatch(u,y,p){try{return{type:"normal",arg:u.call(y,p)}}catch(u){return{type:"throw",arg:u}}}y.wrap=wrap;var x="suspendedStart",S="suspendedYield",O="executing",A="completed",E={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var L={};define(L,g,(function(){return this}));var j=Object.getPrototypeOf,I=j&&j(j(values([])));I&&I!==p&&v.call(I,g)&&(L=I);var P=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(L);function defineIteratorMethods(u){["next","throw","return"].forEach((function(y){define(u,y,(function(u){return this._invoke(y,u)}))}))}function AsyncIterator(u,y){function invoke(p,_,b,g){var w=tryCatch(u[p],u,_);if("throw"!==w.type){var k=w.arg,x=k.value;return x&&"object"==_typeof(x)&&v.call(x,"__await")?y.resolve(x.__await).then((function(u){invoke("next",u,b,g)}),(function(u){invoke("throw",u,b,g)})):y.resolve(x).then((function(u){k.value=u,b(k)}),(function(u){return invoke("throw",u,b,g)}))}g(w.arg)}var p;_(this,"_invoke",{value:function value(u,v){function callInvokeWithMethodAndArg(){return new y((function(y,p){invoke(u,v,y,p)}))}return p=p?p.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(y,p,v){var _=x;return function(b,g){if(_===O)throw Error("Generator is already running");if(_===A){if("throw"===b)throw g;return{value:u,done:!0}}for(v.method=b,v.arg=g;;){var w=v.delegate;if(w){var k=maybeInvokeDelegate(w,v);if(k){if(k===E)continue;return k}}if("next"===v.method)v.sent=v._sent=v.arg;else if("throw"===v.method){if(_===x)throw _=A,v.arg;v.dispatchException(v.arg)}else"return"===v.method&&v.abrupt("return",v.arg);_=O;var L=tryCatch(y,p,v);if("normal"===L.type){if(_=v.done?A:S,L.arg===E)continue;return{value:L.arg,done:v.done}}"throw"===L.type&&(_=A,v.method="throw",v.arg=L.arg)}}}function maybeInvokeDelegate(y,p){var v=p.method,_=y.iterator[v];if(_===u)return p.delegate=null,"throw"===v&&y.iterator.return&&(p.method="return",p.arg=u,maybeInvokeDelegate(y,p),"throw"===p.method)||"return"!==v&&(p.method="throw",p.arg=new TypeError("The iterator does not provide a '"+v+"' method")),E;var b=tryCatch(_,y.iterator,p.arg);if("throw"===b.type)return p.method="throw",p.arg=b.arg,p.delegate=null,E;var g=b.arg;return g?g.done?(p[y.resultName]=g.value,p.next=y.nextLoc,"return"!==p.method&&(p.method="next",p.arg=u),p.delegate=null,E):g:(p.method="throw",p.arg=new TypeError("iterator result is not an object"),p.delegate=null,E)}function pushTryEntry(u){var y={tryLoc:u[0]};1 in u&&(y.catchLoc=u[1]),2 in u&&(y.finallyLoc=u[2],y.afterLoc=u[3]),this.tryEntries.push(y)}function resetTryEntry(u){var y=u.completion||{};y.type="normal",delete y.arg,u.completion=y}function Context(u){this.tryEntries=[{tryLoc:"root"}],u.forEach(pushTryEntry,this),this.reset(!0)}function values(y){if(y||""===y){var p=y[g];if(p)return p.call(y);if("function"==typeof y.next)return y;if(!isNaN(y.length)){var _=-1,b=function next(){for(;++_=0;--_){var b=this.tryEntries[_],g=b.completion;if("root"===b.tryLoc)return handle("end");if(b.tryLoc<=this.prev){var w=v.call(b,"catchLoc"),k=v.call(b,"finallyLoc");if(w&&k){if(this.prev=0;--p){var _=this.tryEntries[p];if(_.tryLoc<=this.prev&&v.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var b=_;break}}b&&("break"===u||"continue"===u)&&b.tryLoc<=y&&y<=b.finallyLoc&&(b=null);var g=b?b.completion:{};return g.type=u,g.arg=y,b?(this.method="next",this.next=b.finallyLoc,E):this.complete(g)},complete:function complete(u,y){if("throw"===u.type)throw u.arg;return"break"===u.type||"continue"===u.type?this.next=u.arg:"return"===u.type?(this.rval=this.arg=u.arg,this.method="return",this.next="end"):"normal"===u.type&&y&&(this.next=y),E},finish:function finish(u){for(var y=this.tryEntries.length-1;y>=0;--y){var p=this.tryEntries[y];if(p.finallyLoc===u)return this.complete(p.completion,p.afterLoc),resetTryEntry(p),E}},catch:function _catch(u){for(var y=this.tryEntries.length-1;y>=0;--y){var p=this.tryEntries[y];if(p.tryLoc===u){var v=p.completion;if("throw"===v.type){var _=v.arg;resetTryEntry(p)}return _}}throw Error("illegal catch attempt")},delegateYield:function delegateYield(y,p,v){return this.delegate={iterator:values(y),resultName:p,nextLoc:v},"next"===this.method&&(this.arg=u),E}},y}function ownKeys(u,y){var p=Object.keys(u);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(u);y&&(v=v.filter((function(y){return Object.getOwnPropertyDescriptor(u,y).enumerable}))),p.push.apply(p,v)}return p}function _objectSpread(u){for(var y=1;y=u.length?{done:!0}:{done:!1,value:u[v++]}},e:function e(u){throw u},f:_}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b,g=!0,w=!1;return{s:function s(){p=p.call(u)},n:function n(){var u=p.next();return g=u.done,u},e:function e(u){w=!0,b=u},f:function f(){try{g||null==p.return||p.return()}finally{if(w)throw b}}}}function _unsupportedIterableToArray(u,y){if(u){if("string"==typeof u)return _arrayLikeToArray(u,y);var p={}.toString.call(u).slice(8,-1);return"Object"===p&&u.constructor&&(p=u.constructor.name),"Map"===p||"Set"===p?Array.from(u):"Arguments"===p||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?_arrayLikeToArray(u,y):void 0}}function _arrayLikeToArray(u,y){(null==y||y>u.length)&&(y=u.length);for(var p=0,v=Array(y);p1&&void 0!==arguments[1]?arguments[1]:{};!function _classCallCheck(u,y){if(!(u instanceof y))throw new TypeError("Cannot call a class as a function")}(this,m),_defineProperty(this,"_eventListener",{select:[],save:[],show:[],clear:[],hide:[]}),this.options=a(m.DEFAULT_OPTIONS,y),this.element=u,this._preBuild(),this.element&&this.options.iconSource.length>0?(this._binEvents(),this._renderdIcons(),this._createModal()):this._catchError("iconSourceMissing")}),[{key:"_preBuild",value:function _preBuild(){var u;this.element=(u=this.element)instanceof HTMLElement?u:"string"==typeof u?document.querySelector(u):null,this.root=function c(u){var y,p=u.theme,v=u.i18n,_=u.closeOnSelect,b=function(u){var y=function t(u,y){var p=u.getAttribute(y);return u.removeAttribute(y),p},p=function i(u){var v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},_=y(u,"data-element");_&&(v[_]=u);for(var b=0,g=Array.from(u.children);b\n
\n
\n ').concat("string"==typeof v["text:title"]&&""!==v["text:title"]?"

".concat(v["text:title"],"

"):"",'\n \n \n
\n \n \n \n
\n \n ').concat(_?"":'\n "),"\n
\n \n "));return p.includes("bootstrap")&&(null!==(y=b.save)&&void 0!==y&&y.classList.add("btn","btn-primary"),b.search.classList.add("form-control")),b}(this.options),!Array.isArray(this.options.iconSource)&&this.options.iconSource.length>0&&(this.options.iconSource=[this.options.iconSource])}},{key:"_binEvents",value:function _binEvents(){var u,y,v=this,_=this.options,b=this.root,g=this.element,w=[];this._eventBindings=[p(g,"click",(function(){return v.show()})),p(b.close,"click",(function(){return v.hide()})),p(b.modal,"click",(function(u){u.target===b.modal&&v.hide()})),p(b.search,"keyup",(u=function r(u){var y=v.availableIcons.filter((function(y){var p;return y.value.includes(u.target.value.toLowerCase())||(null===(p=y.categories)||void 0===p?void 0:p.filter((function(y){return y.includes(u.target.value.toLowerCase())})).length)>0}));w.length||(w=document.querySelectorAll(".icon-element")),w.forEach((function(u){u.hidden=!0,y.forEach((function(y){u.classList.contains(y.value)&&(u.hidden=!1)}))}));var r=b.content.querySelector(".is-empty");y.length>0?r&&r.remove():r||b.content.appendChild(o('
'.concat(_.i18n["text:empty"],"
")))},function(){var p=arguments,v=this;clearTimeout(y),y=setTimeout((function(){u.apply(v,p)}),250)}))],_.closeOnSelect||this._eventBindings.push(p(b.save,"click",(function(){return v._onSave()})))}},{key:"hide",value:function hide(){return!!this.isOpen()&&(this.root.modal.classList.remove("is-visible"),this._emit("hide"),this)}},{key:"show",value:function show(){return!this.isOpen()&&(this.root.modal.classList.add("is-visible"),this._emit("show"),this)}},{key:"clear",value:function clear(){this.initialized&&this.currentlySelectName&&(this.currentlySelectName=null,this._emit("clear"))}},{key:"isOpen",value:function isOpen(){return this.root.modal.classList.contains("is-visible")}},{key:"destroy",value:function destroy(){var u=this,y=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.initialized=!1,this._eventBindings.forEach((function(u){return v.apply(void 0,_toConsumableArray(u))})),y&&Object.keys(this).forEach((function(y){return delete u[y]}))}},{key:"_emit",value:function _emit(u){for(var y=this,p=arguments.length,v=new Array(p>1?p-1:0),_=1;_0){_=[];for(var j=0,I=Object.entries(b.categories);j0?_.push(P.toLowerCase()):_=[P.toLowerCase()])}}if(b.chars&&(L.dataset.unicode=l(b.chars,A)),"i"!==g&&E.body)if("markup"===g){var T=document.createElement("template");T.innerHTML=E.body,w=T.content}else(w=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("height","24"),w.setAttribute("width","24"),w.setAttribute("viewBox","0 0 ".concat(E.width?E.width:b.width," ").concat(E.height?E.height:b.height)),w.innerHTML=E.body;else(w=document.createElement("i")).setAttribute("class",L.dataset.value);L.append(w),u.content.appendChild(L),k.availableIcons.push(_objectSpread({value:A,body:w.outerHTML},_.length>0&&{categories:_})),L.addEventListener("click",(function(u){k.currentlySelectName!==u.currentTarget.firstChild.className&&(u.currentTarget.classList.add("is-selected"),v=u.currentTarget,k.currentlySelectName=v.dataset.value,k.SVGString=w.outerHTML,k.emitValues={name:A,value:k.currentlySelectName,svg:k.SVGString},b.chars&&(k.emitValues.unicode=w.dataset.unicode),k._emit("select",k.emitValues)),p&&p.classList.remove("is-selected"),y.closeOnSelect&&k._onSave(),p=v}))},x=0,S=Object.entries(b.icons);x0&&void 0!==arguments[0]?arguments[0]:this.currentlySelectName,y=this.element;y instanceof HTMLInputElement&&this.currentlySelectName&&(y.value=u)}}]);var u,y}();return _defineProperty(g,"DEFAULT_OPTIONS",{theme:"default",closeOnSelect:!0,defaultValue:null,iconSource:[],i18n:{"input:placeholder":"Search icon\u2026","text:title":"Select icon","text:empty":"No results found\u2026","btn:save":"Save"}}),y.default}()},"object"==_typeof(y)&&"object"==_typeof(u)?u.exports=g():(_=[],void 0===(b="function"===typeof(v=g)?v.apply(y,_):v)||(u.exports=b))}},y={};function __webpack_require__(p){var v=y[p];if(void 0!==v)return v.exports;var _=y[p]={id:p,loaded:!1,exports:{}};return u[p](_,_.exports,__webpack_require__),_.loaded=!0,_.exports}__webpack_require__.n=function(u){var y=u&&u.__esModule?function(){return u.default}:function(){return u};return __webpack_require__.d(y,{a:y}),y},__webpack_require__.d=function(u,y){for(var p in y)__webpack_require__.o(y,p)&&!__webpack_require__.o(u,p)&&Object.defineProperty(u,p,{enumerable:!0,get:y[p]})},__webpack_require__.o=function(u,y){return Object.prototype.hasOwnProperty.call(u,y)},__webpack_require__.nmd=function(u){return u.paths=[],u.children||(u.children=[]),u},function(){"use strict";var u=__webpack_require__(155),y=__webpack_require__.n(u);jQuery.entwine((function($){$(".icp-auto").entwine({onmatch:function onmatch(){new(y())($(".icp-auto")[0],{theme:"bootstrap-5",iconSource:["FontAwesome Brands 6","FontAwesome Solid 6","FontAwesome Regular 6"],closeOnSelect:!0,defaultValue:null,i18n:{"input:placeholder":"Search icon\u2026","text:title":"Select icon","text:empty":"No results found\u2026","btn:save":"Save"}})}})}))}()}(); \ No newline at end of file diff --git a/dist/records.json b/dist/records.json index e6ce32c..850f196 100644 --- a/dist/records.json +++ b/dist/records.json @@ -10,60 +10,6 @@ 524 ] }, - "mini-css-extract-plugin /mnt/data/srv/dist/repositories/silverstripe-font-awesome/node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/sass-loader@13.3.3_sass@1.77.8_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./node_modules/.pnpm/vanilla-icon-picker@1.3.0/node_modules/vanilla-icon-picker/src/scss/themes/icon-picker.bootstrap-5.scss": [ - { - "chunks": { - "byName": { - "child": 615 - }, - "bySource": { - "0 child": 615 - }, - "usedIds": [ - 615 - ] - }, - "modules": { - "byIdentifier": { - "./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.9_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/runtime/api.js": 221, - "./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.9_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/runtime/sourceMaps.js": 991, - "./node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/sass-loader@13.3.3_sass@1.77.8_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./node_modules/.pnpm/vanilla-icon-picker@1.3.0/node_modules/vanilla-icon-picker/src/scss/themes/icon-picker.bootstrap-5.scss": 978 - }, - "usedIds": [ - 221, - 978, - 991 - ] - } - } - ], - "mini-css-extract-plugin /mnt/data/srv/dist/repositories/silverstripe-font-awesome/node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/sass-loader@13.3.3_sass@1.77.8_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./src/scss/app.scss": [ - { - "chunks": { - "byName": { - "child": 615 - }, - "bySource": { - "0 child": 615 - }, - "usedIds": [ - 615 - ] - }, - "modules": { - "byIdentifier": { - "./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.9_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/runtime/api.js": 221, - "./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.9_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/runtime/sourceMaps.js": 991, - "./node_modules/.pnpm/css-loader@6.11.0_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/sass-loader@13.3.3_sass@1.77.8_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./src/scss/app.scss": 196 - }, - "usedIds": [ - 196, - 221, - 991 - ] - } - } - ], "modules": { "byIdentifier": { "./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.9_webpack@5.93.0_webpack-cli@5.1.4_/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/vanilla-icon-picker@1.3.0/node_modules/vanilla-icon-picker/dist/icon-picker.min.js": 155, diff --git a/dist/report.html b/dist/report.html index 081c1d5..f5b7246 100644 --- a/dist/report.html +++ b/dist/report.html @@ -3,7 +3,7 @@ - @a2nt/ss-bootstrap-ui-webpack-boilerplate-react [27 Jul 2024 at 11:20] + @a2nt/ss-bootstrap-ui-webpack-boilerplate-react [27 Jul 2024 at 11:24] diff --git a/src/js/app.js b/src/js/app.js index feb2c5d..18049a3 100755 --- a/src/js/app.js +++ b/src/js/app.js @@ -32,7 +32,11 @@ import IconPicker from 'vanilla-icon-picker' // url: 'https://git.homegu.com/raw/iconify/icon-sets/master/json/academicons.json' // } // ] - iconSource: [], + iconSource: [ + 'FontAwesome Brands 6', + 'FontAwesome Solid 6', + 'FontAwesome Regular 6', + ], // Close icon picker modal when icon is selected // If is `false` save button appear