@neovici/cosmoz-omnitable 14.21.0 → 14.21.2

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.
@@ -251,6 +251,9 @@ exports.default = (0, cosmoz_utils_1.tagged) `
251
251
  position: relative;
252
252
  flex: auto;
253
253
  }
254
+ .tableContent:has(.tableContent-empty.spinner) {
255
+ opacity: 0.3;
256
+ }
254
257
 
255
258
  /* Empty data set styling */
256
259
  .tableContent-empty {
@@ -584,5 +587,15 @@ exports.default = (0, cosmoz_utils_1.tagged) `
584
587
  :host([mini]) cosmoz-omnitable-settings::part(columns) {
585
588
  display:none;
586
589
  }
590
+
591
+ cz-spinner {
592
+ width: 48px;
593
+ height: 48px;
594
+ position: absolute;
595
+ top: 40%;
596
+ right: 50%;
597
+ border-color: rgba(0, 0, 0, 0.2);
598
+ border-top-color: #000;
599
+ }
587
600
  `;
588
601
  //# sourceMappingURL=cosmoz-omnitable-styles.js.map
@@ -1,3 +1,4 @@
1
- export function computeLayout(_columnConfigs: any, canvasWidth: any, numColumns: any): any;
2
- export function toCss(layout: any, config: any): any;
1
+ import { ColumnConfig } from './layout';
2
+ export declare const computeLayout: (_columnConfigs: ColumnConfig[], canvasWidth: number, numColumns: number) => (number | undefined)[];
3
+ export declare const toCss: (layout: number[], config: ColumnConfig[]) => string;
3
4
  //# sourceMappingURL=compute-layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../src/lib/compute-layout.js"],"names":[],"mappings":"AAwCO,2FAiCkE;AAjClE,qDAiCkE"}
1
+ {"version":3,"file":"compute-layout.d.ts","sourceRoot":"","sources":["../../src/lib/compute-layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,UAAU,CAAC;AA8ChD,eAAO,MAAM,aAAa,GACzB,gBAAgB,YAAY,EAAE,EAC9B,aAAa,MAAM,EACnB,YAAY,MAAM,KAChB,CAAC,MAAM,GAAG,SAAS,CAAC,EA+BtB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,QAAQ,MAAM,EAAE,EAAE,QAAQ,YAAY,EAAE,WACU,CAAC"}
@@ -4,7 +4,10 @@ exports.toCss = exports.computeLayout = void 0;
4
4
  const layout_1 = require("./layout");
5
5
  const utils_1 = require("./utils");
6
6
  const _toCss = (layout, config) => {
7
- const lastVisibleIndex = (0, utils_1.findLastIndex)(layout, (width) => width != null && width > 0), generateCellCSS = (itemName, width) => `.cell[name="${itemName}"], cosmoz-omnitable-skeleton::part(cell-${itemName}){width: ${Math.floor(width)}px;padding: 0 min(3px, ${width / 2}px)}`, hideResizeNub = (itemName) => `cosmoz-omnitable-resize-nub[name="${itemName}"]{display:none}`, hideColumn = (itemName) => `cosmoz-omnitable-resize-nub[name="${itemName}"], .cell[name="${itemName}"]{display:none}`;
7
+ const lastVisibleIndex = (0, utils_1.findLastIndex)(layout, (width) => width != null && width > 0);
8
+ const generateCellCSS = (itemName, width) => `.cell[name="${itemName}"], cosmoz-omnitable-skeleton::part(cell-${itemName}){width: ${Math.floor(width)}px;padding: 0 min(3px, ${width / 2}px)}`;
9
+ const hideResizeNub = (itemName) => `cosmoz-omnitable-resize-nub[name="${itemName}"]{display:none}`;
10
+ const hideColumn = (itemName) => `cosmoz-omnitable-resize-nub[name="${itemName}"], .cell[name="${itemName}"]{display:none}`;
8
11
  return config
9
12
  .map((item, index) => {
10
13
  const width = layout[index];
@@ -45,6 +48,8 @@ const computeLayout = (_columnConfigs, canvasWidth, numColumns) => {
45
48
  sorted[columnConfigs[i].index] = width;
46
49
  return sorted;
47
50
  }, new Array(numColumns).fill(undefined));
48
- }, toCss = (layout, config) => layout.length === 0 ? '.cell {display: none;}' : _toCss(layout, config);
49
- exports.computeLayout = computeLayout, exports.toCss = toCss;
51
+ };
52
+ exports.computeLayout = computeLayout;
53
+ const toCss = (layout, config) => layout.length === 0 ? '.cell {display: none;}' : _toCss(layout, config);
54
+ exports.toCss = toCss;
50
55
  //# sourceMappingURL=compute-layout.js.map
@@ -1,12 +1,13 @@
1
- interface Column {
1
+ export interface ColumnConfig {
2
2
  flex: number;
3
3
  index: number;
4
4
  minWidth: number;
5
5
  width: number;
6
6
  priority: number;
7
7
  name: string;
8
+ hidden?: boolean;
8
9
  }
9
- type Columns = Column[];
10
+ type Columns = ColumnConfig[];
10
11
  export declare const // eslint-disable-next-line max-statements
11
12
  layout: (columns: Columns, container: number) => number[];
12
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/lib/layout.ts"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,KAAK,OAAO,GAAG,MAAM,EAAE,CAAC;AAGxB,eAAO,MAAM,0CAA0C;AACtD,MAAM,GAAI,SAAS,OAAO,EAAE,WAAW,MAAM,aA0D5C,CAAC"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/lib/layout.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,KAAK,OAAO,GAAG,YAAY,EAAE,CAAC;AAG9B,eAAO,MAAM,0CAA0C;AACtD,MAAM,GAAI,SAAS,OAAO,EAAE,WAAW,MAAM,aA0D5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"render-list.d.ts","sourceRoot":"","sources":["../../src/lib/render-list.js"],"names":[],"mappings":"AAMO,oIA0EN"}
1
+ {"version":3,"file":"render-list.d.ts","sourceRoot":"","sources":["../../src/lib/render-list.js"],"names":[],"mappings":"AAMO,oIAiFN"}
@@ -23,11 +23,14 @@ const renderList = (header, list) => {
23
23
  <p>${(0, cosmoz_i18next_1._)('No matches for selection')}</p>
24
24
  </div>
25
25
  </div>`)}
26
- ${(0, when_js_1.when)(loading, () => (0, lit_html_1.html) `<div class="tableContent-empty overlay">
26
+ ${(0, when_js_1.when)(loading && !processedItems.length, () => (0, lit_html_1.html) `<div class="tableContent-empty overlay">
27
27
  <cosmoz-omnitable-skeleton
28
28
  .settingsConfig=${settingsConfig}
29
29
  ></cosmoz-omnitable-skeleton>
30
30
  </div>`)}
31
+ ${(0, when_js_1.when)(loading && processedItems.length, () => (0, lit_html_1.html) `<div class="tableContent-empty overlay spinner">
32
+ <cz-spinner></cz-spinner>
33
+ </div>`)}
31
34
  ${(0, when_js_1.when)(error, () => (0, lit_html_1.html) `<div class="tableContent-empty overlay">
32
35
  <iron-icon icon="icons:error"></iron-icon>
33
36
  <div class="tableContent-empty-message">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "14.21.0",
3
+ "version": "14.21.2",
4
4
  "description": "[![Build Status](https://travis-ci.org/Neovici/cosmoz-omnitable.svg?branch=master)](https://travis-ci.org/Neovici/cosmoz-omnitable)",
5
5
  "keywords": [
6
6
  "web-components"