@m2s2/vue-lib 2.5.2 → 2.6.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/index.cjs +1 -1
- package/dist/index.mjs +58 -57
- package/dist/{index16.cjs → index17.cjs} +1 -1
- package/dist/{index16.mjs → index17.mjs} +1 -1
- package/dist/{index22.cjs → index23.cjs} +1 -1
- package/dist/{index22.mjs → index23.mjs} +1 -1
- package/dist/{index24.cjs → index25.cjs} +1 -1
- package/dist/{index24.mjs → index25.mjs} +1 -1
- package/dist/index27.cjs +2 -0
- package/dist/index27.mjs +363 -0
- package/dist/{index28.cjs → index29.cjs} +1 -1
- package/dist/{index28.mjs → index29.mjs} +1 -1
- package/dist/{index30.cjs → index31.cjs} +1 -1
- package/dist/{index30.mjs → index31.mjs} +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.mjs +40 -9
- package/dist/index36.cjs +1 -1
- package/dist/index36.mjs +9 -85
- package/dist/index37.cjs +1 -0
- package/dist/index37.mjs +87 -0
- package/dist/index39.cjs +1 -1
- package/dist/index39.mjs +30 -9
- package/dist/index40.cjs +1 -1
- package/dist/index40.mjs +9 -26
- package/dist/index41.cjs +1 -0
- package/dist/index41.mjs +28 -0
- package/dist/index43.cjs +1 -1
- package/dist/index43.mjs +30 -9
- package/dist/index44.cjs +1 -1
- package/dist/index44.mjs +9 -34
- package/dist/index45.cjs +1 -1
- package/dist/index45.mjs +34 -9
- package/dist/index46.cjs +1 -1
- package/dist/index46.mjs +9 -49
- package/dist/index47.cjs +1 -0
- package/dist/index47.mjs +51 -0
- package/dist/index51.cjs +1 -1
- package/dist/index51.mjs +27 -3
- package/dist/index52.cjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.cjs +1 -1
- package/dist/index56.mjs +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.mjs +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.mjs +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.mjs +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.mjs +1 -1
- package/dist/index63.cjs +1 -1
- package/dist/index63.mjs +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.mjs +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.mjs +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.mjs +1 -1
- package/dist/index67.cjs +1 -1
- package/dist/index67.mjs +3 -2
- package/dist/index68.cjs +1 -1
- package/dist/index68.mjs +2 -3
- package/dist/index69.cjs +1 -1
- package/dist/index69.mjs +3 -2
- package/dist/index70.cjs +1 -1
- package/dist/index70.mjs +2 -3
- package/dist/index71.cjs +1 -1
- package/dist/index71.mjs +3 -2
- package/dist/index72.cjs +1 -1
- package/dist/index72.mjs +1 -1
- package/dist/index73.cjs +1 -1
- package/dist/index73.mjs +2 -3
- package/dist/index74.cjs +1 -1
- package/dist/index74.mjs +1 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.mjs +3 -51
- package/dist/index76.cjs +1 -59
- package/dist/index76.mjs +51 -1150
- package/dist/index77.cjs +1 -1
- package/dist/index77.mjs +5 -21
- package/dist/index78.cjs +59 -5
- package/dist/index78.mjs +1150 -19
- package/dist/index79.cjs +1 -1
- package/dist/index79.mjs +21 -5
- package/dist/index80.cjs +5 -1
- package/dist/index80.mjs +19 -4
- package/dist/index81.cjs +1 -1
- package/dist/index81.mjs +4 -2
- package/dist/index82.cjs +1 -0
- package/dist/index82.mjs +4 -0
- package/dist/vue-lib/src/components/BlogEditor/BlogEditor.vue.d.ts +9 -0
- package/dist/vue-lib/src/components/BlogEditor/BlogEditor.vue.d.ts.map +1 -1
- package/dist/vue-lib/src/index.d.ts +1 -0
- package/dist/vue-lib/src/index.d.ts.map +1 -1
- package/dist/vue-lib.css +1 -1
- package/package.json +1 -1
- package/dist/index26.cjs +0 -2
- package/dist/index26.mjs +0 -321
- package/dist/index34.cjs +0 -1
- package/dist/index34.mjs +0 -42
- package/dist/index38.cjs +0 -1
- package/dist/index38.mjs +0 -32
- package/dist/index42.cjs +0 -1
- package/dist/index42.mjs +0 -32
- package/dist/index50.cjs +0 -1
- package/dist/index50.mjs +0 -29
- /package/dist/{index10.cjs → index11.cjs} +0 -0
- /package/dist/{index10.mjs → index11.mjs} +0 -0
- /package/dist/{index12.cjs → index13.cjs} +0 -0
- /package/dist/{index12.mjs → index13.mjs} +0 -0
- /package/dist/{index14.cjs → index15.cjs} +0 -0
- /package/dist/{index14.mjs → index15.mjs} +0 -0
- /package/dist/{index18.cjs → index19.cjs} +0 -0
- /package/dist/{index18.mjs → index19.mjs} +0 -0
- /package/dist/{index20.cjs → index21.cjs} +0 -0
- /package/dist/{index20.mjs → index21.mjs} +0 -0
- /package/dist/{index2.cjs → index3.cjs} +0 -0
- /package/dist/{index2.mjs → index3.mjs} +0 -0
- /package/dist/{index32.cjs → index33.cjs} +0 -0
- /package/dist/{index32.mjs → index33.mjs} +0 -0
- /package/dist/{index48.cjs → index49.cjs} +0 -0
- /package/dist/{index48.mjs → index49.mjs} +0 -0
- /package/dist/{index4.cjs → index5.cjs} +0 -0
- /package/dist/{index4.mjs → index5.mjs} +0 -0
- /package/dist/{index6.cjs → index7.cjs} +0 -0
- /package/dist/{index6.mjs → index7.mjs} +0 -0
- /package/dist/{index8.cjs → index9.cjs} +0 -0
- /package/dist/{index8.mjs → index9.mjs} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const e=require("./index3.cjs");;/* empty css */const r=require("./index5.cjs");;/* empty css */const u=require("./index7.cjs");;/* empty css */const t=require("./index9.cjs");;/* empty css */const _=require("./index11.cjs");;/* empty css */const i=require("./index13.cjs");;/* empty css */const s=require("./index15.cjs");;/* empty css */const a=require("./index17.cjs");;/* empty css */const o=require("./index19.cjs");;/* empty css */const p=require("./index21.cjs");;/* empty css */const n=require("./index23.cjs");;/* empty css */const c=require("./index25.cjs");;/* empty css */const v=require("./index27.cjs");;/* empty css */const q=require("./index29.cjs");;/* empty css */const l=require("./index31.cjs");;/* empty css */const g=require("./index33.cjs");;/* empty css */const d=require("./index35.cjs"),y=require("./index36.cjs"),P=require("./index37.cjs");;/* empty css */const S=require("./index39.cjs"),D=require("./index40.cjs"),h=require("./index41.cjs");;/* empty css */const b=require("./index43.cjs"),m=require("./index44.cjs"),B=require("./index45.cjs"),C=require("./index46.cjs"),T=require("./index47.cjs");;/* empty css */const w=require("./index49.cjs");;/* empty css */const F=require("./index51.cjs");exports.Chat=e;exports.SectionHeader=r;exports.StatRow=u;exports.StatusBadge=t;exports.PageHeader=_;exports.CtaSection=i;exports.ProcessSteps=s;exports.Footer=a;exports.Navbar=o;exports.BaseCard=p;exports.FeatureCard=n;exports.BlogCard=c;exports.BlogEditor=v;exports.DataTable=q;exports.SubscribeForm=l;exports.Dialog=g;exports.DialogProvider=d;exports.useDialog=y.useDialog;exports.Panel=P;exports.PanelProvider=S;exports.usePanel=D.usePanel;exports.LoadingButton=h;exports.ThemeProvider=b;exports.useTheme=m.useTheme;exports.AuthProvider=B;exports.useAuth=C.useAuth;exports.Dropdown=T;exports.DropdownItem=w;exports.createM2S2=F.createM2S2;
|
package/dist/index.mjs
CHANGED
|
@@ -1,80 +1,81 @@
|
|
|
1
|
-
import { default as B } from "./index2.mjs";
|
|
2
1
|
/* empty css */
|
|
3
|
-
import { default as
|
|
2
|
+
import { default as C } from "./index3.mjs";
|
|
4
3
|
/* empty css */
|
|
5
|
-
import { default as
|
|
4
|
+
import { default as w } from "./index5.mjs";
|
|
6
5
|
/* empty css */
|
|
7
|
-
import { default as
|
|
6
|
+
import { default as T } from "./index7.mjs";
|
|
8
7
|
/* empty css */
|
|
9
|
-
import { default as
|
|
8
|
+
import { default as H } from "./index9.mjs";
|
|
10
9
|
/* empty css */
|
|
11
|
-
import { default as
|
|
10
|
+
import { default as I } from "./index11.mjs";
|
|
12
11
|
/* empty css */
|
|
13
|
-
import { default as
|
|
12
|
+
import { default as M } from "./index13.mjs";
|
|
14
13
|
/* empty css */
|
|
15
|
-
import { default as
|
|
14
|
+
import { default as R } from "./index15.mjs";
|
|
16
15
|
/* empty css */
|
|
17
|
-
import { default as
|
|
16
|
+
import { default as k } from "./index17.mjs";
|
|
18
17
|
/* empty css */
|
|
19
|
-
import { default as
|
|
18
|
+
import { default as y } from "./index19.mjs";
|
|
20
19
|
/* empty css */
|
|
21
|
-
import { default as
|
|
20
|
+
import { default as G } from "./index21.mjs";
|
|
22
21
|
/* empty css */
|
|
23
|
-
import { default as
|
|
22
|
+
import { default as K } from "./index23.mjs";
|
|
24
23
|
/* empty css */
|
|
25
|
-
import { default as
|
|
24
|
+
import { default as Q } from "./index25.mjs";
|
|
26
25
|
/* empty css */
|
|
27
|
-
import { default as
|
|
26
|
+
import { default as V } from "./index27.mjs";
|
|
28
27
|
/* empty css */
|
|
29
|
-
import { default as
|
|
28
|
+
import { default as X } from "./index29.mjs";
|
|
30
29
|
/* empty css */
|
|
31
|
-
import { default as
|
|
30
|
+
import { default as Z } from "./index31.mjs";
|
|
32
31
|
/* empty css */
|
|
33
|
-
import { default as
|
|
34
|
-
import { useDialog as to } from "./index35.mjs";
|
|
35
|
-
import { default as ao } from "./index36.mjs";
|
|
32
|
+
import { default as $ } from "./index33.mjs";
|
|
36
33
|
/* empty css */
|
|
37
|
-
import { default as
|
|
38
|
-
import {
|
|
39
|
-
import { default as
|
|
34
|
+
import { default as ro } from "./index35.mjs";
|
|
35
|
+
import { useDialog as eo } from "./index36.mjs";
|
|
36
|
+
import { default as mo } from "./index37.mjs";
|
|
40
37
|
/* empty css */
|
|
41
|
-
import { default as
|
|
42
|
-
import {
|
|
43
|
-
import { default as
|
|
44
|
-
import { useAuth as co } from "./index45.mjs";
|
|
45
|
-
import { default as vo } from "./index46.mjs";
|
|
38
|
+
import { default as po } from "./index39.mjs";
|
|
39
|
+
import { usePanel as uo } from "./index40.mjs";
|
|
40
|
+
import { default as lo } from "./index41.mjs";
|
|
46
41
|
/* empty css */
|
|
47
|
-
import { default as
|
|
42
|
+
import { default as no } from "./index43.mjs";
|
|
43
|
+
import { useTheme as go } from "./index44.mjs";
|
|
44
|
+
import { default as Do } from "./index45.mjs";
|
|
45
|
+
import { useAuth as ho } from "./index46.mjs";
|
|
46
|
+
import { default as Bo } from "./index47.mjs";
|
|
48
47
|
/* empty css */
|
|
49
|
-
import {
|
|
48
|
+
import { default as bo } from "./index49.mjs";
|
|
49
|
+
/* empty css */
|
|
50
|
+
import { createM2S2 as Fo } from "./index51.mjs";
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
Do as AuthProvider,
|
|
53
|
+
G as BaseCard,
|
|
54
|
+
Q as BlogCard,
|
|
55
|
+
V as BlogEditor,
|
|
56
|
+
C as Chat,
|
|
57
|
+
M as CtaSection,
|
|
58
|
+
X as DataTable,
|
|
59
|
+
$ as Dialog,
|
|
60
|
+
ro as DialogProvider,
|
|
61
|
+
Bo as Dropdown,
|
|
62
|
+
bo as DropdownItem,
|
|
63
|
+
K as FeatureCard,
|
|
64
|
+
k as Footer,
|
|
64
65
|
lo as LoadingButton,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
y as Navbar,
|
|
67
|
+
I as PageHeader,
|
|
68
|
+
mo as Panel,
|
|
69
|
+
po as PanelProvider,
|
|
70
|
+
R as ProcessSteps,
|
|
71
|
+
w as SectionHeader,
|
|
72
|
+
T as StatRow,
|
|
73
|
+
H as StatusBadge,
|
|
74
|
+
Z as SubscribeForm,
|
|
75
|
+
no as ThemeProvider,
|
|
76
|
+
Fo as createM2S2,
|
|
77
|
+
ho as useAuth,
|
|
78
|
+
eo as useDialog,
|
|
79
|
+
uo as usePanel,
|
|
80
|
+
go as useTheme
|
|
80
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),a=require("./
|
|
1
|
+
"use strict";const e=require("vue"),a=require("./index76.cjs"),n={class:"m2s2-footer"},l={class:"footer-inner"},s={class:"footer-copy"},c={class:"footer-social","aria-label":"Social links"},i=["href","title","aria-label"],_=e.defineComponent({__name:"Footer",props:{config:{}},setup(o){const r=new Date().getFullYear();return(p,u)=>(e.openBlock(),e.createElementBlock("footer",n,[e.createElementVNode("div",l,[e.createElementVNode("span",s," © "+e.toDisplayString(e.unref(r))+" "+e.toDisplayString(o.config.brandName)+" — All Rights Reserved ",1),e.createElementVNode("nav",c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.config.links,t=>(e.openBlock(),e.createElementBlock("a",e.mergeProps({key:t.type,href:t.href,class:"social-link",title:t.label??t.type,"aria-label":t.label??t.type},{ref_for:!0},t.type!=="email"?{target:"_blank",rel:"noopener noreferrer"}:{}),[e.createVNode(a,{type:t.type},null,8,["type"])],16,i))),128))])])]))}});module.exports=_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as l, openBlock as t, createElementBlock as o, createElementVNode as r, toDisplayString as s, unref as c, Fragment as i, renderList as f, mergeProps as p, createVNode as _ } from "vue";
|
|
2
|
-
import m from "./
|
|
2
|
+
import m from "./index76.mjs";
|
|
3
3
|
const d = { class: "m2s2-footer" }, u = { class: "footer-inner" }, y = { class: "footer-copy" }, h = {
|
|
4
4
|
class: "footer-social",
|
|
5
5
|
"aria-label": "Social links"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=require("./
|
|
1
|
+
"use strict";const e=require("vue"),o=require("./index21.cjs");;/* empty css */const i={class:"fc-header"},l=["innerHTML"],r={class:"fc-title"},a={class:"fc-body"},s={key:0,class:"fc-list"},d={key:1,class:"fc-note"},u=e.defineComponent({__name:"FeatureCard",props:{config:{}},setup(t){return(f,m)=>(e.openBlock(),e.createBlock(o,{featured:t.config.featured??!1},{default:e.withCtx(()=>{var n;return[e.createElementVNode("div",i,[t.config.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:"fc-icon","aria-hidden":"true",innerHTML:t.config.icon},null,8,l)):e.createCommentVNode("",!0),e.createElementVNode("h2",r,e.toDisplayString(t.config.title),1)]),e.createElementVNode("p",a,e.toDisplayString(t.config.body),1),(n=t.config.items)!=null&&n.length?(e.openBlock(),e.createElementBlock("ul",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.config.items,c=>(e.openBlock(),e.createElementBlock("li",{key:c},e.toDisplayString(c),1))),128))])):e.createCommentVNode("",!0),t.config.note?(e.openBlock(),e.createElementBlock("p",d,e.toDisplayString(t.config.note),1)):e.createCommentVNode("",!0)]}),_:1},8,["featured"]))}});module.exports=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, openBlock as t, createBlock as r, withCtx as l, createElementVNode as o, createElementBlock as n, createCommentVNode as i, toDisplayString as c, Fragment as d, renderList as u } from "vue";
|
|
2
|
-
import m from "./
|
|
2
|
+
import m from "./index21.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
const g = { class: "fc-header" }, h = ["innerHTML"], k = { class: "fc-title" }, y = { class: "fc-body" }, _ = {
|
|
5
5
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=require("./
|
|
1
|
+
"use strict";const e=require("vue"),o=require("./index79.cjs"),n={class:"m2s2-blog-card"},a={class:"bc-cover"},i=["src","alt"],s={key:1,class:"bc-cover-placeholder"},l={class:"bc-cover-tag"},r={class:"bc-inner"},d={class:"bc-meta"},m=["dateTime"],g={key:0,class:"bc-reading-time"},f={class:"bc-title"},h=["href"],k={class:"bc-summary"},u={class:"bc-tags"},E=e.defineComponent({__name:"BlogCard",props:{config:{}},setup(t){return(b,B)=>(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",a,[t.config.coverImage?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.config.coverImage,alt:t.config.title,class:"bc-cover-img",loading:"lazy"},null,8,i)):(e.openBlock(),e.createElementBlock("div",s,[e.createElementVNode("span",l,e.toDisplayString(t.config.tags[0]),1)]))]),e.createElementVNode("div",r,[e.createElementVNode("div",d,[e.createElementVNode("time",{dateTime:t.config.date},e.toDisplayString(e.unref(o.formatBlogDate)(t.config.date)),9,m),t.config.readingTime?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(t.config.readingTime)+" min read",1)):e.createCommentVNode("",!0)]),e.createElementVNode("h2",f,[e.createElementVNode("a",{href:`/blog/${t.config.slug}`},e.toDisplayString(t.config.title),9,h)]),e.createElementVNode("p",k,e.toDisplayString(t.config.summary),1),e.createElementVNode("div",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.config.tags,c=>(e.openBlock(),e.createElementBlock("span",{key:c,class:"bc-tag"},e.toDisplayString(c),1))),128))])])]))}});module.exports=E;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, openBlock as c, createElementBlock as s, createElementVNode as t, toDisplayString as o, unref as a, createCommentVNode as d, Fragment as l, renderList as g } from "vue";
|
|
2
|
-
import { formatBlogDate as r } from "./
|
|
2
|
+
import { formatBlogDate as r } from "./index79.mjs";
|
|
3
3
|
const m = { class: "m2s2-blog-card" }, f = { class: "bc-cover" }, h = ["src", "alt"], b = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "bc-cover-placeholder"
|
package/dist/index27.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),se=require("./index78.cjs"),N=require("./index79.cjs"),re=require("./index80.cjs"),de={class:"be-root"},ue={class:"be-meta"},ce={class:"be-field be-field--full"},ve=["value"],me={class:"be-field"},be={class:"be-field"},pe={class:"be-field be-field--full"},fe={class:"be-field be-field--full"},ge={class:"be-field"},Ee={class:"be-tags"},Ve=["aria-label","onClick"],Ne={class:"be-field"},_e={class:"be-field be-field--cover"},ke={class:"be-cover"},xe=["src"],we={class:"be-cover__pick"},ye={class:"be-field be-field--full"},Te=["value"],Pe=["value"],Se={class:"be-field"},Be={class:"be-field"},Ce={key:1,class:"be-field be-field--narrow-pair"},he={class:"be-editor"},De={class:"be-toolbar",role:"toolbar","aria-label":"Formatting"},Ie=["title","onClick"],Ue={class:"be-panes"},Me={class:"be-pane be-pane--write"},Le=["value"],Re={class:"be-pane be-pane--preview"},Fe=["innerHTML"],qe={class:"be-footer"},Oe={class:"be-footer__meta"},Ae=["disabled"],Ke=e.defineComponent({__name:"BlogEditor",props:{initialPost:{default:void 0},coverImageUrl:{default:void 0},existingSeries:{default:()=>[]}},emits:["publish","coverImageSelected"],setup(S,{emit:X}){var D,I,U,M,L,R,F,q,O,A,K,$,H,G,W,j,z;const n=S,B=X,u=e.ref(((D=n.initialPost)==null?void 0:D.title)??""),v=e.ref(((I=n.initialPost)==null?void 0:I.slug)??""),_=e.ref(((U=n.initialPost)==null?void 0:U.date)??N.todayAsIsoDate()),m=e.ref(((M=n.initialPost)==null?void 0:M.summary)??""),k=e.ref(((L=n.initialPost)==null?void 0:L.excerpt)??""),i=e.ref([...((R=n.initialPost)==null?void 0:R.tags)??[]]),c=e.ref(((F=n.initialPost)==null?void 0:F.readingTime)??1),r=e.ref(((q=n.initialPost)==null?void 0:q.content)??""),x=e.ref((O=n.initialPost)==null?void 0:O.coverImage),b=e.ref(""),T=e.ref(!!n.initialPost),C=e.ref(null),d=e.ref("none"),p=e.ref(((K=(A=n.initialPost)==null?void 0:A.series)==null?void 0:K.id)??""),f=e.ref(((H=($=n.initialPost)==null?void 0:$.series)==null?void 0:H.title)??""),g=e.ref(((W=(G=n.initialPost)==null?void 0:G.series)==null?void 0:W.part)??1),E=e.ref(((z=(j=n.initialPost)==null?void 0:j.series)==null?void 0:z.total)??1);e.watch(()=>n.initialPost,a=>{var t,l,o,s;a&&(u.value=a.title,v.value=a.slug,_.value=a.date,m.value=a.summary,k.value=a.excerpt??"",i.value=[...a.tags],c.value=a.readingTime??1,r.value=a.content,x.value=a.coverImage,p.value=((t=a.series)==null?void 0:t.id)??"",f.value=((l=a.series)==null?void 0:l.title)??"",g.value=((o=a.series)==null?void 0:o.part)??1,E.value=((s=a.series)==null?void 0:s.total)??1,T.value=!0)}),e.watch([()=>n.initialPost,()=>n.existingSeries],([a,t])=>{if(!(a!=null&&a.series)){d.value="none";return}const l=t.some(o=>o.id===a.series.id);d.value=l?a.series.id:"__new__"});const Y=e.computed(()=>se.marked.parse(r.value)),h=e.computed(()=>u.value.trim().length>0&&m.value.trim().length>0&&r.value.trim().length>0),P=e.computed(()=>x.value??n.coverImageUrl);function Z(a){const t=a.target.value;if(d.value=t,t!=="none"&&t!=="__new__"){const l=n.existingSeries.find(o=>o.id===t);l&&(p.value=l.id,f.value=l.title)}}function ee(a){u.value=a.target.value,T.value||(v.value=N.generateSlug(u.value)),c.value=N.calcReadingTime(r.value)}function te(a){r.value=a.target.value,c.value=N.calcReadingTime(r.value)}function le(a){if(a.key==="Enter"||a.key===","){a.preventDefault();const t=b.value.trim().replace(/,/g,"").toLowerCase();t&&!i.value.includes(t)&&(i.value=[...i.value,t]),b.value=""}a.key==="Backspace"&&!b.value&&i.value.length&&(i.value=i.value.slice(0,-1))}function ae(a){i.value=i.value.filter(t=>t!==a)}function ne(a){var o;const t=(o=a.target.files)==null?void 0:o[0];if(!t)return;B("coverImageSelected",t);const l=new FileReader;l.onload=()=>{x.value=l.result},l.readAsDataURL(t)}function oe(a){const t=C.value;if(!t)return;const l=t.selectionStart,o=t.selectionEnd,s=r.value;let w,y;if(a.wrap){const[V,J]=a.wrap,Q=s.slice(l,o)||"text";w=s.slice(0,l)+V+Q+J+s.slice(o),y=l+V.length+Q.length+J.length}else if(a.prefix){const V=s.lastIndexOf(`
|
|
2
|
+
`,l-1)+1;w=s.slice(0,V)+a.prefix+s.slice(V),y=l+a.prefix.length}else if(a.block)w=s.slice(0,l)+a.block+s.slice(o),y=l+a.block.length;else return;r.value=w,setTimeout(()=>{t.selectionStart=t.selectionEnd=y,t.focus()},0)}function ie(){if(!h.value)return;let a;if(d.value==="__new__"){const t=p.value.trim();a=t?{id:t,title:f.value.trim()||t,part:g.value,total:E.value}:void 0}else if(d.value!=="none"){const t=n.existingSeries.find(l=>l.id===d.value);a=t?{id:t.id,title:t.title,part:g.value,total:E.value}:void 0}B("publish",{title:u.value,slug:v.value||N.generateSlug(u.value),date:_.value,summary:m.value,excerpt:k.value||void 0,tags:i.value,readingTime:c.value,content:r.value,coverImage:n.coverImageUrl??x.value,series:a})}return(a,t)=>(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("section",ue,[e.createElementVNode("div",ce,[t[11]||(t[11]=e.createElementVNode("label",{class:"be-label"},[e.createTextVNode("Title "),e.createElementVNode("span",{class:"be-required"},"*")],-1)),e.createElementVNode("input",{class:"be-input",type:"text",value:u.value,placeholder:"Post title…",onInput:ee},null,40,ve)]),e.createElementVNode("div",me,[t[12]||(t[12]=e.createElementVNode("label",{class:"be-label"},"Slug",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>v.value=l),class:"be-input",type:"text",placeholder:"post-slug",onInput:t[1]||(t[1]=l=>T.value=!0)},null,544),[[e.vModelText,v.value]])]),e.createElementVNode("div",be,[t[13]||(t[13]=e.createElementVNode("label",{class:"be-label"},"Date",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>_.value=l),class:"be-input",type:"date"},null,512),[[e.vModelText,_.value]])]),e.createElementVNode("div",pe,[t[14]||(t[14]=e.createElementVNode("label",{class:"be-label"},[e.createTextVNode("Summary "),e.createElementVNode("span",{class:"be-required"},"*")],-1)),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":t[3]||(t[3]=l=>m.value=l),class:"be-input be-input--textarea",rows:"2",placeholder:"Short description shown in blog listings…"},null,512),[[e.vModelText,m.value]])]),e.createElementVNode("div",fe,[t[15]||(t[15]=e.createElementVNode("label",{class:"be-label"},[e.createTextVNode("Excerpt "),e.createElementVNode("span",{class:"be-optional"},"(optional)")],-1)),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":t[4]||(t[4]=l=>k.value=l),class:"be-input be-input--textarea",rows:"2",placeholder:"Longer teaser for social previews…"},null,512),[[e.vModelText,k.value]])]),e.createElementVNode("div",ge,[t[16]||(t[16]=e.createElementVNode("label",{class:"be-label"},"Tags",-1)),e.createElementVNode("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,l=>(e.openBlock(),e.createElementBlock("span",{key:l,class:"be-tag"},[e.createTextVNode(e.toDisplayString(l)+" ",1),e.createElementVNode("button",{type:"button",class:"be-tag__remove","aria-label":`Remove tag ${l}`,onClick:o=>ae(l)},"×",8,Ve)]))),128)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[5]||(t[5]=l=>b.value=l),class:"be-tag-input",type:"text",placeholder:"Add tag, press Enter…",onKeydown:le},null,544),[[e.vModelText,b.value]])])]),e.createElementVNode("div",Ne,[t[17]||(t[17]=e.createElementVNode("label",{class:"be-label"},"Reading time (min)",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[6]||(t[6]=l=>c.value=l),class:"be-input be-input--narrow",type:"number",min:"1"},null,512),[[e.vModelText,c.value,void 0,{number:!0}]])]),e.createElementVNode("div",_e,[t[18]||(t[18]=e.createElementVNode("label",{class:"be-label"},"Cover Image",-1)),e.createElementVNode("div",ke,[P.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"be-cover__preview",src:P.value,alt:"Cover preview"},null,8,xe)):e.createCommentVNode("",!0),e.createElementVNode("label",we,[e.createTextVNode(e.toDisplayString(P.value?"Replace":"Choose image")+" ",1),e.createElementVNode("input",{type:"file",accept:"image/*",hidden:"",onChange:ne},null,32)])])]),t[26]||(t[26]=e.createElementVNode("div",{class:"be-field-group-label"},[e.createTextVNode(" Series "),e.createElementVNode("span",{class:"be-optional"},"(optional)")],-1)),e.createElementVNode("div",ye,[t[21]||(t[21]=e.createElementVNode("label",{class:"be-label"},"Series",-1)),e.createElementVNode("select",{class:"be-input be-input--select",value:d.value,onChange:Z},[t[19]||(t[19]=e.createElementVNode("option",{value:"none"},"— None —",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.existingSeries,l=>(e.openBlock(),e.createElementBlock("option",{key:l.id,value:l.id},e.toDisplayString(l.title),9,Pe))),128)),t[20]||(t[20]=e.createElementVNode("option",{value:"__new__"},"+ New series…",-1))],40,Te)]),d.value==="__new__"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Se,[t[22]||(t[22]=e.createElementVNode("label",{class:"be-label"},"Series ID",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[7]||(t[7]=l=>p.value=l),class:"be-input",type:"text",placeholder:"e.g. go-backend"},null,512),[[e.vModelText,p.value]])]),e.createElementVNode("div",Be,[t[23]||(t[23]=e.createElementVNode("label",{class:"be-label"},"Series Title",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[8]||(t[8]=l=>f.value=l),class:"be-input",type:"text",placeholder:"e.g. Go Backend Series"},null,512),[[e.vModelText,f.value]])])],64)):e.createCommentVNode("",!0),d.value!=="none"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",null,[t[24]||(t[24]=e.createElementVNode("label",{class:"be-label"},"Part",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[9]||(t[9]=l=>g.value=l),class:"be-input be-input--narrow",type:"number",min:"1"},null,512),[[e.vModelText,g.value,void 0,{number:!0}]])]),e.createElementVNode("div",null,[t[25]||(t[25]=e.createElementVNode("label",{class:"be-label"},"Total Parts",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[10]||(t[10]=l=>E.value=l),class:"be-input be-input--narrow",type:"number",min:"1"},null,512),[[e.vModelText,E.value,void 0,{number:!0}]])])])):e.createCommentVNode("",!0)]),e.createElementVNode("section",he,[e.createElementVNode("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(re.BLOG_EDITOR_TOOLBAR),l=>(e.openBlock(),e.createElementBlock("button",{key:l.label,type:"button",class:"be-toolbar__btn",title:l.label,onClick:o=>oe(l)},e.toDisplayString(l.icon),9,Ie))),128))]),e.createElementVNode("div",Ue,[e.createElementVNode("div",Me,[t[27]||(t[27]=e.createElementVNode("div",{class:"be-pane__label"}," Markdown ",-1)),e.createElementVNode("textarea",{ref_key:"textareaEl",ref:C,class:"be-pane__textarea",value:r.value,placeholder:"Write your post in markdown…",spellcheck:"true",onInput:te},null,40,Le)]),e.createElementVNode("div",Re,[t[28]||(t[28]=e.createElementVNode("div",{class:"be-pane__label"}," Preview ",-1)),e.createElementVNode("div",{class:"be-pane__preview prose",innerHTML:Y.value},null,8,Fe)])])]),e.createElementVNode("footer",qe,[e.createElementVNode("span",Oe,"~"+e.toDisplayString(c.value)+" min read",1),e.createElementVNode("button",{type:"button",class:"be-publish",disabled:!h.value,onClick:ie}," Publish Post ",8,Ae)])]))}});module.exports=Ke;
|
package/dist/index27.mjs
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { defineComponent as we, ref as i, watch as oe, computed as B, openBlock as d, createElementBlock as v, createElementVNode as l, createTextVNode as g, withDirectives as b, vModelText as c, Fragment as L, renderList as N, toDisplayString as T, createCommentVNode as O, unref as xe } from "vue";
|
|
2
|
+
import { marked as ke } from "./index78.mjs";
|
|
3
|
+
import { todayAsIsoDate as Pe, generateSlug as ue, calcReadingTime as re } from "./index79.mjs";
|
|
4
|
+
import { BLOG_EDITOR_TOOLBAR as Se } from "./index80.mjs";
|
|
5
|
+
const Ce = { class: "be-root" }, Te = { class: "be-meta" }, Ie = { class: "be-field be-field--full" }, Ue = ["value"], Ve = { class: "be-field" }, he = { class: "be-field" }, Ee = { class: "be-field be-field--full" }, Le = { class: "be-field be-field--full" }, De = { class: "be-field" }, Re = { class: "be-tags" }, Be = ["aria-label", "onClick"], Ne = { class: "be-field" }, Oe = { class: "be-field be-field--cover" }, Ae = { class: "be-cover" }, Fe = ["src"], Ke = { class: "be-cover__pick" }, Me = { class: "be-field be-field--full" }, $e = ["value"], He = ["value"], qe = { class: "be-field" }, Ge = { class: "be-field" }, We = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "be-field be-field--narrow-pair"
|
|
8
|
+
}, je = { class: "be-editor" }, ze = {
|
|
9
|
+
class: "be-toolbar",
|
|
10
|
+
role: "toolbar",
|
|
11
|
+
"aria-label": "Formatting"
|
|
12
|
+
}, Je = ["title", "onClick"], Qe = { class: "be-panes" }, Xe = { class: "be-pane be-pane--write" }, Ye = ["value"], Ze = { class: "be-pane be-pane--preview" }, el = ["innerHTML"], ll = { class: "be-footer" }, tl = { class: "be-footer__meta" }, sl = ["disabled"], ul = /* @__PURE__ */ we({
|
|
13
|
+
__name: "BlogEditor",
|
|
14
|
+
props: {
|
|
15
|
+
initialPost: { default: void 0 },
|
|
16
|
+
coverImageUrl: { default: void 0 },
|
|
17
|
+
existingSeries: { default: () => [] }
|
|
18
|
+
},
|
|
19
|
+
emits: ["publish", "coverImageSelected"],
|
|
20
|
+
setup(A, { emit: de }) {
|
|
21
|
+
var $, H, q, G, W, j, z, J, Q, X, Y, Z, ee, le, te, se, ae;
|
|
22
|
+
const a = A, F = de, f = i((($ = a.initialPost) == null ? void 0 : $.title) ?? ""), _ = i(((H = a.initialPost) == null ? void 0 : H.slug) ?? ""), I = i(((q = a.initialPost) == null ? void 0 : q.date) ?? Pe()), y = i(((G = a.initialPost) == null ? void 0 : G.summary) ?? ""), U = i(((W = a.initialPost) == null ? void 0 : W.excerpt) ?? ""), o = i([...((j = a.initialPost) == null ? void 0 : j.tags) ?? []]), m = i(((z = a.initialPost) == null ? void 0 : z.readingTime) ?? 1), r = i(((J = a.initialPost) == null ? void 0 : J.content) ?? ""), V = i((Q = a.initialPost) == null ? void 0 : Q.coverImage), w = i(""), D = i(!!a.initialPost), K = i(null), p = i("none"), x = i(((Y = (X = a.initialPost) == null ? void 0 : X.series) == null ? void 0 : Y.id) ?? ""), k = i(((ee = (Z = a.initialPost) == null ? void 0 : Z.series) == null ? void 0 : ee.title) ?? ""), P = i(((te = (le = a.initialPost) == null ? void 0 : le.series) == null ? void 0 : te.part) ?? 1), S = i(((ae = (se = a.initialPost) == null ? void 0 : se.series) == null ? void 0 : ae.total) ?? 1);
|
|
23
|
+
oe(() => a.initialPost, (s) => {
|
|
24
|
+
var e, t, n, u;
|
|
25
|
+
s && (f.value = s.title, _.value = s.slug, I.value = s.date, y.value = s.summary, U.value = s.excerpt ?? "", o.value = [...s.tags], m.value = s.readingTime ?? 1, r.value = s.content, V.value = s.coverImage, x.value = ((e = s.series) == null ? void 0 : e.id) ?? "", k.value = ((t = s.series) == null ? void 0 : t.title) ?? "", P.value = ((n = s.series) == null ? void 0 : n.part) ?? 1, S.value = ((u = s.series) == null ? void 0 : u.total) ?? 1, D.value = !0);
|
|
26
|
+
}), oe([() => a.initialPost, () => a.existingSeries], ([s, e]) => {
|
|
27
|
+
if (!(s != null && s.series)) {
|
|
28
|
+
p.value = "none";
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const t = e.some((n) => n.id === s.series.id);
|
|
32
|
+
p.value = t ? s.series.id : "__new__";
|
|
33
|
+
});
|
|
34
|
+
const ve = B(() => ke.parse(r.value)), M = B(() => f.value.trim().length > 0 && y.value.trim().length > 0 && r.value.trim().length > 0), R = B(() => V.value ?? a.coverImageUrl);
|
|
35
|
+
function be(s) {
|
|
36
|
+
const e = s.target.value;
|
|
37
|
+
if (p.value = e, e !== "none" && e !== "__new__") {
|
|
38
|
+
const t = a.existingSeries.find((n) => n.id === e);
|
|
39
|
+
t && (x.value = t.id, k.value = t.title);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function ce(s) {
|
|
43
|
+
f.value = s.target.value, D.value || (_.value = ue(f.value)), m.value = re(r.value);
|
|
44
|
+
}
|
|
45
|
+
function pe(s) {
|
|
46
|
+
r.value = s.target.value, m.value = re(r.value);
|
|
47
|
+
}
|
|
48
|
+
function fe(s) {
|
|
49
|
+
if (s.key === "Enter" || s.key === ",") {
|
|
50
|
+
s.preventDefault();
|
|
51
|
+
const e = w.value.trim().replace(/,/g, "").toLowerCase();
|
|
52
|
+
e && !o.value.includes(e) && (o.value = [...o.value, e]), w.value = "";
|
|
53
|
+
}
|
|
54
|
+
s.key === "Backspace" && !w.value && o.value.length && (o.value = o.value.slice(0, -1));
|
|
55
|
+
}
|
|
56
|
+
function me(s) {
|
|
57
|
+
o.value = o.value.filter((e) => e !== s);
|
|
58
|
+
}
|
|
59
|
+
function ge(s) {
|
|
60
|
+
var n;
|
|
61
|
+
const e = (n = s.target.files) == null ? void 0 : n[0];
|
|
62
|
+
if (!e) return;
|
|
63
|
+
F("coverImageSelected", e);
|
|
64
|
+
const t = new FileReader();
|
|
65
|
+
t.onload = () => {
|
|
66
|
+
V.value = t.result;
|
|
67
|
+
}, t.readAsDataURL(e);
|
|
68
|
+
}
|
|
69
|
+
function _e(s) {
|
|
70
|
+
const e = K.value;
|
|
71
|
+
if (!e) return;
|
|
72
|
+
const t = e.selectionStart, n = e.selectionEnd, u = r.value;
|
|
73
|
+
let h, E;
|
|
74
|
+
if (s.wrap) {
|
|
75
|
+
const [C, ie] = s.wrap, ne = u.slice(t, n) || "text";
|
|
76
|
+
h = u.slice(0, t) + C + ne + ie + u.slice(n), E = t + C.length + ne.length + ie.length;
|
|
77
|
+
} else if (s.prefix) {
|
|
78
|
+
const C = u.lastIndexOf(`
|
|
79
|
+
`, t - 1) + 1;
|
|
80
|
+
h = u.slice(0, C) + s.prefix + u.slice(C), E = t + s.prefix.length;
|
|
81
|
+
} else if (s.block)
|
|
82
|
+
h = u.slice(0, t) + s.block + u.slice(n), E = t + s.block.length;
|
|
83
|
+
else
|
|
84
|
+
return;
|
|
85
|
+
r.value = h, setTimeout(() => {
|
|
86
|
+
e.selectionStart = e.selectionEnd = E, e.focus();
|
|
87
|
+
}, 0);
|
|
88
|
+
}
|
|
89
|
+
function ye() {
|
|
90
|
+
if (!M.value) return;
|
|
91
|
+
let s;
|
|
92
|
+
if (p.value === "__new__") {
|
|
93
|
+
const e = x.value.trim();
|
|
94
|
+
s = e ? { id: e, title: k.value.trim() || e, part: P.value, total: S.value } : void 0;
|
|
95
|
+
} else if (p.value !== "none") {
|
|
96
|
+
const e = a.existingSeries.find((t) => t.id === p.value);
|
|
97
|
+
s = e ? { id: e.id, title: e.title, part: P.value, total: S.value } : void 0;
|
|
98
|
+
}
|
|
99
|
+
F("publish", {
|
|
100
|
+
title: f.value,
|
|
101
|
+
slug: _.value || ue(f.value),
|
|
102
|
+
date: I.value,
|
|
103
|
+
summary: y.value,
|
|
104
|
+
excerpt: U.value || void 0,
|
|
105
|
+
tags: o.value,
|
|
106
|
+
readingTime: m.value,
|
|
107
|
+
content: r.value,
|
|
108
|
+
coverImage: a.coverImageUrl ?? V.value,
|
|
109
|
+
series: s
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return (s, e) => (d(), v("div", Ce, [
|
|
113
|
+
l("section", Te, [
|
|
114
|
+
l("div", Ie, [
|
|
115
|
+
e[11] || (e[11] = l("label", { class: "be-label" }, [
|
|
116
|
+
g("Title "),
|
|
117
|
+
l("span", { class: "be-required" }, "*")
|
|
118
|
+
], -1)),
|
|
119
|
+
l("input", {
|
|
120
|
+
class: "be-input",
|
|
121
|
+
type: "text",
|
|
122
|
+
value: f.value,
|
|
123
|
+
placeholder: "Post title…",
|
|
124
|
+
onInput: ce
|
|
125
|
+
}, null, 40, Ue)
|
|
126
|
+
]),
|
|
127
|
+
l("div", Ve, [
|
|
128
|
+
e[12] || (e[12] = l("label", { class: "be-label" }, "Slug", -1)),
|
|
129
|
+
b(l("input", {
|
|
130
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => _.value = t),
|
|
131
|
+
class: "be-input",
|
|
132
|
+
type: "text",
|
|
133
|
+
placeholder: "post-slug",
|
|
134
|
+
onInput: e[1] || (e[1] = (t) => D.value = !0)
|
|
135
|
+
}, null, 544), [
|
|
136
|
+
[c, _.value]
|
|
137
|
+
])
|
|
138
|
+
]),
|
|
139
|
+
l("div", he, [
|
|
140
|
+
e[13] || (e[13] = l("label", { class: "be-label" }, "Date", -1)),
|
|
141
|
+
b(l("input", {
|
|
142
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => I.value = t),
|
|
143
|
+
class: "be-input",
|
|
144
|
+
type: "date"
|
|
145
|
+
}, null, 512), [
|
|
146
|
+
[c, I.value]
|
|
147
|
+
])
|
|
148
|
+
]),
|
|
149
|
+
l("div", Ee, [
|
|
150
|
+
e[14] || (e[14] = l("label", { class: "be-label" }, [
|
|
151
|
+
g("Summary "),
|
|
152
|
+
l("span", { class: "be-required" }, "*")
|
|
153
|
+
], -1)),
|
|
154
|
+
b(l("textarea", {
|
|
155
|
+
"onUpdate:modelValue": e[3] || (e[3] = (t) => y.value = t),
|
|
156
|
+
class: "be-input be-input--textarea",
|
|
157
|
+
rows: "2",
|
|
158
|
+
placeholder: "Short description shown in blog listings…"
|
|
159
|
+
}, null, 512), [
|
|
160
|
+
[c, y.value]
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
l("div", Le, [
|
|
164
|
+
e[15] || (e[15] = l("label", { class: "be-label" }, [
|
|
165
|
+
g("Excerpt "),
|
|
166
|
+
l("span", { class: "be-optional" }, "(optional)")
|
|
167
|
+
], -1)),
|
|
168
|
+
b(l("textarea", {
|
|
169
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => U.value = t),
|
|
170
|
+
class: "be-input be-input--textarea",
|
|
171
|
+
rows: "2",
|
|
172
|
+
placeholder: "Longer teaser for social previews…"
|
|
173
|
+
}, null, 512), [
|
|
174
|
+
[c, U.value]
|
|
175
|
+
])
|
|
176
|
+
]),
|
|
177
|
+
l("div", De, [
|
|
178
|
+
e[16] || (e[16] = l("label", { class: "be-label" }, "Tags", -1)),
|
|
179
|
+
l("div", Re, [
|
|
180
|
+
(d(!0), v(L, null, N(o.value, (t) => (d(), v("span", {
|
|
181
|
+
key: t,
|
|
182
|
+
class: "be-tag"
|
|
183
|
+
}, [
|
|
184
|
+
g(T(t) + " ", 1),
|
|
185
|
+
l("button", {
|
|
186
|
+
type: "button",
|
|
187
|
+
class: "be-tag__remove",
|
|
188
|
+
"aria-label": `Remove tag ${t}`,
|
|
189
|
+
onClick: (n) => me(t)
|
|
190
|
+
}, "×", 8, Be)
|
|
191
|
+
]))), 128)),
|
|
192
|
+
b(l("input", {
|
|
193
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => w.value = t),
|
|
194
|
+
class: "be-tag-input",
|
|
195
|
+
type: "text",
|
|
196
|
+
placeholder: "Add tag, press Enter…",
|
|
197
|
+
onKeydown: fe
|
|
198
|
+
}, null, 544), [
|
|
199
|
+
[c, w.value]
|
|
200
|
+
])
|
|
201
|
+
])
|
|
202
|
+
]),
|
|
203
|
+
l("div", Ne, [
|
|
204
|
+
e[17] || (e[17] = l("label", { class: "be-label" }, "Reading time (min)", -1)),
|
|
205
|
+
b(l("input", {
|
|
206
|
+
"onUpdate:modelValue": e[6] || (e[6] = (t) => m.value = t),
|
|
207
|
+
class: "be-input be-input--narrow",
|
|
208
|
+
type: "number",
|
|
209
|
+
min: "1"
|
|
210
|
+
}, null, 512), [
|
|
211
|
+
[
|
|
212
|
+
c,
|
|
213
|
+
m.value,
|
|
214
|
+
void 0,
|
|
215
|
+
{ number: !0 }
|
|
216
|
+
]
|
|
217
|
+
])
|
|
218
|
+
]),
|
|
219
|
+
l("div", Oe, [
|
|
220
|
+
e[18] || (e[18] = l("label", { class: "be-label" }, "Cover Image", -1)),
|
|
221
|
+
l("div", Ae, [
|
|
222
|
+
R.value ? (d(), v("img", {
|
|
223
|
+
key: 0,
|
|
224
|
+
class: "be-cover__preview",
|
|
225
|
+
src: R.value,
|
|
226
|
+
alt: "Cover preview"
|
|
227
|
+
}, null, 8, Fe)) : O("", !0),
|
|
228
|
+
l("label", Ke, [
|
|
229
|
+
g(T(R.value ? "Replace" : "Choose image") + " ", 1),
|
|
230
|
+
l("input", {
|
|
231
|
+
type: "file",
|
|
232
|
+
accept: "image/*",
|
|
233
|
+
hidden: "",
|
|
234
|
+
onChange: ge
|
|
235
|
+
}, null, 32)
|
|
236
|
+
])
|
|
237
|
+
])
|
|
238
|
+
]),
|
|
239
|
+
e[26] || (e[26] = l("div", { class: "be-field-group-label" }, [
|
|
240
|
+
g(" Series "),
|
|
241
|
+
l("span", { class: "be-optional" }, "(optional)")
|
|
242
|
+
], -1)),
|
|
243
|
+
l("div", Me, [
|
|
244
|
+
e[21] || (e[21] = l("label", { class: "be-label" }, "Series", -1)),
|
|
245
|
+
l("select", {
|
|
246
|
+
class: "be-input be-input--select",
|
|
247
|
+
value: p.value,
|
|
248
|
+
onChange: be
|
|
249
|
+
}, [
|
|
250
|
+
e[19] || (e[19] = l("option", { value: "none" }, "— None —", -1)),
|
|
251
|
+
(d(!0), v(L, null, N(A.existingSeries, (t) => (d(), v("option", {
|
|
252
|
+
key: t.id,
|
|
253
|
+
value: t.id
|
|
254
|
+
}, T(t.title), 9, He))), 128)),
|
|
255
|
+
e[20] || (e[20] = l("option", { value: "__new__" }, "+ New series…", -1))
|
|
256
|
+
], 40, $e)
|
|
257
|
+
]),
|
|
258
|
+
p.value === "__new__" ? (d(), v(L, { key: 0 }, [
|
|
259
|
+
l("div", qe, [
|
|
260
|
+
e[22] || (e[22] = l("label", { class: "be-label" }, "Series ID", -1)),
|
|
261
|
+
b(l("input", {
|
|
262
|
+
"onUpdate:modelValue": e[7] || (e[7] = (t) => x.value = t),
|
|
263
|
+
class: "be-input",
|
|
264
|
+
type: "text",
|
|
265
|
+
placeholder: "e.g. go-backend"
|
|
266
|
+
}, null, 512), [
|
|
267
|
+
[c, x.value]
|
|
268
|
+
])
|
|
269
|
+
]),
|
|
270
|
+
l("div", Ge, [
|
|
271
|
+
e[23] || (e[23] = l("label", { class: "be-label" }, "Series Title", -1)),
|
|
272
|
+
b(l("input", {
|
|
273
|
+
"onUpdate:modelValue": e[8] || (e[8] = (t) => k.value = t),
|
|
274
|
+
class: "be-input",
|
|
275
|
+
type: "text",
|
|
276
|
+
placeholder: "e.g. Go Backend Series"
|
|
277
|
+
}, null, 512), [
|
|
278
|
+
[c, k.value]
|
|
279
|
+
])
|
|
280
|
+
])
|
|
281
|
+
], 64)) : O("", !0),
|
|
282
|
+
p.value !== "none" ? (d(), v("div", We, [
|
|
283
|
+
l("div", null, [
|
|
284
|
+
e[24] || (e[24] = l("label", { class: "be-label" }, "Part", -1)),
|
|
285
|
+
b(l("input", {
|
|
286
|
+
"onUpdate:modelValue": e[9] || (e[9] = (t) => P.value = t),
|
|
287
|
+
class: "be-input be-input--narrow",
|
|
288
|
+
type: "number",
|
|
289
|
+
min: "1"
|
|
290
|
+
}, null, 512), [
|
|
291
|
+
[
|
|
292
|
+
c,
|
|
293
|
+
P.value,
|
|
294
|
+
void 0,
|
|
295
|
+
{ number: !0 }
|
|
296
|
+
]
|
|
297
|
+
])
|
|
298
|
+
]),
|
|
299
|
+
l("div", null, [
|
|
300
|
+
e[25] || (e[25] = l("label", { class: "be-label" }, "Total Parts", -1)),
|
|
301
|
+
b(l("input", {
|
|
302
|
+
"onUpdate:modelValue": e[10] || (e[10] = (t) => S.value = t),
|
|
303
|
+
class: "be-input be-input--narrow",
|
|
304
|
+
type: "number",
|
|
305
|
+
min: "1"
|
|
306
|
+
}, null, 512), [
|
|
307
|
+
[
|
|
308
|
+
c,
|
|
309
|
+
S.value,
|
|
310
|
+
void 0,
|
|
311
|
+
{ number: !0 }
|
|
312
|
+
]
|
|
313
|
+
])
|
|
314
|
+
])
|
|
315
|
+
])) : O("", !0)
|
|
316
|
+
]),
|
|
317
|
+
l("section", je, [
|
|
318
|
+
l("div", ze, [
|
|
319
|
+
(d(!0), v(L, null, N(xe(Se), (t) => (d(), v("button", {
|
|
320
|
+
key: t.label,
|
|
321
|
+
type: "button",
|
|
322
|
+
class: "be-toolbar__btn",
|
|
323
|
+
title: t.label,
|
|
324
|
+
onClick: (n) => _e(t)
|
|
325
|
+
}, T(t.icon), 9, Je))), 128))
|
|
326
|
+
]),
|
|
327
|
+
l("div", Qe, [
|
|
328
|
+
l("div", Xe, [
|
|
329
|
+
e[27] || (e[27] = l("div", { class: "be-pane__label" }, " Markdown ", -1)),
|
|
330
|
+
l("textarea", {
|
|
331
|
+
ref_key: "textareaEl",
|
|
332
|
+
ref: K,
|
|
333
|
+
class: "be-pane__textarea",
|
|
334
|
+
value: r.value,
|
|
335
|
+
placeholder: "Write your post in markdown…",
|
|
336
|
+
spellcheck: "true",
|
|
337
|
+
onInput: pe
|
|
338
|
+
}, null, 40, Ye)
|
|
339
|
+
]),
|
|
340
|
+
l("div", Ze, [
|
|
341
|
+
e[28] || (e[28] = l("div", { class: "be-pane__label" }, " Preview ", -1)),
|
|
342
|
+
l("div", {
|
|
343
|
+
class: "be-pane__preview prose",
|
|
344
|
+
innerHTML: ve.value
|
|
345
|
+
}, null, 8, el)
|
|
346
|
+
])
|
|
347
|
+
])
|
|
348
|
+
]),
|
|
349
|
+
l("footer", ll, [
|
|
350
|
+
l("span", tl, "~" + T(m.value) + " min read", 1),
|
|
351
|
+
l("button", {
|
|
352
|
+
type: "button",
|
|
353
|
+
class: "be-publish",
|
|
354
|
+
disabled: !M.value,
|
|
355
|
+
onClick: ye
|
|
356
|
+
}, " Publish Post ", 8, sl)
|
|
357
|
+
])
|
|
358
|
+
]));
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
export {
|
|
362
|
+
ul as default
|
|
363
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),h=require("./
|
|
1
|
+
"use strict";const e=require("vue"),h=require("./index81.cjs"),f={class:"table-panel"},g={key:0,class:"dt-empty"},y={class:"dt-toolbar"},C=["placeholder","value"],v={class:"dt-pills"},B=["onClick"],E={class:"dt-count"},p={key:0,class:"dt-col-panel"},b=["checked","onChange"],V={class:"dt-scroll"},N=e.defineComponent({__name:"DataTable",props:{columnDefs:{default:()=>[]},colVisibility:{default:()=>({})},statuses:{default:()=>[]},statusFilter:{default:"all"},statusLabels:{default:()=>({})},searchValue:{default:""},searchPlaceholder:{default:"Search…"},totalCount:{default:0},filteredCount:{default:0},emptyMessage:{default:"No data yet."}},emits:["searchChange","statusChange","colToggle"],setup(t,{emit:u}){const i=t,c=u,a=e.ref(!1),s=e.ref(null);function d(o){return h.getStatusLabel(o,i.statusLabels)}function r(o){var n;(n=s.value)!=null&&n.contains(o.target)||(a.value=!1,document.removeEventListener("click",r))}function m(){a.value=!a.value,a.value&&setTimeout(()=>document.addEventListener("click",r),0)}return(o,n)=>(e.openBlock(),e.createElementBlock("div",f,[t.totalCount===0?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(t.emptyMessage),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",y,[t.statuses.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("input",{class:"dt-search",type:"search",placeholder:t.searchPlaceholder,value:t.searchValue,onInput:n[0]||(n[0]=l=>c("searchChange",l.target.value))},null,40,C),e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.statuses,l=>(e.openBlock(),e.createElementBlock("button",{key:l,class:e.normalizeClass(["dt-pill",{"dt-pill--active":t.statusFilter===l}]),onClick:k=>c("statusChange",l)},e.toDisplayString(d(l)),11,B))),128))]),e.createElementVNode("span",E,e.toDisplayString(t.filteredCount)+" of "+e.toDisplayString(t.totalCount),1)],64)):e.createCommentVNode("",!0),t.columnDefs.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"colWrapRef",ref:s,class:"dt-col-wrap"},[e.createElementVNode("button",{class:"dt-col-btn",onClick:m}," ⚙ Columns "),a.value?(e.openBlock(),e.createElementBlock("div",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columnDefs,l=>(e.openBlock(),e.createElementBlock("label",{key:l.key,class:"dt-col-check"},[e.createElementVNode("input",{type:"checkbox",checked:t.colVisibility[l.key]??!0,onChange:k=>c("colToggle",l.key)},null,40,b),e.createTextVNode(" "+e.toDisplayString(l.label),1)]))),128))])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)]),e.createElementVNode("div",V,[e.renderSlot(o.$slots,"default")])],64))]))}});module.exports=N;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, ref as m, openBlock as l, createElementBlock as a, toDisplayString as u, Fragment as i, createElementVNode as s, renderList as k, normalizeClass as L, createCommentVNode as r, createTextVNode as V, renderSlot as D } from "vue";
|
|
2
|
-
import { getStatusLabel as S } from "./
|
|
2
|
+
import { getStatusLabel as S } from "./index81.mjs";
|
|
3
3
|
const T = { class: "table-panel" }, E = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "dt-empty"
|