@elliemae/ds-treeview 2.4.2-rc.1 → 2.4.2-rc.11
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.
|
@@ -4,12 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
require('react');
|
|
7
|
+
var styled = require('styled-components');
|
|
7
8
|
var cssClassesConstants = require('../config/cssClassesConstants.js');
|
|
8
9
|
|
|
9
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
11
|
|
|
11
12
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
14
|
|
|
15
|
+
var _Separator;
|
|
16
|
+
const Separator = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
17
|
+
componentId: "sc-13smqda-0"
|
|
18
|
+
})(["width:1px;height:12px;margin:0 8px;border-left:1px solid ", ";font-size:12px;"], props => props.theme.colors.neutral['600']);
|
|
13
19
|
const className = "".concat(cssClassesConstants.DSTreeViewPrefix, "-").concat(cssClassesConstants.treeItemBlockName, "-children-count-displayer");
|
|
14
20
|
const ChildrenCountDisplayer = props => {
|
|
15
21
|
const {
|
|
@@ -19,12 +25,11 @@ const ChildrenCountDisplayer = props => {
|
|
|
19
25
|
isGroup,
|
|
20
26
|
children
|
|
21
27
|
} = item;
|
|
22
|
-
if (!isGroup) return null;
|
|
23
|
-
|
|
28
|
+
if (!isGroup) return null;
|
|
24
29
|
return /*#__PURE__*/_jsx__default["default"]("span", {
|
|
25
30
|
"data-testid": "tree-item-children-count-displayer",
|
|
26
31
|
className: className
|
|
27
|
-
}, void 0, "
|
|
32
|
+
}, void 0, _Separator || (_Separator = /*#__PURE__*/_jsx__default["default"](Separator, {})), "".concat(children.length, " Items"));
|
|
28
33
|
};
|
|
29
34
|
|
|
30
35
|
exports.ChildrenCountDisplayer = ChildrenCountDisplayer;
|
package/cjs/parts/ExpandCaret.js
CHANGED
|
@@ -15,7 +15,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
16
16
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
17
17
|
|
|
18
|
-
var _ArrowheadDown, _ArrowheadRight;
|
|
19
18
|
const ExpandCaret = props => {
|
|
20
19
|
const defaultHandleExpandGroup = React.useCallback(groupExpandsHelpers.toggleItemExpand, []);
|
|
21
20
|
const {
|
|
@@ -46,13 +45,15 @@ const ExpandCaret = props => {
|
|
|
46
45
|
buttonType: "text",
|
|
47
46
|
className: "expandable-arrow",
|
|
48
47
|
"data-testid": "tree-item-expand-toggle",
|
|
49
|
-
icon: isExpanded ?
|
|
48
|
+
icon: isExpanded ? /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadDown, {
|
|
50
49
|
size: "s",
|
|
51
|
-
"data-testid": "ic-arrow-head-down"
|
|
52
|
-
|
|
50
|
+
"data-testid": "ic-arrow-head-down",
|
|
51
|
+
color: ['brand-primary', '800']
|
|
52
|
+
}) : /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadRight, {
|
|
53
53
|
size: "s",
|
|
54
|
-
"data-testid": "ic-arrow-head-right"
|
|
55
|
-
|
|
54
|
+
"data-testid": "ic-arrow-head-right",
|
|
55
|
+
color: ['brand-primary', '800']
|
|
56
|
+
}),
|
|
56
57
|
onMouseDown: e => {
|
|
57
58
|
// prevent focusing the caret
|
|
58
59
|
if (e) {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
3
4
|
import { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants.js';
|
|
4
5
|
|
|
6
|
+
var _Separator;
|
|
7
|
+
const Separator = /*#__PURE__*/styled.span.withConfig({
|
|
8
|
+
componentId: "sc-13smqda-0"
|
|
9
|
+
})(["width:1px;height:12px;margin:0 8px;border-left:1px solid ", ";font-size:12px;"], props => props.theme.colors.neutral['600']);
|
|
5
10
|
const className = "".concat(DSTreeViewPrefix, "-").concat(treeItemBlockName, "-children-count-displayer");
|
|
6
11
|
const ChildrenCountDisplayer = props => {
|
|
7
12
|
const {
|
|
@@ -11,12 +16,11 @@ const ChildrenCountDisplayer = props => {
|
|
|
11
16
|
isGroup,
|
|
12
17
|
children
|
|
13
18
|
} = item;
|
|
14
|
-
if (!isGroup) return null;
|
|
15
|
-
|
|
19
|
+
if (!isGroup) return null;
|
|
16
20
|
return /*#__PURE__*/_jsx("span", {
|
|
17
21
|
"data-testid": "tree-item-children-count-displayer",
|
|
18
22
|
className: className
|
|
19
|
-
}, void 0,
|
|
23
|
+
}, void 0, _Separator || (_Separator = /*#__PURE__*/_jsx(Separator, {})), "".concat(children.length, " Items"));
|
|
20
24
|
};
|
|
21
25
|
|
|
22
26
|
export { ChildrenCountDisplayer };
|
package/esm/parts/ExpandCaret.js
CHANGED
|
@@ -6,7 +6,6 @@ import { toggleItemExpand } from '../utils/group-expands-helpers.js';
|
|
|
6
6
|
import { focusItem } from '../utils/tree-helpers.js';
|
|
7
7
|
import TreeViewContext from '../TreeViewContext.js';
|
|
8
8
|
|
|
9
|
-
var _ArrowheadDown, _ArrowheadRight;
|
|
10
9
|
const ExpandCaret = props => {
|
|
11
10
|
const defaultHandleExpandGroup = useCallback(toggleItemExpand, []);
|
|
12
11
|
const {
|
|
@@ -37,13 +36,15 @@ const ExpandCaret = props => {
|
|
|
37
36
|
buttonType: "text",
|
|
38
37
|
className: "expandable-arrow",
|
|
39
38
|
"data-testid": "tree-item-expand-toggle",
|
|
40
|
-
icon: isExpanded ?
|
|
39
|
+
icon: isExpanded ? /*#__PURE__*/_jsx(ArrowheadDown, {
|
|
41
40
|
size: "s",
|
|
42
|
-
"data-testid": "ic-arrow-head-down"
|
|
43
|
-
|
|
41
|
+
"data-testid": "ic-arrow-head-down",
|
|
42
|
+
color: ['brand-primary', '800']
|
|
43
|
+
}) : /*#__PURE__*/_jsx(ArrowheadRight, {
|
|
44
44
|
size: "s",
|
|
45
|
-
"data-testid": "ic-arrow-head-right"
|
|
46
|
-
|
|
45
|
+
"data-testid": "ic-arrow-head-right",
|
|
46
|
+
color: ['brand-primary', '800']
|
|
47
|
+
}),
|
|
47
48
|
onMouseDown: e => {
|
|
48
49
|
// prevent focusing the caret
|
|
49
50
|
if (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-treeview",
|
|
3
|
-
"version": "2.4.2-rc.
|
|
3
|
+
"version": "2.4.2-rc.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Tree View",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -229,15 +229,15 @@
|
|
|
229
229
|
"dependencies": {
|
|
230
230
|
"@dnd-kit/core": "~4.0.1",
|
|
231
231
|
"@dnd-kit/sortable": "~5.0.0",
|
|
232
|
-
"@elliemae/ds-button": "2.4.2-rc.
|
|
233
|
-
"@elliemae/ds-circular-progress-indicator": "2.4.2-rc.
|
|
234
|
-
"@elliemae/ds-classnames": "2.4.2-rc.
|
|
235
|
-
"@elliemae/ds-drag-and-drop": "2.4.2-rc.
|
|
236
|
-
"@elliemae/ds-form": "2.4.2-rc.
|
|
237
|
-
"@elliemae/ds-icons": "2.4.2-rc.
|
|
238
|
-
"@elliemae/ds-props-helpers": "2.4.2-rc.
|
|
239
|
-
"@elliemae/ds-truncated-tooltip-text": "2.4.2-rc.
|
|
240
|
-
"@elliemae/ds-utilities": "2.4.2-rc.
|
|
232
|
+
"@elliemae/ds-button": "2.4.2-rc.11",
|
|
233
|
+
"@elliemae/ds-circular-progress-indicator": "2.4.2-rc.11",
|
|
234
|
+
"@elliemae/ds-classnames": "2.4.2-rc.11",
|
|
235
|
+
"@elliemae/ds-drag-and-drop": "2.4.2-rc.11",
|
|
236
|
+
"@elliemae/ds-form": "2.4.2-rc.11",
|
|
237
|
+
"@elliemae/ds-icons": "2.4.2-rc.11",
|
|
238
|
+
"@elliemae/ds-props-helpers": "2.4.2-rc.11",
|
|
239
|
+
"@elliemae/ds-truncated-tooltip-text": "2.4.2-rc.11",
|
|
240
|
+
"@elliemae/ds-utilities": "2.4.2-rc.11",
|
|
241
241
|
"react-desc": "~4.1.3",
|
|
242
242
|
"react-highlight-words": "~0.17.0",
|
|
243
243
|
"react-virtual": "~2.8.2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { DSTreeviewT } from '../react-desc-prop-types';
|
|
3
3
|
interface PropsT {
|
|
4
4
|
item: DSTreeviewT.Item;
|
|
5
5
|
}
|
|
6
|
-
export declare const ChildrenCountDisplayer:
|
|
6
|
+
export declare const ChildrenCountDisplayer: React.ComponentType<PropsT>;
|
|
7
7
|
export {};
|