@kiva/kv-components 8.13.3 → 8.14.1
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/utils/postGoalStatement.d.ts +0 -1
- package/dist/utils/postGoalStatement.js +23 -24
- package/dist/vue/KvCompactLoanCard.css +1 -1
- package/dist/vue/KvCompactLoanCard.js +1 -1
- package/dist/vue/KvCompactLoanCard2.js +25 -26
- package/dist/vue/KvDatePicker.css +1 -1
- package/dist/vue/KvDatePicker.js +20 -27
- package/dist/vue/KvDatePicker.vue.d.ts +99 -4
- package/dist/vue/KvDatePicker2.js +12 -24
- package/package.json +2 -2
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import w from "numeral";
|
|
2
|
+
const $ = 200, o = "...";
|
|
3
|
+
function E(t) {
|
|
4
|
+
return t.length ? t.charAt(0).toLowerCase() + t.slice(1) : "";
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return
|
|
6
|
+
function L(t, e) {
|
|
7
|
+
return e <= 0 ? "" : t.length <= e ? t : e <= o.length ? o.slice(0, e) : `${t.slice(0, e - o.length).trimEnd()}${o}`;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function g(t) {
|
|
10
10
|
const {
|
|
11
|
-
anonymizationLevel:
|
|
11
|
+
anonymizationLevel: e,
|
|
12
12
|
borrowerName: a,
|
|
13
13
|
distributionModel: l,
|
|
14
14
|
formattedLocation: s,
|
|
15
|
-
loanAmount:
|
|
16
|
-
loanBorrowerCount:
|
|
17
|
-
loanStatus:
|
|
18
|
-
loanUse: c
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
b > 1 ? "a member of" : ""
|
|
15
|
+
loanAmount: S,
|
|
16
|
+
loanBorrowerCount: p,
|
|
17
|
+
loanStatus: b,
|
|
18
|
+
loanUse: c
|
|
19
|
+
} = t, f = s ? `${a} in ${s}` : a, n = e !== "full" && !!c.length, u = ["fundraising", "inactive", "reviewed"].includes(b) ? "helps" : "helped", r = n ? [
|
|
20
|
+
w(S).format("$0,0"),
|
|
21
|
+
l === "direct" ? "to" : u,
|
|
22
|
+
p > 1 ? "a member of" : ""
|
|
24
23
|
].filter(Boolean).join(" ") : "";
|
|
25
24
|
let i = "";
|
|
26
|
-
n && (i = l === "direct" ? ` ${
|
|
27
|
-
const
|
|
25
|
+
n && (i = l === "direct" ? ` ${u} ` : " ");
|
|
26
|
+
const m = n ? E(c) : "For the borrower's privacy, this loan has been made anonymous.", d = n ? `${r} ${f}${i}` : "", h = `${d}${m}`;
|
|
28
27
|
return {
|
|
29
|
-
borrowerNameWithCountry:
|
|
28
|
+
borrowerNameWithCountry: f,
|
|
30
29
|
loanUsePrefixStart: r ? `${r} ` : "",
|
|
31
30
|
loanUsePrefixEnd: i,
|
|
32
|
-
statementTitle:
|
|
33
|
-
visibleUseStatement:
|
|
31
|
+
statementTitle: h.length > $ ? h : void 0,
|
|
32
|
+
visibleUseStatement: L(m, $ - d.length)
|
|
34
33
|
};
|
|
35
34
|
}
|
|
36
35
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
$ as POST_GOAL_STATEMENT_MAX_LENGTH,
|
|
37
|
+
g as computePostGoalLoanCardStatement
|
|
39
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-f5998610]:hover,.loan-card-use[data-v-f5998610]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-f5998610]{text-decoration-line:underline}.loan-card-progress[data-v-f5998610]:hover,.loan-card-progress[data-v-f5998610]:focus{text-decoration-line:none}.loan-card-use-text[data-v-f5998610] p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;text-overflow:ellipsis}.loan-card-cta[data-v-f5998610] form,.loan-card-cta[data-v-f5998610] fieldset,.loan-card-cta[data-v-f5998610] .tw-w-full,.loan-card-cta[data-v-f5998610] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-f5998610] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}[data-v-f5998610] .amount-dropdown select{height:2.25rem;--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity, 1));padding-left:.5rem}[data-v-f5998610] .goal-variant-callouts span{font-weight:500}.goal-variant-progress-group[data-v-f5998610] div[role=progressbar]{background-color:#d9d9d9}
|
|
@@ -316,7 +316,7 @@ function Q(g, o, t, e, X, L) {
|
|
|
316
316
|
], 2)
|
|
317
317
|
], 10, S);
|
|
318
318
|
}
|
|
319
|
-
const te = /* @__PURE__ */ G(B, [["render", Q], ["__scopeId", "data-v-
|
|
319
|
+
const te = /* @__PURE__ */ G(B, [["render", Q], ["__scopeId", "data-v-f5998610"]]);
|
|
320
320
|
export {
|
|
321
321
|
oe as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
322
322
|
le as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import p from "graphql-tag";
|
|
2
2
|
import W from "numeral";
|
|
3
|
-
import { ref as $, computed as
|
|
3
|
+
import { ref as $, computed as o, watch as H } from "vue";
|
|
4
4
|
import { mdiMapMarker as j, mdiHome as q, mdiLink as z, mdiCached as J } from "@mdi/js";
|
|
5
5
|
import { LOAN_CALLOUTS_FRAGMENT as Q, LOAN_GEOCODE_FRAGMENT as X, LOAN_PROGRESS_FRAGMENT as Y, loanCardComputedProperties as Z, loanCardMethods as ee } from "../utils/loanCard.js";
|
|
6
6
|
import { getDropdownPriceArray as te, getLendCtaSelectedOption as ae, isLessThan25 as oe } from "../utils/loanUtils.js";
|
|
@@ -217,18 +217,18 @@ const d = {
|
|
|
217
217
|
"update:selected-amount"
|
|
218
218
|
],
|
|
219
219
|
setup(e, { emit: a }) {
|
|
220
|
-
const r = $(""), s =
|
|
220
|
+
const r = $(""), s = o(
|
|
221
221
|
() => e.variant === d.postGoal
|
|
222
222
|
), {
|
|
223
223
|
allDataLoaded: C,
|
|
224
224
|
borrowerName: m,
|
|
225
225
|
city: b,
|
|
226
|
-
countryName:
|
|
226
|
+
countryName: N,
|
|
227
227
|
distributionModel: f,
|
|
228
228
|
formattedLocation: c,
|
|
229
|
-
fundraisingPercent:
|
|
230
|
-
hasProgressData:
|
|
231
|
-
imageHash:
|
|
229
|
+
fundraisingPercent: S,
|
|
230
|
+
hasProgressData: _,
|
|
231
|
+
imageHash: w,
|
|
232
232
|
isLoading: B,
|
|
233
233
|
loanAmount: v,
|
|
234
234
|
loanBorrowerCount: L,
|
|
@@ -240,17 +240,17 @@ const d = {
|
|
|
240
240
|
tag: K,
|
|
241
241
|
unreservedAmount: u,
|
|
242
242
|
sharesAvailable: R
|
|
243
|
-
} = Z(e), { clickReadMore: P } = ee(e, a), M =
|
|
243
|
+
} = Z(e), { clickReadMore: P } = ee(e, a), M = o(() => s.value ? void 0 : { width: "100px", height: "100px" }), E = o(() => {
|
|
244
244
|
if (!e.website)
|
|
245
245
|
return "";
|
|
246
246
|
const t = e.website.trim();
|
|
247
247
|
return t.startsWith("http://") || t.startsWith("https://") ? t : `https://${t}`;
|
|
248
|
-
}), G =
|
|
248
|
+
}), G = o(() => {
|
|
249
249
|
if (s.value) return {};
|
|
250
|
-
const t = e.showLightView ? "auto" : "6.75rem",
|
|
251
|
-
return { height: t, maxHeight:
|
|
252
|
-
}), l =
|
|
253
|
-
var t
|
|
250
|
+
const t = e.showLightView ? "auto" : "6.75rem", n = e.showLightView ? "none" : "6.75rem";
|
|
251
|
+
return { height: t, maxHeight: n };
|
|
252
|
+
}), l = o(() => {
|
|
253
|
+
var t;
|
|
254
254
|
return ne({
|
|
255
255
|
anonymizationLevel: (t = e.loan) == null ? void 0 : t.anonymizationLevel,
|
|
256
256
|
borrowerName: m.value,
|
|
@@ -259,18 +259,17 @@ const d = {
|
|
|
259
259
|
loanAmount: v.value,
|
|
260
260
|
loanBorrowerCount: L.value,
|
|
261
261
|
loanStatus: h.value,
|
|
262
|
-
loanUse: y.value
|
|
263
|
-
whySpecial: (o = e.loan) == null ? void 0 : o.whySpecial
|
|
262
|
+
loanUse: y.value
|
|
264
263
|
});
|
|
265
|
-
}), O =
|
|
264
|
+
}), O = o(() => l.value.borrowerNameWithCountry), U = o(() => l.value.loanUsePrefixStart), D = o(() => l.value.loanUsePrefixEnd), V = o(() => l.value.statementTitle), I = o(() => l.value.visibleUseStatement), g = o(() => {
|
|
266
265
|
var i;
|
|
267
266
|
const t = parseFloat(u.value);
|
|
268
267
|
if (!t) return [];
|
|
269
|
-
const
|
|
268
|
+
const n = t < 25 ? parseFloat(`${((i = e.loan) == null ? void 0 : i.minNoteSize) ?? 25}`) : 25;
|
|
270
269
|
return te(
|
|
271
270
|
u.value,
|
|
272
271
|
pe(t),
|
|
273
|
-
|
|
272
|
+
n,
|
|
274
273
|
e.enableFiveDollarsNotes,
|
|
275
274
|
e.isVisitor
|
|
276
275
|
);
|
|
@@ -284,7 +283,7 @@ const d = {
|
|
|
284
283
|
r.value = "";
|
|
285
284
|
return;
|
|
286
285
|
}
|
|
287
|
-
const
|
|
286
|
+
const n = ae(
|
|
288
287
|
e.getCookie,
|
|
289
288
|
e.setCookie,
|
|
290
289
|
e.enableFiveDollarsNotes,
|
|
@@ -293,11 +292,11 @@ const d = {
|
|
|
293
292
|
e.userBalance ? parseFloat(e.userBalance) : void 0,
|
|
294
293
|
e.fiveDollarsSelected
|
|
295
294
|
);
|
|
296
|
-
r.value = t.includes(
|
|
295
|
+
r.value = t.includes(n) ? n : t[0];
|
|
297
296
|
},
|
|
298
297
|
{ immediate: !0 }
|
|
299
298
|
);
|
|
300
|
-
const x =
|
|
299
|
+
const x = o(() => e.showLightView ? 3 : 4);
|
|
301
300
|
return {
|
|
302
301
|
allDataLoaded: C,
|
|
303
302
|
amountOptions: g,
|
|
@@ -305,13 +304,13 @@ const d = {
|
|
|
305
304
|
borrowerName: m,
|
|
306
305
|
borrowerNameWithCountry: O,
|
|
307
306
|
city: b,
|
|
308
|
-
countryName:
|
|
307
|
+
countryName: N,
|
|
309
308
|
distributionModel: f,
|
|
310
309
|
formattedLocation: c,
|
|
311
310
|
formattedWebsite: E,
|
|
312
|
-
fundraisingPercent:
|
|
313
|
-
hasProgressData:
|
|
314
|
-
imageHash:
|
|
311
|
+
fundraisingPercent: S,
|
|
312
|
+
hasProgressData: _,
|
|
313
|
+
imageHash: w,
|
|
315
314
|
isLoading: B,
|
|
316
315
|
isPostGoalVariant: s,
|
|
317
316
|
loanAmount: v,
|
|
@@ -348,12 +347,12 @@ const d = {
|
|
|
348
347
|
a("refresh-button", t);
|
|
349
348
|
},
|
|
350
349
|
handleSelectedAmount: (t) => {
|
|
351
|
-
var
|
|
350
|
+
var n;
|
|
352
351
|
r.value = t, a("update:selected-amount", t), e.kvTrackFunction(
|
|
353
352
|
"Lending",
|
|
354
353
|
"Modify lend amount",
|
|
355
354
|
t,
|
|
356
|
-
e.loanId ?? ((
|
|
355
|
+
e.loanId ?? ((n = e.loan) == null ? void 0 : n.id)
|
|
357
356
|
);
|
|
358
357
|
}
|
|
359
358
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.kv-
|
|
1
|
+
.kv-datepicker .dp__input{font-family:inherit;font-weight:inherit;height:3rem}.kv-datepicker .dp__input:focus-within,.kv-datepicker .dp__input:focus-visible{border-color:rgb(var(--bg-action));border-width:2px;outline:none}.kv-datepicker .dp__disabled{color:rgb(var(--text-tertiary))}.kv-datepicker .dp__theme_light{--dp-primary-color: rgb(var(--bg-primary-inverse));--dp-secondary-color: rgb(var(--bg-tertiary));--dp-icon-color: rgb(var(--bg-action));--dp-hover-icon-color: rgb(var(--bg-action));--dp-border-radius: .25rem;--dp-border-color-focus: rgb(var(--bg-action-highlight));--dp-font-family: inherit, "Postgrotesk", sans-serif;--dp-primary-text-color: rgb(var(--text-primary-inverse));--dp-border-color: rgb(var(--bg-tertiary));--dp-hover-color: rgb(var(--bg-tertiary));--dp-background-color: rgb(var(--bg-primary));--dp-text-color: rgb(var(--text-primary));--dp-menu-border-color: rgb(var(--bg-primary-inverse));--dp-disabled-color: rgb(var(--bg-tertiary), 25%);--dp-disabled-color-text: rgb(var(--bg-tertiary));--dp-success-color: rgb(var(--bg-action));--dp-danger-color: rgb(var(--bg-danger));--dp-highlight-color: rgb(var(--bg-action));--dp-cell-border-radius: .25rem;--dp-loader: rgb(var(--bg-action));--dp-range-between-dates-background-color: rgb(var(--bg-action));--dp-range-between-dates-text-color: rgb(var(--bg-primary));--dp-range-between-border-color: rgb(var(--bg-action))}
|
package/dist/vue/KvDatePicker.js
CHANGED
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
1
|
+
import s from "./KvDatePicker2.js";
|
|
2
|
+
import { resolveComponent as o, openBlock as i, createBlock as _, withCtx as u, createElementVNode as r, normalizeClass as v, createVNode as k, mergeProps as f } from "vue";
|
|
3
3
|
import "./KvDatePicker.css";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function V(l, o, m, a, e, c) {
|
|
13
|
-
const d = s("kv-theme-provider");
|
|
14
|
-
return t(), n(d, { theme: a.themeStyle }, {
|
|
15
|
-
default: _(() => [
|
|
16
|
-
k("div", {
|
|
17
|
-
class: v(["kv-datepicker", m.theme])
|
|
4
|
+
import h from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const V = { class: "kv-datepicker__content" };
|
|
6
|
+
function C(a, e, l, n, t, d) {
|
|
7
|
+
const m = o("vue-date-picker"), c = o("kv-theme-provider");
|
|
8
|
+
return i(), _(c, { theme: n.themeStyle }, {
|
|
9
|
+
default: u(() => [
|
|
10
|
+
r("div", {
|
|
11
|
+
class: v(["kv-datepicker", l.theme])
|
|
18
12
|
}, [
|
|
19
|
-
|
|
20
|
-
(
|
|
21
|
-
|
|
22
|
-
modelValue: e.selectedDate
|
|
23
|
-
|
|
24
|
-
}, l.$attrs, {
|
|
13
|
+
r("div", V, [
|
|
14
|
+
k(m, f({
|
|
15
|
+
modelValue: t.selectedDate,
|
|
16
|
+
"onUpdate:modelValue": e[0] || (e[0] = (p) => t.selectedDate = p)
|
|
17
|
+
}, a.$attrs, {
|
|
25
18
|
"auto-apply": !0,
|
|
26
|
-
"onUpdate:modelValue":
|
|
27
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
28
|
-
])
|
|
19
|
+
"onUpdate:modelValue": d.handleDateChange
|
|
20
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
21
|
+
])
|
|
29
22
|
], 2)
|
|
30
23
|
]),
|
|
31
24
|
_: 1
|
|
32
25
|
}, 8, ["theme"]);
|
|
33
26
|
}
|
|
34
|
-
const
|
|
27
|
+
const y = /* @__PURE__ */ h(s, [["render", C]]);
|
|
35
28
|
export {
|
|
36
|
-
|
|
29
|
+
y as default
|
|
37
30
|
};
|
|
@@ -11,12 +11,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
11
11
|
}>, {
|
|
12
12
|
themeStyle: import('vue').ComputedRef<any>;
|
|
13
13
|
}, {
|
|
14
|
-
datepickerComponent: any;
|
|
15
|
-
datepickerPromise: any;
|
|
16
14
|
selectedDate: any;
|
|
17
|
-
componentKey: number;
|
|
18
15
|
}, {}, {
|
|
19
|
-
loadDatepicker(): Promise<any>;
|
|
20
16
|
handleDateChange(value: any): void;
|
|
21
17
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
22
18
|
modelValue: {
|
|
@@ -54,5 +50,104 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
54
50
|
theme: Record<string, any>;
|
|
55
51
|
tag: string;
|
|
56
52
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
53
|
+
VueDatePicker: {
|
|
54
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<string[]> | import('vue').ExtractPropTypes<import('vue').ComponentObjectPropsOptions<import('@vuepic/vue-datepicker').VueDatePickerProps>>> & {
|
|
55
|
+
onFocus?: (...args: any[]) => any;
|
|
56
|
+
onBlur?: (...args: any[]) => any;
|
|
57
|
+
onOpen?: (...args: any[]) => any;
|
|
58
|
+
"onUpdate:model-value"?: (...args: any[]) => any;
|
|
59
|
+
"onUpdate:model-timezone-value"?: (...args: any[]) => any;
|
|
60
|
+
"onText-submit"?: (...args: any[]) => any;
|
|
61
|
+
onClosed?: (...args: any[]) => any;
|
|
62
|
+
onCleared?: (...args: any[]) => any;
|
|
63
|
+
"onInternal-model-change"?: (...args: any[]) => any;
|
|
64
|
+
"onRecalculate-position"?: (...args: any[]) => any;
|
|
65
|
+
"onFlow-step"?: (...args: any[]) => any;
|
|
66
|
+
"onUpdate-month-year"?: (...args: any[]) => any;
|
|
67
|
+
"onInvalid-select"?: (...args: any[]) => any;
|
|
68
|
+
"onTooltip-open"?: (...args: any[]) => any;
|
|
69
|
+
"onTooltip-close"?: (...args: any[]) => any;
|
|
70
|
+
"onInvalid-fixed-range"?: (...args: any[]) => any;
|
|
71
|
+
"onTime-picker-open"?: (...args: any[]) => any;
|
|
72
|
+
"onTime-picker-close"?: (...args: any[]) => any;
|
|
73
|
+
"onAm-pm-change"?: (...args: any[]) => any;
|
|
74
|
+
"onRange-start"?: (...args: any[]) => any;
|
|
75
|
+
"onRange-end"?: (...args: any[]) => any;
|
|
76
|
+
"onDate-update"?: (...args: any[]) => any;
|
|
77
|
+
"onInvalid-date"?: (...args: any[]) => any;
|
|
78
|
+
"onOverlay-toggle"?: (...args: any[]) => any;
|
|
79
|
+
"onText-input"?: (...args: any[]) => any;
|
|
80
|
+
}, {}, {}, import('vue').ComputedOptions, import('@vuepic/vue-datepicker').PublicMethods, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, import('@vuepic/vue-datepicker').EmitEvents[], import('@vuepic/vue-datepicker').VueDatePickerProps, {
|
|
81
|
+
[x: number]: string;
|
|
82
|
+
} | {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
83
|
+
P: {};
|
|
84
|
+
B: {};
|
|
85
|
+
D: {};
|
|
86
|
+
C: {};
|
|
87
|
+
M: {};
|
|
88
|
+
Defaults: {};
|
|
89
|
+
}, {} & (Readonly<import('vue').ExtractPropTypes<string[]> | import('vue').ExtractPropTypes<import('vue').ComponentObjectPropsOptions<import('@vuepic/vue-datepicker').VueDatePickerProps>>> & {
|
|
90
|
+
onFocus?: (...args: any[]) => any;
|
|
91
|
+
onBlur?: (...args: any[]) => any;
|
|
92
|
+
onOpen?: (...args: any[]) => any;
|
|
93
|
+
"onUpdate:model-value"?: (...args: any[]) => any;
|
|
94
|
+
"onUpdate:model-timezone-value"?: (...args: any[]) => any;
|
|
95
|
+
"onText-submit"?: (...args: any[]) => any;
|
|
96
|
+
onClosed?: (...args: any[]) => any;
|
|
97
|
+
onCleared?: (...args: any[]) => any;
|
|
98
|
+
"onInternal-model-change"?: (...args: any[]) => any;
|
|
99
|
+
"onRecalculate-position"?: (...args: any[]) => any;
|
|
100
|
+
"onFlow-step"?: (...args: any[]) => any;
|
|
101
|
+
"onUpdate-month-year"?: (...args: any[]) => any;
|
|
102
|
+
"onInvalid-select"?: (...args: any[]) => any;
|
|
103
|
+
"onTooltip-open"?: (...args: any[]) => any;
|
|
104
|
+
"onTooltip-close"?: (...args: any[]) => any;
|
|
105
|
+
"onInvalid-fixed-range"?: (...args: any[]) => any;
|
|
106
|
+
"onTime-picker-open"?: (...args: any[]) => any;
|
|
107
|
+
"onTime-picker-close"?: (...args: any[]) => any;
|
|
108
|
+
"onAm-pm-change"?: (...args: any[]) => any;
|
|
109
|
+
"onRange-start"?: (...args: any[]) => any;
|
|
110
|
+
"onRange-end"?: (...args: any[]) => any;
|
|
111
|
+
"onDate-update"?: (...args: any[]) => any;
|
|
112
|
+
"onInvalid-date"?: (...args: any[]) => any;
|
|
113
|
+
"onOverlay-toggle"?: (...args: any[]) => any;
|
|
114
|
+
"onText-input"?: (...args: any[]) => any;
|
|
115
|
+
}), {}, {}, import('vue').ComputedOptions, import('@vuepic/vue-datepicker').PublicMethods, {
|
|
116
|
+
[x: number]: string;
|
|
117
|
+
} | {}>;
|
|
118
|
+
__isFragment?: never;
|
|
119
|
+
__isTeleport?: never;
|
|
120
|
+
__isSuspense?: never;
|
|
121
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<string[]> | import('vue').ExtractPropTypes<import('vue').ComponentObjectPropsOptions<import('@vuepic/vue-datepicker').VueDatePickerProps>>> & {
|
|
122
|
+
onFocus?: (...args: any[]) => any;
|
|
123
|
+
onBlur?: (...args: any[]) => any;
|
|
124
|
+
onOpen?: (...args: any[]) => any;
|
|
125
|
+
"onUpdate:model-value"?: (...args: any[]) => any;
|
|
126
|
+
"onUpdate:model-timezone-value"?: (...args: any[]) => any;
|
|
127
|
+
"onText-submit"?: (...args: any[]) => any;
|
|
128
|
+
onClosed?: (...args: any[]) => any;
|
|
129
|
+
onCleared?: (...args: any[]) => any;
|
|
130
|
+
"onInternal-model-change"?: (...args: any[]) => any;
|
|
131
|
+
"onRecalculate-position"?: (...args: any[]) => any;
|
|
132
|
+
"onFlow-step"?: (...args: any[]) => any;
|
|
133
|
+
"onUpdate-month-year"?: (...args: any[]) => any;
|
|
134
|
+
"onInvalid-select"?: (...args: any[]) => any;
|
|
135
|
+
"onTooltip-open"?: (...args: any[]) => any;
|
|
136
|
+
"onTooltip-close"?: (...args: any[]) => any;
|
|
137
|
+
"onInvalid-fixed-range"?: (...args: any[]) => any;
|
|
138
|
+
"onTime-picker-open"?: (...args: any[]) => any;
|
|
139
|
+
"onTime-picker-close"?: (...args: any[]) => any;
|
|
140
|
+
"onAm-pm-change"?: (...args: any[]) => any;
|
|
141
|
+
"onRange-start"?: (...args: any[]) => any;
|
|
142
|
+
"onRange-end"?: (...args: any[]) => any;
|
|
143
|
+
"onDate-update"?: (...args: any[]) => any;
|
|
144
|
+
"onInvalid-date"?: (...args: any[]) => any;
|
|
145
|
+
"onOverlay-toggle"?: (...args: any[]) => any;
|
|
146
|
+
"onText-input"?: (...args: any[]) => any;
|
|
147
|
+
}, {}, {}, import('vue').ComputedOptions, import('@vuepic/vue-datepicker').PublicMethods, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, import('@vuepic/vue-datepicker').EmitEvents[], import('@vuepic/vue-datepicker').EmitEvents, {
|
|
148
|
+
[x: number]: string;
|
|
149
|
+
} | {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('@vuepic/vue-datepicker').VueDatePickerProps & (new () => {
|
|
150
|
+
$slots: Readonly<import('@vuepic/vue-datepicker').Slots> & import('@vuepic/vue-datepicker').Slots;
|
|
151
|
+
});
|
|
57
152
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
58
153
|
export default _default;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { computed as r
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { computed as r } from "vue";
|
|
2
|
+
import a from "@vuepic/vue-datepicker";
|
|
3
|
+
import "@vuepic/vue-datepicker/dist/main.css";
|
|
4
|
+
import { defaultTheme as t, stoneDarkTheme as n, stoneLightTheme as i, marigoldLightTheme as m, greenLightTheme as h, greenDarkTheme as o } from "@kiva/kv-tokens";
|
|
5
|
+
import s from "./KvThemeProvider.js";
|
|
4
6
|
const p = {
|
|
5
7
|
name: "KvDatePicker",
|
|
6
8
|
components: {
|
|
7
|
-
KvThemeProvider:
|
|
9
|
+
KvThemeProvider: s,
|
|
10
|
+
VueDatePicker: a
|
|
8
11
|
},
|
|
9
12
|
inheritAttrs: !1,
|
|
10
13
|
props: {
|
|
@@ -33,15 +36,15 @@ const p = {
|
|
|
33
36
|
case "default":
|
|
34
37
|
return t;
|
|
35
38
|
case "greenDark":
|
|
36
|
-
return s;
|
|
37
|
-
case "greenLight":
|
|
38
39
|
return o;
|
|
40
|
+
case "greenLight":
|
|
41
|
+
return h;
|
|
39
42
|
case "marigoldLight":
|
|
40
43
|
return m;
|
|
41
44
|
case "stoneLight":
|
|
42
|
-
return n;
|
|
43
|
-
case "stoneDark":
|
|
44
45
|
return i;
|
|
46
|
+
case "stoneDark":
|
|
47
|
+
return n;
|
|
45
48
|
default:
|
|
46
49
|
return t;
|
|
47
50
|
}
|
|
@@ -49,10 +52,7 @@ const p = {
|
|
|
49
52
|
},
|
|
50
53
|
data() {
|
|
51
54
|
return {
|
|
52
|
-
|
|
53
|
-
datepickerPromise: null,
|
|
54
|
-
selectedDate: null,
|
|
55
|
-
componentKey: 0
|
|
55
|
+
selectedDate: null
|
|
56
56
|
};
|
|
57
57
|
},
|
|
58
58
|
watch: {
|
|
@@ -63,19 +63,7 @@ const p = {
|
|
|
63
63
|
immediate: !0
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
mounted() {
|
|
67
|
-
this.loadDatepicker();
|
|
68
|
-
},
|
|
69
66
|
methods: {
|
|
70
|
-
async loadDatepicker() {
|
|
71
|
-
if (!this.datepickerComponent)
|
|
72
|
-
return this.datepickerPromise ? this.datepickerPromise : (this.datepickerPromise = Promise.all([
|
|
73
|
-
import("@vuepic/vue-datepicker"),
|
|
74
|
-
import("@vuepic/vue-datepicker/dist/main.css")
|
|
75
|
-
]).then(async ([e]) => {
|
|
76
|
-
this.datepickerComponent = a(e.default), await this.$nextTick();
|
|
77
|
-
}), this.datepickerPromise);
|
|
78
|
-
},
|
|
79
67
|
handleDateChange(e) {
|
|
80
68
|
this.selectedDate = e, this.$emit("update:model-value", e), this.$emit("change", e);
|
|
81
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.14.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"embla-carousel-fade",
|
|
126
126
|
"popper.js"
|
|
127
127
|
],
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "d0fa7bf1f6f09507d97ff5e7713842e346607cc0"
|
|
129
129
|
}
|