@libs-ui/services-grid-layout 0.2.357-24 → 0.2.357-25
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/canvas/grid-layout-canvas.component.d.ts +18 -0
- package/esm2022/canvas/grid-layout-canvas.component.mjs +31 -8
- package/esm2022/grid-layout.service.mjs +15 -6
- package/esm2022/interfaces/grid-layout.interface.mjs +1 -1
- package/fesm2022/libs-ui-services-grid-layout.mjs +44 -12
- package/fesm2022/libs-ui-services-grid-layout.mjs.map +1 -1
- package/grid-layout.service.d.ts +6 -2
- package/interfaces/grid-layout.interface.d.ts +15 -0
- package/package.json +3 -3
package/grid-layout.service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { GridsterConfig } from 'gridster18';
|
|
3
3
|
import { T_gridLayout_changeEvent, T_gridLayout_newNode, T_gridLayout_config, T_gridLayout_node } from './interfaces/grid-layout.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -97,6 +97,10 @@ export declare class LibsUiGridLayoutService {
|
|
|
97
97
|
*
|
|
98
98
|
* @param host chỗ gắn RIÊNG của ô đó — mỗi khối một `ViewContainerRef`, dùng chung một cái thì
|
|
99
99
|
* mọi component bị dồn hết vào một ô.
|
|
100
|
+
* @param childCanvas khuôn mặt phẳng LỒNG của khối, chỉ có với khối container tự khai
|
|
101
|
+
* `getComponentOutlet`. Component vỏ nhận nó qua input `childCanvas` và tự đặt vào giữa tiêu đề
|
|
102
|
+
* với phần thân của mình. Không truyền xuống thì vỏ chiếm trọn chiều cao khối và đẩy toàn bộ thẻ
|
|
103
|
+
* con ra ngoài vùng nhìn thấy.
|
|
100
104
|
*/
|
|
101
105
|
private attachNode;
|
|
102
106
|
/**
|
|
@@ -260,7 +264,7 @@ export declare class LibsUiGridLayoutService {
|
|
|
260
264
|
resetZoom: (key?: string) => void;
|
|
261
265
|
fitToScreen: (cW: number, sW?: number, pad?: number, key?: string) => number;
|
|
262
266
|
gridsterOptions: (depth: number, cb?: () => void) => GridsterConfig;
|
|
263
|
-
attachNode: (node: T_gridLayout_node, depth: number, host: ViewContainerRef) => void;
|
|
267
|
+
attachNode: (node: T_gridLayout_node, depth: number, host: ViewContainerRef, childCanvas?: TemplateRef<unknown>) => void;
|
|
264
268
|
detachNode: (nodeId: string) => void;
|
|
265
269
|
getNodeElement: (nodeId: string, scope?: ParentNode) => HTMLElement | undefined;
|
|
266
270
|
getNodeCanvasElement: (nodeId: string, scope?: ParentNode) => HTMLElement | undefined;
|
|
@@ -32,6 +32,21 @@ export type T_gridLayout_node = {
|
|
|
32
32
|
* ```ts
|
|
33
33
|
* getComponentOutlet: (node) => from(import('./chart-card.component').then((c) => c.ChartCardComponent))
|
|
34
34
|
* ```
|
|
35
|
+
*
|
|
36
|
+
* 🔴 Khai cho khối CÓ CON (container) là khai VỎ của khối ghép — hàng tiêu đề, nút thu gọn, nền.
|
|
37
|
+
* Vỏ KHÔNG thay thế mặt phẳng lồng bên trong: thư viện truyền mặt phẳng đó xuống component vỏ qua
|
|
38
|
+
* input `childCanvas: TemplateRef<unknown>`, và vỏ BẮT BUỘC vẽ nó ra bằng `ngTemplateOutlet`, nếu
|
|
39
|
+
* không toàn bộ khối con biến mất khỏi màn.
|
|
40
|
+
*
|
|
41
|
+
* ```html
|
|
42
|
+
* <!-- trong component vỏ -->
|
|
43
|
+
* <div class="flex h-full flex-col">
|
|
44
|
+
* <div class="shrink-0">{{ title() }}</div>
|
|
45
|
+
* <div class="min-h-0 flex-1">
|
|
46
|
+
* <ng-container [ngTemplateOutlet]="childCanvas()" />
|
|
47
|
+
* </div>
|
|
48
|
+
* </div>
|
|
49
|
+
* ```
|
|
35
50
|
*/
|
|
36
51
|
getComponentOutlet?: (node: T_gridLayout_node) => Observable<Type<unknown>>;
|
|
37
52
|
/** dữ liệu riêng của nơi dùng — thư viện KHÔNG đọc, chuyển nguyên vào input `data` của component */
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/services-grid-layout",
|
|
3
|
-
"version": "0.2.357-
|
|
3
|
+
"version": "0.2.357-25",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": "^18.2.0",
|
|
6
6
|
"@angular/common": "^18.2.0",
|
|
7
7
|
"gridster18": "npm:angular-gridster2@18.0.1",
|
|
8
8
|
"rxjs": "~7.8.0",
|
|
9
|
-
"@libs-ui/components-buttons-button": "0.2.357-
|
|
10
|
-
"@libs-ui/utils": "0.2.357-
|
|
9
|
+
"@libs-ui/components-buttons-button": "0.2.357-25",
|
|
10
|
+
"@libs-ui/utils": "0.2.357-25"
|
|
11
11
|
},
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"module": "fesm2022/libs-ui-services-grid-layout.mjs",
|