@digital-realty/ix-grid 1.0.38 → 2.0.0-alpha.1

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.
Files changed (45) hide show
  1. package/demo/columns.js +1 -20
  2. package/dist/IxGrid.d.ts +55 -55
  3. package/dist/IxGrid.js +219 -219
  4. package/dist/components/IxGridColumnFilter.d.ts +28 -28
  5. package/dist/components/IxGridColumnFilter.js +152 -152
  6. package/dist/components/IxGridDownloadMenu.d.ts +12 -12
  7. package/dist/components/IxGridDownloadMenu.js +35 -35
  8. package/dist/components/IxGridNav.d.ts +15 -15
  9. package/dist/components/IxGridNav.js +20 -20
  10. package/dist/components/IxGridRowFilter.d.ts +40 -40
  11. package/dist/components/IxGridRowFilter.js +188 -188
  12. package/dist/components/IxPagination.d.ts +13 -13
  13. package/dist/components/IxPagination.js +59 -59
  14. package/dist/components/grid-column-filter-styles.d.ts +1 -1
  15. package/dist/components/grid-column-filter-styles.js +2 -2
  16. package/dist/components/grid-download-menu-styles.d.ts +1 -1
  17. package/dist/components/grid-download-menu-styles.js +2 -2
  18. package/dist/components/grid-row-filter-styles.d.ts +1 -1
  19. package/dist/components/grid-row-filter-styles.js +2 -2
  20. package/dist/components/ix-grid-nav.d.ts +1 -1
  21. package/dist/components/ix-grid-nav.js +2 -2
  22. package/dist/components/pagination-styles.d.ts +1 -1
  23. package/dist/components/pagination-styles.js +2 -2
  24. package/dist/grid-view-styles.d.ts +1 -1
  25. package/dist/grid-view-styles.js +2 -79
  26. package/dist/grid-view-styles.js.map +1 -1
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +2 -2
  29. package/dist/ix-grid-copy.d.ts +10 -10
  30. package/dist/ix-grid-copy.js +10 -10
  31. package/dist/ix-grid.d.ts +1 -1
  32. package/dist/ix-grid.js +2 -2
  33. package/dist/ix-grid.min.js +1 -1
  34. package/dist/react/IxGridNav.d.ts +2 -2
  35. package/dist/react/IxGridNav.js +8 -8
  36. package/dist/test/ix-grid-column-filter.test.d.ts +1 -1
  37. package/dist/test/ix-grid-column-filter.test.js +35 -35
  38. package/dist/test/ix-grid-row-filter.test.d.ts +1 -1
  39. package/dist/test/ix-grid-row-filter.test.js +36 -36
  40. package/dist/test/ix-grid.test.d.ts +1 -1
  41. package/dist/test/ix-grid.test.js +42 -42
  42. package/dist/test/ix-pagination.test.d.ts +1 -1
  43. package/dist/test/ix-pagination.test.js +21 -21
  44. package/package.json +2 -3
  45. package/src/grid-view-styles.ts +0 -77
