@digital-realty/ix-grid 1.4.1-alpha.2 → 1.4.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.
- package/dist/IxGrid.d.ts +13 -0
- package/dist/IxGrid.js +107 -19
- package/dist/IxGrid.js.map +1 -1
- package/dist/components/IxGridNav.js +0 -1
- package/dist/components/IxGridNav.js.map +1 -1
- package/dist/components/IxGridNoRows.js +3 -1
- package/dist/components/IxGridNoRows.js.map +1 -1
- package/dist/components/IxGridRowFilter.d.ts +2 -0
- package/dist/components/IxGridRowFilter.js +40 -18
- package/dist/components/IxGridRowFilter.js.map +1 -1
- package/dist/components/IxPagination.d.ts +1 -0
- package/dist/components/IxPagination.js +10 -4
- package/dist/components/IxPagination.js.map +1 -1
- package/dist/components/grid-row-filter-styles.js +8 -2
- package/dist/components/grid-row-filter-styles.js.map +1 -1
- package/dist/components/pagination-styles.js +8 -0
- package/dist/components/pagination-styles.js.map +1 -1
- package/dist/grid-view-styles.js +16 -10
- package/dist/grid-view-styles.js.map +1 -1
- package/dist/ix-grid.min.js +1210 -19
- package/dist/test/a11y.test.d.ts +2 -0
- package/dist/test/a11y.test.js +18 -0
- package/dist/test/a11y.test.js.map +1 -0
- package/dist/test/ix-grid-row-filter.test.js +63 -0
- package/dist/test/ix-grid-row-filter.test.js.map +1 -1
- package/dist/test/ix-grid.test.js +42 -1
- package/dist/test/ix-grid.test.js.map +1 -1
- package/dist/test/mockData.d.ts +10 -0
- package/dist/test/mockData.js +36 -0
- package/dist/test/mockData.js.map +1 -0
- package/package.json +23 -28
- package/rollup.config.mjs +4 -42
- package/src/IxGrid.ts +119 -15
- package/src/components/IxGridNav.ts +0 -1
- package/src/components/IxGridNoRows.ts +3 -1
- package/src/components/IxGridRowFilter.ts +43 -24
- package/src/components/IxPagination.ts +8 -4
- package/src/components/grid-row-filter-styles.ts +8 -2
- package/src/components/pagination-styles.ts +8 -0
- package/src/grid-view-styles.ts +16 -10
- package/src/test/a11y.test.ts +25 -0
- package/src/test/ix-grid-row-filter.test.ts +85 -0
- package/src/test/ix-grid.test.ts +64 -1
- package/src/test/mockData.ts +37 -0
- package/web-test-runner.config.mjs +5 -1
- package/src/IxGrid.d.ts +0 -148
- package/src/IxGrid.js +0 -784
- package/src/IxGrid.js.map +0 -1
- package/src/IxGridNav.d.ts +0 -2
- package/src/IxGridNav.js +0 -8
- package/src/IxGridNav.js.map +0 -1
- package/src/components/IxGridColumnFilter.d.ts +0 -35
- package/src/components/IxGridColumnFilter.js +0 -249
- package/src/components/IxGridColumnFilter.js.map +0 -1
- package/src/components/IxGridDownloadMenu.d.ts +0 -17
- package/src/components/IxGridDownloadMenu.js +0 -98
- package/src/components/IxGridDownloadMenu.js.map +0 -1
- package/src/components/IxGridNav.d.ts +0 -16
- package/src/components/IxGridNav.js +0 -103
- package/src/components/IxGridNav.js.map +0 -1
- package/src/components/IxGridNoRows.d.ts +0 -10
- package/src/components/IxGridNoRows.js +0 -74
- package/src/components/IxGridNoRows.js.map +0 -1
- package/src/components/IxGridRowFilter.d.ts +0 -55
- package/src/components/IxGridRowFilter.js +0 -441
- package/src/components/IxGridRowFilter.js.map +0 -1
- package/src/components/IxPagination.d.ts +0 -14
- package/src/components/IxPagination.js +0 -107
- package/src/components/IxPagination.js.map +0 -1
- package/src/components/grid-column-filter-styles.d.ts +0 -1
- package/src/components/grid-column-filter-styles.js +0 -89
- package/src/components/grid-column-filter-styles.js.map +0 -1
- package/src/components/grid-row-filter-styles.d.ts +0 -1
- package/src/components/grid-row-filter-styles.js +0 -311
- package/src/components/grid-row-filter-styles.js.map +0 -1
- package/src/components/ix-grid-no-rows.d.ts +0 -1
- package/src/components/ix-grid-no-rows.js +0 -2
- package/src/components/ix-grid-no-rows.js.map +0 -1
- package/src/components/pagination-styles.d.ts +0 -1
- package/src/components/pagination-styles.js +0 -84
- package/src/components/pagination-styles.js.map +0 -1
- package/src/grid-view-styles.d.ts +0 -1
- package/src/grid-view-styles.js +0 -283
- package/src/grid-view-styles.js.map +0 -1
- package/src/index.d.ts +0 -3
- package/src/index.js +0 -3
- package/src/index.js.map +0 -1
- package/src/ix-grid-copy.d.ts +0 -12
- package/src/ix-grid-copy.js +0 -12
- package/src/ix-grid-copy.js.map +0 -1
- package/src/ix-grid-nav.d.ts +0 -1
- package/src/ix-grid-nav.js +0 -2
- package/src/ix-grid-nav.js.map +0 -1
- package/src/ix-grid-no-rows.d.ts +0 -1
- package/src/ix-grid-no-rows.js +0 -2
- package/src/ix-grid-no-rows.js.map +0 -1
- package/src/ix-grid.d.ts +0 -1
- package/src/ix-grid.js +0 -2
- package/src/ix-grid.js.map +0 -1
- package/src/models/IxGridDownloadMenuItemModel.d.ts +0 -7
- package/src/models/IxGridDownloadMenuItemModel.js +0 -1
- package/src/models/IxGridDownloadMenuItemModel.js.map +0 -1
- package/src/test/ix-grid-column-filter.test.js +0 -41
- package/src/test/ix-grid-row-filter.test.js +0 -281
- package/src/test/ix-grid.test.js +0 -391
- package/src/test/ix-pagination.test.js +0 -58
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { expect, fixture, oneEvent } from '@open-wc/testing';
|
|
3
|
-
// eslint-disable-next-line import/no-duplicates
|
|
4
|
-
import '../components/IxPagination.js';
|
|
5
|
-
describe('IxPagination', () => {
|
|
6
|
-
it('renders pagination', async () => {
|
|
7
|
-
const el = await fixture(html `<ix-pagination></ix-pagination>`);
|
|
8
|
-
expect(el).to.not.be.null;
|
|
9
|
-
});
|
|
10
|
-
it('renders pagination page size select', async () => {
|
|
11
|
-
var _a;
|
|
12
|
-
const el = await fixture(html `<ix-pagination
|
|
13
|
-
.pageSizes=${[1, 2, 3]}
|
|
14
|
-
></ix-pagination>`);
|
|
15
|
-
const pageSizeSelect = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('ix-select-option');
|
|
16
|
-
expect(pageSizeSelect === null || pageSizeSelect === void 0 ? void 0 : pageSizeSelect.length).to.equal(3);
|
|
17
|
-
});
|
|
18
|
-
it('renders pagination range info', async () => {
|
|
19
|
-
var _a;
|
|
20
|
-
const el = await fixture(html `<ix-pagination
|
|
21
|
-
pageSize="10"
|
|
22
|
-
page="2"
|
|
23
|
-
recordCount="99"
|
|
24
|
-
></ix-pagination>`);
|
|
25
|
-
const pageRangeInfo = (_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('p')[1];
|
|
26
|
-
expect(pageRangeInfo === null || pageRangeInfo === void 0 ? void 0 : pageRangeInfo.innerText).to.equal('11 - 20 of 99');
|
|
27
|
-
});
|
|
28
|
-
it('calculates new page when page size increases', async () => {
|
|
29
|
-
var _a, _b, _c;
|
|
30
|
-
const el = await fixture(html `<ix-pagination
|
|
31
|
-
.pageSizes=${[10, 20, 50, 100]}
|
|
32
|
-
pageSize="50"
|
|
33
|
-
page="5"
|
|
34
|
-
recordCount="600"
|
|
35
|
-
></ix-pagination>`);
|
|
36
|
-
const listener = oneEvent(el, 'updatePagination');
|
|
37
|
-
const ixSelect = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("ix-select-option[value='100']");
|
|
38
|
-
(_c = (_b = ixSelect === null || ixSelect === void 0 ? void 0 : ixSelect.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('li')) === null || _c === void 0 ? void 0 : _c.click();
|
|
39
|
-
const event = await listener;
|
|
40
|
-
expect(event.detail.page).to.equal(3);
|
|
41
|
-
expect(event.detail.pageSize).to.equal(100);
|
|
42
|
-
});
|
|
43
|
-
it('calculates new page when page size decreases', async () => {
|
|
44
|
-
var _a, _b, _c;
|
|
45
|
-
const el = await fixture(html `<ix-pagination
|
|
46
|
-
.pageSizes=${[10, 20, 50, 100]}
|
|
47
|
-
pageSize="50"
|
|
48
|
-
page="5"
|
|
49
|
-
recordCount="600"
|
|
50
|
-
></ix-pagination>`);
|
|
51
|
-
const listener = oneEvent(el, 'updatePagination');
|
|
52
|
-
const ixSelect = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("ix-select-option[value='20']");
|
|
53
|
-
(_c = (_b = ixSelect === null || ixSelect === void 0 ? void 0 : ixSelect.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('li')) === null || _c === void 0 ? void 0 : _c.click();
|
|
54
|
-
const event = await listener;
|
|
55
|
-
expect(event.detail.page).to.equal(11);
|
|
56
|
-
expect(event.detail.pageSize).to.equal(20);
|
|
57
|
-
});
|
|
58
|
-
});
|