genesys-spark-chart-components 4.182.0 → 4.182.1

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 (28) hide show
  1. package/dist/cjs/{color-palette-D4adQLWl.js → color-palette-Efqb_jJn.js} +1 -1
  2. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-visualization-beta.cjs.entry.js +2 -3
  8. package/dist/collection/components/beta/gux-visualization/gux-visualization.js +2 -3
  9. package/dist/esm/{color-palette-CrEyAfyu.js → color-palette-wRl9qA4f.js} +1 -1
  10. package/dist/esm/gux-chart-column-beta.entry.js +1 -1
  11. package/dist/esm/gux-chart-donut-beta.entry.js +1 -1
  12. package/dist/esm/gux-chart-line-beta.entry.js +1 -1
  13. package/dist/esm/gux-chart-pie-beta.entry.js +1 -1
  14. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +1 -1
  15. package/dist/esm/gux-visualization-beta.entry.js +2 -3
  16. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
  17. package/dist/genesys-chart-webcomponents/{p-bae458d5.entry.js → p-114a72f3.entry.js} +1 -1
  18. package/dist/genesys-chart-webcomponents/{p-e271fd2d.entry.js → p-7e466156.entry.js} +2 -2
  19. package/dist/genesys-chart-webcomponents/{p-ad98d336.entry.js → p-9528a3dd.entry.js} +1 -1
  20. package/dist/genesys-chart-webcomponents/{p-2059b5fe.entry.js → p-b43d40db.entry.js} +1 -1
  21. package/dist/genesys-chart-webcomponents/{p-09763de2.entry.js → p-ca49d283.entry.js} +1 -1
  22. package/dist/genesys-chart-webcomponents/{p-ba4c0084.entry.js → p-f8838ad4.entry.js} +1 -1
  23. package/dist/genesys-chart-webcomponents/{p-CrEyAfyu.js → p-wRl9qA4f.js} +1 -1
  24. package/package.json +3 -3
  25. package/dist/collection/genesys-spark-utils/get-closest-element.js +0 -17
  26. package/dist/collection/genesys-spark-utils/intl.js +0 -131
  27. package/dist/types/genesys-spark-utils/get-closest-element.d.ts +0 -1
  28. package/dist/types/genesys-spark-utils/intl.d.ts +0 -30
