@tsed/react-formio 2.1.2 → 2.2.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/coverage.json +4 -4
- package/dist/components/actions-table/actionsTable.component.d.ts +3 -2
- package/dist/components/actions-table/actionsTable.stories.d.ts +2 -1
- package/dist/components/alert/alert.component.d.ts +2 -1
- package/dist/components/alert/alert.stories.d.ts +2 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.stories.d.ts +2 -1
- package/dist/components/form/form.component.d.ts +2 -1
- package/dist/components/form/form.stories.d.ts +5 -4
- package/dist/components/form-access/formAccess.stories.d.ts +2 -1
- package/dist/components/form-access/formAccess.utils.d.ts +3 -3
- package/dist/components/form-action/formAction.stories.d.ts +2 -1
- package/dist/components/form-builder/formBuilder.component.d.ts +1 -1
- package/dist/components/form-builder/formBuilder.stories.d.ts +7 -6
- package/dist/components/form-control/formControl.component.d.ts +1 -1
- package/dist/components/form-control/formControl.stories.d.ts +11 -10
- package/dist/components/form-edit/formEdit.component.d.ts +2 -1
- package/dist/components/form-edit/formEdit.stories.d.ts +17 -16
- package/dist/components/form-settings/formSettings.component.d.ts +2 -1
- package/dist/components/form-settings/formSettings.stories.d.ts +2 -1
- package/dist/components/form-settings/formSettings.utils.d.ts +1 -1
- package/dist/components/forms-table/components/formCell.component.d.ts +2 -1
- package/dist/components/forms-table/formsTable.component.d.ts +3 -2
- package/dist/components/forms-table/formsTable.stories.d.ts +3 -2
- package/dist/components/input-tags/inputTags.component.d.ts +2 -1
- package/dist/components/input-tags/inputTags.stories.d.ts +4 -3
- package/dist/components/input-text/inputText.component.d.ts +2 -1
- package/dist/components/input-text/inputText.stories.d.ts +6 -5
- package/dist/components/loader/loader.component.d.ts +2 -2
- package/dist/components/loader/loader.stories.d.ts +2 -1
- package/dist/components/modal/modal.component.d.ts +1 -1
- package/dist/components/modal/modal.stories.d.ts +5 -4
- package/dist/components/modal/removeModal.component.d.ts +2 -2
- package/dist/components/pagination/pagination.component.d.ts +4 -2
- package/dist/components/pagination/pagination.stories.d.ts +2 -1
- package/dist/components/react-component/reactComponent.component.d.ts +1 -1
- package/dist/components/select/select.stories.d.ts +9 -8
- package/dist/components/submissions-table/submissionsTable.component.d.ts +3 -2
- package/dist/components/submissions-table/submissionsTable.stories.d.ts +2 -1
- package/dist/components/table/components/defaultArrowSort.component.d.ts +2 -1
- package/dist/components/table/components/defaultCellHeader.component.d.ts +2 -1
- package/dist/components/table/components/defaultCellOperations.component.d.ts +2 -1
- package/dist/components/table/components/defaultCells.component.d.ts +2 -1
- package/dist/components/table/components/defaultOperationButton.component.d.ts +2 -1
- package/dist/components/table/components/defaultRow.component.d.ts +3 -3
- package/dist/components/table/components/dragNDropContainer.d.ts +2 -2
- package/dist/components/table/filters/defaultColumnFilter.component.d.ts +2 -1
- package/dist/components/table/filters/selectColumnFilter.component.d.ts +2 -1
- package/dist/components/table/filters/sliderColumnFilter.component.d.ts +2 -1
- package/dist/components/table/hooks/useCustomTable.hook.d.ts +5 -83
- package/dist/components/table/hooks/useDragnDropRow.hook.d.ts +25 -18
- package/dist/components/table/hooks/useOperations.hook.d.ts +1 -1
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/table.component.d.ts +2 -2
- package/dist/components/table/table.stories.d.ts +3 -2
- package/dist/components/tabs/tabs.component.d.ts +3 -3
- package/dist/components/tabs/tabs.component.stories.d.ts +3 -2
- package/dist/index.js +451 -494
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +66 -103
- package/dist/index.modern.js.map +1 -1
- package/dist/interfaces/FormSchema.d.ts +1 -1
- package/dist/interfaces/Operation.d.ts +2 -2
- package/dist/interfaces/QueryOptions.d.ts +1 -1
- package/package.json +4 -3
- package/readme.md +17 -195
- package/src/components/form/form.stories.tsx +128 -122
- package/src/components/form/useForm.hook.ts +1 -1
- package/src/components/form-builder/formBuilder.stories.tsx +3540 -3537
- package/src/components/form-edit/formEdit.stories.tsx +320 -317
- package/src/components/forms-table/formsTable.component.tsx +1 -1
- package/src/components/modal/removeModal.component.tsx +3 -4
- package/src/components/pagination/pagination.component.spec.tsx +8 -0
- package/src/components/pagination/pagination.component.tsx +14 -2
- package/src/components/table/components/defaultCellHeader.component.tsx +3 -3
- package/src/components/table/components/defaultCells.component.tsx +1 -1
- package/src/components/table/filters/defaultColumnFilter.component.tsx +1 -1
- package/src/components/table/hooks/useCustomTable.hook.tsx +4 -4
- package/src/components/table/index.ts +3 -0
- package/tsconfig.json +2 -1
package/dist/index.modern.js
CHANGED
|
@@ -2,6 +2,7 @@ export { default as Webform } from 'formiojs/Webform';
|
|
|
2
2
|
export { default as WebformBuilder } from 'formiojs/WebformBuilder';
|
|
3
3
|
export { default as Wizard } from 'formiojs/Wizard';
|
|
4
4
|
export { default as WizardBuilder } from 'formiojs/WizardBuilder';
|
|
5
|
+
import classnames from 'classnames';
|
|
5
6
|
import noop from 'lodash/noop';
|
|
6
7
|
import React, { useRef, useEffect, useState, useMemo, useCallback, useReducer } from 'react';
|
|
7
8
|
import { Templates, Form as Form$1, Components } from 'formiojs';
|
|
@@ -50,60 +51,6 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
50
51
|
return target;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
54
|
-
|
|
55
|
-
function createCommonjsModule(fn) {
|
|
56
|
-
var module = { exports: {} };
|
|
57
|
-
return fn(module, module.exports), module.exports;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function commonjsRequire (target) {
|
|
61
|
-
throw new Error('Could not dynamically require "' + target + '". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/*!
|
|
65
|
-
Copyright (c) 2017 Jed Watson.
|
|
66
|
-
Licensed under the MIT License (MIT), see
|
|
67
|
-
http://jedwatson.github.io/classnames
|
|
68
|
-
*/
|
|
69
|
-
var classnames = createCommonjsModule(function (module) {
|
|
70
|
-
/* global define */
|
|
71
|
-
|
|
72
|
-
(function () {
|
|
73
|
-
|
|
74
|
-
var hasOwn = {}.hasOwnProperty;
|
|
75
|
-
function classNames() {
|
|
76
|
-
var classes = [];
|
|
77
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
78
|
-
var arg = arguments[i];
|
|
79
|
-
if (!arg) continue;
|
|
80
|
-
var argType = typeof arg;
|
|
81
|
-
if (argType === 'string' || argType === 'number') {
|
|
82
|
-
classes.push(arg);
|
|
83
|
-
} else if (Array.isArray(arg) && arg.length) {
|
|
84
|
-
var inner = classNames.apply(null, arg);
|
|
85
|
-
if (inner) {
|
|
86
|
-
classes.push(inner);
|
|
87
|
-
}
|
|
88
|
-
} else if (argType === 'object') {
|
|
89
|
-
for (var key in arg) {
|
|
90
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
91
|
-
classes.push(key);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return classes.join(' ');
|
|
97
|
-
}
|
|
98
|
-
if (module.exports) {
|
|
99
|
-
classNames.default = classNames;
|
|
100
|
-
module.exports = classNames;
|
|
101
|
-
} else {
|
|
102
|
-
window.classNames = classNames;
|
|
103
|
-
}
|
|
104
|
-
})();
|
|
105
|
-
});
|
|
106
|
-
|
|
107
54
|
function iconClass(iconset, name, spinning) {
|
|
108
55
|
return Templates.current.iconClass(iconset || Templates.current.defaultIconset, name, spinning);
|
|
109
56
|
}
|
|
@@ -161,7 +108,7 @@ FormControl.propTypes = {
|
|
|
161
108
|
description: PropTypes.any
|
|
162
109
|
};
|
|
163
110
|
|
|
164
|
-
const _excluded = ["name", "label", "size", "onChange", "required", "value", "choices", "description", "placeholder", "prefix", "suffix", "multiple", "layout"];
|
|
111
|
+
const _excluded$f = ["name", "label", "size", "onChange", "required", "value", "choices", "description", "placeholder", "prefix", "suffix", "multiple", "layout"];
|
|
165
112
|
function Select(_ref) {
|
|
166
113
|
let {
|
|
167
114
|
name,
|
|
@@ -178,7 +125,7 @@ function Select(_ref) {
|
|
|
178
125
|
multiple,
|
|
179
126
|
layout
|
|
180
127
|
} = _ref,
|
|
181
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
128
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
182
129
|
const ref = useRef();
|
|
183
130
|
useEffect(() => {
|
|
184
131
|
let instance;
|
|
@@ -288,7 +235,7 @@ function getPageNumbers({
|
|
|
288
235
|
return range(1, totalPages);
|
|
289
236
|
}
|
|
290
237
|
|
|
291
|
-
const _excluded$
|
|
238
|
+
const _excluded$e = ["component", "children", "disabled", "active"];
|
|
292
239
|
function PaginationButton(props) {
|
|
293
240
|
const {
|
|
294
241
|
component: Component = "button",
|
|
@@ -296,7 +243,7 @@ function PaginationButton(props) {
|
|
|
296
243
|
disabled,
|
|
297
244
|
active
|
|
298
245
|
} = props,
|
|
299
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
246
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$e);
|
|
300
247
|
return /*#__PURE__*/React.createElement(Component, _extends({}, otherProps, {
|
|
301
248
|
"data-testid": "pagination-button",
|
|
302
249
|
disabled: disabled,
|
|
@@ -317,6 +264,7 @@ function Pagination(props) {
|
|
|
317
264
|
pageOptions,
|
|
318
265
|
pageSize,
|
|
319
266
|
setPageSize,
|
|
267
|
+
totalLength,
|
|
320
268
|
i18n = f => f
|
|
321
269
|
} = props;
|
|
322
270
|
const pageNumbers = getPageNumbers({
|
|
@@ -375,8 +323,13 @@ function Pagination(props) {
|
|
|
375
323
|
}), /*#__PURE__*/React.createElement("span", {
|
|
376
324
|
className: "ml-3"
|
|
377
325
|
}, i18n("items per page"))), pageOptions && /*#__PURE__*/React.createElement("li", {
|
|
378
|
-
className: "mb-3 flex items-center"
|
|
379
|
-
}, /*#__PURE__*/React.createElement("span", null, i18n("Page"), "\xA0"), /*#__PURE__*/React.createElement("strong", null, pageIndex + 1, " of ", pageOptions.length)
|
|
326
|
+
className: "mb-3 mr-3 flex items-center"
|
|
327
|
+
}, /*#__PURE__*/React.createElement("span", null, i18n("Page"), "\xA0"), /*#__PURE__*/React.createElement("strong", null, pageIndex + 1, " of ", pageOptions.length), totalLength !== undefined && /*#__PURE__*/React.createElement("span", {
|
|
328
|
+
className: "ml-3"
|
|
329
|
+
}, i18n("Totals"), ": ", /*#__PURE__*/React.createElement("strong", null, new Intl.NumberFormat(undefined).format(totalLength)), " ", i18n("items"))), totalLength !== undefined && /*#__PURE__*/React.createElement("li", {
|
|
330
|
+
className: "mb-3 flex items-center",
|
|
331
|
+
"data-testid": "pagination-total-items"
|
|
332
|
+
}, i18n("Totals"), ": ", /*#__PURE__*/React.createElement("strong", null, new Intl.NumberFormat(undefined).format(totalLength)), " ", i18n("items")));
|
|
380
333
|
}
|
|
381
334
|
|
|
382
335
|
function DefaultArrowSort({
|
|
@@ -405,7 +358,7 @@ function DefaultCellHeader({
|
|
|
405
358
|
}, column.render("Filter")) : null);
|
|
406
359
|
}
|
|
407
360
|
|
|
408
|
-
const _excluded$
|
|
361
|
+
const _excluded$d = ["onDrag", "onDrop", "index"];
|
|
409
362
|
const DND_ITEM_TYPE = "row";
|
|
410
363
|
function useDndRow(_ref) {
|
|
411
364
|
let {
|
|
@@ -413,7 +366,7 @@ function useDndRow(_ref) {
|
|
|
413
366
|
onDrop,
|
|
414
367
|
index
|
|
415
368
|
} = _ref,
|
|
416
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
369
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
417
370
|
const dropRef = useRef(null);
|
|
418
371
|
const dragRef = useRef(null);
|
|
419
372
|
const [, drop] = useDrop({
|
|
@@ -503,7 +456,7 @@ function DefaultCells({
|
|
|
503
456
|
}));
|
|
504
457
|
}
|
|
505
458
|
|
|
506
|
-
const _excluded$
|
|
459
|
+
const _excluded$c = ["onClick", "row", "enableDragNDrop", "onDrop", "onDrag"];
|
|
507
460
|
function DefaultDndRow(props) {
|
|
508
461
|
const {
|
|
509
462
|
isDragging,
|
|
@@ -537,7 +490,7 @@ function DefaultRow(_ref) {
|
|
|
537
490
|
onDrop,
|
|
538
491
|
onDrag
|
|
539
492
|
} = _ref,
|
|
540
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
493
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
541
494
|
const opts = _extends({}, props, {
|
|
542
495
|
onClick: () => onClick(row.original, "row")
|
|
543
496
|
}, row.getRowProps());
|
|
@@ -564,7 +517,7 @@ function callLast(fn, time) {
|
|
|
564
517
|
};
|
|
565
518
|
}
|
|
566
519
|
|
|
567
|
-
const _excluded$
|
|
520
|
+
const _excluded$b = ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className", "placeholder"];
|
|
568
521
|
function InputText(_ref) {
|
|
569
522
|
let {
|
|
570
523
|
name,
|
|
@@ -580,7 +533,7 @@ function InputText(_ref) {
|
|
|
580
533
|
className,
|
|
581
534
|
placeholder
|
|
582
535
|
} = _ref,
|
|
583
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
536
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
584
537
|
const [localValue, setValue] = useState(value);
|
|
585
538
|
const change = useMemo(() => onChange && callLast(onChange, 300), [onChange]);
|
|
586
539
|
useEffect(() => {
|
|
@@ -683,7 +636,7 @@ function DefaultOperationButton(props) {
|
|
|
683
636
|
}, i18n(title)));
|
|
684
637
|
}
|
|
685
638
|
|
|
686
|
-
const _excluded$
|
|
639
|
+
const _excluded$a = ["OperationButton"];
|
|
687
640
|
function DefaultCellOperations({
|
|
688
641
|
operations,
|
|
689
642
|
row,
|
|
@@ -700,7 +653,7 @@ function DefaultCellOperations({
|
|
|
700
653
|
let {
|
|
701
654
|
OperationButton = DefaultOperationButton
|
|
702
655
|
} = _ref,
|
|
703
|
-
operation = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
656
|
+
operation = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
704
657
|
return /*#__PURE__*/React.createElement(OperationButton, _extends({
|
|
705
658
|
key: operation.action
|
|
706
659
|
}, operation, {
|
|
@@ -741,7 +694,7 @@ function useOperations({
|
|
|
741
694
|
};
|
|
742
695
|
}
|
|
743
696
|
|
|
744
|
-
const _excluded$
|
|
697
|
+
const _excluded$9 = ["children", "className", "columns", "data", "onChange", "onClick", "onDrag", "onDrop", "operations", "pageSizes", "filters", "filterId", "pageSize", "pageIndex", "sortBy", "isLoading", "disableFilters", "disablePagination", "ArrowSort", "ColumnFilter", "EmptyData", "Loader", "Pagination", "Row", "CellHeader", "CellOperations", "i18n"];
|
|
745
698
|
function getOperationCallback(operations, onClick) {
|
|
746
699
|
return (data, action) => {
|
|
747
700
|
const operation = operations.find(operation => operation.action === action || operation.alias === action);
|
|
@@ -791,7 +744,7 @@ function useCustomTable(props) {
|
|
|
791
744
|
CellOperations,
|
|
792
745
|
i18n = f => f
|
|
793
746
|
} = props,
|
|
794
|
-
ctx = _objectWithoutPropertiesLoose(props, _excluded$
|
|
747
|
+
ctx = _objectWithoutPropertiesLoose(props, _excluded$9);
|
|
795
748
|
const _onClick = getOperationCallback(operations, onClick);
|
|
796
749
|
const defaultColumn = React.useMemo(() => ({
|
|
797
750
|
// Let's set up our default Filter UI
|
|
@@ -852,12 +805,11 @@ function useCustomTable(props) {
|
|
|
852
805
|
filterId
|
|
853
806
|
});
|
|
854
807
|
}, [onChange, pageIndex, pageSize, sortBy, filters, filterId]);
|
|
855
|
-
return
|
|
808
|
+
return {
|
|
856
809
|
className,
|
|
857
810
|
tableInstance,
|
|
858
811
|
CellHeader,
|
|
859
812
|
isLoading,
|
|
860
|
-
onClick: _onClick,
|
|
861
813
|
Loader,
|
|
862
814
|
EmptyData,
|
|
863
815
|
Row,
|
|
@@ -870,9 +822,11 @@ function useCustomTable(props) {
|
|
|
870
822
|
setPageSize,
|
|
871
823
|
i18n,
|
|
872
824
|
children,
|
|
825
|
+
onClick: _onClick,
|
|
873
826
|
onDrag: _onDrag,
|
|
874
|
-
onDrop: onDrop
|
|
875
|
-
|
|
827
|
+
onDrop: onDrop,
|
|
828
|
+
enableDragNDrop: props.enableDragNDrop
|
|
829
|
+
};
|
|
876
830
|
}
|
|
877
831
|
|
|
878
832
|
function Table(props) {
|
|
@@ -939,7 +893,7 @@ function Table(props) {
|
|
|
939
893
|
}))) : null, children));
|
|
940
894
|
}
|
|
941
895
|
|
|
942
|
-
const _excluded$
|
|
896
|
+
const _excluded$8 = ["disableFilters", "disablePagination", "availableActions", "onAddAction"];
|
|
943
897
|
function ActionsTable(_ref) {
|
|
944
898
|
let {
|
|
945
899
|
disableFilters = true,
|
|
@@ -947,7 +901,7 @@ function ActionsTable(_ref) {
|
|
|
947
901
|
availableActions = [],
|
|
948
902
|
onAddAction = noop
|
|
949
903
|
} = _ref,
|
|
950
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
904
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
951
905
|
const {
|
|
952
906
|
i18n = f => f
|
|
953
907
|
} = props;
|
|
@@ -1047,7 +1001,7 @@ function Card({
|
|
|
1047
1001
|
}, children));
|
|
1048
1002
|
}
|
|
1049
1003
|
|
|
1050
|
-
const _excluded$
|
|
1004
|
+
const _excluded$7 = ["src", "form", "options", "submission", "url"];
|
|
1051
1005
|
function useEvent(event, callback, events) {
|
|
1052
1006
|
useEffect(() => {
|
|
1053
1007
|
if (callback) {
|
|
@@ -1098,7 +1052,7 @@ function useForm(props) {
|
|
|
1098
1052
|
submission,
|
|
1099
1053
|
url
|
|
1100
1054
|
} = props,
|
|
1101
|
-
funcs = _objectWithoutPropertiesLoose(props, _excluded$
|
|
1055
|
+
funcs = _objectWithoutPropertiesLoose(props, _excluded$7);
|
|
1102
1056
|
const element = useRef();
|
|
1103
1057
|
const isLoaded = useRef();
|
|
1104
1058
|
const instance = useRef();
|
|
@@ -1575,13 +1529,13 @@ FormAccess.propTypes = {
|
|
|
1575
1529
|
onSubmit: PropTypes.func
|
|
1576
1530
|
};
|
|
1577
1531
|
|
|
1578
|
-
const _excluded$
|
|
1532
|
+
const _excluded$6 = ["action"],
|
|
1579
1533
|
_excluded2 = ["actionInfo", "children", "onSubmit", "options"];
|
|
1580
1534
|
function mapData(options, defaults) {
|
|
1581
1535
|
return _extends({}, defaults, options);
|
|
1582
1536
|
}
|
|
1583
1537
|
function mapSettingsForm(_ref) {
|
|
1584
|
-
let settingsForm = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1538
|
+
let settingsForm = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
1585
1539
|
FormioUtils.eachComponent(settingsForm.components, component => {
|
|
1586
1540
|
const resourceExclude = "";
|
|
1587
1541
|
if (component.type === "resourcefields") {
|
|
@@ -1854,7 +1808,7 @@ FormEditCTAs.propTypes = {
|
|
|
1854
1808
|
onReset: PropTypes.func
|
|
1855
1809
|
};
|
|
1856
1810
|
|
|
1857
|
-
const _excluded$
|
|
1811
|
+
const _excluded$5 = ["name", "value", "label", "onChange", "required", "description", "prefix", "suffix"];
|
|
1858
1812
|
function InputTags(_ref) {
|
|
1859
1813
|
let {
|
|
1860
1814
|
name,
|
|
@@ -1866,7 +1820,7 @@ function InputTags(_ref) {
|
|
|
1866
1820
|
prefix,
|
|
1867
1821
|
suffix
|
|
1868
1822
|
} = _ref,
|
|
1869
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1823
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
1870
1824
|
const ref = useRef();
|
|
1871
1825
|
useEffect(() => {
|
|
1872
1826
|
const instance = new Choices(ref.current, {
|
|
@@ -2363,6 +2317,17 @@ function SelectColumnFilter({
|
|
|
2363
2317
|
});
|
|
2364
2318
|
}
|
|
2365
2319
|
|
|
2320
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2321
|
+
|
|
2322
|
+
function createCommonjsModule(fn) {
|
|
2323
|
+
var module = { exports: {} };
|
|
2324
|
+
return fn(module, module.exports), module.exports;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
function commonjsRequire (target) {
|
|
2328
|
+
throw new Error('Could not dynamically require "' + target + '". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2366
2331
|
var moment = createCommonjsModule(function (module, exports) {
|
|
2367
2332
|
(function (global, factory) {
|
|
2368
2333
|
module.exports = factory() ;
|
|
@@ -6918,12 +6883,12 @@ function FormsCell(props) {
|
|
|
6918
6883
|
}), tag)))));
|
|
6919
6884
|
}
|
|
6920
6885
|
|
|
6921
|
-
const _excluded$
|
|
6886
|
+
const _excluded$4 = ["Cell"];
|
|
6922
6887
|
function FormsTable(_ref) {
|
|
6923
6888
|
let {
|
|
6924
6889
|
Cell
|
|
6925
6890
|
} = _ref,
|
|
6926
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6891
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
6927
6892
|
const {
|
|
6928
6893
|
i18n = f => f,
|
|
6929
6894
|
tags
|
|
@@ -6979,7 +6944,7 @@ Loader.propTypes = {
|
|
|
6979
6944
|
className: PropTypes.string
|
|
6980
6945
|
};
|
|
6981
6946
|
|
|
6982
|
-
const _excluded$
|
|
6947
|
+
const _excluded$3 = ["show", "children", "closeModal", "onClose", "title", "footer", "style", "className"];
|
|
6983
6948
|
function useModal() {
|
|
6984
6949
|
const [show, setShowModal] = useState(false);
|
|
6985
6950
|
return {
|
|
@@ -7004,7 +6969,7 @@ function Modal(_ref) {
|
|
|
7004
6969
|
style,
|
|
7005
6970
|
className = ""
|
|
7006
6971
|
} = _ref,
|
|
7007
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6972
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
7008
6973
|
const titleRef = useRef();
|
|
7009
6974
|
const footerRef = useRef();
|
|
7010
6975
|
const [maxHeight, setMaxHeight] = useState();
|
|
@@ -7060,7 +7025,7 @@ function Modal(_ref) {
|
|
|
7060
7025
|
})));
|
|
7061
7026
|
}
|
|
7062
7027
|
|
|
7063
|
-
const _excluded$
|
|
7028
|
+
const _excluded$2 = ["maxWidth", "children"];
|
|
7064
7029
|
function RemoveModalFooter({
|
|
7065
7030
|
value,
|
|
7066
7031
|
valueToCompare,
|
|
@@ -7093,9 +7058,9 @@ function RemoveModal(_ref) {
|
|
|
7093
7058
|
maxWidth = "300px",
|
|
7094
7059
|
children
|
|
7095
7060
|
} = _ref,
|
|
7096
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7061
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
7097
7062
|
const {
|
|
7098
|
-
i18n =
|
|
7063
|
+
i18n = f => f
|
|
7099
7064
|
} = props;
|
|
7100
7065
|
const [value, setValue] = useState();
|
|
7101
7066
|
return /*#__PURE__*/React.createElement(Modal, _extends({}, props, {
|
|
@@ -7124,13 +7089,18 @@ class ReactComponent extends Components.components.field {
|
|
|
7124
7089
|
* @param component - The component definition created from the settings form.
|
|
7125
7090
|
* @param options - Any options passed into the renderer.
|
|
7126
7091
|
* @param data - The submission data where this component's data exists.
|
|
7127
|
-
*/
|
|
7128
|
-
// eslint-disable-next-line no-useless-constructor,import/no-anonymous-default-export
|
|
7092
|
+
*/ // eslint-disable-next-line no-useless-constructor,import/no-anonymous-default-export
|
|
7129
7093
|
constructor(component, options, data) {
|
|
7130
7094
|
super(component, options, data);
|
|
7131
7095
|
this.reactInstance = void 0;
|
|
7132
7096
|
this.shouldSetValue = void 0;
|
|
7133
7097
|
this.dataForSetting = void 0;
|
|
7098
|
+
/**
|
|
7099
|
+
* The user has changed the value in the component and the value needs to be updated on the main submission object and other components notified of a change event.
|
|
7100
|
+
*
|
|
7101
|
+
* @param value
|
|
7102
|
+
* @param flags
|
|
7103
|
+
*/
|
|
7134
7104
|
this.updateValue = (value, flags) => {
|
|
7135
7105
|
flags = flags || {};
|
|
7136
7106
|
const newValue = value === undefined || value === null ? this.getValue() : value;
|
|
@@ -7247,13 +7217,6 @@ class ReactComponent extends Components.components.field {
|
|
|
7247
7217
|
}
|
|
7248
7218
|
return false;
|
|
7249
7219
|
}
|
|
7250
|
-
/**
|
|
7251
|
-
* The user has changed the value in the component and the value needs to be updated on the main submission object and other components notified of a change event.
|
|
7252
|
-
*
|
|
7253
|
-
* @param value
|
|
7254
|
-
* @param flags
|
|
7255
|
-
*/
|
|
7256
|
-
|
|
7257
7220
|
/**
|
|
7258
7221
|
* Get the current value of the component. Should return the value set in the react component.
|
|
7259
7222
|
*
|
|
@@ -7326,12 +7289,12 @@ function mapFormToColumns(form) {
|
|
|
7326
7289
|
return columns;
|
|
7327
7290
|
}
|
|
7328
7291
|
|
|
7329
|
-
const _excluded$
|
|
7292
|
+
const _excluded$1 = ["form"];
|
|
7330
7293
|
function SubmissionsTable(_ref) {
|
|
7331
7294
|
let {
|
|
7332
7295
|
form
|
|
7333
7296
|
} = _ref,
|
|
7334
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7297
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
7335
7298
|
const columns = form && mapFormToColumns(form);
|
|
7336
7299
|
return /*#__PURE__*/React.createElement(Table, _extends({}, props, {
|
|
7337
7300
|
columns: columns
|
|
@@ -7368,7 +7331,7 @@ function SliderColumnFilter({
|
|
|
7368
7331
|
}, "Off"));
|
|
7369
7332
|
}
|
|
7370
7333
|
|
|
7371
|
-
const _excluded
|
|
7334
|
+
const _excluded = ["style", "current", "items", "children", "HeaderChildren", "AddButton", "Button", "className", "onClick", "i18n"];
|
|
7372
7335
|
function ButtonTab({
|
|
7373
7336
|
icon,
|
|
7374
7337
|
back,
|
|
@@ -7407,7 +7370,7 @@ function Tabs(_ref) {
|
|
|
7407
7370
|
onClick,
|
|
7408
7371
|
i18n = f => f
|
|
7409
7372
|
} = _ref,
|
|
7410
|
-
additionalProps = _objectWithoutPropertiesLoose(_ref, _excluded
|
|
7373
|
+
additionalProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
7411
7374
|
return /*#__PURE__*/React.createElement("div", {
|
|
7412
7375
|
"data-testid": "tabs-comp",
|
|
7413
7376
|
className: `tw-tabs ${className}`,
|
|
@@ -7454,5 +7417,5 @@ function mapPagination({
|
|
|
7454
7417
|
};
|
|
7455
7418
|
}
|
|
7456
7419
|
|
|
7457
|
-
export { ActionsTable, Alert, ButtonTab, Card, DefaultArrowSort, DefaultCell, DefaultCellHeader, DefaultCellOperations, DefaultColumnFilter, DefaultOperationButton, Form, FormAccess, FormAction, FormBuilder, FormControl, FormEdit, FormEditCTAs, FormParameters, FormSettings, FormsTable, InputTags, InputText, Loader, Modal, Pagination, ReactComponent, RemoveModal, Select, SelectColumnFilter, SliderColumnFilter, SubmissionsTable, Table, Tabs, callLast, defaultDisplayChoices, getOperationCallback, iconClass, mapPagination, stopPropagationWrapper, useCustomTable, useForm, useFormEdit, useModal, useOperations, useTooltip };
|
|
7420
|
+
export { ActionsTable, Alert, ButtonTab, Card, DefaultArrowSort, DefaultCell, DefaultCellHeader, DefaultCellOperations, DefaultColumnFilter, DefaultOperationButton, Form, FormAccess, FormAction, FormBuilder, FormControl, FormEdit, FormEditCTAs, FormParameters, FormSettings, FormsTable, InputTags, InputText, LEFT_PAGE, Loader, Modal, Pagination, RIGHT_PAGE, ReactComponent, RemoveModal, Select, SelectColumnFilter, SliderColumnFilter, SubmissionsTable, Table, Tabs, callLast, defaultDisplayChoices, getOperationCallback, getPageNumbers, iconClass, mapFormToColumns, mapPagination, stopPropagationWrapper, swapElements, useCustomTable, useForm, useFormEdit, useModal, useOperations, useTooltip };
|
|
7458
7421
|
//# sourceMappingURL=index.modern.js.map
|