@xplortech/apollo-data 0.0.5 → 0.0.6

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 (80) hide show
  1. package/README.md +15 -91
  2. package/dist/apollo-data/apollo-data.esm.js +1 -1
  3. package/dist/apollo-data/p-25841a73.entry.js +1 -0
  4. package/dist/apollo-data/p-839050b7.entry.js +1 -0
  5. package/dist/apollo-data/p-C2k3WBpi.js +11 -0
  6. package/dist/apollo-data/p-D64asVrg.js +2 -0
  7. package/dist/apollo-data/{p-b7471c12.entry.js → p-e2c3a317.entry.js} +1 -1
  8. package/dist/cjs/apollo-data-bar-chart.cjs.entry.js +10 -9
  9. package/dist/cjs/{apollo-data-base-CxVQ-WVP.js → apollo-data-base-COGMOEqL.js} +7 -11
  10. package/dist/cjs/apollo-data-donut-chart.cjs.entry.js +3 -3
  11. package/dist/cjs/{apollo-data-line-chart_2.cjs.entry.js → apollo-data-heat-map_4.cjs.entry.js} +358 -9
  12. package/dist/cjs/apollo-data.cjs.js +3 -3
  13. package/dist/cjs/{index-Cl7HgRm0.js → index-Bd5risOy.js} +116 -63
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/collection/apollo-data-base.js +4 -8
  16. package/dist/collection/collection-manifest.json +5 -2
  17. package/dist/collection/components/apollo-data-bar/apollo-data-bar.js +8 -7
  18. package/dist/collection/components/apollo-data-bar/apollo-data-bar.stories.js +122 -0
  19. package/dist/collection/components/apollo-data-donut/apollo-data-donut.js +1 -1
  20. package/dist/collection/components/apollo-data-donut/apollo-data-donut.stories.js +132 -0
  21. package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.js +208 -0
  22. package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.stories.js +137 -0
  23. package/dist/collection/components/apollo-data-line/apollo-data-line.js +8 -6
  24. package/dist/collection/components/apollo-data-line/apollo-data-line.stories.js +122 -0
  25. package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.js +1 -1
  26. package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.stories.js +147 -0
  27. package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.js +294 -0
  28. package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.stories.js +126 -0
  29. package/dist/collection/examples/apollo-data-heat-map.examples.js +131 -0
  30. package/dist/collection/examples/apollo-data-world-map.examples.js +45 -0
  31. package/dist/collection/examples/index.js +2 -0
  32. package/dist/collection/utils/code-generator.js +1 -1
  33. package/dist/components/apollo-data-bar-chart.js +1 -1
  34. package/dist/components/apollo-data-donut-chart.js +1 -1
  35. package/dist/components/apollo-data-heat-map.d.ts +11 -0
  36. package/dist/components/apollo-data-heat-map.js +1 -0
  37. package/dist/components/apollo-data-line-chart.js +1 -1
  38. package/dist/components/apollo-data-scatter-chart.js +1 -1
  39. package/dist/components/apollo-data-world-map-chart.d.ts +11 -0
  40. package/dist/components/apollo-data-world-map-chart.js +1 -0
  41. package/dist/components/index.js +1 -1
  42. package/dist/components/p-CfbMSXKd.js +11 -0
  43. package/dist/components/p-gcjU8DVr.js +1 -0
  44. package/dist/esm/apollo-data-bar-chart.entry.js +10 -9
  45. package/dist/esm/{apollo-data-base-BWkrM8dc.js → apollo-data-base-C2k3WBpi.js} +7 -11
  46. package/dist/esm/apollo-data-donut-chart.entry.js +3 -3
  47. package/dist/esm/{apollo-data-line-chart_2.entry.js → apollo-data-heat-map_4.entry.js} +357 -10
  48. package/dist/esm/apollo-data.js +4 -4
  49. package/dist/esm/{index-Bb2nY-Tf.js → index-D64asVrg.js} +116 -63
  50. package/dist/esm/loader.js +3 -3
  51. package/dist/types/apollo-data-base.d.ts +2 -2
  52. package/dist/types/components/apollo-data-bar/apollo-data-bar.stories.d.ts +5 -0
  53. package/dist/types/components/apollo-data-donut/apollo-data-donut.stories.d.ts +5 -0
  54. package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.d.ts +140 -0
  55. package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.stories.d.ts +5 -0
  56. package/dist/types/components/apollo-data-line/apollo-data-line.stories.d.ts +5 -0
  57. package/dist/types/components/apollo-data-scatter/apollo-data-scatter.d.ts +1 -3
  58. package/dist/types/components/apollo-data-scatter/apollo-data-scatter.stories.d.ts +5 -0
  59. package/dist/types/components/apollo-data-world-map/apollo-data-world-map.d.ts +281 -0
  60. package/dist/types/components/apollo-data-world-map/apollo-data-world-map.stories.d.ts +5 -0
  61. package/dist/types/components.d.ts +128 -8
  62. package/dist/types/examples/apollo-data-heat-map.examples.d.ts +11 -0
  63. package/dist/types/examples/apollo-data-scatter.examples.d.ts +1 -1
  64. package/dist/types/examples/apollo-data-world-map.examples.d.ts +11 -0
  65. package/dist/types/examples/index.d.ts +2 -0
  66. package/dist/types/stencil-public-runtime.d.ts +23 -2
  67. package/dist/types/utils/code-generator.d.ts +1 -3
  68. package/package.json +8 -8
  69. package/src/examples/apollo-data-bar.examples.ts +157 -157
  70. package/src/examples/apollo-data-heat-map.examples.ts +147 -0
  71. package/src/examples/apollo-data-line.examples.ts +91 -91
  72. package/src/examples/apollo-data-scatter.examples.ts +1 -1
  73. package/src/examples/apollo-data-world-map.examples.ts +57 -0
  74. package/src/examples/index.ts +3 -1
  75. package/dist/apollo-data/p-4ac3c97c.entry.js +0 -1
  76. package/dist/apollo-data/p-BWkrM8dc.js +0 -11
  77. package/dist/apollo-data/p-Bb2nY-Tf.js +0 -2
  78. package/dist/apollo-data/p-e518baac.entry.js +0 -1
  79. package/dist/components/p-7XF5Cax8.js +0 -11
  80. package/dist/components/p-Dws5s-Xe.js +0 -1
