@dreamcommerce/aurora 2.8.12-2 → 2.9.0-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/build/cjs/packages/aurora/src/assets/icon_list_arrow_down.js +17 -0
- package/build/cjs/packages/aurora/src/assets/icon_list_arrow_down.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js +2 -3
- package/build/cjs/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/file_picker/use_file_picker.js +4 -13
- package/build/cjs/packages/aurora/src/components/file_picker/use_file_picker.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/tree/components/tree_node.js +48 -0
- package/build/cjs/packages/aurora/src/components/tree/components/tree_node.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_context.js +18 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_context.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_provider.js +35 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_provider.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/css_classes.js +29 -0
- package/build/cjs/packages/aurora/src/components/tree/css_classes.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/hooks/tree_hook.js +21 -0
- package/build/cjs/packages/aurora/src/components/tree/hooks/tree_hook.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/hooks/tree_node_hook.js +19 -0
- package/build/cjs/packages/aurora/src/components/tree/hooks/tree_node_hook.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/index.js +23 -0
- package/build/cjs/packages/aurora/src/components/tree/index.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/xhr_image_picker/index.js +2 -3
- package/build/cjs/packages/aurora/src/components/xhr_image_picker/index.js.map +1 -1
- package/build/cjs/packages/aurora/src/css/hint/main.module.less.js +1 -1
- package/build/cjs/packages/aurora/src/css/slide/main.module.less.js +1 -1
- package/build/cjs/packages/aurora/src/css/tooltip/main.module.less.js +1 -1
- package/build/cjs/packages/aurora/src/css/tree/main.module.less.js +12 -0
- package/build/cjs/packages/aurora/src/css/tree/main.module.less.js.map +1 -0
- package/build/cjs/packages/aurora/src/index.js +4 -0
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icon_list_arrow_down.d.ts +1 -0
- package/build/esm/packages/aurora/src/assets/icon_list_arrow_down.js +9 -0
- package/build/esm/packages/aurora/src/assets/icon_list_arrow_down.js.map +1 -0
- package/build/esm/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js +2 -3
- package/build/esm/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/types.d.ts +4 -4
- package/build/esm/packages/aurora/src/components/controls/types.js +3 -3
- package/build/esm/packages/aurora/src/components/controls/types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/file_picker/types.d.ts +2 -6
- package/build/esm/packages/aurora/src/components/file_picker/use_file_picker.js +4 -13
- package/build/esm/packages/aurora/src/components/file_picker/use_file_picker.js.map +1 -1
- package/build/esm/packages/aurora/src/components/tree/components/tree_node.d.ts +11 -0
- package/build/esm/packages/aurora/src/components/tree/components/tree_node.js +39 -0
- package/build/esm/packages/aurora/src/components/tree/components/tree_node.js.map +1 -0
- package/build/esm/packages/aurora/src/components/tree/context/tree_context.d.ts +16 -0
- package/build/esm/packages/aurora/src/components/tree/context/tree_context.js +13 -0
- package/build/esm/packages/aurora/src/components/tree/context/tree_context.js.map +1 -0
- package/build/esm/packages/aurora/src/components/tree/context/tree_provider.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/tree/context/tree_provider.js +27 -0
- package/build/esm/packages/aurora/src/components/tree/context/tree_provider.js.map +1 -0
- package/build/esm/packages/aurora/src/components/tree/css_classes.d.ts +19 -0
- package/build/esm/packages/aurora/src/components/tree/css_classes.js +24 -0
- package/build/esm/packages/aurora/src/components/tree/css_classes.js.map +1 -0
- package/build/esm/packages/aurora/src/components/tree/hooks/tree_hook.d.ts +1 -0
- package/build/esm/packages/aurora/src/components/tree/hooks/tree_hook.js +13 -0
- package/build/esm/packages/aurora/src/components/tree/hooks/tree_hook.js.map +1 -0
- package/build/esm/packages/aurora/src/components/tree/hooks/tree_node_hook.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/tree/hooks/tree_node_hook.js +15 -0
- package/build/esm/packages/aurora/src/components/tree/hooks/tree_node_hook.js.map +1 -0
- package/build/esm/packages/aurora/src/components/tree/index.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/tree/index.js +14 -0
- package/build/esm/packages/aurora/src/components/tree/index.js.map +1 -0
- package/build/esm/packages/aurora/src/components/xhr_image_picker/index.js +2 -3
- package/build/esm/packages/aurora/src/components/xhr_image_picker/index.js.map +1 -1
- package/build/esm/packages/aurora/src/css/hint/main.module.less.js +1 -1
- package/build/esm/packages/aurora/src/css/slide/main.module.less.js +1 -1
- package/build/esm/packages/aurora/src/css/tooltip/main.module.less.js +1 -1
- package/build/esm/packages/aurora/src/css/tree/main.module.less.js +8 -0
- package/build/esm/packages/aurora/src/css/tree/main.module.less.js.map +1 -0
- package/build/esm/packages/aurora/src/index.d.ts +3 -1
- package/build/esm/packages/aurora/src/index.js +2 -0
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/typings/general.d.ts +4 -0
- package/build/esm/packages/aurora/src/typings/general.js +1 -0
- package/build/esm/packages/aurora/src/typings/general.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
+
|
|
11
|
+
const IconListArrowDown = () => {
|
|
12
|
+
return (React__default['default'].createElement("svg", { width: "6", height: "4", viewBox: "0 0 6 4", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
|
+
React__default['default'].createElement("path", { id: "Polygon 1", d: "M3.28615 3.86114C3.12455 4.04629 2.87545 4.04629 2.71385 3.86114L0.136577 0.908383C-0.145619 0.585074 0.0386869 -4.16709e-08 0.422729 0L5.57727 5.59302e-07C5.96131 6.00973e-07 6.14562 0.585074 5.86342 0.908383L3.28615 3.86114Z", fill: "#5C657E" })));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.IconListArrowDown = IconListArrowDown;
|
|
17
|
+
//# sourceMappingURL=icon_list_arrow_down.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/cjs/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js
CHANGED
|
@@ -16,10 +16,9 @@ const ControlXhrImagePicker = ({ url, label, isRequired, id, name, onChange, all
|
|
|
16
16
|
const handleControlError = (errors) => {
|
|
17
17
|
setErrors(errors);
|
|
18
18
|
};
|
|
19
|
-
const handleControlChange = (
|
|
20
|
-
const { fileList, fileAsDataUrl } = file;
|
|
19
|
+
const handleControlChange = (fileList) => {
|
|
21
20
|
setErrors(null);
|
|
22
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
21
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
|
|
23
22
|
};
|
|
24
23
|
return (React__default['default'].createElement(index['default'], { errors: controlErrors, name: name, id: id },
|
|
25
24
|
(label || hint) && (React__default['default'].createElement(index['default'].Label, { id: id, isRequired: isRequired, additionalInfo: labelAdditionalInfo },
|
package/build/cjs/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -8,15 +8,11 @@ var constants = require('./constants.js');
|
|
|
8
8
|
|
|
9
9
|
const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, initialErrors, onError }) => {
|
|
10
10
|
const [file, setFile] = React.useState(initialFile);
|
|
11
|
-
const [fileAsDataUrl, setFileAsDataUrl] = React.useState(null);
|
|
12
11
|
const [errors, setErrors] = React.useState([]);
|
|
13
12
|
const [isDragOver, setDragOver] = React.useState(false);
|
|
14
13
|
const [isPreview, setPreview] = React.useState(true);
|
|
15
|
-
const reader = new FileReader();
|
|
16
14
|
React.useEffect(() => {
|
|
17
15
|
initialFile && setFile(initialFile);
|
|
18
|
-
reader.addEventListener('load', () => getDataUrlFromFile(reader.result), false);
|
|
19
|
-
return () => reader.removeEventListener('load', () => getDataUrlFromFile(reader.result));
|
|
20
16
|
}, []);
|
|
21
17
|
React.useEffect(() => {
|
|
22
18
|
initialErrors && setErrors(initialErrors);
|
|
@@ -51,25 +47,21 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
51
47
|
updateFile(files);
|
|
52
48
|
};
|
|
53
49
|
const updateFile = (files) => {
|
|
54
|
-
if (
|
|
55
|
-
reader.readAsDataURL(files[0]);
|
|
50
|
+
if (files === null || files === void 0 ? void 0 : files.length) {
|
|
56
51
|
setFile({
|
|
57
52
|
fileName: files === null || files === void 0 ? void 0 : files[0].name,
|
|
58
53
|
fileUrl: URL.createObjectURL(files === null || files === void 0 ? void 0 : files[0])
|
|
59
54
|
});
|
|
60
55
|
const isValid = validateFileExtension(allowedExtensions, files[0].type);
|
|
61
56
|
if (isValid)
|
|
62
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
57
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(files);
|
|
63
58
|
}
|
|
64
59
|
else {
|
|
65
60
|
setFile(undefined);
|
|
66
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
61
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(files);
|
|
67
62
|
}
|
|
68
63
|
setPreview(true);
|
|
69
64
|
};
|
|
70
|
-
const getDataUrlFromFile = (fileReaderResult) => {
|
|
71
|
-
setFileAsDataUrl(fileReaderResult);
|
|
72
|
-
};
|
|
73
65
|
const onDragOver = (event) => {
|
|
74
66
|
event.stopPropagation();
|
|
75
67
|
event.preventDefault();
|
|
@@ -84,10 +76,9 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
84
76
|
const onFileDelete = () => {
|
|
85
77
|
inputRef.current.value = '';
|
|
86
78
|
setFile(undefined);
|
|
87
|
-
setFileAsDataUrl(null);
|
|
88
79
|
setPreview(true);
|
|
89
80
|
setErrors([]);
|
|
90
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
81
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(null);
|
|
91
82
|
};
|
|
92
83
|
const onPreviewError = () => {
|
|
93
84
|
setPreview(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var reactTransitionGroup = require('react-transition-group');
|
|
8
|
+
var css_classes = require('../css_classes.js');
|
|
9
|
+
var main_module = require('../../../css/tree/main.module.less.js');
|
|
10
|
+
var tree_hook = require('../hooks/tree_hook.js');
|
|
11
|
+
var tree_node_hook = require('../hooks/tree_node_hook.js');
|
|
12
|
+
var icon_list_arrow_down = require('../../../assets/icon_list_arrow_down.js');
|
|
13
|
+
|
|
14
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
18
|
+
|
|
19
|
+
const TreeNode = ({ children, id, ContentComponent, LabelComponent, ...rest }) => {
|
|
20
|
+
const treeApi = tree_hook.useTree();
|
|
21
|
+
const node = tree_node_hook.useTreeNode(id, rest);
|
|
22
|
+
const nodeChildrenRef = React.useRef(null);
|
|
23
|
+
if (!node)
|
|
24
|
+
return null;
|
|
25
|
+
const toggleNode = () => {
|
|
26
|
+
treeApi.toggleNode(node.id);
|
|
27
|
+
};
|
|
28
|
+
return (React__default['default'].createElement("li", { className: classnames__default['default'](main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNode], css_classes.TREE_NODE_CSS_CLASSES.treeNode, {
|
|
29
|
+
[css_classes.TREE_NODE_CSS_CLASSES.treeNodeExpanded]: node.expanded,
|
|
30
|
+
[main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeExpanded]]: node.expanded
|
|
31
|
+
}) },
|
|
32
|
+
ContentComponent ? null : (React__default['default'].createElement("button", { onClick: toggleNode, className: classnames__default['default'](css_classes.TREE_NODE_CSS_CLASSES.treeNodeToggler, main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeToggler]) },
|
|
33
|
+
React__default['default'].createElement("span", { className: classnames__default['default'](main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeTogglerIcon], css_classes.TREE_NODE_CSS_CLASSES.treeNodeTogglerIcon) },
|
|
34
|
+
React__default['default'].createElement(icon_list_arrow_down.IconListArrowDown, null)),
|
|
35
|
+
LabelComponent ? (LabelComponent) : (React__default['default'].createElement("span", { className: classnames__default['default'](main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeTogglerLabel], css_classes.TREE_NODE_CSS_CLASSES.treeNodeTogglerLabel) }, node.label ? node.label : node.id)))),
|
|
36
|
+
children ? (React__default['default'].createElement(reactTransitionGroup.CSSTransition, { unmountOnExit: true, in: node.expanded, timeout: 250, classNames: {
|
|
37
|
+
enter: main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeChildrenEnter],
|
|
38
|
+
enterActive: main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeChildrenEnterActive],
|
|
39
|
+
exit: main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeChildrenExit],
|
|
40
|
+
exitActive: main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeChildrenExitActive],
|
|
41
|
+
exitDone: main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeChildrenExitDone]
|
|
42
|
+
} },
|
|
43
|
+
React__default['default'].createElement("ul", { className: classnames__default['default'](main_module['default'][css_classes.TREE_NODE_CSS_CLASSES.treeNodeChildren], css_classes.TREE_NODE_CSS_CLASSES.treeNodeChildren), ref: nodeChildrenRef }, children))) : null));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.TreeNode = TreeNode;
|
|
47
|
+
exports.default = TreeNode;
|
|
48
|
+
//# sourceMappingURL=tree_node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
const TreeContext = React.createContext({
|
|
8
|
+
addNode: () => { },
|
|
9
|
+
removeNode: () => { },
|
|
10
|
+
toggleNode: () => { },
|
|
11
|
+
getNode: () => undefined,
|
|
12
|
+
hasNode: () => false
|
|
13
|
+
});
|
|
14
|
+
const TreeContextProvider = TreeContext.Provider;
|
|
15
|
+
|
|
16
|
+
exports.TreeContext = TreeContext;
|
|
17
|
+
exports.TreeContextProvider = TreeContextProvider;
|
|
18
|
+
//# sourceMappingURL=tree_context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var tree_context = require('./tree_context.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
|
|
12
|
+
const TreeProvider = ({ children }) => {
|
|
13
|
+
const [nodes, setNodes] = React.useState([]);
|
|
14
|
+
const value = {
|
|
15
|
+
addNode(node) {
|
|
16
|
+
setNodes((nodes) => [...nodes, node]);
|
|
17
|
+
},
|
|
18
|
+
getNode(nodeId) {
|
|
19
|
+
return nodes.find((node) => node.id === nodeId);
|
|
20
|
+
},
|
|
21
|
+
removeNode(nodeId) {
|
|
22
|
+
setNodes((nodes) => nodes.filter((node) => node.id !== nodeId));
|
|
23
|
+
},
|
|
24
|
+
toggleNode(nodeId) {
|
|
25
|
+
setNodes((nodes) => nodes.map((node) => (node.id === nodeId ? { ...node, expanded: !node.expanded } : node)));
|
|
26
|
+
},
|
|
27
|
+
hasNode(nodeId) {
|
|
28
|
+
return !!nodes.find((node) => node.id === nodeId);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return React__default['default'].createElement(tree_context.TreeContextProvider, { value: value }, children);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.TreeProvider = TreeProvider;
|
|
35
|
+
//# sourceMappingURL=tree_provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const baseCssClass = 'tree';
|
|
6
|
+
const TREE_CSS_CLASSES = {
|
|
7
|
+
tree: baseCssClass,
|
|
8
|
+
treeNode: `${baseCssClass}__node`
|
|
9
|
+
};
|
|
10
|
+
const treeNodeBaseCssClass = `tree-node`;
|
|
11
|
+
const TREE_NODE_CSS_CLASSES = {
|
|
12
|
+
treeNode: treeNodeBaseCssClass,
|
|
13
|
+
treeNodeToggler: `${treeNodeBaseCssClass}__toggler`,
|
|
14
|
+
treeNodeTogglerIcon: `${treeNodeBaseCssClass}__toggler-icon`,
|
|
15
|
+
treeNodeTogglerLabel: `${treeNodeBaseCssClass}__toggler-label`,
|
|
16
|
+
treeNodeChildren: `${treeNodeBaseCssClass}__children`,
|
|
17
|
+
treeNodeChildrenEnter: `${treeNodeBaseCssClass}__children-enter`,
|
|
18
|
+
treeNodeChildrenEnterActive: `${treeNodeBaseCssClass}__children-enter-active`,
|
|
19
|
+
treeNodeChildrenExit: `${treeNodeBaseCssClass}__children-exit`,
|
|
20
|
+
treeNodeChildrenExitActive: `${treeNodeBaseCssClass}__children-exit-active`,
|
|
21
|
+
treeNodeChildrenExitDone: `${treeNodeBaseCssClass}__children-exit-done`,
|
|
22
|
+
treeNodeExpanded: `${treeNodeBaseCssClass}_expanded`,
|
|
23
|
+
treeNodeDisabled: `${treeNodeBaseCssClass}_disabled`,
|
|
24
|
+
treeNodeFocused: `${treeNodeBaseCssClass}_focused`
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.TREE_CSS_CLASSES = TREE_CSS_CLASSES;
|
|
28
|
+
exports.TREE_NODE_CSS_CLASSES = TREE_NODE_CSS_CLASSES;
|
|
29
|
+
//# sourceMappingURL=css_classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var tree_context = require('../context/tree_context.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
|
|
12
|
+
const useTree = () => {
|
|
13
|
+
const context = React__default['default'].useContext(tree_context.TreeContext);
|
|
14
|
+
if (!context) {
|
|
15
|
+
throw new Error('useTree must be used within a TreeContextProvider');
|
|
16
|
+
}
|
|
17
|
+
return context;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.useTree = useTree;
|
|
21
|
+
//# sourceMappingURL=tree_hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var tree_hook = require('./tree_hook.js');
|
|
7
|
+
|
|
8
|
+
const useTreeNode = (nodeId, props) => {
|
|
9
|
+
const treeApi = tree_hook.useTree();
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
if (!treeApi.hasNode(nodeId))
|
|
12
|
+
treeApi.addNode({ ...props, id: nodeId });
|
|
13
|
+
return () => treeApi.removeNode(nodeId);
|
|
14
|
+
}, []);
|
|
15
|
+
return treeApi.getNode(nodeId);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.useTreeNode = useTreeNode;
|
|
19
|
+
//# sourceMappingURL=tree_node_hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var tree_provider = require('./context/tree_provider.js');
|
|
8
|
+
var css_classes = require('./css_classes.js');
|
|
9
|
+
var main_module = require('../../css/tree/main.module.less.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
15
|
+
|
|
16
|
+
const Tree = ({ children }) => {
|
|
17
|
+
return (React__default['default'].createElement(tree_provider.TreeProvider, null,
|
|
18
|
+
React__default['default'].createElement("ul", { className: classnames__default['default'](main_module['default'][css_classes.TREE_CSS_CLASSES.tree], css_classes.TREE_CSS_CLASSES.tree) }, children)));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.Tree = Tree;
|
|
22
|
+
exports.default = Tree;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -22,9 +22,8 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
|
|
|
22
22
|
] }) => {
|
|
23
23
|
const httpApi = use_http_api.useHttpApi();
|
|
24
24
|
const pendingRequestRef = React__default['default'].useRef();
|
|
25
|
-
const handleControlChange = async (
|
|
26
|
-
|
|
27
|
-
onChange === null || onChange === void 0 ? void 0 : onChange({ fileList, fileAsDataUrl });
|
|
25
|
+
const handleControlChange = async (fileList) => {
|
|
26
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
|
|
28
27
|
if (!fileList || !fileList.length)
|
|
29
28
|
return;
|
|
30
29
|
if (pendingRequestRef.current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
|
|
6
6
|
|
|
7
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_hint__3cahT {\n vertical-align: middle;\n}\n.main-module_hint_spacing-left__1dKcO {\n margin-left: 1rem;\n}\n.main-module_hint_spacing-right__2dV0Q {\n margin-right: 1rem;\n}\n.main-
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_hint__3cahT {\n vertical-align: middle;\n}\n.main-module_hint_spacing-left__1dKcO {\n margin-left: 1rem;\n}\n.main-module_hint_spacing-right__2dV0Q {\n margin-right: 1rem;\n}\n.main-module_hint__content__IIh3W {\n min-width: 258px;\n max-width: 500px;\n padding: 1rem !important;\n box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.2) !important;\n}\n.main-module_hint__content_yellow__3NyBP {\n background-color: #fff6cc;\n}\n.main-module_hint__content_yellow__3NyBP.main-module_dropdown__content_top__1bZPH::before {\n border-color: #fff6cc transparent transparent transparent;\n}\n.main-module_hint__content_yellow__3NyBP.main-module_dropdown__content_bottom__10hXS::before {\n border-color: transparent transparent #fff6cc transparent;\n}\n";
|
|
8
8
|
var cssClasses = {"hint":"main-module_hint__3cahT","hint_spacing-left":"main-module_hint_spacing-left__1dKcO","hint_spacing-right":"main-module_hint_spacing-right__2dV0Q","hint__content":"main-module_hint__content__IIh3W","hint__content_yellow":"main-module_hint__content_yellow__3NyBP","dropdown__content_top":"main-module_dropdown__content_top__1bZPH","dropdown__content_bottom":"main-module_dropdown__content_bottom__10hXS"};
|
|
9
9
|
styleInject_es['default'](css_248z);
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
|
|
6
6
|
|
|
7
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #fff;\n}\n.main-module_slide__sub-header__7iIPF {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #f3f4f8;\n display: flex;\n align-items: center;\n padding: 1rem;\n}\n.main-module_slide__content__3KeZM {\n flex: 1;\n overflow-x: hidden;\n overflow-y:
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #fff;\n}\n.main-module_slide__sub-header__7iIPF {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #f3f4f8;\n display: flex;\n align-items: center;\n padding: 1rem;\n}\n.main-module_slide__content__3KeZM {\n scrollbar-color: #79829c #f3f4f8;\n scrollbar-width: thin;\n flex: 1;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar {\n width: 7px;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-track {\n background-color: #f3f4f8;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-track:hover {\n background-color: #f3f4f8;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-thumb {\n background-color: #5c657e;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-thumb:hover {\n background-color: #2d3748;\n}\n.main-module_slide__footer__3wvMP {\n padding: 0.5rem 1rem 0.5rem 1rem;\n background-color: #f3f4f8;\n border-top: 1px solid #abb4cd;\n box-shadow: 0 1px 5px 0 rgba(171, 180, 205, 0.6);\n}\n.main-module_slide_direction-left__Rg5kV {\n right: 0;\n left: 0;\n -webkit-animation-name: main-module_directionLeftHide__QSuRw;\n animation-name: main-module_directionLeftHide__QSuRw;\n}\n.main-module_slide_direction-left__Rg5kV.main-module_slide_is-open__3twK9 {\n -webkit-animation-name: main-module_directionLeftShow__1VVi1;\n animation-name: main-module_directionLeftShow__1VVi1;\n}\n";
|
|
8
8
|
var cssClasses = {"slide":"main-module_slide__1kcca","slide__wrapper":"main-module_slide__wrapper__3mC8j","slide__header":"main-module_slide__header__11UTh","slide__sub-header":"main-module_slide__sub-header__7iIPF","slide__content":"main-module_slide__content__3KeZM","slide__footer":"main-module_slide__footer__3wvMP","slide_direction-left":"main-module_slide_direction-left__Rg5kV","directionLeftHide":"main-module_directionLeftHide__QSuRw","slide_is-open":"main-module_slide_is-open__3twK9","directionLeftShow":"main-module_directionLeftShow__1VVi1"};
|
|
9
9
|
styleInject_es['default'](css_248z);
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
|
|
6
6
|
|
|
7
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tooltip__container__1T35Q {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748 !important;\n box-shadow: none !important;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none !important;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_top__2_OzW::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n bottom: -14px;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_bottom__1PzPE::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n top: -14px;\n}\n";
|
|
7
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tooltip__container__1T35Q {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748 !important;\n box-shadow: none !important;\n pointer-events: none;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none !important;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_top__2_OzW::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n bottom: -14px;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_bottom__1PzPE::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n top: -14px;\n}\n";
|
|
8
8
|
var cssClasses = {"tooltip__container":"main-module_tooltip__container__1T35Q","dropdown__content_top":"main-module_dropdown__content_top__2_OzW","dropdown__content_bottom":"main-module_dropdown__content_bottom__1PzPE"};
|
|
9
9
|
styleInject_es['default'](css_248z);
|
|
10
10
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
|
|
6
|
+
|
|
7
|
+
var css_248z = ".main-module_tree__3D4e3 {\n list-style: none;\n}\n.main-module_tree-node_expanded__2NInq .main-module_tree-node__toggler-icon__3QR9X svg {\n rotate: 0deg;\n}\n.main-module_tree-node__toggler__Bhwx9 {\n display: flex;\n align-items: center;\n background: none;\n}\n.main-module_tree-node__toggler-icon__3QR9X {\n display: flex;\n align-items: center;\n}\n.main-module_tree-node__toggler-icon__3QR9X svg {\n transition: rotate 250ms ease-out;\n rotate: -95deg;\n}\n.main-module_tree-node__children__QyEOR {\n transform-origin: top center;\n transition: opacity 250ms ease-out, scale 250ms ease-out;\n padding-left: 16px;\n list-style: none;\n will-change: true;\n}\n.main-module_tree-node__children-enter__vxFO- {\n opacity: 0;\n scale: 1 0;\n}\n.main-module_tree-node__children-enter-active__T6XIS {\n opacity: 1;\n scale: 1 1;\n}\n.main-module_tree-node__children-exit__1NXHe {\n opacity: 1;\n scale: 1 1;\n}\n.main-module_tree-node__children-exit-active__vdqAI {\n opacity: 0;\n scale: 1 0;\n}\n";
|
|
8
|
+
var cssClasses = {"tree":"main-module_tree__3D4e3","tree-node_expanded":"main-module_tree-node_expanded__2NInq","tree-node__toggler-icon":"main-module_tree-node__toggler-icon__3QR9X","tree-node__toggler":"main-module_tree-node__toggler__Bhwx9","tree-node__children":"main-module_tree-node__children__QyEOR","tree-node__children-enter":"main-module_tree-node__children-enter__vxFO-","tree-node__children-enter-active":"main-module_tree-node__children-enter-active__T6XIS","tree-node__children-exit":"main-module_tree-node__children-exit__1NXHe","tree-node__children-exit-active":"main-module_tree-node__children-exit-active__vdqAI"};
|
|
9
|
+
styleInject_es['default'](css_248z);
|
|
10
|
+
|
|
11
|
+
exports.default = cssClasses;
|
|
12
|
+
//# sourceMappingURL=main.module.less.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,6BAA6B,8DAAkE;AAC/F;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -81,6 +81,8 @@ var tabs_wrapper = require('./components/tabs/components/tabs_wrapper.js');
|
|
|
81
81
|
var index$2 = require('./components/tooltip/index.js');
|
|
82
82
|
var index$J = require('./components/with_loader/index.js');
|
|
83
83
|
var values_syncer = require('./components/controls/components/values_syncer.js');
|
|
84
|
+
var index$N = require('./components/tree/index.js');
|
|
85
|
+
var tree_node = require('./components/tree/components/tree_node.js');
|
|
84
86
|
|
|
85
87
|
|
|
86
88
|
|
|
@@ -165,4 +167,6 @@ exports.TabsWrapper = tabs_wrapper['default'];
|
|
|
165
167
|
exports.Tooltip = index$2['default'];
|
|
166
168
|
exports.WithLoader = index$J['default'];
|
|
167
169
|
exports.ValuesSyncer = values_syncer['default'];
|
|
170
|
+
exports.Tree = index$N.Tree;
|
|
171
|
+
exports.TreeNode = tree_node.TreeNode;
|
|
168
172
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IconListArrowDown: () => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const IconListArrowDown = () => {
|
|
4
|
+
return (React.createElement("svg", { width: "6", height: "4", viewBox: "0 0 6 4", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
5
|
+
React.createElement("path", { id: "Polygon 1", d: "M3.28615 3.86114C3.12455 4.04629 2.87545 4.04629 2.71385 3.86114L0.136577 0.908383C-0.145619 0.585074 0.0386869 -4.16709e-08 0.422729 0L5.57727 5.59302e-07C5.96131 6.00973e-07 6.14562 0.585074 5.86342 0.908383L3.28615 3.86114Z", fill: "#5C657E" })));
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { IconListArrowDown };
|
|
9
|
+
//# sourceMappingURL=icon_list_arrow_down.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js
CHANGED
|
@@ -8,10 +8,9 @@ const ControlXhrImagePicker = ({ url, label, isRequired, id, name, onChange, all
|
|
|
8
8
|
const handleControlError = (errors) => {
|
|
9
9
|
setErrors(errors);
|
|
10
10
|
};
|
|
11
|
-
const handleControlChange = (
|
|
12
|
-
const { fileList, fileAsDataUrl } = file;
|
|
11
|
+
const handleControlChange = (fileList) => {
|
|
13
12
|
setErrors(null);
|
|
14
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
13
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
|
|
15
14
|
};
|
|
16
15
|
return (React.createElement(Control, { errors: controlErrors, name: name, id: id },
|
|
17
16
|
(label || hint) && (React.createElement(Control.Label, { id: id, isRequired: isRequired, additionalInfo: labelAdditionalInfo },
|
package/build/esm/packages/aurora/src/components/controls/hoc/control_xhr_image_picker/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, Ref, TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import { IFilePicker, IUseFilePickerOnChange } from "../file_picker/types";
|
|
3
|
-
import { IImagePicker, TImageSize } from "../image_picker/types";
|
|
4
2
|
import { IMultiSelectProps, ISelectProps } from "../dropdown/types";
|
|
5
3
|
import { IColorPickerProps } from "../color_picker/types";
|
|
4
|
+
import { IFilePicker } from "../file_picker/types";
|
|
6
5
|
import { IRange } from "../range/types";
|
|
7
|
-
import { IRequestResponse } from '@dreamcommerce/star_core';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
import { TVerticalPosition } from "../../typings/general";
|
|
8
|
+
import { IImagePicker, TImageSize } from "../image_picker/types";
|
|
9
|
+
import { IRequestResponse } from '@dreamcommerce/star_core';
|
|
10
10
|
export declare type TControlErrors = string[] | null | undefined;
|
|
11
11
|
export interface IControlContext {
|
|
12
12
|
errors?: TControlErrors;
|
|
@@ -175,7 +175,7 @@ export interface IControlXhrImagePicker extends IImagePicker, IControlCommonProp
|
|
|
175
175
|
url: string;
|
|
176
176
|
label?: string;
|
|
177
177
|
isRequired?: boolean;
|
|
178
|
-
onChange?: (
|
|
178
|
+
onChange?: (fileList: FileList | null, size?: TImageSize) => void;
|
|
179
179
|
labelAdditionalInfo?: string | ReactNode;
|
|
180
180
|
onUploaded?: (resp: IRequestResponse<any>, file: File) => void;
|
|
181
181
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '@auroraComponents/file_picker/types';
|
|
3
|
-
import '@auroraComponents/image_picker/types';
|
|
4
2
|
import '@auroraComponents/dropdown/types';
|
|
5
3
|
import '@auroraComponents/color_picker/types';
|
|
4
|
+
import '@auroraComponents/file_picker/types';
|
|
6
5
|
import '@auroraComponents/range/types';
|
|
7
|
-
import '@dreamcommerce/star_core';
|
|
8
6
|
import 'react';
|
|
9
7
|
import '@auroraTypings/general';
|
|
8
|
+
import '@auroraComponents/image_picker/types';
|
|
9
|
+
import '@dreamcommerce/star_core';
|
|
10
10
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/components/controls/types.ts"],"names":[],"mappings":"AAAA,OAA0G,OAAO,CAAC;AAClH,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/components/controls/types.ts"],"names":[],"mappings":"AAAA,OAA0G,OAAO,CAAC;AAClH,OAAgD,kCAAkC,CAAC;AAEnF,OAAkC,sCAAsC,CAAC;AACzE,OAA4B,qCAAqC,CAAC;AAClE,OAAuB,+BAA+B,CAAC;AACvD,OAAkB,OAAO,CAAC;AAC1B,OAAkC,wBAAwB,CAAC;AAC3D,OAAyC,sCAAsC,CAAC;AAChF,OAAiC,0BAA0B,CAAC"}
|
|
@@ -13,7 +13,7 @@ export interface IFilePicker {
|
|
|
13
13
|
id: string;
|
|
14
14
|
name?: string;
|
|
15
15
|
className?: string;
|
|
16
|
-
onChange?: (
|
|
16
|
+
onChange?: (fileList: FileList | null) => void;
|
|
17
17
|
allowedExtensions?: TFilesExtension[];
|
|
18
18
|
initialFile?: TFilePickerFile;
|
|
19
19
|
errors?: TControlErrors;
|
|
@@ -45,12 +45,8 @@ export interface IUseFilePicker {
|
|
|
45
45
|
isPreview: boolean;
|
|
46
46
|
isDragOver: boolean;
|
|
47
47
|
}
|
|
48
|
-
export declare type IUseFilePickerOnChange = {
|
|
49
|
-
fileList: FileList | null;
|
|
50
|
-
fileAsDataUrl: string | ArrayBuffer | null;
|
|
51
|
-
};
|
|
52
48
|
export interface IUseFilePickerProps {
|
|
53
|
-
onChange?: (
|
|
49
|
+
onChange?: (fileList: FileList | null) => void;
|
|
54
50
|
initialFile?: TFilePickerFile;
|
|
55
51
|
allowedExtensions?: TFilesExtension[];
|
|
56
52
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
@@ -4,15 +4,11 @@ import { MIME_TYPE_TO_FILE_EXTENSIONS, FILE_PICKER_ERROR } from './constants.js'
|
|
|
4
4
|
|
|
5
5
|
const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, initialErrors, onError }) => {
|
|
6
6
|
const [file, setFile] = useState(initialFile);
|
|
7
|
-
const [fileAsDataUrl, setFileAsDataUrl] = useState(null);
|
|
8
7
|
const [errors, setErrors] = useState([]);
|
|
9
8
|
const [isDragOver, setDragOver] = useState(false);
|
|
10
9
|
const [isPreview, setPreview] = useState(true);
|
|
11
|
-
const reader = new FileReader();
|
|
12
10
|
useEffect(() => {
|
|
13
11
|
initialFile && setFile(initialFile);
|
|
14
|
-
reader.addEventListener('load', () => getDataUrlFromFile(reader.result), false);
|
|
15
|
-
return () => reader.removeEventListener('load', () => getDataUrlFromFile(reader.result));
|
|
16
12
|
}, []);
|
|
17
13
|
useEffect(() => {
|
|
18
14
|
initialErrors && setErrors(initialErrors);
|
|
@@ -47,25 +43,21 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
47
43
|
updateFile(files);
|
|
48
44
|
};
|
|
49
45
|
const updateFile = (files) => {
|
|
50
|
-
if (
|
|
51
|
-
reader.readAsDataURL(files[0]);
|
|
46
|
+
if (files === null || files === void 0 ? void 0 : files.length) {
|
|
52
47
|
setFile({
|
|
53
48
|
fileName: files === null || files === void 0 ? void 0 : files[0].name,
|
|
54
49
|
fileUrl: URL.createObjectURL(files === null || files === void 0 ? void 0 : files[0])
|
|
55
50
|
});
|
|
56
51
|
const isValid = validateFileExtension(allowedExtensions, files[0].type);
|
|
57
52
|
if (isValid)
|
|
58
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
53
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(files);
|
|
59
54
|
}
|
|
60
55
|
else {
|
|
61
56
|
setFile(undefined);
|
|
62
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
57
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(files);
|
|
63
58
|
}
|
|
64
59
|
setPreview(true);
|
|
65
60
|
};
|
|
66
|
-
const getDataUrlFromFile = (fileReaderResult) => {
|
|
67
|
-
setFileAsDataUrl(fileReaderResult);
|
|
68
|
-
};
|
|
69
61
|
const onDragOver = (event) => {
|
|
70
62
|
event.stopPropagation();
|
|
71
63
|
event.preventDefault();
|
|
@@ -80,10 +72,9 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
80
72
|
const onFileDelete = () => {
|
|
81
73
|
inputRef.current.value = '';
|
|
82
74
|
setFile(undefined);
|
|
83
|
-
setFileAsDataUrl(null);
|
|
84
75
|
setPreview(true);
|
|
85
76
|
setErrors([]);
|
|
86
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
77
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(null);
|
|
87
78
|
};
|
|
88
79
|
const onPreviewError = () => {
|
|
89
80
|
setPreview(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TPropsWithChildren } from "../../../typings/general";
|
|
3
|
+
import { ITreeNode } from "../context/tree_context";
|
|
4
|
+
declare type TTreeNodeProps = TPropsWithChildren<ITreeNode & {
|
|
5
|
+
collapseIcon?: React.ReactNode;
|
|
6
|
+
expandIcon?: React.ReactNode;
|
|
7
|
+
LabelComponent?: React.ReactNode;
|
|
8
|
+
ContentComponent?: React.ReactNode;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const TreeNode: ({ children, id, ContentComponent, LabelComponent, ...rest }: TTreeNodeProps) => JSX.Element | null;
|
|
11
|
+
export default TreeNode;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { CSSTransition } from 'react-transition-group';
|
|
4
|
+
import { TREE_NODE_CSS_CLASSES } from '../css_classes.js';
|
|
5
|
+
import cssClasses from '../../../css/tree/main.module.less.js';
|
|
6
|
+
import { useTree } from '../hooks/tree_hook.js';
|
|
7
|
+
import { useTreeNode } from '../hooks/tree_node_hook.js';
|
|
8
|
+
import { IconListArrowDown } from '../../../assets/icon_list_arrow_down.js';
|
|
9
|
+
|
|
10
|
+
const TreeNode = ({ children, id, ContentComponent, LabelComponent, ...rest }) => {
|
|
11
|
+
const treeApi = useTree();
|
|
12
|
+
const node = useTreeNode(id, rest);
|
|
13
|
+
const nodeChildrenRef = useRef(null);
|
|
14
|
+
if (!node)
|
|
15
|
+
return null;
|
|
16
|
+
const toggleNode = () => {
|
|
17
|
+
treeApi.toggleNode(node.id);
|
|
18
|
+
};
|
|
19
|
+
return (React.createElement("li", { className: classnames(cssClasses[TREE_NODE_CSS_CLASSES.treeNode], TREE_NODE_CSS_CLASSES.treeNode, {
|
|
20
|
+
[TREE_NODE_CSS_CLASSES.treeNodeExpanded]: node.expanded,
|
|
21
|
+
[cssClasses[TREE_NODE_CSS_CLASSES.treeNodeExpanded]]: node.expanded
|
|
22
|
+
}) },
|
|
23
|
+
ContentComponent ? null : (React.createElement("button", { onClick: toggleNode, className: classnames(TREE_NODE_CSS_CLASSES.treeNodeToggler, cssClasses[TREE_NODE_CSS_CLASSES.treeNodeToggler]) },
|
|
24
|
+
React.createElement("span", { className: classnames(cssClasses[TREE_NODE_CSS_CLASSES.treeNodeTogglerIcon], TREE_NODE_CSS_CLASSES.treeNodeTogglerIcon) },
|
|
25
|
+
React.createElement(IconListArrowDown, null)),
|
|
26
|
+
LabelComponent ? (LabelComponent) : (React.createElement("span", { className: classnames(cssClasses[TREE_NODE_CSS_CLASSES.treeNodeTogglerLabel], TREE_NODE_CSS_CLASSES.treeNodeTogglerLabel) }, node.label ? node.label : node.id)))),
|
|
27
|
+
children ? (React.createElement(CSSTransition, { unmountOnExit: true, in: node.expanded, timeout: 250, classNames: {
|
|
28
|
+
enter: cssClasses[TREE_NODE_CSS_CLASSES.treeNodeChildrenEnter],
|
|
29
|
+
enterActive: cssClasses[TREE_NODE_CSS_CLASSES.treeNodeChildrenEnterActive],
|
|
30
|
+
exit: cssClasses[TREE_NODE_CSS_CLASSES.treeNodeChildrenExit],
|
|
31
|
+
exitActive: cssClasses[TREE_NODE_CSS_CLASSES.treeNodeChildrenExitActive],
|
|
32
|
+
exitDone: cssClasses[TREE_NODE_CSS_CLASSES.treeNodeChildrenExitDone]
|
|
33
|
+
} },
|
|
34
|
+
React.createElement("ul", { className: classnames(cssClasses[TREE_NODE_CSS_CLASSES.treeNodeChildren], TREE_NODE_CSS_CLASSES.treeNodeChildren), ref: nodeChildrenRef }, children))) : null));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default TreeNode;
|
|
38
|
+
export { TreeNode };
|
|
39
|
+
//# sourceMappingURL=tree_node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ITreeNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export interface ITreeContext {
|
|
9
|
+
addNode(node: ITreeNode): void;
|
|
10
|
+
hasNode(nodeId: string): boolean;
|
|
11
|
+
getNode(nodeId: string): ITreeNode | undefined;
|
|
12
|
+
removeNode(nodeId: string): void;
|
|
13
|
+
toggleNode(nodeId: string): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const TreeContext: import("react").Context<ITreeContext>;
|
|
16
|
+
export declare const TreeContextProvider: import("react").Provider<ITreeContext>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
const TreeContext = createContext({
|
|
4
|
+
addNode: () => { },
|
|
5
|
+
removeNode: () => { },
|
|
6
|
+
toggleNode: () => { },
|
|
7
|
+
getNode: () => undefined,
|
|
8
|
+
hasNode: () => false
|
|
9
|
+
});
|
|
10
|
+
const TreeContextProvider = TreeContext.Provider;
|
|
11
|
+
|
|
12
|
+
export { TreeContext, TreeContextProvider };
|
|
13
|
+
//# sourceMappingURL=tree_context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { TreeContextProvider } from './tree_context.js';
|
|
3
|
+
|
|
4
|
+
const TreeProvider = ({ children }) => {
|
|
5
|
+
const [nodes, setNodes] = useState([]);
|
|
6
|
+
const value = {
|
|
7
|
+
addNode(node) {
|
|
8
|
+
setNodes((nodes) => [...nodes, node]);
|
|
9
|
+
},
|
|
10
|
+
getNode(nodeId) {
|
|
11
|
+
return nodes.find((node) => node.id === nodeId);
|
|
12
|
+
},
|
|
13
|
+
removeNode(nodeId) {
|
|
14
|
+
setNodes((nodes) => nodes.filter((node) => node.id !== nodeId));
|
|
15
|
+
},
|
|
16
|
+
toggleNode(nodeId) {
|
|
17
|
+
setNodes((nodes) => nodes.map((node) => (node.id === nodeId ? { ...node, expanded: !node.expanded } : node)));
|
|
18
|
+
},
|
|
19
|
+
hasNode(nodeId) {
|
|
20
|
+
return !!nodes.find((node) => node.id === nodeId);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return React.createElement(TreeContextProvider, { value: value }, children);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { TreeProvider };
|
|
27
|
+
//# sourceMappingURL=tree_provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const TREE_CSS_CLASSES: {
|
|
2
|
+
readonly tree: "tree";
|
|
3
|
+
readonly treeNode: "tree__node";
|
|
4
|
+
};
|
|
5
|
+
export declare const TREE_NODE_CSS_CLASSES: {
|
|
6
|
+
readonly treeNode: "tree-node";
|
|
7
|
+
readonly treeNodeToggler: "tree-node__toggler";
|
|
8
|
+
readonly treeNodeTogglerIcon: "tree-node__toggler-icon";
|
|
9
|
+
readonly treeNodeTogglerLabel: "tree-node__toggler-label";
|
|
10
|
+
readonly treeNodeChildren: "tree-node__children";
|
|
11
|
+
readonly treeNodeChildrenEnter: "tree-node__children-enter";
|
|
12
|
+
readonly treeNodeChildrenEnterActive: "tree-node__children-enter-active";
|
|
13
|
+
readonly treeNodeChildrenExit: "tree-node__children-exit";
|
|
14
|
+
readonly treeNodeChildrenExitActive: "tree-node__children-exit-active";
|
|
15
|
+
readonly treeNodeChildrenExitDone: "tree-node__children-exit-done";
|
|
16
|
+
readonly treeNodeExpanded: "tree-node_expanded";
|
|
17
|
+
readonly treeNodeDisabled: "tree-node_disabled";
|
|
18
|
+
readonly treeNodeFocused: "tree-node_focused";
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const baseCssClass = 'tree';
|
|
2
|
+
const TREE_CSS_CLASSES = {
|
|
3
|
+
tree: baseCssClass,
|
|
4
|
+
treeNode: `${baseCssClass}__node`
|
|
5
|
+
};
|
|
6
|
+
const treeNodeBaseCssClass = `tree-node`;
|
|
7
|
+
const TREE_NODE_CSS_CLASSES = {
|
|
8
|
+
treeNode: treeNodeBaseCssClass,
|
|
9
|
+
treeNodeToggler: `${treeNodeBaseCssClass}__toggler`,
|
|
10
|
+
treeNodeTogglerIcon: `${treeNodeBaseCssClass}__toggler-icon`,
|
|
11
|
+
treeNodeTogglerLabel: `${treeNodeBaseCssClass}__toggler-label`,
|
|
12
|
+
treeNodeChildren: `${treeNodeBaseCssClass}__children`,
|
|
13
|
+
treeNodeChildrenEnter: `${treeNodeBaseCssClass}__children-enter`,
|
|
14
|
+
treeNodeChildrenEnterActive: `${treeNodeBaseCssClass}__children-enter-active`,
|
|
15
|
+
treeNodeChildrenExit: `${treeNodeBaseCssClass}__children-exit`,
|
|
16
|
+
treeNodeChildrenExitActive: `${treeNodeBaseCssClass}__children-exit-active`,
|
|
17
|
+
treeNodeChildrenExitDone: `${treeNodeBaseCssClass}__children-exit-done`,
|
|
18
|
+
treeNodeExpanded: `${treeNodeBaseCssClass}_expanded`,
|
|
19
|
+
treeNodeDisabled: `${treeNodeBaseCssClass}_disabled`,
|
|
20
|
+
treeNodeFocused: `${treeNodeBaseCssClass}_focused`
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { TREE_CSS_CLASSES, TREE_NODE_CSS_CLASSES };
|
|
24
|
+
//# sourceMappingURL=css_classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTree: () => import("../context/tree_context").ITreeContext;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TreeContext } from '../context/tree_context.js';
|
|
3
|
+
|
|
4
|
+
const useTree = () => {
|
|
5
|
+
const context = React.useContext(TreeContext);
|
|
6
|
+
if (!context) {
|
|
7
|
+
throw new Error('useTree must be used within a TreeContextProvider');
|
|
8
|
+
}
|
|
9
|
+
return context;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { useTree };
|
|
13
|
+
//# sourceMappingURL=tree_hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useTree } from './tree_hook.js';
|
|
3
|
+
|
|
4
|
+
const useTreeNode = (nodeId, props) => {
|
|
5
|
+
const treeApi = useTree();
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (!treeApi.hasNode(nodeId))
|
|
8
|
+
treeApi.addNode({ ...props, id: nodeId });
|
|
9
|
+
return () => treeApi.removeNode(nodeId);
|
|
10
|
+
}, []);
|
|
11
|
+
return treeApi.getNode(nodeId);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { useTreeNode };
|
|
15
|
+
//# sourceMappingURL=tree_node_hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { TreeProvider } from './context/tree_provider.js';
|
|
4
|
+
import { TREE_CSS_CLASSES } from './css_classes.js';
|
|
5
|
+
import cssClasses from '../../css/tree/main.module.less.js';
|
|
6
|
+
|
|
7
|
+
const Tree = ({ children }) => {
|
|
8
|
+
return (React.createElement(TreeProvider, null,
|
|
9
|
+
React.createElement("ul", { className: classnames(cssClasses[TREE_CSS_CLASSES.tree], TREE_CSS_CLASSES.tree) }, children)));
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default Tree;
|
|
13
|
+
export { Tree };
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -14,9 +14,8 @@ const XhrImagePicker = ({ id, url, name, onUploaded, initialFile, errors, onErro
|
|
|
14
14
|
] }) => {
|
|
15
15
|
const httpApi = useHttpApi();
|
|
16
16
|
const pendingRequestRef = React.useRef();
|
|
17
|
-
const handleControlChange = async (
|
|
18
|
-
|
|
19
|
-
onChange === null || onChange === void 0 ? void 0 : onChange({ fileList, fileAsDataUrl });
|
|
17
|
+
const handleControlChange = async (fileList) => {
|
|
18
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(fileList);
|
|
20
19
|
if (!fileList || !fileList.length)
|
|
21
20
|
return;
|
|
22
21
|
if (pendingRequestRef.current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_hint__3cahT {\n vertical-align: middle;\n}\n.main-module_hint_spacing-left__1dKcO {\n margin-left: 1rem;\n}\n.main-module_hint_spacing-right__2dV0Q {\n margin-right: 1rem;\n}\n.main-
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_hint__3cahT {\n vertical-align: middle;\n}\n.main-module_hint_spacing-left__1dKcO {\n margin-left: 1rem;\n}\n.main-module_hint_spacing-right__2dV0Q {\n margin-right: 1rem;\n}\n.main-module_hint__content__IIh3W {\n min-width: 258px;\n max-width: 500px;\n padding: 1rem !important;\n box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.2) !important;\n}\n.main-module_hint__content_yellow__3NyBP {\n background-color: #fff6cc;\n}\n.main-module_hint__content_yellow__3NyBP.main-module_dropdown__content_top__1bZPH::before {\n border-color: #fff6cc transparent transparent transparent;\n}\n.main-module_hint__content_yellow__3NyBP.main-module_dropdown__content_bottom__10hXS::before {\n border-color: transparent transparent #fff6cc transparent;\n}\n";
|
|
4
4
|
var cssClasses = {"hint":"main-module_hint__3cahT","hint_spacing-left":"main-module_hint_spacing-left__1dKcO","hint_spacing-right":"main-module_hint_spacing-right__2dV0Q","hint__content":"main-module_hint__content__IIh3W","hint__content_yellow":"main-module_hint__content_yellow__3NyBP","dropdown__content_top":"main-module_dropdown__content_top__1bZPH","dropdown__content_bottom":"main-module_dropdown__content_bottom__10hXS"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #fff;\n}\n.main-module_slide__sub-header__7iIPF {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #f3f4f8;\n display: flex;\n align-items: center;\n padding: 1rem;\n}\n.main-module_slide__content__3KeZM {\n flex: 1;\n overflow-x: hidden;\n overflow-y:
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n@-webkit-keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes main-module_directionLeftShow__1VVi1 {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@-webkit-keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes main-module_directionLeftHide__QSuRw {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n.main-module_slide__1kcca {\n position: absolute;\n top: 0;\n height: 100%;\n background-color: #fff;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n overflow-y: hidden;\n z-index: 1;\n}\n.main-module_slide__wrapper__3mC8j {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.main-module_slide__header__11UTh {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #fff;\n}\n.main-module_slide__sub-header__7iIPF {\n width: 100%;\n border-bottom: 2px solid transparent;\n background-color: #f3f4f8;\n display: flex;\n align-items: center;\n padding: 1rem;\n}\n.main-module_slide__content__3KeZM {\n scrollbar-color: #79829c #f3f4f8;\n scrollbar-width: thin;\n flex: 1;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar {\n width: 7px;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-track {\n background-color: #f3f4f8;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-track:hover {\n background-color: #f3f4f8;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-thumb {\n background-color: #5c657e;\n}\n.main-module_slide__content__3KeZM::-webkit-scrollbar-thumb:hover {\n background-color: #2d3748;\n}\n.main-module_slide__footer__3wvMP {\n padding: 0.5rem 1rem 0.5rem 1rem;\n background-color: #f3f4f8;\n border-top: 1px solid #abb4cd;\n box-shadow: 0 1px 5px 0 rgba(171, 180, 205, 0.6);\n}\n.main-module_slide_direction-left__Rg5kV {\n right: 0;\n left: 0;\n -webkit-animation-name: main-module_directionLeftHide__QSuRw;\n animation-name: main-module_directionLeftHide__QSuRw;\n}\n.main-module_slide_direction-left__Rg5kV.main-module_slide_is-open__3twK9 {\n -webkit-animation-name: main-module_directionLeftShow__1VVi1;\n animation-name: main-module_directionLeftShow__1VVi1;\n}\n";
|
|
4
4
|
var cssClasses = {"slide":"main-module_slide__1kcca","slide__wrapper":"main-module_slide__wrapper__3mC8j","slide__header":"main-module_slide__header__11UTh","slide__sub-header":"main-module_slide__sub-header__7iIPF","slide__content":"main-module_slide__content__3KeZM","slide__footer":"main-module_slide__footer__3wvMP","slide_direction-left":"main-module_slide_direction-left__Rg5kV","directionLeftHide":"main-module_directionLeftHide__QSuRw","slide_is-open":"main-module_slide_is-open__3twK9","directionLeftShow":"main-module_directionLeftShow__1VVi1"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tooltip__container__1T35Q {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748 !important;\n box-shadow: none !important;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none !important;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_top__2_OzW::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n bottom: -14px;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_bottom__1PzPE::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n top: -14px;\n}\n";
|
|
3
|
+
var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tooltip__container__1T35Q {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n white-space: nowrap;\n color: #ffffff;\n font-size: 12px;\n text-align: center;\n background-color: #2d3748 !important;\n box-shadow: none !important;\n pointer-events: none;\n}\n.main-module_tooltip__container__1T35Q::before {\n display: none !important;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_top__2_OzW::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n bottom: -14px;\n}\n.main-module_tooltip__container__1T35Q.main-module_dropdown__content_bottom__1PzPE::after {\n content: '';\n display: block;\n position: absolute;\n width: 100%;\n height: 14px;\n left: 0;\n top: -14px;\n}\n";
|
|
4
4
|
var cssClasses = {"tooltip__container":"main-module_tooltip__container__1T35Q","dropdown__content_top":"main-module_dropdown__content_top__2_OzW","dropdown__content_bottom":"main-module_dropdown__content_bottom__1PzPE"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".main-module_tree__3D4e3 {\n list-style: none;\n}\n.main-module_tree-node_expanded__2NInq .main-module_tree-node__toggler-icon__3QR9X svg {\n rotate: 0deg;\n}\n.main-module_tree-node__toggler__Bhwx9 {\n display: flex;\n align-items: center;\n background: none;\n}\n.main-module_tree-node__toggler-icon__3QR9X {\n display: flex;\n align-items: center;\n}\n.main-module_tree-node__toggler-icon__3QR9X svg {\n transition: rotate 250ms ease-out;\n rotate: -95deg;\n}\n.main-module_tree-node__children__QyEOR {\n transform-origin: top center;\n transition: opacity 250ms ease-out, scale 250ms ease-out;\n padding-left: 16px;\n list-style: none;\n will-change: true;\n}\n.main-module_tree-node__children-enter__vxFO- {\n opacity: 0;\n scale: 1 0;\n}\n.main-module_tree-node__children-enter-active__T6XIS {\n opacity: 1;\n scale: 1 1;\n}\n.main-module_tree-node__children-exit__1NXHe {\n opacity: 1;\n scale: 1 1;\n}\n.main-module_tree-node__children-exit-active__vdqAI {\n opacity: 0;\n scale: 1 0;\n}\n";
|
|
4
|
+
var cssClasses = {"tree":"main-module_tree__3D4e3","tree-node_expanded":"main-module_tree-node_expanded__2NInq","tree-node__toggler-icon":"main-module_tree-node__toggler-icon__3QR9X","tree-node__toggler":"main-module_tree-node__toggler__Bhwx9","tree-node__children":"main-module_tree-node__children__QyEOR","tree-node__children-enter":"main-module_tree-node__children-enter__vxFO-","tree-node__children-enter-active":"main-module_tree-node__children-enter-active__T6XIS","tree-node__children-exit":"main-module_tree-node__children-exit__1NXHe","tree-node__children-exit-active":"main-module_tree-node__children-exit-active__vdqAI"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export default cssClasses;
|
|
8
|
+
//# sourceMappingURL=main.module.less.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,wBAAwB,8DAAkE;AAC1F;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -105,13 +105,15 @@ import { useSearchList } from "./components/search_list/use_search_list";
|
|
|
105
105
|
import { useToggle } from "./components/dropdown/hooks";
|
|
106
106
|
import XhrImagePicker from "./components/xhr_image_picker";
|
|
107
107
|
import ValuesSyncer from "./components/controls/components/values_syncer";
|
|
108
|
+
import { Tree } from "./components/tree";
|
|
109
|
+
import { TreeNode } from "./components/tree/components/tree_node";
|
|
108
110
|
/**
|
|
109
111
|
* export hooks
|
|
110
112
|
*/
|
|
111
113
|
/**
|
|
112
114
|
* export components
|
|
113
115
|
*/
|
|
114
|
-
export { Accordion, Button, Tooltip, ButtonsGroup, Dropdown, Select, MultiSelect, Label, Stack, Control, ControlInput, ControlCheckbox, ControlCheckboxSwitch, ControlRadio, ControlSelect, ControlRange, ControlMultiSelect, ControlTextarea, Gallery, Datepicker, ColorPicker, ControlColorPicker, ControlDatepicker, ControlFilePicker, ControlXhrImagePicker, Heading, Typography, Modal, ModalProvider, AbsoluteModal, RelativeModal, TabsWrapper, Tabs, TabsItem, TabsItemList, TabsPanel, TabsPanelList, SearchList, SearchListInput, SearchListResults, Tag, TagsSelector, ControlTagsSelector, Table, DataTable, Grid, DropdownContext, ModalContext, IconCalendar, Spacing, IconArrow, IconTick, FilePicker, ImagePicker, ControlCellSelector, Hint, ControlRadioGroup, MessageBox, FlashMessenger, useFlashMessenger, Loader, WithLoader, useDropdownContext, FlashMessengerContext, FlashMessagesList, Link, IconTablet, IconMobile, IconLaptop, IconDesktop, IconWarning, useToggle, useSearchList, Slide, SlideWrapper, SlideHeader, SlideSubHeader, SlideContent, SlideFooter, XhrImagePicker, ValuesSyncer };
|
|
116
|
+
export { Accordion, Button, Tooltip, ButtonsGroup, Dropdown, Select, MultiSelect, Label, Stack, Control, ControlInput, ControlCheckbox, ControlCheckboxSwitch, ControlRadio, ControlSelect, ControlRange, ControlMultiSelect, ControlTextarea, Gallery, Datepicker, ColorPicker, ControlColorPicker, ControlDatepicker, ControlFilePicker, ControlXhrImagePicker, Heading, Typography, Modal, ModalProvider, AbsoluteModal, RelativeModal, TabsWrapper, Tabs, TabsItem, TabsItemList, TabsPanel, TabsPanelList, SearchList, SearchListInput, SearchListResults, Tag, TagsSelector, ControlTagsSelector, Table, DataTable, Grid, DropdownContext, ModalContext, IconCalendar, Spacing, IconArrow, IconTick, FilePicker, ImagePicker, ControlCellSelector, Hint, ControlRadioGroup, MessageBox, FlashMessenger, useFlashMessenger, Loader, WithLoader, useDropdownContext, FlashMessengerContext, FlashMessagesList, Link, IconTablet, IconMobile, IconLaptop, IconDesktop, IconWarning, useToggle, useSearchList, Slide, SlideWrapper, SlideHeader, SlideSubHeader, SlideContent, SlideFooter, XhrImagePicker, ValuesSyncer, Tree, TreeNode };
|
|
115
117
|
/**
|
|
116
118
|
* export types
|
|
117
119
|
*/
|
|
@@ -77,4 +77,6 @@ export { default as TabsWrapper } from './components/tabs/components/tabs_wrappe
|
|
|
77
77
|
export { default as Tooltip } from './components/tooltip/index.js';
|
|
78
78
|
export { default as WithLoader } from './components/with_loader/index.js';
|
|
79
79
|
export { default as ValuesSyncer } from './components/controls/components/values_syncer.js';
|
|
80
|
+
export { Tree } from './components/tree/index.js';
|
|
81
|
+
export { TreeNode } from './components/tree/components/tree_node.js';
|
|
80
82
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HORIZONTAL_POSITION, VERTICAL_POSITION } from "../constants/positions";
|
|
2
2
|
import { DIRECTION } from "../constants/directions";
|
|
3
3
|
import { CSS_THEME_VARIABLES } from "../constants/css_theme_variables";
|
|
4
|
+
import { ReactNode } from 'react';
|
|
4
5
|
export declare type EnumLiteralsOf<T extends object> = T[keyof T];
|
|
5
6
|
export declare type THorizontalPosition = EnumLiteralsOf<typeof HORIZONTAL_POSITION>;
|
|
6
7
|
export declare type TVerticalPosition = EnumLiteralsOf<typeof VERTICAL_POSITION>;
|
|
@@ -12,3 +13,6 @@ export declare type TCssPositions = {
|
|
|
12
13
|
};
|
|
13
14
|
export declare type TDirection = EnumLiteralsOf<typeof DIRECTION>;
|
|
14
15
|
export declare type TThemeColorsVariables = keyof typeof CSS_THEME_VARIABLES;
|
|
16
|
+
export declare type TPropsWithChildren<P = {}> = P & {
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../../../../../src/typings/general.ts"],"names":[],"mappings":"AAAA,OAAuD,4BAA4B,CAAC;AAEpF,OAA0B,6BAA6B,CAAC;AACxD,OAAoC,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../../../../../src/typings/general.ts"],"names":[],"mappings":"AAAA,OAAuD,4BAA4B,CAAC;AAEpF,OAA0B,6BAA6B,CAAC;AACxD,OAAoC,sCAAsC,CAAC;AAC3E,OAA0B,OAAO,CAAC"}
|