@creaditor/newsletter-starterkit 1.0.41 → 1.0.43
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/1260.creaditor.bundle.js +234 -0
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1317.creaditor.bundle.js +3 -3
- package/dist/1317.creaditor.bundle.js.gz +0 -0
- package/dist/1529.creaditor.bundle.js +16 -0
- package/dist/1529.creaditor.bundle.js.gz +0 -0
- package/dist/1565.creaditor.bundle.js +1016 -0
- package/dist/1565.creaditor.bundle.js.gz +0 -0
- package/dist/168.creaditor.bundle.js +5 -421
- package/dist/168.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +1 -1
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/2234.creaditor.bundle.js +1 -1
- package/dist/2234.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js +1 -1
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/2438.creaditor.bundle.js +67 -0
- package/dist/2438.creaditor.bundle.js.gz +0 -0
- package/dist/2547.creaditor.bundle.js +6 -0
- package/dist/2547.creaditor.bundle.js.gz +0 -0
- package/dist/2706.creaditor.bundle.js +2 -2
- package/dist/2706.creaditor.bundle.js.gz +0 -0
- package/dist/271.creaditor.bundle.js +99 -0
- package/dist/271.creaditor.bundle.js.gz +0 -0
- package/dist/2834.creaditor.bundle.js +14 -0
- package/dist/2834.creaditor.bundle.js.LICENSE.txt +5 -0
- package/dist/2834.creaditor.bundle.js.gz +0 -0
- package/dist/3095.creaditor.bundle.js +161 -0
- package/dist/3095.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js +2 -2
- package/dist/3521.creaditor.bundle.js.gz +0 -0
- package/dist/3553.creaditor.bundle.js +1 -1
- package/dist/3553.creaditor.bundle.js.gz +0 -0
- package/dist/3606.creaditor.bundle.js +113 -0
- package/dist/3606.creaditor.bundle.js.gz +0 -0
- package/dist/3932.creaditor.bundle.js +30 -0
- package/dist/3932.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js +453 -0
- package/dist/4186.creaditor.bundle.js.LICENSE.txt +10 -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 +98 -0
- package/dist/4288.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js +111 -11
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +1043 -19
- package/dist/4569.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +1 -1
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/5133.creaditor.bundle.js +60 -0
- package/dist/5133.creaditor.bundle.js.gz +0 -0
- package/dist/5501.creaditor.bundle.js +112 -0
- package/dist/5501.creaditor.bundle.js.gz +0 -0
- package/dist/5713.creaditor.bundle.js +2 -152
- package/dist/5713.creaditor.bundle.js.LICENSE.txt +0 -11
- 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 +4 -68
- package/dist/574.creaditor.bundle.js.gz +0 -0
- package/dist/5849.creaditor.bundle.js +1 -1
- package/dist/5849.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 +34 -0
- package/dist/6036.creaditor.bundle.js.gz +0 -0
- package/dist/6151.creaditor.bundle.js +1 -0
- package/dist/6151.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +23 -0
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6442.creaditor.bundle.js +236 -0
- package/dist/6442.creaditor.bundle.js.gz +0 -0
- package/dist/7307.creaditor.bundle.js +186 -0
- package/dist/7307.creaditor.bundle.js.gz +0 -0
- package/dist/741.creaditor.bundle.js +234 -0
- package/dist/741.creaditor.bundle.js.gz +0 -0
- package/dist/7466.creaditor.bundle.js +1 -1
- package/dist/7466.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +40 -0
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/767.creaditor.bundle.js +1 -1
- package/dist/767.creaditor.bundle.js.gz +0 -0
- package/dist/8042.creaditor.bundle.js +71 -0
- package/dist/8042.creaditor.bundle.js.gz +0 -0
- package/dist/8141.creaditor.bundle.js +1 -1
- package/dist/8141.creaditor.bundle.js.gz +0 -0
- package/dist/8173.creaditor.bundle.js +3 -3
- package/dist/8173.creaditor.bundle.js.gz +0 -0
- package/dist/8443.creaditor.bundle.js +72 -0
- package/dist/8443.creaditor.bundle.js.gz +0 -0
- package/dist/8516.creaditor.bundle.js +1 -1
- package/dist/8516.creaditor.bundle.js.gz +0 -0
- package/dist/8570.creaditor.bundle.js +102 -0
- package/dist/8570.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js +122 -0
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/8654.creaditor.bundle.js +109 -0
- package/dist/8654.creaditor.bundle.js.gz +0 -0
- package/dist/8854.creaditor.bundle.js +1 -1
- package/dist/8854.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js +18 -0
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/898.creaditor.bundle.js +5 -357
- package/dist/898.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +171 -0
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9193.creaditor.bundle.js +1 -1
- package/dist/9193.creaditor.bundle.js.gz +0 -0
- package/dist/9990.creaditor.bundle.js +16 -0
- package/dist/9990.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +1241 -1657
- package/dist/creaditor.bundle.js.LICENSE.txt +8 -0
- package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,357 +1,5 @@
|
|
|
1
1
|
/*! For license information please see 898.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[898],{
|
|
3
|
-
<custom-style>
|
|
4
|
-
<style is="custom-style">
|
|
5
|
-
[hidden] {
|
|
6
|
-
display: none !important;
|
|
7
|
-
}
|
|
8
|
-
</style>
|
|
9
|
-
</custom-style>
|
|
10
|
-
<custom-style>
|
|
11
|
-
<style is="custom-style">
|
|
12
|
-
html {
|
|
13
|
-
|
|
14
|
-
--layout: {
|
|
15
|
-
display: -ms-flexbox;
|
|
16
|
-
display: -webkit-flex;
|
|
17
|
-
display: flex;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
--layout-inline: {
|
|
21
|
-
display: -ms-inline-flexbox;
|
|
22
|
-
display: -webkit-inline-flex;
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
--layout-horizontal: {
|
|
27
|
-
@apply --layout;
|
|
28
|
-
|
|
29
|
-
-ms-flex-direction: row;
|
|
30
|
-
-webkit-flex-direction: row;
|
|
31
|
-
flex-direction: row;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
--layout-horizontal-reverse: {
|
|
35
|
-
@apply --layout;
|
|
36
|
-
|
|
37
|
-
-ms-flex-direction: row-reverse;
|
|
38
|
-
-webkit-flex-direction: row-reverse;
|
|
39
|
-
flex-direction: row-reverse;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
--layout-vertical: {
|
|
43
|
-
@apply --layout;
|
|
44
|
-
|
|
45
|
-
-ms-flex-direction: column;
|
|
46
|
-
-webkit-flex-direction: column;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
--layout-vertical-reverse: {
|
|
51
|
-
@apply --layout;
|
|
52
|
-
|
|
53
|
-
-ms-flex-direction: column-reverse;
|
|
54
|
-
-webkit-flex-direction: column-reverse;
|
|
55
|
-
flex-direction: column-reverse;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
--layout-wrap: {
|
|
59
|
-
-ms-flex-wrap: wrap;
|
|
60
|
-
-webkit-flex-wrap: wrap;
|
|
61
|
-
flex-wrap: wrap;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
--layout-wrap-reverse: {
|
|
65
|
-
-ms-flex-wrap: wrap-reverse;
|
|
66
|
-
-webkit-flex-wrap: wrap-reverse;
|
|
67
|
-
flex-wrap: wrap-reverse;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
--layout-flex-auto: {
|
|
71
|
-
-ms-flex: 1 1 auto;
|
|
72
|
-
-webkit-flex: 1 1 auto;
|
|
73
|
-
flex: 1 1 auto;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
--layout-flex-none: {
|
|
77
|
-
-ms-flex: none;
|
|
78
|
-
-webkit-flex: none;
|
|
79
|
-
flex: none;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
--layout-flex: {
|
|
83
|
-
-ms-flex: 1 1 0.000000001px;
|
|
84
|
-
-webkit-flex: 1;
|
|
85
|
-
flex: 1;
|
|
86
|
-
-webkit-flex-basis: 0.000000001px;
|
|
87
|
-
flex-basis: 0.000000001px;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
--layout-flex-2: {
|
|
91
|
-
-ms-flex: 2;
|
|
92
|
-
-webkit-flex: 2;
|
|
93
|
-
flex: 2;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
--layout-flex-3: {
|
|
97
|
-
-ms-flex: 3;
|
|
98
|
-
-webkit-flex: 3;
|
|
99
|
-
flex: 3;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
--layout-flex-4: {
|
|
103
|
-
-ms-flex: 4;
|
|
104
|
-
-webkit-flex: 4;
|
|
105
|
-
flex: 4;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
--layout-flex-5: {
|
|
109
|
-
-ms-flex: 5;
|
|
110
|
-
-webkit-flex: 5;
|
|
111
|
-
flex: 5;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
--layout-flex-6: {
|
|
115
|
-
-ms-flex: 6;
|
|
116
|
-
-webkit-flex: 6;
|
|
117
|
-
flex: 6;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
--layout-flex-7: {
|
|
121
|
-
-ms-flex: 7;
|
|
122
|
-
-webkit-flex: 7;
|
|
123
|
-
flex: 7;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
--layout-flex-8: {
|
|
127
|
-
-ms-flex: 8;
|
|
128
|
-
-webkit-flex: 8;
|
|
129
|
-
flex: 8;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
--layout-flex-9: {
|
|
133
|
-
-ms-flex: 9;
|
|
134
|
-
-webkit-flex: 9;
|
|
135
|
-
flex: 9;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
--layout-flex-10: {
|
|
139
|
-
-ms-flex: 10;
|
|
140
|
-
-webkit-flex: 10;
|
|
141
|
-
flex: 10;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
--layout-flex-11: {
|
|
145
|
-
-ms-flex: 11;
|
|
146
|
-
-webkit-flex: 11;
|
|
147
|
-
flex: 11;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
--layout-flex-12: {
|
|
151
|
-
-ms-flex: 12;
|
|
152
|
-
-webkit-flex: 12;
|
|
153
|
-
flex: 12;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
/* alignment in cross axis */
|
|
157
|
-
|
|
158
|
-
--layout-start: {
|
|
159
|
-
-ms-flex-align: start;
|
|
160
|
-
-webkit-align-items: flex-start;
|
|
161
|
-
align-items: flex-start;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
--layout-center: {
|
|
165
|
-
-ms-flex-align: center;
|
|
166
|
-
-webkit-align-items: center;
|
|
167
|
-
align-items: center;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
--layout-end: {
|
|
171
|
-
-ms-flex-align: end;
|
|
172
|
-
-webkit-align-items: flex-end;
|
|
173
|
-
align-items: flex-end;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
--layout-baseline: {
|
|
177
|
-
-ms-flex-align: baseline;
|
|
178
|
-
-webkit-align-items: baseline;
|
|
179
|
-
align-items: baseline;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
/* alignment in main axis */
|
|
183
|
-
|
|
184
|
-
--layout-start-justified: {
|
|
185
|
-
-ms-flex-pack: start;
|
|
186
|
-
-webkit-justify-content: flex-start;
|
|
187
|
-
justify-content: flex-start;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
--layout-center-justified: {
|
|
191
|
-
-ms-flex-pack: center;
|
|
192
|
-
-webkit-justify-content: center;
|
|
193
|
-
justify-content: center;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
--layout-end-justified: {
|
|
197
|
-
-ms-flex-pack: end;
|
|
198
|
-
-webkit-justify-content: flex-end;
|
|
199
|
-
justify-content: flex-end;
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
--layout-around-justified: {
|
|
203
|
-
-ms-flex-pack: distribute;
|
|
204
|
-
-webkit-justify-content: space-around;
|
|
205
|
-
justify-content: space-around;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
--layout-justified: {
|
|
209
|
-
-ms-flex-pack: justify;
|
|
210
|
-
-webkit-justify-content: space-between;
|
|
211
|
-
justify-content: space-between;
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
--layout-center-center: {
|
|
215
|
-
@apply --layout-center;
|
|
216
|
-
@apply --layout-center-justified;
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
/* self alignment */
|
|
220
|
-
|
|
221
|
-
--layout-self-start: {
|
|
222
|
-
-ms-align-self: flex-start;
|
|
223
|
-
-webkit-align-self: flex-start;
|
|
224
|
-
align-self: flex-start;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
--layout-self-center: {
|
|
228
|
-
-ms-align-self: center;
|
|
229
|
-
-webkit-align-self: center;
|
|
230
|
-
align-self: center;
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
--layout-self-end: {
|
|
234
|
-
-ms-align-self: flex-end;
|
|
235
|
-
-webkit-align-self: flex-end;
|
|
236
|
-
align-self: flex-end;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
--layout-self-stretch: {
|
|
240
|
-
-ms-align-self: stretch;
|
|
241
|
-
-webkit-align-self: stretch;
|
|
242
|
-
align-self: stretch;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
--layout-self-baseline: {
|
|
246
|
-
-ms-align-self: baseline;
|
|
247
|
-
-webkit-align-self: baseline;
|
|
248
|
-
align-self: baseline;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
/* multi-line alignment in main axis */
|
|
252
|
-
|
|
253
|
-
--layout-start-aligned: {
|
|
254
|
-
-ms-flex-line-pack: start; /* IE10 */
|
|
255
|
-
-ms-align-content: flex-start;
|
|
256
|
-
-webkit-align-content: flex-start;
|
|
257
|
-
align-content: flex-start;
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
--layout-end-aligned: {
|
|
261
|
-
-ms-flex-line-pack: end; /* IE10 */
|
|
262
|
-
-ms-align-content: flex-end;
|
|
263
|
-
-webkit-align-content: flex-end;
|
|
264
|
-
align-content: flex-end;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
--layout-center-aligned: {
|
|
268
|
-
-ms-flex-line-pack: center; /* IE10 */
|
|
269
|
-
-ms-align-content: center;
|
|
270
|
-
-webkit-align-content: center;
|
|
271
|
-
align-content: center;
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
--layout-between-aligned: {
|
|
275
|
-
-ms-flex-line-pack: justify; /* IE10 */
|
|
276
|
-
-ms-align-content: space-between;
|
|
277
|
-
-webkit-align-content: space-between;
|
|
278
|
-
align-content: space-between;
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
--layout-around-aligned: {
|
|
282
|
-
-ms-flex-line-pack: distribute; /* IE10 */
|
|
283
|
-
-ms-align-content: space-around;
|
|
284
|
-
-webkit-align-content: space-around;
|
|
285
|
-
align-content: space-around;
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
/*******************************
|
|
289
|
-
Other Layout
|
|
290
|
-
*******************************/
|
|
291
|
-
|
|
292
|
-
--layout-block: {
|
|
293
|
-
display: block;
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
--layout-invisible: {
|
|
297
|
-
visibility: hidden !important;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
--layout-relative: {
|
|
301
|
-
position: relative;
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
--layout-fit: {
|
|
305
|
-
position: absolute;
|
|
306
|
-
top: 0;
|
|
307
|
-
right: 0;
|
|
308
|
-
bottom: 0;
|
|
309
|
-
left: 0;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
--layout-scroll: {
|
|
313
|
-
-webkit-overflow-scrolling: touch;
|
|
314
|
-
overflow: auto;
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
--layout-fullbleed: {
|
|
318
|
-
margin: 0;
|
|
319
|
-
height: 100vh;
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
/* fixed position */
|
|
323
|
-
|
|
324
|
-
--layout-fixed-top: {
|
|
325
|
-
position: fixed;
|
|
326
|
-
top: 0;
|
|
327
|
-
left: 0;
|
|
328
|
-
right: 0;
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
--layout-fixed-right: {
|
|
332
|
-
position: fixed;
|
|
333
|
-
top: 0;
|
|
334
|
-
right: 0;
|
|
335
|
-
bottom: 0;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
--layout-fixed-bottom: {
|
|
339
|
-
position: fixed;
|
|
340
|
-
right: 0;
|
|
341
|
-
bottom: 0;
|
|
342
|
-
left: 0;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
--layout-fixed-left: {
|
|
346
|
-
position: fixed;
|
|
347
|
-
top: 0;
|
|
348
|
-
bottom: 0;
|
|
349
|
-
left: 0;
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
</style>
|
|
354
|
-
</custom-style>`;p.setAttribute("style","display: none;"),document.head.appendChild(p.content);var r=document.createElement("style");r.textContent="[hidden] { display: none !important; }",document.head.appendChild(r)},90898(e,a,t){t(69130),t(12479),t(88453),t(45611),t(66564);const p=document.createElement("template");p.setAttribute("style","display: none;"),p.innerHTML="<dom-module id=\"paper-item-shared-styles\">\n <template>\n <style>\n :host, .paper-item {\n display: block;\n position: relative;\n min-height: var(--paper-item-min-height, 48px);\n padding: 0px 16px;\n }\n\n .paper-item {\n @apply --paper-font-subhead;\n border:none;\n outline: none;\n background: white;\n width: 100%;\n text-align: left;\n }\n\n :host([hidden]), .paper-item[hidden] {\n display: none !important;\n }\n\n :host(.iron-selected), .paper-item.iron-selected {\n font-weight: var(--paper-item-selected-weight, bold);\n\n @apply --paper-item-selected;\n }\n\n :host([disabled]), .paper-item[disabled] {\n color: var(--paper-item-disabled-color, var(--disabled-text-color));\n\n @apply --paper-item-disabled;\n }\n\n :host(:focus), .paper-item:focus {\n position: relative;\n outline: 0;\n\n @apply --paper-item-focused;\n }\n\n :host(:focus):before, .paper-item:focus:before {\n @apply --layout-fit;\n\n background: currentColor;\n content: '';\n opacity: var(--dark-divider-opacity);\n pointer-events: none;\n\n @apply --paper-item-focused-before;\n }\n </style>\n </template>\n</dom-module>",document.head.appendChild(p.content);var r=t(95586),n=t(47351),o=t(71920),l=t(90703);const i=[o.a,l.x,{hostAttributes:{role:"option",tabindex:"0"}}];(0,r.b)({_template:n.q`
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[898],{90898(e,p,a){a(69130),a(12479),a(88453),a(45611),a(66564);const r=document.createElement("template");r.setAttribute("style","display: none;"),r.innerHTML="<dom-module id=\"paper-item-shared-styles\">\n <template>\n <style>\n :host, .paper-item {\n display: block;\n position: relative;\n min-height: var(--paper-item-min-height, 48px);\n padding: 0px 16px;\n }\n\n .paper-item {\n @apply --paper-font-subhead;\n border:none;\n outline: none;\n background: white;\n width: 100%;\n text-align: left;\n }\n\n :host([hidden]), .paper-item[hidden] {\n display: none !important;\n }\n\n :host(.iron-selected), .paper-item.iron-selected {\n font-weight: var(--paper-item-selected-weight, bold);\n\n @apply --paper-item-selected;\n }\n\n :host([disabled]), .paper-item[disabled] {\n color: var(--paper-item-disabled-color, var(--disabled-text-color));\n\n @apply --paper-item-disabled;\n }\n\n :host(:focus), .paper-item:focus {\n position: relative;\n outline: 0;\n\n @apply --paper-item-focused;\n }\n\n :host(:focus):before, .paper-item:focus:before {\n @apply --layout-fit;\n\n background: currentColor;\n content: '';\n opacity: var(--dark-divider-opacity);\n pointer-events: none;\n\n @apply --paper-item-focused-before;\n }\n </style>\n </template>\n</dom-module>",document.head.appendChild(r.content);var o=a(95586),t=a(47351),n=a(71920),l=a(90703);const f=[n.a,l.x,{hostAttributes:{role:"option",tabindex:"0"}}];(0,o.b)({_template:t.q`
|
|
355
3
|
<style include="paper-item-shared-styles">
|
|
356
4
|
:host {
|
|
357
5
|
@apply --layout-horizontal;
|
|
@@ -362,7 +10,7 @@
|
|
|
362
10
|
}
|
|
363
11
|
</style>
|
|
364
12
|
<slot></slot>
|
|
365
|
-
`,is:"paper-item",behaviors:[
|
|
13
|
+
`,is:"paper-item",behaviors:[f]})},88453(e,p,a){a(69130);const r=a(47351).q`
|
|
366
14
|
<custom-style>
|
|
367
15
|
<style is="custom-style">
|
|
368
16
|
html {
|
|
@@ -685,7 +333,7 @@
|
|
|
685
333
|
|
|
686
334
|
</style>
|
|
687
335
|
</custom-style>
|
|
688
|
-
`;
|
|
336
|
+
`;r.setAttribute("style","display: none;"),document.head.appendChild(r.content)},45611(e,p,a){a(69130),a(88453);const r=a(47351).q`
|
|
689
337
|
<custom-style>
|
|
690
338
|
<style is="custom-style">
|
|
691
339
|
html {
|
|
@@ -741,7 +389,7 @@
|
|
|
741
389
|
--default-primary-color: var(--primary-color);
|
|
742
390
|
}
|
|
743
391
|
</style>
|
|
744
|
-
</custom-style>`;
|
|
392
|
+
</custom-style>`;r.setAttribute("style","display: none;"),document.head.appendChild(r.content)},66564(e,p,a){a(69130);if(!window.polymerSkipLoadingFontRoboto){const e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.crossOrigin="anonymous",e.href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic",document.head.appendChild(e)}const r=a(47351).q`<custom-style>
|
|
745
393
|
<style is="custom-style">
|
|
746
394
|
html {
|
|
747
395
|
|
|
@@ -897,4 +545,4 @@
|
|
|
897
545
|
}
|
|
898
546
|
|
|
899
547
|
</style>
|
|
900
|
-
</custom-style>`;
|
|
548
|
+
</custom-style>`;r.setAttribute("style","display: none;"),document.head.appendChild(r.content)}}]);
|
|
Binary file
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9041],{19041(t,e,n){n.r(e),n.d(e,{ElementHandleBar:()=>h});var o=n(24586),i=n(59929),a=n(86319),s=n(21421),r=n(9507),l=n(89531),c=n(83965),d=n(67549);const p=r.Ay;l.A,c.i,d.s;class h extends i.WF{constructor(){super(),(0,o.A)(this,"animations",[]),(0,o.A)(this,"elementRef",(0,s._)()),this.canDisplayBar=!0;const t=a.M.get("config","editor","configure","editorProps");this.canDisplayBar=!t||!1!==t?.actionBar,this.selected=!1,this.connectWith=this.connectWith.bind(this),this.onRemove=this.onRemove.bind(this)}cloneElement(){let t,e=p.getComponent(this.for);const n=e?.closest("col");let o=0;n&&(o=n.children.length);const i="card"===e?.type||o<2?e.closest("col"):null;if(i&&(e=i),e&&(t=e.parent(),t)){let n=t.children.findIndex(t=>t===e.id);"col"===e.type&&(n+=1),"number"==typeof n&&p.cloneComponent({componentId:e.id,index:n,parentId:t.id})}}onRemove(){a.M.get("components",this.for).commands.remove()}connectWith(){if(this.selected=!1,this.for){const t=p.components.find(t=>t.id===this.for);if(t){const e=t,n=e.closest("col");n&&(n.element.getBoundingClientRect(),e.element.getBoundingClientRect());const o=e.closest("card");if(o&&this.elementRef.value){const t=o.element.getBoundingClientRect(),n=e.element.getBoundingClientRect();if(parseInt(String(t.top))>=parseInt(String(n.top))-40){let e=0;t.right>n.right?e=t.right-n.right-100+"px":t.left<n.left&&(e=t.left-n.left+20+"px"),n.left+parseInt(String(e))<t.left&&(e=0),this.elementRef.value.style.transform=`translate(${e},${n.height+10}px)`}else this.elementRef.value.style.transform=""}else this.elementRef.value&&(this.elementRef.value.style.transform="");this.selected=!!e.element?.closest("[draggable-element]");const i=e.props;this.animations=i.interactions?.filter(t=>"animation"===t.type)??[],this.hasAnimations=this.animations.length>0,this.name=i.name||a.M.get("lang",e.type)}}}justifyContent(t){p.store().execCommand("justify",t,{find:"col"})}connectedCallback(){super.connectedCallback(),p.on("select",this.connectWith),p.on("update",this.connectWith),this.classList.add("ignore-cdtr-blur")}disconnectedCallback(){super.disconnectedCallback(),p.off("select",this.connectWith),p.off("update",this.connectWith)}render(){return this.style.display=this.selected?"":"none",i.qy`<cdtr-row
|
|
2
|
+
${(0,s.K)(this.elementRef)}
|
|
3
|
+
class="bar"
|
|
4
|
+
alignItems="center"
|
|
5
|
+
justify="space-evenly"
|
|
6
|
+
class="wrapper"
|
|
7
|
+
spacing="10px"
|
|
8
|
+
>
|
|
9
|
+
<cdtr-tooltip content="drag_element">
|
|
10
|
+
<paper-button
|
|
11
|
+
@mousedown=${t=>{const e=document.createElement("div");e.setAttribute("data-id",this.for);const n=a.M.get("components",this.for);e.style.width=n.element.clientWidth+"px",e.style.height=n.element.clientHeight+"px",e.setAttribute("data-type",n.type);let o=n.type;"block"!==o&&"col"!==o&&"section"!==o&&(o="element"),e.setAttribute("draggable-direction","top,bottom,left,right"),e.setAttribute("draggable-element",o),e.classList.add("draggable-element-handle"),window.__dragoned_selected_element=e}}
|
|
12
|
+
data-draggable-for=${this.for}
|
|
13
|
+
class="draggable-element-handle"
|
|
14
|
+
>
|
|
15
|
+
<cdtr-move-icon
|
|
16
|
+
iconStyle="fill:#000"
|
|
17
|
+
width="18"
|
|
18
|
+
height="18"
|
|
19
|
+
></cdtr-move-icon>
|
|
20
|
+
</paper-button>
|
|
21
|
+
</cdtr-tooltip>
|
|
22
|
+
<cdtr-tooltip content="clone_element">
|
|
23
|
+
<paper-button @mousedown=${this.cloneElement}>
|
|
24
|
+
<cdtr-icon width=${18} height=${18} icon="duplicate"></cdtr-icon>
|
|
25
|
+
</paper-button>
|
|
26
|
+
</cdtr-tooltip>
|
|
27
|
+
<cdtr-tooltip content="remove_element">
|
|
28
|
+
<paper-button @mousedown=${this.onRemove}>
|
|
29
|
+
<cdtr-remove-icon
|
|
30
|
+
width=${18}
|
|
31
|
+
height=${18}
|
|
32
|
+
iconStyle=""
|
|
33
|
+
></cdtr-remove-icon>
|
|
34
|
+
</paper-button>
|
|
35
|
+
</cdtr-tooltip>
|
|
36
|
+
<!-- <span class="name"> ${this.name} </span> -->
|
|
37
|
+
<div class="transparent-gap"></div>
|
|
38
|
+
</cdtr-row>
|
|
39
|
+
<!-- ${this.hasAnimations?i.qy`<cdtr-row
|
|
40
|
+
alignItems="center"
|
|
41
|
+
justify="space-between"
|
|
42
|
+
class="bottom-bar bar"
|
|
43
|
+
>
|
|
44
|
+
<cdtr-tooltip content="left">
|
|
45
|
+
<paper-button @click=${()=>this.justifyContent("flex-start")}>
|
|
46
|
+
<cdtr-icon width="18" icon="justifyLeft"></cdtr-icon>
|
|
47
|
+
</paper-button>
|
|
48
|
+
</cdtr-tooltip>
|
|
49
|
+
<cdtr-tooltip content="center">
|
|
50
|
+
<paper-button @click=${()=>this.justifyContent("center")}>
|
|
51
|
+
<cdtr-icon width="18" icon="justifyCenter"></cdtr-icon>
|
|
52
|
+
</paper-button>
|
|
53
|
+
</cdtr-tooltip>
|
|
54
|
+
<cdtr-tooltip content="right">
|
|
55
|
+
<paper-button @click=${()=>this.justifyContent("flex-end")}>
|
|
56
|
+
<cdtr-icon width="18" icon="justifyRight"></cdtr-icon>
|
|
57
|
+
</paper-button>
|
|
58
|
+
</cdtr-tooltip>
|
|
59
|
+
</cdtr-row>`:null} -->
|
|
60
|
+
${this.hasAnimations?i.qy`<div class="animation-bar">
|
|
61
|
+
<cdtr-tooltip content="animation">
|
|
62
|
+
<paper-button
|
|
63
|
+
@mousedown=${()=>p.app.dispatch("editor-tabs",{tab:"animations"})}
|
|
64
|
+
>
|
|
65
|
+
<svg
|
|
66
|
+
width="10"
|
|
67
|
+
height="20"
|
|
68
|
+
viewBox="0 0 16 22"
|
|
69
|
+
fill="#fff"
|
|
70
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
71
|
+
>
|
|
72
|
+
<path
|
|
73
|
+
d="M5.13783 1H11.6942C11.8384 1 11.9352 1.14803 11.8774 1.28016L8.62257 8.71984C8.56476 8.85197 8.66157 9 8.8058 9H14.5561C14.7284 9 14.82 9.20343 14.7059 9.33251L4.14955 21.2657C4.00527 21.4288 3.74115 21.2766 3.81001 21.07L6.91225 11.7632C6.95542 11.6337 6.85903 11.5 6.72251 11.5H1.29021C1.15013 11.5 1.05344 11.3597 1.10331 11.2288L4.95093 1.1288C4.98048 1.05125 5.05484 1 5.13783 1Z"
|
|
74
|
+
stroke="#fff"
|
|
75
|
+
/>
|
|
76
|
+
</svg>
|
|
77
|
+
</paper-button>
|
|
78
|
+
</cdtr-tooltip>
|
|
79
|
+
</div> `:null}`}}(0,o.A)(h,"properties",{for:{type:String},name:{type:String},selected:{type:Boolean},hasAnimations:{},canDisplayBar:{type:Boolean}}),(0,o.A)(h,"styles",i.AH`
|
|
80
|
+
.draggable-element-handle:after {
|
|
81
|
+
content: "";
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 0;
|
|
84
|
+
left: 0;
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 100%;
|
|
87
|
+
background: transparent;
|
|
88
|
+
}
|
|
89
|
+
.transparent-gap {
|
|
90
|
+
position: absolute;
|
|
91
|
+
left: 0;
|
|
92
|
+
top: 100%;
|
|
93
|
+
background: transparent;
|
|
94
|
+
width: 100%;
|
|
95
|
+
height: 10px;
|
|
96
|
+
}
|
|
97
|
+
.name {
|
|
98
|
+
max-width: auto;
|
|
99
|
+
text-overflow: clip;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
}
|
|
103
|
+
.bar {
|
|
104
|
+
position: absolute;
|
|
105
|
+
height: 30px;
|
|
106
|
+
background: transparent;
|
|
107
|
+
min-width: 106px;
|
|
108
|
+
z-index: 101;
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
font-family: var(--font-family);
|
|
112
|
+
left: 0;
|
|
113
|
+
top: -5px;
|
|
114
|
+
transform: translate(0, -100%);
|
|
115
|
+
padding: 0 0.4rem;
|
|
116
|
+
background: #fff;
|
|
117
|
+
font-size: 13px;
|
|
118
|
+
border-radius: 3px;
|
|
119
|
+
animation: fade_in 0.2s;
|
|
120
|
+
color: black;
|
|
121
|
+
width: auto;
|
|
122
|
+
box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
|
|
123
|
+
rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
|
|
124
|
+
}
|
|
125
|
+
.bottom-bar {
|
|
126
|
+
top: 100%;
|
|
127
|
+
left: 100%;
|
|
128
|
+
transform: translateX(-100%);
|
|
129
|
+
animation: fade_up 0.2s !important;
|
|
130
|
+
}
|
|
131
|
+
.animation-bar {
|
|
132
|
+
position: absolute;
|
|
133
|
+
left: 101%;
|
|
134
|
+
top: 0;
|
|
135
|
+
background: var(--primary);
|
|
136
|
+
|
|
137
|
+
padding: 5px 5px;
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
border-radius: 3px;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
z-index: 99;
|
|
143
|
+
}
|
|
144
|
+
@keyframes fade_up {
|
|
145
|
+
from {
|
|
146
|
+
transform: translateX(-80%);
|
|
147
|
+
opacity: 0;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
@keyframes fade_in {
|
|
151
|
+
from {
|
|
152
|
+
top: -30px;
|
|
153
|
+
opacity: 0;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
.wrapper {
|
|
157
|
+
height: 100%;
|
|
158
|
+
width: 100%;
|
|
159
|
+
}
|
|
160
|
+
paper-button {
|
|
161
|
+
padding: 0;
|
|
162
|
+
min-width: auto;
|
|
163
|
+
margin: 0;
|
|
164
|
+
}
|
|
165
|
+
.drag_block {
|
|
166
|
+
cursor: grab;
|
|
167
|
+
}
|
|
168
|
+
.drag_block:active {
|
|
169
|
+
cursor: grabbing !important;
|
|
170
|
+
}
|
|
171
|
+
`),customElements.define("cdtr-move-handle-bar",h)}}]);
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9193],{49193(e,n,t){var o=t(5441),a=t(20195),r=t(72591),s=t.n(r),A=t(88639),l=t.n(A),c=t(88128),p=t.n(c),i=t(30855),d=t.n(i),m=t(93051),C=t.n(m),f=t(42793),g={};g.setAttributes=d(),g.insert=p().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=C();s()(f.A,g);const b=f.A&&f.A.locals?f.A.locals:void 0;var x=t(40352),E=t(86319),u=t(9507);let y,h=[],B=!1;const k=e=>{const n=e.detail,t=E.M.get("components",n?.dataset?.id);if(!t)throw new Error("component is not defined");const o=t?.element?.nextElementSibling;if(o){const e=E.M.get("components",o.dataset.id);e&&u.Ay.clean().selectComponent(e)}else{const e=t.element.previousElementSibling;if(e){const n=E.M.get("components",e.dataset.id);n&&u.Ay.clean().selectComponent(n)}}u.Ay.store().removeComponent({componentId:t.id})},v=(0,o.A)("cdtr-background-handle-bar",{onClick:()=>{setTimeout(()=>{u.Ay.selectComponent(E.M.get("components").find(e=>e.type.equalWith("root")))},0)},target:".section-component",onRemove:k}),w=()=>{const e=E.M.get("config","editor","configure","editorProps");return!e||"object"==typeof e&&!1!==e.addNewElementsFunctionality},M=(0,o.A)("cdtr-element-handle-bar",{onRemove:k,onClone:e=>{const n=e.detail,t=E.M.get("components",n?.dataset?.id);if(!t)throw new Error("component is not defined");const o=t.closest("section");let a=o.children.findIndex(e=>e===t.id);a="number"==typeof a&&a>=0?a+1:0,u.Ay.cloneComponent({componentId:t.id,parentId:o.id,index:a})},target:".block-component"}),W=(0,o.A)("paper-button",{style:{left:0,top:0,opacity:.7},className:b.componentName}),U=(0,o.A)("paper-button",{style:{left:0,top:0,zIndex:100,minWidth:"60px"},className:b.componentName}),N=(0,o.A)("paper-button",{style:{left:0,top:0,opacity:.7},className:`${b.componentCardName} ${b.componentName}`},E.M.get("lang","card")),S=(0,o.A)("paper-button",{style:{left:"10%",top:0,opacity:.7,transform:"translateY(-100%)",zIndex:3},className:`${b.componentName}`},E.M.get("lang","block")||"block"),z=(0,o.A)("cdtr-fab-button",{"data-name":"add-new-block-v1",onMouseUp:e=>{x.A.dispatch("open_add_menu",{type:"block-component",target:e.target.closest(".block-component")})},class:b.addIcon},(0,o.A)("cdtr-add-icon",{iconStyle:"fill:#fff;"})),O=(0,o.A)("paper-button",{onMouseUp:e=>x.A.dispatch("open_add_menu",{type:"section-component",target:e.target.closest(".section-component")}),class:b.addSection},(0,o.A)("cdtr-add-icon",{iconStyle:"fill:#fff;"}),(0,o.A)("lang-text",{text:"add_section"}));a.A.connect(a.q.KEY_DOWN,e=>{if("Delete"===e.key){const n=document.querySelector("[data-type='block'].selected");n&&(e.preventDefault(),k({detail:n}))}});const I=(0,o.A)("div",{className:b.breadcrumbs});a.A.connect(a.q.KEY_DOWN,e=>{if("Control"!==e.key||!document.activeElement||document.activeElement.closest("[contenteditable]"))return;B=!0;u.Ay.components.find(e=>e.isSelected)&&document.body.appendChild(I)}),a.A.connect(a.q.KEY_UP,e=>{B=!1});const Y=e=>{let{target:n,ctrlKey:t}=e;const o=!!t;if(E.M.set({ctrlKey:o}),n.closest("cdtr-move-handle-bar"))return;let a=n.closest("[class*='-component']");setTimeout(()=>{if(!a)return;const e=E.M.get("components",a.dataset?.id);if(a&&e)if(o&&u.Ay.components.length>0&&u.Ay.components[0].type===e.type)u.Ay.selectComponent(e);else switch(u.Ay.clean().selectComponent(e),a.appendChild(U),U.dataset.mounted=e.type,U.innerHTML=e.props.name||E.M.get("lang",e.type)||e.type.getElementType(),e.type){case"block":U.style.left="10%",U.style.transform="rotate(0deg) translate(-5%,-100%)";break;case"form":U.style.left="100%",U.style.transform="rotate(90deg) translate(10%, -7px)";break;case"card":U.style.transform="translate(-70%,120%) rotate(-90deg)",U.style.left="0",U.style.top="0";const e=E.M.get("components",U.dataset?.id);e&&(U.innerHTML=e.props.name||E.M.get("lang",e.type)||e.type.getElementType());break;default:U.style.transform="rotate(0deg) translate(-103%,-100%)",U.style.left="100%"}else{if(a=a?.closest(".text-component"),!a)return u.Ay.clean();u.Ay.clean().selectComponent(e)}if(u.Ay.components.filter(e=>"block"!==e.type&&"section"!==e.type).length>0)M.remove(),z.remove();else{const e=u.Ay.components.find(e=>"block"===e.type);e&&(y=e,w()&&(e.appendChild(M),e.appendChild(z)))}},130)},F=e=>{const n=e.target;if(!n)return;let t=n.closest("[class*='-component']");if(t){const e=t.closest(".card-component"),o=t.closest(".block-component"),a=E.M.get("components",t.dataset?.id);if(a){switch(W.innerHTML=a.props.name||E.M.get("lang",a.type)||a.type.getElementType(),t.appendChild(W),a.type){case"card":case"form":case"block":W.remove();break;case"form":W.style.left="100%",W.style.transform="rotate(90deg) translate(10%, -7px)";break;default:W.style.transform="translate(-103%,-100%)",W.style.left="100%"}e?e.appendChild(N):n.closest(".card-component")||N.remove(),o?o.appendChild(S):S.remove()}h.forEach(e=>e.classList.remove("selected-on-hover")),"form"===a?.type&&(t=n.closest(".card-component")??t),t?.classList?.add("selected-on-hover"),h=t?[t]:[];const r=n.closest("section.section-component"),s=Array.from(document.body.querySelectorAll(".section-component"));if(v.sectionCounter=s.length,r?w()&&(r.appendChild(O),r.appendChild(v)):v.remove(),y===r&&y&&y.contains(M))return;const A=u.Ay.components.filter(e=>"block"!==e.type&&"section"!==e.type);o&&0===A.length?(y=o,w()&&(o.appendChild(M),o.appendChild(z))):(M.remove(),o&&w()&&o.appendChild(z),y=null),o||z.remove()}else W.remove(),S.remove()};const q=setInterval(()=>{E.M.get("config","target")&&(clearInterval(q),function(){const e=E.M.get("config","target");e&&"true"!==e.dataset?.cdtrListenersAttached&&(e.dataset.cdtrListenersAttached="true",e.addEventListener(a.q.MOUSE_DOWN,Y))}(),a.A.connect(a.q.MOUSE_OVER,F))},50)},42793(e,n,t){t.d(n,{A:()=>A});var o=t(82001),a=t.n(o),r=t(40935),s=t.n(r)()(a());s.push([e.id,".MO1bHL0Mf6pjhEtylQC_ {\n outline: 1px solid var(--primary) !important;\n}\n.MO1bHL0Mf6pjhEtylQC_ {\n /* background: rgba(0, 0, 255, 0.041); */\n}\n.QRabUK5WcW0UEvk5Gl4A{\n left:0;\n top:0;\n opacity:.7;\n transform: translate(-70%,120%) rotate(-90deg)\n}\n.fFpcfOw2e_4jcwlu9RkW{\n position: absolute;\n padding:2px;\n background: var(--primary);\n width: -moz-fit-content;\n width: fit-content;\n text-align: center;\n border-radius: 0;\n z-index: 99;\n color: var(--primary-text);\n font-size: 11px;\n /* zindex 99 to be strong than the split cells, fix the zindex there before fix here */\n}\n\n.xx7ldRh0c8iUAfIGZgAA {\n position: absolute;\n top: 0;\n left: 0;\n font-size: 12px;\n width: 100%;\n height: 100%;\n z-index: 1;\n}\n.NaXFMGugy5ZAgwCl1CR2 {\n transform: translateY(-100%);\n}\n.xJCqQVfziE9Wepw5WRYw {\n outline: black 1px solid;\n}\n.o4KmgQFcCaF1bh4BEUrs {\n position: absolute;\n background: rgb(255, 255, 255);\n z-index: 3;\n width: auto;\n min-width: 100px;\n color: black;\n border-radius: 0.2rem;\n min-height: 27px;\n box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px,\n rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;\n}\n.XmM6cGXGiBaGwyP5KrLn {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99;\n}\n.bgoCbWHegQxp7l0GPJa1 {\n position: absolute;\n top: 100%;\n left: 0;\n transform: translate(50%, -50%);\n z-index: 99;\n background: var(--primary);\n padding: 8px;\n color: #fff;\n border-radius: 20px;\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n}\n.xUyjjx7MdpTSI8OJ7U8q {\n background: #fff;\n fill: var(--primary);\n position: absolute;\n top: 0;\n left: 0;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;\n padding: 3px;\n min-width: 10px;\n cursor: grab;\n}\n.xUyjjx7MdpTSI8OJ7U8q:active {\n cursor: grabbing !important;\n}\n","",{version:3,sources:["webpack://./src/core/EditorUI/handlers/handleComponents/style.module.css"],names:[],mappings:"AAAA;EACE,4CAA4C;AAE9C;AAHA;EAEE,wCAAwC;AAC1C;AACA;EACE,MAAM;EACN,KAAK;EACL,UAAU;EACV;AACF;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,0BAA0B;EAC1B,uBAAkB;EAAlB,kBAAkB;EAClB,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;EACX,0BAA0B;EAC1B,eAAe;EACf,sFAAsF;AACxF;;AAEA;EACE,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,eAAe;EACf,WAAW;EACX,YAAY;EACZ,UAAU;AACZ;AACA;EACE,4BAA4B;AAC9B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,kBAAkB;EAClB,8BAA8B;EAC9B,UAAU;EACV,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,qBAAqB;EACrB,gBAAgB;EAChB;0CACwC;AAC1C;AACA;EACE,kBAAkB;EAClB,SAAS;EACT,SAAS;EACT,gCAAgC;EAChC,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,+BAA+B;EAC/B,WAAW;EACX,0BAA0B;EAC1B,YAAY;EACZ,WAAW;EACX,mBAAmB;EACnB,2FAA2F;AAC7F;AACA;EACE,gBAAgB;EAChB,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,2CAA2C;EAC3C,YAAY;EACZ,eAAe;EACf,YAAY;AACd;AACA;EACE,2BAA2B;AAC7B",sourcesContent:[".onHover {\n outline: 1px solid var(--primary) !important;\n /* background: rgba(0, 0, 255, 0.041); */\n}\n.componentCardName{\n left:0;\n top:0;\n opacity:.7;\n transform: translate(-70%,120%) rotate(-90deg)\n}\n.componentName{\n position: absolute;\n padding:2px;\n background: var(--primary);\n width: fit-content;\n text-align: center;\n border-radius: 0;\n z-index: 99;\n color: var(--primary-text);\n font-size: 11px;\n /* zindex 99 to be strong than the split cells, fix the zindex there before fix here */\n}\n\n.tagContainer {\n position: absolute;\n top: 0;\n left: 0;\n font-size: 12px;\n width: 100%;\n height: 100%;\n z-index: 1;\n}\n.tagName {\n transform: translateY(-100%);\n}\n.pesudoSelected {\n outline: black 1px solid;\n}\n.breadcrumbs {\n position: absolute;\n background: rgb(255, 255, 255);\n z-index: 3;\n width: auto;\n min-width: 100px;\n color: black;\n border-radius: 0.2rem;\n min-height: 27px;\n box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px,\n rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;\n}\n.addIcon {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 99;\n}\n.addSection {\n position: absolute;\n top: 100%;\n left: 0;\n transform: translate(50%, -50%);\n z-index: 99;\n background: var(--primary);\n padding: 8px;\n color: #fff;\n border-radius: 20px;\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n}\n.colHandle {\n background: #fff;\n fill: var(--primary);\n position: absolute;\n top: 0;\n left: 0;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;\n padding: 3px;\n min-width: 10px;\n cursor: grab;\n}\n.colHandle:active {\n cursor: grabbing !important;\n}\n"],sourceRoot:""}]),s.locals={onHover:"MO1bHL0Mf6pjhEtylQC_",componentCardName:"QRabUK5WcW0UEvk5Gl4A",componentName:"fFpcfOw2e_4jcwlu9RkW",tagContainer:"xx7ldRh0c8iUAfIGZgAA",tagName:"NaXFMGugy5ZAgwCl1CR2",pesudoSelected:"xJCqQVfziE9Wepw5WRYw",breadcrumbs:"o4KmgQFcCaF1bh4BEUrs",addIcon:"XmM6cGXGiBaGwyP5KrLn",addSection:"bgoCbWHegQxp7l0GPJa1",colHandle:"xUyjjx7MdpTSI8OJ7U8q"};const A=s}}]);
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9193],{49193(e,n,t){var o=t(5441),a=t(20195),s=t(72591),r=t.n(s),c=t(88639),A=t.n(c),l=t(88128),i=t.n(l),p=t(30855),d=t.n(p),m=t(93051),C=t.n(m),f=t(42793),g={};g.setAttributes=d(),g.insert=i().bind(null,"head"),g.domAPI=A(),g.insertStyleElement=C();r()(f.A,g);const b=f.A&&f.A.locals?f.A.locals:void 0;var x=t(49937),E=t(86319),u=t(9507);let y,h=[],B=!1,k=null;const v=()=>{k&&(clearTimeout(k),k=null)},w=()=>{const e=E.M.get("config","target");e?.querySelectorAll("section.section-component").forEach(e=>e.classList.remove(b.sectionStackRaise))},M=()=>{w();const e=z.parentElement,n=e?.closest("section.section-component");n&&n.classList.add(b.sectionStackRaise)},W=e=>{const n=e.detail,t=E.M.get("components",n?.dataset?.id);if(!t)throw new Error("component is not defined");const o=t?.element?.nextElementSibling;if(o){const e=E.M.get("components",o.dataset.id);e&&u.Ay.clean().selectComponent(e)}else{const e=t.element.previousElementSibling;if(e){const n=E.M.get("components",e.dataset.id);n&&u.Ay.clean().selectComponent(n)}}u.Ay.store().removeComponent({componentId:t.id})},N=(0,o.A)("cdtr-background-handle-bar",{onClick:()=>{setTimeout(()=>{u.Ay.selectComponent(E.M.get("components").find(e=>e.type.equalWith("root")))},0)},target:".section-component",onRemove:W}),S=()=>{const e=E.M.get("config","editor","configure","editorProps");return!e||"object"==typeof e&&!1!==e.addNewElementsFunctionality},z=(0,o.A)("cdtr-element-handle-bar",{onRemove:W,onClone:e=>{const n=e.detail,t=E.M.get("components",n?.dataset?.id);if(!t)throw new Error("component is not defined");const o=t.closest("section");let a=o.children.findIndex(e=>e===t.id);a="number"==typeof a&&a>=0?a+1:0,u.Ay.cloneComponent({componentId:t.id,parentId:o.id,index:a})},target:".block-component"}),O=(0,o.A)("paper-button",{style:{left:0,top:0,opacity:.7},className:b.componentName}),U=(0,o.A)("paper-button",{style:{left:0,top:0,zIndex:100,minWidth:"60px"},className:b.componentName}),Y=(0,o.A)("paper-button",{style:{left:0,top:0,opacity:.7},className:`${b.componentCardName} ${b.componentName}`},E.M.get("lang","card")),_=(0,o.A)("paper-button",{style:{left:"10%",top:0,opacity:.7,transform:"translateY(-100%)",zIndex:3},className:`${b.componentName}`},E.M.get("lang","block")||"block"),L=(0,o.A)("cdtr-fab-button",{"data-name":"add-new-block-v1",onMouseUp:e=>{x.A.dispatch("open_add_menu",{type:"block-component",target:e.target.closest(".block-component")})},class:b.addIcon},(0,o.A)("cdtr-add-icon",{iconStyle:"fill:#fff;"})),I=(0,o.A)("paper-button",{onMouseUp:e=>x.A.dispatch("open_add_menu",{type:"section-component",target:e.target.closest(".section-component")}),class:b.addSection},(0,o.A)("cdtr-add-icon",{iconStyle:"fill:#fff;"}),(0,o.A)("lang-text",{text:"add_section"}));a.A.connect(a.q.KEY_DOWN,e=>{if("Delete"===e.key){const n=document.querySelector("[data-type='block'].selected");n&&(e.preventDefault(),W({detail:n}))}});const T=(0,o.A)("div",{className:b.breadcrumbs});a.A.connect(a.q.KEY_DOWN,e=>{if("Control"!==e.key||!document.activeElement||document.activeElement.closest("[contenteditable]"))return;B=!0;u.Ay.components.find(e=>e.isSelected)&&document.body.appendChild(T)}),a.A.connect(a.q.KEY_UP,e=>{B=!1});const R=e=>{let{target:n,ctrlKey:t}=e;const o=!!t;if(E.M.set({ctrlKey:o}),n.closest("cdtr-move-handle-bar"))return;let a=n.closest("[class*='-component']");setTimeout(()=>{if(!a)return;const e=E.M.get("components",a.dataset?.id);if(a&&e)if(o&&u.Ay.components.length>0&&u.Ay.components[0].type===e.type)u.Ay.selectComponent(e);else switch(u.Ay.clean().selectComponent(e),a.appendChild(U),U.dataset.mounted=e.type,U.innerHTML=e.props.name||E.M.get("lang",e.type)||e.type.getElementType(),e.type){case"block":U.style.left="10%",U.style.transform="rotate(0deg) translate(-5%,-100%)";break;case"form":U.style.left="100%",U.style.transform="rotate(90deg) translate(10%, -7px)";break;case"card":U.style.transform="translate(-70%,120%) rotate(-90deg)",U.style.left="0",U.style.top="0";const e=E.M.get("components",U.dataset?.id);e&&(U.innerHTML=e.props.name||E.M.get("lang",e.type)||e.type.getElementType());break;default:U.style.transform="rotate(0deg) translate(-103%,-100%)",U.style.left="100%"}else{if(a=a?.closest(".text-component"),!a)return u.Ay.clean();u.Ay.clean().selectComponent(e)}if(u.Ay.components.filter(e=>"block"!==e.type&&"section"!==e.type).length>0)z.remove(),L.remove();else{const e=u.Ay.components.find(e=>"block"===e.type);e&&(y=e,S()&&(e.appendChild(z),e.appendChild(L)))}},130)},j=e=>{const n=e.target;if(!n)return;const t=((e,n)=>{const t="function"==typeof e.composedPath?e.composedPath():[];return(t.length>0?t:[n]).filter(e=>e&&e.nodeType===Node.ELEMENT_NODE)})(e,n);let o=t.find(e=>"function"==typeof e.matches&&e.matches("[class*='-component']"))||n.closest("[class*='-component']");if(o){const e=o.closest(".card-component"),a=t.find(e=>e.classList?.contains("block-component"))||o.closest(".block-component"),s=E.M.get("components",o.dataset?.id);if(s){switch(O.innerHTML=s.props.name||E.M.get("lang",s.type)||s.type.getElementType(),o.appendChild(O),s.type){case"card":case"form":case"block":O.remove();break;case"form":O.style.left="100%",O.style.transform="rotate(90deg) translate(10%, -7px)";break;default:O.style.transform="translate(-103%,-100%)",O.style.left="100%"}e?e.appendChild(Y):n.closest(".card-component")||Y.remove(),a?a.appendChild(_):_.remove()}h.forEach(e=>e.classList.remove("selected-on-hover")),"form"===s?.type&&(o=n.closest(".card-component")??o),o?.classList?.add("selected-on-hover"),h=o?[o]:[];const r=t.find(e=>"SECTION"===e.tagName&&e.classList?.contains("section-component"))||n.closest("section.section-component"),c=Array.from(document.body.querySelectorAll(".section-component"));N.sectionCounter=c.length,r?S()&&(r.appendChild(I),r.appendChild(N)):N.remove();const A=u.Ay.components.filter(e=>"block"!==e.type&&"section"!==e.type),l=a&&0===A.length,i=Boolean(z.parentElement);l?(v(),y=a,S()&&(a.appendChild(z),a.appendChild(L))):i?k||(k=setTimeout(()=>{k=null,z.remove(),L.remove(),y=null,M()},220)):(v(),z.remove(),y=null,a&&S()?a.appendChild(L):L.remove()),M()}else O.remove(),_.remove(),v(),z.remove(),L.remove(),y=null,w()};const q=setInterval(()=>{E.M.get("config","target")&&(clearInterval(q),function(){const e=E.M.get("config","target");e&&"true"!==e.dataset?.cdtrListenersAttached&&(e.dataset.cdtrListenersAttached="true",e.addEventListener(a.q.MOUSE_DOWN,R))}(),a.A.connect(a.q.MOUSE_OVER,j))},50)},42793(e,n,t){t.d(n,{A:()=>c});var o=t(82001),a=t.n(o),s=t(40935),r=t.n(s)()(a());r.push([e.id,".MO1bHL0Mf6pjhEtylQC_ {\n outline: 1px solid var(--primary) !important;\n}\n.MO1bHL0Mf6pjhEtylQC_ {\n /* background: rgba(0, 0, 255, 0.041); */\n}\n.QRabUK5WcW0UEvk5Gl4A {\n left: 0;\n top: 0;\n opacity: 0.7;\n transform: translate(-70%, 120%) rotate(-90deg);\n}\n.fFpcfOw2e_4jcwlu9RkW {\n position: absolute;\n padding: 2px;\n background: var(--primary);\n width: -moz-fit-content;\n width: fit-content;\n text-align: center;\n border-radius: 0;\n z-index: 99;\n color: var(--primary-text);\n font-size: 11px;\n /* zindex 99 to be strong than the split cells, fix the zindex there before fix here */\n}\n\n.xx7ldRh0c8iUAfIGZgAA {\n position: absolute;\n top: 0;\n left: 0;\n font-size: 12px;\n width: 100%;\n height: 100%;\n z-index: 1;\n}\n.NaXFMGugy5ZAgwCl1CR2 {\n transform: translateY(-100%);\n}\n.xJCqQVfziE9Wepw5WRYw {\n outline: black 1px solid;\n}\n.o4KmgQFcCaF1bh4BEUrs {\n position: absolute;\n background: rgb(255, 255, 255);\n z-index: 3;\n width: auto;\n min-width: 100px;\n color: black;\n border-radius: 0.2rem;\n min-height: 27px;\n box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px,\n rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;\n}\n.XmM6cGXGiBaGwyP5KrLn {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, -100%);\n z-index: 99;\n}\n.bgoCbWHegQxp7l0GPJa1 {\n position: absolute;\n top: 100%;\n left: 0;\n transform: translate(50%, -100%);\n z-index: 99;\n background: var(--primary);\n padding: 8px;\n color: #fff;\n border-radius: 20px;\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,\n rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n}\n.xUyjjx7MdpTSI8OJ7U8q {\n background: #fff;\n fill: var(--primary);\n position: absolute;\n top: 0;\n left: 0;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;\n padding: 3px;\n min-width: 10px;\n cursor: grab;\n}\n.xUyjjx7MdpTSI8OJ7U8q:active {\n cursor: grabbing !important;\n}\n\n.AvwecMDAjy_y9aL_xXE_ {\n position: relative;\n z-index: 10;\n}\n","",{version:3,sources:["webpack://./src/core/EditorUI/handlers/handleComponents/style.module.css"],names:[],mappings:"AAAA;EACE,4CAA4C;AAE9C;AAHA;EAEE,wCAAwC;AAC1C;AACA;EACE,OAAO;EACP,MAAM;EACN,YAAY;EACZ,+CAA+C;AACjD;AACA;EACE,kBAAkB;EAClB,YAAY;EACZ,0BAA0B;EAC1B,uBAAkB;EAAlB,kBAAkB;EAClB,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;EACX,0BAA0B;EAC1B,eAAe;EACf,sFAAsF;AACxF;;AAEA;EACE,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,eAAe;EACf,WAAW;EACX,YAAY;EACZ,UAAU;AACZ;AACA;EACE,4BAA4B;AAC9B;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,kBAAkB;EAClB,8BAA8B;EAC9B,UAAU;EACV,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,qBAAqB;EACrB,gBAAgB;EAChB;0CACwC;AAC1C;AACA;EACE,kBAAkB;EAClB,SAAS;EACT,SAAS;EACT,iCAAiC;EACjC,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,gCAAgC;EAChC,WAAW;EACX,0BAA0B;EAC1B,YAAY;EACZ,WAAW;EACX,mBAAmB;EACnB;wCACsC;AACxC;AACA;EACE,gBAAgB;EAChB,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,2CAA2C;EAC3C,YAAY;EACZ,eAAe;EACf,YAAY;AACd;AACA;EACE,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,WAAW;AACb",sourcesContent:[".onHover {\n outline: 1px solid var(--primary) !important;\n /* background: rgba(0, 0, 255, 0.041); */\n}\n.componentCardName {\n left: 0;\n top: 0;\n opacity: 0.7;\n transform: translate(-70%, 120%) rotate(-90deg);\n}\n.componentName {\n position: absolute;\n padding: 2px;\n background: var(--primary);\n width: fit-content;\n text-align: center;\n border-radius: 0;\n z-index: 99;\n color: var(--primary-text);\n font-size: 11px;\n /* zindex 99 to be strong than the split cells, fix the zindex there before fix here */\n}\n\n.tagContainer {\n position: absolute;\n top: 0;\n left: 0;\n font-size: 12px;\n width: 100%;\n height: 100%;\n z-index: 1;\n}\n.tagName {\n transform: translateY(-100%);\n}\n.pesudoSelected {\n outline: black 1px solid;\n}\n.breadcrumbs {\n position: absolute;\n background: rgb(255, 255, 255);\n z-index: 3;\n width: auto;\n min-width: 100px;\n color: black;\n border-radius: 0.2rem;\n min-height: 27px;\n box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px,\n rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;\n}\n.addIcon {\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translate(-50%, -100%);\n z-index: 99;\n}\n.addSection {\n position: absolute;\n top: 100%;\n left: 0;\n transform: translate(50%, -100%);\n z-index: 99;\n background: var(--primary);\n padding: 8px;\n color: #fff;\n border-radius: 20px;\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,\n rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n}\n.colHandle {\n background: #fff;\n fill: var(--primary);\n position: absolute;\n top: 0;\n left: 0;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;\n padding: 3px;\n min-width: 10px;\n cursor: grab;\n}\n.colHandle:active {\n cursor: grabbing !important;\n}\n\n.sectionStackRaise {\n position: relative;\n z-index: 10;\n}\n"],sourceRoot:""}]),r.locals={onHover:"MO1bHL0Mf6pjhEtylQC_",componentCardName:"QRabUK5WcW0UEvk5Gl4A",componentName:"fFpcfOw2e_4jcwlu9RkW",tagContainer:"xx7ldRh0c8iUAfIGZgAA",tagName:"NaXFMGugy5ZAgwCl1CR2",pesudoSelected:"xJCqQVfziE9Wepw5WRYw",breadcrumbs:"o4KmgQFcCaF1bh4BEUrs",addIcon:"XmM6cGXGiBaGwyP5KrLn",addSection:"bgoCbWHegQxp7l0GPJa1",colHandle:"xUyjjx7MdpTSI8OJ7U8q",sectionStackRaise:"AvwecMDAjy_y9aL_xXE_"};const c=r}}]);
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[9990],{99990(e,t,i){i.r(t),i.d(t,{Draggable:()=>g});var s,n,o,r,l,u,h,a,c=i(59088),d=i(24586),p=i(36936),f=i(59929),m=i(49410),v=i(21421);let g=(s=(0,m.MZ)({type:Number,reflect:!0}),n=(0,m.MZ)({type:Number,reflect:!0}),o=(0,m.MZ)({type:Boolean,reflect:!0}),a=class extends f.WF{constructor(){super(),(0,c.A)(this,"left",l,this),(0,c.A)(this,"top",u,this),(0,c.A)(this,"isDraging",h,this),(0,d.A)(this,"cloneTarget",null),(0,d.A)(this,"initX",0),(0,d.A)(this,"initY",0),(0,d.A)(this,"firstX",0),(0,d.A)(this,"firstY",0),(0,d.A)(this,"startEvent",void 0),(0,d.A)(this,"mirrorRef",(0,v._)()),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.left=0,this.top=0,this.isDraging=!1,this.startEvent=new UIEvent("start",{view:window,bubbles:!0,cancelable:!0})}onMouseMove(e){if(1!==e.which)return;e.preventDefault();const t=this.cloneTarget;if(t){t.style.zIndex="-1",document.elementFromPoint(e.clientX,e.clientY),t.style.zIndex="9999999999";const i=this.initX+e.pageX-this.firstX,s=this.initY+e.pageY-this.firstY;t.style.left=i+"px",t.style.top=s+"px"}}onMouseUp(e){e.preventDefault(),this.isDraging=!1,this.cloneTarget&&this.cloneTarget.remove(),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1)}onMouseDown(e){e.preventDefault(),this.isDraging=!0,setTimeout(()=>{const t=this.mirrorRef.value;t&&(this.cloneTarget=t.cloneNode(!0),document.body.appendChild(this.cloneTarget),this.initX=t.offsetLeft,this.initY=t.offsetTop,this.firstX=e.pageX,this.firstY=e.pageY,document.addEventListener("mousemove",this.onMouseMove,!1),document.addEventListener("mouseup",this.onMouseUp,!1),this.dispatchEvent(this.startEvent))},100)}disconnectedCallback(){this.removeEventListener("mousedown",this.onMouseDown)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{this.addEventListener("mousedown",this.onMouseDown)},200)}render(){return f.qy`${this.isDraging?f.qy`<div class="mirror" ${(0,v.K)(this.mirrorRef)}>
|
|
2
|
+
<slot name="mirror"></slot>
|
|
3
|
+
</div>`:null} <slot></slot>`}},(0,d.A)(a,"styles",f.AH`
|
|
4
|
+
:host {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
-webkit-touch-callout: none;
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
-moz-user-select: none;
|
|
10
|
+
-ms-user-select: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
}
|
|
13
|
+
.mirror {
|
|
14
|
+
position: fixed;
|
|
15
|
+
}
|
|
16
|
+
`),r=a,l=(0,p.A)(r.prototype,"left",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u=(0,p.A)(r.prototype,"top",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),h=(0,p.A)(r.prototype,"isDraging",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),r);customElements.define("cdtr-draggale-mirror",g)}}]);
|
|
Binary file
|