genesys-spark-chart-components 4.12.1-beta.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 (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/cjs/genesys-chart-webcomponents.cjs.js +23 -0
  4. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +140 -0
  5. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +229 -0
  6. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +135 -0
  7. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +113 -0
  8. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +143 -0
  9. package/dist/cjs/gux-visualization-beta.cjs.entry.js +71953 -0
  10. package/dist/cjs/index-1e13a15f.js +1647 -0
  11. package/dist/cjs/index.cjs.js +2 -0
  12. package/dist/cjs/loader.cjs.js +13 -0
  13. package/dist/cjs/log-error-c46b4b4c.js +21 -0
  14. package/dist/cjs/usage-30f04ec3.js +208 -0
  15. package/dist/collection/collection-manifest.json +17 -0
  16. package/dist/collection/components/beta/gux-chart-column/gux-chart-column.css +13 -0
  17. package/dist/collection/components/beta/gux-chart-column/gux-chart-column.js +343 -0
  18. package/dist/collection/components/beta/gux-chart-column/gux-chart-column.locale.js +92 -0
  19. package/dist/collection/components/beta/gux-chart-column/tests/gux-column-chart.spec.js +22 -0
  20. package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.css +4 -0
  21. package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.js +575 -0
  22. package/dist/collection/components/beta/gux-chart-donut/tests/gux-chart-donut.spec.js +11 -0
  23. package/dist/collection/components/beta/gux-chart-line/gux-chart-line.css +4 -0
  24. package/dist/collection/components/beta/gux-chart-line/gux-chart-line.js +391 -0
  25. package/dist/collection/components/beta/gux-chart-line/gux-chart-line.locale.js +92 -0
  26. package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.e2e.js +17 -0
  27. package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.spec.js +22 -0
  28. package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.css +4 -0
  29. package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.js +284 -0
  30. package/dist/collection/components/beta/gux-chart-pie/tests/gux-chart-pie.spec.js +11 -0
  31. package/dist/collection/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.css +4 -0
  32. package/dist/collection/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.js +365 -0
  33. package/dist/collection/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.spec.js +33 -0
  34. package/dist/collection/components/beta/gux-visualization/gux-visualization.css +19 -0
  35. package/dist/collection/components/beta/gux-visualization/gux-visualization.js +143 -0
  36. package/dist/collection/components/beta/gux-visualization/gux-visualization.locale.js +92 -0
  37. package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.e2e.js +31 -0
  38. package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.spec.js +35 -0
  39. package/dist/collection/i18n/fetchResources.js +12 -0
  40. package/dist/collection/i18n/index.js +73 -0
  41. package/dist/collection/index.js +2 -0
  42. package/dist/collection/test/axeConfig.js +7 -0
  43. package/dist/collection/test/e2eTestUtils.js +20 -0
  44. package/dist/collection/test/jestMatcherUtils.js +1 -0
  45. package/dist/collection/test/setupAxeTests.js +75 -0
  46. package/dist/collection/test/setupTests.js +9 -0
  47. package/dist/collection/test/specTestUtils.js +10 -0
  48. package/dist/collection/utils/dom/get-closest-element.js +15 -0
  49. package/dist/collection/utils/error/log-error.js +6 -0
  50. package/dist/collection/utils/theme/color-palette.js +12 -0
  51. package/dist/collection/utils/tracking/usage.js +81 -0
  52. package/dist/collection/utils/tracking/usage.spec.js +121 -0
  53. package/dist/component-specs.json +187 -0
  54. package/dist/esm/genesys-chart-webcomponents.js +18 -0
  55. package/dist/esm/gux-chart-column-beta.entry.js +136 -0
  56. package/dist/esm/gux-chart-donut-beta.entry.js +225 -0
  57. package/dist/esm/gux-chart-line-beta.entry.js +131 -0
  58. package/dist/esm/gux-chart-pie-beta.entry.js +109 -0
  59. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +139 -0
  60. package/dist/esm/gux-visualization-beta.entry.js +71949 -0
  61. package/dist/esm/index-701d93cf.js +1619 -0
  62. package/dist/esm/index.js +1 -0
  63. package/dist/esm/loader.js +9 -0
  64. package/dist/esm/log-error-0fc61f6f.js +18 -0
  65. package/dist/esm/polyfills/core-js.js +11 -0
  66. package/dist/esm/polyfills/dom.js +79 -0
  67. package/dist/esm/polyfills/es5-html-element.js +1 -0
  68. package/dist/esm/polyfills/index.js +34 -0
  69. package/dist/esm/polyfills/system.js +6 -0
  70. package/dist/esm/usage-61eee3bd.js +206 -0
  71. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.css +1 -0
  72. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -0
  73. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.ar.json +1 -0
  74. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.cs.json +1 -0
  75. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.da.json +1 -0
  76. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.de.json +1 -0
  77. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -0
  78. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.es-es.json +1 -0
  79. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.es.json +1 -0
  80. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.fi.json +1 -0
  81. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.fr-ca.json +1 -0
  82. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.fr.json +1 -0
  83. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.he.json +1 -0
  84. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.it.json +1 -0
  85. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.ja.json +1 -0
  86. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.ko.json +1 -0
  87. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.nl.json +1 -0
  88. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.no.json +1 -0
  89. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.pl.json +1 -0
  90. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.pt-br.json +1 -0
  91. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.pt-pt.json +1 -0
  92. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.ru.json +1 -0
  93. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.sv.json +1 -0
  94. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.th.json +1 -0
  95. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.tr.json +1 -0
  96. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.uk.json +1 -0
  97. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.zh-cn.json +1 -0
  98. package/dist/genesys-chart-webcomponents/i18n/genesys-webcomponents.i18n.zh-tw.json +1 -0
  99. package/dist/genesys-chart-webcomponents/index.esm.js +0 -0
  100. package/dist/genesys-chart-webcomponents/p-137f5b8f.entry.js +1 -0
  101. package/dist/genesys-chart-webcomponents/p-3e4b3dbc.js +2 -0
  102. package/dist/genesys-chart-webcomponents/p-82f0ea01.js +1 -0
  103. package/dist/genesys-chart-webcomponents/p-97c45977.js +1 -0
  104. package/dist/genesys-chart-webcomponents/p-b5179379.entry.js +1 -0
  105. package/dist/genesys-chart-webcomponents/p-b901e9e0.entry.js +11 -0
  106. package/dist/genesys-chart-webcomponents/p-c3aa8578.entry.js +1 -0
  107. package/dist/genesys-chart-webcomponents/p-d4a346df.entry.js +1 -0
  108. package/dist/genesys-chart-webcomponents/p-d9928f8c.entry.js +1 -0
  109. package/dist/index.cjs.js +1 -0
  110. package/dist/index.js +1 -0
  111. package/dist/loader/cdn.js +3 -0
  112. package/dist/loader/index.cjs.js +3 -0
  113. package/dist/loader/index.d.ts +21 -0
  114. package/dist/loader/index.es2017.js +3 -0
  115. package/dist/loader/index.js +4 -0
  116. package/dist/loader/package.json +11 -0
  117. package/dist/stencil-wrapper.js +58 -0
  118. package/dist/types/components/beta/gux-chart-column/gux-chart-column.d.ts +49 -0
  119. package/dist/types/components/beta/gux-chart-column/gux-chart-column.locale.d.ts +22 -0
  120. package/dist/types/components/beta/gux-chart-donut/gux-chart-donut.d.ts +34 -0
  121. package/dist/types/components/beta/gux-chart-line/gux-chart-line.d.ts +48 -0
  122. package/dist/types/components/beta/gux-chart-line/gux-chart-line.locale.d.ts +22 -0
  123. package/dist/types/components/beta/gux-chart-pie/gux-chart-pie.d.ts +23 -0
  124. package/dist/types/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.d.ts +52 -0
  125. package/dist/types/components/beta/gux-visualization/gux-visualization.d.ts +17 -0
  126. package/dist/types/components/beta/gux-visualization/gux-visualization.locale.d.ts +22 -0
  127. package/dist/types/components.d.ts +480 -0
  128. package/dist/types/i18n/fetchResources.d.ts +11 -0
  129. package/dist/types/i18n/index.d.ts +9 -0
  130. package/dist/types/index.d.ts +3 -0
  131. package/dist/types/stencil-public-runtime.d.ts +1671 -0
  132. package/dist/types/stencil-wrapper.d.ts +2 -0
  133. package/dist/types/test/axeConfig.d.ts +6 -0
  134. package/dist/types/test/e2eTestUtils.d.ts +9 -0
  135. package/dist/types/test/jestMatcherUtils.d.ts +8 -0
  136. package/dist/types/test/specTestUtils.d.ts +2 -0
  137. package/dist/types/typings.d.ts +4 -0
  138. package/dist/types/utils/dom/get-closest-element.d.ts +1 -0
  139. package/dist/types/utils/error/log-error.d.ts +2 -0
  140. package/dist/types/utils/theme/color-palette.d.ts +1 -0
  141. package/dist/types/utils/tracking/usage.d.ts +27 -0
  142. package/package.json +118 -0
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as e}from"./p-3e4b3dbc.js";import{t as s}from"./p-97c45977.js";import{V as a,l as o}from"./p-82f0ea01.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: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.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(){s(this.root),this.parseData()}render(){return i("gux-visualization-beta",{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}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as s}from"./p-3e4b3dbc.js";import{t as e}from"./p-97c45977.js";import{V as a,l as h}from"./p-82f0ea01.js";const o="category",n=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"},axisX:{labelAngle:0,grid:!0},legend:{symbolType:"circle"}},width:{step:40},encoding:{x:{type:"nominal"},y:{type:"quantitative"},color:{field:o,type:"nominal",scale:{range:a},legend:null},size:{condition:[{param:"onHover",empty:!1,value:100}],value:40}}},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||h(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,n=this.legendTitle,l=this.useShape||"circle",r=this.colorFieldName||o;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),n&&(this.baseChartSpec.encoding.color.title=n),this.baseChartSpec.mark={type:l,filled:!0},this.baseChartSpec.config.legend.symbolType=l,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:n}];const c=Object.assign(this.baseChartSpec,t);this.visualizationSpec=c}componentWillLoad(){e(this.root),this.parseData()}render(){return i("gux-visualization-beta",{visualizationSpec:this.visualizationSpec})}get root(){return s(this)}static get watchers(){return{chartData:["parseData"]}}};n.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{n as gux_chart_scatter_plot_beta}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as e}from"./p-3e4b3dbc.js";import{t as s}from"./p-97c45977.js";import{V as a,l as h}from"./p-82f0ea01.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:a},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(){s(this.root),this.parseData()}render(){return i("gux-visualization-beta",{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}
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,21 @@
1
+ export * from '../types/components';
2
+ export interface CustomElementsDefineOptions {
3
+ exclude?: string[];
4
+ resourcesUrl?: string;
5
+ syncQueue?: boolean;
6
+ jmp?: (c: Function) => any;
7
+ raf?: (c: FrameRequestCallback) => number;
8
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
+ }
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ export declare function applyPolyfills(): Promise<void>;
13
+
14
+ /**
15
+ * Used to specify a nonce value that corresponds with an application's CSP.
16
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
17
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
18
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
19
+ * will result in the same behavior.
20
+ */
21
+ export declare function setNonce(nonce: string): void;
@@ -0,0 +1,3 @@
1
+
2
+ export * from '../esm/polyfills/index.js';
3
+ export * from '../esm/loader.js';
@@ -0,0 +1,4 @@
1
+
2
+ (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
+ export * from '../esm/polyfills/index.js';
4
+ export * from '../esm/loader.js';
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "genesys-chart-webcomponents-loader",
3
+ "private": true,
4
+ "typings": "./index.d.ts",
5
+ "module": "./index.js",
6
+ "main": "./index.cjs.js",
7
+ "jsnext:main": "./index.es2017.js",
8
+ "es2015": "./index.es2017.js",
9
+ "es2017": "./index.es2017.js",
10
+ "unpkg": "./cdn.js"
11
+ }
@@ -0,0 +1,58 @@
1
+ /* eslint @typescript-eslint/no-unsafe-call: 0 */
2
+ /**
3
+ * This module defines a wrapper around stencil's custom element setup that incorporates
4
+ * a CDN url for resource loading at build time. Because it depends on code generated
5
+ * by stencil, it's built in a second pass after the stencil components. It's normal
6
+ * to see some errors here before building anything
7
+ */
8
+ import { defineCustomElements } from '../dist/loader';
9
+ // Value templated out during build process (see scripts/wrap-stencil.js)
10
+ export const CHART_COMPONENT_ASSETS_PATH = '/spark-components/build-assets/4.12.1-beta.1-7/genesys-webcomponents/chart/';
11
+ // Default domain to load assets from
12
+ const DEFAULT_DOMAIN = 'app.mypurecloud.com';
13
+ // List of Genesys UI domains
14
+ const DOMAIN_LIST = [
15
+ 'apne2.pure.cloud',
16
+ 'apne3.pure.cloud',
17
+ 'aps1.pure.cloud',
18
+ 'cac1.pure.cloud',
19
+ 'euc2.pure.cloud',
20
+ 'euw2.pure.cloud',
21
+ 'inindca.com',
22
+ 'inintca.com',
23
+ 'mec1.pure.cloud',
24
+ 'mypurecloud.com',
25
+ 'mypurecloud.com.au',
26
+ 'mypurecloud.de',
27
+ 'mypurecloud.ie',
28
+ 'mypurecloud.jp',
29
+ 'sae1.pure.cloud',
30
+ 'use2.maximus-pure.cloud',
31
+ // 'use2.us-gov-pure.cloud', Assets are not currently deployed to FedRAMP and should fallback to the default domain
32
+ 'usw2.pure.cloud'
33
+ ];
34
+ export function registerElements() {
35
+ if (CHART_COMPONENT_ASSETS_PATH) {
36
+ defineCustomElements(window, {
37
+ resourcesUrl: `https://${getDomain() + CHART_COMPONENT_ASSETS_PATH}`
38
+ });
39
+ }
40
+ else {
41
+ defineCustomElements();
42
+ }
43
+ }
44
+ /**
45
+ * Returns the domain that web component assets should be loaded from.
46
+ * Will use the domain of the current window if it matches a Genesys domain.
47
+ */
48
+ function getDomain() {
49
+ const hostname = window.location.hostname;
50
+ const matchedDomain = DOMAIN_LIST.find(regionDomain => hostname.endsWith(regionDomain));
51
+ if (matchedDomain) {
52
+ return `app.${matchedDomain}`;
53
+ }
54
+ if (hostname.endsWith('.pure.cloud')) {
55
+ return `app.${hostname.split('.').slice(-3).join('.')}`;
56
+ }
57
+ return DEFAULT_DOMAIN;
58
+ }
@@ -0,0 +1,49 @@
1
+ import { JSX } from '../../../stencil-public-runtime';
2
+ import { EmbedOptions } from 'vega-embed';
3
+ export declare class GuxColumnChart {
4
+ root: HTMLElement;
5
+ private visualizationSpec;
6
+ private baseChartSpec;
7
+ /**
8
+ * Data to be rendered in the chart.
9
+ * Data field names must match the values you set in xFieldName and yFieldName
10
+ */
11
+ chartData: Record<string, any>;
12
+ /**
13
+ * If true, then make Axis tick label 45 degrees
14
+ */
15
+ xTickLabelSlant: boolean;
16
+ includeLegend: boolean;
17
+ /**
18
+ * Name for the data field to use to populate the chart's x-axis
19
+ * e.g. xFieldName of "category" will map any "category" fields in chartData to the x-axis
20
+ */
21
+ xFieldName: string;
22
+ /**
23
+ * Name for the data field to use to populate the chart's x-axis
24
+ * e.g. yFieldName of "value" will map any "value" fields in chartData to the y-axis
25
+ */
26
+ yFieldName: string;
27
+ /**
28
+ * Title to display along the x-axis
29
+ */
30
+ xAxisTitle: string;
31
+ /**
32
+ * Title to display along the y-axis
33
+ */
34
+ yAxisTitle: string;
35
+ /**
36
+ * Title to display above the optional legend
37
+ */
38
+ legendTitle: string;
39
+ legendPosition: 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
40
+ /**
41
+ * List specifying the order of optional chart layers.
42
+ * For correct chart layering, each chartData entry must also include a "series" field with a value indicating which layer the entry belongs to, e.g 'series': 'group1'
43
+ */
44
+ chartLayers: string[];
45
+ embedOptions: EmbedOptions;
46
+ parseData(): void;
47
+ componentWillLoad(): void;
48
+ render(): JSX.Element;
49
+ }
@@ -0,0 +1,22 @@
1
+ export declare const timeFormatLocale: {
2
+ en: {
3
+ dateTime: string;
4
+ date: string;
5
+ time: string;
6
+ periods: string[];
7
+ days: string[];
8
+ shortDays: string[];
9
+ months: string[];
10
+ shortMonths: string[];
11
+ };
12
+ de: {
13
+ dateTime: string;
14
+ date: string;
15
+ time: string;
16
+ periods: string[];
17
+ days: string[];
18
+ shortDays: string[];
19
+ months: string[];
20
+ shortMonths: string[];
21
+ };
22
+ };
@@ -0,0 +1,34 @@
1
+ import { JSX } from '../../../stencil-public-runtime';
2
+ import { EmbedOptions } from 'vega-embed';
3
+ export declare class GuxDonutChart {
4
+ root: HTMLElement;
5
+ private visualizationSpec;
6
+ private tooltipSpec;
7
+ private baseChartSpec;
8
+ /**
9
+ * Data to be rendered in the chart.
10
+ * Data field names must match the values you set in xFieldName and yFieldName
11
+ */
12
+ chartData: Record<string, any>;
13
+ includeLegend: boolean;
14
+ legendPosition: 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
15
+ legendTitle: string;
16
+ colorFieldName: string;
17
+ outerRadius: number;
18
+ innerRadius: number;
19
+ labelRadius: number;
20
+ labelField: string;
21
+ gauge: boolean;
22
+ centerText: string;
23
+ centerSubText: string;
24
+ showTooltip: boolean;
25
+ tooltipOptions: EmbedOptions;
26
+ legendX: number;
27
+ legendY: number;
28
+ legendFontSize: number;
29
+ legendSymbolSize: number;
30
+ embedOptions: EmbedOptions;
31
+ parseData(): void;
32
+ componentWillLoad(): void;
33
+ render(): JSX.Element;
34
+ }
@@ -0,0 +1,48 @@
1
+ import { JSX } from '../../../stencil-public-runtime';
2
+ import { EmbedOptions } from 'vega-embed';
3
+ export declare class GuxLineChart {
4
+ root: HTMLElement;
5
+ private visualizationSpec;
6
+ private baseChartSpec;
7
+ /**
8
+ * Data to be rendered in the chart.
9
+ * Data field names must match the values you set in xFieldName and yFieldName
10
+ */
11
+ chartData: Record<string, any>;
12
+ /**
13
+ * If true, then make Axis tick label 45 degrees
14
+ */
15
+ xTickLabelSlant: boolean;
16
+ includeLegend: boolean;
17
+ legendPosition: 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
18
+ includeDataPointMarkers: boolean;
19
+ /**
20
+ * Name for the data field to use to populate the chart's x-axis
21
+ * e.g. xFieldName of "category" will map any "category" fields in chartData to the x-axis
22
+ */
23
+ xFieldName: string;
24
+ /**
25
+ * Title to display along the x-axis
26
+ */
27
+ xAxisTitle: string;
28
+ /**
29
+ * Name for the data field to use to populate the chart's x-axis
30
+ * e.g. yFieldName of "value" will map any "value" fields in chartData to the y-axis
31
+ */
32
+ yFieldName: string;
33
+ /**
34
+ * Title to display along the y-axis
35
+ */
36
+ yAxisTitle: string;
37
+ /**
38
+ * Title to display above the optional legend
39
+ */
40
+ legendTitle: string;
41
+ colorFieldName: string;
42
+ strokeDash: boolean;
43
+ interpolation: string;
44
+ embedOptions: EmbedOptions;
45
+ parseData(): void;
46
+ componentWillLoad(): void;
47
+ render(): JSX.Element;
48
+ }
@@ -0,0 +1,22 @@
1
+ export declare const timeFormatLocale: {
2
+ en: {
3
+ dateTime: string;
4
+ date: string;
5
+ time: string;
6
+ periods: string[];
7
+ days: string[];
8
+ shortDays: string[];
9
+ months: string[];
10
+ shortMonths: string[];
11
+ };
12
+ de: {
13
+ dateTime: string;
14
+ date: string;
15
+ time: string;
16
+ periods: string[];
17
+ days: string[];
18
+ shortDays: string[];
19
+ months: string[];
20
+ shortMonths: string[];
21
+ };
22
+ };
@@ -0,0 +1,23 @@
1
+ import { JSX } from '../../../stencil-public-runtime';
2
+ import { EmbedOptions } from 'vega-embed';
3
+ export declare class GuxPieChart {
4
+ root: HTMLElement;
5
+ private visualizationSpec;
6
+ private baseChartSpec;
7
+ /**
8
+ * Data to be rendered in the chart.
9
+ * Data field names must match the values you set in xFieldName and yFieldName
10
+ */
11
+ chartData: Record<string, any>;
12
+ includeLegend: boolean;
13
+ legendPosition: 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
14
+ legendTitle: string;
15
+ colorFieldName: string;
16
+ outerRadius: number;
17
+ labelRadius: number;
18
+ labelField: string;
19
+ embedOptions: EmbedOptions;
20
+ parseData(): void;
21
+ componentWillLoad(): void;
22
+ render(): JSX.Element;
23
+ }
@@ -0,0 +1,52 @@
1
+ import { JSX } from '../../../stencil-public-runtime';
2
+ import { EmbedOptions } from 'vega-embed';
3
+ export declare class GuxScatterPlotChart {
4
+ root: HTMLElement;
5
+ private visualizationSpec;
6
+ private baseChartSpec;
7
+ /**
8
+ * Data to be rendered in the chart.
9
+ * Data field names must match the values you set in xFieldName and yFieldName
10
+ */
11
+ chartData: Record<string, any>;
12
+ /**
13
+ * If true, then make Axis tick label 45 degrees
14
+ */
15
+ xTickLabelSlant: boolean;
16
+ includeLegend: boolean;
17
+ legendPosition: 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
18
+ /**
19
+ * Name for the data field to use to populate the chart's x-axis
20
+ * e.g. xFieldName of "category" will map any "category" fields in chartData to the x-axis
21
+ */
22
+ xFieldName: string;
23
+ /**
24
+ * Title to display along the x-axis
25
+ */
26
+ xAxisTitle: string;
27
+ /**
28
+ * Name for the data field to use to populate the chart's x-axis
29
+ * e.g. yFieldName of "value" will map any "value" fields in chartData to the y-axis
30
+ */
31
+ yFieldName: string;
32
+ /**
33
+ * Title to display along the y-axis
34
+ */
35
+ yAxisTitle: string;
36
+ /**
37
+ * Title to display above the optional legend
38
+ */
39
+ legendTitle: string;
40
+ /**
41
+ * Type of category to plot in the chart
42
+ */
43
+ colorFieldName: string;
44
+ /**
45
+ * The shape of the plotting in the chart - Square, Circle and Point
46
+ */
47
+ useShape: string;
48
+ embedOptions: EmbedOptions;
49
+ parseData(): void;
50
+ componentWillLoad(): void;
51
+ render(): JSX.Element;
52
+ }
@@ -0,0 +1,17 @@
1
+ import { JSX, EventEmitter } from '../../../stencil-public-runtime';
2
+ import { EmbedOptions, VisualizationSpec } from 'vega-embed';
3
+ export declare class GuxVisualization {
4
+ private chartContainer;
5
+ private defaultVisualizationSpec;
6
+ private defaultEmbedOptions;
7
+ chartComponentReady: EventEmitter;
8
+ chartClicked: EventEmitter;
9
+ root: HTMLElement;
10
+ visualizationSpec: VisualizationSpec;
11
+ embedOptions: EmbedOptions;
12
+ componentWillLoad(): void;
13
+ handleChartClick(_name: string, value: unknown): void;
14
+ componentDidRender(): Promise<void>;
15
+ componentDidLoad(): void;
16
+ render(): JSX.Element;
17
+ }
@@ -0,0 +1,22 @@
1
+ export declare const timeFormatLocale: {
2
+ en: {
3
+ dateTime: string;
4
+ date: string;
5
+ time: string;
6
+ periods: string[];
7
+ days: string[];
8
+ shortDays: string[];
9
+ months: string[];
10
+ shortMonths: string[];
11
+ };
12
+ de: {
13
+ dateTime: string;
14
+ date: string;
15
+ time: string;
16
+ periods: string[];
17
+ days: string[];
18
+ shortDays: string[];
19
+ months: string[];
20
+ shortMonths: string[];
21
+ };
22
+ };