@patternfly-java/charts 0.0.10 → 0.0.11
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/charts.js +1 -0
- package/dist/charts.js.map +1 -1
- package/package.json +7 -7
- package/src/charts.js +2 -0
- package/src/components/pfj-chart-pie.js +46 -0
package/dist/charts.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,H=/"/g,Y=/^(?:script|style|textarea|title)$/i,G=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),K=G(1),X=(G(2),G(3),Symbol.for("lit-noChange")),Q=Symbol.for("lit-nothing"),J=new WeakMap,Z=N.createTreeWalker(N,129);function ee(e,t){if(!R(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==A?A.createHTML(t):t}class et{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let a=0,i=0;const o=e.length-1,l=this.parts,[s,u]=((e,t)=>{let n=e.length-1,r=[],a,i=2===t?"<svg>":3===t?"<math>":"",o=W;for(let t=0;t<n;t++){let n=e[t],l,s,u=-1,c=0;for(;c<n.length&&(o.lastIndex=c,null!==(s=o.exec(n)));)c=o.lastIndex,o===W?"!--"===s[1]?o=U:void 0!==s[1]?o=q:void 0!==s[2]?(Y.test(s[2])&&(a=RegExp("</"+s[2],"g")),o=B):void 0!==s[3]&&(o=B):o===B?">"===s[0]?(o=a??W,u=-1):void 0===s[1]?u=-2:(u=o.lastIndex-s[2].length,l=s[1],o=void 0===s[3]?B:'"'===s[3]?H:V):o===H||o===V?o=B:o===U||o===q?o=W:(o=B,a=void 0);let d=o===B&&e[t+1].startsWith("/>")?" ":"";i+=o===W?n+$:u>=0?(r.push(l),n.slice(0,u)+T+n.slice(u)+D+d):n+D+(-2===u?t:d)}return[ee(e,i+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]})(e,t);if(this.el=et.createElement(s,n),Z.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(r=Z.nextNode())&&l.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(const e of r.getAttributeNames())if(e.endsWith(T)){const t=u[i++],n=r.getAttribute(e).split(D),o=/([.?@])?(.*)/.exec(t);l.push({type:1,index:a,name:o[2],strings:n,ctor:"."===o[1]?eo:"?"===o[1]?el:"@"===o[1]?es:ei}),r.removeAttribute(e)}else e.startsWith(D)&&(l.push({type:6,index:a}),r.removeAttribute(e));if(Y.test(r.tagName)){const e=r.textContent.split(D),t=e.length-1;if(t>0){r.textContent=E?E.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],z()),Z.nextNode(),l.push({type:2,index:++a});r.append(e[t],z())}}}else if(8===r.nodeType)if(r.data===L)l.push({type:2,index:a});else{let e=-1;for(;-1!==(e=r.data.indexOf(D,e+1));)l.push({type:7,index:a}),e+=D.length-1}a++}}static createElement(e,t){let n=N.createElement("template");return n.innerHTML=e,n}}function en(e,t,n=e,r){if(t===X)return t;let a=void 0!==r?n._$Co?.[r]:n._$Cl,i=F(t)?void 0:t._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),void 0===i?a=void 0:(a=new i(e))._$AT(e,n,r),void 0!==r?(n._$Co??=[])[r]=a:n._$Cl=a),void 0!==a&&(t=en(e,a._$AS(e,t.values),a,r)),t}class er{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??N).importNode(t,!0);Z.currentNode=r;let a=Z.nextNode(),i=0,o=0,l=n[0];for(;void 0!==l;){if(i===l.index){let t;2===l.type?t=new ea(a,a.nextSibling,this,e):1===l.type?t=new l.ctor(a,l.name,l.strings,this,e):6===l.type&&(t=new eu(a,this,e)),this._$AV.push(t),l=n[++o]}i!==l?.index&&(a=Z.nextNode(),i++)}return Z.currentNode=N,r}p(e){let t=0;for(let n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class ea{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){let n;F(e=en(this,e,t))?e===Q||null==e||""===e?(this._$AH!==Q&&this._$AR(),this._$AH=Q):e!==this._$AH&&e!==X&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):R(n=e)||"function"==typeof n?.[Symbol.iterator]?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Q&&F(this._$AH)?this._$AA.nextSibling.data=e:this.T(N.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=et.createElement(ee(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new er(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=J.get(e.strings);return void 0===t&&J.set(e.strings,t=new et(e)),t}k(e){R(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,r=0;for(let a of e)r===t.length?t.push(n=new ea(this.O(z()),this.O(z()),this,this.options)):n=t[r],n._$AI(a),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class ei{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,a){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=a,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Q}_$AI(e,t=this,n,r){let a=this.strings,i=!1;if(void 0===a)(i=!F(e=en(this,e,t,0))||e!==this._$AH&&e!==X)&&(this._$AH=e);else{let r,o,l=e;for(e=a[0],r=0;r<a.length-1;r++)(o=en(this,l[n+r],t,r))===X&&(o=this._$AH[r]),i||=!F(o)||o!==this._$AH[r],o===Q?e=Q:e!==Q&&(e+=(o??"")+a[r+1]),this._$AH[r]=o}i&&!r&&this.j(e)}j(e){e===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class eo extends ei{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Q?void 0:e}}class el extends ei{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Q)}}class es extends ei{constructor(e,t,n,r,a){super(e,t,n,r,a),this.type=5}_$AI(e,t=this){if((e=en(this,e,t,0)??Q)===X)return;let n=this._$AH,r=e===Q&&n!==Q||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Q&&(n===Q||r);r&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class eu{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){en(this,e)}}let ec=C.litHtmlPolyfillSupport;ec?.(et,ea),(C.litHtmlVersions??=[]).push("3.3.1");let ed=globalThis;class ef extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{let r=n?.renderBefore??t,a=r._$litPart$;if(void 0===a){let e=n?.renderBefore??null;r._$litPart$=a=new ea(t.insertBefore(z(),e),e,void 0,n??{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}}ef._$litElement$=!0,ef.finalized=!0,ed.litElementHydrateSupport?.({LitElement:ef});"use strict";let ep=ed.litElementPolyfillSupport;ep?.({LitElement:ef}),(ed.litElementVersions??=[]).push("4.2.1");var eh=o("8NFma"),eg={};!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),eg=o("gNTjK");let em=(e,t)=>{if(""===t||null==t)return!0;let n=String(t).trim();if("true"===n)return!0;if("false"===n)return!1;if(/^\d+(?:\.\d+)?$/.test(n))return Number(n);if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{return JSON.parse(n)}catch(e){}return t},ey=e=>{let t={};for(let n of e.attributes){let e=eb(n.name);"class"!==e&&"style"!==e&&(t[e]=em(e,n.value))}return t},eb=e=>e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),ev=new Set(["containerComponent","desc","events","groupComponent","labelComponent","legendComponent","subTitleComponent","titleComponent"]);class ex extends ef{static styles=p`
|
|
18
18
|
:host {
|
|
19
19
|
display: inline-block;
|
|
20
|
+
background-color: pink;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
.container {
|