yootd 0.0.71 → 0.0.72
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/dist/tree/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
function _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); }
|
2
|
-
var _excluded = ["className", "treeData", "placeholder", "showChildNumbers", "showIcon", "showSearch", "type", "titleRender"];
|
2
|
+
var _excluded = ["className", "treeData", "placeholder", "showChildNumbers", "showIcon", "showSearch", "type", "notRequireSchool", "titleRender"];
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
5
5
|
function _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."); }
|
@@ -74,8 +74,10 @@ export var TreeInternal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
74
74
|
_ref$showSearch = _ref.showSearch,
|
75
75
|
showSearch = _ref$showSearch === void 0 ? false : _ref$showSearch,
|
76
76
|
type = _ref.type,
|
77
|
+
notRequireSchool = _ref.notRequireSchool,
|
77
78
|
titleRender = _ref.titleRender,
|
78
79
|
props = _objectWithoutProperties(_ref, _excluded);
|
80
|
+
console.log('props', props);
|
79
81
|
var mb = useBem('tree');
|
80
82
|
var _useState = useState([]),
|
81
83
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -94,7 +96,7 @@ export var TreeInternal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
94
96
|
defaultData = _useState8[0],
|
95
97
|
setDefaultData = _useState8[1];
|
96
98
|
var getSpaceIcon = useCallback(function (currentLevel, selected) {
|
97
|
-
var icons = [SchoolIcon, CampusIcon, FloorIcon, TierlIcon, RoomIcon, BedIcon];
|
99
|
+
var icons = notRequireSchool == true ? [CampusIcon, FloorIcon, TierlIcon, RoomIcon, BedIcon] : [SchoolIcon, CampusIcon, FloorIcon, TierlIcon, RoomIcon, BedIcon];
|
98
100
|
var IconComponent = icons[currentLevel];
|
99
101
|
return IconComponent ? /*#__PURE__*/React.createElement(IconComponent, {
|
100
102
|
className: "".concat(mb.e('icon'), " ").concat(selected ? mb.is('selected') : '')
|