@tsed/react-formio 1.10.9 → 1.10.10
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/.eslintrc +7 -2
- package/dist/index.js +17 -10
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +5 -4
- package/src/components/card/card.component.spec.tsx +2 -2
- package/src/components/card/card.component.tsx +2 -4
- package/src/components/form-builder/formBuilder.component.tsx +2 -0
- package/src/components/forms-table/components/formCell.component.tsx +2 -2
- package/src/components/modal/modal.component.spec.tsx +3 -3
- package/src/components/modal/modal.component.tsx +6 -1
- package/src/components/modal/modal.stories.tsx +5 -21
- package/src/components/react-component/reactComponent.component.tsx +1 -0
- package/src/components/table/components/defaultOperationButton.component.tsx +2 -2
- package/src/components/table/table.component.tsx +16 -5
- package/src/components/tabs/tabs.component.stories.tsx +1 -1
package/.eslintrc
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
"prettier/react",
|
|
8
8
|
"plugin:@typescript-eslint/recommended",
|
|
9
9
|
"prettier/@typescript-eslint",
|
|
10
|
-
"plugin:prettier/recommended"
|
|
10
|
+
"plugin:prettier/recommended",
|
|
11
|
+
"plugin:react/recommended",
|
|
12
|
+
"plugin:jsx-a11y/recommended"
|
|
11
13
|
],
|
|
12
14
|
"env": {
|
|
13
15
|
"node": true,
|
|
@@ -31,12 +33,15 @@
|
|
|
31
33
|
"react/prop-types": 0,
|
|
32
34
|
"react/jsx-handler-names": 0,
|
|
33
35
|
"react/jsx-fragments": 0,
|
|
36
|
+
"react/no-unescaped-entities": 0,
|
|
34
37
|
"react/no-unused-prop-types": 0,
|
|
38
|
+
"react/display-name": 1,
|
|
35
39
|
"no-unused-vars": "off",
|
|
36
40
|
"@typescript-eslint/no-explicit-any": 0,
|
|
37
41
|
"@typescript-eslint/explicit-function-return-type": 0,
|
|
38
42
|
"@typescript-eslint/camelcase": 0,
|
|
39
43
|
"@typescript-eslint/no-empty-function": 0,
|
|
40
|
-
"import/export": 0
|
|
44
|
+
"import/export": 0,
|
|
45
|
+
"jsx-a11y/no-autofocus": 1
|
|
41
46
|
}
|
|
42
47
|
}
|
package/dist/index.js
CHANGED
|
@@ -2102,7 +2102,7 @@ function DefaultOperationButton(props) {
|
|
|
2102
2102
|
i18n = _props$i18n === void 0 ? function (f) {
|
|
2103
2103
|
return f;
|
|
2104
2104
|
} : _props$i18n;
|
|
2105
|
-
return React__default['default'].createElement("
|
|
2105
|
+
return React__default['default'].createElement("button", {
|
|
2106
2106
|
className: classnames(className, ["btn", buttonOutline && "outline", buttonType].filter(Boolean).join("-"), "btn-" + buttonSize),
|
|
2107
2107
|
onClick: stopPropagationWrapper(function () {
|
|
2108
2108
|
return onClick(action);
|
|
@@ -2305,19 +2305,24 @@ function Table(props) {
|
|
|
2305
2305
|
className: classnames("table-group table-responsive", className)
|
|
2306
2306
|
}, React__default['default'].createElement("table", Object.assign({
|
|
2307
2307
|
className: "table table-striped table-hover"
|
|
2308
|
-
}, tableInstance.getTableProps()), React__default['default'].createElement("thead", null, tableInstance.headerGroups.map(function (headerGroup) {
|
|
2309
|
-
return React__default['default'].createElement("tr", Object.assign({
|
|
2310
|
-
|
|
2308
|
+
}, tableInstance.getTableProps()), React__default['default'].createElement("thead", null, tableInstance.headerGroups.map(function (headerGroup, i) {
|
|
2309
|
+
return React__default['default'].createElement("tr", Object.assign({
|
|
2310
|
+
key: "tableInstance.headerGroups" + i
|
|
2311
|
+
}, headerGroup.getHeaderGroupProps()), headerGroup.headers.map(function (column) {
|
|
2312
|
+
return React__default['default'].createElement("th", Object.assign({
|
|
2313
|
+
key: "tableInstance.headers.column." + column.id
|
|
2314
|
+
}, column.getHeaderProps()), React__default['default'].createElement(CellHeader, {
|
|
2311
2315
|
column: column
|
|
2312
2316
|
}));
|
|
2313
2317
|
}));
|
|
2314
|
-
})), !isLoading ? React__default['default'].createElement("tbody", Object.assign({}, tableInstance.getTableBodyProps()), tableInstance.page.map(function (row
|
|
2318
|
+
})), !isLoading ? React__default['default'].createElement("tbody", Object.assign({}, tableInstance.getTableBodyProps()), tableInstance.page.map(function (row) {
|
|
2315
2319
|
tableInstance.prepareRow(row);
|
|
2316
2320
|
return React__default['default'].createElement("tr", Object.assign({
|
|
2321
|
+
key: "tableInstance.page." + row.id,
|
|
2317
2322
|
onClick: function onClick() {
|
|
2318
2323
|
return _onClick(row.original, "row");
|
|
2319
2324
|
}
|
|
2320
|
-
}, row.getRowProps()), row.cells.map(function (cell) {
|
|
2325
|
+
}, row.getRowProps()), row.cells.map(function (cell, i) {
|
|
2321
2326
|
var _cell$column = cell.column,
|
|
2322
2327
|
hidden = _cell$column.hidden,
|
|
2323
2328
|
colspan = _cell$column.colspan;
|
|
@@ -2327,6 +2332,7 @@ function Table(props) {
|
|
|
2327
2332
|
}
|
|
2328
2333
|
|
|
2329
2334
|
return React__default['default'].createElement("td", Object.assign({
|
|
2335
|
+
key: "tableInstance.page.cells." + (cell.value || "value") + "." + i,
|
|
2330
2336
|
colSpan: colspan
|
|
2331
2337
|
}, cell.getCellProps()), cell.render("Cell"));
|
|
2332
2338
|
}));
|
|
@@ -2463,11 +2469,10 @@ function Card(_ref) {
|
|
|
2463
2469
|
}, React__default['default'].createElement("div", {
|
|
2464
2470
|
className: "card-header "
|
|
2465
2471
|
}, React__default['default'].createElement("h4", {
|
|
2466
|
-
className: "card-title"
|
|
2467
|
-
role: "card-heading"
|
|
2472
|
+
className: "card-title"
|
|
2468
2473
|
}, label)), React__default['default'].createElement("div", {
|
|
2469
2474
|
className: "card-body",
|
|
2470
|
-
role: "
|
|
2475
|
+
role: "article"
|
|
2471
2476
|
}, children));
|
|
2472
2477
|
}
|
|
2473
2478
|
|
|
@@ -9029,7 +9034,7 @@ function FormsCell(props) {
|
|
|
9029
9034
|
}, React__default['default'].createElement("i", {
|
|
9030
9035
|
className: classnames(iconClass(undefined, "history"), "mr-1")
|
|
9031
9036
|
}), React__default['default'].createElement("span", null, "Updated ", moment(form.modified).fromNow())), (form.tags || []).map(function (tag, index) {
|
|
9032
|
-
return React__default['default'].createElement("
|
|
9037
|
+
return React__default['default'].createElement("button", {
|
|
9033
9038
|
key: index,
|
|
9034
9039
|
className: 'badge badge-hover bg-secondary mr-1',
|
|
9035
9040
|
onClick: stopPropagationWrapper(function () {
|
|
@@ -9142,6 +9147,7 @@ function Modal(_ref) {
|
|
|
9142
9147
|
}
|
|
9143
9148
|
|
|
9144
9149
|
return React__default['default'].createElement("div", {
|
|
9150
|
+
role: "dialog",
|
|
9145
9151
|
className: "formio-dialog formio-dialog-theme-default " + className
|
|
9146
9152
|
}, React__default['default'].createElement("div", {
|
|
9147
9153
|
className: 'formio-dialog-overlay',
|
|
@@ -22657,6 +22663,7 @@ var ReactComponent = /*#__PURE__*/function (_Components$component) {
|
|
|
22657
22663
|
;
|
|
22658
22664
|
|
|
22659
22665
|
_proto.attachReact = function attachReact(element) {
|
|
22666
|
+
// eslint-disable-next-line react/no-render-return-value
|
|
22660
22667
|
return reactDom.render(this.renderReact(), element);
|
|
22661
22668
|
}
|
|
22662
22669
|
/**
|