@ftlab/one-vue3 0.1.5 → 0.2.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/CHANGELOG.md CHANGED
@@ -7,7 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
9
9
 
10
- ## [v0.1.5](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.4...v0.1.5)
10
+ ## [v0.2.0](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.5...v0.2.0)
11
+
12
+ ### Commits
13
+
14
+ - feat: ftlPasswordDialog add [`c7910c6`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/c7910c6e0c911fcd8d3a279602c3d40420f76e50)
15
+ - feat: add message center [`ec3bcf5`](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/commit/ec3bcf5e744cb0606cb6d10af0200b7dec39604b)
16
+
17
+ ## [v0.1.5](https://gitlab.ftlapp.cn/ftl/ftlab/one-vue3/compare/v0.1.4...v0.1.5) - 2023-08-30
11
18
 
12
19
  ### Commits
13
20
 
package/components.d.ts CHANGED
@@ -9,16 +9,29 @@ declare module 'vue' {
9
9
  export interface GlobalComponents {
10
10
  ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
11
11
  ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
12
+ ElButton: typeof import('element-plus/es')['ElButton']
13
+ ElCard: typeof import('element-plus/es')['ElCard']
14
+ ElDialog: typeof import('element-plus/es')['ElDialog']
15
+ ElDivider: typeof import('element-plus/es')['ElDivider']
12
16
  ElDropdown: typeof import('element-plus/es')['ElDropdown']
13
17
  ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
14
18
  ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
19
+ ElForm: typeof import('element-plus/es')['ElForm']
20
+ ElFormItem: typeof import('element-plus/es')['ElFormItem']
15
21
  ElIcon: typeof import('element-plus/es')['ElIcon']
22
+ ElInput: typeof import('element-plus/es')['ElInput']
16
23
  ElMenu: typeof import('element-plus/es')['ElMenu']
17
24
  ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
18
25
  ElPopover: typeof import('element-plus/es')['ElPopover']
26
+ ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
19
27
  ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
20
28
  ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
29
+ ElTabPane: typeof import('element-plus/es')['ElTabPane']
30
+ ElTabs: typeof import('element-plus/es')['ElTabs']
21
31
  RouterLink: typeof import('vue-router')['RouterLink']
22
32
  RouterView: typeof import('vue-router')['RouterView']
23
33
  }
34
+ export interface ComponentCustomProperties {
35
+ vLoading: typeof import('element-plus/es')['ElLoadingDirective']
36
+ }
24
37
  }
