alytus-ff 0.1.18 → 0.1.20
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/App.vue.d.ts +116 -1
- package/dist/alytus-ff.js +164 -25
- package/dist/alytus-ff.umd.cjs +1 -1
- package/dist/components/Avatar/AccountAvatar.vue.d.ts +24 -0
- package/dist/components/Avatar/UserAvatar.vue.d.ts +32 -0
- package/dist/components/Dialog/CustomDialog.vue.d.ts +42 -0
- package/dist/gfx/f37d4aab-2cdb-460b-b34b-008fa581360c-1.jpg +0 -0
- package/dist/index.d.ts +7 -1
- package/dist/modules/vuetify.d.ts +82 -0
- package/dist/style.css +1 -1
- package/dist/types/Account.d.ts +5 -0
- package/dist/types/User.d.ts +7 -0
- package/dist/utils/StringUtil.d.ts +4 -0
- package/package.json +7 -3
- package/src/components/Avatar/AccountAvatar.vue +22 -0
- package/src/components/Avatar/UserAvatar.vue +38 -0
- package/src/components/Dialog/CustomDialog.vue +53 -0
package/dist/App.vue.d.ts
CHANGED
|
@@ -1,2 +1,117 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
showDialog: import('vue').Ref<boolean, boolean>;
|
|
3
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
|
|
4
|
+
UserAvatar: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
user: {
|
|
6
|
+
type: import('vue').PropType<import('.').IUser>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
size: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
baseUrl: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>, {
|
|
18
|
+
fullName: import('vue').ComputedRef<string>;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
+
user: {
|
|
21
|
+
type: import('vue').PropType<import('.').IUser>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
baseUrl: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
33
|
+
AccountAvatar: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
34
|
+
item: {
|
|
35
|
+
type: import('vue').PropType<import('.').IAccount>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
size: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
43
|
+
item: {
|
|
44
|
+
type: import('vue').PropType<import('.').IAccount>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
size: {
|
|
48
|
+
type: NumberConstructor;
|
|
49
|
+
default: number;
|
|
50
|
+
};
|
|
51
|
+
}>> & Readonly<{}>, {
|
|
52
|
+
size: number;
|
|
53
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
PageTitle: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
55
|
+
title: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
description: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: null;
|
|
62
|
+
};
|
|
63
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
64
|
+
title: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
required: true;
|
|
67
|
+
};
|
|
68
|
+
description: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: null;
|
|
71
|
+
};
|
|
72
|
+
}>> & Readonly<{}>, {
|
|
73
|
+
description: string;
|
|
74
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
75
|
+
CustomDialog: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
76
|
+
value: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
required: true;
|
|
79
|
+
};
|
|
80
|
+
title: {
|
|
81
|
+
type: StringConstructor;
|
|
82
|
+
default: null;
|
|
83
|
+
};
|
|
84
|
+
persistent: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
noFooter: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
}>, {}, {}, {}, {
|
|
93
|
+
mdiClose(): string;
|
|
94
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
95
|
+
value: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
required: true;
|
|
98
|
+
};
|
|
99
|
+
title: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
default: null;
|
|
102
|
+
};
|
|
103
|
+
persistent: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
noFooter: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
111
|
+
}>> & Readonly<{}>, {
|
|
112
|
+
title: string;
|
|
113
|
+
persistent: boolean;
|
|
114
|
+
noFooter: boolean;
|
|
115
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
116
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
117
|
export default _default;
|
package/dist/alytus-ff.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as m, openBlock as a, createElementBlock as $, createElementVNode as v, toDisplayString as d, createCommentVNode as y, renderSlot as c, resolveComponent as r, createBlock as p, withCtx as l, createVNode as _, normalizeClass as b, createTextVNode as N, computed as S } from "vue";
|
|
2
|
+
const U = m({
|
|
3
3
|
name: "PageTitle",
|
|
4
4
|
props: {
|
|
5
5
|
title: {
|
|
@@ -11,27 +11,27 @@ const f = p({
|
|
|
11
11
|
default: null
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
}),
|
|
14
|
+
}), f = (e, t) => {
|
|
15
15
|
const o = e.__vccOpts || e;
|
|
16
|
-
for (const [
|
|
17
|
-
o[
|
|
16
|
+
for (const [s, n] of t)
|
|
17
|
+
o[s] = n;
|
|
18
18
|
return o;
|
|
19
|
-
},
|
|
19
|
+
}, q = { class: "mt-6 mb-3 ff-page-title" }, A = { class: "text-h5 ff-title" }, w = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "text-body-2 ff-description"
|
|
22
22
|
};
|
|
23
|
-
function
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
e.description ? (
|
|
23
|
+
function B(e, t, o, s, n, i) {
|
|
24
|
+
return a(), $("div", q, [
|
|
25
|
+
v("div", null, [
|
|
26
|
+
v("span", A, d(e.title), 1),
|
|
27
|
+
e.description ? (a(), $("div", w, d(e.description), 1)) : y("", !0)
|
|
28
28
|
]),
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
v("div", null, [
|
|
30
|
+
c(e.$slots, "buttons")
|
|
31
31
|
])
|
|
32
32
|
]);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const K = /* @__PURE__ */ f(U, [["render", B]]), T = m({
|
|
35
35
|
name: "PageSubtitle",
|
|
36
36
|
props: {
|
|
37
37
|
subtitle: {
|
|
@@ -39,21 +39,160 @@ const v = /* @__PURE__ */ a(f, [["render", b]]), h = p({
|
|
|
39
39
|
required: !0
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
43
|
-
function
|
|
44
|
-
return
|
|
42
|
+
}), D = { class: "text-h6 font-weight-bold mt-7 mb-4" };
|
|
43
|
+
function V(e, t, o, s, n, i) {
|
|
44
|
+
return a(), $("div", D, d(e.subtitle), 1);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const Q = /* @__PURE__ */ f(T, [["render", V]]);
|
|
47
|
+
var P = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";
|
|
48
|
+
const R = m({
|
|
49
|
+
name: "CustomDialog",
|
|
50
|
+
methods: {
|
|
51
|
+
mdiClose() {
|
|
52
|
+
return P;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
props: {
|
|
56
|
+
value: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
required: !0
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: null
|
|
63
|
+
},
|
|
64
|
+
persistent: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
67
|
+
},
|
|
68
|
+
noFooter: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !1
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}), E = { class: "close-btn" };
|
|
74
|
+
function F(e, t, o, s, n, i) {
|
|
75
|
+
const u = r("v-btn"), g = r("v-card-text"), h = r("v-spacer"), C = r("v-card-actions"), k = r("v-card"), L = r("v-dialog");
|
|
76
|
+
return a(), p(L, {
|
|
77
|
+
"model-value": e.value,
|
|
78
|
+
"max-width": "960",
|
|
79
|
+
persistent: e.persistent,
|
|
80
|
+
fullscreen: e.$vuetify.display.smAndDown,
|
|
81
|
+
class: "ff-dialog",
|
|
82
|
+
"onUpdate:modelValue": t[1] || (t[1] = (z) => e.$emit("close"))
|
|
83
|
+
}, {
|
|
84
|
+
default: l(() => [
|
|
85
|
+
c(e.$slots, "card", {}, () => [
|
|
86
|
+
_(k, { title: e.title }, {
|
|
87
|
+
append: l(() => [
|
|
88
|
+
v("div", E, [
|
|
89
|
+
_(u, {
|
|
90
|
+
variant: "text",
|
|
91
|
+
icon: e.mdiClose(),
|
|
92
|
+
onClick: t[0] || (t[0] = (z) => e.$emit("close"))
|
|
93
|
+
}, null, 8, ["icon"])
|
|
94
|
+
])
|
|
95
|
+
]),
|
|
96
|
+
default: l(() => [
|
|
97
|
+
_(g, null, {
|
|
98
|
+
default: l(() => [
|
|
99
|
+
c(e.$slots, "default")
|
|
100
|
+
]),
|
|
101
|
+
_: 3
|
|
102
|
+
}),
|
|
103
|
+
e.noFooter ? y("", !0) : (a(), p(C, { key: 0 }, {
|
|
104
|
+
default: l(() => [
|
|
105
|
+
c(e.$slots, "left-footer"),
|
|
106
|
+
_(h),
|
|
107
|
+
c(e.$slots, "footer")
|
|
108
|
+
]),
|
|
109
|
+
_: 3
|
|
110
|
+
}))
|
|
111
|
+
]),
|
|
112
|
+
_: 3
|
|
113
|
+
}, 8, ["title"])
|
|
114
|
+
])
|
|
115
|
+
]),
|
|
116
|
+
_: 3
|
|
117
|
+
}, 8, ["model-value", "persistent", "fullscreen"]);
|
|
118
|
+
}
|
|
119
|
+
const W = /* @__PURE__ */ f(R, [["render", F]]), I = m({
|
|
120
|
+
name: "AccountAvatar",
|
|
121
|
+
props: {
|
|
122
|
+
item: {
|
|
123
|
+
type: Object,
|
|
124
|
+
required: !0
|
|
125
|
+
},
|
|
126
|
+
size: {
|
|
127
|
+
type: Number,
|
|
128
|
+
default: 32
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
function O(e, t, o, s, n, i) {
|
|
133
|
+
const u = r("v-avatar");
|
|
134
|
+
return a(), p(u, {
|
|
135
|
+
class: b(`ff-avatar avatar-${e.size}-${e.item.initials.length >= 3 ? "l" : "s"}`),
|
|
136
|
+
size: e.size
|
|
137
|
+
}, {
|
|
138
|
+
default: l(() => [
|
|
139
|
+
N(d(e.item.initials), 1)
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
}, 8, ["class", "size"]);
|
|
143
|
+
}
|
|
144
|
+
const X = /* @__PURE__ */ f(I, [["render", O]]), M = (e) => e.surname ? `${e.name} ${e.surname}` : e.name, Z = m({
|
|
145
|
+
name: "UserAvatar",
|
|
146
|
+
props: {
|
|
147
|
+
user: {
|
|
148
|
+
type: Object,
|
|
149
|
+
required: !0
|
|
150
|
+
},
|
|
151
|
+
size: {
|
|
152
|
+
type: Number,
|
|
153
|
+
required: !0
|
|
154
|
+
},
|
|
155
|
+
baseUrl: {
|
|
156
|
+
type: String,
|
|
157
|
+
required: !0
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
setup(e) {
|
|
161
|
+
return { fullName: S(() => M(e.user)) };
|
|
162
|
+
}
|
|
163
|
+
}), G = { key: 1 };
|
|
164
|
+
function H(e, t, o, s, n, i) {
|
|
165
|
+
const u = r("v-img"), g = r("v-avatar");
|
|
166
|
+
return a(), p(g, {
|
|
167
|
+
color: e.user.avatar_thumb ? "light_grey_bg" : e.user.color ?? "primary",
|
|
168
|
+
class: b(`avatar-${e.size}-${e.user.initials.length >= 3 ? "l" : "s"}`),
|
|
169
|
+
size: e.size
|
|
170
|
+
}, {
|
|
171
|
+
default: l(() => [
|
|
172
|
+
e.user.avatar_thumb ? (a(), p(u, {
|
|
173
|
+
key: 0,
|
|
174
|
+
alt: e.fullName,
|
|
175
|
+
src: `${e.baseUrl}/${e.user.avatar_thumb}`
|
|
176
|
+
}, null, 8, ["alt", "src"])) : (a(), $("span", G, d(e.user.initials), 1))
|
|
177
|
+
]),
|
|
178
|
+
_: 1
|
|
179
|
+
}, 8, ["color", "class", "size"]);
|
|
180
|
+
}
|
|
181
|
+
const Y = /* @__PURE__ */ f(Z, [["render", H]]), j = (e) => e ? e.replace(/(?:\r\n|\r|\n)/g, "<br>") : "", x = (e) => {
|
|
47
182
|
let t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
48
183
|
return t ? decodeURIComponent(t[3]) : null;
|
|
49
|
-
},
|
|
184
|
+
}, ee = (e, t, o, s) => {
|
|
50
185
|
let n, i;
|
|
51
|
-
return
|
|
186
|
+
return s == null && (s = "/"), i = "", o && (n = /* @__PURE__ */ new Date(), n.setTime(n.getTime() + o * 24 * 60 * 60 * 1e3), i = "; expires=" + n.toUTCString()), document.cookie = encodeURIComponent(e) + "=" + encodeURIComponent(t) + i + "; path=" + s, !0;
|
|
52
187
|
};
|
|
53
188
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
189
|
+
X as AccountAvatar,
|
|
190
|
+
W as CustomDialog,
|
|
191
|
+
Q as PageSubtitle,
|
|
192
|
+
K as PageTitle,
|
|
193
|
+
Y as UserAvatar,
|
|
194
|
+
M as formatFullName,
|
|
195
|
+
x as getCookie,
|
|
196
|
+
j as nl2br,
|
|
197
|
+
ee as setCookie
|
|
59
198
|
};
|
package/dist/alytus-ff.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["Alytus FF"]={},n.Vue))})(this,function(n,e){"use strict";const
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["Alytus FF"]={},n.Vue))})(this,function(n,e){"use strict";const m=e.defineComponent({name:"PageTitle",props:{title:{type:String,required:!0},description:{type:String,default:null}}}),i=(t,o)=>{const s=t.__vccOpts||t;for(const[a,r]of o)s[a]=r;return s},f={class:"mt-6 mb-3 ff-page-title"},u={class:"text-h5 ff-title"},_={key:0,class:"text-body-2 ff-description"};function $(t,o,s,a,r,l){return e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",null,[e.createElementVNode("span",u,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("div",_,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"buttons")])])}const C=i(m,[["render",$]]),g=e.defineComponent({name:"PageSubtitle",props:{subtitle:{type:String,required:!0}}}),y={class:"text-h6 font-weight-bold mt-7 mb-4"};function k(t,o,s,a,r,l){return e.openBlock(),e.createElementBlock("div",y,e.toDisplayString(t.subtitle),1)}const h=i(g,[["render",k]]);var b="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";const B=e.defineComponent({name:"CustomDialog",methods:{mdiClose(){return b}},props:{value:{type:Boolean,required:!0},title:{type:String,default:null},persistent:{type:Boolean,default:!1},noFooter:{type:Boolean,default:!1}}}),S={class:"close-btn"};function N(t,o,s,a,r,l){const c=e.resolveComponent("v-btn"),d=e.resolveComponent("v-card-text"),F=e.resolveComponent("v-spacer"),O=e.resolveComponent("v-card-actions"),R=e.resolveComponent("v-card"),I=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(I,{"model-value":t.value,"max-width":"960",persistent:t.persistent,fullscreen:t.$vuetify.display.smAndDown,class:"ff-dialog","onUpdate:modelValue":o[1]||(o[1]=M=>t.$emit("close"))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"card",{},()=>[e.createVNode(R,{title:t.title},{append:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(c,{variant:"text",icon:t.mdiClose(),onClick:o[0]||(o[0]=M=>t.$emit("close"))},null,8,["icon"])])]),default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3}),t.noFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O,{key:0},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"left-footer"),e.createVNode(F),e.renderSlot(t.$slots,"footer")]),_:3}))]),_:3},8,["title"])])]),_:3},8,["model-value","persistent","fullscreen"])}const V=i(B,[["render",N]]),w=e.defineComponent({name:"AccountAvatar",props:{item:{type:Object,required:!0},size:{type:Number,default:32}}});function z(t,o,s,a,r,l){const c=e.resolveComponent("v-avatar");return e.openBlock(),e.createBlock(c,{class:e.normalizeClass(`ff-avatar avatar-${t.size}-${t.item.initials.length>=3?"l":"s"}`),size:t.size},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.initials),1)]),_:1},8,["class","size"])}const L=i(w,[["render",z]]),p=t=>t.surname?`${t.name} ${t.surname}`:t.name,A=e.defineComponent({name:"UserAvatar",props:{user:{type:Object,required:!0},size:{type:Number,required:!0},baseUrl:{type:String,required:!0}},setup(t){return{fullName:e.computed(()=>p(t.user))}}}),D={key:1};function T(t,o,s,a,r,l){const c=e.resolveComponent("v-img"),d=e.resolveComponent("v-avatar");return e.openBlock(),e.createBlock(d,{color:t.user.avatar_thumb?"light_grey_bg":t.user.color??"primary",class:e.normalizeClass(`avatar-${t.size}-${t.user.initials.length>=3?"l":"s"}`),size:t.size},{default:e.withCtx(()=>[t.user.avatar_thumb?(e.openBlock(),e.createBlock(c,{key:0,alt:t.fullName,src:`${t.baseUrl}/${t.user.avatar_thumb}`},null,8,["alt","src"])):(e.openBlock(),e.createElementBlock("span",D,e.toDisplayString(t.user.initials),1))]),_:1},8,["color","class","size"])}const U=i(A,[["render",T]]),E=t=>t?t.replace(/(?:\r\n|\r|\n)/g,"<br>"):"",q=t=>{let o=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},P=(t,o,s,a)=>{let r,l;return a==null&&(a="/"),l="",s&&(r=new Date,r.setTime(r.getTime()+s*24*60*60*1e3),l="; expires="+r.toUTCString()),document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(o)+l+"; path="+a,!0};n.AccountAvatar=L,n.CustomDialog=V,n.PageSubtitle=h,n.PageTitle=C,n.UserAvatar=U,n.formatFullName=p,n.getCookie=q,n.nl2br=E,n.setCookie=P,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IAccount } from '../../types/Account.ts';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
item: {
|
|
5
|
+
type: PropType<IAccount>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
size: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
item: {
|
|
14
|
+
type: PropType<IAccount>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
size: {
|
|
18
|
+
type: NumberConstructor;
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {
|
|
22
|
+
size: number;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IUser } from '../../types/User.ts';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
user: {
|
|
5
|
+
type: PropType<IUser>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
size: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
baseUrl: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
fullName: import('vue').ComputedRef<string>;
|
|
18
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
user: {
|
|
20
|
+
type: PropType<IUser>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
baseUrl: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
value: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
title: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: null;
|
|
9
|
+
};
|
|
10
|
+
persistent: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
noFooter: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
}>, {}, {}, {}, {
|
|
19
|
+
mdiClose(): string;
|
|
20
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
21
|
+
value: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
title: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: null;
|
|
28
|
+
};
|
|
29
|
+
persistent: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
noFooter: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{}>, {
|
|
38
|
+
title: string;
|
|
39
|
+
persistent: boolean;
|
|
40
|
+
noFooter: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
export default _default;
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { default as PageTitle } from './components/Page/PageTitle.vue';
|
|
2
2
|
import { default as PageSubtitle } from './components/Page/PageSubtitle.vue';
|
|
3
|
+
import { default as CustomDialog } from './components/Dialog/CustomDialog.vue';
|
|
4
|
+
import { default as AccountAvatar } from './components/Avatar/AccountAvatar.vue';
|
|
5
|
+
import { default as UserAvatar } from './components/Avatar/UserAvatar.vue';
|
|
3
6
|
import { nl2br } from './utils/HtmlUtil.ts';
|
|
4
7
|
import { getCookie, setCookie } from './utils/CookieUtil.ts';
|
|
8
|
+
import { formatFullName } from './utils/StringUtil.ts';
|
|
5
9
|
import { NameValuePair } from './types/Base.ts';
|
|
6
|
-
|
|
10
|
+
import { IAccount } from './types/Account.ts';
|
|
11
|
+
import { IUser } from './types/User.ts';
|
|
12
|
+
export { PageTitle, PageSubtitle, CustomDialog, AccountAvatar, UserAvatar, nl2br, getCookie, setCookie, formatFullName, NameValuePair, IAccount, IUser };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
declare const vuetify: {
|
|
2
|
+
install: (app: import('vue').App) => void;
|
|
3
|
+
defaults: import('vue').Ref<import('vuetify').DefaultsInstance>;
|
|
4
|
+
display: import('vuetify').DisplayInstance;
|
|
5
|
+
theme: import('vuetify').ThemeInstance & {
|
|
6
|
+
install: (app: import('vue').App) => void;
|
|
7
|
+
};
|
|
8
|
+
icons: {
|
|
9
|
+
defaultSet: string;
|
|
10
|
+
aliases: Partial<import('vuetify').IconAliases>;
|
|
11
|
+
sets: Record<string, import('vuetify').IconSet>;
|
|
12
|
+
};
|
|
13
|
+
locale: {
|
|
14
|
+
isRtl: import('vue').Ref<boolean>;
|
|
15
|
+
rtl: import('vue').Ref<Record<string, boolean>>;
|
|
16
|
+
rtlClasses: import('vue').Ref<string>;
|
|
17
|
+
name: string;
|
|
18
|
+
messages: import('vue').Ref<import('vuetify').LocaleMessages>;
|
|
19
|
+
current: import('vue').Ref<string>;
|
|
20
|
+
fallback: import('vue').Ref<string>;
|
|
21
|
+
t: (key: string, ...params: unknown[]) => string;
|
|
22
|
+
n: (value: number) => string;
|
|
23
|
+
provide: (props: import('vuetify').LocaleOptions) => import('vuetify').LocaleInstance;
|
|
24
|
+
};
|
|
25
|
+
date: {
|
|
26
|
+
options: {
|
|
27
|
+
adapter: (new (options: {
|
|
28
|
+
locale: any;
|
|
29
|
+
formats?: any;
|
|
30
|
+
}) => import('vuetify').DateInstance) | import('vuetify').DateInstance;
|
|
31
|
+
formats?: Record<string, any>;
|
|
32
|
+
locale: Record<string, any>;
|
|
33
|
+
};
|
|
34
|
+
instance: {
|
|
35
|
+
locale?: any;
|
|
36
|
+
date: (value?: any) => unknown;
|
|
37
|
+
format: (date: unknown, formatString: string) => string;
|
|
38
|
+
toJsDate: (value: unknown) => Date;
|
|
39
|
+
parseISO: (date: string) => unknown;
|
|
40
|
+
toISO: (date: unknown) => string;
|
|
41
|
+
startOfDay: (date: unknown) => unknown;
|
|
42
|
+
endOfDay: (date: unknown) => unknown;
|
|
43
|
+
startOfWeek: (date: unknown, firstDayOfWeek?: number | string) => unknown;
|
|
44
|
+
endOfWeek: (date: unknown) => unknown;
|
|
45
|
+
startOfMonth: (date: unknown) => unknown;
|
|
46
|
+
endOfMonth: (date: unknown) => unknown;
|
|
47
|
+
startOfYear: (date: unknown) => unknown;
|
|
48
|
+
endOfYear: (date: unknown) => unknown;
|
|
49
|
+
isAfter: (date: unknown, comparing: unknown) => boolean;
|
|
50
|
+
isAfterDay: (value: unknown, comparing: unknown) => boolean;
|
|
51
|
+
isSameDay: (date: unknown, comparing: unknown) => boolean;
|
|
52
|
+
isSameMonth: (date: unknown, comparing: unknown) => boolean;
|
|
53
|
+
isSameYear: (value: unknown, comparing: unknown) => boolean;
|
|
54
|
+
isBefore: (date: unknown, comparing: unknown) => boolean;
|
|
55
|
+
isEqual: (date: unknown, comparing: unknown) => boolean;
|
|
56
|
+
isValid: (date: any) => boolean;
|
|
57
|
+
isWithinRange: (date: unknown, range: [unknown, unknown]) => boolean;
|
|
58
|
+
addMinutes: (date: unknown, amount: number) => unknown;
|
|
59
|
+
addHours: (date: unknown, amount: number) => unknown;
|
|
60
|
+
addDays: (date: unknown, amount: number) => unknown;
|
|
61
|
+
addWeeks: (date: unknown, amount: number) => unknown;
|
|
62
|
+
addMonths: (date: unknown, amount: number) => unknown;
|
|
63
|
+
getYear: (date: unknown) => number;
|
|
64
|
+
setYear: (date: unknown, year: number) => unknown;
|
|
65
|
+
getDiff: (date: unknown, comparing: unknown, unit?: string) => number;
|
|
66
|
+
getWeekArray: (date: unknown, firstDayOfWeek?: number | string) => unknown[][];
|
|
67
|
+
getWeekdays: (firstDayOfWeek?: number | string) => string[];
|
|
68
|
+
getMonth: (date: unknown) => number;
|
|
69
|
+
setMonth: (date: unknown, month: number) => unknown;
|
|
70
|
+
getDate: (date: unknown) => number;
|
|
71
|
+
setDate: (date: unknown, day: number) => unknown;
|
|
72
|
+
getNextMonth: (date: unknown) => unknown;
|
|
73
|
+
getPreviousMonth: (date: unknown) => unknown;
|
|
74
|
+
getHours: (date: unknown) => number;
|
|
75
|
+
setHours: (date: unknown, hours: number) => unknown;
|
|
76
|
+
getMinutes: (date: unknown) => number;
|
|
77
|
+
setMinutes: (date: unknown, minutes: number) => unknown;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
goTo: import('vuetify').GoToInstance;
|
|
81
|
+
};
|
|
82
|
+
export default vuetify;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ff-page-title,.ff-page-subtitle{display:flex;justify-content:space-between;align-items:center}.ff-page-title .v-btn,.ff-page-subtitle .v-btn{text-transform:unset;letter-spacing:.045em}
|
|
1
|
+
.ff-page-title,.ff-page-subtitle{display:flex;justify-content:space-between;align-items:center}.ff-page-title .v-btn,.ff-page-subtitle .v-btn{text-transform:unset;letter-spacing:.045em}.ff-dialog.v-dialog .close-btn{margin-right:-4px}@media screen and (min-width: 600px){.ff-dialog.v-dialog .close-btn{margin-right:-12px}}.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-item{padding-left:16px;padding-right:16px}@media screen and (min-width: 600px){.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-item{padding-left:24px;padding-right:24px}}@media screen and (min-width: 960px){.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-item{padding-left:36px;padding-right:36px}}.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-text{padding-left:16px;padding-right:16px}@media screen and (min-width: 600px){.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-text{padding-left:24px;padding-right:24px}}@media screen and (min-width: 960px){.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-text{padding-left:36px;padding-right:36px}}.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-actions{padding:12px 16px 16px}@media screen and (min-width: 600px){.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-actions{padding-left:24px;padding-right:24px}}@media screen and (min-width: 960px){.ff-dialog.v-dialog>.v-overlay__content>.v-card>.v-card-actions{padding-left:36px;padding-right:36px}}.ff-avatar{background:linear-gradient(180deg,#3c3c3c,#4f4f4f 25%,#787878)!important;color:#fff!important}.avatar-96-s{font-size:32px!important;font-weight:500!important}.avatar-96-l{font-size:26px!important;font-weight:500!important}.avatar-32-s{font-size:14px!important;font-weight:500!important;line-height:normal!important;letter-spacing:1px}.avatar-32-l{font-size:11px!important;font-weight:500!important;line-height:normal!important;letter-spacing:1px}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alytus-ff",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.20",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -30,9 +30,12 @@
|
|
|
30
30
|
"vue": "^3.3.11"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"vue": "^3.0.0"
|
|
33
|
+
"vue": "^3.0.0",
|
|
34
|
+
"vuetify": "^3.0.0",
|
|
35
|
+
"@mdi/js": "^7.4.47"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
38
|
+
"@mdi/js": "^7.4.47",
|
|
36
39
|
"@types/node": "^22.5.5",
|
|
37
40
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
38
41
|
"path": "^0.12.7",
|
|
@@ -40,6 +43,7 @@
|
|
|
40
43
|
"vite": "^5.4.1",
|
|
41
44
|
"vite-plugin-dts": "^4.2.1",
|
|
42
45
|
"vue-tsc": "^2.0.29",
|
|
43
|
-
"vue": "^3.3.11"
|
|
46
|
+
"vue": "^3.3.11",
|
|
47
|
+
"vuetify": "^3.6.14"
|
|
44
48
|
}
|
|
45
49
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-avatar :class="`ff-avatar avatar-${size}-${item.initials.length >= 3 ? 'l' : 's'}`" :size="size">{{ item.initials }}</v-avatar>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import {defineComponent, type PropType} from "vue"
|
|
7
|
+
import {IAccount} from "../../types/Account.ts"
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
name: "AccountAvatar",
|
|
11
|
+
props: {
|
|
12
|
+
item: {
|
|
13
|
+
type: Object as PropType<IAccount>,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 32
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-avatar
|
|
3
|
+
:color="user.avatar_thumb ? 'light_grey_bg' : (user.color ?? 'primary')"
|
|
4
|
+
:class="`avatar-${size}-${user.initials.length >= 3 ? 'l' : 's'}`"
|
|
5
|
+
:size="size"
|
|
6
|
+
>
|
|
7
|
+
<v-img v-if="user.avatar_thumb" :alt="fullName" :src="`${baseUrl}/${user.avatar_thumb}`" />
|
|
8
|
+
<span v-else>{{user.initials}}</span>
|
|
9
|
+
</v-avatar>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import {computed, defineComponent, type PropType} from "vue"
|
|
14
|
+
import {IUser} from "../../types/User.ts"
|
|
15
|
+
import {formatFullName} from "../../utils/StringUtil.ts";
|
|
16
|
+
|
|
17
|
+
export default defineComponent({
|
|
18
|
+
name: "UserAvatar",
|
|
19
|
+
props: {
|
|
20
|
+
user: {
|
|
21
|
+
type: Object as PropType<IUser>,
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
type: Number,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
baseUrl: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
setup(props) {
|
|
34
|
+
const fullName = computed(() => formatFullName(props.user))
|
|
35
|
+
return {fullName}
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-dialog :model-value="value" max-width="960" :persistent="persistent" :fullscreen="$vuetify.display.smAndDown" class="ff-dialog" @update:modelValue="$emit('close')">
|
|
3
|
+
<slot name="card">
|
|
4
|
+
<v-card :title="title">
|
|
5
|
+
<template v-slot:append>
|
|
6
|
+
<div class="close-btn">
|
|
7
|
+
<v-btn variant="text" :icon="mdiClose()" @click="$emit('close')" />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<v-card-text>
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</v-card-text>
|
|
13
|
+
<v-card-actions v-if="!noFooter">
|
|
14
|
+
<slot name="left-footer"></slot>
|
|
15
|
+
<v-spacer></v-spacer>
|
|
16
|
+
<slot name="footer"></slot>
|
|
17
|
+
</v-card-actions>
|
|
18
|
+
</v-card>
|
|
19
|
+
</slot>
|
|
20
|
+
</v-dialog>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import {defineComponent} from "vue";
|
|
25
|
+
import {mdiClose} from "@mdi/js";
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: "CustomDialog",
|
|
29
|
+
methods: {
|
|
30
|
+
mdiClose() {
|
|
31
|
+
return mdiClose
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
value: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
title: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: null
|
|
42
|
+
},
|
|
43
|
+
persistent: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
noFooter: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|