ts-glitter 13.4.6 → 13.4.8
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/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-blog.js +466 -413
- package/lowcode/backend-manager/bg-blog.ts +1298 -1244
- package/lowcode/form-view/editor/array-items.js +1 -1
- package/lowcode/form-view/editor/array-items.ts +1 -1
- package/lowcode/form-view/editor/color-selector.ts +1 -1
- package/lowcode/glitterBundle/Glitter.js +9 -2
- package/lowcode/glitterBundle/Glitter.ts +9 -2
- package/lowcode/glitterBundle/plugins/editor-elem.js +726 -592
- package/lowcode/glitterBundle/plugins/editor-elem.ts +1533 -1277
- package/lowcode/jspage/editor.js +15 -9
- package/lowcode/jspage/editor.ts +16 -10
- package/lowcode/jspage/main.js +52 -24
- package/lowcode/jspage/main.ts +91 -50
- package/lowcode/official_view_component/official/component.js +5 -0
- package/lowcode/official_view_component/official/component.ts +5 -0
- package/lowcode/official_view_component/official/form.js +110 -78
- package/lowcode/official_view_component/official/form.ts +238 -192
- package/package.json +1 -1
- package/src/api-public/controllers/article.js +3 -0
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/article.ts +3 -0
|
@@ -29,16 +29,16 @@ export class EditorElem {
|
|
|
29
29
|
onchange="${obj.gvc.event((e) => {
|
|
30
30
|
obj.callback(e.value);
|
|
31
31
|
})}"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
/>
|
|
33
|
+
<div class="" style="width: 1px;height: 25px;background-color: white;"></div>
|
|
34
|
+
<i
|
|
35
35
|
class="fa-regular fa-eye text-black ms-2"
|
|
36
36
|
style="cursor: pointer;"
|
|
37
37
|
onclick="${obj.gvc.event(() => {
|
|
38
38
|
glitter.openDiaLog(new URL('../../dialog/image-preview.js', import.meta.url).href, 'preview', obj.def);
|
|
39
39
|
})}"
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
></i>
|
|
41
|
+
<i
|
|
42
42
|
class="fa-regular fa-upload ms-2 text-black"
|
|
43
43
|
style="cursor: pointer;"
|
|
44
44
|
onclick="${obj.gvc.event(() => {
|
|
@@ -77,7 +77,7 @@ export class EditorElem {
|
|
|
77
77
|
},
|
|
78
78
|
});
|
|
79
79
|
})}"
|
|
80
|
-
|
|
80
|
+
></i>`;
|
|
81
81
|
},
|
|
82
82
|
divCreate: {
|
|
83
83
|
class: `d-flex align-items-center mb-2`,
|
|
@@ -95,33 +95,35 @@ export class EditorElem {
|
|
|
95
95
|
bind: id,
|
|
96
96
|
view: () => {
|
|
97
97
|
if (obj.def && obj.def.length > 0) {
|
|
98
|
-
return html `
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
return html `
|
|
99
|
+
<div class="uimg-container">
|
|
100
|
+
<img class="uimg-image" src="${obj.def}"/>
|
|
101
|
+
<div
|
|
102
|
+
class="uimg-shadow"
|
|
103
|
+
onmouseover="${gvc.event((e) => {
|
|
103
104
|
e.style.opacity = '1';
|
|
104
105
|
})}"
|
|
105
|
-
|
|
106
|
+
onmouseout="${gvc.event((e) => {
|
|
106
107
|
e.style.opacity = '0';
|
|
107
108
|
})}"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
>
|
|
110
|
+
<i
|
|
111
|
+
class="fa-regular fa-trash mx-auto fs-1 uimg-trash"
|
|
112
|
+
onclick="${gvc.event(() => {
|
|
112
113
|
obj.def = '';
|
|
113
114
|
obj.callback(obj.def);
|
|
114
115
|
gvc.notifyDataChange(id);
|
|
115
116
|
})}"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
></i>
|
|
118
|
+
</div>
|
|
119
|
+
</div>`;
|
|
119
120
|
}
|
|
120
|
-
return html `
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
return html `
|
|
122
|
+
<div class="uimg-container">
|
|
123
|
+
<button
|
|
124
|
+
class="btn btn-gray"
|
|
125
|
+
type="button"
|
|
126
|
+
onclick="${gvc.event(() => {
|
|
125
127
|
glitter.ut.chooseMediaCallback({
|
|
126
128
|
single: true,
|
|
127
129
|
accept: 'json,image/*',
|
|
@@ -157,10 +159,10 @@ export class EditorElem {
|
|
|
157
159
|
},
|
|
158
160
|
});
|
|
159
161
|
})}"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
>
|
|
163
|
+
<span class="tx_700">新增圖片</span>
|
|
164
|
+
</button>
|
|
165
|
+
</div>`;
|
|
164
166
|
},
|
|
165
167
|
};
|
|
166
168
|
})}`;
|
|
@@ -212,44 +214,50 @@ export class EditorElem {
|
|
|
212
214
|
{
|
|
213
215
|
src: `https://raw.githack.com/SortableJS/Sortable/master/Sortable.js`,
|
|
214
216
|
},
|
|
215
|
-
], () => {
|
|
217
|
+
], () => {
|
|
218
|
+
}, () => {
|
|
219
|
+
});
|
|
216
220
|
const id = obj.gvc.glitter.getUUID();
|
|
217
221
|
const bid = obj.gvc.glitter.getUUID();
|
|
218
222
|
return {
|
|
219
223
|
bind: id,
|
|
220
224
|
view: () => {
|
|
221
225
|
if (data.length === 0) {
|
|
222
|
-
return html `
|
|
226
|
+
return html `
|
|
227
|
+
<div class="w-100 d-flex align-items-center justify-content-center fw-bold fs-6 alert m-0 bgf6">
|
|
228
|
+
尚未新增任何檔案...
|
|
229
|
+
</div>`;
|
|
223
230
|
}
|
|
224
231
|
return html `
|
|
225
232
|
<div class="" style="gap:10px; ">
|
|
226
233
|
<ul id="${bid}" class="d-flex " style="gap:10px;overflow-x: auto;">
|
|
227
234
|
${data
|
|
228
235
|
.map((dd, index) => {
|
|
229
|
-
return html `
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
return html `
|
|
237
|
+
<li
|
|
238
|
+
class="d-flex align-items-center justify-content-center rounded-3 shadow"
|
|
239
|
+
index="${index}"
|
|
240
|
+
style="min-width:135px;135px;height:135px;cursor:pointer;background: 50%/cover url('${dd}');"
|
|
241
|
+
>
|
|
242
|
+
<div
|
|
243
|
+
class="w-100 h-100 d-flex align-items-center justify-content-center rounded-3 p-hover-image"
|
|
244
|
+
style="opacity:0;background: rgba(0,0,0,0.5);gap:20px;color:white;font-size:22px;"
|
|
245
|
+
>
|
|
246
|
+
<i
|
|
247
|
+
class="fa-regular fa-eye"
|
|
248
|
+
onclick="${obj.gvc.event(() => {
|
|
241
249
|
window.parent.glitter.openDiaLog(new URL('../../dialog/image-preview.js', import.meta.url).href, 'preview', dd);
|
|
242
250
|
})}"
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
251
|
+
></i>
|
|
252
|
+
<i
|
|
253
|
+
class="fa-regular fa-trash"
|
|
254
|
+
onclick="${obj.gvc.event(() => {
|
|
247
255
|
data.splice(index, 1);
|
|
248
256
|
obj.gvc.notifyDataChange(id);
|
|
249
257
|
})}"
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
258
|
+
></i>
|
|
259
|
+
</div>
|
|
260
|
+
</li>`;
|
|
253
261
|
})
|
|
254
262
|
.join('')}
|
|
255
263
|
</ul>
|
|
@@ -285,7 +293,8 @@ export class EditorElem {
|
|
|
285
293
|
},
|
|
286
294
|
});
|
|
287
295
|
}
|
|
288
|
-
catch (e) {
|
|
296
|
+
catch (e) {
|
|
297
|
+
}
|
|
289
298
|
clearInterval(interval);
|
|
290
299
|
}
|
|
291
300
|
}, 100);
|
|
@@ -305,7 +314,9 @@ export class EditorElem {
|
|
|
305
314
|
{
|
|
306
315
|
src: `https://raw.githack.com/SortableJS/Sortable/master/Sortable.js`,
|
|
307
316
|
},
|
|
308
|
-
], () => {
|
|
317
|
+
], () => {
|
|
318
|
+
}, () => {
|
|
319
|
+
});
|
|
309
320
|
const id = obj.gvc.glitter.getUUID();
|
|
310
321
|
const bid = obj.gvc.glitter.getUUID();
|
|
311
322
|
let loading = true;
|
|
@@ -316,37 +327,42 @@ export class EditorElem {
|
|
|
316
327
|
return '';
|
|
317
328
|
}
|
|
318
329
|
if (data.length === 0) {
|
|
319
|
-
return html `
|
|
330
|
+
return html `
|
|
331
|
+
<div class="w-100 d-flex align-items-center justify-content-center fw-bold fs-6 alert m-0 bgf6">
|
|
332
|
+
尚未新增任何檔案...
|
|
333
|
+
</div>`;
|
|
320
334
|
}
|
|
321
335
|
return html `
|
|
322
336
|
<ul id="${bid}" class="d-flex" style="gap:10px;overflow-x: auto;max-width: 700px;">
|
|
323
337
|
${data
|
|
324
338
|
.map((dd, index) => {
|
|
325
|
-
return html `
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
339
|
+
return html `
|
|
340
|
+
<li
|
|
341
|
+
class="d-flex align-items-center justify-content-center rounded-3 shadow"
|
|
342
|
+
index="${index}"
|
|
343
|
+
style="min-width:135px;135px;height:135px;cursor:pointer;background: 50%/cover url('${dd}');"
|
|
344
|
+
>
|
|
345
|
+
<div
|
|
346
|
+
class="w-100 h-100 d-flex align-items-center justify-content-center rounded-3 p-hover-image position-relative"
|
|
347
|
+
style="opacity:0;background: rgba(0,0,0,0.5);gap:20px;color:white;font-size:22px;"
|
|
348
|
+
>
|
|
349
|
+
<i class="fa-solid fa-grip-dots dragItem position-absolute"
|
|
350
|
+
style="top:5px;left:5px;"></i>
|
|
351
|
+
<i
|
|
352
|
+
class="fa-regular fa-eye"
|
|
353
|
+
onclick="${obj.gvc.event(() => {
|
|
338
354
|
window.parent.glitter.openDiaLog(new URL('../../dialog/image-preview.js', import.meta.url).href, 'preview', dd);
|
|
339
355
|
})}"
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
356
|
+
></i>
|
|
357
|
+
<i
|
|
358
|
+
class="fa-regular fa-trash"
|
|
359
|
+
onclick="${obj.gvc.event(() => {
|
|
344
360
|
data.splice(index, 1);
|
|
345
361
|
obj.gvc.notifyDataChange(id);
|
|
346
362
|
})}"
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
363
|
+
></i>
|
|
364
|
+
</div>
|
|
365
|
+
</li>`;
|
|
350
366
|
})
|
|
351
367
|
.join('')}
|
|
352
368
|
</ul>
|
|
@@ -405,7 +421,8 @@ export class EditorElem {
|
|
|
405
421
|
},
|
|
406
422
|
});
|
|
407
423
|
}
|
|
408
|
-
catch (e) {
|
|
424
|
+
catch (e) {
|
|
425
|
+
}
|
|
409
426
|
clearInterval(interval);
|
|
410
427
|
}
|
|
411
428
|
}, 100);
|
|
@@ -490,11 +507,12 @@ export class EditorElem {
|
|
|
490
507
|
return {
|
|
491
508
|
bind: id,
|
|
492
509
|
view: () => {
|
|
493
|
-
return html `
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
510
|
+
return html `
|
|
511
|
+
<iframe
|
|
512
|
+
id="${frameID}"
|
|
513
|
+
class="w-100 h-100 border rounded-3"
|
|
514
|
+
src="${domain}/browser-amd-editor/component.html?height=${height}&link=${location.origin}&callbackID=${id}"
|
|
515
|
+
></iframe>`;
|
|
498
516
|
},
|
|
499
517
|
divCreate: { class: `w-100 `, style: `height:${height}px;` },
|
|
500
518
|
onDestroy: () => {
|
|
@@ -518,9 +536,9 @@ export class EditorElem {
|
|
|
518
536
|
<div class="d-flex">
|
|
519
537
|
${obj.title ? EditorElem.h3(obj.title) : ''}
|
|
520
538
|
<div
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
539
|
+
class="d-flex align-items-center justify-content-center"
|
|
540
|
+
style="height:36px;width:36px;border-radius:10px;cursor:pointer;color:#151515;"
|
|
541
|
+
onclick="${obj.gvc.event(() => {
|
|
524
542
|
EditorElem.openEditorDialog(obj.gvc, (gvc) => {
|
|
525
543
|
return getComponent(gvc, window.innerHeight - 100);
|
|
526
544
|
}, () => {
|
|
@@ -561,9 +579,9 @@ export class EditorElem {
|
|
|
561
579
|
view: () => {
|
|
562
580
|
return html `
|
|
563
581
|
<iframe
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
582
|
+
id="${frameID}"
|
|
583
|
+
class="w-100 h-100 border rounded-3"
|
|
584
|
+
src="${domain}/browser-amd-editor/component.html?height=${height}&link=${location.origin}&callbackID=${id}"
|
|
567
585
|
></iframe>
|
|
568
586
|
`;
|
|
569
587
|
},
|
|
@@ -589,9 +607,9 @@ export class EditorElem {
|
|
|
589
607
|
<div class="d-flex">
|
|
590
608
|
${obj.title ? EditorElem.h3(obj.title) : ''}
|
|
591
609
|
<div
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
610
|
+
class="d-flex align-items-center justify-content-center"
|
|
611
|
+
style="height:36px;width:36px;border-radius:10px;cursor:pointer;color:#151515;"
|
|
612
|
+
onclick="${obj.gvc.event(() => {
|
|
595
613
|
EditorElem.openEditorDialog(obj.gvc, (gvc) => {
|
|
596
614
|
return getComponent(gvc, window.innerHeight - 100);
|
|
597
615
|
}, () => {
|
|
@@ -667,9 +685,9 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
667
685
|
view: () => {
|
|
668
686
|
return html `
|
|
669
687
|
<iframe
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
688
|
+
id="${frameID}"
|
|
689
|
+
class="w-100 h-100 border rounded-3"
|
|
690
|
+
src="${domain}/browser-amd-editor/component.html?height=${height}&link=${location.origin}&callbackID=${id}"
|
|
673
691
|
></iframe>
|
|
674
692
|
`;
|
|
675
693
|
},
|
|
@@ -695,22 +713,23 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
695
713
|
return {
|
|
696
714
|
bind: codeID,
|
|
697
715
|
view: () => {
|
|
698
|
-
return (html `
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
716
|
+
return (html `
|
|
717
|
+
<div class="d-flex">
|
|
718
|
+
${obj.title ? EditorElem.h3(obj.title) : ''}
|
|
719
|
+
<div
|
|
720
|
+
class="d-flex align-items-center justify-content-center"
|
|
721
|
+
style="height:36px;width:36px;border-radius:10px;cursor:pointer;color:#151515;"
|
|
722
|
+
onclick="${obj.gvc.event(() => {
|
|
704
723
|
EditorElem.openEditorDialog(obj.gvc, (gvc) => {
|
|
705
724
|
return getComponent(gvc, window.innerHeight - 100);
|
|
706
725
|
}, () => {
|
|
707
726
|
obj.gvc.notifyDataChange(codeID);
|
|
708
727
|
});
|
|
709
728
|
})}"
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
729
|
+
>
|
|
730
|
+
<i class="fa-solid fa-expand"></i>
|
|
731
|
+
</div>
|
|
732
|
+
</div>` + getComponent(obj.gvc, obj.height));
|
|
714
733
|
},
|
|
715
734
|
};
|
|
716
735
|
});
|
|
@@ -728,9 +747,9 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
728
747
|
view: () => {
|
|
729
748
|
return html `
|
|
730
749
|
<iframe
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
750
|
+
id="${frameID}"
|
|
751
|
+
class="w-100 h-100 border rounded-3"
|
|
752
|
+
src="${domain}/browser-amd-editor/component.html?height=${height}&link=${location.origin}&callbackID=${id}"
|
|
734
753
|
></iframe>
|
|
735
754
|
`;
|
|
736
755
|
},
|
|
@@ -773,9 +792,9 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
773
792
|
<div class="d-flex">
|
|
774
793
|
${obj.title ? EditorElem.h3(obj.title) : ''}
|
|
775
794
|
<div
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
795
|
+
class="d-flex align-items-center justify-content-center"
|
|
796
|
+
style="height:36px;width:36px;border-radius:10px;cursor:pointer;color:#151515;"
|
|
797
|
+
onclick="${obj.gvc.event(() => {
|
|
779
798
|
EditorElem.openEditorDialog(obj.gvc, (gvc) => {
|
|
780
799
|
return getComponent(gvc, window.innerHeight - 100);
|
|
781
800
|
}, () => {
|
|
@@ -832,7 +851,9 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
832
851
|
`languages/zh_tw.js`,
|
|
833
852
|
].map((dd) => {
|
|
834
853
|
return { src: dd.includes('http') ? dd : new URL(`../../jslib/froala/` + dd, import.meta.url).href };
|
|
835
|
-
}), () => {
|
|
854
|
+
}), () => {
|
|
855
|
+
}, () => {
|
|
856
|
+
});
|
|
836
857
|
gvc.addStyleLink([
|
|
837
858
|
new URL(`../../jslib/froala/css/plugins/code_view.css`, import.meta.url).href,
|
|
838
859
|
'https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/codemirror.min.css',
|
|
@@ -841,7 +862,8 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
841
862
|
return {
|
|
842
863
|
bind: id,
|
|
843
864
|
view: () => {
|
|
844
|
-
return html `
|
|
865
|
+
return html `
|
|
866
|
+
<div class="w-100 d-flex align-items-center justify-content-center p-3 ${richID}-loading">
|
|
845
867
|
<div class="spinner-border" style=""></div>
|
|
846
868
|
</div>
|
|
847
869
|
<div id="${richID}">${obj.def}</div>`;
|
|
@@ -947,14 +969,15 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
947
969
|
}
|
|
948
970
|
setTimeout(() => {
|
|
949
971
|
const target = glitter.document.querySelector(`[data-cmd="insertImage"]`);
|
|
950
|
-
target.outerHTML = html `
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
972
|
+
target.outerHTML = html `
|
|
973
|
+
<button
|
|
974
|
+
id="insertImage-replace"
|
|
975
|
+
type="button"
|
|
976
|
+
tabindex="-1"
|
|
977
|
+
role="button"
|
|
978
|
+
class="fr-command fr-btn "
|
|
979
|
+
data-title="插入圖片 (⌘P)"
|
|
980
|
+
onclick="${obj.gvc.event(() => {
|
|
958
981
|
glitter.ut.chooseMediaCallback({
|
|
959
982
|
single: true,
|
|
960
983
|
accept: 'image/*',
|
|
@@ -988,14 +1011,15 @@ ${obj.structEnd ? obj.structEnd : '})()'}`,
|
|
|
988
1011
|
},
|
|
989
1012
|
});
|
|
990
1013
|
})}"
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1014
|
+
>
|
|
1015
|
+
<svg class="fr-svg" focusable="false" viewBox="0 0 24 24"
|
|
1016
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
1017
|
+
<path
|
|
1018
|
+
d="M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z"
|
|
1019
|
+
></path>
|
|
1020
|
+
</svg>
|
|
1021
|
+
<span class="fr-sr-only">插入圖片</span>
|
|
1022
|
+
</button>`;
|
|
999
1023
|
if (obj.readonly) {
|
|
1000
1024
|
editor.edit.off();
|
|
1001
1025
|
editor.toolbar.disable();
|
|
@@ -1017,8 +1041,9 @@ margin-bottom: 5px;
|
|
|
1017
1041
|
white-space: normal;" >${obj.title}</div>
|
|
1018
1042
|
<div class="w-100" style=" padding: 10px 12px;border-radius: 7px; overflow: hidden; border: 1px #DDDDDD solid; justify-content: flex-start; align-items: center; gap: 10px; display: inline-flex;cursor:pointer;" onclick="${obj.gvc.event(() => {
|
|
1019
1043
|
EditorElem.openEditorDialog(obj.gvc, () => {
|
|
1020
|
-
return html `
|
|
1021
|
-
|
|
1044
|
+
return html `
|
|
1045
|
+
<div class="p-3" style="overflow: hidden;">
|
|
1046
|
+
${EditorElem.richText({
|
|
1022
1047
|
gvc: obj.gvc,
|
|
1023
1048
|
def: obj.def,
|
|
1024
1049
|
callback: (text) => {
|
|
@@ -1026,8 +1051,9 @@ white-space: normal;" >${obj.title}</div>
|
|
|
1026
1051
|
obj.callback(text);
|
|
1027
1052
|
},
|
|
1028
1053
|
})}
|
|
1029
|
-
|
|
1030
|
-
}, () => {
|
|
1054
|
+
</div>`;
|
|
1055
|
+
}, () => {
|
|
1056
|
+
}, 800, obj.title);
|
|
1031
1057
|
})}">
|
|
1032
1058
|
${((_a = obj.def) !== null && _a !== void 0 ? _a : '').replace(/<[^>]*>/g, '') || '尚未輸入內容'}
|
|
1033
1059
|
</div>`;
|
|
@@ -1115,20 +1141,20 @@ ${obj.gvc.bindView(() => {
|
|
|
1115
1141
|
view: () => {
|
|
1116
1142
|
var _a;
|
|
1117
1143
|
return html `<input
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1144
|
+
class="flex-fill form-control "
|
|
1145
|
+
placeholder="請輸入檔案連結"
|
|
1146
|
+
value="${(_a = obj.def) !== null && _a !== void 0 ? _a : ''}"
|
|
1147
|
+
onchange="${obj.gvc.event((e) => {
|
|
1122
1148
|
obj.callback(e.value);
|
|
1123
1149
|
})}"
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1150
|
+
${obj.readonly ? `readonly` : ``}
|
|
1151
|
+
/>
|
|
1152
|
+
<div class="" style="width: 1px;height: 25px;background-color: white;"></div>
|
|
1153
|
+
${!obj.readonly
|
|
1128
1154
|
? html `<i
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1155
|
+
class="fa-regular fa-upload ms-2 fs-5"
|
|
1156
|
+
style="cursor: pointer;color:black;"
|
|
1157
|
+
onclick="${obj.gvc.event(() => {
|
|
1132
1158
|
glitter.ut.chooseMediaCallback({
|
|
1133
1159
|
single: true,
|
|
1134
1160
|
accept: '*',
|
|
@@ -1164,7 +1190,7 @@ ${obj.gvc.bindView(() => {
|
|
|
1164
1190
|
},
|
|
1165
1191
|
});
|
|
1166
1192
|
})}"
|
|
1167
|
-
|
|
1193
|
+
></i>`
|
|
1168
1194
|
: ``} `;
|
|
1169
1195
|
},
|
|
1170
1196
|
divCreate: {
|
|
@@ -1217,17 +1243,17 @@ ${obj.gvc.bindView(() => {
|
|
|
1217
1243
|
const glitter = window.glitter;
|
|
1218
1244
|
const $ = glitter.$;
|
|
1219
1245
|
return html `<h3 style="color: white;font-size: 16px;margin-bottom: 10px;" class="mt-2">${obj.title}</h3>
|
|
1220
|
-
|
|
1221
|
-
|
|
1246
|
+
<div class="d-flex align-items-center mb-3">
|
|
1247
|
+
<input
|
|
1222
1248
|
class="flex-fill form-control "
|
|
1223
1249
|
placeholder="請輸入圖片連結"
|
|
1224
1250
|
value="${obj.def}"
|
|
1225
1251
|
onchange="${obj.gvc.event((e) => {
|
|
1226
1252
|
obj.callback(e.value);
|
|
1227
1253
|
})}"
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1254
|
+
/>
|
|
1255
|
+
<div class="" style="width: 1px;height: 25px;background-color: white;"></div>
|
|
1256
|
+
<i
|
|
1231
1257
|
class="fa-regular fa-upload text-white ms-2"
|
|
1232
1258
|
style="cursor: pointer;"
|
|
1233
1259
|
onclick="${obj.gvc.event(() => {
|
|
@@ -1264,28 +1290,30 @@ ${obj.gvc.bindView(() => {
|
|
|
1264
1290
|
},
|
|
1265
1291
|
});
|
|
1266
1292
|
})}"
|
|
1267
|
-
|
|
1268
|
-
|
|
1293
|
+
></i>
|
|
1294
|
+
</div>`;
|
|
1269
1295
|
}
|
|
1270
1296
|
static uploadLottie(obj) {
|
|
1271
1297
|
const glitter = window.glitter;
|
|
1272
1298
|
const $ = glitter.$;
|
|
1273
1299
|
return html `<h3 style="color: white;font-size: 16px;margin-bottom: 10px;" class="mt-2">${obj.title}</h3>
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1300
|
+
<div class="alert alert-dark alert-dismissible fade show" role="alert"
|
|
1301
|
+
style="white-space: normal;word-break: break-word;">
|
|
1302
|
+
<a onclick="${obj.gvc.event(() => glitter.openNewTab(`https://lottiefiles.com/`))}" class="fw text-white"
|
|
1303
|
+
style="cursor: pointer;">Lottie</a>
|
|
1304
|
+
是開放且免費的動畫平台,可以前往下載動畫檔後進行上傳.
|
|
1305
|
+
</div>
|
|
1306
|
+
<div class="d-flex align-items-center mb-3">
|
|
1307
|
+
<input
|
|
1280
1308
|
class="flex-fill form-control "
|
|
1281
1309
|
placeholder="請輸入圖片連結"
|
|
1282
1310
|
value="${obj.def}"
|
|
1283
1311
|
onchange="${obj.gvc.event((e) => {
|
|
1284
1312
|
obj.callback(e.value);
|
|
1285
1313
|
})}"
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1314
|
+
/>
|
|
1315
|
+
<div class="" style="width: 1px;height: 25px;background-color: white;"></div>
|
|
1316
|
+
<i
|
|
1289
1317
|
class="fa-regular fa-upload text-white ms-2"
|
|
1290
1318
|
style="cursor: pointer;"
|
|
1291
1319
|
onclick="${obj.gvc.event(() => {
|
|
@@ -1322,15 +1350,17 @@ ${obj.gvc.bindView(() => {
|
|
|
1322
1350
|
},
|
|
1323
1351
|
});
|
|
1324
1352
|
})}"
|
|
1325
|
-
|
|
1326
|
-
|
|
1353
|
+
></i>
|
|
1354
|
+
</div>`;
|
|
1327
1355
|
}
|
|
1328
1356
|
static h3(title) {
|
|
1329
1357
|
return html `<h3 style="color: #393939;font-size: 15px;margin-bottom: 5px;" class="fw-500 mt-2">${title}</h3>`;
|
|
1330
1358
|
}
|
|
1331
1359
|
static plusBtn(title, event) {
|
|
1332
|
-
return html `
|
|
1333
|
-
<div class="
|
|
1360
|
+
return html `
|
|
1361
|
+
<div class="w-100 my-3" style="background: black;height: 1px;"></div>
|
|
1362
|
+
<div class="fw-500 text-dark align-items-center justify-content-center d-flex p-1 rounded mt-1 hoverBtn"
|
|
1363
|
+
style="border: 1px solid #151515;color:#151515;" onclick="${event}">
|
|
1334
1364
|
${title}
|
|
1335
1365
|
</div>`;
|
|
1336
1366
|
}
|
|
@@ -1338,10 +1368,13 @@ ${obj.gvc.bindView(() => {
|
|
|
1338
1368
|
const glitter = window.glitter;
|
|
1339
1369
|
return (html `
|
|
1340
1370
|
${EditorElem.h3(obj.title)}
|
|
1341
|
-
<div class="alert alert-info fade show p-2" role="alert"
|
|
1342
|
-
|
|
1371
|
+
<div class="alert alert-info fade show p-2" role="alert"
|
|
1372
|
+
style="white-space: normal;word-break: break-all;">
|
|
1373
|
+
<a onclick="${obj.gvc.event(() => glitter.openNewTab('https://fontawesome.com/search'))}"
|
|
1374
|
+
class="fw fw-bold" style="cursor: pointer;">fontawesome</a>
|
|
1343
1375
|
與
|
|
1344
|
-
<a onclick="${obj.gvc.event(() => glitter.openNewTab('https://boxicons.com/'))}" class="fw fw-bold"
|
|
1376
|
+
<a onclick="${obj.gvc.event(() => glitter.openNewTab('https://boxicons.com/'))}" class="fw fw-bold"
|
|
1377
|
+
style="cursor: pointer;">box-icon</a>
|
|
1345
1378
|
是開放且免費的icon提供平台,可以前往挑選合適標籤進行設定.
|
|
1346
1379
|
</div>
|
|
1347
1380
|
` +
|
|
@@ -1365,54 +1398,62 @@ ${obj.gvc.bindView(() => {
|
|
|
1365
1398
|
bind: id,
|
|
1366
1399
|
view: () => {
|
|
1367
1400
|
if (obj.data.expand) {
|
|
1368
|
-
return html `
|
|
1369
|
-
class="toggleInner mb-2 p-2"
|
|
1370
|
-
style="width:calc(100%);border-radius:8px;
|
|
1371
|
-
min-height:45px;background:#d9f1ff;border: 1px solid #151515;color:#151515;"
|
|
1372
|
-
>
|
|
1401
|
+
return html `
|
|
1373
1402
|
<div
|
|
1374
|
-
|
|
1375
|
-
|
|
1403
|
+
class="toggleInner mb-2 p-2"
|
|
1404
|
+
style="width:calc(100%);border-radius:8px;
|
|
1405
|
+
min-height:45px;background:#d9f1ff;border: 1px solid #151515;color:#151515;"
|
|
1406
|
+
>
|
|
1407
|
+
<div
|
|
1408
|
+
class="d-flex p-0 align-items-center mb-2 w-100"
|
|
1409
|
+
onclick="${obj.gvc.event(() => {
|
|
1376
1410
|
obj.data.expand = !obj.data.expand;
|
|
1377
1411
|
obj.gvc.notifyDataChange(id);
|
|
1378
1412
|
})}"
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1413
|
+
style="cursor: pointer;"
|
|
1414
|
+
>
|
|
1415
|
+
<h3 style="font-size: 16px;color: black;width: calc(100% - 60px);" class="m-0 p-0">
|
|
1416
|
+
${obj.title}</h3>
|
|
1417
|
+
<div class="flex-fill"></div>
|
|
1418
|
+
<div class="text-dark fw-bold" style="cursor: pointer;">收合<i
|
|
1419
|
+
class="fa-solid fa-up ms-2 text-dark"></i></div>
|
|
1420
|
+
</div>
|
|
1421
|
+
${typeof obj.innerText === 'string' ? obj.innerText : obj.innerText()}
|
|
1422
|
+
</div>`;
|
|
1387
1423
|
}
|
|
1388
|
-
return html `
|
|
1389
|
-
class="toggleInner mb-2 p-2"
|
|
1390
|
-
style="width:calc(100%);border-radius:8px;
|
|
1391
|
-
min-height:45px;background:#d9f1ff;border: 1px solid #151515;color:#151515;"
|
|
1392
|
-
>
|
|
1424
|
+
return html `
|
|
1393
1425
|
<div
|
|
1394
|
-
|
|
1395
|
-
|
|
1426
|
+
class="toggleInner mb-2 p-2"
|
|
1427
|
+
style="width:calc(100%);border-radius:8px;
|
|
1428
|
+
min-height:45px;background:#d9f1ff;border: 1px solid #151515;color:#151515;"
|
|
1429
|
+
>
|
|
1430
|
+
<div
|
|
1431
|
+
class="w-100 d-flex p-0 align-items-center"
|
|
1432
|
+
onclick="${obj.gvc.event(() => {
|
|
1396
1433
|
obj.data.expand = !obj.data.expand;
|
|
1397
1434
|
obj.gvc.notifyDataChange(id);
|
|
1398
1435
|
})}"
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1436
|
+
style="cursor: pointer;"
|
|
1437
|
+
>
|
|
1438
|
+
<h3 style="font-size: 16px;color: black;width: calc(100% - 60px);" class="m-0 p-0">
|
|
1439
|
+
${obj.title}</h3>
|
|
1440
|
+
<div class="flex-fill"></div>
|
|
1441
|
+
<span class="text-dark fw-bold" style="cursor: pointer;">展開<i
|
|
1442
|
+
class="fa-solid fa-down ms-2 text-dark"></i></span>
|
|
1443
|
+
</div>
|
|
1444
|
+
</div>`;
|
|
1406
1445
|
},
|
|
1407
1446
|
divCreate: {},
|
|
1408
1447
|
};
|
|
1409
1448
|
})}`;
|
|
1410
1449
|
}
|
|
1411
1450
|
static minusTitle(title, event) {
|
|
1412
|
-
return html `
|
|
1413
|
-
<
|
|
1414
|
-
|
|
1415
|
-
|
|
1451
|
+
return html `
|
|
1452
|
+
<div class="d-flex align-items-center">
|
|
1453
|
+
<i class="fa-regular fa-circle-minus text-danger me-2" style="font-size: 20px;cursor: pointer;"
|
|
1454
|
+
onclick="${event}"></i>
|
|
1455
|
+
<h3 style="color: black;font-size: 16px;" class="m-0">${title}</h3>
|
|
1456
|
+
</div>`;
|
|
1416
1457
|
}
|
|
1417
1458
|
static searchInput(obj) {
|
|
1418
1459
|
obj.def = obj.def || '';
|
|
@@ -1432,22 +1473,23 @@ ${obj.gvc.bindView(() => {
|
|
|
1432
1473
|
bind: id2,
|
|
1433
1474
|
view: () => {
|
|
1434
1475
|
return html `<input
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1476
|
+
class="form-control w-100"
|
|
1477
|
+
style="height: 40px;"
|
|
1478
|
+
placeholder="${obj.placeHolder}"
|
|
1479
|
+
onfocus="${obj.gvc.event(() => {
|
|
1439
1480
|
gvc.getBindViewElem(id).addClass(`show`);
|
|
1440
1481
|
})}"
|
|
1441
|
-
|
|
1442
|
-
|
|
1482
|
+
onblur="${gvc.event(() => {
|
|
1483
|
+
})}"
|
|
1484
|
+
oninput="${gvc.event((e) => {
|
|
1443
1485
|
obj.def = e.value;
|
|
1444
1486
|
gvc.notifyDataChange(id);
|
|
1445
1487
|
setTimeout(() => {
|
|
1446
1488
|
gvc.getBindViewElem(id).addClass(`show`);
|
|
1447
1489
|
}, 100);
|
|
1448
1490
|
})}"
|
|
1449
|
-
|
|
1450
|
-
|
|
1491
|
+
value="${obj.def.replace(/"/g, "'")}"
|
|
1492
|
+
onchange="${gvc.event((e) => {
|
|
1451
1493
|
changeInterval = setTimeout(() => {
|
|
1452
1494
|
obj.def = e.value;
|
|
1453
1495
|
obj.callback(obj.def);
|
|
@@ -1470,9 +1512,10 @@ ${obj.gvc.bindView(() => {
|
|
|
1470
1512
|
return d2.toUpperCase().indexOf(obj.def.toUpperCase()) !== -1;
|
|
1471
1513
|
})
|
|
1472
1514
|
.map((d3) => {
|
|
1473
|
-
return html `
|
|
1474
|
-
|
|
1475
|
-
|
|
1515
|
+
return html `
|
|
1516
|
+
<button
|
|
1517
|
+
class="dropdown-item"
|
|
1518
|
+
onclick="${gvc.event(() => {
|
|
1476
1519
|
clearInterval(changeInterval);
|
|
1477
1520
|
obj.def = d3;
|
|
1478
1521
|
gvc.notifyDataChange(id2);
|
|
@@ -1481,9 +1524,9 @@ ${obj.gvc.bindView(() => {
|
|
|
1481
1524
|
gvc.getBindViewElem(id).removeClass(`show`);
|
|
1482
1525
|
}, 100);
|
|
1483
1526
|
})}"
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1527
|
+
>
|
|
1528
|
+
${d3}
|
|
1529
|
+
</button>`;
|
|
1487
1530
|
})
|
|
1488
1531
|
.join('');
|
|
1489
1532
|
},
|
|
@@ -1523,7 +1566,8 @@ ${obj.gvc.bindView(() => {
|
|
|
1523
1566
|
gvc.getBindViewElem(id).addClass(`show`);
|
|
1524
1567
|
}, 100);
|
|
1525
1568
|
}
|
|
1526
|
-
catch (e) {
|
|
1569
|
+
catch (e) {
|
|
1570
|
+
}
|
|
1527
1571
|
});
|
|
1528
1572
|
}
|
|
1529
1573
|
return html `
|
|
@@ -1531,40 +1575,43 @@ ${obj.gvc.bindView(() => {
|
|
|
1531
1575
|
return {
|
|
1532
1576
|
bind: id2,
|
|
1533
1577
|
view: () => {
|
|
1534
|
-
return html `
|
|
1535
|
-
|
|
1578
|
+
return html `
|
|
1579
|
+
<div class=""
|
|
1580
|
+
style="position: absolute;transform: translateY(-50%);top:50%;left:20px;">
|
|
1581
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"
|
|
1582
|
+
viewBox="0 0 20 20" fill="none">
|
|
1536
1583
|
<g clip-path="url(#clip0_12704_238948)">
|
|
1537
1584
|
<path
|
|
1538
|
-
|
|
1539
|
-
|
|
1585
|
+
d="M14.375 8.125C14.375 6.4674 13.7165 4.87769 12.5444 3.70558C11.3723 2.53348 9.7826 1.875 8.125 1.875C6.4674 1.875 4.87769 2.53348 3.70558 3.70558C2.53348 4.87769 1.875 6.4674 1.875 8.125C1.875 9.7826 2.53348 11.3723 3.70558 12.5444C4.87769 13.7165 6.4674 14.375 8.125 14.375C9.7826 14.375 11.3723 13.7165 12.5444 12.5444C13.7165 11.3723 14.375 9.7826 14.375 8.125ZM13.168 14.4961C11.7852 15.5938 10.0312 16.25 8.125 16.25C3.63672 16.25 0 12.6133 0 8.125C0 3.63672 3.63672 0 8.125 0C12.6133 0 16.25 3.63672 16.25 8.125C16.25 10.0312 15.5938 11.7852 14.4961 13.168L19.7266 18.3984C20.0938 18.7656 20.0938 19.3594 19.7266 19.7227C19.3594 20.0859 18.7656 20.0898 18.4023 19.7227L13.168 14.4961Z"
|
|
1586
|
+
fill="#8D8D8D"
|
|
1540
1587
|
/>
|
|
1541
1588
|
</g>
|
|
1542
1589
|
<defs>
|
|
1543
1590
|
<clipPath id="clip0_12704_238948">
|
|
1544
|
-
<rect width="20" height="20" fill="white"
|
|
1591
|
+
<rect width="20" height="20" fill="white"/>
|
|
1545
1592
|
</clipPath>
|
|
1546
1593
|
</defs>
|
|
1547
1594
|
</svg>
|
|
1548
1595
|
</div>
|
|
1549
1596
|
<input
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1597
|
+
class="form-control w-100"
|
|
1598
|
+
style="height: 44px;max-height:100%;padding-left:50px;"
|
|
1599
|
+
placeholder="${obj.placeHolder}"
|
|
1600
|
+
onfocus="${obj.gvc.event(() => {
|
|
1554
1601
|
gvc.getBindViewElem(id).addClass(`show`);
|
|
1555
1602
|
refreshData();
|
|
1556
1603
|
})}"
|
|
1557
|
-
|
|
1604
|
+
onblur="${gvc.event(() => {
|
|
1558
1605
|
setTimeout(() => {
|
|
1559
1606
|
gvc.getBindViewElem(id).removeClass(`show`);
|
|
1560
1607
|
}, 300);
|
|
1561
1608
|
})}"
|
|
1562
|
-
|
|
1609
|
+
oninput="${gvc.event((e) => {
|
|
1563
1610
|
obj.def = e.value;
|
|
1564
1611
|
refreshData();
|
|
1565
1612
|
})}"
|
|
1566
|
-
|
|
1567
|
-
|
|
1613
|
+
value="${obj.def}"
|
|
1614
|
+
onchange="${gvc.event((e) => {
|
|
1568
1615
|
obj.def = e.value;
|
|
1569
1616
|
setTimeout(() => {
|
|
1570
1617
|
obj.callback(obj.def);
|
|
@@ -1584,16 +1631,17 @@ ${obj.gvc.bindView(() => {
|
|
|
1584
1631
|
return d2.toUpperCase().indexOf(obj.def.toUpperCase()) !== -1;
|
|
1585
1632
|
})
|
|
1586
1633
|
.map((d3) => {
|
|
1587
|
-
return html `
|
|
1588
|
-
|
|
1589
|
-
|
|
1634
|
+
return html `
|
|
1635
|
+
<button
|
|
1636
|
+
class="dropdown-item"
|
|
1637
|
+
onclick="${gvc.event(() => {
|
|
1590
1638
|
obj.def = d3;
|
|
1591
1639
|
gvc.notifyDataChange(id2);
|
|
1592
1640
|
obj.callback(obj.def);
|
|
1593
1641
|
})}"
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1642
|
+
>
|
|
1643
|
+
${d3}
|
|
1644
|
+
</button>`;
|
|
1597
1645
|
})
|
|
1598
1646
|
.join('');
|
|
1599
1647
|
},
|
|
@@ -1629,7 +1677,8 @@ ${obj.gvc.bindView(() => {
|
|
|
1629
1677
|
gvc.getBindViewElem(id).addClass(`show`);
|
|
1630
1678
|
}, 100);
|
|
1631
1679
|
}
|
|
1632
|
-
catch (e) {
|
|
1680
|
+
catch (e) {
|
|
1681
|
+
}
|
|
1633
1682
|
});
|
|
1634
1683
|
}
|
|
1635
1684
|
return html `
|
|
@@ -1637,40 +1686,43 @@ ${obj.gvc.bindView(() => {
|
|
|
1637
1686
|
return {
|
|
1638
1687
|
bind: id2,
|
|
1639
1688
|
view: () => {
|
|
1640
|
-
return html `
|
|
1641
|
-
|
|
1689
|
+
return html `
|
|
1690
|
+
<div class=""
|
|
1691
|
+
style="position: absolute;transform: translateY(-50%);top:50%;left:20px;">
|
|
1692
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"
|
|
1693
|
+
viewBox="0 0 20 20" fill="none">
|
|
1642
1694
|
<g clip-path="url(#clip0_12704_238948)">
|
|
1643
1695
|
<path
|
|
1644
|
-
|
|
1645
|
-
|
|
1696
|
+
d="M14.375 8.125C14.375 6.4674 13.7165 4.87769 12.5444 3.70558C11.3723 2.53348 9.7826 1.875 8.125 1.875C6.4674 1.875 4.87769 2.53348 3.70558 3.70558C2.53348 4.87769 1.875 6.4674 1.875 8.125C1.875 9.7826 2.53348 11.3723 3.70558 12.5444C4.87769 13.7165 6.4674 14.375 8.125 14.375C9.7826 14.375 11.3723 13.7165 12.5444 12.5444C13.7165 11.3723 14.375 9.7826 14.375 8.125ZM13.168 14.4961C11.7852 15.5938 10.0312 16.25 8.125 16.25C3.63672 16.25 0 12.6133 0 8.125C0 3.63672 3.63672 0 8.125 0C12.6133 0 16.25 3.63672 16.25 8.125C16.25 10.0312 15.5938 11.7852 14.4961 13.168L19.7266 18.3984C20.0938 18.7656 20.0938 19.3594 19.7266 19.7227C19.3594 20.0859 18.7656 20.0898 18.4023 19.7227L13.168 14.4961Z"
|
|
1697
|
+
fill="#8D8D8D"
|
|
1646
1698
|
/>
|
|
1647
1699
|
</g>
|
|
1648
1700
|
<defs>
|
|
1649
1701
|
<clipPath id="clip0_12704_238948">
|
|
1650
|
-
<rect width="20" height="20" fill="white"
|
|
1702
|
+
<rect width="20" height="20" fill="white"/>
|
|
1651
1703
|
</clipPath>
|
|
1652
1704
|
</defs>
|
|
1653
1705
|
</svg>
|
|
1654
1706
|
</div>
|
|
1655
1707
|
<input
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1708
|
+
class="form-control w-100"
|
|
1709
|
+
style="height: 44px;max-height:100%;padding-left:50px;"
|
|
1710
|
+
placeholder="${obj.placeHolder}"
|
|
1711
|
+
onfocus="${obj.gvc.event(() => {
|
|
1660
1712
|
gvc.getBindViewElem(id).addClass(`show`);
|
|
1661
1713
|
refreshData();
|
|
1662
1714
|
})}"
|
|
1663
|
-
|
|
1715
|
+
onblur="${gvc.event(() => {
|
|
1664
1716
|
setTimeout(() => {
|
|
1665
1717
|
gvc.getBindViewElem(id).removeClass(`show`);
|
|
1666
1718
|
}, 300);
|
|
1667
1719
|
})}"
|
|
1668
|
-
|
|
1720
|
+
oninput="${gvc.event((e) => {
|
|
1669
1721
|
obj.def = e.value;
|
|
1670
1722
|
refreshData();
|
|
1671
1723
|
})}"
|
|
1672
|
-
|
|
1673
|
-
|
|
1724
|
+
value="${obj.def}"
|
|
1725
|
+
onchange="${gvc.event((e) => {
|
|
1674
1726
|
obj.def = e.value;
|
|
1675
1727
|
setTimeout(() => {
|
|
1676
1728
|
obj.callback(obj.def);
|
|
@@ -1690,16 +1742,17 @@ ${obj.gvc.bindView(() => {
|
|
|
1690
1742
|
return d2.toUpperCase().indexOf(obj.def.toUpperCase()) !== -1;
|
|
1691
1743
|
})
|
|
1692
1744
|
.map((d3) => {
|
|
1693
|
-
return html `
|
|
1694
|
-
|
|
1695
|
-
|
|
1745
|
+
return html `
|
|
1746
|
+
<button
|
|
1747
|
+
class="dropdown-item"
|
|
1748
|
+
onclick="${gvc.event(() => {
|
|
1696
1749
|
obj.def = d3;
|
|
1697
1750
|
gvc.notifyDataChange(id2);
|
|
1698
1751
|
obj.callback(obj.def);
|
|
1699
1752
|
})}"
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1753
|
+
>
|
|
1754
|
+
${d3}
|
|
1755
|
+
</button>`;
|
|
1703
1756
|
})
|
|
1704
1757
|
.join('');
|
|
1705
1758
|
},
|
|
@@ -1718,8 +1771,8 @@ ${obj.gvc.bindView(() => {
|
|
|
1718
1771
|
var _a, _b, _c, _d;
|
|
1719
1772
|
obj.title = (_a = obj.title) !== null && _a !== void 0 ? _a : '';
|
|
1720
1773
|
return html `${obj.title ? EditorElem.h3(obj.title) : ``}
|
|
1721
|
-
|
|
1722
|
-
|
|
1774
|
+
<div class="d-flex align-items-center">
|
|
1775
|
+
<input
|
|
1723
1776
|
class="form-control"
|
|
1724
1777
|
style="${(_b = obj.style) !== null && _b !== void 0 ? _b : ''}"
|
|
1725
1778
|
type="${(_c = obj.type) !== null && _c !== void 0 ? _c : 'text'}"
|
|
@@ -1739,9 +1792,10 @@ ${obj.gvc.bindView(() => {
|
|
|
1739
1792
|
})}"
|
|
1740
1793
|
value="${(_d = obj.default) !== null && _d !== void 0 ? _d : ''}"
|
|
1741
1794
|
${obj.readonly ? `readonly` : ``}
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1795
|
+
/>
|
|
1796
|
+
${obj.unit ? html `
|
|
1797
|
+
<div class="p-2">${obj.unit}</div>` : ''}
|
|
1798
|
+
</div> `;
|
|
1745
1799
|
}
|
|
1746
1800
|
static container(array) {
|
|
1747
1801
|
return array.join(`<div class="my-2"></div>`);
|
|
@@ -1750,8 +1804,8 @@ ${obj.gvc.bindView(() => {
|
|
|
1750
1804
|
const viewId = obj.gvc.glitter.getUUID();
|
|
1751
1805
|
const def = () => ({ num: obj.default, min: obj.min, max: obj.max });
|
|
1752
1806
|
return html `${obj.title ? EditorElem.h3(obj.title) : ``}
|
|
1753
|
-
|
|
1754
|
-
|
|
1807
|
+
<div class="d-flex align-items-center">
|
|
1808
|
+
${obj.gvc.bindView({
|
|
1755
1809
|
bind: viewId,
|
|
1756
1810
|
view: () => {
|
|
1757
1811
|
var _a;
|
|
@@ -1768,7 +1822,7 @@ ${obj.gvc.bindView(() => {
|
|
|
1768
1822
|
})}"
|
|
1769
1823
|
value="${obj.default !== undefined ? this.numberInterval(def()) : ''}"
|
|
1770
1824
|
${obj.readonly ? `readonly` : ``}
|
|
1771
|
-
|
|
1825
|
+
/>`;
|
|
1772
1826
|
},
|
|
1773
1827
|
divCreate: { class: 'w-100' },
|
|
1774
1828
|
onCreate: () => {
|
|
@@ -1777,8 +1831,9 @@ ${obj.gvc.bindView(() => {
|
|
|
1777
1831
|
}
|
|
1778
1832
|
},
|
|
1779
1833
|
})}
|
|
1780
|
-
|
|
1781
|
-
|
|
1834
|
+
${obj.unit ? html `
|
|
1835
|
+
<div class="p-2">${obj.unit}</div>` : ''}
|
|
1836
|
+
</div> `;
|
|
1782
1837
|
}
|
|
1783
1838
|
static numberInterval(obj) {
|
|
1784
1839
|
const n = parseInt(`${obj.num}`, 10);
|
|
@@ -1820,6 +1875,10 @@ ${obj.gvc.bindView(() => {
|
|
|
1820
1875
|
|
|
1821
1876
|
<input class="flex-fill ms-2" value="${obj.def}" placeholder="" style="border:none;width:100px;" onclick="${obj.gvc.event((e, event) => {
|
|
1822
1877
|
document.querySelector(`[gvc-id='${obj.gvc.id(id)}'] .pcr-button`).click();
|
|
1878
|
+
})}" onchange="${obj.gvc.event((e, event) => {
|
|
1879
|
+
obj.callback(e.value);
|
|
1880
|
+
obj.gvc.notifyDataChange(id);
|
|
1881
|
+
document.querySelector('.pcr-app.visible').classList.remove('visible');
|
|
1823
1882
|
})}">`;
|
|
1824
1883
|
},
|
|
1825
1884
|
divCreate: {
|
|
@@ -1841,9 +1900,11 @@ ${obj.gvc.bindView(() => {
|
|
|
1841
1900
|
padding: 0px !important;
|
|
1842
1901
|
border: 1px solid #e2e5f1;
|
|
1843
1902
|
}
|
|
1903
|
+
|
|
1844
1904
|
.pcr-app {
|
|
1845
1905
|
z-index: 99999;
|
|
1846
1906
|
}
|
|
1907
|
+
|
|
1847
1908
|
.pickr {
|
|
1848
1909
|
width: 19px !important;
|
|
1849
1910
|
height: 19px !important;
|
|
@@ -1908,13 +1969,13 @@ ${obj.gvc.bindView(() => {
|
|
|
1908
1969
|
return html `
|
|
1909
1970
|
${obj.title ? EditorElem.h3(obj.title) : ``}
|
|
1910
1971
|
<select
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1972
|
+
class="form-select ${(_a = obj.class) !== null && _a !== void 0 ? _a : ''}"
|
|
1973
|
+
style="max-height:100%; ${(_b = obj.style) !== null && _b !== void 0 ? _b : ''};"
|
|
1974
|
+
onchange="${obj.gvc.event((e) => {
|
|
1914
1975
|
obj.callback(e.value);
|
|
1915
1976
|
})}"
|
|
1916
|
-
|
|
1917
|
-
|
|
1977
|
+
${obj.readonly ? `disabled` : ``}
|
|
1978
|
+
onclick="${obj.gvc.event((e, event) => {
|
|
1918
1979
|
if (obj.readonly) {
|
|
1919
1980
|
event.stopPropagation();
|
|
1920
1981
|
event.preventDefault();
|
|
@@ -1924,10 +1985,13 @@ ${obj.gvc.bindView(() => {
|
|
|
1924
1985
|
${obj.array
|
|
1925
1986
|
.map((dd) => {
|
|
1926
1987
|
if (typeof dd === 'object') {
|
|
1927
|
-
return html `
|
|
1988
|
+
return html `
|
|
1989
|
+
<option value="${dd.value}" ${dd.value === obj.def ? `selected` : ``}>${dd.title}
|
|
1990
|
+
</option>`;
|
|
1928
1991
|
}
|
|
1929
1992
|
else {
|
|
1930
|
-
return html `
|
|
1993
|
+
return html `
|
|
1994
|
+
<option value="${dd}" ${dd === obj.def ? `selected` : ``}>${dd}</option>`;
|
|
1931
1995
|
}
|
|
1932
1996
|
})
|
|
1933
1997
|
.join('')}
|
|
@@ -1963,9 +2027,9 @@ ${obj.gvc.bindView(() => {
|
|
|
1963
2027
|
}
|
|
1964
2028
|
}
|
|
1965
2029
|
return html `
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
2030
|
+
<div
|
|
2031
|
+
class="d-flex align-items-center"
|
|
2032
|
+
onclick="${obj.gvc.event(() => {
|
|
1969
2033
|
if (obj.type === 'multiple') {
|
|
1970
2034
|
if (obj.def.find((d2) => {
|
|
1971
2035
|
return d2 === dd.value;
|
|
@@ -1985,12 +2049,13 @@ ${obj.gvc.bindView(() => {
|
|
|
1985
2049
|
}
|
|
1986
2050
|
gvc.notifyDataChange(id);
|
|
1987
2051
|
})}"
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
2052
|
+
>
|
|
2053
|
+
<i class="${isSelect() ? `fa-solid fa-square-check` : `fa-regular fa-square`} me-2"
|
|
2054
|
+
style="${isSelect() ? `color:#295ed1;` : `color:black;`}"></i>
|
|
2055
|
+
<span style="font-size:0.85rem;">${dd.title}</span>
|
|
2056
|
+
</div>
|
|
2057
|
+
${obj.def === dd.value && dd.innerHtml ? `<div class="mt-1">${dd.innerHtml}</div>` : ``}
|
|
2058
|
+
`;
|
|
1994
2059
|
})
|
|
1995
2060
|
.join('<div class="my-2"></div>');
|
|
1996
2061
|
},
|
|
@@ -2008,7 +2073,8 @@ ${obj.gvc.bindView(() => {
|
|
|
2008
2073
|
return {
|
|
2009
2074
|
bind: id,
|
|
2010
2075
|
view: () => {
|
|
2011
|
-
return html `<i class="${obj.def ? `fa-solid fa-square-check` : `fa-regular fa-square`} "
|
|
2076
|
+
return html `<i class="${obj.def ? `fa-solid fa-square-check` : `fa-regular fa-square`} "
|
|
2077
|
+
style="color: #393939;"></i>`;
|
|
2012
2078
|
},
|
|
2013
2079
|
divCreate: {
|
|
2014
2080
|
option: [
|
|
@@ -2036,7 +2102,8 @@ ${obj.gvc.bindView(() => {
|
|
|
2036
2102
|
obj.type = (_a = obj.type) !== null && _a !== void 0 ? _a : 'single';
|
|
2037
2103
|
const gvc = obj.gvc;
|
|
2038
2104
|
return html `
|
|
2039
|
-
${obj.title ? html `
|
|
2105
|
+
${obj.title ? html `
|
|
2106
|
+
<div class="tx_700" style="margin-bottom: 18px">${obj.title}</div>` : ``}
|
|
2040
2107
|
${obj.gvc.bindView(() => {
|
|
2041
2108
|
const id = obj.gvc.glitter.getUUID();
|
|
2042
2109
|
return {
|
|
@@ -2055,9 +2122,9 @@ ${obj.gvc.bindView(() => {
|
|
|
2055
2122
|
}
|
|
2056
2123
|
}
|
|
2057
2124
|
return html `
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2125
|
+
<div
|
|
2126
|
+
class="d-flex align-items-center"
|
|
2127
|
+
onclick="${obj.gvc.event(() => {
|
|
2061
2128
|
if (obj.readonly) {
|
|
2062
2129
|
return;
|
|
2063
2130
|
}
|
|
@@ -2080,14 +2147,16 @@ ${obj.gvc.bindView(() => {
|
|
|
2080
2147
|
}
|
|
2081
2148
|
gvc.notifyDataChange(id);
|
|
2082
2149
|
})}"
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2150
|
+
>
|
|
2151
|
+
<i class="${isSelect() ? `fa-solid fa-circle-dot` : `fa-regular fa-circle`} me-2"
|
|
2152
|
+
style="color: ${obj.readonly ? '#808080' : '#393939'}"></i>
|
|
2153
|
+
<span style="font-size: 16px; cursor: pointer;">${dd.title}</span>
|
|
2154
|
+
</div>
|
|
2155
|
+
${obj.def === dd.value && dd.innerHtml ? `<div style="margin-top: 8px;">${dd.innerHtml}</div>` : ``}
|
|
2156
|
+
`;
|
|
2089
2157
|
})
|
|
2090
|
-
.join(html `
|
|
2158
|
+
.join(html `
|
|
2159
|
+
<div style="margin-top: 12px;"></div>`);
|
|
2091
2160
|
},
|
|
2092
2161
|
divCreate: {
|
|
2093
2162
|
class: `${obj.oneLine ? 'd-flex gap-2' : ''} ps-1`,
|
|
@@ -2097,11 +2166,12 @@ ${obj.gvc.bindView(() => {
|
|
|
2097
2166
|
`;
|
|
2098
2167
|
}
|
|
2099
2168
|
static editerDialog(par) {
|
|
2100
|
-
return html `
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2169
|
+
return html `
|
|
2170
|
+
<button
|
|
2171
|
+
type="button"
|
|
2172
|
+
class="btn btn-primary-c w-100"
|
|
2173
|
+
style=""
|
|
2174
|
+
onclick="${par.gvc.event(() => {
|
|
2105
2175
|
const gvc = par.gvc;
|
|
2106
2176
|
NormalPageEditor.toggle({
|
|
2107
2177
|
visible: true,
|
|
@@ -2114,9 +2184,9 @@ ${obj.gvc.bindView(() => {
|
|
|
2114
2184
|
});
|
|
2115
2185
|
par.callback && (NormalPageEditor.closeEvent = par.callback);
|
|
2116
2186
|
})}"
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2187
|
+
>
|
|
2188
|
+
${par.editTitle}
|
|
2189
|
+
</button>`;
|
|
2120
2190
|
}
|
|
2121
2191
|
static folderLineItems(obj) {
|
|
2122
2192
|
const gvc = obj.gvc;
|
|
@@ -2127,7 +2197,9 @@ ${obj.gvc.bindView(() => {
|
|
|
2127
2197
|
{
|
|
2128
2198
|
src: `https://raw.githack.com/SortableJS/Sortable/master/Sortable.js`,
|
|
2129
2199
|
},
|
|
2130
|
-
], () => {
|
|
2200
|
+
], () => {
|
|
2201
|
+
}, () => {
|
|
2202
|
+
});
|
|
2131
2203
|
return {
|
|
2132
2204
|
bind: parId,
|
|
2133
2205
|
view: () => {
|
|
@@ -2145,41 +2217,47 @@ ${obj.gvc.bindView(() => {
|
|
|
2145
2217
|
return false;
|
|
2146
2218
|
};
|
|
2147
2219
|
const childSelect = dd.type === 'container' ? checkChildSelect(dd.dataList) : false;
|
|
2148
|
-
return html `
|
|
2149
|
-
<
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2220
|
+
return html `
|
|
2221
|
+
<li class="btn-group d-flex flex-column" style="margin-top:1px;margin-bottom:1px;">
|
|
2222
|
+
<div
|
|
2223
|
+
class="editor_item d-flex px-2 my-0 hi me-n1 ${dd.toggle || childSelect || obj.isOptionSelected(dd) ? `active` : ``}"
|
|
2224
|
+
style=""
|
|
2225
|
+
onclick="${gvc.event(() => {
|
|
2153
2226
|
if (dd.type === 'container') {
|
|
2154
2227
|
dd.toggle = !dd.toggle;
|
|
2155
2228
|
}
|
|
2156
2229
|
obj.onOptionSelected(dd);
|
|
2157
2230
|
gvc.notifyDataChange(parId);
|
|
2158
2231
|
})}"
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
? html `
|
|
2162
|
-
|
|
2163
|
-
|
|
2232
|
+
>
|
|
2233
|
+
${dd.type === 'container'
|
|
2234
|
+
? html `
|
|
2235
|
+
<div
|
|
2236
|
+
class="subBt ps-0 ms-n2"
|
|
2237
|
+
onclick="${gvc.event((e, event) => {
|
|
2164
2238
|
dd.toggle = !dd.toggle;
|
|
2165
2239
|
gvc.notifyDataChange(parId);
|
|
2166
2240
|
event.stopPropagation();
|
|
2167
2241
|
event.preventDefault();
|
|
2168
2242
|
})}"
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2243
|
+
>
|
|
2244
|
+
${dd.toggle ? html `<i
|
|
2245
|
+
class="fa-regular fa-angle-down hoverBtn "></i>` : html `
|
|
2246
|
+
<i class="fa-regular fa-angle-right hoverBtn "></i> `}
|
|
2247
|
+
</div>`
|
|
2172
2248
|
: ``}
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2249
|
+
${dd.label}
|
|
2250
|
+
<div class="flex-fill"></div>
|
|
2251
|
+
</div>
|
|
2252
|
+
${(() => {
|
|
2177
2253
|
if (dd.type !== 'container' || dd.dataList.length === 0) {
|
|
2178
2254
|
return '';
|
|
2179
2255
|
}
|
|
2180
2256
|
else {
|
|
2181
|
-
return html `
|
|
2182
|
-
|
|
2257
|
+
return html `
|
|
2258
|
+
<div class="${dd.toggle || (dd.toggle === undefined && checkChildSelect(dd.dataList)) ? `` : `d-none`}"
|
|
2259
|
+
style="padding-left:5px;">
|
|
2260
|
+
${this.folderLineItems({
|
|
2183
2261
|
gvc: obj.gvc,
|
|
2184
2262
|
viewArray: dd.dataList.map((dd, index) => {
|
|
2185
2263
|
dd.index = index;
|
|
@@ -2189,10 +2267,10 @@ ${obj.gvc.bindView(() => {
|
|
|
2189
2267
|
isOptionSelected: obj.isOptionSelected,
|
|
2190
2268
|
onOptionSelected: obj.onOptionSelected,
|
|
2191
2269
|
})}
|
|
2192
|
-
|
|
2270
|
+
</div>`;
|
|
2193
2271
|
}
|
|
2194
2272
|
})()}
|
|
2195
|
-
|
|
2273
|
+
</li>`;
|
|
2196
2274
|
})
|
|
2197
2275
|
.join('');
|
|
2198
2276
|
},
|
|
@@ -2230,7 +2308,8 @@ ${obj.gvc.bindView(() => {
|
|
|
2230
2308
|
},
|
|
2231
2309
|
});
|
|
2232
2310
|
}
|
|
2233
|
-
catch (e) {
|
|
2311
|
+
catch (e) {
|
|
2312
|
+
}
|
|
2234
2313
|
clearInterval(interval);
|
|
2235
2314
|
}
|
|
2236
2315
|
}, 100);
|
|
@@ -2249,7 +2328,9 @@ ${obj.gvc.bindView(() => {
|
|
|
2249
2328
|
{
|
|
2250
2329
|
src: `https://raw.githack.com/SortableJS/Sortable/master/Sortable.js`,
|
|
2251
2330
|
},
|
|
2252
|
-
], () => {
|
|
2331
|
+
], () => {
|
|
2332
|
+
}, () => {
|
|
2333
|
+
});
|
|
2253
2334
|
if (obj.hoverGray) {
|
|
2254
2335
|
gvc.addStyle(`
|
|
2255
2336
|
#${parId} :hover :not(.btn-black, .tx_700_white){
|
|
@@ -2275,11 +2356,12 @@ ${obj.gvc.bindView(() => {
|
|
|
2275
2356
|
event.stopPropagation();
|
|
2276
2357
|
});
|
|
2277
2358
|
return html `
|
|
2278
|
-
<li class="btn-group"
|
|
2359
|
+
<li class="btn-group"
|
|
2360
|
+
style="margin-top:1px;margin-bottom:1px;${obj.hr ? `border-bottom: 1px solid #f6f6f6; ` : ``};">
|
|
2279
2361
|
<div
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2362
|
+
class="h-auto align-items-center px-2 my-0 hi me-n1 ${dd.isSelect ? `bgf6 border` : ``}"
|
|
2363
|
+
style="cursor: pointer;min-height:36px;width: calc(100% - 10px);display: flex;font-size: 14px;line-height: 20px;font-weight: 500;text-rendering: optimizelegibility;user-select: none;margin: 5px 10px;"
|
|
2364
|
+
onclick="${gvc.event(() => {
|
|
2283
2365
|
if (!dd.innerHtml) {
|
|
2284
2366
|
return;
|
|
2285
2367
|
}
|
|
@@ -2289,65 +2371,72 @@ ${obj.gvc.bindView(() => {
|
|
|
2289
2371
|
else if (original[index]) {
|
|
2290
2372
|
const originalData = JSON.parse(JSON.stringify(original[index]));
|
|
2291
2373
|
gvc.glitter.innerDialog((gvc) => {
|
|
2292
|
-
return html `
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2374
|
+
return html `
|
|
2375
|
+
<div
|
|
2376
|
+
class="dropdown-menu mx-0 position-fixed pb-0 border p-0 show"
|
|
2377
|
+
style="z-index:999999;${dd.width ? `width:${dd.width + ';'}` : ``}"
|
|
2378
|
+
onclick="${gvc.event((e, event) => {
|
|
2296
2379
|
event.preventDefault();
|
|
2297
2380
|
event.stopPropagation();
|
|
2298
2381
|
})}"
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2382
|
+
>
|
|
2383
|
+
<div class="d-flex align-items-center px-2 border-bottom"
|
|
2384
|
+
style="height:50px;min-width:400px;">
|
|
2385
|
+
<h3 style="font-size:15px;font-weight:500;"
|
|
2386
|
+
class="m-0">
|
|
2387
|
+
${dd.editTitle ? dd.editTitle : `編輯項目「${dd.title}」`}</h3>
|
|
2388
|
+
<div class="flex-fill"></div>
|
|
2389
|
+
<div
|
|
2390
|
+
class="hoverBtn p-2"
|
|
2391
|
+
data-bs-toggle="dropdown"
|
|
2392
|
+
aria-haspopup="true"
|
|
2393
|
+
aria-expanded="false"
|
|
2394
|
+
style="color:black;font-size:20px;"
|
|
2395
|
+
onclick="${gvc.event((e, event) => {
|
|
2310
2396
|
original[index] = originalData;
|
|
2311
2397
|
gvc.closeDialog();
|
|
2312
2398
|
obj.refreshComponent();
|
|
2313
2399
|
})}"
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
class="
|
|
2323
|
-
|
|
2324
|
-
|
|
2400
|
+
>
|
|
2401
|
+
<i class="fa-sharp fa-regular fa-circle-xmark"></i>
|
|
2402
|
+
</div>
|
|
2403
|
+
</div>
|
|
2404
|
+
<div class="px-2"
|
|
2405
|
+
style="max-height:calc(100vh - 150px);overflow-y:auto;">
|
|
2406
|
+
${dd.innerHtml(gvc)}
|
|
2407
|
+
</div>
|
|
2408
|
+
<div class="d-flex w-100 p-2 border-top ${dd.saveAble === false ? `d-none` : ``}">
|
|
2409
|
+
<div class="flex-fill"></div>
|
|
2410
|
+
<div
|
|
2411
|
+
class="btn btn-secondary"
|
|
2412
|
+
style="height:40px;width:80px;"
|
|
2413
|
+
onclick="${gvc.event(() => {
|
|
2325
2414
|
original[index] = originalData;
|
|
2326
2415
|
gvc.closeDialog();
|
|
2327
2416
|
obj.refreshComponent();
|
|
2328
2417
|
})}"
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2418
|
+
>
|
|
2419
|
+
取消
|
|
2420
|
+
</div>
|
|
2421
|
+
<div
|
|
2422
|
+
class="btn btn-primary-c ms-2"
|
|
2423
|
+
style="height:40px;width:80px;"
|
|
2424
|
+
onclick="${gvc.event(() => {
|
|
2336
2425
|
gvc.closeDialog();
|
|
2337
2426
|
(dd.saveEvent && dd.saveEvent()) || obj.refreshComponent();
|
|
2338
2427
|
})}"
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2428
|
+
>
|
|
2429
|
+
<i class="fa-solid fa-floppy-disk me-2"></i>儲存
|
|
2430
|
+
</div>
|
|
2431
|
+
</div>
|
|
2432
|
+
</div>`;
|
|
2344
2433
|
}, glitter.getUUID());
|
|
2345
2434
|
}
|
|
2346
2435
|
})}"
|
|
2347
2436
|
>
|
|
2348
2437
|
<div
|
|
2349
|
-
|
|
2350
|
-
|
|
2438
|
+
class="subBt ms-n2 ${obj.minus === false ? `d-none` : ``}"
|
|
2439
|
+
onclick="${gvc.event((e, event) => {
|
|
2351
2440
|
if (obj.minusEvent) {
|
|
2352
2441
|
obj.minusEvent(obj.originalArray, index);
|
|
2353
2442
|
}
|
|
@@ -2359,12 +2448,13 @@ ${obj.gvc.bindView(() => {
|
|
|
2359
2448
|
event.stopPropagation();
|
|
2360
2449
|
})}"
|
|
2361
2450
|
>
|
|
2362
|
-
<i class="fa-regular fa-circle-minus d-flex align-items-center justify-content-center subBt "
|
|
2451
|
+
<i class="fa-regular fa-circle-minus d-flex align-items-center justify-content-center subBt "
|
|
2452
|
+
style="width:15px;height:15px;color:red;"></i>
|
|
2363
2453
|
</div>
|
|
2364
2454
|
<div class="subBt ${obj.draggable === false || dd.draggable === false ? `d-none` : ``} ${obj.position ? `` : `d-none`}">
|
|
2365
2455
|
<i
|
|
2366
|
-
|
|
2367
|
-
|
|
2456
|
+
class="dragItem fa-solid fa-grip-dots-vertical d-flex align-items-center justify-content-center "
|
|
2457
|
+
style="width:15px;height:15px;padding-right: 14px;"
|
|
2368
2458
|
></i>
|
|
2369
2459
|
</div>
|
|
2370
2460
|
${dd.title}
|
|
@@ -2382,10 +2472,11 @@ ${obj.gvc.bindView(() => {
|
|
|
2382
2472
|
obj.refreshComponent();
|
|
2383
2473
|
}
|
|
2384
2474
|
let toggle = false;
|
|
2385
|
-
return html `
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2475
|
+
return html `
|
|
2476
|
+
<div
|
|
2477
|
+
class="btn-group dropend subBt"
|
|
2478
|
+
style="position: relative;"
|
|
2479
|
+
onclick="${gvc.event((e, event) => {
|
|
2389
2480
|
toggle = !toggle;
|
|
2390
2481
|
if (toggle) {
|
|
2391
2482
|
$(e).children('.bt').dropdown('show');
|
|
@@ -2396,48 +2487,51 @@ ${obj.gvc.bindView(() => {
|
|
|
2396
2487
|
}
|
|
2397
2488
|
event.stopPropagation();
|
|
2398
2489
|
})}"
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2490
|
+
>
|
|
2491
|
+
<div type="button" class="bt" style="background:none;"
|
|
2492
|
+
data-bs-toggle="dropdown" aria-haspopup="true"
|
|
2493
|
+
aria-expanded="false">
|
|
2494
|
+
<i class="fa-sharp fa-regular fa-scissors"></i>
|
|
2495
|
+
</div>
|
|
2496
|
+
<div
|
|
2497
|
+
class="dropdown-menu mx-1 "
|
|
2498
|
+
style="height: 135px;"
|
|
2499
|
+
onclick="${gvc.event((e, event) => {
|
|
2407
2500
|
toggle = false;
|
|
2408
2501
|
event.stopPropagation();
|
|
2409
2502
|
})}"
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2503
|
+
>
|
|
2504
|
+
<a
|
|
2505
|
+
class="dropdown-item"
|
|
2506
|
+
onclick="${gvc.event((e, event) => {
|
|
2414
2507
|
addIt(0, event);
|
|
2415
2508
|
})}"
|
|
2416
2509
|
>向上複製</a
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2510
|
+
>
|
|
2511
|
+
<hr class="dropdown-divider"/>
|
|
2512
|
+
<a
|
|
2513
|
+
class="dropdown-item"
|
|
2514
|
+
onclick="${gvc.event((e, event) => {
|
|
2422
2515
|
$(e).parent().parent().children('.bt').dropdown('hide');
|
|
2423
2516
|
navigator.clipboard.writeText(JSON.stringify(original[index]));
|
|
2424
2517
|
})}"
|
|
2425
2518
|
>複製到剪貼簿</a
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2519
|
+
>
|
|
2520
|
+
<hr class="dropdown-divider"/>
|
|
2521
|
+
<a
|
|
2522
|
+
class="dropdown-item"
|
|
2523
|
+
onclick="${gvc.event((e, event) => {
|
|
2431
2524
|
$(e).parent().parent().children('.bt').dropdown('hide');
|
|
2432
2525
|
addIt(1, event);
|
|
2433
2526
|
})}"
|
|
2434
2527
|
>向下複製</a
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2528
|
+
>
|
|
2529
|
+
</div>
|
|
2530
|
+
</div>`;
|
|
2438
2531
|
})()}
|
|
2439
2532
|
<div class="dragItem subBt ${obj.draggable === false || dd.draggable === false ? `d-none` : ``} ${obj.position ? `d-none` : ``}">
|
|
2440
|
-
<i class="fa-solid fa-grip-dots-vertical d-flex align-items-center justify-content-center "
|
|
2533
|
+
<i class="fa-solid fa-grip-dots-vertical d-flex align-items-center justify-content-center "
|
|
2534
|
+
style="width:15px;height:15px;"></i>
|
|
2441
2535
|
</div>
|
|
2442
2536
|
</div>
|
|
2443
2537
|
</li>
|
|
@@ -2471,7 +2565,8 @@ ${obj.gvc.bindView(() => {
|
|
|
2471
2565
|
group: obj.gvc.glitter.getUUID(),
|
|
2472
2566
|
animation: 100,
|
|
2473
2567
|
handle: '.dragItem',
|
|
2474
|
-
onChange: function (evt) {
|
|
2568
|
+
onChange: function (evt) {
|
|
2569
|
+
},
|
|
2475
2570
|
onStart: function (evt) {
|
|
2476
2571
|
startIndex = evt.oldIndex;
|
|
2477
2572
|
},
|
|
@@ -2481,7 +2576,8 @@ ${obj.gvc.bindView(() => {
|
|
|
2481
2576
|
},
|
|
2482
2577
|
});
|
|
2483
2578
|
}
|
|
2484
|
-
catch (e) {
|
|
2579
|
+
catch (e) {
|
|
2580
|
+
}
|
|
2485
2581
|
clearInterval(interval);
|
|
2486
2582
|
}
|
|
2487
2583
|
}, 100);
|
|
@@ -2490,22 +2586,27 @@ ${obj.gvc.bindView(() => {
|
|
|
2490
2586
|
};
|
|
2491
2587
|
}) +
|
|
2492
2588
|
(obj.plus
|
|
2493
|
-
? html `
|
|
2494
|
-
|
|
2495
|
-
|
|
2589
|
+
? html `
|
|
2590
|
+
<div class="btn-group mt-2 ps-1 pe-2 w-100 border-bottom pb-2 align-items-center">
|
|
2591
|
+
<div class="btn-outline-secondary-c btn ms-2 " style="height:30px;flex:1;"
|
|
2592
|
+
onclick="${obj.plus.event}"><i
|
|
2593
|
+
class="fa-regular fa-circle-plus me-2"></i>${obj.plus.title}
|
|
2594
|
+
</div>
|
|
2595
|
+
${(() => {
|
|
2496
2596
|
if (obj.copyable === false) {
|
|
2497
2597
|
return ``;
|
|
2498
2598
|
}
|
|
2499
2599
|
let interval = undefined;
|
|
2500
|
-
return html `
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2600
|
+
return html `
|
|
2601
|
+
<div
|
|
2602
|
+
type="button"
|
|
2603
|
+
class="bt ms-1"
|
|
2604
|
+
style="background:none;"
|
|
2605
|
+
data-bs-toggle="dropdown"
|
|
2606
|
+
aria-haspopup="true"
|
|
2607
|
+
data-placement="right"
|
|
2608
|
+
aria-expanded="false"
|
|
2609
|
+
onclick="${gvc.event(() => {
|
|
2509
2610
|
function readClipboardContent() {
|
|
2510
2611
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2511
2612
|
try {
|
|
@@ -2534,33 +2635,35 @@ ${obj.gvc.bindView(() => {
|
|
|
2534
2635
|
}
|
|
2535
2636
|
readClipboardContent();
|
|
2536
2637
|
})}"
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2638
|
+
>
|
|
2639
|
+
<i class="fa-regular fa-paste"></i>
|
|
2640
|
+
</div>`;
|
|
2540
2641
|
})()}
|
|
2541
|
-
|
|
2642
|
+
</div>`
|
|
2542
2643
|
: ``));
|
|
2543
2644
|
}
|
|
2544
2645
|
return ((obj.title
|
|
2545
|
-
? html `
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2646
|
+
? html `
|
|
2647
|
+
<div class="d-flex px-2 hi fw-bold d-flex align-items-center border-bottom py-2 border-top bgf6"
|
|
2648
|
+
style="color:#151515;font-size:16px;gap:0px;height:48px;">
|
|
2649
|
+
${obj.title}
|
|
2650
|
+
<div class="flex-fill"></div>
|
|
2651
|
+
${obj.copyable !== false
|
|
2549
2652
|
? html `
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2653
|
+
<div
|
|
2654
|
+
class="d-flex align-items-center justify-content-center hoverBtn me-2 border"
|
|
2655
|
+
style="height:30px;width:30px;border-radius:6px;cursor:pointer;color:#151515;"
|
|
2656
|
+
onclick="${gvc.event(() => {
|
|
2554
2657
|
navigator.clipboard.writeText(JSON.stringify(obj.originalArray));
|
|
2555
2658
|
const dialog = new ShareDialog(gvc.glitter);
|
|
2556
2659
|
dialog.successMessage({ text: '已複製至剪貼簿!' });
|
|
2557
2660
|
})}"
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2661
|
+
>
|
|
2662
|
+
<i class="fa-sharp fa-regular fa-scissors" aria-hidden="true"></i>
|
|
2663
|
+
</div>
|
|
2664
|
+
`
|
|
2562
2665
|
: ``}
|
|
2563
|
-
|
|
2666
|
+
</div>`
|
|
2564
2667
|
: ``) +
|
|
2565
2668
|
gvc.bindView(() => {
|
|
2566
2669
|
return {
|
|
@@ -2585,7 +2688,9 @@ ${obj.gvc.bindView(() => {
|
|
|
2585
2688
|
{
|
|
2586
2689
|
src: `https://raw.githack.com/SortableJS/Sortable/master/Sortable.js`,
|
|
2587
2690
|
},
|
|
2588
|
-
], () => {
|
|
2691
|
+
], () => {
|
|
2692
|
+
}, () => {
|
|
2693
|
+
});
|
|
2589
2694
|
if (obj.hoverGray) {
|
|
2590
2695
|
gvc.addStyle(`
|
|
2591
2696
|
#${parId} :hover :not(.btn-black, .tx_700_white){
|
|
@@ -2611,11 +2716,12 @@ ${obj.gvc.bindView(() => {
|
|
|
2611
2716
|
event.stopPropagation();
|
|
2612
2717
|
});
|
|
2613
2718
|
return html `
|
|
2614
|
-
<li class="btn-group"
|
|
2719
|
+
<li class="btn-group"
|
|
2720
|
+
style="margin-top:1px;margin-bottom:1px;${obj.hr ? `border-bottom: 1px solid #f6f6f6; ` : ``};">
|
|
2615
2721
|
<div
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2722
|
+
class="h-auto align-items-center px-2 my-0 hi me-n1 ${dd.isSelect ? `bgf6 border` : ``}"
|
|
2723
|
+
style="cursor: pointer;min-height:36px;width: calc(100% - 10px);display: flex;font-size: 14px;line-height: 20px;font-weight: 500;text-rendering: optimizelegibility;user-select: none;margin: 5px 10px;"
|
|
2724
|
+
onclick="${gvc.event(() => {
|
|
2619
2725
|
if (!dd.innerHtml) {
|
|
2620
2726
|
return;
|
|
2621
2727
|
}
|
|
@@ -2625,65 +2731,72 @@ ${obj.gvc.bindView(() => {
|
|
|
2625
2731
|
else if (original[index]) {
|
|
2626
2732
|
const originalData = JSON.parse(JSON.stringify(original[index]));
|
|
2627
2733
|
gvc.glitter.innerDialog((gvc) => {
|
|
2628
|
-
return html `
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2734
|
+
return html `
|
|
2735
|
+
<div
|
|
2736
|
+
class="dropdown-menu mx-0 position-fixed pb-0 border p-0 show"
|
|
2737
|
+
style="z-index:999999;${dd.width ? `width:${dd.width + ';'}` : ``}"
|
|
2738
|
+
onclick="${gvc.event((e, event) => {
|
|
2632
2739
|
event.preventDefault();
|
|
2633
2740
|
event.stopPropagation();
|
|
2634
2741
|
})}"
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2742
|
+
>
|
|
2743
|
+
<div class="d-flex align-items-center px-2 border-bottom"
|
|
2744
|
+
style="height:50px;min-width:400px;">
|
|
2745
|
+
<h3 style="font-size:15px;font-weight:500;"
|
|
2746
|
+
class="m-0">
|
|
2747
|
+
${dd.editTitle ? dd.editTitle : `編輯項目「${dd.title}」`}</h3>
|
|
2748
|
+
<div class="flex-fill"></div>
|
|
2749
|
+
<div
|
|
2750
|
+
class="hoverBtn p-2"
|
|
2751
|
+
data-bs-toggle="dropdown"
|
|
2752
|
+
aria-haspopup="true"
|
|
2753
|
+
aria-expanded="false"
|
|
2754
|
+
style="color:black;font-size:20px;"
|
|
2755
|
+
onclick="${gvc.event((e, event) => {
|
|
2646
2756
|
original[index] = originalData;
|
|
2647
2757
|
gvc.closeDialog();
|
|
2648
2758
|
obj.refreshComponent();
|
|
2649
2759
|
})}"
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
class="
|
|
2659
|
-
|
|
2660
|
-
|
|
2760
|
+
>
|
|
2761
|
+
<i class="fa-sharp fa-regular fa-circle-xmark"></i>
|
|
2762
|
+
</div>
|
|
2763
|
+
</div>
|
|
2764
|
+
<div class="px-2"
|
|
2765
|
+
style="max-height:calc(100vh - 150px);overflow-y:auto;">
|
|
2766
|
+
${dd.innerHtml(gvc)}
|
|
2767
|
+
</div>
|
|
2768
|
+
<div class="d-flex w-100 p-2 border-top ${dd.saveAble === false ? `d-none` : ``}">
|
|
2769
|
+
<div class="flex-fill"></div>
|
|
2770
|
+
<div
|
|
2771
|
+
class="btn btn-secondary"
|
|
2772
|
+
style="height:40px;width:80px;"
|
|
2773
|
+
onclick="${gvc.event(() => {
|
|
2661
2774
|
original[index] = originalData;
|
|
2662
2775
|
gvc.closeDialog();
|
|
2663
2776
|
obj.refreshComponent();
|
|
2664
2777
|
})}"
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2778
|
+
>
|
|
2779
|
+
取消
|
|
2780
|
+
</div>
|
|
2781
|
+
<div
|
|
2782
|
+
class="btn btn-primary-c ms-2"
|
|
2783
|
+
style="height:40px;width:80px;"
|
|
2784
|
+
onclick="${gvc.event(() => {
|
|
2672
2785
|
gvc.closeDialog();
|
|
2673
2786
|
(dd.saveEvent && dd.saveEvent()) || obj.refreshComponent();
|
|
2674
2787
|
})}"
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2788
|
+
>
|
|
2789
|
+
<i class="fa-solid fa-floppy-disk me-2"></i>儲存
|
|
2790
|
+
</div>
|
|
2791
|
+
</div>
|
|
2792
|
+
</div>`;
|
|
2680
2793
|
}, glitter.getUUID());
|
|
2681
2794
|
}
|
|
2682
2795
|
})}"
|
|
2683
2796
|
>
|
|
2684
2797
|
<div
|
|
2685
|
-
|
|
2686
|
-
|
|
2798
|
+
class="subBt ms-n2 ${obj.minus === false ? `d-none` : ``}"
|
|
2799
|
+
onclick="${gvc.event((e, event) => {
|
|
2687
2800
|
if (obj.minusEvent) {
|
|
2688
2801
|
obj.minusEvent(obj.originalArray, index);
|
|
2689
2802
|
}
|
|
@@ -2695,12 +2808,13 @@ ${obj.gvc.bindView(() => {
|
|
|
2695
2808
|
event.stopPropagation();
|
|
2696
2809
|
})}"
|
|
2697
2810
|
>
|
|
2698
|
-
<i class="fa-regular fa-circle-minus d-flex align-items-center justify-content-center subBt "
|
|
2811
|
+
<i class="fa-regular fa-circle-minus d-flex align-items-center justify-content-center subBt "
|
|
2812
|
+
style="width:15px;height:15px;color:red;"></i>
|
|
2699
2813
|
</div>
|
|
2700
2814
|
<div class="subBt ${obj.draggable === false || dd.draggable === false ? `d-none` : ``} ${obj.position ? `` : `d-none`}">
|
|
2701
2815
|
<i
|
|
2702
|
-
|
|
2703
|
-
|
|
2816
|
+
class="dragItem fa-solid fa-grip-dots-vertical d-flex align-items-center justify-content-center "
|
|
2817
|
+
style="width:15px;height:15px;padding-right: 14px;"
|
|
2704
2818
|
></i>
|
|
2705
2819
|
</div>
|
|
2706
2820
|
${dd.title}
|
|
@@ -2718,10 +2832,11 @@ ${obj.gvc.bindView(() => {
|
|
|
2718
2832
|
obj.refreshComponent();
|
|
2719
2833
|
}
|
|
2720
2834
|
let toggle = false;
|
|
2721
|
-
return html `
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2835
|
+
return html `
|
|
2836
|
+
<div
|
|
2837
|
+
class="btn-group dropend subBt"
|
|
2838
|
+
style="position: relative;"
|
|
2839
|
+
onclick="${gvc.event((e, event) => {
|
|
2725
2840
|
toggle = !toggle;
|
|
2726
2841
|
if (toggle) {
|
|
2727
2842
|
$(e).children('.bt').dropdown('show');
|
|
@@ -2732,48 +2847,51 @@ ${obj.gvc.bindView(() => {
|
|
|
2732
2847
|
}
|
|
2733
2848
|
event.stopPropagation();
|
|
2734
2849
|
})}"
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2850
|
+
>
|
|
2851
|
+
<div type="button" class="bt" style="background:none;"
|
|
2852
|
+
data-bs-toggle="dropdown" aria-haspopup="true"
|
|
2853
|
+
aria-expanded="false">
|
|
2854
|
+
<i class="fa-sharp fa-regular fa-scissors"></i>
|
|
2855
|
+
</div>
|
|
2856
|
+
<div
|
|
2857
|
+
class="dropdown-menu mx-1 "
|
|
2858
|
+
style="height: 135px;"
|
|
2859
|
+
onclick="${gvc.event((e, event) => {
|
|
2743
2860
|
toggle = false;
|
|
2744
2861
|
event.stopPropagation();
|
|
2745
2862
|
})}"
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2863
|
+
>
|
|
2864
|
+
<a
|
|
2865
|
+
class="dropdown-item"
|
|
2866
|
+
onclick="${gvc.event((e, event) => {
|
|
2750
2867
|
addIt(0, event);
|
|
2751
2868
|
})}"
|
|
2752
2869
|
>向上複製</a
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2870
|
+
>
|
|
2871
|
+
<hr class="dropdown-divider"/>
|
|
2872
|
+
<a
|
|
2873
|
+
class="dropdown-item"
|
|
2874
|
+
onclick="${gvc.event((e, event) => {
|
|
2758
2875
|
$(e).parent().parent().children('.bt').dropdown('hide');
|
|
2759
2876
|
navigator.clipboard.writeText(JSON.stringify(original[index]));
|
|
2760
2877
|
})}"
|
|
2761
2878
|
>複製到剪貼簿</a
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2879
|
+
>
|
|
2880
|
+
<hr class="dropdown-divider"/>
|
|
2881
|
+
<a
|
|
2882
|
+
class="dropdown-item"
|
|
2883
|
+
onclick="${gvc.event((e, event) => {
|
|
2767
2884
|
$(e).parent().parent().children('.bt').dropdown('hide');
|
|
2768
2885
|
addIt(1, event);
|
|
2769
2886
|
})}"
|
|
2770
2887
|
>向下複製</a
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2888
|
+
>
|
|
2889
|
+
</div>
|
|
2890
|
+
</div>`;
|
|
2774
2891
|
})()}
|
|
2775
2892
|
<div class="dragItem subBt ${obj.draggable === false || dd.draggable === false ? `d-none` : ``} ${obj.position ? `d-none` : ``}">
|
|
2776
|
-
<i class="fa-solid fa-grip-dots-vertical d-flex align-items-center justify-content-center "
|
|
2893
|
+
<i class="fa-solid fa-grip-dots-vertical d-flex align-items-center justify-content-center "
|
|
2894
|
+
style="width:15px;height:15px;"></i>
|
|
2777
2895
|
</div>
|
|
2778
2896
|
</div>
|
|
2779
2897
|
</li>
|
|
@@ -2807,7 +2925,8 @@ ${obj.gvc.bindView(() => {
|
|
|
2807
2925
|
group: obj.gvc.glitter.getUUID(),
|
|
2808
2926
|
animation: 100,
|
|
2809
2927
|
handle: '.dragItem',
|
|
2810
|
-
onChange: function (evt) {
|
|
2928
|
+
onChange: function (evt) {
|
|
2929
|
+
},
|
|
2811
2930
|
onStart: function (evt) {
|
|
2812
2931
|
startIndex = evt.oldIndex;
|
|
2813
2932
|
},
|
|
@@ -2817,7 +2936,8 @@ ${obj.gvc.bindView(() => {
|
|
|
2817
2936
|
},
|
|
2818
2937
|
});
|
|
2819
2938
|
}
|
|
2820
|
-
catch (e) {
|
|
2939
|
+
catch (e) {
|
|
2940
|
+
}
|
|
2821
2941
|
clearInterval(interval);
|
|
2822
2942
|
}
|
|
2823
2943
|
}, 100);
|
|
@@ -2826,22 +2946,27 @@ ${obj.gvc.bindView(() => {
|
|
|
2826
2946
|
};
|
|
2827
2947
|
}) +
|
|
2828
2948
|
(obj.plus
|
|
2829
|
-
? html `
|
|
2830
|
-
|
|
2831
|
-
|
|
2949
|
+
? html `
|
|
2950
|
+
<div class="btn-group mt-2 ps-1 pe-2 w-100 border-bottom pb-2 align-items-center">
|
|
2951
|
+
<div class="btn-outline-secondary-c btn ms-2 " style="height:30px;flex:1;"
|
|
2952
|
+
onclick="${obj.plus.event}"><i
|
|
2953
|
+
class="fa-regular fa-circle-plus me-2"></i>${obj.plus.title}
|
|
2954
|
+
</div>
|
|
2955
|
+
${(() => {
|
|
2832
2956
|
if (obj.copyable === false) {
|
|
2833
2957
|
return ``;
|
|
2834
2958
|
}
|
|
2835
2959
|
let interval = undefined;
|
|
2836
|
-
return html `
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2960
|
+
return html `
|
|
2961
|
+
<div
|
|
2962
|
+
type="button"
|
|
2963
|
+
class="bt ms-1"
|
|
2964
|
+
style="background:none;"
|
|
2965
|
+
data-bs-toggle="dropdown"
|
|
2966
|
+
aria-haspopup="true"
|
|
2967
|
+
data-placement="right"
|
|
2968
|
+
aria-expanded="false"
|
|
2969
|
+
onclick="${gvc.event(() => {
|
|
2845
2970
|
function readClipboardContent() {
|
|
2846
2971
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2847
2972
|
try {
|
|
@@ -2870,33 +2995,35 @@ ${obj.gvc.bindView(() => {
|
|
|
2870
2995
|
}
|
|
2871
2996
|
readClipboardContent();
|
|
2872
2997
|
})}"
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2998
|
+
>
|
|
2999
|
+
<i class="fa-regular fa-paste"></i>
|
|
3000
|
+
</div>`;
|
|
2876
3001
|
})()}
|
|
2877
|
-
|
|
3002
|
+
</div>`
|
|
2878
3003
|
: ``));
|
|
2879
3004
|
}
|
|
2880
3005
|
return ((obj.title
|
|
2881
|
-
? html `
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
3006
|
+
? html `
|
|
3007
|
+
<div class="d-flex px-2 hi fw-bold d-flex align-items-center border-bottom py-2 border-top bgf6"
|
|
3008
|
+
style="color:#151515;font-size:16px;gap:0px;height:48px;">
|
|
3009
|
+
${obj.title}
|
|
3010
|
+
<div class="flex-fill"></div>
|
|
3011
|
+
${obj.copyable !== false
|
|
2885
3012
|
? html `
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
3013
|
+
<div
|
|
3014
|
+
class="d-flex align-items-center justify-content-center hoverBtn me-2 border"
|
|
3015
|
+
style="height:30px;width:30px;border-radius:6px;cursor:pointer;color:#151515;"
|
|
3016
|
+
onclick="${gvc.event(() => {
|
|
2890
3017
|
navigator.clipboard.writeText(JSON.stringify(obj.originalArray));
|
|
2891
3018
|
const dialog = new ShareDialog(gvc.glitter);
|
|
2892
3019
|
dialog.successMessage({ text: '已複製至剪貼簿!' });
|
|
2893
3020
|
})}"
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
3021
|
+
>
|
|
3022
|
+
<i class="fa-sharp fa-regular fa-scissors" aria-hidden="true"></i>
|
|
3023
|
+
</div>
|
|
3024
|
+
`
|
|
2898
3025
|
: ``}
|
|
2899
|
-
|
|
3026
|
+
</div>`
|
|
2900
3027
|
: ``) +
|
|
2901
3028
|
gvc.bindView(() => {
|
|
2902
3029
|
return {
|
|
@@ -2911,41 +3038,46 @@ ${obj.gvc.bindView(() => {
|
|
|
2911
3038
|
}));
|
|
2912
3039
|
}
|
|
2913
3040
|
static buttonPrimary(title, event) {
|
|
2914
|
-
return html `
|
|
3041
|
+
return html `
|
|
3042
|
+
<button type="button" class="btn btn-primary-c w-100" onclick="${event}">${title}</button>`;
|
|
2915
3043
|
}
|
|
2916
3044
|
static buttonNormal(title, event) {
|
|
2917
|
-
return html `
|
|
2918
|
-
|
|
2919
|
-
|
|
3045
|
+
return html `
|
|
3046
|
+
<button type="button" class="btn w-100"
|
|
3047
|
+
style="background:white;width:calc(100%);border-radius:8px;min-height:45px;border:1px solid black;color:#151515;"
|
|
3048
|
+
onclick="${event}">
|
|
3049
|
+
${title}
|
|
3050
|
+
</button>`;
|
|
2920
3051
|
}
|
|
2921
3052
|
static openEditorDialog(gvc, inner, close, width, title, tag) {
|
|
2922
3053
|
return gvc.glitter.innerDialog((gvc) => {
|
|
2923
|
-
return html `
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
3054
|
+
return html `
|
|
3055
|
+
<div
|
|
3056
|
+
class="dropdown-menu mx-0 position-fixed pb-0 border p-0 show "
|
|
3057
|
+
style="z-index:999999;max-height: calc(100vh - 20px);"
|
|
3058
|
+
onclick="${gvc.event((e, event) => {
|
|
2927
3059
|
event.preventDefault();
|
|
2928
3060
|
event.stopPropagation();
|
|
2929
3061
|
})}"
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
3062
|
+
>
|
|
3063
|
+
<div
|
|
3064
|
+
class="d-flex align-items-center px-2 border-bottom"
|
|
3065
|
+
style="height:50px;width: ${width ||
|
|
2934
3066
|
gvc.glitter.ut.frSize({
|
|
2935
3067
|
1400: 1200,
|
|
2936
3068
|
1600: 1400,
|
|
2937
3069
|
1900: 1600,
|
|
2938
3070
|
}, '1200')}px;"
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
3071
|
+
>
|
|
3072
|
+
<h3 style="font-size:15px;font-weight:500;" class="m-0">${title !== null && title !== void 0 ? title : `代碼編輯`}</h3>
|
|
3073
|
+
<div class="flex-fill"></div>
|
|
3074
|
+
<div
|
|
3075
|
+
class="hoverBtn p-2"
|
|
3076
|
+
data-bs-toggle="dropdown"
|
|
3077
|
+
aria-haspopup="true"
|
|
3078
|
+
aria-expanded="false"
|
|
3079
|
+
style="color:black;font-size:20px;"
|
|
3080
|
+
onclick="${gvc.event((e, event) => __awaiter(this, void 0, void 0, function* () {
|
|
2949
3081
|
let wait_promise = close();
|
|
2950
3082
|
if (wait_promise && wait_promise.then) {
|
|
2951
3083
|
wait_promise = yield wait_promise;
|
|
@@ -2954,61 +3086,63 @@ ${obj.gvc.bindView(() => {
|
|
|
2954
3086
|
gvc.closeDialog();
|
|
2955
3087
|
}
|
|
2956
3088
|
}))}"
|
|
2957
|
-
|
|
2958
|
-
|
|
3089
|
+
>
|
|
3090
|
+
<i class="fa-sharp fa-regular fa-circle-xmark"></i>
|
|
3091
|
+
</div>
|
|
2959
3092
|
</div>
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
style="max-height:calc(100vh - 150px);overflow-y:auto;width: ${width ||
|
|
3093
|
+
<div
|
|
3094
|
+
class=""
|
|
3095
|
+
style="max-height:calc(100vh - 150px);overflow-y:auto;width: ${width ||
|
|
2964
3096
|
gvc.glitter.ut.frSize({
|
|
2965
3097
|
1400: 1200,
|
|
2966
3098
|
1600: 1400,
|
|
2967
3099
|
1900: 1600,
|
|
2968
3100
|
}, '1200')}px;"
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
3101
|
+
>
|
|
3102
|
+
${inner(gvc)}
|
|
3103
|
+
</div>
|
|
3104
|
+
</div>`;
|
|
2973
3105
|
}, tag !== null && tag !== void 0 ? tag : gvc.glitter.getUUID());
|
|
2974
3106
|
}
|
|
2975
3107
|
static btnGroup(obj) {
|
|
2976
3108
|
var _a, _b;
|
|
2977
3109
|
const gvc = obj.gvc;
|
|
2978
3110
|
let interval = undefined;
|
|
2979
|
-
return html `
|
|
2980
|
-
<div
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3111
|
+
return html `
|
|
3112
|
+
<div class="position-relative btn-group dropend subBt my-auto ms-1 ${(_a = obj.classS) !== null && _a !== void 0 ? _a : ''}"
|
|
3113
|
+
style="${(_b = obj.style) !== null && _b !== void 0 ? _b : ''}">
|
|
3114
|
+
<div
|
|
3115
|
+
type="button"
|
|
3116
|
+
class="bt"
|
|
3117
|
+
style="background:none;"
|
|
3118
|
+
data-bs-toggle="dropdown"
|
|
3119
|
+
aria-haspopup="true"
|
|
3120
|
+
data-placement="left"
|
|
3121
|
+
aria-expanded="false"
|
|
3122
|
+
onclick="${gvc.event((e, event) => {
|
|
2989
3123
|
setTimeout(() => {
|
|
2990
3124
|
obj.top && $(e).parent().children('.dropdown-menu').css('top', `${obj.top}px`);
|
|
2991
3125
|
}, 100);
|
|
2992
3126
|
event.stopPropagation();
|
|
2993
3127
|
event.preventDefault();
|
|
2994
3128
|
})}"
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3129
|
+
>
|
|
3130
|
+
${obj.fontawesome}
|
|
3131
|
+
</div>
|
|
3132
|
+
<div
|
|
3133
|
+
class="dropdown-menu mx-1"
|
|
3134
|
+
data-placement="right"
|
|
3135
|
+
onmouseover="${obj.gvc.event((e, event) => {
|
|
3002
3136
|
clearInterval(interval);
|
|
3003
3137
|
})}"
|
|
3004
|
-
|
|
3138
|
+
onmouseout="${obj.gvc.event((e, event) => {
|
|
3005
3139
|
$(e).children('.bt').dropdown('hide');
|
|
3006
3140
|
})}"
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3141
|
+
style="min-height: 150px;${obj.dropDownStyle}"
|
|
3142
|
+
>
|
|
3143
|
+
<div class="px-2">${obj.inner}</div>
|
|
3144
|
+
</div>
|
|
3145
|
+
</div>`;
|
|
3012
3146
|
}
|
|
3013
3147
|
}
|
|
3014
3148
|
EditorElem.noImageURL = 'https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1722936949034-default_image.jpg';
|