@appius-fr/apx 2.6.1 → 2.7.0
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/APX.mjs +2 -0
- package/README.md +207 -203
- package/dist/2ab50e700c8fbddb45e0.svg +10 -0
- package/dist/2e967d8dd752e0bed703.svg +10 -0
- package/dist/5ddaeefe5dfbc8e09652.svg +7 -0
- package/dist/6dc2907ba3bbb232601d.svg +10 -0
- package/dist/6e1e61dfca176a885b8d.svg +3 -0
- package/dist/6f3a0a27a260bb2c221b.svg +9 -0
- package/dist/8b07a8bf719a38262b7d.svg +10 -0
- package/dist/APX.dev.mjs +843 -245
- package/dist/APX.mjs +1 -1
- package/dist/APX.prod.mjs +1 -1
- package/dist/APX.standalone.js +744 -92
- package/dist/APX.standalone.js.map +1 -1
- package/dist/bdfa755a1cdb872368c7.svg +3 -0
- package/dist/c9da177f7663f9fcd023.svg +10 -0
- package/dist/ce9ef5fceb78e17e68c9.svg +8 -0
- package/dist/ed5af5163957b04bc6cc.svg +7 -0
- package/modules/listen/README.md +242 -235
- package/modules/listen/listen.mjs +1 -3
- package/modules/scrollableTable/README.md +52 -0
- package/modules/scrollableTable/css/scrollableTable.css +60 -0
- package/modules/scrollableTable/scrollableTable.mjs +198 -0
- package/modules/toast/README.md +186 -153
- package/modules/tools/form-packer/README.md +12 -14
- package/modules/tools/form-packer/augment-apx.mjs +4 -2
- package/modules/tools/form-packer/packToJson.mjs +58 -16
- package/modules/tristate/CHANGELOG.md +34 -0
- package/modules/tristate/README.md +157 -94
- package/modules/tristate/assets/tristate-checked.svg +3 -0
- package/modules/tristate/assets/tristate-cross.svg +10 -0
- package/modules/tristate/assets/tristate-crossed.svg +3 -0
- package/modules/tristate/assets/tristate-indeterminate-dash.svg +9 -0
- package/modules/tristate/assets/tristate-tick.svg +10 -0
- package/modules/tristate/assets/tristate-unchecked.svg +7 -0
- package/modules/tristate/css/tristate.css +91 -24
- package/modules/tristate/tristate.mjs +292 -171
- package/package.json +5 -1
package/dist/APX.standalone.js
CHANGED
|
@@ -172,6 +172,93 @@ h2.APX-dialog-title{
|
|
|
172
172
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
173
173
|
|
|
174
174
|
|
|
175
|
+
/***/ }),
|
|
176
|
+
|
|
177
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./modules/scrollableTable/css/scrollableTable.css":
|
|
178
|
+
/*!***********************************************************************************************!*\
|
|
179
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./modules/scrollableTable/css/scrollableTable.css ***!
|
|
180
|
+
\***********************************************************************************************/
|
|
181
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
182
|
+
|
|
183
|
+
"use strict";
|
|
184
|
+
__webpack_require__.r(__webpack_exports__);
|
|
185
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
186
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
187
|
+
/* harmony export */ });
|
|
188
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
|
|
189
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
190
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
191
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
192
|
+
// Imports
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
196
|
+
// Module
|
|
197
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/* APX Scrollable Table: scrollable tbody with fixed thead/tfoot and aligned columns (CSS Grid + subgrid) */
|
|
198
|
+
|
|
199
|
+
.apx-scrollable-table {
|
|
200
|
+
display: grid;
|
|
201
|
+
grid-template-columns: repeat(var(--apx-scrollable-cols, 3), minmax(0, 1fr));
|
|
202
|
+
grid-template-rows: auto fit-content(var(--apx-scrollable-body-max-height, 200px)) auto;
|
|
203
|
+
width: 100%;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Table with no tfoot: thead + tbody only */
|
|
207
|
+
.apx-scrollable-table:not(.apx-scrollable-table--has-tfoot) {
|
|
208
|
+
grid-template-rows: auto fit-content(var(--apx-scrollable-body-max-height, 200px));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Table with no thead: tbody + tfoot only */
|
|
212
|
+
.apx-scrollable-table.apx-scrollable-table--no-thead {
|
|
213
|
+
grid-template-rows: fit-content(var(--apx-scrollable-body-max-height, 200px)) auto;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Table with neither thead nor tfoot: tbody only */
|
|
217
|
+
.apx-scrollable-table.apx-scrollable-table--no-thead:not(.apx-scrollable-table--has-tfoot) {
|
|
218
|
+
grid-template-rows: fit-content(var(--apx-scrollable-body-max-height, 200px));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.apx-scrollable-table > thead,
|
|
222
|
+
.apx-scrollable-table > tbody,
|
|
223
|
+
.apx-scrollable-table > tfoot {
|
|
224
|
+
display: grid;
|
|
225
|
+
grid-template-columns: subgrid;
|
|
226
|
+
grid-column: 1 / -1;
|
|
227
|
+
grid-template-rows: repeat(var(--apx-scrollable-thead-rows, 1), auto);
|
|
228
|
+
min-height: 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.apx-scrollable-table > thead {
|
|
232
|
+
grid-template-rows: repeat(var(--apx-scrollable-thead-rows, 1), auto);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.apx-scrollable-table > tbody {
|
|
236
|
+
grid-template-rows: repeat(var(--apx-scrollable-tbody-rows, 1), auto);
|
|
237
|
+
overflow: auto;
|
|
238
|
+
/* Reserve space for the vertical scrollbar so it doesn't shrink content width and trigger a horizontal scrollbar */
|
|
239
|
+
scrollbar-gutter: stable;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.apx-scrollable-table > tfoot {
|
|
243
|
+
grid-template-rows: repeat(var(--apx-scrollable-tfoot-rows, 1), auto);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.apx-scrollable-table > thead > tr,
|
|
247
|
+
.apx-scrollable-table > tbody > tr,
|
|
248
|
+
.apx-scrollable-table > tfoot > tr {
|
|
249
|
+
display: contents;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.apx-scrollable-table th,
|
|
253
|
+
.apx-scrollable-table td {
|
|
254
|
+
/* Grid placement set by JS (grid-row, grid-column) for colspan/rowspan */
|
|
255
|
+
min-width: 0;
|
|
256
|
+
}
|
|
257
|
+
`, "",{"version":3,"sources":["webpack://./modules/scrollableTable/css/scrollableTable.css"],"names":[],"mappings":"AAAA,2GAA2G;;AAE3G;IACI,aAAa;IACb,4EAA4E;IAC5E,uFAAuF;IACvF,WAAW;AACf;;AAEA,4CAA4C;AAC5C;IACI,kFAAkF;AACtF;;AAEA,4CAA4C;AAC5C;IACI,kFAAkF;AACtF;;AAEA,mDAAmD;AACnD;IACI,6EAA6E;AACjF;;AAEA;;;IAGI,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,qEAAqE;IACrE,aAAa;AACjB;;AAEA;IACI,qEAAqE;AACzE;;AAEA;IACI,qEAAqE;IACrE,cAAc;IACd,mHAAmH;IACnH,wBAAwB;AAC5B;;AAEA;IACI,qEAAqE;AACzE;;AAEA;;;IAGI,iBAAiB;AACrB;;AAEA;;IAEI,yEAAyE;IACzE,YAAY;AAChB","sourcesContent":["/* APX Scrollable Table: scrollable tbody with fixed thead/tfoot and aligned columns (CSS Grid + subgrid) */\r\n\r\n.apx-scrollable-table {\r\n display: grid;\r\n grid-template-columns: repeat(var(--apx-scrollable-cols, 3), minmax(0, 1fr));\r\n grid-template-rows: auto fit-content(var(--apx-scrollable-body-max-height, 200px)) auto;\r\n width: 100%;\r\n}\r\n\r\n/* Table with no tfoot: thead + tbody only */\r\n.apx-scrollable-table:not(.apx-scrollable-table--has-tfoot) {\r\n grid-template-rows: auto fit-content(var(--apx-scrollable-body-max-height, 200px));\r\n}\r\n\r\n/* Table with no thead: tbody + tfoot only */\r\n.apx-scrollable-table.apx-scrollable-table--no-thead {\r\n grid-template-rows: fit-content(var(--apx-scrollable-body-max-height, 200px)) auto;\r\n}\r\n\r\n/* Table with neither thead nor tfoot: tbody only */\r\n.apx-scrollable-table.apx-scrollable-table--no-thead:not(.apx-scrollable-table--has-tfoot) {\r\n grid-template-rows: fit-content(var(--apx-scrollable-body-max-height, 200px));\r\n}\r\n\r\n.apx-scrollable-table > thead,\r\n.apx-scrollable-table > tbody,\r\n.apx-scrollable-table > tfoot {\r\n display: grid;\r\n grid-template-columns: subgrid;\r\n grid-column: 1 / -1;\r\n grid-template-rows: repeat(var(--apx-scrollable-thead-rows, 1), auto);\r\n min-height: 0;\r\n}\r\n\r\n.apx-scrollable-table > thead {\r\n grid-template-rows: repeat(var(--apx-scrollable-thead-rows, 1), auto);\r\n}\r\n\r\n.apx-scrollable-table > tbody {\r\n grid-template-rows: repeat(var(--apx-scrollable-tbody-rows, 1), auto);\r\n overflow: auto;\r\n /* Reserve space for the vertical scrollbar so it doesn't shrink content width and trigger a horizontal scrollbar */\r\n scrollbar-gutter: stable;\r\n}\r\n\r\n.apx-scrollable-table > tfoot {\r\n grid-template-rows: repeat(var(--apx-scrollable-tfoot-rows, 1), auto);\r\n}\r\n\r\n.apx-scrollable-table > thead > tr,\r\n.apx-scrollable-table > tbody > tr,\r\n.apx-scrollable-table > tfoot > tr {\r\n display: contents;\r\n}\r\n\r\n.apx-scrollable-table th,\r\n.apx-scrollable-table td {\r\n /* Grid placement set by JS (grid-row, grid-column) for colspan/rowspan */\r\n min-width: 0;\r\n}\r\n"],"sourceRoot":""}]);
|
|
258
|
+
// Exports
|
|
259
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
260
|
+
|
|
261
|
+
|
|
175
262
|
/***/ }),
|
|
176
263
|
|
|
177
264
|
/***/ "./node_modules/css-loader/dist/cjs.js!./modules/toast/css/toast.css":
|
|
@@ -367,39 +454,108 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
367
454
|
|
|
368
455
|
|
|
369
456
|
|
|
370
|
-
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg
|
|
371
|
-
var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg
|
|
372
|
-
var ___CSS_LOADER_URL_IMPORT_2___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%
|
|
457
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cmask id=%27frame-cutout%27%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23fff%27/%3E%3Crect x=%273%27 y=%273%27 width=%2726%27 height=%2726%27 rx=%274%27 ry=%274%27 fill=%27%23000%27/%3E%3C/mask%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23cccccc%27 mask=%27url%28%23frame-cutout%29%27/%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cmask id=%27frame-cutout%27%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23fff%27/%3E%3Crect x=%273%27 y=%273%27 width=%2726%27 height=%2726%27 rx=%274%27 ry=%274%27 fill=%27%23000%27/%3E%3C/mask%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23cccccc%27 mask=%27url%28%23frame-cutout%29%27/%3E%3C/svg%3E"), __webpack_require__.b);
|
|
458
|
+
var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 16h16%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27/%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 16h16%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27/%3E%3C/svg%3E"), __webpack_require__.b);
|
|
459
|
+
var ___CSS_LOADER_URL_IMPORT_2___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M6 17L12 23L26 9%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M6 17L12 23L26 9%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E"), __webpack_require__.b);
|
|
460
|
+
var ___CSS_LOADER_URL_IMPORT_3___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 8L24 24M24 8L8 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 8L24 24M24 8L8 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E"), __webpack_require__.b);
|
|
373
461
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
374
462
|
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
375
463
|
var ___CSS_LOADER_URL_REPLACEMENT_1___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
|
|
376
464
|
var ___CSS_LOADER_URL_REPLACEMENT_2___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___);
|
|
465
|
+
var ___CSS_LOADER_URL_REPLACEMENT_3___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_3___);
|
|
377
466
|
// Module
|
|
378
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.apx-tristate {
|
|
379
|
-
display: inline-block;
|
|
380
|
-
vertical-align: middle;
|
|
381
|
-
text-align: center;
|
|
382
|
-
cursor: pointer;
|
|
383
|
-
position: relative;
|
|
384
|
-
min-width:13px;
|
|
385
|
-
min-height:13px;
|
|
386
|
-
background-size: contain;
|
|
387
|
-
background-color:
|
|
388
|
-
border-radius:3px;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
.apx-tristate.
|
|
394
|
-
background-image: url(${
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
}
|
|
467
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.apx-tristate {
|
|
468
|
+
display: inline-block;
|
|
469
|
+
vertical-align: middle;
|
|
470
|
+
text-align: center;
|
|
471
|
+
cursor: pointer;
|
|
472
|
+
position: relative;
|
|
473
|
+
min-width:13px;
|
|
474
|
+
min-height:13px;
|
|
475
|
+
background-size: contain;
|
|
476
|
+
background-color: transparent;
|
|
477
|
+
border-radius:3px;
|
|
478
|
+
--apx-tristate-tick-color: transparent;
|
|
479
|
+
--apx-tristate-checked-color: #0654ba;
|
|
480
|
+
--apx-tristate-crossed-color: #f00;
|
|
481
|
+
}
|
|
482
|
+
.apx-tristate.unchecked {
|
|
483
|
+
background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});
|
|
484
|
+
}
|
|
485
|
+
.apx-tristate.unchecked.apx-tristate--unchecked-indeterminate::after {
|
|
486
|
+
content: '';
|
|
487
|
+
position: absolute;
|
|
488
|
+
inset: 0;
|
|
489
|
+
display: block;
|
|
490
|
+
pointer-events: none;
|
|
491
|
+
}
|
|
492
|
+
/* When --mixed is used (e.g. parent + sub-checkboxes), dash shows only when children are mixed */
|
|
493
|
+
.apx-tristate.unchecked.apx-tristate--indeterminate-dash:not(.apx-tristate--mixed)::before,
|
|
494
|
+
.apx-tristate.unchecked.apx-tristate--indeterminate-dash:not(.apx-tristate--mixed)::after {
|
|
495
|
+
display: none;
|
|
496
|
+
}
|
|
497
|
+
.apx-tristate.unchecked.apx-tristate--indeterminate-dash::before {
|
|
498
|
+
content: '';
|
|
499
|
+
position: absolute;
|
|
500
|
+
inset: 0;
|
|
501
|
+
display: block;
|
|
502
|
+
pointer-events: none;
|
|
503
|
+
background-color: var(--apx-tristate-checked-color);
|
|
504
|
+
border-radius: inherit;
|
|
505
|
+
}
|
|
506
|
+
.apx-tristate.unchecked.apx-tristate--indeterminate-dash::after {
|
|
507
|
+
background-color: var(--apx-tristate-tick-color);
|
|
508
|
+
-webkit-mask-repeat: no-repeat;
|
|
509
|
+
-webkit-mask-position: center;
|
|
510
|
+
-webkit-mask-size: 100% 100%;
|
|
511
|
+
-webkit-mask-mode: alpha;
|
|
512
|
+
mask-repeat: no-repeat;
|
|
513
|
+
mask-position: center;
|
|
514
|
+
mask-size: 100% 100%;
|
|
515
|
+
mask-mode: alpha;
|
|
516
|
+
-webkit-mask-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});
|
|
517
|
+
mask-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});
|
|
518
|
+
}
|
|
519
|
+
.apx-tristate.unchecked.apx-tristate--indeterminate-filled-check::after {
|
|
520
|
+
background-color: var(--apx-tristate-checked-color);
|
|
521
|
+
border-radius: inherit;
|
|
522
|
+
}
|
|
523
|
+
.apx-tristate.checked {
|
|
524
|
+
background-image: none;
|
|
525
|
+
background-color: var(--apx-tristate-checked-color);
|
|
526
|
+
}
|
|
527
|
+
.apx-tristate.crossed {
|
|
528
|
+
background-image: none;
|
|
529
|
+
background-color: var(--apx-tristate-crossed-color);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.apx-tristate.checked::after,
|
|
533
|
+
.apx-tristate.crossed::after {
|
|
534
|
+
content: '';
|
|
535
|
+
position: absolute;
|
|
536
|
+
inset: 0;
|
|
537
|
+
display: block;
|
|
538
|
+
background-color: var(--apx-tristate-tick-color);
|
|
539
|
+
-webkit-mask-repeat: no-repeat;
|
|
540
|
+
-webkit-mask-position: center;
|
|
541
|
+
-webkit-mask-size: 100% 100%;
|
|
542
|
+
-webkit-mask-mode: alpha;
|
|
543
|
+
mask-repeat: no-repeat;
|
|
544
|
+
mask-position: center;
|
|
545
|
+
mask-size: 100% 100%;
|
|
546
|
+
mask-mode: alpha;
|
|
547
|
+
pointer-events: none;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.apx-tristate.checked::after {
|
|
551
|
+
-webkit-mask-image: url(${___CSS_LOADER_URL_REPLACEMENT_2___});
|
|
552
|
+
mask-image: url(${___CSS_LOADER_URL_REPLACEMENT_2___});
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.apx-tristate.crossed::after {
|
|
556
|
+
-webkit-mask-image: url(${___CSS_LOADER_URL_REPLACEMENT_3___});
|
|
557
|
+
mask-image: url(${___CSS_LOADER_URL_REPLACEMENT_3___});
|
|
558
|
+
}`, "",{"version":3,"sources":["webpack://./modules/tristate/css/tristate.css"],"names":[],"mappings":"AAAA;IACI,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,6BAA6B;IAC7B,iBAAiB;IACjB,sCAAsC;IACtC,qCAAqC;IACrC,kCAAkC;AACtC;AACA;IACI,yDAA6X;AACjY;AACA;IACI,WAAW;IACX,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,oBAAoB;AACxB;AACA,iGAAiG;AACjG;;IAEI,aAAa;AACjB;AACA;IACI,WAAW;IACX,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,oBAAoB;IACpB,mDAAmD;IACnD,sBAAsB;AAC1B;AACA;IACI,gDAAgD;IAChD,8BAA8B;IAC9B,6BAA6B;IAC7B,4BAA4B;IAC5B,wBAAwB;IACxB,sBAAsB;IACtB,qBAAqB;IACrB,oBAAoB;IACpB,gBAAgB;IAChB,2DAA2O;IAC3O,mDAAmO;AACvO;AACA;IACI,mDAAmD;IACnD,sBAAsB;AAC1B;AACA;IACI,sBAAsB;IACtB,mDAAmD;AACvD;AACA;IACI,sBAAsB;IACtB,mDAAmD;AACvD;;AAEA;;IAEI,WAAW;IACX,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,gDAAgD;IAChD,8BAA8B;IAC9B,6BAA6B;IAC7B,4BAA4B;IAC5B,wBAAwB;IACxB,sBAAsB;IACtB,qBAAqB;IACrB,oBAAoB;IACpB,gBAAgB;IAChB,oBAAoB;AACxB;;AAEA;IACI,2DAA2Q;IAC3Q,mDAAmQ;AACvQ;;AAEA;IACI,2DAA+Q;IAC/Q,mDAAuQ;AAC3Q","sourcesContent":[".apx-tristate {\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n position: relative;\n min-width:13px;\n min-height:13px;\n background-size: contain;\n background-color: transparent;\n border-radius:3px;\n --apx-tristate-tick-color: transparent;\n --apx-tristate-checked-color: #0654ba;\n --apx-tristate-crossed-color: #f00;\n}\n.apx-tristate.unchecked {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cmask id='frame-cutout'%3E%3Crect width='32' height='32' fill='%23fff'/%3E%3Crect x='3' y='3' width='26' height='26' rx='4' ry='4' fill='%23000'/%3E%3C/mask%3E%3Crect width='32' height='32' fill='%23cccccc' mask='url(%23frame-cutout)'/%3E%3C/svg%3E\");\n}\n.apx-tristate.unchecked.apx-tristate--unchecked-indeterminate::after {\n content: '';\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n}\n/* When --mixed is used (e.g. parent + sub-checkboxes), dash shows only when children are mixed */\n.apx-tristate.unchecked.apx-tristate--indeterminate-dash:not(.apx-tristate--mixed)::before,\n.apx-tristate.unchecked.apx-tristate--indeterminate-dash:not(.apx-tristate--mixed)::after {\n display: none;\n}\n.apx-tristate.unchecked.apx-tristate--indeterminate-dash::before {\n content: '';\n position: absolute;\n inset: 0;\n display: block;\n pointer-events: none;\n background-color: var(--apx-tristate-checked-color);\n border-radius: inherit;\n}\n.apx-tristate.unchecked.apx-tristate--indeterminate-dash::after {\n background-color: var(--apx-tristate-tick-color);\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-position: center;\n -webkit-mask-size: 100% 100%;\n -webkit-mask-mode: alpha;\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: 100% 100%;\n mask-mode: alpha;\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 16h16' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 16h16' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\");\n}\n.apx-tristate.unchecked.apx-tristate--indeterminate-filled-check::after {\n background-color: var(--apx-tristate-checked-color);\n border-radius: inherit;\n}\n.apx-tristate.checked {\n background-image: none;\n background-color: var(--apx-tristate-checked-color);\n}\n.apx-tristate.crossed {\n background-image: none;\n background-color: var(--apx-tristate-crossed-color);\n}\n\n.apx-tristate.checked::after,\n.apx-tristate.crossed::after {\n content: '';\n position: absolute;\n inset: 0;\n display: block;\n background-color: var(--apx-tristate-tick-color);\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-position: center;\n -webkit-mask-size: 100% 100%;\n -webkit-mask-mode: alpha;\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: 100% 100%;\n mask-mode: alpha;\n pointer-events: none;\n}\n\n.apx-tristate.checked::after {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M6 17L12 23L26 9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M6 17L12 23L26 9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");\n}\n\n.apx-tristate.crossed::after {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 8L24 24M24 8L8 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 8L24 24M24 8L8 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");\n}"],"sourceRoot":""}]);
|
|
403
559
|
// Exports
|
|
404
560
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
405
561
|
|
|
@@ -629,6 +785,61 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
629
785
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
630
786
|
|
|
631
787
|
|
|
788
|
+
/***/ }),
|
|
789
|
+
|
|
790
|
+
/***/ "./modules/scrollableTable/css/scrollableTable.css":
|
|
791
|
+
/*!*********************************************************!*\
|
|
792
|
+
!*** ./modules/scrollableTable/css/scrollableTable.css ***!
|
|
793
|
+
\*********************************************************/
|
|
794
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
795
|
+
|
|
796
|
+
"use strict";
|
|
797
|
+
__webpack_require__.r(__webpack_exports__);
|
|
798
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
799
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
800
|
+
/* harmony export */ });
|
|
801
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
802
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
803
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
|
|
804
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
805
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
|
|
806
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
807
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
|
|
808
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
809
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
|
|
810
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
811
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
|
|
812
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
813
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_scrollableTable_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./scrollableTable.css */ "./node_modules/css-loader/dist/cjs.js!./modules/scrollableTable/css/scrollableTable.css");
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
var options = {};
|
|
826
|
+
|
|
827
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
828
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
829
|
+
|
|
830
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
831
|
+
|
|
832
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
833
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
834
|
+
|
|
835
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_scrollableTable_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_scrollableTable_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_scrollableTable_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_scrollableTable_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
841
|
+
|
|
842
|
+
|
|
632
843
|
/***/ }),
|
|
633
844
|
|
|
634
845
|
/***/ "./modules/toast/css/toast.css":
|
|
@@ -1014,36 +1225,47 @@ module.exports = styleTagTransform;
|
|
|
1014
1225
|
|
|
1015
1226
|
/***/ }),
|
|
1016
1227
|
|
|
1017
|
-
/***/ "data:image/svg+xml,%
|
|
1018
|
-
|
|
1019
|
-
!*** data:image/svg+xml,%
|
|
1020
|
-
|
|
1228
|
+
/***/ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cmask id=%27frame-cutout%27%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23fff%27/%3E%3Crect x=%273%27 y=%273%27 width=%2726%27 height=%2726%27 rx=%274%27 ry=%274%27 fill=%27%23000%27/%3E%3C/mask%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23cccccc%27 mask=%27url%28%23frame-cutout%29%27/%3E%3C/svg%3E":
|
|
1229
|
+
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1230
|
+
!*** data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cmask id=%27frame-cutout%27%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23fff%27/%3E%3Crect x=%273%27 y=%273%27 width=%2726%27 height=%2726%27 rx=%274%27 ry=%274%27 fill=%27%23000%27/%3E%3C/mask%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23cccccc%27 mask=%27url%28%23frame-cutout%29%27/%3E%3C/svg%3E ***!
|
|
1231
|
+
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1021
1232
|
/***/ ((module) => {
|
|
1022
1233
|
|
|
1023
1234
|
"use strict";
|
|
1024
|
-
module.exports = "data:image/svg+xml,%
|
|
1235
|
+
module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cmask id=%27frame-cutout%27%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23fff%27/%3E%3Crect x=%273%27 y=%273%27 width=%2726%27 height=%2726%27 rx=%274%27 ry=%274%27 fill=%27%23000%27/%3E%3C/mask%3E%3Crect width=%2732%27 height=%2732%27 fill=%27%23cccccc%27 mask=%27url%28%23frame-cutout%29%27/%3E%3C/svg%3E";
|
|
1025
1236
|
|
|
1026
1237
|
/***/ }),
|
|
1027
1238
|
|
|
1028
|
-
/***/ "data:image/svg+xml,%3Csvg
|
|
1029
|
-
|
|
1030
|
-
!*** data:image/svg+xml,%3Csvg
|
|
1031
|
-
|
|
1239
|
+
/***/ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M6 17L12 23L26 9%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E":
|
|
1240
|
+
/*!************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1241
|
+
!*** data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M6 17L12 23L26 9%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E ***!
|
|
1242
|
+
\************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1032
1243
|
/***/ ((module) => {
|
|
1033
1244
|
|
|
1034
1245
|
"use strict";
|
|
1035
|
-
module.exports = "data:image/svg+xml,%3Csvg
|
|
1246
|
+
module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M6 17L12 23L26 9%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E";
|
|
1036
1247
|
|
|
1037
1248
|
/***/ }),
|
|
1038
1249
|
|
|
1039
|
-
/***/ "data:image/svg+xml,%3Csvg
|
|
1040
|
-
|
|
1041
|
-
!*** data:image/svg+xml,%3Csvg
|
|
1042
|
-
|
|
1250
|
+
/***/ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 16h16%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27/%3E%3C/svg%3E":
|
|
1251
|
+
/*!************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1252
|
+
!*** data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 16h16%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27/%3E%3C/svg%3E ***!
|
|
1253
|
+
\************************************************************************************************************************************************************************************************************************************************************/
|
|
1043
1254
|
/***/ ((module) => {
|
|
1044
1255
|
|
|
1045
1256
|
"use strict";
|
|
1046
|
-
module.exports = "data:image/svg+xml,%3Csvg
|
|
1257
|
+
module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 16h16%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27/%3E%3C/svg%3E";
|
|
1258
|
+
|
|
1259
|
+
/***/ }),
|
|
1260
|
+
|
|
1261
|
+
/***/ "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 8L24 24M24 8L8 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E":
|
|
1262
|
+
/*!****************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
1263
|
+
!*** data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 8L24 24M24 8L8 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E ***!
|
|
1264
|
+
\****************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
1265
|
+
/***/ ((module) => {
|
|
1266
|
+
|
|
1267
|
+
"use strict";
|
|
1268
|
+
module.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2732%27 height=%2732%27 viewBox=%270 0 32 32%27%3E%3Cpath d=%27M8 8L24 24M24 8L8 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E";
|
|
1047
1269
|
|
|
1048
1270
|
/***/ }),
|
|
1049
1271
|
|
|
@@ -1650,9 +1872,7 @@ function executeCallbacks(event, uniqueId, timeoutDuration) {
|
|
|
1650
1872
|
}
|
|
1651
1873
|
});
|
|
1652
1874
|
});
|
|
1653
|
-
}, Promise.resolve())["catch"](function (
|
|
1654
|
-
console.error('Error in callback chain:', error);
|
|
1655
|
-
});
|
|
1875
|
+
}, Promise.resolve())["catch"](function () {});
|
|
1656
1876
|
}
|
|
1657
1877
|
}
|
|
1658
1878
|
|
|
@@ -1682,6 +1902,249 @@ function closest(element, selector) {
|
|
|
1682
1902
|
|
|
1683
1903
|
/***/ }),
|
|
1684
1904
|
|
|
1905
|
+
/***/ "./modules/scrollableTable/scrollableTable.mjs":
|
|
1906
|
+
/*!*****************************************************!*\
|
|
1907
|
+
!*** ./modules/scrollableTable/scrollableTable.mjs ***!
|
|
1908
|
+
\*****************************************************/
|
|
1909
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1910
|
+
|
|
1911
|
+
"use strict";
|
|
1912
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1913
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1914
|
+
/* harmony export */ "default": () => (/* binding */ augmentWithScrollableTable)
|
|
1915
|
+
/* harmony export */ });
|
|
1916
|
+
/* harmony import */ var _css_scrollableTable_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/scrollableTable.css */ "./modules/scrollableTable/css/scrollableTable.css");
|
|
1917
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1918
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1919
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1920
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
1921
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1922
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1923
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
1924
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
1925
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
1926
|
+
|
|
1927
|
+
var DATA_KEY = '_apxScrollableTable';
|
|
1928
|
+
var CLASS_TABLE = 'apx-scrollable-table';
|
|
1929
|
+
var DEFAULT_MAX_HEIGHT = '200px';
|
|
1930
|
+
|
|
1931
|
+
/**
|
|
1932
|
+
* Get number of columns from the first row that has cells (sum of colspan).
|
|
1933
|
+
* @param {HTMLTableSectionElement} section - thead, tbody, or tfoot
|
|
1934
|
+
* @returns {number}
|
|
1935
|
+
*/
|
|
1936
|
+
function getColumnCountFromSection(section) {
|
|
1937
|
+
var firstRow = section === null || section === void 0 ? void 0 : section.querySelector(':scope > tr');
|
|
1938
|
+
if (!firstRow) return 0;
|
|
1939
|
+
var cols = 0;
|
|
1940
|
+
firstRow.querySelectorAll(':scope > th, :scope > td').forEach(function (cell) {
|
|
1941
|
+
cols += parseInt(cell.getAttribute('colspan'), 10) || 1;
|
|
1942
|
+
});
|
|
1943
|
+
return cols;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* Get total column count for the table (from thead or tbody first row).
|
|
1948
|
+
* @param {HTMLTableElement} table
|
|
1949
|
+
* @returns {number}
|
|
1950
|
+
*/
|
|
1951
|
+
function getTableColumnCount(table) {
|
|
1952
|
+
var thead = table.querySelector('thead');
|
|
1953
|
+
var tbody = table.querySelector('tbody');
|
|
1954
|
+
var countFromThead = thead ? getColumnCountFromSection(thead) : 0;
|
|
1955
|
+
var countFromTbody = tbody ? getColumnCountFromSection(tbody) : 0;
|
|
1956
|
+
return countFromThead || countFromTbody || 1;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
/**
|
|
1960
|
+
* Count direct tr children in a section.
|
|
1961
|
+
* @param {HTMLTableSectionElement} section
|
|
1962
|
+
* @returns {number}
|
|
1963
|
+
*/
|
|
1964
|
+
function getRowCount(section) {
|
|
1965
|
+
if (!section) return 0;
|
|
1966
|
+
return section.querySelectorAll(':scope > tr').length;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
/**
|
|
1970
|
+
* Build a 2D grid of occupied slots for a section (for rowspan/colspan placement).
|
|
1971
|
+
* Place each cell in DOM order; return a list of { cell, row, col, colspan, rowspan }.
|
|
1972
|
+
* @param {HTMLTableSectionElement} section
|
|
1973
|
+
* @param {number} numRows
|
|
1974
|
+
* @param {number} numCols
|
|
1975
|
+
* @returns {{ cell: HTMLTableCellElement, row: number, col: number, colspan: number, rowspan: number }[]}
|
|
1976
|
+
*/
|
|
1977
|
+
function computeCellPlacements(section, numRows, numCols) {
|
|
1978
|
+
if (!section || numRows === 0 || numCols === 0) return [];
|
|
1979
|
+
var occupied = Array.from({
|
|
1980
|
+
length: numRows
|
|
1981
|
+
}, function () {
|
|
1982
|
+
return Array(numCols).fill(false);
|
|
1983
|
+
});
|
|
1984
|
+
var placements = [];
|
|
1985
|
+
var rows = section.querySelectorAll(':scope > tr');
|
|
1986
|
+
for (var r = 0; r < rows.length; r++) {
|
|
1987
|
+
var tr = rows[r];
|
|
1988
|
+
var cells = tr.querySelectorAll(':scope > th, :scope > td');
|
|
1989
|
+
var _iterator = _createForOfIteratorHelper(cells),
|
|
1990
|
+
_step;
|
|
1991
|
+
try {
|
|
1992
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1993
|
+
var cell = _step.value;
|
|
1994
|
+
var colspan = Math.min(parseInt(cell.getAttribute('colspan'), 10) || 1, numCols);
|
|
1995
|
+
var rowspan = Math.min(parseInt(cell.getAttribute('rowspan'), 10) || 1, numRows - r);
|
|
1996
|
+
var col = 0;
|
|
1997
|
+
while (col < numCols) {
|
|
1998
|
+
var free = true;
|
|
1999
|
+
for (var rr = r; rr < r + rowspan && free; rr++) {
|
|
2000
|
+
for (var cc = col; cc < col + colspan && free; cc++) {
|
|
2001
|
+
var _occupied$rr;
|
|
2002
|
+
if ((_occupied$rr = occupied[rr]) !== null && _occupied$rr !== void 0 && _occupied$rr[cc]) free = false;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
if (free) break;
|
|
2006
|
+
col++;
|
|
2007
|
+
}
|
|
2008
|
+
if (col + colspan > numCols) continue;
|
|
2009
|
+
for (var _rr = r; _rr < r + rowspan; _rr++) {
|
|
2010
|
+
for (var _cc = col; _cc < col + colspan; _cc++) {
|
|
2011
|
+
if (occupied[_rr]) occupied[_rr][_cc] = true;
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
placements.push({
|
|
2015
|
+
cell: cell,
|
|
2016
|
+
row: r,
|
|
2017
|
+
col: col,
|
|
2018
|
+
colspan: colspan,
|
|
2019
|
+
rowspan: rowspan
|
|
2020
|
+
});
|
|
2021
|
+
}
|
|
2022
|
+
} catch (err) {
|
|
2023
|
+
_iterator.e(err);
|
|
2024
|
+
} finally {
|
|
2025
|
+
_iterator.f();
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
return placements;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
* Apply grid placement styles to a list of placements (1-based line numbers for CSS Grid).
|
|
2033
|
+
*/
|
|
2034
|
+
function applyPlacements(placements) {
|
|
2035
|
+
placements.forEach(function (_ref) {
|
|
2036
|
+
var cell = _ref.cell,
|
|
2037
|
+
row = _ref.row,
|
|
2038
|
+
col = _ref.col,
|
|
2039
|
+
colspan = _ref.colspan,
|
|
2040
|
+
rowspan = _ref.rowspan;
|
|
2041
|
+
cell.style.gridRow = "".concat(row + 1, " / span ").concat(rowspan);
|
|
2042
|
+
cell.style.gridColumn = "".concat(col + 1, " / span ").concat(colspan);
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* Clear grid placement styles from all th/td in a table (for refresh).
|
|
2048
|
+
* @param {HTMLTableElement} table
|
|
2049
|
+
*/
|
|
2050
|
+
function clearPlacements(table) {
|
|
2051
|
+
table.querySelectorAll('th, td').forEach(function (cell) {
|
|
2052
|
+
cell.style.gridRow = '';
|
|
2053
|
+
cell.style.gridColumn = '';
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Normalize maxHeight option to a CSS length string.
|
|
2059
|
+
* @param {number|string} value
|
|
2060
|
+
* @returns {string}
|
|
2061
|
+
*/
|
|
2062
|
+
function normalizeMaxHeight(value) {
|
|
2063
|
+
if (value == null) return DEFAULT_MAX_HEIGHT;
|
|
2064
|
+
if (typeof value === 'number') return "".concat(value, "px");
|
|
2065
|
+
return String(value);
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* Apply scrollable table layout to a single table.
|
|
2070
|
+
* @param {HTMLTableElement} table
|
|
2071
|
+
* @param {{ maxHeight?: number|string }} options
|
|
2072
|
+
*/
|
|
2073
|
+
function applyScrollableTable(table, options) {
|
|
2074
|
+
var thead = table.querySelector('thead');
|
|
2075
|
+
var tbody = table.querySelector('tbody');
|
|
2076
|
+
var tfoot = table.querySelector('tfoot');
|
|
2077
|
+
var numCols = getTableColumnCount(table);
|
|
2078
|
+
if (numCols === 0) return;
|
|
2079
|
+
var theadRows = getRowCount(thead);
|
|
2080
|
+
var tbodyRows = getRowCount(tbody);
|
|
2081
|
+
var tfootRows = getRowCount(tfoot);
|
|
2082
|
+
table.style.setProperty('--apx-scrollable-cols', String(numCols));
|
|
2083
|
+
table.style.setProperty('--apx-scrollable-thead-rows', String(Math.max(1, theadRows)));
|
|
2084
|
+
table.style.setProperty('--apx-scrollable-tbody-rows', String(Math.max(1, tbodyRows)));
|
|
2085
|
+
table.style.setProperty('--apx-scrollable-tfoot-rows', String(Math.max(1, tfootRows)));
|
|
2086
|
+
table.style.setProperty('--apx-scrollable-body-max-height', normalizeMaxHeight(options.maxHeight));
|
|
2087
|
+
table.classList.add(CLASS_TABLE);
|
|
2088
|
+
table.classList.toggle('apx-scrollable-table--has-tfoot', !!(tfoot && tfootRows > 0));
|
|
2089
|
+
table.classList.toggle('apx-scrollable-table--no-thead', !(thead && theadRows > 0));
|
|
2090
|
+
clearPlacements(table);
|
|
2091
|
+
var sections = [{
|
|
2092
|
+
section: thead,
|
|
2093
|
+
rows: Math.max(1, theadRows)
|
|
2094
|
+
}, {
|
|
2095
|
+
section: tbody,
|
|
2096
|
+
rows: Math.max(1, tbodyRows)
|
|
2097
|
+
}, {
|
|
2098
|
+
section: tfoot,
|
|
2099
|
+
rows: Math.max(1, tfootRows)
|
|
2100
|
+
}];
|
|
2101
|
+
sections.forEach(function (_ref2) {
|
|
2102
|
+
var section = _ref2.section,
|
|
2103
|
+
rows = _ref2.rows;
|
|
2104
|
+
if (!section) return;
|
|
2105
|
+
var placements = computeCellPlacements(section, rows, numCols);
|
|
2106
|
+
applyPlacements(placements);
|
|
2107
|
+
});
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* Augments the APX object with scrollableTable(options | 'refresh').
|
|
2112
|
+
* Makes the tbody of a table scrollable while keeping thead/tfoot fixed and columns aligned (CSS Grid + subgrid).
|
|
2113
|
+
*
|
|
2114
|
+
* @param {Object} apx - The APX object to augment.
|
|
2115
|
+
* @example
|
|
2116
|
+
* APX('table.data-grid').scrollableTable({ maxHeight: 300 });
|
|
2117
|
+
* APX('table.data-grid').scrollableTable('refresh');
|
|
2118
|
+
*/
|
|
2119
|
+
function augmentWithScrollableTable(apx) {
|
|
2120
|
+
apx.scrollableTable = function (optionsOrAction) {
|
|
2121
|
+
var isRefresh = optionsOrAction === 'refresh';
|
|
2122
|
+
var options = isRefresh ? null : optionsOrAction && _typeof(optionsOrAction) === 'object' ? optionsOrAction : {};
|
|
2123
|
+
apx.elements.forEach(function (element) {
|
|
2124
|
+
if (element.tagName !== 'TABLE') return;
|
|
2125
|
+
var table = /** @type {HTMLTableElement} */element;
|
|
2126
|
+
var ref = table[DATA_KEY];
|
|
2127
|
+
if (ref) {
|
|
2128
|
+
if (isRefresh) {
|
|
2129
|
+
applyScrollableTable(table, ref.options);
|
|
2130
|
+
} else if (options && Object.keys(options).length > 0) {
|
|
2131
|
+
ref.options = _objectSpread(_objectSpread({}, ref.options), options);
|
|
2132
|
+
applyScrollableTable(table, ref.options);
|
|
2133
|
+
}
|
|
2134
|
+
return;
|
|
2135
|
+
}
|
|
2136
|
+
if (isRefresh) return;
|
|
2137
|
+
applyScrollableTable(table, options);
|
|
2138
|
+
table[DATA_KEY] = {
|
|
2139
|
+
options: _objectSpread({}, options)
|
|
2140
|
+
};
|
|
2141
|
+
});
|
|
2142
|
+
return apx;
|
|
2143
|
+
};
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
/***/ }),
|
|
2147
|
+
|
|
1685
2148
|
/***/ "./modules/toast/toast.mjs":
|
|
1686
2149
|
/*!*********************************!*\
|
|
1687
2150
|
!*** ./modules/toast/toast.mjs ***!
|
|
@@ -3056,12 +3519,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3056
3519
|
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(apx) {
|
|
3057
3520
|
/**
|
|
3058
3521
|
* Convertit le premier formulaire sélectionné en objet JSON
|
|
3522
|
+
* @param {Object} [options] - Options passées à packFormToJSON (ex. { numericKeysAlwaysArray: true })
|
|
3059
3523
|
* @returns {Object} L'objet JSON résultant
|
|
3060
3524
|
* @throws {Error} Si aucun formulaire n'est trouvé ou si le premier élément n'est pas un formulaire
|
|
3061
3525
|
* @example
|
|
3062
3526
|
* const data = APX('form.myformclass').pack();
|
|
3527
|
+
* const dataLegacy = APX('form').pack({ numericKeysAlwaysArray: true });
|
|
3063
3528
|
*/
|
|
3064
|
-
apx.pack = function () {
|
|
3529
|
+
apx.pack = function (options) {
|
|
3065
3530
|
var firstElement = this.first();
|
|
3066
3531
|
if (!firstElement) {
|
|
3067
3532
|
throw new Error('No element found');
|
|
@@ -3069,7 +3534,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3069
3534
|
if (firstElement.tagName !== 'FORM') {
|
|
3070
3535
|
throw new Error('Element is not a form');
|
|
3071
3536
|
}
|
|
3072
|
-
return (0,_packToJson_mjs__WEBPACK_IMPORTED_MODULE_0__.packFormToJSON)(firstElement);
|
|
3537
|
+
return (0,_packToJson_mjs__WEBPACK_IMPORTED_MODULE_0__.packFormToJSON)(firstElement, options);
|
|
3073
3538
|
};
|
|
3074
3539
|
return apx;
|
|
3075
3540
|
}
|
|
@@ -3088,6 +3553,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3088
3553
|
/* harmony export */ packFormToJSON: () => (/* binding */ packFormToJSON)
|
|
3089
3554
|
/* harmony export */ });
|
|
3090
3555
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3556
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3557
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3558
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
3559
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
3091
3560
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3092
3561
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3093
3562
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
@@ -3098,14 +3567,18 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
3098
3567
|
/**
|
|
3099
3568
|
* Convertit un formulaire HTML en objet JSON
|
|
3100
3569
|
* @param {HTMLFormElement} form - Le formulaire à convertir
|
|
3570
|
+
* @param {Object} [options] - Options de conversion
|
|
3571
|
+
* @param {boolean} [options.numericKeysAlwaysArray=false] - Si true, toute clé numérique est traitée comme index de tableau (comportement d'avant 2.6.2). Sinon, heuristique : tableau seulement si indices denses 0,1,2,…,n.
|
|
3101
3572
|
* @returns {Object} L'objet JSON résultant
|
|
3102
3573
|
* @throws {TypeError} Si form n'est pas un HTMLFormElement
|
|
3103
3574
|
*/
|
|
3104
3575
|
var packFormToJSON = function packFormToJSON(form) {
|
|
3576
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3105
3577
|
// Validation de l'entrée
|
|
3106
3578
|
if (!form || !(form instanceof HTMLFormElement)) {
|
|
3107
3579
|
throw new TypeError('packFormToJSON expects an HTMLFormElement');
|
|
3108
3580
|
}
|
|
3581
|
+
var numericKeysAlwaysArray = options.numericKeysAlwaysArray === true;
|
|
3109
3582
|
var formData = new FormData(form);
|
|
3110
3583
|
var jsonData = {};
|
|
3111
3584
|
|
|
@@ -3144,6 +3617,7 @@ var packFormToJSON = function packFormToJSON(form) {
|
|
|
3144
3617
|
|
|
3145
3618
|
var pathUsage = new Map(); // Map<pathString, PathUsage>
|
|
3146
3619
|
var keyAnalysis = new Map(); // Map<basePath, {hasNumeric: boolean, hasString: boolean}>
|
|
3620
|
+
var numericIndicesByPath = new Map(); // Map<pathString, Set<number>> — indices under each parent path
|
|
3147
3621
|
var allEntries = [];
|
|
3148
3622
|
|
|
3149
3623
|
/**
|
|
@@ -3203,6 +3677,13 @@ var packFormToJSON = function packFormToJSON(form) {
|
|
|
3203
3677
|
if (_part.type === 'key') {
|
|
3204
3678
|
currentPath = currentPath ? "".concat(currentPath, "[").concat(_part.name, "]") : _part.name;
|
|
3205
3679
|
} else if (_part.type === 'numeric') {
|
|
3680
|
+
var _parentPath = currentPath;
|
|
3681
|
+
var set = numericIndicesByPath.get(_parentPath);
|
|
3682
|
+
if (!set) {
|
|
3683
|
+
set = new Set();
|
|
3684
|
+
numericIndicesByPath.set(_parentPath, set);
|
|
3685
|
+
}
|
|
3686
|
+
set.add(_part.index);
|
|
3206
3687
|
currentPath = "".concat(currentPath, "[").concat(_part.index, "]");
|
|
3207
3688
|
} else if (_part.type === 'array') {
|
|
3208
3689
|
currentPath = "".concat(currentPath, "[]");
|
|
@@ -3326,6 +3807,36 @@ var packFormToJSON = function packFormToJSON(form) {
|
|
|
3326
3807
|
return (analysis === null || analysis === void 0 ? void 0 : analysis.hasNumeric) && (analysis === null || analysis === void 0 ? void 0 : analysis.hasString);
|
|
3327
3808
|
};
|
|
3328
3809
|
|
|
3810
|
+
/**
|
|
3811
|
+
* True if indices are exactly 0, 1, 2, ..., n (dense, sequential from 0).
|
|
3812
|
+
* @param {number[]} indices - Sorted array of indices
|
|
3813
|
+
* @returns {boolean}
|
|
3814
|
+
*/
|
|
3815
|
+
var isDenseSequential = function isDenseSequential(indices) {
|
|
3816
|
+
if (indices.length === 0) return false;
|
|
3817
|
+
var sorted = _toConsumableArray(indices).sort(function (a, b) {
|
|
3818
|
+
return a - b;
|
|
3819
|
+
});
|
|
3820
|
+
for (var j = 0; j < sorted.length; j++) {
|
|
3821
|
+
if (sorted[j] !== j) return false;
|
|
3822
|
+
}
|
|
3823
|
+
return true;
|
|
3824
|
+
};
|
|
3825
|
+
|
|
3826
|
+
/**
|
|
3827
|
+
* True if numeric keys under this path should be treated as array indices.
|
|
3828
|
+
* With numericKeysAlwaysArray: always true when path has numeric children.
|
|
3829
|
+
* Otherwise: true only when indices are dense 0..n.
|
|
3830
|
+
* @param {string} parentPath - Path to the container that has numeric children
|
|
3831
|
+
* @returns {boolean}
|
|
3832
|
+
*/
|
|
3833
|
+
var useArrayForNumericPath = function useArrayForNumericPath(parentPath) {
|
|
3834
|
+
var set = numericIndicesByPath.get(parentPath);
|
|
3835
|
+
if (!set || set.size === 0) return true;
|
|
3836
|
+
if (numericKeysAlwaysArray) return true;
|
|
3837
|
+
return isDenseSequential(_toConsumableArray(set));
|
|
3838
|
+
};
|
|
3839
|
+
|
|
3329
3840
|
/**
|
|
3330
3841
|
* Convertit un tableau en objet en préservant les indices numériques comme propriétés
|
|
3331
3842
|
* @param {Array} arr - Le tableau à convertir
|
|
@@ -3428,8 +3939,9 @@ var packFormToJSON = function packFormToJSON(form) {
|
|
|
3428
3939
|
* @param {*} value - La valeur à assigner
|
|
3429
3940
|
* @param {Object} parent - Le conteneur parent
|
|
3430
3941
|
* @param {string} basePath - Le chemin de base pour la détection de conflit
|
|
3942
|
+
* @param {string} parentPath - Chemin du conteneur actuel (pour heuristique numeric)
|
|
3431
3943
|
*/
|
|
3432
|
-
var processFinalValue = function processFinalValue(container, part, value, parent, basePath) {
|
|
3944
|
+
var processFinalValue = function processFinalValue(container, part, value, parent, basePath, parentPath) {
|
|
3433
3945
|
if (part.type === 'array') {
|
|
3434
3946
|
var _container, _part$name, _container$_part$name;
|
|
3435
3947
|
// Tableau explicite avec []
|
|
@@ -3440,13 +3952,18 @@ var packFormToJSON = function packFormToJSON(form) {
|
|
|
3440
3952
|
container[part.name] = [container[part.name], value];
|
|
3441
3953
|
}
|
|
3442
3954
|
} else if (part.type === 'numeric') {
|
|
3443
|
-
// Indice numérique final
|
|
3444
3955
|
var index = part.index;
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
container.
|
|
3956
|
+
var useArray = useArrayForNumericPath(parentPath);
|
|
3957
|
+
if (useArray) {
|
|
3958
|
+
container = ensureArray(container, parent.key, parent.container);
|
|
3959
|
+
while (container.length <= index) {
|
|
3960
|
+
container.push(undefined);
|
|
3961
|
+
}
|
|
3962
|
+
container[index] = value;
|
|
3963
|
+
} else {
|
|
3964
|
+
container = ensureObject(container, parent.key, parent.container, true);
|
|
3965
|
+
container[index] = value;
|
|
3448
3966
|
}
|
|
3449
|
-
container[index] = value;
|
|
3450
3967
|
} else {
|
|
3451
3968
|
// Clé simple finale
|
|
3452
3969
|
var conflict = hasConflict(basePath);
|
|
@@ -3490,30 +4007,26 @@ var packFormToJSON = function packFormToJSON(form) {
|
|
|
3490
4007
|
*/
|
|
3491
4008
|
var processIntermediatePart = function processIntermediatePart(container, part, nextPart, parent, basePath, parts, i, key) {
|
|
3492
4009
|
if (part.type === 'numeric') {
|
|
3493
|
-
// Indice numérique : le container doit être un tableau ou un objet (selon conflit)
|
|
3494
4010
|
var index = part.index;
|
|
3495
|
-
var
|
|
3496
|
-
|
|
4011
|
+
var parentPath = buildPathString(parts.slice(0, i));
|
|
4012
|
+
var useArray = useArrayForNumericPath(parentPath) && !hasConflict(basePath);
|
|
4013
|
+
if (!useArray) {
|
|
3497
4014
|
var _container2, _container2$index;
|
|
3498
|
-
// Conflit : utiliser un objet (les indices seront des propriétés)
|
|
3499
4015
|
container = ensureObject(container, parent.key, parent.container, true);
|
|
3500
4016
|
(_container2$index = (_container2 = container)[index]) !== null && _container2$index !== void 0 ? _container2$index : _container2[index] = {};
|
|
3501
4017
|
if (_typeof(container[index]) !== 'object' || container[index] === null) {
|
|
3502
|
-
// Cette erreur ne devrait jamais se produire si la détection fonctionne correctement
|
|
3503
4018
|
var pathParts = parts.slice(0, i + 1);
|
|
3504
4019
|
var currentPath = buildPathString(pathParts);
|
|
3505
4020
|
throw new Error("Cannot access property on primitive value. " + "Key \"".concat(key, "\" tries to access \"").concat(currentPath, "\" but it is already a ").concat(_typeof(container[index]), " value: ").concat(JSON.stringify(container[index]), ". ") + "This should have been detected during conflict detection phase.");
|
|
3506
4021
|
}
|
|
3507
4022
|
} else {
|
|
3508
4023
|
var _container3, _container3$index;
|
|
3509
|
-
// Pas de conflit : utiliser un tableau
|
|
3510
4024
|
container = ensureArray(container, parent.key, parent.container);
|
|
3511
4025
|
while (container.length <= index) {
|
|
3512
4026
|
container.push(undefined);
|
|
3513
4027
|
}
|
|
3514
4028
|
(_container3$index = (_container3 = container)[index]) !== null && _container3$index !== void 0 ? _container3$index : _container3[index] = {};
|
|
3515
4029
|
if (_typeof(container[index]) !== 'object' || container[index] === null) {
|
|
3516
|
-
// Cette erreur ne devrait jamais se produire si la détection fonctionne correctement
|
|
3517
4030
|
var _pathParts = parts.slice(0, i + 1);
|
|
3518
4031
|
var _currentPath = buildPathString(_pathParts);
|
|
3519
4032
|
throw new Error("Cannot access property on primitive value. " + "Key \"".concat(key, "\" tries to access \"").concat(_currentPath, "\" but it is already a ").concat(_typeof(container[index]), " value: ").concat(JSON.stringify(container[index]), ". ") + "This should have been detected during conflict detection phase.");
|
|
@@ -3589,8 +4102,8 @@ var packFormToJSON = function packFormToJSON(form) {
|
|
|
3589
4102
|
var nextPart = i + 1 < parts.length ? parts[i + 1] : null;
|
|
3590
4103
|
var parent = path[path.length - 1];
|
|
3591
4104
|
if (isLast) {
|
|
3592
|
-
|
|
3593
|
-
processFinalValue(container, part, value, parent, basePath);
|
|
4105
|
+
var parentPath = buildPathString(parts.slice(0, i));
|
|
4106
|
+
processFinalValue(container, part, value, parent, basePath, parentPath);
|
|
3594
4107
|
} else {
|
|
3595
4108
|
// Partie intermédiaire : créer la structure
|
|
3596
4109
|
var newContainer = processIntermediatePart(container, part, nextPart, parent, basePath, parts, i, key);
|
|
@@ -3706,10 +4219,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3706
4219
|
/* harmony export */ "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
|
|
3707
4220
|
/* harmony export */ });
|
|
3708
4221
|
/* harmony import */ var _css_tristate_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/tristate.css */ "./modules/tristate/css/tristate.css");
|
|
4222
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3709
4223
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3710
4224
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3711
4225
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
3712
4226
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
4227
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4228
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4229
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4230
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4231
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3713
4232
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3714
4233
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3715
4234
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -3718,12 +4237,12 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
3718
4237
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3719
4238
|
|
|
3720
4239
|
|
|
3721
|
-
/**
|
|
3722
|
-
* Creates a tri-state checkbox for each checkbox element in the apx.elements array.
|
|
3723
|
-
* @param {Array<HTMLElement>} apx - An array of HTMLElements which is returned by APX()
|
|
3724
|
-
* @example
|
|
3725
|
-
* // Call the tristate function on an array of checkbox elements
|
|
3726
|
-
* apx.tristate();
|
|
4240
|
+
/**
|
|
4241
|
+
* Creates a tri-state checkbox for each checkbox element in the apx.elements array.
|
|
4242
|
+
* @param {Array<HTMLElement>} apx - An array of HTMLElements which is returned by APX()
|
|
4243
|
+
* @example
|
|
4244
|
+
* // Call the tristate function on an array of checkbox elements
|
|
4245
|
+
* apx.tristate();
|
|
3727
4246
|
*/
|
|
3728
4247
|
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(apx) {
|
|
3729
4248
|
apx.tristate = function () {
|
|
@@ -3735,27 +4254,139 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
3735
4254
|
originalCheckbox = _createTriStateCheckb2[0],
|
|
3736
4255
|
tristateDom = _createTriStateCheckb2[1],
|
|
3737
4256
|
hiddenInput = _createTriStateCheckb2[2];
|
|
3738
|
-
|
|
4257
|
+
originalCheckbox._apxTristate = {
|
|
4258
|
+
dom: tristateDom,
|
|
4259
|
+
hiddenInput: hiddenInput
|
|
4260
|
+
};
|
|
3739
4261
|
if (options.callbacks && options.callbacks.after && typeof options.callbacks.after === 'function') {
|
|
3740
4262
|
options.callbacks.after(originalCheckbox, tristateDom, hiddenInput);
|
|
3741
4263
|
}
|
|
3742
4264
|
}
|
|
3743
4265
|
});
|
|
4266
|
+
return {
|
|
4267
|
+
setChildren: function setChildren(childrenApx) {
|
|
4268
|
+
return _setChildren(apx, childrenApx, options);
|
|
4269
|
+
}
|
|
4270
|
+
};
|
|
3744
4271
|
};
|
|
3745
4272
|
}
|
|
4273
|
+
|
|
4274
|
+
/**
|
|
4275
|
+
* Link parent tristate(s) to child checkboxes. When exactly one parent: that parent gets
|
|
4276
|
+
* indeterminate-dash automatically and shows dash when children are mixed; click parent to apply its state to all children.
|
|
4277
|
+
* @param {Object} parentApx - APX instance whose elements are the parent checkbox(es)
|
|
4278
|
+
* @param {Object} childrenApx - APX instance whose elements are the child checkbox(es)
|
|
4279
|
+
* @param {Object} options - Options used for the parent (and applied to children when initializing them)
|
|
4280
|
+
*/
|
|
4281
|
+
function _setChildren(parentApx, childrenApx, options) {
|
|
4282
|
+
var parents = parentApx.all().filter(function (el) {
|
|
4283
|
+
return el.type === 'checkbox';
|
|
4284
|
+
});
|
|
4285
|
+
if (parents.length === 0) return;
|
|
4286
|
+
if (parents.length > 1) {
|
|
4287
|
+
console.warn('APX tristate setChildren: only the first parent is linked to all children.');
|
|
4288
|
+
}
|
|
4289
|
+
var parentCheckbox = parents[0];
|
|
4290
|
+
var parentRef = parentCheckbox._apxTristate;
|
|
4291
|
+
if (!parentRef) return;
|
|
4292
|
+
var parentDom = parentRef.dom;
|
|
4293
|
+
var parentHiddenInput = parentRef.hiddenInput;
|
|
4294
|
+
|
|
4295
|
+
// Automatically enable indeterminate (dash) on parent when it has children: dash shows only when children are mixed (--mixed)
|
|
4296
|
+
parentDom.classList.add('apx-tristate--unchecked-indeterminate', 'apx-tristate--indeterminate-dash');
|
|
4297
|
+
var childCheckboxes = childrenApx.all().filter(function (el) {
|
|
4298
|
+
return el.type === 'checkbox';
|
|
4299
|
+
});
|
|
4300
|
+
var childRefs = [];
|
|
4301
|
+
function syncParentFromChildren() {
|
|
4302
|
+
if (childRefs.length === 0) return;
|
|
4303
|
+
var states = childRefs.map(function (ref) {
|
|
4304
|
+
return getTristateState(ref.dom);
|
|
4305
|
+
});
|
|
4306
|
+
var allChecked = states.every(function (s) {
|
|
4307
|
+
return s === 'checked';
|
|
4308
|
+
});
|
|
4309
|
+
var allCrossed = states.every(function (s) {
|
|
4310
|
+
return s === 'crossed';
|
|
4311
|
+
});
|
|
4312
|
+
var allUnchecked = states.every(function (s) {
|
|
4313
|
+
return s === 'unchecked';
|
|
4314
|
+
});
|
|
4315
|
+
var mixed = !allChecked && !allCrossed && !allUnchecked;
|
|
4316
|
+
parentDom.classList.remove('unchecked', 'checked', 'crossed');
|
|
4317
|
+
if (mixed) parentDom.classList.add('apx-tristate--mixed');else parentDom.classList.remove('apx-tristate--mixed');
|
|
4318
|
+
if (allChecked) {
|
|
4319
|
+
parentDom.classList.add('checked');
|
|
4320
|
+
parentHiddenInput.value = 'true';
|
|
4321
|
+
} else if (allCrossed) {
|
|
4322
|
+
parentDom.classList.add('crossed');
|
|
4323
|
+
parentHiddenInput.value = 'false';
|
|
4324
|
+
} else {
|
|
4325
|
+
parentDom.classList.add('unchecked');
|
|
4326
|
+
parentHiddenInput.removeAttribute('name');
|
|
4327
|
+
parentHiddenInput.removeAttribute('value');
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
function applyParentToChildren() {
|
|
4331
|
+
var parentState = getTristateState(parentDom);
|
|
4332
|
+
childRefs.forEach(function (ref) {
|
|
4333
|
+
return setTristateState(ref.checkbox, ref.dom, ref.hiddenInput, parentState);
|
|
4334
|
+
});
|
|
4335
|
+
}
|
|
4336
|
+
var childOptions = _objectSpread(_objectSpread({}, options), {}, {
|
|
4337
|
+
callbacks: {
|
|
4338
|
+
after: function after(checkbox, dom, hiddenInput) {
|
|
4339
|
+
childRefs.push({
|
|
4340
|
+
checkbox: checkbox,
|
|
4341
|
+
dom: dom,
|
|
4342
|
+
hiddenInput: hiddenInput
|
|
4343
|
+
});
|
|
4344
|
+
},
|
|
4345
|
+
change: syncParentFromChildren
|
|
4346
|
+
}
|
|
4347
|
+
});
|
|
4348
|
+
childrenApx.tristate(childOptions);
|
|
4349
|
+
syncParentFromChildren();
|
|
4350
|
+
parentDom.addEventListener('click', function () {
|
|
4351
|
+
return setTimeout(applyParentToChildren, 0);
|
|
4352
|
+
});
|
|
4353
|
+
}
|
|
4354
|
+
function getTristateState(dom) {
|
|
4355
|
+
if (dom.classList.contains('checked')) return 'checked';
|
|
4356
|
+
if (dom.classList.contains('crossed')) return 'crossed';
|
|
4357
|
+
return 'unchecked';
|
|
4358
|
+
}
|
|
4359
|
+
function setTristateState(checkbox, dom, hiddenInput, state) {
|
|
4360
|
+
dom.classList.remove('unchecked', 'checked', 'crossed');
|
|
4361
|
+
dom.classList.add(state);
|
|
4362
|
+
var name = checkbox.dataset.name || checkbox.getAttribute('data-name') || checkbox.name || '';
|
|
4363
|
+
if (state === 'checked') {
|
|
4364
|
+
hiddenInput.value = 'true';
|
|
4365
|
+
if (name) hiddenInput.setAttribute('name', name);
|
|
4366
|
+
checkbox.checked = true;
|
|
4367
|
+
} else if (state === 'crossed') {
|
|
4368
|
+
hiddenInput.value = 'false';
|
|
4369
|
+
if (name) hiddenInput.setAttribute('name', name);
|
|
4370
|
+
checkbox.checked = false;
|
|
4371
|
+
} else {
|
|
4372
|
+
hiddenInput.removeAttribute('name');
|
|
4373
|
+
hiddenInput.removeAttribute('value');
|
|
4374
|
+
checkbox.checked = false;
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
3746
4377
|
function toggleTriStateCheckboxState(customCheckbox, actualCheckbox, hiddenInput) {
|
|
3747
|
-
|
|
3748
|
-
|
|
4378
|
+
var wasChecked = customCheckbox.classList.contains('checked');
|
|
4379
|
+
var wasCrossed = customCheckbox.classList.contains('crossed');
|
|
4380
|
+
customCheckbox.classList.remove('unchecked', 'checked', 'crossed');
|
|
4381
|
+
if (wasChecked) {
|
|
3749
4382
|
customCheckbox.classList.add('crossed');
|
|
3750
4383
|
actualCheckbox.checked = false;
|
|
3751
4384
|
hiddenInput.value = 'false';
|
|
3752
|
-
} else if (
|
|
3753
|
-
customCheckbox.classList.remove('crossed');
|
|
4385
|
+
} else if (wasCrossed) {
|
|
3754
4386
|
customCheckbox.classList.add('unchecked');
|
|
3755
4387
|
hiddenInput.removeAttribute('name'); // Ensure the hidden input doesn't post any value
|
|
3756
4388
|
hiddenInput.removeAttribute('value'); // Ensure the hidden input doesn't post any value
|
|
3757
4389
|
} else {
|
|
3758
|
-
customCheckbox.classList.remove('unchecked');
|
|
3759
4390
|
customCheckbox.classList.add('checked');
|
|
3760
4391
|
actualCheckbox.checked = true;
|
|
3761
4392
|
hiddenInput.value = 'true';
|
|
@@ -3774,14 +4405,26 @@ function createTriStateCheckbox(checkboxElement, options) {
|
|
|
3774
4405
|
var tristateDom = document.createElement('div');
|
|
3775
4406
|
tristateDom.classList.add('apx-tristate');
|
|
3776
4407
|
if (options.size) {
|
|
3777
|
-
if (options.size.width) {
|
|
3778
|
-
|
|
4408
|
+
if (options.size.width != null) {
|
|
4409
|
+
var w = options.size.width;
|
|
4410
|
+
if (typeof w !== 'number' && typeof w !== 'string') {
|
|
4411
|
+
throw new TypeError('tristate size.width must be a number (px) or a string (CSS length).');
|
|
4412
|
+
}
|
|
4413
|
+
tristateDom.style.width = typeof w === 'number' ? w + 'px' : String(w);
|
|
3779
4414
|
}
|
|
3780
|
-
if (options.size.height) {
|
|
3781
|
-
|
|
4415
|
+
if (options.size.height != null) {
|
|
4416
|
+
var h = options.size.height;
|
|
4417
|
+
if (typeof h !== 'number' && typeof h !== 'string') {
|
|
4418
|
+
throw new TypeError('tristate size.height must be a number (px) or a string (CSS length).');
|
|
4419
|
+
}
|
|
4420
|
+
tristateDom.style.height = typeof h === 'number' ? h + 'px' : String(h);
|
|
3782
4421
|
}
|
|
3783
4422
|
}
|
|
3784
4423
|
if (options.classes) (_tristateDom$classLis = tristateDom.classList).add.apply(_tristateDom$classLis, _toConsumableArray(computeClasses(options.classes)));
|
|
4424
|
+
var colors = resolveColors(options);
|
|
4425
|
+
if (colors.tick != null) tristateDom.style.setProperty('--apx-tristate-tick-color', String(colors.tick));
|
|
4426
|
+
if (colors.checked != null) tristateDom.style.setProperty('--apx-tristate-checked-color', String(colors.checked));
|
|
4427
|
+
if (colors.crossed != null) tristateDom.style.setProperty('--apx-tristate-crossed-color', String(colors.crossed));
|
|
3785
4428
|
tristateDom.style.margin = checkboxStyle.margin;
|
|
3786
4429
|
if (checkboxElement.checked) {
|
|
3787
4430
|
tristateDom.classList.add('checked');
|
|
@@ -3824,18 +4467,16 @@ function createTriStateCheckbox(checkboxElement, options) {
|
|
|
3824
4467
|
return [checkboxElement, tristateDom, hiddenInput];
|
|
3825
4468
|
}
|
|
3826
4469
|
function setDefaultState(options, tristateDom, hiddenInput) {
|
|
3827
|
-
//
|
|
4470
|
+
// Ensure only one state class is set (uncheckedAppearance modifiers must not affect checked/crossed)
|
|
4471
|
+
tristateDom.classList.remove('unchecked', 'checked', 'crossed');
|
|
3828
4472
|
if (options.defaultState === 'checked') {
|
|
3829
|
-
tristateDom.classList.remove('unchecked');
|
|
3830
4473
|
tristateDom.classList.add('checked');
|
|
3831
4474
|
hiddenInput.value = 'true';
|
|
3832
4475
|
} else if (options.defaultState === 'unchecked') {
|
|
3833
|
-
tristateDom.classList.remove('checked');
|
|
3834
4476
|
tristateDom.classList.add('unchecked');
|
|
3835
4477
|
hiddenInput.removeAttribute('name'); // Ensure the hidden input doesn't post any value
|
|
3836
4478
|
hiddenInput.removeAttribute('value'); // Ensure the hidden input doesn't post any value
|
|
3837
4479
|
} else if (options.defaultState === 'crossed') {
|
|
3838
|
-
tristateDom.classList.remove('checked');
|
|
3839
4480
|
tristateDom.classList.add('crossed');
|
|
3840
4481
|
hiddenInput.value = 'false';
|
|
3841
4482
|
}
|
|
@@ -3851,6 +4492,14 @@ function computeClasses(classes) {
|
|
|
3851
4492
|
}
|
|
3852
4493
|
return computedClasses;
|
|
3853
4494
|
}
|
|
4495
|
+
function resolveColors(options) {
|
|
4496
|
+
var c = options.colors || {};
|
|
4497
|
+
return {
|
|
4498
|
+
tick: c.tick != null ? c.tick : options.tickColor,
|
|
4499
|
+
checked: c.checked != null ? c.checked : options.checkedColor,
|
|
4500
|
+
crossed: c.crossed != null ? c.crossed : options.crossedColor
|
|
4501
|
+
};
|
|
4502
|
+
}
|
|
3854
4503
|
function bubbleEventsToOriginalCheckbox(options, checkboxElement, tristateDom, hiddenInput, event) {
|
|
3855
4504
|
//if options.callbacks.change is set, call it
|
|
3856
4505
|
if (options.callbacks && options.callbacks.change && typeof options.callbacks.change === 'function') {
|
|
@@ -4000,10 +4649,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4000
4649
|
/* harmony export */ });
|
|
4001
4650
|
/* harmony import */ var _modules_listen_listen_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/listen/listen.mjs */ "./modules/listen/listen.mjs");
|
|
4002
4651
|
/* harmony import */ var _modules_tristate_tristate_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/tristate/tristate.mjs */ "./modules/tristate/tristate.mjs");
|
|
4003
|
-
/* harmony import */ var
|
|
4004
|
-
/* harmony import */ var
|
|
4005
|
-
/* harmony import */ var
|
|
4006
|
-
/* harmony import */ var
|
|
4652
|
+
/* harmony import */ var _modules_scrollableTable_scrollableTable_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/scrollableTable/scrollableTable.mjs */ "./modules/scrollableTable/scrollableTable.mjs");
|
|
4653
|
+
/* harmony import */ var _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/dialog/dialog.mjs */ "./modules/dialog/dialog.mjs");
|
|
4654
|
+
/* harmony import */ var _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/toast/toast.mjs */ "./modules/toast/toast.mjs");
|
|
4655
|
+
/* harmony import */ var _modules_common_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/common.mjs */ "./modules/common.mjs");
|
|
4656
|
+
/* harmony import */ var _modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/tools/exports.mjs */ "./modules/tools/exports.mjs");
|
|
4657
|
+
|
|
4007
4658
|
|
|
4008
4659
|
|
|
4009
4660
|
|
|
@@ -4116,13 +4767,14 @@ var APX = function APX(input) {
|
|
|
4116
4767
|
};
|
|
4117
4768
|
(0,_modules_listen_listen_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(apx);
|
|
4118
4769
|
(0,_modules_tristate_tristate_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(apx);
|
|
4119
|
-
(0,
|
|
4770
|
+
(0,_modules_scrollableTable_scrollableTable_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])(apx);
|
|
4771
|
+
(0,_modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_6__.augmentWithPack)(apx);
|
|
4120
4772
|
return apx;
|
|
4121
4773
|
};
|
|
4122
|
-
APX.loadCss =
|
|
4123
|
-
APX.dialog =
|
|
4124
|
-
APX.toast =
|
|
4125
|
-
APX.tools =
|
|
4774
|
+
APX.loadCss = _modules_common_mjs__WEBPACK_IMPORTED_MODULE_5__.loadCss;
|
|
4775
|
+
APX.dialog = _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
4776
|
+
APX.toast = _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
4777
|
+
APX.tools = _modules_tools_exports_mjs__WEBPACK_IMPORTED_MODULE_6__.tools;
|
|
4126
4778
|
APX.isAPXObject = function (obj) {
|
|
4127
4779
|
return obj && obj._isAPXObject === true;
|
|
4128
4780
|
};
|