@massimo-cassandro/minimo 0.1.2 → 0.1.3
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/package.json +5 -8
- package/index.js +0 -0
- package/src/components/auto-datatable/auto-datatable.css +0 -355
- package/src/components/auto-datatable/auto-datatable.js +0 -154
- package/src/components/init.js +0 -7
- package/src/components/modal-alert/flash-alerts.js +0 -32
- package/src/components/modal-alert/modal-alert.css +0 -47
- package/src/components/modal-alert/modal-alert.js +0 -85
- package/src/components/modal-alert/svg/check-circle-duotone.svg +0 -1
- package/src/components/modal-alert/svg/info-duotone.svg +0 -1
- package/src/components/modal-alert/svg/question-duotone.svg +0 -1
- package/src/components/modal-alert/svg/warning-duotone.svg +0 -1
- package/src/components/modal-alert/svg/x-circle-duotone.svg +0 -1
- package/src/components/modal-content/modal-content.js +0 -152
- package/src/components/modal-content/modal-content.module.css +0 -142
- package/src/components/recaptcha/recaptcha.css +0 -74
- package/src/components/sf-macro/sf-macro.css +0 -104
- package/src/components/sf-macro/sf-macro.js +0 -44
- package/src/components/vanilla-cookie-consent/cookie-consent.css +0 -20
- package/src/components/vanilla-cookie-consent/cookie-consent.js +0 -76
- package/src/components/vanilla-cookie-consent/render-cookie-list.js +0 -32
- package/src/components/vanilla-cookie-consent/src/cookie-list.js +0 -85
- package/src/components/vanilla-cookie-consent/src/it-translation.js +0 -38
- package/src/components/vanilla-cookie-consent/src/run-analytics.js +0 -54
- package/src/components/vanilla-cookie-consent/src/run-recaptcha.js +0 -71
- package/src/css/alerts.css +0 -95
- package/src/css/anchors.css +0 -40
- package/src/css/buttons/btn-close.css +0 -41
- package/src/css/buttons/buttons.css +0 -187
- package/src/css/buttons/status-buttons.css +0 -107
- package/src/css/container.css +0 -15
- package/src/css/data-formats.css +0 -30
- package/src/css/details.css +0 -19
- package/src/css/dialog-content.css +0 -72
- package/src/css/flex.css +0 -30
- package/src/css/forms/form-edit-info.css +0 -17
- package/src/css/forms/forms.css +0 -315
- package/src/css/forms/select-indicator.svg +0 -3
- package/src/css/grid.css +0 -63
- package/src/css/headings.css +0 -34
- package/src/css/icons.css +0 -114
- package/src/css/inner-nav.css +0 -11
- package/src/css/layout-base.css +0 -11
- package/src/css/overlay.css +0 -11
- package/src/css/reset.css +0 -59
- package/src/css/spinners/TODO spinner-circle.css +0 -54
- package/src/css/spinners/TODO spinner-three-dots.css +0 -14
- package/src/css/spinners/readme.md +0 -1
- package/src/css/spinners/spinner-circle-basic.css +0 -15
- package/src/css/spinners/spinner-trailing-dots.css +0 -51
- package/src/css/spinners/spinner-wrapper.css +0 -20
- package/src/css/svg.css +0 -3
- package/src/css/table.css +0 -66
- package/src/css/text.css +0 -114
- package/src/css/utilities.css +0 -128
- package/src/custom-media-default.css +0 -16
- package/src/custom-properties-default.css +0 -273
- package/src/index-template.css +0 -49
- package/src/js/alert-autoclose.js +0 -9
- package/src/js/create-blurhash-canvas.js +0 -47
- package/src/js/dialog-content.js +0 -82
- package/src/js/dismiss-alerts.js +0 -6
- package/src/js/forms.js +0 -36
- package/src/js/img-viewer-dom-builder.js +0 -196
- package/src/js/inner-nav.js +0 -11
- package/src/js/overlay.js +0 -12
- package/src/js/print-icon.js +0 -51
- package/src/js/spinner.js +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massimo-cassandro/minimo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Light css framework",
|
|
5
5
|
"homepage": "https://github.com/massimo-cassandro/minimo#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"UPD-version": "npx update-version # --config=./dev-utilities.config.mjs",
|
|
15
15
|
"upd@m": "npx upd@m",
|
|
16
|
-
"
|
|
16
|
+
"pre-publish": "bash pre-publish.sh",
|
|
17
|
+
"npm-publish": "npm run pre-publish && (cd dist && npm publish); rm -rf dist"
|
|
17
18
|
},
|
|
18
19
|
"license": "MIT",
|
|
19
20
|
"author": "Massimo Cassandro",
|
|
@@ -24,13 +25,9 @@
|
|
|
24
25
|
"style": "./src/index.css",
|
|
25
26
|
"main": "./src/index.js",
|
|
26
27
|
"files": [
|
|
27
|
-
"
|
|
28
|
-
"./src/css/**/*.*",
|
|
29
|
-
"./src/js/**/*.*",
|
|
30
|
-
"./src/*.css",
|
|
31
|
-
"./*.js"
|
|
28
|
+
"dist/**/*"
|
|
32
29
|
],
|
|
33
30
|
"devDependencies": {
|
|
34
31
|
"@massimo-cassandro/dev-updater": "^2.1.0"
|
|
35
32
|
}
|
|
36
|
-
}
|
|
33
|
+
}
|
package/index.js
DELETED
|
File without changes
|
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
/* stylelint-disable selector-class-pattern */
|
|
2
|
-
/* @import '@massimo-cassandro/auto-datatables-bs5/css/index.css'; */
|
|
3
|
-
|
|
4
|
-
@import '@massimo-cassandro/auto-datatables-bs5/css/crea-datatable.css';
|
|
5
|
-
@import '@massimo-cassandro/auto-datatables-bs5/css/datatable-processing.css';
|
|
6
|
-
@import '@massimo-cassandro/auto-datatables-bs5/css/datatable-controls-bs.css';
|
|
7
|
-
@import '@massimo-cassandro/auto-datatables-bs5/css/datatable-table-bs.css';
|
|
8
|
-
/* @import '@massimo-cassandro/auto-datatables-bs5/css/datatable-sorting.css'; */
|
|
9
|
-
/* @import '@massimo-cassandro/auto-datatables-bs5/css/datatable-pagination-bs.css'; */
|
|
10
|
-
@import '@massimo-cassandro/auto-datatables-bs5/css/datatables-classes.css';
|
|
11
|
-
/* @import '@massimo-cassandro/auto-datatables-bs5/css/datatable-responsive.css'; */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
<div class="dt-container m-datatable" data-cdt-options="..." data-cdt_options="..." data-dt-columns="...">
|
|
16
|
-
<div class="datatable-wrapper no-footer">
|
|
17
|
-
<div class="dt-controls">
|
|
18
|
-
<div class="datatable-length">
|
|
19
|
-
<label>
|
|
20
|
-
<di class=="dt-control-label">Mostra</di>
|
|
21
|
-
<div class="dt-control">
|
|
22
|
-
<select name="cdt-dom-2_length" class="form-control form-control-sm">
|
|
23
|
-
<option value="...">...</option>
|
|
24
|
-
</select>
|
|
25
|
-
</div>
|
|
26
|
-
<div>record per pagina</div>
|
|
27
|
-
</label>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="datatable-filter"><label>
|
|
30
|
-
<div class=="dt-control-label">>Filtra risultati:</div>
|
|
31
|
-
<div class="dt-control">
|
|
32
|
-
<input type="search" class="form-control form-control-sm" placeholder=""></div>
|
|
33
|
-
</label></div>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="dt-table-wrapper">
|
|
36
|
-
<table class="table table-striped table-bordered table-hover dataTable no-footer" >
|
|
37
|
-
...
|
|
38
|
-
</table>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="dataTables_processing">...</div>
|
|
41
|
-
|
|
42
|
-
<div class="dt-footer">
|
|
43
|
-
<div class="dataTables_info" role="status" aria-live="polite">Stai visualizzando...</div>
|
|
44
|
-
|
|
45
|
-
<div class="dataTables_paginate paging_simple_numbers">
|
|
46
|
-
...
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.m-datatable {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/* --datatable-responsive-border-color: #ccc; */
|
|
61
|
-
/* --datatable-processing-padding: 0; */
|
|
62
|
-
/* --datatable-processing-bg: linear-gradient(to right, rgba(#fff, 0) 0%, rgba(#fff, .9) 25%, rgba(#fff, .9) 75%, rgba(#fff, 0) 100%); */
|
|
63
|
-
|
|
64
|
-
/* --sorting-cell-base-padding: .5em; */
|
|
65
|
-
|
|
66
|
-
/* --datatable-active-sorting-color: currentColor; */
|
|
67
|
-
/* --datatable-active-sorting-bg: inherit; */
|
|
68
|
-
/* --datatable-active-sorting-border-bottom: none; */
|
|
69
|
-
|
|
70
|
-
/* --sorting-arrow-size: 4px; */
|
|
71
|
-
/* --datatable-sorting-arrows-color: currentColor; */
|
|
72
|
-
/* --sorting-cell-arrow-padding: var(--sorting-cell-base-padding) 1.5em var(--sorting-cell-base-padding) var(--sorting-cell-base-padding); */
|
|
73
|
-
/* --sorting-arrow-bottom: 50%; */
|
|
74
|
-
|
|
75
|
-
/* --pagination-padding-x: .5rem; */
|
|
76
|
-
--pagination-padding-y: .4rem;
|
|
77
|
-
/* --pagination-font-size: .875rem; */
|
|
78
|
-
|
|
79
|
-
--pagination-color: var(--text-color);
|
|
80
|
-
/* --pagination-bg: #fff; */
|
|
81
|
-
/* --pagination-border-width: 1px; */
|
|
82
|
-
--pagination-border-color: var(--stone-5);
|
|
83
|
-
|
|
84
|
-
/* --pagination-border-radius: .25rem; */
|
|
85
|
-
--pagination-hover-color: var(--accent-3-fg);
|
|
86
|
-
--pagination-hover-bg: var(--accent-3);
|
|
87
|
-
/* --pagination-hover-border-color: var(--pagination-border-color); */
|
|
88
|
-
/* --pagination-focus-color: var(--pagination-hover-color); */
|
|
89
|
-
/* --pagination-focus-bg: var(--pagination-hover-bg); */
|
|
90
|
-
/* --pagination-focus-box-shadow: 0 0 0 .25rem #06407a40; */
|
|
91
|
-
--pagination-active-color: var(--secondary-fg);
|
|
92
|
-
--pagination-active-bg: var(--secondary);
|
|
93
|
-
/* --pagination-active-border-color: #007e8a; */
|
|
94
|
-
/* --pagination-disabled-color: #ababab; */
|
|
95
|
-
/* --pagination-disabled-bg: var(--pagination-hover-bg); */
|
|
96
|
-
/* --pagination-disabled-border-color: var(--pagination-border-color); */
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
--sorting-border-size: 6px;
|
|
100
|
-
--sorting-border-color: var(--secondary);
|
|
101
|
-
|
|
102
|
-
position: relative;
|
|
103
|
-
|
|
104
|
-
.dt-controls {
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-flow: row wrap;
|
|
107
|
-
gap: 1rem;
|
|
108
|
-
align-items: center;
|
|
109
|
-
justify-content: space-between;
|
|
110
|
-
|
|
111
|
-
> div {
|
|
112
|
-
max-width: 100%;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.icon {
|
|
117
|
-
width: 1.1em;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
@media (--desktop-down) {
|
|
122
|
-
/* .dt-control-label {} */
|
|
123
|
-
.dt-controls {
|
|
124
|
-
flex-direction: column;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
@media print {
|
|
131
|
-
.m-datatable {
|
|
132
|
-
.dt-controls, .dt-footer {
|
|
133
|
-
display: none;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
/* https://css-tip.com/overflow-detection/ */
|
|
140
|
-
/* https://csscade.com/can-you-detect-overflow-with-css/ */
|
|
141
|
-
.dt-table-wrapper {
|
|
142
|
-
max-width: 100%;
|
|
143
|
-
overflow-x: auto;
|
|
144
|
-
|
|
145
|
-
/* animation-timeline: scroll(self);
|
|
146
|
-
animation: detect-scroll linear;
|
|
147
|
-
--bg-if-can-scroll: var(--can-scroll) lime;
|
|
148
|
-
--bg-if-cant-scroll: red;
|
|
149
|
-
background: var(--bg-if-can-scroll, var(--bg-if-cant-scroll)); */
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
.table thead th {
|
|
153
|
-
vertical-align: middle;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.sorting_disabled,
|
|
157
|
-
.sorting_asc_disabled,
|
|
158
|
-
.sorting_desc_disabled {
|
|
159
|
-
cursor: default;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.sorting {
|
|
163
|
-
position: relative;
|
|
164
|
-
cursor: pointer;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
@media (--mouse) {
|
|
168
|
-
&:hover {
|
|
169
|
-
/* --datatable_active_sorting_color */
|
|
170
|
-
|
|
171
|
-
--datatable-active-sorting-bg: color-mix(in srgb, var(--accent-1) 10%, transparent);
|
|
172
|
-
/* stylelint-disable-next-line declaration-block-no-duplicate-custom-properties */
|
|
173
|
-
--datatable-active-sorting-bg: light-dark(color-mix(in srgb, var(--accent-1) 10%, transparent), color-mix(in srgb, var(--accent-1) 30%, transparent));
|
|
174
|
-
|
|
175
|
-
/* --datatable-active-sorting-border-bottom */
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
.sorting_asc, .sorting_desc{
|
|
182
|
-
&::after {
|
|
183
|
-
position: absolute;
|
|
184
|
-
right: 0;
|
|
185
|
-
left: 0;
|
|
186
|
-
display: block;
|
|
187
|
-
height: var(--sorting-border-size);
|
|
188
|
-
content: '';
|
|
189
|
-
background-color: var(--sorting-border-color);
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
/* border-bottom: var(--sorting-border-size) solid var(--sorting-border-color); */
|
|
193
|
-
}
|
|
194
|
-
.sorting_asc{
|
|
195
|
-
&::after {
|
|
196
|
-
top: calc(-1 * var(--sorting-border-size) / 2);
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
.sorting_desc{
|
|
201
|
-
&::after {
|
|
202
|
-
bottom: calc(-1 * var(--sorting-border-size) / 2);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/*
|
|
208
|
-
@keyframes detect-scroll {
|
|
209
|
-
from, to {
|
|
210
|
-
--can-scroll:;
|
|
211
|
-
}
|
|
212
|
-
} */
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
.dt-footer {
|
|
216
|
-
display: flex;
|
|
217
|
-
flex-flow: column wrap;
|
|
218
|
-
gap: .5rem;
|
|
219
|
-
align-items: center;
|
|
220
|
-
justify-content: center;
|
|
221
|
-
margin-block: 1rem;
|
|
222
|
-
|
|
223
|
-
@media (--desktop-up) {
|
|
224
|
-
flex-direction: row;
|
|
225
|
-
gap: 2rem;
|
|
226
|
-
justify-content: space-between;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.dataTables_info {
|
|
231
|
-
font-size: var(--font-size-xs);
|
|
232
|
-
/* color: var(--text-muted-color); */
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/*
|
|
236
|
-
<div class="dataTables_paginate paging_simple_numbers">
|
|
237
|
-
<a class="paginate_button previous disabled" aria-disabled="true" role="link" data-dt-idx="previous" tabindex="-1"></a>
|
|
238
|
-
|
|
239
|
-
<span>
|
|
240
|
-
<a class="paginate_button current" role="link" aria-current="page" data-dt-idx="0" tabindex="0">1</a>
|
|
241
|
-
<a class="paginate_button " role="link" data-dt-idx="1" tabindex="0">2</a>
|
|
242
|
-
<span class="ellipsis">…</span>
|
|
243
|
-
<a class="paginate_button " role="link" data-dt-idx="9" tabindex="0">10</a>
|
|
244
|
-
</span>
|
|
245
|
-
|
|
246
|
-
<a class="paginate_button next" role="link" data-dt-idx="next" tabindex="0"></a>
|
|
247
|
-
</div>
|
|
248
|
-
*/
|
|
249
|
-
|
|
250
|
-
.dataTables_paginate {
|
|
251
|
-
display: flex;
|
|
252
|
-
flex-flow: row nowrap;
|
|
253
|
-
gap: 0;
|
|
254
|
-
align-items: center;
|
|
255
|
-
justify-content: flex-end;
|
|
256
|
-
|
|
257
|
-
> span {
|
|
258
|
-
|
|
259
|
-
display: flex;
|
|
260
|
-
flex-flow: row nowrap;
|
|
261
|
-
gap: 0;
|
|
262
|
-
align-items: center;
|
|
263
|
-
justify-content: flex-end;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.paginate_button, .ellipsis {
|
|
267
|
-
display: flex;
|
|
268
|
-
justify-content: center;
|
|
269
|
-
padding: var(--pagination-padding-y) var(--pagination-padding-x);
|
|
270
|
-
font-size: var(--pagination-font-size);
|
|
271
|
-
font-weight: var(--font-weight-semibold);
|
|
272
|
-
line-height: 1;
|
|
273
|
-
color: var(--pagination-color);
|
|
274
|
-
border: var(--pagination-border-width) var(--pagination-border-color);
|
|
275
|
-
border-style: solid solid solid none;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.ellipsis {
|
|
279
|
-
justify-content: flex-end;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.paginate_button {
|
|
283
|
-
align-items: center;
|
|
284
|
-
text-decoration: none;
|
|
285
|
-
cursor: pointer;
|
|
286
|
-
background-color: var(--pagination-bg);
|
|
287
|
-
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
|
288
|
-
|
|
289
|
-
&.previous, &.next {
|
|
290
|
-
display: none;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
&:first-child {
|
|
294
|
-
border-style: solid;
|
|
295
|
-
border-top-left-radius: var(--pagination-border-radius);
|
|
296
|
-
border-bottom-left-radius: var(--pagination-border-radius);
|
|
297
|
-
}
|
|
298
|
-
&:last-child {
|
|
299
|
-
border-top-right-radius: var(--pagination-border-radius);
|
|
300
|
-
border-bottom-right-radius: var(--pagination-border-radius);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
&:hover {
|
|
304
|
-
z-index: 2;
|
|
305
|
-
color: var(--pagination-hover-color);
|
|
306
|
-
text-decoration: none;
|
|
307
|
-
background-color: var(--pagination-hover-bg);
|
|
308
|
-
border-color: var(--pagination-hover-border-color);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
&:focus {
|
|
312
|
-
z-index: 3;
|
|
313
|
-
color: var(--pagination-focus-color);
|
|
314
|
-
background-color: var(--pagination-focus-bg);
|
|
315
|
-
outline: 0;
|
|
316
|
-
box-shadow: var(--pagination-focus-box-shadow);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
&.current {
|
|
320
|
-
z-index: 3;
|
|
321
|
-
color: var(--pagination-active-color);
|
|
322
|
-
background-color: var(--pagination-active-bg);
|
|
323
|
-
border-color: var(--pagination-active-border-color);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
&.disabled,
|
|
327
|
-
.disabled > & {
|
|
328
|
-
color: var(--pagination-disabled-color);
|
|
329
|
-
pointer-events: none;
|
|
330
|
-
background-color: var(--pagination-disabled-bg);
|
|
331
|
-
border-color: var(--pagination-disabled-border-color);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.page-item {
|
|
336
|
-
&:not(:first-child) .page-link {
|
|
337
|
-
margin-left: calc(-1 * var(--pagination-border-width));
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
&:first-child {
|
|
341
|
-
.page-link {
|
|
342
|
-
border-radius: var(--pagination-border-radius) 0 0 var(--pagination-border-radius);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
&:last-child {
|
|
347
|
-
.page-link {
|
|
348
|
-
border-radius: 0 var(--pagination-border-radius) var(--pagination-border-radius) 0;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/* global process */
|
|
2
|
-
|
|
3
|
-
import 'jquery?as_asset';
|
|
4
|
-
import 'datatables.net/js/jquery.dataTables.js?as_asset';
|
|
5
|
-
|
|
6
|
-
import { spinner } from '@minimo/spinner.js';
|
|
7
|
-
import svg_icons from '@imgs/icone.svg';
|
|
8
|
-
|
|
9
|
-
import { creaDT } from '@massimo-cassandro/auto-datatables-bs5';
|
|
10
|
-
import './auto-datatable.css?inline';
|
|
11
|
-
/*
|
|
12
|
-
per personalizzazioni datatable
|
|
13
|
-
da usare insieme alle opzioni globali
|
|
14
|
-
|
|
15
|
-
import {default_dt_options} from 'path/to/datatable.js';
|
|
16
|
-
import { dt_default_options, dt_classes } from '@massimo-cassandro/auto-datatables-bs5';
|
|
17
|
-
|
|
18
|
-
$.extend( $.fn.dataTable.ext.classes, dt_classes );
|
|
19
|
-
$(__table__).DataTable($.extend(true, {}, dt_default_options, ada_default_dt_options,
|
|
20
|
-
|
|
21
|
-
// opzioni specifiche, se necessarie, ad esempio per tabelle non ajax:
|
|
22
|
-
{
|
|
23
|
-
processing : false,
|
|
24
|
-
serverSide : false,
|
|
25
|
-
pageLength : 25,
|
|
26
|
-
order : [[ 1, 'asc' ]],
|
|
27
|
-
columns : null
|
|
28
|
-
}
|
|
29
|
-
));
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
export const default_dt_options = {
|
|
34
|
-
|
|
35
|
-
dom:
|
|
36
|
-
// controlli
|
|
37
|
-
'<\'dt-controls\'lf>' +
|
|
38
|
-
// table + processing
|
|
39
|
-
//"<'position-relative'tr>" +
|
|
40
|
-
// table + processing
|
|
41
|
-
'<\'dt-table-wrapper\'t>r' +
|
|
42
|
-
// info + paginazione
|
|
43
|
-
'<\'dt-footer\'ip>',
|
|
44
|
-
|
|
45
|
-
// renderer: 'bootstrap',
|
|
46
|
-
|
|
47
|
-
// serverSide : true,
|
|
48
|
-
// paging : true,
|
|
49
|
-
// pageLength : 25,
|
|
50
|
-
language: {
|
|
51
|
-
processing: spinner(),
|
|
52
|
-
|
|
53
|
-
lengthMenu:
|
|
54
|
-
'<di class"dt-control-label">Mostra</di>' +
|
|
55
|
-
'<div class="dt-control">_MENU_</div>' +
|
|
56
|
-
'<div>record per pagina</div>',
|
|
57
|
-
search:
|
|
58
|
-
'<div class="dt-control-label">Filtra risultati:</div>' +
|
|
59
|
-
'<div class="dt-control">_INPUT_</div>',
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
responsive : true,
|
|
63
|
-
stateSave : process.env.NODE_ENV === 'development',
|
|
64
|
-
stateDuration : -1, //sessionStorage
|
|
65
|
-
// columnDefs : [{
|
|
66
|
-
// orderable : true,
|
|
67
|
-
// targets : ['_all']
|
|
68
|
-
// }],
|
|
69
|
-
// ajax : null,
|
|
70
|
-
// order : [],
|
|
71
|
-
// columns : []
|
|
72
|
-
}, // end dt_options
|
|
73
|
-
|
|
74
|
-
default_cdt_options = {
|
|
75
|
-
|
|
76
|
-
icone: {
|
|
77
|
-
ok : `<svg class="icon text-success"><use href="${svg_icons}#check-circle-bold"></use></svg>`,
|
|
78
|
-
off : `<svg class="icon text-danger"><use href="${svg_icons}#x-circle-bold"></use></svg>`,
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
id_visible_default: true,
|
|
82
|
-
|
|
83
|
-
formats: {
|
|
84
|
-
decimals_class: 'data-dec',
|
|
85
|
-
euro_class: 'data-euro',
|
|
86
|
-
|
|
87
|
-
date: {
|
|
88
|
-
year: '2-digit',
|
|
89
|
-
month: 'short',
|
|
90
|
-
day: 'numeric'
|
|
91
|
-
},
|
|
92
|
-
time: {
|
|
93
|
-
hour12: false,
|
|
94
|
-
hour: '2-digit',
|
|
95
|
-
minute: '2-digit'
|
|
96
|
-
},
|
|
97
|
-
datetime: {
|
|
98
|
-
date: {
|
|
99
|
-
year: 'numeric',
|
|
100
|
-
month: 'short',
|
|
101
|
-
day: 'numeric'
|
|
102
|
-
},
|
|
103
|
-
time: {
|
|
104
|
-
hour12: false,
|
|
105
|
-
hour: '2-digit',
|
|
106
|
-
minute: '2-digit'
|
|
107
|
-
},
|
|
108
|
-
separator: ' ', // date-time separator
|
|
109
|
-
date_wrapper: '<span class="text-nowrap"></span>', // HTML string or null or ''
|
|
110
|
-
time_wrapper: '<small></small>' // HTML string or null or ''
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
use_sorting_arrow: false, // se true viene aggiunta al container la classe `w-arrow` che attiva la visualizzazione delle frecce dell'ordinamento
|
|
115
|
-
|
|
116
|
-
// container_header: '', //'Risultato della ricerca', // se presente aggiunge un header prima della tabella
|
|
117
|
-
|
|
118
|
-
// container_class: 'dt-container', // classe che viene assegnata al div che contiene la tabella
|
|
119
|
-
//container_header_level: 2, // livello gerarchico dell'header (h2, h3, ecc...)
|
|
120
|
-
// table_id: 'table_result',
|
|
121
|
-
table_class: 'table table-bordered'
|
|
122
|
-
//table_caption: '',
|
|
123
|
-
//table_footer: false, // se true aggiunge una riga tfoot alla tabella, da popolare con un callback
|
|
124
|
-
//extra_info:''
|
|
125
|
-
}
|
|
126
|
-
;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* _datatable
|
|
130
|
-
* crea e renderizza un datatable da un flusso json
|
|
131
|
-
*
|
|
132
|
-
*/
|
|
133
|
-
|
|
134
|
-
export function _datatable(container, options = {}) {
|
|
135
|
-
|
|
136
|
-
options.dt_options = {...default_dt_options, ...(options.dt_options?? {}) };
|
|
137
|
-
options.cdt_options = {...default_cdt_options, ...(options.cdt_options?? {}) };
|
|
138
|
-
|
|
139
|
-
container.innerHTML = '<div class="datatable-spinner-wrapper">' +
|
|
140
|
-
spinner() +
|
|
141
|
-
'</div>';
|
|
142
|
-
|
|
143
|
-
creaDT(container, options.cdt_options, options.dt_options, options.dt_columns?? []);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// utilizza _datatable per generare in modo automatico i datatable
|
|
148
|
-
// negli elementi con classe 'dt-container'
|
|
149
|
-
// i parametri datatable sono ricavati dagli attributi data di '.dt-container'
|
|
150
|
-
|
|
151
|
-
document.querySelectorAll('.dt-container').forEach(container => {
|
|
152
|
-
_datatable(container);
|
|
153
|
-
});
|
|
154
|
-
|
package/src/components/init.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { mAlert } from './modal-alert.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
twig message labels:
|
|
6
|
-
- success
|
|
7
|
-
- notice
|
|
8
|
-
- error
|
|
9
|
-
- warning
|
|
10
|
-
*/
|
|
11
|
-
document.querySelectorAll('.flash-alert').forEach(item => {
|
|
12
|
-
|
|
13
|
-
mAlert({
|
|
14
|
-
// test
|
|
15
|
-
// type : 'confirm',
|
|
16
|
-
// timer: null,
|
|
17
|
-
|
|
18
|
-
type : item.dataset.label === 'notice'? 'warning' : item.dataset.label,
|
|
19
|
-
// title : item.message,
|
|
20
|
-
mes : item.dataset.message
|
|
21
|
-
// use_warning_icon: true, // solo confirm
|
|
22
|
-
// ok_btn_text: 'OK',
|
|
23
|
-
// cancel_btn_text: 'Annulla',
|
|
24
|
-
// callback: function(esito) {}, // confirm: console.log( esito? 'Confermato' : 'Annullato')
|
|
25
|
-
// timer: 4000 // ms
|
|
26
|
-
// extra_btn: '<button type="button" data-confirm-result="annulla" class="stop-btn btn btn-confirm">Annulla</button>',
|
|
27
|
-
// extra_btn_selector: '.stop-btn',
|
|
28
|
-
// extra_btn_focus: true,
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* NB incluso nel css principale */
|
|
2
|
-
|
|
3
|
-
@import '@massimo-cassandro/modal-alert';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.modal-alert {
|
|
7
|
-
--malert-success-color: var(--status-success-color);
|
|
8
|
-
--malert-success-color-fg: var(--status-success-fg-color);
|
|
9
|
-
|
|
10
|
-
--malert-info-color: var(--status-info-color);
|
|
11
|
-
--malert-info-color-fg: var(--status-info-fg-color);
|
|
12
|
-
|
|
13
|
-
--malert-warning-color: var(--status-warning-color);
|
|
14
|
-
--malert-warning-color-fg: var(--status-warning-fg-color);
|
|
15
|
-
|
|
16
|
-
--malert-error-color: var(--status-danger-color);
|
|
17
|
-
--malert-error-color-fg: var(--status-danger-fg-color);
|
|
18
|
-
|
|
19
|
-
--malert-confirm-color: var(--status-warning-color);
|
|
20
|
-
--malert-confirm-color-fg: var(--status-warning-fg-color);
|
|
21
|
-
|
|
22
|
-
/* --malert-marks-stroke-width: 6px; */
|
|
23
|
-
--malert-backdrop: rgb(0 0 0 / .3);
|
|
24
|
-
--malert-border-radius: var(--radius-md);
|
|
25
|
-
/* --malert-box-shadow: var(--box-shadow); */
|
|
26
|
-
--malert-heading-font-family: var(--font-family);
|
|
27
|
-
/* --malert-heading-line-height: */
|
|
28
|
-
--malert-heading-font-size: 1.8rem;
|
|
29
|
-
--malert-heading-font-weigth: var(--font-size-base);
|
|
30
|
-
--malert-body-font-family: var(--font-family);
|
|
31
|
-
|
|
32
|
-
top: 50%;
|
|
33
|
-
left: 50%;
|
|
34
|
-
translate: -50% -50%;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.malert-mark {
|
|
40
|
-
svg {
|
|
41
|
-
width: 7rem;
|
|
42
|
-
max-width: none;
|
|
43
|
-
height: 7rem;
|
|
44
|
-
fill: var(--malert-color-fg);
|
|
45
|
-
stroke: none;
|
|
46
|
-
}
|
|
47
|
-
}
|