@xplortech/apollo-data 0.0.5 → 0.0.7

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 (84) 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-4d3f0792.entry.js +1 -0
  4. package/dist/apollo-data/p-C2k3WBpi.js +11 -0
  5. package/dist/apollo-data/p-D64asVrg.js +2 -0
  6. package/dist/apollo-data/{p-b7471c12.entry.js → p-e2c3a317.entry.js} +1 -1
  7. package/dist/cjs/apollo-data-bar-chart_5.cjs.entry.js +1193 -0
  8. package/dist/cjs/{apollo-data-base-CxVQ-WVP.js → apollo-data-base-COGMOEqL.js} +7 -11
  9. package/dist/cjs/apollo-data-donut-chart.cjs.entry.js +3 -3
  10. package/dist/cjs/apollo-data.cjs.js +3 -3
  11. package/dist/cjs/{index-Cl7HgRm0.js → index-Bd5risOy.js} +116 -63
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/collection/apollo-data-base.js +4 -8
  14. package/dist/collection/collection-manifest.json +5 -2
  15. package/dist/collection/components/apollo-data-bar/apollo-data-bar.js +10 -9
  16. package/dist/collection/components/apollo-data-bar/apollo-data-bar.stories.js +122 -0
  17. package/dist/collection/components/apollo-data-donut/apollo-data-donut.js +1 -1
  18. package/dist/collection/components/apollo-data-donut/apollo-data-donut.stories.js +132 -0
  19. package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.js +208 -0
  20. package/dist/collection/components/apollo-data-heat-map/apollo-data-heat-map.stories.js +137 -0
  21. package/dist/collection/components/apollo-data-line/apollo-data-line.js +8 -6
  22. package/dist/collection/components/apollo-data-line/apollo-data-line.stories.js +122 -0
  23. package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.js +1 -1
  24. package/dist/collection/components/apollo-data-scatter/apollo-data-scatter.stories.js +147 -0
  25. package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.js +294 -0
  26. package/dist/collection/components/apollo-data-world-map/apollo-data-world-map.stories.js +126 -0
  27. package/dist/collection/examples/apollo-data-heat-map.examples.js +131 -0
  28. package/dist/collection/examples/apollo-data-world-map.examples.js +45 -0
  29. package/dist/collection/examples/index.js +2 -0
  30. package/dist/collection/utils/code-generator.js +1 -1
  31. package/dist/components/apollo-data-bar-chart.js +1 -1
  32. package/dist/components/apollo-data-donut-chart.js +1 -1
  33. package/dist/components/apollo-data-heat-map.d.ts +11 -0
  34. package/dist/components/apollo-data-heat-map.js +1 -0
  35. package/dist/components/apollo-data-line-chart.js +1 -1
  36. package/dist/components/apollo-data-scatter-chart.js +1 -1
  37. package/dist/components/apollo-data-world-map-chart.d.ts +11 -0
  38. package/dist/components/apollo-data-world-map-chart.js +1 -0
  39. package/dist/components/index.js +1 -1
  40. package/dist/components/p-CfbMSXKd.js +11 -0
  41. package/dist/components/p-gcjU8DVr.js +1 -0
  42. package/dist/esm/apollo-data-bar-chart_5.entry.js +1187 -0
  43. package/dist/esm/{apollo-data-base-BWkrM8dc.js → apollo-data-base-C2k3WBpi.js} +7 -11
  44. package/dist/esm/apollo-data-donut-chart.entry.js +3 -3
  45. package/dist/esm/apollo-data.js +4 -4
  46. package/dist/esm/{index-Bb2nY-Tf.js → index-D64asVrg.js} +116 -63
  47. package/dist/esm/loader.js +3 -3
  48. package/dist/types/apollo-data-base.d.ts +2 -2
  49. package/dist/types/components/apollo-data-bar/apollo-data-bar.stories.d.ts +5 -0
  50. package/dist/types/components/apollo-data-donut/apollo-data-donut.stories.d.ts +5 -0
  51. package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.d.ts +140 -0
  52. package/dist/types/components/apollo-data-heat-map/apollo-data-heat-map.stories.d.ts +5 -0
  53. package/dist/types/components/apollo-data-line/apollo-data-line.stories.d.ts +5 -0
  54. package/dist/types/components/apollo-data-scatter/apollo-data-scatter.d.ts +1 -3
  55. package/dist/types/components/apollo-data-scatter/apollo-data-scatter.stories.d.ts +5 -0
  56. package/dist/types/components/apollo-data-world-map/apollo-data-world-map.d.ts +281 -0
  57. package/dist/types/components/apollo-data-world-map/apollo-data-world-map.stories.d.ts +5 -0
  58. package/dist/types/components.d.ts +128 -8
  59. package/dist/types/examples/apollo-data-heat-map.examples.d.ts +11 -0
  60. package/dist/types/examples/apollo-data-scatter.examples.d.ts +1 -1
  61. package/dist/types/examples/apollo-data-world-map.examples.d.ts +11 -0
  62. package/dist/types/examples/index.d.ts +2 -0
  63. package/dist/types/stencil-public-runtime.d.ts +23 -2
  64. package/dist/types/utils/code-generator.d.ts +1 -3
  65. package/package.json +8 -8
  66. package/src/examples/apollo-data-bar.examples.ts +157 -157
  67. package/src/examples/apollo-data-heat-map.examples.ts +147 -0
  68. package/src/examples/apollo-data-line.examples.ts +91 -91
  69. package/src/examples/apollo-data-scatter.examples.ts +1 -1
  70. package/src/examples/apollo-data-world-map.examples.ts +57 -0
  71. package/src/examples/index.ts +3 -1
  72. package/dist/apollo-data/p-2nuV5Vny.js +0 -1
  73. package/dist/apollo-data/p-4ac3c97c.entry.js +0 -1
  74. package/dist/apollo-data/p-BWkrM8dc.js +0 -11
  75. package/dist/apollo-data/p-Bb2nY-Tf.js +0 -2
  76. package/dist/apollo-data/p-e518baac.entry.js +0 -1
  77. package/dist/cjs/apollo-data-bar-chart.cjs.entry.js +0 -314
  78. package/dist/cjs/apollo-data-line-chart_2.cjs.entry.js +0 -534
  79. package/dist/cjs/constants-B3weDEpc.js +0 -5
  80. package/dist/components/p-7XF5Cax8.js +0 -11
  81. package/dist/components/p-Dws5s-Xe.js +0 -1
  82. package/dist/esm/apollo-data-bar-chart.entry.js +0 -312
  83. package/dist/esm/apollo-data-line-chart_2.entry.js +0 -531
  84. package/dist/esm/constants-2nuV5Vny.js +0 -3
