@ozdao/prometheus-framework 0.1.81 → 0.1.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
  2. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
  3. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  4. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
  5. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
  6. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
  7. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
  8. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
  9. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
  10. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
  11. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
  12. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
  13. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
  14. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
  15. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  16. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  17. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
  19. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
  21. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
  23. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
  25. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
  27. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +32 -32
  29. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
  31. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  32. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
  34. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +32 -32
  36. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +21 -21
  38. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +8 -8
  40. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +12 -12
  42. package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
  44. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
  46. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
  48. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +41 -40
  52. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/auth/store/auth.js +17 -18
  54. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
  56. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
  58. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
  59. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
  60. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
  62. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
  65. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
  66. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
  68. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +3 -3
  69. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +25 -25
  70. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +56 -56
  72. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
  74. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +15 -15
  76. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +10 -10
  77. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +51 -53
  79. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +59 -61
  81. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
  83. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +23 -23
  85. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +11 -11
  91. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +18 -18
  93. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +30 -30
  96. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
  98. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +20 -20
  100. package/dist/prometheus-framework.cjs.js +27 -27
  101. package/dist/prometheus-framework.es.js +1949 -1937
  102. package/dist/style.css +1 -1
  103. package/package.json +2 -4
  104. package/src/modules/auth/components/pages/SignIn.vue +1 -0
  105. package/src/modules/auth/store/auth.js +2 -7
@@ -1,65 +1,65 @@
1
- import { ref as s, onUpdated as k, nextTick as d, onMounted as x, watch as h, openBlock as B, createElementBlock as g, withDirectives as m, createElementVNode as v, vModelText as y } from "vue";
1
+ import { ref as d, onUpdated as x, nextTick as s, onMounted as h, watch as m, openBlock as B, createElementBlock as g, withDirectives as v, createElementVNode as y, vModelText as w } from "vue";
2
2
  import "./H2.vue2.js";
