@digital-realty/ix-grid 1.0.49-alpha.1 → 1.0.49-alpha.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.
- package/dist/IxGrid.d.ts +74 -74
- package/dist/IxGrid.js +280 -280
- package/dist/IxGridNav.d.ts +2 -0
- package/dist/IxGridNav.js +9 -0
- package/dist/IxGridNav.js.map +1 -0
- package/dist/components/IxGridColumnFilter.d.ts +29 -29
- package/dist/components/IxGridColumnFilter.js +158 -158
- package/dist/components/IxGridDownloadMenu.d.ts +15 -15
- package/dist/components/IxGridDownloadMenu.js +51 -51
- package/dist/components/IxGridNav.d.ts +15 -15
- package/dist/components/IxGridNav.js +20 -20
- package/dist/components/IxGridNoRows.d.ts +10 -9
- package/dist/components/IxGridNoRows.js +49 -36
- package/dist/components/IxGridNoRows.js.map +1 -1
- package/dist/components/IxGridRowFilter.d.ts +41 -41
- package/dist/components/IxGridRowFilter.js +201 -201
- 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/ix-grid-no-rows.d.ts +1 -1
- package/dist/components/ix-grid-no-rows.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 +3 -3
- package/dist/index.js +3 -3
- package/dist/ix-grid-copy.d.ts +10 -10
- package/dist/ix-grid-copy.js +10 -10
- package/dist/ix-grid-nav.d.ts +1 -0
- package/dist/ix-grid-nav.js +3 -0
- package/dist/ix-grid-nav.js.map +1 -0
- package/dist/ix-grid-no-rows.d.ts +1 -0
- package/dist/ix-grid-no-rows.js +3 -0
- package/dist/ix-grid-no-rows.js.map +1 -0
- 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/models/IxGridDownloadMenuItemModel.d.ts +7 -7
- package/dist/models/IxGridDownloadMenuItemModel.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 +2 -2
- package/dist/test/ix-grid.test.js +49 -49
- package/dist/test/ix-grid.test.js.map +1 -1
- package/dist/test/ix-pagination.test.d.ts +1 -1
- package/dist/test/ix-pagination.test.js +21 -21
- package/package.json +11 -11
- package/src/{react/IxGridNav.ts → IxGridNav.ts} +1 -1
- package/src/components/IxGridNoRows.ts +22 -11
- package/src/components/grid-row-filter-styles.ts +1 -1
- package/src/{components/ix-grid-nav.ts → ix-grid-nav.ts} +1 -1
- package/src/ix-grid-no-rows.ts +3 -0
- package/src/test/ix-grid.test.ts +1 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { fixture, expect, elementUpdated } from '@open-wc/testing';
|
|
3
|
-
import '../components/IxGridColumnFilter.js';
|
|
4
|
-
const columns = [
|
|
5
|
-
{
|
|
6
|
-
name: 'firstName',
|
|
7
|
-
header: 'First name',
|
|
8
|
-
hidden: false,
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: 'lastName',
|
|
12
|
-
header: 'Last name',
|
|
13
|
-
hidden: true,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'middleName',
|
|
17
|
-
header: 'Middle name',
|
|
18
|
-
hidden: false,
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
describe('IxGridColumnFilter', () => {
|
|
22
|
-
it('renders the grid column filter component', async () => {
|
|
23
|
-
const el = await fixture(html `<ix-grid-column-filter></ix-grid-column-filter>`);
|
|
24
|
-
expect(el).to.not.be.null;
|
|
25
|
-
});
|
|
26
|
-
it('renders the grid column filters list', async () => {
|
|
27
|
-
var _a, _b;
|
|
28
|
-
const el = await fixture(html `<ix-grid-column-filter .columns=${columns}></ix-grid-column-filter>`);
|
|
29
|
-
const list = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.list');
|
|
30
|
-
list.click();
|
|
31
|
-
await elementUpdated(el);
|
|
32
|
-
const options = (_b = el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelectorAll('ix-switch');
|
|
33
|
-
expect(options === null || options === void 0 ? void 0 : options.length).to.equal(3);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { fixture, expect, elementUpdated } from '@open-wc/testing';
|
|
3
|
+
import '../components/IxGridColumnFilter.js';
|
|
4
|
+
const columns = [
|
|
5
|
+
{
|
|
6
|
+
name: 'firstName',
|
|
7
|
+
header: 'First name',
|
|
8
|
+
hidden: false,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'lastName',
|
|
12
|
+
header: 'Last name',
|
|
13
|
+
hidden: true,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'middleName',
|
|
17
|
+
header: 'Middle name',
|
|
18
|
+
hidden: false,
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
describe('IxGridColumnFilter', () => {
|
|
22
|
+
it('renders the grid column filter component', async () => {
|
|
23
|
+
const el = await fixture(html `<ix-grid-column-filter></ix-grid-column-filter>`);
|
|
24
|
+
expect(el).to.not.be.null;
|
|
25
|
+
});
|
|
26
|
+
it('renders the grid column filters list', async () => {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
const el = await fixture(html `<ix-grid-column-filter .columns=${columns}></ix-grid-column-filter>`);
|
|
29
|
+
const list = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.list');
|
|
30
|
+
list.click();
|
|
31
|
+
await elementUpdated(el);
|
|
32
|
+
const options = (_b = el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelectorAll('ix-switch');
|
|
33
|
+
expect(options === null || options === void 0 ? void 0 : options.length).to.equal(3);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
36
|
//# sourceMappingURL=ix-grid-column-filter.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '../components/IxGridRowFilter.js';
|
|
1
|
+
import '../components/IxGridRowFilter.js';
|
|
@@ -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,2 +1,2 @@
|
|
|
1
|
-
import '../
|
|
2
|
-
import '../ix-grid.js';
|
|
1
|
+
import '../ix-grid-no-rows.js';
|
|
2
|
+
import '../ix-grid.js';
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { fixture, expect } from '@open-wc/testing';
|
|
3
|
-
import '../
|
|
4
|
-
import '../ix-grid.js';
|
|
5
|
-
const rows = [
|
|
6
|
-
{
|
|
7
|
-
name: 'one',
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: 'two',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'three',
|
|
14
|
-
},
|
|
15
|
-
];
|
|
16
|
-
const columns = [
|
|
17
|
-
{
|
|
18
|
-
name: 'one',
|
|
19
|
-
header: 'one',
|
|
20
|
-
bodyRenderer: row => html ` <span>${row.name}</span>`,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'two',
|
|
24
|
-
header: 'one',
|
|
25
|
-
bodyRenderer: row => html ` <span>${row.name}</span>`,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'three',
|
|
29
|
-
header: 'one',
|
|
30
|
-
bodyRenderer: row => html ` <span>${row.name}</span>`,
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
describe('IxGrid', () => {
|
|
34
|
-
it('renders a grid', async () => {
|
|
35
|
-
const el = await fixture(html `<ix-grid></ix-grid>`);
|
|
36
|
-
expect(el).to.not.be.null;
|
|
37
|
-
});
|
|
38
|
-
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-no-rows.js';
|
|
4
|
+
import '../ix-grid.js';
|
|
5
|
+
const rows = [
|
|
6
|
+
{
|
|
7
|
+
name: 'one',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: 'two',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'three',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
const columns = [
|
|
17
|
+
{
|
|
18
|
+
name: 'one',
|
|
19
|
+
header: 'one',
|
|
20
|
+
bodyRenderer: row => html ` <span>${row.name}</span>`,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'two',
|
|
24
|
+
header: 'one',
|
|
25
|
+
bodyRenderer: row => html ` <span>${row.name}</span>`,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'three',
|
|
29
|
+
header: 'one',
|
|
30
|
+
bodyRenderer: row => html ` <span>${row.name}</span>`,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
describe('IxGrid', () => {
|
|
34
|
+
it('renders a grid', async () => {
|
|
35
|
+
const el = await fixture(html `<ix-grid></ix-grid>`);
|
|
36
|
+
expect(el).to.not.be.null;
|
|
37
|
+
});
|
|
38
|
+
it('renders the correct number of rows', async () => {
|
|
39
39
|
const el = await fixture(html `<ix-grid
|
|
40
40
|
.columns=${columns}
|
|
41
41
|
.rows=${rows}
|
|
42
|
-
></ix-grid>`);
|
|
43
|
-
expect(rows.length).to.equal(3);
|
|
44
|
-
expect(el).to.not.be.null;
|
|
45
|
-
});
|
|
46
|
-
it('renders no rows component state', async () => {
|
|
47
|
-
var _a;
|
|
42
|
+
></ix-grid>`);
|
|
43
|
+
expect(rows.length).to.equal(3);
|
|
44
|
+
expect(el).to.not.be.null;
|
|
45
|
+
});
|
|
46
|
+
it('renders no rows component state', async () => {
|
|
47
|
+
var _a;
|
|
48
48
|
const el = await fixture(html `<ix-grid
|
|
49
49
|
.columns=${columns}
|
|
50
50
|
.rows=${[]}
|
|
51
51
|
><ix-grid-no-rows slot="no-rows"></ix-grid-no-rows
|
|
52
|
-
></ix-grid>`);
|
|
53
|
-
const noRows = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="no-rows"]');
|
|
54
|
-
expect(noRows).to.not.be.null;
|
|
55
|
-
});
|
|
56
|
-
});
|
|
52
|
+
></ix-grid>`);
|
|
53
|
+
const noRows = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="no-rows"]');
|
|
54
|
+
expect(noRows).to.not.be.null;
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
57
|
//# sourceMappingURL=ix-grid.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-grid.test.js","sourceRoot":"","sources":["../../src/test/ix-grid.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,
|
|
1
|
+
{"version":3,"file":"ix-grid.test.js","sourceRoot":"","sources":["../../src/test/ix-grid.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,uBAAuB,CAAC;AAC/B,OAAO,eAAe,CAAC;AAEvB,MAAM,IAAI,GAAG;IACX;QACE,IAAI,EAAE,KAAK;KACZ;IACD;QACE,IAAI,EAAE,KAAK;KACZ;IACD;QACE,IAAI,EAAE,OAAO;KACd;CACF,CAAC;AAEF,MAAM,OAAO,GAAG;IACd;QACE,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,KAAK;QACb,YAAY,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA,UAAU,GAAG,CAAC,IAAI,SAAS;KACrD;IACD;QACE,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,KAAK;QACb,YAAY,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA,UAAU,GAAG,CAAC,IAAI,SAAS;KACrD;IACD;QACE,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,KAAK;QACb,YAAY,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA,UAAU,GAAG,CAAC,IAAI,SAAS;KACrD;CACF,CAAC;AAEF,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,IAAI,CAAA,qBAAqB,CAAC,CAAC;QAE5D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,IAAI,CAAA;iBACxB,OAAO;cACV,IAAI;gBACF,CAAC,CAAC;QAEd,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEhC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;;QAC/C,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,IAAI,CAAA;iBACxB,OAAO;cACV,EAAE;;gBAEA,CAAC,CAAC;QAEd,MAAM,MAAM,GAAG,MAAA,EAAE,CAAC,UAAU,0CAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { html } from 'lit';\nimport { fixture, expect } from '@open-wc/testing';\nimport { IxGrid } from '../IxGrid.js';\nimport '../ix-grid-no-rows.js';\nimport '../ix-grid.js';\n\nconst rows = [\n {\n name: 'one',\n },\n {\n name: 'two',\n },\n {\n name: 'three',\n },\n];\n\nconst columns = [\n {\n name: 'one',\n header: 'one',\n bodyRenderer: row => html` <span>${row.name}</span>`,\n },\n {\n name: 'two',\n header: 'one',\n bodyRenderer: row => html` <span>${row.name}</span>`,\n },\n {\n name: 'three',\n header: 'one',\n bodyRenderer: row => html` <span>${row.name}</span>`,\n },\n];\n\ndescribe('IxGrid', () => {\n it('renders a grid', async () => {\n const el = await fixture<IxGrid>(html`<ix-grid></ix-grid>`);\n\n expect(el).to.not.be.null;\n });\n\n it('renders the correct number of rows', async () => {\n const el = await fixture<IxGrid>(html`<ix-grid\n .columns=${columns}\n .rows=${rows}\n ></ix-grid>`);\n\n expect(rows.length).to.equal(3);\n\n expect(el).to.not.be.null;\n });\n\n it('renders no rows component state', async () => {\n const el = await fixture<IxGrid>(html`<ix-grid\n .columns=${columns}\n .rows=${[]}\n ><ix-grid-no-rows slot=\"no-rows\"></ix-grid-no-rows\n ></ix-grid>`);\n\n const noRows = el.shadowRoot?.querySelector('slot[name=\"no-rows\"]');\n expect(noRows).to.not.be.null;\n });\n});\n"]}
|
|
@@ -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,17 +3,17 @@
|
|
|
3
3
|
"description": "Webcomponent ix-grid following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "1.0.49-alpha.
|
|
6
|
+
"version": "1.0.49-alpha.2",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/index.js",
|
|
12
12
|
"./ix-grid.js": "./dist/ix-grid.js",
|
|
13
|
-
"./ix-grid-nav.js": "./dist/
|
|
13
|
+
"./ix-grid-nav.js": "./dist/ix-grid-nav.js",
|
|
14
14
|
"./ix-grid.min.js": "./dist/ix-grid.min.js",
|
|
15
|
-
"./ix-grid-no-rows.js": "./dist/
|
|
16
|
-
"./IxGridNav": "./dist/
|
|
15
|
+
"./ix-grid-no-rows.js": "./dist/ix-grid-no-rows.js",
|
|
16
|
+
"./IxGridNav": "./dist/IxGridNav.js"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@digital-realty/ix-button": "^3.2.32-alpha.
|
|
33
|
-
"@digital-realty/ix-icon": "^1.0.37-alpha.
|
|
34
|
-
"@digital-realty/ix-icon-button": "^1.0.41-alpha.
|
|
35
|
-
"@digital-realty/ix-menu": "^1.0.5-alpha.
|
|
36
|
-
"@digital-realty/ix-select": "^1.0.39-alpha.
|
|
37
|
-
"@digital-realty/ix-switch": "^2.1.12-alpha.
|
|
32
|
+
"@digital-realty/ix-button": "^3.2.32-alpha.0",
|
|
33
|
+
"@digital-realty/ix-icon": "^1.0.37-alpha.0",
|
|
34
|
+
"@digital-realty/ix-icon-button": "^1.0.41-alpha.0",
|
|
35
|
+
"@digital-realty/ix-menu": "^1.0.5-alpha.0",
|
|
36
|
+
"@digital-realty/ix-select": "^1.0.39-alpha.0",
|
|
37
|
+
"@digital-realty/ix-switch": "^2.1.12-alpha.0",
|
|
38
38
|
"@lit/react": "^1.0.5",
|
|
39
39
|
"@vaadin/grid": "^24.3.11",
|
|
40
40
|
"lit": "^2.0.2",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"prettier --write"
|
|
104
104
|
]
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "60da388c5cabac1ab856f981c965c44ed46d27a0"
|
|
107
107
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createComponent } from '@lit/react';
|
|
3
|
-
import { IxGridNavigation } from '
|
|
3
|
+
import { IxGridNavigation } from './components/IxGridNav.js';
|
|
4
4
|
|
|
5
5
|
export const IxGridNav = createComponent({
|
|
6
6
|
tagName: 'ix-grid-nav',
|
|
@@ -6,23 +6,24 @@ export class IxGridNoRows extends LitElement {
|
|
|
6
6
|
static styles = css`
|
|
7
7
|
.container {
|
|
8
8
|
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
9
|
justify-content: center;
|
|
11
|
-
|
|
10
|
+
align-items: center;
|
|
12
11
|
flex-direction: column;
|
|
12
|
+
text-align: center;
|
|
13
|
+
padding: 3.125rem 0;
|
|
13
14
|
}
|
|
14
15
|
.icon {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
user-select: none;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
fill: currentcolor;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
font-size: 1.5rem;
|
|
21
|
+
color: rgb(255, 152, 0);
|
|
22
|
+
transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
20
23
|
}
|
|
21
24
|
.warning,
|
|
22
25
|
.error {
|
|
23
26
|
user-select: none;
|
|
24
|
-
width: 48px;
|
|
25
|
-
height: 44px;
|
|
26
27
|
color: var(--clr-warning, #ff9800);
|
|
27
28
|
}
|
|
28
29
|
.critical {
|
|
@@ -32,7 +33,15 @@ export class IxGridNoRows extends LitElement {
|
|
|
32
33
|
font-family: var(--ix-font-family, 'Red Hat Display');
|
|
33
34
|
}
|
|
34
35
|
h2.dlr-text-heading {
|
|
35
|
-
margin
|
|
36
|
+
margin: 0.5rem 0 0;
|
|
37
|
+
font-family: 'Red Hat Display', sans-serif;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-size: 1.5rem;
|
|
40
|
+
line-height: 2rem;
|
|
41
|
+
letter-spacing: 0em;
|
|
42
|
+
color: rgb(9, 34, 65);
|
|
43
|
+
text-align: center;
|
|
44
|
+
font-weight: 700;
|
|
36
45
|
}
|
|
37
46
|
`;
|
|
38
47
|
|
|
@@ -42,9 +51,11 @@ export class IxGridNoRows extends LitElement {
|
|
|
42
51
|
|
|
43
52
|
@property({ type: String }) message: string = 'No data to display';
|
|
44
53
|
|
|
54
|
+
@property({ type: String }) iconFontSize: string = '3rem';
|
|
55
|
+
|
|
45
56
|
render() {
|
|
46
57
|
return html`
|
|
47
|
-
<div class="container">
|
|
58
|
+
<div class="container" style="--ix-icon-font-size: ${this.iconFontSize};">
|
|
48
59
|
<ix-icon class="icon ${this.type}">${this.icon}</ix-icon>
|
|
49
60
|
<h2 class="dlr-text-heading">${this.message}</h2>
|
|
50
61
|
</div>
|
package/src/test/ix-grid.test.ts
CHANGED