@creaditor/web-starterkit 1.0.64 → 1.0.65
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/112.creaditor.bundle.js.gz +0 -0
- package/dist/1142.creaditor.bundle.js +1 -1
- package/dist/1142.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1317.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/1317.creaditor.bundle.js.gz +0 -0
- package/dist/1334.creaditor.bundle.js.gz +0 -0
- package/dist/1396.creaditor.bundle.js.gz +0 -0
- package/dist/1403.creaditor.bundle.js.gz +0 -0
- package/dist/1456.creaditor.bundle.js.gz +0 -0
- package/dist/1529.creaditor.bundle.js.gz +0 -0
- package/dist/168.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/168.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/1728.creaditor.bundle.js +133 -0
- package/dist/1728.creaditor.bundle.js.gz +0 -0
- package/dist/175.creaditor.bundle.js.gz +0 -0
- package/dist/1972.creaditor.bundle.js.gz +0 -0
- package/dist/211.creaditor.bundle.js.gz +0 -0
- package/dist/2112.creaditor.bundle.js.gz +0 -0
- package/dist/2154.creaditor.bundle.js.gz +0 -0
- package/dist/2234.creaditor.bundle.js.gz +0 -0
- package/dist/2298.creaditor.bundle.js.gz +0 -0
- package/dist/235.creaditor.bundle.js.gz +0 -0
- package/dist/2350.creaditor.bundle.js.gz +0 -0
- package/dist/2377.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/2397.creaditor.bundle.js.gz +0 -0
- package/dist/2409.creaditor.bundle.js.gz +0 -0
- package/dist/2547.creaditor.bundle.js.gz +0 -0
- package/dist/2550.creaditor.bundle.js.gz +0 -0
- package/dist/2590.creaditor.bundle.js.gz +0 -0
- package/dist/2655.creaditor.bundle.js.gz +0 -0
- package/dist/2706.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/2706.creaditor.bundle.js.gz +0 -0
- package/dist/271.creaditor.bundle.js.gz +0 -0
- package/dist/2717.creaditor.bundle.js.gz +0 -0
- package/dist/2765.creaditor.bundle.js.gz +0 -0
- package/dist/2773.creaditor.bundle.js.gz +0 -0
- package/dist/2833.creaditor.bundle.js.gz +0 -0
- package/dist/2837.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/2837.creaditor.bundle.js.gz +0 -0
- package/dist/2956.creaditor.bundle.js.gz +0 -0
- package/dist/2963.creaditor.bundle.js.gz +0 -0
- package/dist/3105.creaditor.bundle.js.gz +0 -0
- package/dist/3233.creaditor.bundle.js.gz +0 -0
- package/dist/3418.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js.gz +0 -0
- package/dist/353.creaditor.bundle.js.gz +0 -0
- package/dist/3545.creaditor.bundle.js.gz +0 -0
- package/dist/3553.creaditor.bundle.js.gz +0 -0
- package/dist/3600.creaditor.bundle.js.gz +0 -0
- package/dist/3601.creaditor.bundle.js +288 -0
- package/dist/3601.creaditor.bundle.js.gz +0 -0
- package/dist/3606.creaditor.bundle.js.gz +0 -0
- package/dist/3792.creaditor.bundle.js.gz +0 -0
- package/dist/380.creaditor.bundle.js.gz +0 -0
- package/dist/3827.creaditor.bundle.js.gz +0 -0
- package/dist/3847.creaditor.bundle.js.gz +0 -0
- package/dist/3875.creaditor.bundle.js.gz +0 -0
- package/dist/3971.creaditor.bundle.js.gz +0 -0
- package/dist/4000.creaditor.bundle.js.gz +0 -0
- package/dist/4061.creaditor.bundle.js.gz +0 -0
- package/dist/407.creaditor.bundle.js.gz +0 -0
- package/dist/4074.creaditor.bundle.js.gz +0 -0
- package/dist/4100.creaditor.bundle.js.gz +0 -0
- package/dist/4109.creaditor.bundle.js.gz +0 -0
- package/dist/4114.creaditor.bundle.js.gz +0 -0
- package/dist/4161.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/4186.creaditor.bundle.js.gz +0 -0
- package/dist/4288.creaditor.bundle.js.gz +0 -0
- package/dist/4413.creaditor.bundle.js.gz +0 -0
- package/dist/4475.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4615.creaditor.bundle.js.gz +0 -0
- package/dist/4639.creaditor.bundle.js.gz +0 -0
- package/dist/467.creaditor.bundle.js.gz +0 -0
- package/dist/4762.creaditor.bundle.js.gz +0 -0
- package/dist/4770.creaditor.bundle.js.gz +0 -0
- package/dist/4947.creaditor.bundle.js.gz +0 -0
- package/dist/4987.creaditor.bundle.js.gz +0 -0
- package/dist/4988.creaditor.bundle.js.gz +0 -0
- package/dist/507.creaditor.bundle.js +334 -0
- package/dist/507.creaditor.bundle.js.gz +0 -0
- package/dist/5133.creaditor.bundle.js.gz +0 -0
- package/dist/5156.creaditor.bundle.js.gz +0 -0
- package/dist/5284.creaditor.bundle.js.gz +0 -0
- package/dist/5379.creaditor.bundle.js.gz +0 -0
- package/dist/5391.creaditor.bundle.js.gz +0 -0
- package/dist/5411.creaditor.bundle.js.gz +0 -0
- package/dist/5501.creaditor.bundle.js.gz +0 -0
- package/dist/5530.creaditor.bundle.js.gz +0 -0
- package/dist/5666.creaditor.bundle.js.gz +0 -0
- package/dist/567.creaditor.bundle.js.gz +0 -0
- package/dist/5713.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/5713.creaditor.bundle.js.gz +0 -0
- package/dist/574.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/574.creaditor.bundle.js.gz +0 -0
- package/dist/578.creaditor.bundle.js.gz +0 -0
- package/dist/5839.creaditor.bundle.js.gz +0 -0
- package/dist/5849.creaditor.bundle.js.gz +0 -0
- package/dist/5850.creaditor.bundle.js.gz +0 -0
- package/dist/5884.creaditor.bundle.js.gz +0 -0
- package/dist/59.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/59.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/6036.creaditor.bundle.js.gz +0 -0
- package/dist/6151.creaditor.bundle.js.gz +0 -0
- package/dist/6216.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/6216.creaditor.bundle.js.gz +0 -0
- package/dist/{4819.creaditor.bundle.js → 6323.creaditor.bundle.js} +7 -7
- package/dist/6323.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6442.creaditor.bundle.js.gz +0 -0
- package/dist/6496.creaditor.bundle.js.gz +0 -0
- package/dist/653.creaditor.bundle.js.gz +0 -0
- package/dist/6751.creaditor.bundle.js.gz +0 -0
- package/dist/6814.creaditor.bundle.js.gz +0 -0
- package/dist/6937.creaditor.bundle.js.gz +0 -0
- package/dist/7055.creaditor.bundle.js.gz +0 -0
- package/dist/7155.creaditor.bundle.js.gz +0 -0
- package/dist/7209.creaditor.bundle.js.gz +0 -0
- package/dist/7238.creaditor.bundle.js.gz +0 -0
- package/dist/7255.creaditor.bundle.js.gz +0 -0
- package/dist/7348.creaditor.bundle.js.gz +0 -0
- package/dist/738.creaditor.bundle.js.gz +0 -0
- package/dist/7380.creaditor.bundle.js.gz +0 -0
- package/dist/7463.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7463.creaditor.bundle.js.gz +0 -0
- package/dist/7466.creaditor.bundle.js.gz +0 -0
- package/dist/7493.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/7523.creaditor.bundle.js.gz +0 -0
- package/dist/7564.creaditor.bundle.js.gz +0 -0
- package/dist/7654.creaditor.bundle.js.gz +0 -0
- package/dist/767.creaditor.bundle.js.gz +0 -0
- package/dist/7789.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7789.creaditor.bundle.js.gz +0 -0
- package/dist/7838.creaditor.bundle.js.gz +0 -0
- package/dist/7997.creaditor.bundle.js.gz +0 -0
- package/dist/8042.creaditor.bundle.js.gz +0 -0
- package/dist/8064.creaditor.bundle.js.gz +0 -0
- package/dist/8088.creaditor.bundle.js +141 -0
- package/dist/8088.creaditor.bundle.js.gz +0 -0
- package/dist/8141.creaditor.bundle.js.gz +0 -0
- package/dist/8173.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/8173.creaditor.bundle.js.gz +0 -0
- package/dist/8196.creaditor.bundle.js.gz +0 -0
- package/dist/823.creaditor.bundle.js.gz +0 -0
- package/dist/8250.creaditor.bundle.js.gz +0 -0
- package/dist/8251.creaditor.bundle.js.gz +0 -0
- package/dist/8299.creaditor.bundle.js.gz +0 -0
- package/dist/8315.creaditor.bundle.js.gz +0 -0
- package/dist/8443.creaditor.bundle.js.gz +0 -0
- package/dist/8516.creaditor.bundle.js.gz +0 -0
- package/dist/8533.creaditor.bundle.js.gz +0 -0
- package/dist/8570.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/8654.creaditor.bundle.js.gz +0 -0
- package/dist/8854.creaditor.bundle.js.gz +0 -0
- package/dist/8878.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/8921.creaditor.bundle.js.gz +0 -0
- package/dist/898.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/898.creaditor.bundle.js.gz +0 -0
- package/dist/8983.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9158.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/9158.creaditor.bundle.js.gz +0 -0
- package/dist/9250.creaditor.bundle.js.gz +0 -0
- package/dist/9386.creaditor.bundle.js.gz +0 -0
- package/dist/9431.creaditor.bundle.js.gz +0 -0
- package/dist/9453.creaditor.bundle.js.gz +0 -0
- package/dist/9570.creaditor.bundle.js.gz +0 -0
- package/dist/9694.creaditor.bundle.js.gz +0 -0
- package/dist/975.creaditor.bundle.js.gz +0 -0
- package/dist/976.creaditor.bundle.js.gz +0 -0
- package/dist/9986.creaditor.bundle.js.gz +0 -0
- package/dist/9990.creaditor.bundle.js.gz +0 -0
- package/dist/9994.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +4 -4
- package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/index.html.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/dist/workbox-f3063069.js.gz +0 -0
- package/package.json +1 -1
- package/dist/2001.creaditor.bundle.js +0 -335
- package/dist/2001.creaditor.bundle.js.LICENSE.txt +0 -11
- package/dist/2001.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/2001.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/5791.creaditor.bundle.js +0 -288
- package/dist/5791.creaditor.bundle.js.gz +0 -0
- package/dist/7051.creaditor.bundle.js +0 -162
- package/dist/7051.creaditor.bundle.js.LICENSE.txt +0 -17
- package/dist/7051.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7051.creaditor.bundle.js.gz +0 -0
- package/dist/715.creaditor.bundle.js +0 -142
- package/dist/715.creaditor.bundle.js.LICENSE.txt +0 -11
- package/dist/715.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/715.creaditor.bundle.js.gz +0 -0
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,i=t.parent("col"),l=e=>"style"===e.text,a=(e,n)=>t.props[e]??t.props.style?.[e]??n;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("style")},tabs:e=>{const t=[{text:"style",selected:!0},{text:"animations"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s,changeTab:r,tabs:c}=e;return[{type:"heading",level:6,text:"video",active:()=>l(s)},{type:"input",title:"add_urlAddress_from_media_site",active:()=>l(s),value:a("url",""),onChange:e=>{let t=e.target.value;if(-1!==t.indexOf("youtube.com/shorts/")){const e=t.split("/");e.length>0&&(t=`https://youtu.be/${e[e.length-1]}`)}n.execCommand("url",t)}},{type:"heading",level:6,text:"playback",active:()=>l(s)},{type:"checkbox",title:"autoplay",info:"autoplayMutedInfo",active:()=>l(s),checked:!!a("playing",!1),onChange:e=>{const t=e.target.checked;n.execCommand("playing",t),t&&!a("muted",!0)&&(n.execCommand("muted",!0),r("style"))}},{type:"checkbox",title:"playInLoop",active:()=>l(s),checked:!!a("loop",!1),onChange:e=>{n.execCommand("loop",e.target.checked)}},{type:"checkbox",title:"slientMode",active:()=>l(s),checked:!!a("muted",!0),onChange:e=>{n.execCommand("muted",e.target.checked)}},{type:"checkbox",title:"showControls",active:()=>l(s),checked:!1!==a("controls",!0),onChange:e=>{n.execCommand("controls",e.target.checked)}},{type:"checkbox",title:"showAsImage",active:()=>l(s),checked:!!a("light",!1),onChange:e=>{n.execCommand("light",e.target.checked)}},{type:"checkbox",title:"playInline",active:()=>l(s),checked:!!a("playsinline",!1),onChange:e=>{n.execCommand("playsinline",e.target.checked)}},{type:"slider",title:"volume",min:0,max:100,unit:"%",active:()=>l(s),value:Math.round(100*(a("volume",.8)??.8)),onInput:e=>{n.execCommand("volume",Number(e.target.value)/100)}},{type:"heading",level:6,text:"size",active:()=>l(s)},{type:"fontSize",title:"size",min:10,active:()=>l(s),max:i?.element?.offsetWidth,value:parseInt(t.props.style.width),device:e=>{if("phone"===e.target.device){const n=t.props?.breakpoints?.sm?.style?.width||t.props.style.width;e.target.value=parseInt(n)}else e.target.value=parseInt(t.props.style.width)},onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{width:t+"px",height:9*t/16+"px"}})}}):n.execCommand("style",{width:t+"px"})}}]}}}};var i=n(52144);const l=["playing","loop","muted","controls","light","playsinline"],a=()=>({set:(e,t,n)=>{if(l.includes(t))return e[t]=Boolean(n),!0;switch(t){case"url":return e[t]=n,!0;case"volume":{const o=parseFloat(n);return!Number.isNaN(o)&&(e[t]=Math.min(1,Math.max(0,o)),!0)}case"style":if("object"==typeof n)return n.width&&(n.height=9*parseFloat(n.width)/16+"px"),e[t]=(0,i.A)(e[t],n),!0}}});var s=n(72591),r=n.n(s),c=n(88639),d=n.n(c),A=n(88128),p=n.n(A),h=n(30855),m=n.n(h),g=n(93051),u=n.n(g),C=n(51115),y={};y.setAttributes=m(),y.insert=p().bind(null,"head"),y.domAPI=d(),y.insertStyleElement=u();r()(C.A,y);const v=C.A&&C.A.locals?C.A.locals:void 0;n(15284);var x=n(86319);const k="video";const b=()=>({name:k,create:e=>{const{createElement:t,compose:n,helpers:i}=e,{arrayToString:l,mergeDiff:s}=i,r=document.createElement("div");r.classList.add(v.root);const c=document.createElement("div");c.classList.add(v.cover);const d=document.createElement("cdtr-media-player"),A=document.createElement("div");A.classList.add(v.empty),A.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M10 8.5l5 3.5-5 3.5z"/></svg>';const p=document.createElement("strong"),h=document.createElement("span");return A.append(p,h),r.append(d,A,c),r.addEventListener("click",()=>{d.playing=!1}),t({name:k,id:n.id,template:r,defaultProps:{url:"https://www.youtube.com/watch?v=04Or_U9OexU",playing:!1,loop:!1,muted:!0,controls:!0,light:!1,playsinline:!1,volume:.8,style:{width:"400px",height:"225px"}},draggable:{group:"element"},droppable:{group:"element"},render:e=>{const t=n.props,o=(e,n)=>t[e]??t.style?.[e]??n,i=o("url");d.url=i;const l=!String(i??"").trim();r.classList.toggle(v.blank,l),l&&(p.textContent=x.M.get("lang","video_paste_link")||"Paste a video link",h.textContent=x.M.get("lang","video_link_sources")||"YouTube, Vimeo or an MP4 file",Object.assign(A.style,{width:t.style.width,height:t.style.height})),s(d,{style:t.style}),d.width=t.style.width,d.height=t.style.height,d.playing=!!o("playing",!1),d.loop=!!o("loop",!1),d.controls=!1!==o("controls",!0),d.light=!!o("light",!1),d.playsinline=!!o("playsinline",!1);const a=o("volume",.8);d.volume="number"==typeof a?a:.8,d.muted=!0},atomElement:d,resizeable:()=>r,handleBar:!0,validator:a(),schema:n.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:n,remove:()=>{r.remove()},createEditor:o})}})},51115(e,t,n){n.d(t,{A:()=>s});var o=n(82001),i=n.n(o),l=n(40935),a=n.n(l)()(i());a.push([e.id,".BaT92HY5C7Gxgg9C1_pc {\n position: relative;\n max-width: 100%;\n}\n.aybkK2AXl8f2XctkkRjJ {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.BaT92HY5C7Gxgg9C1_pc:hover .aybkK2AXl8f2XctkkRjJ {\n display: block;\n background-color: var(--primary);\n}\n\n/* no link yet: a quiet placeholder the size of the video */\n.meCvGtDIqeqhKAtynZ3d {\n display: none;\n box-sizing: border-box;\n max-width: 100%;\n min-height: 160px;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 6px;\n border: 1px solid #dcdde3;\n border-radius: 8px;\n background: #eeeff2;\n color: #6b6880;\n font-size: 13px;\n text-align: center;\n}\n.meCvGtDIqeqhKAtynZ3d svg {\n width: 40px;\n height: 40px;\n margin-bottom: 4px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linejoin: round;\n}\n.meCvGtDIqeqhKAtynZ3d svg path {\n fill: currentColor;\n stroke: none;\n}\n.meCvGtDIqeqhKAtynZ3d strong {\n font-size: 15px;\n font-weight: 500;\n color: #1f1d2b;\n}\n.cUFSqapO5YVXlS_kCjQ_ .meCvGtDIqeqhKAtynZ3d {\n display: flex;\n}\n.cUFSqapO5YVXlS_kCjQ_ cdtr-media-player {\n display: none !important;\n}\n","",{version:3,sources:["webpack://./../web-editors/video-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,OAAO;EACP,MAAM;EACN,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,cAAc;EACd,gCAAgC;AAClC;;AAEA,2DAA2D;AAC3D;EACE,aAAa;EACb,sBAAsB;EACtB,eAAe;EACf,iBAAiB;EACjB,sBAAsB;EACtB,mBAAmB;EACnB,uBAAuB;EACvB,QAAQ;EACR,yBAAyB;EACzB,kBAAkB;EAClB,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,kBAAkB;AACpB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,UAAU;EACV,oBAAoB;EACpB,iBAAiB;EACjB,sBAAsB;AACxB;AACA;EACE,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,eAAe;EACf,gBAAgB;EAChB,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,wBAAwB;AAC1B",sourcesContent:[".root {\n position: relative;\n max-width: 100%;\n}\n.cover {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.root:hover .cover {\n display: block;\n background-color: var(--primary);\n}\n\n/* no link yet: a quiet placeholder the size of the video */\n.empty {\n display: none;\n box-sizing: border-box;\n max-width: 100%;\n min-height: 160px;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 6px;\n border: 1px solid #dcdde3;\n border-radius: 8px;\n background: #eeeff2;\n color: #6b6880;\n font-size: 13px;\n text-align: center;\n}\n.empty svg {\n width: 40px;\n height: 40px;\n margin-bottom: 4px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linejoin: round;\n}\n.empty svg path {\n fill: currentColor;\n stroke: none;\n}\n.empty strong {\n font-size: 15px;\n font-weight: 500;\n color: #1f1d2b;\n}\n.blank .empty {\n display: flex;\n}\n.blank cdtr-media-player {\n display: none !important;\n}\n"],sourceRoot:""}]),a.locals={root:"BaT92HY5C7Gxgg9C1_pc",cover:"aybkK2AXl8f2XctkkRjJ",empty:"meCvGtDIqeqhKAtynZ3d",blank:"cUFSqapO5YVXlS_kCjQ_"};const s=a}}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1728],{1728(e,t,n){n.d(t,{default:()=>S});var s=n(59929),r=n(86959);const i=new Map;var o=n(86319);const a={he:{siteLabel:"כתובת האתר",load:"טעינת פוסטים",loading:"טוען…",search:"חיפוש פוסטים",noPosts:"לא נמצאו פוסטים באתר הזה. בדקו שהכתובת נכונה ושזה אתר וורדפרס.",noTitle:"(ללא כותרת)",empty:"הוסיפו כתובת של אתר וורדפרס בפאנל ובחרו פוסטים כדי להציג אותם כאן.",readMore:"לקריאה",readMoreLabel:"טקסט הקישור לפוסט",loadMore:"טעינת פוסטים נוספים",noMatch:"אין פוסטים שמתאימים לחיפוש.",layout:"פריסה",list:"רשימה",grid:"רשת",columns:"עמודות"},en:{siteLabel:"Website address",load:"Load posts",loading:"Loading…",search:"Search posts",noPosts:"No posts found on this site. Check the address and that it's a WordPress site.",noTitle:"(No title)",empty:"Add a WordPress site in the side panel and pick posts to show them here.",readMore:"Read more",readMoreLabel:"Link text",loadMore:"Load more posts",noMatch:"No posts match this search.",layout:"Layout",list:"List",grid:"Grid",columns:"Columns"}};function l(e){return a["en"===o.M.get("config","language")?"en":"he"][e]}const d=e=>e.link||String(e.wpId);class c extends s.WF{constructor(){super(),this.siteUrl="",this.items=[],this._posts=null,this._search=""}_emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}async _load(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=(this.siteUrl||"").trim();if(!t)return;const n=this._request=(this._request||0)+1;this._loading=!0,this._error="";try{const s=await async function(e){let{offset:t=0,search:n=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new URLSearchParams({site:e.trim(),offset:String(t),search:n}),o=s.toString().toLowerCase();if(i.has(o))return i.get(o);const a=await fetch(`${r.XW.endPoint}/v1/wordpress/posts?${s}`);if(!a.ok)throw new Error(`Request failed (${a.status})`);const l=await a.json();return i.set(o,l),l}(t,{offset:e?this._posts.length:0,search:this._search.trim()});if(n!==this._request)return;this._posts=e?[...this._posts,...s.posts]:s.posts,this._hasMore=s.hasMore,this._posts.length||(this._error=this._search.trim()?l("noMatch"):l("noPosts"))}catch{if(n!==this._request)return;e||(this._posts=null),this._error=l("noPosts")}this._loading=!1}_onSearch(e){this._search=e.target.value,clearTimeout(this._searchTimer),this._searchTimer=setTimeout(()=>this._load(),400)}_toggle(e){const t=d(e),n=this.items.some(e=>d(e)===t);this.items=n?this.items.filter(e=>d(e)!==t):[...this.items,e],this._emit("items-change",this.items)}render(){const e=new Set(this.items.map(d));return s.qy`
|
|
2
|
+
<label class="field" for="site">${l("siteLabel")}</label>
|
|
3
|
+
<input
|
|
4
|
+
id="site"
|
|
5
|
+
type="text"
|
|
6
|
+
dir="ltr"
|
|
7
|
+
placeholder="myblog.com"
|
|
8
|
+
.value=${this.siteUrl}
|
|
9
|
+
@change=${e=>this._emit("site-change",e.target.value.trim())}
|
|
10
|
+
@input=${e=>this.siteUrl=e.target.value}
|
|
11
|
+
@keydown=${e=>"Enter"===e.key&&this._load()}
|
|
12
|
+
/>
|
|
13
|
+
<button type="button" ?disabled=${this._loading||!this.siteUrl.trim()} @click=${()=>this._load()}>
|
|
14
|
+
${this._loading&&!this._posts?l("loading"):l("load")}
|
|
15
|
+
</button>
|
|
16
|
+
${this._posts?s.qy`<input
|
|
17
|
+
class="search"
|
|
18
|
+
type="search"
|
|
19
|
+
aria-label=${l("search")}
|
|
20
|
+
placeholder=${l("search")}
|
|
21
|
+
.value=${this._search}
|
|
22
|
+
@input=${this._onSearch}
|
|
23
|
+
/>`:null}
|
|
24
|
+
${this._error?s.qy`<div class="msg">${this._error}</div>`:null}
|
|
25
|
+
${this._posts?.length?s.qy`
|
|
26
|
+
<div class="list">
|
|
27
|
+
${this._posts.map(t=>s.qy`<label class="row">
|
|
28
|
+
<input
|
|
29
|
+
type="checkbox"
|
|
30
|
+
.checked=${e.has(d(t))}
|
|
31
|
+
@change=${()=>this._toggle(t)}
|
|
32
|
+
/>
|
|
33
|
+
${t.imageSrc?s.qy`<img class="thumb" src=${t.imageSrc} alt="" loading="lazy" />`:s.qy`<span class="thumb"></span>`}
|
|
34
|
+
<span class="title">${t.title||l("noTitle")}</span>
|
|
35
|
+
</label>`)}
|
|
36
|
+
</div>
|
|
37
|
+
${this._hasMore?s.qy`<button class="more" type="button" ?disabled=${this._loading} @click=${()=>this._load(!0)}>
|
|
38
|
+
${this._loading?l("loading"):l("loadMore")}
|
|
39
|
+
</button>`:null}
|
|
40
|
+
`:null}
|
|
41
|
+
`}}c.properties={siteUrl:{type:String},items:{type:Array},_posts:{state:!0},_hasMore:{state:!0},_error:{state:!0},_loading:{state:!0}},c.styles=s.AH`
|
|
42
|
+
:host {
|
|
43
|
+
display: block;
|
|
44
|
+
font-size: 13px;
|
|
45
|
+
line-height: 1.4;
|
|
46
|
+
color: #1a1a1a;
|
|
47
|
+
}
|
|
48
|
+
label.field {
|
|
49
|
+
display: block;
|
|
50
|
+
margin-bottom: 4px;
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
}
|
|
54
|
+
input[type="text"],
|
|
55
|
+
input[type="search"] {
|
|
56
|
+
width: 100%;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
height: 36px;
|
|
59
|
+
padding: 0 10px;
|
|
60
|
+
border: 1px solid #a7adbb;
|
|
61
|
+
border-radius: 8px;
|
|
62
|
+
font: inherit;
|
|
63
|
+
}
|
|
64
|
+
button {
|
|
65
|
+
width: 100%;
|
|
66
|
+
height: 36px;
|
|
67
|
+
margin-top: 10px;
|
|
68
|
+
border: none;
|
|
69
|
+
border-radius: 8px;
|
|
70
|
+
background: #1d1b26;
|
|
71
|
+
color: #fff;
|
|
72
|
+
font: inherit;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
button.more {
|
|
77
|
+
background: none;
|
|
78
|
+
border: 1px solid #c9c5d6;
|
|
79
|
+
color: #1d1b26;
|
|
80
|
+
}
|
|
81
|
+
button:disabled {
|
|
82
|
+
opacity: 0.55;
|
|
83
|
+
cursor: default;
|
|
84
|
+
}
|
|
85
|
+
.search {
|
|
86
|
+
margin: 12px 0 8px;
|
|
87
|
+
}
|
|
88
|
+
.list {
|
|
89
|
+
max-height: 320px;
|
|
90
|
+
overflow: auto;
|
|
91
|
+
border: 1px solid #e3e1ea;
|
|
92
|
+
border-radius: 8px;
|
|
93
|
+
}
|
|
94
|
+
.row {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
gap: 10px;
|
|
98
|
+
padding: 8px 10px;
|
|
99
|
+
border-bottom: 1px solid #eeedf2;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
}
|
|
102
|
+
.row:last-child {
|
|
103
|
+
border-bottom: none;
|
|
104
|
+
}
|
|
105
|
+
.thumb {
|
|
106
|
+
width: 44px;
|
|
107
|
+
height: 44px;
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
border-radius: 6px;
|
|
110
|
+
object-fit: cover;
|
|
111
|
+
background: #eee;
|
|
112
|
+
}
|
|
113
|
+
.title {
|
|
114
|
+
flex: 1;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
display: -webkit-box;
|
|
117
|
+
-webkit-line-clamp: 2;
|
|
118
|
+
-webkit-box-orient: vertical;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
}
|
|
121
|
+
.msg {
|
|
122
|
+
margin-top: 10px;
|
|
123
|
+
color: #b42318;
|
|
124
|
+
font-size: 12px;
|
|
125
|
+
}
|
|
126
|
+
`,customElements.get("cdtr-wp-posts-picker")||customElements.define("cdtr-wp-posts-picker",c);const p=e=>{let{component:t,commands:n}=e;const r=()=>t.props.layout||"list",i=()=>[{value:"list",label:l("list")},{value:"grid",label:l("grid")}],o=()=>String(t.props.columns||3);return{select:e=>{let{changeTab:t,tab:n}=e;"wordpress"!==n?.text&&t("wordpress")},tabs:e=>[{text:"wordpress"}].map(t=>({...t,selected:t.text===e})),layout:()=>[{type:"custom",node:()=>s.qy`<cdtr-editor-container
|
|
127
|
+
><cdtr-wp-posts-picker
|
|
128
|
+
.siteUrl=${t.props.siteUrl||""}
|
|
129
|
+
.items=${t.props.items||[]}
|
|
130
|
+
@site-change=${e=>n.execCommand("siteUrl",e.detail)}
|
|
131
|
+
@items-change=${e=>n.execCommand("items",e.detail)}
|
|
132
|
+
></cdtr-wp-posts-picker
|
|
133
|
+
></cdtr-editor-container>`},{type:"input",title:l("readMoreLabel"),value:t.props.readMore??l("readMore"),onInput:e=>{let{target:t}=e;return n.execCommand("readMore",t.value)}},{type:"dropdown",title:l("layout"),value:i().find(e=>e.value===r()).label,selected:r(),items:i(),onChange:e=>{let{target:t}=e;return n.execCommand("layout",t.value)}},{type:"dropdown",title:l("columns"),active:()=>"grid"===r(),value:o(),selected:o(),items:[{value:"2"},{value:"3"}],onChange:e=>{let{target:t}=e;return n.execCommand("columns",Number(t.value))}},{type:"slider",title:"spacing",unit:"px",value:parseFloat(t.props.style?.gap)||16,min:0,max:48,onInput:e=>n.execCommand("style",{gap:e.target.value+"px"})}]}};function A(e){let{helpers:t}=e;return{set:(e,n,s)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n]||{},s),!0;case"siteUrl":case"readMore":case"layout":case"columns":return e[n]=s,!0;case"items":return!!Array.isArray(s)&&(e[n]=s,!0);default:return!1}}}}var h=n(72591),m=n.n(h),g=n(88639),u=n.n(g),x=n(88128),b=n.n(x),f=n(30855),E=n.n(f),C=n(93051),y=n.n(C),w=n(17745),B={};B.setAttributes=E(),B.insert=b().bind(null,"head"),B.domAPI=u(),B.insertStyleElement=y();m()(w.A,B);const _=w.A&&w.A.locals?w.A.locals:void 0,v="wordpress-posts",k=e=>/^https?:\/\//i.test(e||"");const S=()=>({name:v,create:e=>{let{createElement:t,compose:n,helpers:s}=e;const r=document.createElement("div"),i=document.createElement("div");i.className=_.root,r.appendChild(i);return t({name:v,id:n.id,template:r,handleBar:!0,draggable:{group:"element"},droppable:{group:"element"},defaultProps:{},validator:A({helpers:s}),schema:n.schema,render:()=>{const{items:e=[],style:t={},readMore:s,layout:r,columns:o}=n.props;if(i.style.gap=t.gap||"16px",i.classList.toggle(_.grid,"grid"===r),i.style.setProperty("--wp-columns",o||3),!e.length){const e=document.createElement("div");return e.className=_.empty,e.textContent=l("empty"),void i.replaceChildren(e)}i.replaceChildren(...e.map(e=>function(e,t){const n=document.createElement("article");if(n.className=_.card,k(e.imageSrc)){const t=document.createElement("img");t.className=_.cardImage,t.src=e.imageSrc,t.alt="",t.loading="lazy",n.appendChild(t)}const s=document.createElement("div");s.className=_.cardBody;const r=document.createElement("h3");if(r.className=_.cardTitle,r.textContent=e.title||"",s.appendChild(r),e.excerpt){const t=document.createElement("p");t.className=_.cardExcerpt,t.textContent=e.excerpt,s.appendChild(t)}if(k(e.link)){const n=document.createElement("a");n.className=_.cardLink,n.href=e.link,n.target="_blank",n.rel="noopener noreferrer",n.textContent=t,s.appendChild(n)}return n.appendChild(s),n}(e,s||l("readMore"))))},onSelect:e=>r.classList.add(e),onDeselect:e=>r.classList.remove(e),elementProps:n,remove:()=>r.remove(),createEditor:p})}})},17745(e,t,n){n.d(t,{A:()=>a});var s=n(82001),r=n.n(s),i=n(40935),o=n.n(i)()(r());o.push([e.id,".QMM0Ne0SSshuEoPSpnxG {\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n}\n\n.RRwLCuhZ68SyVSMlO3N4 {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n grid-template-columns: repeat(var(--wp-columns, 3), minmax(0, 1fr));\n}\n\n.RRwLCuhZ68SyVSMlO3N4 .tZf8qOpD_KSZFAh_YwKG {\n flex-direction: column;\n}\n\n.RRwLCuhZ68SyVSMlO3N4 .CsD9adYwQVlhzkifY6xg {\n width: 100%;\n min-width: 0;\n height: 160px;\n}\n\n@media (max-width: 767px) {\n .RRwLCuhZ68SyVSMlO3N4 {\n grid-template-columns: 1fr;\n }\n}\n\n.sZGGqRAlOWV6JBJoj_jZ {\n padding: 16px;\n font-size: 13px;\n line-height: 1.5;\n color: rgba(0, 0, 0, 0.55);\n border: 1px dashed rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n text-align: center;\n}\n\n.tZf8qOpD_KSZFAh_YwKG {\n display: flex;\n gap: 12px;\n padding: 12px;\n border-radius: 8px;\n background: #fff;\n box-shadow: rgba(0, 0, 0, 0.06) 0 1px 3px, rgba(0, 0, 0, 0.08) 0 0 0 1px;\n box-sizing: border-box;\n}\n\n.CsD9adYwQVlhzkifY6xg {\n width: 96px;\n min-width: 96px;\n height: 72px;\n -o-object-fit: cover;\n object-fit: cover;\n border-radius: 6px;\n background: #eee;\n}\n\n.iLhTgf0FxVs9Z1AeQ6_3 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.dyVYKRqoQJ7RazcFf51n {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n line-height: 1.3;\n}\n\n.jtXLUEN_humrzK8BYCJA {\n margin: 0;\n font-size: 13px;\n line-height: 1.45;\n color: rgba(0, 0, 0, 0.65);\n}\n\n.HiXS6dcHAvAeJwaGFM8O {\n align-self: flex-start;\n font-size: 13px;\n font-weight: 600;\n color: inherit;\n text-decoration: underline;\n}\n","",{version:3,sources:["webpack://./../web-editors/wordpress-posts-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,sBAAsB;EACtB,WAAW;EACX,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,gDAAmE;EAAnE,mEAAmE;AACrE;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAEA;EACE;IACE,0BAA0B;EAC5B;AACF;;AAEA;EACE,aAAa;EACb,eAAe;EACf,gBAAgB;EAChB,0BAA0B;EAC1B,sCAAsC;EACtC,kBAAkB;EAClB,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,SAAS;EACT,aAAa;EACb,kBAAkB;EAClB,gBAAgB;EAChB,wEAAwE;EACxE,sBAAsB;AACxB;;AAEA;EACE,WAAW;EACX,eAAe;EACf,YAAY;EACZ,oBAAiB;KAAjB,iBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,OAAO;EACP,YAAY;EACZ,aAAa;EACb,sBAAsB;EACtB,QAAQ;AACV;;AAEA;EACE,SAAS;EACT,eAAe;EACf,gBAAgB;EAChB,gBAAgB;AAClB;;AAEA;EACE,SAAS;EACT,eAAe;EACf,iBAAiB;EACjB,0BAA0B;AAC5B;;AAEA;EACE,sBAAsB;EACtB,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,0BAA0B;AAC5B",sourcesContent:[".root {\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n}\n\n.grid {\n display: grid;\n grid-template-columns: repeat(var(--wp-columns, 3), minmax(0, 1fr));\n}\n\n.grid .card {\n flex-direction: column;\n}\n\n.grid .cardImage {\n width: 100%;\n min-width: 0;\n height: 160px;\n}\n\n@media (max-width: 767px) {\n .grid {\n grid-template-columns: 1fr;\n }\n}\n\n.empty {\n padding: 16px;\n font-size: 13px;\n line-height: 1.5;\n color: rgba(0, 0, 0, 0.55);\n border: 1px dashed rgba(0, 0, 0, 0.15);\n border-radius: 8px;\n text-align: center;\n}\n\n.card {\n display: flex;\n gap: 12px;\n padding: 12px;\n border-radius: 8px;\n background: #fff;\n box-shadow: rgba(0, 0, 0, 0.06) 0 1px 3px, rgba(0, 0, 0, 0.08) 0 0 0 1px;\n box-sizing: border-box;\n}\n\n.cardImage {\n width: 96px;\n min-width: 96px;\n height: 72px;\n object-fit: cover;\n border-radius: 6px;\n background: #eee;\n}\n\n.cardBody {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.cardTitle {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n line-height: 1.3;\n}\n\n.cardExcerpt {\n margin: 0;\n font-size: 13px;\n line-height: 1.45;\n color: rgba(0, 0, 0, 0.65);\n}\n\n.cardLink {\n align-self: flex-start;\n font-size: 13px;\n font-weight: 600;\n color: inherit;\n text-decoration: underline;\n}\n"],sourceRoot:""}]),o.locals={root:"QMM0Ne0SSshuEoPSpnxG",grid:"RRwLCuhZ68SyVSMlO3N4",card:"tZf8qOpD_KSZFAh_YwKG",cardImage:"CsD9adYwQVlhzkifY6xg",empty:"sZGGqRAlOWV6JBJoj_jZ",cardBody:"iLhTgf0FxVs9Z1AeQ6_3",cardTitle:"dyVYKRqoQJ7RazcFf51n",cardExcerpt:"jtXLUEN_humrzK8BYCJA",cardLink:"HiXS6dcHAvAeJwaGFM8O"};const a=o}}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3601],{3601(t,i,e){e.r(i),e.d(i,{MakeNewsletterAsEventPlugin:()=>kt});var n,r,a,o,l,s,c,h,p,u,d,b,m,f,g,y,v,T,A,x,w,S,C,D,$,k,M,z,Z,E,L,H,V,P,R,B,q,O,F,I,K,N,W,_,j,G,J,Q,U,X,Y,tt,it,et,nt,rt,at,ot,lt,st,ct,ht,pt,ut,dt,bt,mt,ft,gt,yt,vt,Tt,At,xt,wt=e(59088),St=e(36936),Ct=e(59929),Dt=e(49410),$t=e(21421);let kt=(n=(0,Dt.EM)("cdtr-make-newsletter-as-event-plugin"),r=(0,Dt.MZ)({type:String}),a=(0,Dt.MZ)({type:String}),o=(0,Dt.MZ)({type:String}),l=(0,Dt.MZ)({type:String}),s=(0,Dt.MZ)({type:String}),c=(0,Dt.MZ)({type:String}),h=(0,Dt.MZ)({type:String}),p=(0,Dt.MZ)({type:String}),u=(0,Dt.MZ)({type:String}),d=(0,Dt.MZ)({type:String}),b=(0,Dt.MZ)({type:String}),m=(0,Dt.MZ)({type:String}),f=(0,Dt.MZ)({type:String}),g=(0,Dt.MZ)({type:String}),y=(0,Dt.MZ)({type:String}),v=(0,Dt.MZ)({type:String}),T=(0,Dt.MZ)({type:String}),A=(0,Dt.MZ)({type:String}),x=(0,Dt.MZ)({type:String}),w=(0,Dt.MZ)({type:String}),S=(0,Dt.MZ)({type:String}),C=(0,Dt.MZ)({type:String}),D=(0,Dt.MZ)({type:String}),$=(0,Dt.MZ)({type:String}),k=(0,Dt.MZ)({type:String}),M=(0,Dt.MZ)(),z=(0,Dt.MZ)(),Z=(0,Dt.MZ)(),E=(0,Dt.MZ)(),L=(0,Dt.MZ)(),H=(0,Dt.MZ)(),V=(0,Dt.MZ)(),P=(0,Dt.MZ)(),R=(0,Dt.MZ)(),B=(0,Dt.MZ)(),n((xt=class extends Ct.WF{constructor(){super(...arguments),(0,wt.A)(this,"lang",F,this),(0,wt.A)(this,"primaryColor",I,this),(0,wt.A)(this,"primaryTextColor",K,this),(0,wt.A)(this,"buttonText",N,this),(0,wt.A)(this,"iconColor",W,this),(0,wt.A)(this,"buttonTextContent",_,this),(0,wt.A)(this,"headerText",j,this),(0,wt.A)(this,"startLabel",G,this),(0,wt.A)(this,"endLabel",J,this),(0,wt.A)(this,"locationLabel",Q,this),(0,wt.A)(this,"linkLabel",U,this),(0,wt.A)(this,"saveButtonText",X,this),(0,wt.A)(this,"cancelEventText",Y,this),(0,wt.A)(this,"confirmCancelText",tt,this),(0,wt.A)(this,"creatingEventText",it,this),(0,wt.A)(this,"eventCreatedText",et,this),(0,wt.A)(this,"errorMessage",nt,this),(0,wt.A)(this,"locationPlaceholder",rt,this),(0,wt.A)(this,"linkPlaceholder",at,this),(0,wt.A)(this,"initialStartDate",ot,this),(0,wt.A)(this,"initialStartTime",lt,this),(0,wt.A)(this,"initialEndDate",st,this),(0,wt.A)(this,"initialEndTime",ct,this),(0,wt.A)(this,"initialLocation",ht,this),(0,wt.A)(this,"initialLink",pt,this),(0,wt.A)(this,"startDate",ut,this),(0,wt.A)(this,"startTime",dt,this),(0,wt.A)(this,"endDate",bt,this),(0,wt.A)(this,"endTime",mt,this),(0,wt.A)(this,"location",ft,this),(0,wt.A)(this,"link",gt,this),(0,wt.A)(this,"error",yt,this),(0,wt.A)(this,"isSaving",vt,this),(0,wt.A)(this,"isSaved",Tt,this),(0,wt.A)(this,"isConfirmingCancel",At,this),this.popoverRef=(0,$t._)(),this.cancelTimeout=null}get buttonDisplayText(){if(this.isSaved)return this.eventCreatedText;if(this.isSaving)return this.creatingEventText;if(this.startDate&&this.startTime){return new Date(`${this.startDate}T${this.startTime}`).toLocaleDateString(this.lang,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}return this.buttonTextContent}connectedCallback(){super.connectedCallback(),this.initialStartDate&&this.initialStartTime&&(this.startDate=this.initialStartDate,this.startTime=this.initialStartTime),this.initialEndDate&&this.initialEndTime&&(this.endDate=this.initialEndDate,this.endTime=this.initialEndTime),this.initialLocation&&(this.location=this.initialLocation),this.initialLink&&(this.link=this.initialLink)}handleStartDateTimeChange(t){const i=t.target,[e,n]=i.value.split("T");if(this.startDate=e,this.startTime=n,!this.endDate&&!this.endTime){const t=new Date(`${e}T${n}`),i=new Date(t.getTime()+36e5);this.endDate=i.toISOString().split("T")[0],this.endTime=i.toTimeString().slice(0,5)}this.validateDates()}handleEndDateTimeChange(t){const i=t.target,[e,n]=i.value.split("T");this.endDate=e,this.endTime=n,this.validateDates()}validateDates(){if(this.startDate&&this.startTime&&this.endDate&&this.endTime){const t=new Date(`${this.startDate}T${this.startTime}`),i=new Date(`${this.endDate}T${this.endTime}`);this.error=i<=t?this.errorMessage:""}}async handleSave(){if(this.error)return;this.isSaving=!0,this.isSaved=!1;const t=new CustomEvent("event-created",{detail:{startDate:this.startDate,startTime:this.startTime,endDate:this.endDate,endTime:this.endTime,location:this.location,link:this.link},bubbles:!0,composed:!0});this.dispatchEvent(t),this.popoverRef.value?.close(),await new Promise(t=>setTimeout(t,1500)),this.isSaving=!1,this.isSaved=!0,setTimeout(()=>{this.isSaved=!1},2e3)}handleCancelEvent(){if(this.isConfirmingCancel){this.cancelTimeout&&(clearTimeout(this.cancelTimeout),this.cancelTimeout=null),this.startDate="",this.startTime="",this.endDate="",this.endTime="",this.location="",this.link="",this.error="",this.isConfirmingCancel=!1;const t=new CustomEvent("event-cancelled",{detail:{startDate:this.startDate,startTime:this.startTime,endDate:this.endDate,endTime:this.endTime,location:this.location,link:this.link},bubbles:!0,composed:!0});this.dispatchEvent(t),this.popoverRef.value?.close()}else this.isConfirmingCancel=!0,this.cancelTimeout=window.setTimeout(()=>{this.isConfirmingCancel=!1},3e3)}disconnectedCallback(){super.disconnectedCallback(),this.cancelTimeout&&clearTimeout(this.cancelTimeout)}render(){return Ct.qy`
|
|
2
|
+
<cdtr-popover ${(0,$t.K)(this.popoverRef)}>
|
|
3
|
+
<paper-button
|
|
4
|
+
color="primary"
|
|
5
|
+
slot="trigger"
|
|
6
|
+
dir="auto"
|
|
7
|
+
?disabled=${this.isSaving}
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
style="color:${this.iconColor}"
|
|
11
|
+
class="button-content ${this.isSaved?"hidden":""}"
|
|
12
|
+
>
|
|
13
|
+
<svg
|
|
14
|
+
width="20"
|
|
15
|
+
height="20"
|
|
16
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
+
viewBox="0 0 24 24"
|
|
18
|
+
fill="${this.iconColor||"currentColor"}"
|
|
19
|
+
>
|
|
20
|
+
<path
|
|
21
|
+
d="M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM11 13V17H6V13H11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z"
|
|
22
|
+
></path>
|
|
23
|
+
</svg>
|
|
24
|
+
${this.buttonDisplayText}
|
|
25
|
+
</div>
|
|
26
|
+
<div
|
|
27
|
+
class="button-border ${this.isSaving?"loading":""} ${this.isSaved?"success":""}"
|
|
28
|
+
></div>
|
|
29
|
+
<svg
|
|
30
|
+
class="checkmark ${this.isSaved?"visible":""}"
|
|
31
|
+
viewBox="0 0 24 24"
|
|
32
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
+
>
|
|
34
|
+
<path
|
|
35
|
+
d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"
|
|
36
|
+
fill="${"currentColor"}"
|
|
37
|
+
/>
|
|
38
|
+
</svg>
|
|
39
|
+
</paper-button>
|
|
40
|
+
<div slot="content" class="popover-content" dir="auto">
|
|
41
|
+
<div class="popover-header">
|
|
42
|
+
<h3 dir="auto">${this.headerText}</h3>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="input-group">
|
|
46
|
+
<label dir="auto">${this.startLabel}</label>
|
|
47
|
+
<input
|
|
48
|
+
type="datetime-local"
|
|
49
|
+
.value=${`${this.startDate}T${this.startTime}`}
|
|
50
|
+
@change=${this.handleStartDateTimeChange}
|
|
51
|
+
dir="auto"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="input-group">
|
|
56
|
+
<label dir="auto">${this.endLabel}</label>
|
|
57
|
+
<input
|
|
58
|
+
type="datetime-local"
|
|
59
|
+
.value=${`${this.endDate}T${this.endTime}`}
|
|
60
|
+
@change=${this.handleEndDateTimeChange}
|
|
61
|
+
dir="auto"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="input-group">
|
|
66
|
+
<label dir="auto">${this.locationLabel}</label>
|
|
67
|
+
<input
|
|
68
|
+
type="text"
|
|
69
|
+
.value=${this.location}
|
|
70
|
+
@input=${t=>this.location=t.target.value}
|
|
71
|
+
placeholder=${this.locationPlaceholder}
|
|
72
|
+
dir="auto"
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div class="input-group">
|
|
77
|
+
<label dir="auto">${this.linkLabel}</label>
|
|
78
|
+
<input
|
|
79
|
+
name="link"
|
|
80
|
+
type="url"
|
|
81
|
+
.value=${this.link}
|
|
82
|
+
@input=${t=>this.link=t.target.value}
|
|
83
|
+
placeholder=${this.linkPlaceholder}
|
|
84
|
+
dir="auto"
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
${this.error?Ct.qy`<div class="error" dir="auto">${this.error}</div>`:""}
|
|
89
|
+
|
|
90
|
+
<div class="button-group">
|
|
91
|
+
${this.startDate||this.endDate?Ct.qy`
|
|
92
|
+
<paper-button
|
|
93
|
+
style=${`background: #ff0000;color:${this.primaryTextColor}`}
|
|
94
|
+
class="cancel-event ${this.isConfirmingCancel?"confirming":""}"
|
|
95
|
+
@click=${this.handleCancelEvent}
|
|
96
|
+
?disabled=${this.isSaving}
|
|
97
|
+
dir="auto"
|
|
98
|
+
>
|
|
99
|
+
${this.isConfirmingCancel?this.confirmCancelText:this.cancelEventText}
|
|
100
|
+
</paper-button>
|
|
101
|
+
`:""}
|
|
102
|
+
<paper-button
|
|
103
|
+
@click=${this.handleSave}
|
|
104
|
+
?disabled=${!!this.error||this.isSaving}
|
|
105
|
+
style=${`background: ${this.primaryColor};color:${this.primaryTextColor};width:100%;`}
|
|
106
|
+
dir="auto"
|
|
107
|
+
>
|
|
108
|
+
${this.saveButtonText}
|
|
109
|
+
</paper-button>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</cdtr-popover>
|
|
113
|
+
`}},xt.styles=Ct.AH`
|
|
114
|
+
:host {
|
|
115
|
+
display: block;
|
|
116
|
+
}
|
|
117
|
+
* {
|
|
118
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
119
|
+
box-sizing: border-box;
|
|
120
|
+
}
|
|
121
|
+
.popover-content {
|
|
122
|
+
padding: 16px;
|
|
123
|
+
min-width: 300px;
|
|
124
|
+
}
|
|
125
|
+
.popover-header {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 8px;
|
|
129
|
+
margin-bottom: 16px;
|
|
130
|
+
padding-bottom: 8px;
|
|
131
|
+
border-bottom: 1px solid #e0e0e0;
|
|
132
|
+
}
|
|
133
|
+
.popover-header h3 {
|
|
134
|
+
margin: 0;
|
|
135
|
+
font-size: 16px;
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
color: #333;
|
|
138
|
+
}
|
|
139
|
+
.popover-header svg {
|
|
140
|
+
width: 20px;
|
|
141
|
+
height: 20px;
|
|
142
|
+
color: #666;
|
|
143
|
+
}
|
|
144
|
+
.input-group {
|
|
145
|
+
margin-bottom: 16px;
|
|
146
|
+
}
|
|
147
|
+
.input-group label {
|
|
148
|
+
display: block;
|
|
149
|
+
margin-bottom: 4px;
|
|
150
|
+
font-size: 14px;
|
|
151
|
+
color: #333;
|
|
152
|
+
}
|
|
153
|
+
.input-group input {
|
|
154
|
+
padding: 8px 12px;
|
|
155
|
+
border: 1px solid #ccc;
|
|
156
|
+
border-radius: 4px;
|
|
157
|
+
width: 100%;
|
|
158
|
+
font-size: 14px;
|
|
159
|
+
transition: border-color 0.2s;
|
|
160
|
+
}
|
|
161
|
+
.input-group input:focus {
|
|
162
|
+
border-color: #666;
|
|
163
|
+
outline: none;
|
|
164
|
+
}
|
|
165
|
+
.datetime-container {
|
|
166
|
+
display: grid;
|
|
167
|
+
grid-template-columns: 1fr 1fr;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
}
|
|
170
|
+
.error {
|
|
171
|
+
color: #ff0000;
|
|
172
|
+
font-size: 12px;
|
|
173
|
+
margin-bottom: 8px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.button-content {
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
gap: 8px;
|
|
180
|
+
position: relative;
|
|
181
|
+
z-index: 1;
|
|
182
|
+
transition: opacity 0.3s ease;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.button-content.hidden {
|
|
186
|
+
opacity: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.button-border {
|
|
190
|
+
position: absolute;
|
|
191
|
+
top: 0;
|
|
192
|
+
left: 0;
|
|
193
|
+
right: 0;
|
|
194
|
+
bottom: 0;
|
|
195
|
+
border: 2px solid transparent;
|
|
196
|
+
border-radius: 4px;
|
|
197
|
+
pointer-events: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.button-border.loading {
|
|
201
|
+
border-color: #ffffff;
|
|
202
|
+
animation: borderRotate 1.5s linear infinite;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.button-border.success {
|
|
206
|
+
border-color: #4caf50;
|
|
207
|
+
animation: borderSuccess 0.5s ease-out forwards;
|
|
208
|
+
}
|
|
209
|
+
paper-button {
|
|
210
|
+
min-width: 10px;
|
|
211
|
+
max-height:40px;
|
|
212
|
+
}
|
|
213
|
+
.checkmark {
|
|
214
|
+
position: absolute;
|
|
215
|
+
top: 50%;
|
|
216
|
+
left: 50%;
|
|
217
|
+
transform: translate(-50%, -50%) scale(0);
|
|
218
|
+
width: 24px;
|
|
219
|
+
height: 24px;
|
|
220
|
+
opacity: 0;
|
|
221
|
+
transition: opacity 0.3s ease;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.checkmark.visible {
|
|
225
|
+
opacity: 1;
|
|
226
|
+
transform: translate(-50%, -50%) scale(1);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@keyframes borderRotate {
|
|
230
|
+
0% {
|
|
231
|
+
clip-path: polygon(0 0, 0 0, 0 0, 0 0);
|
|
232
|
+
}
|
|
233
|
+
25% {
|
|
234
|
+
clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
|
|
235
|
+
}
|
|
236
|
+
50% {
|
|
237
|
+
clip-path: polygon(100% 0, 100% 100%, 100% 100%, 100% 0);
|
|
238
|
+
}
|
|
239
|
+
75% {
|
|
240
|
+
clip-path: polygon(100% 100%, 0 100%, 0 100%, 100% 100%);
|
|
241
|
+
}
|
|
242
|
+
100% {
|
|
243
|
+
clip-path: polygon(0 100%, 0 0, 0 0, 0 100%);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@keyframes borderSuccess {
|
|
248
|
+
0% {
|
|
249
|
+
clip-path: polygon(0 0, 0 0, 0 0, 0 0);
|
|
250
|
+
}
|
|
251
|
+
100% {
|
|
252
|
+
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@keyframes checkmarkSuccess {
|
|
257
|
+
0% {
|
|
258
|
+
transform: translate(-50%, -50%) scale(0);
|
|
259
|
+
opacity: 0;
|
|
260
|
+
}
|
|
261
|
+
50% {
|
|
262
|
+
transform: translate(-50%, -50%) scale(1.2);
|
|
263
|
+
opacity: 1;
|
|
264
|
+
}
|
|
265
|
+
100% {
|
|
266
|
+
transform: translate(-50%, -50%) scale(1);
|
|
267
|
+
opacity: 1;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.button-group {
|
|
272
|
+
display: flex;
|
|
273
|
+
gap: 8px;
|
|
274
|
+
margin-top: 16px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
@keyframes pulse {
|
|
278
|
+
0% {
|
|
279
|
+
transform: scale(1);
|
|
280
|
+
}
|
|
281
|
+
50% {
|
|
282
|
+
transform: scale(1.05);
|
|
283
|
+
}
|
|
284
|
+
100% {
|
|
285
|
+
transform: scale(1);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
`,O=xt,F=(0,St.A)(O.prototype,"lang",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"en"}}),I=(0,St.A)(O.prototype,"primaryColor",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#000000"}}),K=(0,St.A)(O.prototype,"primaryTextColor",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#ffffff"}}),N=(0,St.A)(O.prototype,"buttonText",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#ffffff"}}),W=(0,St.A)(O.prototype,"iconColor",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#ffffff"}}),_=(0,St.A)(O.prototype,"buttonTextContent",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),j=(0,St.A)(O.prototype,"headerText",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Create Event"}}),G=(0,St.A)(O.prototype,"startLabel",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Start Date & Time"}}),J=(0,St.A)(O.prototype,"endLabel",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"End Date & Time"}}),Q=(0,St.A)(O.prototype,"locationLabel",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Location"}}),U=(0,St.A)(O.prototype,"linkLabel",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Link (Optional)"}}),X=(0,St.A)(O.prototype,"saveButtonText",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Save Event"}}),Y=(0,St.A)(O.prototype,"cancelEventText",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Cancel Event"}}),tt=(0,St.A)(O.prototype,"confirmCancelText",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Are you sure you want to cancel?"}}),it=(0,St.A)(O.prototype,"creatingEventText",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Creating Event..."}}),et=(0,St.A)(O.prototype,"eventCreatedText",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Event Created!"}}),nt=(0,St.A)(O.prototype,"errorMessage",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"End date/time must be after start date/time"}}),rt=(0,St.A)(O.prototype,"locationPlaceholder",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Enter event location"}}),at=(0,St.A)(O.prototype,"linkPlaceholder",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Enter event link"}}),ot=(0,St.A)(O.prototype,"initialStartDate",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),lt=(0,St.A)(O.prototype,"initialStartTime",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),st=(0,St.A)(O.prototype,"initialEndDate",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ct=(0,St.A)(O.prototype,"initialEndTime",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ht=(0,St.A)(O.prototype,"initialLocation",[$],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),pt=(0,St.A)(O.prototype,"initialLink",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ut=(0,St.A)(O.prototype,"startDate",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),dt=(0,St.A)(O.prototype,"startTime",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),bt=(0,St.A)(O.prototype,"endDate",[Z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),mt=(0,St.A)(O.prototype,"endTime",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ft=(0,St.A)(O.prototype,"location",[L],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),gt=(0,St.A)(O.prototype,"link",[H],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),yt=(0,St.A)(O.prototype,"error",[V],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),vt=(0,St.A)(O.prototype,"isSaving",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tt=(0,St.A)(O.prototype,"isSaved",[R],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),At=(0,St.A)(O.prototype,"isConfirmingCancel",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),q=O))||q)}}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|