@3t-transform/threeteeui 0.1.58 → 0.1.60
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/dist/cjs/{domsanitiser.options-cd2932a9.js → domsanitiser.options-1dfa7205.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tttx-button.cjs.entry.js +5 -3
- package/dist/cjs/tttx-dialog-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx-form.cjs.entry.js +2 -2
- package/dist/cjs/tttx-list.cjs.entry.js +2 -2
- package/dist/cjs/tttx-tree-view.cjs.entry.js +92 -0
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +20 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +22 -2
- package/dist/collection/components/molecules/tttx-form/tttx-form.css +20 -0
- package/dist/collection/components/molecules/tttx-list/tttx-list.css +3 -0
- package/dist/collection/components/molecules/tttx-tree-view/helper/helper.js +1 -0
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.css +72 -0
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +140 -0
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +698 -0
- package/dist/components/domsanitiser.options.js +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/tttx-button2.js +6 -3
- package/dist/components/tttx-form.js +1 -1
- package/dist/components/tttx-list.js +1 -1
- package/dist/components/tttx-tree-view.d.ts +11 -0
- package/dist/components/tttx-tree-view.js +120 -0
- package/dist/esm/{domsanitiser.options-563c1cf3.js → domsanitiser.options-97a33389.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tttx-button.entry.js +5 -3
- package/dist/esm/tttx-dialog-box.entry.js +1 -1
- package/dist/esm/tttx-form.entry.js +2 -2
- package/dist/esm/tttx-list.entry.js +2 -2
- package/dist/esm/tttx-tree-view.entry.js +88 -0
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-2f066b53.entry.js +1 -0
- package/dist/tttx/p-3c7e11d9.entry.js +1 -0
- package/dist/tttx/{p-811f3acf.entry.js → p-57621fdb.entry.js} +1 -1
- package/dist/tttx/{p-d3835fde.js → p-5ed38d61.js} +2 -2
- package/dist/tttx/{p-909c090d.entry.js → p-5fcac0c3.entry.js} +1 -1
- package/dist/tttx/{p-8b511fff.entry.js → p-cec36804.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +1 -0
- package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +1 -1
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -1
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +1 -1
- package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +1 -1
- package/dist/types/components/molecules/tttx-tree-view/helper/helper.d.ts +14 -0
- package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.d.ts +14 -0
- package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.stories.d.ts +20 -0
- package/dist/types/components.d.ts +23 -0
- package/package.json +1 -1
- package/dist/tttx/p-28d80500.entry.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{c as t,a as e}from"./p-112455b1.js";var n=t((function(t){
|
|
2
|
-
/*! @license DOMPurify 3.0.
|
|
3
|
-
t.exports=function(){const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object;let{freeze:r,seal:a,create:l}=Object,{apply:s,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(t,e,n){return t.apply(e,n)}),r||(r=function(t){return t}),a||(a=function(t){return t}),c||(c=function(t,e){return new t(...e)});const f=T(Array.prototype.forEach),u=T(Array.prototype.pop),m=T(Array.prototype.push),p=T(String.prototype.toLowerCase),d=T(String.prototype.toString),g=T(String.prototype.match),h=T(String.prototype.replace),y=T(String.prototype.indexOf),b=T(String.prototype.trim),w=T(RegExp.prototype.test),x=(v=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return c(v,e)});var v;function T(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return s(t,e,o)}}function k(t,o,i){var r;i=null!==(r=i)&&void 0!==r?r:p,e&&e(t,null);let a=o.length;for(;a--;){let e=o[a];if("string"==typeof e){const t=i(e);t!==e&&(n(o)||(o[a]=t),e=t)}t[e]=!0}return t}function A(e){const n=l(null);for(const[o,i]of t(e))n[o]=i;return n}function E(t,e){for(;null!==t;){const n=i(t,e);if(n){if(n.get)return T(n.get);if("function"==typeof n.value)return T(n.value)}t=o(t)}return function(t){return console.warn("fallback value for",t),null}}const S=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),z=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=r(["#text"]),I=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","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","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","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=r(["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","transform-origin","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"]),N=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),C=a(/<%[\w\W]*|[\w\W]*%>/gm),j=a(/\${[\w\W]*}/gm),B=a(/^data-[\-\w.\u00B7-\uFFFF]/),U=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=a(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:C,TMPLIT_EXPR:j,DATA_ATTR:B,ARIA_ATTR:U,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:q,DOCTYPE_NAME:Y});const X=()=>"undefined"==typeof window?null:window,$=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var V=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=t=>e(t);if(o.version="3.0.4",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const i=n.document,a=i.currentScript;let{document:l}=n;const{DocumentFragment:s,HTMLTemplateElement:c,Node:v,Element:T,NodeFilter:P,NamedNodeMap:C=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:j,DOMParser:B,trustedTypes:U}=n,H=T.prototype,q=E(H,"cloneNode"),V=E(H,"nextSibling"),J=E(H,"childNodes"),K=E(H,"parentNode");if("function"==typeof c){const t=l.createElement("template");t.content&&t.content.ownerDocument&&(l=t.content.ownerDocument)}let Q,Z="";const{implementation:tt,createNodeIterator:et,createDocumentFragment:nt,getElementsByTagName:ot}=l,{importNode:it}=i;let rt={};o.isSupported="function"==typeof t&&"function"==typeof K&&tt&&void 0!==tt.createHTMLDocument;const{MUSTACHE_EXPR:at,ERB_EXPR:lt,TMPLIT_EXPR:st,DATA_ATTR:ct,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:ut,ATTR_WHITESPACE:mt}=G;let{IS_ALLOWED_URI:pt}=G,dt=null;const gt=k({},[...S,...R,..._,...L,...O]);let ht=null;const yt=k({},[...I,...M,...N,...F]);let bt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,xt=null,vt=!0,Tt=!0,kt=!1,At=!0,Et=!1,St=!1,Rt=!1,_t=!1,Dt=!1,Lt=!1,zt=!1,Ot=!0,It=!1;const Mt="user-content-";let Nt=!0,Ft=!1,Pt={},Ct=null;const jt=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Bt=null;const Ut=k({},["audio","video","img","source","image","track"]);let Wt=null;const Ht=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qt="http://www.w3.org/1998/Math/MathML",Yt="http://www.w3.org/2000/svg",Gt="http://www.w3.org/1999/xhtml";let Xt=Gt,$t=!1,Vt=null;const Jt=k({},[qt,Yt,Gt],d);let Kt;const Qt=["application/xhtml+xml","text/html"],Zt="text/html";let te,ee=null;const ne=l.createElement("form"),oe=function(t){return t instanceof RegExp||t instanceof Function},ie=function(t){if(!ee||ee!==t){if(t&&"object"==typeof t||(t={}),t=A(t),Kt=Kt=-1===Qt.indexOf(t.PARSER_MEDIA_TYPE)?Zt:t.PARSER_MEDIA_TYPE,te="application/xhtml+xml"===Kt?d:p,dt="ALLOWED_TAGS"in t?k({},t.ALLOWED_TAGS,te):gt,ht="ALLOWED_ATTR"in t?k({},t.ALLOWED_ATTR,te):yt,Vt="ALLOWED_NAMESPACES"in t?k({},t.ALLOWED_NAMESPACES,d):Jt,Wt="ADD_URI_SAFE_ATTR"in t?k(A(Ht),t.ADD_URI_SAFE_ATTR,te):Ht,Bt="ADD_DATA_URI_TAGS"in t?k(A(Ut),t.ADD_DATA_URI_TAGS,te):Ut,Ct="FORBID_CONTENTS"in t?k({},t.FORBID_CONTENTS,te):jt,wt="FORBID_TAGS"in t?k({},t.FORBID_TAGS,te):{},xt="FORBID_ATTR"in t?k({},t.FORBID_ATTR,te):{},Pt="USE_PROFILES"in t&&t.USE_PROFILES,vt=!1!==t.ALLOW_ARIA_ATTR,Tt=!1!==t.ALLOW_DATA_ATTR,kt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Et=t.SAFE_FOR_TEMPLATES||!1,St=t.WHOLE_DOCUMENT||!1,Dt=t.RETURN_DOM||!1,Lt=t.RETURN_DOM_FRAGMENT||!1,zt=t.RETURN_TRUSTED_TYPE||!1,_t=t.FORCE_BODY||!1,Ot=!1!==t.SANITIZE_DOM,It=t.SANITIZE_NAMED_PROPS||!1,Nt=!1!==t.KEEP_CONTENT,Ft=t.IN_PLACE||!1,pt=t.ALLOWED_URI_REGEXP||W,Xt=t.NAMESPACE||Gt,bt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&oe(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(bt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&oe(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(bt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(bt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Et&&(Tt=!1),Lt&&(Dt=!0),Pt&&(dt=k({},[...O]),ht=[],!0===Pt.html&&(k(dt,S),k(ht,I)),!0===Pt.svg&&(k(dt,R),k(ht,M),k(ht,F)),!0===Pt.svgFilters&&(k(dt,_),k(ht,M),k(ht,F)),!0===Pt.mathMl&&(k(dt,L),k(ht,N),k(ht,F))),t.ADD_TAGS&&(dt===gt&&(dt=A(dt)),k(dt,t.ADD_TAGS,te)),t.ADD_ATTR&&(ht===yt&&(ht=A(ht)),k(ht,t.ADD_ATTR,te)),t.ADD_URI_SAFE_ATTR&&k(Wt,t.ADD_URI_SAFE_ATTR,te),t.FORBID_CONTENTS&&(Ct===jt&&(Ct=A(Ct)),k(Ct,t.FORBID_CONTENTS,te)),Nt&&(dt["#text"]=!0),St&&k(dt,["html","head","body"]),dt.table&&(k(dt,["tbody"]),delete wt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=t.TRUSTED_TYPES_POLICY,Z=Q.createHTML("")}else void 0===Q&&(Q=$(U,a)),null!==Q&&"string"==typeof Z&&(Z=Q.createHTML(""));r&&r(t),ee=t}},re=k({},["mi","mo","mn","ms","mtext"]),ae=k({},["foreignobject","desc","title","annotation-xml"]),le=k({},["title","style","font","a","script"]),se=k({},R);k(se,_),k(se,D);const ce=k({},L);k(ce,z);const fe=function(t){let e=K(t);e&&e.tagName||(e={namespaceURI:Xt,tagName:"template"});const n=p(t.tagName),o=p(e.tagName);return!!Vt[t.namespaceURI]&&(t.namespaceURI===Yt?e.namespaceURI===Gt?"svg"===n:e.namespaceURI===qt?"svg"===n&&("annotation-xml"===o||re[o]):Boolean(se[n]):t.namespaceURI===qt?e.namespaceURI===Gt?"math"===n:e.namespaceURI===Yt?"math"===n&&ae[o]:Boolean(ce[n]):t.namespaceURI===Gt?!(e.namespaceURI===Yt&&!ae[o])&&!(e.namespaceURI===qt&&!re[o])&&!ce[n]&&(le[n]||!se[n]):!("application/xhtml+xml"!==Kt||!Vt[t.namespaceURI]))},ue=function(t){m(o.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},me=function(t,e){try{m(o.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){m(o.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!ht[t])if(Dt||Lt)try{ue(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pe=function(t){let e,n;if(_t)t="<remove></remove>"+t;else{const e=g(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Kt&&Xt===Gt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Q?Q.createHTML(t):t;if(Xt===Gt)try{e=(new B).parseFromString(o,Kt)}catch(t){}if(!e||!e.documentElement){e=tt.createDocument(Xt,"template",null);try{e.documentElement.innerHTML=$t?Z:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(l.createTextNode(n),i.childNodes[0]||null),Xt===Gt?ot.call(e,St?"html":"body")[0]:St?e.documentElement:i},de=function(t){return et.call(t.ownerDocument||t,t,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ge=function(t){return t instanceof j&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof C)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},he=function(t){return"object"==typeof v?t instanceof v:t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ye=function(t,e,n){rt[t]&&f(rt[t],(t=>{t.call(o,e,n,ee)}))},be=function(t){let e;if(ye("beforeSanitizeElements",t,null),ge(t))return ue(t),!0;const n=te(t.nodeName);if(ye("uponSanitizeElement",t,{tagName:n,allowedTags:dt}),t.hasChildNodes()&&!he(t.firstElementChild)&&(!he(t.content)||!he(t.content.firstElementChild))&&w(/<[/\w]/g,t.innerHTML)&&w(/<[/\w]/g,t.textContent))return ue(t),!0;if(!dt[n]||wt[n]){if(!wt[n]&&xe(n)){if(bt.tagNameCheck instanceof RegExp&&w(bt.tagNameCheck,n))return!1;if(bt.tagNameCheck instanceof Function&&bt.tagNameCheck(n))return!1}if(Nt&&!Ct[n]){const e=K(t)||t.parentNode,n=J(t)||t.childNodes;if(n&&e)for(let o=n.length-1;o>=0;--o)e.insertBefore(q(n[o],!0),V(t))}return ue(t),!0}return t instanceof T&&!fe(t)?(ue(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!w(/<\/no(script|embed|frames)/i,t.innerHTML)?(Et&&3===t.nodeType&&(e=t.textContent,e=h(e,at," "),e=h(e,lt," "),e=h(e,st," "),t.textContent!==e&&(m(o.removed,{element:t.cloneNode()}),t.textContent=e)),ye("afterSanitizeElements",t,null),!1):(ue(t),!0)},we=function(t,e,n){if(Ot&&("id"===e||"name"===e)&&(n in l||n in ne))return!1;if(Tt&&!xt[e]&&w(ct,e));else if(vt&&w(ft,e));else if(!ht[e]||xt[e]){if(!(xe(t)&&(bt.tagNameCheck instanceof RegExp&&w(bt.tagNameCheck,t)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(t))&&(bt.attributeNameCheck instanceof RegExp&&w(bt.attributeNameCheck,e)||bt.attributeNameCheck instanceof Function&&bt.attributeNameCheck(e))||"is"===e&&bt.allowCustomizedBuiltInElements&&(bt.tagNameCheck instanceof RegExp&&w(bt.tagNameCheck,n)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(n))))return!1}else if(Wt[e]);else if(w(pt,h(n,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(n,"data:")||!Bt[t])if(kt&&!w(ut,h(n,mt,"")));else if(n)return!1;return!0},xe=function(t){return t.indexOf("-")>0},ve=function(t){let e,n,i,r;ye("beforeSanitizeAttributes",t,null);const{attributes:a}=t;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ht};for(r=a.length;r--;){e=a[r];const{name:s,namespaceURI:c}=e;if(n="value"===s?e.value:b(e.value),i=te(s),l.attrName=i,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,ye("uponSanitizeAttribute",t,l),n=l.attrValue,l.forceKeepAttr)continue;if(me(s,t),!l.keepAttr)continue;if(!At&&w(/\/>/i,n)){me(s,t);continue}Et&&(n=h(n,at," "),n=h(n,lt," "),n=h(n,st," "));const f=te(t.nodeName);if(we(f,i,n)){if(!It||"id"!==i&&"name"!==i||(me(s,t),n=Mt+n),Q&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(c);else switch(U.getAttributeType(f,i)){case"TrustedHTML":n=Q.createHTML(n);break;case"TrustedScriptURL":n=Q.createScriptURL(n)}try{c?t.setAttributeNS(c,s,n):t.setAttribute(s,n),u(o.removed)}catch(t){}}}ye("afterSanitizeAttributes",t,null)},Te=function t(e){let n;const o=de(e);for(ye("beforeSanitizeShadowDOM",e,null);n=o.nextNode();)ye("uponSanitizeShadowNode",n,null),be(n)||(n.content instanceof s&&t(n.content),ve(n));ye("afterSanitizeShadowDOM",e,null)};return o.sanitize=function(t){let e,n,r,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if($t=!t,$t&&(t="\x3c!--\x3e"),"string"!=typeof t&&!he(t)){if("function"!=typeof t.toString)throw x("toString is not a function");if("string"!=typeof(t=t.toString()))throw x("dirty is not a string, aborting")}if(!o.isSupported)return t;if(Rt||ie(l),o.removed=[],"string"==typeof t&&(Ft=!1),Ft){if(t.nodeName){const e=te(t.nodeName);if(!dt[e]||wt[e])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof v)e=pe("\x3c!----\x3e"),n=e.ownerDocument.importNode(t,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?e=n:e.appendChild(n);else{if(!Dt&&!Et&&!St&&-1===t.indexOf("<"))return Q&&zt?Q.createHTML(t):t;if(e=pe(t),!e)return Dt?null:zt?Z:""}e&&_t&&ue(e.firstChild);const c=de(Ft?t:e);for(;r=c.nextNode();)be(r)||(r.content instanceof s&&Te(r.content),ve(r));if(Ft)return t;if(Dt){if(Lt)for(a=nt.call(e.ownerDocument);e.firstChild;)a.appendChild(e.firstChild);else a=e;return(ht.shadowroot||ht.shadowrootmode)&&(a=it.call(i,a,!0)),a}let f=St?e.outerHTML:e.innerHTML;return St&&dt["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&w(Y,e.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+e.ownerDocument.doctype.name+">\n"+f),Et&&(f=h(f,at," "),f=h(f,lt," "),f=h(f,st," ")),Q&&zt?Q.createHTML(f):f},o.setConfig=function(t){ie(t),Rt=!0},o.clearConfig=function(){ee=null,Rt=!1},o.isValidAttribute=function(t,e,n){ee||ie({});const o=te(t),i=te(e);return we(o,i,n)},o.addHook=function(t,e){"function"==typeof e&&(rt[t]=rt[t]||[],m(rt[t],e))},o.removeHook=function(t){if(rt[t])return u(rt[t])},o.removeHooks=function(t){rt[t]&&(rt[t]=[])},o.removeAllHooks=function(){rt={}},o}();return V}()}));const o={CUSTOM_ELEMENT_HANDLING:{tagNameCheck:function(t){return RegExp(/^tttx-/).exec(t)},attributeNameCheck:function(){return!0},allowCustomizedBuiltInElements:!1}};export{o as d,n as p}
|
|
2
|
+
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
|
|
3
|
+
t.exports=function(){const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object;let{freeze:r,seal:a,create:l}=Object,{apply:s,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(t,e,n){return t.apply(e,n)}),r||(r=function(t){return t}),a||(a=function(t){return t}),c||(c=function(t,e){return new t(...e)});const f=T(Array.prototype.forEach),u=T(Array.prototype.pop),m=T(Array.prototype.push),p=T(String.prototype.toLowerCase),d=T(String.prototype.toString),g=T(String.prototype.match),h=T(String.prototype.replace),y=T(String.prototype.indexOf),b=T(String.prototype.trim),w=T(RegExp.prototype.test),x=(v=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return c(v,e)});var v;function T(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return s(t,e,o)}}function k(t,o,i){var r;i=null!==(r=i)&&void 0!==r?r:p,e&&e(t,null);let a=o.length;for(;a--;){let e=o[a];if("string"==typeof e){const t=i(e);t!==e&&(n(o)||(o[a]=t),e=t)}t[e]=!0}return t}function A(e){const n=l(null);for(const[o,i]of t(e))n[o]=i;return n}function E(t,e){for(;null!==t;){const n=i(t,e);if(n){if(n.get)return T(n.get);if("function"==typeof n.value)return T(n.value)}t=o(t)}return function(t){return console.warn("fallback value for",t),null}}const S=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),z=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=r(["#text"]),I=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","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","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","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=r(["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","transform-origin","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"]),N=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),C=a(/<%[\w\W]*|[\w\W]*%>/gm),j=a(/\${[\w\W]*}/gm),B=a(/^data-[\-\w.\u00B7-\uFFFF]/),U=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=a(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:C,TMPLIT_EXPR:j,DATA_ATTR:B,ARIA_ATTR:U,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:q,DOCTYPE_NAME:Y});const X=()=>"undefined"==typeof window?null:window,$=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var V=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=t=>e(t);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const i=n.document,a=i.currentScript;let{document:l}=n;const{DocumentFragment:s,HTMLTemplateElement:c,Node:v,Element:T,NodeFilter:P,NamedNodeMap:C=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:j,DOMParser:B,trustedTypes:U}=n,H=T.prototype,q=E(H,"cloneNode"),V=E(H,"nextSibling"),J=E(H,"childNodes"),K=E(H,"parentNode");if("function"==typeof c){const t=l.createElement("template");t.content&&t.content.ownerDocument&&(l=t.content.ownerDocument)}let Q,Z="";const{implementation:tt,createNodeIterator:et,createDocumentFragment:nt,getElementsByTagName:ot}=l,{importNode:it}=i;let rt={};o.isSupported="function"==typeof t&&"function"==typeof K&&tt&&void 0!==tt.createHTMLDocument;const{MUSTACHE_EXPR:at,ERB_EXPR:lt,TMPLIT_EXPR:st,DATA_ATTR:ct,ARIA_ATTR:ft,IS_SCRIPT_OR_DATA:ut,ATTR_WHITESPACE:mt}=G;let{IS_ALLOWED_URI:pt}=G,dt=null;const gt=k({},[...S,...R,..._,...L,...O]);let ht=null;const yt=k({},[...I,...M,...N,...F]);let bt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,xt=null,vt=!0,Tt=!0,kt=!1,At=!0,Et=!1,St=!1,Rt=!1,_t=!1,Dt=!1,Lt=!1,zt=!1,Ot=!0,It=!1;const Mt="user-content-";let Nt=!0,Ft=!1,Pt={},Ct=null;const jt=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Bt=null;const Ut=k({},["audio","video","img","source","image","track"]);let Wt=null;const Ht=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qt="http://www.w3.org/1998/Math/MathML",Yt="http://www.w3.org/2000/svg",Gt="http://www.w3.org/1999/xhtml";let Xt=Gt,$t=!1,Vt=null;const Jt=k({},[qt,Yt,Gt],d);let Kt;const Qt=["application/xhtml+xml","text/html"],Zt="text/html";let te,ee=null;const ne=l.createElement("form"),oe=function(t){return t instanceof RegExp||t instanceof Function},ie=function(t){if(!ee||ee!==t){if(t&&"object"==typeof t||(t={}),t=A(t),Kt=Kt=-1===Qt.indexOf(t.PARSER_MEDIA_TYPE)?Zt:t.PARSER_MEDIA_TYPE,te="application/xhtml+xml"===Kt?d:p,dt="ALLOWED_TAGS"in t?k({},t.ALLOWED_TAGS,te):gt,ht="ALLOWED_ATTR"in t?k({},t.ALLOWED_ATTR,te):yt,Vt="ALLOWED_NAMESPACES"in t?k({},t.ALLOWED_NAMESPACES,d):Jt,Wt="ADD_URI_SAFE_ATTR"in t?k(A(Ht),t.ADD_URI_SAFE_ATTR,te):Ht,Bt="ADD_DATA_URI_TAGS"in t?k(A(Ut),t.ADD_DATA_URI_TAGS,te):Ut,Ct="FORBID_CONTENTS"in t?k({},t.FORBID_CONTENTS,te):jt,wt="FORBID_TAGS"in t?k({},t.FORBID_TAGS,te):{},xt="FORBID_ATTR"in t?k({},t.FORBID_ATTR,te):{},Pt="USE_PROFILES"in t&&t.USE_PROFILES,vt=!1!==t.ALLOW_ARIA_ATTR,Tt=!1!==t.ALLOW_DATA_ATTR,kt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Et=t.SAFE_FOR_TEMPLATES||!1,St=t.WHOLE_DOCUMENT||!1,Dt=t.RETURN_DOM||!1,Lt=t.RETURN_DOM_FRAGMENT||!1,zt=t.RETURN_TRUSTED_TYPE||!1,_t=t.FORCE_BODY||!1,Ot=!1!==t.SANITIZE_DOM,It=t.SANITIZE_NAMED_PROPS||!1,Nt=!1!==t.KEEP_CONTENT,Ft=t.IN_PLACE||!1,pt=t.ALLOWED_URI_REGEXP||W,Xt=t.NAMESPACE||Gt,bt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&oe(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(bt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&oe(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(bt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(bt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Et&&(Tt=!1),Lt&&(Dt=!0),Pt&&(dt=k({},[...O]),ht=[],!0===Pt.html&&(k(dt,S),k(ht,I)),!0===Pt.svg&&(k(dt,R),k(ht,M),k(ht,F)),!0===Pt.svgFilters&&(k(dt,_),k(ht,M),k(ht,F)),!0===Pt.mathMl&&(k(dt,L),k(ht,N),k(ht,F))),t.ADD_TAGS&&(dt===gt&&(dt=A(dt)),k(dt,t.ADD_TAGS,te)),t.ADD_ATTR&&(ht===yt&&(ht=A(ht)),k(ht,t.ADD_ATTR,te)),t.ADD_URI_SAFE_ATTR&&k(Wt,t.ADD_URI_SAFE_ATTR,te),t.FORBID_CONTENTS&&(Ct===jt&&(Ct=A(Ct)),k(Ct,t.FORBID_CONTENTS,te)),Nt&&(dt["#text"]=!0),St&&k(dt,["html","head","body"]),dt.table&&(k(dt,["tbody"]),delete wt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=t.TRUSTED_TYPES_POLICY,Z=Q.createHTML("")}else void 0===Q&&(Q=$(U,a)),null!==Q&&"string"==typeof Z&&(Z=Q.createHTML(""));r&&r(t),ee=t}},re=k({},["mi","mo","mn","ms","mtext"]),ae=k({},["foreignobject","desc","title","annotation-xml"]),le=k({},["title","style","font","a","script"]),se=k({},R);k(se,_),k(se,D);const ce=k({},L);k(ce,z);const fe=function(t){let e=K(t);e&&e.tagName||(e={namespaceURI:Xt,tagName:"template"});const n=p(t.tagName),o=p(e.tagName);return!!Vt[t.namespaceURI]&&(t.namespaceURI===Yt?e.namespaceURI===Gt?"svg"===n:e.namespaceURI===qt?"svg"===n&&("annotation-xml"===o||re[o]):Boolean(se[n]):t.namespaceURI===qt?e.namespaceURI===Gt?"math"===n:e.namespaceURI===Yt?"math"===n&&ae[o]:Boolean(ce[n]):t.namespaceURI===Gt?!(e.namespaceURI===Yt&&!ae[o])&&!(e.namespaceURI===qt&&!re[o])&&!ce[n]&&(le[n]||!se[n]):!("application/xhtml+xml"!==Kt||!Vt[t.namespaceURI]))},ue=function(t){m(o.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},me=function(t,e){try{m(o.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){m(o.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!ht[t])if(Dt||Lt)try{ue(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pe=function(t){let e,n;if(_t)t="<remove></remove>"+t;else{const e=g(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Kt&&Xt===Gt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Q?Q.createHTML(t):t;if(Xt===Gt)try{e=(new B).parseFromString(o,Kt)}catch(t){}if(!e||!e.documentElement){e=tt.createDocument(Xt,"template",null);try{e.documentElement.innerHTML=$t?Z:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(l.createTextNode(n),i.childNodes[0]||null),Xt===Gt?ot.call(e,St?"html":"body")[0]:St?e.documentElement:i},de=function(t){return et.call(t.ownerDocument||t,t,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ge=function(t){return t instanceof j&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof C)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},he=function(t){return"object"==typeof v?t instanceof v:t&&"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ye=function(t,e,n){rt[t]&&f(rt[t],(t=>{t.call(o,e,n,ee)}))},be=function(t){let e;if(ye("beforeSanitizeElements",t,null),ge(t))return ue(t),!0;const n=te(t.nodeName);if(ye("uponSanitizeElement",t,{tagName:n,allowedTags:dt}),t.hasChildNodes()&&!he(t.firstElementChild)&&(!he(t.content)||!he(t.content.firstElementChild))&&w(/<[/\w]/g,t.innerHTML)&&w(/<[/\w]/g,t.textContent))return ue(t),!0;if(!dt[n]||wt[n]){if(!wt[n]&&xe(n)){if(bt.tagNameCheck instanceof RegExp&&w(bt.tagNameCheck,n))return!1;if(bt.tagNameCheck instanceof Function&&bt.tagNameCheck(n))return!1}if(Nt&&!Ct[n]){const e=K(t)||t.parentNode,n=J(t)||t.childNodes;if(n&&e)for(let o=n.length-1;o>=0;--o)e.insertBefore(q(n[o],!0),V(t))}return ue(t),!0}return t instanceof T&&!fe(t)?(ue(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!w(/<\/no(script|embed|frames)/i,t.innerHTML)?(Et&&3===t.nodeType&&(e=t.textContent,e=h(e,at," "),e=h(e,lt," "),e=h(e,st," "),t.textContent!==e&&(m(o.removed,{element:t.cloneNode()}),t.textContent=e)),ye("afterSanitizeElements",t,null),!1):(ue(t),!0)},we=function(t,e,n){if(Ot&&("id"===e||"name"===e)&&(n in l||n in ne))return!1;if(Tt&&!xt[e]&&w(ct,e));else if(vt&&w(ft,e));else if(!ht[e]||xt[e]){if(!(xe(t)&&(bt.tagNameCheck instanceof RegExp&&w(bt.tagNameCheck,t)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(t))&&(bt.attributeNameCheck instanceof RegExp&&w(bt.attributeNameCheck,e)||bt.attributeNameCheck instanceof Function&&bt.attributeNameCheck(e))||"is"===e&&bt.allowCustomizedBuiltInElements&&(bt.tagNameCheck instanceof RegExp&&w(bt.tagNameCheck,n)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(n))))return!1}else if(Wt[e]);else if(w(pt,h(n,mt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(n,"data:")||!Bt[t])if(kt&&!w(ut,h(n,mt,"")));else if(n)return!1;return!0},xe=function(t){return t.indexOf("-")>0},ve=function(t){let e,n,i,r;ye("beforeSanitizeAttributes",t,null);const{attributes:a}=t;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ht};for(r=a.length;r--;){e=a[r];const{name:s,namespaceURI:c}=e;if(n="value"===s?e.value:b(e.value),i=te(s),l.attrName=i,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,ye("uponSanitizeAttribute",t,l),n=l.attrValue,l.forceKeepAttr)continue;if(me(s,t),!l.keepAttr)continue;if(!At&&w(/\/>/i,n)){me(s,t);continue}Et&&(n=h(n,at," "),n=h(n,lt," "),n=h(n,st," "));const f=te(t.nodeName);if(we(f,i,n)){if(!It||"id"!==i&&"name"!==i||(me(s,t),n=Mt+n),Q&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(c);else switch(U.getAttributeType(f,i)){case"TrustedHTML":n=Q.createHTML(n);break;case"TrustedScriptURL":n=Q.createScriptURL(n)}try{c?t.setAttributeNS(c,s,n):t.setAttribute(s,n),u(o.removed)}catch(t){}}}ye("afterSanitizeAttributes",t,null)},Te=function t(e){let n;const o=de(e);for(ye("beforeSanitizeShadowDOM",e,null);n=o.nextNode();)ye("uponSanitizeShadowNode",n,null),be(n)||(n.content instanceof s&&t(n.content),ve(n));ye("afterSanitizeShadowDOM",e,null)};return o.sanitize=function(t){let e,n,r,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if($t=!t,$t&&(t="\x3c!--\x3e"),"string"!=typeof t&&!he(t)){if("function"!=typeof t.toString)throw x("toString is not a function");if("string"!=typeof(t=t.toString()))throw x("dirty is not a string, aborting")}if(!o.isSupported)return t;if(Rt||ie(l),o.removed=[],"string"==typeof t&&(Ft=!1),Ft){if(t.nodeName){const e=te(t.nodeName);if(!dt[e]||wt[e])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof v)e=pe("\x3c!----\x3e"),n=e.ownerDocument.importNode(t,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?e=n:e.appendChild(n);else{if(!Dt&&!Et&&!St&&-1===t.indexOf("<"))return Q&&zt?Q.createHTML(t):t;if(e=pe(t),!e)return Dt?null:zt?Z:""}e&&_t&&ue(e.firstChild);const c=de(Ft?t:e);for(;r=c.nextNode();)be(r)||(r.content instanceof s&&Te(r.content),ve(r));if(Ft)return t;if(Dt){if(Lt)for(a=nt.call(e.ownerDocument);e.firstChild;)a.appendChild(e.firstChild);else a=e;return(ht.shadowroot||ht.shadowrootmode)&&(a=it.call(i,a,!0)),a}let f=St?e.outerHTML:e.innerHTML;return St&&dt["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&w(Y,e.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+e.ownerDocument.doctype.name+">\n"+f),Et&&(f=h(f,at," "),f=h(f,lt," "),f=h(f,st," ")),Q&&zt?Q.createHTML(f):f},o.setConfig=function(t){ie(t),Rt=!0},o.clearConfig=function(){ee=null,Rt=!1},o.isValidAttribute=function(t,e,n){ee||ie({});const o=te(t),i=te(e);return we(o,i,n)},o.addHook=function(t,e){"function"==typeof e&&(rt[t]=rt[t]||[],m(rt[t],e))},o.removeHook=function(t){if(rt[t])return u(rt[t])},o.removeHooks=function(t){rt[t]&&(rt[t]=[])},o.removeAllHooks=function(){rt={}},o}();return V}()}));const o={CUSTOM_ELEMENT_HANDLING:{tagNameCheck:function(t){return RegExp(/^tttx-/).exec(t)},attributeNameCheck:function(){return!0},allowCustomizedBuiltInElements:!1}};export{o as d,n as p}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as i,h as t}from"./p-c544551b.js";import{p as d,d as l}from"./p-
|
|
1
|
+
import{r as o,c as i,h as t}from"./p-c544551b.js";import{p as d,d as l}from"./p-5ed38d61.js";import"./p-112455b1.js";const e=class{constructor(t){o(this,t),this.closeButtonClick=i(this,"closeButtonClick",6),this.buttonClick=i(this,"buttonClick",7),this.data=void 0,this.size="regular",this.elementSize=void 0}handleResize(){this.elementSize=window.innerWidth<698?"mobile":this.size}onCloseClickHandler(){this.closeButtonClick.emit({close:!0})}onButtonClickHandler(o){this.buttonClick.emit({buttonNumber:o,buttonClicked:!0})}renderHeader(o){const i=o.title,d=!!o.hasClose;return t("div",{class:"dialog-box-header"},!!o.hasIcon&&t("tttx-icon",{class:"dialog-box-icon",icon:o.iconName,color:o.iconColor}),t("h3",{class:"dialog-box-title"},i),d&&t("div",{class:"dialog-box-align-right close-button",onClick:()=>this.onCloseClickHandler()},t("tttx-icon",{class:"dialog-box-icon-close dialog-box-clickable",icon:"close",color:"black"})))}renderContent(o){if(o.isCustomHtml){const i=d.sanitize(o.customHtml,l);return t("div",{class:"dialog-box-body"},t("div",{innerHTML:i}))}return t("div",{class:"dialog-box-body"},t("span",{class:"dialog-box-content"},o.contentText))}renderFooter(o){const i=o.buttons,d=i.length>0,l=i.length>1,e="mobile"===this.elementSize;return t("div",{class:"dialog-box-footer"},t("div",{class:"dialog-box-align-right"},3==i.length&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(3),design:i[2].type,notext:e,icon:i[2].icon},!e&&i[2].name),l&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(2),design:i[1].type,icon:i[1].icon},i[1].name),d&&t("tttx-button",{onClick:()=>this.onButtonClickHandler(1),design:i[0].type,icon:i[0].icon},i[0].name)))}componentWillLoad(){this.elementSize=window.innerWidth<698?"mobile":this.size}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,t("div",{class:`dialog-box ${this.elementSize}`},t("div",{class:`dialog-box-padding dialog-box-header-box ${this._data.type||""}`},this.renderHeader(this._data.header)),t("div",{class:"dialog-box-padding dialog-box-body-box"},this.renderContent(this._data.body)),t("div",{class:"dialog-box-padding dialog-box-footer-box"},this.renderFooter(this._data.footer)))}};e.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}h3{margin-block-start:0em;margin-block-end:0em}.dialog-box{background-color:#ffffff;display:flex;flex-direction:column;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d}.dialog-box.small{width:400px;min-height:200px}.dialog-box.regular{width:600px;min-height:200px}.dialog-box.large{width:900px;min-height:200px}.dialog-box.mobile{max-width:424px;width:calc(100vw - 20px)}.dialog-box-clickable{cursor:pointer}.dialog-box-padding{padding:8px 16px}.dialog-box-align-right{margin-left:auto;display:flex}.dialog-box-header-box{border-bottom:1px solid #d5d5d5;display:flex;flex-direction:row;height:36px}.dialog-box-header{display:flex;align-items:center;width:100%}.dialog-box-title{font-size:18;font-weight:500;font-family:"Roboto", serif}.dialog-box-icon{padding-right:8px;width:24px;height:24px}.dialog-box-icon-close{margin-left:auto;padding-top:3px;width:24px;height:24px}.dialog-box-content{font-size:16;font-weight:400;font-family:"Roboto", serif}.dialog-box-body{overflow:hidden;text-overflow:ellipsis}.dialog-box-body-box{padding:16px}.dialog-box-footer-box{display:flex;flex-direction:row;margin-top:auto;border-top:1px solid #d5d5d5;height:36px}.dialog-box-footer{display:flex;align-items:center;width:100%}.dialog-box-spacing-button{margin-right:8px}.dialog-box-header-box.info{border-bottom:1px solid #1479c6}.dialog-box-header-box.success{border-bottom:1px solid #a2bb31}.dialog-box-header-box.warning{border-bottom:1px solid #f59500}.dialog-box-header-box.critical{border-bottom:1px solid #dc0000}';export{e as tttx_dialog_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-c544551b.js";import{p as s,d as o}from"./p-
|
|
1
|
+
import{r as t,c as i,h as e}from"./p-c544551b.js";import{p as s,d as o}from"./p-5ed38d61.js";import"./p-112455b1.js";const n=class{constructor(e){t(this,e),this.rowClick=i(this,"listRowClick",7),this.data=void 0,this.name=void 0}onRowClickHandler(t){t.clickable&&t.rowData&&this.rowClick.emit({name:this.name,data:t.rowData})}renderListItem(t){const i=s.sanitize(t.element,o);return e("li",{class:"item "+(t.clickable?"clickable":""),onClick:()=>{this.onRowClickHandler(t)}},t.element&&e("span",{class:"item-content",innerHTML:i}),t.icon&&e("tttx-icon",{class:"align-right ",icon:t.icon}))}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,e("ul",{class:"list"},this._data.map((t=>this.renderListItem(t))))}};n.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}.item{list-style:none;margin:0;padding:8px;border-bottom:1px solid #d5d5d5;min-height:36px;display:flex;align-items:center}.item:first-of-type{border-top:1px solid #d5d5d5}.item.clickable:hover{cursor:pointer}.item.clickable:active{background-color:#e6e6e6}.item:hover{background-color:#1111110D}.align-right{margin-left:auto}.item-content{display:flex;align-items:center}';export{n as tttx_list}
|
package/dist/tttx/tttx.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as e}from"./p-c544551b.js";export{s as setNonce}from"./p-c544551b.js";(()=>{const e=import.meta.url,o={};return""!==e&&(o.resourcesUrl=new URL(".",e).href),t(o)})().then((t=>e([["p-
|
|
1
|
+
import{p as t,b as e}from"./p-c544551b.js";export{s as setNonce}from"./p-c544551b.js";(()=>{const e=import.meta.url,o={};return""!==e&&(o.resourcesUrl=new URL(".",e).href),t(o)})().then((t=>e([["p-5fcac0c3",[[1,"tttx-dialog-box",{data:[1025],size:[1],elementSize:[32]},[[9,"resize","handleResize"]]]]],["p-2f066b53",[[1,"tttx-tree-view",{data:[1040],treeData:[32]}]]],["p-a658e1ac",[[1,"tttx-filter",{filterKey:[1,"filter-key"],filterOptions:[1,"filter-options"],showSelectAll:[4,"show-select-all"],showSearchField:[4,"show-search-field"],showOptionIcons:[4,"show-option-icons"],filterButtonStyle:[1,"filter-button-style"],filterHeader:[1,"filter-header"],defaultFilterOptions:[1,"default-filter-options"],popoverWidth:[1,"popover-width"],showPopover:[32],displayedFilterSettings:[32],selectedFilters:[32],filterSearchTerm:[32],allSelected:[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["p-cec36804",[[1,"tttx-list",{data:[1025],name:[1]}]]],["p-225e6fa6",[[1,"tttx-sorter",{sorterKey:[1,"sorter-key"],defaultSortDirection:[1,"default-sort-direction"],fieldOptionsData:[1,"field-options-data"],defaultOption:[1,"default-option"],selectedField:[32],sortDirection:[32],dropdownExpand:[32],dropdownOptions:[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["p-e6bbdae3",[[2,"tttx-standalone-input",{label:[1],secondarylabel:[1],showerrormsg:[4],showerrorbubble:[4],errormsg:[1],iconleft:[1],iconleftcolor:[1],iconright:[1],iconrightcolor:[1],inputicon:[1],inputiconcolor:[1],inline:[4],inputautocapitalize:[1],inputautofocus:[4],inputkeyhint:[1],inputindex:[8],inputtitle:[1],autocomplete:[1],checked:[4],disabled:[4],max:[8],maxlength:[8],min:[8],minlength:[8],name:[1],pattern:[1],placeholder:[1],readonly:[8],required:[4],step:[8],type:[1],value:[1032]}]]],["p-57621fdb",[[1,"tttx-form",{formschema:[1032],data:[1032],submit:[64]}]]],["p-f80ab1d8",[[1,"tttx-keyvalue-block",{keyvalues:[8],horizontal:[4]}]]],["p-3467c62e",[[1,"tttx-loading-spinner",{loadingMessage:[1028,"loading-message"],size:[1025]}]]],["p-cff962bf",[[1,"tttx-qrcode",{link:[1025],size:[1026]}]]],["p-4879a614",[[1,"tttx-toolbar",{border:[4]}]]],["p-53fa8b4d",[[1,"tttx-icon",{icon:[1],color:[1]}]]],["p-3c7e11d9",[[1,"tttx-button",{notext:[4],icon:[1],iconposition:[1],iconcolor:[1025],design:[1]}]]]],t)));
|
|
@@ -64,7 +64,7 @@ declare const _default: {
|
|
|
64
64
|
handles: string[];
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
-
decorators: import("@storybook/types").
|
|
67
|
+
decorators: (<T extends import("@storybook/types").Renderer>(storyFn: import("@storybook/types").PartialStoryFn<T, import("@storybook/types").Args>) => T["storyResult"])[];
|
|
68
68
|
};
|
|
69
69
|
export default _default;
|
|
70
70
|
export declare const Default: any;
|
|
@@ -6,7 +6,7 @@ declare const _default: {
|
|
|
6
6
|
handles: string[];
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
decorators: import("@storybook/types").
|
|
9
|
+
decorators: (<T extends import("@storybook/types").Renderer>(storyFn: import("@storybook/types").PartialStoryFn<T, import("@storybook/types").Args>) => T["storyResult"])[];
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
12
12
|
export declare const SingleFormItem: {
|
|
@@ -6,7 +6,7 @@ declare const _default: {
|
|
|
6
6
|
handles: string[];
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
decorators: import("@storybook/types").
|
|
9
|
+
decorators: (<T extends import("@storybook/types").Renderer>(storyFn: import("@storybook/types").PartialStoryFn<T, import("@storybook/types").Args>) => T["storyResult"])[];
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
12
12
|
export declare const BasicStringList: any;
|
|
@@ -23,7 +23,7 @@ declare const _default: {
|
|
|
23
23
|
handles: string[];
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
decorators: import("@storybook/types").
|
|
26
|
+
decorators: (<T extends import("@storybook/types").Renderer>(storyFn: import("@storybook/types").PartialStoryFn<T, import("@storybook/types").Args>) => T["storyResult"])[];
|
|
27
27
|
};
|
|
28
28
|
export default _default;
|
|
29
29
|
export declare const BasicSorter: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TreeViewItem {
|
|
2
|
+
id: number;
|
|
3
|
+
title: string;
|
|
4
|
+
hasIcon: boolean;
|
|
5
|
+
hasCheckbox: boolean;
|
|
6
|
+
menuActive?: boolean;
|
|
7
|
+
chevronActive?: boolean;
|
|
8
|
+
html?: string;
|
|
9
|
+
child?: TreeViewItem[];
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
icon?: string;
|
|
13
|
+
iconColor?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { TreeViewItem } from './helper/helper';
|
|
3
|
+
export declare class TttxTreeView {
|
|
4
|
+
data: TreeViewItem[];
|
|
5
|
+
treeData: TreeViewItem[];
|
|
6
|
+
clickEvent: EventEmitter;
|
|
7
|
+
onClickHandler(clickName: string, event: MouseEvent, node: TreeViewItem): void;
|
|
8
|
+
toggleNode(node: TreeViewItem, event: MouseEvent): void;
|
|
9
|
+
handleCheckboxChange(node: TreeViewItem, event: MouseEvent): void;
|
|
10
|
+
updateChildrenCheckStatus(node: TreeViewItem): void;
|
|
11
|
+
renderNode(node: TreeViewItem): any;
|
|
12
|
+
htmlcode(type: string, node: TreeViewItem, check_box: string, check_boxColor: string): any;
|
|
13
|
+
render(): any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
actions: {
|
|
6
|
+
handles: string[];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
decorators: (<T extends import("@storybook/types").Renderer>(storyFn: import("@storybook/types").PartialStoryFn<T, import("@storybook/types").Args>) => T["storyResult"])[];
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
export declare const Default: any;
|
|
13
|
+
export declare const Simple: any;
|
|
14
|
+
export declare const RightButtons: any;
|
|
15
|
+
export declare const MenuButton: any;
|
|
16
|
+
export declare const Chevron: any;
|
|
17
|
+
export declare const HTML: any;
|
|
18
|
+
export declare const Checkbox: any;
|
|
19
|
+
export declare const Icons: any;
|
|
20
|
+
export declare const CheckBoxAndIcons: any;
|
|
@@ -10,10 +10,12 @@ import { FilterChangeEvent, FilterSettings } from "./components/molecules/tttx-f
|
|
|
10
10
|
import { ListItem } from "./components/molecules/tttx-list/interfaces";
|
|
11
11
|
import { SorterChangeEvent, SorterData } from "./components/molecules/tttx-sorter/interfaces";
|
|
12
12
|
import { MinMaxDates } from "./components/molecules/tttx-standalone-input/tttx-standalone-input";
|
|
13
|
+
import { TreeViewItem } from "./components/molecules/tttx-tree-view/helper/helper";
|
|
13
14
|
export namespace Components {
|
|
14
15
|
interface TttxButton {
|
|
15
16
|
"design": string;
|
|
16
17
|
"icon": string;
|
|
18
|
+
"iconcolor": string;
|
|
17
19
|
"iconposition": 'left' | 'right';
|
|
18
20
|
"notext": boolean;
|
|
19
21
|
}
|
|
@@ -111,6 +113,9 @@ export namespace Components {
|
|
|
111
113
|
interface TttxToolbar {
|
|
112
114
|
"border": boolean;
|
|
113
115
|
}
|
|
116
|
+
interface TttxTreeView {
|
|
117
|
+
"data": TreeViewItem[];
|
|
118
|
+
}
|
|
114
119
|
}
|
|
115
120
|
export interface TttxDialogBoxCustomEvent<T> extends CustomEvent<T> {
|
|
116
121
|
detail: T;
|
|
@@ -136,6 +141,10 @@ export interface TttxStandaloneInputCustomEvent<T> extends CustomEvent<T> {
|
|
|
136
141
|
detail: T;
|
|
137
142
|
target: HTMLTttxStandaloneInputElement;
|
|
138
143
|
}
|
|
144
|
+
export interface TttxTreeViewCustomEvent<T> extends CustomEvent<T> {
|
|
145
|
+
detail: T;
|
|
146
|
+
target: HTMLTttxTreeViewElement;
|
|
147
|
+
}
|
|
139
148
|
declare global {
|
|
140
149
|
interface HTMLTttxButtonElement extends Components.TttxButton, HTMLStencilElement {
|
|
141
150
|
}
|
|
@@ -209,6 +218,12 @@ declare global {
|
|
|
209
218
|
prototype: HTMLTttxToolbarElement;
|
|
210
219
|
new (): HTMLTttxToolbarElement;
|
|
211
220
|
};
|
|
221
|
+
interface HTMLTttxTreeViewElement extends Components.TttxTreeView, HTMLStencilElement {
|
|
222
|
+
}
|
|
223
|
+
var HTMLTttxTreeViewElement: {
|
|
224
|
+
prototype: HTMLTttxTreeViewElement;
|
|
225
|
+
new (): HTMLTttxTreeViewElement;
|
|
226
|
+
};
|
|
212
227
|
interface HTMLElementTagNameMap {
|
|
213
228
|
"tttx-button": HTMLTttxButtonElement;
|
|
214
229
|
"tttx-dialog-box": HTMLTttxDialogBoxElement;
|
|
@@ -222,12 +237,14 @@ declare global {
|
|
|
222
237
|
"tttx-sorter": HTMLTttxSorterElement;
|
|
223
238
|
"tttx-standalone-input": HTMLTttxStandaloneInputElement;
|
|
224
239
|
"tttx-toolbar": HTMLTttxToolbarElement;
|
|
240
|
+
"tttx-tree-view": HTMLTttxTreeViewElement;
|
|
225
241
|
}
|
|
226
242
|
}
|
|
227
243
|
declare namespace LocalJSX {
|
|
228
244
|
interface TttxButton {
|
|
229
245
|
"design"?: string;
|
|
230
246
|
"icon"?: string;
|
|
247
|
+
"iconcolor"?: string;
|
|
231
248
|
"iconposition"?: 'left' | 'right';
|
|
232
249
|
"notext"?: boolean;
|
|
233
250
|
}
|
|
@@ -340,6 +357,10 @@ declare namespace LocalJSX {
|
|
|
340
357
|
interface TttxToolbar {
|
|
341
358
|
"border"?: boolean;
|
|
342
359
|
}
|
|
360
|
+
interface TttxTreeView {
|
|
361
|
+
"data"?: TreeViewItem[];
|
|
362
|
+
"onClickEvent"?: (event: TttxTreeViewCustomEvent<any>) => void;
|
|
363
|
+
}
|
|
343
364
|
interface IntrinsicElements {
|
|
344
365
|
"tttx-button": TttxButton;
|
|
345
366
|
"tttx-dialog-box": TttxDialogBox;
|
|
@@ -353,6 +374,7 @@ declare namespace LocalJSX {
|
|
|
353
374
|
"tttx-sorter": TttxSorter;
|
|
354
375
|
"tttx-standalone-input": TttxStandaloneInput;
|
|
355
376
|
"tttx-toolbar": TttxToolbar;
|
|
377
|
+
"tttx-tree-view": TttxTreeView;
|
|
356
378
|
}
|
|
357
379
|
}
|
|
358
380
|
export { LocalJSX as JSX };
|
|
@@ -371,6 +393,7 @@ declare module "@stencil/core" {
|
|
|
371
393
|
"tttx-sorter": LocalJSX.TttxSorter & JSXBase.HTMLAttributes<HTMLTttxSorterElement>;
|
|
372
394
|
"tttx-standalone-input": LocalJSX.TttxStandaloneInput & JSXBase.HTMLAttributes<HTMLTttxStandaloneInputElement>;
|
|
373
395
|
"tttx-toolbar": LocalJSX.TttxToolbar & JSXBase.HTMLAttributes<HTMLTttxToolbarElement>;
|
|
396
|
+
"tttx-tree-view": LocalJSX.TttxTreeView & JSXBase.HTMLAttributes<HTMLTttxTreeViewElement>;
|
|
374
397
|
}
|
|
375
398
|
}
|
|
376
399
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t,H as r}from"./p-c544551b.js";const i=class{constructor(t){o(this,t),this._iconcolor="black",this.notext=void 0,this.icon=void 0,this.iconposition="left",this.design="default"}componentWillLoad(){this._design=this.design,["primary","default","disabled","danger","borderless"].includes(this.design)||(this._design="default"),"primary"!==this._design&&"danger"!==this._design||(this._iconcolor="white")}render(){return t(r,null,t("button",{class:`button ${this._design} ${this.icon?"withicon":""} ${this.icon&&this.iconposition?"icon"+this.iconposition:""} ${this.notext?"notext":""}`},this.icon&&"left"===this.iconposition&&t("div",{class:"icon-left"},t("tttx-icon",{icon:this.icon,color:this._iconcolor})),!this.notext&&t("div",{class:"button-content"},t("slot",null)),this.icon&&"right"===this.iconposition&&t("div",{class:"icon-right"},t("tttx-icon",{icon:this.icon,color:this._iconcolor}))))}};i.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:inline-block}tttx-icon{cursor:inherit}.spacingleft{margin-left:8px}';export{i as tttx_button}
|