@creaditor/web-starterkit 1.0.64 → 1.0.66
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/100.creaditor.bundle.js +348 -0
- package/dist/100.creaditor.bundle.js.gz +0 -0
- 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 +4 -4
- package/dist/380.creaditor.bundle.js.gz +0 -0
- package/dist/3827.creaditor.bundle.js.gz +0 -0
- package/dist/3847.creaditor.bundle.js +6 -2
- 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/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 +147 -147
- 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/5884.creaditor.bundle.js +0 -91
- package/dist/5884.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
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[100],{20100(e,t,i){i.d(t,{default:()=>V});var o=i(59929);let n={};const s=new Set;function r(e){n.selected=e}function a(e){return n.selected}var d=i(23571),l=i(12106),c=i(86319),p=i(83423),h=i(81444);const u="https://img.creaditor.ai";function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t.width??24,o=t.height??24;let n=t.color??"000000";n.startsWith("#")&&(n=n.slice(1));const s=`${u}/icons/serve/${encodeURIComponent(e.category)}/${encodeURIComponent(e.name)}.png?width=${i}&height=${o}`;return(0,h.tG)(s,n)}class m extends o.WF{constructor(){super(),this.searchQuery="",this.iconColor="000000",this.iconSize=34,this.selectedSrc="",this._icons=[],this._loading=!1,this._error=""}willUpdate(e){e.has("searchQuery")&&this.searchQuery?this._fetchIcons():e.has("searchQuery")&&!this.searchQuery&&(this._icons=[],this._error="")}async _fetchIcons(){const e=(this.searchQuery||"").trim();if(e){this._loading=!0,this._error="";try{const t=new URLSearchParams({q:e,limit:"20"}),i=await fetch(`${u}/icons/search?${t.toString()}`);if(!i.ok)throw new Error(i.statusText);const o=await i.json();this._icons=o.icons||[]}catch(e){this._icons=[],this._error=e.message||"Failed to load icons"}finally{this._loading=!1}}else this._icons=[]}_onSelect(e){const t=(this.iconColor||"000000").replace(/^#/,""),i=Number(this.iconSize)||34,o=f(e,{width:i,height:i,color:t});this.dispatchEvent(new CustomEvent("icon-selected",{detail:{src:o,icon:e},bubbles:!0,composed:!0}))}render(){const e=(this.iconColor||"000000").replace(/^#/,""),t=this.searchQuery?.trim()&&!this._loading?this._icons:[];return o.qy`
|
|
2
|
+
${this._loading?o.qy`<div class="loading"><span class="spinner"></span>Loading icons…</div>`:null}
|
|
3
|
+
${this._error?o.qy`<div class="error">${this._error}</div>`:null}
|
|
4
|
+
<div class="grid">
|
|
5
|
+
${t.map(t=>{const i=f(t,{width:24,height:24,color:e}),n=this.selectedSrc&&(this.selectedSrc.includes(t.name)||this.selectedSrc===i);return o.qy`
|
|
6
|
+
<button
|
|
7
|
+
type="button"
|
|
8
|
+
class="icon-wrap ${n?"selected":""}"
|
|
9
|
+
title="${t.name}"
|
|
10
|
+
@click=${()=>this._onSelect(t)}
|
|
11
|
+
>
|
|
12
|
+
<img src="${i}" alt="${t.name}" loading="lazy" />
|
|
13
|
+
</button>
|
|
14
|
+
`})}
|
|
15
|
+
<slot></slot>
|
|
16
|
+
</div>
|
|
17
|
+
`}}m.properties={searchQuery:{type:String},iconColor:{type:String},iconSize:{type:Number},selectedSrc:{type:String},_icons:{type:Array,state:!0},_loading:{type:Boolean,state:!0},_error:{type:String,state:!0}},m.styles=o.AH`
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
}
|
|
22
|
+
.label {
|
|
23
|
+
margin-bottom: 6px;
|
|
24
|
+
color: var(--secondary-text, #666);
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
}
|
|
27
|
+
.grid {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
gap: 6px;
|
|
31
|
+
}
|
|
32
|
+
.icon-wrap {
|
|
33
|
+
width: 36px;
|
|
34
|
+
height: 36px;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
padding: 0;
|
|
39
|
+
border: 1px solid transparent;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
background: #f4f4f6;
|
|
43
|
+
transition: border-color 0.15s, box-shadow 0.15s;
|
|
44
|
+
}
|
|
45
|
+
.icon-wrap:hover {
|
|
46
|
+
border-color: #c9c5d6;
|
|
47
|
+
}
|
|
48
|
+
.icon-wrap.selected {
|
|
49
|
+
border-color: #4f46e5;
|
|
50
|
+
box-shadow: 0 0 0 1px #4f46e5;
|
|
51
|
+
background: #fff;
|
|
52
|
+
}
|
|
53
|
+
.icon-wrap img {
|
|
54
|
+
width: 24px;
|
|
55
|
+
height: 24px;
|
|
56
|
+
object-fit: contain;
|
|
57
|
+
}
|
|
58
|
+
.loading,
|
|
59
|
+
.error {
|
|
60
|
+
padding: 8px 0;
|
|
61
|
+
color: var(--secondary-text, #666);
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
}
|
|
66
|
+
.spinner {
|
|
67
|
+
width: 16px;
|
|
68
|
+
height: 16px;
|
|
69
|
+
border: 2px solid var(--input-bg, #e0e0e0);
|
|
70
|
+
border-top-color: var(--primary, #007bff);
|
|
71
|
+
border-radius: 50%;
|
|
72
|
+
animation: spin 0.7s linear infinite;
|
|
73
|
+
flex: 0 0 auto;
|
|
74
|
+
}
|
|
75
|
+
@keyframes spin {
|
|
76
|
+
to {
|
|
77
|
+
transform: rotate(360deg);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.error {
|
|
81
|
+
color: var(--error-color, #c00);
|
|
82
|
+
}
|
|
83
|
+
`,customElements.define("social-icon-suggestions",m);const g=o.AH`
|
|
84
|
+
:host {
|
|
85
|
+
display: grid;
|
|
86
|
+
grid-template-columns: minmax(0, 1fr);
|
|
87
|
+
gap: 8px;
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
color: #1f1d2b;
|
|
90
|
+
}
|
|
91
|
+
.list {
|
|
92
|
+
display: grid;
|
|
93
|
+
/* never wider than the panel, whatever the link fields inside want */
|
|
94
|
+
grid-template-columns: minmax(0, 1fr);
|
|
95
|
+
gap: 8px;
|
|
96
|
+
}
|
|
97
|
+
.card {
|
|
98
|
+
border: 1px solid #e6e4ee;
|
|
99
|
+
border-radius: 10px;
|
|
100
|
+
background: #fff;
|
|
101
|
+
}
|
|
102
|
+
.card.open {
|
|
103
|
+
border-color: #c9c5d6;
|
|
104
|
+
box-shadow: 0 2px 8px rgba(20, 16, 40, 0.06);
|
|
105
|
+
}
|
|
106
|
+
.row {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 4px;
|
|
110
|
+
height: 42px;
|
|
111
|
+
padding-inline: 4px 10px;
|
|
112
|
+
}
|
|
113
|
+
.handle {
|
|
114
|
+
flex: none;
|
|
115
|
+
width: 24px;
|
|
116
|
+
height: 32px;
|
|
117
|
+
display: grid;
|
|
118
|
+
place-items: center;
|
|
119
|
+
color: #9a97a8;
|
|
120
|
+
cursor: grab;
|
|
121
|
+
}
|
|
122
|
+
.handle svg {
|
|
123
|
+
width: 14px;
|
|
124
|
+
height: 14px;
|
|
125
|
+
fill: currentColor;
|
|
126
|
+
}
|
|
127
|
+
.pick {
|
|
128
|
+
flex: 1;
|
|
129
|
+
min-width: 0;
|
|
130
|
+
height: 100%;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
gap: 8px;
|
|
134
|
+
padding: 0 4px;
|
|
135
|
+
border: 0;
|
|
136
|
+
border-radius: 6px;
|
|
137
|
+
background: none;
|
|
138
|
+
font: inherit;
|
|
139
|
+
color: inherit;
|
|
140
|
+
text-align: start;
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
}
|
|
143
|
+
.pick:focus-visible {
|
|
144
|
+
outline: 2px solid #4f46e5;
|
|
145
|
+
outline-offset: -2px;
|
|
146
|
+
}
|
|
147
|
+
.pick img,
|
|
148
|
+
.pending {
|
|
149
|
+
flex: none;
|
|
150
|
+
width: 24px;
|
|
151
|
+
height: 24px;
|
|
152
|
+
object-fit: contain;
|
|
153
|
+
}
|
|
154
|
+
.pending {
|
|
155
|
+
box-sizing: border-box;
|
|
156
|
+
border: 1.5px dashed #b9b6c6;
|
|
157
|
+
border-radius: 50%;
|
|
158
|
+
}
|
|
159
|
+
.name {
|
|
160
|
+
flex: 1;
|
|
161
|
+
min-width: 0;
|
|
162
|
+
overflow: hidden;
|
|
163
|
+
text-overflow: ellipsis;
|
|
164
|
+
white-space: nowrap;
|
|
165
|
+
/* a link reads left to right in a Hebrew panel too, cut at its end */
|
|
166
|
+
unicode-bidi: plaintext;
|
|
167
|
+
}
|
|
168
|
+
.name.new {
|
|
169
|
+
color: #6b6880;
|
|
170
|
+
}
|
|
171
|
+
.chev {
|
|
172
|
+
flex: none;
|
|
173
|
+
width: 14px;
|
|
174
|
+
height: 14px;
|
|
175
|
+
fill: none;
|
|
176
|
+
stroke: #6b6880;
|
|
177
|
+
stroke-width: 2;
|
|
178
|
+
stroke-linecap: round;
|
|
179
|
+
stroke-linejoin: round;
|
|
180
|
+
transition: transform 0.15s;
|
|
181
|
+
}
|
|
182
|
+
.card.open .chev {
|
|
183
|
+
transform: rotate(180deg);
|
|
184
|
+
}
|
|
185
|
+
.body {
|
|
186
|
+
display: grid;
|
|
187
|
+
grid-template-columns: minmax(0, 1fr);
|
|
188
|
+
/* sections apart, their own parts close */
|
|
189
|
+
gap: 20px;
|
|
190
|
+
padding: 14px;
|
|
191
|
+
border-top: 1px solid #ebe9f2;
|
|
192
|
+
}
|
|
193
|
+
.section {
|
|
194
|
+
display: grid;
|
|
195
|
+
grid-template-columns: minmax(0, 1fr);
|
|
196
|
+
gap: 8px;
|
|
197
|
+
}
|
|
198
|
+
.label {
|
|
199
|
+
font-size: 13px;
|
|
200
|
+
font-weight: 500;
|
|
201
|
+
}
|
|
202
|
+
/* sits at the end of the icon styles, the same size as them */
|
|
203
|
+
.upload {
|
|
204
|
+
width: 36px;
|
|
205
|
+
height: 36px;
|
|
206
|
+
display: grid;
|
|
207
|
+
place-items: center;
|
|
208
|
+
padding: 0;
|
|
209
|
+
border: 1px dashed #b9b6c6;
|
|
210
|
+
border-radius: 8px;
|
|
211
|
+
background: #fff;
|
|
212
|
+
color: #6b6880;
|
|
213
|
+
cursor: pointer;
|
|
214
|
+
}
|
|
215
|
+
.upload:hover {
|
|
216
|
+
border-color: #4f46e5;
|
|
217
|
+
color: #4f46e5;
|
|
218
|
+
}
|
|
219
|
+
.upload svg {
|
|
220
|
+
width: 16px;
|
|
221
|
+
height: 16px;
|
|
222
|
+
fill: none;
|
|
223
|
+
stroke: currentColor;
|
|
224
|
+
stroke-width: 2;
|
|
225
|
+
stroke-linecap: round;
|
|
226
|
+
stroke-linejoin: round;
|
|
227
|
+
}
|
|
228
|
+
.foot {
|
|
229
|
+
display: flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
margin-top: -6px;
|
|
232
|
+
padding-top: 10px;
|
|
233
|
+
border-top: 1px solid #ebe9f2;
|
|
234
|
+
}
|
|
235
|
+
.remove {
|
|
236
|
+
margin-inline-start: auto;
|
|
237
|
+
padding: 2px 0;
|
|
238
|
+
border: 0;
|
|
239
|
+
background: none;
|
|
240
|
+
font: inherit;
|
|
241
|
+
font-size: 13px;
|
|
242
|
+
font-weight: 500;
|
|
243
|
+
color: #b42318;
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
}
|
|
246
|
+
.remove:hover {
|
|
247
|
+
text-decoration: underline;
|
|
248
|
+
}
|
|
249
|
+
.add {
|
|
250
|
+
width: 100%;
|
|
251
|
+
height: 44px;
|
|
252
|
+
margin-top: 2px;
|
|
253
|
+
border: 1.5px dashed #d6d3e2;
|
|
254
|
+
border-radius: 10px;
|
|
255
|
+
background: #fff;
|
|
256
|
+
font: inherit;
|
|
257
|
+
font-weight: 500;
|
|
258
|
+
color: inherit;
|
|
259
|
+
cursor: pointer;
|
|
260
|
+
}
|
|
261
|
+
.add:hover {
|
|
262
|
+
border-color: #a7adbb;
|
|
263
|
+
}
|
|
264
|
+
.sortable-ghost {
|
|
265
|
+
opacity: 0.4;
|
|
266
|
+
}
|
|
267
|
+
`,b=(e,t)=>c.M.get("lang",e)||t,A=o.JW`<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="9" cy="6" r="1.6"/><circle cx="15" cy="6" r="1.6"/><circle cx="9" cy="12" r="1.6"/><circle cx="15" cy="12" r="1.6"/><circle cx="9" cy="18" r="1.6"/><circle cx="15" cy="18" r="1.6"/></svg>`,x=o.JW`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 15V4M7 9l5-5 5 5M5 15v4a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4"/></svg>`,v=o.JW`<svg class="chev" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg>`,y={youtube:"YouTube",whatsapp:"WhatsApp",linkedin:"LinkedIn",tiktok:"TikTok",wechat:"WeChat",x:"X"},w={x:"twitter-x",website:"globe"},C=e=>e.link?.href||e.url||"",k=e=>e.fgColor||e.iconColor,_=e=>e?(0,h.IE)(p.A,e):void 0;class I extends o.WF{constructor(){super(),this._draft=!1}connectedCallback(){super.connectedCallback();const e=()=>function(){const e=!!n.addPending;return n.addPending=!1,e}()&&this._openDraft();var t;e(),this._offAdd=(t=e,s.add(t),()=>s.delete(t))}_openDraft(){this._draftLink=null,this._draft=!0}firstUpdated(){this._sortable=d.Ay.create(this.renderRoot.querySelector(".list"),{handle:".handle",draggable:".card",forceFallback:!0,animation:150,onStart:e=>{let{item:t}=e;this._dragNext=t.nextSibling},onEnd:e=>{let{item:t,from:i,oldIndex:o,newIndex:n}=e;if(i.insertBefore(t,this._dragNext),o===n)return;const s=[...this.items];s.splice(n,0,s.splice(o,1)[0]),this._emit(s)}})}updated(e){if(!e.has("_draft")||!this._draft)return;const t=this.renderRoot.querySelector(".draft cdtr-link-element");t?.updateComplete.then(()=>{const e=t.renderRoot.querySelector("cdtr-input");e?.updateComplete.then(()=>e.inputRef?.value?.focus())})}disconnectedCallback(){super.disconnectedCallback(),this._sortable?.destroy(),this._offAdd?.()}_emit(e){this.items=e,this.dispatchEvent(new CustomEvent("items-change",{detail:e}))}_update(e,t){this._emit(this.items.map((i,o)=>o===e?{...i,...t}:i))}_toggle(e){this._draft=!1,r(a()?.id===e.id?null:e),this.requestUpdate()}_setLink(e,t){const i=this.items[e],o=t?.href||"",n=_(o)!==_(C(i))||(e=>{const t=e=>e.split("?")[0];return!e.src||e.src===h.Ww||!!C(e)&&t(e.src)===t((0,h.Vv)(C(e)))})(i),s=o&&n?(0,h.Vv)(o,k(i)):i.src;this._update(e,{link:t,url:o,src:s})}_commitDraft(){const e=this._draftLink,t=e?.href;if(!this._draft||!t)return;this._draftLink=null;const i=this.items||[],o=i[i.length-1],n={id:(0,l.A)(),fgColor:o?.fgColor||"",bgColor:"",style:{...o?.style||{width:"34px",height:"34px"}},url:t,link:e,src:(0,h.Vv)(t,o?.fgColor)};this._draft=!1,r(n),this._emit([...i,n])}_remove(e){a()?.id===this.items[e].id&&r(null),this._emit(this.items.filter((t,i)=>i!==e))}_body(e,t){const i=C(e),n=i?_(i)||"website":void 0;return o.qy`<div class="body">
|
|
268
|
+
<div class="section">
|
|
269
|
+
<div class="label">${b("address","Address")}</div>
|
|
270
|
+
<cdtr-link-element
|
|
271
|
+
compact
|
|
272
|
+
.href=${e.link||e.url||""}
|
|
273
|
+
.protocol=${e.link?.protocol}
|
|
274
|
+
.target=${e.link?.target}
|
|
275
|
+
@change=${e=>this._setLink(t,e.target.value)}
|
|
276
|
+
></cdtr-link-element>
|
|
277
|
+
</div>
|
|
278
|
+
<div class="section">
|
|
279
|
+
<div class="label">${b("icon_style","Icon style")}</div>
|
|
280
|
+
<social-icon-suggestions
|
|
281
|
+
.searchQuery=${w[n]||n||""}
|
|
282
|
+
.iconColor=${k(e)||"000000"}
|
|
283
|
+
.iconSize=${parseInt(e.style?.width,10)||34}
|
|
284
|
+
.selectedSrc=${e.src||""}
|
|
285
|
+
@icon-selected=${e=>this._update(t,{src:e.detail.src})}
|
|
286
|
+
>
|
|
287
|
+
<button
|
|
288
|
+
class="upload"
|
|
289
|
+
title=${b("upload","Upload Image")}
|
|
290
|
+
@click=${e=>e.currentTarget.closest(".section").querySelector("cdtr-gallery").opened=!0}
|
|
291
|
+
>
|
|
292
|
+
${x}
|
|
293
|
+
</button>
|
|
294
|
+
</social-icon-suggestions>
|
|
295
|
+
<cdtr-gallery
|
|
296
|
+
@close=${e=>e.target.opened=!1}
|
|
297
|
+
@file=${e=>{e.target.opened=!1;const i=Array.isArray(e.detail)?e.detail[0]:e.detail;i?.src&&this._update(t,{src:i.src})}}
|
|
298
|
+
></cdtr-gallery>
|
|
299
|
+
</div>
|
|
300
|
+
${this.items.length>1?o.qy`<div class="foot">
|
|
301
|
+
<button class="remove" @click=${()=>this._remove(t)}>${b("remove","Remove")}</button>
|
|
302
|
+
</div>`:null}
|
|
303
|
+
</div>`}_draftCard(){return o.qy`<div
|
|
304
|
+
class="card open draft"
|
|
305
|
+
@focusout=${e=>{e.currentTarget.contains(e.relatedTarget)||this._commitDraft()}}
|
|
306
|
+
@keydown=${e=>{"Enter"===e.key&&setTimeout(()=>this._commitDraft())}}
|
|
307
|
+
>
|
|
308
|
+
<div class="row">
|
|
309
|
+
<span class="handle"></span>
|
|
310
|
+
<button class="pick" @click=${()=>this._draft=!1}>
|
|
311
|
+
<span class="pending"></span>
|
|
312
|
+
<span class="name new">${b("new_icon","New icon")}</span>
|
|
313
|
+
${v}
|
|
314
|
+
</button>
|
|
315
|
+
</div>
|
|
316
|
+
<div class="body">
|
|
317
|
+
<div class="section">
|
|
318
|
+
<div class="label">${b("address","Address")}</div>
|
|
319
|
+
<cdtr-link-element compact .href=${""} @change=${e=>this._draftLink=e.target.value}></cdtr-link-element>
|
|
320
|
+
</div>
|
|
321
|
+
<div class="foot">
|
|
322
|
+
<button class="remove" @click=${()=>this._draft=!1}>${b("remove","Remove")}</button>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
</div>`}render(){const e=this.items||[],t=this._draft?null:a()?.id;return o.qy`
|
|
326
|
+
<div class="list">
|
|
327
|
+
${e.map((e,i)=>{const n=e.id===t,s=C(e),r=(0,h.Ff)(e,{color:k(e),bg:"ffffff"});return o.qy`<div class="card ${n?"open":""}" data-id=${e.id}>
|
|
328
|
+
<div class="row">
|
|
329
|
+
<span class="handle">${A}</span>
|
|
330
|
+
<button class="pick" aria-expanded=${n} @click=${()=>this._toggle(e)}>
|
|
331
|
+
<img src=${r||h.Ww} alt="" />
|
|
332
|
+
<span class="name">${s?n?(e=>{const t=_(e);return t?"email"===t||"phone"===t?b(t,t[0].toUpperCase()+t.slice(1)):y[t]||t[0].toUpperCase()+t.slice(1):b("website","Website")})(s):(e=>e.replace(/^(https?:\/\/(www\.)?|mailto:|tel:)/,"").split("?")[0])(s):b("add_link","Add link")}</span>
|
|
333
|
+
${v}
|
|
334
|
+
</button>
|
|
335
|
+
</div>
|
|
336
|
+
${n?this._body(e,i):null}
|
|
337
|
+
</div>`})}
|
|
338
|
+
</div>
|
|
339
|
+
${this._draft?this._draftCard():o.qy`<button
|
|
340
|
+
class="add"
|
|
341
|
+
@click=${()=>this._openDraft()}
|
|
342
|
+
>+ ${b("add_icon","Add icon")}</button>`}
|
|
343
|
+
`}}I.properties={items:{attribute:!1},_draft:{state:!0}},I.styles=g,customElements.get("cdtr-social-icons-editor")||customElements.define("cdtr-social-icons-editor",I);var $=i(61919);const B=e=>{{const{component:t,commands:i}=e,n=()=>{let e=a();if(e||(e=t.props.items.find(e=>!e.link),!e&&t.props.items.length>0&&(e=t.props.items[0])),e){!t.props.items.find(t=>t.id===e.id)&&t.props.items.length>0&&(e=t.props.items[0])}return e};return{select:e=>{let{changeTab:t,tab:i}=e;"icons"!==i&&t("icons")},tabs:e=>(e||(e="icons"),[{text:"icons"},{text:"design"}].map(t=>({...t,selected:t.text===e}))),layout:e=>{let{tab:s}=e;const r=n(),a=[{type:"custom",active:"icons"===s.text,node:()=>o.qy`<cdtr-editor-container>
|
|
344
|
+
<cdtr-social-icons-editor
|
|
345
|
+
.items=${t.props.items}
|
|
346
|
+
@items-change=${e=>i.execCommand("items",e.detail)}
|
|
347
|
+
></cdtr-social-icons-editor>
|
|
348
|
+
</cdtr-editor-container>`},{type:"slider",title:"size",active:"design"===s.text,value:parseInt(r?.style?.width),min:10,max:80,onInput:e=>{const o=e.target.value,n=[...t.props.items];n.forEach(e=>{e.style.width=o+"px",e.style.height=o+"px"}),i.execCommand("items",n)}},{type:"colorpicker",title:"icon_color",alpha:!1,active:()=>"design"===s.text&&!!r,value:r?.fgColor?r.fgColor.startsWith("#")?r.fgColor:"#"+r.fgColor:"#000000",onChange:e=>{const o=n();if(!o)return;let s=e.target.value;s=(0,$.A)(s).toHex(),s.startsWith("#")&&(s=s.slice(1)),8===s.length&&/^[0-9a-fA-F]+$/.test(s)&&(s=s.slice(0,6));const r=t.props,a=JSON.parse(JSON.stringify(r.items));if(!0===r.applyColorToAll)a.forEach(e=>{e.fgColor=s});else{const e=a.findIndex(e=>e.id===o.id);-1!==e&&(a[e].fgColor=s)}i.execCommand("items",a)}},{type:"checkbox",title:"color_them_all",checked:!!t.props.applyColorToAll,active:()=>"design"===s.text&&!!r,onChange:e=>{const t=!!e.target.checked;i.execCommand("applyColorToAll",t)}},{type:"divider"},{type:"slider",title:"spacing",active:"design"===s.text,value:parseFloat(t.props.style.gap),min:0,max:80,onInput:e=>{const t=e.target.value;i.execCommand("style",{gap:t+"px"})}}];return a}}}};var S=i(52144);const E=()=>({set:(e,t,i)=>{switch(t){case"style":if("object"==typeof i)return e[t]=(0,S.A)(e[t],i),!0;break;case"items":if(e[t]=i,Array.isArray(i)){const e=a(),t=i.find(t=>t.id===e?.id);t&&r(t)}return!0;case"src":const o=a();if(o&&Array.isArray(e.items)){const t=[...e.items],n=t.findIndex(e=>e.id===o.id);if(-1!==n)return t[n].src=i,e.items=t,!0}break;case"applyColorToAll":return e[t]=i,!0}}});var L=i(72591),q=i.n(L),T=i(88639),W=i.n(T),F=i(88128),U=i.n(F),Q=i(30855),R=i.n(Q),N=i(93051),z=i.n(N),j=i(89820),D={};D.setAttributes=R(),D.insert=U().bind(null,"head"),D.domAPI=W(),D.insertStyleElement=z();q()(j.A,D);const J=j.A&&j.A.locals?j.A.locals:void 0;var P=i(91597);const V=()=>{const e="social";return{name:e,create:t=>{let{createElement:i,compose:o,helpers:l}=t;const c=(0,P.S)(),p=document.createElement("div"),u=document.createElement("div");u.classList.add(J.root);new d.Ay(u,{sort:!0,delay:0,delayOnTouchOnly:!1,touchStartThreshold:0,disabled:!1,store:null,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",preventOnFilter:!0,draggable:".item",dataIdAttr:"data-id",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:1,direction:"horizontal",forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,dragoverBubble:!1,removeCloneOnHide:!0,emptyInsertThreshold:5,setData:function(e,t){e.setData("Text",t.textContent)},onChoose:function(e){e.oldIndex},onUnchoose:function(e){},onStart:function(e){e.oldIndex},onEnd:function(e){const t=JSON.parse(JSON.stringify(o.props.items)),{oldIndex:i,newIndex:n}=e,[s]=t.splice(i,1);t.splice(n,0,s),o.editor.store().execCommand("items",t)},onMove:function(e,t){e.dragged,e.draggedRect,e.related,e.relatedRect,e.willInsertAfter,t.clientY},onChange:function(e){e.newIndex}});p.appendChild(u);const f=i({name:e,id:o.id,template:p,draggable:{group:"element"},droppable:{group:"element"},render:()=>{const e=o.props.items;let t=!1;const i=e.map(e=>{const i=e.url||e.link?.link||"";return!e.src&&i?(t=!0,{...e,src:(0,h.Vv)(i)}):e});t&&setTimeout(()=>o.editor.store().execCommand("items",i),0);const d=t?i:e;for(;u.firstChild;)u.removeChild(u.firstChild);l.mergeDiff(u,{style:o.props.style});const c=a();d.forEach(e=>{const t=document.createElement("img");c?.id===e.id&&t.classList.add(J.selected),t.addEventListener("click",()=>{r(e),Array.from(u.children).forEach(e=>{e.classList.remove(J.selected)}),t.classList.add(J.selected)}),t.classList.add("item"),e.id&&t.setAttribute("data-id",e.id);const i=(0,h.fm)(u);t.src=(0,h.Ff)(e,{color:e.fgColor||e.iconColor,bg:i})||h.Ww,l.mergeDiff(t,{style:e.style}),u.append(t)});const p=document.createElement("paper-button");p.classList.add(J.add),p.innerHTML="<cdtr-icon icon='add' width='18' height='18'></cdtr-icon>",u.append(p),p.addEventListener("click",()=>(n.addPending=!0,void s.forEach(e=>e())))},handleBar:!0,defaultProps:{},validator:E(),schema:o.schema,onSelect:e=>{p.classList.add(J.selectedRow);const t=a();if(t){const i=document.querySelector(`[data-id="${t.id}"]`);i?(window.___social_cdtr_item=i,i.classList.add("selected_underlined")):p.classList.add(e)}},onDeselect:e=>{a();window.___social_cdtr_item&&window.___social_cdtr_item.classList.remove("selected_underlined"),p?.classList?.remove(e,J.selectedRow)},elementProps:o,remove:()=>{p.remove()},createEditor:B});return f.app.on("update",()=>{c.run(()=>{const e=(0,h.fm)(u);if(!e)return;const t=u.querySelectorAll("img"),i=o.props.items;t.forEach((t,o)=>{const n=i[o];if(!n)return;const s=(0,h.Ff)(n,{color:n.fgColor||n.iconColor,bg:e});s&&(t.src=s)})})}),f}}}},89820(e,t,i){i.d(t,{A:()=>a});var o=i(82001),n=i.n(o),s=i(40935),r=i.n(s)()(n());r.push([e.id,'.Z7AEJu5h_9kumGVl3K4x{\n display: flex;\n position: relative;\n --add-gap: 6px;\n}\n.UA2xJ_pGYNrGNLfjkExO{\n border:1px solid var(--primary);\n}\n/* A white disc with a dark plus, a hairline border and a soft shadow: it reads\n on any background. It sits just past the row, outside it, so the icons are\n centred as they are in the sent email, and shows only on hover or selection. */\n.D_WaIFoLxhQQCNkeIkoP{\n position: absolute;\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n min-width: 0;\n padding: 0;\n margin-left: var(--add-gap);\n width: 28px;\n height: 28px;\n border-radius: 50%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: #fff;\n color: #1f1b1d;\n border: 1px solid rgba(0,0,0,.18);\n box-shadow: 0 1px 3px rgba(0,0,0,.28);\n visibility: hidden;\n /* hide a beat late, so moving from the icons to the + doesn\'t lose it */\n transition: visibility 0s .3s;\n}\n/* covers the gap between the row and the +, so the row stays hovered on the way */\n.Z7AEJu5h_9kumGVl3K4x::after{\n content: "";\n position: absolute;\n left: 100%;\n top: 0;\n bottom: 0;\n width: var(--add-gap);\n}\n.Z7AEJu5h_9kumGVl3K4x:hover .D_WaIFoLxhQQCNkeIkoP,\n.hrRqnAUtaz06LTBYL5Pp .D_WaIFoLxhQQCNkeIkoP{\n visibility: visible;\n transition-delay: 0s;\n}\n',"",{version:3,sources:["webpack://./../newsletter-editors/social-editor-component-newsletter/lib/style.module.css"],names:[],mappings:"AAAA;IACI,aAAa;IACb,kBAAkB;IAClB,cAAc;AAClB;AACA;IACI,+BAA+B;AACnC;AACA;;iFAEiF;AACjF;IACI,kBAAkB;IAClB,UAAU;IACV,QAAQ;IACR,2BAA2B;IAC3B,YAAY;IACZ,UAAU;IACV,2BAA2B;IAC3B,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,uBAAuB;IACvB,gBAAgB;IAChB,cAAc;IACd,iCAAiC;IACjC,qCAAqC;IACrC,kBAAkB;IAClB,wEAAwE;IACxE,6BAA6B;AACjC;AACA,kFAAkF;AAClF;IACI,WAAW;IACX,kBAAkB;IAClB,UAAU;IACV,MAAM;IACN,SAAS;IACT,qBAAqB;AACzB;AACA;;IAEI,mBAAmB;IACnB,oBAAoB;AACxB",sourcesContent:['.root{\n display: flex;\n position: relative;\n --add-gap: 6px;\n}\n.selected{\n border:1px solid var(--primary);\n}\n/* A white disc with a dark plus, a hairline border and a soft shadow: it reads\n on any background. It sits just past the row, outside it, so the icons are\n centred as they are in the sent email, and shows only on hover or selection. */\n.add{\n position: absolute;\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n min-width: 0;\n padding: 0;\n margin-left: var(--add-gap);\n width: 28px;\n height: 28px;\n border-radius: 50%;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: #fff;\n color: #1f1b1d;\n border: 1px solid rgba(0,0,0,.18);\n box-shadow: 0 1px 3px rgba(0,0,0,.28);\n visibility: hidden;\n /* hide a beat late, so moving from the icons to the + doesn\'t lose it */\n transition: visibility 0s .3s;\n}\n/* covers the gap between the row and the +, so the row stays hovered on the way */\n.root::after{\n content: "";\n position: absolute;\n left: 100%;\n top: 0;\n bottom: 0;\n width: var(--add-gap);\n}\n.root:hover .add,\n.selectedRow .add{\n visibility: visible;\n transition-delay: 0s;\n}\n'],sourceRoot:""}]),r.locals={root:"Z7AEJu5h_9kumGVl3K4x",selected:"UA2xJ_pGYNrGNLfjkExO",add:"D_WaIFoLxhQQCNkeIkoP",selectedRow:"hrRqnAUtaz06LTBYL5Pp"};const a=r}}]);
|
|
Binary file
|
|
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
|