funda-ui 3.8.821 → 3.9.14

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.
@@ -11,433 +11,6 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ 109:
15
- /***/ (function(module, exports, __webpack_require__) {
16
-
17
- /* module decorator */ module = __webpack_require__.nmd(module);
18
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
19
- (function webpackUniversalModuleDefinition(root, factory) {
20
- if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory(__webpack_require__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
21
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
22
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
23
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
24
- })(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
25
- return (/******/function () {
26
- // webpackBootstrap
27
- /******/
28
- "use strict";
29
-
30
- /******/
31
- var __webpack_modules__ = {
32
- /***/787: /***/function _(module) {
33
- module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
34
-
35
- /***/
36
- }
37
-
38
- /******/
39
- };
40
- /************************************************************************/
41
- /******/ // The module cache
42
- /******/
43
- var __webpack_module_cache__ = {};
44
- /******/
45
- /******/ // The require function
46
- /******/
47
- function __nested_webpack_require_1471__(moduleId) {
48
- /******/ // Check if module is in cache
49
- /******/var cachedModule = __webpack_module_cache__[moduleId];
50
- /******/
51
- if (cachedModule !== undefined) {
52
- /******/return cachedModule.exports;
53
- /******/
54
- }
55
- /******/ // Create a new module (and put it into the cache)
56
- /******/
57
- var module = __webpack_module_cache__[moduleId] = {
58
- /******/ // no module.id needed
59
- /******/ // no module.loaded needed
60
- /******/exports: {}
61
- /******/
62
- };
63
- /******/
64
- /******/ // Execute the module function
65
- /******/
66
- __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1471__);
67
- /******/
68
- /******/ // Return the exports of the module
69
- /******/
70
- return module.exports;
71
- /******/
72
- }
73
- /******/
74
- /************************************************************************/
75
- /******/ /* webpack/runtime/compat get default export */
76
- /******/
77
- (function () {
78
- /******/ // getDefaultExport function for compatibility with non-harmony modules
79
- /******/__nested_webpack_require_1471__.n = function (module) {
80
- /******/var getter = module && module.__esModule ? /******/function () {
81
- return module['default'];
82
- } : /******/function () {
83
- return module;
84
- };
85
- /******/
86
- __nested_webpack_require_1471__.d(getter, {
87
- a: getter
88
- });
89
- /******/
90
- return getter;
91
- /******/
92
- };
93
- /******/
94
- })();
95
- /******/
96
- /******/ /* webpack/runtime/define property getters */
97
- /******/
98
- (function () {
99
- /******/ // define getter functions for harmony exports
100
- /******/__nested_webpack_require_1471__.d = function (exports, definition) {
101
- /******/for (var key in definition) {
102
- /******/if (__nested_webpack_require_1471__.o(definition, key) && !__nested_webpack_require_1471__.o(exports, key)) {
103
- /******/Object.defineProperty(exports, key, {
104
- enumerable: true,
105
- get: definition[key]
106
- });
107
- /******/
108
- }
109
- /******/
110
- }
111
- /******/
112
- };
113
- /******/
114
- })();
115
- /******/
116
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
117
- /******/
118
- (function () {
119
- /******/__nested_webpack_require_1471__.o = function (obj, prop) {
120
- return Object.prototype.hasOwnProperty.call(obj, prop);
121
- };
122
- /******/
123
- })();
124
- /******/
125
- /******/ /* webpack/runtime/make namespace object */
126
- /******/
127
- (function () {
128
- /******/ // define __esModule on exports
129
- /******/__nested_webpack_require_1471__.r = function (exports) {
130
- /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
131
- /******/Object.defineProperty(exports, Symbol.toStringTag, {
132
- value: 'Module'
133
- });
134
- /******/
135
- }
136
- /******/
137
- Object.defineProperty(exports, '__esModule', {
138
- value: true
139
- });
140
- /******/
141
- };
142
- /******/
143
- })();
144
- /******/
145
- /************************************************************************/
146
- var __webpack_exports__ = {};
147
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
148
- (function () {
149
- __nested_webpack_require_1471__.r(__webpack_exports__);
150
- /* harmony export */
151
- __nested_webpack_require_1471__.d(__webpack_exports__, {
152
- /* harmony export */"default": function _default() {
153
- return __WEBPACK_DEFAULT_EXPORT__;
154
- }
155
- /* harmony export */
156
- });
157
- /* harmony import */
158
- var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1471__(787);
159
- /* harmony import */
160
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1471__.n(react__WEBPACK_IMPORTED_MODULE_0__);
161
- function _typeof(obj) {
162
- "@babel/helpers - typeof";
163
-
164
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
165
- return typeof obj;
166
- } : function (obj) {
167
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
168
- }, _typeof(obj);
169
- }
170
- var _excluded = ["wrapperClassName", "itemSelectedClassName", "disabled", "required", "value", "label", "name", "id", "checked", "indeterminate", "style", "tabIndex", "onChange", "onBlur", "onFocus"];
171
- function _extends() {
172
- _extends = Object.assign ? Object.assign.bind() : function (target) {
173
- for (var i = 1; i < arguments.length; i++) {
174
- var source = arguments[i];
175
- for (var key in source) {
176
- if (Object.prototype.hasOwnProperty.call(source, key)) {
177
- target[key] = source[key];
178
- }
179
- }
180
- }
181
- return target;
182
- };
183
- return _extends.apply(this, arguments);
184
- }
185
- function ownKeys(object, enumerableOnly) {
186
- var keys = Object.keys(object);
187
- if (Object.getOwnPropertySymbols) {
188
- var symbols = Object.getOwnPropertySymbols(object);
189
- enumerableOnly && (symbols = symbols.filter(function (sym) {
190
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
191
- })), keys.push.apply(keys, symbols);
192
- }
193
- return keys;
194
- }
195
- function _objectSpread(target) {
196
- for (var i = 1; i < arguments.length; i++) {
197
- var source = null != arguments[i] ? arguments[i] : {};
198
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
199
- _defineProperty(target, key, source[key]);
200
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
201
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
202
- });
203
- }
204
- return target;
205
- }
206
- function _defineProperty(obj, key, value) {
207
- key = _toPropertyKey(key);
208
- if (key in obj) {
209
- Object.defineProperty(obj, key, {
210
- value: value,
211
- enumerable: true,
212
- configurable: true,
213
- writable: true
214
- });
215
- } else {
216
- obj[key] = value;
217
- }
218
- return obj;
219
- }
220
- function _toPropertyKey(arg) {
221
- var key = _toPrimitive(arg, "string");
222
- return _typeof(key) === "symbol" ? key : String(key);
223
- }
224
- function _toPrimitive(input, hint) {
225
- if (_typeof(input) !== "object" || input === null) return input;
226
- var prim = input[Symbol.toPrimitive];
227
- if (prim !== undefined) {
228
- var res = prim.call(input, hint || "default");
229
- if (_typeof(res) !== "object") return res;
230
- throw new TypeError("@@toPrimitive must return a primitive value.");
231
- }
232
- return (hint === "string" ? String : Number)(input);
233
- }
234
- function _slicedToArray(arr, i) {
235
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
236
- }
237
- function _nonIterableRest() {
238
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
239
- }
240
- function _unsupportedIterableToArray(o, minLen) {
241
- if (!o) return;
242
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
243
- var n = Object.prototype.toString.call(o).slice(8, -1);
244
- if (n === "Object" && o.constructor) n = o.constructor.name;
245
- if (n === "Map" || n === "Set") return Array.from(o);
246
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
247
- }
248
- function _arrayLikeToArray(arr, len) {
249
- if (len == null || len > arr.length) len = arr.length;
250
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
251
- return arr2;
252
- }
253
- function _iterableToArrayLimit(arr, i) {
254
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
255
- if (null != _i) {
256
- var _s,
257
- _e,
258
- _x,
259
- _r,
260
- _arr = [],
261
- _n = !0,
262
- _d = !1;
263
- try {
264
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
265
- if (Object(_i) !== _i) return;
266
- _n = !1;
267
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
268
- } catch (err) {
269
- _d = !0, _e = err;
270
- } finally {
271
- try {
272
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
273
- } finally {
274
- if (_d) throw _e;
275
- }
276
- }
277
- return _arr;
278
- }
279
- }
280
- function _arrayWithHoles(arr) {
281
- if (Array.isArray(arr)) return arr;
282
- }
283
- function _objectWithoutProperties(source, excluded) {
284
- if (source == null) return {};
285
- var target = _objectWithoutPropertiesLoose(source, excluded);
286
- var key, i;
287
- if (Object.getOwnPropertySymbols) {
288
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
289
- for (i = 0; i < sourceSymbolKeys.length; i++) {
290
- key = sourceSymbolKeys[i];
291
- if (excluded.indexOf(key) >= 0) continue;
292
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
293
- target[key] = source[key];
294
- }
295
- }
296
- return target;
297
- }
298
- function _objectWithoutPropertiesLoose(source, excluded) {
299
- if (source == null) return {};
300
- var target = {};
301
- var sourceKeys = Object.keys(source);
302
- var key, i;
303
- for (i = 0; i < sourceKeys.length; i++) {
304
- key = sourceKeys[i];
305
- if (excluded.indexOf(key) >= 0) continue;
306
- target[key] = source[key];
307
- }
308
- return target;
309
- }
310
- var Checkbox = /*#__PURE__*/(0, react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, _ref) {
311
- var wrapperClassName = props.wrapperClassName,
312
- itemSelectedClassName = props.itemSelectedClassName,
313
- disabled = props.disabled,
314
- required = props.required,
315
- value = props.value,
316
- label = props.label,
317
- name = props.name,
318
- id = props.id,
319
- checked = props.checked,
320
- indeterminate = props.indeterminate,
321
- style = props.style,
322
- tabIndex = props.tabIndex,
323
- onChange = props.onChange,
324
- onBlur = props.onBlur,
325
- onFocus = props.onFocus,
326
- attributes = _objectWithoutProperties(props, _excluded);
327
- var uniqueID = (0, react__WEBPACK_IMPORTED_MODULE_0__.useId)();
328
- var idRes = id || uniqueID;
329
- var rootRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
330
- var valRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
331
- var _useState = (0, react__WEBPACK_IMPORTED_MODULE_0__.useState)( false || false),
332
- _useState2 = _slicedToArray(_useState, 2),
333
- val = _useState2[0],
334
- setVal = _useState2[1]; // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
335
-
336
- function handleFocus(event) {
337
- var _rootRef$current;
338
- (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.classList.add('focus');
339
-
340
- //
341
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
342
- }
343
- function handleChange(event) {
344
- var _rootRef$current2;
345
- var _val = event.target.checked;
346
- setVal(_val);
347
-
348
- //----
349
- //remove focus style
350
- (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.classList.remove('focus');
351
-
352
- //
353
- if (typeof onChange === 'function') {
354
- onChange(event, _val);
355
- }
356
- }
357
- function handleBlur(event) {
358
- var _rootRef$current3;
359
- //----
360
- //remove focus style
361
- (_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 ? void 0 : _rootRef$current3.classList.remove('focus');
362
-
363
- //
364
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
365
- }
366
- (0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
367
- // default value
368
- setVal(checked);
369
-
370
- // Set a checkbox to indeterminate state
371
- if (typeof indeterminate !== 'undefined') {
372
- valRef.current.indeterminate = indeterminate;
373
- }
374
- }, [checked, indeterminate]);
375
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
376
- className: "".concat(wrapperClassName || wrapperClassName === '' ? wrapperClassName : "mb-3 position-relative", " ").concat(val ? itemSelectedClassName || 'item-selected' : ''),
377
- ref: rootRef
378
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
379
- className: "form-check"
380
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
381
- ref: function ref(node) {
382
- valRef.current = node;
383
- if (typeof _ref === 'function') {
384
- _ref(node);
385
- } else if (_ref) {
386
- _ref.current = node;
387
- }
388
- },
389
- tabIndex: tabIndex || 0,
390
- type: "checkbox",
391
- className: "form-check-input",
392
- id: "label-".concat(idRes)
393
-
394
- // Don't use "name", it's just a container to display the label
395
- ,
396
-
397
- "data-name": name !== null && name !== void 0 && name.match(/(\[.*?\])/gi) ? "".concat(name.split('[')[0], "-label[]") : "".concat(name, "-label"),
398
- "data-checkbox": true,
399
- "data-checked": val,
400
- disabled: disabled || null,
401
- required: required || null,
402
- onChange: handleChange,
403
- onFocus: handleFocus,
404
- onBlur: handleBlur,
405
- defaultValue: value || '',
406
- checked: val // component status will not change if defaultChecked is used
407
- ,
408
-
409
- style: _objectSpread({
410
- cursor: 'pointer'
411
- }, style)
412
- }, attributes)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
413
- type: "hidden",
414
- id: idRes,
415
- name: name,
416
- value: val ? value || '' : '' // do not use `defaultValue`
417
- }, attributes)), label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, typeof label === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
418
- htmlFor: "label-".concat(idRes),
419
- className: "form-check-label",
420
- dangerouslySetInnerHTML: {
421
- __html: "".concat(label)
422
- }
423
- }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", {
424
- htmlFor: "label-".concat(idRes),
425
- className: "form-check-label"
426
- }, label)) : null)));
427
- });
428
- /* harmony default export */
429
- var __WEBPACK_DEFAULT_EXPORT__ = Checkbox;
430
- })();
431
-
432
- /******/
433
- return __webpack_exports__;
434
- /******/
435
- }()
436
- );
437
- });
438
-
439
- /***/ }),
440
-
441
14
  /***/ 426:
