kempo 2.9.2 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion.js +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/DirectoryViewer.js +1 -1
- package/dist/components/FocusCapture.js +1 -1
- package/dist/components/Icon.js +1 -1
- package/dist/components/Search.js +1 -1
- package/dist/components/Table.js +1 -1
- package/dist/components/Timestamp.js +1 -1
- package/dist/components/Toggle.js +1 -1
- package/dist/components/tableControls/DeleteSelected.js +1 -1
- package/dist/components/tableControls/Edit.js +1 -0
- package/dist/components/tableControls/Filters.js +1 -0
- package/dist/components/tableControls/HiddenCount.js +1 -0
- package/dist/components/tableControls/Hide.js +1 -0
- package/dist/components/tableControls/PageSelect.js +1 -1
- package/dist/components/tableControls/PageSize.js +1 -1
- package/dist/components/tableControls/ShowAll.js +1 -0
- package/dist/index.js +1 -1
- package/dist/kempo-styles.css +1 -1
- package/dist/kempo-vars.css +1 -1
- package/dist/utils/formatTimestamp.js +1 -1
- package/docs/components/_template.html +9 -0
- package/docs/components/accordion.html +52 -12
- package/docs/components/card.html +68 -8
- package/docs/components/component.html +6 -0
- package/docs/components/content-slider.html +8 -0
- package/docs/components/dialog.html +145 -5
- package/docs/components/directory-viewer.html +51 -40
- package/docs/components/focus-capture.html +68 -0
- package/docs/components/icon.html +76 -5
- package/docs/components/import.html +47 -0
- package/docs/components/lazy-component.html +45 -15
- package/docs/components/reactive-component.html +69 -0
- package/docs/components/reactive-lazy-component.html +69 -0
- package/docs/components/resize.html +52 -3
- package/docs/components/search.html +102 -0
- package/docs/components/show-more.html +54 -5
- package/docs/components/{sidemenu.html → side-menu.html} +56 -3
- package/docs/components/split.html +57 -16
- package/docs/components/table.html +90 -189
- package/docs/components/tableControls.html +91 -0
- package/docs/components/tableCustomFields.html +112 -0
- package/docs/components/tablePagination.html +92 -0
- package/docs/components/tableRecordEditing.html +144 -0
- package/docs/components/tableRecordFiltering.html +82 -0
- package/docs/components/tableRecordHiding.html +84 -0
- package/docs/components/tableRecordSelection.html +86 -0
- package/docs/components/tableRowControls.html +103 -0
- package/docs/components/tabs.html +72 -4
- package/docs/components/tags.html +94 -0
- package/docs/components/theme-switcher.html +74 -0
- package/docs/components/timestamp.html +86 -0
- package/docs/components/toggle.html +37 -34
- package/docs/icons/check.svg +1 -0
- package/docs/icons/hide.svg +1 -0
- package/docs/icons/show.svg +1 -0
- package/docs/index.html +5 -0
- package/docs/kempo/components/Accordion.js +1 -1
- package/docs/kempo/components/Dialog.js +1 -1
- package/docs/kempo/components/DirectoryViewer.js +1 -1
- package/docs/kempo/components/FocusCapture.js +1 -1
- package/docs/kempo/components/Icon.js +1 -1
- package/docs/kempo/components/Search.js +1 -1
- package/docs/kempo/components/Table.js +1 -1
- package/docs/kempo/components/Timestamp.js +1 -1
- package/docs/kempo/components/Toggle.js +1 -1
- package/docs/kempo/components/tableControls/DeleteSelected.js +1 -1
- package/docs/kempo/components/tableControls/Edit.js +1 -0
- package/docs/kempo/components/tableControls/Filters.js +1 -0
- package/docs/kempo/components/tableControls/HiddenCount.js +1 -0
- package/docs/kempo/components/tableControls/Hide.js +1 -0
- package/docs/kempo/components/tableControls/PageSelect.js +1 -1
- package/docs/kempo/components/tableControls/PageSize.js +1 -1
- package/docs/kempo/components/tableControls/ShowAll.js +1 -0
- package/docs/kempo/index.js +1 -1
- package/docs/kempo/kempo-styles.css +1 -1
- package/docs/kempo/kempo-vars.css +1 -1
- package/docs/kempo/utils/formatTimestamp.js +1 -1
- package/docs/nav-1.inc.html +16 -2
- package/docs/nav.inc.html +10 -2
- package/docs/search.json +281 -23
- package/docs/styles/_template.html +6 -0
- package/docs/styles/borders-spacing.html +6 -0
- package/docs/styles/buttons.html +6 -0
- package/docs/styles/colors.html +6 -0
- package/docs/styles/displays-layouts.html +6 -0
- package/docs/styles/embed-1.html +6 -0
- package/docs/styles/inputs.html +6 -0
- package/docs/styles/tables.html +6 -0
- package/docs/styles/typography.html +6 -0
- package/docs/{components/stacks.html → utils/_template.html} +11 -30
- package/docs/utils/cli.html +84 -0
- package/docs/utils/cookie.html +87 -0
- package/docs/utils/debounce.html +61 -0
- package/docs/utils/drag.html +85 -0
- package/docs/utils/element.html +124 -0
- package/docs/utils/format-timestamp.html +64 -0
- package/docs/utils/fuzzy-match.html +60 -0
- package/icons/check.svg +1 -0
- package/icons/hide.svg +1 -0
- package/icons/show.svg +1 -0
- package/package.json +1 -1
- package/src/components/Accordion.js +0 -1
- package/src/components/Dialog.js +15 -6
- package/src/components/DirectoryViewer.js +21 -92
- package/src/components/FocusCapture.js +2 -1
- package/src/components/Icon.js +3 -1
- package/src/components/Search.js +4 -1
- package/src/components/Table.js +469 -139
- package/src/components/Timestamp.js +7 -4
- package/src/components/Toggle.js +3 -0
- package/src/components/tableControls/DeleteSelected.js +36 -22
- package/src/components/tableControls/Edit.js +88 -0
- package/src/components/tableControls/Filters.js +128 -0
- package/src/components/tableControls/HiddenCount.js +42 -0
- package/src/components/tableControls/Hide.js +43 -0
- package/src/components/tableControls/PageSelect.js +54 -30
- package/src/components/tableControls/PageSize.js +33 -16
- package/src/components/tableControls/ShowAll.js +40 -0
- package/src/kempo-styles.css +7 -0
- package/src/kempo-vars.css +2 -0
- package/src/utils/formatTimestamp.js +26 -10
- package/docs/table.html +0 -0
- package/src/components/Stacks.js +0 -79
- package/src/utils/files.js +0 -15
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
export default (timestamp, forceLocale) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export default (timestamp, format, forceLocale) => {
|
|
2
|
+
const date = new Date(parseInt(timestamp));
|
|
3
|
+
if (format) {
|
|
4
|
+
const pad = (num, size) => ('000' + num).slice(size * -1);
|
|
5
|
+
const tokens = {
|
|
6
|
+
YYYY: date.getFullYear(),
|
|
7
|
+
YY: String(date.getFullYear()).slice(-2),
|
|
8
|
+
MM: pad(date.getMonth() + 1, 2),
|
|
9
|
+
M: date.getMonth() + 1,
|
|
10
|
+
DD: pad(date.getDate(), 2),
|
|
11
|
+
D: date.getDate(),
|
|
12
|
+
hh: pad(date.getHours(), 2),
|
|
13
|
+
h: date.getHours(),
|
|
14
|
+
mm: pad(date.getMinutes(), 2),
|
|
15
|
+
m: date.getMinutes(),
|
|
16
|
+
ss: pad(date.getSeconds(), 2),
|
|
17
|
+
s: date.getSeconds(),
|
|
18
|
+
iiii: pad(date.getMilliseconds(), 3),
|
|
19
|
+
iii: pad(date.getMilliseconds(), 3),
|
|
20
|
+
ii: pad(date.getMilliseconds(), 2),
|
|
21
|
+
i: date.getMilliseconds()
|
|
22
|
+
};
|
|
23
|
+
return format.replace(/YYYY|YY|MM|M|DD|D|hh|h|mm|m|ss|s|iiii|iii|ii|i/g, (matched) => tokens[matched]);
|
|
24
|
+
} else {
|
|
25
|
+
return date.toLocaleString(forceLocale || navigator.language);
|
|
26
|
+
}
|
|
11
27
|
}
|
package/docs/table.html
DELETED
|
File without changes
|
package/src/components/Stacks.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import Component from './Component.js';
|
|
2
|
-
|
|
3
|
-
export default class Stacks extends Component {
|
|
4
|
-
|
|
5
|
-
/* Public Members */
|
|
6
|
-
get panels(){
|
|
7
|
-
return [...this.querySelectorAll('k-stack-panel')];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* Public Methods */
|
|
11
|
-
reorderPanels(){
|
|
12
|
-
const panels = this.panels;
|
|
13
|
-
panels.reverse().forEach((panel, index) => panel.style.setProperty('--order', index));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Shadow DOM */
|
|
17
|
-
get shadowStyles(){
|
|
18
|
-
return /*css*/`
|
|
19
|
-
:host {
|
|
20
|
-
--stack_width: 16rem;
|
|
21
|
-
display: block;
|
|
22
|
-
height: 100%;
|
|
23
|
-
position: relative;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
window.customElements.define('k-stacks', Stacks);
|
|
29
|
-
|
|
30
|
-
export class StackPanel extends Component {
|
|
31
|
-
constructor(){
|
|
32
|
-
super();
|
|
33
|
-
|
|
34
|
-
this.registerAttribute('stack', 0);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Lifecycle Callbacks */
|
|
38
|
-
connectedCallback(){
|
|
39
|
-
super.connectedCallback();
|
|
40
|
-
const stacks = this.stacks;
|
|
41
|
-
if(stacks) stacks.reorderPanels();
|
|
42
|
-
}
|
|
43
|
-
attributeChangedCallback(n, oV, nV){
|
|
44
|
-
super.attributeChangedCallback(n, oV, nV);
|
|
45
|
-
if(n ==='stack' && oV !== nV){
|
|
46
|
-
this.style.setProperty('--stack', nV);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* Protected Members */
|
|
51
|
-
get stacks(){
|
|
52
|
-
return this.closest('k-stacks');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/* Shadow DOM */
|
|
57
|
-
get shadowStyles(){
|
|
58
|
-
return /*css*/`
|
|
59
|
-
:host {
|
|
60
|
-
--stack: 0;
|
|
61
|
-
display: block;
|
|
62
|
-
height: 100%;
|
|
63
|
-
width: var(--stack_width);
|
|
64
|
-
position: absolute;
|
|
65
|
-
top: 0;
|
|
66
|
-
left: calc(var(--stack) * var(--stack_width));
|
|
67
|
-
transition: left var(--animation_ms) ease-in-out;
|
|
68
|
-
z-index: var(--order);
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Static Members */
|
|
74
|
-
static observedAttributes = [
|
|
75
|
-
...super.observedAttributes,
|
|
76
|
-
'stack'
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
window.customElements.define('k-stack-panel', StackPanel);
|
package/src/utils/files.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const getDir = async () => {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
let id,
|
|
5
|
-
interval = 1000;
|
|
6
|
-
const watchers = new Map();
|
|
7
|
-
const poll = () => {
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
export const watchDir = async (dirHandle, callback, interval = 1000) => {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
export const unwatchDir = async (dirHandle, callback) => {
|
|
14
|
-
|
|
15
|
-
}
|