@creaditor/web-starterkit 1.0.63 → 1.0.64
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.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/175.creaditor.bundle.js.gz +0 -0
- package/dist/1972.creaditor.bundle.js.gz +0 -0
- package/dist/2001.creaditor.bundle.js +335 -0
- package/dist/2001.creaditor.bundle.js.LICENSE.txt +11 -0
- package/dist/{6442.creaditor.bundle.js.LICENSE.txt.gz → 2001.creaditor.bundle.js.LICENSE.txt.gz} +0 -0
- package/dist/2001.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 +16 -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 +2 -11
- 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 +1 -0
- package/dist/3600.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 +9 -9
- 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 +1 -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/{6323.creaditor.bundle.js → 4819.creaditor.bundle.js} +7 -7
- package/dist/4819.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/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/5791.creaditor.bundle.js +288 -0
- package/dist/5791.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 +8 -8
- 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 +1 -1
- 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/638.creaditor.bundle.js.gz +0 -0
- package/dist/6442.creaditor.bundle.js +214 -155
- 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/7051.creaditor.bundle.js +162 -0
- package/dist/{6442.creaditor.bundle.js.LICENSE.txt → 7051.creaditor.bundle.js.LICENSE.txt} +0 -6
- package/dist/7051.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7051.creaditor.bundle.js.gz +0 -0
- package/dist/7055.creaditor.bundle.js.gz +0 -0
- package/dist/715.creaditor.bundle.js +142 -0
- package/dist/715.creaditor.bundle.js.LICENSE.txt +11 -0
- package/dist/715.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/715.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/{8547.creaditor.bundle.js → 7348.creaditor.bundle.js} +66 -131
- 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 +48 -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/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 +800 -345
- package/dist/creaditor.bundle.js.LICENSE.txt +6 -0
- 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/1204.creaditor.bundle.js +0 -236
- package/dist/1204.creaditor.bundle.js.gz +0 -0
- package/dist/3601.creaditor.bundle.js +0 -288
- package/dist/3601.creaditor.bundle.js.gz +0 -0
- package/dist/507.creaditor.bundle.js +0 -334
- package/dist/507.creaditor.bundle.js.gz +0 -0
- package/dist/5119.creaditor.bundle.js +0 -48
- package/dist/5119.creaditor.bundle.js.gz +0 -0
- package/dist/6323.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js +0 -51
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/8088.creaditor.bundle.js +0 -141
- package/dist/8088.creaditor.bundle.js.gz +0 -0
- package/dist/8547.creaditor.bundle.js.gz +0 -0
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[507],{90507(e,i,t){t.r(i),t.d(i,{AttachedFilesPlugin:()=>f});var s,o,r,a,l,n,d=t(59088),p=t(36936),h=t(59929),c=t(49410);let f=(s=(0,c.EM)("cdtr-attached-files-plugin"),o=(0,c.MZ)({type:Object,attribute:!1}),s(((n=class extends h.WF{constructor(){super(),this.files=[],this.maxFiles=1/0,this.maxFileSizeMB=1/0,this.isLoading=!1,this.buttonText="Attached Files",this.addFilesText="Add Files",this.maxFilesReachedText="Maximum number of files reached",this.fileTooLargeText="File size exceeds the limit",this.error="",this.customColor="",this.customTextColor="",this.iconColor="",this.loadingText="Loading files...",(0,d.A)(this,"lazyLoad",l,this),this._isOpen=!1,this._lazyLoadPromise=null,this.initializeLazyLoad()}initializeLazyLoad(){let e,i;const t=new Promise((t,s)=>{e=t,i=s});this._lazyLoadPromise={promise:t,resolve:e,reject:i},this.lazyLoad=this._lazyLoadPromise,this._lazyLoadPromise.promise.then(e=>{this.handleLazyLoadedFiles(e)}).catch(e=>{console.error("Lazy load promise rejected:",e),this.error=`Failed to load files: ${e.message}`})}handleLazyLoadedFiles(e){if(!Array.isArray(e))return void console.error("Lazy loaded files must be an array");const i=e.filter(e=>e&&"object"==typeof e?!!(e.id&&e.name&&e.type&&e.url)||(console.warn("File missing required properties:",e),!1):(console.warn("Invalid file object:",e),!1));if(0===i.length)return void console.warn("No valid files found in lazy load");const t=this.maxFiles-this.files.length;if(t<=0)return this.error=this.maxFilesReachedText,void this.dispatchEvent(new CustomEvent("max-files-reached",{detail:{maxFiles:this.maxFiles},bubbles:!0,composed:!0}));const s=i.slice(0,t);this.files=[...this.files,...s],this.error="",this.dispatchEvent(new CustomEvent("lazy-files-loaded",{detail:{files:s,totalFiles:this.files.length},bubbles:!0,composed:!0})),this.requestUpdate()}resolveLazyLoad(e){this._lazyLoadPromise&&this._lazyLoadPromise.resolve(e)}rejectLazyLoad(e){this._lazyLoadPromise&&this._lazyLoadPromise.reject(e)}getLazyLoadPromise(){return this._lazyLoadPromise?.promise||null}resetLazyLoad(){this.initializeLazyLoad()}showLoading(e){this.isLoading=!0,e&&(this.loadingText=e),this.requestUpdate()}hideLoading(){this.isLoading=!1,this.requestUpdate()}formatFileSize(e){if(0===e)return"0 B";const i=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,i)).toFixed(2))} ${["B","KB","MB","GB"][i]}`}displayName(e){const i=e.name||e.url||"",t=i.split(/[?#]/)[0].split("/").filter(Boolean).pop()||i;try{return decodeURIComponent(t)}catch{return t}}extension(e){const i=this.displayName(e).match(/\.([a-z0-9]{1,5})$/i);return i?i[1].toLowerCase():""}fileKind(e){const i=(e.type||"").toLowerCase().split("/")[0];if(["image","pdf","video","audio"].includes(i))return i;if((e.type||"").toLowerCase().includes("pdf"))return"pdf";const t=this.extension(e);return/^(png|jpe?g|gif|webp|svg|bmp|avif)$/.test(t)?"image":"pdf"===t?"pdf":/^(mp4|mov|webm|avi|mkv)$/.test(t)?"video":/^(mp3|wav|ogg|m4a|aac)$/.test(t)?"audio":"file"}fileIcon(e){switch(e){case"pdf":return h.qy`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M5 4H15V8H19V20H5V4ZM3.9985 2C3.44749 2 3 2.44405 3 2.9918V21.0082C3 21.5447 3.44476 22 3.9934 22H20.0066C20.5551 22 21 21.5489 21 20.9925L20.9997 7L16 2H3.9985ZM10.4999 7.5C10.4999 9.07749 10.0442 10.9373 9.27493 12.6534C8.50287 14.3757 7.46143 15.8502 6.37524 16.7191L7.55464 18.3321C10.4821 16.3804 13.7233 15.0421 16.8585 15.49L17.3162 13.5513C14.6435 12.6604 12.4999 9.98994 12.4999 7.5H10.4999ZM11.0999 13.4716C11.3673 12.8752 11.6042 12.2563 11.8037 11.6285C12.2753 12.3531 12.8553 13.0182 13.5101 13.5953C12.5283 13.7711 11.5665 14.0596 10.6352 14.4276C10.7999 14.1143 10.9551 13.7948 11.0999 13.4716Z"></path></svg>`;case"video":return h.qy`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z"></path></svg>`;case"audio":return h.qy`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20 3V17C20 19.2091 18.2091 21 16 21C13.7909 21 12 19.2091 12 17C12 14.7909 13.7909 13 16 13C16.7286 13 17.4117 13.1948 18 13.5351V6H9V17C9 19.2091 7.20914 21 5 21C2.79086 21 1 19.2091 1 17C1 14.7909 2.79086 13 5 13C5.72857 13 6.41165 13.1948 7 13.5351V3H20ZM5 19C6.10457 19 7 18.1046 7 17C7 15.8954 6.10457 15 5 15C3.89543 15 3 15.8954 3 17C3 18.1046 3.89543 19 5 19ZM16 19C17.1046 19 18 18.1046 18 17C18 15.8954 17.1046 15 16 15C14.8954 15 14 15.8954 14 17C14 18.1046 14.8954 19 16 19Z"></path></svg>`;default:return h.qy`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M9 2.00318V2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8L9 2.00318ZM5.82918 8H9V4.83086L5.82918 8ZM11 4V9C11 9.55228 10.5523 10 10 10H5V20H19V4H11Z"></path></svg>`}}getFilePreview(e){const i=this.fileKind(e);return"image"===i&&e.url?h.qy`<img src=${e.url} alt=${this.displayName(e)} />`:this.fileIcon(i)}handleFileSelect(e){const i=e.target;if(i.files&&i.files.length>0){const e=this.maxFiles-this.files.length;if(e<=0)return this.error=this.maxFilesReachedText,void this.dispatchEvent(new CustomEvent("max-files-reached",{detail:{maxFiles:this.maxFiles},bubbles:!0,composed:!0}));const t=1024*this.maxFileSizeMB*1024,s=Array.from(i.files).filter(e=>e.size>t);if(s.length>0)return this.error=`${this.fileTooLargeText} (${this.maxFileSizeMB}MB)`,void this.dispatchEvent(new CustomEvent("file-too-large",{detail:{files:s,maxSize:this.maxFileSizeMB},bubbles:!0,composed:!0}));this.error="",this.isLoading=!0;const o=Array.from(i.files).slice(0,e);let r=0;o.forEach(e=>{const i=new FileReader;i.onload=i=>{const t={id:Math.random().toString(36).substr(2,9),name:e.name,type:e.type.split("/")[0],url:i.target?.result,size:e.size};this.files=[...this.files,t],this.dispatchEvent(new CustomEvent("file-added",{detail:t,bubbles:!0,composed:!0})),r++,r===o.length&&(this.isLoading=!1)},i.readAsDataURL(e)})}}handleRemoveFile(e){const i=this.files.find(i=>i.id===e);i&&(this.files=this.files.filter(i=>i.id!==e),this.dispatchEvent(new CustomEvent("file-removed",{detail:i,bubbles:!0,composed:!0})))}render(){return Array.isArray(this.files)||(this.files=[]),h.qy`
|
|
2
|
-
<div class="button-container">
|
|
3
|
-
<cdtr-popover
|
|
4
|
-
?opened=${this._isOpen}
|
|
5
|
-
@opened-changed=${e=>{this._isOpen=e.detail.value,this.requestUpdate(),this._isOpen||(this.error="")}}
|
|
6
|
-
>
|
|
7
|
-
<paper-button
|
|
8
|
-
slot="trigger"
|
|
9
|
-
dir="auto"
|
|
10
|
-
class=${this.isLoading?"loading-button":""}
|
|
11
|
-
>
|
|
12
|
-
${this.isLoading?h.qy`<div class="button-loading-spinner"></div>`:h.qy`<svg
|
|
13
|
-
style="color: ${this.iconColor};"
|
|
14
|
-
width="18"
|
|
15
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
-
viewBox="0 0 24 24"
|
|
17
|
-
fill="currentColor"
|
|
18
|
-
>
|
|
19
|
-
<path
|
|
20
|
-
d="M14.8287 7.75737L9.1718 13.4142C8.78127 13.8047 8.78127 14.4379 9.1718 14.8284C9.56232 15.219 10.1955 15.219 10.586 14.8284L16.2429 9.17158C17.4144 8.00001 17.4144 6.10052 16.2429 4.92894C15.0713 3.75737 13.1718 3.75737 12.0002 4.92894L6.34337 10.5858C4.39075 12.5384 4.39075 15.7042 6.34337 17.6569C8.29599 19.6095 11.4618 19.6095 13.4144 17.6569L19.0713 12L20.4855 13.4142L14.8287 19.0711C12.095 21.8047 7.66283 21.8047 4.92916 19.0711C2.19549 16.3374 2.19549 11.9053 4.92916 9.17158L10.586 3.51473C12.5386 1.56211 15.7045 1.56211 17.6571 3.51473C19.6097 5.46735 19.6097 8.63317 17.6571 10.5858L12.0002 16.2427C10.8287 17.4142 8.92916 17.4142 7.75759 16.2427C6.58601 15.0711 6.58601 13.1716 7.75759 12L13.4144 6.34316L14.8287 7.75737Z"
|
|
21
|
-
></path>
|
|
22
|
-
</svg>`}
|
|
23
|
-
</paper-button>
|
|
24
|
-
<div slot="content" class="popover-content" dir="auto">
|
|
25
|
-
${this.error?h.qy` <div class="error-message">${this.error}</div> `:""}
|
|
26
|
-
<div class="file-list">
|
|
27
|
-
${this.files.map(e=>{const i=this.displayName(e),t=[this.extension(e),e.size?this.formatFileSize(e.size):""].filter(Boolean).join(" · ");return h.qy`
|
|
28
|
-
<div class="file-row">
|
|
29
|
-
<div class="file-thumb">${this.getFilePreview(e)}</div>
|
|
30
|
-
<div class="file-info">
|
|
31
|
-
${e.url&&!e.url.startsWith("data:")?h.qy`<a
|
|
32
|
-
class="file-name"
|
|
33
|
-
href=${e.url}
|
|
34
|
-
target="_blank"
|
|
35
|
-
rel="noopener"
|
|
36
|
-
title=${i}
|
|
37
|
-
>${i}</a
|
|
38
|
-
>`:h.qy`<div class="file-name" title=${i}>
|
|
39
|
-
${i}
|
|
40
|
-
</div>`}
|
|
41
|
-
${t?h.qy`<div class="file-meta">${t}</div>`:""}
|
|
42
|
-
</div>
|
|
43
|
-
<button
|
|
44
|
-
class="remove-btn"
|
|
45
|
-
title="Remove"
|
|
46
|
-
@click=${()=>this.handleRemoveFile(e.id)}
|
|
47
|
-
>
|
|
48
|
-
<svg
|
|
49
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
50
|
-
viewBox="0 0 24 24"
|
|
51
|
-
fill="currentColor"
|
|
52
|
-
width="16"
|
|
53
|
-
height="16"
|
|
54
|
-
>
|
|
55
|
-
<path
|
|
56
|
-
d="M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"
|
|
57
|
-
></path>
|
|
58
|
-
</svg>
|
|
59
|
-
</button>
|
|
60
|
-
</div>
|
|
61
|
-
`})}
|
|
62
|
-
${this.files.length<this.maxFiles?h.qy`
|
|
63
|
-
<div class="add-row">
|
|
64
|
-
<label class="add-files-btn">
|
|
65
|
-
<svg viewBox="0 0 24 24" fill="currentColor">
|
|
66
|
-
<path d="M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z"></path>
|
|
67
|
-
</svg>
|
|
68
|
-
<span>${this.addFilesText}</span>
|
|
69
|
-
<input
|
|
70
|
-
type="file"
|
|
71
|
-
multiple
|
|
72
|
-
hidden
|
|
73
|
-
@change=${this.handleFileSelect}
|
|
74
|
-
/>
|
|
75
|
-
</label>
|
|
76
|
-
${this.isLoading?h.qy`<div class="loading-overlay">
|
|
77
|
-
<div class="loading-spinner"></div>
|
|
78
|
-
<div class="loading-text">${this.loadingText}</div>
|
|
79
|
-
</div>`:""}
|
|
80
|
-
</div>
|
|
81
|
-
`:h.qy`
|
|
82
|
-
<div class="error-message">
|
|
83
|
-
${this.maxFilesReachedText} (${this.maxFiles})
|
|
84
|
-
</div>
|
|
85
|
-
`}
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
</cdtr-popover>
|
|
89
|
-
${this.files.length>0?h.qy`
|
|
90
|
-
<span class="count-badge">${this.files.length}</span>
|
|
91
|
-
`:""}
|
|
92
|
-
</div>
|
|
93
|
-
`}}).styles=h.AH`
|
|
94
|
-
.popover-content {
|
|
95
|
-
width: 280px;
|
|
96
|
-
max-width: calc(100vw - 32px);
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
font-family: inherit;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.file-list {
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
gap: 6px;
|
|
105
|
-
padding: 12px;
|
|
106
|
-
max-height: calc(100vh - 200px);
|
|
107
|
-
overflow-y: auto;
|
|
108
|
-
box-sizing: border-box;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.file-row {
|
|
112
|
-
position: relative;
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
gap: 10px;
|
|
116
|
-
padding: 8px 10px;
|
|
117
|
-
border-radius: 8px;
|
|
118
|
-
background: #f5f5f5;
|
|
119
|
-
min-width: 0;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.file-thumb {
|
|
123
|
-
flex: none;
|
|
124
|
-
width: 36px;
|
|
125
|
-
height: 36px;
|
|
126
|
-
border-radius: 6px;
|
|
127
|
-
background: #fff;
|
|
128
|
-
display: flex;
|
|
129
|
-
align-items: center;
|
|
130
|
-
justify-content: center;
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
color: #555;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.file-thumb img {
|
|
136
|
-
width: 100%;
|
|
137
|
-
height: 100%;
|
|
138
|
-
object-fit: cover;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.file-thumb svg {
|
|
142
|
-
width: 20px;
|
|
143
|
-
height: 20px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.file-info {
|
|
147
|
-
flex: 1;
|
|
148
|
-
min-width: 0;
|
|
149
|
-
display: flex;
|
|
150
|
-
flex-direction: column;
|
|
151
|
-
gap: 2px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.file-name {
|
|
155
|
-
font-size: 13px;
|
|
156
|
-
color: #222;
|
|
157
|
-
white-space: nowrap;
|
|
158
|
-
overflow: hidden;
|
|
159
|
-
text-overflow: ellipsis;
|
|
160
|
-
text-decoration: none;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
a.file-name:hover {
|
|
164
|
-
text-decoration: underline;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.file-meta {
|
|
168
|
-
font-size: 11px;
|
|
169
|
-
color: #777;
|
|
170
|
-
text-transform: uppercase;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.remove-btn {
|
|
174
|
-
flex: none;
|
|
175
|
-
width: 28px;
|
|
176
|
-
height: 28px;
|
|
177
|
-
border-radius: 6px;
|
|
178
|
-
background: transparent;
|
|
179
|
-
color: #888;
|
|
180
|
-
display: flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
justify-content: center;
|
|
183
|
-
cursor: pointer;
|
|
184
|
-
border: none;
|
|
185
|
-
padding: 0;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.remove-btn:hover {
|
|
189
|
-
background: #fde8e8;
|
|
190
|
-
color: #d32f2f;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.add-row {
|
|
194
|
-
position: relative;
|
|
195
|
-
margin-top: 2px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.add-files-btn {
|
|
199
|
-
width: 100%;
|
|
200
|
-
box-sizing: border-box;
|
|
201
|
-
min-height: 44px;
|
|
202
|
-
display: flex;
|
|
203
|
-
align-items: center;
|
|
204
|
-
justify-content: center;
|
|
205
|
-
gap: 8px;
|
|
206
|
-
cursor: pointer;
|
|
207
|
-
border: 2px dashed #ccc;
|
|
208
|
-
border-radius: 8px;
|
|
209
|
-
background: transparent;
|
|
210
|
-
font-size: 13px;
|
|
211
|
-
color: #444;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.add-files-btn svg {
|
|
215
|
-
width: 18px;
|
|
216
|
-
height: 18px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.add-files-btn:hover {
|
|
220
|
-
border-color: #666;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.error-message {
|
|
224
|
-
color: red;
|
|
225
|
-
font-size: 12px;
|
|
226
|
-
text-align: center;
|
|
227
|
-
padding: 8px;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.loading-overlay {
|
|
231
|
-
position: absolute;
|
|
232
|
-
top: 0;
|
|
233
|
-
left: 0;
|
|
234
|
-
right: 0;
|
|
235
|
-
bottom: 0;
|
|
236
|
-
background: rgba(255, 255, 255, 0.9);
|
|
237
|
-
display: flex;
|
|
238
|
-
flex-direction: column;
|
|
239
|
-
align-items: center;
|
|
240
|
-
justify-content: center;
|
|
241
|
-
z-index: 10;
|
|
242
|
-
border-radius: 8px;
|
|
243
|
-
backdrop-filter: blur(2px);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.loading-spinner {
|
|
247
|
-
width: 32px;
|
|
248
|
-
height: 32px;
|
|
249
|
-
border: 3px solid #f3f3f3;
|
|
250
|
-
border-top: 3px solid #3498db;
|
|
251
|
-
border-radius: 50%;
|
|
252
|
-
animation: spin 1s linear infinite;
|
|
253
|
-
margin-bottom: 8px;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.loading-text {
|
|
257
|
-
font-size: 12px;
|
|
258
|
-
color: #666;
|
|
259
|
-
text-align: center;
|
|
260
|
-
margin-top: 4px;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
@keyframes spin {
|
|
264
|
-
0% {
|
|
265
|
-
transform: rotate(0deg);
|
|
266
|
-
}
|
|
267
|
-
100% {
|
|
268
|
-
transform: rotate(360deg);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.loading-button {
|
|
273
|
-
opacity: 0.7;
|
|
274
|
-
pointer-events: none;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.button-loading-spinner {
|
|
278
|
-
width: 18px;
|
|
279
|
-
height: 18px;
|
|
280
|
-
border: 2px solid #f3f3f3;
|
|
281
|
-
border-top: 2px solid #3498db;
|
|
282
|
-
border-radius: 50%;
|
|
283
|
-
animation: spin 1s linear infinite;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.preview-section {
|
|
287
|
-
margin-top: 8px;
|
|
288
|
-
display: flex;
|
|
289
|
-
gap: 8px;
|
|
290
|
-
flex-wrap: wrap;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.preview-item {
|
|
294
|
-
display: flex;
|
|
295
|
-
align-items: center;
|
|
296
|
-
gap: 4px;
|
|
297
|
-
padding: 4px 8px;
|
|
298
|
-
background: #f5f5f5;
|
|
299
|
-
border-radius: 4px;
|
|
300
|
-
font-size: 12px;
|
|
301
|
-
}
|
|
302
|
-
paper-button {
|
|
303
|
-
min-width: 10px;
|
|
304
|
-
}
|
|
305
|
-
.preview-item cdtr-icon {
|
|
306
|
-
width: 16px;
|
|
307
|
-
height: 16px;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.button-container {
|
|
311
|
-
position: relative;
|
|
312
|
-
display: inline-block;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.count-badge {
|
|
316
|
-
position: absolute;
|
|
317
|
-
top: 2px;
|
|
318
|
-
right: 2px;
|
|
319
|
-
min-width: 16px;
|
|
320
|
-
height: 16px;
|
|
321
|
-
padding: 0 4px;
|
|
322
|
-
box-sizing: border-box;
|
|
323
|
-
border-radius: 8px;
|
|
324
|
-
background: #e53935;
|
|
325
|
-
color: #fff;
|
|
326
|
-
font-size: 10px;
|
|
327
|
-
font-weight: 600;
|
|
328
|
-
line-height: 16px;
|
|
329
|
-
text-align: center;
|
|
330
|
-
pointer-events: none;
|
|
331
|
-
z-index: 2;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
`,n.properties={files:{type:Array},maxFiles:{type:Number},maxFileSizeMB:{type:Number},isLoading:{type:Boolean},buttonText:{type:String},addFilesText:{type:String},maxFilesReachedText:{type:String},iconColor:{type:String},fileTooLargeText:{type:String},error:{type:String},customColor:{type:String},customTextColor:{type:String},loadingText:{type:String}},a=n,l=(0,p.A)(a.prototype,"lazyLoad",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),r=a))||r)}}]);
|
|
Binary file
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5119],{15119(e,t,n){n.d(t,{default:()=>S});var o=n(96374),r=n(86319),l=n(59929);const a=e=>{{const{component:t,commands:n,helpers:a}=e;return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"style",selected:!0},{text:"interactions"},..."web"===r.M.get("config","channel")?[{text:"animations"}]:[],{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:a,changeTab:i,tabs:s}=e;const c=(r.M.get("components")||[]).filter(e=>e&&"block"===e.type&&e.props?.modalable),d=[{value:"",label:"modal_none"},...c.map((e,t)=>({value:e.id,label:e.props?.modalName||`modal ${t+1}`}))],p=t.props.modalBlockId||"",u=d.find(e=>e.value===p)?.label||"modal_none",g=[{type:"heading",level:6,text:"presets",active:()=>"style"===a.text&&"web"===r.M.get("config","channel")},{type:"custom",active:()=>"style"===a.text&&"web"===r.M.get("config","channel"),node:()=>{const e="web"===r.M.get("config","channel"),o={cart:"http://app.creaditor.com/assets/bullets/images/cart-icon.png",arrowRight:"http://app.creaditor.com/assets/bullets/images/1469020585_ic_keyboard_arrow_right_48px.png"},a="var(--cdtr-primary, #2563eb)",i="var(--cdtr-primary-contrast, #ffffff)",s=e=>`color-mix(in srgb, ${a}, #000 ${e})`,c=[{category:"Basic",presets:[{name:"Solid",style:{background:a,color:i,borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Pill",style:{background:a,color:i,borderRadius:"999px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Outline",style:{background:"transparent",color:a,borderRadius:"8px",border:`1px solid ${a}`,borderWidth:"1px",borderColor:a,boxShadow:null}},{name:"Soft",webOnly:!0,style:{background:`color-mix(in srgb, ${a} 12%, #ffffff)`,color:a,borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]},{category:"Effects",presets:[{name:"Gradient",webOnly:!0,style:{background:`linear-gradient(135deg, ${a}, ${s("35%")})`,color:i,borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"3D",webOnly:!0,style:{background:a,color:i,borderRadius:"10px",padding:"14px 22px",fontWeight:700,border:"none",borderWidth:null,borderColor:null,boxShadow:`0px 5px 0px 0px ${s("30%")}`}},{name:"Glow",webOnly:!0,style:{background:a,color:i,borderRadius:"10px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 8px 24px "+(d="55%",`color-mix(in srgb, ${a}, transparent ${d})`)}},{name:"Glass",webOnly:!0,style:{background:"rgba(255,255,255,0.18)",color:"#111111",borderRadius:"12px",border:"1px solid rgba(255,255,255,0.6)",borderWidth:"1px",borderColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(8px)",boxShadow:"0 4px 30px rgba(0,0,0,0.1)"}},{name:"Shadow",webOnly:!0,style:{background:"#ffffff",color:"#111111",borderRadius:"12px",border:"none",borderWidth:null,borderColor:null,boxShadow:"0 10px 24px rgba(0,0,0,0.18)"}}]},{category:"With icon",presets:[{name:"Buy now",icon:{src:o.cart,direction:"left",size:18},style:{background:a,color:i,borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}},{name:"Continue",webOnly:!0,icon:{src:o.arrowRight,direction:"right",size:18},style:{background:`linear-gradient(135deg, ${a}, ${s("35%")})`,color:i,borderRadius:"8px",border:"none",borderWidth:null,borderColor:null,boxShadow:null}}]}].map(t=>({...t,presets:t.presets.filter(t=>e||!t.webOnly)})).filter(e=>e.presets.length>0);var d;const p=t.props.text||"Button",u=e=>e.icon?l.qy`<img
|
|
2
|
-
src="${e.icon.src}"
|
|
3
|
-
style="width:16px;height:16px;object-fit:contain;vertical-align:middle;${"right"===e.icon.direction?"margin-left:6px;order:2;":"margin-right:6px;"}"
|
|
4
|
-
/>`:"",g=e=>l.qy`
|
|
5
|
-
<button
|
|
6
|
-
type="button"
|
|
7
|
-
title="${e.name}"
|
|
8
|
-
@click=${()=>(e=>{n.execCommand("style",{...e.style}),e.icon&&(n.execCommand("hasIcon",!0),n.execCommand("iconUrl",e.icon.src),n.execCommand("iconDirection",e.icon.direction||"left"),n.execCommand("iconSize",e.icon.size||18))})(e)}
|
|
9
|
-
style="display:flex;align-items:center;justify-content:center;width:100%;cursor:pointer;padding:12px 14px;font-size:13px;overflow:hidden;white-space:nowrap;
|
|
10
|
-
background:${e.style.background};
|
|
11
|
-
color:${e.style.color};
|
|
12
|
-
border-radius:${e.style.borderRadius};
|
|
13
|
-
border:${e.style.border};
|
|
14
|
-
font-weight:${e.style.fontWeight||400};
|
|
15
|
-
box-shadow:${e.style.boxShadow||"none"};"
|
|
16
|
-
>
|
|
17
|
-
${e.icon&&"right"!==e.icon.direction?u(e):""}
|
|
18
|
-
<span style="overflow:hidden;text-overflow:ellipsis;">${p}</span>
|
|
19
|
-
${e.icon&&"right"===e.icon.direction?u(e):""}
|
|
20
|
-
</button>
|
|
21
|
-
`;return l.qy`
|
|
22
|
-
<cdtr-editor-container pt="0">
|
|
23
|
-
<div style="display:flex;flex-direction:column;gap:10px;padding:8px 16px;">
|
|
24
|
-
${c.map(e=>l.qy`
|
|
25
|
-
<div
|
|
26
|
-
style="margin-top:6px;font-size:11px;font-weight:600;letter-spacing:0.04em;text-transform:uppercase;color:#888;"
|
|
27
|
-
>
|
|
28
|
-
${e.category}
|
|
29
|
-
</div>
|
|
30
|
-
${e.presets.map(e=>g(e))}
|
|
31
|
-
`)}
|
|
32
|
-
</div>
|
|
33
|
-
</cdtr-editor-container>
|
|
34
|
-
`}}];return[{type:"heading",level:6,text:"text",active:()=>"style"===a.text},{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"style"===a.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"custom",active:()=>"style"===a.text,node:()=>l.qy`
|
|
35
|
-
<cdtr-editor-container pt="0">
|
|
36
|
-
<div style="padding:0 16px;">
|
|
37
|
-
<button
|
|
38
|
-
type="button"
|
|
39
|
-
@click=${()=>i("interactions")}
|
|
40
|
-
style="background:none;border:none;padding:0;cursor:pointer;font-size:11px;line-height:1.4;text-decoration:underline;color:var(--color-primary, #6366f1);"
|
|
41
|
-
>
|
|
42
|
-
<lang-text
|
|
43
|
-
text="${t.props.onClick?.link?"edit_link":"add_link"}"
|
|
44
|
-
></lang-text>
|
|
45
|
-
</button>
|
|
46
|
-
</div>
|
|
47
|
-
</cdtr-editor-container>
|
|
48
|
-
`},{type:"heading",level:6,text:"colors",active:()=>"style"===a.text},{type:"colorSwatchGroup",active:()=>"style"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,o.w)(t.props.style.color,r);n.execCommand("style",{color:e})}n.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"typography",active:()=>"style"===a.text},{type:"typography",active:()=>"style"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const o="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:o});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"style"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"style"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px"})}},{type:"heading",level:6,text:"dimensions",active:()=>"style"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"style"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"slider",title:"height",min:20,max:300,active:()=>"style"===a.text,value:parseInt(t.props.style.height)||(()=>{const e=document.querySelector(`[data-id="${t.id}"]`);return e&&Math.round(e.getBoundingClientRect().height)||40})(),sizes:[{name:r.M.get("lang","auto")||"auto",value:"auto"}],onInput:e=>{const t=e.target.value;n.execCommand("style",{height:"auto"===t?"auto":parseInt(t)+"px"})}},{type:"heading",level:6,text:"border_design",active:()=>"style"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"style"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"style"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"style"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"style"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"style"===a.text},{type:"boxShadow",active:()=>"style"===a.text,value:t.props.style.boxShadow,onChange:e=>{n.execCommand("style",{boxShadow:e})}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:6,text:"open_modal",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"info",text:c.length?"modal_pick_hint":"modal_none_hint",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"dropdown",title:"modal_block",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel"),value:u,selected:p,items:d,onChange:e=>{n.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"icons",active:()=>"style"===a.text},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"style"===a.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"style"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;n.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"style"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"style"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===a.text},{type:"spacingPicker",active:()=>"style"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,o=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}},...g]}}}},i=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,o()||n.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var s=n(72591),c=n.n(s),d=n(88639),p=n.n(d),u=n(88128),g=n.n(u),m=n(30855),y=n.n(m),h=n(93051),x=n.n(h),b=n(49536),A={};A.setAttributes=y(),A.insert=g().bind(null,"head"),A.domAPI=p(),A.insertStyleElement=x();c()(b.A,A);const f=b.A&&b.A.locals?b.A.locals:void 0;var C=n(81318),v=n(1366),w=n(67291),k=n(85194),E=n(28396);const B=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const S=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:r}=t,{arrayToString:l,mergeDiff:s}=r;let c=!1;const d=document.createElement("div"),p=document.createElement("div"),{editor:u}=function(e){let{content:t,element:n}=e;return{element:n,editor:new C.KE({element:n,extensions:[v.A,w.A,E.A,k.Ay,B],content:t})}}({content:o.props.text,element:p});d.appendChild(p);u.view.dom.setAttribute("dir","auto");const g=()=>{let e="";try{e=u.getText()||""}catch(t){e=""}d.setAttribute("dir",function(e){if(!e)return null;for(const t of String(e)){if(/[\u0590-\u05FF\u0600-\u07BF\u0860-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/.test(t))return"rtl";if(/\p{L}/u.test(t))return"ltr"}return null}(e)||"ltr")};return g(),u.on("update",e=>{let{editor:t}=e;const n=t.getText();g(),o.editor.store().updateComponent(o,"text",n)}),u.on("focus",e=>{let{event:t,editor:n}=e;c=!0}),u.on("blur",e=>{let{event:t,editor:n}=e;c=!1}),d.className=f.button,n({name:e,id:o.id,template:d,commands:{insertContent:e=>{u.commands.insertContent(e),u.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{o.props.style.display="",o.props.style.direction=""}catch(e){console.error(e)}s(d,{style:o.props.style});const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,r=o.props.iconSize,l="icon_in_button";g();let a=d.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","right"===n?d.appendChild(a):d.insertBefore(a,d.firstChild)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,resizeAxis:"xy",handleBar:!0,validator:i({template:d,helpers:r,editor:u,getFocused:function(){return c}}),schema:o.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:o,destroy:()=>{u.destroy()},remove:()=>{d.remove()},createEditor:a})}}}},49536(e,t,n){n.d(t,{A:()=>i});var o=n(82001),r=n.n(o),l=n(40935),a=n.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const i=a},67291(e,t,n){n.d(t,{A:()=>r});var o=n(81318);const r=o.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,o.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);
|
|
Binary file
|
|
Binary file
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7937],{67937(e,t,o){o.r(t),o.d(t,{EditorTabItem:()=>a});var n=o(59929);class a extends n.WF{focus(){const e=this.shadowRoot.querySelector(".tab-btn");e?e.focus():super.focus()}onClickItem(e){this.value=e,this.dispatchEvent(new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}))}handleKeyDown(e){if("Enter"===e.key||" "===e.key)return e.preventDefault(),e.stopPropagation(),void this.onClickItem(this.icon);["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new CustomEvent("arrow-navigation",{detail:{key:e.key,currentIcon:this.icon},bubbles:!0,cancelable:!0})))}render(){return n.qy`
|
|
2
|
-
<button
|
|
3
|
-
class="tab-btn ${this.selected?"selected":""}"
|
|
4
|
-
data-icon="${this.icon}"
|
|
5
|
-
tabindex="0"
|
|
6
|
-
@keydown=${e=>this.handleKeyDown(e)}
|
|
7
|
-
@click=${()=>this.onClickItem(this.icon)}
|
|
8
|
-
>
|
|
9
|
-
<span class="label"><lang-text text="${this.icon}"></lang-text></span>
|
|
10
|
-
</button>
|
|
11
|
-
`}}a.styles=n.AH`
|
|
12
|
-
:host {
|
|
13
|
-
display: block;
|
|
14
|
-
}
|
|
15
|
-
.tab-btn {
|
|
16
|
-
width: 100%;
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
padding: var(--space-2, 9px) var(--space-3, 12px);
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
border: none;
|
|
23
|
-
border-bottom: 2px solid transparent;
|
|
24
|
-
background: transparent;
|
|
25
|
-
outline: none;
|
|
26
|
-
font-family: inherit;
|
|
27
|
-
transition: color var(--duration-fast, 120ms) var(--ease-default, ease),
|
|
28
|
-
border-color var(--duration-fast, 120ms) var(--ease-default, ease);
|
|
29
|
-
}
|
|
30
|
-
.tab-btn:focus-visible {
|
|
31
|
-
box-shadow: var(--focus-ring-inset, inset 0 0 0 2px #6366f1);
|
|
32
|
-
border-radius: 4px;
|
|
33
|
-
}
|
|
34
|
-
.label {
|
|
35
|
-
font-size: 13px;
|
|
36
|
-
font-weight: 500;
|
|
37
|
-
color: var(--color-text-muted, #888);
|
|
38
|
-
white-space: nowrap;
|
|
39
|
-
transition: color var(--duration-fast, 120ms) var(--ease-default, ease);
|
|
40
|
-
}
|
|
41
|
-
.tab-btn:hover:not(.selected) .label {
|
|
42
|
-
color: var(--color-text-secondary, #444);
|
|
43
|
-
}
|
|
44
|
-
.tab-btn.selected {
|
|
45
|
-
border-bottom-color: var(--color-primary, #6366f1);
|
|
46
|
-
}
|
|
47
|
-
.tab-btn.selected .label {
|
|
48
|
-
color: var(--color-primary, #6366f1);
|
|
49
|
-
font-weight: 600;
|
|
50
|
-
}
|
|
51
|
-
`,a.properties={icon:{},selected:{}},customElements.define("cdtr-editor-tab-item",a)}}]);
|
|
Binary file
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8088],{88088(t,r,e){e.r(r),e.d(r,{UserMenu:()=>w});var o,a,i,n,s,l,d,c,u,p,h,g,v=e(59088),b=e(36936),f=e(59929),m=e(49410);customElements.get("cdtr-dropdown")||Promise.resolve().then(e.bind(e,73095));let w=(o=(0,m.EM)("cdtr-user-menu"),a=(0,m.MZ)({type:String}),i=(0,m.MZ)({type:String}),n=(0,m.MZ)({attribute:!1}),s=(0,m.MZ)({type:String}),o(((g=class extends f.WF{constructor(){super(),(0,v.A)(this,"username",c,this),(0,v.A)(this,"avatarUrl",u,this),(0,v.A)(this,"onLogout",p,this),(0,v.A)(this,"logoutText",h,this)}handleLogout(){console.log("Logout clicked"),this.onLogout()}getInitials(){return this.username?this.username.split(" ").map(t=>t.charAt(0)).join("").toUpperCase().slice(0,2):"?"}renderAvatar(){return this.avatarUrl?f.qy`<img src="${this.avatarUrl}" alt="${this.username}" />`:this.username?f.qy`<span class="initials">${this.getInitials()}</span>`:f.qy`
|
|
2
|
-
<svg class="default" viewBox="0 0 24 24" fill="currentColor">
|
|
3
|
-
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
|
|
4
|
-
</svg>
|
|
5
|
-
`}render(){return f.qy`
|
|
6
|
-
<cdtr-dropdown>
|
|
7
|
-
<button
|
|
8
|
-
class="avatar ${!this.avatarUrl&&this.username?"initials":this.avatarUrl||this.username?"":"default"}"
|
|
9
|
-
slot="trigger"
|
|
10
|
-
type="button"
|
|
11
|
-
aria-label="User menu"
|
|
12
|
-
aria-haspopup="true"
|
|
13
|
-
aria-expanded="false"
|
|
14
|
-
tabindex="0"
|
|
15
|
-
>
|
|
16
|
-
${this.renderAvatar()}
|
|
17
|
-
</button>
|
|
18
|
-
|
|
19
|
-
<div slot="content">
|
|
20
|
-
<cdtr-dropdown-item
|
|
21
|
-
class="logout"
|
|
22
|
-
@click=${this.handleLogout}
|
|
23
|
-
>
|
|
24
|
-
<svg class="logout-icon" viewBox="0 0 24 24" fill="currentColor">
|
|
25
|
-
<path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"/>
|
|
26
|
-
</svg>
|
|
27
|
-
${this.logoutText}
|
|
28
|
-
</cdtr-dropdown-item>
|
|
29
|
-
</div>
|
|
30
|
-
</cdtr-dropdown>
|
|
31
|
-
`}}).styles=f.AH`
|
|
32
|
-
:host {
|
|
33
|
-
display: inline-block;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.avatar-container {
|
|
37
|
-
position: relative;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.avatar {
|
|
41
|
-
width: 40px;
|
|
42
|
-
height: 40px;
|
|
43
|
-
border-radius: 50%;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
background: var(--primary, #6366f1);
|
|
48
|
-
color: white;
|
|
49
|
-
font-weight: 600;
|
|
50
|
-
font-size: 16px;
|
|
51
|
-
border: 2px solid transparent;
|
|
52
|
-
transition: all 0.2s ease;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
user-select: none;
|
|
55
|
-
outline: none;
|
|
56
|
-
-webkit-tap-highlight-color: transparent;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
margin: 0;
|
|
59
|
-
padding: 0;
|
|
60
|
-
line-height: 1;
|
|
61
|
-
text-decoration: none;
|
|
62
|
-
vertical-align: middle;
|
|
63
|
-
white-space: nowrap;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.avatar:hover {
|
|
67
|
-
border-color: var(--primary, #6366f1);
|
|
68
|
-
transform: scale(1.05);
|
|
69
|
-
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.avatar:active {
|
|
73
|
-
transform: scale(0.98);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.avatar:focus {
|
|
77
|
-
border-color: var(--primary, #6366f1);
|
|
78
|
-
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.avatar img {
|
|
82
|
-
width: 100%;
|
|
83
|
-
height: 100%;
|
|
84
|
-
object-fit: cover;
|
|
85
|
-
border-radius: 50%;
|
|
86
|
-
pointer-events: none;
|
|
87
|
-
display: block;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.avatar.initials {
|
|
91
|
-
background: linear-gradient(135deg, var(--primary, #6366f1), var(--primary-dark, #4f46e5));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.avatar.default {
|
|
95
|
-
background: linear-gradient(135deg, #6b7280, #4b5563);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.avatar svg {
|
|
99
|
-
width: 20px;
|
|
100
|
-
height: 20px;
|
|
101
|
-
pointer-events: none;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* Custom dropdown styling for user menu */
|
|
105
|
-
:host cdtr-dropdown {
|
|
106
|
-
--dropdown-content-min-width: 160px;
|
|
107
|
-
overflow: visible;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
:host cdtr-dropdown-item {
|
|
111
|
-
padding: 12px 16px;
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
transition: background-color 0.2s ease;
|
|
114
|
-
border-bottom: 1px solid #f3f4f6;
|
|
115
|
-
display: flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
gap: 8px;
|
|
118
|
-
color: #374151;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
:host cdtr-dropdown-item:last-child {
|
|
122
|
-
border-bottom: none;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:host cdtr-dropdown-item:hover {
|
|
126
|
-
background-color: #f9fafb;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host cdtr-dropdown-item.logout {
|
|
130
|
-
color: #dc2626;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
:host cdtr-dropdown-item.logout:hover {
|
|
134
|
-
background-color: #fef2f2;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.logout-icon {
|
|
138
|
-
width: 16px;
|
|
139
|
-
height: 16px;
|
|
140
|
-
}
|
|
141
|
-
`,d=g,c=(0,b.A)(d.prototype,"username",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),u=(0,b.A)(d.prototype,"avatarUrl",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),p=(0,b.A)(d.prototype,"onLogout",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>{const t=new CustomEvent("logout");this.dispatchEvent(t)}}}),h=(0,b.A)(d.prototype,"logoutText",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Logout"}}),l=d))||l)}}]);
|
|
Binary file
|
|
Binary file
|