442
15
  /***/ ((module) => {
443
16
 
@@ -619,16 +192,13 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
619
192
  /******/ }
620
193
  /******/ // Create a new module (and put it into the cache)
621
194
  /******/ var module = __webpack_module_cache__[moduleId] = {
622
- /******/ id: moduleId,
623
- /******/ loaded: false,
195
+ /******/ // no module.id needed
196
+ /******/ // no module.loaded needed
624
197
  /******/ exports: {}
625
198
  /******/ };
626
199
  /******/
627
200
  /******/ // Execute the module function
628
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
629
- /******/
630
- /******/ // Flag the module as loaded
631
- /******/ module.loaded = true;
201
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
632
202
  /******/
633
203
  /******/ // Return the exports of the module
634
204
  /******/ return module.exports;
@@ -675,15 +245,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
675
245
  /******/ };
676
246
  /******/ })();
677
247
  /******/
678
- /******/ /* webpack/runtime/node module decorator */
679
- /******/ (() => {
680
- /******/ __webpack_require__.nmd = (module) => {
681
- /******/ module.paths = [];
682
- /******/ if (!module.children) module.children = [];
683
- /******/ return module;
684
- /******/ };
685
- /******/ })();
686
- /******/
687
248
  /************************************************************************/
688
249
  var __webpack_exports__ = {};
