@brightspace-ui/core 3.227.4 → 3.227.5
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/components/button/button.js +8 -8
- package/components/demo/test/demo-page-settings.test.js +25 -0
- package/components/demo/test/demo-page.test.js +17 -0
- package/package.json +1 -1
- package/components/alert/demo/alert-toast.html +0 -106
- package/components/alert/demo/alert.html +0 -82
- package/components/backdrop/demo/backdrop-loading.html +0 -166
- package/components/backdrop/demo/backdrop.html +0 -57
- package/components/breadcrumbs/demo/breadcrumbs.html +0 -53
- package/components/button/demo/button-add.html +0 -55
- package/components/button/demo/button-copy.html +0 -122
- package/components/button/demo/button-icon.html +0 -174
- package/components/button/demo/button-move.html +0 -38
- package/components/button/demo/button-split.html +0 -76
- package/components/button/demo/button-subtle.html +0 -132
- package/components/button/demo/button-toggle.html +0 -80
- package/components/button/demo/button.html +0 -67
- package/components/button/demo/floating-buttons-in-frame.html +0 -44
- package/components/button/demo/floating-buttons-in-tabs.html +0 -244
- package/components/button/demo/floating-buttons-page.html +0 -100
- package/components/button/demo/floating-buttons.html +0 -101
- package/components/calendar/demo/calendar.html +0 -76
- package/components/card/demo/card.html +0 -304
- package/components/collapsible-panel/demo/collapsible-panel.html +0 -218
- package/components/colors/demo/color-swatch.js +0 -240
- package/components/colors/demo/colors.html +0 -139
- package/components/count-badge/demo/count-badge-icon.html +0 -48
- package/components/count-badge/demo/count-badge.html +0 -73
- package/components/demo/demo/demo-snippet.html +0 -71
- package/components/description-list/demo/description-list-test.js +0 -142
- package/components/description-list/demo/description-list.html +0 -48
- package/components/dialog/demo/dialog-async-content-until.js +0 -89
- package/components/dialog/demo/dialog-async-content.js +0 -72
- package/components/dialog/demo/dialog-confirm.html +0 -102
- package/components/dialog/demo/dialog-container.js +0 -40
- package/components/dialog/demo/dialog-fullscreen.html +0 -273
- package/components/dialog/demo/dialog-nested.html +0 -94
- package/components/dialog/demo/dialog.html +0 -398
- package/components/dropdown/demo/dropdown-button.html +0 -102
- package/components/dropdown/demo/dropdown-context-menu.html +0 -129
- package/components/dropdown/demo/dropdown-flicker-inner.html +0 -70
- package/components/dropdown/demo/dropdown-flicker.html +0 -142
- package/components/dropdown/demo/dropdown-menu-demo-view.js +0 -37
- package/components/dropdown/demo/dropdown-menu.html +0 -227
- package/components/dropdown/demo/dropdown-more.html +0 -160
- package/components/dropdown/demo/dropdown-positioning.html +0 -127
- package/components/dropdown/demo/dropdown-tabs.html +0 -87
- package/components/dropdown/demo/dropdown.html +0 -217
- package/components/empty-state/demo/empty-state.html +0 -94
- package/components/expand-collapse/demo/expand-collapse-content.html +0 -58
- package/components/filter/demo/filter-load-more-demo.js +0 -182
- package/components/filter/demo/filter-overflow-group.html +0 -246
- package/components/filter/demo/filter-search-demo.js +0 -135
- package/components/filter/demo/filter-tags.html +0 -115
- package/components/filter/demo/filter.html +0 -230
- package/components/focus-trap/demo/focus-trap.html +0 -75
- package/components/form/demo/form-demo.js +0 -105
- package/components/form/demo/form-dialog-demo.js +0 -94
- package/components/form/demo/form-panel-demo.js +0 -89
- package/components/form/demo/form.html +0 -37
- package/components/hierarchical-view/demo/hierarchical-view.html +0 -221
- package/components/html-block/demo/html-block-code.html +0 -55
- package/components/html-block/demo/html-block.html +0 -696
- package/components/icons/demo/icon-color-override.js +0 -23
- package/components/icons/demo/icon-custom.html +0 -112
- package/components/icons/demo/icon-size-override.js +0 -24
- package/components/icons/demo/icon.html +0 -52
- package/components/inputs/demo/input-checkbox.html +0 -118
- package/components/inputs/demo/input-color-palette.js +0 -67
- package/components/inputs/demo/input-color.html +0 -110
- package/components/inputs/demo/input-date-range.html +0 -114
- package/components/inputs/demo/input-date-time-range.html +0 -128
- package/components/inputs/demo/input-date-time.html +0 -100
- package/components/inputs/demo/input-date.html +0 -81
- package/components/inputs/demo/input-group.html +0 -56
- package/components/inputs/demo/input-number.html +0 -136
- package/components/inputs/demo/input-percent.html +0 -99
- package/components/inputs/demo/input-radio-label-test.js +0 -45
- package/components/inputs/demo/input-radio-solo-test.js +0 -47
- package/components/inputs/demo/input-radio.html +0 -119
- package/components/inputs/demo/input-search.html +0 -75
- package/components/inputs/demo/input-select-test.js +0 -60
- package/components/inputs/demo/input-select.html +0 -45
- package/components/inputs/demo/input-text.html +0 -163
- package/components/inputs/demo/input-textarea.html +0 -124
- package/components/inputs/demo/input-time-range.html +0 -121
- package/components/inputs/demo/input-time.html +0 -95
- package/components/link/demo/link.html +0 -111
- package/components/list/demo/demo-list-nav.js +0 -170
- package/components/list/demo/demo-list-nested-iterations-helper.js +0 -168
- package/components/list/demo/demo-list-nested-lazy-load.js +0 -133
- package/components/list/demo/demo-list-nested.js +0 -291
- package/components/list/demo/demo-list.js +0 -241
- package/components/list/demo/list-color.html +0 -423
- package/components/list/demo/list-demo-scenarios.js +0 -380
- package/components/list/demo/list-drag-and-drop-position.js +0 -102
- package/components/list/demo/list-drag-and-drop.html +0 -82
- package/components/list/demo/list-expand-collapse.html +0 -136
- package/components/list/demo/list-item-actions.html +0 -371
- package/components/list/demo/list-item-custom.js +0 -204
- package/components/list/demo/list-item-layouts.html +0 -331
- package/components/list/demo/list-item-scroll.html +0 -122
- package/components/list/demo/list-layout.html +0 -575
- package/components/list/demo/list-nav.html +0 -110
- package/components/list/demo/list-nested.html +0 -270
- package/components/list/demo/list-selection.html +0 -301
- package/components/list/demo/list.html +0 -319
- package/components/loading-spinner/demo/loading-spinner-override.js +0 -34
- package/components/loading-spinner/demo/loading-spinner.html +0 -63
- package/components/menu/demo/checkbox-menu.html +0 -52
- package/components/menu/demo/custom-menu-item.js +0 -37
- package/components/menu/demo/custom-view.js +0 -63
- package/components/menu/demo/menu.html +0 -211
- package/components/menu/demo/radio-menu.html +0 -52
- package/components/meter/demo/meter.html +0 -115
- package/components/more-less/demo/more-less-test.js +0 -67
- package/components/more-less/demo/more-less.html +0 -71
- package/components/object-property-list/demo/object-property-list.html +0 -99
- package/components/offscreen/demo/offscreen-demo.js +0 -16
- package/components/offscreen/demo/offscreen.html +0 -44
- package/components/overflow-group/demo/demo-overflow-group.js +0 -29
- package/components/overflow-group/demo/overflow-group.html +0 -110
- package/components/paging/demo/pager-load-more.html +0 -120
- package/components/popover/demo/popover.html +0 -309
- package/components/progress/demo/progress.html +0 -104
- package/components/scroll-wrapper/demo/scroll-wrapper-test.js +0 -108
- package/components/scroll-wrapper/demo/scroll-wrapper.html +0 -52
- package/components/selection/demo/demo-selection.js +0 -35
- package/components/selection/demo/selection.html +0 -198
- package/components/skeleton/demo/skeleton-group-nested-test.js +0 -71
- package/components/skeleton/demo/skeleton-group-test-wrapper.js +0 -18
- package/components/skeleton/demo/skeleton-group-test.js +0 -91
- package/components/skeleton/demo/skeleton-mixin.html +0 -78
- package/components/skeleton/demo/skeleton-test-box.js +0 -34
- package/components/skeleton/demo/skeleton-test-container.js +0 -45
- package/components/skeleton/demo/skeleton-test-heading.js +0 -44
- package/components/skeleton/demo/skeleton-test-link.js +0 -47
- package/components/skeleton/demo/skeleton-test-paragraph.js +0 -54
- package/components/skeleton/demo/skeleton-test-stack.js +0 -38
- package/components/skeleton/demo/skeleton-test-width.js +0 -20
- package/components/sorting/demo/sort.html +0 -37
- package/components/status-indicator/demo/status-indicator.html +0 -99
- package/components/switch/demo/switch.html +0 -95
- package/components/table/demo/table-test.js +0 -271
- package/components/table/demo/table.html +0 -107
- package/components/tabs/demo/tab-custom.js +0 -39
- package/components/tabs/demo/tabs-array.js +0 -43
- package/components/tabs/demo/tabs.html +0 -558
- package/components/tag-list/demo/tag-list.html +0 -117
- package/components/tooltip/demo/tooltip.html +0 -275
- package/components/typography/demo/typography.html +0 -93
- package/components/view-switcher/demo/demo-table-view.js +0 -41
- package/components/view-switcher/demo/view-switcher.html +0 -71
- package/directives/animate/demo/animate-test.js +0 -98
- package/directives/animate/demo/index.html +0 -23
- package/helpers/demo/announce-test.js +0 -37
- package/helpers/demo/announce.html +0 -19
- package/helpers/demo/dismissible-test.js +0 -66
- package/helpers/demo/dismissible.html +0 -38
- package/helpers/demo/gestures.html +0 -58
- package/helpers/demo/prism.html +0 -694
- package/helpers/demo/template-tags.html +0 -118
- package/mixins/arrow-keys/demo/arrow-keys-mixin.html +0 -29
- package/mixins/arrow-keys/demo/arrow-keys-test.js +0 -38
- package/mixins/async-container/demo/async-container.html +0 -109
- package/mixins/async-container/demo/async-container.js +0 -27
- package/mixins/async-container/demo/async-item.js +0 -80
- package/mixins/labelled/demo/labelled-mixin.html +0 -90
- package/mixins/localize/demo/localize-mixin-greeting.js +0 -39
- package/mixins/localize/demo/localize-mixin-mission.js +0 -25
- package/mixins/localize/demo/localize-mixin.html +0 -28
- package/templates/primary-secondary/demo/form.html +0 -55
- package/templates/primary-secondary/demo/index.html +0 -27
- package/templates/primary-secondary/demo/integration.html +0 -457
- package/templates/primary-secondary/demo/overflow-hidden.html +0 -22
- package/templates/primary-secondary/demo/width-type-normal.html +0 -26
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import '../../colors/colors.js';
|
|
2
|
-
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { SkeletonMixin } from '../skeleton-mixin.js';
|
|
4
|
-
|
|
5
|
-
export class SkeletonTestStack extends SkeletonMixin(LitElement) {
|
|
6
|
-
|
|
7
|
-
static get styles() {
|
|
8
|
-
return [
|
|
9
|
-
super.styles,
|
|
10
|
-
css`
|
|
11
|
-
:host {
|
|
12
|
-
display: block;
|
|
13
|
-
}
|
|
14
|
-
.d2l-demo-stack {
|
|
15
|
-
height: 100px;
|
|
16
|
-
width: 300px;
|
|
17
|
-
}
|
|
18
|
-
#stack-2 {
|
|
19
|
-
bottom: 0;
|
|
20
|
-
line-height: 1em;
|
|
21
|
-
margin: -0.5em;
|
|
22
|
-
position: absolute;
|
|
23
|
-
width: 100%;
|
|
24
|
-
z-index: 500;
|
|
25
|
-
}
|
|
26
|
-
`
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
render() {
|
|
31
|
-
return html`
|
|
32
|
-
<div class="d2l-demo-stack d2l-skeletize">Stack 2: 999</div>
|
|
33
|
-
<div id="stack-2">Stack 2: 500</div>
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
customElements.define('d2l-test-skeleton-stack', SkeletonTestStack);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit';
|
|
2
|
-
import { SkeletonMixin } from '../skeleton-mixin.js';
|
|
3
|
-
|
|
4
|
-
export class SkeletonTestWidth extends SkeletonMixin(LitElement) {
|
|
5
|
-
|
|
6
|
-
static get styles() {
|
|
7
|
-
return [
|
|
8
|
-
super.styles,
|
|
9
|
-
css`:host { display: block; }`
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
render() {
|
|
14
|
-
const sizes = [...Array(19).keys()].map(i => (i + 1) * 5);
|
|
15
|
-
return sizes.map(s => html`<p class="d2l-skeletize d2l-skeletize-${s}">${s}%</p>`);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
customElements.define('d2l-test-skeleton-width', SkeletonTestWidth);
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
|
7
|
-
<script type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import '../sort.js';
|
|
10
|
-
import '../sort-item.js';
|
|
11
|
-
</script>
|
|
12
|
-
</head>
|
|
13
|
-
<body unresolved>
|
|
14
|
-
<d2l-demo-page page-title="Sorting">
|
|
15
|
-
<h2>Default</h2>
|
|
16
|
-
<d2l-demo-snippet>
|
|
17
|
-
<template>
|
|
18
|
-
<d2l-sort>
|
|
19
|
-
<d2l-sort-item text="Most Relevant" value="relevant"></d2l-sort-item>
|
|
20
|
-
<d2l-sort-item text="Recently Updated" value="updated"></d2l-sort-item>
|
|
21
|
-
<d2l-sort-item text="Highest Rated" value="rating"></d2l-sort-item>
|
|
22
|
-
</d2l-sort>
|
|
23
|
-
</template>
|
|
24
|
-
</d2l-demo-snippet>
|
|
25
|
-
<h2>Disabled</h2>
|
|
26
|
-
<d2l-demo-snippet>
|
|
27
|
-
<template>
|
|
28
|
-
<d2l-sort disabled>
|
|
29
|
-
<d2l-sort-item text="Most Relevant" value="relevant"></d2l-sort-item>
|
|
30
|
-
<d2l-sort-item text="Recently Updated" value="updated"></d2l-sort-item>
|
|
31
|
-
<d2l-sort-item text="Highest Rated" value="rating"></d2l-sort-item>
|
|
32
|
-
</d2l-sort>
|
|
33
|
-
</template>
|
|
34
|
-
</d2l-demo-snippet>
|
|
35
|
-
</d2l-demo-page>
|
|
36
|
-
</body>
|
|
37
|
-
</html>
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<meta charset="UTF-8">
|
|
7
|
-
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
|
8
|
-
<script type="module">
|
|
9
|
-
import '../../demo/demo-page.js';
|
|
10
|
-
import '../status-indicator.js';
|
|
11
|
-
</script>
|
|
12
|
-
<style>
|
|
13
|
-
.align-item {
|
|
14
|
-
color: var(--d2l-color-tungsten);
|
|
15
|
-
font-size: 0.7rem;
|
|
16
|
-
}
|
|
17
|
-
.align-item.bullet::before {
|
|
18
|
-
color: var(--d2l-color-tungsten);
|
|
19
|
-
content: "\002022";
|
|
20
|
-
margin-left: 5px;
|
|
21
|
-
margin-right: 5px;
|
|
22
|
-
}
|
|
23
|
-
</style>
|
|
24
|
-
</head>
|
|
25
|
-
|
|
26
|
-
<body unresolved>
|
|
27
|
-
|
|
28
|
-
<d2l-demo-page page-title="d2l-status-indicator">
|
|
29
|
-
|
|
30
|
-
<h2>Default</h2>
|
|
31
|
-
<d2l-demo-snippet>
|
|
32
|
-
<template>
|
|
33
|
-
<d2l-status-indicator state="default" text="due today"></d2l-status-indicator>
|
|
34
|
-
</template>
|
|
35
|
-
</d2l-demo-snippet>
|
|
36
|
-
|
|
37
|
-
<h2>Success</h2>
|
|
38
|
-
<d2l-demo-snippet>
|
|
39
|
-
<template>
|
|
40
|
-
<d2l-status-indicator state="success" text="complete"></d2l-status-indicator>
|
|
41
|
-
</template>
|
|
42
|
-
</d2l-demo-snippet>
|
|
43
|
-
|
|
44
|
-
<h2>Alert</h2>
|
|
45
|
-
<d2l-demo-snippet>
|
|
46
|
-
<template>
|
|
47
|
-
<d2l-status-indicator state="alert" text="overdue"></d2l-status-indicator>
|
|
48
|
-
</template>
|
|
49
|
-
</d2l-demo-snippet>
|
|
50
|
-
|
|
51
|
-
<h2>None</h2>
|
|
52
|
-
<d2l-demo-snippet>
|
|
53
|
-
<template>
|
|
54
|
-
<d2l-status-indicator state="none" text="closed"></d2l-status-indicator>
|
|
55
|
-
</template>
|
|
56
|
-
</d2l-demo-snippet>
|
|
57
|
-
|
|
58
|
-
<h2>Default Bold</h2>
|
|
59
|
-
<d2l-demo-snippet>
|
|
60
|
-
<template>
|
|
61
|
-
<d2l-status-indicator state="default" text="due today" bold></d2l-status-indicator>
|
|
62
|
-
</template>
|
|
63
|
-
</d2l-demo-snippet>
|
|
64
|
-
|
|
65
|
-
<h2>Success Bold</h2>
|
|
66
|
-
<d2l-demo-snippet>
|
|
67
|
-
<template>
|
|
68
|
-
<d2l-status-indicator state="success" text="complete" bold></d2l-status-indicator>
|
|
69
|
-
</template>
|
|
70
|
-
</d2l-demo-snippet>
|
|
71
|
-
|
|
72
|
-
<h2>Alert Bold</h2>
|
|
73
|
-
<d2l-demo-snippet>
|
|
74
|
-
<template>
|
|
75
|
-
<d2l-status-indicator state="alert" text="overdue" bold></d2l-status-indicator>
|
|
76
|
-
</template>
|
|
77
|
-
</d2l-demo-snippet>
|
|
78
|
-
|
|
79
|
-
<h2>None Bold</h2>
|
|
80
|
-
<d2l-demo-snippet>
|
|
81
|
-
<template>
|
|
82
|
-
<d2l-status-indicator state="none" text="closed" bold></d2l-status-indicator>
|
|
83
|
-
</template>
|
|
84
|
-
</d2l-demo-snippet>
|
|
85
|
-
|
|
86
|
-
<h2>Alignment with other elements</h2>
|
|
87
|
-
<d2l-demo-snippet>
|
|
88
|
-
<template>
|
|
89
|
-
<d2l-status-indicator state="alert" text="overdue"></d2l-status-indicator>
|
|
90
|
-
<span class="align-item" style="margin-left: 10px;">Grade 6 Science</span>
|
|
91
|
-
<span class="align-item bullet">Assignment</span>
|
|
92
|
-
</template>
|
|
93
|
-
</d2l-demo-snippet>
|
|
94
|
-
|
|
95
|
-
</d2l-demo-page>
|
|
96
|
-
|
|
97
|
-
</body>
|
|
98
|
-
|
|
99
|
-
</html>
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
|
7
|
-
<script type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import '../../dialog/dialog-confirm.js';
|
|
10
|
-
import '../switch.js';
|
|
11
|
-
import '../switch-visibility.js';
|
|
12
|
-
</script>
|
|
13
|
-
</head>
|
|
14
|
-
<body unresolved>
|
|
15
|
-
|
|
16
|
-
<d2l-demo-page page-title="d2l-switch">
|
|
17
|
-
|
|
18
|
-
<h2>On/Off</h2>
|
|
19
|
-
|
|
20
|
-
<d2l-demo-snippet>
|
|
21
|
-
<template>
|
|
22
|
-
<d2l-switch text="Dark Mode" on></d2l-switch>
|
|
23
|
-
<script>
|
|
24
|
-
document.querySelector('d2l-switch').addEventListener('change', (e) => {
|
|
25
|
-
console.log('switch changed', e.target.on);
|
|
26
|
-
});
|
|
27
|
-
</script>
|
|
28
|
-
</template>
|
|
29
|
-
</d2l-demo-snippet>
|
|
30
|
-
|
|
31
|
-
<h2>On/Off (text-position)</h2>
|
|
32
|
-
|
|
33
|
-
<d2l-demo-snippet>
|
|
34
|
-
<template>
|
|
35
|
-
<div><d2l-switch text="Dark Mode" text-position="start"></d2l-switch></div>
|
|
36
|
-
<div><d2l-switch text="Dark Mode" text-position="end"></d2l-switch></div>
|
|
37
|
-
<div><d2l-switch text="Dark Mode" text-position="hidden"></d2l-switch></div>
|
|
38
|
-
</template>
|
|
39
|
-
</d2l-demo-snippet>
|
|
40
|
-
|
|
41
|
-
<h2>On/Off (disabled)</h2>
|
|
42
|
-
|
|
43
|
-
<d2l-demo-snippet>
|
|
44
|
-
<template>
|
|
45
|
-
<d2l-switch text="Dark Mode" on disabled></d2l-switch>
|
|
46
|
-
</template>
|
|
47
|
-
</d2l-demo-snippet>
|
|
48
|
-
|
|
49
|
-
<h2>Visibility</h2>
|
|
50
|
-
|
|
51
|
-
<d2l-demo-snippet>
|
|
52
|
-
<template>
|
|
53
|
-
<d2l-switch-visibility></d2l-switch-visibility>
|
|
54
|
-
</template>
|
|
55
|
-
</d2l-demo-snippet>
|
|
56
|
-
|
|
57
|
-
<h2>Visibility (with conditions)</h2>
|
|
58
|
-
|
|
59
|
-
<d2l-demo-snippet>
|
|
60
|
-
<template>
|
|
61
|
-
<d2l-switch-visibility>
|
|
62
|
-
These are some conditions that must be met for the activity to be visible.
|
|
63
|
-
<ul>
|
|
64
|
-
<li> Condition 1 </li>
|
|
65
|
-
<li> Condition 2 </li>
|
|
66
|
-
<li> Condition 3 </li>
|
|
67
|
-
</ul>
|
|
68
|
-
</d2l-switch-visibility>
|
|
69
|
-
</template>
|
|
70
|
-
</d2l-demo-snippet>
|
|
71
|
-
|
|
72
|
-
<h2>On/Off (confirm)</h2>
|
|
73
|
-
|
|
74
|
-
<d2l-demo-snippet>
|
|
75
|
-
<template>
|
|
76
|
-
<d2l-switch id="switch-with-confirm" text="Dark Mode"></d2l-switch>
|
|
77
|
-
<d2l-dialog-confirm id="confirm" title-text="Confirm" text="Are you sure you want to change?">
|
|
78
|
-
<d2l-button slot="footer" primary data-dialog-action="yes">Yes</d2l-button>
|
|
79
|
-
<d2l-button slot="footer" data-dialog-action="no">No</d2l-button>
|
|
80
|
-
</d2l-dialog-confirm>
|
|
81
|
-
<script>
|
|
82
|
-
const elem = document.querySelector('#switch-with-confirm');
|
|
83
|
-
elem.addEventListener('d2l-switch-before-change', async e => {
|
|
84
|
-
e.preventDefault();
|
|
85
|
-
const confirmResult = await document.querySelector('#confirm').open();
|
|
86
|
-
if (confirmResult === 'yes') e.detail.update(!elem.on);
|
|
87
|
-
});
|
|
88
|
-
elem.addEventListener('change', e => console.log('switch changed', e.target.on));
|
|
89
|
-
</script>
|
|
90
|
-
</template>
|
|
91
|
-
</d2l-demo-snippet>
|
|
92
|
-
|
|
93
|
-
</d2l-demo-page>
|
|
94
|
-
</body>
|
|
95
|
-
</html>
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import '../table-col-sort-button.js';
|
|
2
|
-
import '../table-col-sort-button-item.js';
|
|
3
|
-
import '../table-controls.js';
|
|
4
|
-
import '../../button/button-icon.js';
|
|
5
|
-
import '../../dropdown/dropdown-button-subtle.js';
|
|
6
|
-
import '../../dropdown/dropdown-context-menu.js';
|
|
7
|
-
import '../../dropdown/dropdown-menu.js';
|
|
8
|
-
import '../../inputs/input-checkbox.js';
|
|
9
|
-
import '../../inputs/input-text.js';
|
|
10
|
-
import '../../menu/menu.js';
|
|
11
|
-
import '../../menu/menu-item.js';
|
|
12
|
-
import '../../paging/pager-load-more.js';
|
|
13
|
-
import '../../selection/selection-action.js';
|
|
14
|
-
import '../../selection/selection-action-dropdown.js';
|
|
15
|
-
import '../../selection/selection-action-menu-item.js';
|
|
16
|
-
import '../../selection/selection-input.js';
|
|
17
|
-
|
|
18
|
-
import { css, html, nothing } from 'lit';
|
|
19
|
-
import { tableStyles, TableWrapper } from '../table-wrapper.js';
|
|
20
|
-
import { DemoPassthroughMixin } from '../../demo/demo-passthrough-mixin.js';
|
|
21
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
22
|
-
|
|
23
|
-
const columns = ['Population', 'Size', 'Elevation'];
|
|
24
|
-
const thText = ['Additional', 'Placeholder', 'Header', 'Row', 'Cells'];
|
|
25
|
-
|
|
26
|
-
const data = () => [
|
|
27
|
-
{ name: 'Ottawa, Canada', data: { 'city': 'Ottawa', 'country': 'Canada', 'population': 994837, 'size': 2790, 'elevation': 70, 'latitude': 45.32, 'longitude': -75.71 }, selected: true },
|
|
28
|
-
{ name: 'Toronto, Canada', data: { 'city': 'Toronto', 'country': 'Canada', 'population': 2930000, 'size': 630, 'elevation': 76, 'latitude': 43.69, 'longitude': -79.41 }, selected: true },
|
|
29
|
-
{ name: 'Sydney, Australia', data: { 'city': 'Sydney', 'country': 'Australia', 'population': 5312000, 'size': 12368, 'elevation': 3, 'latitude': -33.86, 'longitude': 151.13 }, selected: false },
|
|
30
|
-
{ name: 'Cairo, Egypt', data: { 'city': 'Cairo', 'country': 'Egypt', 'population': 9540000, 'size': 3085, 'elevation': 23, 'latitude': 30.05, 'longitude': 31.25 }, selected: false },
|
|
31
|
-
{ name: 'Moscow, Russia', data: { 'city': 'Moscow', 'country': 'Russia', 'population': 12712305, 'size': 2511, 'elevation': 124, 'latitude': 55.70, 'longitude': 35.59 }, selected: false },
|
|
32
|
-
{ name: 'London, England', data: { 'city': 'London', 'country': 'England', 'population': 8982000, 'size': 1572, 'elevation': 11, 'latitude': 51.49, 'longitude': -0.12 }, selected: false },
|
|
33
|
-
{ name: 'Tokyo, Japan', data: { 'city': 'Tokyo', 'country': 'Japan', 'population': 13960000, 'size': 2194, 'elevation': 40, 'latitude': 35.68, 'longitude': 139.74 }, selected: false }
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
const formatter = new Intl.NumberFormat('en-US');
|
|
37
|
-
|
|
38
|
-
class TestTable extends DemoPassthroughMixin(TableWrapper, 'd2l-table-wrapper') {
|
|
39
|
-
|
|
40
|
-
static get properties() {
|
|
41
|
-
return {
|
|
42
|
-
paging: { type: Boolean, reflect: true },
|
|
43
|
-
multiLine: { type: Boolean, attribute: 'multi-line' },
|
|
44
|
-
resetOnSort: { type: Boolean, attribute: 'reset-on-sort' },
|
|
45
|
-
showButtons: { type: Boolean, attribute: 'show-buttons' },
|
|
46
|
-
stickyControls: { attribute: 'sticky-controls', type: Boolean, reflect: true },
|
|
47
|
-
visibleBackground: { attribute: 'visible-background', type: Boolean, reflect: true },
|
|
48
|
-
_data: { state: true },
|
|
49
|
-
_sortField: { state: true },
|
|
50
|
-
_sortDesc: { state: true }
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
static get styles() {
|
|
55
|
-
return [tableStyles, css`
|
|
56
|
-
:host {
|
|
57
|
-
display: block;
|
|
58
|
-
}
|
|
59
|
-
:host([visible-background]) {
|
|
60
|
-
--d2l-table-controls-background-color: #dddddd;
|
|
61
|
-
}
|
|
62
|
-
.d2l-table > * > tr > :has(d2l-button-icon),
|
|
63
|
-
.d2l-table > * > tr > :has(d2l-dropdown-context-menu) {
|
|
64
|
-
padding-block: 0;
|
|
65
|
-
}
|
|
66
|
-
.d2l-table > * > tr > :has(d2l-table-col-sort-button) d2l-button-icon,
|
|
67
|
-
.d2l-table > * > tr > :has(d2l-table-col-sort-button) d2l-dropdown-context-menu {
|
|
68
|
-
vertical-align: top;
|
|
69
|
-
}
|
|
70
|
-
`];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
constructor() {
|
|
74
|
-
super();
|
|
75
|
-
|
|
76
|
-
this.multiLine = false;
|
|
77
|
-
this.paging = false;
|
|
78
|
-
this.showButtons = false;
|
|
79
|
-
this.stickyControls = false;
|
|
80
|
-
this.visibleBackground = false;
|
|
81
|
-
this._data = data();
|
|
82
|
-
this._sortField = undefined;
|
|
83
|
-
this._sortDesc = false;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
render() {
|
|
87
|
-
return html`
|
|
88
|
-
<d2l-table-wrapper item-count="${ifDefined(this.paging ? 500 : undefined)}">
|
|
89
|
-
<d2l-table-controls slot="controls" ?no-sticky="${!this.stickyControls}" select-all-pages-allowed>
|
|
90
|
-
<d2l-selection-action
|
|
91
|
-
text="Sticky controls"
|
|
92
|
-
icon="tier1:${this.stickyControls ? 'check' : 'close-default'}"
|
|
93
|
-
@d2l-selection-action-click="${this._toggleStickyControls}"
|
|
94
|
-
></d2l-selection-action>
|
|
95
|
-
<d2l-selection-action
|
|
96
|
-
text="Sticky headers"
|
|
97
|
-
icon="tier1:${this.stickyHeaders ? 'check' : 'close-default'}"
|
|
98
|
-
@d2l-selection-action-click="${this._toggleStickyHeaders}"
|
|
99
|
-
></d2l-selection-action>
|
|
100
|
-
<d2l-selection-action
|
|
101
|
-
text="Loading"
|
|
102
|
-
icon="tier1:${this.loading ? 'check' : 'close-default'}"
|
|
103
|
-
@d2l-selection-action-click="${this._toggleLoading}"
|
|
104
|
-
></d2l-selection-action>
|
|
105
|
-
</d2l-table-controls>
|
|
106
|
-
|
|
107
|
-
<table class="d2l-table">
|
|
108
|
-
<thead>
|
|
109
|
-
${this.multiLine ? html`
|
|
110
|
-
<tr>
|
|
111
|
-
<td scope="col" sticky><d2l-selection-select-all></d2l-selection-select-all></td>
|
|
112
|
-
${this._renderDoubleSortButton('City', 'Country')}
|
|
113
|
-
<th scope="col" colspan="${columns.length + 1}" sticky>
|
|
114
|
-
Metrics
|
|
115
|
-
</th>
|
|
116
|
-
</tr>
|
|
117
|
-
<tr>
|
|
118
|
-
<th scope="col" sticky></th>
|
|
119
|
-
${columns.map(columnHeading => this._renderSortButton(columnHeading))}
|
|
120
|
-
${this._renderMenuSortButton('Coordinates', ['Latitude', 'Longitude'])}
|
|
121
|
-
</tr>
|
|
122
|
-
` : html`
|
|
123
|
-
<tr>
|
|
124
|
-
<td scope="col" sticky><d2l-selection-select-all></d2l-selection-select-all></td>
|
|
125
|
-
${this._renderDoubleSortButton('City', 'Country')}
|
|
126
|
-
${columns.map(columnHeading => this._renderSortButton(columnHeading))}
|
|
127
|
-
${this._renderMenuSortButton('Coordinates', ['Latitude', 'Longitude'])}
|
|
128
|
-
</tr>
|
|
129
|
-
`}
|
|
130
|
-
</thead>
|
|
131
|
-
<tbody>
|
|
132
|
-
<tr class="d2l-table-header">
|
|
133
|
-
<th scope="col" sticky></th>
|
|
134
|
-
${thText.map(text => html`<th scope="col">${text}</th>`)}
|
|
135
|
-
</tr>
|
|
136
|
-
<tr header>
|
|
137
|
-
<th scope="col" sticky></th>
|
|
138
|
-
${thText.map(text => html`
|
|
139
|
-
<th scope="col">
|
|
140
|
-
${text}${text === 'Placeholder' && this.showButtons ? html`<d2l-button-icon text="Help" icon="tier1:help"></d2l-button-icon>` : nothing}
|
|
141
|
-
</th>
|
|
142
|
-
`)}
|
|
143
|
-
</tr>
|
|
144
|
-
${this._data.map(row => html`
|
|
145
|
-
<tr ?selected="${row.selected}" data-name="${row.name}">
|
|
146
|
-
<th scope="row" sticky>
|
|
147
|
-
<d2l-selection-input
|
|
148
|
-
@d2l-selection-change="${this._selectRow}"
|
|
149
|
-
?selected="${row.selected}"
|
|
150
|
-
key="${row.name}"
|
|
151
|
-
label="${row.name}">
|
|
152
|
-
</d2l-selection-input>
|
|
153
|
-
</th>
|
|
154
|
-
<th scope="row">${row.name}</th>
|
|
155
|
-
${columns.map(columnHeading => { const val = row.data[columnHeading.toLowerCase()]; return val ? html`<td>${formatter.format(val)}</td>` : null; }) }
|
|
156
|
-
<td>${[formatter.format(row.data.latitude), formatter.format(row.data.longitude)].join(', ')}</td>
|
|
157
|
-
</tr>
|
|
158
|
-
`)}
|
|
159
|
-
</tbody>
|
|
160
|
-
</table>
|
|
161
|
-
${this.paging ? html`<d2l-pager-load-more slot="pager"
|
|
162
|
-
has-more
|
|
163
|
-
page-size="3"
|
|
164
|
-
@d2l-pager-load-more="${this._handlePagerLoadMore}"
|
|
165
|
-
></d2l-pager-load-more>` : nothing}
|
|
166
|
-
</d2l-table-wrapper>
|
|
167
|
-
`;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
async _handlePagerLoadMore(e) {
|
|
171
|
-
const pageSize = e.target.pageSize;
|
|
172
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
173
|
-
const startIndex = this._data.length + 1;
|
|
174
|
-
for (let i = 0; i < pageSize; i++) {
|
|
175
|
-
this._data.push({ name: `City ${startIndex + i}, Country ${startIndex + i}`, data: { 'city': `City ${startIndex + i}`, 'country': `Country ${startIndex + i}`, 'population': 26320000, 'size': 6340, 'elevation': 4, 'latitude': 3, 'longitude': 3 }, selected: false });
|
|
176
|
-
}
|
|
177
|
-
this.requestUpdate();
|
|
178
|
-
e.detail.complete();
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
_handleSort(e) {
|
|
182
|
-
const field = e.target.innerText.toLowerCase();
|
|
183
|
-
const desc = e.target.hasAttribute('desc');
|
|
184
|
-
this._sortDesc = field === this._sortField ? !desc : false; // if sorting on same field then reverse, otherwise sort ascending
|
|
185
|
-
this._sortField = field;
|
|
186
|
-
this._handleSortData();
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
_handleSortComplex(e) {
|
|
190
|
-
this._sortField = e.target?.getAttribute('data-field');
|
|
191
|
-
this._sortDesc = e.target?.hasAttribute('data-desc');
|
|
192
|
-
this._handleSortData();
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
_handleSortData() {
|
|
196
|
-
this._data = (this.resetOnSort ? data() : this._data).sort((a, b) => {
|
|
197
|
-
if (this._sortDesc) {
|
|
198
|
-
if (a.data[this._sortField] > b.data[this._sortField]) return -1;
|
|
199
|
-
if (a.data[this._sortField] < b.data[this._sortField]) return 1;
|
|
200
|
-
} else {
|
|
201
|
-
if (a.data[this._sortField] < b.data[this._sortField]) return -1;
|
|
202
|
-
if (a.data[this._sortField] > b.data[this._sortField]) return 1;
|
|
203
|
-
}
|
|
204
|
-
return 0;
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
_renderDoubleSortButton(item1, item2) {
|
|
209
|
-
return html`
|
|
210
|
-
<th rowspan="${this.multiLine ? 2 : 1}" scope="col">
|
|
211
|
-
<d2l-table-col-sort-button
|
|
212
|
-
@click="${this._handleSort}"
|
|
213
|
-
?desc="${this._sortDesc}"
|
|
214
|
-
?nosort="${this._sortField !== item1.toLowerCase()}">${item1}</d2l-table-col-sort-button>
|
|
215
|
-
<d2l-table-col-sort-button
|
|
216
|
-
@click="${this._handleSort}"
|
|
217
|
-
?desc="${this._sortDesc}"
|
|
218
|
-
?nosort="${this._sortField !== item2.toLowerCase()}">${item2}</d2l-table-col-sort-button>
|
|
219
|
-
</th>
|
|
220
|
-
`;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
_renderMenuSortButton(name, items) {
|
|
224
|
-
const noSort = !items.map(i => i.toLowerCase()).includes(this._sortField?.toLowerCase());
|
|
225
|
-
return html`
|
|
226
|
-
<th scope="col">
|
|
227
|
-
<d2l-table-col-sort-button
|
|
228
|
-
?desc="${this._sortDesc}"
|
|
229
|
-
?nosort="${noSort}">
|
|
230
|
-
<span>${name}</span>${items.map((item, idx) => html`
|
|
231
|
-
<d2l-table-col-sort-button-item slot="items" text="${item}, ascending" data-field="${item.toLowerCase()}" @d2l-table-col-sort-button-item-change="${this._handleSortComplex}" value="${idx * 2 + 1}"></d2l-table-col-sort-button-item>
|
|
232
|
-
<d2l-table-col-sort-button-item slot="items" text="${item}, descending" data-field="${item.toLowerCase()}" data-desc @d2l-table-col-sort-button-item-change="${this._handleSortComplex}" value="${idx * 2 + 2}"></d2l-table-col-sort-button-item>`)}
|
|
233
|
-
</d2l-table-col-sort-button>
|
|
234
|
-
</th>
|
|
235
|
-
`;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
_renderSortButton(item) {
|
|
239
|
-
const noSort = this._sortField !== item.toLowerCase();
|
|
240
|
-
return html`
|
|
241
|
-
<th scope="col">
|
|
242
|
-
<d2l-table-col-sort-button
|
|
243
|
-
@click="${this._handleSort}"
|
|
244
|
-
source-type="numbers"
|
|
245
|
-
?desc="${this._sortDesc}"
|
|
246
|
-
?nosort="${noSort}">${item}</d2l-table-col-sort-button>
|
|
247
|
-
${item === 'Size' && this.showButtons ? html`<d2l-dropdown-context-menu text="Help"></d2l-dropdown-context-menu>` : nothing}
|
|
248
|
-
</th>
|
|
249
|
-
`;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
_selectRow(e) {
|
|
253
|
-
const country = e.target.parentNode.parentNode.dataset.name;
|
|
254
|
-
const row = this._data.find(row => row.name === country);
|
|
255
|
-
row.selected = e.target.selected;
|
|
256
|
-
this.requestUpdate();
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
_toggleLoading() {
|
|
260
|
-
this.loading = !this.loading;
|
|
261
|
-
}
|
|
262
|
-
_toggleStickyControls() {
|
|
263
|
-
this.stickyControls = !this.stickyControls;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
_toggleStickyHeaders() {
|
|
267
|
-
this.stickyHeaders = !this.stickyHeaders;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
customElements.define('d2l-test-table', TestTable);
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
|
7
|
-
<script type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import './table-test.js';
|
|
10
|
-
</script>
|
|
11
|
-
</head>
|
|
12
|
-
<body unresolved>
|
|
13
|
-
|
|
14
|
-
<d2l-demo-page page-title="d2l-table">
|
|
15
|
-
|
|
16
|
-
<button id="print">Print</button>
|
|
17
|
-
|
|
18
|
-
<h2>Default</h2>
|
|
19
|
-
<d2l-demo-snippet>
|
|
20
|
-
<template>
|
|
21
|
-
<d2l-test-table type="default" sticky-controls show-buttons></d2l-test-table>
|
|
22
|
-
</template>
|
|
23
|
-
</d2l-demo-snippet>
|
|
24
|
-
|
|
25
|
-
<h2>Default, Sticky</h2>
|
|
26
|
-
<d2l-demo-snippet>
|
|
27
|
-
<template>
|
|
28
|
-
<d2l-test-table type="default" sticky-headers sticky-controls></d2l-test-table>
|
|
29
|
-
</template>
|
|
30
|
-
</d2l-demo-snippet>
|
|
31
|
-
|
|
32
|
-
<h2>Light</h2>
|
|
33
|
-
<d2l-demo-snippet>
|
|
34
|
-
<template>
|
|
35
|
-
<d2l-test-table type="light" sticky-controls show-buttons></d2l-test-table>
|
|
36
|
-
</template>
|
|
37
|
-
</d2l-demo-snippet>
|
|
38
|
-
|
|
39
|
-
<h2>Light, Sticky</h2>
|
|
40
|
-
<d2l-demo-snippet>
|
|
41
|
-
<template>
|
|
42
|
-
<d2l-test-table type="light" sticky-headers sticky-controls></d2l-test-table>
|
|
43
|
-
</template>
|
|
44
|
-
</d2l-demo-snippet>
|
|
45
|
-
|
|
46
|
-
<h2>Default, Paging</h2>
|
|
47
|
-
<d2l-demo-snippet>
|
|
48
|
-
<template>
|
|
49
|
-
<d2l-test-table type="default" sticky-controls paging></d2l-test-table>
|
|
50
|
-
</template>
|
|
51
|
-
</d2l-demo-snippet>
|
|
52
|
-
|
|
53
|
-
<h2>Default, Paging, Reset on sort</h2>
|
|
54
|
-
<d2l-demo-snippet>
|
|
55
|
-
<template>
|
|
56
|
-
<d2l-test-table type="default" sticky-controls paging reset-on-sort></d2l-test-table>
|
|
57
|
-
</template>
|
|
58
|
-
</d2l-demo-snippet>
|
|
59
|
-
|
|
60
|
-
<h2>Default, Visible controls background</h2>
|
|
61
|
-
<d2l-demo-snippet>
|
|
62
|
-
<template>
|
|
63
|
-
<d2l-test-table type="default" sticky-headers sticky-controls visible-background></d2l-test-table>
|
|
64
|
-
</template>
|
|
65
|
-
</d2l-demo-snippet>
|
|
66
|
-
|
|
67
|
-
<h2>Default, Sticky columns</h2>
|
|
68
|
-
<d2l-demo-snippet overflow-hidden>
|
|
69
|
-
<template>
|
|
70
|
-
<div style="overflow: auto; width: 400px;">
|
|
71
|
-
<d2l-test-table type="default" sticky-headers sticky-controls></d2l-test-table>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
</d2l-demo-snippet>
|
|
75
|
-
|
|
76
|
-
<h2>Default with Scroll-Wrapper (no sticky)</h2>
|
|
77
|
-
<d2l-demo-snippet overflow-hidden>
|
|
78
|
-
<template>
|
|
79
|
-
<div style="height: 400px; overflow: auto;">
|
|
80
|
-
<d2l-test-table type="default" sticky-controls style="width: 400px;"></d2l-test-table>
|
|
81
|
-
</div>
|
|
82
|
-
</template>
|
|
83
|
-
</d2l-demo-snippet>
|
|
84
|
-
|
|
85
|
-
<h2>Scroll-wrapper + sticky</h2>
|
|
86
|
-
<d2l-demo-snippet>
|
|
87
|
-
<template>
|
|
88
|
-
<d2l-test-table sticky-headers sticky-controls sticky-headers-scroll-wrapper style="width: 400px;"></d2l-test-table>
|
|
89
|
-
</template>
|
|
90
|
-
</d2l-demo-snippet>
|
|
91
|
-
|
|
92
|
-
<h2>Multi-line with scroll-wrapper + sticky</h2>
|
|
93
|
-
<d2l-demo-snippet>
|
|
94
|
-
<template>
|
|
95
|
-
<d2l-test-table multi-line sticky-headers sticky-controls sticky-headers-scroll-wrapper style="width: 400px;"></d2l-test-table>
|
|
96
|
-
</template>
|
|
97
|
-
</d2l-demo-snippet>
|
|
98
|
-
|
|
99
|
-
<div style="margin-bottom: 1000px;"></div>
|
|
100
|
-
</d2l-demo-page>
|
|
101
|
-
<script>
|
|
102
|
-
document.querySelector('#print').addEventListener('click', () => {
|
|
103
|
-
window.print();
|
|
104
|
-
});
|
|
105
|
-
</script>
|
|
106
|
-
</body>
|
|
107
|
-
</html>
|