pocko-ui 1.0.3 → 1.0.5
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/README.md +1 -0
- package/Trees/index.css +101 -0
- package/Trees/index.d.ts +12 -0
- package/Trees/index.js +225 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/Trees/index.css
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
.trees__wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
padding: 0.5rem 0;
|
|
4
|
+
overflow-x: auto;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
}
|
|
7
|
+
.trees__wrapper::-webkit-scrollbar {
|
|
8
|
+
height: 7px;
|
|
9
|
+
width: 7px;
|
|
10
|
+
border-radius: 10px;
|
|
11
|
+
background: transparent;
|
|
12
|
+
}
|
|
13
|
+
.trees__wrapper::-webkit-scrollbar-thumb {
|
|
14
|
+
height: 20px;
|
|
15
|
+
border-radius: 10px;
|
|
16
|
+
border-width: 1.5px;
|
|
17
|
+
border-style: solid;
|
|
18
|
+
border-color: transparent;
|
|
19
|
+
background-color: #d6d6d6;
|
|
20
|
+
background-clip: padding-box;
|
|
21
|
+
}
|
|
22
|
+
.trees__wrapper::-webkit-scrollbar-thumb:hover {
|
|
23
|
+
background-color: #949494;
|
|
24
|
+
background-clip: border-box;
|
|
25
|
+
}
|
|
26
|
+
.trees__wrapper .tree__diagram {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
padding-left: 0;
|
|
30
|
+
margin-bottom: 0;
|
|
31
|
+
list-style: none;
|
|
32
|
+
--trees-padding-left: 1rem;
|
|
33
|
+
--trees-padding-y: 0.25rem;
|
|
34
|
+
}
|
|
35
|
+
.trees__wrapper .tree__diagram .arrow {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
z-index: 5;
|
|
38
|
+
width: 10px;
|
|
39
|
+
height: 10px;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 10px;
|
|
44
|
+
}
|
|
45
|
+
.trees__wrapper .tree__diagram .arrow .default-icon {
|
|
46
|
+
transition: transform 0.2s ease;
|
|
47
|
+
}
|
|
48
|
+
.trees__wrapper .tree__diagram .arrow .default-icon.rotated {
|
|
49
|
+
transform: rotate(90deg);
|
|
50
|
+
}
|
|
51
|
+
.trees__wrapper .tree__diagram .arrow .loading-icon {
|
|
52
|
+
animation: rotate 1s linear infinite;
|
|
53
|
+
}
|
|
54
|
+
@keyframes rotate {
|
|
55
|
+
100% {
|
|
56
|
+
transform: rotate(360deg);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.trees__wrapper .tree__diagram .tree__diagram__item {
|
|
60
|
+
position: relative;
|
|
61
|
+
padding-left: var(--trees-padding-left);
|
|
62
|
+
}
|
|
63
|
+
.trees__wrapper .tree__diagram .link-text {
|
|
64
|
+
position: relative;
|
|
65
|
+
display: block;
|
|
66
|
+
text-decoration: none;
|
|
67
|
+
z-index: 1;
|
|
68
|
+
padding: var(--trees-padding-y) 1rem;
|
|
69
|
+
}
|
|
70
|
+
.trees__wrapper .tree__diagram .link-text:hover {
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
.trees__wrapper .tree__diagram .link-text:hover .hoverable {
|
|
74
|
+
background: #efefef;
|
|
75
|
+
}
|
|
76
|
+
.trees__wrapper .tree__diagram .link-text:hover .custom-content {
|
|
77
|
+
opacity: 1;
|
|
78
|
+
visibility: visible;
|
|
79
|
+
transition: opacity 0.3s ease-in, visibility 0.3s ease-in;
|
|
80
|
+
transition-delay: 0.2s;
|
|
81
|
+
}
|
|
82
|
+
.trees__wrapper .tree__diagram .link-text .hoverable {
|
|
83
|
+
border-radius: 5px;
|
|
84
|
+
padding: var(--trees-padding-y);
|
|
85
|
+
}
|
|
86
|
+
.trees__wrapper .tree__diagram .link-text .custom-content {
|
|
87
|
+
opacity: 0;
|
|
88
|
+
visibility: hidden;
|
|
89
|
+
position: absolute;
|
|
90
|
+
right: 1rem;
|
|
91
|
+
top: 50%;
|
|
92
|
+
transform: translateY(-50%);
|
|
93
|
+
z-index: 10;
|
|
94
|
+
}
|
|
95
|
+
.trees__wrapper .tree__diagram .link-text .custom-content .btn {
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
}
|
|
98
|
+
.trees__wrapper .tree__diagram .link-text .hoverable.is-active {
|
|
99
|
+
color: white;
|
|
100
|
+
background-color: #3162b2;
|
|
101
|
+
}
|
package/Trees/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./Index.scss";
|
|
3
|
+
interface Props {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
data: any[];
|
|
7
|
+
dataService?: any;
|
|
8
|
+
dataServiceFunction?: string;
|
|
9
|
+
dataServiceFunctionParams?: any[];
|
|
10
|
+
}
|
|
11
|
+
export default function Index({ id, name, data, dataService, dataServiceFunction, dataServiceFunctionParams, }: Props): JSX.Element;
|
|
12
|
+
export {};
|
package/Trees/index.js
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
3
|
+
* This devtool is neither made for production nor for readable output files.
|
|
4
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
5
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
+
* or disable the default devtool with "devtool: false".
|
|
7
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
+
*/
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory(require("react"));
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define(["react"], factory);
|
|
14
|
+
else if(typeof exports === 'object')
|
|
15
|
+
exports["RPB"] = factory(require("react"));
|
|
16
|
+
else
|
|
17
|
+
root["RPB"] = factory(root["React"]);
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE_react__) => {
|
|
19
|
+
return /******/ (() => { // webpackBootstrap
|
|
20
|
+
/******/ "use strict";
|
|
21
|
+
/******/ var __webpack_modules__ = ({
|
|
22
|
+
|
|
23
|
+
/***/ "../../node_modules/css-loader/dist/runtime/api.js":
|
|
24
|
+
/*!*********************************************************!*\
|
|
25
|
+
!*** ../../node_modules/css-loader/dist/runtime/api.js ***!
|
|
26
|
+
\*********************************************************/
|
|
27
|
+
/***/ ((module) => {
|
|
28
|
+
|
|
29
|
+
eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};\n\n//# sourceURL=webpack://RPB/../../node_modules/css-loader/dist/runtime/api.js?");
|
|
30
|
+
|
|
31
|
+
/***/ }),
|
|
32
|
+
|
|
33
|
+
/***/ "../../node_modules/css-loader/dist/runtime/sourceMaps.js":
|
|
34
|
+
/*!****************************************************************!*\
|
|
35
|
+
!*** ../../node_modules/css-loader/dist/runtime/sourceMaps.js ***!
|
|
36
|
+
\****************************************************************/
|
|
37
|
+
/***/ ((module) => {
|
|
38
|
+
|
|
39
|
+
eval("\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};\n\n//# sourceURL=webpack://RPB/../../node_modules/css-loader/dist/runtime/sourceMaps.js?");
|
|
40
|
+
|
|
41
|
+
/***/ }),
|
|
42
|
+
|
|
43
|
+
/***/ "./src/Index.tsx":
|
|
44
|
+
/*!***********************!*\
|
|
45
|
+
!*** ./src/Index.tsx ***!
|
|
46
|
+
\***********************/
|
|
47
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
48
|
+
|
|
49
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Index)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Index_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Index.scss */ \"./src/Index.scss\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\nvar _getMenuNodes = function getMenuNodes(id, name, menuList, toggleNode, chooseId, handleItemClick) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"ul\", {\n className: \"tree__diagram\"\n }, menuList.map(function (item, index) {\n var isChosen = chooseId == item[id]; // 判断是否被点击\n var hasChildren = !!item.children && item.children.length > 0; // 判断是否有子节点\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"li\", {\n className: \"tree__diagram__item\",\n key: item[id] || index,\n \"data-id\": item[id],\n \"data-item\": JSON.stringify(item)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: \"tree__item\"\n }, hasChildren || !item.active ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"span\", {\n className: \"arrow\",\n onClick: function onClick() {\n toggleNode(item);\n }\n }, item.loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"span\", {\n className: \"loading-icon\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"svg\", {\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 512 512\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"g\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M256,0c-23.357,0-42.297,18.932-42.297,42.288c0,23.358,18.94,42.288,42.297,42.288c23.357,0,42.279-18.93,42.279-42.288C298.279,18.932,279.357,0,256,0z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M256,427.424c-23.357,0-42.297,18.931-42.297,42.288C213.703,493.07,232.643,512,256,512c23.357,0,42.279-18.93,42.279-42.288C298.279,446.355,279.357,427.424,256,427.424z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M74.974,74.983c-16.52,16.511-16.52,43.286,0,59.806c16.52,16.52,43.287,16.52,59.806,0c16.52-16.511,16.52-43.286,0-59.806C118.261,58.463,91.494,58.463,74.974,74.983z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M377.203,377.211c-16.503,16.52-16.503,43.296,0,59.815c16.519,16.52,43.304,16.52,59.806,0c16.52-16.51,16.52-43.295,0-59.815C420.489,360.692,393.722,360.7,377.203,377.211z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M84.567,256c0.018-23.348-18.922-42.279-42.279-42.279c-23.357-0.009-42.297,18.932-42.279,42.288c-0.018,23.348,18.904,42.279,42.279,42.279C65.645,298.288,84.567,279.358,84.567,256z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M469.712,213.712c-23.357,0-42.279,18.941-42.297,42.288c0,23.358,18.94,42.288,42.297,42.297c23.357,0,42.297-18.94,42.279-42.297C512.009,232.652,493.069,213.712,469.712,213.712z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M74.991,377.22c-16.519,16.511-16.519,43.296,0,59.806c16.503,16.52,43.27,16.52,59.789,0c16.52-16.519,16.52-43.295,0-59.815C118.278,360.692,91.511,360.692,74.991,377.22z\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M437.026,134.798c16.52-16.52,16.52-43.304,0-59.824c-16.519-16.511-43.304-16.52-59.823,0c-16.52,16.52-16.503,43.295,0,59.815C393.722,151.309,420.507,151.309,437.026,134.798z\"\n })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"var\", {\n className: \"default-icon \".concat(item.active ? \"rotated\" : \"\")\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"svg\", {\n width: \"0.75em\",\n height: \"0.75em\",\n viewBox: \"0 0 20 20\",\n fill: \"none\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"path\", {\n d: \"M15.795 11.272L7.795 16.272C6.79593 16.8964 5.5 16.1782 5.5 15L5.5 5.00002C5.5 3.82186 6.79593 3.1036 7.795 3.72802L15.795 8.72802C16.735 9.31552 16.735 10.6845 15.795 11.272Z\",\n fill: \"currentColor\"\n })))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: \"link-text\"\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"span\", {\n className: \"hoverable \".concat(isChosen ? \"is-active\" : \"\"),\n onClick: function onClick() {\n handleItemClick(item[id]);\n }\n }, item.icon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"var\", null, item.icon), item[name]), item.customContent && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: \"custom-content\"\n }, item.customContent))), item.active && hasChildren && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n className: \"tree__children\"\n }, _getMenuNodes(id, name, item.children, toggleNode, chooseId, handleItemClick)));\n }));\n};\nfunction Index(_ref) {\n var id = _ref.id,\n name = _ref.name,\n data = _ref.data,\n dataService = _ref.dataService,\n dataServiceFunction = _ref.dataServiceFunction,\n dataServiceFunctionParams = _ref.dataServiceFunctionParams;\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(data),\n _useState2 = _slicedToArray(_useState, 2),\n treeData = _useState2[0],\n setTreeData = _useState2[1];\n var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n _useState4 = _slicedToArray(_useState3, 2),\n chooseId = _useState4[0],\n setChooseId = _useState4[1];\n var handleItemClick = function handleItemClick(id) {\n setChooseId(id);\n };\n\n // 递归更新某个节点的 active 和 children\n var _updateTreeNode = function updateTreeNode(nodes, nodeId, callback) {\n return nodes.map(function (node) {\n if (node[id] === nodeId) {\n callback(node); // 修改当前节点\n } else if (node.children && node.children.length > 0) {\n node.children = _updateTreeNode(node.children, nodeId, callback); // 递归修改子节点\n }\n return node;\n });\n };\n\n // 节点点击逻辑\n var toggleNode = function toggleNode(node) {\n if (!node.children || node.children.length === 0) {\n // 如果没有子节点,动态加载\n setTreeData(function (prevData) {\n return _updateTreeNode(prevData, node[id], function (n) {\n n.loading = true;\n });\n });\n if (dataService && dataServiceFunction) {\n var params = _toConsumableArray(dataServiceFunctionParams || []);\n\n // 检查是否有 $QUERY_STRING,如果有,替换 keyword\n var queryIndex = params.indexOf(\"$QUERY_STRING\");\n if (queryIndex !== -1) {\n params[queryIndex] = node;\n }\n dataService[dataServiceFunction].apply(dataService, _toConsumableArray(params)).then(function (result) {\n if (result.length > 0) {\n var newChildren = result.map(function (item) {\n return _objectSpread(_objectSpread({}, item), {}, {\n active: false,\n loading: false,\n children: []\n });\n });\n setTreeData(function (prevData) {\n return _updateTreeNode(prevData, node[id], function (n) {\n n.children = newChildren; // 填充子节点\n n.active = true; // 展开当前节点\n n.loading = false;\n });\n });\n } else {\n setTreeData(function (prevData) {\n return _updateTreeNode(prevData, node[id], function (n) {\n n.active = true;\n n.loading = false;\n });\n });\n }\n });\n } else {\n setTimeout(function () {\n setTreeData(function (prevData) {\n return _updateTreeNode(prevData, node[id], function (n) {\n n.active = true;\n n.loading = false;\n });\n });\n }, 100);\n }\n } else {\n // 如果已有子节点,直接切换 active 状态\n setTreeData(function (prevData) {\n return _updateTreeNode(prevData, node[id], function (n) {\n n.active = !n.active;\n });\n });\n }\n };\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n if (data.length > 0) {\n setTreeData(data);\n } else {\n setTreeData([]);\n }\n }, [data]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, treeData.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"nav\", {\n className: \"trees__wrapper\"\n }, _getMenuNodes(id, name, treeData, toggleNode, chooseId, handleItemClick)));\n}\n\n//# sourceURL=webpack://RPB/./src/Index.tsx?");
|
|
50
|
+
|
|
51
|
+
/***/ }),
|
|
52
|
+
|
|
53
|
+
/***/ "../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./src/Index.scss":
|
|
54
|
+
/*!*********************************************************************************************************************************************************************!*\
|
|
55
|
+
!*** ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./src/Index.scss ***!
|
|
56
|
+
\*********************************************************************************************************************************************************************/
|
|
57
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
58
|
+
|
|
59
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"../../node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.trees__wrapper {\n position: relative;\n padding: 0.5rem 0;\n overflow-x: auto;\n overflow-y: auto;\n}\n.trees__wrapper::-webkit-scrollbar {\n height: 7px;\n width: 7px;\n border-radius: 10px;\n background: transparent;\n}\n.trees__wrapper::-webkit-scrollbar-thumb {\n height: 20px;\n border-radius: 10px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n background-color: #d6d6d6;\n background-clip: padding-box;\n}\n.trees__wrapper::-webkit-scrollbar-thumb:hover {\n background-color: #949494;\n background-clip: border-box;\n}\n.trees__wrapper .tree__diagram {\n display: flex;\n flex-direction: column;\n padding-left: 0;\n margin-bottom: 0;\n list-style: none;\n --trees-padding-left: 1rem;\n --trees-padding-y: 0.25rem;\n}\n.trees__wrapper .tree__diagram .arrow {\n cursor: pointer;\n z-index: 5;\n width: 10px;\n height: 10px;\n display: inline-flex;\n align-items: center;\n position: absolute;\n top: 10px;\n}\n.trees__wrapper .tree__diagram .arrow .default-icon {\n transition: transform 0.2s ease;\n}\n.trees__wrapper .tree__diagram .arrow .default-icon.rotated {\n transform: rotate(90deg);\n}\n.trees__wrapper .tree__diagram .arrow .loading-icon {\n animation: rotate 1s linear infinite;\n}\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n.trees__wrapper .tree__diagram .tree__diagram__item {\n position: relative;\n padding-left: var(--trees-padding-left);\n}\n.trees__wrapper .tree__diagram .link-text {\n position: relative;\n display: block;\n text-decoration: none;\n z-index: 1;\n padding: var(--trees-padding-y) 1rem;\n}\n.trees__wrapper .tree__diagram .link-text:hover {\n cursor: pointer;\n}\n.trees__wrapper .tree__diagram .link-text:hover .hoverable {\n background: #efefef;\n}\n.trees__wrapper .tree__diagram .link-text:hover .custom-content {\n opacity: 1;\n visibility: visible;\n transition: opacity 0.3s ease-in, visibility 0.3s ease-in;\n transition-delay: 0.2s;\n}\n.trees__wrapper .tree__diagram .link-text .hoverable {\n border-radius: 5px;\n padding: var(--trees-padding-y);\n}\n.trees__wrapper .tree__diagram .link-text .custom-content {\n opacity: 0;\n visibility: hidden;\n position: absolute;\n right: 1rem;\n top: 50%;\n transform: translateY(-50%);\n z-index: 10;\n}\n.trees__wrapper .tree__diagram .link-text .custom-content .btn {\n white-space: nowrap;\n}\n.trees__wrapper .tree__diagram .link-text .hoverable.is-active {\n color: white;\n background-color: #3162b2;\n}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/Index.scss\"],\"names\":[],\"mappings\":\"AAAA;EACE,kBAAA;EACA,iBAAA;EACA,gBAAA;EACA,gBAAA;AACF;AACE;EACE,WAAA;EACA,UAAA;EACA,mBAAA;EACA,uBAAA;AACJ;AACE;EACE,YAAA;EACA,mBAAA;EACA,mBAAA;EACA,mBAAA;EACA,yBAAA;EACA,yBAAA;EACA,4BAAA;AACJ;AAAI;EACE,yBAAA;EACA,2BAAA;AAEN;AAEE;EACE,aAAA;EACA,sBAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EAEA,0BAAA;EACA,0BAAA;AADJ;AAGI;EACE,eAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,oBAAA;EACA,mBAAA;EACA,kBAAA;EACA,SAAA;AADN;AAGM;EACE,+BAAA;AADR;AAEQ;EACE,wBAAA;AAAV;AAIM;EACE,oCAAA;AAFR;AAKM;EACE;IACE,yBAAA;EAHR;AACF;AAOI;EACE,kBAAA;EACA,uCAAA;AALN;AAQI;EACE,kBAAA;EACA,cAAA;EACA,qBAAA;EACA,UAAA;EACA,oCAAA;AANN;AAQM;EACE,eAAA;AANR;AAQQ;EACE,mBAAA;AANV;AASQ;EACE,UAAA;EACA,mBAAA;EACA,yDAAA;EACA,sBAAA;AAPV;AAWM;EACE,kBAAA;EACA,+BAAA;AATR;AAYM;EACE,UAAA;EACA,kBAAA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,2BAAA;EACA,WAAA;AAVR;AAYQ;EACE,mBAAA;AAVV;AAeI;EACE,YAAA;EACA,yBAAA;AAbN\",\"sourcesContent\":[\".trees__wrapper {\\r\\n position: relative;\\r\\n padding: 0.5rem 0;\\r\\n overflow-x: auto;\\r\\n overflow-y: auto;\\r\\n\\r\\n &::-webkit-scrollbar {\\r\\n height: 7px;\\r\\n width: 7px;\\r\\n border-radius: 10px;\\r\\n background: transparent;\\r\\n }\\r\\n &::-webkit-scrollbar-thumb {\\r\\n height: 20px;\\r\\n border-radius: 10px;\\r\\n border-width: 1.5px;\\r\\n border-style: solid;\\r\\n border-color: transparent;\\r\\n background-color: #d6d6d6;\\r\\n background-clip: padding-box;\\r\\n &:hover {\\r\\n background-color: #949494;\\r\\n background-clip: border-box;\\r\\n }\\r\\n }\\r\\n\\r\\n .tree__diagram {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n padding-left: 0;\\r\\n margin-bottom: 0;\\r\\n list-style: none;\\r\\n\\r\\n --trees-padding-left: 1rem;\\r\\n --trees-padding-y: 0.25rem;\\r\\n\\r\\n .arrow {\\r\\n cursor: pointer;\\r\\n z-index: 5;\\r\\n width: 10px;\\r\\n height: 10px;\\r\\n display: inline-flex;\\r\\n align-items: center;\\r\\n position: absolute;\\r\\n top: 10px;\\r\\n\\r\\n .default-icon {\\r\\n transition: transform 0.2s ease;\\r\\n &.rotated {\\r\\n transform: rotate(90deg); // 展开时旋转\\r\\n }\\r\\n }\\r\\n\\r\\n .loading-icon {\\r\\n animation: rotate 1s linear infinite;\\r\\n }\\r\\n\\r\\n @keyframes rotate {\\r\\n 100% {\\r\\n transform: rotate(360deg);\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n .tree__diagram__item {\\r\\n position: relative;\\r\\n padding-left: var(--trees-padding-left);\\r\\n }\\r\\n\\r\\n .link-text {\\r\\n position: relative;\\r\\n display: block;\\r\\n text-decoration: none;\\r\\n z-index: 1;\\r\\n padding: var(--trees-padding-y) 1rem;\\r\\n\\r\\n &:hover {\\r\\n cursor: pointer;\\r\\n\\r\\n .hoverable {\\r\\n background: #efefef;\\r\\n }\\r\\n\\r\\n .custom-content {\\r\\n opacity: 1;\\r\\n visibility: visible;\\r\\n transition: opacity 0.3s ease-in, visibility 0.3s ease-in;\\r\\n transition-delay: 0.2s; // 延迟显示\\r\\n }\\r\\n }\\r\\n\\r\\n .hoverable {\\r\\n border-radius: 5px;\\r\\n padding: var(--trees-padding-y);\\r\\n }\\r\\n\\r\\n .custom-content {\\r\\n opacity: 0;\\r\\n visibility: hidden;\\r\\n position: absolute;\\r\\n right: 1rem;\\r\\n top: 50%;\\r\\n transform: translateY(-50%);\\r\\n z-index: 10;\\r\\n\\r\\n .btn {\\r\\n white-space: nowrap;\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n .link-text .hoverable.is-active {\\r\\n color: white;\\r\\n background-color: #3162b2;\\r\\n }\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://RPB/./src/Index.scss?../../node_modules/css-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B1%5D.use%5B1%5D!../../node_modules/sass-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B1%5D.use%5B2%5D");
|
|
60
|
+
|
|
61
|
+
/***/ }),
|
|
62
|
+
|
|
63
|
+
/***/ "./src/Index.scss":
|
|
64
|
+
/*!************************!*\
|
|
65
|
+
!*** ./src/Index.scss ***!
|
|
66
|
+
\************************/
|
|
67
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68
|
+
|
|
69
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"../../node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"../../node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"../../node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"../../node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_Index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./Index.scss */ \"../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./src/Index.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_Index_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_Index_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_Index_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_Index_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://RPB/./src/Index.scss?");
|
|
70
|
+
|
|
71
|
+
/***/ }),
|
|
72
|
+
|
|
73
|
+
/***/ "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
|
|
74
|
+
/*!********************************************************************************!*\
|
|
75
|
+
!*** ../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
|
|
76
|
+
\********************************************************************************/
|
|
77
|
+
/***/ ((module) => {
|
|
78
|
+
|
|
79
|
+
eval("\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};\n\n//# sourceURL=webpack://RPB/../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?");
|
|
80
|
+
|
|
81
|
+
/***/ }),
|
|
82
|
+
|
|
83
|
+
/***/ "../../node_modules/style-loader/dist/runtime/insertBySelector.js":
|
|
84
|
+
/*!************************************************************************!*\
|
|
85
|
+
!*** ../../node_modules/style-loader/dist/runtime/insertBySelector.js ***!
|
|
86
|
+
\************************************************************************/
|
|
87
|
+
/***/ ((module) => {
|
|
88
|
+
|
|
89
|
+
eval("\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;\n\n//# sourceURL=webpack://RPB/../../node_modules/style-loader/dist/runtime/insertBySelector.js?");
|
|
90
|
+
|
|
91
|
+
/***/ }),
|
|
92
|
+
|
|
93
|
+
/***/ "../../node_modules/style-loader/dist/runtime/insertStyleElement.js":
|
|
94
|
+
/*!**************************************************************************!*\
|
|
95
|
+
!*** ../../node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
|
|
96
|
+
\**************************************************************************/
|
|
97
|
+
/***/ ((module) => {
|
|
98
|
+
|
|
99
|
+
eval("\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;\n\n//# sourceURL=webpack://RPB/../../node_modules/style-loader/dist/runtime/insertStyleElement.js?");
|
|
100
|
+
|
|
101
|
+
/***/ }),
|
|
102
|
+
|
|
103
|
+
/***/ "../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":
|
|
104
|
+
/*!**************************************************************************************!*\
|
|
105
|
+
!*** ../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
|
|
106
|
+
\**************************************************************************************/
|
|
107
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
108
|
+
|
|
109
|
+
eval("\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = true ? __webpack_require__.nc : 0;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;\n\n//# sourceURL=webpack://RPB/../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?");
|
|
110
|
+
|
|
111
|
+
/***/ }),
|
|
112
|
+
|
|
113
|
+
/***/ "../../node_modules/style-loader/dist/runtime/styleDomAPI.js":
|
|
114
|
+
/*!*******************************************************************!*\
|
|
115
|
+
!*** ../../node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
|
|
116
|
+
\*******************************************************************/
|
|
117
|
+
/***/ ((module) => {
|
|
118
|
+
|
|
119
|
+
eval("\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;\n\n//# sourceURL=webpack://RPB/../../node_modules/style-loader/dist/runtime/styleDomAPI.js?");
|
|
120
|
+
|
|
121
|
+
/***/ }),
|
|
122
|
+
|
|
123
|
+
/***/ "../../node_modules/style-loader/dist/runtime/styleTagTransform.js":
|
|
124
|
+
/*!*************************************************************************!*\
|
|
125
|
+
!*** ../../node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
|
|
126
|
+
\*************************************************************************/
|
|
127
|
+
/***/ ((module) => {
|
|
128
|
+
|
|
129
|
+
eval("\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;\n\n//# sourceURL=webpack://RPB/../../node_modules/style-loader/dist/runtime/styleTagTransform.js?");
|
|
130
|
+
|
|
131
|
+
/***/ }),
|
|
132
|
+
|
|
133
|
+
/***/ "react":
|
|
134
|
+
/*!**************************************************************************************!*\
|
|
135
|
+
!*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
|
|
136
|
+
\**************************************************************************************/
|
|
137
|
+
/***/ ((module) => {
|
|
138
|
+
|
|
139
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
140
|
+
|
|
141
|
+
/***/ })
|
|
142
|
+
|
|
143
|
+
/******/ });
|
|
144
|
+
/************************************************************************/
|
|
145
|
+
/******/ // The module cache
|
|
146
|
+
/******/ var __webpack_module_cache__ = {};
|
|
147
|
+
/******/
|
|
148
|
+
/******/ // The require function
|
|
149
|
+
/******/ function __webpack_require__(moduleId) {
|
|
150
|
+
/******/ // Check if module is in cache
|
|
151
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
152
|
+
/******/ if (cachedModule !== undefined) {
|
|
153
|
+
/******/ return cachedModule.exports;
|
|
154
|
+
/******/ }
|
|
155
|
+
/******/ // Create a new module (and put it into the cache)
|
|
156
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
157
|
+
/******/ id: moduleId,
|
|
158
|
+
/******/ // no module.loaded needed
|
|
159
|
+
/******/ exports: {}
|
|
160
|
+
/******/ };
|
|
161
|
+
/******/
|
|
162
|
+
/******/ // Execute the module function
|
|
163
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
164
|
+
/******/
|
|
165
|
+
/******/ // Return the exports of the module
|
|
166
|
+
/******/ return module.exports;
|
|
167
|
+
/******/ }
|
|
168
|
+
/******/
|
|
169
|
+
/************************************************************************/
|
|
170
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
171
|
+
/******/ (() => {
|
|
172
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
173
|
+
/******/ __webpack_require__.n = (module) => {
|
|
174
|
+
/******/ var getter = module && module.__esModule ?
|
|
175
|
+
/******/ () => (module['default']) :
|
|
176
|
+
/******/ () => (module);
|
|
177
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
178
|
+
/******/ return getter;
|
|
179
|
+
/******/ };
|
|
180
|
+
/******/ })();
|
|
181
|
+
/******/
|
|
182
|
+
/******/ /* webpack/runtime/define property getters */
|
|
183
|
+
/******/ (() => {
|
|
184
|
+
/******/ // define getter functions for harmony exports
|
|
185
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
186
|
+
/******/ for(var key in definition) {
|
|
187
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
188
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
189
|
+
/******/ }
|
|
190
|
+
/******/ }
|
|
191
|
+
/******/ };
|
|
192
|
+
/******/ })();
|
|
193
|
+
/******/
|
|
194
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
195
|
+
/******/ (() => {
|
|
196
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
197
|
+
/******/ })();
|
|
198
|
+
/******/
|
|
199
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
200
|
+
/******/ (() => {
|
|
201
|
+
/******/ // define __esModule on exports
|
|
202
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
203
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
204
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
205
|
+
/******/ }
|
|
206
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
207
|
+
/******/ };
|
|
208
|
+
/******/ })();
|
|
209
|
+
/******/
|
|
210
|
+
/******/ /* webpack/runtime/nonce */
|
|
211
|
+
/******/ (() => {
|
|
212
|
+
/******/ __webpack_require__.nc = undefined;
|
|
213
|
+
/******/ })();
|
|
214
|
+
/******/
|
|
215
|
+
/************************************************************************/
|
|
216
|
+
/******/
|
|
217
|
+
/******/ // startup
|
|
218
|
+
/******/ // Load entry module and return exports
|
|
219
|
+
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
220
|
+
/******/ var __webpack_exports__ = __webpack_require__("./src/Index.tsx");
|
|
221
|
+
/******/
|
|
222
|
+
/******/ return __webpack_exports__;
|
|
223
|
+
/******/ })()
|
|
224
|
+
;
|
|
225
|
+
});
|