@adyen/bento-vue3 1.74.0 → 1.76.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/@types/index.d.ts +1660 -614
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header-meta.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/calendar.Tm7Cvpwu.js +2001 -0
- package/dist/chunks/calendar.Tm7Cvpwu.js.map +1 -0
- package/dist/chunks/{checkbox-group.8ebmaHsA.js → checkbox-group.8J29fVna.js} +2 -2
- package/dist/chunks/{checkbox-group.8ebmaHsA.js.map → checkbox-group.8J29fVna.js.map} +1 -1
- package/dist/chunks/{checkbox.BI0dqARY.js → checkbox.CfNYUty6.js} +18 -18
- package/dist/chunks/{checkbox.BI0dqARY.js.map → checkbox.CfNYUty6.js.map} +1 -1
- package/dist/chunks/{code-snippet.CO78Nfj0.js → code-snippet.EeIcRV20.js} +2 -2
- package/dist/chunks/{code-snippet.CO78Nfj0.js.map → code-snippet.EeIcRV20.js.map} +1 -1
- package/dist/chunks/constructNow.CHWWeLPc.js +8 -0
- package/dist/chunks/constructNow.CHWWeLPc.js.map +1 -0
- package/dist/chunks/{dashboard-section.CVttsom5.js → dashboard-section.Cqi0PWeJ.js} +2 -2
- package/dist/chunks/{dashboard-section.CVttsom5.js.map → dashboard-section.Cqi0PWeJ.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CFt1NV_4.js → data-grid-template.D7kB3S1u.js} +2 -2
- package/dist/chunks/{data-grid-template.CFt1NV_4.js.map → data-grid-template.D7kB3S1u.js.map} +1 -1
- package/dist/chunks/data-grid.DJIxBwCa.js +4143 -0
- package/dist/chunks/data-grid.DJIxBwCa.js.map +1 -0
- package/dist/chunks/{date-picker.DSkvT_CA.js → date-picker.CobmiKaJ.js} +16 -16
- package/dist/chunks/date-picker.CobmiKaJ.js.map +1 -0
- package/dist/chunks/date-range-picker.B6UKl1_N.js +1114 -0
- package/dist/chunks/date-range-picker.B6UKl1_N.js.map +1 -0
- package/dist/chunks/{get-date-locale.CAyOIbcp.js → differenceInMonths.C8FyCrav.js} +580 -364
- package/dist/chunks/differenceInMonths.C8FyCrav.js.map +1 -0
- package/dist/chunks/dropdown-tag.CMjilUQb.js +242 -0
- package/dist/chunks/dropdown-tag.CMjilUQb.js.map +1 -0
- package/dist/chunks/{dropdown.bLsoTZbw.js → dropdown.DG_EnV8g.js} +18 -18
- package/dist/chunks/{dropdown.bLsoTZbw.js.map → dropdown.DG_EnV8g.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{filter-bar.nX73NKNC.js → filter-bar.dmC284Po.js} +737 -710
- package/dist/chunks/filter-bar.dmC284Po.js.map +1 -0
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js +10 -0
- package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -0
- package/dist/chunks/{index.BrH1t1iu.js → getTimezoneOffsetInMilliseconds.BW7U6PxE.js} +254 -177
- package/dist/chunks/getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map +1 -0
- package/dist/chunks/header-meta.BE6QfUNi.js +221 -0
- package/dist/chunks/header-meta.BE6QfUNi.js.map +1 -0
- package/dist/chunks/{header-with-views.BLW817ZC.js → header-with-views.BZ16v5-m.js} +4 -4
- package/dist/chunks/{header-with-views.BLW817ZC.js.map → header-with-views.BZ16v5-m.js.map} +1 -1
- package/dist/chunks/{header.DARVAeE9.js → header.3It50Clh.js} +2 -2
- package/dist/chunks/{header.DARVAeE9.js.map → header.3It50Clh.js.map} +1 -1
- package/dist/chunks/{input-field-password.BtM3-txc.js → input-field-password.BVnZWBAV.js} +185 -167
- package/dist/chunks/input-field-password.BVnZWBAV.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.oaNB69nM.js → input-field-phone-number.CWhPGQ1U.js} +3 -3
- package/dist/chunks/{input-field-phone-number.oaNB69nM.js.map → input-field-phone-number.CWhPGQ1U.js.map} +1 -1
- package/dist/chunks/{input-field.D_tADgPG.js → input-field.A-dEZZfC.js} +124 -119
- package/dist/chunks/input-field.A-dEZZfC.js.map +1 -0
- package/dist/chunks/{pagination.D1Gdo5to.js → pagination.B4qBK4pM.js} +2 -2
- package/dist/chunks/{pagination.D1Gdo5to.js.map → pagination.B4qBK4pM.js.map} +1 -1
- package/dist/chunks/radio-group.DWNqrkZ3.js.map +1 -1
- package/dist/chunks/{rich-text-editor.BK9AivIm.js → rich-text-editor.BA6_k4Vv.js} +354 -352
- package/dist/chunks/{rich-text-editor.BK9AivIm.js.map → rich-text-editor.BA6_k4Vv.js.map} +1 -1
- package/dist/chunks/{search-bar.BD_R-vgA.js → search-bar.dZ7UCMxb.js} +3 -3
- package/dist/chunks/{search-bar.BD_R-vgA.js.map → search-bar.dZ7UCMxb.js.map} +1 -1
- package/dist/chunks/{secondary-nav.Du2PL7Ok.js → secondary-nav.CE082cQ_.js} +2 -2
- package/dist/chunks/{secondary-nav.Du2PL7Ok.js.map → secondary-nav.CE082cQ_.js.map} +1 -1
- package/dist/chunks/selection-card-group.NnTbPQjj.js +412 -0
- package/dist/chunks/{selection-card-group._RgLiMyQ.js.map → selection-card-group.NnTbPQjj.js.map} +1 -1
- package/dist/chunks/textarea.C1jkfowf.js.map +1 -1
- package/dist/chunks/timeline-item.DNjubXL2.js +556 -0
- package/dist/chunks/timeline-item.DNjubXL2.js.map +1 -0
- package/dist/chunks/{use-cached-selected-values.C32tjNKy.js → use-cached-selected-values.8MdrR9wt.js} +501 -467
- package/dist/chunks/use-cached-selected-values.8MdrR9wt.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +24 -24
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +3 -3
- package/dist/pagination.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/styles/bento-dark.css +7 -5
- package/dist/styles/bento-light.css +7 -5
- package/dist/styles/bento.css +7 -5
- package/dist/styles/legacy.css +7 -5
- package/dist/styles/styleguide.css +7 -5
- package/dist/timeline.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +8 -23
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js +0 -7
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +0 -1
- package/dist/chunks/calendar.Cqjyxc69.js +0 -2223
- package/dist/chunks/calendar.Cqjyxc69.js.map +0 -1
- package/dist/chunks/data-grid.BjPdbx50.js +0 -4071
- package/dist/chunks/data-grid.BjPdbx50.js.map +0 -1
- package/dist/chunks/date-picker.DSkvT_CA.js.map +0 -1
- package/dist/chunks/date-range-picker.cmg75lC-.js +0 -1117
- package/dist/chunks/date-range-picker.cmg75lC-.js.map +0 -1
- package/dist/chunks/dropdown-tag.DvQQIJsw.js +0 -308
- package/dist/chunks/dropdown-tag.DvQQIJsw.js.map +0 -1
- package/dist/chunks/filter-bar.nX73NKNC.js.map +0 -1
- package/dist/chunks/get-date-locale.CAyOIbcp.js.map +0 -1
- package/dist/chunks/header-meta.C4iaUsfq.js +0 -236
- package/dist/chunks/header-meta.C4iaUsfq.js.map +0 -1
- package/dist/chunks/index.BrH1t1iu.js.map +0 -1
- package/dist/chunks/index.BxBB1rsx.js +0 -15
- package/dist/chunks/index.BxBB1rsx.js.map +0 -1
- package/dist/chunks/input-field-password.BtM3-txc.js.map +0 -1
- package/dist/chunks/input-field.D_tADgPG.js.map +0 -1
- package/dist/chunks/selection-card-group._RgLiMyQ.js +0 -474
- package/dist/chunks/timeline-item.C8PA_w7m.js +0 -568
- package/dist/chunks/timeline-item.C8PA_w7m.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.C32tjNKy.js.map +0 -1
|
@@ -1,568 +0,0 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as a, ref as R, toRefs as fe, watch as ve, provide as V, nextTick as pe, resolveComponent as w, createElementBlock as v, openBlock as i, createCommentVNode as c, createElementVNode as y, createBlock as C, withCtx as g, createTextVNode as I, toDisplayString as N, createVNode as M, renderSlot as q, mergeProps as J, inject as Z, onUnmounted as _e, normalizeClass as G, Fragment as H, renderList as be } from "vue";
|
|
2
|
-
import { B as se } from "./button.DhcxX2GJ.js";
|
|
3
|
-
import { B as he } from "./textarea.C1jkfowf.js";
|
|
4
|
-
import { u as le } from "./index.pdBj0KQU.js";
|
|
5
|
-
import { B as ge } from "./button-actions.BQ3AFQqt.js";
|
|
6
|
-
import { _ as P } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
7
|
-
import { B as ye } from "./date.DZvVL-uz.js";
|
|
8
|
-
import { B as Ne } from "./link.cwPmWlsk.js";
|
|
9
|
-
import { B as Te } from "./tag.CEmpyuYX.js";
|
|
10
|
-
import { B as we, d as Ee } from "./typography.yBEME_Gu.js";
|
|
11
|
-
import { a as Ie, B as Se, S as Ce } from "./structured-list-item.BTPh7SPj.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { g as Me } from "./generate-uid.NJ8tVoha.js";
|
|
14
|
-
import { u as ke } from "./use-has-slot.B7eQSabc.js";
|
|
15
|
-
import { r as Le, l as Ae, c as Re, t as j, g as Q } from "./index.BrH1t1iu.js";
|
|
16
|
-
import { c as Oe } from "./index.BxBB1rsx.js";
|
|
17
|
-
import "../assets/timeline-item.css";
|
|
18
|
-
var X = 1e3 * 60, F = 60 * 24, x = F * 30, ee = F * 365;
|
|
19
|
-
function te(e, o) {
|
|
20
|
-
var l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
21
|
-
Le(2, arguments);
|
|
22
|
-
var r = l.locale || Ae;
|
|
23
|
-
if (!r.formatDistance)
|
|
24
|
-
throw new RangeError("locale must contain localize.formatDistance property");
|
|
25
|
-
var T = Re(e, o);
|
|
26
|
-
if (isNaN(T))
|
|
27
|
-
throw new RangeError("Invalid time value");
|
|
28
|
-
var d = Oe(l);
|
|
29
|
-
d.addSuffix = !!l.addSuffix, d.comparison = T;
|
|
30
|
-
var s, f;
|
|
31
|
-
T > 0 ? (s = j(o), f = j(e)) : (s = j(e), f = j(o));
|
|
32
|
-
var _ = l.roundingMethod == null ? "round" : String(l.roundingMethod), n;
|
|
33
|
-
if (_ === "floor")
|
|
34
|
-
n = Math.floor;
|
|
35
|
-
else if (_ === "ceil")
|
|
36
|
-
n = Math.ceil;
|
|
37
|
-
else if (_ === "round")
|
|
38
|
-
n = Math.round;
|
|
39
|
-
else
|
|
40
|
-
throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
|
|
41
|
-
var E = f.getTime() - s.getTime(), b = E / X, u = Q(f) - Q(s), h = (E - u) / X, t;
|
|
42
|
-
if (l.unit == null ? b < 1 ? t = "second" : b < 60 ? t = "minute" : b < F ? t = "hour" : h < x ? t = "day" : h < ee ? t = "month" : t = "year" : t = String(l.unit), t === "second") {
|
|
43
|
-
var k = n(E / 1e3);
|
|
44
|
-
return r.formatDistance("xSeconds", k, d);
|
|
45
|
-
} else if (t === "minute") {
|
|
46
|
-
var m = n(b);
|
|
47
|
-
return r.formatDistance("xMinutes", m, d);
|
|
48
|
-
} else if (t === "hour") {
|
|
49
|
-
var L = n(b / 60);
|
|
50
|
-
return r.formatDistance("xHours", L, d);
|
|
51
|
-
} else if (t === "day") {
|
|
52
|
-
var $ = n(h / F);
|
|
53
|
-
return r.formatDistance("xDays", $, d);
|
|
54
|
-
} else if (t === "month") {
|
|
55
|
-
var A = n(h / x);
|
|
56
|
-
return A === 12 && l.unit !== "month" ? r.formatDistance("xYears", 1, d) : r.formatDistance("xMonths", A, d);
|
|
57
|
-
} else if (t === "year") {
|
|
58
|
-
var D = n(h / ee);
|
|
59
|
-
return r.formatDistance("xYears", D, d);
|
|
60
|
-
}
|
|
61
|
-
throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
|
|
62
|
-
}
|
|
63
|
-
var O = /* @__PURE__ */ ((e) => (e.BOTTOM = "bottom", e.AFTER_FIRST = "after-first", e.BEFORE_LAST = "before-last", e))(O || {}), $e = /* @__PURE__ */ ((e) => (e.SECOND = "second", e.MINUTE = "minute", e.HOUR = "hour", e.DAY = "day", e.MONTH = "month", e.YEAR = "year", e))($e || {}), U = /* @__PURE__ */ ((e) => (e.DEFAULT = "SquareSmallIcon", e.SUCCESS = "CheckedCircleIcon", e.CRITICAL = "CrossCircleIcon", e))(U || {}), re = /* @__PURE__ */ ((e) => (e.BLACK = "black", e.BLUE = "blue", e.GREEN = "green", e.GREY = "grey", e.ORANGE = "orange", e.RED = "red", e.YELLOW = "yellow", e))(re || {});
|
|
64
|
-
const de = Symbol("timeline register entry injection key"), ue = Symbol("timeline config obj injection key"), ie = {
|
|
65
|
-
"en-US": {
|
|
66
|
-
addNote: "Add note",
|
|
67
|
-
cancel: "Cancel"
|
|
68
|
-
},
|
|
69
|
-
"ja-JP": {
|
|
70
|
-
addNote: "メモを追加",
|
|
71
|
-
cancel: "キャンセル"
|
|
72
|
-
},
|
|
73
|
-
"pt-BR": {
|
|
74
|
-
addNote: "Adicionar anotação",
|
|
75
|
-
cancel: "Cancelar"
|
|
76
|
-
}
|
|
77
|
-
}, De = oe({
|
|
78
|
-
i18n: { messages: ie },
|
|
79
|
-
name: "bento-timeline",
|
|
80
|
-
components: { BentoButton: se, BentoButtonActions: ge, BentoTextarea: he },
|
|
81
|
-
props: {
|
|
82
|
-
/**
|
|
83
|
-
* If set to true, gives the possibility to manually add notes to the timeline via a textarea
|
|
84
|
-
*/
|
|
85
|
-
addNote: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: !1
|
|
88
|
-
},
|
|
89
|
-
/**
|
|
90
|
-
* Object that determines the max number of items to show without clicking the show more button
|
|
91
|
-
* and where in the timeline is the show more button placed
|
|
92
|
-
*/
|
|
93
|
-
showMore: {
|
|
94
|
-
type: Object,
|
|
95
|
-
default: null
|
|
96
|
-
},
|
|
97
|
-
/**
|
|
98
|
-
* Object that determines minimum amount of time for the automatic timegap indicator;
|
|
99
|
-
* Define a unit (hour, day, month) and an amount (e.g. { amount: 7, unit: 'days' }).
|
|
100
|
-
* If null, automatic timegap detection will be turned off
|
|
101
|
-
*/
|
|
102
|
-
timegapLimit: {
|
|
103
|
-
type: Object,
|
|
104
|
-
default: null
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
emits: ["add-timeline-note"],
|
|
108
|
-
setup(e, { emit: o }) {
|
|
109
|
-
const { t: l } = le({ messages: ie }), r = a(() => l("addNote")), T = a(() => l("cancel")), d = R(), s = (p) => {
|
|
110
|
-
d.value = p;
|
|
111
|
-
}, f = R(null), _ = R(null), n = R(!1), E = async () => {
|
|
112
|
-
var p, S;
|
|
113
|
-
n.value = !n.value, await pe(), n.value ? (p = f.value.$refs.textareaElement) == null || p.focus() : (S = _.value.$el) == null || S.focus();
|
|
114
|
-
}, b = () => {
|
|
115
|
-
o("add-timeline-note", {
|
|
116
|
-
description: d.value,
|
|
117
|
-
timestamp: { date: /* @__PURE__ */ new Date() },
|
|
118
|
-
type: "note"
|
|
119
|
-
}), E();
|
|
120
|
-
}, u = R([]), h = a(
|
|
121
|
-
() => e.showMore && u.value.length > e.showMore.limit ? u.value.length - e.showMore.limit : null
|
|
122
|
-
), t = R(!1), { timegapLimit: k } = fe(e), m = a(() => Array.from(u.value.keys())), L = a(() => e.showMore ? e.showMore.placement === O.BEFORE_LAST ? [
|
|
123
|
-
...m.value.slice(0, e.showMore.limit - 1),
|
|
124
|
-
m.value[m.value.length - 1]
|
|
125
|
-
] : e.showMore.placement === O.AFTER_FIRST ? [m.value[0], ...m.value.slice(-(e.showMore.limit - 1))] : m.value.slice(0, e.showMore.limit) : null), $ = a(() => {
|
|
126
|
-
if (!e.showMore)
|
|
127
|
-
return null;
|
|
128
|
-
switch (e.showMore.placement) {
|
|
129
|
-
case O.BEFORE_LAST:
|
|
130
|
-
return e.showMore.limit - 2;
|
|
131
|
-
case O.AFTER_FIRST:
|
|
132
|
-
return 0;
|
|
133
|
-
case O.BOTTOM:
|
|
134
|
-
default:
|
|
135
|
-
return e.showMore.limit - 1;
|
|
136
|
-
}
|
|
137
|
-
}), A = () => {
|
|
138
|
-
u.value.sort((p, S) => new Date(S.date).getTime() - new Date(p.date).getTime());
|
|
139
|
-
}, D = (p) => () => {
|
|
140
|
-
const S = u.value.indexOf(p);
|
|
141
|
-
S > -1 && u.value.splice(S, 1);
|
|
142
|
-
}, B = (p) => (u.value.push(p), { timelineEntries: u, unregisterTimelineEntry: D(p) });
|
|
143
|
-
ve(
|
|
144
|
-
() => u.value.length,
|
|
145
|
-
() => A()
|
|
146
|
-
);
|
|
147
|
-
const Y = {
|
|
148
|
-
showAll: t,
|
|
149
|
-
showMoreIndex: $,
|
|
150
|
-
hiddenItems: h,
|
|
151
|
-
visibleIndexes: L,
|
|
152
|
-
timegapLimit: k,
|
|
153
|
-
timelineEntries: u
|
|
154
|
-
};
|
|
155
|
-
return V(de, B), V(ue, Y), {
|
|
156
|
-
addNoteLabel: r,
|
|
157
|
-
cancelLabel: T,
|
|
158
|
-
toggleAddNote: E,
|
|
159
|
-
updateNoteContent: s,
|
|
160
|
-
addNoteToTimeline: b,
|
|
161
|
-
showAddNoteTextArea: n,
|
|
162
|
-
// refs
|
|
163
|
-
addNoteTextareaRef: f,
|
|
164
|
-
addNoteButtonRef: _
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}), Be = { class: "b-timeline" }, je = {
|
|
168
|
-
key: 0,
|
|
169
|
-
class: "b-timeline__add-note-section"
|
|
170
|
-
}, Ue = { key: 1 }, Fe = { class: "b-timeline__items" };
|
|
171
|
-
function Ye(e, o, l, r, T, d) {
|
|
172
|
-
const s = w("bento-button"), f = w("bento-textarea"), _ = w("bento-button-actions");
|
|
173
|
-
return i(), v("div", Be, [
|
|
174
|
-
e.addNote ? (i(), v("div", je, [
|
|
175
|
-
e.showAddNoteTextArea ? c("", !0) : (i(), C(s, {
|
|
176
|
-
key: 0,
|
|
177
|
-
ref: "addNoteButtonRef",
|
|
178
|
-
variant: "tertiary",
|
|
179
|
-
onClick: e.toggleAddNote
|
|
180
|
-
}, {
|
|
181
|
-
default: g(() => [
|
|
182
|
-
I(N(e.addNoteLabel), 1)
|
|
183
|
-
]),
|
|
184
|
-
_: 1
|
|
185
|
-
}, 8, ["onClick"])),
|
|
186
|
-
e.showAddNoteTextArea ? (i(), v("div", Ue, [
|
|
187
|
-
M(f, {
|
|
188
|
-
ref: "addNoteTextareaRef",
|
|
189
|
-
label: e.addNoteLabel,
|
|
190
|
-
"character-limit": 150,
|
|
191
|
-
resizable: "vertical",
|
|
192
|
-
onInput: e.updateNoteContent
|
|
193
|
-
}, null, 8, ["label", "onInput"]),
|
|
194
|
-
M(_, {
|
|
195
|
-
actions: [
|
|
196
|
-
{ title: e.addNoteLabel, event: e.addNoteToTimeline },
|
|
197
|
-
{ title: e.cancelLabel, event: e.toggleAddNote }
|
|
198
|
-
]
|
|
199
|
-
}, null, 8, ["actions"])
|
|
200
|
-
])) : c("", !0)
|
|
201
|
-
])) : c("", !0),
|
|
202
|
-
y("ol", Fe, [
|
|
203
|
-
q(e.$slots, "default", {}, void 0, !0)
|
|
204
|
-
])
|
|
205
|
-
]);
|
|
206
|
-
}
|
|
207
|
-
const gt = /* @__PURE__ */ P(De, [["render", Ye], ["__scopeId", "data-v-8dcc5ff3"]]);
|
|
208
|
-
let ne = 0;
|
|
209
|
-
const ze = {
|
|
210
|
-
beforeCreate() {
|
|
211
|
-
this.uuid = ne.toString(), ne += 1;
|
|
212
|
-
}
|
|
213
|
-
}, He = { key: 0 };
|
|
214
|
-
function Ve(e, o, l, r, T, d) {
|
|
215
|
-
return i(), v("svg", J({ role: "img" }, e.$attrs, {
|
|
216
|
-
class: "ui-assets-icons-16",
|
|
217
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
218
|
-
width: "16",
|
|
219
|
-
height: "16",
|
|
220
|
-
fill: "none"
|
|
221
|
-
}), [
|
|
222
|
-
e.$attrs["svg-title"] ? (i(), v("title", He, N(e.$attrs["svg-title"]), 1)) : c("", !0),
|
|
223
|
-
o[0] || (o[0] = y("path", {
|
|
224
|
-
fill: "#001222",
|
|
225
|
-
d: "M10 3.25C11.5188 3.25 12.75 4.48122 12.75 6V10C12.75 11.5188 11.5188 12.75 10 12.75H6C4.48122 12.75 3.25 11.5188 3.25 10V6C3.25 4.48122 4.48122 3.25 6 3.25H10Z"
|
|
226
|
-
}, null, -1))
|
|
227
|
-
], 16);
|
|
228
|
-
}
|
|
229
|
-
const qe = /* @__PURE__ */ P(ze, [["render", Ve]]), ae = {
|
|
230
|
-
"en-US": {
|
|
231
|
-
showLess: "Show less",
|
|
232
|
-
showMore: "Show {items} more",
|
|
233
|
-
timegap: "{timegap} passed between the timeline events"
|
|
234
|
-
},
|
|
235
|
-
"ja-JP": {
|
|
236
|
-
showLess: "表示内容を減らす"
|
|
237
|
-
},
|
|
238
|
-
"pt-BR": {
|
|
239
|
-
showLess: "Mostrar menos"
|
|
240
|
-
}
|
|
241
|
-
}, Je = oe({
|
|
242
|
-
name: "bento-timeline-item",
|
|
243
|
-
components: {
|
|
244
|
-
BentoButton: se,
|
|
245
|
-
BentoDate: ye,
|
|
246
|
-
BentoLink: Ne,
|
|
247
|
-
BentoTag: Te,
|
|
248
|
-
BentoTypography: we,
|
|
249
|
-
BentoStructuredList: Se,
|
|
250
|
-
BentoStructuredListItem: Ie,
|
|
251
|
-
SquareSmallIcon: qe
|
|
252
|
-
},
|
|
253
|
-
i18n: { messages: ae },
|
|
254
|
-
props: {
|
|
255
|
-
/**
|
|
256
|
-
* Additional timestamp of the event
|
|
257
|
-
*/
|
|
258
|
-
additionalTimestamp: {
|
|
259
|
-
type: Object,
|
|
260
|
-
default: null
|
|
261
|
-
},
|
|
262
|
-
/**
|
|
263
|
-
* Relevant key-value pair data to display in the event
|
|
264
|
-
*/
|
|
265
|
-
dataList: {
|
|
266
|
-
type: Array,
|
|
267
|
-
default: null
|
|
268
|
-
},
|
|
269
|
-
/**
|
|
270
|
-
* Description of the event
|
|
271
|
-
*/
|
|
272
|
-
description: {
|
|
273
|
-
type: String,
|
|
274
|
-
default: null
|
|
275
|
-
},
|
|
276
|
-
/**
|
|
277
|
-
* Modifier that changes the color of the timeline icon
|
|
278
|
-
* @values blue, black, green, grey, orange, red, yellow
|
|
279
|
-
*/
|
|
280
|
-
status: {
|
|
281
|
-
type: String,
|
|
282
|
-
default: "black",
|
|
283
|
-
validator: (e) => Object.values(re).includes(e)
|
|
284
|
-
},
|
|
285
|
-
/**
|
|
286
|
-
* Tag props that will be passed down to inner tag component
|
|
287
|
-
*/
|
|
288
|
-
tag: {
|
|
289
|
-
type: Object,
|
|
290
|
-
default: void 0
|
|
291
|
-
},
|
|
292
|
-
/**
|
|
293
|
-
* Main timestamp of the event. Used for timegap detection.
|
|
294
|
-
*/
|
|
295
|
-
timestamp: {
|
|
296
|
-
type: Object,
|
|
297
|
-
required: !0
|
|
298
|
-
},
|
|
299
|
-
/**
|
|
300
|
-
* Title of the event
|
|
301
|
-
*/
|
|
302
|
-
title: {
|
|
303
|
-
type: [Object, String],
|
|
304
|
-
default: null
|
|
305
|
-
},
|
|
306
|
-
/**
|
|
307
|
-
* Type of the timeline item. If set to 'note', it renders a note item in the timeline. Defaults to 'milestone'.
|
|
308
|
-
* @values milestone, note
|
|
309
|
-
*/
|
|
310
|
-
type: {
|
|
311
|
-
type: String,
|
|
312
|
-
default: "milestone",
|
|
313
|
-
validator: (e) => ["milestone", "note"].includes(e)
|
|
314
|
-
},
|
|
315
|
-
/**
|
|
316
|
-
* Variant for the timeline item
|
|
317
|
-
* @values DEFAULT, SUCCESS, CRITICAL
|
|
318
|
-
*
|
|
319
|
-
* @deprecated Use "status" prop instead
|
|
320
|
-
*/
|
|
321
|
-
variant: {
|
|
322
|
-
type: String,
|
|
323
|
-
default: null,
|
|
324
|
-
validator: (e) => Object.values(U).includes(e)
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
setup(e, { slots: o }) {
|
|
328
|
-
const { t: l } = le({ messages: ae }), r = a(() => e.type === "note"), T = a(() => e.variant === U.CRITICAL ? "red" : e.variant === U.SUCCESS ? "green" : e.status);
|
|
329
|
-
e.variant && Ee(
|
|
330
|
-
'BentoTimelineItem "variant" property',
|
|
331
|
-
`Use the BentoTimelineItem "status" modifier instead to modify the color of the timeline icon.
|
|
332
|
-
<bento-timeline-item status="red" />`,
|
|
333
|
-
"2.0.0"
|
|
334
|
-
);
|
|
335
|
-
const d = a(() => ({
|
|
336
|
-
[`b-timeline-item__icon--${T.value}`]: T.value && !r.value
|
|
337
|
-
})), s = a(() => ({
|
|
338
|
-
"b-timeline-item--note": r.value
|
|
339
|
-
}));
|
|
340
|
-
V(Ce, !0);
|
|
341
|
-
const f = {
|
|
342
|
-
title: e.title,
|
|
343
|
-
date: e.timestamp.date
|
|
344
|
-
}, _ = Z(de), { timelineEntries: n, unregisterTimelineEntry: E } = _(f);
|
|
345
|
-
_e(() => E());
|
|
346
|
-
const { showAll: b, showMoreIndex: u, hiddenItems: h, visibleIndexes: t, timegapLimit: k } = Z(ue), m = a(() => n.value.indexOf(f)), L = a(() => b.value || !t.value), $ = a(
|
|
347
|
-
() => L.value ? !0 : t.value.includes(m.value)
|
|
348
|
-
), A = a(() => typeof e.title == "object"), D = a(() => e.title), B = a(() => {
|
|
349
|
-
var W;
|
|
350
|
-
if (!k.value)
|
|
351
|
-
return null;
|
|
352
|
-
const z = (W = n.value[m.value - 1]) == null ? void 0 : W.date, me = L.value || t.value.includes(m.value - 1);
|
|
353
|
-
if (!z || !me)
|
|
354
|
-
return null;
|
|
355
|
-
const { date: K } = n.value[m.value], ce = parseInt(
|
|
356
|
-
te(z, K, { unit: k.value.unit }),
|
|
357
|
-
10
|
|
358
|
-
);
|
|
359
|
-
return k.value.amount < ce ? te(z, K, { roundingMethod: "floor" }) : null;
|
|
360
|
-
}), Y = a(() => B.value ? l("timegap", { timegap: B.value }) : ""), p = a(() => h.value && u.value === m.value), S = a(() => m.value !== -1 && m.value === n.value.length - 1);
|
|
361
|
-
return {
|
|
362
|
-
// Values
|
|
363
|
-
isNoteType: r,
|
|
364
|
-
iconConditionalClasses: d,
|
|
365
|
-
conditionalClasses: s,
|
|
366
|
-
displayShowMoreButton: p,
|
|
367
|
-
showAll: b,
|
|
368
|
-
hiddenItems: h,
|
|
369
|
-
isVisible: $,
|
|
370
|
-
isLinkTitle: A,
|
|
371
|
-
linkTitleProps: D,
|
|
372
|
-
timegap: B,
|
|
373
|
-
timegapAriaLabel: Y,
|
|
374
|
-
isLastItem: S,
|
|
375
|
-
// Methods
|
|
376
|
-
generateUid: Me,
|
|
377
|
-
hasSlot: ke(o),
|
|
378
|
-
t: l
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
}), Pe = {
|
|
382
|
-
key: 0,
|
|
383
|
-
class: "b-timeline-item__row"
|
|
384
|
-
}, Ke = { class: "b-timeline-item__content" }, We = { class: "b-timeline-item__row" }, Ze = {
|
|
385
|
-
class: "b-timeline-item__marker",
|
|
386
|
-
"aria-hidden": "true"
|
|
387
|
-
}, Ge = {
|
|
388
|
-
key: 0,
|
|
389
|
-
class: "b-timeline-item__separator",
|
|
390
|
-
"data-testid": "last-timeline-item-separator"
|
|
391
|
-
}, Qe = { class: "b-timeline-item__content" }, Xe = { key: 1 }, xe = {
|
|
392
|
-
key: 5,
|
|
393
|
-
class: "b-timeline-item__data-list"
|
|
394
|
-
}, et = {
|
|
395
|
-
key: 1,
|
|
396
|
-
class: "b-timeline-item__row"
|
|
397
|
-
}, tt = { class: "b-timeline-item__content" };
|
|
398
|
-
function it(e, o, l, r, T, d) {
|
|
399
|
-
const s = w("bento-typography"), f = w("square-small-icon"), _ = w("bento-link"), n = w("bento-date"), E = w("bento-structured-list-item"), b = w("bento-structured-list"), u = w("bento-tag"), h = w("bento-button");
|
|
400
|
-
return e.isVisible ? (i(), v("li", {
|
|
401
|
-
key: 0,
|
|
402
|
-
class: G(["b-timeline-item", e.conditionalClasses])
|
|
403
|
-
}, [
|
|
404
|
-
e.timegap ? (i(), v("div", Pe, [
|
|
405
|
-
o[1] || (o[1] = y("div", {
|
|
406
|
-
class: "b-timeline-item__marker",
|
|
407
|
-
"aria-hidden": "true"
|
|
408
|
-
}, [
|
|
409
|
-
y("div", { class: "b-timeline-item__icon b-timeline-item__icon--timegap" }),
|
|
410
|
-
y("div", { class: "b-timeline-item__separator" })
|
|
411
|
-
], -1)),
|
|
412
|
-
y("div", Ke, [
|
|
413
|
-
M(s, {
|
|
414
|
-
class: "b-timeline-item__timegap",
|
|
415
|
-
"aria-label": e.timegapAriaLabel
|
|
416
|
-
}, {
|
|
417
|
-
default: g(() => [
|
|
418
|
-
I(N(e.timegap), 1)
|
|
419
|
-
]),
|
|
420
|
-
_: 1
|
|
421
|
-
}, 8, ["aria-label"])
|
|
422
|
-
])
|
|
423
|
-
])) : c("", !0),
|
|
424
|
-
y("div", We, [
|
|
425
|
-
y("div", Ze, [
|
|
426
|
-
M(f, {
|
|
427
|
-
class: G(["b-timeline-item__icon", e.iconConditionalClasses])
|
|
428
|
-
}, null, 8, ["class"]),
|
|
429
|
-
e.isLastItem ? c("", !0) : (i(), v("div", Ge))
|
|
430
|
-
]),
|
|
431
|
-
y("div", Qe, [
|
|
432
|
-
e.isNoteType ? c("", !0) : (i(), C(s, {
|
|
433
|
-
key: 0,
|
|
434
|
-
el: "div",
|
|
435
|
-
variant: "body",
|
|
436
|
-
strongest: "",
|
|
437
|
-
class: "b-timeline-item__title",
|
|
438
|
-
role: "heading",
|
|
439
|
-
"aria-level": "2"
|
|
440
|
-
}, {
|
|
441
|
-
default: g(() => [
|
|
442
|
-
e.isLinkTitle ? (i(), C(_, J({ key: 0 }, e.linkTitleProps, { "disable-typography": "" }), {
|
|
443
|
-
default: g(() => [
|
|
444
|
-
I(N(e.linkTitleProps.title), 1)
|
|
445
|
-
]),
|
|
446
|
-
_: 1
|
|
447
|
-
}, 16)) : (i(), v("span", Xe, N(e.title), 1))
|
|
448
|
-
]),
|
|
449
|
-
_: 1
|
|
450
|
-
})),
|
|
451
|
-
e.isNoteType && (e.description || e.hasSlot("default")) ? (i(), C(s, {
|
|
452
|
-
key: 1,
|
|
453
|
-
el: "div",
|
|
454
|
-
variant: "body",
|
|
455
|
-
class: "b-timeline-item__description"
|
|
456
|
-
}, {
|
|
457
|
-
default: g(() => [
|
|
458
|
-
q(e.$slots, "default", {}, () => [
|
|
459
|
-
I(N(e.description), 1)
|
|
460
|
-
], !0)
|
|
461
|
-
]),
|
|
462
|
-
_: 3
|
|
463
|
-
})) : c("", !0),
|
|
464
|
-
e.timestamp ? (i(), C(s, {
|
|
465
|
-
key: 2,
|
|
466
|
-
class: "b-timeline-item__timestamp",
|
|
467
|
-
el: "div",
|
|
468
|
-
variant: "caption"
|
|
469
|
-
}, {
|
|
470
|
-
default: g(() => [
|
|
471
|
-
M(n, {
|
|
472
|
-
date: e.timestamp.date,
|
|
473
|
-
format: e.timestamp.format,
|
|
474
|
-
"disable-typography": ""
|
|
475
|
-
}, null, 8, ["date", "format"]),
|
|
476
|
-
I(" " + N(e.timestamp.value), 1)
|
|
477
|
-
]),
|
|
478
|
-
_: 1
|
|
479
|
-
})) : c("", !0),
|
|
480
|
-
!e.isNoteType && e.additionalTimestamp ? (i(), C(s, {
|
|
481
|
-
key: 3,
|
|
482
|
-
class: "b-timeline-item__timestamp",
|
|
483
|
-
el: "div",
|
|
484
|
-
variant: "caption"
|
|
485
|
-
}, {
|
|
486
|
-
default: g(() => [
|
|
487
|
-
M(n, {
|
|
488
|
-
date: e.additionalTimestamp.date,
|
|
489
|
-
format: e.additionalTimestamp.format,
|
|
490
|
-
"disable-typography": ""
|
|
491
|
-
}, null, 8, ["date", "format"]),
|
|
492
|
-
I(" " + N(e.additionalTimestamp.value), 1)
|
|
493
|
-
]),
|
|
494
|
-
_: 1
|
|
495
|
-
})) : c("", !0),
|
|
496
|
-
!e.isNoteType && (e.description || e.hasSlot("default")) ? (i(), C(s, {
|
|
497
|
-
key: 4,
|
|
498
|
-
el: "div",
|
|
499
|
-
variant: "body",
|
|
500
|
-
class: "b-timeline-item__description"
|
|
501
|
-
}, {
|
|
502
|
-
default: g(() => [
|
|
503
|
-
q(e.$slots, "default", {}, () => [
|
|
504
|
-
I(N(e.description), 1)
|
|
505
|
-
], !0)
|
|
506
|
-
]),
|
|
507
|
-
_: 3
|
|
508
|
-
})) : c("", !0),
|
|
509
|
-
!e.isNoteType && e.dataList ? (i(), v("div", xe, [
|
|
510
|
-
M(b, null, {
|
|
511
|
-
default: g(() => [
|
|
512
|
-
(i(!0), v(H, null, be(e.dataList, (t) => (i(), C(E, {
|
|
513
|
-
key: e.generateUid(t.label),
|
|
514
|
-
label: t.label
|
|
515
|
-
}, {
|
|
516
|
-
default: g(() => [
|
|
517
|
-
M(s, { variant: "caption" }, {
|
|
518
|
-
default: g(() => [
|
|
519
|
-
I(N(t.value), 1)
|
|
520
|
-
]),
|
|
521
|
-
_: 2
|
|
522
|
-
}, 1024)
|
|
523
|
-
]),
|
|
524
|
-
_: 2
|
|
525
|
-
}, 1032, ["label"]))), 128))
|
|
526
|
-
]),
|
|
527
|
-
_: 1
|
|
528
|
-
})
|
|
529
|
-
])) : c("", !0),
|
|
530
|
-
!e.isNoteType && e.tag ? (i(), C(u, J({ key: 6 }, e.tag, { class: "b-timeline-item__tag" }), null, 16)) : c("", !0)
|
|
531
|
-
])
|
|
532
|
-
]),
|
|
533
|
-
e.displayShowMoreButton ? (i(), v("div", et, [
|
|
534
|
-
o[2] || (o[2] = y("div", {
|
|
535
|
-
class: "b-timeline-item__marker",
|
|
536
|
-
"aria-hidden": "true"
|
|
537
|
-
}, [
|
|
538
|
-
y("div", { class: "b-timeline-item__separator" })
|
|
539
|
-
], -1)),
|
|
540
|
-
y("div", tt, [
|
|
541
|
-
M(h, {
|
|
542
|
-
class: "b-timeline__show-more",
|
|
543
|
-
variant: "tertiary",
|
|
544
|
-
onClick: o[0] || (o[0] = (t) => e.showAll = !e.showAll)
|
|
545
|
-
}, {
|
|
546
|
-
default: g(() => [
|
|
547
|
-
e.showAll ? (i(), v(H, { key: 1 }, [
|
|
548
|
-
I(N(e.t("showLess")), 1)
|
|
549
|
-
], 64)) : (i(), v(H, { key: 0 }, [
|
|
550
|
-
I(N(e.t("showMore", { items: e.hiddenItems })), 1)
|
|
551
|
-
], 64))
|
|
552
|
-
]),
|
|
553
|
-
_: 1
|
|
554
|
-
})
|
|
555
|
-
])
|
|
556
|
-
])) : c("", !0)
|
|
557
|
-
], 2)) : c("", !0);
|
|
558
|
-
}
|
|
559
|
-
const yt = /* @__PURE__ */ P(Je, [["render", it], ["__scopeId", "data-v-d5270159"]]);
|
|
560
|
-
export {
|
|
561
|
-
O as B,
|
|
562
|
-
yt as a,
|
|
563
|
-
$e as b,
|
|
564
|
-
U as c,
|
|
565
|
-
re as d,
|
|
566
|
-
gt as t
|
|
567
|
-
};
|
|
568
|
-
//# sourceMappingURL=timeline-item.C8PA_w7m.js.map
|