kempo-ui 0.0.13 → 0.0.15
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/kempo-vars.css +1 -0
- package/docs/dev.config.json +5 -9
- package/docs/kempo-ui/components/accordion.html +236 -0
- package/docs/{components → kempo-ui/components}/card.html +8 -7
- package/docs/{components → kempo-ui/components}/content-slider.html +8 -7
- package/docs/kempo-ui/components/dialog.html +339 -0
- package/docs/{components → kempo-ui/components}/focus-capture.html +9 -8
- package/docs/{components → kempo-ui/components}/hybrid-component.html +7 -6
- package/docs/{components → kempo-ui/components}/icon.html +9 -8
- package/docs/{components → kempo-ui/components}/import.html +8 -7
- package/docs/{components → kempo-ui/components}/light-component.html +7 -6
- package/docs/{components → kempo-ui/components}/photo-viewer.html +8 -7
- package/docs/{components → kempo-ui/components}/resize.html +8 -7
- package/docs/{components → kempo-ui/components}/shadow-component.html +7 -6
- package/docs/{components → kempo-ui/components}/show-more.html +8 -7
- package/docs/{components → kempo-ui/components}/side-menu.html +8 -8
- package/docs/{components → kempo-ui/components}/sortable.html +8 -7
- package/docs/{components → kempo-ui/components}/split.html +9 -8
- package/docs/{components → kempo-ui/components}/table.html +32 -32
- package/docs/{components → kempo-ui/components}/tableControls.html +12 -12
- package/docs/{components → kempo-ui/components}/tableCustomFields.html +9 -9
- package/docs/{components → kempo-ui/components}/tableFetchRecords.html +16 -16
- package/docs/{components → kempo-ui/components}/tableFieldSortHide.html +11 -11
- package/docs/{components → kempo-ui/components}/tablePagination.html +17 -17
- package/docs/{components → kempo-ui/components}/tableRecordEditing.html +12 -12
- package/docs/{components → kempo-ui/components}/tableRecordFiltering.html +11 -11
- package/docs/{components → kempo-ui/components}/tableRecordHiding.html +13 -13
- package/docs/{components → kempo-ui/components}/tableRecordSearching.html +11 -11
- package/docs/{components → kempo-ui/components}/tableRecordSelection.html +11 -11
- package/docs/{components → kempo-ui/components}/tableRowControls.html +12 -12
- package/docs/{components → kempo-ui/components}/tableSorting.html +9 -9
- package/docs/{components → kempo-ui/components}/tabs.html +8 -7
- package/docs/{components → kempo-ui/components}/tags.html +8 -7
- package/docs/{components → kempo-ui/components}/theme-switcher.html +8 -7
- package/docs/{components → kempo-ui/components}/timestamp.html +8 -7
- package/docs/kempo-ui/components/toast.html +315 -0
- package/docs/{components → kempo-ui/components}/toggle.html +8 -7
- package/docs/{components → kempo-ui/components}/tree.html +16 -14
- package/docs/{index.html → kempo-ui/index.html} +7 -18
- package/docs/kempo-ui/kempo-vars.css +1 -0
- package/docs/kempo-ui/nav.inc.html +67 -0
- package/docs/kempo-ui/utils/debounce.html +56 -0
- package/docs/{utils → kempo-ui/utils}/drag.html +8 -17
- package/docs/{utils → kempo-ui/utils}/formatTimestamp.html +12 -29
- package/docs/kempo-ui/utils/propConverters.html +90 -0
- package/docs/{utils → kempo-ui/utils}/toTitleCase.html +7 -6
- package/docs/kempo-ui/utils/watchWindowSize.html +72 -0
- package/docs/prod.config.json +0 -8
- package/package.json +2 -2
- package/scripts/build.js +8 -8
- package/scripts/docs.js +3 -0
- package/src/components/Accordion.js +145 -57
- package/src/components/Tabs.js +14 -23
- package/src/kempo-vars.css +1 -0
- package/docs/components/accordion.html +0 -161
- package/docs/components/collapsible.html +0 -193
- package/docs/components/dialog.html +0 -105
- package/docs/components/init.js +0 -7
- package/docs/components/persistant-collapsible.html +0 -117
- package/docs/components/toast.html +0 -52
- package/docs/init.js +0 -7
- package/docs/kempo-vars.css +0 -0
- package/docs/kempo.css +0 -1
- package/docs/nav.inc.html +0 -69
- package/docs/utils/debounce.html +0 -74
- package/docs/utils/init.js +0 -8
- package/docs/utils/propConverters.html +0 -128
- package/docs/utils/watchWindowSize.html +0 -162
- package/src/components/Collapsible.js +0 -109
- package/src/components/PersistantCollapsible.js +0 -69
- /package/docs/{icons → kempo-ui/icons}/add.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/arrow-back.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/arrow-down-double.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/arrow-down.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/arrow-forward.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/arrow-up-double.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/arrow-up.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/cards.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/check.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/chevron-left.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/chevron-right.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/close.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/compare.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/delete.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/drag-handle.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/drawing2.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/edit.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/error.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/export-file.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/file-text.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/file.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/filter-off.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/filter.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/first.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/folder-clear.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/folder-create.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/folder-open.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/folder.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/hide.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/image.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/label-add.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/label.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/last.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/menu.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/mode-auto.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/mode-dark.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/mode-light.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/open-in-browser.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/pause.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/play.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/refresh.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/remove.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/save.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/search.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/settings.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/show.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/storage.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/table-visibility.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/tag.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/tools.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/trash-x.svg +0 -0
- /package/docs/{icons → kempo-ui/icons}/warning.svg +0 -0
- /package/docs/{kempo-hljs.css → kempo-ui/kempo-hljs.css} +0 -0
- /package/docs/{kempo.min.css → kempo-ui/kempo.min.css} +0 -0
- /package/docs/{media → kempo-ui/media}/civic.jpg +0 -0
- /package/docs/{media → kempo-ui/media}/corvette.jpg +0 -0
- /package/docs/{media → kempo-ui/media}/evo.jpg +0 -0
- /package/docs/{media → kempo-ui/media}/gtr.jpg +0 -0
- /package/docs/{media → kempo-ui/media}/nsx.jpg +0 -0
- /package/docs/{nav.inc.js → kempo-ui/nav.inc.js} +0 -0
- /package/docs/{src → kempo-ui/src}/components/Accordion.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Card.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Collapsible.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/ContentSlider.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Dialog.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/FocusCapture.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/HybridComponent.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Icon.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Import.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/LightComponent.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/PersistantCollapsible.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/PhotoViewer.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Resize.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/ShadowComponent.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/ShowMore.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/SideMenu.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Sortable.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Split.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Table.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Tabs.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Tags.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/ThemeSwitcher.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Timestamp.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Toast.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Toggle.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/Tree.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/DeleteRecord.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/Edit.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/ExportCSV.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/ExportJson.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/FieldSortHide.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/Filters.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/FirstPage.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/HiddenCount.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/Hide.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/LastPage.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/NextPage.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/PageSelect.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/PageSize.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/PrevPage.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/Search.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/ShowAll.js +0 -0
- /package/docs/{src → kempo-ui/src}/components/tableControls/TableControl.js +0 -0
- /package/docs/{src → kempo-ui/src}/lit-all.min.js +0 -0
- /package/docs/{src → kempo-ui/src}/utils/debounce.js +0 -0
- /package/docs/{src → kempo-ui/src}/utils/drag.js +0 -0
- /package/docs/{src → kempo-ui/src}/utils/formatTimestamp.js +0 -0
- /package/docs/{src → kempo-ui/src}/utils/propConverters.js +0 -0
- /package/docs/{src → kempo-ui/src}/utils/toTitleCase.js +0 -0
- /package/docs/{src → kempo-ui/src}/utils/watchWindowSize.js +0 -0
- /package/docs/{styles.css → kempo-ui/styles.css} +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>ShadowComponent - Base Components - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
10
12
|
<script>window.litDisableBundleWarning = true;</script>
|
|
11
|
-
<script type="module" src="./init.js"></script>
|
|
12
13
|
</head>
|
|
13
14
|
<body>
|
|
14
|
-
<k-import src="
|
|
15
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
15
16
|
<h1 class="ta-center">ShadowComponent</h1>
|
|
16
17
|
<main>
|
|
17
18
|
<details class="b r mb">
|
|
@@ -80,6 +81,6 @@
|
|
|
80
81
|
|
|
81
82
|
</main>
|
|
82
83
|
<div style="height:33vh"></div>
|
|
83
|
-
<script type="module" src="
|
|
84
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
84
85
|
</body>
|
|
85
86
|
</html>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Show More - Components - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
10
12
|
<script>window.litDisableBundleWarning = true;</script>
|
|
11
|
-
<script type="module" src="./init.js"></script>
|
|
12
13
|
</head>
|
|
13
14
|
<body>
|
|
14
|
-
<k-import src="
|
|
15
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
15
16
|
<main>
|
|
16
17
|
<h1 class="ta-center">Show More</h1>
|
|
17
18
|
<details class="b r mb">
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
</main>
|
|
119
120
|
<div style="height:33vh"></div>
|
|
120
121
|
|
|
121
|
-
<script type="module" src="
|
|
122
|
-
<script type="module" src="
|
|
122
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
123
|
+
<script type="module" src="/kempo-ui/src/components/ShowMore.js"></script>
|
|
123
124
|
</body>
|
|
124
125
|
</html>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>SideMenu - Components - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="stylesheet" href="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
11
12
|
<script>window.litDisableBundleWarning = true;</script>
|
|
12
|
-
<script type="module" src="./init.js"></script>
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
|
-
<k-import src="
|
|
15
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
16
16
|
<h1 class="ta-center">SideMenu</h1>
|
|
17
17
|
<main>
|
|
18
18
|
<details class="b r mb">
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
|
|
150
150
|
</main>
|
|
151
151
|
<div style="height:33vh"></div>
|
|
152
|
-
<script type="module" src="
|
|
153
|
-
<script type="module" src="
|
|
152
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
153
|
+
<script type="module" src="/kempo-ui/src/components/SideMenu.js"></script>
|
|
154
154
|
</body>
|
|
155
155
|
</html>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Sortable - Components - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
10
12
|
<script>window.litDisableBundleWarning = true;</script>
|
|
11
|
-
<script type="module" src="./init.js"></script>
|
|
12
13
|
</head>
|
|
13
14
|
<body>
|
|
14
|
-
<k-import src="
|
|
15
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
15
16
|
<h1 class="ta-center">Sortable</h1>
|
|
16
17
|
<main>
|
|
17
18
|
<details class="b r mb">
|
|
@@ -123,7 +124,7 @@
|
|
|
123
124
|
|
|
124
125
|
</main>
|
|
125
126
|
<div style="height:33vh"></div>
|
|
126
|
-
<script type="module" src="
|
|
127
|
-
<script type="module" src="
|
|
127
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
128
|
+
<script type="module" src="/kempo-ui/src/components/Sortable.js"></script>
|
|
128
129
|
</body>
|
|
129
130
|
</html>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Split - Components - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
10
12
|
<script>window.litDisableBundleWarning = true;</script>
|
|
11
|
-
<script type="module" src="./init.js"></script>
|
|
12
13
|
</head>
|
|
13
14
|
<body>
|
|
14
|
-
<k-import src="
|
|
15
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
15
16
|
<h1 class="ta-center">Split</h1>
|
|
16
17
|
<main>
|
|
17
18
|
<details class="b r mb">
|
|
@@ -137,8 +138,8 @@
|
|
|
137
138
|
|
|
138
139
|
</main>
|
|
139
140
|
<div style="height:33vh"></div>
|
|
140
|
-
<script type="module" src="
|
|
141
|
-
<script type="module" src="
|
|
142
|
-
<script type="module" src="
|
|
141
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
142
|
+
<script type="module" src="/kempo-ui/src/components/Card.js"></script>
|
|
143
|
+
<script type="module" src="/kempo-ui/src/components/Split.js"></script>
|
|
143
144
|
</body>
|
|
144
145
|
</html>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Table - Components - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="stylesheet" href="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
11
12
|
<script>window.litDisableBundleWarning = true;</script>
|
|
12
|
-
<script type="module" src="
|
|
13
|
-
<script type="module" src="../src/components/Table.js"></script>
|
|
13
|
+
<script type="module" src="/kempo-ui/src/components/Table.js"></script>
|
|
14
14
|
<script>
|
|
15
15
|
|
|
16
16
|
window.contacts = [];
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</script>
|
|
52
52
|
</head>
|
|
53
53
|
<body>
|
|
54
|
-
<k-import src="
|
|
54
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
55
55
|
<h1 class="ta-center">Table</h1>
|
|
56
56
|
<main>
|
|
57
57
|
<details
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
<div class="m mt0 pl">
|
|
62
62
|
<h6>Examples</h6>
|
|
63
63
|
<a href="#basicUsage">Basic Usage</a><br />
|
|
64
|
-
<a href="tableCustomFields.html">Custom Fields</a><br />
|
|
65
|
-
<a href="tableControls.html">Top and Bottom Controls</a><br />
|
|
66
|
-
<a href="tableRowControls.html">Row Controls</a><br />
|
|
67
|
-
<a href="tablePagination.html">Pagination</a><br />
|
|
68
|
-
<a href="tableRecordSelection.html">Record Selection</a><br />
|
|
69
|
-
<a href="tableRecordEditing.html">Record Editing</a><br />
|
|
70
|
-
<a href="tableRecordHiding.html">Record Hiding</a><br />
|
|
71
|
-
<a href="tableRecordFiltering.html">Record Filtering</a><br />
|
|
72
|
-
<a href="tableRecordSearching.html">Record Searching</a><br />
|
|
73
|
-
<a href="tableSorting.html">Sorting</a><br />
|
|
74
|
-
<a href="tableFieldSortHide.html">Field Sorting and Hiding</a><br />
|
|
75
|
-
<a href="tableFetchRecords.html">Fetching Records</a><br />
|
|
64
|
+
<a href="/kempo-ui/components/tableCustomFields.html">Custom Fields</a><br />
|
|
65
|
+
<a href="/kempo-ui/components/tableControls.html">Top and Bottom Controls</a><br />
|
|
66
|
+
<a href="/kempo-ui/components/tableRowControls.html">Row Controls</a><br />
|
|
67
|
+
<a href="/kempo-ui/components/tablePagination.html">Pagination</a><br />
|
|
68
|
+
<a href="/kempo-ui/components/tableRecordSelection.html">Record Selection</a><br />
|
|
69
|
+
<a href="/kempo-ui/components/tableRecordEditing.html">Record Editing</a><br />
|
|
70
|
+
<a href="/kempo-ui/components/tableRecordHiding.html">Record Hiding</a><br />
|
|
71
|
+
<a href="/kempo-ui/components/tableRecordFiltering.html">Record Filtering</a><br />
|
|
72
|
+
<a href="/kempo-ui/components/tableRecordSearching.html">Record Searching</a><br />
|
|
73
|
+
<a href="/kempo-ui/components/tableSorting.html">Sorting</a><br />
|
|
74
|
+
<a href="/kempo-ui/components/tableFieldSortHide.html">Field Sorting and Hiding</a><br />
|
|
75
|
+
<a href="/kempo-ui/components/tableFetchRecords.html">Fetching Records</a><br />
|
|
76
76
|
<h6 class="mt">JavaScript Reference</h6>
|
|
77
77
|
<a href="#constructor">Constructor</a><br />
|
|
78
78
|
<a href="#requirements">Requirements</a><br />
|
|
@@ -122,18 +122,18 @@
|
|
|
122
122
|
|
|
123
123
|
<h3>Examples</h3>
|
|
124
124
|
<ul>
|
|
125
|
-
<li><a href="tableCustomFields.html">Custom Fields Example</a></li>
|
|
126
|
-
<li><a href="tableControls.html">Top and Bottom Controls</a></li>
|
|
127
|
-
<li><a href="tableRowControls.html">Row Controls</a></li>
|
|
128
|
-
<li><a href="tablePagination.html">Pagination</a></li>
|
|
129
|
-
<li><a href="tableRecordSelection.html">Record Selection</a></li>
|
|
130
|
-
<li><a href="tableRecordEditing.html">Record Editing</a></li>
|
|
131
|
-
<li><a href="tableRecordHiding.html">Record Hiding</a></li>
|
|
132
|
-
<li><a href="tableRecordFiltering.html">Record Filtering</a></li>
|
|
133
|
-
<li><a href="tableRecordSearching.html">Record Searching</a></li>
|
|
134
|
-
<li><a href="tableSorting.html">Sorting</a></li>
|
|
135
|
-
<li><a href="tableFieldSortHide.html">Field Sorting and Hiding</a></li>
|
|
136
|
-
<li><a href="tableFetchRecords.html">Fetching Records</a></li>
|
|
125
|
+
<li><a href="/kempo-ui/components/tableCustomFields.html">Custom Fields Example</a></li>
|
|
126
|
+
<li><a href="/kempo-ui/components/tableControls.html">Top and Bottom Controls</a></li>
|
|
127
|
+
<li><a href="/kempo-ui/components/tableRowControls.html">Row Controls</a></li>
|
|
128
|
+
<li><a href="/kempo-ui/components/tablePagination.html">Pagination</a></li>
|
|
129
|
+
<li><a href="/kempo-ui/components/tableRecordSelection.html">Record Selection</a></li>
|
|
130
|
+
<li><a href="/kempo-ui/components/tableRecordEditing.html">Record Editing</a></li>
|
|
131
|
+
<li><a href="/kempo-ui/components/tableRecordHiding.html">Record Hiding</a></li>
|
|
132
|
+
<li><a href="/kempo-ui/components/tableRecordFiltering.html">Record Filtering</a></li>
|
|
133
|
+
<li><a href="/kempo-ui/components/tableRecordSearching.html">Record Searching</a></li>
|
|
134
|
+
<li><a href="/kempo-ui/components/tableSorting.html">Sorting</a></li>
|
|
135
|
+
<li><a href="/kempo-ui/components/tableFieldSortHide.html">Field Sorting and Hiding</a></li>
|
|
136
|
+
<li><a href="/kempo-ui/components/tableFetchRecords.html">Fetching Records</a></li>
|
|
137
137
|
</ul>
|
|
138
138
|
|
|
139
139
|
<br />
|
|
@@ -304,6 +304,6 @@
|
|
|
304
304
|
|
|
305
305
|
</main>
|
|
306
306
|
<div style="height: 33.333vh"></div>
|
|
307
|
-
<script type="module" src="
|
|
307
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
308
308
|
</body>
|
|
309
309
|
</html>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Top and Bottom Controls - Table - Kempo Docs</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="stylesheet" href="
|
|
11
|
-
<script type="module" src="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
12
|
+
<script type="module" src="/kempo-ui/src/components/Table.js"></script>
|
|
12
13
|
<script>window.litDisableBundleWarning = true;</script>
|
|
13
|
-
<script type="module" src="./init.js"></script>
|
|
14
14
|
<script>
|
|
15
15
|
window.contacts = [];
|
|
16
16
|
function generateContact(){
|
|
@@ -50,25 +50,25 @@
|
|
|
50
50
|
</script>
|
|
51
51
|
</head>
|
|
52
52
|
<body>
|
|
53
|
-
<k-import src="
|
|
53
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
54
54
|
<h1 class="ta-center">Table - Top and Bottom Controls</h1>
|
|
55
55
|
<main>
|
|
56
56
|
|
|
57
|
-
<a href="
|
|
57
|
+
<a href="/kempo-ui/components/table.html"><h5>Back to Table Component Documentation</h5></a>
|
|
58
58
|
|
|
59
59
|
<p>The table component supports controls at both the top and bottom. These controls can handle pagination, adding new records, or other actions. They are web components that interact with their parent <code>k-table</code> by accessing its methods and listening for its events.</p>
|
|
60
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"topBottomControlsExample"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-export-json</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">"top"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-export-json</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-export-csv</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-export-csv</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-table</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"
|
|
60
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"topBottomControlsExample"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-export-json</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">"top"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-export-json</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-export-csv</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-export-csv</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-table</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"/kempo-ui/src/components/tableControls/ExportJson.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"/kempo-ui/src/components/tableControls/ExportCsv.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="javascript"><br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'topBottomControlsExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
61
61
|
<k-table id="topBottomControlsExample">
|
|
62
62
|
<k-tc-export-json slot="top"></k-tc-export-json>
|
|
63
63
|
<k-tc-export-csv></k-tc-export-csv>
|
|
64
64
|
</k-table>
|
|
65
|
-
<script type="module" src="
|
|
66
|
-
<script type="module" src="
|
|
65
|
+
<script type="module" src="/kempo-ui/src/components/tableControls/ExportJson.js"></script>
|
|
66
|
+
<script type="module" src="/kempo-ui/src/components/tableControls/ExportCsv.js"></script>
|
|
67
67
|
<script type="module">
|
|
68
68
|
document.getElementById('topBottomControlsExample').setRecords(contacts);
|
|
69
69
|
</script>
|
|
70
70
|
</main>
|
|
71
71
|
<div style="height: 33.333vh"></div>
|
|
72
|
-
<script type="module" src="
|
|
72
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
73
73
|
</body>
|
|
74
74
|
</html>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Custom Fields - Table - Kempo Docs</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="stylesheet" href="
|
|
11
|
-
<script type="module" src="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
12
|
+
<script type="module" src="/kempo-ui/src/components/Table.js"></script>
|
|
12
13
|
<script>window.litDisableBundleWarning = true;</script>
|
|
13
|
-
<script type="module" src="./init.js"></script>
|
|
14
14
|
<script>
|
|
15
15
|
window.contacts = [];
|
|
16
16
|
function generateContact(){
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
</script>
|
|
51
51
|
</head>
|
|
52
52
|
<body>
|
|
53
|
-
<k-import src="
|
|
53
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
54
54
|
<h1 class="ta-center">Table - Custom Fields</h1>
|
|
55
55
|
<main>
|
|
56
56
|
|
|
57
|
-
<a href="
|
|
57
|
+
<a href="/kempo-ui/components/table.html"><h5>Back to Table Component Documentation</h5></a>
|
|
58
58
|
|
|
59
59
|
<p>Use the <code>fields</code> property of the options object in <code>setData</code> to define custom fields. This is useful for hiding fields, reordering fields, changing the labels, formatting the output, or creating a calculated field.</p>
|
|
60
60
|
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"customFieldsExample"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-table</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="javascript"><br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'customFieldsExample'</span>).setData({<br /> <span class="hljs-attr">records</span>: contacts,<br /> <span class="hljs-attr">fields</span>: [<br /> {<br /> <span class="hljs-attr">name</span>: <span class="hljs-string">"name"</span>,<br /> <span class="hljs-attr">label</span>: <span class="hljs-string">"Name"</span><br /> },<br /> {<br /> <span class="hljs-attr">name</span>: <span class="hljs-string">'phoneNumber'</span>,<br /> <span class="hljs-attr">label</span>: <span class="hljs-string">'Phone Number'</span><br /> },<br /> {<br /> <span class="hljs-attr">name</span>: <span class="hljs-string">'email'</span>,<br /> <span class="hljs-attr">label</span>: <span class="hljs-string">'Email Address'</span><br /> },<br /> {<br /> <span class="hljs-attr">name</span>: <span class="hljs-string">'birthday'</span>,<br /> <span class="hljs-attr">label</span>: <span class="hljs-string">'Birthday'</span><br /> },<br /> {<br /> <span class="hljs-attr">name</span>: <span class="hljs-string">'age'</span>,<br /> <span class="hljs-attr">label</span>: <span class="hljs-string">'Age'</span>,<br /> <span class="hljs-attr">calculator</span>: <span class="hljs-function">(<span class="hljs-params">record</span>) =></span> {<br /> <span class="hljs-comment">// record.birthday is a string in the format "YYYY-MM-DD"</span><br /> <span class="hljs-keyword">const</span> today = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>();<br /> <span class="hljs-keyword">const</span> birthDate = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(record.birthday);<br /> <span class="hljs-keyword">let</span> age = today.getFullYear() - birthDate.getFullYear();<br /> <span class="hljs-keyword">const</span> monthDifference = today.getMonth() - birthDate.getMonth();<br /> <span class="hljs-keyword">if</span> (monthDifference < <span class="hljs-number">0</span> || (monthDifference === <span class="hljs-number">0</span> && today.getDate() < birthDate.getDate())) {<br /> age--;<br /> }<br /> <span class="hljs-keyword">return</span> age;<br /> }<br /> },<br /> {<br /> <span class="hljs-attr">name</span>: <span class="hljs-string">'gender'</span>,<br /> <span class="hljs-attr">label</span>: <span class="hljs-string">'Gender'</span>,<br /> <span class="hljs-attr">formatter</span>: <span class="hljs-function">(<span class="hljs-params">v</span>) =></span> v===<span class="hljs-string">'m'</span>?<span class="hljs-string">'Male'</span>:<span class="hljs-string">'Female'</span> <span class="hljs-comment">// original value is "m" or "f"</span><br /> }<br /> ]<br /> });<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
@@ -105,6 +105,6 @@
|
|
|
105
105
|
</script>
|
|
106
106
|
</main>
|
|
107
107
|
<div style="height: 33.333vh"></div>
|
|
108
|
-
<script type="module" src="
|
|
108
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
109
109
|
</body>
|
|
110
110
|
</html>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Table - Fetch Records - Kempo Docs</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="stylesheet" href="
|
|
11
|
-
<script type="module" src="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
12
|
+
<script type="module" src="/kempo-ui/src/components/Table.js"></script>
|
|
12
13
|
<script>window.litDisableBundleWarning = true;</script>
|
|
13
|
-
<script type="module" src="./init.js"></script>
|
|
14
14
|
<script>
|
|
15
15
|
window.contacts = [];
|
|
16
16
|
function generateContact(){
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
</script>
|
|
51
51
|
</head>
|
|
52
52
|
<body>
|
|
53
|
-
<k-import src="
|
|
53
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
54
54
|
<h1 class="ta-center">Table - Fetch Records</h1>
|
|
55
55
|
<main>
|
|
56
|
-
<a href="
|
|
56
|
+
<a href="/kempo-ui/components/table.html"><h5>Back to Table Component Documentation</h5></a>
|
|
57
57
|
|
|
58
58
|
<p>The <code>setupFetchRecords</code> function is used to configure the table to fetch records dynamically. It takes two parameters: the total number of records and a function that fetching records. It should be an asynconous function that returns/resolves an array of records that will populate the table.</p>
|
|
59
59
|
<p>In this example, the <code>simulateFetchRecords</code> function generates a specified number of random contact records and resolves the promise after a delay, simulating an asynchronous fetch operation.
|
|
60
60
|
</p>
|
|
61
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-table</span><br /> <span class="hljs-attr">id</span>=<span class="hljs-string">"fetchRecordsExample"</span><br /> <span class="hljs-attr">enable-pages</span>=<span class="hljs-string">"true"</span><br /> <span class="hljs-attr">page-size</span>=<span class="hljs-string">"10"</span><br />></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"d-f full"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-first-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-first-page</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-prev-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-prev-page</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-next-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-next-page</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-last-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-last-page</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-page-select</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-page-select</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-page-size</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-page-size</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-table</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="javascript"><br /> <span class="hljs-keyword">import</span> <span class="hljs-string">'
|
|
61
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-table</span><br /> <span class="hljs-attr">id</span>=<span class="hljs-string">"fetchRecordsExample"</span><br /> <span class="hljs-attr">enable-pages</span>=<span class="hljs-string">"true"</span><br /> <span class="hljs-attr">page-size</span>=<span class="hljs-string">"10"</span><br />></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"d-f full"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-first-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-first-page</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-prev-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-prev-page</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-next-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-next-page</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-last-page</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-last-page</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-page-select</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-page-select</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"flex"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-page-size</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-page-size</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /> <span class="hljs-tag"></<span class="hljs-name">div</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-table</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="javascript"><br /> <span class="hljs-keyword">import</span> <span class="hljs-string">'/kempo-ui/src/components/tableControls/FirstPage.js'</span>;<br /> <span class="hljs-keyword">import</span> <span class="hljs-string">'/kempo-ui/src/components/tableControls/PrevPage.js'</span>;<br /> <span class="hljs-keyword">import</span> <span class="hljs-string">'/kempo-ui/src/components/tableControls/NextPage.js'</span>;<br /> <span class="hljs-keyword">import</span> <span class="hljs-string">'/kempo-ui/src/components/tableControls/LastPage.js'</span>;<br /> <span class="hljs-keyword">import</span> <span class="hljs-string">'/kempo-ui/src/components/tableControls/PageSelect.js'</span>;<br /> <span class="hljs-keyword">import</span> <span class="hljs-string">'/kempo-ui/src/components/tableControls/PageSize.js'</span>;<br /><br /> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">simulateFetchRecords</span>(<span class="hljs-params">start, count</span>)</span>{<br /> <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(<span class="hljs-function"><span class="hljs-params">res</span> =></span> {<br /> <span class="hljs-keyword">const</span> newRecords = [];<br /> <span class="hljs-keyword">for</span>(<span class="hljs-keyword">let</span> i=<span class="hljs-number">0</span>; i<count; i++){<br /> newRecords.push(generateContact());<br /> }<br /> setTimeout(<span class="hljs-function"><span class="hljs-params">()</span>=></span>res(newRecords), <span class="hljs-number">1000</span>);<br /> });<br /> }<br /><br /> <span class="hljs-keyword">const</span> $table = <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'fetchRecordsExample'</span>);<br /> <br /> $table.setRecords(contacts);<br /> $table.setupFetchRecords(<span class="hljs-number">100</span>, simulateFetchRecords);<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
62
62
|
<k-table
|
|
63
63
|
id="fetchRecordsExample"
|
|
64
64
|
enable-pages="true"
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
</div>
|
|
83
83
|
</k-table>
|
|
84
84
|
<script type="module">
|
|
85
|
-
import '
|
|
86
|
-
import '
|
|
87
|
-
import '
|
|
88
|
-
import '
|
|
89
|
-
import '
|
|
90
|
-
import '
|
|
85
|
+
import '/kempo-ui/src/components/tableControls/FirstPage.js';
|
|
86
|
+
import '/kempo-ui/src/components/tableControls/PrevPage.js';
|
|
87
|
+
import '/kempo-ui/src/components/tableControls/NextPage.js';
|
|
88
|
+
import '/kempo-ui/src/components/tableControls/LastPage.js';
|
|
89
|
+
import '/kempo-ui/src/components/tableControls/PageSelect.js';
|
|
90
|
+
import '/kempo-ui/src/components/tableControls/PageSize.js';
|
|
91
91
|
|
|
92
92
|
function simulateFetchRecords(start, count){
|
|
93
93
|
return new Promise(res => {
|
|
@@ -106,6 +106,6 @@
|
|
|
106
106
|
</script>
|
|
107
107
|
</main>
|
|
108
108
|
<div style="height: 33.333vh"></div>
|
|
109
|
-
<script type="module" src="
|
|
109
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
110
110
|
</body>
|
|
111
111
|
</html>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<base href="/kempo-ui/">
|
|
4
5
|
<meta charset="UTF-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
7
|
<title>Field Sort and Hide - Table - Kempo Docs</title>
|
|
7
|
-
<link rel="stylesheet" href="
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="stylesheet" href="
|
|
11
|
-
<script type="module" src="
|
|
8
|
+
<link rel="stylesheet" href="kempo-vars.css" />
|
|
9
|
+
<link rel="stylesheet" href="kempo.min.css" />
|
|
10
|
+
<link rel="stylesheet" href="kempo-hljs.css" />
|
|
11
|
+
<link rel="stylesheet" href="styles.css" />
|
|
12
|
+
<script type="module" src="/kempo-ui/src/components/Table.js"></script>
|
|
12
13
|
<script>window.litDisableBundleWarning = true;</script>
|
|
13
|
-
<script type="module" src="./init.js"></script>
|
|
14
14
|
<script>
|
|
15
15
|
window.contacts = [];
|
|
16
16
|
function generateContact(){
|
|
@@ -50,23 +50,23 @@
|
|
|
50
50
|
</script>
|
|
51
51
|
</head>
|
|
52
52
|
<body>
|
|
53
|
-
<k-import src="
|
|
53
|
+
<k-import src="/kempo-ui/nav.inc.html"></k-import>
|
|
54
54
|
<h1 class="ta-center">Table - Field Sort and Hide</h1>
|
|
55
55
|
<main>
|
|
56
56
|
|
|
57
|
-
<a href="
|
|
57
|
+
<a href="/kempo-ui/components/table.html"><h5>Back to Table Component Documentation</h5></a>
|
|
58
58
|
|
|
59
59
|
<p>This example shows how to use the <code><k-tc-field-sort-hide></code> component to allow users to show or hide fields in the table, and sort fields.</p>
|
|
60
|
-
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"fieldVisibilityExample"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-field-sort-hide</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">"top"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-field-sort-hide</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-table</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"
|
|
60
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-table</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"fieldVisibilityExample"</span>></span><br /> <span class="hljs-tag"><<span class="hljs-name">k-tc-field-sort-hide</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">"top"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-tc-field-sort-hide</span>></span><br /><span class="hljs-tag"></<span class="hljs-name">k-table</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"/kempo-ui/src/components/tableControls/FieldSortHide.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="javascript"><br /> <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'fieldVisibilityExample'</span>).setRecords(contacts);<br /></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre>
|
|
61
61
|
<k-table id="fieldVisibilityExample">
|
|
62
62
|
<k-tc-field-sort-hide slot="top"></k-tc-field-sort-hide>
|
|
63
63
|
</k-table>
|
|
64
|
-
<script type="module" src="
|
|
64
|
+
<script type="module" src="/kempo-ui/src/components/tableControls/FieldSortHide.js"></script>
|
|
65
65
|
<script type="module">
|
|
66
66
|
document.getElementById('fieldVisibilityExample').setRecords(contacts);
|
|
67
67
|
</script>
|
|
68
68
|
</main>
|
|
69
69
|
<div style="height: 33.333vh"></div>
|
|
70
|
-
<script type="module" src="
|
|
70
|
+
<script type="module" src="/kempo-ui/src/components/Import.js"></script>
|
|
71
71
|
</body>
|
|
72
72
|
</html>
|