datatables.net-bm 2.3.7 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/dataTables.bulma.css +77 -52
- package/css/dataTables.bulma.min.css +3 -3
- package/js/dataTables.bulma.js +117 -136
- package/js/dataTables.bulma.min.js +2 -2
- package/js/dataTables.bulma.min.mjs +2 -2
- package/js/dataTables.bulma.mjs +102 -118
- package/package.json +4 -16
package/css/dataTables.bulma.css
CHANGED
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
:root {
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--dt-
|
|
9
|
-
--dt-
|
|
10
|
-
--dt-
|
|
11
|
-
--dt-
|
|
12
|
-
--dt-
|
|
13
|
-
--dt-
|
|
5
|
+
--dt_background-selected: 13, 110, 253;
|
|
6
|
+
--dt_color-selected: 255, 255, 255;
|
|
7
|
+
--dt_link_color-selected: 228, 228, 228;
|
|
8
|
+
--dt-row_background: transparent;
|
|
9
|
+
--dt-row_background-selected: var(--dt_background-selected);
|
|
10
|
+
--dt-row-text_color-selected: var(--dt_color-selected);
|
|
11
|
+
--dt-row-link_color-selected: var(--dt_link_color-selected);
|
|
12
|
+
--dt-row_background-stripe: 0, 0, 0;
|
|
13
|
+
--dt-row_background-hover: 0, 0, 0;
|
|
14
|
+
--dt-column-ordering_background: 0, 0, 0;
|
|
15
|
+
--dt-header-cell_align-items: center;
|
|
16
|
+
--dt-header-cell_vertical-align: middle;
|
|
17
|
+
--dt-html_background: white;
|
|
14
18
|
}
|
|
15
19
|
:root.dark {
|
|
16
|
-
--dt-
|
|
20
|
+
--dt-html_background: rgb(33, 37, 41);
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
table.dataTable tbody td.dt-control {
|
|
@@ -39,12 +43,12 @@ table.dataTable tfoot:empty {
|
|
|
39
43
|
display: none;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
:root.dark table.dataTable td.dt-control:before,
|
|
43
47
|
:root[data-bs-theme=dark] table.dataTable td.dt-control:before,
|
|
44
48
|
:root[data-theme=dark] table.dataTable td.dt-control:before {
|
|
45
49
|
border-left-color: rgba(255, 255, 255, 0.5);
|
|
46
50
|
}
|
|
47
|
-
|
|
51
|
+
:root.dark table.dataTable tr.dt-hasChild td.dt-control:before,
|
|
48
52
|
:root[data-bs-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before,
|
|
49
53
|
:root[data-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before {
|
|
50
54
|
border-top-color: rgba(255, 255, 255, 0.5);
|
|
@@ -78,6 +82,22 @@ div.dt-scroll-body tfoot tr td div.dt-scroll-sizing {
|
|
|
78
82
|
/*! DataTables Bulma integration
|
|
79
83
|
* © SpryMedia Ltd - datatables.net/license
|
|
80
84
|
*/
|
|
85
|
+
:root {
|
|
86
|
+
--dt-order-arrow_color: rgb(51, 51, 51);
|
|
87
|
+
--dt-order-arrow_color-current: rgb(51, 51, 51);
|
|
88
|
+
--dt-order-arrow-height: 7px;
|
|
89
|
+
--dt-order-arrow_opacity: 0.125;
|
|
90
|
+
--dt-order-arrow_opacity-current: 0.65;
|
|
91
|
+
--dt-order-arrow-width: 8px;
|
|
92
|
+
--dt-order-arrow-gap: 1px;
|
|
93
|
+
--dt-order-header_outline-hover: 2px solid rgba(0, 0, 0, 0.05);
|
|
94
|
+
}
|
|
95
|
+
:root.dark, :root[data-bs-theme=dark], :root[data-theme=dark] {
|
|
96
|
+
--dt-order-arrow_color: rgb(229, 233, 238);
|
|
97
|
+
--dt-order-arrow_color-current: rgb(229, 233, 238);
|
|
98
|
+
--dt-order-header_outline-hover: 2px solid rgba(255, 255, 255, 0.05);
|
|
99
|
+
}
|
|
100
|
+
|
|
81
101
|
table.dataTable thead > tr > th:active,
|
|
82
102
|
table.dataTable thead > tr > td:active {
|
|
83
103
|
outline: none;
|
|
@@ -85,20 +105,18 @@ table.dataTable thead > tr > td:active {
|
|
|
85
105
|
table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before,
|
|
86
106
|
table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:before,
|
|
87
107
|
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
content: "\25B2"/"";
|
|
108
|
+
bottom: calc(50% + var(--dt-order-arrow-gap));
|
|
109
|
+
border-bottom: var(--dt-order-arrow-height) solid var(--dt-order-arrow_color);
|
|
110
|
+
border-left: calc(var(--dt-order-arrow-width) / 2) solid transparent;
|
|
111
|
+
border-right: calc(var(--dt-order-arrow-width) / 2) solid transparent;
|
|
93
112
|
}
|
|
94
113
|
table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
|
|
95
114
|
table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order:after,
|
|
96
115
|
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
content: "\25BC"/"";
|
|
116
|
+
top: calc(50% + 1px);
|
|
117
|
+
border-top: var(--dt-order-arrow-height) solid var(--dt-order-arrow_color);
|
|
118
|
+
border-left: calc(var(--dt-order-arrow-width) / 2) solid transparent;
|
|
119
|
+
border-right: calc(var(--dt-order-arrow-width) / 2) solid transparent;
|
|
102
120
|
}
|
|
103
121
|
table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order,
|
|
104
122
|
table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order,
|
|
@@ -106,8 +124,8 @@ table.dataTable thead > tr > td.dt-orderable-desc .dt-column-order,
|
|
|
106
124
|
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order,
|
|
107
125
|
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order {
|
|
108
126
|
position: relative;
|
|
109
|
-
width:
|
|
110
|
-
|
|
127
|
+
width: var(--dt-order-arrow-width);
|
|
128
|
+
align-self: stretch;
|
|
111
129
|
}
|
|
112
130
|
table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-asc .dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-desc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
|
|
113
131
|
table.dataTable thead > tr > td.dt-orderable-asc .dt-column-order:before,
|
|
@@ -118,10 +136,14 @@ table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before,
|
|
|
118
136
|
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:after,
|
|
119
137
|
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:before,
|
|
120
138
|
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
|
|
139
|
+
position: absolute;
|
|
140
|
+
display: block;
|
|
141
|
+
content: " ";
|
|
142
|
+
height: 0;
|
|
143
|
+
width: 0;
|
|
121
144
|
left: 0;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
font-size: 0.8em;
|
|
145
|
+
color: var(--dt-order-arrow_color);
|
|
146
|
+
opacity: var(--dt-order-arrow_opacity);
|
|
125
147
|
}
|
|
126
148
|
table.dataTable thead > tr > th.dt-orderable-asc, table.dataTable thead > tr > th.dt-orderable-desc,
|
|
127
149
|
table.dataTable thead > tr > td.dt-orderable-asc,
|
|
@@ -131,13 +153,18 @@ table.dataTable thead > tr > td.dt-orderable-desc {
|
|
|
131
153
|
table.dataTable thead > tr > th.dt-orderable-asc:hover, table.dataTable thead > tr > th.dt-orderable-desc:hover,
|
|
132
154
|
table.dataTable thead > tr > td.dt-orderable-asc:hover,
|
|
133
155
|
table.dataTable thead > tr > td.dt-orderable-desc:hover {
|
|
134
|
-
outline:
|
|
156
|
+
outline: var(--dt-order-header_outline-hover);
|
|
135
157
|
outline-offset: -2px;
|
|
136
158
|
}
|
|
137
|
-
table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before,
|
|
138
|
-
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before
|
|
159
|
+
table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order:before,
|
|
160
|
+
table.dataTable thead > tr > td.dt-ordering-asc .dt-column-order:before {
|
|
161
|
+
border-bottom-color: var(--dt-order-arrow_color-current);
|
|
162
|
+
opacity: var(--dt-order-arrow_opacity-current);
|
|
163
|
+
}
|
|
164
|
+
table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order:after,
|
|
139
165
|
table.dataTable thead > tr > td.dt-ordering-desc .dt-column-order:after {
|
|
140
|
-
|
|
166
|
+
border-top-color: var(--dt-order-arrow_color-current);
|
|
167
|
+
opacity: var(--dt-order-arrow_opacity-current);
|
|
141
168
|
}
|
|
142
169
|
table.dataTable thead > tr > th.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) .dt-column-order:empty, table.dataTable thead > tr > th.sorting_desc_disabled .dt-column-order:after, table.dataTable thead > tr > th.sorting_asc_disabled .dt-column-order:before,
|
|
143
170
|
table.dataTable thead > tr > td.dt-orderable-none:not(.dt-ordering-asc, .dt-ordering-desc) .dt-column-order:empty,
|
|
@@ -160,7 +187,7 @@ table.dataTable tfoot > tr > td div.dt-column-header,
|
|
|
160
187
|
table.dataTable tfoot > tr > td div.dt-column-footer {
|
|
161
188
|
display: flex;
|
|
162
189
|
justify-content: space-between;
|
|
163
|
-
align-items: var(--dt-header-
|
|
190
|
+
align-items: var(--dt-header-cell_align-items);
|
|
164
191
|
gap: 4px;
|
|
165
192
|
}
|
|
166
193
|
table.dataTable thead > tr > th div.dt-column-header .dt-column-title,
|
|
@@ -196,12 +223,16 @@ div.dt-scroll-body > table.dataTable > thead > tr > td {
|
|
|
196
223
|
:root[data-bs-theme=dark] table.dataTable thead > tr > th.dt-orderable-desc:hover,
|
|
197
224
|
:root[data-bs-theme=dark] table.dataTable thead > tr > td.dt-orderable-asc:hover,
|
|
198
225
|
:root[data-bs-theme=dark] table.dataTable thead > tr > td.dt-orderable-desc:hover {
|
|
199
|
-
outline:
|
|
226
|
+
outline: var(--dt-order-header_outline-hover);
|
|
200
227
|
}
|
|
201
228
|
|
|
202
229
|
/*! DataTables Bulma integration
|
|
203
230
|
* © SpryMedia Ltd - datatables.net/license
|
|
204
231
|
*/
|
|
232
|
+
:root {
|
|
233
|
+
--dt-processing-circle_background: var(--dt-selected_background);
|
|
234
|
+
}
|
|
235
|
+
|
|
205
236
|
div.dt-processing {
|
|
206
237
|
position: absolute;
|
|
207
238
|
top: 50%;
|
|
@@ -225,8 +256,7 @@ div.dt-processing > div:last-child > div {
|
|
|
225
256
|
width: 13px;
|
|
226
257
|
height: 13px;
|
|
227
258
|
border-radius: 50%;
|
|
228
|
-
background: rgb(
|
|
229
|
-
background: rgb(var(--dt-row-selected));
|
|
259
|
+
background: rgb(var(--dt-processing-circle_background));
|
|
230
260
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
231
261
|
}
|
|
232
262
|
div.dt-processing > div:last-child > div:nth-child(1) {
|
|
@@ -339,7 +369,7 @@ table.dataTable thead td,
|
|
|
339
369
|
table.dataTable tfoot th,
|
|
340
370
|
table.dataTable tfoot td {
|
|
341
371
|
text-align: left;
|
|
342
|
-
vertical-align: var(
|
|
372
|
+
vertical-align: var(dt-header-cell_vertical-align);
|
|
343
373
|
}
|
|
344
374
|
table.dataTable thead th.dt-head-left,
|
|
345
375
|
table.dataTable thead td.dt-head-left,
|
|
@@ -423,11 +453,11 @@ table.dataTable tbody td.dt-body-nowrap {
|
|
|
423
453
|
}
|
|
424
454
|
|
|
425
455
|
:root {
|
|
426
|
-
--
|
|
427
|
-
--
|
|
456
|
+
--dt_background-selected: 0, 209, 178;
|
|
457
|
+
--dt_color-selected: 46, 51, 61;
|
|
428
458
|
}
|
|
429
459
|
:root[data-theme=dark] {
|
|
430
|
-
--
|
|
460
|
+
--dt_color-selected: 0, 31, 26;
|
|
431
461
|
}
|
|
432
462
|
|
|
433
463
|
table.dataTable {
|
|
@@ -441,31 +471,26 @@ table.dataTable.table.is-striped > tbody > tr:nth-child(2n) {
|
|
|
441
471
|
background-color: transparent;
|
|
442
472
|
}
|
|
443
473
|
table.dataTable > tbody > tr {
|
|
444
|
-
background-color:
|
|
474
|
+
background-color: var(--dt-row_background);
|
|
445
475
|
}
|
|
446
476
|
table.dataTable > tbody > tr.selected > * {
|
|
447
|
-
box-shadow: inset 0 0 0 9999px rgb(
|
|
448
|
-
|
|
449
|
-
color: rgb(255, 255, 255);
|
|
450
|
-
color: rgb(var(--dt-row-selected-text));
|
|
477
|
+
box-shadow: inset 0 0 0 9999px rgb(var(--dt-row_background-selected));
|
|
478
|
+
color: rgb(var(--dt-row-text_color-selected));
|
|
451
479
|
}
|
|
452
480
|
table.dataTable > tbody > tr.selected a {
|
|
453
|
-
color: rgb(
|
|
454
|
-
color: rgb(var(--dt-row-selected-link));
|
|
481
|
+
color: rgb(var(--dt-row-link_color-selected));
|
|
455
482
|
}
|
|
456
483
|
table.dataTable.is-striped > tbody > tr:nth-child(2n) > * {
|
|
457
|
-
box-shadow: inset 0 0 0 9999px rgba(var(--dt-
|
|
484
|
+
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row_background-stripe), 0.019);
|
|
458
485
|
}
|
|
459
486
|
table.dataTable.is-striped > tbody > tr:nth-child(2n).selected > * {
|
|
460
|
-
box-shadow: inset 0 0 0 9999px rgba(
|
|
461
|
-
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.919);
|
|
487
|
+
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row_background-selected), 0.919);
|
|
462
488
|
}
|
|
463
489
|
table.dataTable.is-hoverable > tbody > tr:hover > * {
|
|
464
|
-
box-shadow: inset 0 0 0 9999px rgba(var(--dt-
|
|
490
|
+
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row_background-hover), 0.075);
|
|
465
491
|
}
|
|
466
492
|
table.dataTable.is-hoverable > tbody > tr.selected:hover > * {
|
|
467
|
-
box-shadow: inset 0 0 0 9999px rgba(
|
|
468
|
-
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.975);
|
|
493
|
+
box-shadow: inset 0 0 0 9999px rgba(var(--dt-row_background-selected), 0.975);
|
|
469
494
|
}
|
|
470
495
|
|
|
471
496
|
div.dt-container div.dt-layout-start > *:not(:last-child) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! DataTables Bulma integration
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
|
-
*/:root{--
|
|
3
|
+
*/:root{--dt_background-selected: 13, 110, 253;--dt_color-selected: 255, 255, 255;--dt_link_color-selected: 228, 228, 228;--dt-row_background: transparent;--dt-row_background-selected: var(--dt_background-selected);--dt-row-text_color-selected: var(--dt_color-selected);--dt-row-link_color-selected: var(--dt_link_color-selected);--dt-row_background-stripe: 0, 0, 0;--dt-row_background-hover: 0, 0, 0;--dt-column-ordering_background: 0, 0, 0;--dt-header-cell_align-items: center;--dt-header-cell_vertical-align: middle;--dt-html_background: white}:root.dark{--dt-html_background: rgb(33, 37, 41)}table.dataTable tbody td.dt-control{text-align:center;cursor:pointer}table.dataTable tbody td.dt-control:before{display:inline-block;box-sizing:border-box;content:"";border-top:5px solid transparent;border-left:10px solid rgba(0, 0, 0, 0.5);border-bottom:5px solid transparent;border-right:0px solid transparent}table.dataTable tbody tr.dt-hasChild td.dt-control:before{border-top:10px solid rgba(0, 0, 0, 0.5);border-left:5px solid transparent;border-bottom:0px solid transparent;border-right:5px solid transparent}table.dataTable tfoot:empty{display:none}:root.dark table.dataTable td.dt-control:before,:root[data-bs-theme=dark] table.dataTable td.dt-control:before,:root[data-theme=dark] table.dataTable td.dt-control:before{border-left-color:rgba(255, 255, 255, 0.5)}:root.dark table.dataTable tr.dt-hasChild td.dt-control:before,:root[data-bs-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before,:root[data-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before{border-top-color:rgba(255, 255, 255, 0.5);border-left-color:transparent}div.dt-scroll{width:100%}div.dt-scroll-body thead tr,div.dt-scroll-body tfoot tr{height:0}div.dt-scroll-body thead tr th,div.dt-scroll-body thead tr td,div.dt-scroll-body tfoot tr th,div.dt-scroll-body tfoot tr td{height:0 !important;padding-top:0px !important;padding-bottom:0px !important;border-top-width:0px !important;border-bottom-width:0px !important}div.dt-scroll-body thead tr th div.dt-scroll-sizing,div.dt-scroll-body thead tr td div.dt-scroll-sizing,div.dt-scroll-body tfoot tr th div.dt-scroll-sizing,div.dt-scroll-body tfoot tr td div.dt-scroll-sizing{height:0 !important;overflow:hidden !important}/*! DataTables Bulma integration
|
|
4
4
|
* © SpryMedia Ltd - datatables.net/license
|
|
5
|
-
|
|
5
|
+
*/:root{--dt-order-arrow_color: rgb(51, 51, 51);--dt-order-arrow_color-current: rgb(51, 51, 51);--dt-order-arrow-height: 7px;--dt-order-arrow_opacity: 0.125;--dt-order-arrow_opacity-current: 0.65;--dt-order-arrow-width: 8px;--dt-order-arrow-gap: 1px;--dt-order-header_outline-hover: 2px solid rgba(0, 0, 0, 0.05)}:root.dark,:root[data-bs-theme=dark],:root[data-theme=dark]{--dt-order-arrow_color: rgb(229, 233, 238);--dt-order-arrow_color-current: rgb(229, 233, 238);--dt-order-header_outline-hover: 2px solid rgba(255, 255, 255, 0.05)}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead>tr>th.dt-orderable-asc .dt-column-order:before,table.dataTable thead>tr>th.dt-ordering-asc .dt-column-order:before,table.dataTable thead>tr>td.dt-orderable-asc .dt-column-order:before,table.dataTable thead>tr>td.dt-ordering-asc .dt-column-order:before{bottom:calc(50% + var(--dt-order-arrow-gap));border-bottom:var(--dt-order-arrow-height) solid var(--dt-order-arrow_color);border-left:calc(var(--dt-order-arrow-width)/2) solid transparent;border-right:calc(var(--dt-order-arrow-width)/2) solid transparent}table.dataTable thead>tr>th.dt-orderable-desc .dt-column-order:after,table.dataTable thead>tr>th.dt-ordering-desc .dt-column-order:after,table.dataTable thead>tr>td.dt-orderable-desc .dt-column-order:after,table.dataTable thead>tr>td.dt-ordering-desc .dt-column-order:after{top:calc(50% + 1px);border-top:var(--dt-order-arrow-height) solid var(--dt-order-arrow_color);border-left:calc(var(--dt-order-arrow-width)/2) solid transparent;border-right:calc(var(--dt-order-arrow-width)/2) solid transparent}table.dataTable thead>tr>th.dt-orderable-asc .dt-column-order,table.dataTable thead>tr>th.dt-orderable-desc .dt-column-order,table.dataTable thead>tr>th.dt-ordering-asc .dt-column-order,table.dataTable thead>tr>th.dt-ordering-desc .dt-column-order,table.dataTable thead>tr>td.dt-orderable-asc .dt-column-order,table.dataTable thead>tr>td.dt-orderable-desc .dt-column-order,table.dataTable thead>tr>td.dt-ordering-asc .dt-column-order,table.dataTable thead>tr>td.dt-ordering-desc .dt-column-order{position:relative;width:var(--dt-order-arrow-width);align-self:stretch}table.dataTable thead>tr>th.dt-orderable-asc .dt-column-order:before,table.dataTable thead>tr>th.dt-orderable-asc .dt-column-order:after,table.dataTable thead>tr>th.dt-orderable-desc .dt-column-order:before,table.dataTable thead>tr>th.dt-orderable-desc .dt-column-order:after,table.dataTable thead>tr>th.dt-ordering-asc .dt-column-order:before,table.dataTable thead>tr>th.dt-ordering-asc .dt-column-order:after,table.dataTable thead>tr>th.dt-ordering-desc .dt-column-order:before,table.dataTable thead>tr>th.dt-ordering-desc .dt-column-order:after,table.dataTable thead>tr>td.dt-orderable-asc .dt-column-order:before,table.dataTable thead>tr>td.dt-orderable-asc .dt-column-order:after,table.dataTable thead>tr>td.dt-orderable-desc .dt-column-order:before,table.dataTable thead>tr>td.dt-orderable-desc .dt-column-order:after,table.dataTable thead>tr>td.dt-ordering-asc .dt-column-order:before,table.dataTable thead>tr>td.dt-ordering-asc .dt-column-order:after,table.dataTable thead>tr>td.dt-ordering-desc .dt-column-order:before,table.dataTable thead>tr>td.dt-ordering-desc .dt-column-order:after{position:absolute;display:block;content:" ";height:0;width:0;left:0;color:var(--dt-order-arrow_color);opacity:var(--dt-order-arrow_opacity)}table.dataTable thead>tr>th.dt-orderable-asc,table.dataTable thead>tr>th.dt-orderable-desc,table.dataTable thead>tr>td.dt-orderable-asc,table.dataTable thead>tr>td.dt-orderable-desc{cursor:pointer}table.dataTable thead>tr>th.dt-orderable-asc:hover,table.dataTable thead>tr>th.dt-orderable-desc:hover,table.dataTable thead>tr>td.dt-orderable-asc:hover,table.dataTable thead>tr>td.dt-orderable-desc:hover{outline:var(--dt-order-header_outline-hover);outline-offset:-2px}table.dataTable thead>tr>th.dt-ordering-asc .dt-column-order:before,table.dataTable thead>tr>td.dt-ordering-asc .dt-column-order:before{border-bottom-color:var(--dt-order-arrow_color-current);opacity:var(--dt-order-arrow_opacity-current)}table.dataTable thead>tr>th.dt-ordering-desc .dt-column-order:after,table.dataTable thead>tr>td.dt-ordering-desc .dt-column-order:after{border-top-color:var(--dt-order-arrow_color-current);opacity:var(--dt-order-arrow_opacity-current)}table.dataTable thead>tr>th.dt-orderable-none:not(.dt-ordering-asc,.dt-ordering-desc) .dt-column-order:empty,table.dataTable thead>tr>th.sorting_desc_disabled .dt-column-order:after,table.dataTable thead>tr>th.sorting_asc_disabled .dt-column-order:before,table.dataTable thead>tr>td.dt-orderable-none:not(.dt-ordering-asc,.dt-ordering-desc) .dt-column-order:empty,table.dataTable thead>tr>td.sorting_desc_disabled .dt-column-order:after,table.dataTable thead>tr>td.sorting_asc_disabled .dt-column-order:before{display:none}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead>tr>th div.dt-column-header,table.dataTable thead>tr>th div.dt-column-footer,table.dataTable thead>tr>td div.dt-column-header,table.dataTable thead>tr>td div.dt-column-footer,table.dataTable tfoot>tr>th div.dt-column-header,table.dataTable tfoot>tr>th div.dt-column-footer,table.dataTable tfoot>tr>td div.dt-column-header,table.dataTable tfoot>tr>td div.dt-column-footer{display:flex;justify-content:space-between;align-items:var(--dt-header-cell_align-items);gap:4px}table.dataTable thead>tr>th div.dt-column-header .dt-column-title,table.dataTable thead>tr>th div.dt-column-footer .dt-column-title,table.dataTable thead>tr>td div.dt-column-header .dt-column-title,table.dataTable thead>tr>td div.dt-column-footer .dt-column-title,table.dataTable tfoot>tr>th div.dt-column-header .dt-column-title,table.dataTable tfoot>tr>th div.dt-column-footer .dt-column-title,table.dataTable tfoot>tr>td div.dt-column-header .dt-column-title,table.dataTable tfoot>tr>td div.dt-column-footer .dt-column-title{flex-grow:1}table.dataTable thead>tr>th div.dt-column-header .dt-column-title:empty,table.dataTable thead>tr>th div.dt-column-footer .dt-column-title:empty,table.dataTable thead>tr>td div.dt-column-header .dt-column-title:empty,table.dataTable thead>tr>td div.dt-column-footer .dt-column-title:empty,table.dataTable tfoot>tr>th div.dt-column-header .dt-column-title:empty,table.dataTable tfoot>tr>th div.dt-column-footer .dt-column-title:empty,table.dataTable tfoot>tr>td div.dt-column-header .dt-column-title:empty,table.dataTable tfoot>tr>td div.dt-column-footer .dt-column-title:empty{display:none}div.dt-scroll-body>table.dataTable>thead>tr>th,div.dt-scroll-body>table.dataTable>thead>tr>td{overflow:hidden}:root.dark table.dataTable thead>tr>th.dt-orderable-asc:hover,:root.dark table.dataTable thead>tr>th.dt-orderable-desc:hover,:root.dark table.dataTable thead>tr>td.dt-orderable-asc:hover,:root.dark table.dataTable thead>tr>td.dt-orderable-desc:hover,:root[data-bs-theme=dark] table.dataTable thead>tr>th.dt-orderable-asc:hover,:root[data-bs-theme=dark] table.dataTable thead>tr>th.dt-orderable-desc:hover,:root[data-bs-theme=dark] table.dataTable thead>tr>td.dt-orderable-asc:hover,:root[data-bs-theme=dark] table.dataTable thead>tr>td.dt-orderable-desc:hover{outline:var(--dt-order-header_outline-hover)}/*! DataTables Bulma integration
|
|
6
6
|
* © SpryMedia Ltd - datatables.net/license
|
|
7
|
-
|
|
7
|
+
*/:root{--dt-processing-circle_background: var(--dt-selected_background)}div.dt-processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-22px;text-align:center;padding:2px;z-index:10}div.dt-processing>div:last-child{position:relative;width:80px;height:15px;margin:1em auto}div.dt-processing>div:last-child>div{position:absolute;top:0;width:13px;height:13px;border-radius:50%;background:rgb(var(--dt-processing-circle_background));animation-timing-function:cubic-bezier(0, 1, 1, 0)}div.dt-processing>div:last-child>div:nth-child(1){left:8px;animation:datatables-loader-1 .6s infinite}div.dt-processing>div:last-child>div:nth-child(2){left:8px;animation:datatables-loader-2 .6s infinite}div.dt-processing>div:last-child>div:nth-child(3){left:32px;animation:datatables-loader-2 .6s infinite}div.dt-processing>div:last-child>div:nth-child(4){left:56px;animation:datatables-loader-3 .6s infinite}@keyframes datatables-loader-1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes datatables-loader-3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes datatables-loader-2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable th,table.dataTable td{box-sizing:border-box}table.dataTable th.dt-type-numeric,table.dataTable th.dt-type-date,table.dataTable td.dt-type-numeric,table.dataTable td.dt-type-date{text-align:right}table.dataTable th.dt-type-numeric div.dt-column-header,table.dataTable th.dt-type-numeric div.dt-column-footer,table.dataTable th.dt-type-date div.dt-column-header,table.dataTable th.dt-type-date div.dt-column-footer,table.dataTable td.dt-type-numeric div.dt-column-header,table.dataTable td.dt-type-numeric div.dt-column-footer,table.dataTable td.dt-type-date div.dt-column-header,table.dataTable td.dt-type-date div.dt-column-footer{flex-direction:row-reverse}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-left div.dt-column-header,table.dataTable th.dt-left div.dt-column-footer,table.dataTable td.dt-left div.dt-column-header,table.dataTable td.dt-left div.dt-column-footer{flex-direction:row}table.dataTable th.dt-center,table.dataTable td.dt-center{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-right div.dt-column-header,table.dataTable th.dt-right div.dt-column-footer,table.dataTable td.dt-right div.dt-column-header,table.dataTable td.dt-right div.dt-column-footer{flex-direction:row-reverse}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-justify div.dt-column-header,table.dataTable th.dt-justify div.dt-column-footer,table.dataTable td.dt-justify div.dt-column-header,table.dataTable td.dt-justify div.dt-column-footer{flex-direction:row}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable th.dt-empty,table.dataTable td.dt-empty{text-align:center;vertical-align:top}table.dataTable thead th,table.dataTable thead td,table.dataTable tfoot th,table.dataTable tfoot td{text-align:left;vertical-align:var(dt-header-cell_vertical-align)}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-left div.dt-column-header,table.dataTable thead th.dt-head-left div.dt-column-footer,table.dataTable thead td.dt-head-left div.dt-column-header,table.dataTable thead td.dt-head-left div.dt-column-footer,table.dataTable tfoot th.dt-head-left div.dt-column-header,table.dataTable tfoot th.dt-head-left div.dt-column-footer,table.dataTable tfoot td.dt-head-left div.dt-column-header,table.dataTable tfoot td.dt-head-left div.dt-column-footer{flex-direction:row}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-right div.dt-column-header,table.dataTable thead th.dt-head-right div.dt-column-footer,table.dataTable thead td.dt-head-right div.dt-column-header,table.dataTable thead td.dt-head-right div.dt-column-footer,table.dataTable tfoot th.dt-head-right div.dt-column-header,table.dataTable tfoot th.dt-head-right div.dt-column-footer,table.dataTable tfoot td.dt-head-right div.dt-column-header,table.dataTable tfoot td.dt-head-right div.dt-column-footer{flex-direction:row-reverse}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-justify div.dt-column-header,table.dataTable thead th.dt-head-justify div.dt-column-footer,table.dataTable thead td.dt-head-justify div.dt-column-header,table.dataTable thead td.dt-head-justify div.dt-column-footer,table.dataTable tfoot th.dt-head-justify div.dt-column-header,table.dataTable tfoot th.dt-head-justify div.dt-column-footer,table.dataTable tfoot td.dt-head-justify div.dt-column-header,table.dataTable tfoot td.dt-head-justify div.dt-column-footer{flex-direction:row}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}:root{--dt_background-selected: 0, 209, 178;--dt_color-selected: 46, 51, 61}:root[data-theme=dark]{--dt_color-selected: 0, 31, 26}table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-spacing:0}table.dataTable.table.is-striped>tbody>tr:nth-child(2n){background-color:transparent}table.dataTable>tbody>tr{background-color:var(--dt-row_background)}table.dataTable>tbody>tr.selected>*{box-shadow:inset 0 0 0 9999px rgb(var(--dt-row_background-selected));color:rgb(var(--dt-row-text_color-selected))}table.dataTable>tbody>tr.selected a{color:rgb(var(--dt-row-link_color-selected))}table.dataTable.is-striped>tbody>tr:nth-child(2n)>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row_background-stripe), 0.019)}table.dataTable.is-striped>tbody>tr:nth-child(2n).selected>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row_background-selected), 0.919)}table.dataTable.is-hoverable>tbody>tr:hover>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row_background-hover), 0.075)}table.dataTable.is-hoverable>tbody>tr.selected:hover>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row_background-selected), 0.975)}div.dt-container div.dt-layout-start>*:not(:last-child){margin-right:1em}div.dt-container div.dt-layout-end>*:not(:first-child){margin-left:1em}div.dt-container div.dt-layout-full{width:100%}div.dt-container div.dt-layout-full>*:only-child{margin-left:auto;margin-right:auto}div.dt-container div.dt-layout-table>div{display:block !important}@media screen and (max-width: 767px){div.dt-container div.dt-layout-start>*:not(:last-child){margin-right:0}div.dt-container div.dt-layout-end>*:not(:first-child){margin-left:0}}@media screen and (max-width: 767px){div.dt-container>div.columns:not(.dt-layout-table)>div.column{display:block !important;text-align:center}}div.dt-container{position:relative}div.dt-container>div.columns{margin-bottom:0 !important}div.dt-container div.dt-length label{font-weight:normal;text-align:left;white-space:nowrap}div.dt-container div.dt-length div{vertical-align:middle}div.dt-container div.dt-length select{width:auto;display:inline-block;vertical-align:middle}div.dt-container div.dt-search label{font-weight:normal;white-space:nowrap;text-align:left}div.dt-container div.dt-search input{margin-left:.5em;width:auto;vertical-align:middle}div.dt-container div.dt-paging ul{justify-content:flex-end;list-style:none;margin:0}div.dt-container div.dt-processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}div.dt-container.dt-empty-footer tbody>tr:last-child>*{border-bottom:1px solid var(--bulma-border)}div.dt-scroll-head table.dataTable{margin-bottom:0 !important}div.dt-container.dt-empty-footer div.dt-scroll-body{border-bottom:1px solid var(--bulma-border)}div.dt-scroll-body table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dt-scroll-body table thead .sorting:before,div.dt-scroll-body table thead .sorting_asc:before,div.dt-scroll-body table thead .sorting_desc:before,div.dt-scroll-body table thead .sorting:after,div.dt-scroll-body table thead .sorting_asc:after,div.dt-scroll-body table thead .sorting_desc:after{display:none}div.dt-scroll-body table tbody tr:first-child th,div.dt-scroll-body table tbody tr:first-child td{border-top:none}div.dt-scroll-body table tbody>tr:last-child>*{border-bottom-width:0 !important}div.dt-scroll-foot>.dt-scroll-footInner{box-sizing:content-box}div.dt-scroll-foot>.dt-scroll-footInner>table{margin-top:0 !important;border-top:none}
|
package/js/dataTables.bulma.js
CHANGED
|
@@ -1,173 +1,154 @@
|
|
|
1
|
-
/*! DataTables Bulma integration
|
|
1
|
+
/*! DataTables Bulma integration 3.0.0-beta.1
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
(function(
|
|
6
|
-
if (
|
|
5
|
+
(function(factory){
|
|
6
|
+
if (typeof define === 'function' && define.amd) {
|
|
7
7
|
// AMD
|
|
8
|
-
define(
|
|
9
|
-
return factory(
|
|
10
|
-
}
|
|
8
|
+
define(['datatables.net'], function (dt) {
|
|
9
|
+
return factory(window, document, dt);
|
|
10
|
+
});
|
|
11
11
|
}
|
|
12
|
-
else if (
|
|
12
|
+
else if (typeof exports === 'object') {
|
|
13
13
|
// CommonJS
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
require('datatables.net')(root, $);
|
|
14
|
+
var cjsRequires = function (root) {
|
|
15
|
+
if (! root.DataTable) {
|
|
16
|
+
require('datatables.net')(root);
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
|
|
21
20
|
if (typeof window === 'undefined') {
|
|
22
|
-
module.exports = function (root
|
|
23
|
-
if (
|
|
21
|
+
module.exports = function (root) {
|
|
22
|
+
if (! root) {
|
|
24
23
|
// CommonJS environments without a window global must pass a
|
|
25
24
|
// root. This will give an error otherwise
|
|
26
25
|
root = window;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
cjsRequires( root, $ );
|
|
34
|
-
return factory( $, root, root.document );
|
|
28
|
+
cjsRequires(root);
|
|
29
|
+
return factory(root, root.document, root.DataTable);
|
|
35
30
|
};
|
|
36
31
|
}
|
|
37
32
|
else {
|
|
38
|
-
cjsRequires(
|
|
39
|
-
module.exports = factory(
|
|
33
|
+
cjsRequires(window);
|
|
34
|
+
module.exports = factory(window, window.document, window.DataTable);
|
|
40
35
|
}
|
|
41
36
|
}
|
|
42
37
|
else {
|
|
43
38
|
// Browser
|
|
44
|
-
factory(
|
|
39
|
+
factory(window, document, window.DataTable);
|
|
45
40
|
}
|
|
46
|
-
}(function(
|
|
41
|
+
}(function(window, document, DataTable) {
|
|
47
42
|
'use strict';
|
|
48
|
-
var DataTable = $.fn.dataTable;
|
|
49
|
-
|
|
50
43
|
|
|
51
44
|
|
|
52
45
|
/* Set the defaults for DataTables initialisation */
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
DataTable.util.object.assignDeep(DataTable.defaults, {
|
|
47
|
+
renderer: 'bulma'
|
|
48
|
+
});
|
|
58
49
|
/* Default class modification */
|
|
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
|
-
|
|
50
|
+
DataTable.util.object.assignDeep(DataTable.ext.classes, {
|
|
51
|
+
container: 'dt-container dt-bulma',
|
|
52
|
+
search: {
|
|
53
|
+
input: 'input'
|
|
54
|
+
},
|
|
55
|
+
layout: {
|
|
56
|
+
row: 'columns is-multiline',
|
|
57
|
+
cell: 'is-flex is-justify-content-space-between is-align-items-center',
|
|
58
|
+
tableRow: 'dt-layout-table',
|
|
59
|
+
tableCell: 'column is-full',
|
|
60
|
+
start: 'dt-layout-start column is-narrow',
|
|
61
|
+
end: 'dt-layout-end column is-narrow',
|
|
62
|
+
full: 'dt-layout-full column is-full'
|
|
63
|
+
},
|
|
64
|
+
length: {
|
|
65
|
+
input: 'custom-select custom-select-sm form-control form-control-sm'
|
|
66
|
+
},
|
|
67
|
+
processing: {
|
|
68
|
+
container: 'dt-processing card'
|
|
69
|
+
},
|
|
70
|
+
paging: {
|
|
71
|
+
nav: 'pagination'
|
|
72
|
+
}
|
|
73
|
+
});
|
|
85
74
|
DataTable.ext.renderer.pagingButton.bulma = function (settings, buttonType, content, active, disabled) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
display: li,
|
|
103
|
-
clicker: a
|
|
104
|
-
};
|
|
75
|
+
var btnClasses = ['pagination-link'];
|
|
76
|
+
if (active) {
|
|
77
|
+
btnClasses.push('is-current');
|
|
78
|
+
}
|
|
79
|
+
var li = DataTable.Dom.c('li');
|
|
80
|
+
var a = DataTable.Dom
|
|
81
|
+
.c('a')
|
|
82
|
+
.classAdd(btnClasses.join(' '))
|
|
83
|
+
.attr('href', disabled ? null : '#')
|
|
84
|
+
.attr('disabled', disabled ? 'disabled' : null)
|
|
85
|
+
.html(content)
|
|
86
|
+
.appendTo(li);
|
|
87
|
+
return {
|
|
88
|
+
display: li.get(0),
|
|
89
|
+
clicker: a.get(0)
|
|
90
|
+
};
|
|
105
91
|
};
|
|
106
|
-
|
|
107
92
|
DataTable.ext.renderer.pagingContainer.bulma = function (settings, buttonEls) {
|
|
108
|
-
|
|
93
|
+
return DataTable.Dom
|
|
94
|
+
.c('ul')
|
|
95
|
+
.classAdd('pagination-list')
|
|
96
|
+
.append(buttonEls)
|
|
97
|
+
.get(0);
|
|
109
98
|
};
|
|
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
|
-
? val.className
|
|
147
|
-
: classes.cell + ' ' + klass
|
|
148
|
-
})
|
|
149
|
-
.css(style)
|
|
150
|
-
.append( val.contents )
|
|
151
|
-
.appendTo( row );
|
|
152
|
-
} );
|
|
99
|
+
DataTable.ext.renderer.layout.bulma = function (settings, container, items) {
|
|
100
|
+
var classes = settings.classes.layout;
|
|
101
|
+
var row = DataTable.Dom
|
|
102
|
+
.c('div')
|
|
103
|
+
.attr('id', items.id || null)
|
|
104
|
+
.classAdd(items.className || classes.row)
|
|
105
|
+
.appendTo(container);
|
|
106
|
+
DataTable.ext.rendererDisplayRowCells(items, function (key, val) {
|
|
107
|
+
var klass = '';
|
|
108
|
+
var style = {};
|
|
109
|
+
if (val.table) {
|
|
110
|
+
row.classAdd(classes.tableRow);
|
|
111
|
+
klass += classes.tableCell + ' ';
|
|
112
|
+
}
|
|
113
|
+
if (key === 'start') {
|
|
114
|
+
klass += classes.start;
|
|
115
|
+
}
|
|
116
|
+
else if (key === 'end') {
|
|
117
|
+
klass += classes.end;
|
|
118
|
+
style.marginLeft = 'auto';
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
klass += classes.full;
|
|
122
|
+
}
|
|
123
|
+
DataTable.Dom
|
|
124
|
+
.c('div')
|
|
125
|
+
.attr({
|
|
126
|
+
id: val.id || null,
|
|
127
|
+
class: val.className
|
|
128
|
+
? val.className
|
|
129
|
+
: classes.cell + ' ' + klass
|
|
130
|
+
})
|
|
131
|
+
.css(style)
|
|
132
|
+
.append(val.contents)
|
|
133
|
+
.appendTo(row);
|
|
134
|
+
});
|
|
153
135
|
};
|
|
154
|
-
|
|
155
|
-
|
|
156
136
|
// JavaScript enhancements on table initialisation
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
137
|
+
DataTable.Dom.s(document).on('init.dt', function (e, ctx) {
|
|
138
|
+
if (e.namespace !== 'dt') {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
var api = new DataTable.Api(ctx);
|
|
142
|
+
// Length menu drop down - needs to be wrapped with a div
|
|
143
|
+
DataTable.Dom
|
|
144
|
+
.s(api.table().container())
|
|
145
|
+
.find('div.dt-length select')
|
|
146
|
+
.each(el => {
|
|
147
|
+
let wrapper = DataTable.Dom.c('div').classAdd('select');
|
|
148
|
+
el.replaceWith(wrapper.get(0));
|
|
149
|
+
wrapper.append(el);
|
|
150
|
+
});
|
|
151
|
+
});
|
|
171
152
|
|
|
172
153
|
|
|
173
154
|
return DataTable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! DataTables Bulma integration
|
|
1
|
+
/*! DataTables Bulma integration 3.0.0-beta.1
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
|
-
(
|
|
4
|
+
(t=>{var n;"function"==typeof define&&define.amd?define(["datatables.net"],function(e){return t(window,document,e)}):"object"==typeof exports?(n=function(e){e.DataTable||require("datatables.net")(e)},"undefined"==typeof window?module.exports=function(e){return e=e||window,n(e),t(0,e.document,e.DataTable)}:(n(window),module.exports=t(window,window.document,window.DataTable))):t(window,document,window.DataTable)})(function(e,t,i){return i.util.object.assignDeep(i.defaults,{renderer:"bulma"}),i.util.object.assignDeep(i.ext.classes,{container:"dt-container dt-bulma",search:{input:"input"},layout:{row:"columns is-multiline",cell:"is-flex is-justify-content-space-between is-align-items-center",tableRow:"dt-layout-table",tableCell:"column is-full",start:"dt-layout-start column is-narrow",end:"dt-layout-end column is-narrow",full:"dt-layout-full column is-full"},length:{input:"custom-select custom-select-sm form-control form-control-sm"},processing:{container:"dt-processing card"},paging:{nav:"pagination"}}),i.ext.renderer.pagingButton.bulma=function(e,t,n,a,l){var o=["pagination-link"],a=(a&&o.push("is-current"),i.Dom.c("li")),o=i.Dom.c("a").classAdd(o.join(" ")).attr("href",l?null:"#").attr("disabled",l?"disabled":null).html(n).appendTo(a);return{display:a.get(0),clicker:o.get(0)}},i.ext.renderer.pagingContainer.bulma=function(e,t){return i.Dom.c("ul").classAdd("pagination-list").append(t).get(0)},i.ext.renderer.layout.bulma=function(e,t,n){var l=e.classes.layout,o=i.Dom.c("div").attr("id",n.id||null).classAdd(n.className||l.row).appendTo(t);i.ext.rendererDisplayRowCells(n,function(e,t){var n="",a={};t.table&&(o.classAdd(l.tableRow),n+=l.tableCell+" "),"start"===e?n+=l.start:"end"===e?(n+=l.end,a.marginLeft="auto"):n+=l.full,i.Dom.c("div").attr({id:t.id||null,class:t.className||l.cell+" "+n}).css(a).append(t.contents).appendTo(o)})},i.Dom.s(t).on("init.dt",function(e,t){"dt"===e.namespace&&(e=new i.Api(t),i.Dom.s(e.table().container()).find("div.dt-length select").each(e=>{var t=i.Dom.c("div").classAdd("select");e.replaceWith(t.get(0)),t.append(e)}))}),i});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! DataTables Bulma integration
|
|
1
|
+
/*! DataTables Bulma integration 3.0.0-beta.1
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import DataTable,{Api,Dom,util}from"datatables.net";DataTable.util.object.assignDeep(DataTable.defaults,{renderer:"bulma"}),DataTable.util.object.assignDeep(DataTable.ext.classes,{container:"dt-container dt-bulma",search:{input:"input"},layout:{row:"columns is-multiline",cell:"is-flex is-justify-content-space-between is-align-items-center",tableRow:"dt-layout-table",tableCell:"column is-full",start:"dt-layout-start column is-narrow",end:"dt-layout-end column is-narrow",full:"dt-layout-full column is-full"},length:{input:"custom-select custom-select-sm form-control form-control-sm"},processing:{container:"dt-processing card"},paging:{nav:"pagination"}}),DataTable.ext.renderer.pagingButton.bulma=function(a,t,e,l,n){var s=["pagination-link"],l=(l&&s.push("is-current"),DataTable.Dom.c("li")),s=DataTable.Dom.c("a").classAdd(s.join(" ")).attr("href",n?null:"#").attr("disabled",n?"disabled":null).html(e).appendTo(l);return{display:l.get(0),clicker:s.get(0)}},DataTable.ext.renderer.pagingContainer.bulma=function(a,t){return DataTable.Dom.c("ul").classAdd("pagination-list").append(t).get(0)},DataTable.ext.renderer.layout.bulma=function(a,t,e){var n=a.classes.layout,s=DataTable.Dom.c("div").attr("id",e.id||null).classAdd(e.className||n.row).appendTo(t);DataTable.ext.rendererDisplayRowCells(e,function(a,t){var e="",l={};t.table&&(s.classAdd(n.tableRow),e+=n.tableCell+" "),"start"===a?e+=n.start:"end"===a?(e+=n.end,l.marginLeft="auto"):e+=n.full,DataTable.Dom.c("div").attr({id:t.id||null,class:t.className||n.cell+" "+e}).css(l).append(t.contents).appendTo(s)})},DataTable.Dom.s(document).on("init.dt",function(a,t){"dt"===a.namespace&&(a=new DataTable.Api(t),DataTable.Dom.s(a.table().container()).find("div.dt-length select").each(a=>{var t=DataTable.Dom.c("div").classAdd("select");a.replaceWith(t.get(0)),t.append(a)}))});export default DataTable;export{Api,DataTable,Dom,util};
|
package/js/dataTables.bulma.mjs
CHANGED
|
@@ -1,133 +1,117 @@
|
|
|
1
|
-
/*! DataTables Bulma integration
|
|
1
|
+
/*! DataTables Bulma integration 3.0.0-beta.1
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import DataTable from 'datatables.net';
|
|
7
|
-
|
|
8
|
-
// Allow reassignment of the $ variable
|
|
9
|
-
let $ = jQuery;
|
|
10
|
-
|
|
5
|
+
import DataTable, {Api, Dom, util} from 'datatables.net';
|
|
11
6
|
|
|
12
7
|
/* Set the defaults for DataTables initialisation */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
DataTable.util.object.assignDeep(DataTable.defaults, {
|
|
9
|
+
renderer: 'bulma'
|
|
10
|
+
});
|
|
18
11
|
/* Default class modification */
|
|
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
|
-
|
|
12
|
+
DataTable.util.object.assignDeep(DataTable.ext.classes, {
|
|
13
|
+
container: 'dt-container dt-bulma',
|
|
14
|
+
search: {
|
|
15
|
+
input: 'input'
|
|
16
|
+
},
|
|
17
|
+
layout: {
|
|
18
|
+
row: 'columns is-multiline',
|
|
19
|
+
cell: 'is-flex is-justify-content-space-between is-align-items-center',
|
|
20
|
+
tableRow: 'dt-layout-table',
|
|
21
|
+
tableCell: 'column is-full',
|
|
22
|
+
start: 'dt-layout-start column is-narrow',
|
|
23
|
+
end: 'dt-layout-end column is-narrow',
|
|
24
|
+
full: 'dt-layout-full column is-full'
|
|
25
|
+
},
|
|
26
|
+
length: {
|
|
27
|
+
input: 'custom-select custom-select-sm form-control form-control-sm'
|
|
28
|
+
},
|
|
29
|
+
processing: {
|
|
30
|
+
container: 'dt-processing card'
|
|
31
|
+
},
|
|
32
|
+
paging: {
|
|
33
|
+
nav: 'pagination'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
45
36
|
DataTable.ext.renderer.pagingButton.bulma = function (settings, buttonType, content, active, disabled) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
display: li,
|
|
63
|
-
clicker: a
|
|
64
|
-
};
|
|
37
|
+
var btnClasses = ['pagination-link'];
|
|
38
|
+
if (active) {
|
|
39
|
+
btnClasses.push('is-current');
|
|
40
|
+
}
|
|
41
|
+
var li = DataTable.Dom.c('li');
|
|
42
|
+
var a = DataTable.Dom
|
|
43
|
+
.c('a')
|
|
44
|
+
.classAdd(btnClasses.join(' '))
|
|
45
|
+
.attr('href', disabled ? null : '#')
|
|
46
|
+
.attr('disabled', disabled ? 'disabled' : null)
|
|
47
|
+
.html(content)
|
|
48
|
+
.appendTo(li);
|
|
49
|
+
return {
|
|
50
|
+
display: li.get(0),
|
|
51
|
+
clicker: a.get(0)
|
|
52
|
+
};
|
|
65
53
|
};
|
|
66
|
-
|
|
67
54
|
DataTable.ext.renderer.pagingContainer.bulma = function (settings, buttonEls) {
|
|
68
|
-
|
|
55
|
+
return DataTable.Dom
|
|
56
|
+
.c('ul')
|
|
57
|
+
.classAdd('pagination-list')
|
|
58
|
+
.append(buttonEls)
|
|
59
|
+
.get(0);
|
|
69
60
|
};
|
|
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
|
-
? val.className
|
|
107
|
-
: classes.cell + ' ' + klass
|
|
108
|
-
})
|
|
109
|
-
.css(style)
|
|
110
|
-
.append( val.contents )
|
|
111
|
-
.appendTo( row );
|
|
112
|
-
} );
|
|
61
|
+
DataTable.ext.renderer.layout.bulma = function (settings, container, items) {
|
|
62
|
+
var classes = settings.classes.layout;
|
|
63
|
+
var row = DataTable.Dom
|
|
64
|
+
.c('div')
|
|
65
|
+
.attr('id', items.id || null)
|
|
66
|
+
.classAdd(items.className || classes.row)
|
|
67
|
+
.appendTo(container);
|
|
68
|
+
DataTable.ext.rendererDisplayRowCells(items, function (key, val) {
|
|
69
|
+
var klass = '';
|
|
70
|
+
var style = {};
|
|
71
|
+
if (val.table) {
|
|
72
|
+
row.classAdd(classes.tableRow);
|
|
73
|
+
klass += classes.tableCell + ' ';
|
|
74
|
+
}
|
|
75
|
+
if (key === 'start') {
|
|
76
|
+
klass += classes.start;
|
|
77
|
+
}
|
|
78
|
+
else if (key === 'end') {
|
|
79
|
+
klass += classes.end;
|
|
80
|
+
style.marginLeft = 'auto';
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
klass += classes.full;
|
|
84
|
+
}
|
|
85
|
+
DataTable.Dom
|
|
86
|
+
.c('div')
|
|
87
|
+
.attr({
|
|
88
|
+
id: val.id || null,
|
|
89
|
+
class: val.className
|
|
90
|
+
? val.className
|
|
91
|
+
: classes.cell + ' ' + klass
|
|
92
|
+
})
|
|
93
|
+
.css(style)
|
|
94
|
+
.append(val.contents)
|
|
95
|
+
.appendTo(row);
|
|
96
|
+
});
|
|
113
97
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
98
|
// JavaScript enhancements on table initialisation
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
99
|
+
DataTable.Dom.s(document).on('init.dt', function (e, ctx) {
|
|
100
|
+
if (e.namespace !== 'dt') {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
var api = new DataTable.Api(ctx);
|
|
104
|
+
// Length menu drop down - needs to be wrapped with a div
|
|
105
|
+
DataTable.Dom
|
|
106
|
+
.s(api.table().container())
|
|
107
|
+
.find('div.dt-length select')
|
|
108
|
+
.each(el => {
|
|
109
|
+
let wrapper = DataTable.Dom.c('div').classAdd('select');
|
|
110
|
+
el.replaceWith(wrapper.get(0));
|
|
111
|
+
wrapper.append(el);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
131
114
|
|
|
132
115
|
|
|
133
116
|
export default DataTable;
|
|
117
|
+
export { Api, DataTable, Dom, util };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datatables.net-bm",
|
|
3
|
-
"description": "DataTables
|
|
3
|
+
"description": "DataTables with styling for [Bulma](https://bulma.io/)",
|
|
4
4
|
"main": "js/dataTables.bulma.js",
|
|
5
5
|
"module": "js/dataTables.bulma.mjs",
|
|
6
6
|
"style": "css/dataTables.bulma.css",
|
|
7
7
|
"types": "./types/dataTables.bulma.d.ts",
|
|
8
|
-
"version": "
|
|
8
|
+
"version": "3.0.0-beta.1",
|
|
9
9
|
"files": [
|
|
10
10
|
"css/**/*.css",
|
|
11
11
|
"js/**/*.js",
|
|
@@ -15,25 +15,13 @@
|
|
|
15
15
|
"keywords": [
|
|
16
16
|
"Bulma",
|
|
17
17
|
"Datatables",
|
|
18
|
-
"jQuery",
|
|
19
18
|
"table",
|
|
20
19
|
"filter",
|
|
21
20
|
"sort"
|
|
22
21
|
],
|
|
23
22
|
"dependencies": {
|
|
24
|
-
"datatables.net": "
|
|
25
|
-
"jquery": ">=1.7"
|
|
23
|
+
"datatables.net": "3.0.0-beta.1"
|
|
26
24
|
},
|
|
27
|
-
"moduleType": [
|
|
28
|
-
"globals",
|
|
29
|
-
"amd",
|
|
30
|
-
"node"
|
|
31
|
-
],
|
|
32
|
-
"ignore": [
|
|
33
|
-
"composer.json",
|
|
34
|
-
"datatables.json",
|
|
35
|
-
"package.json"
|
|
36
|
-
],
|
|
37
25
|
"author": {
|
|
38
26
|
"name": "SpryMedia Ltd",
|
|
39
27
|
"url": "http://datatables.net"
|
|
@@ -43,6 +31,6 @@
|
|
|
43
31
|
"license": "MIT",
|
|
44
32
|
"repository": {
|
|
45
33
|
"type": "git",
|
|
46
|
-
"url": "https://github.com/DataTables/
|
|
34
|
+
"url": "git+https://github.com/DataTables/DataTablesSrc.git"
|
|
47
35
|
}
|
|
48
36
|
}
|