1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706 | 1×
1×
1×
1×
158×
158×
158×
158×
158×
158×
158×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
4×
4×
1×
1×
1×
1×
1×
1×
1×
1×
2×
2×
158×
9×
9×
158×
19×
19×
19×
158×
12×
12×
12×
1×
1×
1×
11×
1×
1×
1×
10×
1×
1×
1×
9×
9×
9×
9×
158×
8×
8×
8×
8×
8×
8×
1×
1×
7×
1×
1×
6×
1×
1×
5×
1×
1×
4×
1×
1×
3×
1×
1×
2×
1×
1×
1×
1×
1×
158×
10×
10×
4×
4×
4×
4×
4×
4×
4×
4×
4×
4×
4×
4×
6×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
5×
5×
5×
5×
5×
5×
5×
5×
5×
5×
5×
158×
158×
158×
1×
14468×
1×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
375×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
16×
1×
8×
1×
2×
2×
2×
2×
2×
1×
1×
1×
2×
2×
2×
1×
1×
2×
1×
1×
2×
1×
12×
12×
12×
12×
12×
4×
8×
12×
1×
18×
1×
23×
23×
23×
15×
23×
23×
23×
23×
23×
23×
23×
23×
23×
23×
23×
1×
8×
1×
1×
12×
12×
48×
12×
12×
12×
1×
35×
3×
3×
3×
3×
3×
3×
3×
3×
3×
3×
1×
1×
1×
1×
1×
1×
1×
1×
1×
1×
22×
22×
22×
22×
22×
22×
22×
22×
22×
22×
22×
1×
26×
3×
3×
3×
3×
3×
3×
1×
1×
1×
1×
1×
1×
22×
22×
22×
22×
22×
22×
22×
1×
8×
6×
2×
1×
8×
8×
8×
1×
7×
1×
6×
1×
5×
1×
4×
1×
3×
1×
2×
1×
1×
1×
1×
8×
8×
2×
6×
1×
23×
23×
23×
23×
23×
21×
21×
21×
21×
21×
21×
21×
21×
21×
21×
21×
21×
21×
21×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
2×
23×
23×
23×
23×
23×
1×
2×
2×
2×
2×
2×
2×
2×
1×
1×
23×
23×
23×
23×
23×
23×
23×
23×
23×
23×
23×
21×
23×
21×
23×
21×
23×
21×
23×
21×
23×
21×
23×
23×
23×
21×
21×
21×
21×
21×
21×
21×
21×
2×
23×
23×
23×
2×
2×
2×
2×
2×
2×
21×
1×
21×
21×
1×
232×
16×
13×
16×
64×
64×
16×
232×
113×
113×
232×
113×
113×
232×
232×
232×
232×
16×
232×
232×
16×
232×
232×
16×
232×
232×
16×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
232×
1×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
232×
16×
1×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
232×
16×
16×
1×
1×
| define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-inputs", "../format/index", "@syncfusion/ej2-dropdowns", "@syncfusion/ej2-inputs"], function (require, exports, ej2_base_1, ej2_inputs_1, index_1, ej2_dropdowns_1, ej2_inputs_2) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var BordersAndShadingDialog = (function () {
function BordersAndShadingDialog(documentHelper) {
var _this = this;
this.cellFormat = new index_1.WCellFormat();
this.tableFormat = new index_1.WTableFormat();
this.isShadingChanged = false;
this.handleSettingCheckBoxActionHandler = this.onhandleSettingCheckBoxActionClicked.bind(this);
this.handlePreviewCheckBoxActionHandler = this.onhandlePreviewCheckBoxActionClicked.bind(this);
this.applyBordersShadingsProperties = function () {
var tablePropertiesDialog = _this.documentHelper.owner.tablePropertiesDialogModule;
var selectedCell = _this.documentHelper.selection.start.paragraph.associatedCell;
var borders = undefined;
Eif (_this.checkClassName(_this.previewDivTopTop) || _this.checkClassName(_this.previewDivTopBottom)
|| _this.checkClassName(_this.previewDivTopCenter) || _this.checkClassName(_this.previewDivBottomcenter)
|| _this.checkClassName(_this.previewDivBottomLeft) || _this.checkClassName(_this.previewDivBottomRight)
|| _this.checkClassName(_this.previewDivDiagonalRight) || _this.checkClassName(_this.previewDivLeftDiagonal)) {
borders = new index_1.WBorders();
Eif (_this.checkClassName(_this.previewDivTopTop)) {
borders.top = _this.getBorder('top');
}
Eif (_this.checkClassName(_this.previewDivTopBottom)) {
borders.bottom = _this.getBorder('bottom');
}
Eif (_this.checkClassName(_this.previewDivBottomLeft)) {
borders.left = _this.getBorder('left');
}
Eif (_this.checkClassName(_this.previewDivBottomRight)) {
borders.right = _this.getBorder('right');
}
Eif (_this.checkClassName(_this.previewDivTopCenter)) {
borders.horizontal = _this.getBorder('horizontal');
}
Eif (_this.checkClassName(_this.previewDivBottomcenter)) {
borders.vertical = _this.getBorder('vertical');
}
Iif (_this.checkClassName(_this.previewDivLeftDiagonal)) {
borders.diagonalDown = _this.getBorder('diagonalDown');
}
Iif (_this.checkClassName(_this.previewDivDiagonalRight)) {
borders.diagonalUp = _this.getBorder('diagonalUp');
}
}
var shading = new index_1.WShading();
var editorModule = _this.documentHelper.owner.editorModule;
shading.backgroundColor = _this.shadingColorPicker.value;
if (_this.ulelementShading.value === 'Cell') {
Eif (tablePropertiesDialog) {
tablePropertiesDialog.isCellBordersAndShadingUpdated = true;
}
_this.cellFormat.borders = new index_1.WBorders();
Eif (!ej2_base_1.isNullOrUndefined(borders)) {
editorModule.applyBordersInternal(_this.cellFormat.borders, borders);
}
else if (_this.noneDiv.classList.contains('e-de-table-border-inside-setting-click')) {
editorModule.applyBordersInternal(_this.cellFormat.borders, new index_1.WBorders());
}
Eif (!ej2_base_1.isNullOrUndefined(selectedCell.cellFormat.shading)) {
shading.foregroundColor = selectedCell.cellFormat.shading.foregroundColor;
shading.textureStyle = selectedCell.cellFormat.shading.textureStyle;
}
_this.cellFormat.shading = new index_1.WShading();
editorModule.applyShading(_this.cellFormat.shading, shading);
}
else Eif (_this.ulelementShading.value === 'Table') {
Eif (tablePropertiesDialog) {
tablePropertiesDialog.isTableBordersAndShadingUpdated = true;
}
var currentTableFormat = _this.documentHelper.owner.selectionModule.tableFormat.table.tableFormat;
_this.tableFormat.copyFormat(currentTableFormat);
_this.tableFormat.borders = new index_1.WBorders();
Eif (!ej2_base_1.isNullOrUndefined(borders) || _this.noneDiv.classList.contains('e-de-table-border-inside-setting-click')) {
var table = _this.documentHelper.owner.selectionModule.tableFormat.table;
for (var _i = 0, _a = table.childWidgets; _i < _a.length; _i++) {
var rowWidget = _a[_i];
_this.updateBorder(table.tableFormat.borders.left, rowWidget.rowFormat.borders.left);
_this.updateBorder(table.tableFormat.borders.top, rowWidget.rowFormat.borders.top);
_this.updateBorder(table.tableFormat.borders.right, rowWidget.rowFormat.borders.right);
_this.updateBorder(table.tableFormat.borders.bottom, rowWidget.rowFormat.borders.bottom);
var rowHorizontalBorder = rowWidget.rowFormat.borders.horizontal;
var tableHorizontalBorder = table.tableFormat.borders.horizontal;
Iif ((rowHorizontalBorder.lineStyle === 'Single' && tableHorizontalBorder.lineStyle === 'None') ||
(rowHorizontalBorder.lineStyle === 'Cleared' && tableHorizontalBorder.lineStyle === 'Cleared')) {
tableHorizontalBorder.lineStyle = 'Single';
tableHorizontalBorder.lineWidth = rowHorizontalBorder.lineWidth;
}
var rowVerticalBorder = rowWidget.rowFormat.borders.vertical;
var tableVerticalBorder = table.tableFormat.borders.vertical;
Iif ((rowVerticalBorder.lineStyle === 'Single' && tableVerticalBorder.lineStyle === 'None') ||
(rowVerticalBorder.lineStyle === 'Cleared' && tableVerticalBorder.lineStyle === 'Cleared')) {
tableVerticalBorder.lineStyle = 'Single';
tableVerticalBorder.lineWidth = rowVerticalBorder.lineWidth;
}
rowWidget.rowFormat.borders.clearFormat();
for (var _b = 0, _c = rowWidget.childWidgets; _b < _c.length; _b++) {
var cellWidget = _c[_b];
cellWidget.cellFormat.borders.clearFormat();
}
}
}
Eif (!ej2_base_1.isNullOrUndefined(borders)) {
editorModule.applyBordersInternal(_this.tableFormat.borders, borders);
}
else if (_this.noneDiv.classList.contains('e-de-table-border-inside-setting-click')) {
editorModule.applyBordersInternal(_this.tableFormat.borders, new index_1.WBorders());
}
Eif (!ej2_base_1.isNullOrUndefined(currentTableFormat.shading)) {
shading.foregroundColor = currentTableFormat.shading.foregroundColor;
shading.textureStyle = currentTableFormat.shading.textureStyle;
}
_this.tableFormat.shading = new index_1.WShading();
_this.isShadingChanged = currentTableFormat.shading.backgroundColor !== shading.backgroundColor;
editorModule.applyShading(_this.tableFormat.shading, shading);
}
else if (_this.ulelementShading.value === 'Paragraph') {
var isNoneBorder = _this.noneDiv.classList.contains('e-de-table-border-inside-setting-click');
if (!ej2_base_1.isNullOrUndefined(_this.paragraphFormat)) {
editorModule.applyBordersInternal(_this.paragraphFormat.borders, isNoneBorder ? new index_1.WBorders() : borders);
}
else {
editorModule.onApplyParagraphFormat('borders', isNoneBorder ? new index_1.WBorders() : borders, false, false);
}
}
_this.applyFormat();
_this.closeDialog();
};
this.closeDialog = function () {
_this.documentHelper.dialog.hide();
_this.closeBordersShadingsDialog();
};
this.closeBordersShadingsDialog = function () {
_this.paragraphFormat = undefined;
_this.documentHelper.dialog2.element.style.pointerEvents = '';
_this.documentHelper.updateFocus();
};
this.handleSettingCheckBoxAction = function (event) {
var targetId = event.target.id;
var tableBorderDialogId = _this.target.id;
if (targetId === tableBorderDialogId + '_None_Div' || targetId === tableBorderDialogId + '_None_Div_Container'
|| targetId === tableBorderDialogId + '_None_Div_Transparent') {
_this.updateClassForSettingDivElements();
_this.noneDiv.classList.add('e-de-table-border-inside-setting-click');
_this.setSettingPreviewDivElement('none');
}
else if (targetId === tableBorderDialogId + '_Box_Div' || targetId === tableBorderDialogId + '_Box_Div_Container'
|| targetId === tableBorderDialogId + '_Box_Div_Transparent') {
_this.updateClassForSettingDivElements();
_this.boxDiv.classList.add('e-de-table-border-inside-setting-click');
_this.setSettingPreviewDivElement('box');
}
else if (targetId === tableBorderDialogId + '_All_Div' || targetId === tableBorderDialogId + '_All_Div_Container'
|| targetId === tableBorderDialogId + '_All_Div_Transparent') {
_this.updateClassForSettingDivElements();
_this.allDiv.classList.add('e-de-table-border-inside-setting-click');
_this.setSettingPreviewDivElement('all');
}
else {
Iif (_this.ulelementShading.value === 'Paragraph') {
_this.updateClassForSettingDivElements();
_this.customDiv.classList.add('e-de-table-border-inside-setting-click');
_this.setSettingPreviewDivElement('customDiv');
}
else {
_this.updateClassForSettingDivElements();
_this.customDiv.classList.add('e-de-table-border-inside-setting-click');
_this.setSettingPreviewDivElement('customDiv');
}
}
};
this.handlePreviewCheckBoxAction = function (event) {
var target = event.target;
var targetId = target.id;
var tableBorderDialogId = _this.target.id;
var compareClass = 'e-de-table-border-inside-preview-click';
_this.customDiv.click();
if (targetId === tableBorderDialogId + '_Preview_Div_TopTop_Container' || targetId === tableBorderDialogId + '_Preview_Div_TopTop'
|| targetId === tableBorderDialogId + '_previewDivTopTopTransParent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivTopTop);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div', '_Preview_Div_TopTop', 'TopTop');
}
else if (targetId === tableBorderDialogId + '_Preview_Div_TopCenter_Container'
|| targetId === tableBorderDialogId + '_Preview_Div_TopCenter'
|| targetId === tableBorderDialogId + '_previewDivTopCenterTransParent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivTopCenter);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div_Horizontal', '_Preview_Div_TopCenter', 'TopCenter');
}
else if (targetId === tableBorderDialogId + '_Preview_Div_TopBottom_Container' || targetId === tableBorderDialogId + '_Preview_Div_TopBottom'
|| targetId === tableBorderDialogId + '_previewDivTopBottomTransParent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivTopBottom);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div', '_Preview_Div_TopBottom', 'TopBottom');
}
else if (targetId === tableBorderDialogId + '_Preview_Div_LeftDiagonal_Container'
|| targetId === tableBorderDialogId + '_Preview_Div_LeftDiagonal'
|| targetId === tableBorderDialogId + '_previewDivLeftDiagonalTransParent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivLeftDiagonal);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div_Left_Diagonal', '_Preview_Div_LeftDiagonal', 'LeftDiagonal');
}
else if (targetId === tableBorderDialogId + '_Preview_Div_BottomLeft_Container' || targetId === tableBorderDialogId + '_Preview_Div_BottomLeft'
|| targetId === tableBorderDialogId + '_previewDivBottomLeftTransparent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivBottomLeft);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div', '_Preview_Div_BottomLeft', 'BottomLeft');
}
else if (targetId === tableBorderDialogId + '_Preview_Div_BottomCenter_Container'
|| targetId === tableBorderDialogId + '_Preview_Div_BottomCenter'
|| targetId === tableBorderDialogId + '_previewDivBottomcenterTransparent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivBottomcenter);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div_Vertical', '_Preview_Div_BottomCenter', 'BottomCenter');
}
else if (targetId === tableBorderDialogId + '_Preview_Div_BottomRight_Container' || targetId === tableBorderDialogId + '_Preview_Div_BottomRight'
|| targetId === tableBorderDialogId + '_previewDivBottomRightTransparent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivBottomRight);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div', '_Preview_Div_BottomRight', 'BottomRight');
}
else Eif (targetId === tableBorderDialogId + '_Preview_Div_RightDiagonal_Container'
|| targetId === tableBorderDialogId + '_Preview_Div_RightDiagonal'
|| targetId === tableBorderDialogId + '_previewDivDiagonalRightTransparent') {
_this.handlePreviewCheckBoxShowHide(tableBorderDialogId, compareClass, _this.previewDivDiagonalRight);
_this.showHidePreviewDivElements(tableBorderDialogId, compareClass, '_Preview_Div_Right_Diagonal', '_Preview_Div_RightDiagonal', 'RightDiagonal');
}
};
this.applyTableCellPreviewBoxes = function () {
Eif (!ej2_base_1.isNullOrUndefined(_this.ulelementShading)) {
if (_this.ulelementShading.value === 'Cell') {
_this.shadingColorPicker.disabled = false;
_this.previewDivBottomcenterContainer.style.visibility = 'hidden';
_this.previewDivTopCenterContainer.style.visibility = 'hidden';
_this.previewVerticalDiv.style.display = 'none';
_this.previewHorizontalDiv.style.display = 'none';
_this.previewDivLeftDiagonal.style.display = '';
_this.previewDivDiagonalRight.style.display = '';
_this.previewDivBottomRightContainer.style.left = '80px';
ej2_base_1.classList(_this.noneDivTransparent, ['e-de-table-border-none-setting'], ['e-de-para-border-none-setting']);
ej2_base_1.classList(_this.boxDivTransparent, ['e-de-table-border-box-setting'], ['e-de-para-border-box-setting']);
ej2_base_1.classList(_this.allDivTransparent, ['e-de-table-border-all-setting'], ['e-de-para-border-shadow-setting']);
ej2_base_1.classList(_this.customDivTransparent, ['e-de-table-border-custom-setting'], ['e-de-para-border-custom-setting']);
}
else if (_this.ulelementShading.value === 'Table') {
_this.shadingColorPicker.disabled = false;
_this.previewDivLeftDiagonal.style.display = 'none';
_this.previewDivDiagonalRight.style.display = 'none';
_this.previewDivBottomcenterContainer.style.visibility = 'visible';
_this.previewDivTopCenterContainer.style.visibility = 'visible';
_this.previewVerticalDiv.style.display = '';
_this.previewHorizontalDiv.style.display = '';
_this.previewDivBottomRightContainer.style.left = '110px';
ej2_base_1.classList(_this.noneDivTransparent, ['e-de-table-border-none-setting'], ['e-de-para-border-none-setting']);
ej2_base_1.classList(_this.boxDivTransparent, ['e-de-table-border-box-setting'], ['e-de-para-border-box-setting']);
ej2_base_1.classList(_this.allDivTransparent, ['e-de-table-border-all-setting'], ['e-de-para-border-shadow-setting']);
ej2_base_1.classList(_this.customDivTransparent, ['e-de-table-border-custom-setting'], ['e-de-para-border-custom-setting']);
}
else {
_this.shadingColorPicker.disabled = true;
_this.previewDivBottomcenterContainer.style.visibility = 'hidden';
_this.previewDivTopCenterContainer.style.visibility = 'hidden';
_this.previewVerticalDiv.style.display = 'none';
_this.previewHorizontalDiv.style.display = 'none';
_this.previewLeftDiagonalDiv.style.display = 'none';
_this.previewRightDiagonalDiv.style.display = 'none';
ej2_base_1.classList(_this.noneDivTransparent, ['e-de-para-border-none-setting'], ['e-de-table-border-none-setting']);
ej2_base_1.classList(_this.boxDivTransparent, ['e-de-para-border-box-setting'], ['e-de-table-border-box-setting']);
ej2_base_1.classList(_this.allDivTransparent, ['e-de-para-border-shadow-setting'], ['e-de-table-border-all-setting']);
ej2_base_1.classList(_this.customDivTransparent, ['e-de-para-border-custom-setting'], ['e-de-table-border-custom-setting']);
}
}
};
this.applyPreviewTableBackgroundColor = function (args) {
if (!ej2_base_1.isNullOrUndefined(args.currentValue)) {
var color = args.currentValue.hex;
_this.previewDiv.style.backgroundColor = color;
}
};
this.applyPreviewTableBorderColor = function (args) {
if (!ej2_base_1.isNullOrUndefined(args.currentValue)) {
var color = args.currentValue.hex;
_this.previewDiv.style.borderColor = color;
_this.previewRightDiagonalDiv.style.backgroundColor = color;
_this.previewLeftDiagonalDiv.style.backgroundColor = color;
_this.previewVerticalDiv.style.backgroundColor = color;
_this.previewHorizontalDiv.style.backgroundColor = color;
}
};
this.documentHelper = documentHelper;
}
BordersAndShadingDialog.prototype.getModuleName = function () {
return 'BordersAndShadingDialog';
};
BordersAndShadingDialog.prototype.initBordersAndShadingsDialog = function (localeValue, isRtl) {
this.target = ej2_base_1.createElement('div', {
id: this.documentHelper.owner.containerId + '_table_border_shadings',
className: 'e-de-table-border-shading-dlg'
});
this.displayText = ej2_base_1.createElement('div', {
innerHTML: localeValue.getConstant('Borders'),
className: 'e-de-table-border-heading'
});
this.settingAndPreviewContainer = ej2_base_1.createElement('div', {
className: 'e-de-dlg-row'
});
this.settingsContiner = ej2_base_1.createElement('div', {});
this.styleContainer = ej2_base_1.createElement('div', {});
this.previewContiner = ej2_base_1.createElement('div', {
className: 'e-de-table-border-preview-container'
});
this.previewSubContainer1 = ej2_base_1.createElement('div', {
className: 'e-de-dlg-row'
});
this.previewSubContainer2 = ej2_base_1.createElement('div', {});
this.styleSubContainer = ej2_base_1.createElement('div', {
className: 'e-de-container-row'
});
this.dropdownListDiv = ej2_base_1.createElement('div', {
className: 'e-de-subcontainer-left'
});
this.dropDownList = ej2_base_1.createElement('input', {});
this.widthcontainerDiv = ej2_base_1.createElement('div', {
className: 'e-de-container-row'
});
this.widthNumericDiv = ej2_base_1.createElement('div', {
className: 'e-de-subcontainer-left'
});
this.widthNumeric = ej2_base_1.createElement('input', {});
this.colorDiv = ej2_base_1.createElement('div', {
className: 'e-de-subcontainer-right'
});
this.colorText = ej2_base_1.createElement('div', {
innerHTML: localeValue.getConstant('Color'),
className: 'e-de-table-border-clr-heading'
});
this.borderColorPickerElement = ej2_base_1.createElement('input', {
attrs: { 'type': 'color' },
className: 'e-dlg-clr-pkr-top'
});
this.settingText = ej2_base_1.createElement('div', {
innerHTML: localeValue.getConstant('Setting'),
className: 'e-de-table-setting-heading'
});
this.settingsSubContiner = ej2_base_1.createElement('div', {
className: 'e-de-dlg-row'
});
this.noneDivContainer = ej2_base_1.createElement('div', {
id: this.target.id + '_None_Div_Container'
});
this.noneDiv = ej2_base_1.createElement('div', {
id: this.target.id + '_None_Div',
className: 'e-de-table-border-inside-setting e-de-table-border-setting-genral'
});
this.noneDivLabel = ej2_base_1.createElement('label', {
innerHTML: localeValue.getConstant('None'), className: 'e-de-table-setting-labels-heading',
id: this.target.id + '_None_Div_Label'
});
this.boxDivContainer = ej2_base_1.createElement('div', {
id: this.target.id + '_Box_Div_Container'
});
this.boxDiv = ej2_base_1.createElement('div', {
id: this.target.id + '_Box_Div',
className: 'e-de-table-border-inside-setting e-de-table-border-setting-genral'
});
this.boxDivLabel = ej2_base_1.createElement('label', {
innerHTML: localeValue.getConstant('Box'), className: 'e-de-table-setting-labels-heading',
id: this.target.id + '_Box_Div_Label'
});
this.allDivContainer = ej2_base_1.createElement('div', {
id: this.target.id + '_All_Div_Container'
});
this.allDiv = ej2_base_1.createElement('div', {
id: this.target.id + '_All_Div',
className: 'e-de-table-border-inside-setting e-de-table-border-setting-genral'
});
this.allDivLabel = ej2_base_1.createElement('label', {
innerHTML: localeValue.getConstant('All'), className: 'e-de-table-setting-labels-heading',
id: this.target.id + '_All_Div_Label'
});
this.customDivContainer = ej2_base_1.createElement('div', {
id: this.target.id + '_Custom_Div_Container'
});
this.customDiv = ej2_base_1.createElement('div', {
id: this.target.id + '_Custom_Div',
className: 'e-de-table-border-inside-setting e-de-table-border-setting-genral'
});
this.customDivLabel = ej2_base_1.createElement('label', {
innerHTML: localeValue.getConstant('Custom'), className: 'e-de-table-setting-labels-heading',
id: this.target.id + '_Custom_Div_Label'
});
this.noneDivTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_None_Div_Transparent', className: 'e-icons e-de-table-border-setting e-de-table-border-none-setting'
});
this.boxDivTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_Box_Div_Transparent', className: 'e-icons e-de-table-border-setting e-de-table-border-box-setting'
});
this.allDivTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_All_Div_Transparent', className: 'e-icons e-de-table-border-setting e-de-table-border-all-setting'
});
this.customDivTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_Custom_Div_Transparent', className: 'e-icons e-de-table-border-setting e-de-table-border-custom-setting'
});
Iif (isRtl) {
this.noneDivTransparent.classList.add('e-de-rtl');
this.boxDivTransparent.classList.add('e-de-rtl');
this.allDivTransparent.classList.add('e-de-rtl');
this.customDivTransparent.classList.add('e-de-rtl');
}
this.previewText = ej2_base_1.createElement('div', {
innerHTML: localeValue.getConstant('Preview'), className: 'e-de-table-setting-heading'
});
this.previewDiv = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div', className: 'e-de-border-dlg-preview-div',
styles: 'position: relative'
});
this.previewRightDiagonalDiv = ej2_base_1.createElement('div', {
styles: 'position: absolute;width:1px;height:111px;left: 38px;top: -17px;transform: rotate(135deg); background-color: black',
id: this.target.id + '_Preview_Div_Right_Diagonal',
className: 'e-de-border-dlg-preview-inside-divs'
});
this.previewLeftDiagonalDiv = ej2_base_1.createElement('div', {
styles: 'position: absolute;width: 1px;height: 111px;left: 38px;top: -17px;transform:rotate(45deg); background-color: black',
id: this.target.id + '_Preview_Div_Left_Diagonal',
className: 'e-de-border-dlg-preview-inside-divs'
});
this.previewVerticalDiv = ej2_base_1.createElement('div', {
styles: 'width: 1px;height: 80px;position: absolute;left: 39px;top: -1px; background-color: black',
id: this.target.id + '_Preview_Div_Vertical',
className: 'e-de-border-dlg-preview-inside-divs'
});
this.previewHorizontalDiv = ej2_base_1.createElement('div', {
styles: 'width: 80px;height: 1px;position: absolute;left: -1px;top: 41px; background-color: black',
id: this.target.id + '_Preview_Div_Horizontal',
className: 'e-de-border-dlg-preview-inside-divs'
});
this.previewDivVerticalContainer = ej2_base_1.createElement('div');
this.previewDivTopTopContainer = ej2_base_1.createElement('div', {
styles: 'margin-top: 0',
className: 'e-de-table-border-icon-container',
id: this.target.id + '_Preview_Div_TopTop_Container'
});
this.previewDivTopTop = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_TopTop',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivTopCenterContainer = ej2_base_1.createElement('div', {
className: 'e-de-table-border-icon-container',
id: this.target.id + '_Preview_Div_TopCenter_Container'
});
this.previewDivTopCenter = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_TopCenter',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivTopBottomContainer = ej2_base_1.createElement('div', {
className: 'e-de-table-border-icon-container',
id: this.target.id + '_Preview_Div_TopBottom_Container'
});
this.previewDivTopBottom = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_TopBottom',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivLeftDiagonalContainer = ej2_base_1.createElement('div', {
className: 'e-de-table-border-icon-container',
id: this.target.id + '_Preview_Div_LeftDiagonal_Container'
});
this.previewDivLeftDiagonal = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_LeftDiagonal',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivHorizontalContainer = ej2_base_1.createElement('div', { className: 'e-de-dlg-row' });
this.previewDivBottomLeftContainer = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_BottomLeft_Container',
className: 'e-de-table-border-icon-container'
});
this.previewDivBottomLeft = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_BottomLeft',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivBottomcenterContainer = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_BottomCenter_Container',
className: 'e-de-table-border-icon-container'
});
this.previewDivBottomcenter = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_BottomCenter',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivBottomRightContainer = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_BottomRight_Container',
className: 'e-de-table-border-icon-container'
});
this.previewDivBottomRight = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_BottomRight',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivDiagonalRightContainer = ej2_base_1.createElement('div', {
className: 'e-de-table-border-icon-container',
id: this.target.id + '_Preview_Div_RightDiagonal_Container'
});
this.previewDivDiagonalRight = ej2_base_1.createElement('div', {
id: this.target.id + '_Preview_Div_RightDiagonal',
className: 'e-de-table-border-inside-preview e-de-table-border-preview-genral'
});
this.previewDivTopTopTransParent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivTopTopTransParent',
className: 'e-icons e-de-table-border-preview e-de-table-border-toptop-alignment'
});
this.previewDivTopCenterTransParent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivTopCenterTransParent',
className: 'e-icons e-de-table-border-preview e-de-table-border-topcenter-alignment'
});
this.previewDivTopBottomTransParent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivTopBottomTransParent',
className: 'e-icons e-de-table-border-preview e-de-table-border-topbottom-alignment'
});
this.previewDivLeftDiagonalTransParent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivLeftDiagonalTransParent',
className: 'e-icons e-de-table-border-preview e-de-table-border-diagionalup-alignment'
});
this.previewDivBottomLeftTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivBottomLeftTransparent',
className: 'e-icons e-de-table-border-preview e-de-table-border-bottomleft-alignment'
});
this.previewDivBottomcenterTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivBottomcenterTransparent',
className: 'e-icons e-de-table-border-preview e-de-table-border-bottomcenter-alignment'
});
this.previewDivBottomRightTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivBottomRightTransparent',
className: 'e-icons e-de-table-border-preview e-de-table-border-bottomright-alignment'
});
this.previewDivDiagonalRightTransparent = ej2_base_1.createElement('div', {
id: this.target.id + '_previewDivDiagonalRightTransparent',
className: 'e-icons e-de-table-border-preview e-de-table-border-diagionaldown-alignment'
});
this.shadingContiner = ej2_base_1.createElement('div', {});
this.shadingText = ej2_base_1.createElement('div', {
innerHTML: localeValue.getConstant('Shading'), className: 'e-de-table-border-heading'
});
this.shadings = ej2_base_1.createElement('div', { className: 'e-de-dlg-row' });
this.colorPickerDiv = ej2_base_1.createElement('div', { className: 'e-de-table-border-clr-left-container' });
this.label = ej2_base_1.createElement('div', {
innerHTML: localeValue.getConstant('Fill'), className: 'e-de-table-border-clr-heading'
});
this.shadingColorPickerElement = ej2_base_1.createElement('input', {
attrs: { 'type': 'color' },
id: this.target.id + '_shading_color'
});
this.shdApply = ej2_base_1.createElement('div', {
className: 'e-de-subcontainer-right'
});
var ulelementShading = ej2_base_1.createElement('input', {
id: this.target.id + '_shading'
});
var ulelementShadingValue = [
{ Value: 'Cell', Name: localeValue.getConstant('Cell ') },
{ Value: 'Table', Name: localeValue.getConstant('Table') },
{ Value: 'Paragraph', Name: localeValue.getConstant('Paragraph') }
];
this.shdApply.appendChild(ulelementShading);
this.noneDiv.appendChild(this.noneDivTransparent);
this.boxDiv.appendChild(this.boxDivTransparent);
this.allDiv.appendChild(this.allDivTransparent);
this.customDiv.appendChild(this.customDivTransparent);
this.noneDivContainer.appendChild(this.noneDiv);
this.noneDivContainer.appendChild(this.noneDivLabel);
this.boxDivContainer.appendChild(this.boxDiv);
this.boxDivContainer.appendChild(this.boxDivLabel);
this.allDivContainer.appendChild(this.allDiv);
this.allDivContainer.appendChild(this.allDivLabel);
this.customDivContainer.appendChild(this.customDiv);
this.customDivContainer.appendChild(this.customDivLabel);
this.settingsContiner.appendChild(this.settingText);
this.settingsContiner.appendChild(this.settingsSubContiner);
this.settingsSubContiner.appendChild(this.noneDivContainer);
this.settingsSubContiner.appendChild(this.boxDivContainer);
this.settingsSubContiner.appendChild(this.allDivContainer);
this.settingsSubContiner.appendChild(this.customDivContainer);
this.previewDivBottomcenter.appendChild(this.previewDivBottomcenterTransparent);
this.previewDivBottomRight.appendChild(this.previewDivBottomRightTransparent);
this.previewDivBottomLeft.appendChild(this.previewDivBottomLeftTransparent);
this.previewDivTopTop.appendChild(this.previewDivTopTopTransParent);
this.previewDivTopCenter.appendChild(this.previewDivTopCenterTransParent);
this.previewDivTopBottom.appendChild(this.previewDivTopBottomTransParent);
this.previewDivDiagonalRight.appendChild(this.previewDivDiagonalRightTransparent);
this.previewDivLeftDiagonal.appendChild(this.previewDivLeftDiagonalTransParent);
this.previewDivBottomcenterContainer.appendChild(this.previewDivBottomcenter);
this.previewDivBottomLeftContainer.appendChild(this.previewDivBottomLeft);
this.previewDivBottomRightContainer.appendChild(this.previewDivBottomRight);
this.previewDivDiagonalRightContainer.appendChild(this.previewDivDiagonalRight);
this.previewDivLeftDiagonalContainer.appendChild(this.previewDivLeftDiagonal);
this.previewDivTopBottomContainer.appendChild(this.previewDivTopBottom);
this.previewDivTopCenterContainer.appendChild(this.previewDivTopCenter);
this.previewDivTopTopContainer.appendChild(this.previewDivTopTop);
this.previewContiner.appendChild(this.previewText);
this.previewContiner.appendChild(this.previewSubContainer1);
this.previewSubContainer1.appendChild(this.previewDivVerticalContainer);
this.previewSubContainer1.appendChild(this.previewSubContainer2);
this.previewSubContainer2.appendChild(this.previewDiv);
this.previewSubContainer2.appendChild(this.previewDivHorizontalContainer);
this.previewDiv.appendChild(this.previewLeftDiagonalDiv);
this.previewDiv.appendChild(this.previewRightDiagonalDiv);
this.previewDiv.appendChild(this.previewHorizontalDiv);
this.previewDiv.appendChild(this.previewVerticalDiv);
this.previewDivHorizontalContainer.appendChild(this.previewDivBottomLeftContainer);
this.previewDivHorizontalContainer.appendChild(this.previewDivBottomcenterContainer);
this.previewDivHorizontalContainer.appendChild(this.previewDivBottomRightContainer);
this.previewDivHorizontalContainer.appendChild(this.previewDivDiagonalRightContainer);
this.previewDivVerticalContainer.appendChild(this.previewDivTopTopContainer);
this.previewDivVerticalContainer.appendChild(this.previewDivTopCenterContainer);
this.previewDivVerticalContainer.appendChild(this.previewDivTopBottomContainer);
this.previewDivVerticalContainer.appendChild(this.previewDivLeftDiagonalContainer);
this.shadings.appendChild(this.colorPickerDiv);
this.colorPickerDiv.appendChild(this.label);
this.colorPickerDiv.appendChild(this.shadingColorPickerElement);
this.shadings.appendChild(this.shdApply);
this.shadingContiner.appendChild(this.shadingText);
this.shadingContiner.appendChild(this.shadings);
this.styleContainer.appendChild(this.styleSubContainer);
this.styleSubContainer.appendChild(this.dropdownListDiv);
this.dropdownListDiv.appendChild(this.dropDownList);
this.styleContainer.appendChild(this.widthcontainerDiv);
this.widthcontainerDiv.appendChild(this.widthNumericDiv);
this.widthNumericDiv.appendChild(this.widthNumeric);
this.widthcontainerDiv.appendChild(this.colorDiv);
this.colorDiv.appendChild(this.colorText);
this.colorDiv.appendChild(this.borderColorPickerElement);
this.borderColorPickerElement.setAttribute('aria-label', this.colorText.innerHTML);
this.settingAndPreviewContainer.appendChild(this.settingsContiner);
this.settingAndPreviewContainer.appendChild(this.previewContiner);
this.target.appendChild(this.displayText);
this.target.appendChild(this.settingAndPreviewContainer);
this.target.appendChild(this.styleContainer);
this.target.appendChild(this.shadingContiner);
this.noneDivContainer.addEventListener('click', this.handleSettingCheckBoxActionHandler);
this.boxDivContainer.addEventListener('click', this.handleSettingCheckBoxActionHandler);
this.allDivContainer.addEventListener('click', this.handleSettingCheckBoxActionHandler);
this.customDivContainer.addEventListener('click', this.handleSettingCheckBoxActionHandler);
this.previewDivBottomcenterContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.previewDivBottomLeftContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.previewDivBottomRightContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.previewDivTopTopContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.previewDivTopBottomContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.previewDivTopCenterContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.previewDivDiagonalRightContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.previewDivLeftDiagonalContainer.addEventListener('click', this.handlePreviewCheckBoxActionHandler);
this.borderWidth = new ej2_inputs_1.NumericTextBox({
value: 0.5, min: 0.25, max: 6, decimals: 2, step: 0.25,
floatLabelType: 'Always', placeholder: localeValue.getConstant('Width'),
enablePersistence: false
});
this.borderWidth.appendTo(this.widthNumeric);
var empList = [
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 5.5H98" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'Single' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 5.5H98" stroke-linejoin="round" stroke-dasharray="1 1"/></svg></div>', 'LineStyle': 'Dot' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1347_1852)"><path d="M3.05176e-05 5.5H98" stroke-linejoin="round" stroke-dasharray="4 1"/></g><defs><clipPath id="clip0_1347_1852"><rect width="98" height="10" fill="white"/></clipPath></defs></svg></div>', 'LineStyle': 'DashSmallGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 5.5H98" stroke-linejoin="round" stroke-dasharray="4 4"/></svg></div>', 'LineStyle': 'DashLargeGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 5.5H98" stroke-linejoin="round" stroke-dasharray="7 3 3 3"/></svg></div>', 'LineStyle': 'DashDot' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4.5H98" stroke-linejoin="round" stroke-dasharray="6 2 2 2 2 2"/></svg></div>', 'LineStyle': 'DashDotDot' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 3.5H98" stroke-linejoin="round"/><path d="M0 5.5H98" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'Double' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 5.5H98" stroke-linejoin="round"/><path d="M0 3.5H98" stroke-linejoin="round"/><path d="M0 7.5H98" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'Triple' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4H98" stroke-width="4" stroke-linejoin="round"/><path d="M0 4H98" stroke-width="4" stroke-linejoin="round"/><path d="M0 7.5H98" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'ThinThickSmallGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 6H98" stroke-width="4" stroke-linejoin="round"/><path d="M0 2.5H98" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'ThickThinSmallGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 5H98" stroke-width="4" stroke-linejoin="round"/><path d="M0 1.5H98" stroke-linejoin="round"/><path d="M0 8.5H98" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'ThinThickThinSmallGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 3H98" stroke-width="4" stroke-linejoin="round"/><path d="M0 8H98" stroke-width="2" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'ThickThinMediumGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 7H98" stroke-width="4" stroke-linejoin="round"/><path d="M0 2H98" stroke-width="2" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'ThinThickMediumGap' },
{ 'Svg': '<div class="e-de-svg-border-fill-color"><svg style="width:98%;" height="23" viewBox="0 0 98 23" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M98 8H0V9H98V8ZM98 10H0V14H98V10ZM0 15H98V16H0V15Z" /></svg></div>', 'LineStyle': 'ThinThickThinMediumGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 8.5H98" stroke-linejoin="round"/><path d="M0 3H98" stroke-width="2" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'ThinThickLargeGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 2.5H98" stroke-linejoin="round"/><path d="M0 8H98" stroke-width="2" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'ThickThinLargeGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1347_1892)"><g clip-path="url(#clip0_1407_5)"><path d="M0 0.5H98" stroke-linejoin="round"/><path d="M0 9.5H98" stroke-linejoin="round"/><path d="M0 5H98" stroke-width="2" stroke-linejoin="round"/></g><defs><clipPath id="clip0_1407_5"><rect width="98" height="10" fill="white"/></clipPath></defs></svg></div>', 'LineStyle': 'ThinThickThinLargeGap' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 3H5V4H3V3ZM2 5V4H3V5H2ZM1 6V5H2V6H1ZM1 6V7H0V6H1ZM6 5H5V4H6V5ZM7 6H6V5H7V6ZM9 6V7H7V6H9ZM10 5V6H9V5H10ZM11 4V5H10V4H11ZM13 4H11V3H13V4ZM14 5H13V4H14V5ZM15 6H14V5H15V6ZM17 6V7H15V6H17ZM18 5V6H17V5H18ZM19 4V5H18V4H19ZM21 4H19V3H21V4ZM22 5H21V4H22V5ZM23 6H22V5H23V6ZM25 6V7H23V6H25ZM26 5V6H25V5H26ZM27 4V5H26V4H27ZM29 4H27V3H29V4ZM30 5H29V4H30V5ZM31 6H30V5H31V6ZM33 6V7H31V6H33ZM34 5V6H33V5H34ZM35 4V5H34V4H35ZM37 4H35V3H37V4ZM38 5H37V4H38V5ZM39 6H38V5H39V6ZM41 6V7H39V6H41ZM42 5V6H41V5H42ZM43 4V5H42V4H43ZM45 4H43V3H45V4ZM46 5H45V4H46V5ZM47 6H46V5H47V6ZM49 6V7H47V6H49ZM50 5V6H49V5H50ZM51 4V5H50V4H51ZM53 4H51V3H53V4ZM54 5H53V4H54V5ZM55 6H54V5H55V6ZM57 6V7H55V6H57ZM58 5V6H57V5H58ZM59 4V5H58V4H59ZM61 4H59V3H61V4ZM62 5H61V4H62V5ZM63 6H62V5H63V6ZM65 6V7H63V6H65ZM66 5V6H65V5H66ZM67 4V5H66V4H67ZM69 4H67V3H69V4ZM70 5H69V4H70V5ZM71 6H70V5H71V6ZM73 6V7H71V6H73ZM74 5V6H73V5H74ZM75 4V5H74V4H75ZM77 4H75V3H77V4ZM78 5H77V4H78V5ZM79 6H78V5H79V6ZM81 6V7H79V6H81ZM82 5V6H81V5H82ZM83 4V5H82V4H83ZM85 4H83V3H85V4ZM86 5H85V4H86V5ZM87 6H86V5H87V6ZM89 6V7H87V6H89ZM90 5V6H89V5H90ZM91 4V5H90V4H91ZM93 4H91V3H93V4ZM94 5H93V4H94V5ZM95 6V5H94V6H95ZM95 6V7H97V6H95Z" fill="black"/></svg></div>', 'LineStyle': 'SingleWavy' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 2H5V3H3V2ZM2 4V3H3V4H2ZM2 4V5H1V4H2ZM6 4H5V3H6V4ZM9 4V5H6V4H9ZM10 3V4H9V3H10ZM12 3H10V2H12V3ZM13 4H12V3H13V4ZM16 4V5H13V4H16ZM17 3V4H16V3H17ZM19 3H17V2H19V3ZM20 4H19V3H20V4ZM23 4V5H20V4H23ZM24 3V4H23V3H24ZM26 3H24V2H26V3ZM27 4H26V3H27V4ZM30 4V5H27V4H30ZM31 3V4H30V3H31ZM33 3H31V2H33V3ZM34 4H33V3H34V4ZM37 4V5H34V4H37ZM38 3V4H37V3H38ZM40 3H38V2H40V3ZM41 4H40V3H41V4ZM44 4V5H41V4H44ZM45 3V4H44V3H45ZM47 3H45V2H47V3ZM48 4H47V3H48V4ZM51 4V5H48V4H51ZM52 3V4H51V3H52ZM54 3H52V2H54V3ZM55 4H54V3H55V4ZM58 4V5H55V4H58ZM59 3V4H58V3H59ZM61 3H59V2H61V3ZM62 4H61V3H62V4ZM65 4V5H62V4H65ZM66 3V4H65V3H66ZM68 3H66V2H68V3ZM69 4H68V3H69V4ZM72 4V5H69V4H72ZM73 3V4H72V3H73ZM75 3H73V2H75V3ZM76 4H75V3H76V4ZM79 4V5H76V4H79ZM80 3V4H79V3H80ZM82 3H80V2H82V3ZM83 4H82V3H83V4ZM86 4V5H83V4H86ZM87 3V4H86V3H87ZM89 3H87V2H89V3ZM90 4H89V3H90V4ZM93 4V5H90V4H93ZM94 3V4H93V3H94ZM96 3H94V2H96V3ZM96 3H97V4H96V3ZM2 7H1V8H2V7ZM3 6H2V7H3V6ZM5 6H3V5H5V6ZM6 7H5V6H6V7ZM9 7V8H6V7H9ZM10 6V7H9V6H10ZM12 6H10V5H12V6ZM13 7H12V6H13V7ZM16 7H13V8H16V7ZM17 6H16V7H17V6ZM19 6V5H17V6H19ZM20 7V6H19V7H20ZM23 7H20V8H23V7ZM24 6H23V7H24V6ZM26 6V5H24V6H26ZM27 7V6H26V7H27ZM30 7V8H27V7H30ZM31 6V7H30V6H31ZM33 6H31V5H33V6ZM34 7H33V6H34V7ZM37 7V8H34V7H37ZM38 6V7H37V6H38ZM40 6H38V5H40V6ZM41 7H40V6H41V7ZM44 7H41V8H44V7ZM45 6H44V7H45V6ZM47 6V5H45V6H47ZM48 7V6H47V7H48ZM51 7H48V8H51V7ZM52 6H51V7H52V6ZM54 6V5H52V6H54ZM55 7V6H54V7H55ZM58 7V8H55V7H58ZM59 6V7H58V6H59ZM61 6H59V5H61V6ZM62 7H61V6H62V7ZM65 7V8H62V7H65ZM66 6V7H65V6H66ZM68 6H66V5H68V6ZM69 7H68V6H69V7ZM72 7H69V8H72V7ZM73 6H72V7H73V6ZM75 6V5H73V6H75ZM76 7V6H75V7H76ZM79 7H76V8H79V7ZM80 6H79V7H80V6ZM82 6V5H80V6H82ZM83 7V6H82V7H83ZM86 7V8H83V7H86ZM87 6V7H86V6H87ZM89 6H87V5H89V6ZM90 7H89V6H90V7ZM93 7V8H90V7H93ZM94 6V7H93V6H94ZM96 6H94V5H96V6ZM96 6V7H97V6H96Z" fill="black"/></svg></div>', 'LineStyle': 'DoubleWavy' },
{ 'Svg': '<div class="e-de-svg-border-fill-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3H4V4H3V5H2V6H1V7H0V3ZM3 6V5H4V6H3ZM5 5V6H4V7H9V6H10V7H11V6H12V7H17V6H18V7H19V6H20V7H25V6H26V7H27V6H28V7H33V6H34V7H35V6H36V7H41V6H42V7H43V6H44V7H49V6H50V7H51V6H52V7H57V6H58V7H59V6H60V7H65V6H66V7H67V6H68V7H73V6H74V7H75V6H76V7H81V6H82V7H83V6H84V7H89V6H90V7H91V6H92V7H97V6H98V5V3H95V4H94V3H93V4H92V3H87V4H86V3H85V4H84V3H79V4H78V3H77V4H76V3H71V4H70V3H69V4H68V3H63V4H62V3H61V4H60V3H55V4H54V3H53V4H52V3H47V4H46V3H45V4H44V3H39V4H38V3H37V4H36V3H31V4H30V3H29V4H28V3H23V4H22V3H21V4H20V3H15V4H14V3H13V4H12V3H7V4H6V3H5V4H4V5H5ZM5 5H6V4H5V5ZM12 5V4H11V5H10V6H11V5H12ZM13 5V6H12V5H13ZM13 5V4H14V5H13ZM20 5V4H19V5H18V6H19V5H20ZM21 5H22V4H21V5ZM21 5H20V6H21V5ZM28 5V4H27V5H26V6H27V5H28ZM29 5V6H28V5H29ZM29 5H30V4H29V5ZM36 5V4H35V5H34V6H35V5H36ZM37 5V4H38V5H37ZM37 5H36V6H37V5ZM44 5V4H43V5H42V6H43V5H44ZM45 5V6H44V5H45ZM45 5V4H46V5H45ZM52 5V4H51V5H50V6H51V5H52ZM53 5H54V4H53V5ZM53 5H52V6H53V5ZM60 5V4H59V5H58V6H59V5H60ZM61 5V6H60V5H61ZM61 5H62V4H61V5ZM68 5V4H67V5H66V6H67V5H68ZM69 5V4H70V5H69ZM69 5H68V6H69V5ZM76 5V4H75V5H74V6H75V5H76ZM77 5V6H76V5H77ZM77 5V4H78V5H77ZM84 5V4H83V5H82V6H83V5H84ZM85 5H86V4H85V5ZM85 5H84V6H85V5ZM92 5V4H91V5H90V6H91V5H92ZM93 5V6H92V5H93ZM93 5H94V4H93V5ZM3 6H2V7H3V6Z" /></svg></div>', 'LineStyle': 'DashDotStroked' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 8H98" stroke-width="2" stroke-linejoin="round"/><path d="M0 5H98" stroke="#808080" stroke-width="4" stroke-linejoin="round"/><path d="M0 2H98" stroke="#C0C0C0" stroke-width="2" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'Emboss3D' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 2H98" stroke-width="2" stroke-linejoin="round"/><path d="M0 5H98" stroke="#808080" stroke-width="4" stroke-linejoin="round"/><path d="M0 8H98" stroke="#C0C0C0" stroke-width="2" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'Engrave3D' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 1.5H98" stroke="#A0A0A0" stroke-linejoin="round"/><path d="M0 8.5H98" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'Outset' },
{ 'Svg': '<div class="e-de-svg-border-color"><svg style="width:98%;" height="10" viewBox="0 0 98 10" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 1.5H98" stroke-linejoin="round"/><path d="M0 8.5H98" stroke="#A0A0A0" stroke-linejoin="round"/></svg></div>', 'LineStyle': 'Inset' }
];
this.widthNumeric.setAttribute('aria-labelledby', localeValue.getConstant('width'));
var itemTemplate = ej2_base_1.initializeCSPTemplate(function (data) { return "<div>" + data.Svg + "</div>"; });
this.borderStyle = new ej2_dropdowns_1.DropDownList({
popupHeight: '150px', dataSource: empList,
floatLabelType: 'Always',
fields: { text: 'Svg', value: 'LineStyle' },
itemTemplate: itemTemplate,
valueTemplate: itemTemplate,
placeholder: localeValue.getConstant('Style'),
enableRtl: isRtl
});
this.borderStyle.appendTo(this.dropDownList);
this.dropDownList.setAttribute('aria-lablledby', localeValue.getConstant('Style'));
this.ulelementShading = new ej2_dropdowns_1.DropDownList({
dataSource: ulelementShadingValue,
fields: { text: 'Name', value: 'Value' },
change: this.applyTableCellPreviewBoxes, index: 1,
floatLabelType: 'Always', placeholder: localeValue.getConstant('Apply To'),
enableRtl: isRtl,
htmlAttributes: { 'aria-labelledby': localeValue.getConstant('Apply To') }
});
this.ulelementShading.appendTo(ulelementShading);
var _a = this.documentHelper.owner.documentEditorSettings.colorPickerSettings, columns = _a.columns, createPopupOnClick = _a.createPopupOnClick, cssClass = _a.cssClass, disabled = _a.disabled, enablePersistence = _a.enablePersistence, inline = _a.inline, mode = _a.mode, modeSwitcher = _a.modeSwitcher, noColor = _a.noColor, presetColors = _a.presetColors, showButtons = _a.showButtons;
this.borderColorPicker = new ej2_inputs_2.ColorPicker({
value: '#000000', change: this.applyPreviewTableBorderColor,
enableRtl: isRtl, locale: this.documentHelper.owner.locale, cssClass: 'e-de-dlg-clr-picker',
enableOpacity: false,
mode: mode, modeSwitcher: modeSwitcher, showButtons: showButtons, columns: columns,
createPopupOnClick: createPopupOnClick, disabled: disabled,
enablePersistence: enablePersistence, inline: inline, noColor: noColor, presetColors: presetColors
});
this.documentHelper.borderColorPicker = this.borderColorPicker;
this.borderColorPicker.appendTo(this.borderColorPickerElement);
this.shadingColorPicker = new ej2_inputs_2.ColorPicker({
value: '#FFFFFF', change: this.applyPreviewTableBackgroundColor,
enableRtl: isRtl, locale: this.documentHelper.owner.locale, cssClass: 'e-de-dlg-clr-picker',
enableOpacity: false,
mode: mode, modeSwitcher: modeSwitcher, showButtons: showButtons, columns: columns,
createPopupOnClick: createPopupOnClick, disabled: disabled,
enablePersistence: enablePersistence, inline: inline, noColor: noColor, presetColors: presetColors
});
this.documentHelper.shadingColorPicker = this.shadingColorPicker;
this.shadingColorPicker.appendTo(this.shadingColorPickerElement);
Iif (isRtl) {
this.label.classList.add('e-de-rtl');
}
};
BordersAndShadingDialog.prototype.updateBorder = function (tableBorder, rowBorder) {
Iif (rowBorder.lineStyle === 'Single' && tableBorder.lineStyle === 'None') {
tableBorder.lineStyle = 'Single';
tableBorder.lineWidth = rowBorder.lineWidth;
}
};
BordersAndShadingDialog.prototype.applyFormat = function () {
var editorModule = this.documentHelper.owner.editorModule;
Eif (this.ulelementShading.value !== 'Paragraph') {
editorModule.initComplexHistory('BordersAndShading');
editorModule.isBordersAndShadingDialog = true;
if (this.ulelementShading.value === 'Cell') {
editorModule.onCellFormat(this.cellFormat);
}
else Eif (this.ulelementShading.value === 'Table') {
editorModule.onTableFormat(this.tableFormat, true);
}
Eif (!ej2_base_1.isNullOrUndefined(this.documentHelper.owner.editorHistoryModule.currentHistoryInfo)) {
this.documentHelper.owner.editorHistoryModule.updateComplexHistory();
}
if (this.ulelementShading.value === 'Cell') {
editorModule.isCellFormatApplied = true;
}
else {
editorModule.isCellFormatApplied = false;
}
}
if (this.ulelementShading.value === 'Cell') {
editorModule.isCellFormatApplied = true;
}
else {
editorModule.isCellFormatApplied = false;
}
editorModule.isBordersAndShadingDialog = false;
};
BordersAndShadingDialog.prototype.getBorder = function (type) {
var border = new index_1.WBorder();
border.color = this.borderColorPicker.value;
border.lineStyle = this.borderStyle.value;
border.lineWidth = this.borderWidth.value;
if (type === 'left' || type === 'right') {
border.space = 4;
}
else {
border.space = 1;
}
return border;
};
BordersAndShadingDialog.prototype.checkClassName = function (element) {
return element.classList.contains('e-de-table-border-inside-preview-click');
};
BordersAndShadingDialog.prototype.show = function () {
var localeValue = new ej2_base_1.L10n('documenteditor', this.documentHelper.owner.defaultLocale);
localeValue.setLocale(this.documentHelper.owner.locale);
if (!this.target) {
this.initBordersAndShadingsDialog(localeValue, this.documentHelper.owner.enableRtl);
}
this.loadBordersShadingsPropertiesDialog(localeValue);
this.documentHelper.dialog.content = this.target;
this.documentHelper.dialog.header = localeValue.getConstant('Borders and Shading');
this.documentHelper.dialog.beforeOpen = this.documentHelper.updateFocus;
this.documentHelper.dialog.close = this.closeBordersShadingsDialog;
this.documentHelper.dialog.position = { X: 'center', Y: 'center' };
this.documentHelper.dialog.width = 'auto';
this.documentHelper.dialog.height = 'auto';
this.documentHelper.dialog.buttons = [{
click: this.applyBordersShadingsProperties,
buttonModel: { content: localeValue.getConstant('Ok'), cssClass: 'e-flat e-table-border-shading-okay', isPrimary: true }
},
{
click: this.closeDialog,
buttonModel: { content: localeValue.getConstant('Cancel'), cssClass: 'e-flat e-table-border-shading-cancel' }
}];
this.documentHelper.dialog.dataBind();
this.documentHelper.dialog.show();
};
BordersAndShadingDialog.prototype.onhandleSettingCheckBoxActionClicked = function (event) {
this.handleSettingCheckBoxAction(event);
};
BordersAndShadingDialog.prototype.onhandlePreviewCheckBoxActionClicked = function (event) {
this.handlePreviewCheckBoxAction(event);
};
BordersAndShadingDialog.prototype.updateClassForSettingDivElements = function () {
var settingDivs = this.target.getElementsByClassName('e-de-table-border-inside-setting');
for (var j = 0; j < settingDivs.length; j++) {
if (settingDivs[parseInt(j.toString(), 10)].className.indexOf('e-de-table-border-inside-setting-click') !== -1) {
var tempClassName = settingDivs[parseInt(j.toString(), 10)].className;
tempClassName = tempClassName.replace('e-de-table-border-inside-setting-click', '');
settingDivs[parseInt(j.toString(), 10)].className = tempClassName;
}
}
};
BordersAndShadingDialog.prototype.setSettingPreviewDivElement = function (position) {
switch (position) {
case 'none':
this.previewDivTopTop.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivTopCenter.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivTopBottom.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivLeftDiagonal.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivDiagonalRight.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivBottomRight.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivBottomLeft.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivBottomcenter.classList.remove('e-de-table-border-inside-preview-click');
this.isShowHidePreviewTableElements('none');
break;
case 'box':
this.previewDivTopCenter.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivLeftDiagonal.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivDiagonalRight.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivBottomcenter.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivTopTop.classList.add('e-de-table-border-inside-preview-click');
this.previewDivTopBottom.classList.add('e-de-table-border-inside-preview-click');
this.previewDivBottomRight.classList.add('e-de-table-border-inside-preview-click');
this.previewDivBottomLeft.classList.add('e-de-table-border-inside-preview-click');
this.isShowHidePreviewTableElements('box');
break;
case 'all':
Eif (this.ulelementShading.value === 'Cell' || this.ulelementShading.value === 'Table') {
this.previewDivLeftDiagonal.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivDiagonalRight.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivBottomcenter.classList.add('e-de-table-border-inside-preview-click');
this.previewDivTopTop.classList.add('e-de-table-border-inside-preview-click');
this.previewDivTopBottom.classList.add('e-de-table-border-inside-preview-click');
this.previewDivBottomRight.classList.add('e-de-table-border-inside-preview-click');
this.previewDivBottomLeft.classList.add('e-de-table-border-inside-preview-click');
this.previewDivTopCenter.classList.add('e-de-table-border-inside-preview-click');
this.isShowHidePreviewTableElements('all');
}
else {
this.previewDivLeftDiagonal.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivDiagonalRight.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivBottomcenter.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivTopTop.classList.add('e-de-table-border-inside-preview-click');
this.previewDivTopBottom.classList.add('e-de-table-border-inside-preview-click');
this.previewDivBottomRight.classList.add('e-de-table-border-inside-preview-click');
this.previewDivBottomLeft.classList.add('e-de-table-border-inside-preview-click');
this.previewDivTopCenter.classList.remove('e-de-table-border-inside-preview-click');
this.isShowHidePreviewTableElements('all');
}
break;
}
};
BordersAndShadingDialog.prototype.isShowHidePreviewTableElements = function (settingDiv) {
switch (settingDiv) {
case 'none':
this.previewDiv.style.border = 'none';
this.previewRightDiagonalDiv.style.display = 'none';
this.previewLeftDiagonalDiv.style.display = 'none';
this.previewHorizontalDiv.style.display = 'none';
this.previewVerticalDiv.style.display = 'none';
break;
case 'box':
this.previewDiv.style.border = '1px solid rgba(0, 0, 0, .54)';
this.previewRightDiagonalDiv.style.display = 'none';
this.previewLeftDiagonalDiv.style.display = 'none';
this.previewHorizontalDiv.style.display = 'none';
this.previewVerticalDiv.style.display = 'none';
break;
case 'all':
Eif (this.ulelementShading.value === 'Cell' || this.ulelementShading.value === 'Table') {
this.previewDiv.style.border = '1px solid rgba(0, 0, 0, .54)';
this.previewRightDiagonalDiv.style.display = 'none';
this.previewLeftDiagonalDiv.style.display = 'none';
this.previewHorizontalDiv.style.display = 'block';
this.previewVerticalDiv.style.display = 'block';
}
else {
this.previewDiv.style.border = '1px solid rgba(0, 0, 0, .54)';
this.previewRightDiagonalDiv.style.display = 'none';
this.previewLeftDiagonalDiv.style.display = 'none';
this.previewHorizontalDiv.style.display = 'none';
this.previewVerticalDiv.style.display = 'none';
}
break;
}
};
BordersAndShadingDialog.prototype.handlePreviewCheckBoxShowHide = function (tableBorderDialogId, compareClass, element) {
if (element.classList.contains(compareClass)) {
element.classList.remove(compareClass);
}
else {
element.classList.add(compareClass);
}
};
BordersAndShadingDialog.prototype.showHidePreviewDivElements = function (tableBorderDialogId, compareClass, elementClass, compareElementClass, position) {
var setElement = document.getElementById(tableBorderDialogId + elementClass);
var compareElement = document.getElementById(tableBorderDialogId + compareElementClass);
if (position === 'TopTop') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'border-top');
}
else if (position === 'TopCenter') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'display');
}
else if (position === 'TopBottom') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'border-bottom');
}
else if (position === 'LeftDiagonal') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'display');
}
else if (position === 'BottomLeft') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'border-left');
}
else if (position === 'BottomCenter') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'display');
}
else if (position === 'BottomRight') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'border-right');
}
else Eif (position === 'RightDiagonal') {
this.setPropertyPreviewDivElement(setElement, compareElement, compareClass, 'display');
}
};
BordersAndShadingDialog.prototype.setPropertyPreviewDivElement = function (ele, compareElement, compareClass, property) {
Iif (compareElement.classList.contains(compareClass) && property.split('-')[0] === 'border') {
ele.style["" + property] = '1px solid rgba(0, 0, 0, .54)';
}
else if (compareElement.classList.contains(compareClass) && property === 'display') {
ele.style["" + property] = 'block';
}
else {
ele.style["" + property] = 'none';
}
};
BordersAndShadingDialog.prototype.loadBordersShadingsPropertiesDialog = function (localeValue) {
var lineStyle;
var borderColor;
var fillColor;
var borderWidth;
if (!ej2_base_1.isNullOrUndefined(this.documentHelper.selection.tableFormat.table)) {
this.shadingContiner.style.display = 'block';
this.ulelementShading.dataSource = [
{ Value: 'Cell', Name: localeValue.getConstant('Cell') },
{ Value: 'Table', Name: localeValue.getConstant('Table') },
{ Value: 'Paragraph', Name: localeValue.getConstant('Paragraph') }
];
this.ulelementShading.dataBind();
var tableFormat = this.documentHelper.selection.tableFormat.table.tableFormat;
Eif (!ej2_base_1.isNullOrUndefined(tableFormat) && !ej2_base_1.isNullOrUndefined(tableFormat.borders)) {
this.cloneBorders(tableFormat.borders);
Iif (ej2_base_1.isNullOrUndefined(tableFormat.borders) || ej2_base_1.isNullOrUndefined(tableFormat.borders.top)) {
lineStyle = 0;
borderColor = '#000000';
borderWidth = 0;
fillColor = '#000000';
}
else {
lineStyle = this.getLineStyle(tableFormat.borders.top.lineStyle);
borderColor = tableFormat.borders.top.color;
borderWidth = tableFormat.borders.top.getLineWidth();
fillColor = tableFormat.shading.backgroundColor;
}
this.ulelementShading.value = 'Table';
this.shadingColorPicker.value = fillColor;
this.shadingColorPicker.disabled = false;
}
}
else {
this.shadingContiner.style.display = 'none';
this.ulelementShading.dataSource = [
{ Value: 'Paragraph', Name: localeValue.getConstant('Paragraph') }
];
this.ulelementShading.dataBind();
var paraFormat = this.documentHelper.selection.start.paragraph.paragraphFormat;
this.ulelementShading.value = 'Paragraph';
this.cloneBorders(paraFormat.borders);
var border = this.getSelectionBorderFormat();
Eif (!border.hasValues()) {
lineStyle = 0;
borderColor = '#000000';
borderWidth = 0.5;
}
else {
lineStyle = this.getLineStyle(border.lineStyle);
borderColor = border.color;
borderWidth = border.lineWidth;
}
this.shadingColorPicker.disabled = true;
}
this.borderColorPicker.value = borderColor;
this.previewDivLeftDiagonal.style.display = 'none';
this.previewDivDiagonalRight.style.display = 'none';
this.borderWidth.value = borderWidth;
this.borderStyle.index = lineStyle;
};
BordersAndShadingDialog.prototype.getSelectionBorderFormat = function () {
var border = new index_1.WBorder();
var borders = this.documentHelper.selection.paragraphFormat.borders;
Iif (borders.top.lineStyle !== 'None') {
return this.copyToBorder(border, borders.top);
}
else Iif (borders.left.lineStyle !== 'None') {
return this.copyToBorder(border, borders.left);
}
else Iif (borders.bottom.lineStyle !== 'None') {
return this.copyToBorder(border, borders.bottom);
}
else Iif (borders.right.lineStyle !== 'None') {
return this.copyToBorder(border, borders.right);
}
return border;
};
BordersAndShadingDialog.prototype.copyToBorder = function (border, selectionBorder) {
if (!ej2_base_1.isNullOrUndefined(selectionBorder.lineStyle)) {
border.lineStyle = selectionBorder.lineStyle;
}
if (!ej2_base_1.isNullOrUndefined(selectionBorder.color)) {
border.color = selectionBorder.color;
}
if (!ej2_base_1.isNullOrUndefined(selectionBorder.lineWidth)) {
border.lineWidth = selectionBorder.lineWidth;
}
return border;
};
BordersAndShadingDialog.prototype.cloneBorders = function (borders) {
var topBorder = false;
var bottomBorder = false;
var leftBorder = false;
var rightBorder = false;
var horizontalBorder = false;
var verticalBorder = false;
var diagonalDownBorder = false;
var customBorder = false;
var diagonalUpBorder = false;
Eif (borders !== null) {
if (borders.top && (borders.top.hasNoneStyle || borders.top.lineStyle !== 'None')) {
topBorder = true;
}
if (borders.bottom && (borders.bottom.hasNoneStyle || borders.bottom.lineStyle !== 'None')) {
bottomBorder = true;
}
if (borders.left && (borders.left.hasNoneStyle || borders.left.lineStyle !== 'None')) {
leftBorder = true;
}
if (borders.right && (borders.right.hasNoneStyle || borders.right.lineStyle !== 'None')) {
rightBorder = true;
}
if (borders.horizontal && (borders.horizontal.hasNoneStyle || borders.horizontal.lineStyle !== 'None')) {
horizontalBorder = true;
}
if (borders.vertical && (borders.vertical.hasNoneStyle || borders.vertical.lineStyle !== 'None')) {
verticalBorder = true;
}
Iif (borders.diagonalDown && (borders.diagonalDown.hasNoneStyle || borders.diagonalDown.lineStyle !== 'None')) {
diagonalDownBorder = true;
}
Iif (borders.diagonalUp && (borders.diagonalUp.hasNoneStyle || borders.diagonalUp.lineStyle !== 'None')) {
diagonalUpBorder = true;
}
if (!(!topBorder || !bottomBorder || !leftBorder || !rightBorder)) {
Eif (!(!topBorder || !bottomBorder || !leftBorder || !rightBorder || !horizontalBorder
|| !verticalBorder || diagonalUpBorder || diagonalDownBorder)) {
Eif ((topBorder && bottomBorder && leftBorder && rightBorder && horizontalBorder && verticalBorder
&& !diagonalUpBorder && !diagonalDownBorder)) {
Iif (borders.top.hasNoneStyle && borders.bottom.hasNoneStyle && borders.left.hasNoneStyle
&& borders.right.hasNoneStyle && borders.horizontal.hasNoneStyle && borders.vertical.hasNoneStyle) {
this.setSettingPreviewDivElement('none');
this.customDiv.classList.remove('e-de-table-border-inside-setting-click');
this.noneDiv.classList.add('e-de-table-border-inside-setting-click');
this.boxDiv.classList.remove('e-de-table-border-inside-setting-click');
this.allDiv.classList.remove('e-de-table-border-inside-setting-click');
}
else {
this.setSettingPreviewDivElement('all');
this.allDiv.classList.add('e-de-table-border-inside-setting-click');
this.customDiv.classList.remove('e-de-table-border-inside-setting-click');
this.noneDiv.classList.remove('e-de-table-border-inside-setting-click');
this.boxDiv.classList.remove('e-de-table-border-inside-setting-click');
}
}
}
else if ((leftBorder && bottomBorder && topBorder && rightBorder && !horizontalBorder && !verticalBorder)) {
if (borders.top.hasNoneStyle && borders.bottom.hasNoneStyle && borders.left.hasNoneStyle
&& borders.right.hasNoneStyle && borders.horizontal.hasNoneStyle && borders.vertical.hasNoneStyle) {
this.setSettingPreviewDivElement('none');
this.boxDiv.classList.remove('e-de-table-border-inside-setting-click');
this.allDiv.classList.remove('e-de-table-border-inside-setting-click');
this.customDiv.classList.remove('e-de-table-border-inside-setting-click');
this.noneDiv.classList.add('e-de-table-border-inside-setting-click');
}
else {
this.setSettingPreviewDivElement('box');
this.customDiv.classList.remove('e-de-table-border-inside-setting-click');
this.noneDiv.classList.remove('e-de-table-border-inside-setting-click');
this.boxDiv.classList.add('e-de-table-border-inside-setting-click');
this.allDiv.classList.remove('e-de-table-border-inside-setting-click');
}
}
else {
customBorder = true;
}
}
else {
customBorder = true;
}
this.previewDivLeftDiagonal.classList.remove('e-de-table-border-inside-preview-click');
this.previewDivDiagonalRight.classList.remove('e-de-table-border-inside-preview-click');
if (!topBorder && !bottomBorder && !leftBorder && !rightBorder && !horizontalBorder && !verticalBorder) {
Iif (this.ulelementShading.value === 'Cell' || this.ulelementShading.value === 'Table') {
this.customDiv.classList.remove('e-de-table-border-inside-setting-click');
this.noneDiv.classList.add('e-de-table-border-inside-setting-click');
this.boxDiv.classList.remove('e-de-table-border-inside-setting-click');
this.allDiv.classList.remove('e-de-table-border-inside-setting-click');
}
else {
this.setSettingPreviewDivElement('none');
this.customDiv.classList.remove('e-de-table-border-inside-setting-click');
this.noneDiv.classList.add('e-de-table-border-inside-setting-click');
this.boxDiv.classList.remove('e-de-table-border-inside-setting-click');
this.allDiv.classList.remove('e-de-table-border-inside-setting-click');
}
}
else Iif (customBorder) {
this.customDiv.classList.add('e-de-table-border-inside-setting-click');
this.noneDiv.classList.remove('e-de-table-border-inside-setting-click');
this.boxDiv.classList.remove('e-de-table-border-inside-setting-click');
this.allDiv.classList.remove('e-de-table-border-inside-setting-click');
if (this.ulelementShading.value === 'Cell' || this.ulelementShading.value === 'Table') {
if (topBorder) {
this.previewDivTopTop.classList.add('e-de-table-border-inside-preview-click');
}
else {
this.previewDivTopTop.classList.remove('e-de-table-border-inside-preview-click');
}
}
else {
if (topBorder) {
this.previewDivTopTop.classList.add('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderTop = '1px solid rgba(0,0,0,.54)';
}
else {
this.previewDivTopTop.classList.remove('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderTop = '0px';
}
}
if (this.ulelementShading.value == 'Cell' || this.ulelementShading.value === 'Table') {
if (bottomBorder) {
this.previewDivTopBottom.classList.add('e-de-table-border-inside-preview-click');
}
else {
this.previewDivTopBottom.classList.remove('e-de-table-border-inside-preview-click');
}
}
else {
if (bottomBorder) {
this.previewDivTopBottom.classList.add('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderBottom = '1px solid rgba(0,0,0,.54)';
}
else {
this.previewDivTopBottom.classList.remove('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderBottom = '0px';
}
}
if (this.ulelementShading.value == 'Cell' || this.ulelementShading.value === 'Table') {
if (leftBorder) {
this.previewDivBottomLeft.classList.add('e-de-table-border-inside-preview-click');
}
else {
this.previewDivBottomLeft.classList.remove('e-de-table-border-inside-preview-click');
}
}
else {
if (leftBorder) {
this.previewDivBottomLeft.classList.add('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderLeft = '1px solid rgba(0,0,0,.54)';
}
else {
this.previewDivBottomLeft.classList.remove('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderLeft = '0px';
}
}
if (this.ulelementShading.value == 'Cell' || this.ulelementShading.value === 'Table') {
if (rightBorder) {
this.previewDivBottomRight.classList.add('e-de-table-border-inside-preview-click');
}
else {
this.previewDivBottomRight.classList.remove('e-de-table-border-inside-preview-click');
}
}
else {
if (rightBorder) {
this.previewDivBottomRight.classList.add('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderRight = '1px solid rgba(0,0,0,.54)';
}
else {
this.previewDivBottomRight.classList.remove('e-de-table-border-inside-preview-click');
this.previewDiv.style.borderRight = '0px';
}
}
if (verticalBorder) {
this.previewDivBottomcenter.classList.add('e-de-table-border-inside-preview-click');
}
else {
this.previewDivBottomcenter.classList.remove('e-de-table-border-inside-preview-click');
}
if (horizontalBorder) {
this.previewDivTopCenter.classList.add('e-de-table-border-inside-preview-click');
}
else {
this.previewDivTopCenter.classList.remove('e-de-table-border-inside-preview-click');
}
}
}
};
BordersAndShadingDialog.prototype.getLineStyle = function (lineStyle) {
switch (lineStyle) {
case 'Single': return 0;
case 'Dot': return 1;
case 'DashSmallGap': return 2;
case 'DashLargeGap': return 3;
case 'DashDot': return 4;
case 'DashDotDot': return 5;
case 'Double': return 6;
case 'Triple': return 7;
case 'ThinThickSmallGap': return 8;
case 'ThickThinSmallGap': return 9;
case 'ThinThickThinSmallGap': return 10;
case 'ThinThickMediumGap': return 11;
case 'ThickThinMediumGap': return 12;
case 'ThinThickThinMediumGap': return 13;
case 'ThinThickLargeGap': return 14;
case 'ThickThinLargeGap': return 15;
case 'ThinThickThinLargeGap': return 16;
case 'SingleWavy': return 17;
case 'DoubleWavy': return 18;
case 'DashDotStroked': return 29;
case 'Emboss3D': return 20;
case 'Engrave3D': return 21;
case 'Outset': return 22;
case 'Inset': return 23;
}
return 0;
};
BordersAndShadingDialog.prototype.destroy = function () {
if (!ej2_base_1.isNullOrUndefined(this.target)) {
if (this.target.parentElement) {
this.target.parentElement.removeChild(this.target);
}
for (var k = 0; k < this.target.childNodes.length; k++) {
this.target.removeChild(this.target.childNodes[k]);
k--;
}
this.target = undefined;
}
if (this.cellFormat) {
this.cellFormat.destroy();
this.cellFormat = undefined;
}
if (this.tableFormat) {
this.tableFormat.destroy();
this.tableFormat = undefined;
}
Iif (this.paragraphFormat) {
this.paragraphFormat.destroy();
this.paragraphFormat = undefined;
}
this.dialog = undefined;
this.target = undefined;
if (!ej2_base_1.isNullOrUndefined(this.borderStyle)) {
this.borderStyle.destroy();
}
this.borderStyle = undefined;
if (!ej2_base_1.isNullOrUndefined(this.borderColorPicker)) {
this.borderColorPicker.destroy();
}
this.borderColorPicker = undefined;
if (!ej2_base_1.isNullOrUndefined(this.shadingColorPicker)) {
this.shadingColorPicker.destroy();
}
this.shadingColorPicker = undefined;
if (!ej2_base_1.isNullOrUndefined(this.ulelementShading)) {
this.ulelementShading.destroy();
}
this.removeEvents();
this.removeElements();
this.ulelementShading = undefined;
this.noneDivTransparent = undefined;
this.boxDivTransparent = undefined;
this.allDivTransparent = undefined;
this.customDivTransparent = undefined;
this.previewDiv = undefined;
this.previewRightDiagonalDiv = undefined;
this.previewLeftDiagonalDiv = undefined;
this.previewVerticalDiv = undefined;
this.previewHorizontalDiv = undefined;
this.previewDivTopTopContainer = undefined;
this.previewDivTopTop = undefined;
this.previewDivTopCenterContainer = undefined;
this.previewDivTopCenter = undefined;
this.previewDivTopBottomContainer = undefined;
this.previewDivTopBottom = undefined;
this.previewDivLeftDiagonalContainer = undefined;
this.previewDivLeftDiagonal = undefined;
this.previewDivBottomLeftContainer = undefined;
this.previewDivBottomLeft = undefined;
this.previewDivBottomcenterContainer = undefined;
this.previewDivBottomcenter = undefined;
this.previewDivBottomRightContainer = undefined;
this.previewDivBottomRight = undefined;
this.previewDivDiagonalRightContainer = undefined;
this.previewDivDiagonalRight = undefined;
this.previewDivTopTopTransParent = undefined;
this.previewDivTopCenterTransParent = undefined;
this.previewDivTopBottomTransParent = undefined;
this.previewDivLeftDiagonalTransParent = undefined;
this.previewDivBottomLeftTransparent = undefined;
this.previewDivBottomcenterTransparent = undefined;
this.previewDivBottomRightTransparent = undefined;
this.previewDivDiagonalRightTransparent = undefined;
this.shadingContiner = undefined;
this.noneDiv = undefined;
this.customDiv = undefined;
this.allDiv = undefined;
this.boxDiv = undefined;
this.displayText = undefined;
this.settingAndPreviewContainer = undefined;
this.settingsContiner = undefined;
this.styleContainer = undefined;
this.previewContiner = undefined;
this.previewSubContainer1 = undefined;
this.previewSubContainer2 = undefined;
this.styleSubContainer = undefined;
this.dropdownListDiv = undefined;
this.dropDownList = undefined;
this.widthcontainerDiv = undefined;
this.widthNumericDiv = undefined;
this.widthNumeric = undefined;
this.colorDiv = undefined;
this.colorText = undefined;
this.borderColorPickerElement = undefined;
this.settingText = undefined;
this.settingsSubContiner = undefined;
this.noneDivContainer = undefined;
this.noneDivLabel = undefined;
this.boxDivContainer = undefined;
this.boxDivLabel = undefined;
this.allDivContainer = undefined;
this.allDivLabel = undefined;
this.customDivContainer = undefined;
this.customDivLabel = undefined;
this.previewDivHorizontalContainer = undefined;
this.previewDivVerticalContainer = undefined;
this.previewText = undefined;
this.shadingText = undefined;
this.shadings = undefined;
this.colorPickerDiv = undefined;
this.label = undefined;
this.shadingColorPickerElement = undefined;
this.shdApply = undefined;
this.documentHelper = undefined;
};
BordersAndShadingDialog.prototype.removeEvents = function () {
if (this.noneDivContainer) {
this.noneDivContainer.removeEventListener('click', this.handleSettingCheckBoxActionHandler);
}
if (this.boxDivContainer) {
this.boxDivContainer.removeEventListener('click', this.handleSettingCheckBoxActionHandler);
}
if (this.allDivContainer) {
this.allDivContainer.removeEventListener('click', this.handleSettingCheckBoxActionHandler);
}
if (this.customDivContainer) {
this.customDivContainer.removeEventListener('click', this.handleSettingCheckBoxActionHandler);
}
if (this.previewDivBottomcenterContainer) {
this.previewDivBottomcenterContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
if (this.previewDivBottomLeftContainer) {
this.previewDivBottomLeftContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
if (this.previewDivBottomRightContainer) {
this.previewDivBottomRightContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
if (this.previewDivTopBottomContainer) {
this.previewDivTopBottomContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
if (this.previewDivTopCenterContainer) {
this.previewDivTopCenterContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
if (this.previewDivTopTopContainer) {
this.previewDivTopTopContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
if (this.previewDivDiagonalRightContainer) {
this.previewDivDiagonalRightContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
if (this.previewDivLeftDiagonalContainer) {
this.previewDivLeftDiagonalContainer.removeEventListener('click', this.handlePreviewCheckBoxActionHandler);
}
};
BordersAndShadingDialog.prototype.removeElements = function () {
if (this.noneDivTransparent) {
this.noneDivTransparent.remove();
this.noneDivTransparent = undefined;
}
if (this.boxDivTransparent) {
this.boxDivTransparent.remove();
this.boxDivTransparent = undefined;
}
if (this.allDivTransparent) {
this.allDivTransparent.remove();
this.allDivTransparent = undefined;
}
if (this.customDivTransparent) {
this.customDivTransparent.remove();
this.customDivTransparent = undefined;
}
if (this.previewDiv) {
this.previewDiv.remove();
this.previewDiv = undefined;
}
if (this.previewRightDiagonalDiv) {
this.previewRightDiagonalDiv.remove();
this.previewRightDiagonalDiv = undefined;
}
if (this.previewLeftDiagonalDiv) {
this.previewLeftDiagonalDiv.remove();
this.previewLeftDiagonalDiv = undefined;
}
if (this.previewVerticalDiv) {
this.previewVerticalDiv.remove();
this.previewVerticalDiv = undefined;
}
if (this.previewHorizontalDiv) {
this.previewHorizontalDiv.remove();
this.previewHorizontalDiv = undefined;
}
if (this.previewDivTopTopContainer) {
this.previewDivTopTopContainer.remove();
this.previewDivTopTopContainer = undefined;
}
if (this.previewDivTopTop) {
this.previewDivTopTop.remove();
this.previewDivTopTop = undefined;
}
if (this.previewDivTopCenterContainer) {
this.previewDivTopCenterContainer.remove();
this.previewDivTopCenterContainer = undefined;
}
if (this.previewDivTopCenter) {
this.previewDivTopCenter.remove();
this.previewDivTopCenter = undefined;
}
if (this.previewDivTopBottomContainer) {
this.previewDivTopBottomContainer.remove();
this.previewDivTopBottomContainer = undefined;
}
if (this.previewDivTopBottom) {
this.previewDivTopBottom.remove();
this.previewDivTopBottom = undefined;
}
if (this.previewDivLeftDiagonalContainer) {
this.previewDivLeftDiagonalContainer.remove();
this.previewDivLeftDiagonalContainer = undefined;
}
if (this.previewDivLeftDiagonal) {
this.previewDivLeftDiagonal.remove();
this.previewDivLeftDiagonal = undefined;
}
if (this.previewDivBottomLeftContainer) {
this.previewDivBottomLeftContainer.remove();
this.previewDivBottomLeftContainer = undefined;
}
if (this.previewDivBottomLeft) {
this.previewDivBottomLeft.remove();
this.previewDivBottomLeft = undefined;
}
if (this.previewDivBottomcenterContainer) {
this.previewDivBottomcenterContainer.remove();
this.previewDivBottomcenterContainer = undefined;
}
if (this.previewDivBottomcenter) {
this.previewDivBottomcenter.remove();
this.previewDivBottomcenter = undefined;
}
if (this.previewDivBottomRightContainer) {
this.previewDivBottomRightContainer.remove();
this.previewDivBottomRightContainer = undefined;
}
if (this.previewDivBottomRight) {
this.previewDivBottomRight.remove();
this.previewDivBottomRight = undefined;
}
if (this.previewDivDiagonalRightContainer) {
this.previewDivDiagonalRightContainer.remove();
this.previewDivDiagonalRightContainer = undefined;
}
if (this.previewDivDiagonalRight) {
this.previewDivDiagonalRight.remove();
this.previewDivDiagonalRight = undefined;
}
if (this.previewDivTopTopTransParent) {
this.previewDivTopTopTransParent.remove();
this.previewDivTopTopTransParent = undefined;
}
if (this.previewDivTopCenterTransParent) {
this.previewDivTopCenterTransParent.remove();
this.previewDivTopCenterTransParent = undefined;
}
if (this.previewDivTopBottomTransParent) {
this.previewDivTopBottomTransParent.remove();
this.previewDivTopBottomTransParent = undefined;
}
if (this.previewDivLeftDiagonalTransParent) {
this.previewDivLeftDiagonalTransParent.remove();
this.previewDivLeftDiagonalTransParent = undefined;
}
if (this.previewDivBottomLeftTransparent) {
this.previewDivBottomLeftTransparent.remove();
this.previewDivBottomLeftTransparent = undefined;
}
if (this.previewDivBottomcenterTransparent) {
this.previewDivBottomcenterTransparent.remove();
this.previewDivBottomcenterTransparent = undefined;
}
if (this.previewDivBottomRightTransparent) {
this.previewDivBottomRightTransparent.remove();
this.previewDivBottomRightTransparent = undefined;
}
if (this.previewDivDiagonalRightTransparent) {
this.previewDivDiagonalRightTransparent.remove();
this.previewDivDiagonalRightTransparent = undefined;
}
if (this.shadingContiner) {
this.shadingContiner.remove();
this.shadingContiner = undefined;
}
if (this.noneDiv) {
this.noneDiv.remove();
this.noneDiv = undefined;
}
if (this.customDiv) {
this.customDiv.remove();
this.customDiv = undefined;
}
if (this.allDiv) {
this.allDiv.remove();
this.allDiv = undefined;
}
if (this.boxDiv) {
this.boxDiv.remove();
this.boxDiv = undefined;
}
if (this.displayText) {
this.displayText.remove();
this.displayText = undefined;
}
if (this.settingAndPreviewContainer) {
this.settingAndPreviewContainer.remove();
this.settingAndPreviewContainer = undefined;
}
if (this.settingsContiner) {
this.settingsContiner.remove();
this.settingsContiner = undefined;
}
if (this.styleContainer) {
this.styleContainer.remove();
this.styleContainer = undefined;
}
if (this.previewContiner) {
this.previewContiner.remove();
this.previewContiner = undefined;
}
if (this.previewSubContainer1) {
this.previewSubContainer1.remove();
this.previewSubContainer1 = undefined;
}
if (this.previewSubContainer2) {
this.previewSubContainer2.remove();
this.previewSubContainer2 = undefined;
}
if (this.styleSubContainer) {
this.styleSubContainer.remove();
this.styleSubContainer = undefined;
}
if (this.dropdownListDiv) {
this.dropdownListDiv.remove();
this.dropdownListDiv = undefined;
}
if (this.dropDownList) {
this.dropDownList.remove();
this.dropDownList = undefined;
}
if (this.widthcontainerDiv) {
this.widthcontainerDiv.remove();
this.widthcontainerDiv = undefined;
}
if (this.widthNumericDiv) {
this.widthNumericDiv.remove();
this.widthNumericDiv = undefined;
}
if (this.widthNumeric) {
this.widthNumeric.remove();
this.widthNumeric = undefined;
}
if (this.colorDiv) {
this.colorDiv.remove();
this.colorDiv = undefined;
}
if (this.colorText) {
this.colorText.remove();
this.colorText = undefined;
}
if (this.borderColorPickerElement) {
this.borderColorPickerElement.remove();
this.borderColorPickerElement = undefined;
}
if (this.settingText) {
this.settingText.remove();
this.settingText = undefined;
}
if (this.settingsSubContiner) {
this.settingsSubContiner.remove();
this.settingsSubContiner = undefined;
}
if (this.noneDivContainer) {
this.noneDivContainer.remove();
this.noneDivContainer = undefined;
}
if (this.noneDivLabel) {
this.noneDivLabel.remove();
this.noneDivLabel = undefined;
}
if (this.boxDivContainer) {
this.boxDivContainer.remove();
this.boxDivContainer = undefined;
}
if (this.boxDivLabel) {
this.boxDivLabel.remove();
this.boxDivLabel = undefined;
}
if (this.allDivContainer) {
this.allDivContainer.remove();
this.allDivContainer = undefined;
}
if (this.allDivLabel) {
this.allDivLabel.remove();
this.allDivLabel = undefined;
}
if (this.customDivContainer) {
this.customDivContainer.remove();
this.customDivContainer = undefined;
}
if (this.customDivLabel) {
this.customDivLabel.remove();
this.customDivLabel = undefined;
}
if (this.previewDivHorizontalContainer) {
this.previewDivHorizontalContainer.remove();
this.previewDivHorizontalContainer = undefined;
}
if (this.previewDivVerticalContainer) {
this.previewDivVerticalContainer.remove();
this.previewDivVerticalContainer = undefined;
}
if (this.previewText) {
this.previewText.remove();
this.previewText = undefined;
}
if (this.shadingText) {
this.shadingText.remove();
this.shadingText = undefined;
}
if (this.shadings) {
this.shadings.remove();
this.shadings = undefined;
}
if (this.colorPickerDiv) {
this.colorPickerDiv.remove();
this.colorPickerDiv = undefined;
}
if (this.label) {
this.label.remove();
this.label = undefined;
}
if (this.shadingColorPickerElement) {
this.shadingColorPickerElement.remove();
this.shadingColorPickerElement = undefined;
}
if (this.shdApply) {
this.shdApply.remove();
this.shdApply = undefined;
}
};
return BordersAndShadingDialog;
}());
exports.BordersAndShadingDialog = BordersAndShadingDialog;
});
|