dynamic-html-helpers 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bundle/htmlhelpers.script.js +2519 -0
- package/Bundle/htmlhelpers.script.min.js +2 -1
- package/README.md +3 -2
- package/index.js +0 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
"use strict";var HTMLHelpers=(()=>{var ge=Object.defineProperty;var en=Object.getOwnPropertyDescriptor;var tn=Object.getOwnPropertyNames;var nn=Object.prototype.hasOwnProperty;var rn=(e,t)=>{for(var n in t)ge(e,n,{get:t[n],enumerable:!0})},on=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tn(t))!nn.call(e,o)&&o!==n&&ge(e,o,{get:()=>t[o],enumerable:!(r=en(t,o))||r.enumerable});return e};var an=e=>on(ge({},"__esModule",{value:!0}),e);var Eo={};rn(Eo,{$:()=>H,$D:()=>D,logFactory:()=>Lo,regexhelper:()=>Gt,splat:()=>Qe});var{IS:m,maybe:nt,$Wrap:Mo,xProxy:Zo,isNothing:Po}=ln();function ln(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),p();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:j,isNaN:k,isInfinity:M,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case k:return f?"NaN":e({trial:P=>String(w)})===String(a);case M:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case j===Boolean:return l?j===l:"Boolean";default:return g(a,l,f,s(a,j))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),j=a==null,k=!j&&Object.getPrototypeOf(a)?.constructor,M=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:j,noShouldbe:c,compareTo:f,inputCTOR:k,isNaN:M,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function g(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function p(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var sn=fn(),Se=un(),ee=cn();function un(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function cn(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function fn(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var We={html:"innerHTML",text:"textContent",class:"className"},mn=dn();function dn(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case wn(r):return Ue(t,r,n);default:return Ue(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Ue(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>xn(n):$n(t)}}),e[t]}function pn(e,t,n){return t=t?.isJQx&&t.first()||t,nt({trial:r=>vn(t)?e.append(t):ot(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
|
|
1
|
+
"use strict";
|
|
2
|
+
var HTMLHelpers=(()=>{var ge=Object.defineProperty;var en=Object.getOwnPropertyDescriptor;var tn=Object.getOwnPropertyNames;var nn=Object.prototype.hasOwnProperty;var rn=(e,t)=>{for(var n in t)ge(e,n,{get:t[n],enumerable:!0})},on=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tn(t))!nn.call(e,o)&&o!==n&&ge(e,o,{get:()=>t[o],enumerable:!(r=en(t,o))||r.enumerable});return e};var an=e=>on(ge({},"__esModule",{value:!0}),e);var Eo={};rn(Eo,{$:()=>H,$D:()=>D,logFactory:()=>Lo,regexhelper:()=>Gt,splat:()=>Qe});var{IS:m,maybe:nt,$Wrap:Mo,xProxy:Zo,isNothing:Po}=ln();function ln(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),p();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:j,isNaN:k,isInfinity:M,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case k:return f?"NaN":e({trial:P=>String(w)})===String(a);case M:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case j===Boolean:return l?j===l:"Boolean";default:return g(a,l,f,s(a,j))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),j=a==null,k=!j&&Object.getPrototypeOf(a)?.constructor,M=Number.isNaN(a)||e({trial:P=>String(a)==="NaN"}),Z=e({trial:P=>String(a)})==="Infinity";return{noInput:j,noShouldbe:c,compareTo:f,inputCTOR:k,isNaN:M,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function g(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function p(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var sn=fn(),Se=un(),ee=cn();function un(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function cn(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function fn(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var We={html:"innerHTML",text:"textContent",class:"className"},mn=dn();function dn(){let e={get(t,n){let r=String(n)?.toLowerCase();switch(!0){case r in t:return t[r];case wn(r):return Ue(t,r,n);default:return Ue(t,r,n,!0)}},enumerable:!1,configurable:!1};return new Proxy({},e)}function Ue(e,t,n,r=!1){return Object.defineProperty(e,t,{get(){return r?o=>xn(n):$n(t)}}),e[t]}function pn(e,t,n){return t=t?.isJQx&&t.first()||t,nt({trial:r=>vn(t)?e.append(t):ot(t)?e.insertAdjacentHTML("beforeend",t):e.append(t),whenError:r=>console.info(`${n} (for root ${e}) not created, reason
|
|
2
3
|
`,r)})}function gn(e,t,...n){let r=yn(t,e);return n?.forEach(o=>pn(r,o,e)),r}function yn(e,t){switch(e=je(t)?Sn(e):e?.isJQx?e.first():e,!0){case m(e,String):return G(t,ot(e,t)?{html:e}:{text:e});case m(e,Node):return bn(t,e);default:return G(t,e)}}function hn(e){return delete e.data,Object.keys(e).length<1||Object.keys(e).forEach(t=>{let n=t.toLowerCase();n in We&&(e[We[n]]=e[t],delete e[t])}),e}function bn(e,t){let n=G(e);return n.append(t),n}function G(e,t={}){t=rt(t,{});let n=Object.entries(t.data??{}),r=Object.assign(je(e)?new Comment(t?.text):document.createElement(e),hn(t));return n.length&&n.forEach(([o,i])=>r.dataset[o]=String(i)),r}function rt(e,t){return t?m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:t}):m(e,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function Sn(e){return rt(e)?e?.text??e?.textContent??"":String(e)}function xn(e){return G("b",{style:"color:red",text:`'${e}' is not a valid HTML-tag`})}function ot(e,t){return!je(t)&&m(e,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(e)}function vn(e){return e?.constructor===Comment||e?.constructor===CharacterData}function je(e){return e?.constructor===Comment||/comment/i.test(e)}function wn(e){return!m(G(e),HTMLUnknownElement)}function $n(e){return(t,...n)=>gn(e,t,...n)}var{IS:oe,maybe:Fo,$Wrap:zo,xProxy:Ho,isNothing:Ro}=Tn();function Tn(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),p();let e=S(),[t,n]=[h(),L()];return n.custom(),{IS:r,maybe:e,$Wrap:t,isNothing:d,xProxy:n};function r(a,...l){if(e({trial:f=>"isTypes"in(l?.[0]??{})})){let f=l[0];return"defaultValue"in f?v(a,f):"notTypes"in f?b(a,f):r(a,...[f.isTypes].flat())}let c=typeof a=="symbol"?Symbol.isSymbol:a;return l.length>1?y(c,...l):i(a,...l)}function o(a){return a?.[Symbol.proxy]??r(a)}function i(a,...l){let{noInput:c,noShouldbe:f,compareTo:w,inputCTOR:j,isNaN:k,isInfinity:M,shouldBeFirstElementIsNothing:Z}=u(a,...l);switch(l=l.length&&l[0],!0){case Z:return String(a)===String(w);case(a?.[Symbol.proxy]&&f):return a[Symbol.proxy];case k:return f?"NaN":e({trial:P=>String(w)})===String(a);case M:return f?"Infinity":e({trial:P=>String(w)})===String(a);case c:return f?String(a):String(w)===String(a);case j===Boolean:return l?j===l:"Boolean";default:return g(a,l,f,s(a,j))}}function s(a,l){return a===0?Number:a===""?String:a?l:{name:String(a)}}function u(a,...l){let c=l.length<1,f=!c&&l[0],w=!c&&d(l[0]),j=a==null,k=!j&&Object.getPrototypeOf(a)?.constructor,M=e({trial:P=>String(a)})==="NaN",Z=e({trial:P=>String(a)})==="Infinity";return{noInput:j,noShouldbe:c,compareTo:f,inputCTOR:k,isNaN:M,isInfinity:Z,shouldBeFirstElementIsNothing:w}}function g(a,l,c,f){switch(!0){case(!c&&l===a||a?.[Symbol.proxy]&&l===Proxy):return!0;case e({trial:w=>String(l)})==="NaN":return String(a)==="NaN";case(a?.[Symbol.toStringTag]&&r(l,String)):return String(l)===a[Symbol.toStringTag];default:return l?e({trial:w=>a instanceof l})||l===f||l===Object.getPrototypeOf(f)||`${l?.name}`===f?.name:a?.[Symbol.toStringTag]&&`[object ${a?.[Symbol.toStringTag]}]`||f?.name||String(f)}}function y(a,...l){return l.some(c=>r(a,c))}function d(a,l=!1){let c=a==null;return c=l?c||r(a,1/0)||r(a,NaN):c,c}function S(){let a=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return a(l)}catch(f){return a(c,f)}}}function h(){return function(a){return Object.freeze({get value(){return a},get[Symbol.type](){return o(a)},get type(){return o(a)},[Symbol.is](...l){return r(a,...l)},is(...l){return r(a,...l)}})}}function v(a,{defaultValue:l,isTypes:c=[void 0],notTypes:f}={}){return c=c?.constructor!==Array?[c]:c,f=f&&f?.constructor!==Array?[f]:[],f.length<1?r(a,...c)?a:l:b(a,{isTypes:c,notTypes:f})?a:l}function b(a,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,r(a,...l)&&!r(a,...c)}function p(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...a){return r(this,...a)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(a){return o(a)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(a,...l){return r(a,...l)},enumerable:!1,configurable:!1}}))}function x(a){let l=String(Object.getPrototypeOf(a)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function T(a){let l=a.set;return a.set=(c,f,w)=>f===Symbol.proxy?c[f]=w:l(c,f,w),a}function L(){let a=Proxy;return{native(){Proxy=a},custom(){Proxy=new a(a,{construct(l,c){for(let w of c)w.set&&(w=T(w));let f=new l(...c);return f[Symbol.proxy]=`Proxy (${x(c[0])})`,f}})}}}}var it=On;function On({styleSheet:e,createWithId:t}={}){let{tryParseAtOrNestedRules:n,ruleExists:r,checkParams:o,sheet:i,removeRules:s,consider:u,currentSheetID:g}=Dn({styleSheet:e,createWithId:t});function y(b,p){if(b&&p.removeProperties){Object.keys(p.removeProperties).forEach(x=>b.style.removeProperty(qe(x)));return}Object.entries(p).forEach(([x,T])=>{x=qe(x.trim()),T=T.trim();let L;if(/!important/.test(T)&&(T=T.slice(0,T.indexOf("!important")).trim(),L="important"),!CSS.supports(x,T))return console.error(`StylingFactory ${g} error: '${x}' with value '${T}' not supported (yet)`);Be(()=>b.style.setProperty(x,T,L),`StylingFactory ${g} (setRule4Selector) failed`)})}function d(b,p,x=i){if(b=b?.trim?.(),!oe(b,String)||!b.length||/[;,]$/g.test(b))return console.error(`StylingFactory ${g} (setRules): [${b||"[no selector given]"}] is not a valid selector`);if(p.removeRule)return s(b);let T=r(b,!0),L=T||x.cssRules[x.insertRule(`${b} {}`,x.cssRules.length||0)];return u(()=>y(L,p),b,T)}function S(b){let p=b.trim().split(/{/,2),x=p.shift().trim();if(!oe(x,String)||!x?.trim()?.length)return console.error(`StylingFactory ${g} (doParse): no (valid) selector could be extracted from rule ${xe(b)}`);let T=En(p.shift());return Be(()=>d(x,T),`StylingFactory ${g} (setRules) failed`)}function h(b){let p=n(b);return p.done?p.existing:S(b)}function v(b,p){return b.trim().startsWith("@media")?h(Nn(b,p)):d(b,p)}return function(b,p={}){return o(b,p)&&(Object.keys(p).length?v(b,p):h(b))}}function Dn({styleSheet:e,createWithId:t}){let n="Note: The rule or some of its properties may not be supported by your browser (yet)",r=`for style#${t}`;e=t?o(t):e;function o(h){let v=document.querySelector(`#${h}`)?.sheet;if(v)return v;let b=Object.assign(document.createElement("style"),{id:h});return document.head.insertAdjacentElement("beforeend",b),b.sheet}function i(h){return console.error(`StylingFactory ${r} [rule: ${h}]
|
|
3
4
|
=> @charset, @namespace and @import are not supported here`),{done:!0}}function s(h,v){return[...e.rules].find(b=>v?Ve(b.selectorText||"",h):Ln`${Cn(h)}${[..."gim"]}`.test(b.cssText))}function u(h){return/^@charset|@import|namespace/i.test(h.trim())?i(h):h.match(/}/g)?.length>1?{existing:d(h,1),done:!0}:{done:!1}}function g(h){let v=[...e.cssRules].reduce((p,x,T)=>Ve(x.selectorText||"",h)&&p.concat(T)||p,[]),b=v.length;return v.forEach(p=>e.deleteRule(p)),b>0?console.info(`\u2714 Removed ${b} instance${b>1?"s":""} of selector ${h} from ${r.slice(4)}`):console.info(`\u2714 Remove rule: selector ${h} does not exist in ${r.slice(4)}`)}function y(h,v){return h&&oe(h,String)&&h.trim().length>0&&oe(v,Object)||(console.error(`StylingFactory ${r} called with invalid parameters`),!1)}function d(h){h=h.trim();let v=h.slice(0,h.indexOf("{")).trim(),b=!!s(v);try{return e.insertRule(`${h}`,e.cssRules.length),b}catch(p){return console.error(`StylingFactory ${r} (tryParse) ${p.name} Error:
|
|
4
5
|
${p.message}
|
package/README.md
CHANGED
|
@@ -29,8 +29,9 @@ This will install the bundled code files to a folder of choice.
|
|
|
29
29
|
`npm run installBundleTo "[path to install to]"`
|
|
30
30
|
|
|
31
31
|
**Prerequisites**
|
|
32
|
-
|
|
33
|
-
-[x] [
|
|
32
|
+
|
|
33
|
+
- [x] [nodejs](https://nodejs.org/en) must be installed.
|
|
34
|
+
- [x] [path to install to] must be a valid path string (e.g. `d:/webstuff/mysite/script`).
|
|
34
35
|
If the folder doesn't exist it will be created.
|
|
35
36
|
|
|
36
37
|
### Use as standalone script
|
package/index.js
CHANGED