@toclocoinc/lattice-grid 1.88.2 → 1.88.3
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.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/angular/fesm2022/toclocoinc-lattice-grid-angular.mjs +6 -2
- package/angular/package.json +1 -1
- package/angular/types/toclocoinc-lattice-grid-angular.d.ts +3 -1
- package/docs/API.html +62 -6
- package/docs/api/adapters.html +1 -1
- package/docs/api/ai.html +1 -1
- package/docs/api/alarms.html +1 -1
- package/docs/api/calendar.html +1 -1
- package/docs/api/charts.html +1 -1
- package/docs/api/dashboard.html +1 -1
- package/docs/api/data-router.html +1 -1
- package/docs/api/deckgl.html +1 -1
- package/docs/api/gantt.html +58 -2
- package/docs/api/geometry.html +1 -1
- package/docs/api/grid.html +2 -2
- package/docs/api/index.html +2 -2
- package/docs/api/kanban.html +1 -1
- package/docs/api/kpi.html +1 -1
- package/docs/api/layout.html +1 -1
- package/docs/api/leaflet.html +1 -1
- package/docs/api/list.html +1 -1
- package/docs/api/mapview.html +1 -1
- package/docs/api/mock-socket.html +1 -1
- package/docs/api/presets.html +1 -1
- package/docs/api/tabs.html +1 -1
- package/docs/api/types.html +2 -2
- package/docs/api-detail.html +4 -4
- package/docs/warnings.json +1 -1
- package/lattice-grid.d.ts +1 -1
- package/lattice-grid.esm.min.js +3 -3
- package/lattice-grid.min.cjs +3 -3
- package/lattice-grid.min.js +3 -3
- package/modules/ai.d.ts +1 -1
- package/modules/ai.esm.min.js +2 -2
- package/modules/ai.min.cjs +2 -2
- package/modules/ai.min.js +2 -2
- package/modules/alarms.d.ts +1 -1
- package/modules/alarms.esm.min.js +2 -2
- package/modules/alarms.min.cjs +2 -2
- package/modules/alarms.min.js +2 -2
- package/modules/angular.d.ts +1 -1
- package/modules/angular.esm.min.js +2 -2
- package/modules/angular.min.cjs +2 -2
- package/modules/angular.min.js +2 -2
- package/modules/calendar.d.ts +1 -1
- package/modules/calendar.esm.min.js +2 -2
- package/modules/calendar.min.cjs +2 -2
- package/modules/calendar.min.js +2 -2
- package/modules/chart-alluvial.d.ts +1 -1
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-alluvial.min.cjs +1 -1
- package/modules/chart-alluvial.min.js +1 -1
- package/modules/chart-arc.d.ts +1 -1
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-arc.min.cjs +1 -1
- package/modules/chart-arc.min.js +1 -1
- package/modules/chart-barrace.d.ts +1 -1
- package/modules/chart-barrace.esm.min.js +1 -1
- package/modules/chart-barrace.min.cjs +1 -1
- package/modules/chart-barrace.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +1 -1
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bubblemap.min.cjs +1 -1
- package/modules/chart-bubblemap.min.js +1 -1
- package/modules/chart-bump.d.ts +1 -1
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-bump.min.cjs +1 -1
- package/modules/chart-bump.min.js +1 -1
- package/modules/chart-calendar.d.ts +1 -1
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-calendar.min.cjs +1 -1
- package/modules/chart-calendar.min.js +1 -1
- package/modules/chart-choropleth.d.ts +1 -1
- package/modules/chart-choropleth.esm.min.js +1 -1
- package/modules/chart-choropleth.min.cjs +1 -1
- package/modules/chart-choropleth.min.js +1 -1
- package/modules/chart-decomposition.d.ts +1 -1
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-decomposition.min.cjs +1 -1
- package/modules/chart-decomposition.min.js +1 -1
- package/modules/chart-diverging.d.ts +1 -1
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-diverging.min.cjs +1 -1
- package/modules/chart-diverging.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +1 -1
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-dumbbell.min.cjs +1 -1
- package/modules/chart-dumbbell.min.js +1 -1
- package/modules/chart-fan.d.ts +1 -1
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-fan.min.cjs +1 -1
- package/modules/chart-fan.min.js +1 -1
- package/modules/chart-forcetree.d.ts +1 -1
- package/modules/chart-forcetree.esm.min.js +1 -1
- package/modules/chart-forcetree.min.cjs +1 -1
- package/modules/chart-forcetree.min.js +1 -1
- package/modules/chart-hexbin.d.ts +1 -1
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexbin.min.cjs +1 -1
- package/modules/chart-hexbin.min.js +1 -1
- package/modules/chart-hexmap.d.ts +1 -1
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-hexmap.min.cjs +1 -1
- package/modules/chart-hexmap.min.js +1 -1
- package/modules/chart-icicle.d.ts +1 -1
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-icicle.min.cjs +1 -1
- package/modules/chart-icicle.min.js +1 -1
- package/modules/chart-markermap.d.ts +1 -1
- package/modules/chart-markermap.esm.min.js +1 -1
- package/modules/chart-markermap.min.cjs +1 -1
- package/modules/chart-markermap.min.js +1 -1
- package/modules/chart-motion.d.ts +1 -1
- package/modules/chart-motion.esm.min.js +1 -1
- package/modules/chart-motion.min.cjs +1 -1
- package/modules/chart-motion.min.js +1 -1
- package/modules/chart-pack.d.ts +1 -1
- package/modules/chart-pack.esm.min.js +1 -1
- package/modules/chart-pack.min.cjs +1 -1
- package/modules/chart-pack.min.js +1 -1
- package/modules/chart-parallel.d.ts +1 -1
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-parallel.min.cjs +1 -1
- package/modules/chart-parallel.min.js +1 -1
- package/modules/chart-pictorial.d.ts +1 -1
- package/modules/chart-pictorial.esm.min.js +1 -1
- package/modules/chart-pictorial.min.cjs +1 -1
- package/modules/chart-pictorial.min.js +1 -1
- package/modules/chart-polararea.d.ts +1 -1
- package/modules/chart-polararea.esm.min.js +1 -1
- package/modules/chart-polararea.min.cjs +1 -1
- package/modules/chart-polararea.min.js +1 -1
- package/modules/chart-polarscatter.d.ts +1 -1
- package/modules/chart-polarscatter.esm.min.js +1 -1
- package/modules/chart-polarscatter.min.cjs +1 -1
- package/modules/chart-polarscatter.min.js +1 -1
- package/modules/chart-pyramid.d.ts +1 -1
- package/modules/chart-pyramid.esm.min.js +1 -1
- package/modules/chart-pyramid.min.cjs +1 -1
- package/modules/chart-pyramid.min.js +1 -1
- package/modules/chart-radialbar.d.ts +1 -1
- package/modules/chart-radialbar.esm.min.js +1 -1
- package/modules/chart-radialbar.min.cjs +1 -1
- package/modules/chart-radialbar.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +1 -1
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-ridgeline.min.cjs +1 -1
- package/modules/chart-ridgeline.min.js +1 -1
- package/modules/chart-roc.d.ts +1 -1
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-roc.min.cjs +1 -1
- package/modules/chart-roc.min.js +1 -1
- package/modules/chart-serpentine.d.ts +1 -1
- package/modules/chart-serpentine.esm.min.js +1 -1
- package/modules/chart-serpentine.min.cjs +1 -1
- package/modules/chart-serpentine.min.js +1 -1
- package/modules/chart-slope.d.ts +1 -1
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-slope.min.cjs +1 -1
- package/modules/chart-slope.min.js +1 -1
- package/modules/chart-spiral.d.ts +1 -1
- package/modules/chart-spiral.esm.min.js +1 -1
- package/modules/chart-spiral.min.cjs +1 -1
- package/modules/chart-spiral.min.js +1 -1
- package/modules/chart-splom.d.ts +1 -1
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-splom.min.cjs +1 -1
- package/modules/chart-splom.min.js +1 -1
- package/modules/chart-tree.d.ts +1 -1
- package/modules/chart-tree.esm.min.js +1 -1
- package/modules/chart-tree.min.cjs +1 -1
- package/modules/chart-tree.min.js +1 -1
- package/modules/chart-venn.d.ts +1 -1
- package/modules/chart-venn.esm.min.js +1 -1
- package/modules/chart-venn.min.cjs +1 -1
- package/modules/chart-venn.min.js +1 -1
- package/modules/chart-voronoi.d.ts +1 -1
- package/modules/chart-voronoi.esm.min.js +1 -1
- package/modules/chart-voronoi.min.cjs +1 -1
- package/modules/chart-voronoi.min.js +1 -1
- package/modules/chart-waffle.d.ts +1 -1
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/chart-waffle.min.cjs +1 -1
- package/modules/chart-waffle.min.js +1 -1
- package/modules/chart-wordcloud.d.ts +1 -1
- package/modules/chart-wordcloud.esm.min.js +1 -1
- package/modules/chart-wordcloud.min.cjs +1 -1
- package/modules/chart-wordcloud.min.js +1 -1
- package/modules/charts.d.ts +1 -1
- package/modules/charts.esm.min.js +2 -2
- package/modules/charts.min.cjs +2 -2
- package/modules/charts.min.js +2 -2
- package/modules/dashboard.d.ts +1 -1
- package/modules/dashboard.esm.min.js +2 -2
- package/modules/dashboard.min.cjs +2 -2
- package/modules/dashboard.min.js +2 -2
- package/modules/data-router.d.ts +1 -1
- package/modules/data-router.esm.min.js +2 -2
- package/modules/data-router.min.cjs +2 -2
- package/modules/data-router.min.js +2 -2
- package/modules/deckgl.d.ts +1 -1
- package/modules/deckgl.esm.min.js +2 -2
- package/modules/deckgl.min.cjs +2 -2
- package/modules/deckgl.min.js +2 -2
- package/modules/devtools.d.ts +1 -1
- package/modules/devtools.esm.min.js +1 -1
- package/modules/devtools.min.cjs +1 -1
- package/modules/devtools.min.js +1 -1
- package/modules/dhtmlx-compat.d.ts +1 -1
- package/modules/dhtmlx-compat.esm.min.js +2 -2
- package/modules/dhtmlx-compat.min.cjs +2 -2
- package/modules/dhtmlx-compat.min.js +2 -2
- package/modules/gantt.d.ts +58 -3
- package/modules/gantt.esm.min.js +223 -217
- package/modules/gantt.esm.min.js.map +2 -2
- package/modules/gantt.min.cjs +222 -216
- package/modules/gantt.min.js +222 -216
- package/modules/gantt.min.js.map +2 -2
- package/modules/geo-europe-nuts.d.ts +1 -1
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-europe-nuts.min.cjs +1 -1
- package/modules/geo-europe-nuts.min.js +1 -1
- package/modules/geo-uk.d.ts +1 -1
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-uk.min.cjs +1 -1
- package/modules/geo-uk.min.js +1 -1
- package/modules/geo-us-states.d.ts +1 -1
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-us-states.min.cjs +1 -1
- package/modules/geo-us-states.min.js +1 -1
- package/modules/geo-world-110m.d.ts +1 -1
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-110m.min.cjs +1 -1
- package/modules/geo-world-110m.min.js +1 -1
- package/modules/geo-world-50m.d.ts +1 -1
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/geo-world-50m.min.cjs +1 -1
- package/modules/geo-world-50m.min.js +1 -1
- package/modules/geometry.d.ts +1 -1
- package/modules/geometry.esm.min.js +2 -2
- package/modules/geometry.min.cjs +2 -2
- package/modules/geometry.min.js +2 -2
- package/modules/htmx.d.ts +1 -1
- package/modules/htmx.esm.min.js +3 -3
- package/modules/htmx.min.cjs +3 -3
- package/modules/htmx.min.js +3 -3
- package/modules/kanban.d.ts +1 -1
- package/modules/kanban.esm.min.js +2 -2
- package/modules/kanban.min.cjs +2 -2
- package/modules/kanban.min.js +2 -2
- package/modules/kpi.d.ts +1 -1
- package/modules/kpi.esm.min.js +2 -2
- package/modules/kpi.min.cjs +2 -2
- package/modules/kpi.min.js +2 -2
- package/modules/layout.d.ts +1 -1
- package/modules/layout.esm.min.js +2 -2
- package/modules/layout.min.cjs +2 -2
- package/modules/layout.min.js +2 -2
- package/modules/leaflet.d.ts +1 -1
- package/modules/leaflet.esm.min.js +2 -2
- package/modules/leaflet.min.cjs +2 -2
- package/modules/leaflet.min.js +2 -2
- package/modules/list.d.ts +1 -1
- package/modules/list.esm.min.js +2 -2
- package/modules/list.min.cjs +2 -2
- package/modules/list.min.js +2 -2
- package/modules/mapview.d.ts +1 -1
- package/modules/mapview.esm.min.js +2 -2
- package/modules/mapview.min.cjs +2 -2
- package/modules/mapview.min.js +2 -2
- package/modules/mock-socket.d.ts +1 -1
- package/modules/mock-socket.esm.min.js +1 -1
- package/modules/mock-socket.min.cjs +1 -1
- package/modules/mock-socket.min.js +1 -1
- package/modules/presets.d.ts +1 -1
- package/modules/presets.esm.min.js +2 -2
- package/modules/presets.min.cjs +2 -2
- package/modules/presets.min.js +2 -2
- package/modules/react.d.ts +1 -1
- package/modules/react.esm.min.js +2 -2
- package/modules/react.esm.min.js.map +1 -1
- package/modules/react.min.cjs +2 -2
- package/modules/react.min.js +2 -2
- package/modules/react.min.js.map +1 -1
- package/modules/svelte.d.ts +1 -1
- package/modules/svelte.esm.min.js +3 -3
- package/modules/svelte.esm.min.js.map +1 -1
- package/modules/svelte.min.cjs +2 -2
- package/modules/svelte.min.js +2 -2
- package/modules/svelte.min.js.map +1 -1
- package/modules/tabs.d.ts +1 -1
- package/modules/tabs.esm.min.js +2 -2
- package/modules/tabs.min.cjs +2 -2
- package/modules/tabs.min.js +2 -2
- package/modules/vue.d.ts +1 -1
- package/modules/vue.esm.min.js +2 -2
- package/modules/vue.esm.min.js.map +1 -1
- package/modules/vue.min.cjs +2 -2
- package/modules/vue.min.js +2 -2
- package/modules/vue.min.js.map +1 -1
- package/modules/webcomponent.d.ts +1 -1
- package/modules/webcomponent.esm.min.js +4 -4
- package/modules/webcomponent.esm.min.js.map +1 -1
- package/modules/webcomponent.min.cjs +4 -4
- package/modules/webcomponent.min.js +4 -4
- package/modules/webcomponent.min.js.map +1 -1
- package/package.json +1 -1
package/modules/dashboard.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.88.
|
|
2
|
+
* Lattice Grid 1.88.3, dashboard module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
|
-
(function(De){"use strict";var Le=Object.create(null),Me=Object.create(null);function Oe(h,x){Le[h]=x}function Ce(h){var x=Me[h];if(x)return x;var W=Object.create(null);Me[h]=W;var K=Le[h];if(!K)throw new Error("[lattice] missing module: "+h);return K(W,Ce),W}Oe("packages/core/src/internal/util.js",function(h,x){"use strict";Object.defineProperty(h,"VERSION",{enumerable:!0,get:function(){return P}}),Object.defineProperty(h,"reportedWarnings",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(h,"warnOnce",{enumerable:!0,get:function(){return L}}),Object.defineProperty(h,"infoOnce",{enumerable:!0,get:function(){return b}}),Object.defineProperty(h,"resetWarnings",{enumerable:!0,get:function(){return $}}),Object.defineProperty(h,"fail",{enumerable:!0,get:function(){return c}}),Object.defineProperty(h,"invariant",{enumerable:!0,get:function(){return p}}),Object.defineProperty(h,"DEV",{enumerable:!0,get:function(){return T}}),Object.defineProperty(h,"isObject",{enumerable:!0,get:function(){return M}}),Object.defineProperty(h,"isFunction",{enumerable:!0,get:function(){return O}}),Object.defineProperty(h,"isNil",{enumerable:!0,get:function(){return B}}),Object.defineProperty(h,"isBlank",{enumerable:!0,get:function(){return C}}),Object.defineProperty(h,"isCtor",{enumerable:!0,get:function(){return R}}),Object.defineProperty(h,"pathGetter",{enumerable:!0,get:function(){return N}}),Object.defineProperty(h,"pathSetter",{enumerable:!0,get:function(){return o}}),Object.defineProperty(h,"getPath",{enumerable:!0,get:function(){return d}}),Object.defineProperty(h,"setPath",{enumerable:!0,get:function(){return s}}),Object.defineProperty(h,"humanise",{enumerable:!0,get:function(){return a}}),Object.defineProperty(h,"escapeHtml",{enumerable:!0,get:function(){return w}}),Object.defineProperty(h,"titleCase",{enumerable:!0,get:function(){return q}}),Object.defineProperty(h,"expand",{enumerable:!0,get:function(){return te}}),Object.defineProperty(h,"toArray",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(h,"merge",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(h,"mergeRow",{enumerable:!0,get:function(){return we}}),Object.defineProperty(h,"Lru",{enumerable:!0,get:function(){return J}}),Object.defineProperty(h,"collator",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(h,"defaultCompare",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(h,"now",{enumerable:!0,get:function(){return he}}),Object.defineProperty(h,"nextFrame",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(h,"cancelFrame",{enumerable:!0,get:function(){return le}}),Object.defineProperty(h,"frameBatched",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(h,"settleDebounce",{enumerable:!0,get:function(){return je}}),Object.defineProperty(h,"whenIdle",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(h,"uid",{enumerable:!0,get:function(){return Ee}});const W="1.88.2";async function K(){return W}const P="1.88.2",F=new Set,de=2e3;function _(t){if(F.add(t),F.size>de){const n=F.values().next().value;n!==void 0&&F.delete(n)}}const H=[],ie=500;function v(t,n,i){H.push({key:t,level:n,message:i.map(k=>typeof k=="string"?k:ee(k)).join(" "),at:Date.now()}),H.length>ie&&H.shift()}function ee(t){if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch{return String(t)}}function ue(){return H.map(t=>({...t}))}function re(t){if(t.length===0||typeof t[0]!="string")return t;const n=t[0].replace(/^\[lattice\]\s*/,"");return n===t[0]?t:[n,...t.slice(1)]}function L(t,...n){if(F.has(t))return;_(t);const i=re(n);v(t,"warn",i),console.warn("[lattice]",...i)}function b(t,...n){if(F.has(t))return;_(t);const i=re(n);v(t,"info",i),console.info("[lattice]",...i)}function $(){F.clear(),H.length=0}function c(t,n){const i=new Error(`[lattice] ${t}`);throw n!==void 0&&(i.cause=n),i}function p(t,n){t||c(n)}const T=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function M(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function O(t){return typeof t=="function"}function B(t){return t==null}function C(t){return t==null||t===""}function R(t){return typeof t!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(t))?!0:!!(t.prototype&&Object.getOwnPropertyNames(t.prototype).length>1)}const S=new Map;function N(t){let n=S.get(t);if(n)return n;if(!t.includes("."))n=i=>i?.[t];else{const i=t.split("."),k=i.length;n=V=>{let U=V;for(let Y=0;Y<k;Y++){if(U==null)return;U=U[i[Y]]}return U}}return S.set(t,n),n}const E=new Map;function o(t){let n=E.get(t);if(n)return n;if(!t.includes("."))n=(i,k)=>{i!=null&&(i[t]=k)};else{const i=t.split("."),k=i.length-1;n=(V,U)=>{let Y=V;for(let Q=0;Q<k;Q++){if(Y==null)return;const me=i[Q];Y[me]==null&&(Y[me]={}),Y=Y[me]}Y!=null&&(Y[i[k]]=U)}}return E.set(t,n),n}function d(t,n){return N(n)(t)}function s(t,n,i){o(n)(t,i)}function a(t){return t?(t.includes(".")?t.slice(t.lastIndexOf(".")+1):t).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,i=>i.toUpperCase()):""}const m={"&":"&","<":"<",">":">",'"':""","'":"'"};function w(t){const n=t==null?"":String(t);return/[&<>"']/.test(n)?n.replace(/[&<>"']/g,i=>m[i]):n}function q(t){return String(t).replace(/\w\S*/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function te(t,n,i){if(t!==void 0)return t===!0?{enabled:!0,...i}:t===!1?{enabled:!1}:M(t)?t:{[n]:t,enabled:!0}}function oe(t){return t==null?[]:Array.isArray(t)?t:[t]}const ke=Object.freeze(new Set(["__proto__","constructor","prototype"]));function pe(t,n){if(!M(t))return M(n)?{...n}:n;if(!M(n))return n===void 0?t:n;const i={...t};for(const k of Object.keys(n)){if(ke.has(k))continue;const V=n[k];V!==void 0&&(i[k]=M(V)&&M(i[k])?pe(i[k],V):V)}return i}function we(t,n){if(!M(t)||!M(n)||t===n)return n;const i=Object.create(Object.getPrototypeOf(t));return Object.assign(i,t,n),i}class J{#n;#e=new Map;#t;constructor(n=256,i=null){this.#n=n,this.#t=i}get size(){return this.#e.size}get max(){return this.#n}set max(n){this.#n=n,this.#r()}has(n){return this.#e.has(n)}get(n){const i=this.#e;if(!i.has(n))return;const k=i.get(n);return i.delete(n),i.set(n,k),k}peek(n){return this.#e.get(n)}set(n,i){const k=this.#e;return k.has(n)&&k.delete(n),k.set(n,i),this.#r(),i}delete(n){const i=this.#e.get(n);return this.#e.delete(n)&&this.#t&&this.#t(i,n),i}clear(){if(this.#t)for(const[n,i]of this.#e)this.#t(i,n);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const n=this.#e;for(;n.size>this.#n;){const i=n.keys().next().value,k=n.get(i);n.delete(i),this.#t&&this.#t(k,i)}}}const ce=new Map;function ve(t,n){const i=`${t||""}|${n?JSON.stringify(n):""}`;let k=ce.get(i);return k||(k=new Intl.Collator(t||void 0,{numeric:!0,sensitivity:"variant",...n}),ce.set(i,k)),k}function ne(t,n){if(t===n)return 0;if(t==null)return 1;if(n==null)return-1;if(typeof t=="number"&&typeof n=="number")return Number.isNaN(t)?Number.isNaN(n)?0:1:Number.isNaN(n)||t<n?-1:t>n?1:0;const i=String(t),k=String(n);return i<k?-1:i>k?1:0}function he(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const $e=typeof requestAnimationFrame=="function";function ge(t){return $e?requestAnimationFrame(t):setTimeout(()=>t(he()),16)}function le(t){t!=null&&($e?cancelAnimationFrame(t):clearTimeout(t))}function Ne(t){let n=null,i=null;const k=()=>{n=null;const U=i;i=null,t(...U||[])},V=(...U)=>{i=U,n===null&&(n=ge(k))};return V.cancel=()=>{le(n),n=null,i=null},V.flush=()=>{n!==null&&(le(n),k())},V}function je(t,n){let i=null,k=null;const V=()=>{if(i=null,k===null)return;const Q=k;k=null,t(...Q),U()},U=()=>{i=setTimeout(V,n),typeof i?.unref=="function"&&i.unref()},Y=(...Q)=>{i===null?(t(...Q),U()):(k=Q,clearTimeout(i),U())};return Y.flush=()=>{if(i!==null&&clearTimeout(i),i=null,k===null)return;const Q=k;k=null,t(...Q)},Y.cancel=()=>{i!==null&&clearTimeout(i),i=null,k=null},Y.pending=()=>i!==null||k!==null,Y}function Re(t,n=50){return typeof requestIdleCallback=="function"?requestIdleCallback(t,{timeout:n}):setTimeout(()=>t({timeRemaining:()=>0,didTimeout:!0}),1)}let Se=0;function Ee(t="l"){return`${t}${(++Se).toString(36)}`}}),Oe("packages/modules/dashboard/spec.js",function(h,x){"use strict";Object.defineProperty(h,"PANEL_KINDS",{enumerable:!0,get:function(){return W}}),Object.defineProperty(h,"SOURCE_KINDS",{enumerable:!0,get:function(){return K}}),Object.defineProperty(h,"MAP_BINDINGS",{enumerable:!0,get:function(){return P}}),Object.defineProperty(h,"GRID_REF",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(h,"isPlain",{enumerable:!0,get:function(){return v}}),Object.defineProperty(h,"copySpec",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(h,"sameSpec",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(h,"parseSourceRef",{enumerable:!0,get:function(){return re}}),Object.defineProperty(h,"readRelation",{enumerable:!0,get:function(){return L}}),Object.defineProperty(h,"inspectSpec",{enumerable:!0,get:function(){return b}}),Object.defineProperty(h,"validateDashboardSpec",{enumerable:!0,get:function(){return $}});const W=Object.freeze(["grid","chart","kpi","calendar","map","html"]),K=Object.freeze(["rows","pushdown","router","grid"]),P=Object.freeze(["chart","leaflet","deckgl"]),F=Object.freeze(["layout","panels","sources","links"]),de=Object.freeze(["id","kind","title","source","options","binding"]),_=Object.freeze(["from","to","on"]),H=Object.freeze({rows:["kind","rows","columns","rowKey"],router:["kind","router","predicate","route","columns","rowKey"],grid:["kind","of"]}),ie="grid:";function v(c){if(!c||typeof c!="object"||Array.isArray(c))return!1;const p=Object.getPrototypeOf(c);return p===Object.prototype||p===null}function ee(c,p){if(p==="rows"&&Array.isArray(c))return c;if(Array.isArray(c))return c.map(M=>ee(M));if(!v(c)||Object.values(c).some(M=>typeof M=="function"))return c;const T={};for(const[M,O]of Object.entries(c))O!==void 0&&(T[M]=ee(O,M));return T}function ue(c,p){if(c===p)return!0;if(Array.isArray(c)||Array.isArray(p))return!Array.isArray(c)||!Array.isArray(p)||c.length!==p.length?!1:c.every((O,B)=>ue(O,p[B]));if(!v(c)||!v(p))return!1;const T=Object.keys(c).filter(O=>c[O]!==void 0),M=Object.keys(p).filter(O=>p[O]!==void 0);return T.length!==M.length?!1:T.every(O=>ue(c[O],p[O]))}function re(c){return typeof c!="string"||c===""?null:c.startsWith(ie)?{kind:"grid",of:c.slice(ie.length)}:{kind:"named",id:c}}function L(c){return typeof c=="string"&&c!==""?{from:c,to:c}:typeof c=="function"?c:v(c)&&typeof c.from=="string"&&c.from!==""&&typeof c.to=="string"&&c.to!==""?{from:c.from,to:c.to}:null}function b(c){const p=[],T=new Set,M=new Set,O=new Set,B=new Set,C={fatal:null,problems:p,badPanels:T,badSources:M,badLinks:O,badWindows:B};if(!v(c))return C.fatal="the spec is not an object",p.push({path:"",message:"is not an object: a spec is { layout, panels, sources, links }"}),C;const R=c;if(!Array.isArray(R.panels))return C.fatal="spec.panels is not an array",p.push({path:"panels",message:"is not an array of panels"}),C;for(const o of Object.keys(R))F.includes(o)||p.push({path:o,message:`is not a dashboard spec key (${F.join(", ")})`});const S=new Map;R.panels.forEach((o,d)=>{const s=`panels[${d}]`;if(!v(o)){T.add(d),p.push({path:s,message:"is not an object"});return}if(typeof o.id!="string"||o.id===""){T.add(d),p.push({path:`${s}.id`,message:"is missing: every panel needs a unique string id"});return}if(S.has(o.id)){T.add(d),p.push({path:`${s}.id`,panel:o.id,message:`repeats "${o.id}", which panels[${S.get(o.id).index}] already uses`});return}S.set(o.id,{index:d,kind:o.kind})});const N=R.sources===void 0?{}:R.sources;if(!v(N))p.push({path:"sources",message:"is not an object of named sources"});else for(const[o,d]of Object.entries(N)){const s=`sources.${o}`,a=(w,q)=>{M.add(o),p.push({path:w,message:q})};if(!v(d)){a(s,"is not an object");continue}if(!K.includes(d.kind)){a(`${s}.kind`,`names no source kind (${K.join(", ")})`);continue}const m=H[d.kind];if(m)for(const w of Object.keys(d))m.includes(w)||p.push({path:`${s}.${w}`,message:`is not a key of a ${d.kind} source (${m.join(", ")})`});if(d.columns!==void 0&&!Array.isArray(d.columns)&&a(`${s}.columns`,"is not an array of columns"),d.kind==="rows"&&!Array.isArray(d.rows)&&a(`${s}.rows`,"is not an array of rows"),d.kind==="pushdown"&&!(d.adapter&&typeof d.adapter.execute=="function")&&a(`${s}.adapter`,"is not a pushdown adapter (an object with execute())"),d.kind==="router"&&(d.router&&typeof d.router.attach=="function"||a(`${s}.router`,"is not a Data Router (an object with attach())"),d.predicate===void 0&&a(`${s}.predicate`,"is missing: name the partition value or predicate the route matches")),d.kind==="grid"){const w=typeof d.of=="string"?S.get(d.of):void 0;w?w.kind!=="grid"&&a(`${s}.of`,`names "${d.of}", a ${w.kind} panel: only a grid panel has a grid to view`):a(`${s}.of`,"names no panel")}}const E=new Map;R.panels.forEach((o,d)=>{if(T.has(d))return;const s=`panels[${d}]`,a=(q,te)=>{T.add(d),p.push({path:q,panel:o.id,message:te})};for(const q of Object.keys(o))de.includes(q)||p.push({path:`${s}.${q}`,panel:o.id,message:`is not a panel key (${de.join(", ")}); a viewer's own settings go in options`});if(!W.includes(o.kind)){a(`${s}.kind`,`names no panel kind (${W.join(", ")})`);return}if(o.title!==void 0&&typeof o.title!="string"&&p.push({path:`${s}.title`,panel:o.id,message:"is not a string"}),o.options!==void 0&&!v(o.options)){a(`${s}.options`,"is not an object");return}if(o.binding!==void 0&&(o.kind!=="map"?a(`${s}.binding`,`is only read on a map panel, and this is a ${o.kind} panel`):P.includes(o.binding)||a(`${s}.binding`,`names no map binding (${P.join(", ")})`)),o.source===void 0){(o.kind==="chart"||o.kind==="map"||o.kind==="calendar")&&a(`${s}.source`,`is missing: a ${o.kind} panel draws a source's rows`);return}if(o.kind==="html"){a(`${s}.source`,"is set on an html panel, which reads no rows");return}const m=re(o.source);if(!m){a(`${s}.source`,"is not a source id");return}let w=null;if(m.kind==="grid")w=m.of;else if(!v(N)||!Object.hasOwn(N,m.id)){a(`${s}.source`,`names "${m.id}", which is not in sources`);return}else if(M.has(m.id)){a(`${s}.source`,`names "${m.id}", a source that is not usable`);return}else N[m.id].kind==="grid"&&(w=N[m.id].of);if(w!==null){const q=S.get(w);if(!q){a(`${s}.source`,`views the grid of "${w}", which is not a panel`);return}if(q.kind!=="grid"){a(`${s}.source`,`views the grid of "${w}", a ${q.kind} panel`);return}if(w===o.id){a(`${s}.source`,"views its own grid");return}E.set(o.id,w)}});for(let o=!0;o;)o=!1,R.panels.forEach((d,s)=>{if(T.has(s)||!E.has(d.id))return;const a=new Set([d.id]);let m=E.get(d.id);for(;m!==void 0;){const w=S.get(m);if(a.has(m)){T.add(s),p.push({path:`panels[${s}].source`,panel:d.id,message:`is part of a cycle of panels viewing each other's grids (${[...a,m].join(" -> ")})`}),o=!0;return}if(!w||T.has(w.index)){T.add(s),p.push({path:`panels[${s}].source`,panel:d.id,message:`views the grid of "${m}", a panel that was not built`}),o=!0;return}a.add(m),m=E.get(m)}});if(R.links!==void 0&&!Array.isArray(R.links)?p.push({path:"links",message:"is not an array of links"}):(R.links||[]).forEach((o,d)=>{const s=`links[${d}]`,a=(m,w)=>{O.add(d),p.push({path:m,link:d,message:w})};if(!v(o)){a(s,"is not an object");return}for(const m of Object.keys(o))_.includes(m)||p.push({path:`${s}.${m}`,link:d,message:`is not a link key (${_.join(", ")})`});if(typeof o.from!="string"||!S.has(o.from)){a(`${s}.from`,"names no panel");return}if(typeof o.to!="string"||!S.has(o.to)){a(`${s}.to`,"names no panel");return}if(o.from===o.to){a(`${s}.to`,"is the panel the link starts from");return}L(o.on)||a(`${s}.on`,"is not a column name, a { from, to } pair of column names, or a relation function")}),R.layout!==void 0){if(!v(R.layout))p.push({path:"layout",message:"is not an object"});else if(R.layout.windows!==void 0)if(!Array.isArray(R.layout.windows))p.push({path:"layout.windows",message:"is not an array of windows"});else{const o=new Set;R.layout.windows.forEach((d,s)=>{const a=`layout.windows[${s}]`;!v(d)||typeof d.id!="string"?(B.add(s),p.push({path:a,message:"is not a window with a string id"})):S.has(d.id)?o.has(d.id)?(B.add(s),p.push({path:`${a}.id`,message:`places "${d.id}" a second time`})):o.add(d.id):(B.add(s),p.push({path:`${a}.id`,message:`names "${d.id}", which is not a panel`}))})}}return C}function $(c){const{problems:p}=b(c);return{ok:p.length===0,problems:p.map(({path:T,message:M})=>({path:T,message:M}))}}}),Oe("packages/modules/dashboard/propose.js",function(h,x){"use strict";Object.defineProperty(h,"PROPOSE_SYSTEM",{enumerable:!0,get:function(){return _}}),Object.defineProperty(h,"columnRefs",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(h,"proposalRequest",{enumerable:!0,get:function(){return v}}),Object.defineProperty(h,"parseProposal",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(h,"checkProposal",{enumerable:!0,get:function(){return re}});const W=x("packages/modules/dashboard/spec.js"),K=W.inspectSpec,P=W.isPlain,F=W.copySpec,de=W.parseSourceRef,_=["You design dashboards for a data grid. Return ONLY a JSON object of the form",'{ "layout": { "columns": <n>, "rows": <n> }, "panels": [ { "id": "<id>", "kind": "<kind>",','"title": "<title>", "source": "<source id>", "binding": "chart", "options": { ... } } ],','"links": [ { "from": "<grid panel id>", "to": "<panel id>", "on": "<column>" } ] }.',"Use only the panel kinds and the columns listed in SCHEMA, and only the source it names.","A chart panel's options are a chart spec (type, x, y, series); a kpi panel's are",'{ tiles: [ { id, field, aggregation } ] }; a map panel with binding "chart" takes a map chart',`spec (type "markermap", lon, lat); a grid panel's are { columns: [ { field } ] }.`,"A person reviews the proposal before anything is built."].join(" "),H=Object.freeze(["x","y","series","measure","size","value","volume","lon","lat","geometry","label","start","end","source","target","multiples"]);function ie(L){const b=new Set,$=P(L.options)?L.options:{},c=p=>{typeof p=="string"&&p!==""&&b.add(p)};if(L.kind==="grid")for(const p of Array.isArray($.columns)?$.columns:[])P(p)&&c(p.field);else if(L.kind==="kpi"){for(const p of Array.isArray($.tiles)?$.tiles:[])P(p)&&c(p.field);for(const p of Array.isArray($.fields)?$.fields:[])c(p)}else if(L.kind==="chart"||L.kind==="map"&&(L.binding||"chart")==="chart")for(const p of H)c($[p]);else L.kind==="map"&&P($.position)&&(c($.position.lon),c($.position.lat),c($.position.geometry));return[...b]}function v(L,b){const $={source:b.source,columns:b.columns,kinds:b.kinds};let c=`${L}
|
|
6
|
+
(function(De){"use strict";var Le=Object.create(null),Me=Object.create(null);function Oe(h,x){Le[h]=x}function Ce(h){var x=Me[h];if(x)return x;var W=Object.create(null);Me[h]=W;var K=Le[h];if(!K)throw new Error("[lattice] missing module: "+h);return K(W,Ce),W}Oe("packages/core/src/internal/util.js",function(h,x){"use strict";Object.defineProperty(h,"VERSION",{enumerable:!0,get:function(){return P}}),Object.defineProperty(h,"reportedWarnings",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(h,"warnOnce",{enumerable:!0,get:function(){return L}}),Object.defineProperty(h,"infoOnce",{enumerable:!0,get:function(){return b}}),Object.defineProperty(h,"resetWarnings",{enumerable:!0,get:function(){return $}}),Object.defineProperty(h,"fail",{enumerable:!0,get:function(){return c}}),Object.defineProperty(h,"invariant",{enumerable:!0,get:function(){return p}}),Object.defineProperty(h,"DEV",{enumerable:!0,get:function(){return T}}),Object.defineProperty(h,"isObject",{enumerable:!0,get:function(){return M}}),Object.defineProperty(h,"isFunction",{enumerable:!0,get:function(){return O}}),Object.defineProperty(h,"isNil",{enumerable:!0,get:function(){return B}}),Object.defineProperty(h,"isBlank",{enumerable:!0,get:function(){return C}}),Object.defineProperty(h,"isCtor",{enumerable:!0,get:function(){return R}}),Object.defineProperty(h,"pathGetter",{enumerable:!0,get:function(){return N}}),Object.defineProperty(h,"pathSetter",{enumerable:!0,get:function(){return o}}),Object.defineProperty(h,"getPath",{enumerable:!0,get:function(){return d}}),Object.defineProperty(h,"setPath",{enumerable:!0,get:function(){return s}}),Object.defineProperty(h,"humanise",{enumerable:!0,get:function(){return a}}),Object.defineProperty(h,"escapeHtml",{enumerable:!0,get:function(){return w}}),Object.defineProperty(h,"titleCase",{enumerable:!0,get:function(){return q}}),Object.defineProperty(h,"expand",{enumerable:!0,get:function(){return te}}),Object.defineProperty(h,"toArray",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(h,"merge",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(h,"mergeRow",{enumerable:!0,get:function(){return we}}),Object.defineProperty(h,"Lru",{enumerable:!0,get:function(){return J}}),Object.defineProperty(h,"collator",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(h,"defaultCompare",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(h,"now",{enumerable:!0,get:function(){return he}}),Object.defineProperty(h,"nextFrame",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(h,"cancelFrame",{enumerable:!0,get:function(){return le}}),Object.defineProperty(h,"frameBatched",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(h,"settleDebounce",{enumerable:!0,get:function(){return je}}),Object.defineProperty(h,"whenIdle",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(h,"uid",{enumerable:!0,get:function(){return Ee}});const W="1.88.3";async function K(){return W}const P="1.88.3",F=new Set,de=2e3;function _(t){if(F.add(t),F.size>de){const n=F.values().next().value;n!==void 0&&F.delete(n)}}const H=[],ie=500;function v(t,n,i){H.push({key:t,level:n,message:i.map(k=>typeof k=="string"?k:ee(k)).join(" "),at:Date.now()}),H.length>ie&&H.shift()}function ee(t){if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch{return String(t)}}function ue(){return H.map(t=>({...t}))}function re(t){if(t.length===0||typeof t[0]!="string")return t;const n=t[0].replace(/^\[lattice\]\s*/,"");return n===t[0]?t:[n,...t.slice(1)]}function L(t,...n){if(F.has(t))return;_(t);const i=re(n);v(t,"warn",i),console.warn("[lattice]",...i)}function b(t,...n){if(F.has(t))return;_(t);const i=re(n);v(t,"info",i),console.info("[lattice]",...i)}function $(){F.clear(),H.length=0}function c(t,n){const i=new Error(`[lattice] ${t}`);throw n!==void 0&&(i.cause=n),i}function p(t,n){t||c(n)}const T=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function M(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function O(t){return typeof t=="function"}function B(t){return t==null}function C(t){return t==null||t===""}function R(t){return typeof t!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(t))?!0:!!(t.prototype&&Object.getOwnPropertyNames(t.prototype).length>1)}const S=new Map;function N(t){let n=S.get(t);if(n)return n;if(!t.includes("."))n=i=>i?.[t];else{const i=t.split("."),k=i.length;n=V=>{let U=V;for(let Y=0;Y<k;Y++){if(U==null)return;U=U[i[Y]]}return U}}return S.set(t,n),n}const E=new Map;function o(t){let n=E.get(t);if(n)return n;if(!t.includes("."))n=(i,k)=>{i!=null&&(i[t]=k)};else{const i=t.split("."),k=i.length-1;n=(V,U)=>{let Y=V;for(let Q=0;Q<k;Q++){if(Y==null)return;const me=i[Q];Y[me]==null&&(Y[me]={}),Y=Y[me]}Y!=null&&(Y[i[k]]=U)}}return E.set(t,n),n}function d(t,n){return N(n)(t)}function s(t,n,i){o(n)(t,i)}function a(t){return t?(t.includes(".")?t.slice(t.lastIndexOf(".")+1):t).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,i=>i.toUpperCase()):""}const m={"&":"&","<":"<",">":">",'"':""","'":"'"};function w(t){const n=t==null?"":String(t);return/[&<>"']/.test(n)?n.replace(/[&<>"']/g,i=>m[i]):n}function q(t){return String(t).replace(/\w\S*/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function te(t,n,i){if(t!==void 0)return t===!0?{enabled:!0,...i}:t===!1?{enabled:!1}:M(t)?t:{[n]:t,enabled:!0}}function oe(t){return t==null?[]:Array.isArray(t)?t:[t]}const ke=Object.freeze(new Set(["__proto__","constructor","prototype"]));function pe(t,n){if(!M(t))return M(n)?{...n}:n;if(!M(n))return n===void 0?t:n;const i={...t};for(const k of Object.keys(n)){if(ke.has(k))continue;const V=n[k];V!==void 0&&(i[k]=M(V)&&M(i[k])?pe(i[k],V):V)}return i}function we(t,n){if(!M(t)||!M(n)||t===n)return n;const i=Object.create(Object.getPrototypeOf(t));return Object.assign(i,t,n),i}class J{#n;#e=new Map;#t;constructor(n=256,i=null){this.#n=n,this.#t=i}get size(){return this.#e.size}get max(){return this.#n}set max(n){this.#n=n,this.#r()}has(n){return this.#e.has(n)}get(n){const i=this.#e;if(!i.has(n))return;const k=i.get(n);return i.delete(n),i.set(n,k),k}peek(n){return this.#e.get(n)}set(n,i){const k=this.#e;return k.has(n)&&k.delete(n),k.set(n,i),this.#r(),i}delete(n){const i=this.#e.get(n);return this.#e.delete(n)&&this.#t&&this.#t(i,n),i}clear(){if(this.#t)for(const[n,i]of this.#e)this.#t(i,n);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const n=this.#e;for(;n.size>this.#n;){const i=n.keys().next().value,k=n.get(i);n.delete(i),this.#t&&this.#t(k,i)}}}const ce=new Map;function ve(t,n){const i=`${t||""}|${n?JSON.stringify(n):""}`;let k=ce.get(i);return k||(k=new Intl.Collator(t||void 0,{numeric:!0,sensitivity:"variant",...n}),ce.set(i,k)),k}function ne(t,n){if(t===n)return 0;if(t==null)return 1;if(n==null)return-1;if(typeof t=="number"&&typeof n=="number")return Number.isNaN(t)?Number.isNaN(n)?0:1:Number.isNaN(n)||t<n?-1:t>n?1:0;const i=String(t),k=String(n);return i<k?-1:i>k?1:0}function he(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const $e=typeof requestAnimationFrame=="function";function ge(t){return $e?requestAnimationFrame(t):setTimeout(()=>t(he()),16)}function le(t){t!=null&&($e?cancelAnimationFrame(t):clearTimeout(t))}function Ne(t){let n=null,i=null;const k=()=>{n=null;const U=i;i=null,t(...U||[])},V=(...U)=>{i=U,n===null&&(n=ge(k))};return V.cancel=()=>{le(n),n=null,i=null},V.flush=()=>{n!==null&&(le(n),k())},V}function je(t,n){let i=null,k=null;const V=()=>{if(i=null,k===null)return;const Q=k;k=null,t(...Q),U()},U=()=>{i=setTimeout(V,n),typeof i?.unref=="function"&&i.unref()},Y=(...Q)=>{i===null?(t(...Q),U()):(k=Q,clearTimeout(i),U())};return Y.flush=()=>{if(i!==null&&clearTimeout(i),i=null,k===null)return;const Q=k;k=null,t(...Q)},Y.cancel=()=>{i!==null&&clearTimeout(i),i=null,k=null},Y.pending=()=>i!==null||k!==null,Y}function Re(t,n=50){return typeof requestIdleCallback=="function"?requestIdleCallback(t,{timeout:n}):setTimeout(()=>t({timeRemaining:()=>0,didTimeout:!0}),1)}let Se=0;function Ee(t="l"){return`${t}${(++Se).toString(36)}`}}),Oe("packages/modules/dashboard/spec.js",function(h,x){"use strict";Object.defineProperty(h,"PANEL_KINDS",{enumerable:!0,get:function(){return W}}),Object.defineProperty(h,"SOURCE_KINDS",{enumerable:!0,get:function(){return K}}),Object.defineProperty(h,"MAP_BINDINGS",{enumerable:!0,get:function(){return P}}),Object.defineProperty(h,"GRID_REF",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(h,"isPlain",{enumerable:!0,get:function(){return v}}),Object.defineProperty(h,"copySpec",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(h,"sameSpec",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(h,"parseSourceRef",{enumerable:!0,get:function(){return re}}),Object.defineProperty(h,"readRelation",{enumerable:!0,get:function(){return L}}),Object.defineProperty(h,"inspectSpec",{enumerable:!0,get:function(){return b}}),Object.defineProperty(h,"validateDashboardSpec",{enumerable:!0,get:function(){return $}});const W=Object.freeze(["grid","chart","kpi","calendar","map","html"]),K=Object.freeze(["rows","pushdown","router","grid"]),P=Object.freeze(["chart","leaflet","deckgl"]),F=Object.freeze(["layout","panels","sources","links"]),de=Object.freeze(["id","kind","title","source","options","binding"]),_=Object.freeze(["from","to","on"]),H=Object.freeze({rows:["kind","rows","columns","rowKey"],router:["kind","router","predicate","route","columns","rowKey"],grid:["kind","of"]}),ie="grid:";function v(c){if(!c||typeof c!="object"||Array.isArray(c))return!1;const p=Object.getPrototypeOf(c);return p===Object.prototype||p===null}function ee(c,p){if(p==="rows"&&Array.isArray(c))return c;if(Array.isArray(c))return c.map(M=>ee(M));if(!v(c)||Object.values(c).some(M=>typeof M=="function"))return c;const T={};for(const[M,O]of Object.entries(c))O!==void 0&&(T[M]=ee(O,M));return T}function ue(c,p){if(c===p)return!0;if(Array.isArray(c)||Array.isArray(p))return!Array.isArray(c)||!Array.isArray(p)||c.length!==p.length?!1:c.every((O,B)=>ue(O,p[B]));if(!v(c)||!v(p))return!1;const T=Object.keys(c).filter(O=>c[O]!==void 0),M=Object.keys(p).filter(O=>p[O]!==void 0);return T.length!==M.length?!1:T.every(O=>ue(c[O],p[O]))}function re(c){return typeof c!="string"||c===""?null:c.startsWith(ie)?{kind:"grid",of:c.slice(ie.length)}:{kind:"named",id:c}}function L(c){return typeof c=="string"&&c!==""?{from:c,to:c}:typeof c=="function"?c:v(c)&&typeof c.from=="string"&&c.from!==""&&typeof c.to=="string"&&c.to!==""?{from:c.from,to:c.to}:null}function b(c){const p=[],T=new Set,M=new Set,O=new Set,B=new Set,C={fatal:null,problems:p,badPanels:T,badSources:M,badLinks:O,badWindows:B};if(!v(c))return C.fatal="the spec is not an object",p.push({path:"",message:"is not an object: a spec is { layout, panels, sources, links }"}),C;const R=c;if(!Array.isArray(R.panels))return C.fatal="spec.panels is not an array",p.push({path:"panels",message:"is not an array of panels"}),C;for(const o of Object.keys(R))F.includes(o)||p.push({path:o,message:`is not a dashboard spec key (${F.join(", ")})`});const S=new Map;R.panels.forEach((o,d)=>{const s=`panels[${d}]`;if(!v(o)){T.add(d),p.push({path:s,message:"is not an object"});return}if(typeof o.id!="string"||o.id===""){T.add(d),p.push({path:`${s}.id`,message:"is missing: every panel needs a unique string id"});return}if(S.has(o.id)){T.add(d),p.push({path:`${s}.id`,panel:o.id,message:`repeats "${o.id}", which panels[${S.get(o.id).index}] already uses`});return}S.set(o.id,{index:d,kind:o.kind})});const N=R.sources===void 0?{}:R.sources;if(!v(N))p.push({path:"sources",message:"is not an object of named sources"});else for(const[o,d]of Object.entries(N)){const s=`sources.${o}`,a=(w,q)=>{M.add(o),p.push({path:w,message:q})};if(!v(d)){a(s,"is not an object");continue}if(!K.includes(d.kind)){a(`${s}.kind`,`names no source kind (${K.join(", ")})`);continue}const m=H[d.kind];if(m)for(const w of Object.keys(d))m.includes(w)||p.push({path:`${s}.${w}`,message:`is not a key of a ${d.kind} source (${m.join(", ")})`});if(d.columns!==void 0&&!Array.isArray(d.columns)&&a(`${s}.columns`,"is not an array of columns"),d.kind==="rows"&&!Array.isArray(d.rows)&&a(`${s}.rows`,"is not an array of rows"),d.kind==="pushdown"&&!(d.adapter&&typeof d.adapter.execute=="function")&&a(`${s}.adapter`,"is not a pushdown adapter (an object with execute())"),d.kind==="router"&&(d.router&&typeof d.router.attach=="function"||a(`${s}.router`,"is not a Data Router (an object with attach())"),d.predicate===void 0&&a(`${s}.predicate`,"is missing: name the partition value or predicate the route matches")),d.kind==="grid"){const w=typeof d.of=="string"?S.get(d.of):void 0;w?w.kind!=="grid"&&a(`${s}.of`,`names "${d.of}", a ${w.kind} panel: only a grid panel has a grid to view`):a(`${s}.of`,"names no panel")}}const E=new Map;R.panels.forEach((o,d)=>{if(T.has(d))return;const s=`panels[${d}]`,a=(q,te)=>{T.add(d),p.push({path:q,panel:o.id,message:te})};for(const q of Object.keys(o))de.includes(q)||p.push({path:`${s}.${q}`,panel:o.id,message:`is not a panel key (${de.join(", ")}); a viewer's own settings go in options`});if(!W.includes(o.kind)){a(`${s}.kind`,`names no panel kind (${W.join(", ")})`);return}if(o.title!==void 0&&typeof o.title!="string"&&p.push({path:`${s}.title`,panel:o.id,message:"is not a string"}),o.options!==void 0&&!v(o.options)){a(`${s}.options`,"is not an object");return}if(o.binding!==void 0&&(o.kind!=="map"?a(`${s}.binding`,`is only read on a map panel, and this is a ${o.kind} panel`):P.includes(o.binding)||a(`${s}.binding`,`names no map binding (${P.join(", ")})`)),o.source===void 0){(o.kind==="chart"||o.kind==="map"||o.kind==="calendar")&&a(`${s}.source`,`is missing: a ${o.kind} panel draws a source's rows`);return}if(o.kind==="html"){a(`${s}.source`,"is set on an html panel, which reads no rows");return}const m=re(o.source);if(!m){a(`${s}.source`,"is not a source id");return}let w=null;if(m.kind==="grid")w=m.of;else if(!v(N)||!Object.hasOwn(N,m.id)){a(`${s}.source`,`names "${m.id}", which is not in sources`);return}else if(M.has(m.id)){a(`${s}.source`,`names "${m.id}", a source that is not usable`);return}else N[m.id].kind==="grid"&&(w=N[m.id].of);if(w!==null){const q=S.get(w);if(!q){a(`${s}.source`,`views the grid of "${w}", which is not a panel`);return}if(q.kind!=="grid"){a(`${s}.source`,`views the grid of "${w}", a ${q.kind} panel`);return}if(w===o.id){a(`${s}.source`,"views its own grid");return}E.set(o.id,w)}});for(let o=!0;o;)o=!1,R.panels.forEach((d,s)=>{if(T.has(s)||!E.has(d.id))return;const a=new Set([d.id]);let m=E.get(d.id);for(;m!==void 0;){const w=S.get(m);if(a.has(m)){T.add(s),p.push({path:`panels[${s}].source`,panel:d.id,message:`is part of a cycle of panels viewing each other's grids (${[...a,m].join(" -> ")})`}),o=!0;return}if(!w||T.has(w.index)){T.add(s),p.push({path:`panels[${s}].source`,panel:d.id,message:`views the grid of "${m}", a panel that was not built`}),o=!0;return}a.add(m),m=E.get(m)}});if(R.links!==void 0&&!Array.isArray(R.links)?p.push({path:"links",message:"is not an array of links"}):(R.links||[]).forEach((o,d)=>{const s=`links[${d}]`,a=(m,w)=>{O.add(d),p.push({path:m,link:d,message:w})};if(!v(o)){a(s,"is not an object");return}for(const m of Object.keys(o))_.includes(m)||p.push({path:`${s}.${m}`,link:d,message:`is not a link key (${_.join(", ")})`});if(typeof o.from!="string"||!S.has(o.from)){a(`${s}.from`,"names no panel");return}if(typeof o.to!="string"||!S.has(o.to)){a(`${s}.to`,"names no panel");return}if(o.from===o.to){a(`${s}.to`,"is the panel the link starts from");return}L(o.on)||a(`${s}.on`,"is not a column name, a { from, to } pair of column names, or a relation function")}),R.layout!==void 0){if(!v(R.layout))p.push({path:"layout",message:"is not an object"});else if(R.layout.windows!==void 0)if(!Array.isArray(R.layout.windows))p.push({path:"layout.windows",message:"is not an array of windows"});else{const o=new Set;R.layout.windows.forEach((d,s)=>{const a=`layout.windows[${s}]`;!v(d)||typeof d.id!="string"?(B.add(s),p.push({path:a,message:"is not a window with a string id"})):S.has(d.id)?o.has(d.id)?(B.add(s),p.push({path:`${a}.id`,message:`places "${d.id}" a second time`})):o.add(d.id):(B.add(s),p.push({path:`${a}.id`,message:`names "${d.id}", which is not a panel`}))})}}return C}function $(c){const{problems:p}=b(c);return{ok:p.length===0,problems:p.map(({path:T,message:M})=>({path:T,message:M}))}}}),Oe("packages/modules/dashboard/propose.js",function(h,x){"use strict";Object.defineProperty(h,"PROPOSE_SYSTEM",{enumerable:!0,get:function(){return _}}),Object.defineProperty(h,"columnRefs",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(h,"proposalRequest",{enumerable:!0,get:function(){return v}}),Object.defineProperty(h,"parseProposal",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(h,"checkProposal",{enumerable:!0,get:function(){return re}});const W=x("packages/modules/dashboard/spec.js"),K=W.inspectSpec,P=W.isPlain,F=W.copySpec,de=W.parseSourceRef,_=["You design dashboards for a data grid. Return ONLY a JSON object of the form",'{ "layout": { "columns": <n>, "rows": <n> }, "panels": [ { "id": "<id>", "kind": "<kind>",','"title": "<title>", "source": "<source id>", "binding": "chart", "options": { ... } } ],','"links": [ { "from": "<grid panel id>", "to": "<panel id>", "on": "<column>" } ] }.',"Use only the panel kinds and the columns listed in SCHEMA, and only the source it names.","A chart panel's options are a chart spec (type, x, y, series); a kpi panel's are",'{ tiles: [ { id, field, aggregation } ] }; a map panel with binding "chart" takes a map chart',`spec (type "markermap", lon, lat); a grid panel's are { columns: [ { field } ] }.`,"A person reviews the proposal before anything is built."].join(" "),H=Object.freeze(["x","y","series","measure","size","value","volume","lon","lat","geometry","label","start","end","source","target","multiples"]);function ie(L){const b=new Set,$=P(L.options)?L.options:{},c=p=>{typeof p=="string"&&p!==""&&b.add(p)};if(L.kind==="grid")for(const p of Array.isArray($.columns)?$.columns:[])P(p)&&c(p.field);else if(L.kind==="kpi"){for(const p of Array.isArray($.tiles)?$.tiles:[])P(p)&&c(p.field);for(const p of Array.isArray($.fields)?$.fields:[])c(p)}else if(L.kind==="chart"||L.kind==="map"&&(L.binding||"chart")==="chart")for(const p of H)c($[p]);else L.kind==="map"&&P($.position)&&(c($.position.lon),c($.position.lat),c($.position.geometry));return[...b]}function v(L,b){const $={source:b.source,columns:b.columns,kinds:b.kinds};let c=`${L}
|
|
7
7
|
|
|
8
8
|
SCHEMA
|
|
9
9
|
${JSON.stringify($)}`;b.rows&&(c+=`
|
package/modules/data-router.d.ts
CHANGED