@polygrid/core 1.0.422 → 1.0.423
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/dist/engine/services/renderer/interfaces/renderer-adapter.d.ts +3 -0
- package/dist/engine/services/renderer/interfaces/renderer-adapter.d.ts.map +1 -1
- package/dist/engine/services/renderer/interfaces/template-mounts/column-cell-mount.d.ts +14 -0
- package/dist/engine/services/renderer/interfaces/template-mounts/column-cell-mount.d.ts.map +1 -0
- package/dist/engine/services/renderer/interfaces/template-mounts/column-cell-mount.js +2 -0
- package/dist/engine/services/renderer/interfaces/template-mounts/column-cell-mount.js.map +1 -0
- package/dist/engine/services/renderer/methods/re-render-cells.js +1 -1
- package/dist/engine/services/renderer/methods/re-render-cells.js.map +1 -1
- package/dist/engine/services/renderer/parts/body/body.js +1 -1
- package/dist/engine/services/renderer/parts/body/body.js.map +1 -1
- package/dist/engine/services/renderer/parts/body/cell.d.ts +4 -1
- package/dist/engine/services/renderer/parts/body/cell.d.ts.map +1 -1
- package/dist/engine/services/renderer/parts/body/cell.js +25 -3
- package/dist/engine/services/renderer/parts/body/cell.js.map +1 -1
- package/dist/engine/services/renderer/parts/body/row.d.ts +2 -1
- package/dist/engine/services/renderer/parts/body/row.d.ts.map +1 -1
- package/dist/engine/services/renderer/parts/body/row.js +3 -2
- package/dist/engine/services/renderer/parts/body/row.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RendererHandle } from "./renderer-handle";
|
|
2
2
|
import { ColumnFooterMount } from "./template-mounts/column-footer-mount";
|
|
3
3
|
import { ColumnHeaderMount } from "./template-mounts/column-header-mount";
|
|
4
|
+
import { ColumnCellMount } from "./template-mounts/column-cell-mount";
|
|
4
5
|
import { ErrorMount } from "./template-mounts/error-mount";
|
|
5
6
|
import { LoadingMount } from "./template-mounts/loading-mount";
|
|
6
7
|
import { NoDataMount } from "./template-mounts/no-data-mount";
|
|
@@ -12,5 +13,7 @@ export interface RendererAdapter {
|
|
|
12
13
|
registerColumnHeaderTemplate?(key: string, tpl: unknown): void;
|
|
13
14
|
renderColumnFooterTemplate?(req: ColumnFooterMount): RendererHandle | null;
|
|
14
15
|
registerColumnFooterTemplate?(key: string, tpl: unknown): void;
|
|
16
|
+
renderColumnCellTemplate?(req: ColumnCellMount): RendererHandle | null;
|
|
17
|
+
registerColumnCellTemplate?(key: string, tpl: unknown): void;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=renderer-adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer-adapter.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/renderer-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,oBAAoB,CAAC,CAAC,GAAG,EAAE,WAAW,GAAG,cAAc,GAAG,IAAI,CAAC;IAC/D,qBAAqB,CAAC,CAAC,GAAG,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CAAC;IACjE,mBAAmB,CAAC,CAAC,GAAG,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAAC;IAC7D,0BAA0B,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,GAAG,IAAI,CAAC;IAC3E,4BAA4B,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/D,0BAA0B,CAAC,CAAC,GAAG,EAAE,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G,cAAc,GAAG,IAAI,CAAC;IACvE,0BAA0B,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;CAC9D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PolyGridRow } from "../../../row/interfaces/row";
|
|
2
|
+
export interface ColumnCellMount {
|
|
3
|
+
container: HTMLElement;
|
|
4
|
+
context: {
|
|
5
|
+
row: PolyGridRow;
|
|
6
|
+
value: any;
|
|
7
|
+
field: string;
|
|
8
|
+
header: string;
|
|
9
|
+
columnKey: string;
|
|
10
|
+
columnId: string;
|
|
11
|
+
rowIndex: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=column-cell-mount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-cell-mount.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/interfaces/template-mounts/column-cell-mount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,EAAE;QACP,GAAG,EAAE,WAAW,CAAC;QACjB,KAAK,EAAE,GAAG,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-cell-mount.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/interfaces/template-mounts/column-cell-mount.ts"],"names":[],"mappings":""}
|
|
@@ -13,7 +13,7 @@ export function reRenderCells(gridDom, store, grid) {
|
|
|
13
13
|
const rows = store.getState().view.rows;
|
|
14
14
|
const columns = store.getState().view.internalColumns;
|
|
15
15
|
const rowHeight = store.getState().view.rowHeight;
|
|
16
|
-
const bodyRows = renderRows(rows, columns, rowHeight);
|
|
16
|
+
const bodyRows = renderRows(rows, columns, rowHeight, grid);
|
|
17
17
|
const fragment = document.createDocumentFragment();
|
|
18
18
|
for (const row of bodyRows) {
|
|
19
19
|
fragment.appendChild(row);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"re-render-cells.js","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/methods/re-render-cells.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE,MAAM,UAAU,aAAa,CAC3B,OAAgB,EAChB,KAAoB,EACpB,IAAc;IAEd,sCAAsC;IACtC,SAAS;IACT,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,MAAM,CAAC,eAAe,EAAE,CAAC;IACzB,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAChD,OAAO;IACP,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IACvB,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;IACxC,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;IACtD,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;IAClD,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"re-render-cells.js","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/methods/re-render-cells.ts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AAS,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CACxE,CAAC;IACF,SAAS;IACT,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,MAAM,CAAC,eAAe,EAAE,CAAC;IACzB,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export function renderBody(store, gridDom, grid) {
|
|
|
15
15
|
// render the rows
|
|
16
16
|
const columns = store.getState().view.internalColumns;
|
|
17
17
|
const rowHeight = store.getState().view.rowHeight;
|
|
18
|
-
const bodyRows = renderRows(rows, columns, rowHeight);
|
|
18
|
+
const bodyRows = renderRows(rows, columns, rowHeight, grid);
|
|
19
19
|
// append the rows to the body
|
|
20
20
|
const fragment = document.createDocumentFragment();
|
|
21
21
|
for (const row of bodyRows) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/body.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAI9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,MAAM,UAAU,UAAU,CACxB,KAAoB,EACpB,OAAgB,EAChB,IAAc;IAEd,WAAW;IACX,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACrD,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC;IACrD,gBAAgB;IAChB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC;IACrC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;IAEtB,k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AAI,CAAC,eAAe,CAAC;QACtD,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;QAClD,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;QAC5D,8BAA8B;QAC9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,sBAAsB,EAAE,CAAC;QACnD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC3B,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;QACD,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;SAAM,CAAC;QACN,0BAA0B;QAC1B,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAEnC,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;IAEtB,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { GridRuntime } from "../../../../core/grid-runtime";
|
|
2
|
+
import { PolyGridStore } from "../../../../store/store";
|
|
1
3
|
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
2
|
-
|
|
4
|
+
import { PolyGridRow } from "../../../row/interfaces/row";
|
|
5
|
+
export declare function renderCell(row: PolyGridRow, col: InternalColumn, runtime: GridRuntime, store: PolyGridStore): HTMLDivElement;
|
|
3
6
|
//# sourceMappingURL=cell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/cell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/cell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,wBAAgB,UAAU,CACxB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,kBAkCrB"}
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import { PG_CSS_CLASS } from "../../../../const/pg-css-class";
|
|
2
|
-
export function renderCell(row, col) {
|
|
2
|
+
export function renderCell(row, col, runtime, store) {
|
|
3
|
+
const state = store.getState();
|
|
3
4
|
const cell = document.createElement("div");
|
|
4
5
|
cell.classList.add(PG_CSS_CLASS.cell);
|
|
5
|
-
const value = row[col.field];
|
|
6
|
-
cell.textContent = value != null ? String(value) : "";
|
|
7
6
|
cell.setAttribute("col-id", col.id);
|
|
7
|
+
// cleanup previous handle
|
|
8
|
+
const prevHandle = runtime.cellHandles.get(col.id);
|
|
9
|
+
prevHandle?.destroy();
|
|
10
|
+
runtime.cellHandles.delete(col.id);
|
|
11
|
+
const value = row.data[col.field];
|
|
12
|
+
const handle = state.view.rendererAdapter?.renderColumnCellTemplate?.({
|
|
13
|
+
container: cell,
|
|
14
|
+
context: {
|
|
15
|
+
row,
|
|
16
|
+
value,
|
|
17
|
+
field: col.field,
|
|
18
|
+
header: col.header,
|
|
19
|
+
columnKey: `${col.field}::${col.header}`,
|
|
20
|
+
columnId: col.id,
|
|
21
|
+
rowIndex: row.index,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
if (!handle) {
|
|
25
|
+
cell.textContent = value != null ? String(value) : "";
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
runtime.cellHandles.set(col.id, handle);
|
|
29
|
+
}
|
|
8
30
|
return cell;
|
|
9
31
|
}
|
|
10
32
|
//# sourceMappingURL=cell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAM9D,MAAM,UAAU,UAAU,CACxB,GAAgB,EAChB,GAAmB,EACnB,OAAoB,EACpB,KAAoB;IAEpB,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IAEpC,0BAA0B;IAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACnD,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEnC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAElC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,wBAAwB,EAAE,CAAC;QACpE,SAAS,EAAE,IAAI;QACf,OAAO,EAAE;YACP,GAAG;YACH,KAAK;YACL,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,SAAS,EAAE,GAAG,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,MAAM,EAAE;YACxC,QAAQ,EAAE,GAAG,CAAC,EAAE;YAChB,QAAQ,EAAE,GAAG,CAAC,KAAK;SACpB;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,IAAI,CAAC,WAAW,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
1
2
|
import type { PolyGridRow } from "../../../../services/row/interfaces/row";
|
|
2
3
|
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
3
|
-
export declare function renderRows(rows: PolyGridRow[], columns: InternalColumn[], rowHeight: number): HTMLDivElement[];
|
|
4
|
+
export declare function renderRows(rows: PolyGridRow[], columns: InternalColumn[], rowHeight: number, grid: PolyGrid): HTMLDivElement[];
|
|
4
5
|
//# sourceMappingURL=row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/row.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAG5E,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EAAE,EACnB,OAAO,EAAE,cAAc,EAAE,EACzB,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/row.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAG5E,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EAAE,EACnB,OAAO,EAAE,cAAc,EAAE,EACzB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,GACb,cAAc,EAAE,CAiBlB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PG_CSS_CLASS } from "../../../../const/pg-css-class";
|
|
2
2
|
import { renderCell } from "./cell";
|
|
3
|
-
export function renderRows(rows, columns, rowHeight) {
|
|
3
|
+
export function renderRows(rows, columns, rowHeight, grid) {
|
|
4
|
+
const runtime = grid._runtime;
|
|
4
5
|
const rowEls = [];
|
|
5
6
|
const cols = columns.filter((col) => col.visible ?? true);
|
|
6
7
|
rows.forEach((row) => {
|
|
@@ -8,7 +9,7 @@ export function renderRows(rows, columns, rowHeight) {
|
|
|
8
9
|
rowEl.classList.add(PG_CSS_CLASS.row);
|
|
9
10
|
rowEl.style.height = rowHeight + "px";
|
|
10
11
|
cols.forEach((col) => {
|
|
11
|
-
const cell = renderCell(row
|
|
12
|
+
const cell = renderCell(row, col, runtime, grid._store);
|
|
12
13
|
rowEl.appendChild(cell);
|
|
13
14
|
});
|
|
14
15
|
rowEls.push(rowEl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,UAAU,UAAU,CACxB,IAAmB,EACnB,OAAyB,EACzB,SAAiB,EACjB,IAAc;IAEd,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9B,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;IAE1D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5C,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACtC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;QACtC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACxD,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|