@aotearoan/neon 28.5.0 → 28.6.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/layout/basic-layout/NeonBasicLayout.cjs.js +2 -0
- package/dist/components/layout/basic-layout/NeonBasicLayout.cjs.js.map +1 -0
- package/dist/components/layout/basic-layout/NeonBasicLayout.es.js +40 -0
- package/dist/components/layout/basic-layout/NeonBasicLayout.es.js.map +1 -0
- package/dist/components/layout/basic-layout/NeonBasicLayout.vue.cjs.js +2 -0
- package/dist/components/layout/basic-layout/NeonBasicLayout.vue.cjs.js.map +1 -0
- package/dist/components/layout/basic-layout/NeonBasicLayout.vue.es.js +41 -0
- package/dist/components/layout/basic-layout/NeonBasicLayout.vue.es.js.map +1 -0
- package/dist/components/layout/card-list/NeonCardList.cjs.js +1 -1
- package/dist/components/layout/card-list/NeonCardList.cjs.js.map +1 -1
- package/dist/components/layout/card-list/NeonCardList.es.js +47 -45
- package/dist/components/layout/card-list/NeonCardList.es.js.map +1 -1
- package/dist/components/layout/card-list/NeonCardList.vue.cjs.js +1 -1
- package/dist/components/layout/card-list/NeonCardList.vue.cjs.js.map +1 -1
- package/dist/components/layout/card-list/NeonCardList.vue.es.js +48 -50
- package/dist/components/layout/card-list/NeonCardList.vue.es.js.map +1 -1
- package/dist/components/layout/list-layout/NeonListLayout.cjs.js +1 -1
- package/dist/components/layout/list-layout/NeonListLayout.cjs.js.map +1 -1
- package/dist/components/layout/list-layout/NeonListLayout.es.js +16 -11
- package/dist/components/layout/list-layout/NeonListLayout.es.js.map +1 -1
- package/dist/components/layout/list-layout/NeonListLayout.vue.cjs.js +1 -1
- package/dist/components/layout/list-layout/NeonListLayout.vue.cjs.js.map +1 -1
- package/dist/components/layout/list-layout/NeonListLayout.vue.es.js +10 -9
- package/dist/components/layout/list-layout/NeonListLayout.vue.es.js.map +1 -1
- package/dist/components/presentation/avatar/NeonAvatar.cjs.js +2 -0
- package/dist/components/presentation/avatar/NeonAvatar.cjs.js.map +1 -0
- package/dist/components/presentation/avatar/NeonAvatar.es.js +66 -0
- package/dist/components/presentation/avatar/NeonAvatar.es.js.map +1 -0
- package/dist/components/presentation/avatar/NeonAvatar.vue.cjs.js +2 -0
- package/dist/components/presentation/avatar/NeonAvatar.vue.cjs.js.map +1 -0
- package/dist/components/presentation/avatar/NeonAvatar.vue.es.js +25 -0
- package/dist/components/presentation/avatar/NeonAvatar.vue.es.js.map +1 -0
- package/dist/components/presentation/header/NeonHeader.vue.cjs.js +1 -1
- package/dist/components/presentation/header/NeonHeader.vue.cjs.js.map +1 -1
- package/dist/components/presentation/header/NeonHeader.vue.es.js +31 -29
- package/dist/components/presentation/header/NeonHeader.vue.es.js.map +1 -1
- package/dist/model/layout/card-list/NeonCardListStyle.cjs.js +2 -0
- package/dist/model/layout/card-list/NeonCardListStyle.cjs.js.map +1 -0
- package/dist/model/layout/card-list/NeonCardListStyle.es.js +5 -0
- package/dist/model/layout/card-list/NeonCardListStyle.es.js.map +1 -0
- package/dist/model/presentation/badge/NeonBadgeSize.cjs.js +1 -1
- package/dist/model/presentation/badge/NeonBadgeSize.cjs.js.map +1 -1
- package/dist/model/presentation/badge/NeonBadgeSize.es.js +1 -1
- package/dist/model/presentation/badge/NeonBadgeSize.es.js.map +1 -1
- package/dist/neon.cjs.js +1 -1
- package/dist/neon.es.js +265 -259
- package/dist/neon.es.js.map +1 -1
- package/dist/src/components/layout/basic-layout/NeonBasicLayout.d.ts +427 -0
- package/dist/src/components/layout/basic-layout/NeonBasicLayout.vue.d.ts +2 -0
- package/dist/src/components/layout/card-list/NeonCardList.d.ts +47 -60
- package/dist/src/components/layout/list-layout/NeonListLayout.d.ts +304 -250
- package/dist/src/components/presentation/avatar/NeonAvatar.d.ts +1806 -0
- package/dist/src/components/presentation/avatar/NeonAvatar.vue.d.ts +2 -0
- package/dist/src/model/layout/card-list/NeonCardListStyle.d.ts +13 -0
- package/dist/src/model/layout/card-list/NeonLoadOnDemandModel.d.ts +4 -8
- package/dist/src/model/presentation/badge/NeonBadgeSize.d.ts +3 -1
- package/dist/src/neon.d.ts +4 -1
- package/dist/src/utils/common/http/NeonHttpUtils.d.ts +23 -0
- package/dist/utils/common/http/NeonHttpUtils.cjs.js +2 -0
- package/dist/utils/common/http/NeonHttpUtils.cjs.js.map +1 -0
- package/dist/utils/common/http/NeonHttpUtils.es.js +31 -0
- package/dist/utils/common/http/NeonHttpUtils.es.js.map +1 -0
- package/package.json +1 -1
- package/src/sass/components/_badge.scss +2 -2
- package/src/sass/components/{_page-container.scss → _basic-layout.scss} +12 -33
- package/src/sass/components/_card-list.scss +30 -5
- package/src/sass/components/_date-picker.scss +2 -0
- package/src/sass/components/_drawer.scss +1 -0
- package/src/sass/components/_field-group.scss +5 -1
- package/src/sass/components/_header.scss +2 -1
- package/src/sass/components/_input.scss +6 -0
- package/src/sass/components/_link.scss +1 -0
- package/src/sass/components/_modal.scss +1 -0
- package/src/sass/components/_page.scss +1 -0
- package/src/sass/components/_range-slider.scss +4 -0
- package/src/sass/components/_sticky-buttons.scss +1 -1
- package/src/sass/components/components.scss +1 -1
- package/src/sass/includes/_dependencies.scss +1 -1
- package/src/sass/theme.scss +4 -4
- package/src/sass/variables-dark.scss +7 -0
- package/src/sass/variables-global.scss +21 -7
- package/src/sass/variables-light.scss +7 -0
- package/dist/components/layout/page-container/NeonPageContainer.cjs.js +0 -2
- package/dist/components/layout/page-container/NeonPageContainer.cjs.js.map +0 -1
- package/dist/components/layout/page-container/NeonPageContainer.es.js +0 -26
- package/dist/components/layout/page-container/NeonPageContainer.es.js.map +0 -1
- package/dist/components/layout/page-container/NeonPageContainer.vue.cjs.js +0 -2
- package/dist/components/layout/page-container/NeonPageContainer.vue.cjs.js.map +0 -1
- package/dist/components/layout/page-container/NeonPageContainer.vue.es.js +0 -31
- package/dist/components/layout/page-container/NeonPageContainer.vue.es.js.map +0 -1
- package/dist/src/components/layout/page-container/NeonPageContainer.d.ts +0 -98
- package/dist/src/components/layout/page-container/NeonPageContainer.vue.d.ts +0 -2
|
@@ -1,111 +1,109 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
3
|
-
import
|
|
4
|
-
const V = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "neon-card-list__total"
|
|
7
|
-
}, B = {
|
|
1
|
+
import L from "./NeonCardList.es.js";
|
|
2
|
+
import { resolveComponent as d, openBlock as o, createElementBlock as t, normalizeClass as i, renderSlot as a, createBlock as l, withCtx as r, createCommentVNode as c, createElementVNode as k, Fragment as u, renderList as v, createVNode as g, Transition as m, mergeProps as f, toDisplayString as z } from "vue";
|
|
3
|
+
import N from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
+
const V = {
|
|
8
5
|
ref: "cards",
|
|
9
6
|
class: "neon-card-list__cards"
|
|
10
|
-
},
|
|
7
|
+
}, w = { class: "neon-card-list__card" }, P = {
|
|
11
8
|
key: 0,
|
|
12
|
-
class: "neon-card-
|
|
9
|
+
class: "neon-card-list__result-count-label"
|
|
13
10
|
};
|
|
14
|
-
function
|
|
15
|
-
const b =
|
|
16
|
-
return o(),
|
|
11
|
+
function B(e, _, D, E, F, T) {
|
|
12
|
+
const b = d("neon-inline"), p = d("neon-loading-state-card"), y = d("neon-link"), h = d("neon-selectable-card"), $ = d("neon-button"), C = d("neon-pagination");
|
|
13
|
+
return o(), t("div", {
|
|
14
|
+
class: i([`neon-card-list--${e.listStyle}`, "neon-card-list"])
|
|
15
|
+
}, [
|
|
17
16
|
a(e.$slots, "filters"),
|
|
18
|
-
e.slots.header
|
|
17
|
+
e.slots.header ? (o(), l(b, {
|
|
19
18
|
key: 0,
|
|
20
19
|
class: "neon-card-list__header"
|
|
21
20
|
}, {
|
|
22
21
|
default: r(() => [
|
|
23
|
-
a(e.$slots, "header")
|
|
24
|
-
e.loadOnDemand ? (o(), s("span", w, i(e.n(e.items.length)) + " " + i(e.ofLabel) + " " + i(e.n(e.total)), 1)) : p("", !0)
|
|
22
|
+
a(e.$slots, "header")
|
|
25
23
|
]),
|
|
26
24
|
_: 3
|
|
27
|
-
})) :
|
|
28
|
-
|
|
29
|
-
(o(!0),
|
|
30
|
-
n.href && !n.disabled ? (o(), l(
|
|
31
|
-
key: `${n.model.id ??
|
|
32
|
-
class:
|
|
25
|
+
})) : c("", !0),
|
|
26
|
+
k("div", V, [
|
|
27
|
+
(o(!0), t(u, null, v(e.items, (n, s) => (o(), t(u, null, [
|
|
28
|
+
n.href && !n.disabled ? (o(), l(y, {
|
|
29
|
+
key: `${n.model.id ?? s}-link`,
|
|
30
|
+
class: i([e.color && `neon-card-list__link--${e.color}`, "neon-card-list__link"]),
|
|
33
31
|
href: n.href,
|
|
34
32
|
"no-style": "",
|
|
35
33
|
"outline-style": "background"
|
|
36
34
|
}, {
|
|
37
35
|
default: r(() => [
|
|
38
|
-
|
|
36
|
+
k("div", w, [
|
|
39
37
|
e.pagination && e.loading ? a(e.$slots, "loadingStateCard", { key: 0 }, () => [
|
|
40
|
-
g(
|
|
41
|
-
]) : (o(), l(
|
|
38
|
+
g(p)
|
|
39
|
+
]) : (o(), l(m, {
|
|
42
40
|
key: 1,
|
|
43
41
|
mode: "out-in",
|
|
44
42
|
name: "neon-fade-transition"
|
|
45
43
|
}, {
|
|
46
44
|
default: r(() => [
|
|
47
|
-
a(e.$slots, "card",
|
|
45
|
+
a(e.$slots, "card", f({ ref_for: !0 }, { model: n.model, index: s }))
|
|
48
46
|
]),
|
|
49
47
|
_: 2
|
|
50
48
|
}, 1024))
|
|
51
49
|
])
|
|
52
50
|
]),
|
|
53
51
|
_: 2
|
|
54
|
-
}, 1032, ["class", "href"])) : e.selectable ? (o(), l(
|
|
55
|
-
key: `${n.model.id ??
|
|
56
|
-
class:
|
|
52
|
+
}, 1032, ["class", "href"])) : e.selectable ? (o(), l(h, {
|
|
53
|
+
key: `${n.model.id ?? s}-selectable`,
|
|
54
|
+
class: i([{
|
|
57
55
|
"neon-card-list__card--disabled": n.disabled,
|
|
58
56
|
"neon-card-list__card--selected": n.selected
|
|
59
57
|
}, "neon-card-list__card neon-card-list__card--selectable"]),
|
|
60
58
|
disabled: n.disabled,
|
|
61
59
|
"model-value": !!n.selected,
|
|
62
|
-
"onUpdate:modelValue": (
|
|
60
|
+
"onUpdate:modelValue": (S) => e.emit("toggle-selected", n.model.id, S)
|
|
63
61
|
}, {
|
|
64
62
|
default: r(() => [
|
|
65
63
|
e.pagination && e.loading ? a(e.$slots, "loadingStateCard", { key: 0 }, () => [
|
|
66
|
-
g(
|
|
67
|
-
]) : (o(), l(
|
|
64
|
+
g(p)
|
|
65
|
+
]) : (o(), l(m, {
|
|
68
66
|
key: 1,
|
|
69
67
|
mode: "out-in",
|
|
70
68
|
name: "neon-fade-transition"
|
|
71
69
|
}, {
|
|
72
70
|
default: r(() => [
|
|
73
|
-
a(e.$slots, "card",
|
|
71
|
+
a(e.$slots, "card", f({ ref_for: !0 }, { model: n.model, index: s }))
|
|
74
72
|
]),
|
|
75
73
|
_: 2
|
|
76
74
|
}, 1024))
|
|
77
75
|
]),
|
|
78
76
|
_: 2
|
|
79
|
-
}, 1032, ["class", "disabled", "model-value", "onUpdate:modelValue"])) : (o(),
|
|
80
|
-
key: `${n.model.id ??
|
|
81
|
-
class:
|
|
77
|
+
}, 1032, ["class", "disabled", "model-value", "onUpdate:modelValue"])) : (o(), t("div", {
|
|
78
|
+
key: `${n.model.id ?? s}-card`,
|
|
79
|
+
class: i([{ "neon-card-list__card--disabled": n.disabled }, "neon-card-list__card"])
|
|
82
80
|
}, [
|
|
83
81
|
e.pagination && e.loading ? a(e.$slots, "loadingStateCard", { key: 0 }, () => [
|
|
84
|
-
g(
|
|
85
|
-
]) : (o(), l(
|
|
82
|
+
g(p)
|
|
83
|
+
]) : (o(), l(m, {
|
|
86
84
|
key: 1,
|
|
87
85
|
mode: "out-in",
|
|
88
86
|
name: "neon-fade-transition"
|
|
89
87
|
}, {
|
|
90
88
|
default: r(() => [
|
|
91
|
-
a(e.$slots, "card",
|
|
89
|
+
a(e.$slots, "card", f({ ref_for: !0 }, { model: n.model, index: s }))
|
|
92
90
|
]),
|
|
93
91
|
_: 2
|
|
94
92
|
}, 1024))
|
|
95
93
|
], 2))
|
|
96
94
|
], 64))), 256))
|
|
97
95
|
], 512),
|
|
98
|
-
e.loadOnDemand ? (o(),
|
|
99
|
-
e.
|
|
96
|
+
e.loadOnDemand ? (o(), t(u, { key: 1 }, [
|
|
97
|
+
e.resultCountLabel ? (o(), t("span", P, z(e.resultCountLabel), 1)) : c("", !0),
|
|
98
|
+
e.items.length < e.total ? (o(), l($, {
|
|
100
99
|
key: 1,
|
|
101
|
-
"button-style": e.NeonButtonStyle.Text,
|
|
102
|
-
color: e.NeonFunctionalColor.Neutral,
|
|
103
100
|
label: e.showMoreLabel,
|
|
104
|
-
size: e.NeonSize.
|
|
101
|
+
size: e.NeonSize.Large,
|
|
102
|
+
state: e.loading ? e.NeonState.Loading : e.NeonState.Ready,
|
|
105
103
|
class: "neon-card-list__show-more",
|
|
106
|
-
onClick:
|
|
107
|
-
}, null, 8, ["
|
|
108
|
-
], 64)) : e.pagination ? (o(), l(
|
|
104
|
+
onClick: _[0] || (_[0] = (n) => e.emit("show-more", n))
|
|
105
|
+
}, null, 8, ["label", "size", "state"])) : c("", !0)
|
|
106
|
+
], 64)) : e.pagination ? (o(), l(C, {
|
|
109
107
|
key: 2,
|
|
110
108
|
color: e.color,
|
|
111
109
|
"display-first-and-last": e.pagination.displayFirstAndLast,
|
|
@@ -114,11 +112,11 @@ function P(e, k, F, T, E, U) {
|
|
|
114
112
|
total: e.pagination.total,
|
|
115
113
|
"url-template": e.pagination.urlTemplate,
|
|
116
114
|
onPageChange: e.onPageChange
|
|
117
|
-
}, null, 8, ["color", "display-first-and-last", "page", "page-size", "total", "url-template", "onPageChange"])) :
|
|
118
|
-
]);
|
|
115
|
+
}, null, 8, ["color", "display-first-and-last", "page", "page-size", "total", "url-template", "onPageChange"])) : c("", !0)
|
|
116
|
+
], 2);
|
|
119
117
|
}
|
|
120
|
-
const
|
|
118
|
+
const O = /* @__PURE__ */ N(L, [["render", B]]);
|
|
121
119
|
export {
|
|
122
|
-
|
|
120
|
+
O as default
|
|
123
121
|
};
|
|
124
122
|
//# sourceMappingURL=NeonCardList.vue.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonCardList.vue.es.js","sources":["../../../../src/components/layout/card-list/NeonCardList.vue"],"sourcesContent":["<template>\n <div class=\"neon-card-list\">\n <!-- @slot slot for providing a filter bar component -->\n <slot name=\"filters\"></slot>\n <neon-inline v-if=\"slots.header
|
|
1
|
+
{"version":3,"file":"NeonCardList.vue.es.js","sources":["../../../../src/components/layout/card-list/NeonCardList.vue"],"sourcesContent":["<template>\n <div :class=\"`neon-card-list--${listStyle}`\" class=\"neon-card-list\">\n <!-- @slot slot for providing a filter bar component -->\n <slot name=\"filters\"></slot>\n <neon-inline v-if=\"slots.header\" class=\"neon-card-list__header\">\n <!-- @slot slot for providing titles for the card list -->\n <slot name=\"header\"></slot>\n </neon-inline>\n <div ref=\"cards\" class=\"neon-card-list__cards\">\n <template v-for=\"(item, index) in items\">\n <neon-link\n v-if=\"item.href && !item.disabled\"\n :key=\"`${item.model.id ?? index}-link`\"\n :class=\"color && `neon-card-list__link--${color}`\"\n :href=\"item.href\"\n class=\"neon-card-list__link\"\n no-style\n outline-style=\"background\"\n >\n <div class=\"neon-card-list__card\">\n <!-- @slot override the default loading state card -->\n <slot v-if=\"pagination && loading\" name=\"loadingStateCard\">\n <neon-loading-state-card />\n </slot>\n <template v-else>\n <transition mode=\"out-in\" name=\"neon-fade-transition\">\n <!-- @slot slot for rendering card contents, two parameters are available:\n @binding {T} model - the model item to be rendered\n @binding {number} index - the index of the item in the list -->\n <slot name=\"card\" v-bind=\"{ model: item.model, index: index }\"></slot>\n </transition>\n </template>\n </div>\n </neon-link>\n <neon-selectable-card\n v-else-if=\"selectable\"\n :key=\"`${item.model.id ?? index}-selectable`\"\n :class=\"{\n 'neon-card-list__card--disabled': item.disabled,\n 'neon-card-list__card--selected': item.selected,\n }\"\n :disabled=\"item.disabled\"\n :model-value=\"!!item.selected\"\n class=\"neon-card-list__card neon-card-list__card--selectable\"\n @update:model-value=\"emit('toggle-selected', item.model.id, $event)\"\n >\n <!-- @slot override the default loading state card -->\n <slot v-if=\"pagination && loading\" name=\"loadingStateCard\">\n <neon-loading-state-card />\n </slot>\n <template v-else>\n <transition mode=\"out-in\" name=\"neon-fade-transition\">\n <!-- @slot slot for rendering card contents, two parameters are available:\n @binding {T} model - the model item to be rendered\n @binding {number} index - the index of the item in the list -->\n <slot name=\"card\" v-bind=\"{ model: item.model, index: index }\"></slot>\n </transition>\n </template>\n </neon-selectable-card>\n <div\n v-else\n :key=\"`${item.model.id ?? index}-card`\"\n :class=\"{ 'neon-card-list__card--disabled': item.disabled }\"\n class=\"neon-card-list__card\"\n >\n <!-- @slot override the default loading state card -->\n <slot v-if=\"pagination && loading\" name=\"loadingStateCard\">\n <neon-loading-state-card />\n </slot>\n <template v-else>\n <transition mode=\"out-in\" name=\"neon-fade-transition\">\n <!-- @slot slot for rendering card contents, two parameters are available:\n @binding {T} model - the model item to be rendered\n @binding {number} index - the index of the item in the list -->\n <slot name=\"card\" v-bind=\"{ model: item.model, index: index }\"></slot>\n </transition>\n </template>\n </div>\n </template>\n </div>\n <template v-if=\"loadOnDemand\">\n <span v-if=\"resultCountLabel\" class=\"neon-card-list__result-count-label\">{{ resultCountLabel }}</span>\n <neon-button\n v-if=\"items.length < total\"\n :label=\"showMoreLabel\"\n :size=\"NeonSize.Large\"\n :state=\"loading ? NeonState.Loading : NeonState.Ready\"\n class=\"neon-card-list__show-more\"\n @click=\"emit('show-more', $event)\"\n />\n </template>\n <neon-pagination\n v-else-if=\"pagination\"\n :color=\"color\"\n :display-first-and-last=\"pagination.displayFirstAndLast\"\n :page=\"pagination.page\"\n :page-size=\"pagination.pageSize\"\n :total=\"pagination.total\"\n :url-template=\"pagination.urlTemplate\"\n @page-change=\"onPageChange\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonCardList.ts\"></script>\n"],"names":["_hoisted_2","_createElementBlock","_normalizeClass","_ctx","_renderSlot","_createBlock","_component_neon_inline","_createElementVNode","_hoisted_1","_openBlock","_Fragment","_renderList","item","index","_component_neon_link","_createVNode","_component_neon_loading_state_card","_Transition","_mergeProps","_component_neon_selectable_card","$event","_hoisted_3","_toDisplayString","_component_neon_button","_cache","_component_neon_pagination"],"mappings":";;;;EAQS,KAAI;AAAA,EAAQ,OAAM;GAWZA,IAAA,EAAA,OAAM,uBAAsB;;EA8DP,OAAM;;;;cAhFxCC,EAoGM,OAAA;AAAA,IApGA,OAAKC,EAAA,CAAA,mBAAqBC,EAAA,SAAS,IAAU,gBAAgB,CAAA;AAAA;IAEjEC,EAA4BD,EAAA,QAAA,SAAA;AAAA,IACTA,EAAA,MAAM,eAAzBE,EAGcC,GAAA;AAAA;MAHmB,OAAM;AAAA;iBAErC,MAA2B;AAAA,QAA3BF,EAA2BD,EAAA,QAAA,QAAA;AAAA;;;IAE7BI,EAuEM,OAvENC,GAuEM;AAAA,OAtEJC,EAAA,EAAA,GAAAR,EAqEWS,GAAA,MAAAC,EArEuBR,EAAA,OAAK,CAArBS,GAAMC;QAEdD,EAAK,QAAI,CAAKA,EAAK,iBAD3BP,EAuBYS,GAAA;AAAA,UArBT,QAAQF,EAAK,MAAM,MAAMC,CAAK;AAAA,UAC9B,OAAKX,EAAA,CAAEC,EAAA,SAAK,yBAA6BA,EAAA,KAAK,IAEzC,sBAAsB,CAAA;AAAA,UAD3B,MAAMS,EAAK;AAAA,UAEZ,YAAA;AAAA,UACA,iBAAc;AAAA;qBAEd,MAaM;AAAA,YAbNL,EAaM,OAbNP,GAaM;AAAA,cAXQG,EAAA,cAAcA,EAAA,UAA1BC,EAEOD,0CAFP,MAEO;AAAA,gBADLY,EAA2BC,CAAA;AAAA,yBAG3BX,EAKaY,GAAA;AAAA;gBALD,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AAK,cAAcC,EAAK,CAAA,CAAA;AAAA;;;;;;IAMrDV,EAAA,qBAAhBF,EAUWS,GAAA,EAAA,KAAA,EAAA,GAAA;AAAA,MATGP,EAAA,yBAAZF,EAAsG,QAAtGoB,GAAsGC,EAA1BnB,EAAA,gBAAgB,GAAA,CAAA;MAEpFA,EAAA,MAAM,SAASA,EAAA,cADvBE,EAOEkB,GAAA;AAAA;QALC,OAAOpB,EAAA;AAAA,QACP,MAAMA,EAAA,SAAS;AAAA,QACf,OAAOA,YAAUA,EAAA,UAAU,UAAUA,EAAA,UAAU;AAAA,QAChD,OAAM;AAAA,QACL,SAAKqB,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAJ,MAAEjB,EAAA,KAAI,aAAciB,CAAM;AAAA;cAIvBjB,EAAA,mBADbE,EASEoB,GAAA;AAAA;MAPC,OAAOtB,EAAA;AAAA,MACP,0BAAwBA,EAAA,WAAW;AAAA,MACnC,MAAMA,EAAA,WAAW;AAAA,MACjB,aAAWA,EAAA,WAAW;AAAA,MACtB,OAAOA,EAAA,WAAW;AAAA,MAClB,gBAAcA,EAAA,WAAW;AAAA,MACzB,cAAaA,EAAA;AAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const n=require("vue"),s=require("../card-list/NeonCardList.vue.cjs.js"),c=require("../../presentation/header/NeonHeader.vue.cjs.js"),u=require("../../../model/common/color/NeonFunctionalColor.cjs.js"),
|
|
1
|
+
"use strict";const n=require("vue"),s=require("../card-list/NeonCardList.vue.cjs.js"),c=require("../../presentation/header/NeonHeader.vue.cjs.js"),u=require("../../../model/common/color/NeonFunctionalColor.cjs.js"),d=require("../../presentation/empty-state/NeonEmptyState.vue.cjs.js"),g=require("../../feedback/splash-loader/NeonSplashLoader.vue.cjs.js"),p=require("../../../model/layout/card-list/NeonCardListStyle.cjs.js"),y=n.defineComponent({name:"NeonListLayout",components:{NeonSplashLoader:g,NeonEmptyState:d,NeonCardList:s,NeonHeader:c},props:{title:{type:String,required:!0},subtitle:{type:String},breadcrumbs:{type:Array,default:()=>[]},backButton:{type:Boolean,default:!0},backLabel:{type:String,default:"Back"},items:{type:Array,required:!0},initializing:{type:Boolean},loading:{type:Boolean},color:{type:String,default:()=>u.NeonFunctionalColor.Brand},selectable:{type:Boolean,default:!1},listStyle:{type:String,default:()=>p.NeonCardListStyle.List},loadOnDemand:{type:Object},pagination:{type:Object}},emits:["page-change","show-more","toggle-selected"],setup(o,{emit:t,slots:a}){const r=()=>{t("show-more")},i=(e,l)=>{t("toggle-selected",e,l)};return n.watch(()=>o.initializing,async e=>{!e&&o.items.length>0&&window.scrollTo({top:0,left:0,behavior:"instant"})},{immediate:!0}),{emit:t,slots:a,showMore:r,toggleSelected:i,onPageChange:e=>{window.scrollTo({top:0,left:0,behavior:"instant"}),t("page-change",e)}}}});module.exports=y;
|
|
2
2
|
//# sourceMappingURL=NeonListLayout.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonListLayout.cjs.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, watch } from 'vue';\nimport type { NeonBreadcrumbLink } from '@/model/navigation/breadcrumbs/NeonBreadcrumbLink';\nimport NeonCardList from '@/components/layout/card-list/NeonCardList.vue';\nimport NeonHeader from '@/components/presentation/header/NeonHeader.vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport type { NeonLoadOnDemandModel } from '@/model/layout/card-list/NeonLoadOnDemandModel';\nimport type { NeonPaginationModel } from '@/model/navigation/pagination/NeonPaginationModel';\nimport type { NeonCardListModel } from '@/model/layout/card-list/NeonCardListModel';\nimport type { NeonIdentifiable } from '@/model/common/entity/NeonIdentifiable';\nimport type { NeonSelectable } from '@/model/common/entity/NeonSelectable';\nimport NeonEmptyState from '@/components/presentation/empty-state/NeonEmptyState.vue';\nimport NeonSplashLoader from '@/components/feedback/splash-loader/NeonSplashLoader.vue';\n\n/**\n * A page level layout component for displaying a list with a page header, filter bar, card list, pagination & an empty\n * state. Use this component directly inside the NeonPage <em>contents</em> slot.\n */\nexport default defineComponent({\n name: 'NeonListLayout',\n components: {\n NeonSplashLoader,\n NeonEmptyState,\n NeonCardList,\n NeonHeader,\n },\n props: {\n /**\n * The title of the header.\n */\n title: { type: String, required: true },\n /**\n * The subtitle of the header.\n */\n subtitle: { type: String },\n /**\n * Breadcrumbs to display above the header.\n */\n breadcrumbs: { type: Array as () => NeonBreadcrumbLink[], default: () => [] },\n /**\n * Whether to display a back button\n */\n backButton: { type: Boolean, default: true },\n /**\n * Override the label for the back button\n */\n backLabel: { type: String, default: 'Back' },\n /**\n * Items to display as cards. Each item should be a NeonCardListModel.\n */\n items: {\n type: Array as () => Array<NeonCardListModel<NeonIdentifiable | (NeonIdentifiable & NeonSelectable)>>,\n required: true,\n },\n /**\n * Loading state for the initial load.\n */\n initializing: { type: Boolean },\n /**\n * Loading state for pagination, set when loading a new page.\n */\n loading: { type: Boolean },\n /**\n * Specify a selection/loading/hover color for the cards.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Brand },\n /**\n * Make cards selectable.\n */\n selectable: { type: Boolean, default: false },\n /**\n * Model for configuring the on demand loading layout.\n */\n loadOnDemand: { type: Object as () => NeonLoadOnDemandModel },\n /**\n * Model for configuring pagination, either pagination or loadOnDemand should be provided.\n */\n pagination: { type: Object as () => NeonPaginationModel },\n },\n emits: [\n /**\n * Emitted when the user clicks on a pagination link (useful for paginated lists which are not the main focus of the page,\n * i.e. should not be deep linked).\n *\n * @type {number} The new page number.\n */\n 'page-change',\n /**\n * Emitted when the '
|
|
1
|
+
{"version":3,"file":"NeonListLayout.cjs.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, watch } from 'vue';\nimport type { NeonBreadcrumbLink } from '@/model/navigation/breadcrumbs/NeonBreadcrumbLink';\nimport NeonCardList from '@/components/layout/card-list/NeonCardList.vue';\nimport NeonHeader from '@/components/presentation/header/NeonHeader.vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport type { NeonLoadOnDemandModel } from '@/model/layout/card-list/NeonLoadOnDemandModel';\nimport type { NeonPaginationModel } from '@/model/navigation/pagination/NeonPaginationModel';\nimport type { NeonCardListModel } from '@/model/layout/card-list/NeonCardListModel';\nimport type { NeonIdentifiable } from '@/model/common/entity/NeonIdentifiable';\nimport type { NeonSelectable } from '@/model/common/entity/NeonSelectable';\nimport NeonEmptyState from '@/components/presentation/empty-state/NeonEmptyState.vue';\nimport NeonSplashLoader from '@/components/feedback/splash-loader/NeonSplashLoader.vue';\nimport { NeonCardListStyle } from '@/model/layout/card-list/NeonCardListStyle';\n\n/**\n * A page level layout component for displaying a list with a page header, filter bar, card list, pagination & an empty\n * state. Use this component directly inside the NeonPage <em>contents</em> slot.\n */\nexport default defineComponent({\n name: 'NeonListLayout',\n components: {\n NeonSplashLoader,\n NeonEmptyState,\n NeonCardList,\n NeonHeader,\n },\n props: {\n /**\n * The title of the header.\n */\n title: { type: String, required: true },\n /**\n * The subtitle of the header.\n */\n subtitle: { type: String },\n /**\n * Breadcrumbs to display above the header.\n */\n breadcrumbs: { type: Array as () => NeonBreadcrumbLink[], default: () => [] },\n /**\n * Whether to display a back button\n */\n backButton: { type: Boolean, default: true },\n /**\n * Override the label for the back button\n */\n backLabel: { type: String, default: 'Back' },\n /**\n * Items to display as cards. Each item should be a NeonCardListModel.\n */\n items: {\n type: Array as () => Array<NeonCardListModel<NeonIdentifiable | (NeonIdentifiable & NeonSelectable)>>,\n required: true,\n },\n /**\n * Loading state for the initial load.\n */\n initializing: { type: Boolean },\n /**\n * Loading state for pagination, set when loading a new page.\n */\n loading: { type: Boolean },\n /**\n * Specify a selection/loading/hover color for the cards.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Brand },\n /**\n * Make cards selectable.\n */\n selectable: { type: Boolean, default: false },\n /**\n * Specify the card list layout, either a 'List' of cards with 100% width or a responsive 'Grid' of cards.\n */\n listStyle: { type: String as () => NeonCardListStyle, default: () => NeonCardListStyle.List },\n /**\n * Model for configuring the on demand loading layout.\n */\n loadOnDemand: { type: Object as () => NeonLoadOnDemandModel },\n /**\n * Model for configuring pagination, either pagination or loadOnDemand should be provided.\n */\n pagination: { type: Object as () => NeonPaginationModel },\n },\n emits: [\n /**\n * Emitted when the user clicks on a pagination link (useful for paginated lists which are not the main focus of the page,\n * i.e. should not be deep linked).\n *\n * @type {number} The new page number.\n */\n 'page-change',\n /**\n * Emitted when the 'Load more' button is clicked in \"on demand\" mode.\n * @type {void}\n */\n 'show-more',\n /**\n * Emitted when in selectable mode and the selected state of a card is toggled.\n * @type {string, boolean} - the id of the card which is toggled & the new selected state.\n */\n 'toggle-selected',\n ],\n setup(props, { emit, slots }) {\n const showMore = () => {\n emit('show-more');\n };\n\n const toggleSelected = (id: string, selected: boolean) => {\n emit('toggle-selected', id, selected);\n };\n\n watch(\n () => props.initializing,\n async (newValue) => {\n if (!newValue && props.items.length > 0) {\n window.scrollTo({ top: 0, left: 0, behavior: 'instant' as ScrollBehavior });\n }\n },\n { immediate: true },\n );\n\n const onPageChange = (newPage: number) => {\n window.scrollTo({ top: 0, left: 0, behavior: 'instant' as ScrollBehavior });\n emit('page-change', newPage);\n };\n\n return {\n emit,\n slots,\n showMore,\n toggleSelected,\n onPageChange,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonSplashLoader","NeonEmptyState","NeonCardList","NeonHeader","NeonFunctionalColor","NeonCardListStyle","props","emit","slots","showMore","toggleSelected","id","selected","watch","newValue","newPage"],"mappings":"yaAkBAA,EAAeC,kBAAgB,CAC7B,KAAM,iBACN,WAAY,CACV,iBAAAC,EACA,eAAAC,EACA,aAAAC,EACA,WAAAC,CAAA,EAEF,MAAO,CAIL,MAAO,CAAE,KAAM,OAAQ,SAAU,EAAA,EAIjC,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|
|
3
|
-
import
|
|
4
|
-
import { NeonFunctionalColor as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
3
|
+
import d from "../../presentation/header/NeonHeader.vue.es.js";
|
|
4
|
+
import { NeonFunctionalColor as m } from "../../../model/common/color/NeonFunctionalColor.es.js";
|
|
5
|
+
import c from "../../presentation/empty-state/NeonEmptyState.vue.es.js";
|
|
6
|
+
import g from "../../feedback/splash-loader/NeonSplashLoader.vue.es.js";
|
|
7
|
+
import { NeonCardListStyle as f } from "../../../model/layout/card-list/NeonCardListStyle.es.js";
|
|
8
|
+
const N = l({
|
|
8
9
|
name: "NeonListLayout",
|
|
9
10
|
components: {
|
|
10
|
-
NeonSplashLoader:
|
|
11
|
-
NeonEmptyState:
|
|
11
|
+
NeonSplashLoader: g,
|
|
12
|
+
NeonEmptyState: c,
|
|
12
13
|
NeonCardList: s,
|
|
13
|
-
NeonHeader:
|
|
14
|
+
NeonHeader: d
|
|
14
15
|
},
|
|
15
16
|
props: {
|
|
16
17
|
/**
|
|
@@ -51,11 +52,15 @@ const S = l({
|
|
|
51
52
|
/**
|
|
52
53
|
* Specify a selection/loading/hover color for the cards.
|
|
53
54
|
*/
|
|
54
|
-
color: { type: String, default: () =>
|
|
55
|
+
color: { type: String, default: () => m.Brand },
|
|
55
56
|
/**
|
|
56
57
|
* Make cards selectable.
|
|
57
58
|
*/
|
|
58
59
|
selectable: { type: Boolean, default: !1 },
|
|
60
|
+
/**
|
|
61
|
+
* Specify the card list layout, either a 'List' of cards with 100% width or a responsive 'Grid' of cards.
|
|
62
|
+
*/
|
|
63
|
+
listStyle: { type: String, default: () => f.List },
|
|
59
64
|
/**
|
|
60
65
|
* Model for configuring the on demand loading layout.
|
|
61
66
|
*/
|
|
@@ -74,7 +79,7 @@ const S = l({
|
|
|
74
79
|
*/
|
|
75
80
|
"page-change",
|
|
76
81
|
/**
|
|
77
|
-
* Emitted when the '
|
|
82
|
+
* Emitted when the 'Load more' button is clicked in "on demand" mode.
|
|
78
83
|
* @type {void}
|
|
79
84
|
*/
|
|
80
85
|
"show-more",
|
|
@@ -108,6 +113,6 @@ const S = l({
|
|
|
108
113
|
}
|
|
109
114
|
});
|
|
110
115
|
export {
|
|
111
|
-
|
|
116
|
+
N as default
|
|
112
117
|
};
|
|
113
118
|
//# sourceMappingURL=NeonListLayout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonListLayout.es.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, watch } from 'vue';\nimport type { NeonBreadcrumbLink } from '@/model/navigation/breadcrumbs/NeonBreadcrumbLink';\nimport NeonCardList from '@/components/layout/card-list/NeonCardList.vue';\nimport NeonHeader from '@/components/presentation/header/NeonHeader.vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport type { NeonLoadOnDemandModel } from '@/model/layout/card-list/NeonLoadOnDemandModel';\nimport type { NeonPaginationModel } from '@/model/navigation/pagination/NeonPaginationModel';\nimport type { NeonCardListModel } from '@/model/layout/card-list/NeonCardListModel';\nimport type { NeonIdentifiable } from '@/model/common/entity/NeonIdentifiable';\nimport type { NeonSelectable } from '@/model/common/entity/NeonSelectable';\nimport NeonEmptyState from '@/components/presentation/empty-state/NeonEmptyState.vue';\nimport NeonSplashLoader from '@/components/feedback/splash-loader/NeonSplashLoader.vue';\n\n/**\n * A page level layout component for displaying a list with a page header, filter bar, card list, pagination & an empty\n * state. Use this component directly inside the NeonPage <em>contents</em> slot.\n */\nexport default defineComponent({\n name: 'NeonListLayout',\n components: {\n NeonSplashLoader,\n NeonEmptyState,\n NeonCardList,\n NeonHeader,\n },\n props: {\n /**\n * The title of the header.\n */\n title: { type: String, required: true },\n /**\n * The subtitle of the header.\n */\n subtitle: { type: String },\n /**\n * Breadcrumbs to display above the header.\n */\n breadcrumbs: { type: Array as () => NeonBreadcrumbLink[], default: () => [] },\n /**\n * Whether to display a back button\n */\n backButton: { type: Boolean, default: true },\n /**\n * Override the label for the back button\n */\n backLabel: { type: String, default: 'Back' },\n /**\n * Items to display as cards. Each item should be a NeonCardListModel.\n */\n items: {\n type: Array as () => Array<NeonCardListModel<NeonIdentifiable | (NeonIdentifiable & NeonSelectable)>>,\n required: true,\n },\n /**\n * Loading state for the initial load.\n */\n initializing: { type: Boolean },\n /**\n * Loading state for pagination, set when loading a new page.\n */\n loading: { type: Boolean },\n /**\n * Specify a selection/loading/hover color for the cards.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Brand },\n /**\n * Make cards selectable.\n */\n selectable: { type: Boolean, default: false },\n /**\n * Model for configuring the on demand loading layout.\n */\n loadOnDemand: { type: Object as () => NeonLoadOnDemandModel },\n /**\n * Model for configuring pagination, either pagination or loadOnDemand should be provided.\n */\n pagination: { type: Object as () => NeonPaginationModel },\n },\n emits: [\n /**\n * Emitted when the user clicks on a pagination link (useful for paginated lists which are not the main focus of the page,\n * i.e. should not be deep linked).\n *\n * @type {number} The new page number.\n */\n 'page-change',\n /**\n * Emitted when the '
|
|
1
|
+
{"version":3,"file":"NeonListLayout.es.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, watch } from 'vue';\nimport type { NeonBreadcrumbLink } from '@/model/navigation/breadcrumbs/NeonBreadcrumbLink';\nimport NeonCardList from '@/components/layout/card-list/NeonCardList.vue';\nimport NeonHeader from '@/components/presentation/header/NeonHeader.vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport type { NeonLoadOnDemandModel } from '@/model/layout/card-list/NeonLoadOnDemandModel';\nimport type { NeonPaginationModel } from '@/model/navigation/pagination/NeonPaginationModel';\nimport type { NeonCardListModel } from '@/model/layout/card-list/NeonCardListModel';\nimport type { NeonIdentifiable } from '@/model/common/entity/NeonIdentifiable';\nimport type { NeonSelectable } from '@/model/common/entity/NeonSelectable';\nimport NeonEmptyState from '@/components/presentation/empty-state/NeonEmptyState.vue';\nimport NeonSplashLoader from '@/components/feedback/splash-loader/NeonSplashLoader.vue';\nimport { NeonCardListStyle } from '@/model/layout/card-list/NeonCardListStyle';\n\n/**\n * A page level layout component for displaying a list with a page header, filter bar, card list, pagination & an empty\n * state. Use this component directly inside the NeonPage <em>contents</em> slot.\n */\nexport default defineComponent({\n name: 'NeonListLayout',\n components: {\n NeonSplashLoader,\n NeonEmptyState,\n NeonCardList,\n NeonHeader,\n },\n props: {\n /**\n * The title of the header.\n */\n title: { type: String, required: true },\n /**\n * The subtitle of the header.\n */\n subtitle: { type: String },\n /**\n * Breadcrumbs to display above the header.\n */\n breadcrumbs: { type: Array as () => NeonBreadcrumbLink[], default: () => [] },\n /**\n * Whether to display a back button\n */\n backButton: { type: Boolean, default: true },\n /**\n * Override the label for the back button\n */\n backLabel: { type: String, default: 'Back' },\n /**\n * Items to display as cards. Each item should be a NeonCardListModel.\n */\n items: {\n type: Array as () => Array<NeonCardListModel<NeonIdentifiable | (NeonIdentifiable & NeonSelectable)>>,\n required: true,\n },\n /**\n * Loading state for the initial load.\n */\n initializing: { type: Boolean },\n /**\n * Loading state for pagination, set when loading a new page.\n */\n loading: { type: Boolean },\n /**\n * Specify a selection/loading/hover color for the cards.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.Brand },\n /**\n * Make cards selectable.\n */\n selectable: { type: Boolean, default: false },\n /**\n * Specify the card list layout, either a 'List' of cards with 100% width or a responsive 'Grid' of cards.\n */\n listStyle: { type: String as () => NeonCardListStyle, default: () => NeonCardListStyle.List },\n /**\n * Model for configuring the on demand loading layout.\n */\n loadOnDemand: { type: Object as () => NeonLoadOnDemandModel },\n /**\n * Model for configuring pagination, either pagination or loadOnDemand should be provided.\n */\n pagination: { type: Object as () => NeonPaginationModel },\n },\n emits: [\n /**\n * Emitted when the user clicks on a pagination link (useful for paginated lists which are not the main focus of the page,\n * i.e. should not be deep linked).\n *\n * @type {number} The new page number.\n */\n 'page-change',\n /**\n * Emitted when the 'Load more' button is clicked in \"on demand\" mode.\n * @type {void}\n */\n 'show-more',\n /**\n * Emitted when in selectable mode and the selected state of a card is toggled.\n * @type {string, boolean} - the id of the card which is toggled & the new selected state.\n */\n 'toggle-selected',\n ],\n setup(props, { emit, slots }) {\n const showMore = () => {\n emit('show-more');\n };\n\n const toggleSelected = (id: string, selected: boolean) => {\n emit('toggle-selected', id, selected);\n };\n\n watch(\n () => props.initializing,\n async (newValue) => {\n if (!newValue && props.items.length > 0) {\n window.scrollTo({ top: 0, left: 0, behavior: 'instant' as ScrollBehavior });\n }\n },\n { immediate: true },\n );\n\n const onPageChange = (newPage: number) => {\n window.scrollTo({ top: 0, left: 0, behavior: 'instant' as ScrollBehavior });\n emit('page-change', newPage);\n };\n\n return {\n emit,\n slots,\n showMore,\n toggleSelected,\n onPageChange,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonSplashLoader","NeonEmptyState","NeonCardList","NeonHeader","NeonFunctionalColor","NeonCardListStyle","props","emit","slots","showMore","toggleSelected","id","selected","watch","newValue","newPage"],"mappings":";;;;;;;AAkBA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,kBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO,EAAE,MAAM,QAAQ,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAIjC,UAAU,EAAE,MAAM,OAAA;AAAA;AAAA;AAAA;AAAA,IAIlB,aAAa,EAAE,MAAM,OAAqC,SAAS,MAAM,CAAA,EAAC;AAAA;AAAA;AAAA;AAAA,IAI1E,YAAY,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAItC,WAAW,EAAE,MAAM,QAAQ,SAAS,OAAA;AAAA;AAAA;AA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xC,eAAO,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,WAA6B,GAC1ER,EAAK,eAAeQ,CAAO;AAAA,MAC7B;AAAA,IAOE;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("./NeonListLayout.cjs.js"),o=require("vue"),d=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),p={class:"neon-list-layout"},c={key:1};function m(e,
|
|
1
|
+
"use strict";const i=require("./NeonListLayout.cjs.js"),o=require("vue"),d=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),p={class:"neon-list-layout"},c={key:1};function m(e,n,b,g,h,k){const l=o.resolveComponent("neon-splash-loader"),s=o.resolveComponent("neon-header"),r=o.resolveComponent("neon-card-list");return o.openBlock(),o.createElementBlock("div",p,[e.initializing?(o.openBlock(),o.createBlock(l,{key:0,color:"brand"})):!e.initializing&&e.items.length>0?(o.openBlock(),o.createElementBlock("div",c,[o.createVNode(s,{"back-button":e.backButton,"back-label":e.backLabel,breadcrumbs:e.breadcrumbs,subtitle:e.subtitle,title:e.title},o.createSlots({labels:o.withCtx(()=>[o.renderSlot(e.$slots,"labels")]),_:2},[e.items.length>0?{name:"actions",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"actions")]),key:"0"}:void 0]),1032,["back-button","back-label","breadcrumbs","subtitle","title"]),o.renderSlot(e.$slots,"note"),o.createVNode(r,{color:e.color,items:e.items,"list-style":e.listStyle,"load-on-demand":e.loadOnDemand,loading:e.loading,pagination:e.pagination,selectable:e.selectable,onPageChange:n[0]||(n[0]=t=>e.emit("page-change",t)),onShowMore:e.showMore,onToggleSelected:e.toggleSelected},{filters:o.withCtx(()=>[o.renderSlot(e.$slots,"filters")]),header:o.withCtx(()=>[o.renderSlot(e.$slots,"header")]),card:o.withCtx(({model:t,index:a})=>[o.renderSlot(e.$slots,"card",o.normalizeProps(o.guardReactiveProps({model:t,index:a})))]),_:3},8,["color","items","list-style","load-on-demand","loading","pagination","selectable","onShowMore","onToggleSelected"])])):!e.initializing&&!e.loading&&e.slots.emptyState&&e.items.length===0?o.renderSlot(e.$slots,"emptyState",{key:2}):o.createCommentVNode("",!0)])}const u=d(i,[["render",m]]);module.exports=u;
|
|
2
2
|
//# sourceMappingURL=NeonListLayout.vue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonListLayout.vue.cjs.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.vue"],"sourcesContent":["<template>\n <div class=\"neon-list-layout\">\n <neon-splash-loader v-if=\"initializing\" color=\"brand\" />\n <div v-else-if=\"!initializing && items.length > 0\">\n <neon-header\n :back-button=\"backButton\"\n :back-label=\"backLabel\"\n :breadcrumbs=\"breadcrumbs\"\n :subtitle=\"subtitle\"\n :title=\"title\"\n >\n <template #labels>\n <!-- @slot a slot for adding labels/info popovers next to the title -->\n <slot name=\"labels\"></slot>\n </template>\n <template v-if=\"items.length > 0\" #actions>\n <!-- @slot a slot for adding contextual action buttons to the header. The wrapper is provided, just add the\n buttons here in order to apply the correct spacings -->\n <slot name=\"actions\"></slot>\n </template>\n </neon-header>\n <!-- @slot the insert a note into the page -->\n <slot name=\"note\"></slot>\n <neon-card-list\n :color=\"color\"\n :items=\"items\"\n :load-on-demand=\"loadOnDemand\"\n :loading=\"loading\"\n :pagination=\"pagination\"\n :selectable=\"selectable\"\n @page-change=\"(page: number) => emit('page-change', page)\"\n @show-more=\"showMore\"\n @toggle-selected=\"toggleSelected\"\n >\n <template #filters>\n <!-- @slot the insert a filter bar above the list -->\n <slot name=\"filters\"></slot>\n </template>\n <template #header>\n <!-- @slot the list header -->\n <slot name=\"header\"></slot>\n </template>\n <template #card=\"{ model, index }\">\n <!-- @slot slot for rendering card contents, two parameters are available:\n @binding {T} model - the model item to be rendered\n @binding {number} index - the index of the item in the list -->\n <slot name=\"card\" v-bind=\"{ model, index }\"></slot>\n </template>\n </neon-card-list>\n </div>\n <template v-else-if=\"!initializing && !loading && slots.emptyState && items.length === 0\">\n <!-- @slot page empty state rendered when there are no list items -->\n <slot name=\"emptyState\"></slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonListLayout.ts\" />\n"],"names":["_hoisted_1","_openBlock","_createElementBlock","_ctx","_createBlock","_component_neon_splash_loader","_hoisted_2","_createVNode","_component_neon_header","_renderSlot","_component_neon_card_list","_cache","page","_withCtx","model","index","_normalizeProps","_guardReactiveProps"],"mappings":"yIACOA,EAAA,CAAA,MAAM,kBAAkB,gKAA7B,OAAAC,YAAA,EAAAC,
|
|
1
|
+
{"version":3,"file":"NeonListLayout.vue.cjs.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.vue"],"sourcesContent":["<template>\n <div class=\"neon-list-layout\">\n <neon-splash-loader v-if=\"initializing\" color=\"brand\" />\n <div v-else-if=\"!initializing && items.length > 0\">\n <neon-header\n :back-button=\"backButton\"\n :back-label=\"backLabel\"\n :breadcrumbs=\"breadcrumbs\"\n :subtitle=\"subtitle\"\n :title=\"title\"\n >\n <template #labels>\n <!-- @slot a slot for adding labels/info popovers next to the title -->\n <slot name=\"labels\"></slot>\n </template>\n <template v-if=\"items.length > 0\" #actions>\n <!-- @slot a slot for adding contextual action buttons to the header. The wrapper is provided, just add the\n buttons here in order to apply the correct spacings -->\n <slot name=\"actions\"></slot>\n </template>\n </neon-header>\n <!-- @slot the insert a note into the page -->\n <slot name=\"note\"></slot>\n <neon-card-list\n :color=\"color\"\n :items=\"items\"\n :list-style=\"listStyle\"\n :load-on-demand=\"loadOnDemand\"\n :loading=\"loading\"\n :pagination=\"pagination\"\n :selectable=\"selectable\"\n @page-change=\"(page: number) => emit('page-change', page)\"\n @show-more=\"showMore\"\n @toggle-selected=\"toggleSelected\"\n >\n <template #filters>\n <!-- @slot the insert a filter bar above the list -->\n <slot name=\"filters\"></slot>\n </template>\n <template #header>\n <!-- @slot the list header -->\n <slot name=\"header\"></slot>\n </template>\n <template #card=\"{ model, index }\">\n <!-- @slot slot for rendering card contents, two parameters are available:\n @binding {T} model - the model item to be rendered\n @binding {number} index - the index of the item in the list -->\n <slot name=\"card\" v-bind=\"{ model, index }\"></slot>\n </template>\n </neon-card-list>\n </div>\n <template v-else-if=\"!initializing && !loading && slots.emptyState && items.length === 0\">\n <!-- @slot page empty state rendered when there are no list items -->\n <slot name=\"emptyState\"></slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonListLayout.ts\" />\n"],"names":["_hoisted_1","_openBlock","_createElementBlock","_ctx","_createBlock","_component_neon_splash_loader","_hoisted_2","_createVNode","_component_neon_header","_renderSlot","_component_neon_card_list","_cache","page","_withCtx","model","index","_normalizeProps","_guardReactiveProps"],"mappings":"yIACOA,EAAA,CAAA,MAAM,kBAAkB,gKAA7B,OAAAC,YAAA,EAAAC,qBAsDM,MAtDNF,EAsDM,CArDsBG,EAAA,4BAA1BC,EAAAA,YAAwDC,EAAA,OAAhB,MAAM,YAC7BF,EAAA,cAAgBA,EAAA,MAAM,OAAM,iBAA7CD,EAAAA,mBA+CM,MAAAI,EAAA,CA9CJC,EAAAA,YAgBcC,EAAA,CAfX,cAAaL,EAAA,WACb,aAAYA,EAAA,UACZ,YAAaA,EAAA,YACb,SAAUA,EAAA,SACV,MAAOA,EAAA,sBAEG,iBAET,IAA2B,CAA3BM,aAA2BN,EAAA,OAAA,QAAA,UAEbA,EAAA,MAAM,OAAM,QAAO,uBAGjC,IAA4B,CAA5BM,aAA4BN,EAAA,OAAA,SAAA,0FAIhCM,aAAyBN,EAAA,OAAA,MAAA,EACzBI,EAAAA,YA0BiBG,EAAA,CAzBd,MAAOP,EAAA,MACP,MAAOA,EAAA,MACP,aAAYA,EAAA,UACZ,iBAAgBA,EAAA,aAChB,QAASA,EAAA,QACT,WAAYA,EAAA,WACZ,WAAYA,EAAA,WACZ,aAAWQ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAGC,GAAiBT,EAAA,mBAAoBS,CAAI,GACvD,WAAWT,EAAA,SACX,iBAAiBA,EAAA,iBAEP,kBAET,IAA4B,CAA5BM,aAA4BN,EAAA,OAAA,SAAA,IAEnB,iBAET,IAA2B,CAA3BM,aAA2BN,EAAA,OAAA,QAAA,IAElB,KAAIU,EAAAA,QAIb,CAAmD,CAJlC,MAAAC,EAAO,MAAAC,CAAK,IAAA,CAI7BN,aAAmDN,EAAA,OAAA,OAAAa,EAAAA,eAAAC,EAAAA,mBAAA,CAAvB,MAAAH,EAAO,MAAAC,CAAK,CAAA,CAAA,CAAA,oIAIxBZ,EAAA,cAAY,CAAKA,WAAWA,EAAA,MAAM,YAAcA,EAAA,MAAM,SAAM,EAEhFM,EAAAA,WAA+BN,EAAA,OAAA,aAAA,CAAA,IAAA,CAAA,CAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import p from "./NeonListLayout.es.js";
|
|
2
|
-
import { resolveComponent as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
2
|
+
import { resolveComponent as l, openBlock as a, createElementBlock as i, createBlock as c, createVNode as r, createSlots as u, withCtx as n, renderSlot as o, normalizeProps as h, guardReactiveProps as k, createCommentVNode as f } from "vue";
|
|
3
|
+
import y from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
+
const $ = { class: "neon-list-layout" }, S = { key: 1 };
|
|
5
5
|
function v(e, s, w, z, B, C) {
|
|
6
|
-
const d =
|
|
7
|
-
return
|
|
8
|
-
e.initializing ? (
|
|
6
|
+
const d = l("neon-splash-loader"), m = l("neon-header"), b = l("neon-card-list");
|
|
7
|
+
return a(), i("div", $, [
|
|
8
|
+
e.initializing ? (a(), c(d, {
|
|
9
9
|
key: 0,
|
|
10
10
|
color: "brand"
|
|
11
|
-
})) : !e.initializing && e.items.length > 0 ? (
|
|
11
|
+
})) : !e.initializing && e.items.length > 0 ? (a(), i("div", S, [
|
|
12
12
|
r(m, {
|
|
13
13
|
"back-button": e.backButton,
|
|
14
14
|
"back-label": e.backLabel,
|
|
@@ -33,6 +33,7 @@ function v(e, s, w, z, B, C) {
|
|
|
33
33
|
r(b, {
|
|
34
34
|
color: e.color,
|
|
35
35
|
items: e.items,
|
|
36
|
+
"list-style": e.listStyle,
|
|
36
37
|
"load-on-demand": e.loadOnDemand,
|
|
37
38
|
loading: e.loading,
|
|
38
39
|
pagination: e.pagination,
|
|
@@ -51,11 +52,11 @@ function v(e, s, w, z, B, C) {
|
|
|
51
52
|
o(e.$slots, "card", h(k({ model: t, index: g })))
|
|
52
53
|
]),
|
|
53
54
|
_: 3
|
|
54
|
-
}, 8, ["color", "items", "load-on-demand", "loading", "pagination", "selectable", "onShowMore", "onToggleSelected"])
|
|
55
|
+
}, 8, ["color", "items", "list-style", "load-on-demand", "loading", "pagination", "selectable", "onShowMore", "onToggleSelected"])
|
|
55
56
|
])) : !e.initializing && !e.loading && e.slots.emptyState && e.items.length === 0 ? o(e.$slots, "emptyState", { key: 2 }) : f("", !0)
|
|
56
57
|
]);
|
|
57
58
|
}
|
|
58
|
-
const P = /* @__PURE__ */
|
|
59
|
+
const P = /* @__PURE__ */ y(p, [["render", v]]);
|
|
59
60
|
export {
|
|
60
61
|
P as default
|
|
61
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonListLayout.vue.es.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.vue"],"sourcesContent":["<template>\n <div class=\"neon-list-layout\">\n <neon-splash-loader v-if=\"initializing\" color=\"brand\" />\n <div v-else-if=\"!initializing && items.length > 0\">\n <neon-header\n :back-button=\"backButton\"\n :back-label=\"backLabel\"\n :breadcrumbs=\"breadcrumbs\"\n :subtitle=\"subtitle\"\n :title=\"title\"\n >\n <template #labels>\n <!-- @slot a slot for adding labels/info popovers next to the title -->\n <slot name=\"labels\"></slot>\n </template>\n <template v-if=\"items.length > 0\" #actions>\n <!-- @slot a slot for adding contextual action buttons to the header. The wrapper is provided, just add the\n buttons here in order to apply the correct spacings -->\n <slot name=\"actions\"></slot>\n </template>\n </neon-header>\n <!-- @slot the insert a note into the page -->\n <slot name=\"note\"></slot>\n <neon-card-list\n :color=\"color\"\n :items=\"items\"\n :load-on-demand=\"loadOnDemand\"\n :loading=\"loading\"\n :pagination=\"pagination\"\n :selectable=\"selectable\"\n @page-change=\"(page: number) => emit('page-change', page)\"\n @show-more=\"showMore\"\n @toggle-selected=\"toggleSelected\"\n >\n <template #filters>\n <!-- @slot the insert a filter bar above the list -->\n <slot name=\"filters\"></slot>\n </template>\n <template #header>\n <!-- @slot the list header -->\n <slot name=\"header\"></slot>\n </template>\n <template #card=\"{ model, index }\">\n <!-- @slot slot for rendering card contents, two parameters are available:\n @binding {T} model - the model item to be rendered\n @binding {number} index - the index of the item in the list -->\n <slot name=\"card\" v-bind=\"{ model, index }\"></slot>\n </template>\n </neon-card-list>\n </div>\n <template v-else-if=\"!initializing && !loading && slots.emptyState && items.length === 0\">\n <!-- @slot page empty state rendered when there are no list items -->\n <slot name=\"emptyState\"></slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonListLayout.ts\" />\n"],"names":["_hoisted_1","_openBlock","_createElementBlock","_ctx","_createBlock","_component_neon_splash_loader","_hoisted_2","_createVNode","_component_neon_header","_renderSlot","_component_neon_card_list","_cache","page","_withCtx","model","index","_normalizeProps","_guardReactiveProps"],"mappings":";;;AACO,MAAAA,IAAA,EAAA,OAAM,mBAAkB;;;AAA7B,SAAAC,EAAA,GAAAC,
|
|
1
|
+
{"version":3,"file":"NeonListLayout.vue.es.js","sources":["../../../../src/components/layout/list-layout/NeonListLayout.vue"],"sourcesContent":["<template>\n <div class=\"neon-list-layout\">\n <neon-splash-loader v-if=\"initializing\" color=\"brand\" />\n <div v-else-if=\"!initializing && items.length > 0\">\n <neon-header\n :back-button=\"backButton\"\n :back-label=\"backLabel\"\n :breadcrumbs=\"breadcrumbs\"\n :subtitle=\"subtitle\"\n :title=\"title\"\n >\n <template #labels>\n <!-- @slot a slot for adding labels/info popovers next to the title -->\n <slot name=\"labels\"></slot>\n </template>\n <template v-if=\"items.length > 0\" #actions>\n <!-- @slot a slot for adding contextual action buttons to the header. The wrapper is provided, just add the\n buttons here in order to apply the correct spacings -->\n <slot name=\"actions\"></slot>\n </template>\n </neon-header>\n <!-- @slot the insert a note into the page -->\n <slot name=\"note\"></slot>\n <neon-card-list\n :color=\"color\"\n :items=\"items\"\n :list-style=\"listStyle\"\n :load-on-demand=\"loadOnDemand\"\n :loading=\"loading\"\n :pagination=\"pagination\"\n :selectable=\"selectable\"\n @page-change=\"(page: number) => emit('page-change', page)\"\n @show-more=\"showMore\"\n @toggle-selected=\"toggleSelected\"\n >\n <template #filters>\n <!-- @slot the insert a filter bar above the list -->\n <slot name=\"filters\"></slot>\n </template>\n <template #header>\n <!-- @slot the list header -->\n <slot name=\"header\"></slot>\n </template>\n <template #card=\"{ model, index }\">\n <!-- @slot slot for rendering card contents, two parameters are available:\n @binding {T} model - the model item to be rendered\n @binding {number} index - the index of the item in the list -->\n <slot name=\"card\" v-bind=\"{ model, index }\"></slot>\n </template>\n </neon-card-list>\n </div>\n <template v-else-if=\"!initializing && !loading && slots.emptyState && items.length === 0\">\n <!-- @slot page empty state rendered when there are no list items -->\n <slot name=\"emptyState\"></slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" src=\"./NeonListLayout.ts\" />\n"],"names":["_hoisted_1","_openBlock","_createElementBlock","_ctx","_createBlock","_component_neon_splash_loader","_hoisted_2","_createVNode","_component_neon_header","_renderSlot","_component_neon_card_list","_cache","page","_withCtx","model","index","_normalizeProps","_guardReactiveProps"],"mappings":";;;AACO,MAAAA,IAAA,EAAA,OAAM,mBAAkB;;;AAA7B,SAAAC,EAAA,GAAAC,EAsDM,OAtDNF,GAsDM;AAAA,IArDsBG,EAAA,qBAA1BC,EAAwDC,GAAA;AAAA;MAAhB,OAAM;AAAA,WAC7BF,EAAA,gBAAgBA,EAAA,MAAM,SAAM,UAA7CD,EA+CM,OAAAI,GAAA;AAAA,MA9CJC,EAgBcC,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alColor.cjs.js"),u=require("../../../model/presentation/badge/NeonBadgeSize.cjs.js"),s=require("../badge/NeonBadge.vue.cjs.js"),d=t.defineComponent({name:"NeonAvatar",components:{NeonBadge:s},props:{imageUrl:{type:String,default:void 0},name:{type:String,default:void 0},size:{type:String,default:u.NeonBadgeSize.Small},circular:{type:Boolean,default:!0},color:{type:String,default:void 0}},setup(e){const r=[o.NeonFunctionalColor.Brand,o.NeonFunctionalColor.Accent,o.NeonFunctionalColor.Primary,o.NeonFunctionalColor.Info,o.NeonFunctionalColor.Success,o.NeonFunctionalColor.Warn,o.NeonFunctionalColor.Error,o.NeonFunctionalColor.LowContrast,o.NeonFunctionalColor.HighContrast],l=t.computed(()=>{if(e.name){const n=e.name.split(" ");return n.length===1?e.name.substring(0,2):`${n[0][0]}${n.length>1?n[1][0]:""}`}return""}),i=t.computed(()=>{if(!e.name)return r[0];let n=0;for(let a=0;a<e.name.length;a++)n=e.name.charCodeAt(a)+((n<<5)-n);return r[Math.abs(n)%r.length]}),c=t.computed(()=>e.color||i.value);return{initials:l,avatarColor:c}}});module.exports=d;
|
|
2
|
+
//# sourceMappingURL=NeonAvatar.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonAvatar.cjs.js","sources":["../../../../src/components/presentation/avatar/NeonAvatar.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent } from 'vue';\nimport { NeonBadge } from '@/neon';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport { NeonBadgeSize } from '@/model/presentation/badge/NeonBadgeSize';\n\n/**\n * An avatar component that displays either an image or initials in a circular badge.\n * When displaying initials, it generates a consistent color based on the provided name.\n */\nexport default defineComponent({\n name: 'NeonAvatar',\n components: {\n NeonBadge,\n },\n props: {\n /**\n * The URL of the avatar image to display\n */\n imageUrl: { type: String, default: undefined },\n /**\n * The name to generate initials from (takes first letter of first name and first letter of last name)\n */\n name: { type: String, default: undefined },\n /**\n * The size of the avatar\n */\n size: { type: String as () => NeonBadgeSize, default: NeonBadgeSize.Small },\n /**\n * If true, render the avatar as a circle, if false render as square\n */\n circular: { type: Boolean, default: true },\n /**\n * The color of the avatar\n */\n color: { type: String as () => NeonFunctionalColor, default: undefined },\n },\n setup(props) {\n const colors = [\n NeonFunctionalColor.Brand,\n NeonFunctionalColor.Accent,\n NeonFunctionalColor.Primary,\n NeonFunctionalColor.Info,\n NeonFunctionalColor.Success,\n NeonFunctionalColor.Warn,\n NeonFunctionalColor.Error,\n NeonFunctionalColor.LowContrast,\n NeonFunctionalColor.HighContrast,\n ];\n\n const initials = computed(() => {\n if (props.name) {\n const parts = props.name.split(' ');\n if (parts.length === 1) {\n return props.name.substring(0, 2);\n }\n return `${parts[0][0]}${parts.length > 1 ? parts[1][0] : ''}`;\n }\n return '';\n });\n\n const profileColor = computed(() => {\n if (!props.name) {\n return colors[0];\n }\n // Generate consistent color based on name\n let hash = 0;\n for (let i = 0; i < props.name.length; i++) {\n hash = props.name.charCodeAt(i) + ((hash << 5) - hash);\n }\n return colors[Math.abs(hash) % colors.length];\n });\n\n const avatarColor = computed(() => props.color || profileColor.value);\n\n return {\n initials,\n avatarColor,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonBadge","NeonBadgeSize","props","colors","NeonFunctionalColor","initials","computed","parts","profileColor","hash","i","avatarColor"],"mappings":"uNASAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,UAAAC,CAAA,EAEF,MAAO,CAIL,SAAU,CAAE,KAAM,OAAQ,QAAS,MAAA,EAInC,KAAM,CAAE,KAAM,OAAQ,QAAS,MAAA,EAI/B,KAAM,CAAE,KAAM,OAA+B,QAASC,EAAAA,cAAc,KAAA,EAIpE,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,EAIpC,MAAO,CAAE,KAAM,OAAqC,QAAS,MAAA,CAAU,EAEzE,MAAMC,EAAO,CACX,MAAMC,EAAS,CACbC,EAAAA,oBAAoB,MACpBA,EAAAA,oBAAoB,OACpBA,EAAAA,oBAAoB,QACpBA,EAAAA,oBAAoB,KACpBA,EAAAA,oBAAoB,QACpBA,EAAAA,oBAAoB,KACpBA,EAAAA,oBAAoB,MACpBA,EAAAA,oBAAoB,YACpBA,sBAAoB,YAAA,EAGhBC,EAAWC,EAAAA,SAAS,IAAM,CAC9B,GAAIJ,EAAM,KAAM,CACd,MAAMK,EAAQL,EAAM,KAAK,MAAM,GAAG,EAClC,OAAIK,EAAM,SAAW,EACZL,EAAM,KAAK,UAAU,EAAG,CAAC,EAE3B,GAAGK,EAAM,CAAC,EAAE,CAAC,CAAC,GAAGA,EAAM,OAAS,EAAIA,EAAM,CAAC,EAAE,CAAC,EAAI,EAAE,EAC7D,CACA,MAAO,EACT,CAAC,EAEKC,EAAeF,EAAAA,SAAS,IAAM,CAClC,GAAI,CAACJ,EAAM,KACT,OAAOC,EAAO,CAAC,EAGjB,IAAIM,EAAO,EACX,QAASC,EAAI,EAAGA,EAAIR,EAAM,KAAK,OAAQQ,IACrCD,EAAOP,EAAM,KAAK,WAAWQ,CAAC,IAAMD,GAAQ,GAAKA,GAEnD,OAAON,EAAO,KAAK,IAAIM,CAAI,EAAIN,EAAO,MAAM,CAC9C,CAAC,EAEKQ,EAAcL,EAAAA,SAAS,IAAMJ,EAAM,OAASM,EAAa,KAAK,EAEpE,MAAO,CACL,SAAAH,EACA,YAAAM,CAAA,CAEJ,CACF,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as c, computed as a } from "vue";
|
|
2
|
+
import { NeonFunctionalColor as e } from "../../../model/common/color/NeonFunctionalColor.es.js";
|
|
3
|
+
import { NeonBadgeSize as u } from "../../../model/presentation/badge/NeonBadgeSize.es.js";
|
|
4
|
+
import f from "../badge/NeonBadge.vue.es.js";
|
|
5
|
+
const p = c({
|
|
6
|
+
name: "NeonAvatar",
|
|
7
|
+
components: {
|
|
8
|
+
NeonBadge: f
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
/**
|
|
12
|
+
* The URL of the avatar image to display
|
|
13
|
+
*/
|
|
14
|
+
imageUrl: { type: String, default: void 0 },
|
|
15
|
+
/**
|
|
16
|
+
* The name to generate initials from (takes first letter of first name and first letter of last name)
|
|
17
|
+
*/
|
|
18
|
+
name: { type: String, default: void 0 },
|
|
19
|
+
/**
|
|
20
|
+
* The size of the avatar
|
|
21
|
+
*/
|
|
22
|
+
size: { type: String, default: u.Small },
|
|
23
|
+
/**
|
|
24
|
+
* If true, render the avatar as a circle, if false render as square
|
|
25
|
+
*/
|
|
26
|
+
circular: { type: Boolean, default: !0 },
|
|
27
|
+
/**
|
|
28
|
+
* The color of the avatar
|
|
29
|
+
*/
|
|
30
|
+
color: { type: String, default: void 0 }
|
|
31
|
+
},
|
|
32
|
+
setup(n) {
|
|
33
|
+
const r = [
|
|
34
|
+
e.Brand,
|
|
35
|
+
e.Accent,
|
|
36
|
+
e.Primary,
|
|
37
|
+
e.Info,
|
|
38
|
+
e.Success,
|
|
39
|
+
e.Warn,
|
|
40
|
+
e.Error,
|
|
41
|
+
e.LowContrast,
|
|
42
|
+
e.HighContrast
|
|
43
|
+
], i = a(() => {
|
|
44
|
+
if (n.name) {
|
|
45
|
+
const t = n.name.split(" ");
|
|
46
|
+
return t.length === 1 ? n.name.substring(0, 2) : `${t[0][0]}${t.length > 1 ? t[1][0] : ""}`;
|
|
47
|
+
}
|
|
48
|
+
return "";
|
|
49
|
+
}), l = a(() => {
|
|
50
|
+
if (!n.name)
|
|
51
|
+
return r[0];
|
|
52
|
+
let t = 0;
|
|
53
|
+
for (let o = 0; o < n.name.length; o++)
|
|
54
|
+
t = n.name.charCodeAt(o) + ((t << 5) - t);
|
|
55
|
+
return r[Math.abs(t) % r.length];
|
|
56
|
+
}), m = a(() => n.color || l.value);
|
|
57
|
+
return {
|
|
58
|
+
initials: i,
|
|
59
|
+
avatarColor: m
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
p as default
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=NeonAvatar.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonAvatar.es.js","sources":["../../../../src/components/presentation/avatar/NeonAvatar.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent } from 'vue';\nimport { NeonBadge } from '@/neon';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport { NeonBadgeSize } from '@/model/presentation/badge/NeonBadgeSize';\n\n/**\n * An avatar component that displays either an image or initials in a circular badge.\n * When displaying initials, it generates a consistent color based on the provided name.\n */\nexport default defineComponent({\n name: 'NeonAvatar',\n components: {\n NeonBadge,\n },\n props: {\n /**\n * The URL of the avatar image to display\n */\n imageUrl: { type: String, default: undefined },\n /**\n * The name to generate initials from (takes first letter of first name and first letter of last name)\n */\n name: { type: String, default: undefined },\n /**\n * The size of the avatar\n */\n size: { type: String as () => NeonBadgeSize, default: NeonBadgeSize.Small },\n /**\n * If true, render the avatar as a circle, if false render as square\n */\n circular: { type: Boolean, default: true },\n /**\n * The color of the avatar\n */\n color: { type: String as () => NeonFunctionalColor, default: undefined },\n },\n setup(props) {\n const colors = [\n NeonFunctionalColor.Brand,\n NeonFunctionalColor.Accent,\n NeonFunctionalColor.Primary,\n NeonFunctionalColor.Info,\n NeonFunctionalColor.Success,\n NeonFunctionalColor.Warn,\n NeonFunctionalColor.Error,\n NeonFunctionalColor.LowContrast,\n NeonFunctionalColor.HighContrast,\n ];\n\n const initials = computed(() => {\n if (props.name) {\n const parts = props.name.split(' ');\n if (parts.length === 1) {\n return props.name.substring(0, 2);\n }\n return `${parts[0][0]}${parts.length > 1 ? parts[1][0] : ''}`;\n }\n return '';\n });\n\n const profileColor = computed(() => {\n if (!props.name) {\n return colors[0];\n }\n // Generate consistent color based on name\n let hash = 0;\n for (let i = 0; i < props.name.length; i++) {\n hash = props.name.charCodeAt(i) + ((hash << 5) - hash);\n }\n return colors[Math.abs(hash) % colors.length];\n });\n\n const avatarColor = computed(() => props.color || profileColor.value);\n\n return {\n initials,\n avatarColor,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonBadge","NeonBadgeSize","props","colors","NeonFunctionalColor","initials","computed","parts","profileColor","hash","i","avatarColor"],"mappings":";;;;AASA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,WAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,UAAU,EAAE,MAAM,QAAQ,SAAS,OAAA;AAAA;AAAA;AAAA;AAAA,IAInC,MAAM,EAAE,MAAM,QAAQ,SAAS,OAAA;AAAA;AAAA;AAAA;AAAA,IAI/B,MAAM,EAAE,MAAM,QAA+B,SAASC,EAAc,MAAA;AAAA;AAAA;AAAA;AAAA,IAIpE,UAAU,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,OAAO,EAAE,MAAM,QAAqC,SAAS,OAAA;AAAA,EAAU;AAAA,EAEzE,MAAMC,GAAO;AACX,UAAMC,IAAS;AAAA,MACbC,EAAoB;AAAA,MACpBA,EAAoB;AAAA,MACpBA,EAAoB;AAAA,MACpBA,EAAoB;AAAA,MACpBA,EAAoB;AAAA,MACpBA,EAAoB;AAAA,MACpBA,EAAoB;AAAA,MACpBA,EAAoB;AAAA,MACpBA,EAAoB;AAAA,IAAA,GAGhBC,IAAWC,EAAS,MAAM;AAC9B,UAAIJ,EAAM,MAAM;AACd,cAAMK,IAAQL,EAAM,KAAK,MAAM,GAAG;AAClC,eAAIK,EAAM,WAAW,IACZL,EAAM,KAAK,UAAU,GAAG,CAAC,IAE3B,GAAGK,EAAM,CAAC,EAAE,CAAC,CAAC,GAAGA,EAAM,SAAS,IAAIA,EAAM,CAAC,EAAE,CAAC,IAAI,EAAE;AAAA,MAC7D;AACA,aAAO;AAAA,IACT,CAAC,GAEKC,IAAeF,EAAS,MAAM;AAClC,UAAI,CAACJ,EAAM;AACT,eAAOC,EAAO,CAAC;AAGjB,UAAIM,IAAO;AACX,eAASC,IAAI,GAAGA,IAAIR,EAAM,KAAK,QAAQQ;AACrC,QAAAD,IAAOP,EAAM,KAAK,WAAWQ,CAAC,MAAMD,KAAQ,KAAKA;AAEnD,aAAON,EAAO,KAAK,IAAIM,CAAI,IAAIN,EAAO,MAAM;AAAA,IAC9C,CAAC,GAEKQ,IAAcL,EAAS,MAAMJ,EAAM,SAASM,EAAa,KAAK;AAEpE,WAAO;AAAA,MACL,UAAAH;AAAA,MACA,aAAAM;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const o=require("./NeonAvatar.cjs.js"),r=require("vue"),n=require("../../../_virtual/_plugin-vue_export-helper.cjs.js");function l(e,i,s,t,u,p){const a=r.resolveComponent("neon-badge");return e.imageUrl?(r.openBlock(),r.createBlock(a,{key:0,circular:e.circular,image:e.imageUrl,size:e.size,class:"neon-avatar"},null,8,["circular","image","size"])):(r.openBlock(),r.createBlock(a,{key:1,circular:e.circular,color:e.avatarColor,label:e.initials,size:e.size,class:"neon-avatar"},null,8,["circular","color","label","size"]))}const c=n(o,[["render",l]]);module.exports=c;
|
|
2
|
+
//# sourceMappingURL=NeonAvatar.vue.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonAvatar.vue.cjs.js","sources":["../../../../src/components/presentation/avatar/NeonAvatar.vue"],"sourcesContent":["<template>\n <neon-badge v-if=\"imageUrl\" :circular=\"circular\" :image=\"imageUrl\" :size=\"size\" class=\"neon-avatar\" />\n <neon-badge v-else :circular=\"circular\" :color=\"avatarColor\" :label=\"initials\" :size=\"size\" class=\"neon-avatar\" />\n</template>\n<script lang=\"ts\" src=\"./NeonAvatar.ts\"></script>\n"],"names":["_ctx","_createBlock","_component_neon_badge"],"mappings":"6MACoBA,EAAA,wBAAlBC,EAAAA,YAAsGC,EAAA,OAAzE,SAAUF,EAAA,SAAW,MAAOA,EAAA,SAAW,KAAMA,EAAA,KAAM,MAAM,mEACtFC,EAAAA,YAAkHC,EAAA,OAA9F,SAAUF,EAAA,SAAW,MAAOA,EAAA,YAAc,MAAOA,EAAA,SAAW,KAAMA,EAAA,KAAM,MAAM"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import l from "./NeonAvatar.es.js";
|
|
2
|
+
import { resolveComponent as n, openBlock as a, createBlock as o } from "vue";
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
+
function c(e, s, t, m, p, u) {
|
|
5
|
+
const r = n("neon-badge");
|
|
6
|
+
return e.imageUrl ? (a(), o(r, {
|
|
7
|
+
key: 0,
|
|
8
|
+
circular: e.circular,
|
|
9
|
+
image: e.imageUrl,
|
|
10
|
+
size: e.size,
|
|
11
|
+
class: "neon-avatar"
|
|
12
|
+
}, null, 8, ["circular", "image", "size"])) : (a(), o(r, {
|
|
13
|
+
key: 1,
|
|
14
|
+
circular: e.circular,
|
|
15
|
+
color: e.avatarColor,
|
|
16
|
+
label: e.initials,
|
|
17
|
+
size: e.size,
|
|
18
|
+
class: "neon-avatar"
|
|
19
|
+
}, null, 8, ["circular", "color", "label", "size"]));
|
|
20
|
+
}
|
|
21
|
+
const z = /* @__PURE__ */ i(l, [["render", c]]);
|
|
22
|
+
export {
|
|
23
|
+
z as default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=NeonAvatar.vue.es.js.map
|