@@ -0,0 +1 @@
1
+ "use strict";var T=Object.defineProperty,M=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var h=(n,o,t)=>o in n?T(n,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[o]=t,w=(n,o)=>{for(var t in o||(o={}))$.call(o,t)&&h(n,t,o[t]);if(v)for(var t of v(o))z.call(o,t)&&h(n,t,o[t]);return n},y=(n,o)=>M(n,U(o));var k=(n,o,t)=>new Promise((s,i)=>{var u=l=>{try{c(t.next(l))}catch(m){i(m)}},f=l=>{try{c(t.throw(l))}catch(m){i(m)}},c=l=>l.done?s(l.value):Promise.resolve(l.value).then(u,f);c((t=t.apply(n,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-d3def9db.cjs"),e=require("vue");require("pinia");const P=r.buildProps({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:r.definePropType(String),default:"solid"}}),I=e.defineComponent({name:"ElDivider"}),A=e.defineComponent(y(w({},I),{props:P,setup(n){const o=n,t=r.useNamespace("divider"),s=e.computed(()=>t.cssVar({"border-style":o.borderStyle}));return(i,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(t).b(),e.unref(t).m(i.direction)]),style:e.normalizeStyle(e.unref(s)),role:"separator"},[i.$slots.default&&i.direction!=="vertical"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(t).e("text"),e.unref(t).is(i.contentPosition)])},[e.renderSlot(i.$slots,"default")],2)):e.createCommentVNode("v-if",!0)],6))}}));var H=r._export_sfc(A,[["__file","/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]);const q=r.withInstall(H);const L={class:"dialog__title"},j=["innerHTML"],F=e.defineComponent({__name:"CheckMessageDialog",emits:["preventHiddenDropdown"],setup(n,{expose:o,emit:t}){const s=e.ref(!1),i=e.inject("authBaseUrl"),u=e.inject("dialogI18n"),f=localStorage.getItem("token")||"",c=e.ref(!1),l=e.ref({}),m={Authorization:`Bearer ${f}`},D=e.computed(()=>`${i||r.configProxy.authBaseUrl||"https://gateway-staging.ftlapp.io"}/api/xpush/imm/userMessage/getUserMsgInfo`),C=d=>k(this,null,function*(){try{c.value=!0;const a=yield r.axios.get(D.value,{headers:m,params:{msgId:d}});a&&a.data&&(l.value=a.data)}catch(a){console.log(a)}finally{c.value=!1}}),_=e.computed(()=>l.value.immAttachments&&l.value.immAttachments.length!==0),B=d=>{d&&window.open(d,"_blank")};return o({open:d=>{C(d),s.value=!0}}),(d,a)=>{const x=q,g=r.ElButton,V=r.ElDropdownItem,S=r.ElDropdownMenu,E=r.ElDropdown,N=r.ElDialog,b=r.vLoading;return e.openBlock(),e.createBlock(N,{center:"",title:e.unref(u).dialogTitleText,modelValue:e.unref(s),"onUpdate:modelValue":a[1]||(a[1]=p=>e.isRef(s)?s.value=p:null),"append-to-body":"",model:!1,onClosed:a[2]||(a[2]=()=>{d.$emit("preventHiddenDropdown")})},{default:e.withCtx(()=>[e.createElementVNode("header",L,e.toDisplayString(e.unref(l).title),1),e.createVNode(x),e.withDirectives(e.createElementVNode("div",{innerHTML:e.unref(l).content},null,8,j),[[b,e.unref(c)]]),e.createElementVNode("footer",{class:e.normalizeClass(["mt15",[e.unref(_)?"f-s-c":"f-c-e"]])},[e.unref(_)?(e.openBlock(),e.createBlock(E,{key:0},{dropdown:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).immAttachments,p=>(e.openBlock(),e.createBlock(V,{key:p.fileDownloadUrl,onClick:()=>B(p.fileDownloadUrl)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.fileName),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u).downloadText),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{onClick:a[0]||(a[0]=p=>s.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u).cancelButtonText),1)]),_:1})],2)]),_:1},8,["title","modelValue"])}}});const O=r._export_sfc$1(F,[["__scopeId","data-v-b6d5935c"]]);exports.default=O;
@@ -0,0 +1,167 @@
1
+ var R = Object.defineProperty, G = Object.defineProperties;
2
+ var J = Object.getOwnPropertyDescriptors;
3
+ var S = Object.getOwnPropertySymbols;
4
+ var K = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
5
+ var M = (n, t, e) => t in n ? R(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, T = (n, t) => {
6
+ for (var e in t || (t = {}))
7
+ K.call(t, e) && M(n, e, t[e]);
8
+ if (S)
9
+ for (var e of S(t))
10
+ O.call(t, e) && M(n, e, t[e]);
11
+ return n;
12
+ }, U = (n, t) => G(n, J(t));
13
+ var V = (n, t, e) => new Promise((i, l) => {
14
+ var u = (s) => {
15
+ try {
16
+ d(e.next(s));
17
+ } catch (_) {
18
+ l(_);
19
+ }
20
+ }, g = (s) => {
21
+ try {
22
+ d(e.throw(s));
23
+ } catch (_) {
24
+ l(_);
25
+ }
26
+ }, d = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(u, g);
27
+ d((e = e.apply(n, t)).next());
28
+ });
29
+ import { b as Q, d as W, u as X, _ as Y, w as Z, c as ee, a as te, E as oe, e as ne, f as se, g as ae, h as le, v as ie, i as re } from "./index-6bb9e8d2.js";
30
+ import { defineComponent as E, computed as k, openBlock as m, createElementBlock as b, normalizeClass as C, unref as o, normalizeStyle as de, renderSlot as ce, createCommentVNode as I, ref as h, inject as $, createBlock as w, isRef as ue, withCtx as c, createElementVNode as y, toDisplayString as f, createVNode as v, withDirectives as pe, Fragment as me, renderList as _e, createTextVNode as D } from "vue";
31
+ import "pinia";
32
+ const fe = Q({
33
+ direction: {
34
+ type: String,
35
+ values: ["horizontal", "vertical"],
36
+ default: "horizontal"
37
+ },
38
+ contentPosition: {
39
+ type: String,
40
+ values: ["left", "center", "right"],
41
+ default: "center"
42
+ },
43
+ borderStyle: {
44
+ type: W(String),
45
+ default: "solid"
46
+ }
47
+ }), ve = E({
48
+ name: "ElDivider"
49
+ }), ge = /* @__PURE__ */ E(U(T({}, ve), {
50
+ props: fe,
51
+ setup(n) {
52
+ const t = n, e = X("divider"), i = k(() => e.cssVar({
53
+ "border-style": t.borderStyle
54
+ }));
55
+ return (l, u) => (m(), b("div", {
56
+ class: C([o(e).b(), o(e).m(l.direction)]),
57
+ style: de(o(i)),
58
+ role: "separator"
59
+ }, [
60
+ l.$slots.default && l.direction !== "vertical" ? (m(), b("div", {
61
+ key: 0,
62
+ class: C([o(e).e("text"), o(e).is(l.contentPosition)])
63
+ }, [
64
+ ce(l.$slots, "default")
65
+ ], 2)) : I("v-if", !0)
66
+ ], 6));
67
+ }
68
+ }));
69
+ var he = /* @__PURE__ */ Y(ge, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]);
70
+ const we = Z(he);
71
+ const ye = { class: "dialog__title" }, De = ["innerHTML"], ke = /* @__PURE__ */ E({
72
+ __name: "CheckMessageDialog",
73
+ emits: ["preventHiddenDropdown"],
74
+ setup(n, { expose: t, emit: e }) {
75
+ const i = h(!1), l = $("authBaseUrl"), u = $("dialogI18n"), g = localStorage.getItem("token") || "", d = h(!1), s = h({}), _ = {
76
+ Authorization: `Bearer ${g}`
77
+ }, N = k(
78
+ () => `${l || ee.authBaseUrl || "https://gateway-staging.ftlapp.io"}/api/xpush/imm/userMessage/getUserMsgInfo`
79
+ ), P = (r) => V(this, null, function* () {
80
+ try {
81
+ d.value = !0;
82
+ const a = yield te.get(N.value, { headers: _, params: { msgId: r } });
83
+ a && a.data && (s.value = a.data);
84
+ } catch (a) {
85
+ console.log(a);
86
+ } finally {
87
+ d.value = !1;
88
+ }
89
+ }), x = k(
90
+ () => s.value.immAttachments && s.value.immAttachments.length !== 0
91
+ ), z = (r) => {
92
+ r && window.open(r, "_blank");
93
+ };
94
+ return t({
95
+ open: (r) => {
96
+ P(r), i.value = !0;
97
+ }
98
+ }), (r, a) => {
99
+ const A = we, B = oe, H = ne, L = se, F = ae, j = le, q = ie;
100
+ return m(), w(j, {
101
+ center: "",
102
+ title: o(u).dialogTitleText,
103
+ modelValue: o(i),
104
+ "onUpdate:modelValue": a[1] || (a[1] = (p) => ue(i) ? i.value = p : null),
105
+ "append-to-body": "",
106
+ model: !1,
107
+ onClosed: a[2] || (a[2] = () => {
108
+ r.$emit("preventHiddenDropdown");
109
+ })
110
+ }, {
111
+ default: c(() => [
112
+ y("header", ye, f(o(s).title), 1),
113
+ v(A),
114
+ pe(y("div", {
115
+ innerHTML: o(s).content
116
+ }, null, 8, De), [
117
+ [q, o(d)]
118
+ ]),
119
+ y("footer", {
120
+ class: C(["mt15", [o(x) ? "f-s-c" : "f-c-e"]])
121
+ }, [
122
+ o(x) ? (m(), w(F, { key: 0 }, {
123
+ dropdown: c(() => [
124
+ v(L, null, {
125
+ default: c(() => [
126
+ (m(!0), b(me, null, _e(o(s).immAttachments, (p) => (m(), w(H, {
127
+ key: p.fileDownloadUrl,
128
+ onClick: () => z(p.fileDownloadUrl)
129
+ }, {
130
+ default: c(() => [
131
+ D(f(p.fileName), 1)
132
+ ]),
133
+ _: 2
134
+ }, 1032, ["onClick"]))), 128))
135
+ ]),
136
+ _: 1
137
+ })
138
+ ]),
139
+ default: c(() => [
140
+ v(B, null, {
141
+ default: c(() => [
142
+ D(f(o(u).downloadText), 1)
143
+ ]),
144
+ _: 1
145
+ })
146
+ ]),
147
+ _: 1
148
+ })) : I("", !0),
149
+ v(B, {
150
+ onClick: a[0] || (a[0] = (p) => i.value = !1)
151
+ }, {
152
+ default: c(() => [
153
+ D(f(o(u).cancelButtonText), 1)
154
+ ]),
155
+ _: 1
156
+ })
157
+ ], 2)
158
+ ]),
159
+ _: 1
160
+ }, 8, ["title", "modelValue"]);
161
+ };
162
+ }
163
+ });
164
+ const Be = /* @__PURE__ */ re(ke, [["__scopeId", "data-v-b6d5935c"]]);
165
+ export {
166
+ Be as default
167
+ };