@@ -1,37 +1,37 @@
1
- import { html } from 'lit';
2
- import { fixture, expect, elementUpdated } from '@open-wc/testing';
3
- import '../components/IxGridRowFilter.js';
4
- const columns = [
5
- {
6
- name: 'firstName',
7
- header: 'First name',
8
- filterable: true,
9
- },
10
- {
11
- name: 'lastName',
12
- header: 'Last name',
13
- filterable: true,
14
- },
15
- {
16
- name: 'middleName',
17
- header: 'Middle name',
18
- filterable: false,
19
- },
20
- {
21
- name: 'email',
22
- header: 'Email',
23
- filterable: true,
24
- },
25
- ];
26
- describe('IxGridRowFilter', () => {
27
- it('renders and popluates the grid row filter', async () => {
28
- var _a, _b;
29
- const el = await fixture(html `<ix-grid-row-filter .columns=${columns}></ix-grid-row-filter>`);
30
- const openMenu = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.filter-button');
31
- openMenu.click();
32
- await elementUpdated(el);
33
- const options = (_b = el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelectorAll('select[data-v="firstName"] option');
34
- expect(options === null || options === void 0 ? void 0 : options.length).to.equal(3);
35
- });
36
- });
1
+ import { html } from 'lit';
2
+ import { fixture, expect, elementUpdated } from '@open-wc/testing';
3
+ import '../components/IxGridRowFilter.js';
4
+ const columns = [
5
+ {
6
+ name: 'firstName',
7
+ header: 'First name',
8
+ filterable: true,
9
+ },
10
+ {
11
+ name: 'lastName',
12
+ header: 'Last name',
13
+ filterable: true,
14
+ },
15
+ {
16
+ name: 'middleName',
17
+ header: 'Middle name',
18
+ filterable: false,
19
+ },
20
+ {
21
+ name: 'email',
22
+ header: 'Email',
23
+ filterable: true,
24
+ },
25
+ ];
26
+ describe('IxGridRowFilter', () => {
27
+ it('renders and popluates the grid row filter', async () => {
28
+ var _a, _b;
29
+ const el = await fixture(html `<ix-grid-row-filter .columns=${columns}></ix-grid-row-filter>`);
30
+ const openMenu = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.filter-button');
31
+ openMenu.click();
32
+ await elementUpdated(el);
33
+ const options = (_b = el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelectorAll('select[data-v="firstName"] option');
34
+ expect(options === null || options === void 0 ? void 0 : options.length).to.equal(3);
35
+ });
36
+ });
37
37
  //# sourceMappingURL=ix-grid-row-filter.test.js.map
@@ -1 +1 @@
1
- import '../ix-grid.js';
1
+ import '../ix-grid.js';
@@ -1,46 +1,46 @@
1
- import { html } from 'lit';
2
- import { fixture, expect } from '@open-wc/testing';
3
- import '../ix-grid.js';
4
- const rows = [
5
- {
6
- name: 'one',
7
- },
8
- {
9
- name: 'two',
10
- },
11
- {
12
- name: 'three',
13
- },
14
- ];
15
- const columns = [
16
- {
17
- name: 'one',
18
- header: 'one',
19
- bodyRenderer: row => html ` <span>${row.name}</span>`,
20
- },
21
- {
22
- name: 'two',
23
- header: 'one',
24
- bodyRenderer: row => html ` <span>${row.name}</span>`,
25
- },
26
- {
27
- name: 'three',
28
- header: 'one',
29
- bodyRenderer: row => html ` <span>${row.name}</span>`,
30
- },
31
- ];
32
- describe('IxGrid', () => {
33
- it('renders a grid', async () => {
34
- const el = await fixture(html `<ix-grid></ix-grid>`);
35
- expect(el).to.not.be.null;
36
- });
37
- it('renders the correct number of rows', async () => {
1
+ import { html } from 'lit';
2
+ import { fixture, expect } from '@open-wc/testing';
3
+ import '../ix-grid.js';
4
+ const rows = [
5
+ {
6
+ name: 'one',
7
+ },
8
+ {
9
+ name: 'two',
10
+ },
11
+ {
12
+ name: 'three',
13
+ },
14
+ ];
15
+ const columns = [
16
+ {
17
+ name: 'one',
18
+ header: 'one',
19
+ bodyRenderer: row => html ` <span>${row.name}</span>`,
20
+ },
21
+ {
22
+ name: 'two',
23
+ header: 'one',
24
+ bodyRenderer: row => html ` <span>${row.name}</span>`,
25
+ },
26
+ {
27
+ name: 'three',
28
+ header: 'one',
29
+ bodyRenderer: row => html ` <span>${row.name}</span>`,
30
+ },
31
+ ];
32
+ describe('IxGrid', () => {
33
+ it('renders a grid', async () => {
34
+ const el = await fixture(html `<ix-grid></ix-grid>`);
35
+ expect(el).to.not.be.null;
36
+ });
37
+ it('renders the correct number of rows', async () => {
38
38
  const el = await fixture(html `<ix-grid
39
39
  .columns=${columns}
40
40
  .rows=${rows}
41
- ></ix-grid>`);
42
- expect(rows.length).to.equal(3);
43
- expect(el).to.not.be.null;
44
- });
45
- });
41
+ ></ix-grid>`);
42
+ expect(rows.length).to.equal(3);
43
+ expect(el).to.not.be.null;
44
+ });
45
+ });
46
46
  //# sourceMappingURL=ix-grid.test.js.map
@@ -1 +1 @@
1
- import '../components/IxPagination.js';
1
+ import '../components/IxPagination.js';
@@ -1,28 +1,28 @@
1
- import { html } from 'lit';
2
- import { fixture, expect } from '@open-wc/testing';
3
- import '../components/IxPagination.js';
4
- describe('IxPagination', () => {
5
- it('renders pagination', async () => {
6
- const el = await fixture(html `<ix-pagination></ix-pagination>`);
7
- expect(el).to.not.be.null;
8
- });
9
- it('renders pagination page size select', async () => {
10
- var _a;
1
+ import { html } from 'lit';
2
+ import { fixture, expect } from '@open-wc/testing';
3
+ import '../components/IxPagination.js';
4
+ describe('IxPagination', () => {
5
+ it('renders pagination', async () => {
6
+ const el = await fixture(html `<ix-pagination></ix-pagination>`);
7
+ expect(el).to.not.be.null;
8
+ });
9
+ it('renders pagination page size select', async () => {
10
+ var _a;
11
11
  const el = await fixture(html `<ix-pagination
12
12
  .pageSizes=${[1, 2, 3]}
13
- ></ix-pagination>`);
14
- const pageSizeSelect = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('ix-select-option');
15
- expect(pageSizeSelect === null || pageSizeSelect === void 0 ? void 0 : pageSizeSelect.length).to.equal(3);
16
- });
17
- it('renders pagination range info', async () => {
18
- var _a;
13
+ ></ix-pagination>`);
14
+ const pageSizeSelect = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('ix-select-option');
15
+ expect(pageSizeSelect === null || pageSizeSelect === void 0 ? void 0 : pageSizeSelect.length).to.equal(3);
16
+ });
17
+ it('renders pagination range info', async () => {
18
+ var _a;
19
19
  const el = await fixture(html `<ix-pagination
20
20
  pageSize="10"
21
21
  page="2"
22
22
  recordCount="99"
23
- ></ix-pagination>`);
24
- const pageRangeInfo = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('p')[1];
25
- expect(pageRangeInfo === null || pageRangeInfo === void 0 ? void 0 : pageRangeInfo.innerText).to.equal('11 - 20 of 99');
26
- });
27
- });
23
+ ></ix-pagination>`);
24
+ const pageRangeInfo = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('p')[1];
25
+ expect(pageRangeInfo === null || pageRangeInfo === void 0 ? void 0 : pageRangeInfo.innerText).to.equal('11 - 20 of 99');
26
+ });
27
+ });
28
28
  //# sourceMappingURL=ix-pagination.test.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent ix-grid following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "Digital Realty",
6
- "version": "1.0.38",
6
+ "version": "2.0.0-alpha.1",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -101,6 +101,5 @@
101
101
  "eslint --fix",
102
102
  "prettier --write"
103
103
  ]
104
- },
105
- "gitHead": "107ce818545b9aa32d2138df7e0a0d6c8bd7603a"
104
+ }
106
105
  }
@@ -1,18 +1,6 @@
1
1
  import { css } from 'lit';
2
2
 
3
3
  export const IxGridViewStyles = css`
4
- @font-face {
5
- font-family: 'Material Icons';
6
- font-style: normal;
7
- font-weight: 400;
8
- src: url(https://fonts.gstatic.com/s/materialicons/v140/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf)
9
- format('truetype');
10
- }
11
-
12
- * {
13
- font-family: 'Red Hat Display', sans-serif;
14
- }
15
-
16
4
  vaadin-grid::part(cell) {
17
5
  cursor: pointer;
18
6
  }
@@ -53,45 +41,6 @@ export const IxGridViewStyles = css`
53
41
  --md-sys-color-on-surface-variant: #b8bfc8;
54
42
  }
55
43
 
56
- .material-icons {
57
- font-family: 'Material Icons';
58
- font-weight: normal;
59
- font-style: normal;
60
- font-size: 24px;
61
- line-height: 1;
62
- letter-spacing: normal;
63
- text-transform: none;
64
- display: inline-block;
65
- white-space: nowrap;
66
- word-wrap: normal;
67
- direction: ltr;
68
- }
69
-
70
- .material-icons.delete {
71
- color: #6d758c;
72
- }
73
-
74
- .material-icons.info {
75
- color: orange;
76
- font-size: 48px;
77
- }
78
-
79
- .material-icons.check_circle {
80
- color: green;
81
- }
82
-
83
- .material-icons.mail {
84
- color: #ff9800;
85
- }
86
-
87
- .material-icons.warning {
88
- color: #db0028;
89
- }
90
-
91
- .material-icons.do_not_disturb_on {
92
- color: #6d758c;
93
- }
94
-
95
44
  .grid-container {
96
45
  background-color: #ffffff;
97
46
  border-radius: 12px;
@@ -116,19 +65,6 @@ export const IxGridViewStyles = css`
116
65
  gap: 18px;
117
66
  }
118
67
 
119
- .grid-header h2 {
120
- margin: 0px;
121
- font-style: normal;
122
- font-weight: bold;
123
- font-size: 20px;
124
- line-height: 24px;
125
- letter-spacing: 0.15px;
126
- color: #092241;
127
- overflow: hidden;
128
- text-overflow: ellipsis;
129
- white-space: nowrap;
130
- }
131
-
132
68
  .grid-menu {
133
69
  display: flex;
134
70
  align-items: center;
@@ -145,19 +81,6 @@ export const IxGridViewStyles = css`
145
81
  cursor: pointer;
146
82
  }
147
83
 
148
- .grid-empty-content {
149
- height: 73vh;
150
- justify-content: center;
151
- align-items: flex-start;
152
- padding-top: 54px;
153
- }
154
-
155
- .grid-empty-content h2 {
156
- font-weight: 900;
157
- font-size: 22px;
158
- color: black;
159
- }
160
-
161
84
  .header {
162
85
  font-weight: bold;
163
86
  display: flex;