@@ -1,2 +0,0 @@
1
- var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},l=(t,e)=>(0,console.error)(t,e),i=new Map,s="undefined"!=typeof window?window:{},r={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},c=t=>Promise.resolve(t),u=!!(()=>{try{return!!s.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})()&&(()=>!!s.document&&Object.getOwnPropertyDescriptor(s.document.adoptedStyleSheets,"length").writable)(),a=!1,f=[],d=[],h=(t,e)=>n=>{t.push(n),a||(a=!0,e&&4&r.u?v(p):r.raf(p))},m=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},p=()=>{m(f),m(d),(a=f.length>0)&&r.raf(p)},v=t=>c().then(t),b=h(d,!0);function $(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(u?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}var y,w=new WeakMap,j=t=>"object"==(t=typeof t)||"function"===t,g=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!j(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?O(null,o):o),s=i)};c(n),e&&e.key&&(l=e.key);const u=O(t,null);return u.p=e,r.length>0&&(u.v=r),u.$=l,u},O=(t,e)=>({u:0,j:t,m:null!=e?e:null,O:null,v:null,p:null,$:null}),S={},k=(t,e)=>null==t||j(t)?t:1&e?t+"":t,M=t=>{var e;return null==(e=n(t))?void 0:e.$hostElement$},C=(t,e,n,o,l,i)=>{if(n===o)return;let s=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else{const r=j(o);if(s||r&&null!==o)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?s=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!s||4&i||l)&&!r&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}},E=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.p||{},i=e.p||{};for(const t of x(Object.keys(l)))t in i||C(o,t,l[t],void 0,n,e.u);for(const t of x(Object.keys(i)))C(o,t,l[t],i[t],n,e.u)};function x(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var P=!1,R=(t,e,n)=>{const o=e.v[n];let l,i,r=0;if(!s.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=s.document.createElement(o.j),E(null,o,P),o.v){const e="template"===o.j?l.content:l;for(r=0;r<o.v.length;++r)i=R(t,o,r),i&&e.appendChild(i)}return l["s-hn"]=y,l},D=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===y&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);l<=i;++l)o[l]&&(s=R(null,n,l),s&&(o[l].O=s,T(r,s,e)))},L=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},N=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),U=(t,e,n=!1)=>{const o=e.O=t.O,l=t.v,i=e.v;E(t,e,P),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],m=o.length-1,p=o[0],v=o[m];const b="template"===n.j?t.content:t;for(;r<=f&&c<=m;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==p)p=o[++c];else if(null==v)v=o[--m];else if(N(d,p,l))U(d,p,l),d=e[++r],p=o[++c];else if(N(h,v,l))U(h,v,l),h=e[--f],v=o[--m];else if(N(d,v,l))U(d,v,l),T(b,d.O,h.O.nextSibling),d=e[++r],v=o[--m];else if(N(h,p,l))U(h,p,l),T(b,h.O,d.O),h=e[--f],p=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].$&&e[a].$===p.$){u=a;break}u>=0?(s=e[u],s.j!==p.j?i=R(e&&e[c],n,u):(U(s,p,l),e[u]=void 0,i=s.O),p=o[++c]):(i=R(e&&e[c],n,c),p=o[++c]),i&&T(d.O.parentNode,i,d.O)}r>f?D(t,null==o[m+1]?null:o[m+1].O,n,o,c,m):c>m&&L(e,r,f)})(o,l,e,i,n):null!==i?D(o,null,e,i,0,i.length-1):!n&&null!==l&&L(l,0,l.length-1)},T=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),W=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},A=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);W(t,t.k);const n=()=>H(t,e);if(!e)return b(n);queueMicrotask((()=>{n()}))},H=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.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 e?(t.M.length&&t.M.forEach((t=>t(n))),l=_(o,"componentWillLoad",void 0,n)):l=_(o,"componentWillUpdate",void 0,n),l=q(l,(()=>_(o,"componentWillRender",void 0,n))),q(l,(()=>F(t,o,e)))},q=(t,e)=>z(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),z=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,F=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];V(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>G(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},V=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C||O(null,null),i=(t=>t&&t.j===S)(e)?e:g(null,null,e);if(y=o.tagName,n&&i.p)for(const t of Object.keys(i.p))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.p[t]=o[t]);i.j=null,i.u|=4,t.C=i,i.O=l.O=o.shadowRoot||o,U(l,i,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},G=t=>{const e=t.$hostElement$,n=t.i,o=t.k;_(n,"componentDidRender",void 0,e),64&t.u?_(n,"componentDidUpdate",void 0,e):(t.u|=64,B(e),_(n,"componentDidLoad",void 0,e),t.P(e),o||Y()),t.S&&(t.S(),t.S=void 0),512&t.u&&v((()=>A(t,!1))),t.u&=-517},Y=()=>{v((()=>(t=>{const e=r.ce("appload",{detail:{namespace:"apollo-data"}});return t.dispatchEvent(e),e})(s)))},_=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},B=t=>t.classList.add("hydrated"),I=(t,e,o,l)=>{const i=n(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.R}" 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/stenciljs/core/issues/5457).`);const s=i.l.get(e),r=i.u,c=i.i;if(o=k(o,l.t[e][0]),!(8&r&&void 0!==s||o===s||Number.isNaN(s)&&Number.isNaN(o)||(i.l.set(e,o),2!=(18&r)))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,s,e))return;A(i,!1)}},J=(t,e,o)=>{var l,i;const s=t.prototype;if(e.t){const c=Object.entries(null!=(l=e.t)?l:{});if(c.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};i&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&o||!i)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>n(this).l.get(e))(0,t);const o=n(this),l=o?o.i:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(i){const s=n(this);if(s){if(r)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(i=s.l.get(t)),r.call(this,k(i,l)),void I(this,t,i=32&l?this[t]:s.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return I(this,t,i,e),void(1&o&&!s.i&&s.M.push((()=>{4096&e.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=i)})));const n=()=>{const n=s.i[t];!s.l.get(t)&&n&&s.l.set(t,n),s.i[t]=k(i,l),I(this,t,s.i[t],e)};s.i?n():s.M.push((()=>{n()}))}}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){r.jmp((()=>{var r;const u=o.get(t),a=n(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const n=null==a?void 0:a.u;if(a&&n&&!(8&n)&&i!==l){const o=a.i,s=null==(r=e.D)?void 0:r[t];null==s||s.forEach((e=>{const[[s,r]]=Object.entries(e);null!=o[s]&&(128&n||1&r)&&o[s].call(o,i,l,t)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(s,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.D)?i:{}),...c.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},K=(t,e)=>{_(t,"connectedCallback",void 0,e)},Q=(t,e)=>{_(t,"disconnectedCallback",void 0,e||t)},X=(t,e={})=>{var o;if(!s.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const c=[],u=e.exclude||[],a=s.customElements,f=s.document.head,d=f.querySelector("meta[charset]"),h=s.document.createElement("style"),m=[];let p,v=!0;if(Object.assign(r,e),r.h=new URL(e.resourcesUrl||"./",s.document.baseURI).href,t.map((t=>{t[1].map((e=>{const o={u:e[0],R:e[1],t:e[2],L:e[3]};o.t=e[2];const s=o.R,f=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,N:new Map};n.U=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[],n.M=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,o),1&o.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.R}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else $.call(t,o)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),p&&(clearTimeout(p),p=null),v?m.push(this):r.jmp((()=>(t=>{if(!(1&r.u)){const e=n(t);if(!e)return;const o=e.o,s=()=>{};if(1&e.u)(null==e?void 0:e.i)?K(e.i,t):(null==e?void 0:e.U)&&e.U.then((()=>K(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){W(e,e.k=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u))if(e.u|=32,n.T){const s=((t,e)=>{const n=t.R.replace(/-/g,"_"),o=t.T;if(!o)return;const s=i.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.R}#${e.W}" was not found`);o.isProxied||(J(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){l(e,t)}e.u&=-9,r(),K(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));const s=e.k,r=()=>A(e,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(t,e,o)}s()}})(this))))}disconnectedCallback(){r.jmp((()=>(async t=>{if(!(1&r.u)){const e=n(t);(null==e?void 0:e.i)?Q(e.i,t):(null==e?void 0:e.U)&&e.U.then((()=>Q(e.i,t)))}w.has(t)&&w.delete(t),t.shadowRoot&&w.has(t.shadowRoot)&&w.delete(t.shadowRoot)})(this))),r.raf((()=>{var t;const e=n(this);if(!e)return;const o=m.findIndex((t=>t===this));o>-1&&m.splice(o,1),(null==(t=null==e?void 0:e.C)?void 0:t.O)instanceof Node&&!e.C.O.isConnected&&delete e.C.O}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.U}};o.T=t[0],u.includes(s)||a.get(s)||(c.push(s),a.define(s,J(f,o,1)))}))})),c.length>0&&(h.textContent+=c.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",h.innerHTML.length)){h.setAttribute("data-styles","");const t=null!=(o=r.A)?o:function(){var t,e,n;return null!=(n=null==(e=null==(t=s.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();null!=t&&h.setAttribute("nonce",t),f.insertBefore(h,d?d.nextSibling:f.firstChild)}v=!1,m.length?m.map((t=>t.connectedCallback())):r.jmp((()=>p=setTimeout(Y,30)))},Z=t=>r.A=t;export{S as H,X as b,M as g,g as h,c as p,o as r,Z as s}
@@ -1 +0,0 @@
1
- import{r as e,g as a,h as t,H as l}from"./p-Bb2nY-Tf.js";import{A as n}from"./p-BWkrM8dc.js";import{C as i}from"./p-2nuV5Vny.js";const o="apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif",r=class extends n{constructor(a){super(),e(this,a)}get el(){return a(this)}adData=[];adSpec=null;static tooltipStylesInjected=!1;componentDidLoad(){this.injectTooltipStyles()}async componentDidRender(){await this.renderChart()}injectTooltipStyles(){if(r.tooltipStylesInjected)return;const e="apollo-data-line-tooltip-styles";if(document.getElementById(e))return void(r.tooltipStylesInjected=!0);const a=document.createElement("style");a.id=e,a.textContent="\n #vg-tooltip-element {\n background-color: #ffffff;\n border: 1px solid #e1e2e8;\n border-radius: 0.25rem;\n box-shadow: 0 4px 6px -1px rgba(48, 45, 59, 0.1), 0 2px 4px -1px rgba(48, 45, 59, 0.05);\n font-family: apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif;\n font-weight: 500;\n padding: 0.25rem 0.75rem;\n pointer-events: none;\n text-align: center;\n transform: translateY(20%);\n white-space: pre;\n z-index: 999999999;\n }\n\n #vg-tooltip-element table tr td.key {\n color: #6a6d7d;\n text-align: center;\n }\n\n #vg-tooltip-element table tr td.value {\n text-align: center;\n }\n\n #vg-tooltip-element.dark-theme {\n background-color: #292632;\n border: 1px solid #6a6d7d;\n box-shadow: 0 4px 6px -1px rgba(48, 45, 59, 0.1), 0 2px 4px -1px rgba(48, 45, 59, 0.5);\n color: #ffffff;\n }\n\n #vg-tooltip-element::after {\n border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;\n border-style: solid;\n border-width: 9px;\n bottom: -17px;\n content: '';\n left: 50%;\n position: absolute;\n transform: translateX(-50%);\n }\n ",document.head.appendChild(a),r.tooltipStylesInjected=!0}async getViewData(e,a){if(!a)throw new Error("adSpec is required for apollo-data-line-chart");const{tooltipPrefix:t="",currencySymbol:l=""}=a;if(!e||0===e.length)throw new Error("Data is required for apollo-data-line-chart");const n=Array.from(new Set(e.map((e=>e.category)))),r=[...new Set(e.map((e=>e.xValue)))].sort(((e,a)=>e-a)),s=a?.colorSet??i,d=r.map((a=>{const t=e.find((e=>e.xValue===a));return{xValue:a,displayLabel:null!=t?.xLabel?t.xLabel:String(a)}})),u=t?".2f":".0f",c=t?l:"",f=a.pointStyle??"circle",p=function(e){switch(e){case"dashed":return[6,4];case"dotted":return[2,2];default:return[]}}(a.lineStyle??"solid"),m=[{name:"raw",values:e},{name:"xLabelData",values:d}];n.forEach(((e,a)=>{m.push({name:`series_${a}`,source:"raw",transform:[{type:"filter",expr:`datum.category === ${JSON.stringify(e)}`},{type:"collect",sort:{field:"xValue"}}]})}));const y=n.map(((e,a)=>({type:"line",from:{data:`series_${a}`},encode:{enter:{x:{scale:"x",field:"xValue"},y:{scale:"y",field:"yValue"},stroke:{value:s[a%s.length]},strokeWidth:{value:2},interpolate:{value:"monotone"},...p.length>0?{strokeDash:{value:p}}:{}}}})));return{$schema:"https://vega.github.io/schema/vega/v5.json",config:{text:{fill:"#6a6d7d",font:o,labelFontSize:12,labelFontWeight:400},axis:{labelColor:"#6a6d7d",titleColor:"#6a6d7d",labelFont:o,titleFont:o,titleFontWeight:400},legend:{labelColor:"#6a6d7d",titleColor:"#6a6d7d",labelFont:o,titleFont:o,labelFontSize:12,labelLimit:95},title:{color:"#6a6d7d",font:o,labelFontSize:12,labelFontWeight:400}},height:250,autosize:{type:"fit-x",contains:"padding",resize:!0},signals:[{name:"containerW",update:"max(containerSize()[0], 400)"},{name:"legendColumns",update:"ceil(containerW / 140)"}],width:{signal:"containerW"},data:m,scales:[{name:"x",type:"point",domain:r,range:"width",padding:.5},{name:"xLabels",type:"ordinal",domain:{data:"xLabelData",field:"xValue"},range:{data:"xLabelData",field:"displayLabel"}},{name:"y",type:"linear",domain:{data:"raw",field:"yValue"},nice:!0,zero:!0,range:"height"},{name:"color",type:"ordinal",domain:n,range:a?.colorSet??i}],axes:[{orient:"bottom",scale:"x",title:a?.xAxisTitle,labelPadding:12,titlePadding:12,labelAngle:-90,labelAlign:"right",labelBaseline:"middle",tickSize:3,labelFontSize:12,titleFontSize:14,ticks:!1,domain:!1,encode:{labels:{update:{text:{signal:"scale('xLabels', datum.value)"}}}}},{orient:"left",scale:"y",title:a?.yAxisTitle||"",format:",.0f",grid:!0,tickCount:6,labelFontSize:12,titleFontSize:14,ticks:!1,domain:!1,tickBand:"extent",labelPadding:10}],legends:[{stroke:"color",orient:"bottom",direction:"horizontal",columns:{signal:"legendColumns"},title:null,symbolType:"stroke",symbolStrokeWidth:3,rowPadding:8,symbolOffset:-35,symbolSize:100,labelOffset:8,labelLimit:95}],marks:[...y,{type:"symbol",from:{data:"raw"},encode:{enter:{x:{scale:"x",field:"xValue"},y:{scale:"y",field:"yValue"},fill:{scale:"color",field:"category"},size:{value:50},shape:{value:f},tooltip:{signal:`(datum.xLabel != null ? datum.xLabel : format(datum.xValue, ',.0f')) + ' · ' + datum.category + ': ' + (datum.yLabel != null ? datum.yLabel : '${c}' + format(datum.yValue, ',${u}'))`}}}}]}}render(){return t(l,{key:"7799f01536f212d7a06da08c1e463d8529c5bf21"},t("div",{key:"25463f10bbc0f5443c35ab03b5b53164d9ad1efd",id:"container",style:{width:"100%",height:"100%"}}))}},s=class extends n{constructor(a){super(),e(this,a)}get el(){return a(this)}adData=[];adSpec={};async componentDidRender(){await this.renderChart()}DEFAULT_POINT_STYLE={shape:"circle",opacity:1,color:"blue",size:1};async getViewData(e,a){const t=e.map((e=>{const t={};return Object.keys(this.DEFAULT_POINT_STYLE).forEach((l=>{t[l]=e.pointStyle?.[l]??e?.[l]??a.categoryPointStyleMap?.[e.category]?.[l]??a.defaultPointStyle?.[l]??this.DEFAULT_POINT_STYLE[l]})),{category:e.category,xValue:e.xValue,yValue:e.yValue,color:t.color,shape:t.shape,opacity:t.opacity}})),l="auto"===a?.tooltip?"category":"none";return{$schema:"https://vega.github.io/schema/vega/v6.json",description:"A scatter plot with null values visualized along the axes.",width:450,height:450,padding:5,autosize:{type:"fit",resize:!0},signals:[{name:"nullSize",value:8},{name:"nullGap",update:"nullSize + 10"}],data:[{name:"source",values:t},{name:"valid",source:"source",transform:[{type:"filter",expr:"datum.xValue != null && datum.yValue != null"}]},{name:"nullXY",source:"source",transform:[{type:"filter",expr:"datum.xValue == null && datum.yValue == null"},{type:"aggregate"}]},{name:"nullY",source:"source",transform:[{type:"filter",expr:"datum.xValue != null && datum.yValue == null"}]},{name:"nullX",source:"source",transform:[{type:"filter",expr:"datum.xValue == null && datum.yValue != null"}]}],scales:[{name:"xscale",type:"linear",range:[{signal:"nullGap"},{signal:"width"}],nice:!0,domain:{data:"valid",field:"xValue"}},{name:"yscale",type:"linear",range:[{signal:"height - nullGap"},0],nice:!0,domain:{data:"valid",field:"yValue"}}],axes:[{orient:"bottom",scale:"xscale",offset:5,format:"s",title:a?.xAxisTitle||"X Value"},{orient:"left",scale:"yscale",offset:5,format:"s",title:a?.yAxisTitle||"Y Value"}],marks:[{type:"symbol",from:{data:"valid"},encode:{enter:{size:{value:50},tooltip:{field:l}},update:{x:{scale:"xscale",field:"xValue"},y:{scale:"yscale",field:"yValue"},fill:{field:"color"},fillOpacity:{field:"opacity"},shape:{field:"shape"},zindex:{value:0}},hover:{fill:{value:"firebrick"},fillOpacity:{value:1},zindex:{value:1}}}},{type:"symbol",from:{data:"nullY"},encode:{enter:{size:{value:50},tooltip:{field:l}},update:{x:{scale:"xscale",field:"xValue"},y:{signal:"height - nullSize/2"},fill:{value:"#aaa"},fillOpacity:{value:.2}},hover:{fill:{value:"firebrick"},fillOpacity:{value:1}}}},{type:"symbol",from:{data:"nullX"},encode:{enter:{size:{value:50},tooltip:{field:"name"}},update:{x:{signal:"nullSize/2"},y:{scale:"yscale",field:"yValue"},fill:{value:"#aaa"},fillOpacity:{value:.2},zindex:{value:0}},hover:{fill:{value:"firebrick"},fillOpacity:{value:1},zindex:{value:1}}}},{type:"text",interactive:!1,from:{data:"nullXY"},encode:{update:{x:{signal:"nullSize",offset:-4},y:{signal:"height",offset:13},text:{signal:"datum.count + ' null'"},align:{value:"right"},baseline:{value:"top"},fill:{value:"#999"},fontSize:{value:9}}}}]}}render(){return t(l,{key:"60005ab926b0153b3e31729a69f5a64cf6558085"},t("div",{key:"820de3e0ddbbc2650b9764e279d87531338e72e3",id:"container",style:{width:"100%",height:"100%"}}))}};export{r as apollo_data_line_chart,s as apollo_data_scatter_chart}