689
250
  // This entry need to be wrapped in an IIFE because it need to be in strict mode.
@@ -745,12 +306,10 @@ var TableField = function TableField(props) {
745
306
  }, content));
746
307
  };
747
308
  /* harmony default export */ const src_TableField = (TableField);
748
- // EXTERNAL MODULE: ../Checkbox/dist/cjs/index.js
749
- var cjs = __webpack_require__(109);
750
- var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
751
309
  // EXTERNAL MODULE: ./src/utils/dom.js
752
310
  var dom = __webpack_require__(426);
753
311
  ;// CONCATENATED MODULE: ./src/table-utils.ts
312
+
754
313
  var removeItemOnce = function removeItemOnce(arr, key) {
755
314
  return arr.filter(function (item) {
756
315
  return item.key !== key;
@@ -808,6 +367,11 @@ var setCheckboxCheckedData = function setCheckboxCheckedData(arr, key, val) {
808
367
  if (item.key === key) arr[index].checked = val;
809
368
  });
810
369
  };
370
+ var getAllCheckboxInput = function getAllCheckboxInput(el) {
371
+ if (el === null) return [];
372
+ var _checkboxes = (0,dom.getChildren)(el.closest('table').querySelector('tbody'), '[type="checkbox"]');
373
+ return [].slice.call(_checkboxes);
374
+ };
811
375
  ;// CONCATENATED MODULE: ./src/TableFieldRow.tsx
812
376
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
813
377
  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."); }
@@ -821,6 +385,8 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
821
385
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
822
386
 
823
387
 
388
+ // HAS CHECKBOX
389
+
824
390
 
825
391
 
826
392
 
@@ -834,6 +400,7 @@ var TableFieldRow = function TableFieldRow(props) {
834
400
  _props$rowActiveClass = props.rowActiveClassName,
835
401
  rowActiveClassName = _props$rowActiveClass === void 0 ? 'active' : _props$rowActiveClass,
836
402
  fieldsChecked = props.fieldsChecked,
403
+ fieldsCheckedAct = props.fieldsCheckedAct,
837
404
  updateFirstInitCheckboxesClassName = props.updateFirstInitCheckboxesClassName,
838
405
  draggable = props.draggable,
839
406
  useRadio = props.useRadio,
@@ -864,6 +431,12 @@ var TableFieldRow = function TableFieldRow(props) {
864
431
  _useState2 = _slicedToArray(_useState, 2),
865
432
  firstInitCheckboxes = _useState2[0],
866
433
  setFirstInitCheckboxes = _useState2[1];
434
+
435
+ //
436
+ var _ref = fieldsCheckedAct || [null, null],
437
+ _ref2 = _slicedToArray(_ref, 2),
438
+ fieldsCheckedUpdateDataPrint = _ref2[0],
439
+ setFieldsCheckedUpdateDataPrint = _ref2[1];
867
440
  var rowIndex = rowKey === null || rowKey === void 0 ? void 0 : rowKey.replace('row-', '');
868
441
 
869
442
  // exposes the following methods
@@ -998,6 +571,24 @@ var TableFieldRow = function TableFieldRow(props) {
998
571
  var _checkedData = getCheckedData;
999
572
  var _res = getCheckedPrint;
1000
573
 
574
+ // STEP 1:
575
+ // Update checked print from "fieldsChecked"
576
+ // !!! Only one time is allowed
577
+ //-----------
578
+ if (!fieldsCheckedUpdateDataPrint) {
579
+ if (Array.isArray(fieldsChecked)) {
580
+ var _checkboxes = getAllCheckboxInput(el);
581
+ _checkboxes.forEach(function (node, rowIndex) {
582
+ if (fieldsChecked[Number(rowIndex)] === true) {
583
+ _res.push(formatCheckboxControlVal(node));
584
+ }
585
+ });
586
+ }
587
+
588
+ //
589
+ setFieldsCheckedUpdateDataPrint(true);
590
+ }
591
+
1001
592
  // STEP 1:
1002
593
  // Current checkbox
1003
594
  //-----------
@@ -1170,10 +761,15 @@ var TableFieldRow = function TableFieldRow(props) {
1170
761
  cy: "12",
1171
762
  r: "5.25",
1172
763
  fill: "currentColor"
1173
- }))))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
1174
- ref: checkboxRef,
1175
- wrapperClassName: "",
764
+ }))))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
765
+ className: "form-check__wrapper"
766
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
767
+ className: "form-check d-inline-block"
768
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
769
+ type: "checkbox",
770
+ className: "form-check-input",
1176
771
  name: "checkbox-".concat(checkboxNamePrefix, "-").concat(rowIndex),
