@cloud-app-dev/vidc 2.0.0-alpha.0 → 2.0.0-alpha.12
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/.umirc.ts +2 -3
- package/es/Api/index.d.ts +3 -4
- package/es/Api/index.js +7 -8
- package/es/AppContext/index.js +7 -1
- package/es/AppRedirect/index.css +0 -0
- package/es/AppRedirect/index.d.ts +16 -0
- package/es/AppRedirect/index.js +34 -0
- package/es/AppRoute/index.d.ts +10 -0
- package/es/AppRoute/index.js +115 -0
- package/es/AppRoute/interface.d.ts +8 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/Auth/index.js +17 -0
- package/es/AutoExit/index.js +12 -9
- package/es/Box/BetweenBox/index.css +5 -0
- package/es/Box/BetweenBox/index.d.ts +12 -0
- package/es/Box/BetweenBox/index.js +24 -0
- package/es/Box/InfoBox/index.css +23 -0
- package/es/Box/InfoBox/index.d.ts +12 -0
- package/es/Box/InfoBox/index.js +26 -0
- package/es/Box/TwoColumnBox/index.css +77 -0
- package/es/Box/TwoColumnBox/index.d.ts +10 -0
- package/es/Box/TwoColumnBox/index.js +50 -0
- package/es/Box/deps/content-grid.d.ts +9 -0
- package/es/Box/deps/content-grid.js +9 -0
- package/es/Box/deps/grid-factory.d.ts +10 -0
- package/es/Box/deps/grid-factory.js +72 -0
- package/es/Box/deps/simple-grid.d.ts +9 -0
- package/es/Box/deps/simple-grid.js +8 -0
- package/es/Box/index.css +9 -0
- package/es/Box/index.d.ts +14 -0
- package/es/Box/index.js +28 -0
- package/es/CheckGroupFixed/index.css +49 -0
- package/es/CheckGroupFixed/index.d.ts +17 -0
- package/es/CheckGroupFixed/index.js +148 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/index.js +80 -0
- package/es/Config/interface.d.ts +64 -0
- package/es/Config/utils.d.ts +2 -0
- package/es/Config/utils.js +43 -0
- package/es/ConfigContext/index.d.ts +9 -0
- package/es/ConfigContext/index.js +3 -0
- package/es/DeviceIcon/icon.js +5 -5
- package/es/DeviceIcon/index.js +2 -2
- package/es/DeviceSelect/TreeType.d.ts +6 -0
- package/es/DeviceSelect/TreeType.js +36 -0
- package/es/DeviceSelect/demo.js +2 -2
- package/es/DeviceSelect/index.css +6 -1
- package/es/DeviceSelect/index.d.ts +5 -0
- package/es/DeviceSelect/index.js +22 -53
- package/es/Dict/cache.d.ts +3 -0
- package/es/Dict/cache.js +21 -0
- package/es/Dict/desc.d.ts +64 -0
- package/es/Dict/desc.js +162 -0
- package/es/Dict/device.d.ts +28 -0
- package/es/Dict/device.js +117 -0
- package/es/Dict/hook.d.ts +4 -0
- package/es/Dict/hook.js +114 -0
- package/es/Dict/index.d.ts +13 -0
- package/es/Dict/index.js +14 -0
- package/es/Dict/interface.d.ts +16 -0
- package/es/Dict/utils.d.ts +11 -0
- package/es/Dict/utils.js +51 -0
- package/es/Drag/DragAndDropItem.d.ts +4 -0
- package/es/Drag/DragAndDropItem.js +145 -0
- package/es/Drag/DropItem.d.ts +4 -0
- package/es/Drag/DropItem.js +54 -0
- package/es/Drag/index.css +0 -0
- package/es/Drag/index.d.ts +7 -0
- package/es/Drag/index.js +7 -0
- package/es/Drag/interface.d.ts +16 -0
- package/es/Drawer/Demo.d.ts +3 -0
- package/es/Drawer/Demo.js +52 -0
- package/es/Drawer/Footer.d.ts +4 -0
- package/es/Drawer/Footer.js +26 -0
- package/es/Drawer/index.css +39 -0
- package/es/Drawer/index.d.ts +12 -0
- package/es/Drawer/index.js +41 -0
- package/es/Drawer/interface.d.ts +191 -0
- package/es/FullScreen/index.css +16 -0
- package/es/FullScreen/index.d.ts +10 -0
- package/es/FullScreen/index.js +68 -0
- package/es/HightLevel/index.css +3 -0
- package/es/HightLevel/index.d.ts +9 -0
- package/es/HightLevel/index.js +23 -0
- package/es/IconFont/index.d.ts +12 -0
- package/es/IconFont/index.js +57 -0
- package/es/ImageView/index.css +6 -0
- package/es/ImageView/index.d.ts +17 -0
- package/es/ImageView/index.js +58 -0
- package/es/InitialConfig/index.d.ts +5 -7
- package/es/InitialConfig/index.js +16 -51
- package/es/InitialConfig/utils.d.ts +15 -0
- package/es/InitialConfig/utils.js +36 -324
- package/es/InitialRequest/index.d.ts +5 -11
- package/es/InitialRequest/index.js +57 -66
- package/es/InitialRequest/utils.d.ts +9 -0
- package/es/InitialRequest/utils.js +56 -631
- package/es/Input/index.css +8 -0
- package/es/Input/index.d.ts +18 -0
- package/es/Input/index.js +76 -0
- package/es/LabelValue/index.css +18 -0
- package/es/LabelValue/index.d.ts +23 -0
- package/es/LabelValue/index.js +32 -0
- package/es/{DynamicDeviceList → List}/CheckExt.d.ts +0 -0
- package/es/{DynamicDeviceList → List}/CheckExt.js +4 -4
- package/es/List/DeviceList/index.css +0 -0
- package/es/List/DeviceList/index.d.ts +11 -0
- package/es/{DeviceList → List/DeviceList}/index.js +8 -20
- package/es/{DynamicDeviceList → List/DynamicDeviceList}/Demo.d.ts +0 -0
- package/es/List/DynamicDeviceList/Demo.js +54 -0
- package/es/{DynamicDeviceList → List/DynamicDeviceList}/index.css +5 -17
- package/es/List/DynamicDeviceList/index.d.ts +11 -0
- package/es/List/DynamicDeviceList/index.js +205 -0
- package/es/List/DynamicDeviceList/interface.d.ts +37 -0
- package/es/List/DynamicDeviceList/utils.d.ts +16 -0
- package/es/List/DynamicDeviceList/utils.js +61 -0
- package/es/List/DynamicGridList/Demo.d.ts +2 -0
- package/es/List/DynamicGridList/Demo.js +70 -0
- package/es/List/DynamicGridList/index.d.ts +26 -0
- package/es/List/DynamicGridList/index.js +73 -0
- package/es/List/GridList/Demo.d.ts +2 -0
- package/es/List/GridList/Demo.js +91 -0
- package/es/List/GridList/hook.d.ts +13 -0
- package/es/List/GridList/hook.js +301 -0
- package/es/List/GridList/index.css +7 -0
- package/es/List/GridList/index.d.ts +15 -0
- package/es/List/GridList/index.js +47 -0
- package/es/List/GridList/interface.d.ts +59 -0
- package/es/List/GridList/utils.d.ts +9 -0
- package/es/List/GridList/utils.js +43 -0
- package/es/List/ListExt/index.css +3 -0
- package/es/List/ListExt/index.d.ts +19 -0
- package/es/List/ListExt/index.js +44 -0
- package/es/List/VList/index.css +6 -0
- package/es/List/VList/index.d.ts +18 -0
- package/es/List/VList/index.js +51 -0
- package/es/List/VList/utils.d.ts +14 -0
- package/es/List/VList/utils.js +17 -0
- package/es/List/index.css +60 -5
- package/es/List/index.d.ts +10 -13
- package/es/List/index.js +170 -36
- package/es/List/interface.d.ts +87 -0
- package/es/List/renderItem.d.ts +20 -0
- package/es/List/renderItem.js +71 -0
- package/es/LoaderApp/index.css +3 -0
- package/es/LoaderApp/index.d.ts +31 -0
- package/es/LoaderApp/index.js +135 -0
- package/es/LoaderApp/interface.d.ts +6 -0
- package/es/LoaderApp/loader.d.ts +20 -0
- package/es/LoaderApp/loader.js +86 -0
- package/es/LoaderApp/utils.d.ts +13 -0
- package/es/LoaderApp/utils.js +121 -0
- package/es/LoaderScript/index.d.ts +26 -0
- package/es/LoaderScript/index.js +127 -0
- package/es/LoaderScript/interface.d.ts +26 -0
- package/es/LoaderScript/utils.d.ts +12 -0
- package/es/LoaderScript/utils.js +133 -0
- package/es/Modal/index.css +43 -0
- package/es/Modal/index.d.ts +17 -0
- package/es/Modal/index.js +34 -0
- package/es/Modal/interface.d.ts +339 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +7 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +94 -0
- package/es/Picture/component/DefaultRects/index.css +247 -0
- package/es/Picture/component/DefaultRects/index.d.ts +12 -0
- package/es/Picture/component/DefaultRects/index.js +47 -0
- package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
- package/es/Picture/component/DefaultRects/utils.js +11 -0
- package/es/Picture/component/DrawRect/index.css +8 -0
- package/es/Picture/component/DrawRect/index.d.ts +14 -0
- package/es/Picture/component/DrawRect/index.js +41 -0
- package/es/Picture/component/MoveContent/index.css +0 -0
- package/es/Picture/component/MoveContent/index.d.ts +39 -0
- package/es/Picture/component/MoveContent/index.js +240 -0
- package/es/Picture/component/MoveContent/utils.d.ts +4 -0
- package/es/Picture/component/MoveContent/utils.js +19 -0
- package/es/Picture/component/RectMenu/index.css +31 -0
- package/es/Picture/component/RectMenu/index.d.ts +13 -0
- package/es/Picture/component/RectMenu/index.js +81 -0
- package/es/Picture/component/RectMenu/utils.d.ts +12 -0
- package/es/Picture/component/RectMenu/utils.js +22 -0
- package/es/Picture/component/Tools/index.css +42 -0
- package/es/Picture/component/Tools/index.d.ts +13 -0
- package/es/Picture/component/Tools/index.js +83 -0
- package/es/Picture/component/WheelScale/index.d.ts +6 -0
- package/es/Picture/component/WheelScale/index.js +29 -0
- package/es/Picture/dragBound.d.ts +5 -0
- package/es/Picture/dragBound.js +77 -0
- package/es/Picture/index.css +12 -0
- package/es/Picture/index.d.ts +16 -0
- package/es/Picture/index.js +344 -0
- package/es/Picture/interface.d.ts +67 -0
- package/es/Picture/loadCaptureRectImage.d.ts +8 -0
- package/es/Picture/loadCaptureRectImage.js +119 -0
- package/es/Picture/useDraw.d.ts +1 -0
- package/es/Picture/useDraw.js +136 -0
- package/es/Picture/utils.d.ts +22 -0
- package/es/Picture/utils.js +90 -0
- package/es/Progress/index.css +20 -0
- package/es/Progress/index.d.ts +11 -0
- package/es/Progress/index.js +68 -0
- package/es/RefDrawer/index.js +4 -5
- package/es/RefModal/index.js +4 -5
- package/es/Service/http.d.ts +4 -0
- package/es/Service/http.js +129 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/index.js +14 -0
- package/es/Service/interface.d.ts +28 -0
- package/es/Service/logger.d.ts +3 -0
- package/es/Service/logger.js +13 -0
- package/es/Service/middleware.d.ts +5 -0
- package/es/Service/middleware.js +15 -0
- package/es/Service/utils.d.ts +3 -0
- package/es/Service/utils.js +11 -0
- package/es/TableLayout/index.css +4 -0
- package/es/TableLayout/index.d.ts +13 -0
- package/es/TableLayout/index.js +33 -0
- package/es/ThemeAntd/index.css +501 -0
- package/es/ThemeAntd/index.d.ts +7 -0
- package/es/ThemeAntd/index.js +6 -0
- package/es/ThemeAntd/style/button.css +46 -0
- package/es/ThemeAntd/style/checkbox.css +64 -0
- package/es/ThemeAntd/style/form.css +10 -0
- package/es/ThemeAntd/style/input.css +58 -0
- package/es/ThemeAntd/style/pagination.css +44 -0
- package/es/ThemeAntd/style/picker.css +86 -0
- package/es/ThemeAntd/style/popover.css +3 -0
- package/es/ThemeAntd/style/radio.css +71 -0
- package/es/ThemeAntd/style/scrollbar.css +19 -0
- package/es/ThemeAntd/style/select.css +57 -0
- package/es/ThemeAntd/style/table.css +36 -0
- package/es/ThemeAntd/style/tree.css +4 -0
- package/es/{TreeTitle → Title}/index.css +5 -5
- package/es/{TreeTitle → Title}/index.d.ts +2 -2
- package/es/{TreeTitle → Title}/index.js +9 -6
- package/es/{TreeMode → Tree/BaseTree}/demo.d.ts +0 -0
- package/es/Tree/BaseTree/demo.js +69 -0
- package/es/Tree/BaseTree/index.css +64 -0
- package/es/Tree/BaseTree/index.d.ts +24 -0
- package/es/Tree/BaseTree/index.js +83 -0
- package/es/Tree/demo.d.ts +2 -0
- package/es/{TreeMode → Tree}/demo.js +0 -0
- package/es/{TreeMode → Tree}/index.css +1 -1
- package/es/{TreeMode → Tree}/index.d.ts +1 -1
- package/es/{TreeMode → Tree}/index.js +9 -12
- package/es/UserSelect/index.d.ts +3 -3
- package/es/UserSelect/index.js +18 -15
- package/es/WorkerFlow/Form/Condition.js +6 -8
- package/es/WorkerFlow/Form/EmptyUserSet.js +4 -6
- package/es/WorkerFlow/Form/FormAuth.js +3 -3
- package/es/WorkerFlow/Form/GroupList.js +2 -2
- package/es/WorkerFlow/Form/GroupSelect.js +4 -6
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +8 -7
- package/es/WorkerFlow/Form/LevelGroupSelect.js +5 -7
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +4 -6
- package/es/WorkerFlow/Form/UserSelect.js +4 -6
- package/es/WorkerFlow/Form/UserSelectModalContent.js +8 -6
- package/es/WorkerFlow/Form/UserSet.js +3 -3
- package/es/WorkerFlow/Nodes/Add.js +2 -3
- package/es/WorkerFlow/Nodes/AddOption.js +2 -2
- package/es/WorkerFlow/Nodes/Approver.js +2 -2
- package/es/WorkerFlow/Nodes/Condition.js +2 -2
- package/es/WorkerFlow/Nodes/Handle.js +2 -2
- package/es/WorkerFlow/Nodes/Notifier.js +2 -2
- package/es/WorkerFlow/Nodes/TitleElement.js +70 -36
- package/es/WorkerFlow/index.css +9 -3
- package/es/WorkerFlow/index.js +3 -3
- package/es/WorkerFlow/utils.js +2 -2
- package/es/core.d.ts +27 -0
- package/es/index.d.ts +30 -4
- package/es/index.js +30 -4
- package/es/useDrawer/index.d.ts +14 -0
- package/es/useDrawer/index.js +91 -0
- package/es/useHttp/index.d.ts +8 -0
- package/es/useHttp/index.js +78 -0
- package/es/useModal/index.d.ts +14 -0
- package/es/useModal/index.js +93 -0
- package/es/useNavigate/index.css +0 -0
- package/es/useNavigate/index.d.ts +4 -0
- package/es/useNavigate/index.js +14 -0
- package/es/utils.d.ts +11 -0
- package/es/utils.js +68 -1
- package/package.json +10 -8
- package/es/DeviceList/index.css +0 -32
- package/es/DeviceList/index.d.ts +0 -14
- package/es/DynamicDeviceList/Demo.js +0 -17
- package/es/DynamicDeviceList/index.d.ts +0 -35
- package/es/DynamicDeviceList/index.js +0 -224
- package/es/DynamicDeviceList/utils.d.ts +0 -2
- package/es/DynamicDeviceList/utils.js +0 -15
package/.umirc.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { defineConfig } from 'dumi';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
4
|
const token =
|
|
5
|
-
'eyJhbGciOiJIUzI1NiJ9.
|
|
5
|
+
'eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NiIsImV4dCI6MTY0MDQwOTc4NjQ3OCwidWlkIjoiMTAxMDAwMDAwMjQ5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTAzODddLCJ2YWxpZFRpbWUiOm51bGwsIm9wdENlbnRlcklkIjoiMTAwMTAwMDAwMjMzIiwidXNlclR5cGUiOjEwMDcwMiwiaWF0IjoxNjQwMTUwNTg2NDc4fQ.9a8me82dxS_DJ52Ac8eBu1Y2Gigs7mZ6Cm3Rd-tj5Vk';
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
title: '云应用-业务组件库',
|
|
@@ -13,7 +13,6 @@ export default defineConfig({
|
|
|
13
13
|
targets: { chrome: 60 },
|
|
14
14
|
extraBabelPlugins: [
|
|
15
15
|
['import', { libraryName: 'antd', style: true }, 'antd'],
|
|
16
|
-
['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
|
|
17
16
|
['import', { libraryName: '@cloud-app-dev/utils', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'utils'],
|
|
18
17
|
['import', { libraryName: 'ahooks', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'ahooks'],
|
|
19
18
|
['import', { libraryName: '@cloud-app-dev/map', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'map-components'],
|
|
@@ -25,7 +24,7 @@ export default defineConfig({
|
|
|
25
24
|
null, // null 值代表保留约定式生成的导航,只做增量配置
|
|
26
25
|
{
|
|
27
26
|
title: 'GitLab',
|
|
28
|
-
path: 'https://git.topvdn.com/
|
|
27
|
+
path: 'https://git.topvdn.com/cloudapp/vidc',
|
|
29
28
|
},
|
|
30
29
|
],
|
|
31
30
|
alias: {
|
package/es/Api/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { OrgItemType } from '
|
|
2
|
-
import {
|
|
3
|
-
import { BzTreeItemType, PostItemType } from '../core';
|
|
1
|
+
import { BzTreeItemType, PostItemType, OrgItemType } from '../core';
|
|
2
|
+
import { UserInfoType } from '../AppContext/interface';
|
|
4
3
|
declare class Api {
|
|
5
4
|
getOrgs(): Promise<OrgItemType[]>;
|
|
6
|
-
getUsers(organizationId: string, params?: any, filterUserIds?: string[]): Promise<
|
|
5
|
+
getUsers(organizationId: string, params?: any, filterUserIds?: string[]): Promise<UserInfoType[]>;
|
|
7
6
|
getPosts(orgId: string): Promise<PostItemType[]>;
|
|
8
7
|
getDeviceBzTree(): Promise<BzTreeItemType[]>;
|
|
9
8
|
getCustomDeviceGroup(): Promise<BzTreeItemType[]>;
|
package/es/Api/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
2
|
-
|
|
3
1
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
2
|
|
|
5
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -7,6 +5,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
7
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8
6
|
|
|
9
7
|
import { __awaiter } from "tslib";
|
|
8
|
+
import Service from '../Service';
|
|
10
9
|
import { getHeader } from '../utils';
|
|
11
10
|
|
|
12
11
|
var Api = /*#__PURE__*/function () {
|
|
@@ -24,7 +23,7 @@ var Api = /*#__PURE__*/function () {
|
|
|
24
23
|
switch (_context.prev = _context.next) {
|
|
25
24
|
case 0:
|
|
26
25
|
_context.next = 2;
|
|
27
|
-
return
|
|
26
|
+
return Service.$http({
|
|
28
27
|
url: '/api/user/v1/organization/queryChildOrganizationsById',
|
|
29
28
|
method: 'post',
|
|
30
29
|
requestId: 'queryChildOrganizationsById',
|
|
@@ -61,7 +60,7 @@ var Api = /*#__PURE__*/function () {
|
|
|
61
60
|
switch (_context2.prev = _context2.next) {
|
|
62
61
|
case 0:
|
|
63
62
|
_context2.next = 2;
|
|
64
|
-
return
|
|
63
|
+
return Service.$http({
|
|
65
64
|
url: '/api/user/v1/queryUsers',
|
|
66
65
|
method: 'post',
|
|
67
66
|
requestId: 'queryUsers',
|
|
@@ -99,7 +98,7 @@ var Api = /*#__PURE__*/function () {
|
|
|
99
98
|
switch (_context3.prev = _context3.next) {
|
|
100
99
|
case 0:
|
|
101
100
|
_context3.next = 2;
|
|
102
|
-
return
|
|
101
|
+
return Service.$http({
|
|
103
102
|
url: "/api/user/v2/post/queryPostByOrgId/".concat(orgId),
|
|
104
103
|
method: 'post',
|
|
105
104
|
requestId: 'queryPostByOrgId',
|
|
@@ -129,7 +128,7 @@ var Api = /*#__PURE__*/function () {
|
|
|
129
128
|
switch (_context4.prev = _context4.next) {
|
|
130
129
|
case 0:
|
|
131
130
|
_context4.next = 2;
|
|
132
|
-
return
|
|
131
|
+
return Service.$http({
|
|
133
132
|
url: '/api/udm-api/DeviceBuzTree/queryList',
|
|
134
133
|
method: 'post',
|
|
135
134
|
requestId: 'getDeviceBzTree',
|
|
@@ -159,7 +158,7 @@ var Api = /*#__PURE__*/function () {
|
|
|
159
158
|
switch (_context5.prev = _context5.next) {
|
|
160
159
|
case 0:
|
|
161
160
|
_context5.next = 2;
|
|
162
|
-
return
|
|
161
|
+
return Service.$http({
|
|
163
162
|
url: '/api/udm-api/customDeviceGroup/queryList',
|
|
164
163
|
method: 'post',
|
|
165
164
|
requestId: 'customDeviceGroup',
|
|
@@ -189,7 +188,7 @@ var Api = /*#__PURE__*/function () {
|
|
|
189
188
|
switch (_context6.prev = _context6.next) {
|
|
190
189
|
case 0:
|
|
191
190
|
_context6.next = 2;
|
|
192
|
-
return
|
|
191
|
+
return Service.$http({
|
|
193
192
|
url: '/api/place/v1/getPlacesByHasDevice',
|
|
194
193
|
method: 'post',
|
|
195
194
|
requestId: 'getPlacesByHasDevice',
|
package/es/AppContext/index.js
CHANGED
|
@@ -16,7 +16,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
|
|
17
17
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
18
18
|
import Sync from './Sync';
|
|
19
|
-
import
|
|
19
|
+
import * as Static from './static';
|
|
20
|
+
var _USER_SESSION_ = Static._USER_SESSION_,
|
|
21
|
+
_OPERATION_SESSION_ = Static._OPERATION_SESSION_,
|
|
22
|
+
_LOGIN_STATUS_SESSION_ = Static._LOGIN_STATUS_SESSION_,
|
|
23
|
+
_USER_EVENT_CHANGE_ = Static._USER_EVENT_CHANGE_,
|
|
24
|
+
_OPERATION_EVENT_CHANGE_ = Static._OPERATION_EVENT_CHANGE_,
|
|
25
|
+
_LOGIN_STATUS_EVENT_CHANGE_ = Static._LOGIN_STATUS_EVENT_CHANGE_;
|
|
20
26
|
var Context = /*#__PURE__*/React.createContext(null);
|
|
21
27
|
|
|
22
28
|
function Provider(_ref) {
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as H from 'history';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface AppRedirectProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description 匹配路径
|
|
6
|
+
* @default -
|
|
7
|
+
*/
|
|
8
|
+
path?: string | string[];
|
|
9
|
+
/**
|
|
10
|
+
* @description 重定向路径
|
|
11
|
+
* @description -
|
|
12
|
+
*/
|
|
13
|
+
to: H.LocationDescriptor<any>;
|
|
14
|
+
}
|
|
15
|
+
declare function AppRedirect({ path, to }: AppRedirectProps): JSX.Element;
|
|
16
|
+
export default AppRedirect;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useLocation } from 'react-router-dom';
|
|
3
|
+
import useNavigate from '../useNavigate';
|
|
4
|
+
import "./index.css";
|
|
5
|
+
|
|
6
|
+
var getKey = function getKey() {
|
|
7
|
+
return Math.random().toString(36).substr(2);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
function AppRedirect(_ref) {
|
|
11
|
+
var path = _ref.path,
|
|
12
|
+
to = _ref.to;
|
|
13
|
+
var navigate = useNavigate();
|
|
14
|
+
var location = useLocation();
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
if (path === location.pathname) {
|
|
17
|
+
if (typeof to !== 'string') {
|
|
18
|
+
navigate("".concat(to.pathname).concat(to.search ? "".concat(to.search, "&key=").concat(getKey()) : "?key=".concat(getKey())), {
|
|
19
|
+
replace: true,
|
|
20
|
+
state: Object.assign({}, to.state, {
|
|
21
|
+
isReplace: true
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
navigate("".concat(to, "?key").concat(getKey()), {
|
|
26
|
+
replace: true
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, [path, location.pathname, to, history]);
|
|
31
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default AppRedirect;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IAppRouteProps } from './interface';
|
|
3
|
+
declare class AppRoute extends React.PureComponent<IAppRouteProps, any> {
|
|
4
|
+
private isRender;
|
|
5
|
+
constructor(props: IAppRouteProps);
|
|
6
|
+
shouldComponentUpdate(props: IAppRouteProps): boolean;
|
|
7
|
+
componentWillUnmount(): void;
|
|
8
|
+
render(): JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
export default AppRoute;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
4
|
+
import _useUnmount from "ahooks/es/useUnmount";
|
|
5
|
+
import _useMount from "ahooks/es/useMount";
|
|
6
|
+
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
|
|
9
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10
|
+
|
|
11
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12
|
+
|
|
13
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
|
+
|
|
15
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
|
+
|
|
17
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
+
|
|
19
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
+
|
|
21
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
+
|
|
23
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
+
|
|
25
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
+
|
|
27
|
+
import React from 'react';
|
|
28
|
+
import { Route } from 'react-router-dom';
|
|
29
|
+
var _global = window;
|
|
30
|
+
|
|
31
|
+
function RenderSingleRoute(_ref) {
|
|
32
|
+
var onMount = _ref.onMount,
|
|
33
|
+
onUnmount = _ref.onUnmount;
|
|
34
|
+
|
|
35
|
+
_useMount(function () {
|
|
36
|
+
return onMount();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
_useUnmount(function () {
|
|
40
|
+
return onUnmount();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var AppRoute = /*#__PURE__*/function (_React$PureComponent) {
|
|
47
|
+
_inherits(AppRoute, _React$PureComponent);
|
|
48
|
+
|
|
49
|
+
var _super = _createSuper(AppRoute);
|
|
50
|
+
|
|
51
|
+
function AppRoute(props) {
|
|
52
|
+
var _this;
|
|
53
|
+
|
|
54
|
+
_classCallCheck(this, AppRoute);
|
|
55
|
+
|
|
56
|
+
_this = _super.call(this, props); //可能存在路由创建但是没有render 导致UI无法渲染
|
|
57
|
+
|
|
58
|
+
_this.isRender = false;
|
|
59
|
+
_this.state = {
|
|
60
|
+
isMatch: false
|
|
61
|
+
};
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
_createClass(AppRoute, [{
|
|
66
|
+
key: "shouldComponentUpdate",
|
|
67
|
+
value: function shouldComponentUpdate(props) {
|
|
68
|
+
if (!_global._IS_RUN_MICRO_BASIC || !this.isRender || _global._IS_ALLOW_ROUTE_RENDER) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return (props.currentId || _cache.getCache('currentTabKey', 'session')) === props.tabId;
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
key: "componentWillUnmount",
|
|
76
|
+
value: function componentWillUnmount() {
|
|
77
|
+
console.debug('路由销毁');
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
key: "render",
|
|
81
|
+
value: function render() {
|
|
82
|
+
var _this2 = this;
|
|
83
|
+
|
|
84
|
+
var _this$props = this.props,
|
|
85
|
+
element = _this$props.element,
|
|
86
|
+
path = _this$props.path;
|
|
87
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Route, {
|
|
88
|
+
path: path,
|
|
89
|
+
element: /*#__PURE__*/React.createElement(RenderSingleRoute, {
|
|
90
|
+
onMount: function onMount() {
|
|
91
|
+
return _this2.setState({
|
|
92
|
+
isMatch: true
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
onUnmount: function onUnmount() {
|
|
96
|
+
return _this2.setState({
|
|
97
|
+
isMatch: false
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
}), this.state.isMatch && element, /*#__PURE__*/React.createElement(RenderSingleRoute, {
|
|
102
|
+
onMount: function onMount() {
|
|
103
|
+
return _this2.isRender = true;
|
|
104
|
+
},
|
|
105
|
+
onUnmount: function onUnmount() {
|
|
106
|
+
return _this2.isRender = false;
|
|
107
|
+
}
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
|
|
112
|
+
return AppRoute;
|
|
113
|
+
}(React.PureComponent);
|
|
114
|
+
|
|
115
|
+
export default AppRoute;
|
package/es/Auth/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import Config from '../Config';
|
|
3
|
+
|
|
4
|
+
function Auth(_ref) {
|
|
5
|
+
var featureId = _ref.featureId,
|
|
6
|
+
noAuthContent = _ref.noAuthContent,
|
|
7
|
+
children = _ref.children;
|
|
8
|
+
var action = useMemo(function () {
|
|
9
|
+
return !!Config.feature.find(function (v) {
|
|
10
|
+
return v === featureId;
|
|
11
|
+
});
|
|
12
|
+
}, [featureId]); //获取按钮权限
|
|
13
|
+
|
|
14
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !action ? noAuthContent ? noAuthContent : null : children);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default Auth;
|
package/es/AutoExit/index.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import _useMount from "ahooks/es/useMount";
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import useNavigate from '../useNavigate';
|
|
4
|
+
import AppContext from '../AppContext';
|
|
4
5
|
|
|
5
6
|
function AutoExit(_ref) {
|
|
6
7
|
var children = _ref.children;
|
|
7
8
|
|
|
8
|
-
var
|
|
9
|
+
var _useContext = useContext(AppContext.Context),
|
|
10
|
+
loginStatus = _useContext.loginStatus;
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
history.replace('/login');
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
12
|
+
var navigate = useNavigate();
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
_useMount(function () {
|
|
15
|
+
!loginStatus && navigate('/login');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !loginStatus ? children : null);
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
export default AutoExit;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface BetweentBoxProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
extNode?: React.ReactNode;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
left?: React.ReactNode;
|
|
9
|
+
right?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function BetweenBox({ className, left, right, style, children, extNode }: BetweentBoxProps): JSX.Element;
|
|
12
|
+
export default BetweenBox;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import "./index.css";
|
|
3
|
+
|
|
4
|
+
function BetweenBox(_ref) {
|
|
5
|
+
var _ref$className = _ref.className,
|
|
6
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
7
|
+
left = _ref.left,
|
|
8
|
+
right = _ref.right,
|
|
9
|
+
style = _ref.style,
|
|
10
|
+
children = _ref.children,
|
|
11
|
+
extNode = _ref.extNode;
|
|
12
|
+
var title = useMemo(function () {
|
|
13
|
+
return left || children;
|
|
14
|
+
}, [left, children]);
|
|
15
|
+
var other = useMemo(function () {
|
|
16
|
+
return right || extNode;
|
|
17
|
+
}, [right, extNode]);
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "lm-between-box ".concat(className),
|
|
20
|
+
style: style
|
|
21
|
+
}, title && /*#__PURE__*/React.createElement("div", null, title), other && /*#__PURE__*/React.createElement("div", null, other));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default BetweenBox;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.info-box-layout {
|
|
2
|
+
width: 100%;
|
|
3
|
+
margin-bottom: 20px;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
.info-box-layout .info-box-title-wrapper {
|
|
8
|
+
background-color: var(--content-info-box-title-bg);
|
|
9
|
+
border: 1px solid var(--content-info-box-title-bd);
|
|
10
|
+
border-bottom: none;
|
|
11
|
+
height: var(--content-info-box-title-height);
|
|
12
|
+
line-height: var(--content-info-box-title-height);
|
|
13
|
+
min-height: max-content;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
padding: 0 10px;
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
}
|
|
19
|
+
.info-box-layout .info-box-content-wrapper {
|
|
20
|
+
background-color: var(--content-info-box-bg);
|
|
21
|
+
border: 1px solid var(--content-info-box-bd-color);
|
|
22
|
+
flex: 1;
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface InfoBoxProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
titleExt?: React.ReactNode;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
contentStyle?: React.CSSProperties;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function InfoBox({ title, titleExt, children, className, style, contentStyle }: InfoBoxProps): JSX.Element;
|
|
12
|
+
export default InfoBox;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import BetweenBox from '../BetweenBox';
|
|
3
|
+
import "./index.css";
|
|
4
|
+
|
|
5
|
+
function InfoBox(_ref) {
|
|
6
|
+
var title = _ref.title,
|
|
7
|
+
titleExt = _ref.titleExt,
|
|
8
|
+
children = _ref.children,
|
|
9
|
+
_ref$className = _ref.className,
|
|
10
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11
|
+
style = _ref.style,
|
|
12
|
+
contentStyle = _ref.contentStyle;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "info-box-layout ".concat(className),
|
|
15
|
+
style: style
|
|
16
|
+
}, (!!title || !!titleExt) && /*#__PURE__*/React.createElement(BetweenBox, {
|
|
17
|
+
className: "info-box-title-wrapper",
|
|
18
|
+
left: title,
|
|
19
|
+
right: titleExt
|
|
20
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: "info-box-content-wrapper",
|
|
22
|
+
style: contentStyle
|
|
23
|
+
}, children));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default InfoBox;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.two-column-layout-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
color: var(--content-two-column-box-color);
|
|
6
|
+
}
|
|
7
|
+
.two-column-layout-container .two-column-aside {
|
|
8
|
+
transition: width 0.1s ease-in;
|
|
9
|
+
width: var(--sider-size);
|
|
10
|
+
height: 100%;
|
|
11
|
+
z-index: 9;
|
|
12
|
+
position: absolute;
|
|
13
|
+
left: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
16
|
+
}
|
|
17
|
+
.two-column-layout-container .two-column-aside .two-colum-left-wrapper {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
.two-column-layout-container .two-column-aside .two-colum-left-content {
|
|
23
|
+
width: var(--sider-size);
|
|
24
|
+
height: 100%;
|
|
25
|
+
background-color: var(--content-two-column-box-left-bg);
|
|
26
|
+
}
|
|
27
|
+
.two-column-layout-container .two-column-aside .left-aside-slider-btn {
|
|
28
|
+
position: absolute;
|
|
29
|
+
width: 16px;
|
|
30
|
+
height: 20px;
|
|
31
|
+
right: -16px;
|
|
32
|
+
top: 50%;
|
|
33
|
+
margin-top: -8px;
|
|
34
|
+
font-size: var(--fs-large);
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
background-color: red;
|
|
37
|
+
}
|
|
38
|
+
.two-column-layout-container .two-column-aside .left-aside-slider-btn .anticon {
|
|
39
|
+
background: var(--content-two-column-box-left-bg);
|
|
40
|
+
vertical-align: unset;
|
|
41
|
+
position: relative;
|
|
42
|
+
z-index: 3;
|
|
43
|
+
}
|
|
44
|
+
.two-column-layout-container .two-column-aside .left-aside-slider-btn:before,
|
|
45
|
+
.two-column-layout-container .two-column-aside .left-aside-slider-btn:after {
|
|
46
|
+
content: '';
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
z-index: 2;
|
|
50
|
+
background-color: var(--content-two-column-box-left-bg);
|
|
51
|
+
position: absolute;
|
|
52
|
+
}
|
|
53
|
+
.two-column-layout-container .two-column-aside .left-aside-slider-btn:before {
|
|
54
|
+
left: 0;
|
|
55
|
+
bottom: -10px;
|
|
56
|
+
transform: skewY(-20deg);
|
|
57
|
+
}
|
|
58
|
+
.two-column-layout-container .two-column-aside .left-aside-slider-btn:after {
|
|
59
|
+
right: 0;
|
|
60
|
+
top: -10px;
|
|
61
|
+
transform: skewY(20deg);
|
|
62
|
+
}
|
|
63
|
+
.two-column-layout-container .two-column-aside.hide-left-aside {
|
|
64
|
+
width: 0;
|
|
65
|
+
}
|
|
66
|
+
.two-column-layout-container .two-column-aside.hide-left-aside + .two-column-content {
|
|
67
|
+
padding-left: 0;
|
|
68
|
+
}
|
|
69
|
+
.two-column-layout-container .two-column-content {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
padding-left: var(--sider-size);
|
|
74
|
+
background-color: var(--content-two-column-box-right-bg);
|
|
75
|
+
transition: padding-left 0.3s ease-in-out;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface TwoColumnBoxProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
collapsible?: boolean;
|
|
6
|
+
leftContent?: React.ReactNode | JSX.Element;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function TwoColumnBox({ className, collapsible, leftContent, children }: TwoColumnBoxProps): JSX.Element;
|
|
10
|
+
export default TwoColumnBox;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
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."); }
|
|
4
|
+
|
|
5
|
+
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); }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
import IconFont from '../../IconFont';
|
|
15
|
+
import "./index.css";
|
|
16
|
+
|
|
17
|
+
function TwoColumnBox(_ref) {
|
|
18
|
+
var _ref$className = _ref.className,
|
|
19
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
20
|
+
_ref$collapsible = _ref.collapsible,
|
|
21
|
+
collapsible = _ref$collapsible === void 0 ? true : _ref$collapsible,
|
|
22
|
+
leftContent = _ref.leftContent,
|
|
23
|
+
children = _ref.children;
|
|
24
|
+
|
|
25
|
+
var _useState = useState(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
collapsed = _useState2[0],
|
|
28
|
+
setCollapsed = _useState2[1];
|
|
29
|
+
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "two-column-layout-container ".concat(className)
|
|
32
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: "two-column-aside ".concat(collapsed ? 'hide-left-aside' : '')
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "two-colum-left-wrapper"
|
|
36
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "two-colum-left-content"
|
|
38
|
+
}, leftContent, collapsible && /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
onClick: function onClick() {
|
|
40
|
+
return setCollapsed(!collapsed);
|
|
41
|
+
},
|
|
42
|
+
className: "left-aside-slider-btn"
|
|
43
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
44
|
+
type: collapsed ? 'icon-S_Arrow_SmallRight' : 'icon-S_Arrow_SmallLeft'
|
|
45
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "two-column-content"
|
|
47
|
+
}, children));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default TwoColumnBox;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getGridClassName(grid: any): any[];
|
|
2
|
+
export declare function computedGrid(grid: any): {
|
|
3
|
+
xxl: number;
|
|
4
|
+
xl: number;
|
|
5
|
+
lg: number;
|
|
6
|
+
md: number;
|
|
7
|
+
sm: number;
|
|
8
|
+
xs: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function computedCuurentGrid(): "xxl" | "xl" | "lg" | "md" | "sm" | "xs";
|