genesys-spark-chart-components 4.137.1 → 4.138.0

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.
Files changed (45) hide show
  1. package/dist/cjs/{color-palette-c5aba81e.js → color-palette-6ca929a0.js} +3 -3
  2. package/dist/cjs/genesys-chart-webcomponents.cjs.js +2 -2
  3. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +10 -14
  4. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +2 -19
  5. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +10 -17
  6. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +2 -10
  7. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +10 -15
  8. package/dist/cjs/gux-visualization-beta.cjs.entry.js +2 -4
  9. package/dist/cjs/{index-409a039b.js → index-e390a39a.js} +252 -180
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/beta/gux-chart-column/gux-chart-column.js +37 -15
  13. package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.js +41 -20
  14. package/dist/collection/components/beta/gux-chart-line/gux-chart-line.js +42 -17
  15. package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.js +20 -10
  16. package/dist/collection/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.js +38 -15
  17. package/dist/collection/components/beta/gux-visualization/gux-visualization.js +6 -4
  18. package/dist/esm/{color-palette-b5b2d207.js → color-palette-8e2dc91b.js} +3 -3
  19. package/dist/esm/genesys-chart-webcomponents.js +3 -3
  20. package/dist/esm/gux-chart-column-beta.entry.js +10 -14
  21. package/dist/esm/gux-chart-donut-beta.entry.js +2 -19
  22. package/dist/esm/gux-chart-line-beta.entry.js +10 -17
  23. package/dist/esm/gux-chart-pie-beta.entry.js +2 -10
  24. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +10 -15
  25. package/dist/esm/gux-visualization-beta.entry.js +2 -4
  26. package/dist/esm/{index-6f89ddc9.js → index-eabc38b4.js} +252 -180
  27. package/dist/esm/loader.js +2 -2
  28. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
  29. package/dist/genesys-chart-webcomponents/{p-62e9c866.js → p-4fe958d6.js} +1 -1
  30. package/dist/genesys-chart-webcomponents/p-86129083.entry.js +1 -0
  31. package/dist/genesys-chart-webcomponents/p-977a4087.js +2 -0
  32. package/dist/genesys-chart-webcomponents/p-b038a88f.entry.js +1 -0
  33. package/dist/genesys-chart-webcomponents/p-bf5b441c.entry.js +1 -0
  34. package/dist/genesys-chart-webcomponents/p-c21311f9.entry.js +1 -0
  35. package/dist/genesys-chart-webcomponents/p-dd1cf093.entry.js +1 -0
  36. package/dist/genesys-chart-webcomponents/{p-38df79fa.entry.js → p-e9e86c24.entry.js} +2 -2
  37. package/dist/stencil-wrapper.js +1 -1
  38. package/dist/types/stencil-wrapper.d.ts +1 -1
  39. package/package.json +3 -3
  40. package/dist/genesys-chart-webcomponents/p-177ee014.entry.js +0 -1
  41. package/dist/genesys-chart-webcomponents/p-58f02284.entry.js +0 -1
  42. package/dist/genesys-chart-webcomponents/p-6240c9bd.entry.js +0 -1
  43. package/dist/genesys-chart-webcomponents/p-6759e12f.entry.js +0 -1
  44. package/dist/genesys-chart-webcomponents/p-699aab7f.js +0 -2
  45. package/dist/genesys-chart-webcomponents/p-eef8d50e.entry.js +0 -1
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { defineCustomElements } from '../dist/loader';
9
9
  // Value templated out during build process (see scripts/wrap-stencil.js)
10
- export const CHART_COMPONENT_ASSETS_PATH = '/spark-components/build-assets/4.137.1-597/chart/genesys-chart-webcomponents/';
10
+ export const CHART_COMPONENT_ASSETS_PATH = '/spark-components/build-assets/4.138.0-601/chart/genesys-chart-webcomponents/';
11
11
  // Default domain to load assets from
12
12
  const DEFAULT_DOMAIN = 'app.mypurecloud.com';
13
13
  // List of Genesys UI domains