772
+ ref: checkboxRef,
1177
773
  tabIndex: -1,
1178
774
  "data-index": "".concat(rowIndex),
1179
775
  "data-key": "".concat(rowKey),
@@ -1181,10 +777,13 @@ var TableFieldRow = function TableFieldRow(props) {
1181
777
  checked: (_latestCheckedData$fi = latestCheckedData().filter(function (cur) {
1182
778
  return cur.key === rowKey;
1183
779
  })[0]) === null || _latestCheckedData$fi === void 0 ? void 0 : _latestCheckedData$fi.checked,
1184
- onChange: function onChange(e, val) {
1185
- checkedAct(e.target, val);
780
+ onChange: function onChange(e) {
781
+ var _latestCheckedData$fi2;
782
+ checkedAct(e.target, !((_latestCheckedData$fi2 = latestCheckedData().filter(function (cur) {
783
+ return cur.key === rowKey;
784
+ })[0]) !== null && _latestCheckedData$fi2 !== void 0 && _latestCheckedData$fi2.checked));
1186
785
  }
1187
- }))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
786
+ }))))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
1188
787
  ref: contentRef
1189
788
  }, content)));
1190
789
  };
@@ -1211,6 +810,7 @@ var TableRow = function TableRow(props) {
1211
810
  _props$rowActiveClass = props.rowActiveClassName,
1212
811
  rowActiveClassName = _props$rowActiveClass === void 0 ? 'active' : _props$rowActiveClass,
1213
812
  fieldsChecked = props.fieldsChecked,
813
+ fieldsCheckedAct = props.fieldsCheckedAct,
1214
814
  index = props.index,
1215
815
  data = props.data,
1216
816
  headerLabel = props.headerLabel,
@@ -1293,6 +893,7 @@ var TableRow = function TableRow(props) {
1293
893
  tableCheckRef: tableCheckRef,
1294
894
  rowActiveClassName: rowActiveClassName,
1295
895
  fieldsChecked: fieldsChecked,
896
+ fieldsCheckedAct: fieldsCheckedAct,
1296
897
  updateFirstInitCheckboxesClassName: setFirstInitCheckboxesClassName,
1297
898
  useRadio: useRadio,
1298
899
  columnHeader: typeof headerItem.content === 'string' ? headerItem.content.replace(/(<([^>]+)>)/ig, '') : headerItem.content,
@@ -1339,6 +940,7 @@ var TableRow = function TableRow(props) {
1339
940
  ;// CONCATENATED MODULE: ./src/TableHeaders.tsx
1340
941
 
1341
942
 
943
+ // HAS CHECKBOX
1342
944
 
1343
945
 
1344
946
 
@@ -1385,8 +987,8 @@ var TableHeaders = function TableHeaders(props) {
1385
987
  // STEP 2:
1386
988
  // All child checkboxes
1387
989
  //-----------
1388
- var _checkboxes = (0,dom.getChildren)(el.closest('table').querySelector('tbody'), '[type="checkbox"]');
1389
- [].slice.call(_checkboxes).forEach(function (node) {
990
+ var _checkboxes = getAllCheckboxInput(el);
991
+ _checkboxes.forEach(function (node) {
1390
992
  if (val === true) {
1391
993
  setCheckboxCheckedData(_checkedData, node.dataset.key, true);
1392
994
  _res.push(formatCheckboxControlVal(node));
@@ -1450,18 +1052,26 @@ var TableHeaders = function TableHeaders(props) {
1450
1052
  style: {
1451
1053
  visibility: useRadio ? 'hidden' : 'visible'
1452
1054
  }
1453
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
1454
- wrapperClassName: "",
1055
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
1056
+ className: "form-check__wrapper"
1057
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
1058
+ className: "form-check d-inline-block"
1059
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
1060
+ type: "checkbox",
1061
+ className: "form-check-input",
1455
1062
  name: "checkbox-".concat(checkboxNamePrefix, "-all"),
1456
1063
  tabIndex: -1,
1457
1064
  value: "row-all",
1458
1065
  checked: (_filter$ = getCheckedRootData.filter(function (cur) {
1459
1066
  return cur.key === 'row-all';
1460
1067
  })[0]) === null || _filter$ === void 0 ? void 0 : _filter$.checked,
1461
- onChange: function onChange(e, val) {
1462
- checkedAct(e.target, val);
1068
+ onChange: function onChange(e) {
1069
+ var _filter$2;
1070
+ checkedAct(e.target, !((_filter$2 = getCheckedRootData.filter(function (cur) {
1071
+ return cur.key === 'row-all';
1072
+ })[0]) !== null && _filter$2 !== void 0 && _filter$2.checked));
1463
1073
  }
1464
- })) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
1074
+ })))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
1465
1075
  dangerouslySetInnerHTML: {
1466
1076
  __html: "".concat(item.content)
1467
1077
  }
@@ -1593,12 +1203,18 @@ var Table = function Table(props) {
1593
1203
  _useState10 = src_slicedToArray(_useState9, 2),
1594
1204
  mainUpdate = _useState10[0],
1595
1205
  setMainUpdate = _useState10[1];
1206
+ var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
1207
+ _useState12 = src_slicedToArray(_useState11, 2),
1208
+ fieldsCheckedUpdateDataPrint = _useState12[0],
1209
+ setFieldsCheckedUpdateDataPrint = _useState12[1];
1596
1210
  var windowResizeUpdate = (0,performance.debounce)(handleWindowUpdate, 50);
1597
1211
  var _headers = data.hasOwnProperty('headers') ? data.headers : false;
1598
1212
  var _summaries = data.hasOwnProperty('summaries') ? data.summaries : false;
1599
1213
  var _fieldsChecked = data.hasOwnProperty('fieldsChecked') ? data.fieldsChecked : false;
1600
1214
  var windowWidth = typeof window !== 'undefined' ? window.innerWidth : 0;
1601
1215
 
1216
+ //
1217
+
1602
1218
  //Set the class names of different styles
1603
1219
  //
1604
1220
  var tableClasses = '';
@@ -1684,6 +1300,18 @@ var Table = function Table(props) {
1684
1300
  if (w <= 768 && tbodyRef.current.querySelector('tr') !== null) {
1685
1301
  var _loop = function _loop() {
1686
1302
  var tbodyRows = rootRef.current.querySelectorAll("tbody tr [data-table-col=\"".concat(i, "\"]"));
1303
+ var curColDisplay = window.getComputedStyle(tbodyRows, null).display;
1304
+
1305
+ // default display attribute
1306
+ var curColDisplayVal = curColDisplay;
1307
+ if (typeof tbodyRows.dataset.show === 'undefined') {
1308
+ tbodyRows.dataset.show = curColDisplay;
1309
+ } else {
1310
+ curColDisplayVal = tbodyRows.dataset.show;
1311
+ }
1312
+ tbodyRows.style.display = curColDisplayVal;
1313
+
1314
+ //
1687
1315
  var maxHeight = maxDimension(tbodyRows).height;
1688
1316
  [].slice.call(tbodyRows).forEach(function (row) {
1689
1317
  row.style.height = maxHeight + 'px';
@@ -1701,7 +1329,19 @@ var Table = function Table(props) {
1701
1329
  }
1702
1330
  } else {
1703
1331
  [].slice.call(rootRef.current.querySelectorAll('tbody td, tbody th, thead th')).forEach(function (node, i) {
1704
- node.removeAttribute('style');
1332
+ var curColDisplay = window.getComputedStyle(node, null).display;
1333
+
1334
+ // default display attribute
1335
+ var curColDisplayVal = curColDisplay;
1336
+ if (typeof node.dataset.show === 'undefined') {
1337
+ node.dataset.show = curColDisplay;
1338
+ } else {
1339
+ curColDisplayVal = node.dataset.show;
1340
+ }
1341
+ node.style.display = curColDisplayVal;
1342
+
1343
+ //
1344
+ node.style.removeProperty('height');
1705
1345
  });
1706
1346
  }
1707
1347
  }
@@ -1998,6 +1638,7 @@ var Table = function Table(props) {
1998
1638
  tableCheckRef: tableCheckRef,
1999
1639
  rowActiveClassName: rowActiveClassName,
2000
1640
  fieldsChecked: _fieldsChecked,
1641
+ fieldsCheckedAct: [fieldsCheckedUpdateDataPrint, setFieldsCheckedUpdateDataPrint],
2001
1642
  rowKey: "row-".concat(i),
2002
1643
  headerLabel: _headers,
2003
1644
  data: item,