bt-core-app 2.2.49 → 2.2.51
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.
|
@@ -2,9 +2,7 @@ interface FieldProps {
|
|
|
2
2
|
canSelectNone?: boolean;
|
|
3
3
|
cols?: string | boolean;
|
|
4
4
|
colClass?: any;
|
|
5
|
-
dateFrom?: string;
|
|
6
5
|
format?: string;
|
|
7
|
-
fromNow?: boolean;
|
|
8
6
|
horizontal?: boolean;
|
|
9
7
|
ignoreMinDate?: boolean;
|
|
10
8
|
isEditing?: boolean;
|
|
@@ -17,7 +15,7 @@ interface FieldProps {
|
|
|
17
15
|
required?: boolean;
|
|
18
16
|
rules?: any;
|
|
19
17
|
sm?: string | boolean;
|
|
20
|
-
|
|
18
|
+
startShowingToday?: boolean;
|
|
21
19
|
useTime?: boolean;
|
|
22
20
|
}
|
|
23
21
|
declare const _default: import('vue').DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FieldProps>, {
|
|
@@ -27,7 +25,6 @@ declare const _default: import('vue').DefineComponent<import("vue").ExtractPropT
|
|
|
27
25
|
md: boolean;
|
|
28
26
|
sm: string;
|
|
29
27
|
format: string;
|
|
30
|
-
fromNow: boolean;
|
|
31
28
|
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
29
|
"update:modelValue": (...args: any[]) => void;
|
|
33
30
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FieldProps>, {
|
|
@@ -37,7 +34,6 @@ declare const _default: import('vue').DefineComponent<import("vue").ExtractPropT
|
|
|
37
34
|
md: boolean;
|
|
38
35
|
sm: string;
|
|
39
36
|
format: string;
|
|
40
|
-
fromNow: boolean;
|
|
41
37
|
}>>> & Readonly<{
|
|
42
38
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
43
39
|
}>, {
|
|
@@ -47,7 +43,6 @@ declare const _default: import('vue').DefineComponent<import("vue").ExtractPropT
|
|
|
47
43
|
lg: string | boolean;
|
|
48
44
|
cols: string | boolean;
|
|
49
45
|
isEditing: boolean;
|
|
50
|
-
fromNow: boolean;
|
|
51
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
52
47
|
export default _default;
|
|
53
48
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as q, ref as c, computed as o, inject as r, openBlock as f, createBlock as v, unref as l, normalizeClass as A, withCtx as i, createVNode as s, createTextVNode as B, toDisplayString as S, mergeProps as k } from "vue";
|
|
2
|
+
import F from "../bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs";
|
|
3
3
|
import { useAuth as R } from "../composables/auth.mjs";
|
|
4
4
|
import { useDates as U } from "../composables/dates.mjs";
|
|
5
5
|
import { useTheme as Z } from "vuetify";
|
|
@@ -10,16 +10,14 @@ import { VListItemSubtitle as G } from "../bt-core/core/node_modules/vuetify/lib
|
|
|
10
10
|
import { VListItemTitle as H } from "../bt-core/core/node_modules/vuetify/lib/components/VList/VListItemTitle.mjs";
|
|
11
11
|
import { VMenu as J } from "../bt-core/core/node_modules/vuetify/lib/components/VMenu/VMenu.mjs";
|
|
12
12
|
import { VTextField as K } from "../bt-core/core/node_modules/vuetify/lib/components/VTextField/VTextField.mjs";
|
|
13
|
-
const ne = /* @__PURE__ */
|
|
13
|
+
const ne = /* @__PURE__ */ q({
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
__name: "BT-Field-Date",
|
|
16
16
|
props: {
|
|
17
17
|
canSelectNone: { type: Boolean },
|
|
18
18
|
cols: { type: [String, Boolean], default: "12" },
|
|
19
19
|
colClass: {},
|
|
20
|
-
dateFrom: {},
|
|
21
20
|
format: { default: "ccc dd/LL/yyyy" },
|
|
22
|
-
fromNow: { type: Boolean, default: !1 },
|
|
23
21
|
horizontal: { type: Boolean },
|
|
24
22
|
ignoreMinDate: { type: Boolean },
|
|
25
23
|
isEditing: { type: Boolean, default: void 0 },
|
|
@@ -32,86 +30,86 @@ const ne = /* @__PURE__ */ $({
|
|
|
32
30
|
required: { type: Boolean },
|
|
33
31
|
rules: {},
|
|
34
32
|
sm: { type: [String, Boolean], default: "6" },
|
|
35
|
-
|
|
33
|
+
startShowingToday: { type: Boolean },
|
|
36
34
|
useTime: { type: Boolean }
|
|
37
35
|
},
|
|
38
36
|
emits: ["update:modelValue"],
|
|
39
|
-
setup(T, { emit:
|
|
40
|
-
const
|
|
37
|
+
setup(T, { emit: M }) {
|
|
38
|
+
const h = Z(), u = c(), t = T, I = M, { btString: C, tzString: D } = U(), w = R(), n = o({
|
|
41
39
|
get() {
|
|
42
|
-
return
|
|
40
|
+
return t.modelValue == "0001-01-01T00:00:00" && t.ignoreMinDate ? C() : t.modelValue;
|
|
43
41
|
},
|
|
44
|
-
set(
|
|
45
|
-
|
|
42
|
+
set(e) {
|
|
43
|
+
I("update:modelValue", e == null ? e : `${e.split(".")[0]}Z`);
|
|
46
44
|
}
|
|
47
|
-
}),
|
|
48
|
-
var
|
|
49
|
-
...
|
|
45
|
+
}), d = o(() => t.modelValue ? D(t.modelValue, t.format) : void 0), L = r("isEditing", () => c(!1), !0), g = o(() => t.isEditing ?? L.value), m = r("isMobile", () => c(!1), !0), y = r("viewVariant", "list-item"), z = r("editVariant", "outlined"), V = o(() => {
|
|
46
|
+
var e = [
|
|
47
|
+
...t.rules ?? []
|
|
50
48
|
];
|
|
51
|
-
return
|
|
52
|
-
}),
|
|
53
|
-
return
|
|
54
|
-
class:
|
|
55
|
-
lg:
|
|
56
|
-
md:
|
|
57
|
-
sm:
|
|
58
|
-
cols:
|
|
49
|
+
return t.required && e.push(j), e.length > 0 ? e : void 0;
|
|
50
|
+
}), E = o(() => t.isMobile ?? m.value ? !1 : t.lg), N = o(() => t.isMobile ?? m.value ? !1 : t.md), $ = o(() => t.isMobile ?? m.value ? !1 : t.sm);
|
|
51
|
+
return t.startShowingToday && (u.value = /* @__PURE__ */ new Date()), (e, a) => (f(), v(l(P), {
|
|
52
|
+
class: A(e.colClass),
|
|
53
|
+
lg: E.value,
|
|
54
|
+
md: N.value,
|
|
55
|
+
sm: $.value,
|
|
56
|
+
cols: e.cols
|
|
59
57
|
}, {
|
|
60
58
|
default: i(() => [
|
|
61
|
-
!g.value &&
|
|
59
|
+
!g.value && l(y) == "list-item" ? (f(), v(l(Q), {
|
|
62
60
|
key: 0,
|
|
63
61
|
density: "compact",
|
|
64
|
-
"prepend-icon":
|
|
62
|
+
"prepend-icon": e.prependIcon
|
|
65
63
|
}, {
|
|
66
64
|
default: i(() => [
|
|
67
|
-
|
|
65
|
+
s(l(G), null, {
|
|
68
66
|
default: i(() => [
|
|
69
|
-
|
|
67
|
+
B(S(e.label), 1)
|
|
70
68
|
]),
|
|
71
69
|
_: 1
|
|
72
70
|
}),
|
|
73
|
-
|
|
71
|
+
s(l(H), null, {
|
|
74
72
|
default: i(() => [
|
|
75
|
-
|
|
73
|
+
B(S(d.value), 1)
|
|
76
74
|
]),
|
|
77
75
|
_: 1
|
|
78
76
|
})
|
|
79
77
|
]),
|
|
80
78
|
_: 1
|
|
81
|
-
}, 8, ["prepend-icon"])) : (
|
|
79
|
+
}, 8, ["prepend-icon"])) : (f(), v(l(J), {
|
|
82
80
|
key: 1,
|
|
83
81
|
"open-delay": "5"
|
|
84
82
|
}, {
|
|
85
83
|
activator: i(({ props: p }) => [
|
|
86
|
-
|
|
87
|
-
"append-inner-icon":
|
|
88
|
-
"onClick:appendInner": a[0] || (a[0] = (
|
|
84
|
+
s(l(K), k({
|
|
85
|
+
"append-inner-icon": e.canSelectNone && n.value != null && n.value.length > 0 ? "$close" : void 0,
|
|
86
|
+
"onClick:appendInner": a[0] || (a[0] = (b) => n.value = void 0)
|
|
89
87
|
}, p, {
|
|
90
|
-
"hide-details":
|
|
91
|
-
label:
|
|
88
|
+
"hide-details": V.value == null,
|
|
89
|
+
label: e.label,
|
|
92
90
|
readonly: "",
|
|
93
|
-
rules:
|
|
94
|
-
variant: g.value ?
|
|
95
|
-
modelValue:
|
|
96
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
91
|
+
rules: V.value,
|
|
92
|
+
variant: g.value ? l(z) : l(y),
|
|
93
|
+
modelValue: d.value,
|
|
94
|
+
"onUpdate:modelValue": a[1] || (a[1] = (b) => d.value = b)
|
|
97
95
|
}), null, 16, ["append-inner-icon", "hide-details", "label", "rules", "variant", "modelValue"])
|
|
98
96
|
]),
|
|
99
97
|
default: i(() => [
|
|
100
|
-
|
|
98
|
+
s(l(F), k({
|
|
101
99
|
"auto-apply": "",
|
|
102
|
-
dark:
|
|
103
|
-
"enable-time-picker":
|
|
104
|
-
"focus-start-date":
|
|
100
|
+
dark: l(h).global.current.value.dark,
|
|
101
|
+
"enable-time-picker": e.useTime,
|
|
102
|
+
"focus-start-date": u.value != null,
|
|
105
103
|
inline: "",
|
|
106
104
|
"is-24": !1,
|
|
107
|
-
|
|
108
|
-
"time-picker-inline":
|
|
109
|
-
timezone:
|
|
105
|
+
"start-date": u.value,
|
|
106
|
+
"time-picker-inline": e.useTime,
|
|
107
|
+
timezone: l(w).timeZone.value,
|
|
110
108
|
utc: ""
|
|
111
|
-
},
|
|
109
|
+
}, e.$attrs, {
|
|
112
110
|
modelValue: n.value,
|
|
113
111
|
"onUpdate:modelValue": a[2] || (a[2] = (p) => n.value = p)
|
|
114
|
-
}), null, 16, ["dark", "enable-time-picker", "focus-start-date", "
|
|
112
|
+
}), null, 16, ["dark", "enable-time-picker", "focus-start-date", "start-date", "time-picker-inline", "timezone", "modelValue"])
|
|
115
113
|
]),
|
|
116
114
|
_: 1
|
|
117
115
|
}))
|