@@ -1,2 +1,2 @@
1
- export declare const CHART_COMPONENT_ASSETS_PATH = "/spark-components/build-assets/4.137.1-597/chart/genesys-chart-webcomponents/";
1
+ export declare const CHART_COMPONENT_ASSETS_PATH = "/spark-components/build-assets/4.138.0-601/chart/genesys-chart-webcomponents/";
2
2
  export declare function registerElements(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesys-spark-chart-components",
3
- "version": "4.137.1",
3
+ "version": "4.138.0",
4
4
  "description": "Common chart webcomponents",
5
5
  "license": "MIT",
6
6
  "main": "dist/stencil-wrapper.js",
@@ -60,9 +60,9 @@
60
60
  "devDependencies": {
61
61
  "@babel/core": "^7.26.10",
62
62
  "@babel/preset-env": "^7.26.9",
63
- "@stencil/core": "4.22.3",
63
+ "@stencil/core": "4.23.2",
64
64
  "@stencil/react-output-target": "^0.5.3",
65
- "@stencil/sass": "^3.2.0",
65
+ "@stencil/sass": "^3.2.1",
66
66
  "@types/jest": "^29.5.14",
67
67
  "@types/puppeteer": "^5.4.7",
68
68
  "axe-core": "^4.10.3",
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as s}from"./p-699aab7f.js";import{D as a,a as e,V as h,t as o}from"./p-62e9c866.js";import{l as n}from"./p-23610106.js";const l="category",r=class{constructor(i){t(this,i),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",mark:{type:"line",interpolate:"linear",point:!1},config:{axis:{ticks:!1,titlePadding:8,labelColor:this.labelColor||a,domainColor:this.domainColor||e},axisX:{labelAngle:0},legend:{symbolType:"circle"}},encoding:{x:{type:"nominal"},y:{type:"quantitative"},color:{field:l,type:"nominal",scale:{range:h},legend:null},tooltip:{aggregate:"count",type:"quantitative"}}},this.labelColor=a,this.domainColor=e,this.chartData=void 0,this.xTickLabelSlant=void 0,this.includeLegend=void 0,this.legendPosition="right",this.includeDataPointMarkers=void 0,this.xFieldName=void 0,this.xAxisTitle=void 0,this.yFieldName=void 0,this.yAxisTitle=void 0,this.legendTitle=void 0,this.colorFieldName=void 0,this.strokeDash=void 0,this.interpolation=void 0,this.embedOptions=void 0}parseData(){this.xFieldName&&this.yFieldName||n(this.root,"requires x-field-name and y-field-name");let t={};this.chartData&&(t={data:this.chartData}),this.xTickLabelSlant&&(this.baseChartSpec.config.axisX.labelAngle=45),this.includeLegend&&(this.baseChartSpec.encoding.color.legend=!0),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition);const i=this.xFieldName,s=this.xAxisTitle,a=this.yFieldName,e=this.yAxisTitle,h=this.legendTitle,o=this.colorFieldName||l,r=this.interpolation,c=this.strokeDash,d=this.includeDataPointMarkers;i&&(this.baseChartSpec.encoding.x.field=i),s&&(this.baseChartSpec.encoding.x.title=s),a&&(this.baseChartSpec.encoding.y.field=a),e&&(this.baseChartSpec.encoding.y.title=e),o&&(this.baseChartSpec.encoding.color.field=o),h&&(this.baseChartSpec.encoding.color.title=h),c&&(this.baseChartSpec.encoding.strokeDash={field:o,type:"nominal"}),r&&(this.baseChartSpec.mark.interpolate=r),d&&(this.baseChartSpec.mark.point=d);const g=Object.assign(this.baseChartSpec,t);this.visualizationSpec=g}componentWillLoad(){o(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"9a0bbdde50dc38102cff841ca0b2aa9aa47b47ff",visualizationSpec:this.visualizationSpec})}get root(){return s(this)}static get watchers(){return{chartData:["parseData"]}}};r.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{r as gux_chart_line_beta}
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as e}from"./p-699aab7f.js";import{V as s,t as a}from"./p-62e9c866.js";import{l as o}from"./p-23610106.js";const r="category",h="value",n=class{constructor(i){t(this,i),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{legend:{symbolType:"circle"}},encoding:{theta:{field:"value",type:"quantitative",stack:!0},color:{field:r,type:"nominal",scale:{range:s},legend:null},tooltip:{aggregate:"count",type:"quantitative"}},layer:[{mark:{type:"arc",outerRadius:80}},{mark:{type:"text",radius:90},encoding:{text:{field:h,type:"quantitative"}}}],view:{stroke:null}},this.chartData=void 0,this.includeLegend=void 0,this.legendPosition="right",this.legendTitle=void 0,this.colorFieldName=void 0,this.outerRadius=void 0,this.labelRadius=void 0,this.labelField=void 0,this.embedOptions=void 0}parseData(){this.outerRadius||o(this.root,"requires outer-radius");let t={};this.chartData&&(t={data:this.chartData}),this.includeLegend&&(this.baseChartSpec.encoding.color.legend=!0),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition);const i=this.colorFieldName||r;i&&(this.baseChartSpec.encoding.color.field=i);const e=this.legendTitle;e&&(this.baseChartSpec.encoding.color.title=e),this.baseChartSpec.layer=[{mark:{type:"arc",outerRadius:this.outerRadius}}];const s=this.labelRadius;s&&this.baseChartSpec.layer.push({mark:{type:"text",radius:s},encoding:{text:{field:this.labelField||h,type:"quantitative"}}});const a=Object.assign(this.baseChartSpec,t);this.visualizationSpec=a}componentWillLoad(){a(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"b3049772a9d436bf4d6aa1b0e9ebe21a9d9e84e9",visualizationSpec:this.visualizationSpec})}get root(){return e(this)}static get watchers(){return{chartData:["parseData"]}}};n.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{n as gux_chart_pie_beta}
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as s}from"./p-699aab7f.js";import{D as a,a as e,V as h,t as o}from"./p-62e9c866.js";import{l as r}from"./p-23610106.js";const n=class{constructor(i){t(this,i),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",mark:{type:"bar"},config:{axis:{ticks:!1,titlePadding:8,labelColor:this.labelColor||a,domainColor:this.domainColor||e},axisX:{labelAngle:0},scale:{bandPaddingInner:.4,bandPaddingOuter:.4},legend:{symbolType:"circle"},bar:{color:h[0]}},encoding:{x:{type:"nominal"},y:{type:"quantitative"},tooltip:{aggregate:"count",type:"quantitative"}}},this.labelColor=a,this.domainColor=e,this.chartData=void 0,this.xTickLabelSlant=void 0,this.includeLegend=void 0,this.xFieldName=void 0,this.yFieldName=void 0,this.xAxisTitle=void 0,this.yAxisTitle=void 0,this.legendTitle=void 0,this.legendPosition="right",this.chartLayers=void 0,this.embedOptions=void 0}parseData(){this.xFieldName&&this.yFieldName||r(this.root,"requires x-field-name and y-field-name");let t={};this.chartData&&(t={data:this.chartData}),this.xTickLabelSlant&&(this.baseChartSpec.config.axisX.labelAngle=45),this.includeLegend&&(this.baseChartSpec.encoding.color={field:"category"}),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition);const i=this.xFieldName,s=this.yFieldName,a=this.xAxisTitle,e=this.yAxisTitle,o=this.legendTitle;if(this.chartLayers){const t=this.chartLayers.map((t=>({mark:"bar",transform:[{filter:{field:"series",equal:t}}],encoding:{x:{field:i,type:"nominal"},y:{field:s,type:"quantitative"}}})));this.baseChartSpec.layer=t}else i&&(this.baseChartSpec.encoding.x.field=i),s&&(this.baseChartSpec.encoding.y.field=s),a&&(this.baseChartSpec.encoding.x.title=a),e&&(this.baseChartSpec.encoding.y.title=e),o&&(this.baseChartSpec.encoding.color.title=o);const n=i;this.baseChartSpec.config.range={[n]:h};const l=Object.assign(this.baseChartSpec,t);this.visualizationSpec=l}componentWillLoad(){o(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"5bcc2fcee3bfb4905b9fdbb572593402531f960d",visualizationSpec:this.visualizationSpec})}get root(){return s(this)}static get watchers(){return{chartData:["parseData"]}}};n.style="gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}";export{n as gux_chart_column_beta}
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as s}from"./p-699aab7f.js";import{D as e,a,V as o,t as h}from"./p-62e9c866.js";import{l}from"./p-23610106.js";const n="category",r=class{constructor(i){t(this,i),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",params:[{name:"onHover",select:{type:"point",on:"mouseover"}}],config:{axis:{ticks:!1,titlePadding:8,gridColor:"#F6F7F9",labelColor:this.labelColor||e,domainColor:this.domainColor||a},axisX:{labelAngle:0,grid:!0},legend:{symbolType:"circle"}},width:{step:40},encoding:{x:{type:"nominal"},y:{type:"quantitative"},color:{field:n,type:"nominal",scale:{range:o},legend:null},size:{condition:[{param:"onHover",empty:!1,value:100}],value:40}}},this.labelColor=e,this.domainColor=a,this.chartData=void 0,this.xTickLabelSlant=void 0,this.includeLegend=void 0,this.legendPosition="right",this.xFieldName=void 0,this.xAxisTitle=void 0,this.yFieldName=void 0,this.yAxisTitle=void 0,this.legendTitle=void 0,this.colorFieldName=void 0,this.useShape=void 0,this.embedOptions=void 0}parseData(){this.xFieldName&&this.yFieldName||l(this.root,"requires x-field-name and y-field-name");let t={};this.chartData&&(t={data:this.chartData}),this.xTickLabelSlant&&(this.baseChartSpec.config.axisX.labelAngle=-45),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition);const i=this.xFieldName,s=this.xAxisTitle,e=this.yFieldName,a=this.yAxisTitle,o=this.legendTitle,h=this.useShape||"circle",r=this.colorFieldName||n;this.includeLegend&&(this.baseChartSpec.encoding.color.legend=!0),i&&(this.baseChartSpec.encoding.x.field=i),s&&(this.baseChartSpec.encoding.x.title=s),e&&(this.baseChartSpec.encoding.y.field=e),a&&(this.baseChartSpec.encoding.y.title=a),r&&(this.baseChartSpec.encoding.color.field=r),o&&(this.baseChartSpec.encoding.color.title=o),this.baseChartSpec.mark={type:h,filled:!0},this.baseChartSpec.config.legend.symbolType=h,this.baseChartSpec.encoding.shape={field:r,type:"nominal"},this.baseChartSpec.encoding.tooltip=[{field:i,type:"nominal",title:s},{field:e,type:"quantitative",title:a},{field:r,type:"nominal",title:o}];const d=Object.assign(this.baseChartSpec,t);this.visualizationSpec=d}componentWillLoad(){h(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"99d30b8b621965db1bb64abc45fa8075f7f1db2f",visualizationSpec:this.visualizationSpec})}get root(){return s(this)}static get watchers(){return{chartData:["parseData"]}}};r.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{r as gux_chart_scatter_plot_beta}
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>(0,console.error)(e,t),s=new Map,r=new Map,i="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},a=c.document||{head:{}},u={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),d=!1,p=[],m=[],y=(e,t)=>n=>{e.push(n),d||(d=!0,t&&4&u.l?w($):u.raf($))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){o(e)}e.length=0},$=()=>{b(p),b(m),(d=p.length>0)&&u.raf($)},w=e=>f().then(e),v=y(m,!0),S={},g=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>O,ok:()=>k,unwrap:()=>M,unwrapErr:()=>P});var k=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function O(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return E(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},x=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!g(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=A(e,null);return a.u=t,i.length>0&&(a.h=i),a.p=o,a},A=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),D={},H=e=>n(e).$hostElement$,L=(e,t,n)=>{const l=H(e);return{emit:e=>R(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},R=(e,t,n)=>{const l=u.ce(t,n);return e.dispatchEvent(l),l},T=new WeakMap,F=e=>"sc-"+e.v,N=(e,t,n,l,o,s)=>{if(n!==l){let r=((e,t)=>t in e)(e,t);if(t.toLowerCase(),"class"===t){const t=e.classList,o=W(n),s=W(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else{const i=g(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}}},U=/\s/,W=e=>e?e.split(U):[],q=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of G(Object.keys(o)))e in s||N(l,e,o[e],void 0,n,t.l);for(const e of G(Object.keys(s)))N(l,e,o[e],s[e],n,t.l)};function G(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var V=!1,_=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(o=l.$=a.createElement(l.m),q(null,l,V),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=_(e,l,r),s&&o.appendChild(s);return o["s-hn"]=C,o},z=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===C&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=_(null,n,o),r&&(l[o].$=r,Q(i,r,t)))},B=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;K(t),e&&e.remove()}}},I=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),J=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h;q(e,t,V),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,a=0,u=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(I(h,m,o))J(h,m,o),h=t[++i],m=l[++c];else if(I(d,y,o))J(d,y,o),d=t[--f],y=l[--p];else if(I(h,y,o))J(h,y,o),Q(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(I(d,m,o))J(d,m,o),Q(e,d.$,h.$),d=t[--f],m=l[++c];else{for(a=-1,u=i;u<=f;++u)if(t[u]&&null!==t[u].p&&t[u].p===m.p){a=u;break}a>=0?(r=t[a],r.m!==m.m?s=_(t&&t[c],n,a):(J(r,m,o),t[a]=void 0,s=r.$),m=l[++c]):(s=_(t&&t[c],n,c),m=l[++c]),s&&Q(h.$.parentNode,s,h.$)}i>f?z(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&B(t,i,f)})(l,o,t,s,n):null!==s?z(l,null,t,s,0,s.length-1):!n&&null!==o&&B(o,0,o.length-1)},K=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(K)},Q=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),X=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Y=(e,t)=>{if(e.l|=16,!(4&e.l))return X(e,e.j),v((()=>Z(e,t)));e.l|=512},Z=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=re(n,"componentWillLoad")),ee(l,(()=>ne(e,n,t)))},ee=(e,t)=>te(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),te=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ne=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=F(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=T.get(e=e.head||e);if(r||T.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=u.O)?n:j(a);if(null!=l&&s.setAttribute("nonce",l),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(h){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=i),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);le(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>oe(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},le=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||A(null,null),r=(e=>e&&e.m===D)(t)?t:x(null,null,t);if(C=l.tagName,n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,J(s,r,n)})(e,t,l)}catch(t){o(t,e.$hostElement$)}return null},oe=e=>{const t=e.$hostElement$,n=e.t,l=e.j;re(n,"componentDidRender"),64&e.l||(e.l|=64,ie(t),re(n,"componentDidLoad"),e.M(t),l||se()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>Y(e,!1))),e.l&=-517},se=()=>{ie(a.documentElement),w((()=>R(c,"appload",{detail:{namespace:"genesys-chart-webcomponents"}})))},re=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){o(e)}},ie=e=>e.setAttribute("hydrated",""),ce=(e,t,l)=>{var s,r;const i=e.prototype;if(t.P||t.A||e.watchers){e.watchers&&!t.A&&(t.A=e.watchers);const c=Object.entries(null!=(s=t.P)?s:{});if(c.map((([e,[s]])=>{(31&s||2&l&&32&s)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).D.get(t))(0,e)},set(l){((e,t,l,s)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${s.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.D.get(t),a=r.l,u=r.t;if(l=((e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,s.P[t][0]),(!(8&a)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.D.set(t,l),u)){if(s.A&&128&a){const e=s.A[t];e&&e.map((e=>{try{u[e](l,c,t)}catch(e){o(e,i)}}))}2==(18&a)&&Y(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){u.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.A)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.A)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,t])=>{const n=t[1]||e;return l.set(n,e),n}))]))}}return e},ae=e=>{re(e,"disconnectedCallback")},ue=(e,l={})=>{var f;const d=[],p=l.exclude||[],m=c.customElements,y=a.head,b=y.querySelector("meta[charset]"),$=a.createElement("style"),w=[];let v,S=!0;Object.assign(u,l),u.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var i;const c={l:l[0],v:l[1],P:l[2],H:l[3]};4&c.l&&(g=!0),c.P=l[2],c.A=null!=(i=l[4])?i:{};const a=c.v,f=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,D:new Map};l.L=new Promise((e=>l.M=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),S?w.push(this):u.jmp((()=>(e=>{if(!(1&u.l)){const t=n(e),l=t.k,i=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.L)&&t.L.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(t,t.j=n);break}}l.P&&Object.entries(l.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.R){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.R;if(!n)return;const l=s.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(s.set(n,e),e[t])),o)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.T}" was not found`);l.isProxied||(n.A=l.watchers,ce(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(e){o(e)}t.l&=-9,t.l|=128,r()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=F(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);h&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const i=t.j,c=()=>Y(t,!0);i&&i["s-rc"]?i["s-rc"].push(c):c()})(e,t,l)}i()}})(this)))}disconnectedCallback(){u.jmp((()=>(async()=>{if(!(1&u.l)){const e=n(this);(null==e?void 0:e.t)?ae(e.t):(null==e?void 0:e.L)&&e.L.then((()=>ae(e.t)))}})()))}componentOnReady(){return n(this).L}};c.R=e[0],p.includes(a)||m.get(a)||(d.push(a),m.define(a,ce(f,c,1)))}))})),d.length>0&&(g&&($.textContent+=i),$.textContent+=d.sort()+"{visibility:hidden}[hydrated]{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(f=u.O)?f:j(a);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,b?b.nextSibling:y.firstChild)}S=!1,w.length?w.map((e=>e.connectedCallback())):u.jmp((()=>v=setTimeout(se,30)))},fe=e=>u.O=e;export{ue as b,L as c,H as g,x as h,f as p,l as r,fe as s}
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as e}from"./p-699aab7f.js";import{V as s,t as a}from"./p-62e9c866.js";import{l as h}from"./p-23610106.js";const o="category",n="value",r=class{constructor(i){t(this,i),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",config:{legend:{symbolType:"circle"}},encoding:{theta:{field:"value",type:"quantitative",stack:!0},color:{field:o,type:"nominal",scale:{range:s},legend:null}},layer:[{mark:{type:"arc",outerRadius:80}},{mark:{type:"text",radius:90},encoding:{text:{field:n,type:"quantitative"}}}],view:{stroke:null}},this.chartData=void 0,this.includeLegend=void 0,this.legendPosition="right",this.legendTitle=void 0,this.colorFieldName=void 0,this.outerRadius=void 0,this.innerRadius=void 0,this.labelRadius=void 0,this.labelField=void 0,this.gauge=void 0,this.centerText=void 0,this.centerSubText=void 0,this.showTooltip=!0,this.tooltipOptions=void 0,this.legendX=void 0,this.legendY=void 0,this.legendFontSize=void 0,this.legendSymbolSize=void 0,this.embedOptions=void 0}parseData(){this.outerRadius||this.innerRadius||h(this.root,"requires at least one of outer-radius or inner-radius");let t={};this.chartData&&(t={data:this.chartData}),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition),this.includeLegend?(this.baseChartSpec.encoding.color.legend={},(this.legendX||this.legendY)&&(this.baseChartSpec.config.legend.orient="none",this.legendX&&(this.baseChartSpec.encoding.color.legend.legendX=this.legendX),this.legendY&&(this.baseChartSpec.encoding.color.legend.legendY=this.legendY)),this.legendFontSize&&(this.baseChartSpec.encoding.color.legend.labelFontSize=this.legendFontSize),this.legendSymbolSize&&(this.baseChartSpec.encoding.color.legend.symbolSize=this.legendSymbolSize)):this.baseChartSpec.encoding.color.legend=null;const i=this.colorFieldName||o;i&&(this.baseChartSpec.encoding.color.field=i);this.baseChartSpec.encoding.color.title=this.legendTitle||"";let e=this.outerRadius,s=this.innerRadius;e||(e=s+32),s||(s=e-32);let a=1;this.gauge?(this.baseChartSpec.layer=[{data:{values:[{progress:"default",value:100}]},mark:{type:"arc",innerRadius:s},encoding:{theta:{field:"value",type:"quantitative"},color:{value:"#E4E9F0"},tooltip:null}},{mark:{type:"arc",outerRadius:e,innerRadius:s,padAngle:.01}},{mark:{type:"arc",innerRadius:s,padAngle:.01}}],a=2):this.baseChartSpec.layer=[{mark:{type:"arc",outerRadius:e,innerRadius:s}},{mark:{type:"arc",innerRadius:s,stroke:"#fff"}}];const r=this.centerText;r&&this.baseChartSpec.layer.push({data:{values:[{centerText:r,value:0}]},mark:{align:"center",type:"text",baseline:"middle"},encoding:{color:{value:"#4C5054"},text:{field:"centerText"},size:{value:{expr:"height * 0.09"}},tooltip:null}});const l=this.centerSubText;l&&this.baseChartSpec.layer.push({data:{values:[{centerSubText:l,value:0}]},mark:{align:"center",type:"text",baseline:"middle",y:{expr:"height/2 + 20"}},encoding:{color:{value:"#6A6D70"},text:{field:"centerSubText"},size:{value:{expr:"height * 0.06"}},tooltip:null}});const d=this.labelRadius,u=this.labelField||n;d&&this.baseChartSpec.layer.push({mark:{type:"text",radius:d},encoding:{text:{field:u,type:"quantitative"}}}),this.showTooltip&&(this.tooltipOptions?(this.baseChartSpec.layer[a].mark.tooltip={content:"data"},this.tooltipSpec={actions:!1,tooltip:this.tooltipOptions}):this.baseChartSpec.encoding.tooltip={field:u,aggregate:"count",type:"quantitative"});const c=Object.assign(this.baseChartSpec,t);this.visualizationSpec=c}componentWillLoad(){a(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"1841c32ed4312b87b8bdeca52a007a6905effce9",visualizationSpec:this.visualizationSpec,embedOptions:this.tooltipSpec})}get root(){return e(this)}static get watchers(){return{chartData:["parseData"]}}};r.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{r as gux_chart_donut_beta}