@omegagrid/dashboard 0.10.30 → 0.10.31
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/ui/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAO,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAKvH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,cAAe,SAAQ,KAAK;IAExC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;gBAEvB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC;CAIvD;AAED,qBACa,SAAU,SAAQ,cAAe,YAAW,MAAM;IAE9D,MAAM,CAAC,MAAM,iCAAkC;IAG/C,KAAK,EAAE,cAAc,CAAC;IAGtB,UAAU,UAAS;IAGnB,MAAM,UAAS;IAGf,eAAe,EAAE,gBAAgB,CAAC;IAGlC,KAAK,EAAE,QAAQ,CAAC;IAGhB,SAAS,EAAE,SAAS,CAAC;IAGrB,OAAO,EAAE,cAAc,CAAC;IAGxB,WAAW,EAAE,cAAc,CAAC;IAG5B,UAAU,EAAE,iBAAiB,CAAC;IAE9B,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,mBAAmB,CAAgB;IAC3C,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,WAAW,CAAS;IAE5B,QAAQ,CAAC,U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MrC,eAAe,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI;IAM5C,aAAa;IAMb,MAAM;IAmBA,QAAQ;IAyCd,OAAO;IAIP,MAAM,kDAgBC;CAEP"}
|
package/dist/ui/dashboard.js
CHANGED
|
@@ -271,7 +271,7 @@ let Dashboard = class Dashboard extends OmegaComponent {
|
|
|
271
271
|
${map(this.model.items, item => html `
|
|
272
272
|
<og-dashboard-item
|
|
273
273
|
?designMode="${this.designMode}"
|
|
274
|
-
.model="${item}"
|
|
274
|
+
.model="${item}"
|
|
275
275
|
.components="${this.components}">
|
|
276
276
|
</og-dashboard-item>
|
|
277
277
|
`)}
|
|
@@ -323,9 +323,10 @@ let Dashboard = class Dashboard extends OmegaComponent {
|
|
|
323
323
|
if (!this.model)
|
|
324
324
|
return;
|
|
325
325
|
this.items?.forEach((item) => this.setItemPosition(item, item.model));
|
|
326
|
+
const h = Math.max(this.model.size.h * (this.baseSize.h + this.model.options.gap) + this.model.options.gap, this.container.clientHeight);
|
|
326
327
|
dom.setSize(this.content, {
|
|
327
328
|
w: this.model.size.w * (this.baseSize.w + this.model.options.gap) + this.model.options.gap,
|
|
328
|
-
h:
|
|
329
|
+
h: h
|
|
329
330
|
});
|
|
330
331
|
this.items?.forEach((item) => item.layout());
|
|
331
332
|
this.drawGrid();
|
package/dist/ui/dashboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/ui/dashboard.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAoB,cAAc,EAAU,cAAc,EAAE,GAAG,EAAyB,MAAM,iBAAiB,CAAC;AACvH,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,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nimport { html } from 'lit';\nimport { customElement, property, query, queryAll } from 'lit/decorators.js';\nimport { map } from 'lit/directives/map.js';\nimport { style } from './dashboard.style';\nimport { DashboardItemModel, DashboardModel } from '../model';\nimport { DashboardSource } from '../types';\nimport { DashboardItem } from './dashboardItem';\n\nexport class DashboardEvent extends Event {\n\n\treadonly item: DashboardItem;\n\treadonly model: DashboardItemModel;\n\n\tconstructor(type: string, args: Partial<DashboardEvent>) {\n\t\tsuper(`dashboard.${type}`, {bubbles: true, composed: true});\n\t\tObject.assign(this, args);\n\t}\n}\n\n@customElement('og-dashboard')\nexport class Dashboard extends OmegaComponent implements Layout {\n\n\tstatic styles = [OmegaComponent.styles, style];\n\n\t@property({type: Object})\n\tmodel: DashboardModel;\n\n\t@property({type: Boolean, reflect: true})\n\tdesignMode = false;\n\n\t@property({type: Boolean})\n\tnoGrid = false;\n\n\t@property({type: Object})\n\tcreateComponent: ComponentFactory;\n\n\t@queryAll('og-dashboard-item')\n\titems: NodeList;\n\n\t@query('og-container')\n\tcontainer: Container;\n\n\t@query('[slot=\"content\"]')\n\tcontent: HTMLDivElement;\n\n\t@query('.item-placeholder')\n\tplaceholder: HTMLDivElement;\n\n\t@query('.item-grid')\n\tgridCanvas: HTMLCanvasElement;\n\n\tprivate _currentItem: DashboardItem;\n\tprivate _previewPositions: Rect[];\n\tprivate _autoScrollInterval: number = null;\n\tprivate _autoScrollSpeed = { x: 0, y: 0 };\n\tprivate _isResizing = false;\n\n\treadonly components = new ComponentStore<HTMLElement & Layout>(\n\t\tid => this.createComponent ? this.createComponent(id) as HTMLElement & Layout : null\n\t);\n\n\tprivate _baseSize: Size;\n\tget baseSize() {\n\t\tif (this._baseSize) return this._baseSize;\n\t\tconst { columns, columnWidth, rows, rowHeight, gap } = this.model.options;\n\n\t\tthis._baseSize = {\n\t\t\tw: columnWidth || (columns ? (this.container.clientWidth - ((columns + 1) * gap)) / columns : null),\n\t\t\th: rowHeight || (rows ? (this.container.clientHeight - ((rows + 1) * gap)) / rows : null),\n\t\t};\n\n\t\tif (this._baseSize.w == null) this._baseSize.w = this._baseSize.h;\n\t\tif (this._baseSize.h == null) this._baseSize.h = this._baseSize.w;\n\t\treturn this._baseSize;\n\t}\n\n\tstartMove(item: DashboardItem) {\n\t\tthis._currentItem = item;\n\t\tthis._currentItem.classList.toggle('active', true);\n\t\tthis.classList.toggle('moving', true);\n\t\tthis._isResizing = false;\n\t}\n\n\tstartResize(item: DashboardItem) {\n\t\tthis._currentItem = item;\n\t\tthis._currentItem.classList.toggle('active', true);\n\t\tthis.classList.toggle('moving', true);\n\t\tthis._isResizing = true;\n\t}\n\n\tstopMove() {\n\t\tif (!this._currentItem) return;\n\t\tthis._currentItem.classList.toggle('active', false);\n\t\tthis._currentItem = null;\n\t\tthis.classList.toggle('moving', false);\n\t\tthis.hidePlaceholder();\n\t\tthis.updatePreviewPositions();\n\t\tthis.stopAutoScroll();\n\t}\n\n\tget scrollOffset() {\n\t\treturn this.container?.verticalSlider?.value || 0;\n\t}\n\n\toffsetToXCoord(offset: number) {\n\t\treturn Math.max(0, Math.floor(offset / (this.baseSize.w + this.model.options.gap)));\n\t}\n\n\toffsetToYCoord(offset: number) {\n\t\treturn Math.max(0, Math.floor(offset / (this.baseSize.h + this.model.options.gap)));\n\t}\n\n\tupdatePreviewPositions() {\n\t\tif (!this._previewPositions) return;\n\t\tthis.model.updatePositions(this._previewPositions);\n\t\tthis._previewPositions = null;\n\t\tthis.layout();\n\t}\n\n\tpreviewLayout(rect: Rect) {\n\t\tthis._previewPositions = this.model.calculatePositions(this._currentItem.model, rect);\n\t\tthis._previewPositions.forEach((rect, i) => {\n\t\t\tconst item = this.items[i] as DashboardItem;\n\t\t\tif (item && item != this._currentItem) this.setItemPosition(item, rect);\n\t\t});\n\t}\n\n\tcheckAutoScroll(item: DashboardItem) {\n\t\tif (!this.container) return;\n\n\t\t// For resize, also expand content area preemptively so there's space to scroll into\n\t\tif (this._isResizing) {\n\t\t\tthis.checkResizeExpansion(item);\n\t\t}\n\n\t\tconst threshold = 50; // pixels from edge to trigger scroll\n\t\tconst scrollSpeed = 5; // pixels per frame\n\t\tconst containerRect = this.container.getBoundingClientRect();\n\t\tconst itemRect = item.getBoundingClientRect();\n\n\t\tlet scrollX = 0;\n\t\tlet scrollY = 0;\n\n\t\t// Check horizontal scrolling\n\t\tif (itemRect.right > containerRect.right - threshold) {\n\t\t\tscrollX = scrollSpeed;\n\t\t} else if (itemRect.left < containerRect.left + threshold) {\n\t\t\tscrollX = -scrollSpeed;\n\t\t}\n\n\t\t// Check vertical scrolling\n\t\tif (itemRect.bottom > containerRect.bottom - threshold) {\n\t\t\tscrollY = scrollSpeed;\n\t\t} else if (itemRect.top < containerRect.top + threshold) {\n\t\t\tscrollY = -scrollSpeed;\n\t\t}\n\n\t\tthis._autoScrollSpeed = { x: scrollX, y: scrollY };\n\n\t\tif ((scrollX !== 0 || scrollY !== 0) && !this._autoScrollInterval) {\n\t\t\tthis.startAutoScroll();\n\t\t} else if (scrollX === 0 && scrollY === 0 && this._autoScrollInterval) {\n\t\t\tthis.stopAutoScroll();\n\t\t}\n\t}\n\n\tcheckResizeExpansion(item: DashboardItem) {\n\t\tif (!this.container || !this.model) return;\n\n\t\tconst baseSize = this.baseSize;\n\t\tconst gap = this.model.options.gap;\n\n\t\t// Item edges in content coordinates - offsetTop is already content-relative\n\t\tconst itemBottom = item.offsetTop + item.offsetHeight;\n\t\tconst itemRight = item.offsetLeft + item.offsetWidth;\n\t\tconst currentContentHeight = this.content.offsetHeight;\n\t\tconst currentContentWidth = this.content.offsetWidth;\n\n\t\t// Threshold: expand when item is within 1 grid cell of the content edge\n\t\tconst thresholdY = baseSize.h + gap;\n\t\tconst thresholdX = baseSize.w + gap;\n\n\t\tlet newHeight = currentContentHeight;\n\t\tlet newWidth = currentContentWidth;\n\t\tlet needsUpdate = false;\n\n\t\tif (itemBottom > currentContentHeight - thresholdY) {\n\t\t\tnewHeight = currentContentHeight + 5 * (baseSize.h + gap);\n\t\t\tneedsUpdate = true;\n\t\t}\n\n\t\tif (itemRight > currentContentWidth - thresholdX) {\n\t\t\tnewWidth = currentContentWidth + 5 * (baseSize.w + gap);\n\t\t\tneedsUpdate = true;\n\t\t}\n\n\t\tif (needsUpdate) {\n\t\t\tdom.setSize(this.content, { w: newWidth, h: newHeight });\n\t\t\tthis.model.size.w = Math.max(this.model.size.w, Math.ceil((newWidth - gap) / (baseSize.w + gap)));\n\t\t\tthis.model.size.h = Math.max(this.model.size.h, Math.ceil((newHeight - gap) / (baseSize.h + gap)));\n\t\t\tthis.drawGrid();\n\t\t}\n\t}\n\n\tstartAutoScroll() {\n\t\tif (this._autoScrollInterval) return;\n\t\t\n\t\tthis._autoScrollInterval = window.setInterval(() => {\n\t\t\tif (!this.container) return;\n\n\t\t\tconst { x, y } = this._autoScrollSpeed;\n\n\t\t\t// Scroll vertically\n\t\t\tif (y !== 0 && this.container.verticalSlider) {\n\t\t\t\tconst currentScroll = this.container.verticalSlider.value;\n\t\t\t\tconst maxScroll = this.container.verticalSlider.maxValue;\n\t\t\t\t\n\t\t\t\t// Expand content area if scrolling down near the bottom\n\t\t\t\tif (y > 0 && currentScroll >= maxScroll * 0.85) {\n\t\t\t\t\tthis.expandContentArea();\n\t\t\t\t\t// After expanding, continue scrolling\n\t\t\t\t\tconst newMaxScroll = this.container.verticalSlider.maxValue;\n\t\t\t\t\tthis.container.scrollVerticalTo(Math.min(newMaxScroll, currentScroll + y));\n\t\t\t\t} else {\n\t\t\t\t\tconst newScroll = Math.max(0, Math.min(maxScroll, currentScroll + y));\n\t\t\t\t\tthis.container.scrollVerticalTo(newScroll);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Scroll horizontally\n\t\t\tif (x !== 0 && this.container.horizontalSlider) {\n\t\t\t\tconst currentScroll = this.container.horizontalSlider.value;\n\t\t\t\tconst maxScroll = this.container.horizontalSlider.maxValue;\n\t\t\t\t\n\t\t\t\t// Expand content area if scrolling right near the edge\n\t\t\t\tif (x > 0 && currentScroll >= maxScroll * 0.85) {\n\t\t\t\t\tthis.expandContentArea();\n\t\t\t\t\t// After expanding, continue scrolling\n\t\t\t\t\tconst newMaxScroll = this.container.horizontalSlider.maxValue;\n\t\t\t\t\tthis.container.scrollHorizontalTo(Math.min(newMaxScroll, currentScroll + x));\n\t\t\t\t} else {\n\t\t\t\t\tconst newScroll = Math.max(0, Math.min(maxScroll, currentScroll + x));\n\t\t\t\t\tthis.container.scrollHorizontalTo(newScroll);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// During resize, update item size with new scroll offset so placeholder follows smoothly\n\t\t\tif (this._isResizing && this._currentItem) {\n\t\t\t\tthis._currentItem.updateResize();\n\t\t\t}\n\t\t}, 16); // ~60fps\n\t}\n\n\tstopAutoScroll() {\n\t\tif (this._autoScrollInterval) {\n\t\t\twindow.clearInterval(this._autoScrollInterval);\n\t\t\tthis._autoScrollInterval = null;\n\t\t}\n\t\tthis._autoScrollSpeed = { x: 0, y: 0 };\n\t}\n\n\texpandContentArea() {\n\t\tif (!this.model || !this._currentItem) return;\n\n\t\t// Calculate how much space we need based on current item position\n\t\tconst topOffset = this.scrollOffset;\n\t\tconst itemBottom = this._currentItem.offsetTop + this._currentItem.offsetHeight + topOffset;\n\t\tconst itemRight = this._currentItem.offsetLeft + this._currentItem.offsetWidth;\n\n\t\tconst currentContentHeight = this.content.offsetHeight;\n\t\tconst currentContentWidth = this.content.offsetWidth;\n\n\t\t// Expand by 2 grid cells if needed\n\t\tconst expandRows = 2;\n\t\tconst expandCols = 2;\n\t\tconst baseSize = this.baseSize;\n\t\tconst gap = this.model.options.gap;\n\n\t\tlet newHeight = currentContentHeight;\n\t\tlet newWidth = currentContentWidth;\n\n\t\t// Check if we need more height - only expand, never shrink\n\t\tif (itemBottom > currentContentHeight - gap * 2) {\n\t\t\tnewHeight = Math.max(currentContentHeight, currentContentHeight + expandRows * (baseSize.h + gap));\n\t\t}\n\n\t\t// Check if we need more width - only expand, never shrink\n\t\tif (itemRight > currentContentWidth - gap * 2) {\n\t\t\tnewWidth = Math.max(currentContentWidth, currentContentWidth + expandCols * (baseSize.w + gap));\n\t\t}\n\n\t\t// Only update if size actually changed\n\t\tif (newHeight !== currentContentHeight || newWidth !== currentContentWidth) {\n\t\t\tdom.setSize(this.content, { w: newWidth, h: newHeight });\n\t\t\t\n\t\t\t// Update model size to match new content dimensions\n\t\t\tconst newModelWidth = Math.ceil((newWidth - gap) / (baseSize.w + gap));\n\t\t\tconst newModelHeight = Math.ceil((newHeight - gap) / (baseSize.h + gap));\n\t\t\t\n\t\t\t// Only update if model size increased\n\t\t\tthis.model.size.w = Math.max(this.model.size.w, newModelWidth);\n\t\t\tthis.model.size.h = Math.max(this.model.size.h, newModelHeight);\n\t\t\t\n\t\t\tthis.drawGrid();\n\t\t}\n\t}\n\n\t_onItemMove = (e: DashboardEvent) => {\n\t\tif (!e.item.moving) return;\n\t\tconst topOffset = this.scrollOffset;\n\t\tconst x = this.offsetToXCoord(e.item.offsetLeft);\n\t\tconst y = this.offsetToYCoord(e.item.offsetTop + topOffset);\n\t\tconst rect: Rect = {x, y, w: e.item.model.w, h: e.item.model.h};\n\t\tthis.showPlaceholder(rect);\n\t\tthis.previewLayout(rect);\n\t\tthis.checkAutoScroll(e.item);\n\t}\n\n\t_onItemResize = (e: DashboardEvent) => {\n\t\tif (!e.item.resizing) return;\n\t\tconst topOffset = this.scrollOffset;\n\t\tconst w = this.offsetToXCoord(e.item.offsetLeft + e.item.offsetWidth) - e.item.model.x + 1;\n\t\tconst h = this.offsetToYCoord(e.item.offsetTop + e.item.offsetHeight + topOffset) - e.item.model.y + 1;\n\t\tconst rect: Rect = {x: e.item.model.x, y: e.item.model.y, w, h};\n\t\tthis.showPlaceholder(rect);\n\t\tthis.previewLayout(rect);\n\t\tthis.checkAutoScroll(e.item);\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('dashboard.movestart', (e: DashboardEvent) => this.startMove(e.item));\n\t\tthis.addEventListener('dashboard.resizestart', (e: DashboardEvent) => this.startResize(e.item));\n\t\tthis.addEventListener('dashboard.movestop', () => this.stopMove());\n\t\tthis.addEventListener('dashboard.resizestop', () => this.stopMove());\n\t\tthis.addEventListener('dashboard.move', this._onItemMove);\n\t\tthis.addEventListener('dashboard.resize', this._onItemResize);\n\t}\n\n\tcalculateItemLocation(item: Rect) : Rect {\n\t\tconst baseSize = this.baseSize;\n\t\tconst gap = this.model.options.gap;\n\t\treturn {\n\t\t\tx: item.x * (baseSize.w + gap) + gap,\n\t\t\ty: item.y * (baseSize.h + gap) + gap,\n\t\t\tw: item.w * (baseSize.w + gap) - gap,\n\t\t\th: item.h * (baseSize.h + gap) - gap,\n\t\t};\n\t}\n\n\tshowPlaceholder(rect: Rect) {\n\t\tdom.showElement(this.placeholder);\n\t\tthis.setItemPosition(this.placeholder, rect);\n\t}\n\n\thidePlaceholder() {\n\t\tdom.hideElement(this.placeholder);\n\t}\n\n\tsetSourceData(source: DashboardSource) {\n\t\tthis.components.clear();\n\t\tthis.model = new DashboardModel(source);\n\t\tthis.model.detectAndFixCollisions();\n\t}\n\n\tsetItemPosition(elm: HTMLElement, rect: Rect) {\n\t\tconst {x, y, w, h} = this.calculateItemLocation(rect);\n\t\tdom.setSize(elm, { w, h});\n\t\tdom.setPosition(elm, {l: x, t: y});\n\t}\n\n\tfixCollisions() {\n\t\tif (!this.model) return;\n\t\tthis.model.detectAndFixCollisions();\n\t\tthis.layout();\n\t}\n\n\tlayout() {\n\t\tthis._baseSize = null;\n\t\tif (!this.model) return;\n\t\tthis.items?.forEach((item: DashboardItem) => this.setItemPosition(item, item.model));\n\t\t\n\t\tdom.setSize(this.content, {\n\t\t\tw: this.model.size.w * (this.baseSize.w + this.model.options.gap) + this.model.options.gap,\n\t\t\th: this.model.size.h * (this.baseSize.h + this.model.options.gap) + this.model.options.gap\n\t\t});\n\n\t\tthis.items?.forEach((item: DashboardItem) => item.layout());\n\t\tthis.drawGrid();\n\t}\n\n\tasync drawGrid() {\n\t\tif (!this.gridCanvas) return;\n\t\tif (this.container.isUpdatePending) await this.container.updateComplete;\n\n\t\tconst ctx = this.gridCanvas.getContext('2d');\n\t\tif (!ctx) return;\n\n\t\tconst gap = this.model.options.gap;\n\t\tconst baseSize = this.baseSize;\n\t\t\n\t\tthis.gridCanvas.style.width = '100%';\n\t\tthis.gridCanvas.style.height = '100%';\n\t\tconst width = this.gridCanvas.offsetWidth;\n\t\tthis.gridCanvas.width = width;\n\t\tconst height = this.gridCanvas.offsetHeight;\n\t\tthis.gridCanvas.height = height;\n\t\tconst columns = width / baseSize.w;\n\t\tconst rows = height / baseSize.h;\n\n\n\t\tctx.clearRect(0, 0, width, height);\n\t\tctx.strokeStyle = 'rgba(116,116,116,0.2)';\n\t\tctx.lineWidth = 1;\n\n\t\tfor (let i = 0; i <= columns; i++) {\n\t\t\tconst x = Math.round(i * (baseSize.w + gap) + gap / 2) + 0.5;\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x, 0);\n\t\t\tctx.lineTo(x, height);\n\t\t\tctx.stroke();\n\t\t}\n\n\t\tfor (let i = 0; i <= rows; i++) {\n\t\t\tconst y = Math.round(i * (baseSize.h + gap) + gap / 2) + 0.5;\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(0, y);\n\t\t\tctx.lineTo(width, y);\n\t\t\tctx.stroke();\n\t\t}\n\t}\n\n\tupdated() {\n\t\tthis.layout();\n\t}\n\t\n\trender = () => this.model ? html`\n\t\t<og-container>\n\t\t\t<div slot=\"content\">\n\t\t\t\t${this.designMode ? html`\n\t\t\t\t\t${this.noGrid ? '' : html`<canvas class=\"item-grid\"></canvas>`}\n\t\t\t\t\t<div class=\"item-placeholder\"></div>\n\t\t\t\t` : null}\n\t\t\t\t${map(this.model.items, item => html`\n\t\t\t\t\t<og-dashboard-item\n\t\t\t\t\t\t?designMode=\"${this.designMode}\"\n\t\t\t\t\t\t.model=\"${item}\" \n\t\t\t\t\t\t.components=\"${this.components}\">\n\t\t\t\t\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O,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;6CACtB;AAGnB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;yCACX;AAGf;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;kDACS;AAGlC;IADC,QAAQ,CAAC,mBAAmB,CAAC;wCACd;AAGhB;IADC,KAAK,CAAC,cAAc,CAAC;4CACD;AAGrB;IADC,KAAK,CAAC,kBAAkB,CAAC;0CACF;AAGxB;IADC,KAAK,CAAC,mBAAmB,CAAC;8CACC;AAG5B;IADC,KAAK,CAAC,YAAY,CAAC;6CACU;AA7BlB,SAAS;IADrB,aAAa,CAAC,cAAc,CAAC;GACjB,SAAS,CAubrB","sourcesContent":["import { ComponentFactory, ComponentStore, Layout, OmegaComponent, dom, Rect, Container, Size } from '@omegagrid/core';\nimport { html } from 'lit';\nimport { customElement, property, query, queryAll } from 'lit/decorators.js';\nimport { map } from 'lit/directives/map.js';\nimport { style } from './dashboard.style';\nimport { DashboardItemModel, DashboardModel } from '../model';\nimport { DashboardSource } from '../types';\nimport { DashboardItem } from './dashboardItem';\n\nexport class DashboardEvent extends Event {\n\n\treadonly item: DashboardItem;\n\treadonly model: DashboardItemModel;\n\n\tconstructor(type: string, args: Partial<DashboardEvent>) {\n\t\tsuper(`dashboard.${type}`, {bubbles: true, composed: true});\n\t\tObject.assign(this, args);\n\t}\n}\n\n@customElement('og-dashboard')\nexport class Dashboard extends OmegaComponent implements Layout {\n\n\tstatic styles = [OmegaComponent.styles, style];\n\n\t@property({type: Object})\n\tmodel: DashboardModel;\n\n\t@property({type: Boolean, reflect: true})\n\tdesignMode = false;\n\n\t@property({type: Boolean})\n\tnoGrid = false;\n\n\t@property({type: Object})\n\tcreateComponent: ComponentFactory;\n\n\t@queryAll('og-dashboard-item')\n\titems: NodeList;\n\n\t@query('og-container')\n\tcontainer: Container;\n\n\t@query('[slot=\"content\"]')\n\tcontent: HTMLDivElement;\n\n\t@query('.item-placeholder')\n\tplaceholder: HTMLDivElement;\n\n\t@query('.item-grid')\n\tgridCanvas: HTMLCanvasElement;\n\n\tprivate _currentItem: DashboardItem;\n\tprivate _previewPositions: Rect[];\n\tprivate _autoScrollInterval: number = null;\n\tprivate _autoScrollSpeed = { x: 0, y: 0 };\n\tprivate _isResizing = false;\n\n\treadonly components = new ComponentStore<HTMLElement & Layout>(\n\t\tid => this.createComponent ? this.createComponent(id) as HTMLElement & Layout : null\n\t);\n\n\tprivate _baseSize: Size;\n\tget baseSize() {\n\t\tif (this._baseSize) return this._baseSize;\n\t\tconst { columns, columnWidth, rows, rowHeight, gap } = this.model.options;\n\n\t\tthis._baseSize = {\n\t\t\tw: columnWidth || (columns ? (this.container.clientWidth - ((columns + 1) * gap)) / columns : null),\n\t\t\th: rowHeight || (rows ? (this.container.clientHeight - ((rows + 1) * gap)) / rows : null),\n\t\t};\n\n\t\tif (this._baseSize.w == null) this._baseSize.w = this._baseSize.h;\n\t\tif (this._baseSize.h == null) this._baseSize.h = this._baseSize.w;\n\t\treturn this._baseSize;\n\t}\n\n\tstartMove(item: DashboardItem) {\n\t\tthis._currentItem = item;\n\t\tthis._currentItem.classList.toggle('active', true);\n\t\tthis.classList.toggle('moving', true);\n\t\tthis._isResizing = false;\n\t}\n\n\tstartResize(item: DashboardItem) {\n\t\tthis._currentItem = item;\n\t\tthis._currentItem.classList.toggle('active', true);\n\t\tthis.classList.toggle('moving', true);\n\t\tthis._isResizing = true;\n\t}\n\n\tstopMove() {\n\t\tif (!this._currentItem) return;\n\t\tthis._currentItem.classList.toggle('active', false);\n\t\tthis._currentItem = null;\n\t\tthis.classList.toggle('moving', false);\n\t\tthis.hidePlaceholder();\n\t\tthis.updatePreviewPositions();\n\t\tthis.stopAutoScroll();\n\t}\n\n\tget scrollOffset() {\n\t\treturn this.container?.verticalSlider?.value || 0;\n\t}\n\n\toffsetToXCoord(offset: number) {\n\t\treturn Math.max(0, Math.floor(offset / (this.baseSize.w + this.model.options.gap)));\n\t}\n\n\toffsetToYCoord(offset: number) {\n\t\treturn Math.max(0, Math.floor(offset / (this.baseSize.h + this.model.options.gap)));\n\t}\n\n\tupdatePreviewPositions() {\n\t\tif (!this._previewPositions) return;\n\t\tthis.model.updatePositions(this._previewPositions);\n\t\tthis._previewPositions = null;\n\t\tthis.layout();\n\t}\n\n\tpreviewLayout(rect: Rect) {\n\t\tthis._previewPositions = this.model.calculatePositions(this._currentItem.model, rect);\n\t\tthis._previewPositions.forEach((rect, i) => {\n\t\t\tconst item = this.items[i] as DashboardItem;\n\t\t\tif (item && item != this._currentItem) this.setItemPosition(item, rect);\n\t\t});\n\t}\n\n\tcheckAutoScroll(item: DashboardItem) {\n\t\tif (!this.container) return;\n\n\t\t// For resize, also expand content area preemptively so there's space to scroll into\n\t\tif (this._isResizing) {\n\t\t\tthis.checkResizeExpansion(item);\n\t\t}\n\n\t\tconst threshold = 50; // pixels from edge to trigger scroll\n\t\tconst scrollSpeed = 5; // pixels per frame\n\t\tconst containerRect = this.container.getBoundingClientRect();\n\t\tconst itemRect = item.getBoundingClientRect();\n\n\t\tlet scrollX = 0;\n\t\tlet scrollY = 0;\n\n\t\t// Check horizontal scrolling\n\t\tif (itemRect.right > containerRect.right - threshold) {\n\t\t\tscrollX = scrollSpeed;\n\t\t} else if (itemRect.left < containerRect.left + threshold) {\n\t\t\tscrollX = -scrollSpeed;\n\t\t}\n\n\t\t// Check vertical scrolling\n\t\tif (itemRect.bottom > containerRect.bottom - threshold) {\n\t\t\tscrollY = scrollSpeed;\n\t\t} else if (itemRect.top < containerRect.top + threshold) {\n\t\t\tscrollY = -scrollSpeed;\n\t\t}\n\n\t\tthis._autoScrollSpeed = { x: scrollX, y: scrollY };\n\n\t\tif ((scrollX !== 0 || scrollY !== 0) && !this._autoScrollInterval) {\n\t\t\tthis.startAutoScroll();\n\t\t} else if (scrollX === 0 && scrollY === 0 && this._autoScrollInterval) {\n\t\t\tthis.stopAutoScroll();\n\t\t}\n\t}\n\n\tcheckResizeExpansion(item: DashboardItem) {\n\t\tif (!this.container || !this.model) return;\n\n\t\tconst baseSize = this.baseSize;\n\t\tconst gap = this.model.options.gap;\n\n\t\t// Item edges in content coordinates - offsetTop is already content-relative\n\t\tconst itemBottom = item.offsetTop + item.offsetHeight;\n\t\tconst itemRight = item.offsetLeft + item.offsetWidth;\n\t\tconst currentContentHeight = this.content.offsetHeight;\n\t\tconst currentContentWidth = this.content.offsetWidth;\n\n\t\t// Threshold: expand when item is within 1 grid cell of the content edge\n\t\tconst thresholdY = baseSize.h + gap;\n\t\tconst thresholdX = baseSize.w + gap;\n\n\t\tlet newHeight = currentContentHeight;\n\t\tlet newWidth = currentContentWidth;\n\t\tlet needsUpdate = false;\n\n\t\tif (itemBottom > currentContentHeight - thresholdY) {\n\t\t\tnewHeight = currentContentHeight + 5 * (baseSize.h + gap);\n\t\t\tneedsUpdate = true;\n\t\t}\n\n\t\tif (itemRight > currentContentWidth - thresholdX) {\n\t\t\tnewWidth = currentContentWidth + 5 * (baseSize.w + gap);\n\t\t\tneedsUpdate = true;\n\t\t}\n\n\t\tif (needsUpdate) {\n\t\t\tdom.setSize(this.content, { w: newWidth, h: newHeight });\n\t\t\tthis.model.size.w = Math.max(this.model.size.w, Math.ceil((newWidth - gap) / (baseSize.w + gap)));\n\t\t\tthis.model.size.h = Math.max(this.model.size.h, Math.ceil((newHeight - gap) / (baseSize.h + gap)));\n\t\t\tthis.drawGrid();\n\t\t}\n\t}\n\n\tstartAutoScroll() {\n\t\tif (this._autoScrollInterval) return;\n\n\t\tthis._autoScrollInterval = window.setInterval(() => {\n\t\t\tif (!this.container) return;\n\n\t\t\tconst { x, y } = this._autoScrollSpeed;\n\n\t\t\t// Scroll vertically\n\t\t\tif (y !== 0 && this.container.verticalSlider) {\n\t\t\t\tconst currentScroll = this.container.verticalSlider.value;\n\t\t\t\tconst maxScroll = this.container.verticalSlider.maxValue;\n\n\t\t\t\t// Expand content area if scrolling down near the bottom\n\t\t\t\tif (y > 0 && currentScroll >= maxScroll * 0.85) {\n\t\t\t\t\tthis.expandContentArea();\n\t\t\t\t\t// After expanding, continue scrolling\n\t\t\t\t\tconst newMaxScroll = this.container.verticalSlider.maxValue;\n\t\t\t\t\tthis.container.scrollVerticalTo(Math.min(newMaxScroll, currentScroll + y));\n\t\t\t\t} else {\n\t\t\t\t\tconst newScroll = Math.max(0, Math.min(maxScroll, currentScroll + y));\n\t\t\t\t\tthis.container.scrollVerticalTo(newScroll);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Scroll horizontally\n\t\t\tif (x !== 0 && this.container.horizontalSlider) {\n\t\t\t\tconst currentScroll = this.container.horizontalSlider.value;\n\t\t\t\tconst maxScroll = this.container.horizontalSlider.maxValue;\n\n\t\t\t\t// Expand content area if scrolling right near the edge\n\t\t\t\tif (x > 0 && currentScroll >= maxScroll * 0.85) {\n\t\t\t\t\tthis.expandContentArea();\n\t\t\t\t\t// After expanding, continue scrolling\n\t\t\t\t\tconst newMaxScroll = this.container.horizontalSlider.maxValue;\n\t\t\t\t\tthis.container.scrollHorizontalTo(Math.min(newMaxScroll, currentScroll + x));\n\t\t\t\t} else {\n\t\t\t\t\tconst newScroll = Math.max(0, Math.min(maxScroll, currentScroll + x));\n\t\t\t\t\tthis.container.scrollHorizontalTo(newScroll);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// During resize, update item size with new scroll offset so placeholder follows smoothly\n\t\t\tif (this._isResizing && this._currentItem) {\n\t\t\t\tthis._currentItem.updateResize();\n\t\t\t}\n\t\t}, 16); // ~60fps\n\t}\n\n\tstopAutoScroll() {\n\t\tif (this._autoScrollInterval) {\n\t\t\twindow.clearInterval(this._autoScrollInterval);\n\t\t\tthis._autoScrollInterval = null;\n\t\t}\n\t\tthis._autoScrollSpeed = { x: 0, y: 0 };\n\t}\n\n\texpandContentArea() {\n\t\tif (!this.model || !this._currentItem) return;\n\n\t\t// Calculate how much space we need based on current item position\n\t\tconst topOffset = this.scrollOffset;\n\t\tconst itemBottom = this._currentItem.offsetTop + this._currentItem.offsetHeight + topOffset;\n\t\tconst itemRight = this._currentItem.offsetLeft + this._currentItem.offsetWidth;\n\n\t\tconst currentContentHeight = this.content.offsetHeight;\n\t\tconst currentContentWidth = this.content.offsetWidth;\n\n\t\t// Expand by 2 grid cells if needed\n\t\tconst expandRows = 2;\n\t\tconst expandCols = 2;\n\t\tconst baseSize = this.baseSize;\n\t\tconst gap = this.model.options.gap;\n\n\t\tlet newHeight = currentContentHeight;\n\t\tlet newWidth = currentContentWidth;\n\n\t\t// Check if we need more height - only expand, never shrink\n\t\tif (itemBottom > currentContentHeight - gap * 2) {\n\t\t\tnewHeight = Math.max(currentContentHeight, currentContentHeight + expandRows * (baseSize.h + gap));\n\t\t}\n\n\t\t// Check if we need more width - only expand, never shrink\n\t\tif (itemRight > currentContentWidth - gap * 2) {\n\t\t\tnewWidth = Math.max(currentContentWidth, currentContentWidth + expandCols * (baseSize.w + gap));\n\t\t}\n\n\t\t// Only update if size actually changed\n\t\tif (newHeight !== currentContentHeight || newWidth !== currentContentWidth) {\n\t\t\tdom.setSize(this.content, { w: newWidth, h: newHeight });\n\n\t\t\t// Update model size to match new content dimensions\n\t\t\tconst newModelWidth = Math.ceil((newWidth - gap) / (baseSize.w + gap));\n\t\t\tconst newModelHeight = Math.ceil((newHeight - gap) / (baseSize.h + gap));\n\n\t\t\t// Only update if model size increased\n\t\t\tthis.model.size.w = Math.max(this.model.size.w, newModelWidth);\n\t\t\tthis.model.size.h = Math.max(this.model.size.h, newModelHeight);\n\n\t\t\tthis.drawGrid();\n\t\t}\n\t}\n\n\t_onItemMove = (e: DashboardEvent) => {\n\t\tif (!e.item.moving) return;\n\t\tconst topOffset = this.scrollOffset;\n\t\tconst x = this.offsetToXCoord(e.item.offsetLeft);\n\t\tconst y = this.offsetToYCoord(e.item.offsetTop + topOffset);\n\t\tconst rect: Rect = {x, y, w: e.item.model.w, h: e.item.model.h};\n\t\tthis.showPlaceholder(rect);\n\t\tthis.previewLayout(rect);\n\t\tthis.checkAutoScroll(e.item);\n\t}\n\n\t_onItemResize = (e: DashboardEvent) => {\n\t\tif (!e.item.resizing) return;\n\t\tconst topOffset = this.scrollOffset;\n\t\tconst w = this.offsetToXCoord(e.item.offsetLeft + e.item.offsetWidth) - e.item.model.x + 1;\n\t\tconst h = this.offsetToYCoord(e.item.offsetTop + e.item.offsetHeight + topOffset) - e.item.model.y + 1;\n\t\tconst rect: Rect = {x: e.item.model.x, y: e.item.model.y, w, h};\n\t\tthis.showPlaceholder(rect);\n\t\tthis.previewLayout(rect);\n\t\tthis.checkAutoScroll(e.item);\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('dashboard.movestart', (e: DashboardEvent) => this.startMove(e.item));\n\t\tthis.addEventListener('dashboard.resizestart', (e: DashboardEvent) => this.startResize(e.item));\n\t\tthis.addEventListener('dashboard.movestop', () => this.stopMove());\n\t\tthis.addEventListener('dashboard.resizestop', () => this.stopMove());\n\t\tthis.addEventListener('dashboard.move', this._onItemMove);\n\t\tthis.addEventListener('dashboard.resize', this._onItemResize);\n\t}\n\n\tcalculateItemLocation(item: Rect) : Rect {\n\t\tconst baseSize = this.baseSize;\n\t\tconst gap = this.model.options.gap;\n\t\treturn {\n\t\t\tx: item.x * (baseSize.w + gap) + gap,\n\t\t\ty: item.y * (baseSize.h + gap) + gap,\n\t\t\tw: item.w * (baseSize.w + gap) - gap,\n\t\t\th: item.h * (baseSize.h + gap) - gap,\n\t\t};\n\t}\n\n\tshowPlaceholder(rect: Rect) {\n\t\tdom.showElement(this.placeholder);\n\t\tthis.setItemPosition(this.placeholder, rect);\n\t}\n\n\thidePlaceholder() {\n\t\tdom.hideElement(this.placeholder);\n\t}\n\n\tsetSourceData(source: DashboardSource) {\n\t\tthis.components.clear();\n\t\tthis.model = new DashboardModel(source);\n\t\tthis.model.detectAndFixCollisions();\n\t}\n\n\tsetItemPosition(elm: HTMLElement, rect: Rect) {\n\t\tconst {x, y, w, h} = this.calculateItemLocation(rect);\n\t\tdom.setSize(elm, { w, h});\n\t\tdom.setPosition(elm, {l: x, t: y});\n\t}\n\n\tfixCollisions() {\n\t\tif (!this.model) return;\n\t\tthis.model.detectAndFixCollisions();\n\t\tthis.layout();\n\t}\n\n\tlayout() {\n\t\tthis._baseSize = null;\n\t\tif (!this.model) return;\n\t\tthis.items?.forEach((item: DashboardItem) => this.setItemPosition(item, item.model));\n\n\t\tconst h = Math.max(\n\t\t\tthis.model.size.h * (this.baseSize.h + this.model.options.gap) + this.model.options.gap,\n\t\t\tthis.container.clientHeight\n\t\t);\n\n\t\tdom.setSize(this.content, {\n\t\t\tw: this.model.size.w * (this.baseSize.w + this.model.options.gap) + this.model.options.gap,\n\t\t\th: h\n\t\t});\n\n\t\tthis.items?.forEach((item: DashboardItem) => item.layout());\n\t\tthis.drawGrid();\n\t}\n\n\tasync drawGrid() {\n\t\tif (!this.gridCanvas) return;\n\t\tif (this.container.isUpdatePending) await this.container.updateComplete;\n\n\t\tconst ctx = this.gridCanvas.getContext('2d');\n\t\tif (!ctx) return;\n\n\t\tconst gap = this.model.options.gap;\n\t\tconst baseSize = this.baseSize;\n\n\t\tthis.gridCanvas.style.width = '100%';\n\t\tthis.gridCanvas.style.height = '100%';\n\t\tconst width = this.gridCanvas.offsetWidth;\n\t\tthis.gridCanvas.width = width;\n\t\tconst height = this.gridCanvas.offsetHeight;\n\t\tthis.gridCanvas.height = height;\n\t\tconst columns = width / baseSize.w;\n\t\tconst rows = height / baseSize.h;\n\n\n\t\tctx.clearRect(0, 0, width, height);\n\t\tctx.strokeStyle = 'rgba(116,116,116,0.2)';\n\t\tctx.lineWidth = 1;\n\n\t\tfor (let i = 0; i <= columns; i++) {\n\t\t\tconst x = Math.round(i * (baseSize.w + gap) + gap / 2) + 0.5;\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x, 0);\n\t\t\tctx.lineTo(x, height);\n\t\t\tctx.stroke();\n\t\t}\n\n\t\tfor (let i = 0; i <= rows; i++) {\n\t\t\tconst y = Math.round(i * (baseSize.h + gap) + gap / 2) + 0.5;\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(0, y);\n\t\t\tctx.lineTo(width, y);\n\t\t\tctx.stroke();\n\t\t}\n\t}\n\n\tupdated() {\n\t\tthis.layout();\n\t}\n\n\trender = () => this.model ? html`\n\t\t<og-container>\n\t\t\t<div slot=\"content\">\n\t\t\t\t${this.designMode ? html`\n\t\t\t\t\t${this.noGrid ? '' : html`<canvas class=\"item-grid\"></canvas>`}\n\t\t\t\t\t<div class=\"item-placeholder\"></div>\n\t\t\t\t` : null}\n\t\t\t\t${map(this.model.items, item => html`\n\t\t\t\t\t<og-dashboard-item\n\t\t\t\t\t\t?designMode=\"${this.designMode}\"\n\t\t\t\t\t\t.model=\"${item}\"\n\t\t\t\t\t\t.components=\"${this.components}\">\n\t\t\t\t\t</og-dashboard-item>\n\t\t\t\t`)}\n\t\t\t</div>\n\t\t</og-container>\n\t` : '';\n\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/dashboard",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.31",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Dashboard component",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@fortawesome/fontawesome-svg-core": "^7.0.1",
|
|
31
|
-
"@omegagrid/core": "^0.10.
|
|
32
|
-
"@omegagrid/localize": "^0.10.
|
|
31
|
+
"@omegagrid/core": "^0.10.31",
|
|
32
|
+
"@omegagrid/localize": "^0.10.31",
|
|
33
33
|
"date-fns": "^3.2.0",
|
|
34
34
|
"lit": "^3.1.1",
|
|
35
35
|
"ts-debounce": "^4.0.0"
|