alytus-ff 0.1.16 → 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,45 +1,59 @@
1
- import { defineComponent as l, openBlock as a, createElementBlock as p, toDisplayString as s, createElementVNode as c, renderSlot as u } from "vue";
2
- const f = l({
3
- name: "WelcomeText",
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({
3
+ name: "PageTitle",
4
4
  props: {
5
- fullName: {
5
+ title: {
6
6
  type: String,
7
7
  required: !0
8
8
  },
9
- no: {
10
- type: Number,
11
- default: 0
9
+ description: {
10
+ type: String,
11
+ default: null
12
12
  }
13
13
  }
14
- }), i = (e, n) => {
15
- const t = e.__vccOpts || e;
16
- for (const [o, r] of n)
17
- t[o] = r;
18
- return t;
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"
19
22
  };
20
- function _(e, n, t, o, r, d) {
21
- return a(), p("h1", null, "Welcome, " + s(e.fullName) + " " + s(e.no), 1);
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")
31
+ ])
32
+ ]);
22
33
  }
23
- const v = /* @__PURE__ */ i(f, [["render", _], ["__scopeId", "data-v-34d102f4"]]), m = l({
24
- name: "PageTitle",
34
+ const v = /* @__PURE__ */ a(f, [["render", b]]), h = p({
35
+ name: "PageSubtitle",
25
36
  props: {
26
- title: {
37
+ subtitle: {
27
38
  type: String,
28
39
  required: !0
29
40
  }
30
41
  }
31
- }), $ = { class: "mt-6 mb-3 ff-page-title" }, g = { class: "text-h5 font-weight-bold" };
32
- function h(e, n, t, o, r, d) {
33
- return a(), p("div", $, [
34
- c("span", g, s(e.title), 1),
35
- c("div", null, [
36
- u(e.$slots, "buttons")
37
- ])
38
- ]);
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);
39
45
  }
40
- const y = /* @__PURE__ */ i(m, [["render", h]]), N = (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
+ };
41
53
  export {
42
- y as PageTitle,
43
- v as WelcomeText,
44
- N as nl2br
54
+ y as PageSubtitle,
55
+ v as PageTitle,
56
+ T as getCookie,
57
+ x as nl2br,
58
+ P as setCookie
45
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 c=e.defineComponent({name:"WelcomeText",props:{fullName:{type:String,required:!0},no:{type:Number,default:0}}}),s=(t,r)=>{const o=t.__vccOpts||t;for(const[i,l]of r)o[i]=l;return o};function d(t,r,o,i,l,y){return e.openBlock(),e.createElementBlock("h1",null,"Welcome, "+e.toDisplayString(t.fullName)+" "+e.toDisplayString(t.no),1)}const p=s(c,[["render",d],["__scopeId","data-v-34d102f4"]]),a=e.defineComponent({name:"PageTitle",props:{title:{type:String,required:!0}}}),f={class:"mt-6 mb-3 ff-page-title"},u={class:"text-h5 font-weight-bold"};function m(t,r,o,i,l,y){return e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",u,e.toDisplayString(t.title),1),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"buttons")])])}const _=s(a,[["render",m]]),g=t=>t?t.replace(/(?:\r\n|\r|\n)/g,"<br>"):"";n.PageTitle=_,n.WelcomeText=p,n.nl2br=g,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"})});
@@ -1,22 +1,12 @@
1
1
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- fullName: {
2
+ subtitle: {
3
3
  type: StringConstructor;
4
4
  required: true;
5
5
  };
6
- no: {
7
- type: NumberConstructor;
8
- default: number;
9
- };
10
6
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
- fullName: {
7
+ subtitle: {
12
8
  type: StringConstructor;
13
9
  required: true;
14
10
  };
15
- no: {
16
- type: NumberConstructor;
17
- default: number;
18
- };
19
- }>> & Readonly<{}>, {
20
- no: number;
21
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
12
  export default _default;
@@ -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,5 +1,6 @@
1
- import { default as WelcomeText } from './components/WelcomeText.vue';
2
1
  import { default as PageTitle } from './components/Page/PageTitle.vue';
3
- import { nl2br } from './utils/HtmlUtils.ts';
2
+ import { default as PageSubtitle } from './components/Page/PageSubtitle.vue';
3
+ import { nl2br } from './utils/HtmlUtil.ts';
4
+ import { getCookie, setCookie } from './utils/CookieUtil.ts';
4
5
  import { NameValuePair } from './types/Base.ts';
5
- export { WelcomeText, PageTitle, 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.16",
4
+ "version": "0.1.18",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <div class="text-h6 font-weight-bold mt-7 mb-4">{{ subtitle }}</div>
3
+ </template>
4
+
5
+ <script lang="ts">
6
+ import {defineComponent} from "vue";
7
+
8
+ export default defineComponent({
9
+ name: "PageSubtitle",
10
+ props: {
11
+ subtitle: {
12
+ type: String,
13
+ required: true
14
+ }
15
+ }
16
+ })
17
+ </script>
@@ -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,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