@malloydata/render 0.0.153-dev240717221349 → 0.0.153-dev240719133924

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.
@@ -144686,7 +144686,9 @@ const dlt = `:host {
144686
144686
  const s = new CSSStyleSheet();
144687
144687
  return s.replaceSync(hlt), r.renderRoot.adoptedStyleSheets = [i, s], t(e, n);
144688
144688
  };
144689
- gat(
144689
+ customElements.get("malloy-render") ? console.warn(
144690
+ "The custom element 'malloy-render' has already been defined. Make sure you are not loading multiple versions of the malloy-render package as they could conflict."
144691
+ ) : gat(
144690
144692
  mat("malloy-render", {
144691
144693
  result: void 0,
144692
144694
  queryResult: void 0,
@@ -1608,4 +1608,4 @@ ${m}`,p)}}else{if(h.urls)for(const m of h.urls)try{if(m.startsWith("internal://"
1608
1608
  background: var(--malloy-render--table-pinned-background);
1609
1609
  box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.5);
1610
1610
  }
1611
- `,jat=t=>(e,n)=>{const{element:r}=n,i=new CSSStyleSheet;i.replaceSync(Pat);const s=new CSSStyleSheet;return s.replaceSync(Mat),r.renderRoot.adoptedStyleSheets=[i,s],t(e,n)};Uut(qut("malloy-render",{result:void 0,queryResult:void 0,modelDef:void 0}),jat,cat)($at);class Uat{constructor(e){this.document=e}async render(e,n){if(e.modelTag.has("renderer_next")){const o=this.document.createElement("malloy-render");return o.result=e,o}const i=e.data,s=efe(i.field,this.document,n,{size:"large"},i.field.structDef.queryTimezone,e.tagParse().tag);try{return await s.render(i)}catch(o){return o instanceof Error?ho(this.document,o):ho(this.document,"Internal error - Exception not an Error object.")}}}class qat{constructor(e){this.document=e}async render(e){const n=new EY(this.document);try{return await n.render(e)}catch(r){return r instanceof Error?ho(this.document,r):ho(this.document,"Internal error - Exception not an Error object.")}}}const Zce={shape_map:"shape_map",point_map:"point_map",bar_chart:"bar_chart",image:"image",json:"json",segment_map:"segment_map",dashboard:"dashboard",line_chart:"line_chart",scatter_chart:"scatter_chart",url:"url",list:"list",list_detail:"list_detail",sparkline:"sparkline",sparkline_area:"sparkline",sparkline_column:"sparkline",sparkline_bar:"sparkline"};function Hat(t,e){let n=e[t.name];if(!n)for(const i of t.sourceClasses)n||(n=e[i]);const{name:r}=t;for(const i in Zce)if(r.endsWith(`_${i}`)){const s=r.slice(0,r.length-i.length-1);return zat(i,s,Zce,n)}return n}function zat(t,e,n,r){var i;return r?(r.renderer??(r.renderer=n[t]),r.data??(r.data={}),(i=r.data).label??(i.label=e)):r={renderer:n[t],data:{label:e}},r}function SR(t){if(t.isExplore())return t;throw new Error(`${t.name} does not contain fields and cannot be rendered this way`)}function efe(t,e,n,r,i,s){const o=Hat(t,n.dataStyles);n.dataStyles[t.name]=o;const u=new TP().create(o,s,e,r,n,t,i);if(u)return u;if((o==null?void 0:o.renderer)==="dashboard"||s.has("dashboard"))return _R(MF,e,SR(t),n,s);if((o==null?void 0:o.renderer)==="list"||s.has("list"))return _R(CY,e,SR(t),n,s);if((o==null?void 0:o.renderer)==="list_detail"||s.has("list_detail"))return _R(gFe,e,SR(t),n,s);if((o==null?void 0:o.renderer)==="table"||s.has("table")||!t.hasParentExplore()||t.isExploreField())return _R(y3,e,SR(t),n,s);throw new Error(`Could not find a proper renderer for field ${t.name}`)}function _R(t,e,n,r,i){const s=w5.make(t,e,n,r,i),o={};return n.intrinsicFields.forEach(u=>{o[u.name]=efe(u,e,r,s.defaultStylesForChildren,n.queryTimezone,u.tagParse().tag)}),s.childRenderers=o,s}Xs.Currency=l0,Xs.DataVolumeUnit=nf,Xs.DurationUnit=Wn,Xs.HTMLView=Uat,Xs.JSONView=qat,Xs.getDrillQuery=kF,Xs.isDurationUnit=gce,Object.defineProperty(Xs,Symbol.toStringTag,{value:"Module"})});
1611
+ `,jat=t=>(e,n)=>{const{element:r}=n,i=new CSSStyleSheet;i.replaceSync(Pat);const s=new CSSStyleSheet;return s.replaceSync(Mat),r.renderRoot.adoptedStyleSheets=[i,s],t(e,n)};customElements.get("malloy-render")?console.warn("The custom element 'malloy-render' has already been defined. Make sure you are not loading multiple versions of the malloy-render package as they could conflict."):Uut(qut("malloy-render",{result:void 0,queryResult:void 0,modelDef:void 0}),jat,cat)($at);class Uat{constructor(e){this.document=e}async render(e,n){if(e.modelTag.has("renderer_next")){const o=this.document.createElement("malloy-render");return o.result=e,o}const i=e.data,s=efe(i.field,this.document,n,{size:"large"},i.field.structDef.queryTimezone,e.tagParse().tag);try{return await s.render(i)}catch(o){return o instanceof Error?ho(this.document,o):ho(this.document,"Internal error - Exception not an Error object.")}}}class qat{constructor(e){this.document=e}async render(e){const n=new EY(this.document);try{return await n.render(e)}catch(r){return r instanceof Error?ho(this.document,r):ho(this.document,"Internal error - Exception not an Error object.")}}}const Zce={shape_map:"shape_map",point_map:"point_map",bar_chart:"bar_chart",image:"image",json:"json",segment_map:"segment_map",dashboard:"dashboard",line_chart:"line_chart",scatter_chart:"scatter_chart",url:"url",list:"list",list_detail:"list_detail",sparkline:"sparkline",sparkline_area:"sparkline",sparkline_column:"sparkline",sparkline_bar:"sparkline"};function Hat(t,e){let n=e[t.name];if(!n)for(const i of t.sourceClasses)n||(n=e[i]);const{name:r}=t;for(const i in Zce)if(r.endsWith(`_${i}`)){const s=r.slice(0,r.length-i.length-1);return zat(i,s,Zce,n)}return n}function zat(t,e,n,r){var i;return r?(r.renderer??(r.renderer=n[t]),r.data??(r.data={}),(i=r.data).label??(i.label=e)):r={renderer:n[t],data:{label:e}},r}function SR(t){if(t.isExplore())return t;throw new Error(`${t.name} does not contain fields and cannot be rendered this way`)}function efe(t,e,n,r,i,s){const o=Hat(t,n.dataStyles);n.dataStyles[t.name]=o;const u=new TP().create(o,s,e,r,n,t,i);if(u)return u;if((o==null?void 0:o.renderer)==="dashboard"||s.has("dashboard"))return _R(MF,e,SR(t),n,s);if((o==null?void 0:o.renderer)==="list"||s.has("list"))return _R(CY,e,SR(t),n,s);if((o==null?void 0:o.renderer)==="list_detail"||s.has("list_detail"))return _R(gFe,e,SR(t),n,s);if((o==null?void 0:o.renderer)==="table"||s.has("table")||!t.hasParentExplore()||t.isExploreField())return _R(y3,e,SR(t),n,s);throw new Error(`Could not find a proper renderer for field ${t.name}`)}function _R(t,e,n,r,i){const s=w5.make(t,e,n,r,i),o={};return n.intrinsicFields.forEach(u=>{o[u.name]=efe(u,e,r,s.defaultStylesForChildren,n.queryTimezone,u.tagParse().tag)}),s.childRenderers=o,s}Xs.Currency=l0,Xs.DataVolumeUnit=nf,Xs.DurationUnit=Wn,Xs.HTMLView=Uat,Xs.JSONView=qat,Xs.getDrillQuery=kF,Xs.isDurationUnit=gce,Object.defineProperty(Xs,Symbol.toStringTag,{value:"Module"})});
@@ -90542,7 +90542,9 @@ const Drt = `:host {
90542
90542
  const s = new CSSStyleSheet();
90543
90543
  return s.replaceSync(Frt), r.renderRoot.adoptedStyleSheets = [i, s], t(e, n);
90544
90544
  };
90545
- Yle(
90545
+ customElements.get("malloy-render") ? console.warn(
90546
+ "The custom element 'malloy-render' has already been defined. Make sure you are not loading multiple versions of the malloy-render package as they could conflict."
90547
+ ) : Yle(
90546
90548
  Xle("malloy-render", {
90547
90549
  result: void 0,
90548
90550
  queryResult: void 0,
@@ -1456,4 +1456,4 @@ ${m}`,p)}}else{if(h.urls)for(const m of h.urls)try{if(m.startsWith("internal://"
1456
1456
  background: var(--malloy-render--table-pinned-background);
1457
1457
  box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.5);
1458
1458
  }
1459
- `,lrt=t=>(e,n)=>{const{element:r}=n,i=new CSSStyleSheet;i.replaceSync(urt);const s=new CSSStyleSheet;return s.replaceSync(art),r.renderRoot.adoptedStyleSheets=[i,s],t(e,n)};Yle(Xle("malloy-render",{result:void 0,queryResult:void 0,modelDef:void 0}),lrt,y0e)(irt)});
1459
+ `,lrt=t=>(e,n)=>{const{element:r}=n,i=new CSSStyleSheet;i.replaceSync(urt);const s=new CSSStyleSheet;return s.replaceSync(art),r.renderRoot.adoptedStyleSheets=[i,s],t(e,n)};customElements.get("malloy-render")?console.warn("The custom element 'malloy-render' has already been defined. Make sure you are not loading multiple versions of the malloy-render package as they could conflict."):Yle(Xle("malloy-render",{result:void 0,queryResult:void 0,modelDef:void 0}),lrt,y0e)(irt)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/render",
3
- "version": "0.0.153-dev240717221349",
3
+ "version": "0.0.153-dev240719133924",
4
4
  "license": "MIT",
5
5
  "main": "dist/module/index.umd.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "build-types": "tsc --build --declaration --emitDeclarationOnly"
34
34
  },
35
35
  "dependencies": {
36
- "@malloydata/malloy": "^0.0.153-dev240717221349",
36
+ "@malloydata/malloy": "^0.0.153-dev240719133924",
37
37
  "@types/luxon": "^2.4.0",
38
38
  "component-register": "^0.8.3",
39
39
  "lodash": "^4.17.20",