@@ -1 +1 @@
1
- import{r as t,h as e,g as i}from"./p-DohbbG4E.js";import{V as a,t as s}from"./p-CrEyAfyu.js";import{l as r}from"./p-nsqlWzyl.js";const o="category",h="value",n=class{constructor(e){t(this,e),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:a},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.legendPosition="right"}parseData(){this.outerRadius||r(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),this.baseChartSpec.encoding.color.field=this.colorFieldName||o;const e=this.legendTitle;e&&(this.baseChartSpec.encoding.color.title=e),this.baseChartSpec.layer=[{mark:{type:"arc",outerRadius:this.outerRadius}}];const i=this.labelRadius;i&&this.baseChartSpec.layer.push({mark:{type:"text",radius:i},encoding:{text:{field:this.labelField||h,type:"quantitative"}}});const a=Object.assign(this.baseChartSpec,t);this.visualizationSpec=a}componentWillLoad(){s(this.root),this.parseData()}render(){return e("gux-visualization-beta",{key:"b3049772a9d436bf4d6aa1b0e9ebe21a9d9e84e9",visualizationSpec:this.visualizationSpec})}get root(){return i(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
+ import{r as t,h as e,g as i}from"./p-DohbbG4E.js";import{V as a,t as s}from"./p-wRl9qA4f.js";import{l as r}from"./p-nsqlWzyl.js";const o="category",h="value",n=class{constructor(e){t(this,e),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:a},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.legendPosition="right"}parseData(){this.outerRadius||r(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),this.baseChartSpec.encoding.color.field=this.colorFieldName||o;const e=this.legendTitle;e&&(this.baseChartSpec.encoding.color.title=e),this.baseChartSpec.layer=[{mark:{type:"arc",outerRadius:this.outerRadius}}];const i=this.labelRadius;i&&this.baseChartSpec.layer.push({mark:{type:"text",radius:i},encoding:{text:{field:this.labelField||h,type:"quantitative"}}});const a=Object.assign(this.baseChartSpec,t);this.visualizationSpec=a}componentWillLoad(){s(this.root),this.parseData()}render(){return e("gux-visualization-beta",{key:"b3049772a9d436bf4d6aa1b0e9ebe21a9d9e84e9",visualizationSpec:this.visualizationSpec})}get root(){return i(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 +1 @@
1
- import{r as t,h as i,g as s}from"./p-DohbbG4E.js";import{D as a,a as e,V as h,t as o}from"./p-CrEyAfyu.js";import{l as n}from"./p-nsqlWzyl.js";const l="category",r=class{constructor(i){t(this,i),this.labelColor=a,this.domainColor=e,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.legendPosition="right"}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,g=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),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),g&&(this.baseChartSpec.mark.point=g);const p=Object.assign(this.baseChartSpec,t);this.visualizationSpec=p}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
+ import{r as t,h as i,g as s}from"./p-DohbbG4E.js";import{D as a,a as e,V as h,t as o}from"./p-wRl9qA4f.js";import{l as n}from"./p-nsqlWzyl.js";const l="category",r=class{constructor(i){t(this,i),this.labelColor=a,this.domainColor=e,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.legendPosition="right"}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,g=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),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),g&&(this.baseChartSpec.mark.point=g);const p=Object.assign(this.baseChartSpec,t);this.visualizationSpec=p}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 +1 @@
1
- import{r as t,h as i,g as a}from"./p-DohbbG4E.js";import{D as s,a as e,V as r,t as h}from"./p-CrEyAfyu.js";import{l as n}from"./p-nsqlWzyl.js";const o=class{constructor(i){t(this,i),this.labelColor=s,this.domainColor=e,this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",mark:{type:"bar"},config:{axis:{ticks:!1,titlePadding:8,labelColor:this.labelColor||s,domainColor:this.domainColor||e},axisX:{labelAngle:0},scale:{bandPaddingInner:.4,bandPaddingOuter:.4},legend:{symbolType:"circle"},bar:{color:r[0]}},encoding:{x:{type:"nominal"},y:{type:"quantitative"},tooltip:{aggregate:"count",type:"quantitative"}}},this.legendPosition="right"}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={field:"category"}),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition);const i=this.xFieldName,a=this.yFieldName,s=this.xAxisTitle,e=this.yAxisTitle,h=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:a,type:"quantitative"}}})));this.baseChartSpec.layer=t}else i&&(this.baseChartSpec.encoding.x.field=i),a&&(this.baseChartSpec.encoding.y.field=a),s&&(this.baseChartSpec.encoding.x.title=s),e&&(this.baseChartSpec.encoding.y.title=e),h&&(this.baseChartSpec.encoding.color.title=h);const o=i;this.baseChartSpec.config.range={[o]:r};const l=Object.assign(this.baseChartSpec,t);this.visualizationSpec=l}componentWillLoad(){h(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"5bcc2fcee3bfb4905b9fdbb572593402531f960d",visualizationSpec:this.visualizationSpec})}get root(){return a(this)}static get watchers(){return{chartData:["parseData"]}}};o.style="gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta{}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}";export{o as gux_chart_column_beta}
1
+ import{r as t,h as i,g as a}from"./p-DohbbG4E.js";import{D as s,a as e,V as r,t as h}from"./p-wRl9qA4f.js";import{l as n}from"./p-nsqlWzyl.js";const o=class{constructor(i){t(this,i),this.labelColor=s,this.domainColor=e,this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v5.json",mark:{type:"bar"},config:{axis:{ticks:!1,titlePadding:8,labelColor:this.labelColor||s,domainColor:this.domainColor||e},axisX:{labelAngle:0},scale:{bandPaddingInner:.4,bandPaddingOuter:.4},legend:{symbolType:"circle"},bar:{color:r[0]}},encoding:{x:{type:"nominal"},y:{type:"quantitative"},tooltip:{aggregate:"count",type:"quantitative"}}},this.legendPosition="right"}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={field:"category"}),this.legendPosition&&(this.baseChartSpec.config.legend.orient=this.legendPosition);const i=this.xFieldName,a=this.yFieldName,s=this.xAxisTitle,e=this.yAxisTitle,h=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:a,type:"quantitative"}}})));this.baseChartSpec.layer=t}else i&&(this.baseChartSpec.encoding.x.field=i),a&&(this.baseChartSpec.encoding.y.field=a),s&&(this.baseChartSpec.encoding.x.title=s),e&&(this.baseChartSpec.encoding.y.title=e),h&&(this.baseChartSpec.encoding.color.title=h);const o=i;this.baseChartSpec.config.range={[o]:r};const l=Object.assign(this.baseChartSpec,t);this.visualizationSpec=l}componentWillLoad(){h(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"5bcc2fcee3bfb4905b9fdbb572593402531f960d",visualizationSpec:this.visualizationSpec})}get root(){return a(this)}static get watchers(){return{chartData:["parseData"]}}};o.style="gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta{}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}";export{o as gux_chart_column_beta}
@@ -1 +1 @@
1
- import{r as t,h as i,g as s}from"./p-DohbbG4E.js";import{D as e,a,V as o,t as h}from"./p-CrEyAfyu.js";import{l}from"./p-nsqlWzyl.js";const n="category",r=class{constructor(i){t(this,i),this.labelColor=e,this.domainColor=a,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.legendPosition="right"}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),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 c=Object.assign(this.baseChartSpec,t);this.visualizationSpec=c}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
+ import{r as t,h as i,g as s}from"./p-DohbbG4E.js";import{D as e,a,V as o,t as h}from"./p-wRl9qA4f.js";import{l}from"./p-nsqlWzyl.js";const n="category",r=class{constructor(i){t(this,i),this.labelColor=e,this.domainColor=a,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.legendPosition="right"}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),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 c=Object.assign(this.baseChartSpec,t);this.visualizationSpec=c}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 +1 @@
1
- var t="4.182.0";const e=[function(t){const[e,n,...o]=t.split(".");return{name:"spark-library",metadata:{fullVersion:`${e}.${n}.${o.join(".")}`,majorVersion:e,minorVersion:`${e}.${n}`}}}(t)];function n(){const t=window.newrelic;if(t){for(let o=0;o<20;o++){if(0==e.length)return void setTimeout(n,3e4);const o=e.shift();t.addPageAction(o.name,Object.assign(Object.assign({},o.metadata),{queueDepth:e.length}))}setTimeout(n,3e4)}}let o=!1;function a(a,r){window.newrelic&&(o||(o=!0,n()),document.contains(a)&&e.push({name:"spark-component",metadata:Object.assign(Object.assign({},r),{component:a.tagName.toLowerCase(),version:t})}))}const r=["#203B73","#1DA8B3","#75A8FF","#8452CF","#B5B5EB","#CC3EBE","#5E5782","#FF8FDD","#868C1E","#DDD933"],s="#596373",i="#596373";export{s as D,r as V,i as a,a as t}
1
+ var t="4.182.1";const e=[function(t){const[e,n,...o]=t.split(".");return{name:"spark-library",metadata:{fullVersion:`${e}.${n}.${o.join(".")}`,majorVersion:e,minorVersion:`${e}.${n}`}}}(t)];function n(){const t=window.newrelic;if(t){for(let o=0;o<20;o++){if(0==e.length)return void setTimeout(n,3e4);const o=e.shift();t.addPageAction(o.name,Object.assign(Object.assign({},o.metadata),{queueDepth:e.length}))}setTimeout(n,3e4)}}let o=!1;function a(a,r){window.newrelic&&(o||(o=!0,n()),document.contains(a)&&e.push({name:"spark-component",metadata:Object.assign(Object.assign({},r),{component:a.tagName.toLowerCase(),version:t})}))}const r=["#203B73","#1DA8B3","#75A8FF","#8452CF","#B5B5EB","#CC3EBE","#5E5782","#FF8FDD","#868C1E","#DDD933"],s="#596373",i="#596373";export{s as D,r as V,i as a,a as t}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesys-spark-chart-components",
3
- "version": "4.182.0",
3
+ "version": "4.182.1",
4
4
  "description": "Common chart webcomponents",