3
- const w = ["placeholder"], T = {
3
+ const b = ["placeholder"], E = {
4
4
  __name: "H2",
5
5
  props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref", "setFocus"],
6
6
  emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
- setup(n, { emit: a }) {
8
- const e = n;
9
- s(e);
10
- const t = s(null);
11
- s(0);
7
+ setup(l, { emit: u }) {
8
+ const e = l;
9
+ d(e);
10
+ const t = d(null), a = u;
11
+ d(0);
12
12
  function p(o) {
13
- let l = o.target.value.split(/\n+/);
14
- if (l.length > 1) {
15
- e.prop[e.content] = l[0], d(() => {
13
+ let n = o.target.value.split(/\n+/);
14
+ if (n.length > 1) {
15
+ e.prop[e.content] = n[0], s(() => {
16
16
  c();
17
17
  });
18
- let r = l.slice(1).map((f) => ({ type: "Textarea", content: f }));
18
+ let r = n.slice(1).map((k) => ({ type: "Textarea", content: k }));
19
19
  a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
20
  } else
21
21
  o.target.value.trim() === "" && o.target.value.includes(`
22
22
 
23
23
  `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
24
  }
25
- function i(o) {
25
+ function f(o) {
26
26
  (o.keyCode === 8 || o.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
27
  }
28
- function u() {
29
- d(() => {
28
+ function i() {
29
+ s(() => {
30
30
  t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
31
  });
32
32
  }
33
33
  function c() {
34
34
  t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
35
  }
36
- return k(() => {
37
- e.setFocus && d(() => {
38
- u();
36
+ return x(() => {
37
+ e.setFocus && s(() => {
38
+ i();
39
39
  }), c();
40
- }), x(() => {
41
- e.setFocus && d(() => {
42
- u();
40
+ }), h(() => {
41
+ e.setFocus && s(() => {
42
+ i();
43
43
  }), c();
44
- }), h(() => e.prop[e.content], (o) => {
45
- }), (o, l) => (B(), g("div", null, [
46
- m(v("textarea", {
47
- "onUpdate:modelValue": l[0] || (l[0] = (r) => n.prop[n.content] = r),
48
- placeholder: n.placeholder ? n.placeholder : "Enter text",
44
+ }), m(() => e.prop[e.content], (o) => {
45
+ }), (o, n) => (B(), g("div", null, [
46
+ v(y("textarea", {
47
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => l.prop[l.content] = r),
48
+ placeholder: l.placeholder ? l.placeholder : "Enter text",
49
49
  onInput: p,
50
- onFocus: l[1] || (l[1] = (r) => a("focus", t.value)),
51
- onKeyup: i,
50
+ onFocus: n[1] || (n[1] = (r) => a("focus", t.value)),
51
+ onKeyup: f,
52
52
  ref_key: "textarea",
53
53
  ref: t,
54
54
  tabindex: "-1",
55
55
  class: "h3 text-area mn-thin"
56
56
  }, `
57
- `, 40, w), [
58
- [y, n.prop[n.content]]
57
+ `, 40, b), [
58
+ [w, l.prop[l.content]]
59
59
  ])
60
60
  ]));
61
61
  }
62
62
  };
63
63
  export {
64
- T as default
64
+ E as default
65
65
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),i=e.ref(null);function u(){i.value.click()}async function s(t){let o=t.target.files[0];console.log(o);let a=new FormData,f="unsorted";a.append("file",o),console.log(a.has("file"));try{let m=await g.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,a,{headers:{"Content-Type":"multipart/form-data"}});l.value=m.data.filepath,console.log(l.value),r("input",l.value),r("updateBlock",p.prop,{content:l.value})}catch(c){console.error(c)}}function d(t){t.preventDefault(),s({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:i,tabindex:"-1",onChange:s,style:{display:"none"}},null,544)],32))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../node_modules/axios/lib/axios.cjs"),v=["src"],h={key:1,class:"t-transp pd-extra"},y={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(l,{emit:p}){const n=e.ref(null),r=e.ref(null),u=l,i=p;function d(){r.value.click()}async function s(t){let o=t.target.files[0];console.log(o);let a=new FormData,m="unsorted";a.append("file",o),console.log(a.has("file"));try{let g=await k.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(m)}`,a,{headers:{"Content-Type":"multipart/form-data"}});n.value=g.data.filepath,console.log(n.value),i("input",n.value),i("updateBlock",u.prop,{content:n.value})}catch(c){console.error(c)}}function f(t){t.preventDefault(),s({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:d,onDrop:f,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[l.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+l.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,v)):(e.openBlock(),e.createElementBlock("span",h,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:r,tabindex:"-1",onChange:s,style:{display:"none"}},null,544)],32))}};exports.default=y;
@@ -1,9 +1,9 @@
1
- import { ref as u, openBlock as l, createElementBlock as r, withModifiers as k, createElementVNode as v } from "vue";
2
- import y from "../../../../../node_modules/axios/lib/axios.js";
3
- const x = ["src"], C = {
1
+ import { ref as u, openBlock as l, createElementBlock as r, withModifiers as v, createElementVNode as y } from "vue";
2
+ import x from "../../../../../node_modules/axios/lib/axios.js";
3
+ const C = ["src"], b = {
4
4
  key: 1,
5
5
  class: "t-transp pd-extra"
6
- }, U = {
6
+ }, _ = {
7
7
  __name: "ImageUpload",
8
8
  props: [
9
9
  "label",
@@ -11,28 +11,28 @@ const x = ["src"], C = {
11
11
  "prop"
12
12
  ],
13
13
  emits: ["input", "updateBlock"],
14
- setup(a, { emit: i }) {
15
- const f = a, o = u(null), s = u(null);
16
- function d() {
17
- s.value.click();
14
+ setup(n, { emit: f }) {
15
+ const o = u(null), i = u(null), d = n, s = f;
16
+ function m() {
17
+ i.value.click();
18
18
  }
19
19
  async function p(e) {
20
20
  let t = e.target.files[0];
21
21
  console.log(t);
22
- let n = new FormData(), g = "unsorted";
23
- n.append("file", t), console.log(n.has("file"));
22
+ let a = new FormData(), h = "unsorted";
23
+ a.append("file", t), console.log(a.has("file"));
24
24
  try {
25
- let h = await y.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(g)}`, n, {
25
+ let k = await x.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(h)}`, a, {
26
26
  headers: {
27
27
  "Content-Type": "multipart/form-data"
28
28
  }
29
29
  });
30
- o.value = h.data.filepath, console.log(o.value), i("input", o.value), i("updateBlock", f.prop, { content: o.value });
30
+ o.value = k.data.filepath, console.log(o.value), s("input", o.value), s("updateBlock", d.prop, { content: o.value });
31
31
  } catch (c) {
32
32
  console.error(c);
33
33
  }
34
34
  }
35
- function m(e) {
35
+ function g(e) {
36
36
  e.preventDefault(), p({
37
37
  target: {
38
38
  files: e.dataTransfer.files
@@ -40,22 +40,22 @@ const x = ["src"], C = {
40
40
  });
41
41
  }
42
42
  return (e, t) => (l(), r("div", {
43
- onClick: d,
44
- onDrop: m,
45
- onDragover: t[0] || (t[0] = k(() => {
43
+ onClick: m,
44
+ onDrop: g,
45
+ onDragover: t[0] || (t[0] = v(() => {
46
46
  }, ["prevent"])),
47
47
  class: "w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"
48
48
  }, [
49
- a.prop.content ? (l(), r("img", {
49
+ n.prop.content ? (l(), r("img", {
50
50
  key: 0,
51
- src: (e.FILE_SERVER_URL || "") + a.prop.content,
51
+ src: (e.FILE_SERVER_URL || "") + n.prop.content,
52
52
  alt: "Uploaded image",
53
53
  class: "w-100 h-30r object-fit-contain"
54
- }, null, 8, x)) : (l(), r("span", C, "Click or drag-and-drop your image")),
55
- v("input", {
54
+ }, null, 8, C)) : (l(), r("span", b, "Click or drag-and-drop your image")),
55
+ y("input", {
56
56
  type: "file",
57
57
  ref_key: "fileInput",
58
- ref: s,
58
+ ref: i,
59
59
  tabindex: "-1",
60
60
  onChange: p,
61
61
  style: { display: "none" }
@@ -64,5 +64,5 @@ const x = ["src"], C = {
64
64
  }
65
65
  };
66
66
  export {
67
- U as default
67
+ _ as default
68
68
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue.cjs");const f=["placeholder"],k={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:c}){const t=l;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(p=>({__name:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue.cjs");const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:s}){const t=l,c=s;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
2
 
3
- `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function i(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:i,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
4
- `,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=k;
3
+ `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function i(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
4
+ `,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;
@@ -1,64 +1,64 @@
1
- import { ref as s, onUpdated as k, nextTick as d, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as m, createElementVNode as g, vModelText as v } from "vue";
1
+ import { ref as d, onUpdated as x, nextTick as s, onMounted as m, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, vModelText as y } from "vue";
2
2
  import "./Textarea.vue.js";
3
- const y = ["placeholder"], F = {
3
+ const T = ["placeholder"], b = {
4
4
  __name: "Textarea",
5
5
  props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
6
  emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
- setup(n, { emit: a }) {
8
- const e = n;
9
- s(e);
10
- const t = s(null);
11
- s(0);
12
- function i(l) {
7
+ setup(n, { emit: u }) {
8
+ const e = n, a = u;
9
+ d(e);
10
+ const t = d(null);
11
+ d(0);
12
+ function p(l) {
13
13
  let o = l.target.value.split(/\n+/);
14
14
  if (o.length > 1) {
15
- e.prop[e.content] = o[0], d(() => {
15
+ e.prop[e.content] = o[0], s(() => {
16
16
  c();
17
17
  });
18
- let r = o.slice(1).map((f) => ({ __name: "Textarea", content: f }));
18
+ let r = o.slice(1).map((k) => ({ __name: "Textarea", content: k }));
19
19
  a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
20
  } else
21
21
  l.target.value.trim() === "" && l.target.value.includes(`
22
22
 
23
23
  `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
24
  }
25
- function p(l) {
25
+ function f(l) {
26
26
  (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
27
  }
28
- function u() {
29
- d(() => {
28
+ function i() {
29
+ s(() => {
30
30
  t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
31
  });
32
32
  }
33
33
  function c() {
34
34
  t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
35
  }
36
- return k(() => {
37
- e.setFocus && d(() => {
38
- u();
36
+ return x(() => {
37
+ e.setFocus && s(() => {
38
+ i();
39
39
  }), c();
40
- }), x(() => {
41
- e.setFocus && d(() => {
42
- u();
40
+ }), m(() => {
41
+ e.setFocus && s(() => {
42
+ i();
43
43
  }), c();
44
44
  }), (l, o) => (h(), B("div", null, [
45
- m(g("textarea", {
45
+ g(v("textarea", {
46
46
  "onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
47
47
  placeholder: n.placeholder ? n.placeholder : "Enter text",
48
- onInput: i,
48
+ onInput: p,
49
49
  onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
50
- onKeyup: p,
50
+ onKeyup: f,
51
51
  ref_key: "textarea",
52
52
  ref: t,
53
53
  tabindex: "-1",
54
54
  class: "text-area mn-thin"
55
55
  }, `
56
- `, 40, y), [
57
- [v, n.prop[n.content]]
56
+ `, 40, T), [
57
+ [y, n.prop[n.content]]
58
58
  ])
59
59
  ]));
60
60
  }
61
61
  };
62
62
  export {
63
- F as default
63
+ b as default
64
64
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../elements/Textarea.vue2.cjs"),E=require("../elements/H2.vue.cjs"),x=require("../elements/Caption.vue.cjs"),N=require("../elements/Bullets.vue.cjs"),y=require("../elements/ImageUpload.vue.cjs"),A=require("../elements/Embed.vue.cjs"),V=require("../elements/Audio.vue.cjs"),q=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),D=["onMouseover"],M={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"},T=["onClick"],$=["onClick"],F=["onClick"],I=["onClick"],S={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:u}){const f=v;let t=e.ref(null);e.ref(null),t.value={content:f.content};const k={Textarea:_.default,H2:E.default,Bullets:N.default,Caption:x.default,ImageUpload:y.default,Embed:A.default,Audio:V.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(C=>({...a,content:C.content})),w=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,w);const B=m[m.length-1];console.log("New block is"+B)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function g(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function h(){d.value=!0}function b(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(q.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,D),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-thin w-max t-red bg-white button-small button"}," Remove ",8,T),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-thin w-max t-black bg-white button-small button"}," Add Image ",8,$),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,F),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,I)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.vue2.cjs"),x=require("../elements/H2.vue.cjs"),N=require("../elements/Caption.vue.cjs"),y=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),V=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"},$=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const k=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:k.content};const g={Textarea:E.default,H2:x.default,Bullets:y.default,Caption:N.default,ImageUpload:A.default,Embed:V.default,Audio:q.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(_=>({...a,content:_.content})),B=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const C=m[m.length-1];console.log("New block is"+C)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function h(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function b(){d.value=!0}function w(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:b,onEnd:w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:h},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=U;
@@ -1,33 +1,33 @@
1
- import { ref as i, watchEffect as F, openBlock as a, createElementBlock as r, unref as p, createBlock as g, withCtx as b, Fragment as M, renderList as N, createElementVNode as c, resolveDynamicComponent as I, normalizeClass as T, createVNode as U, Transition as V, withModifiers as z, toDisplayString as H, createCommentVNode as k } from "vue";
2
- import S from "../elements/Textarea.vue2.js";
3
- import L from "../elements/H2.vue.js";
4
- import R from "../elements/Caption.vue.js";
5
- import W from "../elements/Bullets.vue.js";
6
- import j from "../elements/ImageUpload.vue.js";
7
- import q from "../elements/Embed.vue.js";
8
- import G from "../elements/Audio.vue.js";
9
- import { VueDraggableNext as J } from "../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
10
- const K = ["onMouseover"], O = {
1
+ import { ref as u, watchEffect as M, openBlock as a, createElementBlock as r, unref as p, createBlock as g, withCtx as b, Fragment as N, renderList as I, createElementVNode as c, resolveDynamicComponent as T, normalizeClass as U, createVNode as V, Transition as z, withModifiers as H, toDisplayString as S, createCommentVNode as k } from "vue";
2
+ import L from "../elements/Textarea.vue2.js";
3
+ import R from "../elements/H2.vue.js";
4
+ import W from "../elements/Caption.vue.js";
5
+ import j from "../elements/Bullets.vue.js";
6
+ import q from "../elements/ImageUpload.vue.js";
7
+ import G from "../elements/Embed.vue.js";
8
+ import J from "../elements/Audio.vue.js";
9
+ import { VueDraggableNext as K } from "../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
10
+ const O = ["onMouseover"], P = {
11
11
  key: 0,
12
12
  class: "z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"
13
- }, P = ["onClick"], Q = ["onClick"], X = ["onClick"], Y = ["onClick"], ue = {
13
+ }, Q = ["onClick"], X = ["onClick"], Y = ["onClick"], Z = ["onClick"], ue = {
14
14
  __name: "Constructor",
15
15
  props: ["content"],
16
16
  emits: ["update"],
17
- setup(w, { emit: m }) {
18
- const C = w;
19
- let e = i(null);
20
- i(null), e.value = { content: C.content };
21
- const x = {
22
- Textarea: S,
23
- H2: L,
24
- Bullets: W,
25
- Caption: R,
26
- ImageUpload: j,
27
- Embed: q,
28
- Audio: G
17
+ setup(w, { emit: C }) {
18
+ const x = w, m = C;
19
+ let e = u(null);
20
+ u(null), e.value = { content: x.content };
21
+ const $ = {
22
+ Textarea: L,
23
+ H2: R,
24
+ Bullets: j,
25
+ Caption: W,
26
+ ImageUpload: q,
27
+ Embed: G,
28
+ Audio: J
29
29
  };
30
- function u(s = "Textarea", o = "", t, n) {
30
+ function i(s = "Textarea", o = "", t, n) {
31
31
  console.log("We are adding new block (functuin HandleAddBlock):" + s + o + t + n);
32
32
  let l = {
33
33
  order: e.value.content.length + 1,
@@ -39,18 +39,18 @@ const K = ["onMouseover"], O = {
39
39
  setFocus: !0
40
40
  };
41
41
  if (n && n.blocks && Array.isArray(n.blocks)) {
42
- let h = n.blocks.map((E) => ({
42
+ let h = n.blocks.map((F) => ({
43
43
  ...l,
44
- content: E.content
45
- })), A = [(n.index || t) + 1, 0].concat(h);
46
- e.value.content.splice.apply(e.value.content, A);
47
- const D = h[h.length - 1];
48
- console.log("New block is" + D);
44
+ content: F.content
45
+ })), D = [(n.index || t) + 1, 0].concat(h);
46
+ e.value.content.splice.apply(e.value.content, D);
47
+ const E = h[h.length - 1];
48
+ console.log("New block is" + E);
49
49
  } else
50
50
  t !== void 0 ? (e.value.content.splice(t + 1, 0, l), console.log("Latest block is" + l)) : (console.log("Another block is" + l), e.value.content.push(l));
51
51
  f.value = null, m("update", e.value.content);
52
52
  }
53
- function $(s, o) {
53
+ function B(s, o) {
54
54
  const t = e.value.content.findIndex((n) => n === s);
55
55
  t !== -1 && (e.value.content[t] = { ...e.value.content[t], ...o }), m("update", e.value.content);
56
56
  }
@@ -58,25 +58,25 @@ const K = ["onMouseover"], O = {
58
58
  let o = e.value.content.findIndex((t) => t === s);
59
59
  o !== -1 && e.value.content.splice(o, 1), e.value.content[o - 1].setFocus = !0, m("update", e.value.content);
60
60
  }
61
- const f = i(null), v = i(!1), d = i(!1);
62
- function B() {
61
+ const f = u(null), v = u(!1), d = u(!1);
62
+ function y() {
63
63
  v.value = !0;
64
64
  }
65
- function y() {
65
+ function A() {
66
66
  v.value = !1;
67
67
  }
68
- return F(() => {
69
- e.value && e.value.content.length === 0 && u("Textarea", ""), m("update", e.value.content);
68
+ return M(() => {
69
+ e.value && e.value.content.length === 0 && i("Textarea", ""), m("update", e.value.content);
70
70
  }), (s, o) => (a(), r("section", null, [
71
- p(e).content ? (a(), g(p(J), {
71
+ p(e).content ? (a(), g(p(K), {
72
72
  key: 0,
73
73
  class: "w-full",
74
74
  list: p(e).content,
75
- onStart: B,
76
- onEnd: y
75
+ onStart: y,
76
+ onEnd: A
77
77
  }, {
78
78
  default: b(() => [
79
- (a(!0), r(M, null, N(p(e).content, (t, n) => (a(), r("div", {
79
+ (a(!0), r(N, null, I(p(e).content, (t, n) => (a(), r("div", {
80
80
  key: n,
81
81
  class: "pos-relative"
82
82
  }, [
@@ -84,47 +84,47 @@ const K = ["onMouseover"], O = {
84
84
  onMouseover: (l) => (f.value = n, d.value = !1),
85
85
  class: "pos-relative w-full h-full"
86
86
  }, [
87
- (a(), g(I(x[t.type]), {
87
+ (a(), g(T($[t.type]), {
88
88
  index: n,
89
89
  component: t,
90
90
  prop: t,
91
- class: T(t.class),
91
+ class: U(t.class),
92
92
  setFocus: t.setFocus,
93
93
  content: "content",
94
94
  onDeleteBlock: _,
95
- onAddBlock: u,
96
- onUpdateBlock: $
95
+ onAddBlock: i,
96
+ onUpdateBlock: B
97
97
  }, null, 40, ["index", "component", "prop", "class", "setFocus"]))
98
- ], 40, K),
99
- U(V, { name: "fade" }, {
98
+ ], 40, O),
99
+ V(z, { name: "fade" }, {
100
100
  default: b(() => [
101
101
  f.value === n ? (a(), r("div", {
102
102
  key: 0,
103
103
  class: "pos-absolute z-index-4 i-semi",
104
104
  style: { right: "calc(100% + 0.5rem)", top: "calc(50% - 1.125rem)" },
105
- onMousedown: o[1] || (o[1] = z((l) => v.value = !0, ["prevent"]))
105
+ onMousedown: o[1] || (o[1] = H((l) => v.value = !0, ["prevent"]))
106
106
  }, [
107
107
  c("button", {
108
108
  onClick: o[0] || (o[0] = (l) => d.value = !d.value),
109
109
  class: "mn-small cursor-pointer w-100 i-semi bg-white radius-thin"
110
- }, H(t.content ? "..." : "+"), 1),
111
- d.value ? (a(), r("div", O, [
110
+ }, S(t.content ? "..." : "+"), 1),
111
+ d.value ? (a(), r("div", P, [
112
112
  c("span", {
113
113
  onClick: (l) => _(t),
114
114
  class: "mn-thin w-max t-red bg-white button-small button"
115
- }, " Remove ", 8, P),
115
+ }, " Remove ", 8, Q),
116
116
  c("span", {
117
- onClick: (l) => u("ImageUpload", "", n),
117
+ onClick: (l) => i("ImageUpload", "", n),
118
118
  class: "mn-thin w-max t-black bg-white button-small button"
119
- }, " Add Image ", 8, Q),
119
+ }, " Add Image ", 8, X),
120
120
  c("span", {
121
- onClick: (l) => u("H2", "", n),
121
+ onClick: (l) => i("H2", "", n),
122
122
  class: "w-max button-small t-black bg-white button"
123
- }, " Add Title ", 8, X),
123
+ }, " Add Title ", 8, Y),
124
124
  c("span", {
125
- onClick: (l) => u("Embed", "", n),
125
+ onClick: (l) => i("Embed", "", n),
126
126
  class: "w-max button-small t-black bg-white button"
127
- }, " Add Embed ", 8, Y)
127
+ }, " Add Embed ", 8, Z)
128
128
  ])) : k("", !0)
129
129
  ], 32)) : k("", !0)
130
130
  ]),
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.vue.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../globals/components/blocks/CardHeader.vue.cjs");require("../../../community/store/reactions.cjs");const k=require("vue-router"),p={key:0,class:"o-hidden pos-relative bg-grey mn-small w-100"},E=["src"],T=["src"],w={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},B={key:0,class:"t-semi"},D={class:"t-semi"},U={key:0,class:"t-semi uppercase"},N={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},b={key:0,class:""},V={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},S={key:2,class:"mn-small p-big"},x={__name:"CardEvent",props:["event","user","short","type"],setup(t){const o=t;e.ref(new Date),k.useRouter(),e.computed(()=>o.event.content.find(n=>n.type.name==="ImageUpload")),e.computed(()=>o.event.content.find(n=>n.type.name==="Textarea"));const u=e.computed(()=>{const n=new Date,s=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()),r=new Date(o.event.date.start),a=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds())-s;if(a<0)return"Finished";if(a===0)return"Starting Now";{const d=Math.floor(a/1e3),l=Math.floor(d/60),c=Math.floor(l/60),m=Math.floor(c/24);return m>0?`${m} days until event`:c>0?`${c} hours until event`:l>0?`${l} minutes until event`:`${d} seconds until event`}}),f=e.computed(()=>{const n=new Date(o.event.date.start),s={day:"2-digit",month:"2-digit"};return n.toLocaleDateString(void 0,s)}),h=e.computed(()=>{console.log(o.event.date.start),console.log(o.event.date.end);const n=new Date(o.event.date.start),s=new Date(o.event.date.end),r=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(n),i=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(s);return`${r}-${i}`}),v=e.computed(()=>{const n=o.event.name;return n.length>26?`${n.substring(0,22)}…`:n});return(n,s)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C.default,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:e.unref(u)},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,E),e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,T)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(y.default,{key:0,onClick:s[0]||(s[0]=e.withModifiers(r=>n.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",w,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(e.unref(f))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",D,e.toDisplayString(e.unref(h)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(e.unref(v)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",N,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",b,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.vue.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../globals/components/blocks/CardHeader.vue.cjs");require("../../../community/store/reactions.cjs");const k=require("vue-router"),p={key:0,class:"o-hidden pos-relative bg-grey mn-small w-100"},E=["src"],T=["src"],w={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},B={key:0,class:"t-semi"},D={class:"t-semi"},U={key:0,class:"t-semi uppercase"},N={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},b={key:0,class:""},V={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},S={key:2,class:"mn-small p-big"},x={__name:"CardEvent",props:["event","user","short","type"],setup(t){e.ref(new Date),k.useRouter();const o=t;e.computed(()=>o.event.content.find(n=>n.type.name==="ImageUpload")),e.computed(()=>o.event.content.find(n=>n.type.name==="Textarea"));const u=e.computed(()=>{const n=new Date,s=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()),r=new Date(o.event.date.start),a=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds())-s;if(a<0)return"Finished";if(a===0)return"Starting Now";{const d=Math.floor(a/1e3),l=Math.floor(d/60),c=Math.floor(l/60),m=Math.floor(c/24);return m>0?`${m} days until event`:c>0?`${c} hours until event`:l>0?`${l} minutes until event`:`${d} seconds until event`}}),v=e.computed(()=>{const n=new Date(o.event.date.start),s={day:"2-digit",month:"2-digit"};return n.toLocaleDateString(void 0,s)}),h=e.computed(()=>{console.log(o.event.date.start),console.log(o.event.date.end);const n=new Date(o.event.date.start),s=new Date(o.event.date.end),r=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(n),i=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(s);return`${r}-${i}`}),f=e.computed(()=>{const n=o.event.name;return n.length>26?`${n.substring(0,22)}…`:n});return(n,s)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C.default,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:u.value},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,E),e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,T)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(y.default,{key:0,onClick:s[0]||(s[0]=e.withModifiers(r=>n.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",w,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(v.value)+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",D,e.toDisplayString(h.value),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(f.value),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",N,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",b,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}};exports.default=x;