@polygrid/core 1.0.470 → 1.0.471

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":"toggle-loading.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/loading/methods/toggle-loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAK7E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,wBAAgB,aAAa,CAC3B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,QA0C/B"}
1
+ {"version":3,"file":"toggle-loading.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/loading/methods/toggle-loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAM7E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,wBAAgB,aAAa,CAC3B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,QAgD/B"}
@@ -1,11 +1,11 @@
1
1
  import { takeUntil } from "../../../rx-lite/operators/takeuntil";
2
- import { RowPool } from "../../row/classes/row-pool";
3
2
  import { recomputeVirtualRows } from "../../row/methods/recompute-virtual-rows";
4
3
  export function toggleLoading(loadingService, destroy$) {
5
4
  const grid = loadingService.grid;
6
5
  loadingService.loading$.pipe(takeUntil(destroy$)).subscribe((visible) => {
7
6
  const state = grid._store.getState();
8
7
  grid._store.update((draft) => {
8
+ draft.view.externalLoading = visible;
9
9
  if (visible) {
10
10
  // loading ON → clear rows
11
11
  draft.view.rows = [];
@@ -15,24 +15,36 @@ export function toggleLoading(loadingService, destroy$) {
15
15
  }
16
16
  else {
17
17
  // loading OFF - if loading is still visible, remove it and update the row pool
18
- if (grid._runtime.loadingContainer) {
19
- grid._runtime.loadingContainer.remove();
20
- grid._runtime.loadingContainer = null;
21
- // Destroy dynamic template if any
22
- grid._runtime.loadingHandle?.destroy();
23
- grid._runtime.loadingHandle = null;
24
- const rowHeight = state.view.rowHeight;
25
- const columns = state.view.internalColumns;
26
- const viewportHeight = state.view.viewportHeight;
27
- const rowPool = new RowPool(grid._gridDom, columns, rowHeight, grid, viewportHeight);
28
- grid._runtime.rowPool = rowPool;
29
- // use fresh virtualRows
30
- const v = state.ui.virtualRows;
31
- recomputeVirtualRows(v);
32
- const data = state.view.rows;
33
- rowPool.update(v, data);
34
- console.log("belép");
35
- }
18
+ // this is needed, because in angular setting visible to false happens for some reason as the last step
19
+ // if (grid._runtime.loadingContainer) {
20
+ // grid._runtime.loadingContainer.remove();
21
+ // grid._runtime.loadingContainer = null;
22
+ // // Destroy dynamic template if any
23
+ // grid._runtime.loadingHandle?.destroy();
24
+ // grid._runtime.loadingHandle = null;
25
+ // const rowHeight = state.view.rowHeight;
26
+ // const columns = state.view.internalColumns;
27
+ // const viewportHeight = state.view.viewportHeight;
28
+ // const rowPool = new RowPool(
29
+ // grid._gridDom,
30
+ // columns,
31
+ // rowHeight,
32
+ // grid,
33
+ // viewportHeight,
34
+ // );
35
+ // grid._runtime.rowPool = rowPool;
36
+ // // use fresh virtualRows
37
+ // const v = state.ui.virtualRows;
38
+ // recomputeVirtualRows(v);
39
+ // const data = state.view.rows;
40
+ // rowPool.update(v, data);
41
+ // updateColumnWidths(
42
+ // loadingService.gridDom,
43
+ // state,
44
+ // state.view.resolvedColumnWidths,
45
+ // loadingService.grid,
46
+ // );
47
+ // }
36
48
  }
37
49
  });
38
50
  }, "TOGGLE-LOADING");
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-loading.js","sourceRoot":"","sources":["../../../../../src/engine/services/loading/methods/toggle-loading.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAA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D,MAAM,OAAO,GAAG,IAAI,OAAO,CACzB,IAAI,CAAC,QAAQ,EACb,OAAO,EACP,SAAS,EACT,IAAI,EACJ,cAAc,CACf,CAAC;oBACF,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;oBAChC,wBAAwB;oBACxB,MAAM,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC;oBAC/B,oBAAoB,CAAC,CAAC,CAAC,CAAC;oBACxB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC7B,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;oBAExB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,gBAAgB,CAAC,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"toggle-loading.js","sourceRoot":"","sources":["../../../../../src/engine/services/loading/methods/toggle-loading.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAIjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAGhF,MAAM,UAAU,aAAa,CAC3B,cAA8B,EAC9B,QAA8B;IAE9B,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;IACjC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;QACtE,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;YAC3B,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;YACrC,IAAI,OAAO,EAAE,CAAC;gBACZ,0BAA0B;gBAC1B,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;gBACrB,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;gBACzB,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,aAAa,GAAG,CAAC,CAAC;gBACvC,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;YAC7C,CAAC;iBAAM,CAAC;gBACN,+EAA+E;gBAC/E,uGAAuG;gBACvG,wCAAwC;gBACxC,6CAA6C;gBAC7C,2CAA2C;gBAC3C,uCAAuC;gBACvC,4CAA4C;gBAC5C,wCAAwC;gBACxC,4CAA4C;gBAC5C,gDAAgD;gBAChD,sDAAsD;gBACtD,iCAAiC;gBACjC,qBAAqB;gBACrB,eAAe;gBACf,iBAAiB;gBACjB,YAAY;gBACZ,sBAAsB;gBACtB,OAAO;gBACP,qCAAqC;gBACrC,6BAA6B;gBAC7B,oCAAoC;gBACpC,6BAA6B;gBAC7B,kCAAkC;gBAClC,6BAA6B;gBAC7B,wBAAwB;gBACxB,8BAA8B;gBAC9B,aAAa;gBACb,uCAAuC;gBACvC,2BAA2B;gBAC3B,OAAO;gBACP,IAAI;YACN,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,gBAAgB,CAAC,CAAC;AACvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polygrid/core",
3
- "version": "1.0.470",
3
+ "version": "1.0.471",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",