yootd 0.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/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/Preview/assets/phonebg.png +0 -0
- package/dist/Preview/components/icons/AdaptIcon.d.ts +3 -0
- package/dist/Preview/components/icons/AdaptIcon.js +60 -0
- package/dist/Preview/components/icons/MagnifyIcon.d.ts +3 -0
- package/dist/Preview/components/icons/MagnifyIcon.js +40 -0
- package/dist/Preview/components/icons/ResetIcon.d.ts +3 -0
- package/dist/Preview/components/icons/ResetIcon.js +66 -0
- package/dist/Preview/components/icons/ShrinkIcon.d.ts +3 -0
- package/dist/Preview/components/icons/ShrinkIcon.js +40 -0
- package/dist/Preview/components/preview/phone.d.ts +7 -0
- package/dist/Preview/components/preview/phone.js +10 -0
- package/dist/Preview/components/preview/phone.scss +8 -0
- package/dist/Preview/components/preview/web.d.ts +6 -0
- package/dist/Preview/components/preview/web.js +10 -0
- package/dist/Preview/components/reactflow/Controls.d.ts +5 -0
- package/dist/Preview/components/reactflow/Controls.js +69 -0
- package/dist/Preview/components/reactflow/TopPreview.d.ts +5 -0
- package/dist/Preview/components/reactflow/TopPreview.js +28 -0
- package/dist/Preview/index.d.ts +5 -0
- package/dist/Preview/index.js +94 -0
- package/dist/Preview/index.scss +35 -0
- package/dist/Preview/types/type.d.ts +21 -0
- package/dist/affix/index.d.ts +3 -0
- package/dist/affix/index.js +2 -0
- package/dist/alert/index.d.ts +5 -0
- package/dist/alert/index.js +2 -0
- package/dist/anchor/index.d.ts +10 -0
- package/dist/anchor/index.js +18 -0
- package/dist/anchor/index.scss +23 -0
- package/dist/app/index.d.ts +5 -0
- package/dist/app/index.js +2 -0
- package/dist/approval-process/components/Avatar.d.ts +3 -0
- package/dist/approval-process/components/Avatar.js +100 -0
- package/dist/approval-process/components/BackOut.d.ts +3 -0
- package/dist/approval-process/components/BackOut.js +35 -0
- package/dist/approval-process/components/Failed.d.ts +3 -0
- package/dist/approval-process/components/Failed.js +37 -0
- package/dist/approval-process/components/Pending.d.ts +3 -0
- package/dist/approval-process/components/Pending.js +51 -0
- package/dist/approval-process/components/StartIcon.d.ts +3 -0
- package/dist/approval-process/components/StartIcon.js +35 -0
- package/dist/approval-process/components/Success.d.ts +3 -0
- package/dist/approval-process/components/Success.js +35 -0
- package/dist/approval-process/index.d.ts +7 -0
- package/dist/approval-process/index.js +96 -0
- package/dist/approval-process/index.scss +95 -0
- package/dist/areas/index.d.ts +4 -0
- package/dist/areas/index.js +317 -0
- package/dist/areas/index.scss +21 -0
- package/dist/areas/types/types.d.ts +39 -0
- package/dist/aside/components/AddBtnIcon.d.ts +3 -0
- package/dist/aside/components/AddBtnIcon.js +27 -0
- package/dist/aside/components/DelBtnIcon.d.ts +3 -0
- package/dist/aside/components/DelBtnIcon.js +33 -0
- package/dist/aside/components/DragBtnIcon.d.ts +3 -0
- package/dist/aside/components/DragBtnIcon.js +26 -0
- package/dist/aside/components/EditBtnIcon.d.ts +3 -0
- package/dist/aside/components/EditBtnIcon.js +33 -0
- package/dist/aside/components/SortableItem.d.ts +5 -0
- package/dist/aside/components/SortableItem.js +125 -0
- package/dist/aside/components/SortableItem.scss +93 -0
- package/dist/aside/index.d.ts +4 -0
- package/dist/aside/index.js +186 -0
- package/dist/aside/index.scss +25 -0
- package/dist/aside/types/types.d.ts +44 -0
- package/dist/auto-complete/index.d.ts +4 -0
- package/dist/auto-complete/index.js +2 -0
- package/dist/avatar/index.d.ts +3 -0
- package/dist/avatar/index.js +2 -0
- package/dist/badge/index.d.ts +11 -0
- package/dist/badge/index.js +21 -0
- package/dist/badge/index.scss +5 -0
- package/dist/breadcrumb/index.d.ts +9 -0
- package/dist/breadcrumb/index.js +10 -0
- package/dist/business-tree/components/dept.d.ts +4 -0
- package/dist/business-tree/components/dept.js +35 -0
- package/dist/business-tree/components/space.d.ts +4 -0
- package/dist/business-tree/components/space.js +48 -0
- package/dist/business-tree/index.d.ts +3 -0
- package/dist/business-tree/index.js +16 -0
- package/dist/button/index.d.ts +13 -0
- package/dist/button/index.js +54 -0
- package/dist/button/index.scss +31 -0
- package/dist/calendar/index.d.ts +3 -0
- package/dist/calendar/index.js +2 -0
- package/dist/card/index.d.ts +3 -0
- package/dist/card/index.js +2 -0
- package/dist/carousel/index.d.ts +3 -0
- package/dist/carousel/index.js +2 -0
- package/dist/cascader/index.d.ts +11 -0
- package/dist/cascader/index.js +23 -0
- package/dist/cascader/index.scss +5 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/checkbox/index.js +13 -0
- package/dist/collapse/index.d.ts +3 -0
- package/dist/collapse/index.js +2 -0
- package/dist/color-picker/index.d.ts +6 -0
- package/dist/color-picker/index.js +2 -0
- package/dist/config-provider/context.d.ts +8 -0
- package/dist/config-provider/context.js +2 -0
- package/dist/config-provider/index.d.ts +24 -0
- package/dist/config-provider/index.js +34 -0
- package/dist/date-interval/index.d.ts +16 -0
- package/dist/date-interval/index.js +82 -0
- package/dist/date-picker/index.d.ts +3 -0
- package/dist/date-picker/index.js +2 -0
- package/dist/date-range/index.d.ts +16 -0
- package/dist/date-range/index.js +83 -0
- package/dist/description/index.d.ts +3 -0
- package/dist/description/index.js +2 -0
- package/dist/dictionary/index.d.ts +6 -0
- package/dist/dictionary/index.js +45 -0
- package/dist/dictionary/types/types.d.ts +14 -0
- package/dist/divider/index.d.ts +4 -0
- package/dist/divider/index.js +5 -0
- package/dist/drawer/index.d.ts +3 -0
- package/dist/drawer/index.js +2 -0
- package/dist/drawer-modal/components/CloseOutlined.d.ts +7 -0
- package/dist/drawer-modal/components/CloseOutlined.js +23 -0
- package/dist/drawer-modal/index.d.ts +6 -0
- package/dist/drawer-modal/index.js +37 -0
- package/dist/drawer-modal/index.scss +39 -0
- package/dist/drawer-modal/types/types.d.ts +3 -0
- package/dist/dropdown/assets/arrow-down.svg +6 -0
- package/dist/dropdown/index.d.ts +9 -0
- package/dist/dropdown/index.js +7 -0
- package/dist/empty/assets/404.png +0 -0
- package/dist/empty/assets/empty-content.png +0 -0
- package/dist/empty/assets/empty-data.png +0 -0
- package/dist/empty/assets/image-error.png +0 -0
- package/dist/empty/assets/net-error.png +0 -0
- package/dist/empty/assets/no-collect.png +0 -0
- package/dist/empty/assets/no-news.png +0 -0
- package/dist/empty/assets/no-notice.png +0 -0
- package/dist/empty/assets/no-schedule.png +0 -0
- package/dist/empty/assets/no-search-data.png +0 -0
- package/dist/empty/assets/submit-fail.png +0 -0
- package/dist/empty/assets/submit-success.png +0 -0
- package/dist/empty/index.d.ts +12 -0
- package/dist/empty/index.js +131 -0
- package/dist/empty/index.scss +15 -0
- package/dist/flex/index.d.ts +4 -0
- package/dist/flex/index.js +5 -0
- package/dist/float-button/index.d.ts +9 -0
- package/dist/float-button/index.js +10 -0
- package/dist/form/index.d.ts +3 -0
- package/dist/form/index.js +2 -0
- package/dist/grid/index.d.ts +6 -0
- package/dist/grid/index.js +8 -0
- package/dist/group-title/index.d.ts +7 -0
- package/dist/group-title/index.js +21 -0
- package/dist/group-title/index.scss +31 -0
- package/dist/hooks/useAssets.d.ts +1 -0
- package/dist/hooks/useAssets.js +11 -0
- package/dist/hooks/useBem.d.ts +15 -0
- package/dist/hooks/useBem.js +80 -0
- package/dist/hooks/useRequest.d.ts +1 -0
- package/dist/hooks/useRequest.js +11 -0
- package/dist/image/assets/default.png +0 -0
- package/dist/image/assets/error.png +0 -0
- package/dist/image/assets/eye.png +0 -0
- package/dist/image/index.d.ts +10 -0
- package/dist/image/index.js +95 -0
- package/dist/image/index.scss +27 -0
- package/dist/index.d.ts +156 -0
- package/dist/index.js +85 -0
- package/dist/input/index.d.ts +10 -0
- package/dist/input/index.js +24 -0
- package/dist/input/index.scss +5 -0
- package/dist/input-number/index.d.ts +3 -0
- package/dist/input-number/index.js +2 -0
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.js +2 -0
- package/dist/list/index.d.ts +3 -0
- package/dist/list/index.js +2 -0
- package/dist/mentions/index.d.ts +3 -0
- package/dist/mentions/index.js +2 -0
- package/dist/menu/index.d.ts +9 -0
- package/dist/menu/index.js +12 -0
- package/dist/message/index.d.ts +3 -0
- package/dist/message/index.js +2 -0
- package/dist/modal/components/header-icon.d.ts +3 -0
- package/dist/modal/components/header-icon.js +46 -0
- package/dist/modal/index.d.ts +10 -0
- package/dist/modal/index.js +41 -0
- package/dist/modal/index.scss +65 -0
- package/dist/notification/index.d.ts +3 -0
- package/dist/notification/index.js +2 -0
- package/dist/pagination/index.d.ts +5 -0
- package/dist/pagination/index.js +22 -0
- package/dist/pagination/index.scss +47 -0
- package/dist/pop-confirm/index.d.ts +3 -0
- package/dist/pop-confirm/index.js +2 -0
- package/dist/popover/index.d.ts +5 -0
- package/dist/popover/index.js +2 -0
- package/dist/progress/index.d.ts +3 -0
- package/dist/progress/index.js +2 -0
- package/dist/qrcode/index.d.ts +3 -0
- package/dist/qrcode/index.js +2 -0
- package/dist/radio/index.d.ts +4 -0
- package/dist/radio/index.js +3 -0
- package/dist/rate/index.d.ts +3 -0
- package/dist/rate/index.js +2 -0
- package/dist/result/index.d.ts +2 -0
- package/dist/result/index.js +2 -0
- package/dist/school/index.d.ts +4 -0
- package/dist/school/index.js +304 -0
- package/dist/school/index.scss +21 -0
- package/dist/school/types/types.d.ts +84 -0
- package/dist/segmented/index.d.ts +3 -0
- package/dist/segmented/index.js +2 -0
- package/dist/select/index.d.ts +3 -0
- package/dist/select/index.js +2 -0
- package/dist/skeleton/index.d.ts +9 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/slider/index.d.ts +3 -0
- package/dist/slider/index.js +2 -0
- package/dist/space/index.d.ts +6 -0
- package/dist/space/index.js +2 -0
- package/dist/spin/index.d.ts +2 -0
- package/dist/spin/index.js +2 -0
- package/dist/splitter/index.d.ts +6 -0
- package/dist/splitter/index.js +2 -0
- package/dist/state/index.d.ts +8 -0
- package/dist/state/index.js +28 -0
- package/dist/state/index.scss +89 -0
- package/dist/statistic/index.d.ts +2 -0
- package/dist/statistic/index.js +2 -0
- package/dist/steps/index.d.ts +10 -0
- package/dist/steps/index.js +18 -0
- package/dist/steps/index.scss +32 -0
- package/dist/switch/index.d.ts +3 -0
- package/dist/switch/index.js +2 -0
- package/dist/table/components/icons/DownOutlined.d.ts +3 -0
- package/dist/table/components/icons/DownOutlined.js +28 -0
- package/dist/table/components/icons/DragHandler.d.ts +3 -0
- package/dist/table/components/icons/DragHandler.js +24 -0
- package/dist/table/components/icons/SettingFilled.d.ts +3 -0
- package/dist/table/components/icons/SettingFilled.js +22 -0
- package/dist/table/components/icons/UpOutlined.d.ts +3 -0
- package/dist/table/components/icons/UpOutlined.js +28 -0
- package/dist/table/components/primary-header-row/index.d.ts +3 -0
- package/dist/table/components/primary-header-row/index.js +130 -0
- package/dist/table/components/primary-header-row/index.scss +58 -0
- package/dist/table/components/primary-tbody-row/index.d.ts +3 -0
- package/dist/table/components/primary-tbody-row/index.js +40 -0
- package/dist/table/components/primary-tbody-row/index.scss +5 -0
- package/dist/table/index.d.ts +41 -0
- package/dist/table/index.js +146 -0
- package/dist/table/index.module.scss +9 -0
- package/dist/table/index.scss +33 -0
- package/dist/tabs/index.d.ts +12 -0
- package/dist/tabs/index.js +108 -0
- package/dist/tabs/index.scss +50 -0
- package/dist/tag/index.d.ts +2 -0
- package/dist/tag/index.js +2 -0
- package/dist/teacher/index.d.ts +3 -0
- package/dist/teacher/index.js +59 -0
- package/dist/teacher/types/types.d.ts +31 -0
- package/dist/time-picker/index.d.ts +3 -0
- package/dist/time-picker/index.js +2 -0
- package/dist/timeline/index.d.ts +5 -0
- package/dist/timeline/index.js +2 -0
- package/dist/tooltip/index.d.ts +5 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tour/index.d.ts +5 -0
- package/dist/tour/index.js +2 -0
- package/dist/transfer/index.d.ts +3 -0
- package/dist/transfer/index.js +2 -0
- package/dist/tree/components/BedIcon.d.ts +3 -0
- package/dist/tree/components/BedIcon.js +29 -0
- package/dist/tree/components/CampusIcon.d.ts +3 -0
- package/dist/tree/components/CampusIcon.js +30 -0
- package/dist/tree/components/DeptIcon.d.ts +3 -0
- package/dist/tree/components/DeptIcon.js +32 -0
- package/dist/tree/components/FloorIcon.d.ts +3 -0
- package/dist/tree/components/FloorIcon.js +32 -0
- package/dist/tree/components/RoomIcon.d.ts +3 -0
- package/dist/tree/components/RoomIcon.js +32 -0
- package/dist/tree/components/SchoolIcon.d.ts +3 -0
- package/dist/tree/components/SchoolIcon.js +70 -0
- package/dist/tree/components/TierlIcon.d.ts +3 -0
- package/dist/tree/components/TierlIcon.js +39 -0
- package/dist/tree/index.d.ts +27 -0
- package/dist/tree/index.js +207 -0
- package/dist/tree/index.scss +25 -0
- package/dist/tree-select/index.d.ts +3 -0
- package/dist/tree-select/index.js +2 -0
- package/dist/typography/index.d.ts +3 -0
- package/dist/typography/index.js +2 -0
- package/dist/upload/assets/again.png +0 -0
- package/dist/upload/assets/delete.png +0 -0
- package/dist/upload/assets/success.png +0 -0
- package/dist/upload/components/AgainIcon.d.ts +3 -0
- package/dist/upload/components/AgainIcon.js +29 -0
- package/dist/upload/components/DeleteIcon.d.ts +3 -0
- package/dist/upload/components/DeleteIcon.js +28 -0
- package/dist/upload/components/DeleteImage.d.ts +3 -0
- package/dist/upload/components/DeleteImage.js +47 -0
- package/dist/upload/components/SuccessIcon.d.ts +3 -0
- package/dist/upload/components/SuccessIcon.js +28 -0
- package/dist/upload/components/UpLoadIconAdd.d.ts +3 -0
- package/dist/upload/components/UpLoadIconAdd.js +28 -0
- package/dist/upload/components/UploadIcon.d.ts +3 -0
- package/dist/upload/components/UploadIcon.js +36 -0
- package/dist/upload/components/fileUpload.d.ts +13 -0
- package/dist/upload/components/fileUpload.js +258 -0
- package/dist/upload/components/imageUpload.d.ts +13 -0
- package/dist/upload/components/imageUpload.js +243 -0
- package/dist/upload/index.d.ts +20 -0
- package/dist/upload/index.js +16 -0
- package/dist/upload/index.scss +115 -0
- package/dist/user-dropdown/index.d.ts +3 -0
- package/dist/user-dropdown/index.js +101 -0
- package/dist/user-dropdown/types/types.d.ts +44 -0
- package/dist/utils/types.d.ts +7 -0
- package/dist/utils/types.js +1 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.js +12 -0
- package/dist/watermark/index.d.ts +3 -0
- package/dist/watermark/index.js +2 -0
- package/dist/year-options/index.d.ts +11 -0
- package/dist/year-options/index.js +32 -0
- package/dist/year-term/index.d.ts +4 -0
- package/dist/year-term/index.js +169 -0
- package/dist/year-term/index.scss +21 -0
- package/dist/year-term/types/types.d.ts +28 -0
- package/dist/zones/index.d.ts +3 -0
- package/dist/zones/index.js +186 -0
- package/dist/zones/index.module.scss +23 -0
- package/dist/zones/types/types.d.ts +26 -0
- package/package.json +97 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
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); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var DeptIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "18",
|
13
|
+
height: "18",
|
14
|
+
viewBox: "0 0 18 18",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "Group 2817"
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
23
|
+
className: "path-2",
|
24
|
+
id: "Union",
|
25
|
+
fillRule: "evenodd",
|
26
|
+
clipRule: "evenodd",
|
27
|
+
d: "M11 3H7V5H9H11V3ZM9.5 6H11C11.5523 6 12 5.55228 12 5V3C12 2.44772 11.5523 2 11 2H7C6.44772 2 6 2.44772 6 3V5C6 5.55228 6.44772 6 7 6H8.5V8H4C3.72386 8 3.5 8.22386 3.5 8.5V12H3C2.44772 12 2 12.4477 2 13V15C2 15.5523 2.44772 16 3 16H5C5.55228 16 6 15.5523 6 15V13C6 12.4477 5.55228 12 5 12H4.5V9H8.5V12H8C7.44772 12 7 12.4477 7 13V15C7 15.5523 7.44772 16 8 16H10C10.5523 16 11 15.5523 11 15V13C11 12.4477 10.5523 12 10 12H9.5V9H13.5V12H13C12.4477 12 12 12.4477 12 13V15C12 15.5523 12.4477 16 13 16H15C15.5523 16 16 15.5523 16 15V13C16 12.4477 15.5523 12 15 12H14.5V8.5C14.5 8.22386 14.2761 8 14 8H9.5V6ZM14 13H13V15H15V13H14ZM8 15V13H9H10V15H8ZM3 13V15H5V13H4H3Z",
|
28
|
+
fill: "black",
|
29
|
+
fillOpacity: "0.85"
|
30
|
+
})));
|
31
|
+
});
|
32
|
+
DeptIcon.displayName = 'DeptIcon';
|
@@ -0,0 +1,32 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
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); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var FloorIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "18",
|
13
|
+
height: "18",
|
14
|
+
viewBox: "0 0 18 18",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "Group 2814"
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
23
|
+
className: "path-2",
|
24
|
+
id: "Union",
|
25
|
+
fillRule: "evenodd",
|
26
|
+
clipRule: "evenodd",
|
27
|
+
d: "M4 3H10V7V8.16619V15H4V3ZM11 3V7.6L14.5145 9.7087C14.8157 9.88942 15 10.2149 15 10.5662V15H15.5C15.7761 15 16 15.2239 16 15.5C16 15.7761 15.7761 16 15.5 16H15H14H11H10H4H3H2.5C2.22386 16 2 15.7761 2 15.5C2 15.2239 2.22386 15 2.5 15H3V3C3 2.44772 3.44772 2 4 2H10C10.5523 2 11 2.44772 11 3ZM11 15V8.76619L14 10.5662V15H11ZM5.5 5C5.22386 5 5 5.22386 5 5.5C5 5.77614 5.22386 6 5.5 6H8.5C8.77614 6 9 5.77614 9 5.5C9 5.22386 8.77614 5 8.5 5H5.5ZM5.5 8C5.22386 8 5 8.22386 5 8.5C5 8.77614 5.22386 9 5.5 9H8.5C8.77614 9 9 8.77614 9 8.5C9 8.22386 8.77614 8 8.5 8H5.5ZM5 11.5C5 11.2239 5.22386 11 5.5 11H8.5C8.77614 11 9 11.2239 9 11.5C9 11.7761 8.77614 12 8.5 12H5.5C5.22386 12 5 11.7761 5 11.5Z",
|
28
|
+
fill: "black",
|
29
|
+
fillOpacity: "0.85"
|
30
|
+
})));
|
31
|
+
});
|
32
|
+
FloorIcon.displayName = 'FloorIcon';
|
@@ -0,0 +1,32 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
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); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var RoomIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "18",
|
13
|
+
height: "18",
|
14
|
+
viewBox: "0 0 18 18",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "Group 2816"
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
23
|
+
className: "path-2",
|
24
|
+
id: "Union",
|
25
|
+
fillRule: "evenodd",
|
26
|
+
clipRule: "evenodd",
|
27
|
+
d: "M9.36603 3.15743C9.16828 2.94492 8.83173 2.94492 8.63397 3.15743L2.86603 9.3556C2.67791 9.55775 2.36153 9.56913 2.15938 9.38101C1.95723 9.19289 1.94585 8.87651 2.13397 8.67436L7.90192 2.47618C8.49518 1.83867 9.50483 1.83867 10.0981 2.47618L15.866 8.67436C16.0542 8.87651 16.0428 9.19289 15.8406 9.38101C15.6385 9.56913 15.3221 9.55775 15.134 9.3556L9.36603 3.15743ZM4 9.01372C4.27615 9.01372 4.5 9.23758 4.5 9.51372V14.5007C4.5 14.7769 4.72386 15.0007 5 15.0007H6.5V14.9998V11.4998C6.5 10.119 7.61929 8.99976 9 8.99976C10.3807 8.99976 11.5 10.119 11.5 11.4998V14.9998V15.0007H13C13.2761 15.0007 13.5 14.7769 13.5 14.5007V9.51372C13.5 9.23758 13.7239 9.01372 14 9.01372C14.2761 9.01372 14.5 9.23758 14.5 9.51372V14.5007C14.5 15.3291 13.8284 16.0007 13 16.0007H5C4.17158 16.0007 3.5 15.3291 3.5 14.5007V9.51372C3.5 9.23758 3.72386 9.01372 4 9.01372ZM10.5 11.4998V14.9998H7.5V11.4998C7.5 10.6713 8.17157 9.99976 9 9.99976C9.82843 9.99976 10.5 10.6713 10.5 11.4998Z",
|
28
|
+
fill: "black",
|
29
|
+
fillOpacity: "0.85"
|
30
|
+
})));
|
31
|
+
});
|
32
|
+
RoomIcon.displayName = 'RoomIcon';
|
@@ -0,0 +1,70 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
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); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var SchoolIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "18",
|
13
|
+
height: "18",
|
14
|
+
viewBox: "0 0 18 18",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "Group 5182"
|
22
|
+
}, /*#__PURE__*/React.createElement("g", {
|
23
|
+
id: "Group 2812"
|
24
|
+
}, /*#__PURE__*/React.createElement("path", {
|
25
|
+
className: "path-1",
|
26
|
+
id: "Rectangle 19038",
|
27
|
+
d: "M5.75 7.5H3.5C2.94772 7.5 2.5 7.94772 2.5 8.5V14.5H15.5V8.5C15.5 7.94772 15.0523 7.5 14.5 7.5H12.25",
|
28
|
+
stroke: "black",
|
29
|
+
strokeOpacity: "0.85"
|
30
|
+
}), /*#__PURE__*/React.createElement("path", {
|
31
|
+
className: "path-2",
|
32
|
+
id: "Rectangle 19040 (Stroke)",
|
33
|
+
fillRule: "evenodd",
|
34
|
+
clipRule: "evenodd",
|
35
|
+
d: "M12 13.9968V6.57382C12 6.265 11.8582 5.9734 11.6156 5.78329L9.61564 4.21583C9.25387 3.93229 8.74613 3.93229 8.38436 4.21582L6.38436 5.78329C6.14178 5.9734 6 6.26501 6 6.57382V13.9968H12ZM5.76871 4.99276C5.28355 5.37299 5 5.9562 5 6.57382V15H13V6.57382C13 5.9562 12.7164 5.37299 12.2313 4.99276L10.2313 3.4253C9.50774 2.85823 8.49226 2.85823 7.76871 3.4253L5.76871 4.99276Z",
|
36
|
+
fill: "black",
|
37
|
+
fillOpacity: "0.85"
|
38
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
39
|
+
className: "rect-1",
|
40
|
+
id: "Rectangle 19039",
|
41
|
+
x: "1",
|
42
|
+
y: "14",
|
43
|
+
width: "16",
|
44
|
+
height: "1",
|
45
|
+
rx: "0.5",
|
46
|
+
fill: "black",
|
47
|
+
fillOpacity: "0.85"
|
48
|
+
}), /*#__PURE__*/React.createElement("path", {
|
49
|
+
className: "path-1",
|
50
|
+
id: "Vector 1577",
|
51
|
+
d: "M7.5 7H10.5",
|
52
|
+
stroke: "black",
|
53
|
+
strokeOpacity: "0.85",
|
54
|
+
strokeLinecap: "round"
|
55
|
+
}), /*#__PURE__*/React.createElement("path", {
|
56
|
+
className: "path-1",
|
57
|
+
id: "Vector 1578",
|
58
|
+
d: "M7.5 9H10.5",
|
59
|
+
stroke: "black",
|
60
|
+
strokeOpacity: "0.85",
|
61
|
+
strokeLinecap: "round"
|
62
|
+
}), /*#__PURE__*/React.createElement("path", {
|
63
|
+
className: "path-1",
|
64
|
+
id: "Rectangle 19042",
|
65
|
+
d: "M10.5 13V14.5H7.5V13C7.5 12.1716 8.17157 11.5 9 11.5C9.82843 11.5 10.5 12.1716 10.5 13Z",
|
66
|
+
stroke: "black",
|
67
|
+
strokeOpacity: "0.85"
|
68
|
+
}))));
|
69
|
+
});
|
70
|
+
SchoolIcon.displayName = 'SchoolIcon';
|
@@ -0,0 +1,39 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
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); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var TierlIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "18",
|
13
|
+
height: "18",
|
14
|
+
viewBox: "0 0 18 18",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "Group 2815"
|
22
|
+
}, /*#__PURE__*/React.createElement("g", {
|
23
|
+
id: "Union"
|
24
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
25
|
+
id: "path-1-inside-1_585_3373",
|
26
|
+
fill: "white"
|
27
|
+
}, /*#__PURE__*/React.createElement("path", {
|
28
|
+
fillRule: "evenodd",
|
29
|
+
clipRule: "evenodd",
|
30
|
+
d: "M4.5 2H2V5.5V9V12.5V16H16V13.5C16 12.9477 15.5523 12.5 15 12.5H12.5V10C12.5 9.44772 12.0523 9 11.5 9H9V6.5C9 5.94772 8.55228 5.5 8 5.5H5.5V3C5.5 2.44772 5.05228 2 4.5 2Z"
|
31
|
+
})), /*#__PURE__*/React.createElement("path", {
|
32
|
+
className: "path-2",
|
33
|
+
d: "M2 2V1H1V2H2ZM2 16H1V17H2V16ZM16 16V17H17V16H16ZM12.5 12.5H11.5V13.5H12.5V12.5ZM9 9H8V10H9V9ZM5.5 5.5H4.5V6.5H5.5V5.5ZM2 3H4.5V1H2V3ZM3 5.5V2H1V5.5H3ZM3 9V5.5H1V9H3ZM3 12.5V9H1V12.5H3ZM1 12.5V16H3V12.5H1ZM2 17H16V15H2V17ZM17 16V13.5H15V16H17ZM17 13.5C17 12.3954 16.1046 11.5 15 11.5V13.5H17ZM15 11.5H12.5V13.5H15V11.5ZM11.5 10V12.5H13.5V10H11.5ZM11.5 10H13.5C13.5 8.89543 12.6046 8 11.5 8V10ZM9 10H11.5V8H9V10ZM8 6.5V9H10V6.5H8ZM8 6.5H10C10 5.39543 9.10457 4.5 8 4.5V6.5ZM5.5 6.5H8V4.5H5.5V6.5ZM4.5 3V5.5H6.5V3H4.5ZM4.5 3H6.5C6.5 1.89543 5.60457 1 4.5 1V3Z",
|
34
|
+
fill: "black",
|
35
|
+
fillOpacity: "0.85",
|
36
|
+
mask: "url(#path-1-inside-1_585_3373)"
|
37
|
+
}))));
|
38
|
+
});
|
39
|
+
TierlIcon.displayName = 'TierlIcon';
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { TreeDataNode as AntTreeDataNode, TreeProps as AntTreeProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
import './index.scss';
|
4
|
+
export type { AntTreeNode, AntTreeNodeCheckedEvent, AntTreeNodeExpandedEvent, AntTreeNodeMouseEvent, AntTreeNodeProps, AntTreeNodeSelectedEvent, AntdTreeNodeAttribute, DirectoryTreeExpandAction, DirectoryTreeProps, EventDataNode, } from 'antd/es/tree';
|
5
|
+
export type TreeProps = AntTreeProps & {
|
6
|
+
showChildNumbers?: boolean;
|
7
|
+
placeholder?: string;
|
8
|
+
showSearch?: boolean;
|
9
|
+
type?: string;
|
10
|
+
depth?: number;
|
11
|
+
notRequireSchool?: boolean;
|
12
|
+
areaType?: number;
|
13
|
+
areaSubType?: number;
|
14
|
+
requireLastLevel?: boolean;
|
15
|
+
};
|
16
|
+
export type TreeDataNode = AntTreeDataNode;
|
17
|
+
export declare const Tree: React.ForwardRefExoticComponent<AntTreeProps<AntTreeDataNode> & {
|
18
|
+
showChildNumbers?: boolean | undefined;
|
19
|
+
placeholder?: string | undefined;
|
20
|
+
showSearch?: boolean | undefined;
|
21
|
+
type?: string | undefined;
|
22
|
+
depth?: number | undefined;
|
23
|
+
notRequireSchool?: boolean | undefined;
|
24
|
+
areaType?: number | undefined;
|
25
|
+
areaSubType?: number | undefined;
|
26
|
+
requireLastLevel?: boolean | undefined;
|
27
|
+
} & React.RefAttributes<any>>;
|
@@ -0,0 +1,207 @@
|
|
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"];
|
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
|
+
function 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; }
|
5
|
+
function _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; }
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
8
|
+
function _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); }
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
10
|
+
function _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."); }
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
13
|
+
function _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; } }
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
15
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
16
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
17
|
+
import { Tree as AntTree } from 'antd';
|
18
|
+
import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
|
19
|
+
import { Input } from "./..";
|
20
|
+
import "./index.scss";
|
21
|
+
import { useBem } from "../hooks/useBem";
|
22
|
+
import { BedIcon } from "./components/BedIcon";
|
23
|
+
import { CampusIcon } from "./components/CampusIcon";
|
24
|
+
import { DeptIcon } from "./components/DeptIcon";
|
25
|
+
import { FloorIcon } from "./components/FloorIcon";
|
26
|
+
import { RoomIcon } from "./components/RoomIcon";
|
27
|
+
import { SchoolIcon } from "./components/SchoolIcon";
|
28
|
+
import { TierlIcon } from "./components/TierlIcon";
|
29
|
+
var Search = Input.Search;
|
30
|
+
var dataList = [];
|
31
|
+
var generateList = function generateList(data) {
|
32
|
+
for (var i = 0; i < data.length; i++) {
|
33
|
+
var node = data[i];
|
34
|
+
var key = node.key,
|
35
|
+
title = node.title;
|
36
|
+
dataList.push({
|
37
|
+
key: key,
|
38
|
+
title: title
|
39
|
+
});
|
40
|
+
if (node.children) {
|
41
|
+
generateList(node.children);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
};
|
45
|
+
var getParentKey = function getParentKey(key, tree) {
|
46
|
+
var parentKey;
|
47
|
+
for (var i = 0; i < tree.length; i++) {
|
48
|
+
var node = tree[i];
|
49
|
+
if (node.children) {
|
50
|
+
if (node.children.some(function (item) {
|
51
|
+
return item.key === key;
|
52
|
+
})) {
|
53
|
+
parentKey = node.key;
|
54
|
+
} else if (getParentKey(key, node.children)) {
|
55
|
+
parentKey = getParentKey(key, node.children);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
return parentKey;
|
60
|
+
};
|
61
|
+
export var Tree = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
62
|
+
var className = _ref.className,
|
63
|
+
treeData = _ref.treeData,
|
64
|
+
_ref$placeholder = _ref.placeholder,
|
65
|
+
placeholder = _ref$placeholder === void 0 ? '请输入...' : _ref$placeholder,
|
66
|
+
_ref$showChildNumbers = _ref.showChildNumbers,
|
67
|
+
showChildNumbers = _ref$showChildNumbers === void 0 ? false : _ref$showChildNumbers,
|
68
|
+
_ref$showIcon = _ref.showIcon,
|
69
|
+
showIcon = _ref$showIcon === void 0 ? false : _ref$showIcon,
|
70
|
+
_ref$showSearch = _ref.showSearch,
|
71
|
+
showSearch = _ref$showSearch === void 0 ? false : _ref$showSearch,
|
72
|
+
type = _ref.type,
|
73
|
+
titleRender = _ref.titleRender,
|
74
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
75
|
+
var mb = useBem('tree');
|
76
|
+
var _useState = useState([]),
|
77
|
+
_useState2 = _slicedToArray(_useState, 2),
|
78
|
+
expandedKeys = _useState2[0],
|
79
|
+
setExpandedKeys = _useState2[1];
|
80
|
+
var _useState3 = useState(''),
|
81
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
82
|
+
searchValue = _useState4[0],
|
83
|
+
setSearchValue = _useState4[1];
|
84
|
+
var _useState5 = useState(true),
|
85
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
86
|
+
autoExpandParent = _useState6[0],
|
87
|
+
setAutoExpandParent = _useState6[1];
|
88
|
+
var _useState7 = useState([]),
|
89
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
90
|
+
defaultData = _useState8[0],
|
91
|
+
setDefaultData = _useState8[1];
|
92
|
+
var getSpaceIcon = useCallback(function (currentLevel, selected) {
|
93
|
+
var icons = [SchoolIcon, CampusIcon, FloorIcon, TierlIcon, RoomIcon, BedIcon];
|
94
|
+
var IconComponent = icons[currentLevel];
|
95
|
+
return IconComponent ? /*#__PURE__*/React.createElement(IconComponent, {
|
96
|
+
className: "".concat(mb.e('icon'), " ").concat(selected ? mb.is('selected') : '')
|
97
|
+
}) : null;
|
98
|
+
}, []);
|
99
|
+
var getDeptIcon = useCallback(function (selected) {
|
100
|
+
return /*#__PURE__*/React.createElement(DeptIcon, {
|
101
|
+
className: "".concat(mb.e('icon'), " ").concat(selected ? mb.is('selected') : '')
|
102
|
+
});
|
103
|
+
}, []);
|
104
|
+
var formatTreeData = function formatTreeData(treeData) {
|
105
|
+
var currentLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
106
|
+
return treeData === null || treeData === void 0 ? void 0 : treeData.map(function (t) {
|
107
|
+
if (t.children == null) {
|
108
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
109
|
+
icon: function icon(_ref2) {
|
110
|
+
var selected = _ref2.selected;
|
111
|
+
return type === 'dept' ? getDeptIcon(selected) : getSpaceIcon(currentLevel, selected);
|
112
|
+
}
|
113
|
+
});
|
114
|
+
} else {
|
115
|
+
var _t$children;
|
116
|
+
var _title;
|
117
|
+
if (typeof t.title === 'function') {
|
118
|
+
_title = t.title(t);
|
119
|
+
} else {
|
120
|
+
_title = t.title;
|
121
|
+
}
|
122
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
123
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, _title), showChildNumbers ? /*#__PURE__*/React.createElement("span", {
|
124
|
+
style: {
|
125
|
+
marginLeft: 10
|
126
|
+
}
|
127
|
+
}, "(", (_t$children = t.children) === null || _t$children === void 0 ? void 0 : _t$children.length, ")") : null),
|
128
|
+
icon: function icon(_ref3) {
|
129
|
+
var selected = _ref3.selected;
|
130
|
+
return type === 'dept' ? getDeptIcon(selected) : getSpaceIcon(currentLevel, selected);
|
131
|
+
},
|
132
|
+
children: t.children != null ? formatTreeData(t.children, currentLevel + 1) : []
|
133
|
+
});
|
134
|
+
}
|
135
|
+
});
|
136
|
+
};
|
137
|
+
var onExpand = function onExpand(newExpandedKeys) {
|
138
|
+
setExpandedKeys(newExpandedKeys);
|
139
|
+
setAutoExpandParent(false);
|
140
|
+
};
|
141
|
+
var onChange = function onChange(e) {
|
142
|
+
var value = e.target.value;
|
143
|
+
var newExpandedKeys = dataList.map(function (item) {
|
144
|
+
if (item.title.indexOf(value) > -1) {
|
145
|
+
return getParentKey(item.key, defaultData);
|
146
|
+
}
|
147
|
+
return null;
|
148
|
+
}).filter(function (item, i, self) {
|
149
|
+
return !!(item && self.indexOf(item) === i);
|
150
|
+
});
|
151
|
+
setExpandedKeys(newExpandedKeys);
|
152
|
+
setSearchValue(value);
|
153
|
+
setAutoExpandParent(true);
|
154
|
+
};
|
155
|
+
var _treeData = useMemo(function () {
|
156
|
+
var loop = function loop(data) {
|
157
|
+
return data.map(function (item) {
|
158
|
+
var strTitle = item.title;
|
159
|
+
var index = strTitle.indexOf(searchValue);
|
160
|
+
var beforeStr = strTitle.substring(0, index);
|
161
|
+
var afterStr = strTitle.slice(index + searchValue.length);
|
162
|
+
var title = index > -1 ? /*#__PURE__*/React.createElement("span", {
|
163
|
+
key: item.key
|
164
|
+
}, beforeStr, /*#__PURE__*/React.createElement("span", {
|
165
|
+
style: {
|
166
|
+
color: 'var(--ant-color-primary)'
|
167
|
+
}
|
168
|
+
}, searchValue), afterStr) : /*#__PURE__*/React.createElement("span", {
|
169
|
+
key: item.key
|
170
|
+
}, strTitle);
|
171
|
+
if (item.children) {
|
172
|
+
return {
|
173
|
+
title: title,
|
174
|
+
key: item.key,
|
175
|
+
children: loop(item.children)
|
176
|
+
};
|
177
|
+
}
|
178
|
+
return {
|
179
|
+
title: title,
|
180
|
+
key: item.key
|
181
|
+
};
|
182
|
+
});
|
183
|
+
};
|
184
|
+
return loop(defaultData);
|
185
|
+
}, [searchValue, defaultData]);
|
186
|
+
useEffect(function () {
|
187
|
+
if (treeData != null) {
|
188
|
+
setDefaultData(treeData);
|
189
|
+
generateList(treeData);
|
190
|
+
}
|
191
|
+
}, [treeData]);
|
192
|
+
return /*#__PURE__*/React.createElement("div", null, showSearch ? /*#__PURE__*/React.createElement(Search, {
|
193
|
+
style: {
|
194
|
+
marginBottom: 8
|
195
|
+
},
|
196
|
+
placeholder: placeholder,
|
197
|
+
onChange: onChange
|
198
|
+
}) : null, /*#__PURE__*/React.createElement(AntTree, _extends({
|
199
|
+
ref: ref,
|
200
|
+
onExpand: onExpand,
|
201
|
+
expandedKeys: expandedKeys,
|
202
|
+
autoExpandParent: autoExpandParent,
|
203
|
+
className: "".concat(mb, " ").concat(className),
|
204
|
+
treeData: titleRender ? _treeData : formatTreeData(_treeData),
|
205
|
+
showIcon: showIcon
|
206
|
+
}, props)));
|
207
|
+
});
|
@@ -0,0 +1,25 @@
|
|
1
|
+
.yot-tree {
|
2
|
+
.ant-tree-node-content-wrapper.ant-tree-node-selected {
|
3
|
+
background-color: var(--ant-color-primary-bg);
|
4
|
+
.ant-tree-title {
|
5
|
+
color: var(--ant-color-primary);
|
6
|
+
}
|
7
|
+
}
|
8
|
+
.ant-tree-node-content-wrapper {
|
9
|
+
.ant-tree-title {
|
10
|
+
color: var(--ant-color-text-secondary);
|
11
|
+
}
|
12
|
+
}
|
13
|
+
&__icon {
|
14
|
+
margin-top: 2px;
|
15
|
+
&.yot-is-selected {
|
16
|
+
.path-1 {
|
17
|
+
stroke: var(--ant-color-primary);
|
18
|
+
}
|
19
|
+
.path-2,
|
20
|
+
.rect-1 {
|
21
|
+
fill: var(--ant-color-primary);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
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); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var AgainIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "16",
|
13
|
+
height: "16",
|
14
|
+
viewBox: "0 0 16 16",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "Frame"
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
23
|
+
id: "Vector",
|
24
|
+
d: "M8 1C4.134 1 1 4.134 1 8C1 11.866 4.134 15 8 15C11.866 15 15 11.866 15 8C15 4.134 11.866 1 8 1ZM11.7619 5.46771L11.4317 7.242L11.3743 7.55071C11.3484 7.68943 11.2151 7.781 11.0764 7.75514L10.783 7.70057L8.99143 7.36729C8.85271 7.34143 8.76114 7.20814 8.787 7.06929L8.84443 6.76057C8.87029 6.62186 9.00357 6.53029 9.14229 6.55614L10.027 6.72071C9.36914 5.577 7.92786 5.10971 6.71386 5.68214C5.43586 6.28471 4.88643 7.81471 5.489 9.09271C6.09157 10.3707 7.62157 10.9201 8.89957 10.3176C9.152 10.1986 9.45329 10.3067 9.57229 10.5591C9.69129 10.8116 9.58314 11.1127 9.33071 11.2319C8.62757 11.5634 7.86957 11.6449 7.158 11.5124C6.06629 11.3093 5.08357 10.6027 4.57486 9.52386C3.73457 7.74171 4.50071 5.60829 6.28286 4.76786C7.92843 3.99186 9.87357 4.58586 10.8236 6.08443L10.9659 5.31943C10.9917 5.18071 11.125 5.08914 11.2637 5.115L11.5571 5.16957C11.6961 5.19557 11.7876 5.329 11.7619 5.46771Z",
|
25
|
+
fill: "black",
|
26
|
+
fillOpacity: "0.45"
|
27
|
+
})));
|
28
|
+
});
|
29
|
+
AgainIcon.displayName = 'AgainIcon';
|
@@ -0,0 +1,28 @@
|
|
1
|
+
var _excluded = ["style", "className"];
|
2
|
+
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); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
import React, { forwardRef } from 'react';
|
6
|
+
export var DeleteIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
7
|
+
var style = _ref.style,
|
8
|
+
className = _ref.className,
|
9
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
10
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
11
|
+
ref: ref,
|
12
|
+
width: "16",
|
13
|
+
height: "16",
|
14
|
+
viewBox: "0 0 16 16",
|
15
|
+
fill: "none",
|
16
|
+
xmlns: "http://www.w3.org/2000/svg"
|
17
|
+
}, rest, {
|
18
|
+
style: style,
|
19
|
+
className: className
|
20
|
+
}), /*#__PURE__*/React.createElement("g", {
|
21
|
+
id: "Frame"
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
23
|
+
id: "Vector",
|
24
|
+
d: "M5.62533 2.87533H5.5C5.53324 2.87533 5.56512 2.86213 5.58862 2.83862C5.61213 2.81512 5.62533 2.78324 5.62533 2.75V2.87533H10.3747V2.75C10.3747 2.81867 10.4313 2.87533 10.5 2.87533H10.3747V4H11.5V2.75C11.5 2.19867 11.0513 1.75 10.5 1.75H5.5C4.94867 1.75 4.5 2.19867 4.5 2.75V4H5.62533V2.87467V2.87533ZM13.5 4H2.5C2.36739 4 2.24021 4.05268 2.14645 4.14645C2.05268 4.24021 2 4.36739 2 4.5V5C2 5.06867 2.056 5.12533 2.12533 5.12533H3.06867L3.45467 13.2967C3.48 13.83 3.92 14.25 4.45333 14.25H11.5467C12.0813 14.25 12.52 13.8313 12.5453 13.2967L12.9313 5.12467H13.8753C13.9083 5.12449 13.94 5.1113 13.9633 5.08796C13.9866 5.06462 13.9998 5.03301 14 5V4.5C14 4.36739 13.9473 4.24021 13.8536 4.14645C13.7598 4.05268 13.6326 4 13.5 4ZM11.4267 13.1253H4.57333L4.19533 5.12533H11.8047L11.4267 13.1253Z",
|
25
|
+
fill: "white"
|
26
|
+
})));
|
27
|
+
});
|
28
|
+
DeleteIcon.displayName = 'DeleteIcon';
|