5
5
  "license": "MIT",
6
6
  "main": "dist/stencil-wrapper.js",
@@ -8,13 +8,12 @@
8
8
  "dist/"
9
9
  ],
10
10
  "scripts": {
11
- "build": "npm run clean && npm run i18n && npm run copy-genesys-spark-utils && npm run stencil && npm run build-wrapper",
11
+ "build": "npm run clean && npm run i18n && npm run stencil && npm run build-wrapper",
12
12
  "build-i18n": "./scripts/build-i18n.js",
13
13
  "build-wrapper": "./scripts/wrap-stencil.js",
14
14
  "check-a11y": "node ./scripts/check-a11y.mjs",
15
15
  "check-readmes": "./scripts/check-readmes.sh",
16
16
  "clean": "rm -r ./dist ./build || true",
17
- "copy-genesys-spark-utils": "node ./scripts/copy-genesys-spark-utils.mjs",
18
17
  "predev": "npm run i18n",
19
18
  "dev": "npm run stencil.dev",
20
19
  "eslint": "eslint . --fix",
@@ -47,6 +46,7 @@
47
46
  "types": "dist/types/index.d.ts",
48
47
  "dependencies": {
49
48
  "@redsift/d3-rs-intl": "^0.4.0",
49
+ "genesys-spark-utils": "file:../genesys-spark-utils",
50
50
  "vega": "5.31.0",
51
51
  "vega-embed": "6.29.0",
52
52
  "vega-lite": "5.23.0"
@@ -1,17 +0,0 @@
1
- //https://inindca.atlassian.net/browse/COMUI-2673
2
- // utility to get the closest element passing shadow dom boundaries
3
- export function getClosestElement(baseElement, selector) {
4
- function closest(element) {
5
- if (!element || element === document || element === window) {
6
- return null;
7
- }
8
- if (element.assignedSlot) {
9
- element = element.assignedSlot;
10
- }
11
- const found = element.closest(selector);
12
- return found
13
- ? found
14
- : closest(element.getRootNode().host);
15
- }
16
- return closest(baseElement);
17
- }
@@ -1,131 +0,0 @@
1
- import { getClosestElement } from "./get-closest-element";
2
- /**
3
- * Provides an [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)
4
- * object for formatting dates and times. Unlike the native version, `locale` is
5
- * an optional argument. If not provided, the function will try to determine the
6
- * locale from the DOM, where it should be set for a11y reasons.
7
- * @param locale optional locale to use for formatting
8
- * @param options options to pass to the Intl.DateTimeFormat constructor
9
- * @returns a new DateTimeFormat
10
- */
11
- export function dateTimeFormat(localeOrOptions, options) {
12
- let locale = undefined;
13
- if (typeof localeOrOptions === 'string') {
14
- locale = localeOrOptions;
15
- }
16
- else {
17
- options = localeOrOptions;
18
- }
19
- if (locale != undefined) {
20
- return new Intl.DateTimeFormat(locale, options);
21
- }
22
- else {
23
- const userLocale = determineDisplayLocale();
24
- return new Intl.DateTimeFormat(userLocale, options);
25
- }
26
- }
27
- /**
28
- * Provides an [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat)
29
- * object for formatting dates and times. Unlike the native version, `locale` is
30
- * an optional argument. If not provided, the function will try to determine the
31
- * locale from the DOM, where it should be set for a11y reasons.
32
- * @param locale optional locale to use for formatting
33
- * @param options options to pass to the Intl.RelativeTimeFormat constructor
34
- * @returns a new RelativeTimeFormat
35
- */
36
- export function relativeTimeFormat(localeOrOptions, options) {
37
- let locale = undefined;
38
- if (typeof localeOrOptions === 'string') {
39
- locale = localeOrOptions;
40
- }
41
- else {
42
- options = localeOrOptions;
43
- }
44
- if (locale != undefined) {
45
- return new Intl.RelativeTimeFormat(locale, options);
46
- }
47
- else {
48
- const userLocale = determineDisplayLocale();
49
- return new Intl.RelativeTimeFormat(userLocale, options);
50
- }
51
- }
52
- /**
53
- * Makes a best effort to return the locale that should be used for a given element
54
- * by checking language tags on ancestors. If no element is provided, it will
55
- * start with the document's <body> tag. If no locale can be found, it will use
56
- * the browser's locale preference. It will also try to add a region to regionless
57
- * locales when there is a partial match with the browser's locale.
58
- * @returns a locale string (e.g. 'en-US', 'en', 'de-DE', etc)
59
- */
60
- export function determineDisplayLocale(element = document.body) {
61
- var _a;
62
- const domLocale = (_a = getClosestElement(element, '*[lang]')) === null || _a === void 0 ? void 0 : _a.lang;
63
- const domLocaleWithOverride = domLocaleOverride(domLocale);
64
- if (!domLocaleWithOverride || browserHasRegionData(domLocaleWithOverride)) {
65
- // If we can't find a locale in the DOM, or we find a locale without a region that matches the
66
- // users's browser locale, use the browser locale.
67
- return navigator.language;
68
- }
69
- else {
70
- return domLocaleWithOverride;
71
- }
72
- }
73
- /**
74
- * Returns true if the provided locale only has a language, but the user's
75
- * browser settings have the same language with a locale.
76
- * @param localeString The locale to check
77
- * @returns true if the region can be guessed from the browser settings.
78
- */
79
- function browserHasRegionData(localeString) {
80
- var _a;
81
- return (browserLocaleOverride(localeString) ||
82
- (localeString.length == 2 &&
83
- ((_a = navigator.language) === null || _a === void 0 ? void 0 : _a.startsWith(`${localeString}-`))));
84
- }
85
- // Currently, login page and web-directory store the English user selection as `en-us`.
86
- // We will remove this override once those apps migrate from using en-us to en as part of a future epic.
87
- function domLocaleOverride(localeString) {
88
- if ((localeString === null || localeString === void 0 ? void 0 : localeString.toLowerCase()) === 'en-us') {
89
- return 'en';
90
- }
91
- else {
92
- return localeString;
93
- }
94
- }
95
- function browserLocaleOverride(localeString) {
96
- var _a, _b;
97
- switch (localeString.toLowerCase()) {
98
- case 'zh-cn':
99
- return Boolean((_a = navigator.language) === null || _a === void 0 ? void 0 : _a.toLowerCase().startsWith('zh-sg'));
100
- case 'zh-tw':
101
- return Boolean((_b = navigator.language) === null || _b === void 0 ? void 0 : _b.toLowerCase().startsWith('zh-hk'));
102
- default:
103
- return false;
104
- }
105
- }
106
- export function getFormat(locale) {
107
- const date = new Date('July 5, 2000 15:00:00 UTC+00:00');
108
- const options = {
109
- year: 'numeric',
110
- month: 'numeric',
111
- day: 'numeric'
112
- };
113
- const dateTimeFormat = new Intl.DateTimeFormat(locale, options);
114
- const parts = dateTimeFormat.formatToParts(date);
115
- const dateString = parts
116
- .map(({ type, value }) => {
117
- switch (type) {
118
- case 'day':
119
- return `dd`;
120
- case 'month':
121
- return `mm`;
122
- case 'year':
123
- return `yyyy`;
124
- default:
125
- return value;
126
- }
127
- })
128
- .join('');
129
- // review locales with two character date delimiters https://inindca.atlassian.net/browse/COMUI-2679
130
- return dateString.replace(/\s/g, '').replace(/‏/g, '');
131
- }
@@ -1 +0,0 @@
1
- export declare function getClosestElement(baseElement: HTMLElement, selector: string): Element;
@@ -1,30 +0,0 @@
1
- /**
2
- * Provides an [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)
3
- * object for formatting dates and times. Unlike the native version, `locale` is
4
- * an optional argument. If not provided, the function will try to determine the
5
- * locale from the DOM, where it should be set for a11y reasons.
6
- * @param locale optional locale to use for formatting
7
- * @param options options to pass to the Intl.DateTimeFormat constructor
8
- * @returns a new DateTimeFormat
9
- */
10
- export declare function dateTimeFormat(localeOrOptions: string | Intl.DateTimeFormatOptions, options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
11
- /**
12
- * Provides an [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat)
13
- * object for formatting dates and times. Unlike the native version, `locale` is
14
- * an optional argument. If not provided, the function will try to determine the
15
- * locale from the DOM, where it should be set for a11y reasons.
16
- * @param locale optional locale to use for formatting
17
- * @param options options to pass to the Intl.RelativeTimeFormat constructor
18
- * @returns a new RelativeTimeFormat
19
- */
20
- export declare function relativeTimeFormat(localeOrOptions: string | Intl.RelativeTimeFormatOptions, options?: Intl.RelativeTimeFormatOptions): Intl.RelativeTimeFormat;
21
- /**
22
- * Makes a best effort to return the locale that should be used for a given element
23
- * by checking language tags on ancestors. If no element is provided, it will
24
- * start with the document's <body> tag. If no locale can be found, it will use
25
- * the browser's locale preference. It will also try to add a region to regionless
26
- * locales when there is a partial match with the browser's locale.
27
- * @returns a locale string (e.g. 'en-US', 'en', 'de-DE', etc)
28
- */
29
- export declare function determineDisplayLocale(element?: HTMLElement): string;
30
- export declare function getFormat(locale: string): string;