alytus-ff 0.1.17 → 0.1.18

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/alytus-ff.js CHANGED
@@ -1,43 +1,37 @@
1
- import { defineComponent as c, openBlock as i, createElementBlock as l, toDisplayString as s, createElementVNode as u, renderSlot as d } from "vue";
2
- const _ = c({
3
- name: "WelcomeText",
4
- props: {
5
- fullName: {
6
- type: String,
7
- required: !0
8
- },
9
- no: {
10
- type: Number,
11
- default: 0
12
- }
13
- }
14
- }), a = (e, n) => {
15
- const t = e.__vccOpts || e;
16
- for (const [r, o] of n)
17
- t[r] = o;
18
- return t;
19
- };
20
- function f(e, n, t, r, o, p) {
21
- return i(), l("h1", null, "Welcome, " + s(e.fullName) + " " + s(e.no), 1);
22
- }
23
- const x = /* @__PURE__ */ a(_, [["render", f], ["__scopeId", "data-v-34d102f4"]]), m = c({
1
+ import { defineComponent as p, openBlock as c, createElementBlock as l, createElementVNode as s, toDisplayString as d, createCommentVNode as u, renderSlot as m } from "vue";
2
+ const f = p({
24
3
  name: "PageTitle",
25
4
  props: {
26
5
  title: {
27
6
  type: String,
28
7
  required: !0
8
+ },
9
+ description: {
10
+ type: String,
11
+ default: null
29
12
  }
30
13
  }
31
- }), $ = { class: "mt-6 mb-3 ff-page-title" }, g = { class: "text-h5 font-weight-bold" };
32
- function b(e, n, t, r, o, p) {
33
- return i(), l("div", $, [
34
- u("span", g, s(e.title), 1),
35
- u("div", null, [
36
- d(e.$slots, "buttons")
14
+ }), a = (e, t) => {
15
+ const o = e.__vccOpts || e;
16
+ for (const [r, n] of t)
17
+ o[r] = n;
18
+ return o;
19
+ }, _ = { class: "mt-6 mb-3 ff-page-title" }, g = { class: "text-h5 ff-title" }, $ = {
20
+ key: 0,
21
+ class: "text-body-2 ff-description"
22
+ };
23
+ function b(e, t, o, r, n, i) {
24
+ return c(), l("div", _, [
25
+ s("div", null, [
26
+ s("span", g, d(e.title), 1),
27
+ e.description ? (c(), l("div", $, d(e.description), 1)) : u("", !0)
28
+ ]),
29
+ s("div", null, [
30
+ m(e.$slots, "buttons")
37
31
  ])
38
32
  ]);
39
33
  }
40
- const N = /* @__PURE__ */ a(m, [["render", b]]), h = c({
34
+ const v = /* @__PURE__ */ a(f, [["render", b]]), h = p({
41
35
  name: "PageSubtitle",
42
36
  props: {
43
37
  subtitle: {
@@ -45,14 +39,21 @@ const N = /* @__PURE__ */ a(m, [["render", b]]), h = c({
45
39
  required: !0
46
40
  }
47
41
  }
48
- }), S = { class: "text-h6 font-weight-bold mt-7 mb-4" };
49
- function v(e, n, t, r, o, p) {
50
- return i(), l("div", S, s(e.subtitle), 1);
42
+ }), k = { class: "text-h6 font-weight-bold mt-7 mb-4" };
43
+ function C(e, t, o, r, n, i) {
44
+ return c(), l("div", k, d(e.subtitle), 1);
51
45
  }
52
- const P = /* @__PURE__ */ a(h, [["render", v]]), T = (e) => e ? e.replace(/(?:\r\n|\r|\n)/g, "<br>") : "";
46
+ const y = /* @__PURE__ */ a(h, [["render", C]]), x = (e) => e ? e.replace(/(?:\r\n|\r|\n)/g, "<br>") : "", T = (e) => {
47
+ let t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
48
+ return t ? decodeURIComponent(t[3]) : null;
49
+ }, P = (e, t, o, r) => {
50
+ let n, i;
51
+ return r == null && (r = "/"), 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=" + r, !0;
52
+ };
53
53
  export {
54
- P as PageSubtitle,
55
- N as PageTitle,
56
- x as WelcomeText,
57
- T as nl2br
54
+ y as PageSubtitle,
55
+ v as PageTitle,
56
+ T as getCookie,
57
+ x as nl2br,
58
+ P as setCookie
58
59
  };
@@ -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 a=e.defineComponent({name:"WelcomeText",props:{fullName:{type:String,required:!0},no:{type:Number,default:0}}}),l=(t,r)=>{const o=t.__vccOpts||t;for(const[i,s]of r)o[i]=s;return o};function p(t,r,o,i,s,c){return e.openBlock(),e.createElementBlock("h1",null,"Welcome, "+e.toDisplayString(t.fullName)+" "+e.toDisplayString(t.no),1)}const d=l(a,[["render",p],["__scopeId","data-v-34d102f4"]]),f=e.defineComponent({name:"PageTitle",props:{title:{type:String,required:!0}}}),u={class:"mt-6 mb-3 ff-page-title"},m={class:"text-h5 font-weight-bold"};function _(t,r,o,i,s,c){return e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("span",m,e.toDisplayString(t.title),1),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"buttons")])])}const g=l(f,[["render",_]]),$=e.defineComponent({name:"PageSubtitle",props:{subtitle:{type:String,required:!0}}}),b={class:"text-h6 font-weight-bold mt-7 mb-4"};function h(t,r,o,i,s,c){return e.openBlock(),e.createElementBlock("div",b,e.toDisplayString(t.subtitle),1)}const y=l($,[["render",h]]),S=t=>t?t.replace(/(?:\r\n|\r|\n)/g,"<br>"):"";n.PageSubtitle=y,n.PageTitle=g,n.WelcomeText=d,n.nl2br=S,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
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 d=e.defineComponent({name:"PageTitle",props:{title:{type:String,required:!0},description:{type:String,default:null}}}),l=(t,o)=>{const r=t.__vccOpts||t;for(const[s,i]of o)r[s]=i;return r},p={class:"mt-6 mb-3 ff-page-title"},a={class:"text-h5 ff-title"},f={key:0,class:"text-body-2 ff-description"};function m(t,o,r,s,i,c){return e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",null,[e.createElementVNode("span",a,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"buttons")])])}const u=l(d,[["render",m]]),g=e.defineComponent({name:"PageSubtitle",props:{subtitle:{type:String,required:!0}}}),_={class:"text-h6 font-weight-bold mt-7 mb-4"};function b(t,o,r,s,i,c){return e.openBlock(),e.createElementBlock("div",_,e.toDisplayString(t.subtitle),1)}const k=l(g,[["render",b]]),h=t=>t?t.replace(/(?:\r\n|\r|\n)/g,"<br>"):"",y=t=>{let o=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},S=(t,o,r,s)=>{let i,c;return s==null&&(s="/"),c="",r&&(i=new Date,i.setTime(i.getTime()+r*24*60*60*1e3),c="; expires="+i.toUTCString()),document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(o)+c+"; path="+s,!0};n.PageSubtitle=k,n.PageTitle=u,n.getCookie=y,n.nl2br=h,n.setCookie=S,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
@@ -3,10 +3,20 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
3
3
  type: StringConstructor;
4
4
  required: true;
5
5
  };
6
+ description: {
7
+ type: StringConstructor;
8
+ default: null;
9
+ };
6
10
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
11
  title: {
8
12
  type: StringConstructor;
9
13
  required: true;
10
14
  };
11
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
15
+ description: {
16
+ type: StringConstructor;
17
+ default: null;
18
+ };
19
+ }>> & Readonly<{}>, {
20
+ description: string;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
22
  export default _default;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { default as WelcomeText } from './components/WelcomeText.vue';
2
1
  import { default as PageTitle } from './components/Page/PageTitle.vue';
3
2
  import { default as PageSubtitle } from './components/Page/PageSubtitle.vue';
4
- import { nl2br } from './utils/HtmlUtils.ts';
3
+ import { nl2br } from './utils/HtmlUtil.ts';
4
+ import { getCookie, setCookie } from './utils/CookieUtil.ts';
5
5
  import { NameValuePair } from './types/Base.ts';
6
- export { WelcomeText, PageTitle, PageSubtitle, nl2br, NameValuePair };
6
+ export { PageTitle, PageSubtitle, nl2br, getCookie, setCookie, NameValuePair };
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}h1[data-v-34d102f4]{color:#f354f2}
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}#app{max-width:1280px;margin:0 auto;padding:2rem}
@@ -0,0 +1,2 @@
1
+ export declare const getCookie: (name: string) => string | null;
2
+ export declare const setCookie: (name: string, value: string, days: number, path: string | null) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "alytus-ff",
3
3
  "private": false,
4
- "version": "0.1.17",
4
+ "version": "0.1.18",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <div class="mt-6 mb-3 ff-page-title">
3
- <span class="text-h5 font-weight-bold">{{ title }}</span>
3
+ <div>
4
+ <span class="text-h5 ff-title">{{ title }}</span>
5
+ <div v-if="description" class="text-body-2 ff-description">{{description}}</div>
6
+ </div>
4
7
  <div><slot name="buttons"></slot></div>
5
8
  </div>
6
9
  </template>
@@ -14,6 +17,10 @@ export default defineComponent({
14
17
  title: {
15
18
  type: String,
16
19
  required: true
20
+ },
21
+ description: {
22
+ type: String,
23
+ default: null
17
24
  }
18
25
  }
19
26
  })
@@ -1,22 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- fullName: {
3
- type: StringConstructor;
4
- required: true;
5
- };
6
- no: {
7
- type: NumberConstructor;
8
- default: number;
9
- };
10
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
- fullName: {
12
- type: StringConstructor;
13
- required: true;
14
- };
15
- no: {
16
- type: NumberConstructor;
17
- default: number;
18
- };
19
- }>> & Readonly<{}>, {
20
- no: number;
21
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
- export default _default;
@@ -1,27 +0,0 @@
1
- <template>
2
- <h1>Welcome, {{fullName}} {{no}}</h1>
3
- </template>
4
-
5
- <script lang="ts">
6
- import {defineComponent} from "vue";
7
-
8
- export default defineComponent({
9
- name: "WelcomeText",
10
- props: {
11
- fullName: {
12
- type: String,
13
- required: true
14
- },
15
- no: {
16
- type: Number,
17
- default: 0
18
- }
19
- }
20
- })
21
- </script>
22
-
23
- <style lang="scss" scoped>
24
- h1 {
25
- color: #f354f2;
26
- }
27
- </style>
File without changes