@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.88.
|
|
2
|
+
* Lattice Grid 1.88.3, dhtmlx-compat module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
|
-
import*as he from"@toclocoinc/lattice-grid";var J=Object.create(null),Z=Object.create(null);function T(s,w){J[s]=w}function Y(s){var w=Z[s];if(w)return w;var b=Object.create(null);Z[s]=b;var O=J[s];if(!O)throw new Error("[lattice] missing module: "+s);return O(b,Y),b}var _=Object.create(null);_["@toclocoinc/lattice-grid"]=he;function Q(s){var w=_[s],b=typeof globalThis<"u"?globalThis:typeof self<"u"?self:null;if(w)return w;if(s==="@toclocoinc/lattice-grid"&&b&&b.LatticeGrid)return b.LatticeGrid;throw new Error("[lattice] this module shares the Lattice core with the page, but it was not found. Load lattice-grid (or its script build) before this module. Missing: "+s)}T("packages/core/src/internal/util.js",function(s,w){"use strict";Object.defineProperty(s,"VERSION",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"reportedWarnings",{enumerable:!0,get:function(){return i}}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return y}}),Object.defineProperty(s,"infoOnce",{enumerable:!0,get:function(){return n}}),Object.defineProperty(s,"resetWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(s,"fail",{enumerable:!0,get:function(){return g}}),Object.defineProperty(s,"invariant",{enumerable:!0,get:function(){return R}}),Object.defineProperty(s,"DEV",{enumerable:!0,get:function(){return E}}),Object.defineProperty(s,"isObject",{enumerable:!0,get:function(){return S}}),Object.defineProperty(s,"isFunction",{enumerable:!0,get:function(){return I}}),Object.defineProperty(s,"isNil",{enumerable:!0,get:function(){return H}}),Object.defineProperty(s,"isBlank",{enumerable:!0,get:function(){return D}}),Object.defineProperty(s,"isCtor",{enumerable:!0,get:function(){return z}}),Object.defineProperty(s,"pathGetter",{enumerable:!0,get:function(){return M}}),Object.defineProperty(s,"pathSetter",{enumerable:!0,get:function(){return j}}),Object.defineProperty(s,"getPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(s,"setPath",{enumerable:!0,get:function(){return F}}),Object.defineProperty(s,"humanise",{enumerable:!0,get:function(){return $}}),Object.defineProperty(s,"escapeHtml",{enumerable:!0,get:function(){return te}}),Object.defineProperty(s,"titleCase",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(s,"expand",{enumerable:!0,get:function(){return re}}),Object.defineProperty(s,"toArray",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(s,"merge",{enumerable:!0,get:function(){return W}}),Object.defineProperty(s,"mergeRow",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(s,"Lru",{enumerable:!0,get:function(){return se}}),Object.defineProperty(s,"collator",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(s,"defaultCompare",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(s,"now",{enumerable:!0,get:function(){return V}}),Object.defineProperty(s,"nextFrame",{enumerable:!0,get:function(){return q}}),Object.defineProperty(s,"cancelFrame",{enumerable:!0,get:function(){return K}}),Object.defineProperty(s,"frameBatched",{enumerable:!0,get:function(){return le}}),Object.defineProperty(s,"settleDebounce",{enumerable:!0,get:function(){return de}}),Object.defineProperty(s,"whenIdle",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(s,"uid",{enumerable:!0,get:function(){return pe}});const b="1.88.2";async function O(){return b}const p="1.88.2",h=new Set,P=2e3;function m(e){if(h.add(e),h.size>P){const t=h.values().next().value;t!==void 0&&h.delete(t)}}const u=[],a=500;function f(e,t,r){u.push({key:e,level:t,message:r.map(d=>typeof d=="string"?d:o(d)).join(" "),at:Date.now()}),u.length>a&&u.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function i(){return u.map(e=>({...e}))}function c(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function y(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"warn",r),console.warn("[lattice]",...r)}function n(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"info",r),console.info("[lattice]",...r)}function l(){h.clear(),u.length=0}function g(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function R(e,t){e||g(t)}const E=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function S(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function I(e){return typeof e=="function"}function H(e){return e==null}function D(e){return e==null||e===""}function z(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const L=new Map;function M(e){let t=L.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),d=r.length;t=k=>{let A=k;for(let N=0;N<d;N++){if(A==null)return;A=A[r[N]]}return A}}return L.set(e,t),t}const x=new Map;function j(e){let t=x.get(e);if(t)return t;if(!e.includes("."))t=(r,d)=>{r!=null&&(r[e]=d)};else{const r=e.split("."),d=r.length-1;t=(k,A)=>{let N=k;for(let C=0;C<d;C++){if(N==null)return;const U=r[C];N[U]==null&&(N[U]={}),N=N[U]}N!=null&&(N[r[d]]=A)}}return x.set(e,t),t}function v(e,t){return M(t)(e)}function F(e,t,r){j(t)(e,r)}function $(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).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(/^./,r=>r.toUpperCase()):""}const ee={"&":"&","<":"<",">":">",'"':""","'":"'"};function te(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>ee[r]):t}function ne(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function re(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:S(e)?e:{[t]:e,enabled:!0}}function oe(e){return e==null?[]:Array.isArray(e)?e:[e]}const ie=Object.freeze(new Set(["__proto__","constructor","prototype"]));function W(e,t){if(!S(e))return S(t)?{...t}:t;if(!S(t))return t===void 0?e:t;const r={...e};for(const d of Object.keys(t)){if(ie.has(d))continue;const k=t[d];k!==void 0&&(r[d]=S(k)&&S(r[d])?W(r[d],k):k)}return r}function ae(e,t){if(!S(e)||!S(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class se{#e;#t=new Map;#n;constructor(t=256,r=null){this.#e=t,this.#n=r}get size(){return this.#t.size}get max(){return this.#e}set max(t){this.#e=t,this.#r()}has(t){return this.#t.has(t)}get(t){const r=this.#t;if(!r.has(t))return;const d=r.get(t);return r.delete(t),r.set(t,d),d}peek(t){return this.#t.get(t)}set(t,r){const d=this.#t;return d.has(t)&&d.delete(t),d.set(t,r),this.#r(),r}delete(t){const r=this.#t.get(t);return this.#t.delete(t)&&this.#n&&this.#n(r,t),r}clear(){if(this.#n)for(const[t,r]of this.#t)this.#n(r,t);this.#t.clear()}keys(){return this.#t.keys()}values(){return this.#t.values()}#r(){const t=this.#t;for(;t.size>this.#e;){const r=t.keys().next().value,d=t.get(r);t.delete(r),this.#n&&this.#n(d,r)}}}const G=new Map;function ue(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let d=G.get(r);return d||(d=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),G.set(r,d)),d}function ce(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),d=String(t);return r<d?-1:r>d?1:0}function V(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const B=typeof requestAnimationFrame=="function";function q(e){return B?requestAnimationFrame(e):setTimeout(()=>e(V()),16)}function K(e){e!=null&&(B?cancelAnimationFrame(e):clearTimeout(e))}function le(e){let t=null,r=null;const d=()=>{t=null;const A=r;r=null,e(...A||[])},k=(...A)=>{r=A,t===null&&(t=q(d))};return k.cancel=()=>{K(t),t=null,r=null},k.flush=()=>{t!==null&&(K(t),d())},k}function de(e,t){let r=null,d=null;const k=()=>{if(r=null,d===null)return;const C=d;d=null,e(...C),A()},A=()=>{r=setTimeout(k,t),typeof r?.unref=="function"&&r.unref()},N=(...C)=>{r===null?(e(...C),A()):(d=C,clearTimeout(r),A())};return N.flush=()=>{if(r!==null&&clearTimeout(r),r=null,d===null)return;const C=d;d=null,e(...C)},N.cancel=()=>{r!==null&&clearTimeout(r),r=null,d=null},N.pending=()=>r!==null||d!==null,N}function fe(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let me=0;function pe(e="l"){return`${e}${(++me).toString(36)}`}}),T("packages/modules/dhtmlx-compat/util.js",function(s,w){"use strict";Object.defineProperty(s,"reportUntranslated",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"indexOfKey",{enumerable:!0,get:function(){return h}}),Object.defineProperty(s,"rowsFrom",{enumerable:!0,get:function(){return P}}),Object.defineProperty(s,"rowShape",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"columnShape",{enumerable:!0,get:function(){return u}});const O=w("packages/core/src/internal/util.js").warnOnce;function p(a,f,o){if(!(!a||typeof a!="object"))for(const i of Object.keys(a))f.has(i)||O(`dhtmlx.${o}.dropped:${i}`,`dhtmlx-compat does not translate the ${o} key '${i}', so it has no effect. Nothing was applied for it.`)}function h(a,f){const o=a.rows.count();for(let i=0;i<o;i++){const c=a.rows.get(i);if(c&&c.key===f)return i}return-1}function P(a){return Array.isArray(a)?a:a&&typeof a=="object"&&Array.isArray(a.data)?a.data:[]}function m(a,f){const o=a.rows.byKey(f);return{...o?o.data:void 0,id:f}}function u(a,f){return{id:f}}}),T("packages/modules/dhtmlx-compat/columns.js",function(s,w){"use strict";Object.defineProperty(s,"translateColumn",{enumerable:!0,get:function(){return c}}),Object.defineProperty(s,"translateColumns",{enumerable:!0,get:function(){return y}});const O=w("packages/core/src/internal/util.js").warnOnce,h=Q("@toclocoinc/lattice-grid").sanitiseHtml;if(typeof h>"u")throw new Error("[lattice] dhtmlx-compat needs sanitiseHtml from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const m=w("packages/modules/dhtmlx-compat/util.js").reportUntranslated,u=new Set(["id","header","type","width","minWidth","maxWidth","resizable","hidden","draggable","align","tooltip","tooltipTemplate","template","htmlEnable","sortable","editable","editorType","editorConfig","options","summary"]),a=Object.freeze({input:"text",select:"select",combobox:"select",textarea:"textarea",multiselect:"multiSelect",datePicker:"date",checkbox:"checkbox"}),f=Object.freeze({number:"number",date:"date"});function o(n){if(typeof n=="string")return n;if(Array.isArray(n)&&n.length>0){n.length>1&&O("dhtmlx.header.multirow",`dhtmlx-compat collapsed a ${n.length}-row header to its first row. Lattice titles are a single string; the remaining rows were not applied.`);const l=n[0];if(typeof l=="string")return l;if(l&&typeof l=="object"&&typeof l.text=="string")return l.text}}function i(n,l){return(g,R)=>{const E={...R.data||{},id:R.row?R.row.key:void 0},S=n(R.value,E,{id:R.colId});l?g.innerHTML=h(String(S)):g.textContent=String(S)}}function c(n){if(!n||typeof n!="object"||!n.id)throw new TypeError("dhtmlx-compat: every column needs an id.");m(n,u,"column");const l={id:n.id,field:n.id},g=o(n.header);if(g!==void 0&&(l.title=g),n.type!==void 0){const S=f[n.type];S&&(l.type=S)}if((n.width!==void 0||n.minWidth!==void 0||n.maxWidth!==void 0||n.resizable!==void 0||n.hidden!==void 0||n.draggable!==void 0)&&(l.layout={},n.width!==void 0&&(l.layout.width=n.width),n.minWidth!==void 0&&(l.layout.min=n.minWidth),n.maxWidth!==void 0&&(l.layout.max=n.maxWidth),n.resizable!==void 0&&(l.layout.resizable=!!n.resizable),n.hidden!==void 0&&(l.layout.hidden=!!n.hidden),n.draggable!==void 0&&(l.layout.movable=!!n.draggable)),n.align!==void 0&&(l.cell={...l.cell||{},align:n.align}),(n.tooltipTemplate!==void 0||n.tooltip!==void 0)&&(l.cell={...l.cell||{},tooltip:n.tooltipTemplate||n.tooltip}),typeof n.template=="function"&&(l.cell={...l.cell||{},render:i(n.template,!!n.htmlEnable)}),n.sortable!==void 0&&(l.sort={enabled:!!n.sortable}),n.editable!==void 0||n.editorType!==void 0||n.editorConfig!==void 0||n.options!==void 0){if(l.edit={enabled:n.editable!==!1},n.editorType!==void 0){const S=a[n.editorType];S||O(`dhtmlx.editorType.unknown:${String(n.editorType)}`,`dhtmlx-compat does not recognise editorType '${String(n.editorType)}'; the default text editor was used instead.`),l.edit.editor=S||"text"}(n.editorConfig!==void 0||n.options!==void 0)&&(l.edit.props={...n.editorConfig||{}},n.options!==void 0&&(l.edit.props.options=n.options))}return n.summary!==void 0&&(l.total=n.summary),l}function y(n){return Array.isArray(n)?n.map(c):[]}}),T("packages/modules/dhtmlx-compat/data.js",function(s,w){"use strict";Object.defineProperty(s,"createData",{enumerable:!0,get:function(){return P}});const b=w("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowsFrom;function h(m){return m.get("rowKey")}function P(m){return{add(u,a){const f=a===void 0?{add:[u]}:{add:[u],at:a},o=m.rows.apply(f);if(o&&o.rejected&&o.rejected.length)throw new Error(`dhtmlx-compat: data.add() was rejected: ${JSON.stringify(o.rejected[0])}.`);return u[h(m)]},update(u,a){m.rows.apply({update:[{...a,[h(m)]:u}]})},remove(u){m.rows.apply({remove:Array.isArray(u)?u:[u]})},removeAll(){m.rows.load([])},parse(u){m.rows.load(p(u))},async load(u,a){const o=await(await fetch(u)).json();m.rows.load(p(o)),typeof a=="function"&&a()},find(u){const a=m.rows.byKey(u);return a?a.data:void 0},findAll(u){const a=[];return m.rows.forEachAll(f=>{u(f.data)&&a.push(f.data)}),a},exists(u){return m.rows.byKey(u)!==void 0&&m.rows.byKey(u)!==null},getItem(u){const a=m.rows.byKey(u);return a?a.data:void 0},serialize(){return m.rows.data()},getId(u){const a=m.rows.get(u);return a?a.key:void 0},getIndex(u){return O(m,u)},getLength(){return m.rows.count()},forEach(u){m.rows.forEach((a,f)=>u(a.data,f))},sort(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.sort(fn) is not supported: Lattice sorts by column, not a comparator. Pass a column id, or { by, dir }.");const a=Array.isArray(u)?u:[u];m.sort.set(a.map(f=>typeof f=="string"?{col:f,dir:"asc"}:{col:f.by,dir:f.dir||"asc"}))},filter(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.filter(fn) is not supported: Lattice filters are a declarative condition tree, not a predicate. Pass { col, op, value } instead.");m.filters.set(u)},resetFilter(){m.filters.clear()}}}}),T("packages/modules/dhtmlx-compat/selection.js",function(s,w){"use strict";Object.defineProperty(s,"createSelection",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"createRangeSelection",{enumerable:!0,get:function(){return f}});const b=w("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowShape,h=b.columnShape;function P(o){return o&&typeof o=="object"&&"id"in o?o.id:o}function m(o){return{setCell(i,c,y,n){const l=O(o,P(i));if(l===-1)return;const g=P(c);if(n){o.selection.extendRange(l,g);return}o.selection.startRange(l,g,{additive:!!y})},getCell(){const i=o.selection.cells();if(i.length)return{row:p(o,i[0].key),column:h(o,i[0].colId)}},getCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},isSelectedCell(i,c){const y=O(o,P(i));return y===-1?!1:o.selection.inRange(y,P(c))},removeCell(){o.selection.clearRange()},enable(){},disable(){o.selection.clearRange()}}}function u(o,i){const c=Math.min(o.start.row,o.end.row),y=Math.max(o.start.row,o.end.row),n=i.columns.visible().map(I=>I.id),l=n.indexOf(o.start.column),g=n.indexOf(o.end.column),R=Math.min(l,g),E=Math.max(l,g),S=R===-1||E===-1?[o.start.column]:n.slice(R,E+1);return{startRow:c,endRow:y,columns:S}}function a(o){return{start:{row:o.startRow,column:o.columns[0]},end:{row:o.endRow,column:o.columns[o.columns.length-1]}}}function f(o){return{setRange(i){o.selection.setRange(u(i,o))},getRange(){const i=o.selection.ranges();if(i.length)return a(i[i.length-1])},getRangedCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},resetRange(){o.selection.clearRange()},isRanged(){return o.selection.ranges().length>0},enable(){},disable(){o.selection.clearRange()},isDisabled(){return!1}}}}),T("packages/modules/dhtmlx-compat/passthrough.js",function(s,w){"use strict";Object.defineProperty(s,"createHistory",{enumerable:!0,get:function(){return b}}),Object.defineProperty(s,"createExport",{enumerable:!0,get:function(){return O}});function b(p){return{undo(){return p.history.undo()},redo(){return p.history.redo()},canUndo(){return p.history.canUndo()},canRedo(){return p.history.canRedo()},clear(){p.history.clear()},removeAll(){p.history.clear()},getHistory(){return p.history.list()}}}function O(p){return{csv(h){return p.export.csv(h)},xlsx(h){return p.export.excel(h)},pdf(){throw new Error("dhtmlx-compat: export.pdf() is not supported: Lattice has no PDF export. export.csv()/export.xlsx() work, or use the browser's own print-to-PDF via grid.export.print().")},png(){throw new Error("dhtmlx-compat: export.png() is not supported: Lattice has no raster export.")}}}}),T("packages/modules/dhtmlx-compat/events.js",function(s,w){"use strict";Object.defineProperty(s,"createEvents",{enumerable:!0,get:function(){return o}});const b=w("packages/modules/dhtmlx-compat/util.js"),O=b.rowShape,p=b.columnShape;function h(i,c){return[O(c,i.key),p(c,i.colId),i.event]}function P(i,c){const y=i.column&&i.column.edit?i.column.edit.editor:void 0;return[O(c,i.key),p(c,i.colId),y]}function m(i,c){return[i.value,O(c,i.key),p(c,i.colId)]}function u(i,c){const y=i.sort&&i.sort[0];return y?[p(c,y.col),y.dir]:null}function a(i,c){let y,n;if(i.key!==void 0)y=[i.key],n=i.to;else{const g=c.get("rowKey");y=(Array.isArray(i.data)?i.data:[i.data]).map(E=>E&&E[g]),n=i.at}const l=n!==void 0?c.rows.get(n):void 0;return[{start:y[0],source:y,target:l?l.key:void 0},void 0]}const f=Object.freeze({cellClick:{latticeNames:["cell:clicked"],reshape:h},cellDblClick:{latticeNames:["cell:dblclicked"],reshape:h},cellRightClick:{latticeNames:["cell:contextmenu"],reshape:h},afterEditStart:{latticeNames:["cell:edit:start"],reshape:P},afterEditEnd:{latticeNames:["cell:changed"],reshape:m},afterSort:{latticeNames:["sort:changed"],reshape:u},filterChange:{latticeNames:["filter:changed"]},afterColumnDrop:{latticeNames:["column:moved"]},afterResizeEnd:{latticeNames:["column:resized"]},resize:{latticeNames:["column:resized"]},afterColumnHide:{latticeNames:["column:visible"]},afterColumnShow:{latticeNames:["column:visible"]},afterExpand:{latticeNames:["group:toggled"]},afterCollapse:{latticeNames:["group:toggled"]},afterSelect:{latticeNames:["range:changed"]},afterUnSelect:{latticeNames:["range:changed"]},afterSetRange:{latticeNames:["range:changed"]},afterResetRange:{latticeNames:["range:changed"]},afterAdd:{latticeNames:["history:changed"]},afterUndo:{latticeNames:["history:applied"]},afterRedo:{latticeNames:["history:applied"]},afterCopy:{latticeNames:["clipboard:copy"]},scroll:{latticeNames:["scroll"]},afterRowDrop:{latticeNames:["row:moved","row:received"],reshape:a}});function o(i){const c=new Set;return{on(y,n){const l=f[y];if(!l)return c.has(y)||(c.add(y),console.warn(`dhtmlx-compat: "${y}" has no Lattice equivalent and will never fire.`)),()=>{};const g=l.latticeNames.map(R=>i.on(R,E=>{if(!l.reshape){n(E);return}const S=l.reshape(E,i);S&&n(...S)}));return()=>{for(const R of g)R()}}}}}),T("packages/modules/dhtmlx-compat/rows.js",function(s,w){"use strict";Object.defineProperty(s,"createRowVisibility",{enumerable:!0,get:function(){return b}});function b(O){const p=new Set,h={active:()=>p.size>0,passes:u=>!(u&&p.has(String(u.key)))};let P=!1;function m(){P||(P=!0),O.set("hostFilter",h)}return{hideRow(u){const a=String(u);p.has(a)||(p.add(a),m())},showRow(u){const a=String(u);p.delete(a)&&m()},isRowHidden(u){return p.has(String(u))},hiddenRows(){return[...p]}}}}),T("packages/modules/dhtmlx-compat/spans.js",function(s,w){"use strict";Object.defineProperty(s,"createSpans",{enumerable:!0,get:function(){return u}});const O=w("packages/core/src/internal/util.js").warnOnce,p=new Set(["row","column","rowspan","colspan"]);function h(a,f){return`${String(a)}|${String(f)}`}function P(a,f,o,i){if(a&&typeof a=="object"){for(const c of Object.keys(a))p.has(c)||O(`dhtmlx.span.dropped:${c}`,`dhtmlx-compat does not translate the span key '${c}', so it has no effect. Lattice spans carry only geometry (rowspan/colspan); the cell's value, css and tooltip come from its own column, not the span.`);return{row:a.row,column:a.column,rows:Math.max(1,Math.floor(Number(a.rowspan)||1)),cols:Math.max(1,Math.floor(Number(a.colspan)||1))}}return{row:a,column:f,rows:Math.max(1,Math.floor(Number(o)||1)),cols:Math.max(1,Math.floor(Number(i)||1))}}function m(a,f){return a.map(o=>({...o,cell:{...o.cell||{},spanColumns:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.cols:1},spanRows:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.rows:1}}}))}function u(a){const f=new Map;let o=!1;function i(){const c=o?a.get("columns"):m(a.get("columns"),f);o=!0,a.set("columns",c)}return{addSpan(c,y,n,l){const g=P(c,y,n,l);if(g.row===void 0||g.column===void 0)throw new TypeError("dhtmlx-compat: addSpan needs a row and a column.");if(g.rows<=1&&g.cols<=1){this.removeSpan(g.row,g.column);return}f.set(h(g.row,g.column),{rows:g.rows,cols:g.cols}),i()},removeSpan(c,y){f.delete(h(c,y))&&i()},getSpan(c,y){const n=f.get(h(c,y));if(n)return{rowspan:n.rows,colspan:n.cols}},spanCount(){return f.size}}}}),T("packages/modules/dhtmlx-compat/index.js",function(s,w){"use strict";Object.defineProperty(s,"Grid",{enumerable:!0,get:function(){return L}}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return M}});const O=Q("@toclocoinc/lattice-grid").createGrid;if(typeof O>"u")throw new Error("[lattice] dhtmlx-compat needs createGrid from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const h=w("packages/modules/dhtmlx-compat/columns.js").translateColumns,m=w("packages/modules/dhtmlx-compat/data.js").createData,u=w("packages/modules/dhtmlx-compat/selection.js"),a=u.createSelection,f=u.createRangeSelection,o=w("packages/modules/dhtmlx-compat/passthrough.js"),i=o.createHistory,c=o.createExport,n=w("packages/modules/dhtmlx-compat/events.js").createEvents,g=w("packages/modules/dhtmlx-compat/rows.js").createRowVisibility,E=w("packages/modules/dhtmlx-compat/spans.js").createSpans,S=w("packages/modules/dhtmlx-compat/util.js"),I=S.rowsFrom,H=S.reportUntranslated,D=new Set(["rowKey","columns","data","autoHeight","rowHeight","headerRowHeight","multiselection","dragItem","rowTransfer"]);function z(x){H(x,D,"config");const j={rowKey:x.rowKey||"id"};return x.columns!==void 0&&(j.columns=h(x.columns)),x.data!==void 0&&(j.rows=I(x.data)),x.autoHeight!==void 0&&(j.autoHeight=x.autoHeight),x.rowHeight!==void 0&&(j.rowHeight=x.rowHeight),x.headerRowHeight!==void 0&&(j.headerHeight=x.headerRowHeight),x.multiselection&&(j.selection="multiple"),x.dragItem==="row"&&(j.rowReorder=!0),x.rowTransfer!==void 0&&(j.rowTransfer=x.rowTransfer),j}class L{#e;#t;#n;constructor(j,v={}){this.#e=O(j,z(v)),this.data=m(this.#e),this.selection=a(this.#e),this.rangeSelection=f(this.#e),this.history=i(this.#e),this.export=c(this.#e),this.events=n(this.#e),this.#t=g(this.#e),this.#n=E(this.#e)}get lattice(){return this.#e}hideRow(j){this.#t.hideRow(j)}showRow(j){this.#t.showRow(j)}isRowHidden(j){return this.#t.isRowHidden(j)}addSpan(j,v,F,$){this.#n.addSpan(j,v,F,$)}removeSpan(j,v){this.#n.removeSpan(j,v)}getSpan(j,v){return this.#n.getSpan(j,v)}setColumns(j){if(j===void 0)return this.#e.get("columns");this.#e.set("columns",h(j))}destructor(){this.#e.destroy()}}const M=L});const X=Y("packages/modules/dhtmlx-compat/index.js"),ye=X.Grid;var we=X.default;export{ye as Grid,we as default};
|
|
6
|
+
import*as he from"@toclocoinc/lattice-grid";var J=Object.create(null),Z=Object.create(null);function T(s,w){J[s]=w}function Y(s){var w=Z[s];if(w)return w;var b=Object.create(null);Z[s]=b;var O=J[s];if(!O)throw new Error("[lattice] missing module: "+s);return O(b,Y),b}var _=Object.create(null);_["@toclocoinc/lattice-grid"]=he;function Q(s){var w=_[s],b=typeof globalThis<"u"?globalThis:typeof self<"u"?self:null;if(w)return w;if(s==="@toclocoinc/lattice-grid"&&b&&b.LatticeGrid)return b.LatticeGrid;throw new Error("[lattice] this module shares the Lattice core with the page, but it was not found. Load lattice-grid (or its script build) before this module. Missing: "+s)}T("packages/core/src/internal/util.js",function(s,w){"use strict";Object.defineProperty(s,"VERSION",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"reportedWarnings",{enumerable:!0,get:function(){return i}}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return y}}),Object.defineProperty(s,"infoOnce",{enumerable:!0,get:function(){return n}}),Object.defineProperty(s,"resetWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(s,"fail",{enumerable:!0,get:function(){return g}}),Object.defineProperty(s,"invariant",{enumerable:!0,get:function(){return R}}),Object.defineProperty(s,"DEV",{enumerable:!0,get:function(){return E}}),Object.defineProperty(s,"isObject",{enumerable:!0,get:function(){return S}}),Object.defineProperty(s,"isFunction",{enumerable:!0,get:function(){return I}}),Object.defineProperty(s,"isNil",{enumerable:!0,get:function(){return H}}),Object.defineProperty(s,"isBlank",{enumerable:!0,get:function(){return D}}),Object.defineProperty(s,"isCtor",{enumerable:!0,get:function(){return z}}),Object.defineProperty(s,"pathGetter",{enumerable:!0,get:function(){return M}}),Object.defineProperty(s,"pathSetter",{enumerable:!0,get:function(){return j}}),Object.defineProperty(s,"getPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(s,"setPath",{enumerable:!0,get:function(){return F}}),Object.defineProperty(s,"humanise",{enumerable:!0,get:function(){return $}}),Object.defineProperty(s,"escapeHtml",{enumerable:!0,get:function(){return te}}),Object.defineProperty(s,"titleCase",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(s,"expand",{enumerable:!0,get:function(){return re}}),Object.defineProperty(s,"toArray",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(s,"merge",{enumerable:!0,get:function(){return W}}),Object.defineProperty(s,"mergeRow",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(s,"Lru",{enumerable:!0,get:function(){return se}}),Object.defineProperty(s,"collator",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(s,"defaultCompare",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(s,"now",{enumerable:!0,get:function(){return V}}),Object.defineProperty(s,"nextFrame",{enumerable:!0,get:function(){return q}}),Object.defineProperty(s,"cancelFrame",{enumerable:!0,get:function(){return K}}),Object.defineProperty(s,"frameBatched",{enumerable:!0,get:function(){return le}}),Object.defineProperty(s,"settleDebounce",{enumerable:!0,get:function(){return de}}),Object.defineProperty(s,"whenIdle",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(s,"uid",{enumerable:!0,get:function(){return pe}});const b="1.88.3";async function O(){return b}const p="1.88.3",h=new Set,P=2e3;function m(e){if(h.add(e),h.size>P){const t=h.values().next().value;t!==void 0&&h.delete(t)}}const u=[],a=500;function f(e,t,r){u.push({key:e,level:t,message:r.map(d=>typeof d=="string"?d:o(d)).join(" "),at:Date.now()}),u.length>a&&u.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function i(){return u.map(e=>({...e}))}function c(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function y(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"warn",r),console.warn("[lattice]",...r)}function n(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"info",r),console.info("[lattice]",...r)}function l(){h.clear(),u.length=0}function g(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function R(e,t){e||g(t)}const E=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function S(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function I(e){return typeof e=="function"}function H(e){return e==null}function D(e){return e==null||e===""}function z(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const L=new Map;function M(e){let t=L.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),d=r.length;t=k=>{let A=k;for(let N=0;N<d;N++){if(A==null)return;A=A[r[N]]}return A}}return L.set(e,t),t}const x=new Map;function j(e){let t=x.get(e);if(t)return t;if(!e.includes("."))t=(r,d)=>{r!=null&&(r[e]=d)};else{const r=e.split("."),d=r.length-1;t=(k,A)=>{let N=k;for(let C=0;C<d;C++){if(N==null)return;const U=r[C];N[U]==null&&(N[U]={}),N=N[U]}N!=null&&(N[r[d]]=A)}}return x.set(e,t),t}function v(e,t){return M(t)(e)}function F(e,t,r){j(t)(e,r)}function $(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).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(/^./,r=>r.toUpperCase()):""}const ee={"&":"&","<":"<",">":">",'"':""","'":"'"};function te(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>ee[r]):t}function ne(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function re(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:S(e)?e:{[t]:e,enabled:!0}}function oe(e){return e==null?[]:Array.isArray(e)?e:[e]}const ie=Object.freeze(new Set(["__proto__","constructor","prototype"]));function W(e,t){if(!S(e))return S(t)?{...t}:t;if(!S(t))return t===void 0?e:t;const r={...e};for(const d of Object.keys(t)){if(ie.has(d))continue;const k=t[d];k!==void 0&&(r[d]=S(k)&&S(r[d])?W(r[d],k):k)}return r}function ae(e,t){if(!S(e)||!S(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class se{#e;#t=new Map;#n;constructor(t=256,r=null){this.#e=t,this.#n=r}get size(){return this.#t.size}get max(){return this.#e}set max(t){this.#e=t,this.#r()}has(t){return this.#t.has(t)}get(t){const r=this.#t;if(!r.has(t))return;const d=r.get(t);return r.delete(t),r.set(t,d),d}peek(t){return this.#t.get(t)}set(t,r){const d=this.#t;return d.has(t)&&d.delete(t),d.set(t,r),this.#r(),r}delete(t){const r=this.#t.get(t);return this.#t.delete(t)&&this.#n&&this.#n(r,t),r}clear(){if(this.#n)for(const[t,r]of this.#t)this.#n(r,t);this.#t.clear()}keys(){return this.#t.keys()}values(){return this.#t.values()}#r(){const t=this.#t;for(;t.size>this.#e;){const r=t.keys().next().value,d=t.get(r);t.delete(r),this.#n&&this.#n(d,r)}}}const G=new Map;function ue(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let d=G.get(r);return d||(d=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),G.set(r,d)),d}function ce(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),d=String(t);return r<d?-1:r>d?1:0}function V(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const B=typeof requestAnimationFrame=="function";function q(e){return B?requestAnimationFrame(e):setTimeout(()=>e(V()),16)}function K(e){e!=null&&(B?cancelAnimationFrame(e):clearTimeout(e))}function le(e){let t=null,r=null;const d=()=>{t=null;const A=r;r=null,e(...A||[])},k=(...A)=>{r=A,t===null&&(t=q(d))};return k.cancel=()=>{K(t),t=null,r=null},k.flush=()=>{t!==null&&(K(t),d())},k}function de(e,t){let r=null,d=null;const k=()=>{if(r=null,d===null)return;const C=d;d=null,e(...C),A()},A=()=>{r=setTimeout(k,t),typeof r?.unref=="function"&&r.unref()},N=(...C)=>{r===null?(e(...C),A()):(d=C,clearTimeout(r),A())};return N.flush=()=>{if(r!==null&&clearTimeout(r),r=null,d===null)return;const C=d;d=null,e(...C)},N.cancel=()=>{r!==null&&clearTimeout(r),r=null,d=null},N.pending=()=>r!==null||d!==null,N}function fe(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let me=0;function pe(e="l"){return`${e}${(++me).toString(36)}`}}),T("packages/modules/dhtmlx-compat/util.js",function(s,w){"use strict";Object.defineProperty(s,"reportUntranslated",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"indexOfKey",{enumerable:!0,get:function(){return h}}),Object.defineProperty(s,"rowsFrom",{enumerable:!0,get:function(){return P}}),Object.defineProperty(s,"rowShape",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"columnShape",{enumerable:!0,get:function(){return u}});const O=w("packages/core/src/internal/util.js").warnOnce;function p(a,f,o){if(!(!a||typeof a!="object"))for(const i of Object.keys(a))f.has(i)||O(`dhtmlx.${o}.dropped:${i}`,`dhtmlx-compat does not translate the ${o} key '${i}', so it has no effect. Nothing was applied for it.`)}function h(a,f){const o=a.rows.count();for(let i=0;i<o;i++){const c=a.rows.get(i);if(c&&c.key===f)return i}return-1}function P(a){return Array.isArray(a)?a:a&&typeof a=="object"&&Array.isArray(a.data)?a.data:[]}function m(a,f){const o=a.rows.byKey(f);return{...o?o.data:void 0,id:f}}function u(a,f){return{id:f}}}),T("packages/modules/dhtmlx-compat/columns.js",function(s,w){"use strict";Object.defineProperty(s,"translateColumn",{enumerable:!0,get:function(){return c}}),Object.defineProperty(s,"translateColumns",{enumerable:!0,get:function(){return y}});const O=w("packages/core/src/internal/util.js").warnOnce,h=Q("@toclocoinc/lattice-grid").sanitiseHtml;if(typeof h>"u")throw new Error("[lattice] dhtmlx-compat needs sanitiseHtml from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const m=w("packages/modules/dhtmlx-compat/util.js").reportUntranslated,u=new Set(["id","header","type","width","minWidth","maxWidth","resizable","hidden","draggable","align","tooltip","tooltipTemplate","template","htmlEnable","sortable","editable","editorType","editorConfig","options","summary"]),a=Object.freeze({input:"text",select:"select",combobox:"select",textarea:"textarea",multiselect:"multiSelect",datePicker:"date",checkbox:"checkbox"}),f=Object.freeze({number:"number",date:"date"});function o(n){if(typeof n=="string")return n;if(Array.isArray(n)&&n.length>0){n.length>1&&O("dhtmlx.header.multirow",`dhtmlx-compat collapsed a ${n.length}-row header to its first row. Lattice titles are a single string; the remaining rows were not applied.`);const l=n[0];if(typeof l=="string")return l;if(l&&typeof l=="object"&&typeof l.text=="string")return l.text}}function i(n,l){return(g,R)=>{const E={...R.data||{},id:R.row?R.row.key:void 0},S=n(R.value,E,{id:R.colId});l?g.innerHTML=h(String(S)):g.textContent=String(S)}}function c(n){if(!n||typeof n!="object"||!n.id)throw new TypeError("dhtmlx-compat: every column needs an id.");m(n,u,"column");const l={id:n.id,field:n.id},g=o(n.header);if(g!==void 0&&(l.title=g),n.type!==void 0){const S=f[n.type];S&&(l.type=S)}if((n.width!==void 0||n.minWidth!==void 0||n.maxWidth!==void 0||n.resizable!==void 0||n.hidden!==void 0||n.draggable!==void 0)&&(l.layout={},n.width!==void 0&&(l.layout.width=n.width),n.minWidth!==void 0&&(l.layout.min=n.minWidth),n.maxWidth!==void 0&&(l.layout.max=n.maxWidth),n.resizable!==void 0&&(l.layout.resizable=!!n.resizable),n.hidden!==void 0&&(l.layout.hidden=!!n.hidden),n.draggable!==void 0&&(l.layout.movable=!!n.draggable)),n.align!==void 0&&(l.cell={...l.cell||{},align:n.align}),(n.tooltipTemplate!==void 0||n.tooltip!==void 0)&&(l.cell={...l.cell||{},tooltip:n.tooltipTemplate||n.tooltip}),typeof n.template=="function"&&(l.cell={...l.cell||{},render:i(n.template,!!n.htmlEnable)}),n.sortable!==void 0&&(l.sort={enabled:!!n.sortable}),n.editable!==void 0||n.editorType!==void 0||n.editorConfig!==void 0||n.options!==void 0){if(l.edit={enabled:n.editable!==!1},n.editorType!==void 0){const S=a[n.editorType];S||O(`dhtmlx.editorType.unknown:${String(n.editorType)}`,`dhtmlx-compat does not recognise editorType '${String(n.editorType)}'; the default text editor was used instead.`),l.edit.editor=S||"text"}(n.editorConfig!==void 0||n.options!==void 0)&&(l.edit.props={...n.editorConfig||{}},n.options!==void 0&&(l.edit.props.options=n.options))}return n.summary!==void 0&&(l.total=n.summary),l}function y(n){return Array.isArray(n)?n.map(c):[]}}),T("packages/modules/dhtmlx-compat/data.js",function(s,w){"use strict";Object.defineProperty(s,"createData",{enumerable:!0,get:function(){return P}});const b=w("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowsFrom;function h(m){return m.get("rowKey")}function P(m){return{add(u,a){const f=a===void 0?{add:[u]}:{add:[u],at:a},o=m.rows.apply(f);if(o&&o.rejected&&o.rejected.length)throw new Error(`dhtmlx-compat: data.add() was rejected: ${JSON.stringify(o.rejected[0])}.`);return u[h(m)]},update(u,a){m.rows.apply({update:[{...a,[h(m)]:u}]})},remove(u){m.rows.apply({remove:Array.isArray(u)?u:[u]})},removeAll(){m.rows.load([])},parse(u){m.rows.load(p(u))},async load(u,a){const o=await(await fetch(u)).json();m.rows.load(p(o)),typeof a=="function"&&a()},find(u){const a=m.rows.byKey(u);return a?a.data:void 0},findAll(u){const a=[];return m.rows.forEachAll(f=>{u(f.data)&&a.push(f.data)}),a},exists(u){return m.rows.byKey(u)!==void 0&&m.rows.byKey(u)!==null},getItem(u){const a=m.rows.byKey(u);return a?a.data:void 0},serialize(){return m.rows.data()},getId(u){const a=m.rows.get(u);return a?a.key:void 0},getIndex(u){return O(m,u)},getLength(){return m.rows.count()},forEach(u){m.rows.forEach((a,f)=>u(a.data,f))},sort(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.sort(fn) is not supported: Lattice sorts by column, not a comparator. Pass a column id, or { by, dir }.");const a=Array.isArray(u)?u:[u];m.sort.set(a.map(f=>typeof f=="string"?{col:f,dir:"asc"}:{col:f.by,dir:f.dir||"asc"}))},filter(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.filter(fn) is not supported: Lattice filters are a declarative condition tree, not a predicate. Pass { col, op, value } instead.");m.filters.set(u)},resetFilter(){m.filters.clear()}}}}),T("packages/modules/dhtmlx-compat/selection.js",function(s,w){"use strict";Object.defineProperty(s,"createSelection",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"createRangeSelection",{enumerable:!0,get:function(){return f}});const b=w("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowShape,h=b.columnShape;function P(o){return o&&typeof o=="object"&&"id"in o?o.id:o}function m(o){return{setCell(i,c,y,n){const l=O(o,P(i));if(l===-1)return;const g=P(c);if(n){o.selection.extendRange(l,g);return}o.selection.startRange(l,g,{additive:!!y})},getCell(){const i=o.selection.cells();if(i.length)return{row:p(o,i[0].key),column:h(o,i[0].colId)}},getCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},isSelectedCell(i,c){const y=O(o,P(i));return y===-1?!1:o.selection.inRange(y,P(c))},removeCell(){o.selection.clearRange()},enable(){},disable(){o.selection.clearRange()}}}function u(o,i){const c=Math.min(o.start.row,o.end.row),y=Math.max(o.start.row,o.end.row),n=i.columns.visible().map(I=>I.id),l=n.indexOf(o.start.column),g=n.indexOf(o.end.column),R=Math.min(l,g),E=Math.max(l,g),S=R===-1||E===-1?[o.start.column]:n.slice(R,E+1);return{startRow:c,endRow:y,columns:S}}function a(o){return{start:{row:o.startRow,column:o.columns[0]},end:{row:o.endRow,column:o.columns[o.columns.length-1]}}}function f(o){return{setRange(i){o.selection.setRange(u(i,o))},getRange(){const i=o.selection.ranges();if(i.length)return a(i[i.length-1])},getRangedCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},resetRange(){o.selection.clearRange()},isRanged(){return o.selection.ranges().length>0},enable(){},disable(){o.selection.clearRange()},isDisabled(){return!1}}}}),T("packages/modules/dhtmlx-compat/passthrough.js",function(s,w){"use strict";Object.defineProperty(s,"createHistory",{enumerable:!0,get:function(){return b}}),Object.defineProperty(s,"createExport",{enumerable:!0,get:function(){return O}});function b(p){return{undo(){return p.history.undo()},redo(){return p.history.redo()},canUndo(){return p.history.canUndo()},canRedo(){return p.history.canRedo()},clear(){p.history.clear()},removeAll(){p.history.clear()},getHistory(){return p.history.list()}}}function O(p){return{csv(h){return p.export.csv(h)},xlsx(h){return p.export.excel(h)},pdf(){throw new Error("dhtmlx-compat: export.pdf() is not supported: Lattice has no PDF export. export.csv()/export.xlsx() work, or use the browser's own print-to-PDF via grid.export.print().")},png(){throw new Error("dhtmlx-compat: export.png() is not supported: Lattice has no raster export.")}}}}),T("packages/modules/dhtmlx-compat/events.js",function(s,w){"use strict";Object.defineProperty(s,"createEvents",{enumerable:!0,get:function(){return o}});const b=w("packages/modules/dhtmlx-compat/util.js"),O=b.rowShape,p=b.columnShape;function h(i,c){return[O(c,i.key),p(c,i.colId),i.event]}function P(i,c){const y=i.column&&i.column.edit?i.column.edit.editor:void 0;return[O(c,i.key),p(c,i.colId),y]}function m(i,c){return[i.value,O(c,i.key),p(c,i.colId)]}function u(i,c){const y=i.sort&&i.sort[0];return y?[p(c,y.col),y.dir]:null}function a(i,c){let y,n;if(i.key!==void 0)y=[i.key],n=i.to;else{const g=c.get("rowKey");y=(Array.isArray(i.data)?i.data:[i.data]).map(E=>E&&E[g]),n=i.at}const l=n!==void 0?c.rows.get(n):void 0;return[{start:y[0],source:y,target:l?l.key:void 0},void 0]}const f=Object.freeze({cellClick:{latticeNames:["cell:clicked"],reshape:h},cellDblClick:{latticeNames:["cell:dblclicked"],reshape:h},cellRightClick:{latticeNames:["cell:contextmenu"],reshape:h},afterEditStart:{latticeNames:["cell:edit:start"],reshape:P},afterEditEnd:{latticeNames:["cell:changed"],reshape:m},afterSort:{latticeNames:["sort:changed"],reshape:u},filterChange:{latticeNames:["filter:changed"]},afterColumnDrop:{latticeNames:["column:moved"]},afterResizeEnd:{latticeNames:["column:resized"]},resize:{latticeNames:["column:resized"]},afterColumnHide:{latticeNames:["column:visible"]},afterColumnShow:{latticeNames:["column:visible"]},afterExpand:{latticeNames:["group:toggled"]},afterCollapse:{latticeNames:["group:toggled"]},afterSelect:{latticeNames:["range:changed"]},afterUnSelect:{latticeNames:["range:changed"]},afterSetRange:{latticeNames:["range:changed"]},afterResetRange:{latticeNames:["range:changed"]},afterAdd:{latticeNames:["history:changed"]},afterUndo:{latticeNames:["history:applied"]},afterRedo:{latticeNames:["history:applied"]},afterCopy:{latticeNames:["clipboard:copy"]},scroll:{latticeNames:["scroll"]},afterRowDrop:{latticeNames:["row:moved","row:received"],reshape:a}});function o(i){const c=new Set;return{on(y,n){const l=f[y];if(!l)return c.has(y)||(c.add(y),console.warn(`dhtmlx-compat: "${y}" has no Lattice equivalent and will never fire.`)),()=>{};const g=l.latticeNames.map(R=>i.on(R,E=>{if(!l.reshape){n(E);return}const S=l.reshape(E,i);S&&n(...S)}));return()=>{for(const R of g)R()}}}}}),T("packages/modules/dhtmlx-compat/rows.js",function(s,w){"use strict";Object.defineProperty(s,"createRowVisibility",{enumerable:!0,get:function(){return b}});function b(O){const p=new Set,h={active:()=>p.size>0,passes:u=>!(u&&p.has(String(u.key)))};let P=!1;function m(){P||(P=!0),O.set("hostFilter",h)}return{hideRow(u){const a=String(u);p.has(a)||(p.add(a),m())},showRow(u){const a=String(u);p.delete(a)&&m()},isRowHidden(u){return p.has(String(u))},hiddenRows(){return[...p]}}}}),T("packages/modules/dhtmlx-compat/spans.js",function(s,w){"use strict";Object.defineProperty(s,"createSpans",{enumerable:!0,get:function(){return u}});const O=w("packages/core/src/internal/util.js").warnOnce,p=new Set(["row","column","rowspan","colspan"]);function h(a,f){return`${String(a)}|${String(f)}`}function P(a,f,o,i){if(a&&typeof a=="object"){for(const c of Object.keys(a))p.has(c)||O(`dhtmlx.span.dropped:${c}`,`dhtmlx-compat does not translate the span key '${c}', so it has no effect. Lattice spans carry only geometry (rowspan/colspan); the cell's value, css and tooltip come from its own column, not the span.`);return{row:a.row,column:a.column,rows:Math.max(1,Math.floor(Number(a.rowspan)||1)),cols:Math.max(1,Math.floor(Number(a.colspan)||1))}}return{row:a,column:f,rows:Math.max(1,Math.floor(Number(o)||1)),cols:Math.max(1,Math.floor(Number(i)||1))}}function m(a,f){return a.map(o=>({...o,cell:{...o.cell||{},spanColumns:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.cols:1},spanRows:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.rows:1}}}))}function u(a){const f=new Map;let o=!1;function i(){const c=o?a.get("columns"):m(a.get("columns"),f);o=!0,a.set("columns",c)}return{addSpan(c,y,n,l){const g=P(c,y,n,l);if(g.row===void 0||g.column===void 0)throw new TypeError("dhtmlx-compat: addSpan needs a row and a column.");if(g.rows<=1&&g.cols<=1){this.removeSpan(g.row,g.column);return}f.set(h(g.row,g.column),{rows:g.rows,cols:g.cols}),i()},removeSpan(c,y){f.delete(h(c,y))&&i()},getSpan(c,y){const n=f.get(h(c,y));if(n)return{rowspan:n.rows,colspan:n.cols}},spanCount(){return f.size}}}}),T("packages/modules/dhtmlx-compat/index.js",function(s,w){"use strict";Object.defineProperty(s,"Grid",{enumerable:!0,get:function(){return L}}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return M}});const O=Q("@toclocoinc/lattice-grid").createGrid;if(typeof O>"u")throw new Error("[lattice] dhtmlx-compat needs createGrid from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const h=w("packages/modules/dhtmlx-compat/columns.js").translateColumns,m=w("packages/modules/dhtmlx-compat/data.js").createData,u=w("packages/modules/dhtmlx-compat/selection.js"),a=u.createSelection,f=u.createRangeSelection,o=w("packages/modules/dhtmlx-compat/passthrough.js"),i=o.createHistory,c=o.createExport,n=w("packages/modules/dhtmlx-compat/events.js").createEvents,g=w("packages/modules/dhtmlx-compat/rows.js").createRowVisibility,E=w("packages/modules/dhtmlx-compat/spans.js").createSpans,S=w("packages/modules/dhtmlx-compat/util.js"),I=S.rowsFrom,H=S.reportUntranslated,D=new Set(["rowKey","columns","data","autoHeight","rowHeight","headerRowHeight","multiselection","dragItem","rowTransfer"]);function z(x){H(x,D,"config");const j={rowKey:x.rowKey||"id"};return x.columns!==void 0&&(j.columns=h(x.columns)),x.data!==void 0&&(j.rows=I(x.data)),x.autoHeight!==void 0&&(j.autoHeight=x.autoHeight),x.rowHeight!==void 0&&(j.rowHeight=x.rowHeight),x.headerRowHeight!==void 0&&(j.headerHeight=x.headerRowHeight),x.multiselection&&(j.selection="multiple"),x.dragItem==="row"&&(j.rowReorder=!0),x.rowTransfer!==void 0&&(j.rowTransfer=x.rowTransfer),j}class L{#e;#t;#n;constructor(j,v={}){this.#e=O(j,z(v)),this.data=m(this.#e),this.selection=a(this.#e),this.rangeSelection=f(this.#e),this.history=i(this.#e),this.export=c(this.#e),this.events=n(this.#e),this.#t=g(this.#e),this.#n=E(this.#e)}get lattice(){return this.#e}hideRow(j){this.#t.hideRow(j)}showRow(j){this.#t.showRow(j)}isRowHidden(j){return this.#t.isRowHidden(j)}addSpan(j,v,F,$){this.#n.addSpan(j,v,F,$)}removeSpan(j,v){this.#n.removeSpan(j,v)}getSpan(j,v){return this.#n.getSpan(j,v)}setColumns(j){if(j===void 0)return this.#e.get("columns");this.#e.set("columns",h(j))}destructor(){this.#e.destroy()}}const M=L});const X=Y("packages/modules/dhtmlx-compat/index.js"),ye=X.Grid;var we=X.default;export{ye as Grid,we as default};
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=dhtmlx-compat.esm.min.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.88.
|
|
2
|
+
* Lattice Grid 1.88.3, dhtmlx-compat module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
|
-
(function(D){"use strict";var B=Object.create(null),q=Object.create(null);function C(s,g){B[s]=g}function J(s){var g=q[s];if(g)return g;var b=Object.create(null);q[s]=b;var O=B[s];if(!O)throw new Error("[lattice] missing module: "+s);return O(b,J),b}var Z=Object.create(null);Z["@toclocoinc/lattice-grid"]=D.LatticeGrid||null;function Y(s){var g=Z[s],b=typeof globalThis<"u"?globalThis:typeof self<"u"?self:null;if(g)return g;if(s==="@toclocoinc/lattice-grid"&&b&&b.LatticeGrid)return b.LatticeGrid;throw new Error("[lattice] this module shares the Lattice core with the page, but it was not found. Load lattice-grid (or its script build) before this module. Missing: "+s)}C("packages/core/src/internal/util.js",function(s,g){"use strict";Object.defineProperty(s,"VERSION",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"reportedWarnings",{enumerable:!0,get:function(){return i}}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return y}}),Object.defineProperty(s,"infoOnce",{enumerable:!0,get:function(){return n}}),Object.defineProperty(s,"resetWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(s,"fail",{enumerable:!0,get:function(){return w}}),Object.defineProperty(s,"invariant",{enumerable:!0,get:function(){return R}}),Object.defineProperty(s,"DEV",{enumerable:!0,get:function(){return E}}),Object.defineProperty(s,"isObject",{enumerable:!0,get:function(){return S}}),Object.defineProperty(s,"isFunction",{enumerable:!0,get:function(){return I}}),Object.defineProperty(s,"isNil",{enumerable:!0,get:function(){return F}}),Object.defineProperty(s,"isBlank",{enumerable:!0,get:function(){return $}}),Object.defineProperty(s,"isCtor",{enumerable:!0,get:function(){return K}}),Object.defineProperty(s,"pathGetter",{enumerable:!0,get:function(){return H}}),Object.defineProperty(s,"pathSetter",{enumerable:!0,get:function(){return j}}),Object.defineProperty(s,"getPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(s,"setPath",{enumerable:!0,get:function(){return G}}),Object.defineProperty(s,"humanise",{enumerable:!0,get:function(){return U}}),Object.defineProperty(s,"escapeHtml",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(s,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(s,"expand",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(s,"toArray",{enumerable:!0,get:function(){return se}}),Object.defineProperty(s,"merge",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(s,"mergeRow",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(s,"Lru",{enumerable:!0,get:function(){return le}}),Object.defineProperty(s,"collator",{enumerable:!0,get:function(){return de}}),Object.defineProperty(s,"defaultCompare",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(s,"now",{enumerable:!0,get:function(){return _}}),Object.defineProperty(s,"nextFrame",{enumerable:!0,get:function(){return te}}),Object.defineProperty(s,"cancelFrame",{enumerable:!0,get:function(){return W}}),Object.defineProperty(s,"frameBatched",{enumerable:!0,get:function(){return me}}),Object.defineProperty(s,"settleDebounce",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(s,"whenIdle",{enumerable:!0,get:function(){return he}}),Object.defineProperty(s,"uid",{enumerable:!0,get:function(){return ge}});const b="1.88.2";async function O(){return b}const p="1.88.2",h=new Set,P=2e3;function m(e){if(h.add(e),h.size>P){const t=h.values().next().value;t!==void 0&&h.delete(t)}}const u=[],a=500;function f(e,t,r){u.push({key:e,level:t,message:r.map(d=>typeof d=="string"?d:o(d)).join(" "),at:Date.now()}),u.length>a&&u.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function i(){return u.map(e=>({...e}))}function c(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function y(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"warn",r),console.warn("[lattice]",...r)}function n(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"info",r),console.info("[lattice]",...r)}function l(){h.clear(),u.length=0}function w(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function R(e,t){e||w(t)}const E=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function S(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function I(e){return typeof e=="function"}function F(e){return e==null}function $(e){return e==null||e===""}function K(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const L=new Map;function H(e){let t=L.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),d=r.length;t=k=>{let A=k;for(let N=0;N<d;N++){if(A==null)return;A=A[r[N]]}return A}}return L.set(e,t),t}const x=new Map;function j(e){let t=x.get(e);if(t)return t;if(!e.includes("."))t=(r,d)=>{r!=null&&(r[e]=d)};else{const r=e.split("."),d=r.length-1;t=(k,A)=>{let N=k;for(let T=0;T<d;T++){if(N==null)return;const V=r[T];N[V]==null&&(N[V]={}),N=N[V]}N!=null&&(N[r[d]]=A)}}return x.set(e,t),t}function v(e,t){return H(t)(e)}function G(e,t,r){j(t)(e,r)}function U(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).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(/^./,r=>r.toUpperCase()):""}const re={"&":"&","<":"<",">":">",'"':""","'":"'"};function oe(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>re[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ae(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:S(e)?e:{[t]:e,enabled:!0}}function se(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function Q(e,t){if(!S(e))return S(t)?{...t}:t;if(!S(t))return t===void 0?e:t;const r={...e};for(const d of Object.keys(t)){if(ue.has(d))continue;const k=t[d];k!==void 0&&(r[d]=S(k)&&S(r[d])?Q(r[d],k):k)}return r}function ce(e,t){if(!S(e)||!S(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class le{#e;#t=new Map;#n;constructor(t=256,r=null){this.#e=t,this.#n=r}get size(){return this.#t.size}get max(){return this.#e}set max(t){this.#e=t,this.#r()}has(t){return this.#t.has(t)}get(t){const r=this.#t;if(!r.has(t))return;const d=r.get(t);return r.delete(t),r.set(t,d),d}peek(t){return this.#t.get(t)}set(t,r){const d=this.#t;return d.has(t)&&d.delete(t),d.set(t,r),this.#r(),r}delete(t){const r=this.#t.get(t);return this.#t.delete(t)&&this.#n&&this.#n(r,t),r}clear(){if(this.#n)for(const[t,r]of this.#t)this.#n(r,t);this.#t.clear()}keys(){return this.#t.keys()}values(){return this.#t.values()}#r(){const t=this.#t;for(;t.size>this.#e;){const r=t.keys().next().value,d=t.get(r);t.delete(r),this.#n&&this.#n(d,r)}}}const X=new Map;function de(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let d=X.get(r);return d||(d=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),X.set(r,d)),d}function fe(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),d=String(t);return r<d?-1:r>d?1:0}function _(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const ee=typeof requestAnimationFrame=="function";function te(e){return ee?requestAnimationFrame(e):setTimeout(()=>e(_()),16)}function W(e){e!=null&&(ee?cancelAnimationFrame(e):clearTimeout(e))}function me(e){let t=null,r=null;const d=()=>{t=null;const A=r;r=null,e(...A||[])},k=(...A)=>{r=A,t===null&&(t=te(d))};return k.cancel=()=>{W(t),t=null,r=null},k.flush=()=>{t!==null&&(W(t),d())},k}function pe(e,t){let r=null,d=null;const k=()=>{if(r=null,d===null)return;const T=d;d=null,e(...T),A()},A=()=>{r=setTimeout(k,t),typeof r?.unref=="function"&&r.unref()},N=(...T)=>{r===null?(e(...T),A()):(d=T,clearTimeout(r),A())};return N.flush=()=>{if(r!==null&&clearTimeout(r),r=null,d===null)return;const T=d;d=null,e(...T)},N.cancel=()=>{r!==null&&clearTimeout(r),r=null,d=null},N.pending=()=>r!==null||d!==null,N}function he(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let ye=0;function ge(e="l"){return`${e}${(++ye).toString(36)}`}}),C("packages/modules/dhtmlx-compat/util.js",function(s,g){"use strict";Object.defineProperty(s,"reportUntranslated",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"indexOfKey",{enumerable:!0,get:function(){return h}}),Object.defineProperty(s,"rowsFrom",{enumerable:!0,get:function(){return P}}),Object.defineProperty(s,"rowShape",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"columnShape",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce;function p(a,f,o){if(!(!a||typeof a!="object"))for(const i of Object.keys(a))f.has(i)||O(`dhtmlx.${o}.dropped:${i}`,`dhtmlx-compat does not translate the ${o} key '${i}', so it has no effect. Nothing was applied for it.`)}function h(a,f){const o=a.rows.count();for(let i=0;i<o;i++){const c=a.rows.get(i);if(c&&c.key===f)return i}return-1}function P(a){return Array.isArray(a)?a:a&&typeof a=="object"&&Array.isArray(a.data)?a.data:[]}function m(a,f){const o=a.rows.byKey(f);return{...o?o.data:void 0,id:f}}function u(a,f){return{id:f}}}),C("packages/modules/dhtmlx-compat/columns.js",function(s,g){"use strict";Object.defineProperty(s,"translateColumn",{enumerable:!0,get:function(){return c}}),Object.defineProperty(s,"translateColumns",{enumerable:!0,get:function(){return y}});const O=g("packages/core/src/internal/util.js").warnOnce,h=Y("@toclocoinc/lattice-grid").sanitiseHtml;if(typeof h>"u")throw new Error("[lattice] dhtmlx-compat needs sanitiseHtml from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const m=g("packages/modules/dhtmlx-compat/util.js").reportUntranslated,u=new Set(["id","header","type","width","minWidth","maxWidth","resizable","hidden","draggable","align","tooltip","tooltipTemplate","template","htmlEnable","sortable","editable","editorType","editorConfig","options","summary"]),a=Object.freeze({input:"text",select:"select",combobox:"select",textarea:"textarea",multiselect:"multiSelect",datePicker:"date",checkbox:"checkbox"}),f=Object.freeze({number:"number",date:"date"});function o(n){if(typeof n=="string")return n;if(Array.isArray(n)&&n.length>0){n.length>1&&O("dhtmlx.header.multirow",`dhtmlx-compat collapsed a ${n.length}-row header to its first row. Lattice titles are a single string; the remaining rows were not applied.`);const l=n[0];if(typeof l=="string")return l;if(l&&typeof l=="object"&&typeof l.text=="string")return l.text}}function i(n,l){return(w,R)=>{const E={...R.data||{},id:R.row?R.row.key:void 0},S=n(R.value,E,{id:R.colId});l?w.innerHTML=h(String(S)):w.textContent=String(S)}}function c(n){if(!n||typeof n!="object"||!n.id)throw new TypeError("dhtmlx-compat: every column needs an id.");m(n,u,"column");const l={id:n.id,field:n.id},w=o(n.header);if(w!==void 0&&(l.title=w),n.type!==void 0){const S=f[n.type];S&&(l.type=S)}if((n.width!==void 0||n.minWidth!==void 0||n.maxWidth!==void 0||n.resizable!==void 0||n.hidden!==void 0||n.draggable!==void 0)&&(l.layout={},n.width!==void 0&&(l.layout.width=n.width),n.minWidth!==void 0&&(l.layout.min=n.minWidth),n.maxWidth!==void 0&&(l.layout.max=n.maxWidth),n.resizable!==void 0&&(l.layout.resizable=!!n.resizable),n.hidden!==void 0&&(l.layout.hidden=!!n.hidden),n.draggable!==void 0&&(l.layout.movable=!!n.draggable)),n.align!==void 0&&(l.cell={...l.cell||{},align:n.align}),(n.tooltipTemplate!==void 0||n.tooltip!==void 0)&&(l.cell={...l.cell||{},tooltip:n.tooltipTemplate||n.tooltip}),typeof n.template=="function"&&(l.cell={...l.cell||{},render:i(n.template,!!n.htmlEnable)}),n.sortable!==void 0&&(l.sort={enabled:!!n.sortable}),n.editable!==void 0||n.editorType!==void 0||n.editorConfig!==void 0||n.options!==void 0){if(l.edit={enabled:n.editable!==!1},n.editorType!==void 0){const S=a[n.editorType];S||O(`dhtmlx.editorType.unknown:${String(n.editorType)}`,`dhtmlx-compat does not recognise editorType '${String(n.editorType)}'; the default text editor was used instead.`),l.edit.editor=S||"text"}(n.editorConfig!==void 0||n.options!==void 0)&&(l.edit.props={...n.editorConfig||{}},n.options!==void 0&&(l.edit.props.options=n.options))}return n.summary!==void 0&&(l.total=n.summary),l}function y(n){return Array.isArray(n)?n.map(c):[]}}),C("packages/modules/dhtmlx-compat/data.js",function(s,g){"use strict";Object.defineProperty(s,"createData",{enumerable:!0,get:function(){return P}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowsFrom;function h(m){return m.get("rowKey")}function P(m){return{add(u,a){const f=a===void 0?{add:[u]}:{add:[u],at:a},o=m.rows.apply(f);if(o&&o.rejected&&o.rejected.length)throw new Error(`dhtmlx-compat: data.add() was rejected: ${JSON.stringify(o.rejected[0])}.`);return u[h(m)]},update(u,a){m.rows.apply({update:[{...a,[h(m)]:u}]})},remove(u){m.rows.apply({remove:Array.isArray(u)?u:[u]})},removeAll(){m.rows.load([])},parse(u){m.rows.load(p(u))},async load(u,a){const o=await(await fetch(u)).json();m.rows.load(p(o)),typeof a=="function"&&a()},find(u){const a=m.rows.byKey(u);return a?a.data:void 0},findAll(u){const a=[];return m.rows.forEachAll(f=>{u(f.data)&&a.push(f.data)}),a},exists(u){return m.rows.byKey(u)!==void 0&&m.rows.byKey(u)!==null},getItem(u){const a=m.rows.byKey(u);return a?a.data:void 0},serialize(){return m.rows.data()},getId(u){const a=m.rows.get(u);return a?a.key:void 0},getIndex(u){return O(m,u)},getLength(){return m.rows.count()},forEach(u){m.rows.forEach((a,f)=>u(a.data,f))},sort(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.sort(fn) is not supported: Lattice sorts by column, not a comparator. Pass a column id, or { by, dir }.");const a=Array.isArray(u)?u:[u];m.sort.set(a.map(f=>typeof f=="string"?{col:f,dir:"asc"}:{col:f.by,dir:f.dir||"asc"}))},filter(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.filter(fn) is not supported: Lattice filters are a declarative condition tree, not a predicate. Pass { col, op, value } instead.");m.filters.set(u)},resetFilter(){m.filters.clear()}}}}),C("packages/modules/dhtmlx-compat/selection.js",function(s,g){"use strict";Object.defineProperty(s,"createSelection",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"createRangeSelection",{enumerable:!0,get:function(){return f}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowShape,h=b.columnShape;function P(o){return o&&typeof o=="object"&&"id"in o?o.id:o}function m(o){return{setCell(i,c,y,n){const l=O(o,P(i));if(l===-1)return;const w=P(c);if(n){o.selection.extendRange(l,w);return}o.selection.startRange(l,w,{additive:!!y})},getCell(){const i=o.selection.cells();if(i.length)return{row:p(o,i[0].key),column:h(o,i[0].colId)}},getCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},isSelectedCell(i,c){const y=O(o,P(i));return y===-1?!1:o.selection.inRange(y,P(c))},removeCell(){o.selection.clearRange()},enable(){},disable(){o.selection.clearRange()}}}function u(o,i){const c=Math.min(o.start.row,o.end.row),y=Math.max(o.start.row,o.end.row),n=i.columns.visible().map(I=>I.id),l=n.indexOf(o.start.column),w=n.indexOf(o.end.column),R=Math.min(l,w),E=Math.max(l,w),S=R===-1||E===-1?[o.start.column]:n.slice(R,E+1);return{startRow:c,endRow:y,columns:S}}function a(o){return{start:{row:o.startRow,column:o.columns[0]},end:{row:o.endRow,column:o.columns[o.columns.length-1]}}}function f(o){return{setRange(i){o.selection.setRange(u(i,o))},getRange(){const i=o.selection.ranges();if(i.length)return a(i[i.length-1])},getRangedCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},resetRange(){o.selection.clearRange()},isRanged(){return o.selection.ranges().length>0},enable(){},disable(){o.selection.clearRange()},isDisabled(){return!1}}}}),C("packages/modules/dhtmlx-compat/passthrough.js",function(s,g){"use strict";Object.defineProperty(s,"createHistory",{enumerable:!0,get:function(){return b}}),Object.defineProperty(s,"createExport",{enumerable:!0,get:function(){return O}});function b(p){return{undo(){return p.history.undo()},redo(){return p.history.redo()},canUndo(){return p.history.canUndo()},canRedo(){return p.history.canRedo()},clear(){p.history.clear()},removeAll(){p.history.clear()},getHistory(){return p.history.list()}}}function O(p){return{csv(h){return p.export.csv(h)},xlsx(h){return p.export.excel(h)},pdf(){throw new Error("dhtmlx-compat: export.pdf() is not supported: Lattice has no PDF export. export.csv()/export.xlsx() work, or use the browser's own print-to-PDF via grid.export.print().")},png(){throw new Error("dhtmlx-compat: export.png() is not supported: Lattice has no raster export.")}}}}),C("packages/modules/dhtmlx-compat/events.js",function(s,g){"use strict";Object.defineProperty(s,"createEvents",{enumerable:!0,get:function(){return o}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.rowShape,p=b.columnShape;function h(i,c){return[O(c,i.key),p(c,i.colId),i.event]}function P(i,c){const y=i.column&&i.column.edit?i.column.edit.editor:void 0;return[O(c,i.key),p(c,i.colId),y]}function m(i,c){return[i.value,O(c,i.key),p(c,i.colId)]}function u(i,c){const y=i.sort&&i.sort[0];return y?[p(c,y.col),y.dir]:null}function a(i,c){let y,n;if(i.key!==void 0)y=[i.key],n=i.to;else{const w=c.get("rowKey");y=(Array.isArray(i.data)?i.data:[i.data]).map(E=>E&&E[w]),n=i.at}const l=n!==void 0?c.rows.get(n):void 0;return[{start:y[0],source:y,target:l?l.key:void 0},void 0]}const f=Object.freeze({cellClick:{latticeNames:["cell:clicked"],reshape:h},cellDblClick:{latticeNames:["cell:dblclicked"],reshape:h},cellRightClick:{latticeNames:["cell:contextmenu"],reshape:h},afterEditStart:{latticeNames:["cell:edit:start"],reshape:P},afterEditEnd:{latticeNames:["cell:changed"],reshape:m},afterSort:{latticeNames:["sort:changed"],reshape:u},filterChange:{latticeNames:["filter:changed"]},afterColumnDrop:{latticeNames:["column:moved"]},afterResizeEnd:{latticeNames:["column:resized"]},resize:{latticeNames:["column:resized"]},afterColumnHide:{latticeNames:["column:visible"]},afterColumnShow:{latticeNames:["column:visible"]},afterExpand:{latticeNames:["group:toggled"]},afterCollapse:{latticeNames:["group:toggled"]},afterSelect:{latticeNames:["range:changed"]},afterUnSelect:{latticeNames:["range:changed"]},afterSetRange:{latticeNames:["range:changed"]},afterResetRange:{latticeNames:["range:changed"]},afterAdd:{latticeNames:["history:changed"]},afterUndo:{latticeNames:["history:applied"]},afterRedo:{latticeNames:["history:applied"]},afterCopy:{latticeNames:["clipboard:copy"]},scroll:{latticeNames:["scroll"]},afterRowDrop:{latticeNames:["row:moved","row:received"],reshape:a}});function o(i){const c=new Set;return{on(y,n){const l=f[y];if(!l)return c.has(y)||(c.add(y),console.warn(`dhtmlx-compat: "${y}" has no Lattice equivalent and will never fire.`)),()=>{};const w=l.latticeNames.map(R=>i.on(R,E=>{if(!l.reshape){n(E);return}const S=l.reshape(E,i);S&&n(...S)}));return()=>{for(const R of w)R()}}}}}),C("packages/modules/dhtmlx-compat/rows.js",function(s,g){"use strict";Object.defineProperty(s,"createRowVisibility",{enumerable:!0,get:function(){return b}});function b(O){const p=new Set,h={active:()=>p.size>0,passes:u=>!(u&&p.has(String(u.key)))};let P=!1;function m(){P||(P=!0),O.set("hostFilter",h)}return{hideRow(u){const a=String(u);p.has(a)||(p.add(a),m())},showRow(u){const a=String(u);p.delete(a)&&m()},isRowHidden(u){return p.has(String(u))},hiddenRows(){return[...p]}}}}),C("packages/modules/dhtmlx-compat/spans.js",function(s,g){"use strict";Object.defineProperty(s,"createSpans",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce,p=new Set(["row","column","rowspan","colspan"]);function h(a,f){return`${String(a)}|${String(f)}`}function P(a,f,o,i){if(a&&typeof a=="object"){for(const c of Object.keys(a))p.has(c)||O(`dhtmlx.span.dropped:${c}`,`dhtmlx-compat does not translate the span key '${c}', so it has no effect. Lattice spans carry only geometry (rowspan/colspan); the cell's value, css and tooltip come from its own column, not the span.`);return{row:a.row,column:a.column,rows:Math.max(1,Math.floor(Number(a.rowspan)||1)),cols:Math.max(1,Math.floor(Number(a.colspan)||1))}}return{row:a,column:f,rows:Math.max(1,Math.floor(Number(o)||1)),cols:Math.max(1,Math.floor(Number(i)||1))}}function m(a,f){return a.map(o=>({...o,cell:{...o.cell||{},spanColumns:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.cols:1},spanRows:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.rows:1}}}))}function u(a){const f=new Map;let o=!1;function i(){const c=o?a.get("columns"):m(a.get("columns"),f);o=!0,a.set("columns",c)}return{addSpan(c,y,n,l){const w=P(c,y,n,l);if(w.row===void 0||w.column===void 0)throw new TypeError("dhtmlx-compat: addSpan needs a row and a column.");if(w.rows<=1&&w.cols<=1){this.removeSpan(w.row,w.column);return}f.set(h(w.row,w.column),{rows:w.rows,cols:w.cols}),i()},removeSpan(c,y){f.delete(h(c,y))&&i()},getSpan(c,y){const n=f.get(h(c,y));if(n)return{rowspan:n.rows,colspan:n.cols}},spanCount(){return f.size}}}}),C("packages/modules/dhtmlx-compat/index.js",function(s,g){"use strict";Object.defineProperty(s,"Grid",{enumerable:!0,get:function(){return L}}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return H}});const O=Y("@toclocoinc/lattice-grid").createGrid;if(typeof O>"u")throw new Error("[lattice] dhtmlx-compat needs createGrid from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const h=g("packages/modules/dhtmlx-compat/columns.js").translateColumns,m=g("packages/modules/dhtmlx-compat/data.js").createData,u=g("packages/modules/dhtmlx-compat/selection.js"),a=u.createSelection,f=u.createRangeSelection,o=g("packages/modules/dhtmlx-compat/passthrough.js"),i=o.createHistory,c=o.createExport,n=g("packages/modules/dhtmlx-compat/events.js").createEvents,w=g("packages/modules/dhtmlx-compat/rows.js").createRowVisibility,E=g("packages/modules/dhtmlx-compat/spans.js").createSpans,S=g("packages/modules/dhtmlx-compat/util.js"),I=S.rowsFrom,F=S.reportUntranslated,$=new Set(["rowKey","columns","data","autoHeight","rowHeight","headerRowHeight","multiselection","dragItem","rowTransfer"]);function K(x){F(x,$,"config");const j={rowKey:x.rowKey||"id"};return x.columns!==void 0&&(j.columns=h(x.columns)),x.data!==void 0&&(j.rows=I(x.data)),x.autoHeight!==void 0&&(j.autoHeight=x.autoHeight),x.rowHeight!==void 0&&(j.rowHeight=x.rowHeight),x.headerRowHeight!==void 0&&(j.headerHeight=x.headerRowHeight),x.multiselection&&(j.selection="multiple"),x.dragItem==="row"&&(j.rowReorder=!0),x.rowTransfer!==void 0&&(j.rowTransfer=x.rowTransfer),j}class L{#e;#t;#n;constructor(j,v={}){this.#e=O(j,K(v)),this.data=m(this.#e),this.selection=a(this.#e),this.rangeSelection=f(this.#e),this.history=i(this.#e),this.export=c(this.#e),this.events=n(this.#e),this.#t=w(this.#e),this.#n=E(this.#e)}get lattice(){return this.#e}hideRow(j){this.#t.hideRow(j)}showRow(j){this.#t.showRow(j)}isRowHidden(j){return this.#t.isRowHidden(j)}addSpan(j,v,G,U){this.#n.addSpan(j,v,G,U)}removeSpan(j,v){this.#n.removeSpan(j,v)}getSpan(j,v){return this.#n.getSpan(j,v)}setColumns(j){if(j===void 0)return this.#e.get("columns");this.#e.set("columns",h(j))}destructor(){this.#e.destroy()}}const H=L});var M=J("packages/modules/dhtmlx-compat/index.js");if(typeof module=="object"&&module.exports)module.exports=M;else if(typeof define=="function"&&define.amd)define(function(){return M});else{var ne=D.LatticeGrid||(D.LatticeGrid={});for(var z in M)z!=="default"&&(ne[z]=M[z])}})(typeof globalThis<"u"?globalThis:this);
|
|
6
|
+
(function(D){"use strict";var B=Object.create(null),q=Object.create(null);function C(s,g){B[s]=g}function J(s){var g=q[s];if(g)return g;var b=Object.create(null);q[s]=b;var O=B[s];if(!O)throw new Error("[lattice] missing module: "+s);return O(b,J),b}var Z=Object.create(null);Z["@toclocoinc/lattice-grid"]=D.LatticeGrid||null;function Y(s){var g=Z[s],b=typeof globalThis<"u"?globalThis:typeof self<"u"?self:null;if(g)return g;if(s==="@toclocoinc/lattice-grid"&&b&&b.LatticeGrid)return b.LatticeGrid;throw new Error("[lattice] this module shares the Lattice core with the page, but it was not found. Load lattice-grid (or its script build) before this module. Missing: "+s)}C("packages/core/src/internal/util.js",function(s,g){"use strict";Object.defineProperty(s,"VERSION",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"reportedWarnings",{enumerable:!0,get:function(){return i}}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return y}}),Object.defineProperty(s,"infoOnce",{enumerable:!0,get:function(){return n}}),Object.defineProperty(s,"resetWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(s,"fail",{enumerable:!0,get:function(){return w}}),Object.defineProperty(s,"invariant",{enumerable:!0,get:function(){return R}}),Object.defineProperty(s,"DEV",{enumerable:!0,get:function(){return E}}),Object.defineProperty(s,"isObject",{enumerable:!0,get:function(){return S}}),Object.defineProperty(s,"isFunction",{enumerable:!0,get:function(){return I}}),Object.defineProperty(s,"isNil",{enumerable:!0,get:function(){return F}}),Object.defineProperty(s,"isBlank",{enumerable:!0,get:function(){return $}}),Object.defineProperty(s,"isCtor",{enumerable:!0,get:function(){return K}}),Object.defineProperty(s,"pathGetter",{enumerable:!0,get:function(){return H}}),Object.defineProperty(s,"pathSetter",{enumerable:!0,get:function(){return j}}),Object.defineProperty(s,"getPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(s,"setPath",{enumerable:!0,get:function(){return G}}),Object.defineProperty(s,"humanise",{enumerable:!0,get:function(){return U}}),Object.defineProperty(s,"escapeHtml",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(s,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(s,"expand",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(s,"toArray",{enumerable:!0,get:function(){return se}}),Object.defineProperty(s,"merge",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(s,"mergeRow",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(s,"Lru",{enumerable:!0,get:function(){return le}}),Object.defineProperty(s,"collator",{enumerable:!0,get:function(){return de}}),Object.defineProperty(s,"defaultCompare",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(s,"now",{enumerable:!0,get:function(){return _}}),Object.defineProperty(s,"nextFrame",{enumerable:!0,get:function(){return te}}),Object.defineProperty(s,"cancelFrame",{enumerable:!0,get:function(){return W}}),Object.defineProperty(s,"frameBatched",{enumerable:!0,get:function(){return me}}),Object.defineProperty(s,"settleDebounce",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(s,"whenIdle",{enumerable:!0,get:function(){return he}}),Object.defineProperty(s,"uid",{enumerable:!0,get:function(){return ge}});const b="1.88.3";async function O(){return b}const p="1.88.3",h=new Set,P=2e3;function m(e){if(h.add(e),h.size>P){const t=h.values().next().value;t!==void 0&&h.delete(t)}}const u=[],a=500;function f(e,t,r){u.push({key:e,level:t,message:r.map(d=>typeof d=="string"?d:o(d)).join(" "),at:Date.now()}),u.length>a&&u.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function i(){return u.map(e=>({...e}))}function c(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function y(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"warn",r),console.warn("[lattice]",...r)}function n(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"info",r),console.info("[lattice]",...r)}function l(){h.clear(),u.length=0}function w(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function R(e,t){e||w(t)}const E=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function S(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function I(e){return typeof e=="function"}function F(e){return e==null}function $(e){return e==null||e===""}function K(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const L=new Map;function H(e){let t=L.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),d=r.length;t=k=>{let A=k;for(let N=0;N<d;N++){if(A==null)return;A=A[r[N]]}return A}}return L.set(e,t),t}const x=new Map;function j(e){let t=x.get(e);if(t)return t;if(!e.includes("."))t=(r,d)=>{r!=null&&(r[e]=d)};else{const r=e.split("."),d=r.length-1;t=(k,A)=>{let N=k;for(let T=0;T<d;T++){if(N==null)return;const V=r[T];N[V]==null&&(N[V]={}),N=N[V]}N!=null&&(N[r[d]]=A)}}return x.set(e,t),t}function v(e,t){return H(t)(e)}function G(e,t,r){j(t)(e,r)}function U(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).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(/^./,r=>r.toUpperCase()):""}const re={"&":"&","<":"<",">":">",'"':""","'":"'"};function oe(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>re[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ae(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:S(e)?e:{[t]:e,enabled:!0}}function se(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function Q(e,t){if(!S(e))return S(t)?{...t}:t;if(!S(t))return t===void 0?e:t;const r={...e};for(const d of Object.keys(t)){if(ue.has(d))continue;const k=t[d];k!==void 0&&(r[d]=S(k)&&S(r[d])?Q(r[d],k):k)}return r}function ce(e,t){if(!S(e)||!S(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class le{#e;#t=new Map;#n;constructor(t=256,r=null){this.#e=t,this.#n=r}get size(){return this.#t.size}get max(){return this.#e}set max(t){this.#e=t,this.#r()}has(t){return this.#t.has(t)}get(t){const r=this.#t;if(!r.has(t))return;const d=r.get(t);return r.delete(t),r.set(t,d),d}peek(t){return this.#t.get(t)}set(t,r){const d=this.#t;return d.has(t)&&d.delete(t),d.set(t,r),this.#r(),r}delete(t){const r=this.#t.get(t);return this.#t.delete(t)&&this.#n&&this.#n(r,t),r}clear(){if(this.#n)for(const[t,r]of this.#t)this.#n(r,t);this.#t.clear()}keys(){return this.#t.keys()}values(){return this.#t.values()}#r(){const t=this.#t;for(;t.size>this.#e;){const r=t.keys().next().value,d=t.get(r);t.delete(r),this.#n&&this.#n(d,r)}}}const X=new Map;function de(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let d=X.get(r);return d||(d=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),X.set(r,d)),d}function fe(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),d=String(t);return r<d?-1:r>d?1:0}function _(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const ee=typeof requestAnimationFrame=="function";function te(e){return ee?requestAnimationFrame(e):setTimeout(()=>e(_()),16)}function W(e){e!=null&&(ee?cancelAnimationFrame(e):clearTimeout(e))}function me(e){let t=null,r=null;const d=()=>{t=null;const A=r;r=null,e(...A||[])},k=(...A)=>{r=A,t===null&&(t=te(d))};return k.cancel=()=>{W(t),t=null,r=null},k.flush=()=>{t!==null&&(W(t),d())},k}function pe(e,t){let r=null,d=null;const k=()=>{if(r=null,d===null)return;const T=d;d=null,e(...T),A()},A=()=>{r=setTimeout(k,t),typeof r?.unref=="function"&&r.unref()},N=(...T)=>{r===null?(e(...T),A()):(d=T,clearTimeout(r),A())};return N.flush=()=>{if(r!==null&&clearTimeout(r),r=null,d===null)return;const T=d;d=null,e(...T)},N.cancel=()=>{r!==null&&clearTimeout(r),r=null,d=null},N.pending=()=>r!==null||d!==null,N}function he(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let ye=0;function ge(e="l"){return`${e}${(++ye).toString(36)}`}}),C("packages/modules/dhtmlx-compat/util.js",function(s,g){"use strict";Object.defineProperty(s,"reportUntranslated",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"indexOfKey",{enumerable:!0,get:function(){return h}}),Object.defineProperty(s,"rowsFrom",{enumerable:!0,get:function(){return P}}),Object.defineProperty(s,"rowShape",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"columnShape",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce;function p(a,f,o){if(!(!a||typeof a!="object"))for(const i of Object.keys(a))f.has(i)||O(`dhtmlx.${o}.dropped:${i}`,`dhtmlx-compat does not translate the ${o} key '${i}', so it has no effect. Nothing was applied for it.`)}function h(a,f){const o=a.rows.count();for(let i=0;i<o;i++){const c=a.rows.get(i);if(c&&c.key===f)return i}return-1}function P(a){return Array.isArray(a)?a:a&&typeof a=="object"&&Array.isArray(a.data)?a.data:[]}function m(a,f){const o=a.rows.byKey(f);return{...o?o.data:void 0,id:f}}function u(a,f){return{id:f}}}),C("packages/modules/dhtmlx-compat/columns.js",function(s,g){"use strict";Object.defineProperty(s,"translateColumn",{enumerable:!0,get:function(){return c}}),Object.defineProperty(s,"translateColumns",{enumerable:!0,get:function(){return y}});const O=g("packages/core/src/internal/util.js").warnOnce,h=Y("@toclocoinc/lattice-grid").sanitiseHtml;if(typeof h>"u")throw new Error("[lattice] dhtmlx-compat needs sanitiseHtml from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const m=g("packages/modules/dhtmlx-compat/util.js").reportUntranslated,u=new Set(["id","header","type","width","minWidth","maxWidth","resizable","hidden","draggable","align","tooltip","tooltipTemplate","template","htmlEnable","sortable","editable","editorType","editorConfig","options","summary"]),a=Object.freeze({input:"text",select:"select",combobox:"select",textarea:"textarea",multiselect:"multiSelect",datePicker:"date",checkbox:"checkbox"}),f=Object.freeze({number:"number",date:"date"});function o(n){if(typeof n=="string")return n;if(Array.isArray(n)&&n.length>0){n.length>1&&O("dhtmlx.header.multirow",`dhtmlx-compat collapsed a ${n.length}-row header to its first row. Lattice titles are a single string; the remaining rows were not applied.`);const l=n[0];if(typeof l=="string")return l;if(l&&typeof l=="object"&&typeof l.text=="string")return l.text}}function i(n,l){return(w,R)=>{const E={...R.data||{},id:R.row?R.row.key:void 0},S=n(R.value,E,{id:R.colId});l?w.innerHTML=h(String(S)):w.textContent=String(S)}}function c(n){if(!n||typeof n!="object"||!n.id)throw new TypeError("dhtmlx-compat: every column needs an id.");m(n,u,"column");const l={id:n.id,field:n.id},w=o(n.header);if(w!==void 0&&(l.title=w),n.type!==void 0){const S=f[n.type];S&&(l.type=S)}if((n.width!==void 0||n.minWidth!==void 0||n.maxWidth!==void 0||n.resizable!==void 0||n.hidden!==void 0||n.draggable!==void 0)&&(l.layout={},n.width!==void 0&&(l.layout.width=n.width),n.minWidth!==void 0&&(l.layout.min=n.minWidth),n.maxWidth!==void 0&&(l.layout.max=n.maxWidth),n.resizable!==void 0&&(l.layout.resizable=!!n.resizable),n.hidden!==void 0&&(l.layout.hidden=!!n.hidden),n.draggable!==void 0&&(l.layout.movable=!!n.draggable)),n.align!==void 0&&(l.cell={...l.cell||{},align:n.align}),(n.tooltipTemplate!==void 0||n.tooltip!==void 0)&&(l.cell={...l.cell||{},tooltip:n.tooltipTemplate||n.tooltip}),typeof n.template=="function"&&(l.cell={...l.cell||{},render:i(n.template,!!n.htmlEnable)}),n.sortable!==void 0&&(l.sort={enabled:!!n.sortable}),n.editable!==void 0||n.editorType!==void 0||n.editorConfig!==void 0||n.options!==void 0){if(l.edit={enabled:n.editable!==!1},n.editorType!==void 0){const S=a[n.editorType];S||O(`dhtmlx.editorType.unknown:${String(n.editorType)}`,`dhtmlx-compat does not recognise editorType '${String(n.editorType)}'; the default text editor was used instead.`),l.edit.editor=S||"text"}(n.editorConfig!==void 0||n.options!==void 0)&&(l.edit.props={...n.editorConfig||{}},n.options!==void 0&&(l.edit.props.options=n.options))}return n.summary!==void 0&&(l.total=n.summary),l}function y(n){return Array.isArray(n)?n.map(c):[]}}),C("packages/modules/dhtmlx-compat/data.js",function(s,g){"use strict";Object.defineProperty(s,"createData",{enumerable:!0,get:function(){return P}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowsFrom;function h(m){return m.get("rowKey")}function P(m){return{add(u,a){const f=a===void 0?{add:[u]}:{add:[u],at:a},o=m.rows.apply(f);if(o&&o.rejected&&o.rejected.length)throw new Error(`dhtmlx-compat: data.add() was rejected: ${JSON.stringify(o.rejected[0])}.`);return u[h(m)]},update(u,a){m.rows.apply({update:[{...a,[h(m)]:u}]})},remove(u){m.rows.apply({remove:Array.isArray(u)?u:[u]})},removeAll(){m.rows.load([])},parse(u){m.rows.load(p(u))},async load(u,a){const o=await(await fetch(u)).json();m.rows.load(p(o)),typeof a=="function"&&a()},find(u){const a=m.rows.byKey(u);return a?a.data:void 0},findAll(u){const a=[];return m.rows.forEachAll(f=>{u(f.data)&&a.push(f.data)}),a},exists(u){return m.rows.byKey(u)!==void 0&&m.rows.byKey(u)!==null},getItem(u){const a=m.rows.byKey(u);return a?a.data:void 0},serialize(){return m.rows.data()},getId(u){const a=m.rows.get(u);return a?a.key:void 0},getIndex(u){return O(m,u)},getLength(){return m.rows.count()},forEach(u){m.rows.forEach((a,f)=>u(a.data,f))},sort(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.sort(fn) is not supported: Lattice sorts by column, not a comparator. Pass a column id, or { by, dir }.");const a=Array.isArray(u)?u:[u];m.sort.set(a.map(f=>typeof f=="string"?{col:f,dir:"asc"}:{col:f.by,dir:f.dir||"asc"}))},filter(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.filter(fn) is not supported: Lattice filters are a declarative condition tree, not a predicate. Pass { col, op, value } instead.");m.filters.set(u)},resetFilter(){m.filters.clear()}}}}),C("packages/modules/dhtmlx-compat/selection.js",function(s,g){"use strict";Object.defineProperty(s,"createSelection",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"createRangeSelection",{enumerable:!0,get:function(){return f}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowShape,h=b.columnShape;function P(o){return o&&typeof o=="object"&&"id"in o?o.id:o}function m(o){return{setCell(i,c,y,n){const l=O(o,P(i));if(l===-1)return;const w=P(c);if(n){o.selection.extendRange(l,w);return}o.selection.startRange(l,w,{additive:!!y})},getCell(){const i=o.selection.cells();if(i.length)return{row:p(o,i[0].key),column:h(o,i[0].colId)}},getCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},isSelectedCell(i,c){const y=O(o,P(i));return y===-1?!1:o.selection.inRange(y,P(c))},removeCell(){o.selection.clearRange()},enable(){},disable(){o.selection.clearRange()}}}function u(o,i){const c=Math.min(o.start.row,o.end.row),y=Math.max(o.start.row,o.end.row),n=i.columns.visible().map(I=>I.id),l=n.indexOf(o.start.column),w=n.indexOf(o.end.column),R=Math.min(l,w),E=Math.max(l,w),S=R===-1||E===-1?[o.start.column]:n.slice(R,E+1);return{startRow:c,endRow:y,columns:S}}function a(o){return{start:{row:o.startRow,column:o.columns[0]},end:{row:o.endRow,column:o.columns[o.columns.length-1]}}}function f(o){return{setRange(i){o.selection.setRange(u(i,o))},getRange(){const i=o.selection.ranges();if(i.length)return a(i[i.length-1])},getRangedCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},resetRange(){o.selection.clearRange()},isRanged(){return o.selection.ranges().length>0},enable(){},disable(){o.selection.clearRange()},isDisabled(){return!1}}}}),C("packages/modules/dhtmlx-compat/passthrough.js",function(s,g){"use strict";Object.defineProperty(s,"createHistory",{enumerable:!0,get:function(){return b}}),Object.defineProperty(s,"createExport",{enumerable:!0,get:function(){return O}});function b(p){return{undo(){return p.history.undo()},redo(){return p.history.redo()},canUndo(){return p.history.canUndo()},canRedo(){return p.history.canRedo()},clear(){p.history.clear()},removeAll(){p.history.clear()},getHistory(){return p.history.list()}}}function O(p){return{csv(h){return p.export.csv(h)},xlsx(h){return p.export.excel(h)},pdf(){throw new Error("dhtmlx-compat: export.pdf() is not supported: Lattice has no PDF export. export.csv()/export.xlsx() work, or use the browser's own print-to-PDF via grid.export.print().")},png(){throw new Error("dhtmlx-compat: export.png() is not supported: Lattice has no raster export.")}}}}),C("packages/modules/dhtmlx-compat/events.js",function(s,g){"use strict";Object.defineProperty(s,"createEvents",{enumerable:!0,get:function(){return o}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.rowShape,p=b.columnShape;function h(i,c){return[O(c,i.key),p(c,i.colId),i.event]}function P(i,c){const y=i.column&&i.column.edit?i.column.edit.editor:void 0;return[O(c,i.key),p(c,i.colId),y]}function m(i,c){return[i.value,O(c,i.key),p(c,i.colId)]}function u(i,c){const y=i.sort&&i.sort[0];return y?[p(c,y.col),y.dir]:null}function a(i,c){let y,n;if(i.key!==void 0)y=[i.key],n=i.to;else{const w=c.get("rowKey");y=(Array.isArray(i.data)?i.data:[i.data]).map(E=>E&&E[w]),n=i.at}const l=n!==void 0?c.rows.get(n):void 0;return[{start:y[0],source:y,target:l?l.key:void 0},void 0]}const f=Object.freeze({cellClick:{latticeNames:["cell:clicked"],reshape:h},cellDblClick:{latticeNames:["cell:dblclicked"],reshape:h},cellRightClick:{latticeNames:["cell:contextmenu"],reshape:h},afterEditStart:{latticeNames:["cell:edit:start"],reshape:P},afterEditEnd:{latticeNames:["cell:changed"],reshape:m},afterSort:{latticeNames:["sort:changed"],reshape:u},filterChange:{latticeNames:["filter:changed"]},afterColumnDrop:{latticeNames:["column:moved"]},afterResizeEnd:{latticeNames:["column:resized"]},resize:{latticeNames:["column:resized"]},afterColumnHide:{latticeNames:["column:visible"]},afterColumnShow:{latticeNames:["column:visible"]},afterExpand:{latticeNames:["group:toggled"]},afterCollapse:{latticeNames:["group:toggled"]},afterSelect:{latticeNames:["range:changed"]},afterUnSelect:{latticeNames:["range:changed"]},afterSetRange:{latticeNames:["range:changed"]},afterResetRange:{latticeNames:["range:changed"]},afterAdd:{latticeNames:["history:changed"]},afterUndo:{latticeNames:["history:applied"]},afterRedo:{latticeNames:["history:applied"]},afterCopy:{latticeNames:["clipboard:copy"]},scroll:{latticeNames:["scroll"]},afterRowDrop:{latticeNames:["row:moved","row:received"],reshape:a}});function o(i){const c=new Set;return{on(y,n){const l=f[y];if(!l)return c.has(y)||(c.add(y),console.warn(`dhtmlx-compat: "${y}" has no Lattice equivalent and will never fire.`)),()=>{};const w=l.latticeNames.map(R=>i.on(R,E=>{if(!l.reshape){n(E);return}const S=l.reshape(E,i);S&&n(...S)}));return()=>{for(const R of w)R()}}}}}),C("packages/modules/dhtmlx-compat/rows.js",function(s,g){"use strict";Object.defineProperty(s,"createRowVisibility",{enumerable:!0,get:function(){return b}});function b(O){const p=new Set,h={active:()=>p.size>0,passes:u=>!(u&&p.has(String(u.key)))};let P=!1;function m(){P||(P=!0),O.set("hostFilter",h)}return{hideRow(u){const a=String(u);p.has(a)||(p.add(a),m())},showRow(u){const a=String(u);p.delete(a)&&m()},isRowHidden(u){return p.has(String(u))},hiddenRows(){return[...p]}}}}),C("packages/modules/dhtmlx-compat/spans.js",function(s,g){"use strict";Object.defineProperty(s,"createSpans",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce,p=new Set(["row","column","rowspan","colspan"]);function h(a,f){return`${String(a)}|${String(f)}`}function P(a,f,o,i){if(a&&typeof a=="object"){for(const c of Object.keys(a))p.has(c)||O(`dhtmlx.span.dropped:${c}`,`dhtmlx-compat does not translate the span key '${c}', so it has no effect. Lattice spans carry only geometry (rowspan/colspan); the cell's value, css and tooltip come from its own column, not the span.`);return{row:a.row,column:a.column,rows:Math.max(1,Math.floor(Number(a.rowspan)||1)),cols:Math.max(1,Math.floor(Number(a.colspan)||1))}}return{row:a,column:f,rows:Math.max(1,Math.floor(Number(o)||1)),cols:Math.max(1,Math.floor(Number(i)||1))}}function m(a,f){return a.map(o=>({...o,cell:{...o.cell||{},spanColumns:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.cols:1},spanRows:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.rows:1}}}))}function u(a){const f=new Map;let o=!1;function i(){const c=o?a.get("columns"):m(a.get("columns"),f);o=!0,a.set("columns",c)}return{addSpan(c,y,n,l){const w=P(c,y,n,l);if(w.row===void 0||w.column===void 0)throw new TypeError("dhtmlx-compat: addSpan needs a row and a column.");if(w.rows<=1&&w.cols<=1){this.removeSpan(w.row,w.column);return}f.set(h(w.row,w.column),{rows:w.rows,cols:w.cols}),i()},removeSpan(c,y){f.delete(h(c,y))&&i()},getSpan(c,y){const n=f.get(h(c,y));if(n)return{rowspan:n.rows,colspan:n.cols}},spanCount(){return f.size}}}}),C("packages/modules/dhtmlx-compat/index.js",function(s,g){"use strict";Object.defineProperty(s,"Grid",{enumerable:!0,get:function(){return L}}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return H}});const O=Y("@toclocoinc/lattice-grid").createGrid;if(typeof O>"u")throw new Error("[lattice] dhtmlx-compat needs createGrid from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const h=g("packages/modules/dhtmlx-compat/columns.js").translateColumns,m=g("packages/modules/dhtmlx-compat/data.js").createData,u=g("packages/modules/dhtmlx-compat/selection.js"),a=u.createSelection,f=u.createRangeSelection,o=g("packages/modules/dhtmlx-compat/passthrough.js"),i=o.createHistory,c=o.createExport,n=g("packages/modules/dhtmlx-compat/events.js").createEvents,w=g("packages/modules/dhtmlx-compat/rows.js").createRowVisibility,E=g("packages/modules/dhtmlx-compat/spans.js").createSpans,S=g("packages/modules/dhtmlx-compat/util.js"),I=S.rowsFrom,F=S.reportUntranslated,$=new Set(["rowKey","columns","data","autoHeight","rowHeight","headerRowHeight","multiselection","dragItem","rowTransfer"]);function K(x){F(x,$,"config");const j={rowKey:x.rowKey||"id"};return x.columns!==void 0&&(j.columns=h(x.columns)),x.data!==void 0&&(j.rows=I(x.data)),x.autoHeight!==void 0&&(j.autoHeight=x.autoHeight),x.rowHeight!==void 0&&(j.rowHeight=x.rowHeight),x.headerRowHeight!==void 0&&(j.headerHeight=x.headerRowHeight),x.multiselection&&(j.selection="multiple"),x.dragItem==="row"&&(j.rowReorder=!0),x.rowTransfer!==void 0&&(j.rowTransfer=x.rowTransfer),j}class L{#e;#t;#n;constructor(j,v={}){this.#e=O(j,K(v)),this.data=m(this.#e),this.selection=a(this.#e),this.rangeSelection=f(this.#e),this.history=i(this.#e),this.export=c(this.#e),this.events=n(this.#e),this.#t=w(this.#e),this.#n=E(this.#e)}get lattice(){return this.#e}hideRow(j){this.#t.hideRow(j)}showRow(j){this.#t.showRow(j)}isRowHidden(j){return this.#t.isRowHidden(j)}addSpan(j,v,G,U){this.#n.addSpan(j,v,G,U)}removeSpan(j,v){this.#n.removeSpan(j,v)}getSpan(j,v){return this.#n.getSpan(j,v)}setColumns(j){if(j===void 0)return this.#e.get("columns");this.#e.set("columns",h(j))}destructor(){this.#e.destroy()}}const H=L});var M=J("packages/modules/dhtmlx-compat/index.js");if(typeof module=="object"&&module.exports)module.exports=M;else if(typeof define=="function"&&define.amd)define(function(){return M});else{var ne=D.LatticeGrid||(D.LatticeGrid={});for(var z in M)z!=="default"&&(ne[z]=M[z])}})(typeof globalThis<"u"?globalThis:this);
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=dhtmlx-compat.min.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.88.
|
|
2
|
+
* Lattice Grid 1.88.3, dhtmlx-compat module
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
|
-
(function(D){"use strict";var B=Object.create(null),q=Object.create(null);function C(s,g){B[s]=g}function J(s){var g=q[s];if(g)return g;var b=Object.create(null);q[s]=b;var O=B[s];if(!O)throw new Error("[lattice] missing module: "+s);return O(b,J),b}var Z=Object.create(null);Z["@toclocoinc/lattice-grid"]=D.LatticeGrid||null;function Y(s){var g=Z[s],b=typeof globalThis<"u"?globalThis:typeof self<"u"?self:null;if(g)return g;if(s==="@toclocoinc/lattice-grid"&&b&&b.LatticeGrid)return b.LatticeGrid;throw new Error("[lattice] this module shares the Lattice core with the page, but it was not found. Load lattice-grid (or its script build) before this module. Missing: "+s)}C("packages/core/src/internal/util.js",function(s,g){"use strict";Object.defineProperty(s,"VERSION",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"reportedWarnings",{enumerable:!0,get:function(){return i}}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return y}}),Object.defineProperty(s,"infoOnce",{enumerable:!0,get:function(){return n}}),Object.defineProperty(s,"resetWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(s,"fail",{enumerable:!0,get:function(){return w}}),Object.defineProperty(s,"invariant",{enumerable:!0,get:function(){return R}}),Object.defineProperty(s,"DEV",{enumerable:!0,get:function(){return E}}),Object.defineProperty(s,"isObject",{enumerable:!0,get:function(){return S}}),Object.defineProperty(s,"isFunction",{enumerable:!0,get:function(){return I}}),Object.defineProperty(s,"isNil",{enumerable:!0,get:function(){return F}}),Object.defineProperty(s,"isBlank",{enumerable:!0,get:function(){return $}}),Object.defineProperty(s,"isCtor",{enumerable:!0,get:function(){return K}}),Object.defineProperty(s,"pathGetter",{enumerable:!0,get:function(){return H}}),Object.defineProperty(s,"pathSetter",{enumerable:!0,get:function(){return j}}),Object.defineProperty(s,"getPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(s,"setPath",{enumerable:!0,get:function(){return G}}),Object.defineProperty(s,"humanise",{enumerable:!0,get:function(){return U}}),Object.defineProperty(s,"escapeHtml",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(s,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(s,"expand",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(s,"toArray",{enumerable:!0,get:function(){return se}}),Object.defineProperty(s,"merge",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(s,"mergeRow",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(s,"Lru",{enumerable:!0,get:function(){return le}}),Object.defineProperty(s,"collator",{enumerable:!0,get:function(){return de}}),Object.defineProperty(s,"defaultCompare",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(s,"now",{enumerable:!0,get:function(){return _}}),Object.defineProperty(s,"nextFrame",{enumerable:!0,get:function(){return te}}),Object.defineProperty(s,"cancelFrame",{enumerable:!0,get:function(){return W}}),Object.defineProperty(s,"frameBatched",{enumerable:!0,get:function(){return me}}),Object.defineProperty(s,"settleDebounce",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(s,"whenIdle",{enumerable:!0,get:function(){return he}}),Object.defineProperty(s,"uid",{enumerable:!0,get:function(){return ge}});const b="1.88.2";async function O(){return b}const p="1.88.2",h=new Set,P=2e3;function m(e){if(h.add(e),h.size>P){const t=h.values().next().value;t!==void 0&&h.delete(t)}}const u=[],a=500;function f(e,t,r){u.push({key:e,level:t,message:r.map(d=>typeof d=="string"?d:o(d)).join(" "),at:Date.now()}),u.length>a&&u.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function i(){return u.map(e=>({...e}))}function c(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function y(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"warn",r),console.warn("[lattice]",...r)}function n(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"info",r),console.info("[lattice]",...r)}function l(){h.clear(),u.length=0}function w(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function R(e,t){e||w(t)}const E=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function S(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function I(e){return typeof e=="function"}function F(e){return e==null}function $(e){return e==null||e===""}function K(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const L=new Map;function H(e){let t=L.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),d=r.length;t=k=>{let A=k;for(let N=0;N<d;N++){if(A==null)return;A=A[r[N]]}return A}}return L.set(e,t),t}const x=new Map;function j(e){let t=x.get(e);if(t)return t;if(!e.includes("."))t=(r,d)=>{r!=null&&(r[e]=d)};else{const r=e.split("."),d=r.length-1;t=(k,A)=>{let N=k;for(let T=0;T<d;T++){if(N==null)return;const V=r[T];N[V]==null&&(N[V]={}),N=N[V]}N!=null&&(N[r[d]]=A)}}return x.set(e,t),t}function v(e,t){return H(t)(e)}function G(e,t,r){j(t)(e,r)}function U(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).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(/^./,r=>r.toUpperCase()):""}const re={"&":"&","<":"<",">":">",'"':""","'":"'"};function oe(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>re[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ae(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:S(e)?e:{[t]:e,enabled:!0}}function se(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function Q(e,t){if(!S(e))return S(t)?{...t}:t;if(!S(t))return t===void 0?e:t;const r={...e};for(const d of Object.keys(t)){if(ue.has(d))continue;const k=t[d];k!==void 0&&(r[d]=S(k)&&S(r[d])?Q(r[d],k):k)}return r}function ce(e,t){if(!S(e)||!S(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class le{#e;#t=new Map;#n;constructor(t=256,r=null){this.#e=t,this.#n=r}get size(){return this.#t.size}get max(){return this.#e}set max(t){this.#e=t,this.#r()}has(t){return this.#t.has(t)}get(t){const r=this.#t;if(!r.has(t))return;const d=r.get(t);return r.delete(t),r.set(t,d),d}peek(t){return this.#t.get(t)}set(t,r){const d=this.#t;return d.has(t)&&d.delete(t),d.set(t,r),this.#r(),r}delete(t){const r=this.#t.get(t);return this.#t.delete(t)&&this.#n&&this.#n(r,t),r}clear(){if(this.#n)for(const[t,r]of this.#t)this.#n(r,t);this.#t.clear()}keys(){return this.#t.keys()}values(){return this.#t.values()}#r(){const t=this.#t;for(;t.size>this.#e;){const r=t.keys().next().value,d=t.get(r);t.delete(r),this.#n&&this.#n(d,r)}}}const X=new Map;function de(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let d=X.get(r);return d||(d=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),X.set(r,d)),d}function fe(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),d=String(t);return r<d?-1:r>d?1:0}function _(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const ee=typeof requestAnimationFrame=="function";function te(e){return ee?requestAnimationFrame(e):setTimeout(()=>e(_()),16)}function W(e){e!=null&&(ee?cancelAnimationFrame(e):clearTimeout(e))}function me(e){let t=null,r=null;const d=()=>{t=null;const A=r;r=null,e(...A||[])},k=(...A)=>{r=A,t===null&&(t=te(d))};return k.cancel=()=>{W(t),t=null,r=null},k.flush=()=>{t!==null&&(W(t),d())},k}function pe(e,t){let r=null,d=null;const k=()=>{if(r=null,d===null)return;const T=d;d=null,e(...T),A()},A=()=>{r=setTimeout(k,t),typeof r?.unref=="function"&&r.unref()},N=(...T)=>{r===null?(e(...T),A()):(d=T,clearTimeout(r),A())};return N.flush=()=>{if(r!==null&&clearTimeout(r),r=null,d===null)return;const T=d;d=null,e(...T)},N.cancel=()=>{r!==null&&clearTimeout(r),r=null,d=null},N.pending=()=>r!==null||d!==null,N}function he(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let ye=0;function ge(e="l"){return`${e}${(++ye).toString(36)}`}}),C("packages/modules/dhtmlx-compat/util.js",function(s,g){"use strict";Object.defineProperty(s,"reportUntranslated",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"indexOfKey",{enumerable:!0,get:function(){return h}}),Object.defineProperty(s,"rowsFrom",{enumerable:!0,get:function(){return P}}),Object.defineProperty(s,"rowShape",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"columnShape",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce;function p(a,f,o){if(!(!a||typeof a!="object"))for(const i of Object.keys(a))f.has(i)||O(`dhtmlx.${o}.dropped:${i}`,`dhtmlx-compat does not translate the ${o} key '${i}', so it has no effect. Nothing was applied for it.`)}function h(a,f){const o=a.rows.count();for(let i=0;i<o;i++){const c=a.rows.get(i);if(c&&c.key===f)return i}return-1}function P(a){return Array.isArray(a)?a:a&&typeof a=="object"&&Array.isArray(a.data)?a.data:[]}function m(a,f){const o=a.rows.byKey(f);return{...o?o.data:void 0,id:f}}function u(a,f){return{id:f}}}),C("packages/modules/dhtmlx-compat/columns.js",function(s,g){"use strict";Object.defineProperty(s,"translateColumn",{enumerable:!0,get:function(){return c}}),Object.defineProperty(s,"translateColumns",{enumerable:!0,get:function(){return y}});const O=g("packages/core/src/internal/util.js").warnOnce,h=Y("@toclocoinc/lattice-grid").sanitiseHtml;if(typeof h>"u")throw new Error("[lattice] dhtmlx-compat needs sanitiseHtml from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const m=g("packages/modules/dhtmlx-compat/util.js").reportUntranslated,u=new Set(["id","header","type","width","minWidth","maxWidth","resizable","hidden","draggable","align","tooltip","tooltipTemplate","template","htmlEnable","sortable","editable","editorType","editorConfig","options","summary"]),a=Object.freeze({input:"text",select:"select",combobox:"select",textarea:"textarea",multiselect:"multiSelect",datePicker:"date",checkbox:"checkbox"}),f=Object.freeze({number:"number",date:"date"});function o(n){if(typeof n=="string")return n;if(Array.isArray(n)&&n.length>0){n.length>1&&O("dhtmlx.header.multirow",`dhtmlx-compat collapsed a ${n.length}-row header to its first row. Lattice titles are a single string; the remaining rows were not applied.`);const l=n[0];if(typeof l=="string")return l;if(l&&typeof l=="object"&&typeof l.text=="string")return l.text}}function i(n,l){return(w,R)=>{const E={...R.data||{},id:R.row?R.row.key:void 0},S=n(R.value,E,{id:R.colId});l?w.innerHTML=h(String(S)):w.textContent=String(S)}}function c(n){if(!n||typeof n!="object"||!n.id)throw new TypeError("dhtmlx-compat: every column needs an id.");m(n,u,"column");const l={id:n.id,field:n.id},w=o(n.header);if(w!==void 0&&(l.title=w),n.type!==void 0){const S=f[n.type];S&&(l.type=S)}if((n.width!==void 0||n.minWidth!==void 0||n.maxWidth!==void 0||n.resizable!==void 0||n.hidden!==void 0||n.draggable!==void 0)&&(l.layout={},n.width!==void 0&&(l.layout.width=n.width),n.minWidth!==void 0&&(l.layout.min=n.minWidth),n.maxWidth!==void 0&&(l.layout.max=n.maxWidth),n.resizable!==void 0&&(l.layout.resizable=!!n.resizable),n.hidden!==void 0&&(l.layout.hidden=!!n.hidden),n.draggable!==void 0&&(l.layout.movable=!!n.draggable)),n.align!==void 0&&(l.cell={...l.cell||{},align:n.align}),(n.tooltipTemplate!==void 0||n.tooltip!==void 0)&&(l.cell={...l.cell||{},tooltip:n.tooltipTemplate||n.tooltip}),typeof n.template=="function"&&(l.cell={...l.cell||{},render:i(n.template,!!n.htmlEnable)}),n.sortable!==void 0&&(l.sort={enabled:!!n.sortable}),n.editable!==void 0||n.editorType!==void 0||n.editorConfig!==void 0||n.options!==void 0){if(l.edit={enabled:n.editable!==!1},n.editorType!==void 0){const S=a[n.editorType];S||O(`dhtmlx.editorType.unknown:${String(n.editorType)}`,`dhtmlx-compat does not recognise editorType '${String(n.editorType)}'; the default text editor was used instead.`),l.edit.editor=S||"text"}(n.editorConfig!==void 0||n.options!==void 0)&&(l.edit.props={...n.editorConfig||{}},n.options!==void 0&&(l.edit.props.options=n.options))}return n.summary!==void 0&&(l.total=n.summary),l}function y(n){return Array.isArray(n)?n.map(c):[]}}),C("packages/modules/dhtmlx-compat/data.js",function(s,g){"use strict";Object.defineProperty(s,"createData",{enumerable:!0,get:function(){return P}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowsFrom;function h(m){return m.get("rowKey")}function P(m){return{add(u,a){const f=a===void 0?{add:[u]}:{add:[u],at:a},o=m.rows.apply(f);if(o&&o.rejected&&o.rejected.length)throw new Error(`dhtmlx-compat: data.add() was rejected: ${JSON.stringify(o.rejected[0])}.`);return u[h(m)]},update(u,a){m.rows.apply({update:[{...a,[h(m)]:u}]})},remove(u){m.rows.apply({remove:Array.isArray(u)?u:[u]})},removeAll(){m.rows.load([])},parse(u){m.rows.load(p(u))},async load(u,a){const o=await(await fetch(u)).json();m.rows.load(p(o)),typeof a=="function"&&a()},find(u){const a=m.rows.byKey(u);return a?a.data:void 0},findAll(u){const a=[];return m.rows.forEachAll(f=>{u(f.data)&&a.push(f.data)}),a},exists(u){return m.rows.byKey(u)!==void 0&&m.rows.byKey(u)!==null},getItem(u){const a=m.rows.byKey(u);return a?a.data:void 0},serialize(){return m.rows.data()},getId(u){const a=m.rows.get(u);return a?a.key:void 0},getIndex(u){return O(m,u)},getLength(){return m.rows.count()},forEach(u){m.rows.forEach((a,f)=>u(a.data,f))},sort(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.sort(fn) is not supported: Lattice sorts by column, not a comparator. Pass a column id, or { by, dir }.");const a=Array.isArray(u)?u:[u];m.sort.set(a.map(f=>typeof f=="string"?{col:f,dir:"asc"}:{col:f.by,dir:f.dir||"asc"}))},filter(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.filter(fn) is not supported: Lattice filters are a declarative condition tree, not a predicate. Pass { col, op, value } instead.");m.filters.set(u)},resetFilter(){m.filters.clear()}}}}),C("packages/modules/dhtmlx-compat/selection.js",function(s,g){"use strict";Object.defineProperty(s,"createSelection",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"createRangeSelection",{enumerable:!0,get:function(){return f}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowShape,h=b.columnShape;function P(o){return o&&typeof o=="object"&&"id"in o?o.id:o}function m(o){return{setCell(i,c,y,n){const l=O(o,P(i));if(l===-1)return;const w=P(c);if(n){o.selection.extendRange(l,w);return}o.selection.startRange(l,w,{additive:!!y})},getCell(){const i=o.selection.cells();if(i.length)return{row:p(o,i[0].key),column:h(o,i[0].colId)}},getCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},isSelectedCell(i,c){const y=O(o,P(i));return y===-1?!1:o.selection.inRange(y,P(c))},removeCell(){o.selection.clearRange()},enable(){},disable(){o.selection.clearRange()}}}function u(o,i){const c=Math.min(o.start.row,o.end.row),y=Math.max(o.start.row,o.end.row),n=i.columns.visible().map(I=>I.id),l=n.indexOf(o.start.column),w=n.indexOf(o.end.column),R=Math.min(l,w),E=Math.max(l,w),S=R===-1||E===-1?[o.start.column]:n.slice(R,E+1);return{startRow:c,endRow:y,columns:S}}function a(o){return{start:{row:o.startRow,column:o.columns[0]},end:{row:o.endRow,column:o.columns[o.columns.length-1]}}}function f(o){return{setRange(i){o.selection.setRange(u(i,o))},getRange(){const i=o.selection.ranges();if(i.length)return a(i[i.length-1])},getRangedCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},resetRange(){o.selection.clearRange()},isRanged(){return o.selection.ranges().length>0},enable(){},disable(){o.selection.clearRange()},isDisabled(){return!1}}}}),C("packages/modules/dhtmlx-compat/passthrough.js",function(s,g){"use strict";Object.defineProperty(s,"createHistory",{enumerable:!0,get:function(){return b}}),Object.defineProperty(s,"createExport",{enumerable:!0,get:function(){return O}});function b(p){return{undo(){return p.history.undo()},redo(){return p.history.redo()},canUndo(){return p.history.canUndo()},canRedo(){return p.history.canRedo()},clear(){p.history.clear()},removeAll(){p.history.clear()},getHistory(){return p.history.list()}}}function O(p){return{csv(h){return p.export.csv(h)},xlsx(h){return p.export.excel(h)},pdf(){throw new Error("dhtmlx-compat: export.pdf() is not supported: Lattice has no PDF export. export.csv()/export.xlsx() work, or use the browser's own print-to-PDF via grid.export.print().")},png(){throw new Error("dhtmlx-compat: export.png() is not supported: Lattice has no raster export.")}}}}),C("packages/modules/dhtmlx-compat/events.js",function(s,g){"use strict";Object.defineProperty(s,"createEvents",{enumerable:!0,get:function(){return o}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.rowShape,p=b.columnShape;function h(i,c){return[O(c,i.key),p(c,i.colId),i.event]}function P(i,c){const y=i.column&&i.column.edit?i.column.edit.editor:void 0;return[O(c,i.key),p(c,i.colId),y]}function m(i,c){return[i.value,O(c,i.key),p(c,i.colId)]}function u(i,c){const y=i.sort&&i.sort[0];return y?[p(c,y.col),y.dir]:null}function a(i,c){let y,n;if(i.key!==void 0)y=[i.key],n=i.to;else{const w=c.get("rowKey");y=(Array.isArray(i.data)?i.data:[i.data]).map(E=>E&&E[w]),n=i.at}const l=n!==void 0?c.rows.get(n):void 0;return[{start:y[0],source:y,target:l?l.key:void 0},void 0]}const f=Object.freeze({cellClick:{latticeNames:["cell:clicked"],reshape:h},cellDblClick:{latticeNames:["cell:dblclicked"],reshape:h},cellRightClick:{latticeNames:["cell:contextmenu"],reshape:h},afterEditStart:{latticeNames:["cell:edit:start"],reshape:P},afterEditEnd:{latticeNames:["cell:changed"],reshape:m},afterSort:{latticeNames:["sort:changed"],reshape:u},filterChange:{latticeNames:["filter:changed"]},afterColumnDrop:{latticeNames:["column:moved"]},afterResizeEnd:{latticeNames:["column:resized"]},resize:{latticeNames:["column:resized"]},afterColumnHide:{latticeNames:["column:visible"]},afterColumnShow:{latticeNames:["column:visible"]},afterExpand:{latticeNames:["group:toggled"]},afterCollapse:{latticeNames:["group:toggled"]},afterSelect:{latticeNames:["range:changed"]},afterUnSelect:{latticeNames:["range:changed"]},afterSetRange:{latticeNames:["range:changed"]},afterResetRange:{latticeNames:["range:changed"]},afterAdd:{latticeNames:["history:changed"]},afterUndo:{latticeNames:["history:applied"]},afterRedo:{latticeNames:["history:applied"]},afterCopy:{latticeNames:["clipboard:copy"]},scroll:{latticeNames:["scroll"]},afterRowDrop:{latticeNames:["row:moved","row:received"],reshape:a}});function o(i){const c=new Set;return{on(y,n){const l=f[y];if(!l)return c.has(y)||(c.add(y),console.warn(`dhtmlx-compat: "${y}" has no Lattice equivalent and will never fire.`)),()=>{};const w=l.latticeNames.map(R=>i.on(R,E=>{if(!l.reshape){n(E);return}const S=l.reshape(E,i);S&&n(...S)}));return()=>{for(const R of w)R()}}}}}),C("packages/modules/dhtmlx-compat/rows.js",function(s,g){"use strict";Object.defineProperty(s,"createRowVisibility",{enumerable:!0,get:function(){return b}});function b(O){const p=new Set,h={active:()=>p.size>0,passes:u=>!(u&&p.has(String(u.key)))};let P=!1;function m(){P||(P=!0),O.set("hostFilter",h)}return{hideRow(u){const a=String(u);p.has(a)||(p.add(a),m())},showRow(u){const a=String(u);p.delete(a)&&m()},isRowHidden(u){return p.has(String(u))},hiddenRows(){return[...p]}}}}),C("packages/modules/dhtmlx-compat/spans.js",function(s,g){"use strict";Object.defineProperty(s,"createSpans",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce,p=new Set(["row","column","rowspan","colspan"]);function h(a,f){return`${String(a)}|${String(f)}`}function P(a,f,o,i){if(a&&typeof a=="object"){for(const c of Object.keys(a))p.has(c)||O(`dhtmlx.span.dropped:${c}`,`dhtmlx-compat does not translate the span key '${c}', so it has no effect. Lattice spans carry only geometry (rowspan/colspan); the cell's value, css and tooltip come from its own column, not the span.`);return{row:a.row,column:a.column,rows:Math.max(1,Math.floor(Number(a.rowspan)||1)),cols:Math.max(1,Math.floor(Number(a.colspan)||1))}}return{row:a,column:f,rows:Math.max(1,Math.floor(Number(o)||1)),cols:Math.max(1,Math.floor(Number(i)||1))}}function m(a,f){return a.map(o=>({...o,cell:{...o.cell||{},spanColumns:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.cols:1},spanRows:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.rows:1}}}))}function u(a){const f=new Map;let o=!1;function i(){const c=o?a.get("columns"):m(a.get("columns"),f);o=!0,a.set("columns",c)}return{addSpan(c,y,n,l){const w=P(c,y,n,l);if(w.row===void 0||w.column===void 0)throw new TypeError("dhtmlx-compat: addSpan needs a row and a column.");if(w.rows<=1&&w.cols<=1){this.removeSpan(w.row,w.column);return}f.set(h(w.row,w.column),{rows:w.rows,cols:w.cols}),i()},removeSpan(c,y){f.delete(h(c,y))&&i()},getSpan(c,y){const n=f.get(h(c,y));if(n)return{rowspan:n.rows,colspan:n.cols}},spanCount(){return f.size}}}}),C("packages/modules/dhtmlx-compat/index.js",function(s,g){"use strict";Object.defineProperty(s,"Grid",{enumerable:!0,get:function(){return L}}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return H}});const O=Y("@toclocoinc/lattice-grid").createGrid;if(typeof O>"u")throw new Error("[lattice] dhtmlx-compat needs createGrid from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const h=g("packages/modules/dhtmlx-compat/columns.js").translateColumns,m=g("packages/modules/dhtmlx-compat/data.js").createData,u=g("packages/modules/dhtmlx-compat/selection.js"),a=u.createSelection,f=u.createRangeSelection,o=g("packages/modules/dhtmlx-compat/passthrough.js"),i=o.createHistory,c=o.createExport,n=g("packages/modules/dhtmlx-compat/events.js").createEvents,w=g("packages/modules/dhtmlx-compat/rows.js").createRowVisibility,E=g("packages/modules/dhtmlx-compat/spans.js").createSpans,S=g("packages/modules/dhtmlx-compat/util.js"),I=S.rowsFrom,F=S.reportUntranslated,$=new Set(["rowKey","columns","data","autoHeight","rowHeight","headerRowHeight","multiselection","dragItem","rowTransfer"]);function K(x){F(x,$,"config");const j={rowKey:x.rowKey||"id"};return x.columns!==void 0&&(j.columns=h(x.columns)),x.data!==void 0&&(j.rows=I(x.data)),x.autoHeight!==void 0&&(j.autoHeight=x.autoHeight),x.rowHeight!==void 0&&(j.rowHeight=x.rowHeight),x.headerRowHeight!==void 0&&(j.headerHeight=x.headerRowHeight),x.multiselection&&(j.selection="multiple"),x.dragItem==="row"&&(j.rowReorder=!0),x.rowTransfer!==void 0&&(j.rowTransfer=x.rowTransfer),j}class L{#e;#t;#n;constructor(j,v={}){this.#e=O(j,K(v)),this.data=m(this.#e),this.selection=a(this.#e),this.rangeSelection=f(this.#e),this.history=i(this.#e),this.export=c(this.#e),this.events=n(this.#e),this.#t=w(this.#e),this.#n=E(this.#e)}get lattice(){return this.#e}hideRow(j){this.#t.hideRow(j)}showRow(j){this.#t.showRow(j)}isRowHidden(j){return this.#t.isRowHidden(j)}addSpan(j,v,G,U){this.#n.addSpan(j,v,G,U)}removeSpan(j,v){this.#n.removeSpan(j,v)}getSpan(j,v){return this.#n.getSpan(j,v)}setColumns(j){if(j===void 0)return this.#e.get("columns");this.#e.set("columns",h(j))}destructor(){this.#e.destroy()}}const H=L});var M=J("packages/modules/dhtmlx-compat/index.js");if(typeof module=="object"&&module.exports)module.exports=M;else if(typeof define=="function"&&define.amd)define(function(){return M});else{var ne=D.LatticeGrid||(D.LatticeGrid={});for(var z in M)z!=="default"&&(ne[z]=M[z])}})(typeof globalThis<"u"?globalThis:this);
|
|
6
|
+
(function(D){"use strict";var B=Object.create(null),q=Object.create(null);function C(s,g){B[s]=g}function J(s){var g=q[s];if(g)return g;var b=Object.create(null);q[s]=b;var O=B[s];if(!O)throw new Error("[lattice] missing module: "+s);return O(b,J),b}var Z=Object.create(null);Z["@toclocoinc/lattice-grid"]=D.LatticeGrid||null;function Y(s){var g=Z[s],b=typeof globalThis<"u"?globalThis:typeof self<"u"?self:null;if(g)return g;if(s==="@toclocoinc/lattice-grid"&&b&&b.LatticeGrid)return b.LatticeGrid;throw new Error("[lattice] this module shares the Lattice core with the page, but it was not found. Load lattice-grid (or its script build) before this module. Missing: "+s)}C("packages/core/src/internal/util.js",function(s,g){"use strict";Object.defineProperty(s,"VERSION",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"reportedWarnings",{enumerable:!0,get:function(){return i}}),Object.defineProperty(s,"warnOnce",{enumerable:!0,get:function(){return y}}),Object.defineProperty(s,"infoOnce",{enumerable:!0,get:function(){return n}}),Object.defineProperty(s,"resetWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(s,"fail",{enumerable:!0,get:function(){return w}}),Object.defineProperty(s,"invariant",{enumerable:!0,get:function(){return R}}),Object.defineProperty(s,"DEV",{enumerable:!0,get:function(){return E}}),Object.defineProperty(s,"isObject",{enumerable:!0,get:function(){return S}}),Object.defineProperty(s,"isFunction",{enumerable:!0,get:function(){return I}}),Object.defineProperty(s,"isNil",{enumerable:!0,get:function(){return F}}),Object.defineProperty(s,"isBlank",{enumerable:!0,get:function(){return $}}),Object.defineProperty(s,"isCtor",{enumerable:!0,get:function(){return K}}),Object.defineProperty(s,"pathGetter",{enumerable:!0,get:function(){return H}}),Object.defineProperty(s,"pathSetter",{enumerable:!0,get:function(){return j}}),Object.defineProperty(s,"getPath",{enumerable:!0,get:function(){return v}}),Object.defineProperty(s,"setPath",{enumerable:!0,get:function(){return G}}),Object.defineProperty(s,"humanise",{enumerable:!0,get:function(){return U}}),Object.defineProperty(s,"escapeHtml",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(s,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(s,"expand",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(s,"toArray",{enumerable:!0,get:function(){return se}}),Object.defineProperty(s,"merge",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(s,"mergeRow",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(s,"Lru",{enumerable:!0,get:function(){return le}}),Object.defineProperty(s,"collator",{enumerable:!0,get:function(){return de}}),Object.defineProperty(s,"defaultCompare",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(s,"now",{enumerable:!0,get:function(){return _}}),Object.defineProperty(s,"nextFrame",{enumerable:!0,get:function(){return te}}),Object.defineProperty(s,"cancelFrame",{enumerable:!0,get:function(){return W}}),Object.defineProperty(s,"frameBatched",{enumerable:!0,get:function(){return me}}),Object.defineProperty(s,"settleDebounce",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(s,"whenIdle",{enumerable:!0,get:function(){return he}}),Object.defineProperty(s,"uid",{enumerable:!0,get:function(){return ge}});const b="1.88.3";async function O(){return b}const p="1.88.3",h=new Set,P=2e3;function m(e){if(h.add(e),h.size>P){const t=h.values().next().value;t!==void 0&&h.delete(t)}}const u=[],a=500;function f(e,t,r){u.push({key:e,level:t,message:r.map(d=>typeof d=="string"?d:o(d)).join(" "),at:Date.now()}),u.length>a&&u.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function i(){return u.map(e=>({...e}))}function c(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function y(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"warn",r),console.warn("[lattice]",...r)}function n(e,...t){if(h.has(e))return;m(e);const r=c(t);f(e,"info",r),console.info("[lattice]",...r)}function l(){h.clear(),u.length=0}function w(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function R(e,t){e||w(t)}const E=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function S(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function I(e){return typeof e=="function"}function F(e){return e==null}function $(e){return e==null||e===""}function K(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const L=new Map;function H(e){let t=L.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),d=r.length;t=k=>{let A=k;for(let N=0;N<d;N++){if(A==null)return;A=A[r[N]]}return A}}return L.set(e,t),t}const x=new Map;function j(e){let t=x.get(e);if(t)return t;if(!e.includes("."))t=(r,d)=>{r!=null&&(r[e]=d)};else{const r=e.split("."),d=r.length-1;t=(k,A)=>{let N=k;for(let T=0;T<d;T++){if(N==null)return;const V=r[T];N[V]==null&&(N[V]={}),N=N[V]}N!=null&&(N[r[d]]=A)}}return x.set(e,t),t}function v(e,t){return H(t)(e)}function G(e,t,r){j(t)(e,r)}function U(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).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(/^./,r=>r.toUpperCase()):""}const re={"&":"&","<":"<",">":">",'"':""","'":"'"};function oe(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>re[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ae(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:S(e)?e:{[t]:e,enabled:!0}}function se(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function Q(e,t){if(!S(e))return S(t)?{...t}:t;if(!S(t))return t===void 0?e:t;const r={...e};for(const d of Object.keys(t)){if(ue.has(d))continue;const k=t[d];k!==void 0&&(r[d]=S(k)&&S(r[d])?Q(r[d],k):k)}return r}function ce(e,t){if(!S(e)||!S(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class le{#e;#t=new Map;#n;constructor(t=256,r=null){this.#e=t,this.#n=r}get size(){return this.#t.size}get max(){return this.#e}set max(t){this.#e=t,this.#r()}has(t){return this.#t.has(t)}get(t){const r=this.#t;if(!r.has(t))return;const d=r.get(t);return r.delete(t),r.set(t,d),d}peek(t){return this.#t.get(t)}set(t,r){const d=this.#t;return d.has(t)&&d.delete(t),d.set(t,r),this.#r(),r}delete(t){const r=this.#t.get(t);return this.#t.delete(t)&&this.#n&&this.#n(r,t),r}clear(){if(this.#n)for(const[t,r]of this.#t)this.#n(r,t);this.#t.clear()}keys(){return this.#t.keys()}values(){return this.#t.values()}#r(){const t=this.#t;for(;t.size>this.#e;){const r=t.keys().next().value,d=t.get(r);t.delete(r),this.#n&&this.#n(d,r)}}}const X=new Map;function de(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let d=X.get(r);return d||(d=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),X.set(r,d)),d}function fe(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),d=String(t);return r<d?-1:r>d?1:0}function _(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const ee=typeof requestAnimationFrame=="function";function te(e){return ee?requestAnimationFrame(e):setTimeout(()=>e(_()),16)}function W(e){e!=null&&(ee?cancelAnimationFrame(e):clearTimeout(e))}function me(e){let t=null,r=null;const d=()=>{t=null;const A=r;r=null,e(...A||[])},k=(...A)=>{r=A,t===null&&(t=te(d))};return k.cancel=()=>{W(t),t=null,r=null},k.flush=()=>{t!==null&&(W(t),d())},k}function pe(e,t){let r=null,d=null;const k=()=>{if(r=null,d===null)return;const T=d;d=null,e(...T),A()},A=()=>{r=setTimeout(k,t),typeof r?.unref=="function"&&r.unref()},N=(...T)=>{r===null?(e(...T),A()):(d=T,clearTimeout(r),A())};return N.flush=()=>{if(r!==null&&clearTimeout(r),r=null,d===null)return;const T=d;d=null,e(...T)},N.cancel=()=>{r!==null&&clearTimeout(r),r=null,d=null},N.pending=()=>r!==null||d!==null,N}function he(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let ye=0;function ge(e="l"){return`${e}${(++ye).toString(36)}`}}),C("packages/modules/dhtmlx-compat/util.js",function(s,g){"use strict";Object.defineProperty(s,"reportUntranslated",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"indexOfKey",{enumerable:!0,get:function(){return h}}),Object.defineProperty(s,"rowsFrom",{enumerable:!0,get:function(){return P}}),Object.defineProperty(s,"rowShape",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"columnShape",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce;function p(a,f,o){if(!(!a||typeof a!="object"))for(const i of Object.keys(a))f.has(i)||O(`dhtmlx.${o}.dropped:${i}`,`dhtmlx-compat does not translate the ${o} key '${i}', so it has no effect. Nothing was applied for it.`)}function h(a,f){const o=a.rows.count();for(let i=0;i<o;i++){const c=a.rows.get(i);if(c&&c.key===f)return i}return-1}function P(a){return Array.isArray(a)?a:a&&typeof a=="object"&&Array.isArray(a.data)?a.data:[]}function m(a,f){const o=a.rows.byKey(f);return{...o?o.data:void 0,id:f}}function u(a,f){return{id:f}}}),C("packages/modules/dhtmlx-compat/columns.js",function(s,g){"use strict";Object.defineProperty(s,"translateColumn",{enumerable:!0,get:function(){return c}}),Object.defineProperty(s,"translateColumns",{enumerable:!0,get:function(){return y}});const O=g("packages/core/src/internal/util.js").warnOnce,h=Y("@toclocoinc/lattice-grid").sanitiseHtml;if(typeof h>"u")throw new Error("[lattice] dhtmlx-compat needs sanitiseHtml from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const m=g("packages/modules/dhtmlx-compat/util.js").reportUntranslated,u=new Set(["id","header","type","width","minWidth","maxWidth","resizable","hidden","draggable","align","tooltip","tooltipTemplate","template","htmlEnable","sortable","editable","editorType","editorConfig","options","summary"]),a=Object.freeze({input:"text",select:"select",combobox:"select",textarea:"textarea",multiselect:"multiSelect",datePicker:"date",checkbox:"checkbox"}),f=Object.freeze({number:"number",date:"date"});function o(n){if(typeof n=="string")return n;if(Array.isArray(n)&&n.length>0){n.length>1&&O("dhtmlx.header.multirow",`dhtmlx-compat collapsed a ${n.length}-row header to its first row. Lattice titles are a single string; the remaining rows were not applied.`);const l=n[0];if(typeof l=="string")return l;if(l&&typeof l=="object"&&typeof l.text=="string")return l.text}}function i(n,l){return(w,R)=>{const E={...R.data||{},id:R.row?R.row.key:void 0},S=n(R.value,E,{id:R.colId});l?w.innerHTML=h(String(S)):w.textContent=String(S)}}function c(n){if(!n||typeof n!="object"||!n.id)throw new TypeError("dhtmlx-compat: every column needs an id.");m(n,u,"column");const l={id:n.id,field:n.id},w=o(n.header);if(w!==void 0&&(l.title=w),n.type!==void 0){const S=f[n.type];S&&(l.type=S)}if((n.width!==void 0||n.minWidth!==void 0||n.maxWidth!==void 0||n.resizable!==void 0||n.hidden!==void 0||n.draggable!==void 0)&&(l.layout={},n.width!==void 0&&(l.layout.width=n.width),n.minWidth!==void 0&&(l.layout.min=n.minWidth),n.maxWidth!==void 0&&(l.layout.max=n.maxWidth),n.resizable!==void 0&&(l.layout.resizable=!!n.resizable),n.hidden!==void 0&&(l.layout.hidden=!!n.hidden),n.draggable!==void 0&&(l.layout.movable=!!n.draggable)),n.align!==void 0&&(l.cell={...l.cell||{},align:n.align}),(n.tooltipTemplate!==void 0||n.tooltip!==void 0)&&(l.cell={...l.cell||{},tooltip:n.tooltipTemplate||n.tooltip}),typeof n.template=="function"&&(l.cell={...l.cell||{},render:i(n.template,!!n.htmlEnable)}),n.sortable!==void 0&&(l.sort={enabled:!!n.sortable}),n.editable!==void 0||n.editorType!==void 0||n.editorConfig!==void 0||n.options!==void 0){if(l.edit={enabled:n.editable!==!1},n.editorType!==void 0){const S=a[n.editorType];S||O(`dhtmlx.editorType.unknown:${String(n.editorType)}`,`dhtmlx-compat does not recognise editorType '${String(n.editorType)}'; the default text editor was used instead.`),l.edit.editor=S||"text"}(n.editorConfig!==void 0||n.options!==void 0)&&(l.edit.props={...n.editorConfig||{}},n.options!==void 0&&(l.edit.props.options=n.options))}return n.summary!==void 0&&(l.total=n.summary),l}function y(n){return Array.isArray(n)?n.map(c):[]}}),C("packages/modules/dhtmlx-compat/data.js",function(s,g){"use strict";Object.defineProperty(s,"createData",{enumerable:!0,get:function(){return P}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowsFrom;function h(m){return m.get("rowKey")}function P(m){return{add(u,a){const f=a===void 0?{add:[u]}:{add:[u],at:a},o=m.rows.apply(f);if(o&&o.rejected&&o.rejected.length)throw new Error(`dhtmlx-compat: data.add() was rejected: ${JSON.stringify(o.rejected[0])}.`);return u[h(m)]},update(u,a){m.rows.apply({update:[{...a,[h(m)]:u}]})},remove(u){m.rows.apply({remove:Array.isArray(u)?u:[u]})},removeAll(){m.rows.load([])},parse(u){m.rows.load(p(u))},async load(u,a){const o=await(await fetch(u)).json();m.rows.load(p(o)),typeof a=="function"&&a()},find(u){const a=m.rows.byKey(u);return a?a.data:void 0},findAll(u){const a=[];return m.rows.forEachAll(f=>{u(f.data)&&a.push(f.data)}),a},exists(u){return m.rows.byKey(u)!==void 0&&m.rows.byKey(u)!==null},getItem(u){const a=m.rows.byKey(u);return a?a.data:void 0},serialize(){return m.rows.data()},getId(u){const a=m.rows.get(u);return a?a.key:void 0},getIndex(u){return O(m,u)},getLength(){return m.rows.count()},forEach(u){m.rows.forEach((a,f)=>u(a.data,f))},sort(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.sort(fn) is not supported: Lattice sorts by column, not a comparator. Pass a column id, or { by, dir }.");const a=Array.isArray(u)?u:[u];m.sort.set(a.map(f=>typeof f=="string"?{col:f,dir:"asc"}:{col:f.by,dir:f.dir||"asc"}))},filter(u){if(typeof u=="function")throw new TypeError("dhtmlx-compat: data.filter(fn) is not supported: Lattice filters are a declarative condition tree, not a predicate. Pass { col, op, value } instead.");m.filters.set(u)},resetFilter(){m.filters.clear()}}}}),C("packages/modules/dhtmlx-compat/selection.js",function(s,g){"use strict";Object.defineProperty(s,"createSelection",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"createRangeSelection",{enumerable:!0,get:function(){return f}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.indexOfKey,p=b.rowShape,h=b.columnShape;function P(o){return o&&typeof o=="object"&&"id"in o?o.id:o}function m(o){return{setCell(i,c,y,n){const l=O(o,P(i));if(l===-1)return;const w=P(c);if(n){o.selection.extendRange(l,w);return}o.selection.startRange(l,w,{additive:!!y})},getCell(){const i=o.selection.cells();if(i.length)return{row:p(o,i[0].key),column:h(o,i[0].colId)}},getCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},isSelectedCell(i,c){const y=O(o,P(i));return y===-1?!1:o.selection.inRange(y,P(c))},removeCell(){o.selection.clearRange()},enable(){},disable(){o.selection.clearRange()}}}function u(o,i){const c=Math.min(o.start.row,o.end.row),y=Math.max(o.start.row,o.end.row),n=i.columns.visible().map(I=>I.id),l=n.indexOf(o.start.column),w=n.indexOf(o.end.column),R=Math.min(l,w),E=Math.max(l,w),S=R===-1||E===-1?[o.start.column]:n.slice(R,E+1);return{startRow:c,endRow:y,columns:S}}function a(o){return{start:{row:o.startRow,column:o.columns[0]},end:{row:o.endRow,column:o.columns[o.columns.length-1]}}}function f(o){return{setRange(i){o.selection.setRange(u(i,o))},getRange(){const i=o.selection.ranges();if(i.length)return a(i[i.length-1])},getRangedCells(){return o.selection.cells().map(i=>({row:p(o,i.key),column:h(o,i.colId)}))},resetRange(){o.selection.clearRange()},isRanged(){return o.selection.ranges().length>0},enable(){},disable(){o.selection.clearRange()},isDisabled(){return!1}}}}),C("packages/modules/dhtmlx-compat/passthrough.js",function(s,g){"use strict";Object.defineProperty(s,"createHistory",{enumerable:!0,get:function(){return b}}),Object.defineProperty(s,"createExport",{enumerable:!0,get:function(){return O}});function b(p){return{undo(){return p.history.undo()},redo(){return p.history.redo()},canUndo(){return p.history.canUndo()},canRedo(){return p.history.canRedo()},clear(){p.history.clear()},removeAll(){p.history.clear()},getHistory(){return p.history.list()}}}function O(p){return{csv(h){return p.export.csv(h)},xlsx(h){return p.export.excel(h)},pdf(){throw new Error("dhtmlx-compat: export.pdf() is not supported: Lattice has no PDF export. export.csv()/export.xlsx() work, or use the browser's own print-to-PDF via grid.export.print().")},png(){throw new Error("dhtmlx-compat: export.png() is not supported: Lattice has no raster export.")}}}}),C("packages/modules/dhtmlx-compat/events.js",function(s,g){"use strict";Object.defineProperty(s,"createEvents",{enumerable:!0,get:function(){return o}});const b=g("packages/modules/dhtmlx-compat/util.js"),O=b.rowShape,p=b.columnShape;function h(i,c){return[O(c,i.key),p(c,i.colId),i.event]}function P(i,c){const y=i.column&&i.column.edit?i.column.edit.editor:void 0;return[O(c,i.key),p(c,i.colId),y]}function m(i,c){return[i.value,O(c,i.key),p(c,i.colId)]}function u(i,c){const y=i.sort&&i.sort[0];return y?[p(c,y.col),y.dir]:null}function a(i,c){let y,n;if(i.key!==void 0)y=[i.key],n=i.to;else{const w=c.get("rowKey");y=(Array.isArray(i.data)?i.data:[i.data]).map(E=>E&&E[w]),n=i.at}const l=n!==void 0?c.rows.get(n):void 0;return[{start:y[0],source:y,target:l?l.key:void 0},void 0]}const f=Object.freeze({cellClick:{latticeNames:["cell:clicked"],reshape:h},cellDblClick:{latticeNames:["cell:dblclicked"],reshape:h},cellRightClick:{latticeNames:["cell:contextmenu"],reshape:h},afterEditStart:{latticeNames:["cell:edit:start"],reshape:P},afterEditEnd:{latticeNames:["cell:changed"],reshape:m},afterSort:{latticeNames:["sort:changed"],reshape:u},filterChange:{latticeNames:["filter:changed"]},afterColumnDrop:{latticeNames:["column:moved"]},afterResizeEnd:{latticeNames:["column:resized"]},resize:{latticeNames:["column:resized"]},afterColumnHide:{latticeNames:["column:visible"]},afterColumnShow:{latticeNames:["column:visible"]},afterExpand:{latticeNames:["group:toggled"]},afterCollapse:{latticeNames:["group:toggled"]},afterSelect:{latticeNames:["range:changed"]},afterUnSelect:{latticeNames:["range:changed"]},afterSetRange:{latticeNames:["range:changed"]},afterResetRange:{latticeNames:["range:changed"]},afterAdd:{latticeNames:["history:changed"]},afterUndo:{latticeNames:["history:applied"]},afterRedo:{latticeNames:["history:applied"]},afterCopy:{latticeNames:["clipboard:copy"]},scroll:{latticeNames:["scroll"]},afterRowDrop:{latticeNames:["row:moved","row:received"],reshape:a}});function o(i){const c=new Set;return{on(y,n){const l=f[y];if(!l)return c.has(y)||(c.add(y),console.warn(`dhtmlx-compat: "${y}" has no Lattice equivalent and will never fire.`)),()=>{};const w=l.latticeNames.map(R=>i.on(R,E=>{if(!l.reshape){n(E);return}const S=l.reshape(E,i);S&&n(...S)}));return()=>{for(const R of w)R()}}}}}),C("packages/modules/dhtmlx-compat/rows.js",function(s,g){"use strict";Object.defineProperty(s,"createRowVisibility",{enumerable:!0,get:function(){return b}});function b(O){const p=new Set,h={active:()=>p.size>0,passes:u=>!(u&&p.has(String(u.key)))};let P=!1;function m(){P||(P=!0),O.set("hostFilter",h)}return{hideRow(u){const a=String(u);p.has(a)||(p.add(a),m())},showRow(u){const a=String(u);p.delete(a)&&m()},isRowHidden(u){return p.has(String(u))},hiddenRows(){return[...p]}}}}),C("packages/modules/dhtmlx-compat/spans.js",function(s,g){"use strict";Object.defineProperty(s,"createSpans",{enumerable:!0,get:function(){return u}});const O=g("packages/core/src/internal/util.js").warnOnce,p=new Set(["row","column","rowspan","colspan"]);function h(a,f){return`${String(a)}|${String(f)}`}function P(a,f,o,i){if(a&&typeof a=="object"){for(const c of Object.keys(a))p.has(c)||O(`dhtmlx.span.dropped:${c}`,`dhtmlx-compat does not translate the span key '${c}', so it has no effect. Lattice spans carry only geometry (rowspan/colspan); the cell's value, css and tooltip come from its own column, not the span.`);return{row:a.row,column:a.column,rows:Math.max(1,Math.floor(Number(a.rowspan)||1)),cols:Math.max(1,Math.floor(Number(a.colspan)||1))}}return{row:a,column:f,rows:Math.max(1,Math.floor(Number(o)||1)),cols:Math.max(1,Math.floor(Number(i)||1))}}function m(a,f){return a.map(o=>({...o,cell:{...o.cell||{},spanColumns:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.cols:1},spanRows:i=>{const c=f.get(h(i.row.key,i.colId));return c?c.rows:1}}}))}function u(a){const f=new Map;let o=!1;function i(){const c=o?a.get("columns"):m(a.get("columns"),f);o=!0,a.set("columns",c)}return{addSpan(c,y,n,l){const w=P(c,y,n,l);if(w.row===void 0||w.column===void 0)throw new TypeError("dhtmlx-compat: addSpan needs a row and a column.");if(w.rows<=1&&w.cols<=1){this.removeSpan(w.row,w.column);return}f.set(h(w.row,w.column),{rows:w.rows,cols:w.cols}),i()},removeSpan(c,y){f.delete(h(c,y))&&i()},getSpan(c,y){const n=f.get(h(c,y));if(n)return{rowspan:n.rows,colspan:n.cols}},spanCount(){return f.size}}}}),C("packages/modules/dhtmlx-compat/index.js",function(s,g){"use strict";Object.defineProperty(s,"Grid",{enumerable:!0,get:function(){return L}}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return H}});const O=Y("@toclocoinc/lattice-grid").createGrid;if(typeof O>"u")throw new Error("[lattice] dhtmlx-compat needs createGrid from the lattice-grid module. Load lattice-grid before dhtmlx-compat.");const h=g("packages/modules/dhtmlx-compat/columns.js").translateColumns,m=g("packages/modules/dhtmlx-compat/data.js").createData,u=g("packages/modules/dhtmlx-compat/selection.js"),a=u.createSelection,f=u.createRangeSelection,o=g("packages/modules/dhtmlx-compat/passthrough.js"),i=o.createHistory,c=o.createExport,n=g("packages/modules/dhtmlx-compat/events.js").createEvents,w=g("packages/modules/dhtmlx-compat/rows.js").createRowVisibility,E=g("packages/modules/dhtmlx-compat/spans.js").createSpans,S=g("packages/modules/dhtmlx-compat/util.js"),I=S.rowsFrom,F=S.reportUntranslated,$=new Set(["rowKey","columns","data","autoHeight","rowHeight","headerRowHeight","multiselection","dragItem","rowTransfer"]);function K(x){F(x,$,"config");const j={rowKey:x.rowKey||"id"};return x.columns!==void 0&&(j.columns=h(x.columns)),x.data!==void 0&&(j.rows=I(x.data)),x.autoHeight!==void 0&&(j.autoHeight=x.autoHeight),x.rowHeight!==void 0&&(j.rowHeight=x.rowHeight),x.headerRowHeight!==void 0&&(j.headerHeight=x.headerRowHeight),x.multiselection&&(j.selection="multiple"),x.dragItem==="row"&&(j.rowReorder=!0),x.rowTransfer!==void 0&&(j.rowTransfer=x.rowTransfer),j}class L{#e;#t;#n;constructor(j,v={}){this.#e=O(j,K(v)),this.data=m(this.#e),this.selection=a(this.#e),this.rangeSelection=f(this.#e),this.history=i(this.#e),this.export=c(this.#e),this.events=n(this.#e),this.#t=w(this.#e),this.#n=E(this.#e)}get lattice(){return this.#e}hideRow(j){this.#t.hideRow(j)}showRow(j){this.#t.showRow(j)}isRowHidden(j){return this.#t.isRowHidden(j)}addSpan(j,v,G,U){this.#n.addSpan(j,v,G,U)}removeSpan(j,v){this.#n.removeSpan(j,v)}getSpan(j,v){return this.#n.getSpan(j,v)}setColumns(j){if(j===void 0)return this.#e.get("columns");this.#e.set("columns",h(j))}destructor(){this.#e.destroy()}}const H=L});var M=J("packages/modules/dhtmlx-compat/index.js");if(typeof module=="object"&&module.exports)module.exports=M;else if(typeof define=="function"&&define.amd)define(function(){return M});else{var ne=D.LatticeGrid||(D.LatticeGrid={});for(var z in M)z!=="default"&&(ne[z]=M[z])}})(typeof globalThis<"u"?globalThis:this);
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=dhtmlx-compat.min.js.map
|
package/modules/gantt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.88.
|
|
2
|
+
* Lattice Grid 1.88.3, gantt module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -1013,7 +1013,9 @@ export type GanttEventName =
|
|
|
1013
1013
|
/** A `beforeTaskDelete` handler refused the delete. */
|
|
1014
1014
|
| 'taskDelete:cancelled'
|
|
1015
1015
|
/** The undo/redo timeline changed — an edit was recorded, undone, redone or cleared. */
|
|
1016
|
-
| 'history'
|
|
1016
|
+
| 'history'
|
|
1017
|
+
/** A split-view column border or the table/timeline divider finished a drag or keyboard resize. Fired once per gesture, never mid-drag. */
|
|
1018
|
+
| 'columnResize';
|
|
1017
1019
|
|
|
1018
1020
|
/** What a handler receives, per Gantt event. */
|
|
1019
1021
|
export interface GanttEventPayloads {
|
|
@@ -1051,6 +1053,27 @@ export interface GanttEventPayloads {
|
|
|
1051
1053
|
'taskDelete:cancelled': GanttTaskDeleteCancelledEvent;
|
|
1052
1054
|
/** The undo/redo timeline's new state. */
|
|
1053
1055
|
history: GanttHistoryEvent;
|
|
1056
|
+
/** The settled column/divider width, and a snapshot of every width. */
|
|
1057
|
+
columnResize: GanttColumnResizeEvent;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* The payload of the `columnResize` event, fired once a
|
|
1062
|
+
* split-view column-border or table/timeline-divider drag or keyboard
|
|
1063
|
+
* resize settles — never mid-drag, so one gesture is exactly one event.
|
|
1064
|
+
*/
|
|
1065
|
+
export interface GanttColumnResizeEvent {
|
|
1066
|
+
/** The column `key` that was resized, or `'grid'` for the table/timeline divider. */
|
|
1067
|
+
key: string;
|
|
1068
|
+
/** The settled width, in pixels, after the column's/divider's own `minWidth`/`maxWidth` clamp. */
|
|
1069
|
+
width: number;
|
|
1070
|
+
/**
|
|
1071
|
+
* Every left-panel column's current rendered width, keyed by its own
|
|
1072
|
+
* `key`, plus the divider's own width under `'grid'` — a full snapshot a
|
|
1073
|
+
* host can persist directly, e.g. alongside `gantt.getState()`'s own
|
|
1074
|
+
* `columnWidths` (which carries the same shape, minus `grid`).
|
|
1075
|
+
*/
|
|
1076
|
+
widths: Record<string, number>;
|
|
1054
1077
|
}
|
|
1055
1078
|
|
|
1056
1079
|
/**
|
|
@@ -1107,6 +1130,20 @@ export interface GanttSplitView {
|
|
|
1107
1130
|
* `getState`/`setState`. A no-op when neither band is mounted.
|
|
1108
1131
|
*/
|
|
1109
1132
|
setWorkloadUnit(unit: 'hours' | 'percent' | 'cost'): void;
|
|
1133
|
+
/**
|
|
1134
|
+
* Every left-panel column's current rendered width, keyed by column
|
|
1135
|
+
* `key` — every column, not merely a resized one, so
|
|
1136
|
+
* restoring this exact snapshot reproduces the layout on screen.
|
|
1137
|
+
* Round-trips through the controller's `getState`/`setState`.
|
|
1138
|
+
*/
|
|
1139
|
+
getColumnWidths(): Record<string, number>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Restore column widths from {@link getColumnWidths}.
|
|
1142
|
+
* Each is clamped to that column's own `minWidth`/`maxWidth` and skipped
|
|
1143
|
+
* for an unknown key or a `resizable: false` column, then the view
|
|
1144
|
+
* redraws.
|
|
1145
|
+
*/
|
|
1146
|
+
setColumnWidths(widths: Record<string, number>): void;
|
|
1110
1147
|
/**
|
|
1111
1148
|
* Serialise this split view — the left panel, the timeline and whichever
|
|
1112
1149
|
* bands are mounted — to a standalone SVG string, drawn
|
|
@@ -1498,8 +1535,26 @@ export interface Gantt {
|
|
|
1498
1535
|
* editable plan the assignee cell opens the assignment picker. A column
|
|
1499
1536
|
* with no `kind` shows the raw task's `key` and edits it only with
|
|
1500
1537
|
* `editable: true`.
|
|
1538
|
+
*
|
|
1539
|
+
* Every column header carries a draggable right border with a
|
|
1540
|
+
* col-resize cursor: a pointer drag, or arrow keys
|
|
1541
|
+
* once the border itself is focused (8px a press, 32px with Shift).
|
|
1542
|
+
* `minWidth`/`maxWidth` clamp how far it goes; `resizable: false` omits
|
|
1543
|
+
* the border entirely. The table/timeline divider (`gridWidth`) is the
|
|
1544
|
+
* same gesture; a settled drag or keystroke on either fires exactly one
|
|
1545
|
+
* `columnResize`, and every width — the divider's included, under the
|
|
1546
|
+
* key `'grid'` — round-trips through `getState`/`setState`.
|
|
1501
1547
|
*/
|
|
1502
|
-
columns?: Array<'name' | 'start' | 'end' | 'duration' | 'assignee' | 'progress' | 'effort' | 'units' | {
|
|
1548
|
+
columns?: Array<'name' | 'start' | 'end' | 'duration' | 'assignee' | 'progress' | 'effort' | 'units' | {
|
|
1549
|
+
key: string; title?: string; width?: number; kind?: 'name' | 'assignee' | 'progress' | 'evm' | 'plannedPercentComplete' | 'start' | 'end' | 'duration' | 'effort' | 'units' | 'number'; metric?: 'bac' | 'pv' | 'ev' | 'ac' | 'sv' | 'cv' | 'spi' | 'cpi'; digits?: number; editable?: boolean; editField?: string;
|
|
1550
|
+
/** The narrowest this column can be dragged/keyed to; default 80 for `kind: 'name'`, 40 otherwise. */
|
|
1551
|
+
minWidth?: number;
|
|
1552
|
+
/** The widest this column can be dragged/keyed to; default unbounded. */
|
|
1553
|
+
maxWidth?: number;
|
|
1554
|
+
/** `false` omits the resize border on this column's header; default true. */
|
|
1555
|
+
resizable?: boolean;
|
|
1556
|
+
render?: (task: GanttScheduledTask, ctx: { rawTask: GanttTask; depth: number }) => unknown;
|
|
1557
|
+
}>;
|
|
1503
1558
|
/**
|
|
1504
1559
|
* A resource workload band beneath the split view:
|
|
1505
1560
|
* one row per resource on the left and, on the right, that resource's
|