@stonecrop/beam 0.2.57 → 0.2.59
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/assets/index.css +1 -1
- package/dist/beam.d.ts +6 -0
- package/dist/beam.js +803 -775
- package/dist/beam.js.map +1 -1
- package/dist/beam.umd.cjs +7 -7
- package/dist/beam.umd.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +5 -3
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/BeamDayDivider.vue +56 -0
- package/src/components/ListView.vue +12 -2
- package/src/index.ts +4 -0
- package/src/types/index.ts +6 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import ActionFooter from '@/components/ActionFooter.vue';
|
|
2
2
|
import BeamArrow from '@/components/BeamArrow.vue';
|
|
3
3
|
import BeamBtn from '@/components/BeamBtn.vue';
|
|
4
|
+
import BeamDayDivider from '@/components/BeamDayDivider.vue';
|
|
4
5
|
import BeamFilter from '@/components/BeamFilter.vue';
|
|
5
6
|
import BeamFilterOption from '@/components/BeamFilterOption.vue';
|
|
6
7
|
import BeamHeading from '@/components/BeamHeading.vue';
|
|
@@ -30,6 +31,7 @@ function install(app /* options */) {
|
|
|
30
31
|
app.component('ActionFooter', ActionFooter);
|
|
31
32
|
app.component('BeamArrow', BeamArrow);
|
|
32
33
|
app.component('BeamBtn', BeamBtn);
|
|
34
|
+
app.component('BeamDayDivider', BeamDayDivider);
|
|
33
35
|
app.component('BeamFilter', BeamFilter);
|
|
34
36
|
app.component('BeamFilterOption', BeamFilterOption);
|
|
35
37
|
app.component('BeamHeading', BeamHeading);
|
|
@@ -49,4 +51,4 @@ function install(app /* options */) {
|
|
|
49
51
|
app.component('SplitColumn', SplitColumn);
|
|
50
52
|
app.component('ToggleArrow', ToggleArrow);
|
|
51
53
|
}
|
|
52
|
-
export { ActionFooter, BeamArrow, BeamBtn, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
|
|
54
|
+
export { ActionFooter, BeamArrow, BeamBtn, BeamDayDivider, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { App } from 'vue';
|
|
|
2
2
|
import ActionFooter from '@/components/ActionFooter.vue';
|
|
3
3
|
import BeamArrow from '@/components/BeamArrow.vue';
|
|
4
4
|
import BeamBtn from '@/components/BeamBtn.vue';
|
|
5
|
+
import BeamDayDivider from '@/components/BeamDayDivider.vue';
|
|
5
6
|
import BeamFilter from '@/components/BeamFilter.vue';
|
|
6
7
|
import BeamFilterOption from '@/components/BeamFilterOption.vue';
|
|
7
8
|
import BeamHeading from '@/components/BeamHeading.vue';
|
|
@@ -21,6 +22,7 @@ import ScanInput from '@/components/ScanInput.vue';
|
|
|
21
22
|
import SplitColumn from '@/components/SplitColumn.vue';
|
|
22
23
|
import ToggleArrow from '@/components/ToggleArrow.vue';
|
|
23
24
|
import { useMqttStream } from '@/composables/mqtt';
|
|
25
|
+
export type { ListViewItem } from '@/types';
|
|
24
26
|
import 'themes/beam.css';
|
|
25
27
|
/**
|
|
26
28
|
* Install all Beam components
|
|
@@ -28,5 +30,5 @@ import 'themes/beam.css';
|
|
|
28
30
|
* @public
|
|
29
31
|
*/
|
|
30
32
|
declare function install(app: App): void;
|
|
31
|
-
export { ActionFooter, BeamArrow, BeamBtn, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
|
|
33
|
+
export { ActionFooter, BeamArrow, BeamBtn, BeamDayDivider, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
|
|
32
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,OAAO,MAAM,0BAA0B,CAAA;AAC9C,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,gBAAgB,MAAM,mCAAmC,CAAA;AAChE,OAAO,WAAW,MAAM,8BAA8B,CAAA;AACtD,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,OAAO,MAAM,0BAA0B,CAAA;AAC9C,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C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D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,iBAAiB,CAAA;AAExB;;;;GAIG;AACH,iBAAS,OAAO,CAAC,GAAG,EAAE,GAAG,QAuBxB;AAED,OAAO,EACN,YAAY,EACZ,SAAS,EACT,OAAO,EACP,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,eAAe,EACf,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,WAAW,EACX,WAAW,EACX,OAAO,EACP,aAAa,GACb,CAAA"}
|
|
@@ -2,13 +2,15 @@ export type ListViewItem = {
|
|
|
2
2
|
description: string;
|
|
3
3
|
label: string;
|
|
4
4
|
checked?: boolean;
|
|
5
|
-
debounce?: number;
|
|
6
|
-
linkComponent?: string;
|
|
7
|
-
route?: string;
|
|
8
5
|
count?: {
|
|
9
6
|
count: number;
|
|
10
7
|
of: number;
|
|
11
8
|
uom: string;
|
|
12
9
|
};
|
|
10
|
+
date?: string;
|
|
11
|
+
dateFormat?: string;
|
|
12
|
+
debounce?: number;
|
|
13
|
+
linkComponent?: string;
|
|
14
|
+
route?: string;
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IAEb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;KACX,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="beam_day-divider">
|
|
3
|
+
<h2>{{ date }}</h2>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<slot></slot>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import { defineProps, computed } from 'vue'
|
|
11
|
+
|
|
12
|
+
import type { ListViewItem } from '@/types'
|
|
13
|
+
|
|
14
|
+
defineSlots<{ default(): any }>()
|
|
15
|
+
const { item } = defineProps<{ item: ListViewItem }>()
|
|
16
|
+
|
|
17
|
+
const date = computed(() => {
|
|
18
|
+
if (!item.date || isNaN(Date.parse(item.date))) {
|
|
19
|
+
return item.date
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// if needed, the user can specify a Date format flag that will dictate how the output is formatted,
|
|
23
|
+
// defaults to toDateString(); using switch/case here in case more values wanted to be added
|
|
24
|
+
const dateObj = new Date(item.date)
|
|
25
|
+
if (item.dateFormat) {
|
|
26
|
+
switch (item.dateFormat.toLowerCase()) {
|
|
27
|
+
case 'iso':
|
|
28
|
+
return dateObj.toISOString()
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return dateObj.toDateString()
|
|
32
|
+
})
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style scoped>
|
|
36
|
+
.beam_day-divider {
|
|
37
|
+
text-align: left;
|
|
38
|
+
padding: 1rem;
|
|
39
|
+
background: var(--sc-cell-changed-color);
|
|
40
|
+
border-bottom: 1px solid var(--sc-row-border-color);
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
margin: 1rem 0;
|
|
43
|
+
|
|
44
|
+
& h2 {
|
|
45
|
+
text-align: left;
|
|
46
|
+
font-size: 1rem;
|
|
47
|
+
color: var(--sc-primary-text-color);
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.beam_day-divider:first-of-type {
|
|
54
|
+
margin-top: 0;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ul class="beam_list-view">
|
|
3
3
|
<li v-for="item in items" :key="item.label">
|
|
4
|
-
<template v-if="item.linkComponent">
|
|
4
|
+
<template v-if="item.linkComponent == 'BeamDayDivider'">
|
|
5
|
+
<BeamDayDivider :item="item"></BeamDayDivider>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<template v-else-if="item.linkComponent">
|
|
5
9
|
<component :is="item.linkComponent" :to="item.route" tabindex="-1">
|
|
6
10
|
<ListItem :item="item" @update="handleUpdate"></ListItem>
|
|
7
11
|
</component>
|
|
8
12
|
</template>
|
|
13
|
+
|
|
9
14
|
<template v-else>
|
|
10
15
|
<ListItem :item="item" @update="handleUpdate"></ListItem>
|
|
11
16
|
</template>
|
|
@@ -16,6 +21,7 @@
|
|
|
16
21
|
<script setup lang="ts">
|
|
17
22
|
import { onMounted, onUnmounted } from 'vue'
|
|
18
23
|
|
|
24
|
+
import BeamDayDivider from '@/components/BeamDayDivider.vue'
|
|
19
25
|
import ListItem from '@/components/ListItem.vue'
|
|
20
26
|
import type { ListViewItem } from '@/types'
|
|
21
27
|
|
|
@@ -45,8 +51,12 @@ const handleScroll = () => {
|
|
|
45
51
|
list-style-type: none;
|
|
46
52
|
margin: var(--sc-list-margin);
|
|
47
53
|
padding: 0;
|
|
48
|
-
padding-bottom: 2.5em;
|
|
54
|
+
/* padding-bottom: 2.5em; */
|
|
49
55
|
margin-top: 1px;
|
|
50
56
|
font-family: var(--sc-font-family);
|
|
51
57
|
}
|
|
58
|
+
|
|
59
|
+
ul.beam_list-view:last-of-type {
|
|
60
|
+
padding-bottom: 2.5em;
|
|
61
|
+
}
|
|
52
62
|
</style>
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { App } from 'vue'
|
|
|
3
3
|
import ActionFooter from '@/components/ActionFooter.vue'
|
|
4
4
|
import BeamArrow from '@/components/BeamArrow.vue'
|
|
5
5
|
import BeamBtn from '@/components/BeamBtn.vue'
|
|
6
|
+
import BeamDayDivider from '@/components/BeamDayDivider.vue'
|
|
6
7
|
import BeamFilter from '@/components/BeamFilter.vue'
|
|
7
8
|
import BeamFilterOption from '@/components/BeamFilterOption.vue'
|
|
8
9
|
import BeamHeading from '@/components/BeamHeading.vue'
|
|
@@ -22,6 +23,7 @@ import ScanInput from '@/components/ScanInput.vue'
|
|
|
22
23
|
import SplitColumn from '@/components/SplitColumn.vue'
|
|
23
24
|
import ToggleArrow from '@/components/ToggleArrow.vue'
|
|
24
25
|
import { useMqttStream } from '@/composables/mqtt'
|
|
26
|
+
export type { ListViewItem } from '@/types'
|
|
25
27
|
import 'themes/beam.css'
|
|
26
28
|
|
|
27
29
|
/**
|
|
@@ -33,6 +35,7 @@ function install(app: App /* options */) {
|
|
|
33
35
|
app.component('ActionFooter', ActionFooter)
|
|
34
36
|
app.component('BeamArrow', BeamArrow)
|
|
35
37
|
app.component('BeamBtn', BeamBtn)
|
|
38
|
+
app.component('BeamDayDivider', BeamDayDivider)
|
|
36
39
|
app.component('BeamFilter', BeamFilter)
|
|
37
40
|
app.component('BeamFilterOption', BeamFilterOption)
|
|
38
41
|
app.component('BeamHeading', BeamHeading)
|
|
@@ -57,6 +60,7 @@ export {
|
|
|
57
60
|
ActionFooter,
|
|
58
61
|
BeamArrow,
|
|
59
62
|
BeamBtn,
|
|
63
|
+
BeamDayDivider,
|
|
60
64
|
BeamFilter,
|
|
61
65
|
BeamFilterOption,
|
|
62
66
|
BeamHeading,
|
package/src/types/index.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export type ListViewItem = {
|
|
2
2
|
description: string
|
|
3
3
|
label: string
|
|
4
|
+
|
|
4
5
|
checked?: boolean
|
|
5
|
-
debounce?: number
|
|
6
|
-
linkComponent?: string
|
|
7
|
-
route?: string
|
|
8
6
|
count?: {
|
|
9
7
|
count: number
|
|
10
8
|
of: number
|
|
11
9
|
uom: string
|
|
12
10
|
}
|
|
11
|
+
date?: string
|
|
12
|
+
dateFormat?: string
|
|
13
|
+
debounce?: number
|
|
14
|
+
linkComponent?: string
|
|
15
|
+
route?: string
|
|
13
16
|
}
|