@@ -22829,7 +22829,7 @@ var boundsStream$1 = {
22829
22829
  boundsStream$1.lineEnd = boundsLineEnd;
22830
22830
  if (areaRingSum$1 < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
22831
22831
  else if (deltaSum > epsilon$3) phi1 = 90;
22832
- else if (deltaSum < -1e-6) phi0 = -90;
22832
+ else if (deltaSum < -epsilon$3) phi0 = -90;
22833
22833
  range$4[0] = lambda0, range$4[1] = lambda1;
22834
22834
  },
22835
22835
  sphere: function() {
@@ -23430,7 +23430,7 @@ function polygonContains(polygon, point) {
23430
23430
  // from the point to the South pole. If it is zero, then the point is the
23431
23431
  // same side as the South pole.
23432
23432
 
23433
- return (angle < -1e-6 || angle < epsilon$3 && sum < -1e-12) ^ (winding & 1);
23433
+ return (angle < -epsilon$3 || angle < epsilon$3 && sum < -epsilon2) ^ (winding & 1);
23434
23434
  }
23435
23435
 
23436
23436
  function clip$1(pointVisible, clipLine, interpolate, start) {
@@ -23881,7 +23881,7 @@ function clipLine(a, b, x0, y0, x1, y1) {
23881
23881
  return true;
23882
23882
  }
23883
23883
 
23884
- var clipMax = 1e9, clipMin = -1e9;
23884
+ var clipMax = 1e9, clipMin = -clipMax;
23885
23885
 
23886
23886
  // TODO Use d3-polygon’s polygonContains here for the ring check?
23887
23887
  // TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
@@ -67611,17 +67611,12 @@ async function _embed(el, spec, opts = {}, loader) {
67611
67611
  return { view, spec, vgSpec, finalize, embedOptions: opts };
67612
67612
  }
67613
67613
 
67614
- // @ts-ignore
67615
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
67616
67614
  class ApolloBase {
67617
- // @ts-ignore
67618
- getViewData(data, spec) {
67619
- throw new Error('getViewData is not implemented');
67620
- }
67621
67615
  async renderChart() {
67622
67616
  // Wait for shadow DOM to be ready
67623
- await new Promise(resolve => setTimeout(resolve, 0));
67624
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
67617
+ await new Promise(resolve => {
67618
+ setTimeout(resolve, 0);
67619
+ });
67625
67620
  const container = this.el?.shadowRoot?.querySelector('#container');
67626
67621
  if (!container) {
67627
67622
  return;
@@ -67633,6 +67628,7 @@ class ApolloBase {
67633
67628
  spec = typeof this.adSpec === 'string' ? JSON.parse(this.adSpec) : this.adSpec;
67634
67629
  }
67635
67630
  catch (err) {
67631
+ // eslint-disable-next-line no-console
67636
67632
  console.error('Error parsing data/spec', err);
67637
67633
  return;
67638
67634
  }
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, g as getElement, h, H as Host } from './index-Bb2nY-Tf.js';
2
- import { A as ApolloBase } from './apollo-data-base-BWkrM8dc.js';
1
+ import { r as registerInstance, g as getElement, h, H as Host } from './index-D64asVrg.js';
2
+ import { A as ApolloBase } from './apollo-data-base-C2k3WBpi.js';
3
3
 
4
4
  const ApolloDataDonutChart = class extends ApolloBase {
5
5
  constructor(hostRef) {
@@ -399,7 +399,7 @@ const ApolloDataDonutChart = class extends ApolloBase {
399
399
  };
400
400
  }
401
401
  render() {
402
- return (h(Host, { key: 'fb26a6b02b83b0ce64a8301149b66f5d09a4a7b4' }, h("div", { key: 'fc08cdc3c0c0fda7f7c13149532eb61f511aa035', id: "container", style: { width: '100%', height: '100%' } })));
402
+ return (h(Host, { key: '5d9ba4976956c4f0d29b9aa8638373895c0c3f7f' }, h("div", { key: '2db6d1418492898de84a167e35ecc8b16d695942', id: "container", style: { width: '100%', height: '100%' } })));
403
403
  }
404
404
  };
405
405
 
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-Bb2nY-Tf.js';
2
- export { s as setNonce } from './index-Bb2nY-Tf.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-D64asVrg.js';
2
+ export { s as setNonce } from './index-D64asVrg.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.41.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.43.2 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
 
9
9
  var patchBrowser = () => {
@@ -17,5 +17,5 @@ var patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(async (options) => {
19
19
  await globalScripts();
20
- return bootstrapLazy([["apollo-data-line-chart_2",[[513,"apollo-data-line-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-scatter-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-bar-chart",[[513,"apollo-data-bar-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-donut-chart",[[513,"apollo-data-donut-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]]], options);
20
+ return bootstrapLazy([["apollo-data-bar-chart_5",[[513,"apollo-data-bar-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-heat-map",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-line-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-scatter-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-world-map-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-donut-chart",[[513,"apollo-data-donut-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]]], options);
21
21
  });
@@ -2,9 +2,22 @@ const NAMESPACE = 'apollo-data';
2
2
  const BUILD = /* apollo-data */ { hydratedSelectorName: "hydrated", lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.41.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.43.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
 
8
+
9
+ // src/utils/get-prop-descriptor.ts
10
+ function getPropertyDescriptor(obj, memberName, getOnly) {
11
+ const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
12
+ while (obj && obj !== stopAt) {
13
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
14
+ if (desc && (!getOnly || desc.get)) return desc;
15
+ obj = Object.getPrototypeOf(obj);
16
+ }
17
+ return void 0;
18
+ }
19
+
20
+ // src/utils/es2022-rewire-class-members.ts
8
21
  var reWireGetterSetter = (instance, hostRef) => {
9
22
  var _a;
10
23
  const cmpMeta = hostRef.$cmpMeta$;
@@ -12,7 +25,7 @@ var reWireGetterSetter = (instance, hostRef) => {
12
25
  members.map(([memberName, [memberFlags]]) => {
13
26
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
14
27
  const ogValue = instance[memberName];
15
- const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
28
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
16
29
  if (ogDescriptor) {
17
30
  Object.defineProperty(instance, memberName, {
18
31
  get() {
@@ -25,18 +38,14 @@ var reWireGetterSetter = (instance, hostRef) => {
25
38
  enumerable: true
26
39
  });
27
40
  }
28
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
41
+ if (hostRef.$instanceValues$.has(memberName)) {
42
+ instance[memberName] = hostRef.$instanceValues$.get(memberName);
43
+ } else if (ogValue !== void 0) {
44
+ instance[memberName] = ogValue;
45
+ }
29
46
  }
30
47
  });
31
48
  };
32
- function getPropertyDescriptor(obj, memberName) {
33
- while (obj) {
34
- const desc = Object.getOwnPropertyDescriptor(obj, memberName);
35
- if (desc == null ? void 0 : desc.get) return desc;
36
- obj = Object.getPrototypeOf(obj);
37
- }
38
- return void 0;
39
- }
40
49
 
41
50
  // src/client/client-host-ref.ts
42
51
  var getHostRef = (ref) => {
@@ -325,15 +334,45 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
325
334
  }
326
335
  }
327
336
  }
328
- } else if (memberName === "key") ; else {
337
+ } else if (memberName === "key") ; else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
338
+ const propName = memberName.slice(5);
339
+ let attrName;
340
+ {
341
+ const hostRef = getHostRef(elm);
342
+ if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
343
+ const memberMeta = hostRef.$cmpMeta$.$members$[propName];
344
+ if (memberMeta && memberMeta[1]) {
345
+ attrName = memberMeta[1];
346
+ }
347
+ }
348
+ }
349
+ if (!attrName) {
350
+ attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
351
+ }
352
+ if (newValue == null || newValue === false) {
353
+ if (newValue !== false || elm.getAttribute(attrName) === "") {
354
+ elm.removeAttribute(attrName);
355
+ }
356
+ } else {
357
+ elm.setAttribute(attrName, newValue === true ? "" : newValue);
358
+ }
359
+ return;
360
+ } else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
361
+ const propName = memberName.slice(5);
362
+ try {
363
+ elm[propName] = newValue;
364
+ } catch (e) {
365
+ }
366
+ return;
367
+ } else {
329
368
  const isComplex = isComplexType(newValue);
330
- if ((isProp || isComplex && newValue !== null) && true) {
369
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
331
370
  try {
332
371
  if (!elm.tagName.includes("-")) {
333
372
  const n = newValue == null ? "" : newValue;
334
373
  if (memberName === "list") {
335
374
  isProp = false;
336
- } else if (oldValue == null || elm[memberName] != n) {
375
+ } else if (oldValue == null || elm[memberName] !== n) {
337
376
  if (typeof elm.__lookupSetter__(memberName) === "function") {
338
377
  elm[memberName] = n;
339
378
  } else {
@@ -683,7 +722,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
683
722
  if (childrenPromises.length === 0) {
684
723
  postUpdate();
685
724
  } else {
686
- Promise.all(childrenPromises).then(postUpdate);
725
+ Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
687
726
  hostRef.$flags$ |= 4 /* isWaitingForChildren */;
688
727
  childrenPromises.length = 0;
689
728
  }
@@ -785,13 +824,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
785
824
  const didValueChange = newVal !== oldVal && !areBothNaN;
786
825
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
787
826
  hostRef.$instanceValues$.set(propName, newVal);
788
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
827
+ if (flags & 2 /* hasRendered */) {
789
828
  if (instance.componentShouldUpdate) {
790
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
829
+ const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
830
+ if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
791
831
  return;
792
832
  }
793
833
  }
794
- scheduleUpdate(hostRef, false);
834
+ if (!(flags & 16 /* isQueuedForUpdate */)) {
835
+ scheduleUpdate(hostRef, false);
836
+ }
795
837
  }
796
838
  }
797
839
  };
@@ -804,7 +846,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
804
846
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
805
847
  members.map(([memberName, [memberFlags]]) => {
806
848
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
807
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
849
+ const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
808
850
  if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
809
851
  if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
810
852
  if (flags & 1 /* isElementConstructor */ || !origGetter) {
@@ -934,53 +976,64 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
934
976
  // src/runtime/initialize-component.ts
935
977
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
936
978
  let Cstr;
937
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
938
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
939
- const bundleId = cmpMeta.$lazyBundleId$;
940
- if (bundleId) {
941
- const CstrImport = loadModule(cmpMeta, hostRef);
942
- if (CstrImport && "then" in CstrImport) {
943
- const endLoad = uniqueTime();
944
- Cstr = await CstrImport;
945
- endLoad();
979
+ try {
980
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
981
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
982
+ const bundleId = cmpMeta.$lazyBundleId$;
983
+ if (bundleId) {
984
+ const CstrImport = loadModule(cmpMeta, hostRef);
985
+ if (CstrImport && "then" in CstrImport) {
986
+ const endLoad = uniqueTime();
987
+ Cstr = await CstrImport;
988
+ endLoad();
989
+ } else {
990
+ Cstr = CstrImport;
991
+ }
992
+ if (!Cstr) {
993
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
994
+ }
995
+ if (!Cstr.isProxied) {
996
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
997
+ Cstr.isProxied = true;
998
+ }
999
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1000
+ {
1001
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
1002
+ }
1003
+ try {
1004
+ new Cstr(hostRef);
1005
+ } catch (e) {
1006
+ consoleError(e, elm);
1007
+ }
1008
+ {
1009
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1010
+ }
1011
+ endNewInstance();
1012
+ {
1013
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1014
+ }
946
1015
  } else {
947
- Cstr = CstrImport;
948
- }
949
- if (!Cstr) {
950
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
951
- }
952
- if (!Cstr.isProxied) {
953
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
954
- Cstr.isProxied = true;
955
- }
956
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
957
- {
958
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
959
- }
960
- try {
961
- new Cstr(hostRef);
962
- } catch (e) {
963
- consoleError(e, elm);
964
- }
965
- {
966
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
967
- }
968
- endNewInstance();
969
- {
970
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1016
+ Cstr = elm.constructor;
1017
+ const cmpTag = elm.localName;
1018
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
971
1019
  }
1020
+ }
1021
+ const ancestorComponent = hostRef.$ancestorComponent$;
1022
+ const schedule = () => scheduleUpdate(hostRef, true);
1023
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
1024
+ ancestorComponent["s-rc"].push(schedule);
972
1025
  } else {
973
- Cstr = elm.constructor;
974
- const cmpTag = elm.localName;
975
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1026
+ schedule();
1027
+ }
1028
+ } catch (e) {
1029
+ consoleError(e, elm);
1030
+ if (hostRef.$onRenderResolve$) {
1031
+ hostRef.$onRenderResolve$();
1032
+ hostRef.$onRenderResolve$ = void 0;
1033
+ }
1034
+ if (hostRef.$onReadyResolve$) {
1035
+ hostRef.$onReadyResolve$(elm);
976
1036
  }
977
- }
978
- const ancestorComponent = hostRef.$ancestorComponent$;
979
- const schedule = () => scheduleUpdate(hostRef, true);
980
- if (ancestorComponent && ancestorComponent["s-rc"]) {
981
- ancestorComponent["s-rc"].push(schedule);
982
- } else {
983
- schedule();
984
1037
  }
985
1038
  };
986
1039
  var fireConnectedCallback = (instance, elm) => {
@@ -1011,7 +1064,7 @@ var connectedCallback = (elm) => {
1011
1064
  }
1012
1065
  if (cmpMeta.$members$) {
1013
1066
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1014
- if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
1067
+ if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
1015
1068
  const value = elm[memberName];
1016
1069
  delete elm[memberName];
1017
1070
  elm[memberName] = value;
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-Bb2nY-Tf.js';
2
- export { s as setNonce } from './index-Bb2nY-Tf.js';
1
+ import { b as bootstrapLazy } from './index-D64asVrg.js';
2
+ export { s as setNonce } from './index-D64asVrg.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["apollo-data-line-chart_2",[[513,"apollo-data-line-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-scatter-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-bar-chart",[[513,"apollo-data-bar-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-donut-chart",[[513,"apollo-data-donut-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]]], options);
8
+ return bootstrapLazy([["apollo-data-bar-chart_5",[[513,"apollo-data-bar-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-heat-map",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-line-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-scatter-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}],[513,"apollo-data-world-map-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]],["apollo-data-donut-chart",[[513,"apollo-data-donut-chart",{"adData":[1,"ad-data"],"adSpec":[1,"ad-spec"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,7 +1,7 @@
1
- export declare class ApolloBase<TData extends any, TSpec extends any> {
1
+ export declare abstract class ApolloBase<TData, TSpec> {
2
2
  el: HTMLElement;
3
3
  adData: string | any;
4
4
  adSpec?: string | any;
5
- protected getViewData(data: TData, spec?: TSpec): any;
5
+ protected abstract getViewData(data: TData, spec?: TSpec): any;
6
6
  protected renderChart(): Promise<void>;
7
7
  }
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const MonthlySalesByProduct: Story;
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const ApolloDataDonut: Story;
@@ -0,0 +1,140 @@
1
+ import { ComponentInterface } from '../../stencil-public-runtime';
2
+ import { ApolloBase } from '../../apollo-data-base';
3
+ export interface HeatMapDataItem {
4
+ xLabel: string;
5
+ yLabel: string;
6
+ value: number;
7
+ }
8
+ export interface HeatMapSpec {
9
+ xAxisTitle?: string;
10
+ yAxisTitle?: string;
11
+ colorRange?: string[];
12
+ tooltip?: 'auto' | 'none';
13
+ }
14
+ export declare class ApolloDataHeatMap extends ApolloBase<HeatMapDataItem[], HeatMapSpec> implements ComponentInterface {
15
+ el: HTMLElement;
16
+ /**
17
+ * Data for the heat map. Each item defines a cell by xLabel, yLabel, and value.
18
+ * @property {string} xLabel - Label for the X-axis (horizontal).
19
+ * @property {string} yLabel - Label for the Y-axis (vertical).
20
+ * @property {number} value - Numeric value encoded as color.
21
+ */
22
+ adData: string | HeatMapDataItem[];
23
+ /**
24
+ * Optional specification for axis titles, color range, and tooltip behavior.
25
+ * @property {string} [xAxisTitle] - Label for the X-axis.
26
+ * @property {string} [yAxisTitle] - Label for the Y-axis.
27
+ * @property {string[]} [colorRange] - Two or more colors for the value scale (Vega interpolates between them).
28
+ * @property {'auto' | 'none'} [tooltip] - Tooltip behavior.
29
+ */
30
+ adSpec: string | HeatMapSpec;
31
+ componentDidRender(): Promise<void>;
32
+ private DEFAULT_COLOR_RANGE;
33
+ protected getViewData(data: HeatMapDataItem[], spec?: HeatMapSpec): Promise<{
34
+ $schema: string;
35
+ description: string;
36
+ width: number;
37
+ height: number;
38
+ padding: {
39
+ left: number;
40
+ top: number;
41
+ bottom: number;
42
+ right: number;
43
+ };
44
+ autosize: {
45
+ type: string;
46
+ resize: boolean;
47
+ };
48
+ data: {
49
+ name: string;
50
+ values: HeatMapDataItem[];
51
+ }[];
52
+ scales: ({
53
+ name: string;
54
+ type: string;
55
+ range: (number | {
56
+ signal: string;
57
+ })[];
58
+ domain: string[];
59
+ padding: number;
60
+ zero?: undefined;
61
+ } | {
62
+ name: string;
63
+ type: string;
64
+ range: string[];
65
+ domain: {
66
+ data: string;
67
+ field: string;
68
+ };
69
+ zero: boolean;
70
+ padding?: undefined;
71
+ })[];
72
+ axes: ({
73
+ orient: string;
74
+ scale: string;
75
+ title: string;
76
+ labelAngle: number;
77
+ labelAlign: string;
78
+ } | {
79
+ orient: string;
80
+ scale: string;
81
+ title: string;
82
+ labelAngle?: undefined;
83
+ labelAlign?: undefined;
84
+ })[];
85
+ legends: {
86
+ type: string;
87
+ fill: string;
88
+ orient: string;
89
+ direction: string;
90
+ title: string;
91
+ titleLimit: number;
92
+ tickCount: number;
93
+ format: string;
94
+ }[];
95
+ marks: {
96
+ type: string;
97
+ from: {
98
+ data: string;
99
+ };
100
+ encode: {
101
+ update: {
102
+ x: {
103
+ scale: string;
104
+ field: string;
105
+ };
106
+ y: {
107
+ scale: string;
108
+ field: string;
109
+ };
110
+ width: {
111
+ scale: string;
112
+ band: number;
113
+ };
114
+ height: {
115
+ scale: string;
116
+ band: number;
117
+ };
118
+ fill: {
119
+ scale: string;
120
+ field: string;
121
+ };
122
+ };
123
+ hover: {
124
+ fill: {
125
+ value: string;
126
+ };
127
+ opacity: {
128
+ value: number;
129
+ };
130
+ };
131
+ enter: {
132
+ tooltip: {
133
+ signal: string;
134
+ };
135
+ };
136
+ };
137
+ }[];
138
+ }>;
139
+ render(): any;
140
+ }
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const WeatherDayVsMonth: Story;
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const MonthlySalesByProduct: Story;
@@ -17,9 +17,7 @@ export interface ScatterSpec {
17
17
  xAxisTitle?: string;
18
18
  defaultPointStyle?: PointStyle;
19
19
  pointStyle?: PointStyle;
20
- categoryPointStyleMap?: {
21
- [categoryName: string]: PointStyle;
22
- };
20
+ categoryPointStyleMap?: Record<string, PointStyle>;
23
21
  tooltip?: 'auto' | 'none';
24
22
  }
25
23
  export declare class ApolloDataScatterChart extends ApolloBase<ScatterDataItem[], ScatterSpec> implements ComponentInterface {
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const ApolloDataScatter: Story;