@sb1/ffe-tables-react 10.0.2 → 10.1.1
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/es/TableRowExpandable.js
CHANGED
|
@@ -28,8 +28,8 @@ import { txt } from './texts';
|
|
|
28
28
|
import { v4 as uuid } from 'uuid';
|
|
29
29
|
import { CellContent } from './CellContent';
|
|
30
30
|
export var TableRowExpandable = React.forwardRef(function (_a, ref) {
|
|
31
|
-
var className = _a.className, expandContent = _a.expandContent, children = _a.children, _b = _a.locale, locale = _b === void 0 ? 'nb' : _b, onClick = _a.onClick, rest = __rest(_a, ["className", "expandContent", "children", "locale", "onClick"]);
|
|
32
|
-
var _c = useState(
|
|
31
|
+
var className = _a.className, expandContent = _a.expandContent, children = _a.children, _b = _a.locale, locale = _b === void 0 ? 'nb' : _b, onClick = _a.onClick, isDefaultOpen = _a.isDefaultOpen, rest = __rest(_a, ["className", "expandContent", "children", "locale", "onClick", "isDefaultOpen"]);
|
|
32
|
+
var _c = useState(!!isDefaultOpen), isOpen = _c[0], setIsOpen = _c[1];
|
|
33
33
|
var expandoRowId = useRef("check-".concat(uuid())).current;
|
|
34
34
|
var _d = useState(false), isAnimating = _d[0], setIsAnimating = _d[1];
|
|
35
35
|
var expandButtonRef = useRef(null);
|
|
@@ -57,8 +57,8 @@ var texts_1 = require("./texts");
|
|
|
57
57
|
var uuid_1 = require("uuid");
|
|
58
58
|
var CellContent_1 = require("./CellContent");
|
|
59
59
|
exports.TableRowExpandable = react_1.default.forwardRef(function (_a, ref) {
|
|
60
|
-
var className = _a.className, expandContent = _a.expandContent, children = _a.children, _b = _a.locale, locale = _b === void 0 ? 'nb' : _b, onClick = _a.onClick, rest = __rest(_a, ["className", "expandContent", "children", "locale", "onClick"]);
|
|
61
|
-
var _c = (0, react_1.useState)(
|
|
60
|
+
var className = _a.className, expandContent = _a.expandContent, children = _a.children, _b = _a.locale, locale = _b === void 0 ? 'nb' : _b, onClick = _a.onClick, isDefaultOpen = _a.isDefaultOpen, rest = __rest(_a, ["className", "expandContent", "children", "locale", "onClick", "isDefaultOpen"]);
|
|
61
|
+
var _c = (0, react_1.useState)(!!isDefaultOpen), isOpen = _c[0], setIsOpen = _c[1];
|
|
62
62
|
var expandoRowId = (0, react_1.useRef)("check-".concat((0, uuid_1.v4)())).current;
|
|
63
63
|
var _d = (0, react_1.useState)(false), isAnimating = _d[0], setIsAnimating = _d[1];
|
|
64
64
|
var expandButtonRef = (0, react_1.useRef)(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-tables-react",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.1",
|
|
4
4
|
"description": "React implementation of ffe-tables",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "ffe-buildtool tsc",
|
|
22
22
|
"build:es": "ffe-buildtool tsc --es",
|
|
23
|
-
"lint": "eslint src",
|
|
24
|
-
"lint:fix": "eslint src --fix",
|
|
23
|
+
"lint": "eslint src --ext ts,tsx",
|
|
24
|
+
"lint:fix": "eslint src --fix --ext ts,tsx",
|
|
25
25
|
"test": "ffe-buildtool jest",
|
|
26
26
|
"test:watch": "ffe-buildtool jest --watch"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sb1/ffe-collapse-react": "^
|
|
29
|
+
"@sb1/ffe-collapse-react": "^5.0.2",
|
|
30
30
|
"@sb1/ffe-icons-react": "^11.0.1",
|
|
31
31
|
"@sb1/ffe-tables": "^15.0.1",
|
|
32
32
|
"classnames": "^2.3.1"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "0825f31c0c103b615150df62d509dd95ec964b69"
|
|
46
46
|
}
|
|
@@ -2,5 +2,6 @@ import React from 'react';
|
|
|
2
2
|
export interface TableRowExpandableProps extends React.ComponentPropsWithoutRef<'tr'> {
|
|
3
3
|
expandContent: React.ReactNode;
|
|
4
4
|
locale?: 'nb' | 'nn' | 'en';
|
|
5
|
+
isDefaultOpen?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const TableRowExpandable: React.ForwardRefExoticComponent<TableRowExpandableProps & React.RefAttributes<HTMLTableRowElement>>;
|