@digital-realty/ix-grid 1.0.37 → 2.0.0-alpha.0
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/IxGrid.d.ts +55 -55
- package/dist/IxGrid.js +219 -219
- package/dist/components/IxGridColumnFilter.d.ts +28 -28
- package/dist/components/IxGridColumnFilter.js +152 -152
- package/dist/components/IxGridDownloadMenu.d.ts +12 -12
- package/dist/components/IxGridDownloadMenu.js +35 -35
- package/dist/components/IxGridNav.d.ts +15 -15
- package/dist/components/IxGridNav.js +20 -20
- package/dist/components/IxGridRowFilter.d.ts +40 -40
- package/dist/components/IxGridRowFilter.js +188 -188
- package/dist/components/IxPagination.d.ts +13 -13
- package/dist/components/IxPagination.js +59 -59
- package/dist/components/grid-column-filter-styles.d.ts +1 -1
- package/dist/components/grid-column-filter-styles.js +2 -2
- package/dist/components/grid-download-menu-styles.d.ts +1 -1
- package/dist/components/grid-download-menu-styles.js +2 -2
- package/dist/components/grid-row-filter-styles.d.ts +1 -1
- package/dist/components/grid-row-filter-styles.js +3 -3
- package/dist/components/grid-row-filter-styles.js.map +1 -1
- package/dist/components/ix-grid-nav.d.ts +1 -1
- package/dist/components/ix-grid-nav.js +2 -2
- package/dist/components/pagination-styles.d.ts +1 -1
- package/dist/components/pagination-styles.js +2 -2
- package/dist/grid-view-styles.d.ts +1 -1
- package/dist/grid-view-styles.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/ix-grid-copy.d.ts +10 -10
- package/dist/ix-grid-copy.js +10 -10
- package/dist/ix-grid.d.ts +1 -1
- package/dist/ix-grid.js +2 -2
- package/dist/ix-grid.min.js +1 -1
- package/dist/react/IxGridNav.d.ts +2 -2
- package/dist/react/IxGridNav.js +8 -8
- package/dist/test/ix-grid-column-filter.test.d.ts +1 -1
- package/dist/test/ix-grid-column-filter.test.js +35 -35
- package/dist/test/ix-grid-row-filter.test.d.ts +1 -1
- package/dist/test/ix-grid-row-filter.test.js +36 -36
- package/dist/test/ix-grid.test.d.ts +1 -1
- package/dist/test/ix-grid.test.js +42 -42
- package/dist/test/ix-pagination.test.d.ts +1 -1
- package/dist/test/ix-pagination.test.js +21 -21
- package/package.json +2 -3
- package/src/components/grid-row-filter-styles.ts +1 -1
|
@@ -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": "
|
|
6
|
+
"version": "2.0.0-alpha.0",
|
|
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": "9cbbfd41048ed165f02ca68bbfec1cab80a4a998"
|
|
104
|
+
}
|
|
106
105
|
}
|