Latest updates from IceHrmPro

This commit is contained in:
Thilina Pituwala
2020-05-20 18:47:29 +02:00
parent 60c92d7935
commit 7453a58aad
18012 changed files with 2089245 additions and 10173 deletions

91
web/node_modules/rc-tabs/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,91 @@
# History
----
## 10.1.0 / 2020-03-17
* Add `keyboard` prop.
* `extraContent` don't trigger keyboard navigate now.
* Remove `prop-types` and clean up dependencies.
## 9.6.0 / 2019-01-16
* ScrollableInkTabBar support render props to customize TabNode
## 9.4.0 / 2018-08-13
* Add `prevIcon` and `nextIcon`.
## 9.3.0 / 2018-06-12
* Add MouseEvent as second parameter to `onTabClick`.
## 9.2.0 / 2018-01-01
* Add `tabBarGutter`.
* Fix #84
## 9.1.2 / 2017-08-15
* Fix responsive.
* Improve scroll to active animation.
## 9.1.0 / 2017-08-13
* Support add data-* to Tabs dom.
## 9.0.0 / 2017-08-04
* Refactor extraContent dom structure.
## 7.1.0 / 2016-12-06
- support animatedWithMargin
## 7.0.0 / 2016-08-29
- modularize tabBar and tabContent
## 6.0.0 / 2016-08-20
- support allowInkBar/allowScrollBar prop
## 5.9.0 / 2016-04-26
- use transform instead of left/top
## 5.5.0 / 2015-11-11
- add destroyInactiveTabPane prop to destroy inactive tab pane when change tab
## 5.4.0 / 2015-10-20
- support add/tabBarExtraContent
- only support react 0.14+
- remove bootstrap css
## 5.3.0 / 2015-07-23
use rc-animate
## 5.2.0 / 2015-07-06
support tabPosition
## 5.1.0 / 2015-06-10
change effect props to animation
## 5.0.0 / 2015-04-30
`new` [#3](https://github.com/react-component/tabs/issues/3) support slide effect
## 3.3.0 / 2015-04-30
`improved` [#6](https://github.com/react-component/tabs/issues/6) support defaultActiveFirst
## 3.2.0 / 2015-04-20
`improved` [#4](https://github.com/react-component/tabs/issues/4) lazy render on initial render and update

9
web/node_modules/rc-tabs/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,9 @@
The MIT License (MIT)
Copyright (c) 2014-present yiminghe
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

449
web/node_modules/rc-tabs/README.md generated vendored Normal file
View File

@@ -0,0 +1,449 @@
# rc-tabs
---
React Tabs
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![gemnasium deps][gemnasium-image]][gemnasium-url]
[![npm download][download-image]][download-url]
[npm-image]: http://img.shields.io/npm/v/rc-tabs.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-tabs
[travis-image]: https://img.shields.io/travis/react-component/tabs.svg?style=flat-square
[travis-url]: https://travis-ci.org/react-component/tabs
[coveralls-image]: https://img.shields.io/coveralls/react-component/tabs.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/react-component/tabs?branch=master
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/tabs.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/react-component/tabs
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/rc-tabs.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-tabs
## Screenshot
<img src='https://zos.alipayobjects.com/rmsportal/JwLASrsOYJuFRIt.png' width='408'>
## Example
http://localhost:8000/examples
online example: http://react-component.github.io/tabs/
## install
[![rc-tabs](https://nodei.co/npm/rc-tabs.png)](https://npmjs.org/package/rc-tabs)
## Feature
### Keyboard
- left and up: switch to previous tab
- right and down: switch to next tab
## Usage
```js
import Tabs, { TabPane } from "rc-tabs";
import TabContent from "rc-tabs/lib/TabContent";
import ScrollableInkTabBar from "rc-tabs/lib/ScrollableInkTabBar";
var callback = function(key) {};
React.render(
<Tabs defaultActiveKey="2" onChange={callback} renderTabBar={() => <ScrollableInkTabBar />} renderTabContent={() => <TabContent />}>
<TabPane tab="tab 1" key="1">
first
</TabPane>
<TabPane tab="tab 2" key="2">
second
</TabPane>
<TabPane tab="tab 3" key="3">
third
</TabPane>
</Tabs>,
document.getElementById("t2")
);
```
### Usage of navWrapper() function
navWrapper() prop allows to wrap tabs bar in a component to provide additional features.
Eg with react-sortablejs to make tabs sortable by DnD :
```js
import Sortable from 'react-sortablejs';
navWrapper={(content) => <Sortable>{content}</Sortable>}
```
## API
### Tabs
#### props:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>activeKey</td>
<td>String</td>
<th></th>
<td>current active tabPanel's key</td>
</tr>
<tr>
<td>tabBarPosition</td>
<td>String</td>
<th></th>
<td>tab nav 's position. one of ['left','right','top','bottom']</td>
</tr>
<tr>
<td>defaultActiveKey</td>
<td>String</td>
<th>first active tabPanel's key</th>
<td>initial active tabPanel's key if activeKey is absent</td>
</tr>
<tr>
<td>renderTabBar</td>
<td>():React.Node</td>
<th></th>
<td>How to render tab bar</td>
</tr>
<tr>
<td>renderTabContent</td>
<td>():React.Node</td>
<th></th>
<td>How to render tab content</td>
</tr>
<tr>
<td>navWrapper</td>
<td>(tabContent: React.Node):React.Node</td>
<th></th>
<td>Wrapper function that will wrap around tab panes, whould be useful for features such as drag and drop</td>
</tr>
<tr>
<td>onChange</td>
<td>(key: string): void</td>
<th></th>
<td>called when tabPanel is changed</td>
</tr>
<tr>
<td>destroyInactiveTabPane</td>
<td>Boolean</td>
<th>false</th>
<td>whether destroy inactive tabpane when change tab</td>
</tr>
<tr>
<td>prefixCls</td>
<td>String</td>
<th>rc-tabs</th>
<td>prefix class name, use to custom style</td>
</tr>
<tr>
<td>direction</td>
<td>String</td>
<th>ltr</th>
<td>Layout direction of tabs component, it supports RTL direction too.</td>
</tr>
</tbody>
</table>
### TabPane
#### props:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>key</td>
<td>Object</td>
<th></th>
<td>corresponding to activeKey, should be unique</td>
</tr>
<tr>
<td>style</td>
<td>Object</td>
<th></th>
<td></td>
</tr>
<tr>
<td>placeholder</td>
<td>React.Node</td>
<th></th>
<td>lazyrender children</td>
</tr>
<tr>
<td>tab</td>
<td>React.Node</td>
<th></th>
<td>current tab's title corresponding to current tabPane</td>
</tr>
<tr>
<td>forceRender</td>
<td>Boolean</td>
<td>false</td>
<td>forced render of content in tabs, not lazy render after clicking on tabs</td>
</tr>
</tbody>
</table>
### lib/TabBar
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>onTabClick</td>
<td>(key: string, event: MouseEvent): void</td>
<th></th>
<td>callback when tab clicked</td>
</tr>
<tr>
<td>style</td>
<td></td>
<th></th>
<td>bar style</td>
</tr>
<tr>
<td>extraContent</td>
<td>React Node</td>
<th></th>
<td>extra content placed one the right of tab bar</td>
</tr>
<tr>
<td>tabBarGutter</td>
<td>number</td>
<th></th>
<td>the gap between tabs</td>
</tr>
<tr>
<td>keyboard</td>
<td>boolean</td>
<th>true</th>
<td>whether support keyboard to navigate tabs</td>
</tr>
</tbody>
</table>
### lib/InkTabBar
tab bar with ink indicator, in addition to tab bar props, extra props:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>styles</td>
<td>{ inkBar }</td>
<th></th>
<td>can set inkBar style</td>
</tr>
</tbody>
</table>
### lib/ScrollableTabBar
scrollable tab bar, in addition to tab bar props, extra props:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>onPrevClick</td>
<td>(e: Event): void</td>
<th></th>
<td>callback when prev button is clicked</td>
</tr>
<tr>
<td>onNextClick</td>
<td>(e: Event): void</td>
<th></th>
<td>callback when next button is clicked</td>
</tr>
<tr>
<td>prevIcon</td>
<td>ReactNode</td>
<th></th>
<td>specific the prev icon</td>
</tr>
<tr>
<td>nextIcon</td>
<td>ReactNode</td>
<th></th>
<td>specific the next icon</td>
</tr>
</tbody>
</table>
### lib/ScrollableInkTabBar
scrollable tab bar with ink indicator, same with tab bar and ink bar and scrollable bar props.
| name | type | default | description |
| -------- | -------------- | ------- | ---------------------- |
| children | (node) => node | - | Customize tab bar node |
### lib/SwipeableInkTabBar (Use for Mobile)
swipeable tab bar with ink indicator, same with tab bar/ink bar props, and below is the additional props.
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>pageSize</td>
<td>number</td>
<th>5</th>
<td>show how many tabs at one page</td>
</tr>
<tr>
<td>speed</td>
<td>number</td>
<th>5</th>
<td>swipe speed, 1 to 10, more bigger more faster</td>
</tr>
<tr>
<td>hammerOptions</td>
<td>Object</td>
<td></td>
<td>options for react-hammerjs</td>
</tr>
</tbody>
</table>
### lib/TabContent
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>style</td>
<td>Object</td>
<td></td>
<td>tab content style</td>
</tr>
<tr>
<td>animated</td>
<td>Boolean</td>
<td>true</td>
<td>whether tabpane change with animation</td>
</tr>
<tr>
<td>animatedWithMargin</td>
<td>Boolean</td>
<td>false</td>
<td>whether animate tabpane with css margin</td>
</tr>
</tbody>
</table>
### lib/SwipeableTabContent
swipeable tab panes, in addition to lib/TabContent props, extra props:
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>hammerOptions</td>
<td>Object</td>
<td></td>
<td>options for react-hammerjs</td>
</tr>
</tbody>
</table>
## Note
If you want to support old browsers(which does not support flex/css-transition),
please load the following script inside head to add no-flexbox/no-csstransition css classes
```
https://as.alipayobjects.com/g/component/modernizr/2.8.3/modernizr.min.js
```
## Development
```
npm install
npm start
```
## Test Case
```
npm test
npm run chrome-test
```
## Coverage
```
npm run coverage
```
open coverage/ dir
## License
rc-tabs is released under the MIT license.

508
web/node_modules/rc-tabs/assets/index.css generated vendored Normal file
View File

@@ -0,0 +1,508 @@
.rc-tabs {
box-sizing: border-box;
position: relative;
overflow: hidden;
}
.rc-tabs-bar,
.rc-tabs-nav-container {
font-size: 14px;
line-height: 1.5;
box-sizing: border-box;
overflow: hidden;
position: relative;
white-space: nowrap;
outline: none;
zoom: 1;
transition: padding 0.45s;
}
.rc-tabs-ink-bar {
z-index: 1;
position: absolute;
box-sizing: border-box;
margin-top: -3px;
background-color: #108ee9;
transform-origin: 0 0;
width: 0;
height: 0;
}
.rc-tabs-ink-bar-animated {
transition: transform 0.3s cubic-bezier(0.35, 0, 0.25, 1), left 0.3s cubic-bezier(0.35, 0, 0.25, 1), top 0.3s cubic-bezier(0.35, 0, 0.25, 1), height 0.3s cubic-bezier(0.35, 0, 0.25, 1), width 0.3s cubic-bezier(0.35, 0, 0.25, 1);
}
.rc-tabs-tab-prev,
.rc-tabs-tab-next {
user-select: none;
z-index: 1;
line-height: 36px;
cursor: pointer;
border: none;
background-color: transparent;
position: absolute;
}
.rc-tabs-tab-prev-icon,
.rc-tabs-tab-next-icon {
position: relative;
display: inline-block;
font-style: normal;
font-weight: normal;
font-variant: normal;
line-height: inherit;
vertical-align: baseline;
text-align: center;
text-transform: none;
font-smoothing: antialiased;
text-stroke-width: 0;
font-family: sans-serif;
}
.rc-tabs-tab-prev-icon:before,
.rc-tabs-tab-next-icon:before {
display: block;
}
.rc-tabs-tab-btn-disabled {
cursor: default;
color: #ccc;
}
.rc-tabs-nav-wrap {
overflow: hidden;
}
.rc-tabs-nav {
box-sizing: border-box;
padding-left: 0;
position: relative;
margin: 0;
float: left;
list-style: none;
display: inline-block;
transform-origin: 0 0;
}
.rc-tabs-nav-animated {
transition: transform 0.5s cubic-bezier(0.35, 0, 0.25, 1);
}
.rc-tabs-nav:before,
.rc-tabs-nav:after {
display: table;
content: " ";
}
.rc-tabs-nav:after {
clear: both;
}
.rc-tabs-rtl .rc-tabs-nav {
float: right;
}
.rc-tabs-tab {
box-sizing: border-box;
position: relative;
display: block;
transition: color 0.3s cubic-bezier(0.35, 0, 0.25, 1);
padding: 8px 20px;
font-weight: 500;
cursor: pointer;
}
.rc-tabs-tab:hover {
color: #23c0fa;
}
.rc-tabs-tab-active,
.rc-tabs-tab-active:hover {
color: #108ee9;
cursor: default;
transform: translateZ(0);
}
.rc-tabs-tab-disabled {
cursor: default;
color: #ccc;
}
.rc-tabs-tab-disabled:hover {
color: #ccc;
}
.rc-tabs-content {
zoom: 1;
}
.rc-tabs-content .rc-tabs-tabpane {
overflow: auto;
}
.rc-tabs-content-animated {
transition: transform 0.3s cubic-bezier(0.35, 0, 0.25, 1), margin-left 0.3s cubic-bezier(0.35, 0, 0.25, 1), margin-top 0.3s cubic-bezier(0.35, 0, 0.25, 1);
display: flex;
will-change: transform;
}
.rc-tabs-content-animated .rc-tabs-tabpane {
flex-shrink: 0;
}
.no-flexbox .rc-tabs-content {
transform: none !important;
overflow: auto;
}
.no-csstransitions .rc-tabs-tabpane-inactive,
.no-flexbox .rc-tabs-tabpane-inactive,
.rc-tabs-content-no-animated .rc-tabs-tabpane-inactive {
display: none;
}
.rc-tabs-rtl {
direction: rtl;
}
.rc-tabs-left {
border-right: 2px solid #f3f3f3;
}
.rc-tabs-left .rc-tabs-bar {
float: left;
height: 100%;
margin-right: 10px;
border-right: 1px solid #f3f3f3;
}
.rc-tabs-left .rc-tabs-nav-container {
height: 100%;
}
.rc-tabs-left .rc-tabs-nav-container-scrolling {
padding-top: 32px;
padding-bottom: 32px;
}
.rc-tabs-left .rc-tabs-nav-wrap {
height: 100%;
}
.rc-tabs-left .rc-tabs-content-animated {
flex-direction: column;
}
.rc-tabs-left .rc-tabs-content-animated .rc-tabs-tabpane {
height: 100%;
}
.rc-tabs-left .rc-tabs-nav-scroll {
height: 99999px;
}
.rc-tabs-left .rc-tabs-nav-swipe {
position: relative;
top: 0;
}
.rc-tabs-left .rc-tabs-nav-swipe .rc-tabs-nav {
display: flex;
flex: 1;
flex-direction: column;
height: 100%;
}
.rc-tabs-left .rc-tabs-nav-swipe .rc-tabs-nav .rc-tabs-tab {
display: flex;
flex-shrink: 0;
justify-content: center;
}
.rc-tabs-left .rc-tabs-tab-prev,
.rc-tabs-left .rc-tabs-tab-next {
margin-top: -2px;
height: 0;
line-height: 32px;
width: 0;
display: block;
text-align: center;
opacity: 0;
transition: width 0.3s, height 0.3s, opacity 0.3s;
}
.rc-tabs-top .rc-tabs-tab-arrow-show,
.rc-tabs-left .rc-tabs-tab-arrow-show,
.rc-tabs-bottom .rc-tabs-tab-arrow-show,
.rc-tabs-right .rc-tabs-tab-arrow-show {
opacity: 1;
width: 100%;
height: 32px;
}
.rc-tabs-left .rc-tabs-tab-next {
bottom: 0;
}
.rc-tabs-left .rc-tabs-tab-next-icon {
transform: rotate(90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
}
.rc-tabs-left .rc-tabs-tab-next-icon:before {
content: ">";
}
.rc-tabs-left .rc-tabs-tab-prev {
top: 2px;
}
.rc-tabs-left .rc-tabs-tab-prev-icon {
transform: rotate(270deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
.rc-tabs-left .rc-tabs-tab-prev-icon:before {
content: ">";
}
.rc-tabs-left .rc-tabs-ink-bar {
width: 2px;
right: 0;
top: 0;
}
.rc-tabs-left .rc-tabs-tab {
padding: 16px 24px;
}
.rc-tabs-right {
border-left: 2px solid #f3f3f3;
}
.rc-tabs-right .rc-tabs-bar {
float: right;
height: 100%;
margin-left: 10px;
border-left: 1px solid #f3f3f3;
}
.rc-tabs-right .rc-tabs-nav-container {
height: 100%;
}
.rc-tabs-right .rc-tabs-nav-container-scrolling {
padding-top: 32px;
padding-bottom: 32px;
}
.rc-tabs-right .rc-tabs-nav-wrap {
height: 100%;
}
.rc-tabs-right .rc-tabs-nav-scroll {
height: 99999px;
}
.rc-tabs-right .rc-tabs-nav-swipe {
position: relative;
}
.rc-tabs-right .rc-tabs-nav-swipe .rc-tabs-nav {
display: flex;
flex: 1;
flex-direction: column;
height: 100%;
}
.rc-tabs-right .rc-tabs-nav-swipe .rc-tabs-nav .rc-tabs-tab {
display: flex;
flex-shrink: 0;
justify-content: center;
}
.rc-tabs-right .rc-tabs-tab-prev,
.rc-tabs-right .rc-tabs-tab-next {
margin-top: -2px;
height: 0;
width: 0;
display: block;
text-align: center;
line-height: 32px;
opacity: 0;
transition: width 0.3s, height 0.3s, opacity 0.3s;
}
.rc-tabs-top .rc-tabs-tab-arrow-show {
opacity: 1;
width: 100%;
height: 32px;
}
.rc-tabs-right .rc-tabs-tab-next {
bottom: 0;
}
.rc-tabs-right .rc-tabs-tab-next-icon {
transform: rotate(90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
}
.rc-tabs-right .rc-tabs-tab-next-icon:before {
content: ">";
}
.rc-tabs-right .rc-tabs-tab-prev {
top: 2px;
}
.rc-tabs-right .rc-tabs-tab-prev-icon {
transform: rotate(270deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
.rc-tabs-right .rc-tabs-tab-prev-icon:before {
content: ">";
}
.rc-tabs-right .rc-tabs-content-animated {
flex-direction: column;
}
.rc-tabs-right .rc-tabs-content-animated .rc-tabs-tabpane {
height: 100%;
}
.rc-tabs-right .rc-tabs-ink-bar {
width: 2px;
left: 0;
top: 0;
}
.rc-tabs-right .rc-tabs-tab {
padding: 16px 24px;
}
.rc-tabs-bottom {
border-top: 2px solid #f3f3f3;
}
.rc-tabs-bottom .rc-tabs-content {
width: 100%;
}
.rc-tabs-bottom .rc-tabs-bar {
border-top: 1px solid #f3f3f3;
}
.rc-tabs-bottom .rc-tabs-nav-container-scrolling {
padding-left: 32px;
padding-right: 32px;
}
.rc-tabs-bottom .rc-tabs-nav-scroll {
width: 99999px;
}
.rc-tabs-bottom .rc-tabs-nav-swipe {
position: relative;
left: 0;
}
.rc-tabs-bottom .rc-tabs-nav-swipe .rc-tabs-nav {
display: flex;
flex: 1;
width: 100%;
}
.rc-tabs-bottom .rc-tabs-nav-swipe .rc-tabs-nav .rc-tabs-tab {
display: flex;
flex-shrink: 0;
margin-right: 0;
padding: 8px 0;
justify-content: center;
}
.rc-tabs-bottom .rc-tabs-nav-wrap {
width: 100%;
}
.rc-tabs-bottom .rc-tabs-content-animated {
flex-direction: row;
}
.rc-tabs-bottom .rc-tabs-content-animated .rc-tabs-tabpane {
width: 100%;
}
.rc-tabs-bottom .rc-tabs-tab-next {
right: 2px;
}
.rc-tabs-bottom .rc-tabs-tab-next-icon:before {
content: ">";
}
.rc-tabs-bottom.rc-tabs-rtl .rc-tabs-tab-next {
left: 2px;
right: auto;
}
.rc-tabs-bottom .rc-tabs-tab-prev {
left: 0;
}
.rc-tabs-bottom .rc-tabs-tab-prev-icon:before {
content: "<";
}
.rc-tabs-bottom.rc-tabs-rtl .rc-tabs-tab-prev {
right: 0;
left: auto;
}
.rc-tabs-bottom .rc-tabs-tab-prev,
.rc-tabs-bottom .rc-tabs-tab-next {
margin-right: -2px;
width: 32px;
height: 100%;
top: 0;
text-align: center;
}
.rc-tabs-bottom .rc-tabs-ink-bar {
height: 2px;
top: 3px;
left: 0;
}
.rc-tabs-bottom.rc-tabs-rtl .rc-tabs-ink-bar {
right: 0;
left: auto;
}
.rc-tabs-bottom .rc-tabs-tab {
float: left;
height: 100%;
margin-right: 30px;
}
.rc-tabs-bottom.rc-tabs-rtl .rc-tabs-tab {
float: right;
margin-left: 30px;
margin-right: 0;
}
.rc-tabs-bottom .rc-tabs-tabpane-inactive {
height: 0;
overflow: visible;
}
.rc-tabs-top {
border-bottom: 2px solid #f3f3f3;
}
.rc-tabs-top .rc-tabs-content {
width: 100%;
}
.rc-tabs-top .rc-tabs-bar {
border-bottom: 1px solid #f3f3f3;
}
.rc-tabs-top .rc-tabs-nav-container-scrolling {
padding-left: 32px;
padding-right: 32px;
}
.rc-tabs-top .rc-tabs-nav-scroll {
width: 99999px;
}
.rc-tabs-top .rc-tabs-nav-swipe {
position: relative;
left: 0;
}
.rc-tabs-top .rc-tabs-nav-swipe .rc-tabs-nav {
display: flex;
flex: 1;
width: 100%;
}
.rc-tabs-top .rc-tabs-nav-swipe .rc-tabs-nav .rc-tabs-tab {
display: flex;
flex-shrink: 0;
margin-right: 0;
padding: 8px 0;
justify-content: center;
}
.rc-tabs-top .rc-tabs-nav-wrap {
width: 100%;
}
.rc-tabs-top .rc-tabs-content-animated {
flex-direction: row;
}
.rc-tabs-top .rc-tabs-content-animated .rc-tabs-tabpane {
width: 100%;
}
.rc-tabs-top .rc-tabs-tab-next {
right: 2px;
}
.rc-tabs-top .rc-tabs-tab-next-icon:before {
content: ">";
}
.rc-tabs-top.rc-tabs-rtl .rc-tabs-tab-next {
left: 2px;
right: auto;
}
.rc-tabs-top .rc-tabs-tab-prev {
left: 0;
}
.rc-tabs-top .rc-tabs-tab-prev-icon:before {
content: "<";
}
.rc-tabs-top.rc-tabs-rtl .rc-tabs-tab-prev {
right: 0;
left: auto;
}
.rc-tabs-top .rc-tabs-tab-prev,
.rc-tabs-top .rc-tabs-tab-next {
margin-right: -2px;
width: 0;
height: 0;
top: 0;
text-align: center;
opacity: 0;
transition: width 0.3s, height 0.3s, opacity 0.3s;
}
.rc-tabs-top .rc-tabs-tab-arrow-show {
opacity: 1;
width: 32px;
height: 100%;
}
.rc-tabs-top .rc-tabs-ink-bar {
height: 2px;
bottom: 0;
left: 0;
}
.rc-tabs-top.rc-tabs-rtl .rc-tabs-ink-bar {
right: 0;
left: auto;
}
.rc-tabs-top .rc-tabs-tab {
float: left;
height: 100%;
margin-right: 30px;
}
.rc-tabs-top.rc-tabs-rtl .rc-tabs-tab {
float: right;
margin-left: 30px;
margin-right: 0;
}
.rc-tabs-top .rc-tabs-tabpane-inactive {
height: 0;
overflow: visible;
}

63
web/node_modules/rc-tabs/es/InkTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,63 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
import InkTabBarNode from './InkTabBarNode';
import TabBarTabsNode from './TabBarTabsNode';
import TabBarRootNode from './TabBarRootNode';
import SaveRef from './SaveRef';
var InkTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(InkTabBar, _React$Component);
function InkTabBar() {
_classCallCheck(this, InkTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(InkTabBar).apply(this, arguments));
}
_createClass(InkTabBar, [{
key: "render",
value: function render() {
var _this = this;
return React.createElement(SaveRef, null, function (saveRef, getRef) {
return React.createElement(TabBarRootNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), React.createElement(TabBarTabsNode, _extends({
onTabClick: _this.props.onTabClick,
saveRef: saveRef
}, _this.props)), React.createElement(InkTabBarNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props)));
});
}
}]);
return InkTabBar;
}(React.Component);
export { InkTabBar as default };
InkTabBar.defaultProps = {
onTabClick: function onTabClick() {}
};

173
web/node_modules/rc-tabs/es/InkTabBarNode.js generated vendored Normal file
View File

@@ -0,0 +1,173 @@
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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import classnames from 'classnames';
import { setTransform, isTransform3dSupported, getLeft, getStyle, getTop, getActiveIndex } from './utils';
function _componentDidUpdate(component, init) {
var _component$props = component.props,
styles = _component$props.styles,
panels = _component$props.panels,
activeKey = _component$props.activeKey,
direction = _component$props.direction;
var rootNode = component.props.getRef('root');
var wrapNode = component.props.getRef('nav') || rootNode;
var inkBarNode = component.props.getRef('inkBar');
var activeTab = component.props.getRef('activeTab');
var inkBarNodeStyle = inkBarNode.style;
var tabBarPosition = component.props.tabBarPosition;
var activeIndex = getActiveIndex(panels, activeKey);
if (init) {
// prevent mount animation
inkBarNodeStyle.display = 'none';
}
if (activeTab) {
var tabNode = activeTab;
var transformSupported = isTransform3dSupported(inkBarNodeStyle); // Reset current style
setTransform(inkBarNodeStyle, '');
inkBarNodeStyle.width = '';
inkBarNodeStyle.height = '';
inkBarNodeStyle.left = '';
inkBarNodeStyle.top = '';
inkBarNodeStyle.bottom = '';
inkBarNodeStyle.right = '';
if (tabBarPosition === 'top' || tabBarPosition === 'bottom') {
var left = getLeft(tabNode, wrapNode);
var width = tabNode.offsetWidth; // If tabNode'width width equal to wrapNode'width when tabBarPosition is top or bottom
// It means no css working, then ink bar should not have width until css is loaded
// Fix https://github.com/ant-design/ant-design/issues/7564
if (width === rootNode.offsetWidth) {
width = 0;
} else if (styles.inkBar && styles.inkBar.width !== undefined) {
width = parseFloat(styles.inkBar.width, 10);
if (width) {
left += (tabNode.offsetWidth - width) / 2;
}
}
if (direction === 'rtl') {
left = getStyle(tabNode, 'margin-left') - left;
} // use 3d gpu to optimize render
if (transformSupported) {
setTransform(inkBarNodeStyle, "translate3d(".concat(left, "px,0,0)"));
} else {
inkBarNodeStyle.left = "".concat(left, "px");
}
inkBarNodeStyle.width = "".concat(width, "px");
} else {
var top = getTop(tabNode, wrapNode, true);
var height = tabNode.offsetHeight;
if (styles.inkBar && styles.inkBar.height !== undefined) {
height = parseFloat(styles.inkBar.height, 10);
if (height) {
top += (tabNode.offsetHeight - height) / 2;
}
}
if (transformSupported) {
setTransform(inkBarNodeStyle, "translate3d(0,".concat(top, "px,0)"));
inkBarNodeStyle.top = '0';
} else {
inkBarNodeStyle.top = "".concat(top, "px");
}
inkBarNodeStyle.height = "".concat(height, "px");
}
}
inkBarNodeStyle.display = activeIndex !== -1 ? 'block' : 'none';
}
var InkTabBarNode = /*#__PURE__*/function (_React$Component) {
_inherits(InkTabBarNode, _React$Component);
function InkTabBarNode() {
_classCallCheck(this, InkTabBarNode);
return _possibleConstructorReturn(this, _getPrototypeOf(InkTabBarNode).apply(this, arguments));
}
_createClass(InkTabBarNode, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this = this;
// ref https://github.com/ant-design/ant-design/issues/8678
// ref https://github.com/react-component/tabs/issues/135
// InkTabBarNode need parent/root ref for calculating position
// since parent componentDidMount triggered after child componentDidMount
// we're doing a quick fix here to use setTimeout to calculate position
// after parent/root component mounted
this.timeout = setTimeout(function () {
_componentDidUpdate(_this, true);
}, 0);
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
_componentDidUpdate(this);
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
clearTimeout(this.timeout);
}
}, {
key: "render",
value: function render() {
var _classnames;
var _this$props = this.props,
prefixCls = _this$props.prefixCls,
styles = _this$props.styles,
inkBarAnimated = _this$props.inkBarAnimated;
var className = "".concat(prefixCls, "-ink-bar");
var classes = classnames((_classnames = {}, _defineProperty(_classnames, className, true), _defineProperty(_classnames, inkBarAnimated ? "".concat(className, "-animated") : "".concat(className, "-no-animated"), true), _classnames));
return React.createElement("div", {
style: styles.inkBar,
className: classes,
key: "inkBar",
ref: this.props.saveRef('inkBar')
});
}
}]);
return InkTabBarNode;
}(React.Component);
export { InkTabBarNode as default };
InkTabBarNode.defaultProps = {
prefixCls: '',
inkBarAnimated: true,
styles: {},
saveRef: function saveRef() {}
};

25
web/node_modules/rc-tabs/es/KeyCode.js generated vendored Executable file
View File

@@ -0,0 +1,25 @@
export default {
/**
* LEFT
*/
LEFT: 37,
// also NUM_WEST
/**
* UP
*/
UP: 38,
// also NUM_NORTH
/**
* RIGHT
*/
RIGHT: 39,
// also NUM_EAST
/**
* DOWN
*/
DOWN: 40 // also NUM_SOUTH
};

67
web/node_modules/rc-tabs/es/SaveRef.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
var SaveRef = /*#__PURE__*/function (_React$Component) {
_inherits(SaveRef, _React$Component);
function SaveRef() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, SaveRef);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SaveRef)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.getRef = function (name) {
return _this[name];
};
_this.saveRef = function (name) {
return function (node) {
if (node) {
_this[name] = node;
}
};
};
return _this;
}
_createClass(SaveRef, [{
key: "render",
value: function render() {
return this.props.children(this.saveRef, this.getRef);
}
}]);
return SaveRef;
}(React.Component);
export { SaveRef as default };
SaveRef.defaultProps = {
children: function children() {
return null;
}
};

70
web/node_modules/rc-tabs/es/ScrollableInkTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,70 @@
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); }
function _extends() { _extends = Object.assign || 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); }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
import InkTabBarNode from './InkTabBarNode';
import TabBarTabsNode from './TabBarTabsNode';
import TabBarRootNode from './TabBarRootNode';
import ScrollableTabBarNode from './ScrollableTabBarNode';
import SaveRef from './SaveRef';
var ScrollableInkTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(ScrollableInkTabBar, _React$Component);
function ScrollableInkTabBar() {
_classCallCheck(this, ScrollableInkTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(ScrollableInkTabBar).apply(this, arguments));
}
_createClass(ScrollableInkTabBar, [{
key: "render",
value: function render() {
var _this$props = this.props,
renderTabBarNode = _this$props.children,
restProps = _objectWithoutProperties(_this$props, ["children"]);
return React.createElement(SaveRef, null, function (saveRef, getRef) {
return React.createElement(TabBarRootNode, _extends({
saveRef: saveRef,
getRef: getRef
}, restProps), React.createElement(ScrollableTabBarNode, _extends({
saveRef: saveRef,
getRef: getRef
}, restProps), React.createElement(TabBarTabsNode, _extends({
saveRef: saveRef,
renderTabBarNode: renderTabBarNode
}, restProps)), React.createElement(InkTabBarNode, _extends({
saveRef: saveRef,
getRef: getRef
}, restProps))));
});
}
}]);
return ScrollableInkTabBar;
}(React.Component);
export { ScrollableInkTabBar as default };

59
web/node_modules/rc-tabs/es/ScrollableTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,59 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
import ScrollableTabBarNode from './ScrollableTabBarNode';
import TabBarRootNode from './TabBarRootNode';
import TabBarTabsNode from './TabBarTabsNode';
import SaveRef from './SaveRef';
var ScrollableTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(ScrollableTabBar, _React$Component);
function ScrollableTabBar() {
_classCallCheck(this, ScrollableTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(ScrollableTabBar).apply(this, arguments));
}
_createClass(ScrollableTabBar, [{
key: "render",
value: function render() {
var _this = this;
return React.createElement(SaveRef, null, function (saveRef, getRef) {
return React.createElement(TabBarRootNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), React.createElement(ScrollableTabBarNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), React.createElement(TabBarTabsNode, _extends({
saveRef: saveRef
}, _this.props))));
});
}
}]);
return ScrollableTabBar;
}(React.Component);
export { ScrollableTabBar as default };

389
web/node_modules/rc-tabs/es/ScrollableTabBarNode.js generated vendored Executable file
View File

@@ -0,0 +1,389 @@
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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import classnames from 'classnames';
import debounce from 'lodash/debounce';
import ResizeObserver from 'resize-observer-polyfill';
import { setTransform, isTransform3dSupported } from './utils';
var ScrollableTabBarNode = /*#__PURE__*/function (_React$Component) {
_inherits(ScrollableTabBarNode, _React$Component);
function ScrollableTabBarNode(props) {
var _this;
_classCallCheck(this, ScrollableTabBarNode);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ScrollableTabBarNode).call(this, props));
_this.prevTransitionEnd = function (e) {
if (e.propertyName !== 'opacity') {
return;
}
var container = _this.props.getRef('container');
_this.scrollToActiveTab({
target: container,
currentTarget: container
});
};
_this.scrollToActiveTab = function (e) {
var activeTab = _this.props.getRef('activeTab');
var navWrap = _this.props.getRef('navWrap');
if (e && e.target !== e.currentTarget || !activeTab) {
return;
} // when not scrollable or enter scrollable first time, don't emit scrolling
var needToSroll = _this.isNextPrevShown() && _this.lastNextPrevShown;
_this.lastNextPrevShown = _this.isNextPrevShown();
if (!needToSroll) {
return;
}
var activeTabWH = _this.getScrollWH(activeTab);
var navWrapNodeWH = _this.getOffsetWH(navWrap);
var _assertThisInitialize = _assertThisInitialized(_this),
offset = _assertThisInitialize.offset;
var wrapOffset = _this.getOffsetLT(navWrap);
var activeTabOffset = _this.getOffsetLT(activeTab);
if (wrapOffset > activeTabOffset) {
offset += wrapOffset - activeTabOffset;
_this.setOffset(offset);
} else if (wrapOffset + navWrapNodeWH < activeTabOffset + activeTabWH) {
offset -= activeTabOffset + activeTabWH - (wrapOffset + navWrapNodeWH);
_this.setOffset(offset);
}
};
_this.prev = function (e) {
_this.props.onPrevClick(e);
var navWrapNode = _this.props.getRef('navWrap');
var navWrapNodeWH = _this.getOffsetWH(navWrapNode);
var _assertThisInitialize2 = _assertThisInitialized(_this),
offset = _assertThisInitialize2.offset;
_this.setOffset(offset + navWrapNodeWH);
};
_this.next = function (e) {
_this.props.onNextClick(e);
var navWrapNode = _this.props.getRef('navWrap');
var navWrapNodeWH = _this.getOffsetWH(navWrapNode);
var _assertThisInitialize3 = _assertThisInitialized(_this),
offset = _assertThisInitialize3.offset;
_this.setOffset(offset - navWrapNodeWH);
};
_this.offset = 0;
_this.state = {
next: false,
prev: false
};
return _this;
}
_createClass(ScrollableTabBarNode, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.componentDidUpdate();
this.debouncedResize = debounce(function () {
_this2.setNextPrev();
_this2.scrollToActiveTab();
}, 200);
this.resizeObserver = new ResizeObserver(this.debouncedResize);
this.resizeObserver.observe(this.props.getRef('container'));
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
var props = this.props;
if (prevProps && prevProps.tabBarPosition !== props.tabBarPosition) {
this.setOffset(0);
return;
}
var nextPrev = this.setNextPrev(); // wait next, prev show hide
/* eslint react/no-did-update-set-state:0 */
if (this.isNextPrevShown(this.state) !== this.isNextPrevShown(nextPrev)) {
this.setState({}, this.scrollToActiveTab);
} else if (!prevProps || props.activeKey !== prevProps.activeKey) {
// can not use props.activeKey
this.scrollToActiveTab();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.resizeObserver) {
this.resizeObserver.disconnect();
}
if (this.debouncedResize && this.debouncedResize.cancel) {
this.debouncedResize.cancel();
}
}
}, {
key: "setNextPrev",
value: function setNextPrev() {
var navNode = this.props.getRef('nav');
var navTabsContainer = this.props.getRef('navTabsContainer');
var navNodeWH = this.getScrollWH(navTabsContainer || navNode); // Add 1px to fix `offsetWidth` with decimal in Chrome not correct handle
// https://github.com/ant-design/ant-design/issues/13423
var containerWH = this.getOffsetWH(this.props.getRef('container')) + 1;
var navWrapNodeWH = this.getOffsetWH(this.props.getRef('navWrap'));
var offset = this.offset;
var minOffset = containerWH - navNodeWH;
var _this$state = this.state,
next = _this$state.next,
prev = _this$state.prev;
if (minOffset >= 0) {
next = false;
this.setOffset(0, false);
offset = 0;
} else if (minOffset < offset) {
next = true;
} else {
next = false; // Fix https://github.com/ant-design/ant-design/issues/8861
// Test with container offset which is stable
// and set the offset of the nav wrap node
var realOffset = navWrapNodeWH - navNodeWH;
this.setOffset(realOffset, false);
offset = realOffset;
}
if (offset < 0) {
prev = true;
} else {
prev = false;
}
this.setNext(next);
this.setPrev(prev);
return {
next: next,
prev: prev
};
}
}, {
key: "getOffsetWH",
value: function getOffsetWH(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'offsetWidth';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'offsetHeight';
}
return node[prop];
}
}, {
key: "getScrollWH",
value: function getScrollWH(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'scrollWidth';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'scrollHeight';
}
return node[prop];
}
}, {
key: "getOffsetLT",
value: function getOffsetLT(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'left';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'top';
}
return node.getBoundingClientRect()[prop];
}
}, {
key: "setOffset",
value: function setOffset(offset) {
var checkNextPrev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var target = Math.min(0, offset);
if (this.offset !== target) {
this.offset = target;
var navOffset = {};
var tabBarPosition = this.props.tabBarPosition;
var navStyle = this.props.getRef('nav').style;
var transformSupported = isTransform3dSupported(navStyle);
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
if (transformSupported) {
navOffset = {
value: "translate3d(0,".concat(target, "px,0)")
};
} else {
navOffset = {
name: 'top',
value: "".concat(target, "px")
};
}
} else if (transformSupported) {
if (this.props.direction === 'rtl') {
target = -target;
}
navOffset = {
value: "translate3d(".concat(target, "px,0,0)")
};
} else {
navOffset = {
name: 'left',
value: "".concat(target, "px")
};
}
if (transformSupported) {
setTransform(navStyle, navOffset.value);
} else {
navStyle[navOffset.name] = navOffset.value;
}
if (checkNextPrev) {
this.setNextPrev();
}
}
}
}, {
key: "setPrev",
value: function setPrev(v) {
if (this.state.prev !== v) {
this.setState({
prev: v
});
}
}
}, {
key: "setNext",
value: function setNext(v) {
if (this.state.next !== v) {
this.setState({
next: v
});
}
}
}, {
key: "isNextPrevShown",
value: function isNextPrevShown(state) {
if (state) {
return state.next || state.prev;
}
return this.state.next || this.state.prev;
}
}, {
key: "render",
value: function render() {
var _classnames, _classnames2, _classnames3, _classnames4;
var _this$state2 = this.state,
next = _this$state2.next,
prev = _this$state2.prev;
var _this$props = this.props,
prefixCls = _this$props.prefixCls,
scrollAnimated = _this$props.scrollAnimated,
navWrapper = _this$props.navWrapper,
prevIcon = _this$props.prevIcon,
nextIcon = _this$props.nextIcon;
var showNextPrev = prev || next;
var prevButton = React.createElement("span", {
onClick: prev ? this.prev : null,
unselectable: "unselectable",
className: classnames((_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-tab-prev"), 1), _defineProperty(_classnames, "".concat(prefixCls, "-tab-btn-disabled"), !prev), _defineProperty(_classnames, "".concat(prefixCls, "-tab-arrow-show"), showNextPrev), _classnames)),
onTransitionEnd: this.prevTransitionEnd
}, prevIcon || React.createElement("span", {
className: "".concat(prefixCls, "-tab-prev-icon")
}));
var nextButton = React.createElement("span", {
onClick: next ? this.next : null,
unselectable: "unselectable",
className: classnames((_classnames2 = {}, _defineProperty(_classnames2, "".concat(prefixCls, "-tab-next"), 1), _defineProperty(_classnames2, "".concat(prefixCls, "-tab-btn-disabled"), !next), _defineProperty(_classnames2, "".concat(prefixCls, "-tab-arrow-show"), showNextPrev), _classnames2))
}, nextIcon || React.createElement("span", {
className: "".concat(prefixCls, "-tab-next-icon")
}));
var navClassName = "".concat(prefixCls, "-nav");
var navClasses = classnames((_classnames3 = {}, _defineProperty(_classnames3, navClassName, true), _defineProperty(_classnames3, scrollAnimated ? "".concat(navClassName, "-animated") : "".concat(navClassName, "-no-animated"), true), _classnames3));
return React.createElement("div", {
className: classnames((_classnames4 = {}, _defineProperty(_classnames4, "".concat(prefixCls, "-nav-container"), 1), _defineProperty(_classnames4, "".concat(prefixCls, "-nav-container-scrolling"), showNextPrev), _classnames4)),
key: "container",
ref: this.props.saveRef('container')
}, prevButton, nextButton, React.createElement("div", {
className: "".concat(prefixCls, "-nav-wrap"),
ref: this.props.saveRef('navWrap')
}, React.createElement("div", {
className: "".concat(prefixCls, "-nav-scroll")
}, React.createElement("div", {
className: navClasses,
ref: this.props.saveRef('nav')
}, navWrapper(this.props.children)))));
}
}]);
return ScrollableTabBarNode;
}(React.Component);
export { ScrollableTabBarNode as default };
ScrollableTabBarNode.defaultProps = {
tabBarPosition: 'left',
prefixCls: '',
scrollAnimated: true,
onPrevClick: function onPrevClick() {},
onNextClick: function onNextClick() {},
navWrapper: function navWrapper(ele) {
return ele;
}
};

63
web/node_modules/rc-tabs/es/SwipeableInkTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,63 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
import SwipeableTabBarNode from './SwipeableTabBarNode';
import TabBarSwipeableTabs from './TabBarSwipeableTabs';
import TabBarRootNode from './TabBarRootNode';
import InkTabBarNode from './InkTabBarNode';
import SaveRef from './SaveRef';
var SwipeableInkTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(SwipeableInkTabBar, _React$Component);
function SwipeableInkTabBar() {
_classCallCheck(this, SwipeableInkTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(SwipeableInkTabBar).apply(this, arguments));
}
_createClass(SwipeableInkTabBar, [{
key: "render",
value: function render() {
var _this = this;
return React.createElement(SaveRef, null, function (saveRef, getRef) {
return React.createElement(TabBarRootNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), React.createElement(SwipeableTabBarNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), React.createElement(TabBarSwipeableTabs, _extends({
saveRef: saveRef
}, _this.props)), React.createElement(InkTabBarNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props))));
});
}
}]);
return SwipeableInkTabBar;
}(React.Component);
export { SwipeableInkTabBar as default };

290
web/node_modules/rc-tabs/es/SwipeableTabBarNode.js generated vendored Executable file
View File

@@ -0,0 +1,290 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import classnames from 'classnames';
import Hammer from 'rc-hammerjs';
import ReactDOM from 'react-dom';
import { isVertical, getStyle, setPxStyle } from './utils';
var SwipeableTabBarNode = /*#__PURE__*/function (_React$Component) {
_inherits(SwipeableTabBarNode, _React$Component);
function SwipeableTabBarNode(props) {
var _this;
_classCallCheck(this, SwipeableTabBarNode);
_this = _possibleConstructorReturn(this, _getPrototypeOf(SwipeableTabBarNode).call(this, props));
_this.onPan = function (e) {
var _this$cache = _this.cache,
vertical = _this$cache.vertical,
totalAvaliableDelta = _this$cache.totalAvaliableDelta,
totalDelta = _this$cache.totalDelta;
var speed = _this.props.speed; // calculate touch distance
var nowDelta = vertical ? e.deltaY : e.deltaX;
nowDelta *= speed / 10; // calculate distance dom need transform
var _nextDelta = nowDelta + totalDelta;
if (_this.isRtl()) {
// calculate distance from right when direction is right-to-left
if (_nextDelta <= 0) {
_nextDelta = 0;
} else if (_nextDelta >= totalAvaliableDelta) {
_nextDelta = totalAvaliableDelta;
}
} // calculate distance from left when direction is left-to-right
else if (_nextDelta >= 0) {
_nextDelta = 0;
} else if (_nextDelta <= -totalAvaliableDelta) {
_nextDelta = -totalAvaliableDelta;
}
_this.cache.totalDelta = _nextDelta;
_this.setSwipePosition(); // calculate pagination display
var _this$checkPagination = _this.checkPaginationByDelta(_this.cache.totalDelta),
hasPrevPage = _this$checkPagination.hasPrevPage,
hasNextPage = _this$checkPagination.hasNextPage;
if (hasPrevPage !== _this.state.hasPrevPage || hasNextPage !== _this.state.hasNextPage) {
_this.setState({
hasPrevPage: hasPrevPage,
hasNextPage: hasNextPage
});
}
};
var _this$checkPagination2 = _this.checkPaginationByKey(_this.props.activeKey),
_hasPrevPage = _this$checkPagination2.hasPrevPage,
_hasNextPage = _this$checkPagination2.hasNextPage;
_this.state = {
hasPrevPage: _hasPrevPage,
hasNextPage: _hasNextPage
};
return _this;
}
_createClass(SwipeableTabBarNode, [{
key: "componentDidMount",
value: function componentDidMount() {
var swipe = this.props.getRef('swipe');
var nav = this.props.getRef('nav');
var activeKey = this.props.activeKey;
this.swipeNode = ReactDOM.findDOMNode(swipe); // dom which scroll (9999px)
this.realNode = ReactDOM.findDOMNode(nav); // dom which visiable in screen (viewport)
this.setCache();
this.setSwipePositionByKey(activeKey);
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
this.setCache();
if (this.props.activeKey && this.props.activeKey !== prevProps.activeKey || this.props.panels.length !== prevProps.panels.length || this.props.pageSize !== prevProps.pageSize) {
this.setSwipePositionByKey(this.props.activeKey);
}
}
}, {
key: "setCache",
value: function setCache() {
var _this$props = this.props,
tabBarPosition = _this$props.tabBarPosition,
pageSize = _this$props.pageSize,
panels = _this$props.panels;
var _isVertical = isVertical(tabBarPosition);
var _viewSize = getStyle(this.realNode, _isVertical ? 'height' : 'width');
var _tabWidth = _viewSize / pageSize;
this.cache = _objectSpread({}, this.cache, {
vertical: _isVertical,
totalAvaliableDelta: _tabWidth * panels.length - _viewSize,
tabWidth: _tabWidth
});
}
/**
* used for props.activeKey setting, not for swipe callback
*/
}, {
key: "getDeltaByKey",
value: function getDeltaByKey(activeKey) {
var pageSize = this.props.pageSize;
var index = this.getIndexByKey(activeKey);
var centerTabCount = Math.floor(pageSize / 2);
var tabWidth = this.cache.tabWidth;
var delta = (index - centerTabCount) * tabWidth; // in rtl direction tabs are ordered from right to left, so delta should be positive in order to
// push swiped element to righ side (start of view)
if (!this.isRtl()) {
delta *= -1;
}
return delta;
}
}, {
key: "getIndexByKey",
value: function getIndexByKey(activeKey) {
var panels = this.props.panels;
var length = panels.length;
for (var i = 0; i < length; i++) {
if (panels[i].key === activeKey) {
return i;
}
}
return -1;
}
}, {
key: "setSwipePositionByKey",
value: function setSwipePositionByKey(activeKey) {
var _this$checkPagination3 = this.checkPaginationByKey(activeKey),
hasPrevPage = _this$checkPagination3.hasPrevPage,
hasNextPage = _this$checkPagination3.hasNextPage;
var totalAvaliableDelta = this.cache.totalAvaliableDelta;
this.setState({
hasPrevPage: hasPrevPage,
hasNextPage: hasNextPage
});
var delta;
if (!hasPrevPage) {
// the first page
delta = 0;
} else if (!hasNextPage) {
// the last page
delta = this.isRtl() ? totalAvaliableDelta : -totalAvaliableDelta;
} else if (hasNextPage) {
// the middle page
delta = this.getDeltaByKey(activeKey);
}
this.cache.totalDelta = delta;
this.setSwipePosition();
}
}, {
key: "setSwipePosition",
value: function setSwipePosition() {
var _this$cache2 = this.cache,
totalDelta = _this$cache2.totalDelta,
vertical = _this$cache2.vertical;
setPxStyle(this.swipeNode, totalDelta, vertical);
}
}, {
key: "checkPaginationByKey",
value: function checkPaginationByKey(activeKey) {
var _this$props2 = this.props,
panels = _this$props2.panels,
pageSize = _this$props2.pageSize;
var index = this.getIndexByKey(activeKey);
var centerTabCount = Math.floor(pageSize / 2); // the basic rule is to make activeTab be shown in the center of TabBar viewport
return {
hasPrevPage: index - centerTabCount > 0,
hasNextPage: index + centerTabCount < panels.length
};
}
}, {
key: "checkPaginationByDelta",
value: function checkPaginationByDelta(delta) {
var totalAvaliableDelta = this.cache.totalAvaliableDelta;
return {
hasPrevPage: delta < 0,
hasNextPage: -delta < totalAvaliableDelta
};
}
}, {
key: "isRtl",
value: function isRtl() {
return this.props.direction === 'rtl';
}
}, {
key: "render",
value: function render() {
var _classnames2;
var _this$props3 = this.props,
prefixCls = _this$props3.prefixCls,
hammerOptions = _this$props3.hammerOptions,
tabBarPosition = _this$props3.tabBarPosition;
var _this$state = this.state,
hasPrevPage = _this$state.hasPrevPage,
hasNextPage = _this$state.hasNextPage;
var navClassName = "".concat(prefixCls, "-nav");
var navClasses = classnames(_defineProperty({}, navClassName, true));
var events = {
onPan: this.onPan
};
return React.createElement("div", {
className: classnames((_classnames2 = {}, _defineProperty(_classnames2, "".concat(prefixCls, "-nav-container"), 1), _defineProperty(_classnames2, "".concat(prefixCls, "-nav-swipe-container"), 1), _defineProperty(_classnames2, "".concat(prefixCls, "-prevpage"), hasPrevPage), _defineProperty(_classnames2, "".concat(prefixCls, "-nextpage"), hasNextPage), _classnames2)),
key: "container",
ref: this.props.saveRef('container')
}, React.createElement("div", {
className: "".concat(prefixCls, "-nav-wrap"),
ref: this.props.saveRef('navWrap')
}, React.createElement(Hammer, _extends({}, events, {
direction: isVertical(tabBarPosition) ? 'DIRECTION_ALL' : 'DIRECTION_HORIZONTAL',
options: hammerOptions
}), React.createElement("div", {
className: "".concat(prefixCls, "-nav-swipe"),
ref: this.props.saveRef('swipe')
}, React.createElement("div", {
className: navClasses,
ref: this.props.saveRef('nav')
}, this.props.children)))));
}
}]);
return SwipeableTabBarNode;
}(React.Component);
export { SwipeableTabBarNode as default };
SwipeableTabBarNode.defaultProps = {
panels: null,
tabBarPosition: 'top',
prefixCls: '',
children: null,
hammerOptions: {},
pageSize: 5,
// per page show how many tabs
speed: 7,
// swipe speed, 1 to 10, more bigger more faster
saveRef: function saveRef() {},
getRef: function getRef() {}
};

230
web/node_modules/rc-tabs/es/SwipeableTabContent.js generated vendored Executable file
View File

@@ -0,0 +1,230 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import Hammer from 'rc-hammerjs';
import ReactDOM from 'react-dom';
import TabContent from './TabContent';
import { isVertical, getActiveIndex, getTransformByIndex, setTransform, getActiveKey, toArray, setTransition } from './utils';
var RESISTANCE_COEF = 0.6;
function computeIndex(_ref) {
var maxIndex = _ref.maxIndex,
startIndex = _ref.startIndex,
delta = _ref.delta,
viewSize = _ref.viewSize;
var index = startIndex + -delta / viewSize;
if (index < 0) {
index = Math.exp(index * RESISTANCE_COEF) - 1;
} else if (index > maxIndex) {
index = maxIndex + 1 - Math.exp((maxIndex - index) * RESISTANCE_COEF);
}
return index;
}
function getIndexByDelta(e) {
var delta = isVertical(this.props.tabBarPosition) ? e.deltaY : e.deltaX;
var otherDelta = isVertical(this.props.tabBarPosition) ? e.deltaX : e.deltaY;
if (Math.abs(delta) < Math.abs(otherDelta)) {
return undefined;
}
var currentIndex = computeIndex({
maxIndex: this.maxIndex,
viewSize: this.viewSize,
startIndex: this.startIndex,
delta: delta
});
var showIndex = delta < 0 ? Math.floor(currentIndex + 1) : Math.floor(currentIndex);
if (showIndex < 0) {
showIndex = 0;
} else if (showIndex > this.maxIndex) {
showIndex = this.maxIndex;
}
if (this.children[showIndex].props.disabled) {
return undefined;
}
return currentIndex;
}
var SwipeableTabContent = /*#__PURE__*/function (_React$Component) {
_inherits(SwipeableTabContent, _React$Component);
function SwipeableTabContent() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, SwipeableTabContent);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SwipeableTabContent)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.onPanStart = function () {
var _this$props = _this.props,
tabBarPosition = _this$props.tabBarPosition,
children = _this$props.children,
activeKey = _this$props.activeKey,
animated = _this$props.animated;
_this.startIndex = getActiveIndex(children, activeKey);
var _assertThisInitialize = _assertThisInitialized(_this),
startIndex = _assertThisInitialize.startIndex;
if (startIndex === -1) {
return;
}
if (animated) {
setTransition(_this.rootNode.style, 'none');
}
_this.startDrag = true;
_this.children = toArray(children);
_this.maxIndex = _this.children.length - 1;
_this.viewSize = isVertical(tabBarPosition) ? _this.rootNode.offsetHeight : _this.rootNode.offsetWidth;
};
_this.onPan = function (e) {
if (!_this.startDrag) {
return;
}
var tabBarPosition = _this.props.tabBarPosition;
var currentIndex = getIndexByDelta.call(_assertThisInitialized(_this), e);
if (currentIndex !== undefined) {
setTransform(_this.rootNode.style, getTransformByIndex(currentIndex, tabBarPosition));
}
};
_this.onPanEnd = function (e) {
if (!_this.startDrag) {
return;
}
_this.end(e);
};
_this.onSwipe = function (e) {
_this.end(e, true);
};
_this.end = function (e, swipe) {
var _this$props2 = _this.props,
tabBarPosition = _this$props2.tabBarPosition,
animated = _this$props2.animated;
_this.startDrag = false;
if (animated) {
setTransition(_this.rootNode.style, '');
}
var currentIndex = getIndexByDelta.call(_assertThisInitialized(_this), e);
var finalIndex = _this.startIndex;
if (currentIndex !== undefined) {
if (currentIndex < 0) {
finalIndex = 0;
} else if (currentIndex > _this.maxIndex) {
finalIndex = _this.maxIndex;
} else if (swipe) {
var delta = isVertical(tabBarPosition) ? e.deltaY : e.deltaX;
finalIndex = delta < 0 ? Math.ceil(currentIndex) : Math.floor(currentIndex);
} else {
var floorIndex = Math.floor(currentIndex);
if (currentIndex - floorIndex > 0.6) {
finalIndex = floorIndex + 1;
} else {
finalIndex = floorIndex;
}
}
}
if (_this.children[finalIndex].props.disabled) {
return;
}
if (_this.startIndex === finalIndex) {
if (animated) {
setTransform(_this.rootNode.style, getTransformByIndex(finalIndex, _this.props.tabBarPosition));
}
} else {
_this.props.onChange(getActiveKey(_this.props.children, finalIndex));
}
};
return _this;
}
_createClass(SwipeableTabContent, [{
key: "componentDidMount",
value: function componentDidMount() {
this.rootNode = ReactDOM.findDOMNode(this);
}
}, {
key: "render",
value: function render() {
var _this$props3 = this.props,
tabBarPosition = _this$props3.tabBarPosition,
hammerOptions = _this$props3.hammerOptions,
animated = _this$props3.animated;
var events = {
onSwipe: this.onSwipe,
onPanStart: this.onPanStart
};
if (animated !== false) {
events = _objectSpread({}, events, {
onPan: this.onPan,
onPanEnd: this.onPanEnd
});
}
return React.createElement(Hammer, _extends({}, events, {
direction: isVertical(tabBarPosition) ? 'DIRECTION_ALL' : 'DIRECTION_HORIZONTAL',
options: hammerOptions
}), React.createElement(TabContent, this.props));
}
}]);
return SwipeableTabContent;
}(React.Component);
export { SwipeableTabContent as default };
SwipeableTabContent.defaultProps = {
animated: true
};

55
web/node_modules/rc-tabs/es/TabBar.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
import TabBarRootNode from './TabBarRootNode';
import TabBarTabsNode from './TabBarTabsNode';
import SaveRef from './SaveRef';
var TabBar = /*#__PURE__*/function (_React$Component) {
_inherits(TabBar, _React$Component);
function TabBar() {
_classCallCheck(this, TabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(TabBar).apply(this, arguments));
}
_createClass(TabBar, [{
key: "render",
value: function render() {
var _this = this;
return React.createElement(SaveRef, null, function (saveRef, getRef) {
return React.createElement(TabBarRootNode, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), React.createElement(TabBarTabsNode, _extends({
saveRef: saveRef
}, _this.props)));
});
}
}]);
return TabBar;
}(React.Component);
export { TabBar as default };

128
web/node_modules/rc-tabs/es/TabBarRootNode.js generated vendored Normal file
View File

@@ -0,0 +1,128 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React, { cloneElement } from 'react';
import classnames from 'classnames';
import { getDataAttr } from './utils';
var TabBarRootNode = /*#__PURE__*/function (_React$Component) {
_inherits(TabBarRootNode, _React$Component);
function TabBarRootNode() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, TabBarRootNode);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(TabBarRootNode)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.getExtraContentStyle = function () {
var _this$props = _this.props,
tabBarPosition = _this$props.tabBarPosition,
direction = _this$props.direction;
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
if (direction === 'rtl') {
return topOrBottom ? {
float: 'left'
} : {};
}
return topOrBottom ? {
float: 'right'
} : {};
};
return _this;
}
_createClass(TabBarRootNode, [{
key: "render",
value: function render() {
var _this$props2 = this.props,
prefixCls = _this$props2.prefixCls,
onKeyDown = _this$props2.onKeyDown,
className = _this$props2.className,
extraContent = _this$props2.extraContent,
style = _this$props2.style,
tabBarPosition = _this$props2.tabBarPosition,
children = _this$props2.children,
direction = _this$props2.direction,
restProps = _objectWithoutProperties(_this$props2, ["prefixCls", "onKeyDown", "className", "extraContent", "style", "tabBarPosition", "children", "direction"]);
var cls = classnames("".concat(prefixCls, "-bar"), _defineProperty({}, className, !!className));
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
var extraContentStyle = extraContent && extraContent.props ? extraContent.props.style : {};
var newChildren = children;
if (extraContent) {
newChildren = [cloneElement(extraContent, {
key: 'extra',
onKeyDown: function onKeyDown(e) {
return e.stopPropagation();
},
style: _objectSpread({}, this.getExtraContentStyle(topOrBottom, direction), {}, extraContentStyle)
}), cloneElement(children, {
key: 'content'
})];
newChildren = topOrBottom ? newChildren : newChildren.reverse();
}
return React.createElement("div", _extends({
role: "tablist",
tabIndex: -1,
className: cls,
ref: this.props.saveRef('root'),
onKeyDown: onKeyDown,
style: style
}, getDataAttr(restProps)), newChildren);
}
}]);
return TabBarRootNode;
}(React.Component);
export { TabBarRootNode as default };
TabBarRootNode.defaultProps = {
prefixCls: '',
className: '',
style: {},
tabBarPosition: 'top',
extraContent: null,
children: null,
onKeyDown: function onKeyDown() {},
saveRef: function saveRef() {},
getRef: function getRef() {}
};

101
web/node_modules/rc-tabs/es/TabBarSwipeableTabs.js generated vendored Normal file
View File

@@ -0,0 +1,101 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import classnames from 'classnames';
var TabBarSwipeableTabs = /*#__PURE__*/function (_React$Component) {
_inherits(TabBarSwipeableTabs, _React$Component);
function TabBarSwipeableTabs() {
_classCallCheck(this, TabBarSwipeableTabs);
return _possibleConstructorReturn(this, _getPrototypeOf(TabBarSwipeableTabs).apply(this, arguments));
}
_createClass(TabBarSwipeableTabs, [{
key: "render",
value: function render() {
var _this = this;
var props = this.props;
var children = props.panels;
var activeKey = props.activeKey;
var rst = [];
var prefixCls = props.prefixCls;
var _flexWidth = "".concat(1 / props.pageSize * 100, "%");
var tabStyle = {
WebkitFlexBasis: _flexWidth,
flexBasis: _flexWidth
};
React.Children.forEach(children, function (child) {
var _classnames;
if (!child) {
return;
}
var key = child.key;
var cls = classnames("".concat(prefixCls, "-tab"), (_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-tab-active"), activeKey === key), _defineProperty(_classnames, "".concat(prefixCls, "-tab-disabled"), child.props.disabled), _classnames));
var events = {};
if (!child.props.disabled) {
events = {
onClick: _this.props.onTabClick.bind(_this, key)
};
}
var refProps = {};
if (activeKey === key) {
refProps.ref = _this.props.saveRef('activeTab');
}
var id = _this.props.id ? "".concat(key, "-").concat(_this.props.id) : key;
rst.push(React.createElement("div", _extends({
role: "tab",
style: tabStyle,
"aria-disabled": child.props.disabled ? 'true' : 'false',
"aria-selected": activeKey === key ? 'true' : 'false',
tabIndex: activeKey === key ? 0 : -1
}, events, {
className: cls,
key: key,
id: "tab-".concat(id),
"aria-controls": "tabpane-".concat(id)
}, refProps), child.props.tab));
});
return rst;
}
}]);
return TabBarSwipeableTabs;
}(React.Component);
export { TabBarSwipeableTabs as default };
TabBarSwipeableTabs.defaultProps = {
pageSize: 5,
onTabClick: function onTabClick() {},
saveRef: function saveRef() {}
};

117
web/node_modules/rc-tabs/es/TabBarTabsNode.js generated vendored Normal file
View File

@@ -0,0 +1,117 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import warning from 'warning';
import { isVertical } from './utils';
var TabBarTabsNode = /*#__PURE__*/function (_React$Component) {
_inherits(TabBarTabsNode, _React$Component);
function TabBarTabsNode() {
_classCallCheck(this, TabBarTabsNode);
return _possibleConstructorReturn(this, _getPrototypeOf(TabBarTabsNode).apply(this, arguments));
}
_createClass(TabBarTabsNode, [{
key: "render",
value: function render() {
var _this = this;
var _this$props = this.props,
children = _this$props.panels,
activeKey = _this$props.activeKey,
prefixCls = _this$props.prefixCls,
tabBarGutter = _this$props.tabBarGutter,
saveRef = _this$props.saveRef,
tabBarPosition = _this$props.tabBarPosition,
renderTabBarNode = _this$props.renderTabBarNode,
direction = _this$props.direction;
var rst = [];
React.Children.forEach(children, function (child, index) {
if (!child) {
return;
}
var key = child.key;
var cls = activeKey === key ? "".concat(prefixCls, "-tab-active") : '';
cls += " ".concat(prefixCls, "-tab");
var events = {};
if (child.props.disabled) {
cls += " ".concat(prefixCls, "-tab-disabled");
} else {
events = {
onClick: _this.props.onTabClick.bind(_this, key)
};
}
var ref = {};
if (activeKey === key) {
ref.ref = saveRef('activeTab');
}
var gutter = tabBarGutter && index === children.length - 1 ? 0 : tabBarGutter;
var marginProperty = direction === 'rtl' ? 'marginLeft' : 'marginRight';
var style = _defineProperty({}, isVertical(tabBarPosition) ? 'marginBottom' : marginProperty, gutter);
warning('tab' in child.props, 'There must be `tab` property on children of Tabs.');
var id = _this.props.id ? "".concat(key, "-").concat(_this.props.id) : key;
var node = React.createElement("div", _extends({
role: "tab",
"aria-disabled": child.props.disabled ? 'true' : 'false',
"aria-selected": activeKey === key ? 'true' : 'false',
tabIndex: activeKey === key ? 0 : -1
}, events, {
className: cls,
key: key,
style: style,
id: "tab-".concat(id),
"aria-controls": "tabpane-".concat(id)
}, ref), child.props.tab);
if (renderTabBarNode) {
node = renderTabBarNode(node);
}
rst.push(node);
});
return React.createElement("div", {
ref: saveRef('navTabsContainer')
}, rst);
}
}]);
return TabBarTabsNode;
}(React.Component);
export { TabBarTabsNode as default };
TabBarTabsNode.defaultProps = {
panels: [],
prefixCls: [],
tabBarGutter: null,
onTabClick: function onTabClick() {},
saveRef: function saveRef() {}
};

104
web/node_modules/rc-tabs/es/TabContent.js generated vendored Executable file
View File

@@ -0,0 +1,104 @@
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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import classnames from 'classnames';
import { getTransformByIndex, getActiveIndex, getTransformPropValue, getMarginStyle } from './utils';
var TabContent = /*#__PURE__*/function (_React$Component) {
_inherits(TabContent, _React$Component);
function TabContent() {
_classCallCheck(this, TabContent);
return _possibleConstructorReturn(this, _getPrototypeOf(TabContent).apply(this, arguments));
}
_createClass(TabContent, [{
key: "getTabPanes",
value: function getTabPanes() {
var props = this.props;
var activeKey = props.activeKey;
var children = props.children;
var newChildren = [];
React.Children.forEach(children, function (child) {
if (!child) {
return;
}
var key = child.key;
var active = activeKey === key;
newChildren.push(React.cloneElement(child, {
active: active,
destroyInactiveTabPane: props.destroyInactiveTabPane,
rootPrefixCls: props.prefixCls,
id: props.id
}));
});
return newChildren;
}
}, {
key: "render",
value: function render() {
var _classnames;
var props = this.props;
var prefixCls = props.prefixCls,
children = props.children,
activeKey = props.activeKey,
className = props.className,
tabBarPosition = props.tabBarPosition,
animated = props.animated,
animatedWithMargin = props.animatedWithMargin,
direction = props.direction;
var style = props.style;
var classes = classnames((_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-content"), true), _defineProperty(_classnames, animated ? "".concat(prefixCls, "-content-animated") : "".concat(prefixCls, "-content-no-animated"), true), _classnames), className);
if (animated) {
var activeIndex = getActiveIndex(children, activeKey);
if (activeIndex !== -1) {
var animatedStyle = animatedWithMargin ? getMarginStyle(activeIndex, tabBarPosition, direction) : getTransformPropValue(getTransformByIndex(activeIndex, tabBarPosition, direction));
style = _objectSpread({}, style, {}, animatedStyle);
} else {
style = _objectSpread({}, style, {
display: 'none'
});
}
}
return React.createElement("div", {
className: classes,
style: style
}, this.getTabPanes());
}
}]);
return TabContent;
}(React.Component);
export { TabContent as default };
TabContent.defaultProps = {
animated: true
};

89
web/node_modules/rc-tabs/es/TabPane.js generated vendored Executable file
View File

@@ -0,0 +1,89 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import classnames from 'classnames';
import { getDataAttr } from './utils';
var TabPane = /*#__PURE__*/function (_React$Component) {
_inherits(TabPane, _React$Component);
function TabPane() {
_classCallCheck(this, TabPane);
return _possibleConstructorReturn(this, _getPrototypeOf(TabPane).apply(this, arguments));
}
_createClass(TabPane, [{
key: "render",
value: function render() {
var _classnames;
var _this$props = this.props,
id = _this$props.id,
className = _this$props.className,
destroyInactiveTabPane = _this$props.destroyInactiveTabPane,
active = _this$props.active,
forceRender = _this$props.forceRender,
rootPrefixCls = _this$props.rootPrefixCls,
style = _this$props.style,
children = _this$props.children,
placeholder = _this$props.placeholder,
tabKey = _this$props.tabKey,
restProps = _objectWithoutProperties(_this$props, ["id", "className", "destroyInactiveTabPane", "active", "forceRender", "rootPrefixCls", "style", "children", "placeholder", "tabKey"]);
this._isActived = this._isActived || active;
var prefixCls = "".concat(rootPrefixCls, "-tabpane");
var cls = classnames((_classnames = {}, _defineProperty(_classnames, prefixCls, 1), _defineProperty(_classnames, "".concat(prefixCls, "-inactive"), !active), _defineProperty(_classnames, "".concat(prefixCls, "-active"), active), _defineProperty(_classnames, className, className), _classnames));
var isRender = destroyInactiveTabPane ? active : this._isActived;
var shouldRender = isRender || forceRender;
var tabKeyExists = tabKey && String(tabKey).length > 0;
var uuid = tabKeyExists && (id ? "".concat(tabKey, "-").concat(id) : "".concat(tabKey));
return React.createElement("div", _extends({
style: _objectSpread({}, style, {
visibility: active ? 'visible' : 'hidden'
}),
role: "tabpanel",
"aria-hidden": active ? 'false' : 'true',
tabIndex: active ? 0 : -1,
className: cls,
id: uuid && "tabpane-".concat(uuid),
"aria-labelledby": uuid && "tab-".concat(uuid)
}, getDataAttr(restProps)), shouldRender ? children : placeholder);
}
}]);
return TabPane;
}(React.Component);
export { TabPane as default };
TabPane.defaultProps = {
placeholder: null
};

257
web/node_modules/rc-tabs/es/Tabs.js generated vendored Executable file
View File

@@ -0,0 +1,257 @@
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); }
function _extends() { _extends = Object.assign || 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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
import React from 'react';
import classnames from 'classnames';
import KeyCode from './KeyCode';
import TabPane from './TabPane';
import { getDataAttr } from './utils';
function noop() {}
function getDefaultActiveKey(props) {
var activeKey;
React.Children.forEach(props.children, function (child) {
if (child && !activeKey && !child.props.disabled) {
activeKey = child.key;
}
});
return activeKey;
}
function activeKeyIsValid(props, key) {
var keys = React.Children.map(props.children, function (child) {
return child && child.key;
});
return keys.indexOf(key) >= 0;
}
var Tabs = /*#__PURE__*/function (_React$Component) {
_inherits(Tabs, _React$Component);
function Tabs(props) {
var _this;
_classCallCheck(this, Tabs);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Tabs).call(this, props));
_this.onTabClick = function (activeKey, e) {
if (_this.tabBar.props.onTabClick) {
_this.tabBar.props.onTabClick(activeKey, e);
}
_this.setActiveKey(activeKey);
};
_this.onNavKeyDown = function (e) {
var keyboard = _this.props.keyboard;
if (!keyboard) {
return;
}
var eventKeyCode = e.keyCode;
if (eventKeyCode === KeyCode.RIGHT || eventKeyCode === KeyCode.DOWN) {
e.preventDefault();
var nextKey = _this.getNextActiveKey(true);
_this.onTabClick(nextKey);
} else if (eventKeyCode === KeyCode.LEFT || eventKeyCode === KeyCode.UP) {
e.preventDefault();
var previousKey = _this.getNextActiveKey(false);
_this.onTabClick(previousKey);
}
};
_this.onScroll = function (_ref) {
var target = _ref.target,
currentTarget = _ref.currentTarget;
if (target === currentTarget && target.scrollLeft > 0) {
target.scrollLeft = 0;
}
};
_this.setActiveKey = function (activeKey) {
if (_this.state.activeKey !== activeKey) {
if (!('activeKey' in _this.props)) {
_this.setState({
activeKey: activeKey
});
}
_this.props.onChange(activeKey);
}
};
_this.getNextActiveKey = function (next) {
var activeKey = _this.state.activeKey;
var children = [];
React.Children.forEach(_this.props.children, function (c) {
if (c && !c.props.disabled) {
if (next) {
children.push(c);
} else {
children.unshift(c);
}
}
});
var length = children.length;
var ret = length && children[0].key;
children.forEach(function (child, i) {
if (child.key === activeKey) {
if (i === length - 1) {
ret = children[0].key;
} else {
ret = children[i + 1].key;
}
}
});
return ret;
};
var _activeKey;
if ('activeKey' in props) {
_activeKey = props.activeKey;
} else if ('defaultActiveKey' in props) {
_activeKey = props.defaultActiveKey;
} else {
_activeKey = getDefaultActiveKey(props);
}
_this.state = {
activeKey: _activeKey
};
return _this;
}
_createClass(Tabs, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.destroy = true;
}
}, {
key: "render",
value: function render() {
var _classnames;
var props = this.props;
var prefixCls = props.prefixCls,
navWrapper = props.navWrapper,
tabBarPosition = props.tabBarPosition,
className = props.className,
renderTabContent = props.renderTabContent,
renderTabBar = props.renderTabBar,
destroyInactiveTabPane = props.destroyInactiveTabPane,
direction = props.direction,
id = props.id,
restProps = _objectWithoutProperties(props, ["prefixCls", "navWrapper", "tabBarPosition", "className", "renderTabContent", "renderTabBar", "destroyInactiveTabPane", "direction", "id"]);
var cls = classnames((_classnames = {}, _defineProperty(_classnames, prefixCls, 1), _defineProperty(_classnames, "".concat(prefixCls, "-").concat(tabBarPosition), 1), _defineProperty(_classnames, className, !!className), _defineProperty(_classnames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classnames));
this.tabBar = renderTabBar();
var tabBar = React.cloneElement(this.tabBar, {
prefixCls: prefixCls,
navWrapper: navWrapper,
key: 'tabBar',
onKeyDown: this.onNavKeyDown,
tabBarPosition: tabBarPosition,
onTabClick: this.onTabClick,
panels: props.children,
activeKey: this.state.activeKey,
direction: this.props.direction,
id: id
});
var tabContent = React.cloneElement(renderTabContent(), {
prefixCls: prefixCls,
tabBarPosition: tabBarPosition,
activeKey: this.state.activeKey,
destroyInactiveTabPane: destroyInactiveTabPane,
children: props.children,
onChange: this.setActiveKey,
key: 'tabContent',
direction: this.props.direction,
id: id
});
var contents = [];
if (tabBarPosition === 'bottom') {
contents.push(tabContent, tabBar);
} else {
contents.push(tabBar, tabContent);
}
return React.createElement("div", _extends({
className: cls,
style: props.style
}, getDataAttr(restProps), {
onScroll: this.onScroll,
id: id
}), contents);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, state) {
var newState = {};
if ('activeKey' in props) {
newState.activeKey = props.activeKey;
} else if (!activeKeyIsValid(props, state.activeKey)) {
newState.activeKey = getDefaultActiveKey(props);
}
if (Object.keys(newState).length > 0) {
return newState;
}
return null;
}
}]);
return Tabs;
}(React.Component);
Tabs.defaultProps = {
prefixCls: 'rc-tabs',
destroyInactiveTabPane: false,
onChange: noop,
keyboard: true,
navWrapper: function navWrapper(arg) {
return arg;
},
tabBarPosition: 'top',
children: null,
style: {},
direction: 'ltr'
};
Tabs.TabPane = TabPane;
export default Tabs;

5
web/node_modules/rc-tabs/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,5 @@
import Tabs from './Tabs';
import TabPane from './TabPane';
import TabContent from './TabContent';
export default Tabs;
export { TabPane, TabContent };

129
web/node_modules/rc-tabs/es/utils.js generated vendored Executable file
View File

@@ -0,0 +1,129 @@
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
import React from 'react';
export function toArray(children) {
// allow [c,[a,b]]
var c = [];
React.Children.forEach(children, function (child) {
if (child) {
c.push(child);
}
});
return c;
}
export function getActiveIndex(children, activeKey) {
var c = toArray(children);
for (var i = 0; i < c.length; i++) {
if (c[i].key === activeKey) {
return i;
}
}
return -1;
}
export function getActiveKey(children, index) {
var c = toArray(children);
return c[index].key;
}
export function setTransform(style, v) {
style.transform = v;
style.webkitTransform = v;
style.mozTransform = v;
}
export function isTransform3dSupported(style) {
return ('transform' in style || 'webkitTransform' in style || 'MozTransform' in style) && window.atob;
}
export function setTransition(style, v) {
style.transition = v;
style.webkitTransition = v;
style.MozTransition = v;
}
export function getTransformPropValue(v) {
return {
transform: v,
WebkitTransform: v,
MozTransform: v
};
}
export function isVertical(tabBarPosition) {
return tabBarPosition === 'left' || tabBarPosition === 'right';
}
export function getTransformByIndex(index, tabBarPosition) {
var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr';
var translate = isVertical(tabBarPosition) ? 'translateY' : 'translateX';
if (!isVertical(tabBarPosition) && direction === 'rtl') {
return "".concat(translate, "(").concat(index * 100, "%) translateZ(0)");
}
return "".concat(translate, "(").concat(-index * 100, "%) translateZ(0)");
}
export function getMarginStyle(index, tabBarPosition) {
var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr';
var marginDirection = isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft';
if (!isVertical(tabBarPosition) && direction === 'rtl') {
return _defineProperty({}, marginDirection, "".concat((index + 1) * 100, "%"));
}
return _defineProperty({}, marginDirection, "".concat(-index * 100, "%"));
}
export function getStyle(el, property) {
return +window.getComputedStyle(el).getPropertyValue(property).replace('px', '');
}
export function setPxStyle(el, value, vertical) {
value = vertical ? "0px, ".concat(value, "px, 0px") : "".concat(value, "px, 0px, 0px");
setTransform(el.style, "translate3d(".concat(value, ")"));
}
export function getDataAttr(props) {
return Object.keys(props).reduce(function (prev, key) {
if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
prev[key] = props[key];
}
return prev;
}, {});
}
function toNum(style, property) {
return +style.getPropertyValue(property).replace('px', '');
}
function getTypeValue(start, current, end, tabNode, wrapperNode) {
var total = getStyle(wrapperNode, "padding-".concat(start));
if (!tabNode || !tabNode.parentNode) {
return total;
}
var childNodes = tabNode.parentNode.childNodes;
Array.prototype.some.call(childNodes, function (node) {
var style = window.getComputedStyle(node);
if (node !== tabNode) {
total += toNum(style, "margin-".concat(start));
total += node[current];
total += toNum(style, "margin-".concat(end));
if (style.boxSizing === 'content-box') {
total += toNum(style, "border-".concat(start, "-width")) + toNum(style, "border-".concat(end, "-width"));
}
return false;
} // We need count current node margin
// ref: https://github.com/react-component/tabs/pull/139#issuecomment-431005262
total += toNum(style, "margin-".concat(start));
return true;
});
return total;
}
export function getLeft(tabNode, wrapperNode) {
return getTypeValue('left', 'offsetWidth', 'right', tabNode, wrapperNode);
}
export function getTop(tabNode, wrapperNode) {
return getTypeValue('top', 'offsetHeight', 'bottom', tabNode, wrapperNode);
}

75
web/node_modules/rc-tabs/lib/InkTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _InkTabBarNode = _interopRequireDefault(require("./InkTabBarNode"));
var _TabBarTabsNode = _interopRequireDefault(require("./TabBarTabsNode"));
var _TabBarRootNode = _interopRequireDefault(require("./TabBarRootNode"));
var _SaveRef = _interopRequireDefault(require("./SaveRef"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var InkTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(InkTabBar, _React$Component);
function InkTabBar() {
_classCallCheck(this, InkTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(InkTabBar).apply(this, arguments));
}
_createClass(InkTabBar, [{
key: "render",
value: function render() {
var _this = this;
return _react.default.createElement(_SaveRef.default, null, function (saveRef, getRef) {
return _react.default.createElement(_TabBarRootNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), _react.default.createElement(_TabBarTabsNode.default, _extends({
onTabClick: _this.props.onTabClick,
saveRef: saveRef
}, _this.props)), _react.default.createElement(_InkTabBarNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props)));
});
}
}]);
return InkTabBar;
}(_react.default.Component);
exports.default = InkTabBar;
InkTabBar.defaultProps = {
onTabClick: function onTabClick() {}
};

184
web/node_modules/rc-tabs/lib/InkTabBarNode.js generated vendored Normal file
View File

@@ -0,0 +1,184 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames2 = _interopRequireDefault(require("classnames"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _componentDidUpdate(component, init) {
var _component$props = component.props,
styles = _component$props.styles,
panels = _component$props.panels,
activeKey = _component$props.activeKey,
direction = _component$props.direction;
var rootNode = component.props.getRef('root');
var wrapNode = component.props.getRef('nav') || rootNode;
var inkBarNode = component.props.getRef('inkBar');
var activeTab = component.props.getRef('activeTab');
var inkBarNodeStyle = inkBarNode.style;
var tabBarPosition = component.props.tabBarPosition;
var activeIndex = (0, _utils.getActiveIndex)(panels, activeKey);
if (init) {
// prevent mount animation
inkBarNodeStyle.display = 'none';
}
if (activeTab) {
var tabNode = activeTab;
var transformSupported = (0, _utils.isTransform3dSupported)(inkBarNodeStyle); // Reset current style
(0, _utils.setTransform)(inkBarNodeStyle, '');
inkBarNodeStyle.width = '';
inkBarNodeStyle.height = '';
inkBarNodeStyle.left = '';
inkBarNodeStyle.top = '';
inkBarNodeStyle.bottom = '';
inkBarNodeStyle.right = '';
if (tabBarPosition === 'top' || tabBarPosition === 'bottom') {
var left = (0, _utils.getLeft)(tabNode, wrapNode);
var width = tabNode.offsetWidth; // If tabNode'width width equal to wrapNode'width when tabBarPosition is top or bottom
// It means no css working, then ink bar should not have width until css is loaded
// Fix https://github.com/ant-design/ant-design/issues/7564
if (width === rootNode.offsetWidth) {
width = 0;
} else if (styles.inkBar && styles.inkBar.width !== undefined) {
width = parseFloat(styles.inkBar.width, 10);
if (width) {
left += (tabNode.offsetWidth - width) / 2;
}
}
if (direction === 'rtl') {
left = (0, _utils.getStyle)(tabNode, 'margin-left') - left;
} // use 3d gpu to optimize render
if (transformSupported) {
(0, _utils.setTransform)(inkBarNodeStyle, "translate3d(".concat(left, "px,0,0)"));
} else {
inkBarNodeStyle.left = "".concat(left, "px");
}
inkBarNodeStyle.width = "".concat(width, "px");
} else {
var top = (0, _utils.getTop)(tabNode, wrapNode, true);
var height = tabNode.offsetHeight;
if (styles.inkBar && styles.inkBar.height !== undefined) {
height = parseFloat(styles.inkBar.height, 10);
if (height) {
top += (tabNode.offsetHeight - height) / 2;
}
}
if (transformSupported) {
(0, _utils.setTransform)(inkBarNodeStyle, "translate3d(0,".concat(top, "px,0)"));
inkBarNodeStyle.top = '0';
} else {
inkBarNodeStyle.top = "".concat(top, "px");
}
inkBarNodeStyle.height = "".concat(height, "px");
}
}
inkBarNodeStyle.display = activeIndex !== -1 ? 'block' : 'none';
}
var InkTabBarNode = /*#__PURE__*/function (_React$Component) {
_inherits(InkTabBarNode, _React$Component);
function InkTabBarNode() {
_classCallCheck(this, InkTabBarNode);
return _possibleConstructorReturn(this, _getPrototypeOf(InkTabBarNode).apply(this, arguments));
}
_createClass(InkTabBarNode, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this = this;
// ref https://github.com/ant-design/ant-design/issues/8678
// ref https://github.com/react-component/tabs/issues/135
// InkTabBarNode need parent/root ref for calculating position
// since parent componentDidMount triggered after child componentDidMount
// we're doing a quick fix here to use setTimeout to calculate position
// after parent/root component mounted
this.timeout = setTimeout(function () {
_componentDidUpdate(_this, true);
}, 0);
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
_componentDidUpdate(this);
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
clearTimeout(this.timeout);
}
}, {
key: "render",
value: function render() {
var _classnames;
var _this$props = this.props,
prefixCls = _this$props.prefixCls,
styles = _this$props.styles,
inkBarAnimated = _this$props.inkBarAnimated;
var className = "".concat(prefixCls, "-ink-bar");
var classes = (0, _classnames2.default)((_classnames = {}, _defineProperty(_classnames, className, true), _defineProperty(_classnames, inkBarAnimated ? "".concat(className, "-animated") : "".concat(className, "-no-animated"), true), _classnames));
return _react.default.createElement("div", {
style: styles.inkBar,
className: classes,
key: "inkBar",
ref: this.props.saveRef('inkBar')
});
}
}]);
return InkTabBarNode;
}(_react.default.Component);
exports.default = InkTabBarNode;
InkTabBarNode.defaultProps = {
prefixCls: '',
inkBarAnimated: true,
styles: {},
saveRef: function saveRef() {}
};

32
web/node_modules/rc-tabs/lib/KeyCode.js generated vendored Executable file
View File

@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = {
/**
* LEFT
*/
LEFT: 37,
// also NUM_WEST
/**
* UP
*/
UP: 38,
// also NUM_NORTH
/**
* RIGHT
*/
RIGHT: 39,
// also NUM_EAST
/**
* DOWN
*/
DOWN: 40 // also NUM_SOUTH
};
exports.default = _default;

76
web/node_modules/rc-tabs/lib/SaveRef.js generated vendored Normal file
View File

@@ -0,0 +1,76 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var SaveRef = /*#__PURE__*/function (_React$Component) {
_inherits(SaveRef, _React$Component);
function SaveRef() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, SaveRef);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SaveRef)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.getRef = function (name) {
return _this[name];
};
_this.saveRef = function (name) {
return function (node) {
if (node) {
_this[name] = node;
}
};
};
return _this;
}
_createClass(SaveRef, [{
key: "render",
value: function render() {
return this.props.children(this.saveRef, this.getRef);
}
}]);
return SaveRef;
}(_react.default.Component);
exports.default = SaveRef;
SaveRef.defaultProps = {
children: function children() {
return null;
}
};

83
web/node_modules/rc-tabs/lib/ScrollableInkTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,83 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _InkTabBarNode = _interopRequireDefault(require("./InkTabBarNode"));
var _TabBarTabsNode = _interopRequireDefault(require("./TabBarTabsNode"));
var _TabBarRootNode = _interopRequireDefault(require("./TabBarRootNode"));
var _ScrollableTabBarNode = _interopRequireDefault(require("./ScrollableTabBarNode"));
var _SaveRef = _interopRequireDefault(require("./SaveRef"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var ScrollableInkTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(ScrollableInkTabBar, _React$Component);
function ScrollableInkTabBar() {
_classCallCheck(this, ScrollableInkTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(ScrollableInkTabBar).apply(this, arguments));
}
_createClass(ScrollableInkTabBar, [{
key: "render",
value: function render() {
var _this$props = this.props,
renderTabBarNode = _this$props.children,
restProps = _objectWithoutProperties(_this$props, ["children"]);
return _react.default.createElement(_SaveRef.default, null, function (saveRef, getRef) {
return _react.default.createElement(_TabBarRootNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, restProps), _react.default.createElement(_ScrollableTabBarNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, restProps), _react.default.createElement(_TabBarTabsNode.default, _extends({
saveRef: saveRef,
renderTabBarNode: renderTabBarNode
}, restProps)), _react.default.createElement(_InkTabBarNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, restProps))));
});
}
}]);
return ScrollableInkTabBar;
}(_react.default.Component);
exports.default = ScrollableInkTabBar;

71
web/node_modules/rc-tabs/lib/ScrollableTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,71 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _ScrollableTabBarNode = _interopRequireDefault(require("./ScrollableTabBarNode"));
var _TabBarRootNode = _interopRequireDefault(require("./TabBarRootNode"));
var _TabBarTabsNode = _interopRequireDefault(require("./TabBarTabsNode"));
var _SaveRef = _interopRequireDefault(require("./SaveRef"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var ScrollableTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(ScrollableTabBar, _React$Component);
function ScrollableTabBar() {
_classCallCheck(this, ScrollableTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(ScrollableTabBar).apply(this, arguments));
}
_createClass(ScrollableTabBar, [{
key: "render",
value: function render() {
var _this = this;
return _react.default.createElement(_SaveRef.default, null, function (saveRef, getRef) {
return _react.default.createElement(_TabBarRootNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), _react.default.createElement(_ScrollableTabBarNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), _react.default.createElement(_TabBarTabsNode.default, _extends({
saveRef: saveRef
}, _this.props))));
});
}
}]);
return ScrollableTabBar;
}(_react.default.Component);
exports.default = ScrollableTabBar;

405
web/node_modules/rc-tabs/lib/ScrollableTabBarNode.js generated vendored Executable file
View File

@@ -0,0 +1,405 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames5 = _interopRequireDefault(require("classnames"));
var _debounce = _interopRequireDefault(require("lodash/debounce"));
var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-polyfill"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var ScrollableTabBarNode = /*#__PURE__*/function (_React$Component) {
_inherits(ScrollableTabBarNode, _React$Component);
function ScrollableTabBarNode(props) {
var _this;
_classCallCheck(this, ScrollableTabBarNode);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ScrollableTabBarNode).call(this, props));
_this.prevTransitionEnd = function (e) {
if (e.propertyName !== 'opacity') {
return;
}
var container = _this.props.getRef('container');
_this.scrollToActiveTab({
target: container,
currentTarget: container
});
};
_this.scrollToActiveTab = function (e) {
var activeTab = _this.props.getRef('activeTab');
var navWrap = _this.props.getRef('navWrap');
if (e && e.target !== e.currentTarget || !activeTab) {
return;
} // when not scrollable or enter scrollable first time, don't emit scrolling
var needToSroll = _this.isNextPrevShown() && _this.lastNextPrevShown;
_this.lastNextPrevShown = _this.isNextPrevShown();
if (!needToSroll) {
return;
}
var activeTabWH = _this.getScrollWH(activeTab);
var navWrapNodeWH = _this.getOffsetWH(navWrap);
var _assertThisInitialize = _assertThisInitialized(_this),
offset = _assertThisInitialize.offset;
var wrapOffset = _this.getOffsetLT(navWrap);
var activeTabOffset = _this.getOffsetLT(activeTab);
if (wrapOffset > activeTabOffset) {
offset += wrapOffset - activeTabOffset;
_this.setOffset(offset);
} else if (wrapOffset + navWrapNodeWH < activeTabOffset + activeTabWH) {
offset -= activeTabOffset + activeTabWH - (wrapOffset + navWrapNodeWH);
_this.setOffset(offset);
}
};
_this.prev = function (e) {
_this.props.onPrevClick(e);
var navWrapNode = _this.props.getRef('navWrap');
var navWrapNodeWH = _this.getOffsetWH(navWrapNode);
var _assertThisInitialize2 = _assertThisInitialized(_this),
offset = _assertThisInitialize2.offset;
_this.setOffset(offset + navWrapNodeWH);
};
_this.next = function (e) {
_this.props.onNextClick(e);
var navWrapNode = _this.props.getRef('navWrap');
var navWrapNodeWH = _this.getOffsetWH(navWrapNode);
var _assertThisInitialize3 = _assertThisInitialized(_this),
offset = _assertThisInitialize3.offset;
_this.setOffset(offset - navWrapNodeWH);
};
_this.offset = 0;
_this.state = {
next: false,
prev: false
};
return _this;
}
_createClass(ScrollableTabBarNode, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.componentDidUpdate();
this.debouncedResize = (0, _debounce.default)(function () {
_this2.setNextPrev();
_this2.scrollToActiveTab();
}, 200);
this.resizeObserver = new _resizeObserverPolyfill.default(this.debouncedResize);
this.resizeObserver.observe(this.props.getRef('container'));
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
var props = this.props;
if (prevProps && prevProps.tabBarPosition !== props.tabBarPosition) {
this.setOffset(0);
return;
}
var nextPrev = this.setNextPrev(); // wait next, prev show hide
/* eslint react/no-did-update-set-state:0 */
if (this.isNextPrevShown(this.state) !== this.isNextPrevShown(nextPrev)) {
this.setState({}, this.scrollToActiveTab);
} else if (!prevProps || props.activeKey !== prevProps.activeKey) {
// can not use props.activeKey
this.scrollToActiveTab();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.resizeObserver) {
this.resizeObserver.disconnect();
}
if (this.debouncedResize && this.debouncedResize.cancel) {
this.debouncedResize.cancel();
}
}
}, {
key: "setNextPrev",
value: function setNextPrev() {
var navNode = this.props.getRef('nav');
var navTabsContainer = this.props.getRef('navTabsContainer');
var navNodeWH = this.getScrollWH(navTabsContainer || navNode); // Add 1px to fix `offsetWidth` with decimal in Chrome not correct handle
// https://github.com/ant-design/ant-design/issues/13423
var containerWH = this.getOffsetWH(this.props.getRef('container')) + 1;
var navWrapNodeWH = this.getOffsetWH(this.props.getRef('navWrap'));
var offset = this.offset;
var minOffset = containerWH - navNodeWH;
var _this$state = this.state,
next = _this$state.next,
prev = _this$state.prev;
if (minOffset >= 0) {
next = false;
this.setOffset(0, false);
offset = 0;
} else if (minOffset < offset) {
next = true;
} else {
next = false; // Fix https://github.com/ant-design/ant-design/issues/8861
// Test with container offset which is stable
// and set the offset of the nav wrap node
var realOffset = navWrapNodeWH - navNodeWH;
this.setOffset(realOffset, false);
offset = realOffset;
}
if (offset < 0) {
prev = true;
} else {
prev = false;
}
this.setNext(next);
this.setPrev(prev);
return {
next: next,
prev: prev
};
}
}, {
key: "getOffsetWH",
value: function getOffsetWH(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'offsetWidth';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'offsetHeight';
}
return node[prop];
}
}, {
key: "getScrollWH",
value: function getScrollWH(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'scrollWidth';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'scrollHeight';
}
return node[prop];
}
}, {
key: "getOffsetLT",
value: function getOffsetLT(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'left';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'top';
}
return node.getBoundingClientRect()[prop];
}
}, {
key: "setOffset",
value: function setOffset(offset) {
var checkNextPrev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var target = Math.min(0, offset);
if (this.offset !== target) {
this.offset = target;
var navOffset = {};
var tabBarPosition = this.props.tabBarPosition;
var navStyle = this.props.getRef('nav').style;
var transformSupported = (0, _utils.isTransform3dSupported)(navStyle);
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
if (transformSupported) {
navOffset = {
value: "translate3d(0,".concat(target, "px,0)")
};
} else {
navOffset = {
name: 'top',
value: "".concat(target, "px")
};
}
} else if (transformSupported) {
if (this.props.direction === 'rtl') {
target = -target;
}
navOffset = {
value: "translate3d(".concat(target, "px,0,0)")
};
} else {
navOffset = {
name: 'left',
value: "".concat(target, "px")
};
}
if (transformSupported) {
(0, _utils.setTransform)(navStyle, navOffset.value);
} else {
navStyle[navOffset.name] = navOffset.value;
}
if (checkNextPrev) {
this.setNextPrev();
}
}
}
}, {
key: "setPrev",
value: function setPrev(v) {
if (this.state.prev !== v) {
this.setState({
prev: v
});
}
}
}, {
key: "setNext",
value: function setNext(v) {
if (this.state.next !== v) {
this.setState({
next: v
});
}
}
}, {
key: "isNextPrevShown",
value: function isNextPrevShown(state) {
if (state) {
return state.next || state.prev;
}
return this.state.next || this.state.prev;
}
}, {
key: "render",
value: function render() {
var _classnames, _classnames2, _classnames3, _classnames4;
var _this$state2 = this.state,
next = _this$state2.next,
prev = _this$state2.prev;
var _this$props = this.props,
prefixCls = _this$props.prefixCls,
scrollAnimated = _this$props.scrollAnimated,
navWrapper = _this$props.navWrapper,
prevIcon = _this$props.prevIcon,
nextIcon = _this$props.nextIcon;
var showNextPrev = prev || next;
var prevButton = _react.default.createElement("span", {
onClick: prev ? this.prev : null,
unselectable: "unselectable",
className: (0, _classnames5.default)((_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-tab-prev"), 1), _defineProperty(_classnames, "".concat(prefixCls, "-tab-btn-disabled"), !prev), _defineProperty(_classnames, "".concat(prefixCls, "-tab-arrow-show"), showNextPrev), _classnames)),
onTransitionEnd: this.prevTransitionEnd
}, prevIcon || _react.default.createElement("span", {
className: "".concat(prefixCls, "-tab-prev-icon")
}));
var nextButton = _react.default.createElement("span", {
onClick: next ? this.next : null,
unselectable: "unselectable",
className: (0, _classnames5.default)((_classnames2 = {}, _defineProperty(_classnames2, "".concat(prefixCls, "-tab-next"), 1), _defineProperty(_classnames2, "".concat(prefixCls, "-tab-btn-disabled"), !next), _defineProperty(_classnames2, "".concat(prefixCls, "-tab-arrow-show"), showNextPrev), _classnames2))
}, nextIcon || _react.default.createElement("span", {
className: "".concat(prefixCls, "-tab-next-icon")
}));
var navClassName = "".concat(prefixCls, "-nav");
var navClasses = (0, _classnames5.default)((_classnames3 = {}, _defineProperty(_classnames3, navClassName, true), _defineProperty(_classnames3, scrollAnimated ? "".concat(navClassName, "-animated") : "".concat(navClassName, "-no-animated"), true), _classnames3));
return _react.default.createElement("div", {
className: (0, _classnames5.default)((_classnames4 = {}, _defineProperty(_classnames4, "".concat(prefixCls, "-nav-container"), 1), _defineProperty(_classnames4, "".concat(prefixCls, "-nav-container-scrolling"), showNextPrev), _classnames4)),
key: "container",
ref: this.props.saveRef('container')
}, prevButton, nextButton, _react.default.createElement("div", {
className: "".concat(prefixCls, "-nav-wrap"),
ref: this.props.saveRef('navWrap')
}, _react.default.createElement("div", {
className: "".concat(prefixCls, "-nav-scroll")
}, _react.default.createElement("div", {
className: navClasses,
ref: this.props.saveRef('nav')
}, navWrapper(this.props.children)))));
}
}]);
return ScrollableTabBarNode;
}(_react.default.Component);
exports.default = ScrollableTabBarNode;
ScrollableTabBarNode.defaultProps = {
tabBarPosition: 'left',
prefixCls: '',
scrollAnimated: true,
onPrevClick: function onPrevClick() {},
onNextClick: function onNextClick() {},
navWrapper: function navWrapper(ele) {
return ele;
}
};

76
web/node_modules/rc-tabs/lib/SwipeableInkTabBar.js generated vendored Executable file
View File

@@ -0,0 +1,76 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _SwipeableTabBarNode = _interopRequireDefault(require("./SwipeableTabBarNode"));
var _TabBarSwipeableTabs = _interopRequireDefault(require("./TabBarSwipeableTabs"));
var _TabBarRootNode = _interopRequireDefault(require("./TabBarRootNode"));
var _InkTabBarNode = _interopRequireDefault(require("./InkTabBarNode"));
var _SaveRef = _interopRequireDefault(require("./SaveRef"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var SwipeableInkTabBar = /*#__PURE__*/function (_React$Component) {
_inherits(SwipeableInkTabBar, _React$Component);
function SwipeableInkTabBar() {
_classCallCheck(this, SwipeableInkTabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(SwipeableInkTabBar).apply(this, arguments));
}
_createClass(SwipeableInkTabBar, [{
key: "render",
value: function render() {
var _this = this;
return _react.default.createElement(_SaveRef.default, null, function (saveRef, getRef) {
return _react.default.createElement(_TabBarRootNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), _react.default.createElement(_SwipeableTabBarNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), _react.default.createElement(_TabBarSwipeableTabs.default, _extends({
saveRef: saveRef
}, _this.props)), _react.default.createElement(_InkTabBarNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props))));
});
}
}]);
return SwipeableInkTabBar;
}(_react.default.Component);
exports.default = SwipeableInkTabBar;

303
web/node_modules/rc-tabs/lib/SwipeableTabBarNode.js generated vendored Executable file
View File

@@ -0,0 +1,303 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames3 = _interopRequireDefault(require("classnames"));
var _rcHammerjs = _interopRequireDefault(require("rc-hammerjs"));
var _reactDom = _interopRequireDefault(require("react-dom"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var SwipeableTabBarNode = /*#__PURE__*/function (_React$Component) {
_inherits(SwipeableTabBarNode, _React$Component);
function SwipeableTabBarNode(props) {
var _this;
_classCallCheck(this, SwipeableTabBarNode);
_this = _possibleConstructorReturn(this, _getPrototypeOf(SwipeableTabBarNode).call(this, props));
_this.onPan = function (e) {
var _this$cache = _this.cache,
vertical = _this$cache.vertical,
totalAvaliableDelta = _this$cache.totalAvaliableDelta,
totalDelta = _this$cache.totalDelta;
var speed = _this.props.speed; // calculate touch distance
var nowDelta = vertical ? e.deltaY : e.deltaX;
nowDelta *= speed / 10; // calculate distance dom need transform
var _nextDelta = nowDelta + totalDelta;
if (_this.isRtl()) {
// calculate distance from right when direction is right-to-left
if (_nextDelta <= 0) {
_nextDelta = 0;
} else if (_nextDelta >= totalAvaliableDelta) {
_nextDelta = totalAvaliableDelta;
}
} // calculate distance from left when direction is left-to-right
else if (_nextDelta >= 0) {
_nextDelta = 0;
} else if (_nextDelta <= -totalAvaliableDelta) {
_nextDelta = -totalAvaliableDelta;
}
_this.cache.totalDelta = _nextDelta;
_this.setSwipePosition(); // calculate pagination display
var _this$checkPagination = _this.checkPaginationByDelta(_this.cache.totalDelta),
hasPrevPage = _this$checkPagination.hasPrevPage,
hasNextPage = _this$checkPagination.hasNextPage;
if (hasPrevPage !== _this.state.hasPrevPage || hasNextPage !== _this.state.hasNextPage) {
_this.setState({
hasPrevPage: hasPrevPage,
hasNextPage: hasNextPage
});
}
};
var _this$checkPagination2 = _this.checkPaginationByKey(_this.props.activeKey),
_hasPrevPage = _this$checkPagination2.hasPrevPage,
_hasNextPage = _this$checkPagination2.hasNextPage;
_this.state = {
hasPrevPage: _hasPrevPage,
hasNextPage: _hasNextPage
};
return _this;
}
_createClass(SwipeableTabBarNode, [{
key: "componentDidMount",
value: function componentDidMount() {
var swipe = this.props.getRef('swipe');
var nav = this.props.getRef('nav');
var activeKey = this.props.activeKey;
this.swipeNode = _reactDom.default.findDOMNode(swipe); // dom which scroll (9999px)
this.realNode = _reactDom.default.findDOMNode(nav); // dom which visiable in screen (viewport)
this.setCache();
this.setSwipePositionByKey(activeKey);
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
this.setCache();
if (this.props.activeKey && this.props.activeKey !== prevProps.activeKey || this.props.panels.length !== prevProps.panels.length || this.props.pageSize !== prevProps.pageSize) {
this.setSwipePositionByKey(this.props.activeKey);
}
}
}, {
key: "setCache",
value: function setCache() {
var _this$props = this.props,
tabBarPosition = _this$props.tabBarPosition,
pageSize = _this$props.pageSize,
panels = _this$props.panels;
var _isVertical = (0, _utils.isVertical)(tabBarPosition);
var _viewSize = (0, _utils.getStyle)(this.realNode, _isVertical ? 'height' : 'width');
var _tabWidth = _viewSize / pageSize;
this.cache = _objectSpread({}, this.cache, {
vertical: _isVertical,
totalAvaliableDelta: _tabWidth * panels.length - _viewSize,
tabWidth: _tabWidth
});
}
/**
* used for props.activeKey setting, not for swipe callback
*/
}, {
key: "getDeltaByKey",
value: function getDeltaByKey(activeKey) {
var pageSize = this.props.pageSize;
var index = this.getIndexByKey(activeKey);
var centerTabCount = Math.floor(pageSize / 2);
var tabWidth = this.cache.tabWidth;
var delta = (index - centerTabCount) * tabWidth; // in rtl direction tabs are ordered from right to left, so delta should be positive in order to
// push swiped element to righ side (start of view)
if (!this.isRtl()) {
delta *= -1;
}
return delta;
}
}, {
key: "getIndexByKey",
value: function getIndexByKey(activeKey) {
var panels = this.props.panels;
var length = panels.length;
for (var i = 0; i < length; i++) {
if (panels[i].key === activeKey) {
return i;
}
}
return -1;
}
}, {
key: "setSwipePositionByKey",
value: function setSwipePositionByKey(activeKey) {
var _this$checkPagination3 = this.checkPaginationByKey(activeKey),
hasPrevPage = _this$checkPagination3.hasPrevPage,
hasNextPage = _this$checkPagination3.hasNextPage;
var totalAvaliableDelta = this.cache.totalAvaliableDelta;
this.setState({
hasPrevPage: hasPrevPage,
hasNextPage: hasNextPage
});
var delta;
if (!hasPrevPage) {
// the first page
delta = 0;
} else if (!hasNextPage) {
// the last page
delta = this.isRtl() ? totalAvaliableDelta : -totalAvaliableDelta;
} else if (hasNextPage) {
// the middle page
delta = this.getDeltaByKey(activeKey);
}
this.cache.totalDelta = delta;
this.setSwipePosition();
}
}, {
key: "setSwipePosition",
value: function setSwipePosition() {
var _this$cache2 = this.cache,
totalDelta = _this$cache2.totalDelta,
vertical = _this$cache2.vertical;
(0, _utils.setPxStyle)(this.swipeNode, totalDelta, vertical);
}
}, {
key: "checkPaginationByKey",
value: function checkPaginationByKey(activeKey) {
var _this$props2 = this.props,
panels = _this$props2.panels,
pageSize = _this$props2.pageSize;
var index = this.getIndexByKey(activeKey);
var centerTabCount = Math.floor(pageSize / 2); // the basic rule is to make activeTab be shown in the center of TabBar viewport
return {
hasPrevPage: index - centerTabCount > 0,
hasNextPage: index + centerTabCount < panels.length
};
}
}, {
key: "checkPaginationByDelta",
value: function checkPaginationByDelta(delta) {
var totalAvaliableDelta = this.cache.totalAvaliableDelta;
return {
hasPrevPage: delta < 0,
hasNextPage: -delta < totalAvaliableDelta
};
}
}, {
key: "isRtl",
value: function isRtl() {
return this.props.direction === 'rtl';
}
}, {
key: "render",
value: function render() {
var _classnames2;
var _this$props3 = this.props,
prefixCls = _this$props3.prefixCls,
hammerOptions = _this$props3.hammerOptions,
tabBarPosition = _this$props3.tabBarPosition;
var _this$state = this.state,
hasPrevPage = _this$state.hasPrevPage,
hasNextPage = _this$state.hasNextPage;
var navClassName = "".concat(prefixCls, "-nav");
var navClasses = (0, _classnames3.default)(_defineProperty({}, navClassName, true));
var events = {
onPan: this.onPan
};
return _react.default.createElement("div", {
className: (0, _classnames3.default)((_classnames2 = {}, _defineProperty(_classnames2, "".concat(prefixCls, "-nav-container"), 1), _defineProperty(_classnames2, "".concat(prefixCls, "-nav-swipe-container"), 1), _defineProperty(_classnames2, "".concat(prefixCls, "-prevpage"), hasPrevPage), _defineProperty(_classnames2, "".concat(prefixCls, "-nextpage"), hasNextPage), _classnames2)),
key: "container",
ref: this.props.saveRef('container')
}, _react.default.createElement("div", {
className: "".concat(prefixCls, "-nav-wrap"),
ref: this.props.saveRef('navWrap')
}, _react.default.createElement(_rcHammerjs.default, _extends({}, events, {
direction: (0, _utils.isVertical)(tabBarPosition) ? 'DIRECTION_ALL' : 'DIRECTION_HORIZONTAL',
options: hammerOptions
}), _react.default.createElement("div", {
className: "".concat(prefixCls, "-nav-swipe"),
ref: this.props.saveRef('swipe')
}, _react.default.createElement("div", {
className: navClasses,
ref: this.props.saveRef('nav')
}, this.props.children)))));
}
}]);
return SwipeableTabBarNode;
}(_react.default.Component);
exports.default = SwipeableTabBarNode;
SwipeableTabBarNode.defaultProps = {
panels: null,
tabBarPosition: 'top',
prefixCls: '',
children: null,
hammerOptions: {},
pageSize: 5,
// per page show how many tabs
speed: 7,
// swipe speed, 1 to 10, more bigger more faster
saveRef: function saveRef() {},
getRef: function getRef() {}
};

244
web/node_modules/rc-tabs/lib/SwipeableTabContent.js generated vendored Executable file
View File

@@ -0,0 +1,244 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _rcHammerjs = _interopRequireDefault(require("rc-hammerjs"));
var _reactDom = _interopRequireDefault(require("react-dom"));
var _TabContent = _interopRequireDefault(require("./TabContent"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var RESISTANCE_COEF = 0.6;
function computeIndex(_ref) {
var maxIndex = _ref.maxIndex,
startIndex = _ref.startIndex,
delta = _ref.delta,
viewSize = _ref.viewSize;
var index = startIndex + -delta / viewSize;
if (index < 0) {
index = Math.exp(index * RESISTANCE_COEF) - 1;
} else if (index > maxIndex) {
index = maxIndex + 1 - Math.exp((maxIndex - index) * RESISTANCE_COEF);
}
return index;
}
function getIndexByDelta(e) {
var delta = (0, _utils.isVertical)(this.props.tabBarPosition) ? e.deltaY : e.deltaX;
var otherDelta = (0, _utils.isVertical)(this.props.tabBarPosition) ? e.deltaX : e.deltaY;
if (Math.abs(delta) < Math.abs(otherDelta)) {
return undefined;
}
var currentIndex = computeIndex({
maxIndex: this.maxIndex,
viewSize: this.viewSize,
startIndex: this.startIndex,
delta: delta
});
var showIndex = delta < 0 ? Math.floor(currentIndex + 1) : Math.floor(currentIndex);
if (showIndex < 0) {
showIndex = 0;
} else if (showIndex > this.maxIndex) {
showIndex = this.maxIndex;
}
if (this.children[showIndex].props.disabled) {
return undefined;
}
return currentIndex;
}
var SwipeableTabContent = /*#__PURE__*/function (_React$Component) {
_inherits(SwipeableTabContent, _React$Component);
function SwipeableTabContent() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, SwipeableTabContent);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SwipeableTabContent)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.onPanStart = function () {
var _this$props = _this.props,
tabBarPosition = _this$props.tabBarPosition,
children = _this$props.children,
activeKey = _this$props.activeKey,
animated = _this$props.animated;
_this.startIndex = (0, _utils.getActiveIndex)(children, activeKey);
var _assertThisInitialize = _assertThisInitialized(_this),
startIndex = _assertThisInitialize.startIndex;
if (startIndex === -1) {
return;
}
if (animated) {
(0, _utils.setTransition)(_this.rootNode.style, 'none');
}
_this.startDrag = true;
_this.children = (0, _utils.toArray)(children);
_this.maxIndex = _this.children.length - 1;
_this.viewSize = (0, _utils.isVertical)(tabBarPosition) ? _this.rootNode.offsetHeight : _this.rootNode.offsetWidth;
};
_this.onPan = function (e) {
if (!_this.startDrag) {
return;
}
var tabBarPosition = _this.props.tabBarPosition;
var currentIndex = getIndexByDelta.call(_assertThisInitialized(_this), e);
if (currentIndex !== undefined) {
(0, _utils.setTransform)(_this.rootNode.style, (0, _utils.getTransformByIndex)(currentIndex, tabBarPosition));
}
};
_this.onPanEnd = function (e) {
if (!_this.startDrag) {
return;
}
_this.end(e);
};
_this.onSwipe = function (e) {
_this.end(e, true);
};
_this.end = function (e, swipe) {
var _this$props2 = _this.props,
tabBarPosition = _this$props2.tabBarPosition,
animated = _this$props2.animated;
_this.startDrag = false;
if (animated) {
(0, _utils.setTransition)(_this.rootNode.style, '');
}
var currentIndex = getIndexByDelta.call(_assertThisInitialized(_this), e);
var finalIndex = _this.startIndex;
if (currentIndex !== undefined) {
if (currentIndex < 0) {
finalIndex = 0;
} else if (currentIndex > _this.maxIndex) {
finalIndex = _this.maxIndex;
} else if (swipe) {
var delta = (0, _utils.isVertical)(tabBarPosition) ? e.deltaY : e.deltaX;
finalIndex = delta < 0 ? Math.ceil(currentIndex) : Math.floor(currentIndex);
} else {
var floorIndex = Math.floor(currentIndex);
if (currentIndex - floorIndex > 0.6) {
finalIndex = floorIndex + 1;
} else {
finalIndex = floorIndex;
}
}
}
if (_this.children[finalIndex].props.disabled) {
return;
}
if (_this.startIndex === finalIndex) {
if (animated) {
(0, _utils.setTransform)(_this.rootNode.style, (0, _utils.getTransformByIndex)(finalIndex, _this.props.tabBarPosition));
}
} else {
_this.props.onChange((0, _utils.getActiveKey)(_this.props.children, finalIndex));
}
};
return _this;
}
_createClass(SwipeableTabContent, [{
key: "componentDidMount",
value: function componentDidMount() {
this.rootNode = _reactDom.default.findDOMNode(this);
}
}, {
key: "render",
value: function render() {
var _this$props3 = this.props,
tabBarPosition = _this$props3.tabBarPosition,
hammerOptions = _this$props3.hammerOptions,
animated = _this$props3.animated;
var events = {
onSwipe: this.onSwipe,
onPanStart: this.onPanStart
};
if (animated !== false) {
events = _objectSpread({}, events, {
onPan: this.onPan,
onPanEnd: this.onPanEnd
});
}
return _react.default.createElement(_rcHammerjs.default, _extends({}, events, {
direction: (0, _utils.isVertical)(tabBarPosition) ? 'DIRECTION_ALL' : 'DIRECTION_HORIZONTAL',
options: hammerOptions
}), _react.default.createElement(_TabContent.default, this.props));
}
}]);
return SwipeableTabContent;
}(_react.default.Component);
exports.default = SwipeableTabContent;
SwipeableTabContent.defaultProps = {
animated: true
};

66
web/node_modules/rc-tabs/lib/TabBar.js generated vendored Normal file
View File

@@ -0,0 +1,66 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _TabBarRootNode = _interopRequireDefault(require("./TabBarRootNode"));
var _TabBarTabsNode = _interopRequireDefault(require("./TabBarTabsNode"));
var _SaveRef = _interopRequireDefault(require("./SaveRef"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var TabBar = /*#__PURE__*/function (_React$Component) {
_inherits(TabBar, _React$Component);
function TabBar() {
_classCallCheck(this, TabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(TabBar).apply(this, arguments));
}
_createClass(TabBar, [{
key: "render",
value: function render() {
var _this = this;
return _react.default.createElement(_SaveRef.default, null, function (saveRef, getRef) {
return _react.default.createElement(_TabBarRootNode.default, _extends({
saveRef: saveRef,
getRef: getRef
}, _this.props), _react.default.createElement(_TabBarTabsNode.default, _extends({
saveRef: saveRef
}, _this.props)));
});
}
}]);
return TabBar;
}(_react.default.Component);
exports.default = TabBar;

143
web/node_modules/rc-tabs/lib/TabBarRootNode.js generated vendored Normal file
View File

@@ -0,0 +1,143 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _classnames2 = _interopRequireDefault(require("classnames"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var TabBarRootNode = /*#__PURE__*/function (_React$Component) {
_inherits(TabBarRootNode, _React$Component);
function TabBarRootNode() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, TabBarRootNode);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(TabBarRootNode)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.getExtraContentStyle = function () {
var _this$props = _this.props,
tabBarPosition = _this$props.tabBarPosition,
direction = _this$props.direction;
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
if (direction === 'rtl') {
return topOrBottom ? {
float: 'left'
} : {};
}
return topOrBottom ? {
float: 'right'
} : {};
};
return _this;
}
_createClass(TabBarRootNode, [{
key: "render",
value: function render() {
var _this$props2 = this.props,
prefixCls = _this$props2.prefixCls,
onKeyDown = _this$props2.onKeyDown,
className = _this$props2.className,
extraContent = _this$props2.extraContent,
style = _this$props2.style,
tabBarPosition = _this$props2.tabBarPosition,
children = _this$props2.children,
direction = _this$props2.direction,
restProps = _objectWithoutProperties(_this$props2, ["prefixCls", "onKeyDown", "className", "extraContent", "style", "tabBarPosition", "children", "direction"]);
var cls = (0, _classnames2.default)("".concat(prefixCls, "-bar"), _defineProperty({}, className, !!className));
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
var extraContentStyle = extraContent && extraContent.props ? extraContent.props.style : {};
var newChildren = children;
if (extraContent) {
newChildren = [(0, _react.cloneElement)(extraContent, {
key: 'extra',
onKeyDown: function onKeyDown(e) {
return e.stopPropagation();
},
style: _objectSpread({}, this.getExtraContentStyle(topOrBottom, direction), {}, extraContentStyle)
}), (0, _react.cloneElement)(children, {
key: 'content'
})];
newChildren = topOrBottom ? newChildren : newChildren.reverse();
}
return _react.default.createElement("div", _extends({
role: "tablist",
tabIndex: -1,
className: cls,
ref: this.props.saveRef('root'),
onKeyDown: onKeyDown,
style: style
}, (0, _utils.getDataAttr)(restProps)), newChildren);
}
}]);
return TabBarRootNode;
}(_react.default.Component);
exports.default = TabBarRootNode;
TabBarRootNode.defaultProps = {
prefixCls: '',
className: '',
style: {},
tabBarPosition: 'top',
extraContent: null,
children: null,
onKeyDown: function onKeyDown() {},
saveRef: function saveRef() {},
getRef: function getRef() {}
};

113
web/node_modules/rc-tabs/lib/TabBarSwipeableTabs.js generated vendored Normal file
View File

@@ -0,0 +1,113 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames2 = _interopRequireDefault(require("classnames"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var TabBarSwipeableTabs = /*#__PURE__*/function (_React$Component) {
_inherits(TabBarSwipeableTabs, _React$Component);
function TabBarSwipeableTabs() {
_classCallCheck(this, TabBarSwipeableTabs);
return _possibleConstructorReturn(this, _getPrototypeOf(TabBarSwipeableTabs).apply(this, arguments));
}
_createClass(TabBarSwipeableTabs, [{
key: "render",
value: function render() {
var _this = this;
var props = this.props;
var children = props.panels;
var activeKey = props.activeKey;
var rst = [];
var prefixCls = props.prefixCls;
var _flexWidth = "".concat(1 / props.pageSize * 100, "%");
var tabStyle = {
WebkitFlexBasis: _flexWidth,
flexBasis: _flexWidth
};
_react.default.Children.forEach(children, function (child) {
var _classnames;
if (!child) {
return;
}
var key = child.key;
var cls = (0, _classnames2.default)("".concat(prefixCls, "-tab"), (_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-tab-active"), activeKey === key), _defineProperty(_classnames, "".concat(prefixCls, "-tab-disabled"), child.props.disabled), _classnames));
var events = {};
if (!child.props.disabled) {
events = {
onClick: _this.props.onTabClick.bind(_this, key)
};
}
var refProps = {};
if (activeKey === key) {
refProps.ref = _this.props.saveRef('activeTab');
}
var id = _this.props.id ? "".concat(key, "-").concat(_this.props.id) : key;
rst.push(_react.default.createElement("div", _extends({
role: "tab",
style: tabStyle,
"aria-disabled": child.props.disabled ? 'true' : 'false',
"aria-selected": activeKey === key ? 'true' : 'false',
tabIndex: activeKey === key ? 0 : -1
}, events, {
className: cls,
key: key,
id: "tab-".concat(id),
"aria-controls": "tabpane-".concat(id)
}, refProps), child.props.tab));
});
return rst;
}
}]);
return TabBarSwipeableTabs;
}(_react.default.Component);
exports.default = TabBarSwipeableTabs;
TabBarSwipeableTabs.defaultProps = {
pageSize: 5,
onTabClick: function onTabClick() {},
saveRef: function saveRef() {}
};

131
web/node_modules/rc-tabs/lib/TabBarTabsNode.js generated vendored Normal file
View File

@@ -0,0 +1,131 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _warning = _interopRequireDefault(require("warning"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var TabBarTabsNode = /*#__PURE__*/function (_React$Component) {
_inherits(TabBarTabsNode, _React$Component);
function TabBarTabsNode() {
_classCallCheck(this, TabBarTabsNode);
return _possibleConstructorReturn(this, _getPrototypeOf(TabBarTabsNode).apply(this, arguments));
}
_createClass(TabBarTabsNode, [{
key: "render",
value: function render() {
var _this = this;
var _this$props = this.props,
children = _this$props.panels,
activeKey = _this$props.activeKey,
prefixCls = _this$props.prefixCls,
tabBarGutter = _this$props.tabBarGutter,
saveRef = _this$props.saveRef,
tabBarPosition = _this$props.tabBarPosition,
renderTabBarNode = _this$props.renderTabBarNode,
direction = _this$props.direction;
var rst = [];
_react.default.Children.forEach(children, function (child, index) {
if (!child) {
return;
}
var key = child.key;
var cls = activeKey === key ? "".concat(prefixCls, "-tab-active") : '';
cls += " ".concat(prefixCls, "-tab");
var events = {};
if (child.props.disabled) {
cls += " ".concat(prefixCls, "-tab-disabled");
} else {
events = {
onClick: _this.props.onTabClick.bind(_this, key)
};
}
var ref = {};
if (activeKey === key) {
ref.ref = saveRef('activeTab');
}
var gutter = tabBarGutter && index === children.length - 1 ? 0 : tabBarGutter;
var marginProperty = direction === 'rtl' ? 'marginLeft' : 'marginRight';
var style = _defineProperty({}, (0, _utils.isVertical)(tabBarPosition) ? 'marginBottom' : marginProperty, gutter);
(0, _warning.default)('tab' in child.props, 'There must be `tab` property on children of Tabs.');
var id = _this.props.id ? "".concat(key, "-").concat(_this.props.id) : key;
var node = _react.default.createElement("div", _extends({
role: "tab",
"aria-disabled": child.props.disabled ? 'true' : 'false',
"aria-selected": activeKey === key ? 'true' : 'false',
tabIndex: activeKey === key ? 0 : -1
}, events, {
className: cls,
key: key,
style: style,
id: "tab-".concat(id),
"aria-controls": "tabpane-".concat(id)
}, ref), child.props.tab);
if (renderTabBarNode) {
node = renderTabBarNode(node);
}
rst.push(node);
});
return _react.default.createElement("div", {
ref: saveRef('navTabsContainer')
}, rst);
}
}]);
return TabBarTabsNode;
}(_react.default.Component);
exports.default = TabBarTabsNode;
TabBarTabsNode.defaultProps = {
panels: [],
prefixCls: [],
tabBarGutter: null,
onTabClick: function onTabClick() {},
saveRef: function saveRef() {}
};

117
web/node_modules/rc-tabs/lib/TabContent.js generated vendored Executable file
View File

@@ -0,0 +1,117 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames2 = _interopRequireDefault(require("classnames"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var TabContent = /*#__PURE__*/function (_React$Component) {
_inherits(TabContent, _React$Component);
function TabContent() {
_classCallCheck(this, TabContent);
return _possibleConstructorReturn(this, _getPrototypeOf(TabContent).apply(this, arguments));
}
_createClass(TabContent, [{
key: "getTabPanes",
value: function getTabPanes() {
var props = this.props;
var activeKey = props.activeKey;
var children = props.children;
var newChildren = [];
_react.default.Children.forEach(children, function (child) {
if (!child) {
return;
}
var key = child.key;
var active = activeKey === key;
newChildren.push(_react.default.cloneElement(child, {
active: active,
destroyInactiveTabPane: props.destroyInactiveTabPane,
rootPrefixCls: props.prefixCls,
id: props.id
}));
});
return newChildren;
}
}, {
key: "render",
value: function render() {
var _classnames;
var props = this.props;
var prefixCls = props.prefixCls,
children = props.children,
activeKey = props.activeKey,
className = props.className,
tabBarPosition = props.tabBarPosition,
animated = props.animated,
animatedWithMargin = props.animatedWithMargin,
direction = props.direction;
var style = props.style;
var classes = (0, _classnames2.default)((_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-content"), true), _defineProperty(_classnames, animated ? "".concat(prefixCls, "-content-animated") : "".concat(prefixCls, "-content-no-animated"), true), _classnames), className);
if (animated) {
var activeIndex = (0, _utils.getActiveIndex)(children, activeKey);
if (activeIndex !== -1) {
var animatedStyle = animatedWithMargin ? (0, _utils.getMarginStyle)(activeIndex, tabBarPosition, direction) : (0, _utils.getTransformPropValue)((0, _utils.getTransformByIndex)(activeIndex, tabBarPosition, direction));
style = _objectSpread({}, style, {}, animatedStyle);
} else {
style = _objectSpread({}, style, {
display: 'none'
});
}
}
return _react.default.createElement("div", {
className: classes,
style: style
}, this.getTabPanes());
}
}]);
return TabContent;
}(_react.default.Component);
exports.default = TabContent;
TabContent.defaultProps = {
animated: true
};

100
web/node_modules/rc-tabs/lib/TabPane.js generated vendored Executable file
View File

@@ -0,0 +1,100 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames2 = _interopRequireDefault(require("classnames"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var TabPane = /*#__PURE__*/function (_React$Component) {
_inherits(TabPane, _React$Component);
function TabPane() {
_classCallCheck(this, TabPane);
return _possibleConstructorReturn(this, _getPrototypeOf(TabPane).apply(this, arguments));
}
_createClass(TabPane, [{
key: "render",
value: function render() {
var _classnames;
var _this$props = this.props,
id = _this$props.id,
className = _this$props.className,
destroyInactiveTabPane = _this$props.destroyInactiveTabPane,
active = _this$props.active,
forceRender = _this$props.forceRender,
rootPrefixCls = _this$props.rootPrefixCls,
style = _this$props.style,
children = _this$props.children,
placeholder = _this$props.placeholder,
tabKey = _this$props.tabKey,
restProps = _objectWithoutProperties(_this$props, ["id", "className", "destroyInactiveTabPane", "active", "forceRender", "rootPrefixCls", "style", "children", "placeholder", "tabKey"]);
this._isActived = this._isActived || active;
var prefixCls = "".concat(rootPrefixCls, "-tabpane");
var cls = (0, _classnames2.default)((_classnames = {}, _defineProperty(_classnames, prefixCls, 1), _defineProperty(_classnames, "".concat(prefixCls, "-inactive"), !active), _defineProperty(_classnames, "".concat(prefixCls, "-active"), active), _defineProperty(_classnames, className, className), _classnames));
var isRender = destroyInactiveTabPane ? active : this._isActived;
var shouldRender = isRender || forceRender;
var tabKeyExists = tabKey && String(tabKey).length > 0;
var uuid = tabKeyExists && (id ? "".concat(tabKey, "-").concat(id) : "".concat(tabKey));
return _react.default.createElement("div", _extends({
style: _objectSpread({}, style, {
visibility: active ? 'visible' : 'hidden'
}),
role: "tabpanel",
"aria-hidden": active ? 'false' : 'true',
tabIndex: active ? 0 : -1,
className: cls,
id: uuid && "tabpane-".concat(uuid),
"aria-labelledby": uuid && "tab-".concat(uuid)
}, (0, _utils.getDataAttr)(restProps)), shouldRender ? children : placeholder);
}
}]);
return TabPane;
}(_react.default.Component);
exports.default = TabPane;
TabPane.defaultProps = {
placeholder: null
};

279
web/node_modules/rc-tabs/lib/Tabs.js generated vendored Executable file
View File

@@ -0,0 +1,279 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames2 = _interopRequireDefault(require("classnames"));
var _KeyCode = _interopRequireDefault(require("./KeyCode"));
var _TabPane = _interopRequireDefault(require("./TabPane"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
function _extends() { _extends = Object.assign || 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); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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; }
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; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function noop() {}
function getDefaultActiveKey(props) {
var activeKey;
_react.default.Children.forEach(props.children, function (child) {
if (child && !activeKey && !child.props.disabled) {
activeKey = child.key;
}
});
return activeKey;
}
function activeKeyIsValid(props, key) {
var keys = _react.default.Children.map(props.children, function (child) {
return child && child.key;
});
return keys.indexOf(key) >= 0;
}
var Tabs = /*#__PURE__*/function (_React$Component) {
_inherits(Tabs, _React$Component);
function Tabs(props) {
var _this;
_classCallCheck(this, Tabs);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Tabs).call(this, props));
_this.onTabClick = function (activeKey, e) {
if (_this.tabBar.props.onTabClick) {
_this.tabBar.props.onTabClick(activeKey, e);
}
_this.setActiveKey(activeKey);
};
_this.onNavKeyDown = function (e) {
var keyboard = _this.props.keyboard;
if (!keyboard) {
return;
}
var eventKeyCode = e.keyCode;
if (eventKeyCode === _KeyCode.default.RIGHT || eventKeyCode === _KeyCode.default.DOWN) {
e.preventDefault();
var nextKey = _this.getNextActiveKey(true);
_this.onTabClick(nextKey);
} else if (eventKeyCode === _KeyCode.default.LEFT || eventKeyCode === _KeyCode.default.UP) {
e.preventDefault();
var previousKey = _this.getNextActiveKey(false);
_this.onTabClick(previousKey);
}
};
_this.onScroll = function (_ref) {
var target = _ref.target,
currentTarget = _ref.currentTarget;
if (target === currentTarget && target.scrollLeft > 0) {
target.scrollLeft = 0;
}
};
_this.setActiveKey = function (activeKey) {
if (_this.state.activeKey !== activeKey) {
if (!('activeKey' in _this.props)) {
_this.setState({
activeKey: activeKey
});
}
_this.props.onChange(activeKey);
}
};
_this.getNextActiveKey = function (next) {
var activeKey = _this.state.activeKey;
var children = [];
_react.default.Children.forEach(_this.props.children, function (c) {
if (c && !c.props.disabled) {
if (next) {
children.push(c);
} else {
children.unshift(c);
}
}
});
var length = children.length;
var ret = length && children[0].key;
children.forEach(function (child, i) {
if (child.key === activeKey) {
if (i === length - 1) {
ret = children[0].key;
} else {
ret = children[i + 1].key;
}
}
});
return ret;
};
var _activeKey;
if ('activeKey' in props) {
_activeKey = props.activeKey;
} else if ('defaultActiveKey' in props) {
_activeKey = props.defaultActiveKey;
} else {
_activeKey = getDefaultActiveKey(props);
}
_this.state = {
activeKey: _activeKey
};
return _this;
}
_createClass(Tabs, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.destroy = true;
}
}, {
key: "render",
value: function render() {
var _classnames;
var props = this.props;
var prefixCls = props.prefixCls,
navWrapper = props.navWrapper,
tabBarPosition = props.tabBarPosition,
className = props.className,
renderTabContent = props.renderTabContent,
renderTabBar = props.renderTabBar,
destroyInactiveTabPane = props.destroyInactiveTabPane,
direction = props.direction,
id = props.id,
restProps = _objectWithoutProperties(props, ["prefixCls", "navWrapper", "tabBarPosition", "className", "renderTabContent", "renderTabBar", "destroyInactiveTabPane", "direction", "id"]);
var cls = (0, _classnames2.default)((_classnames = {}, _defineProperty(_classnames, prefixCls, 1), _defineProperty(_classnames, "".concat(prefixCls, "-").concat(tabBarPosition), 1), _defineProperty(_classnames, className, !!className), _defineProperty(_classnames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classnames));
this.tabBar = renderTabBar();
var tabBar = _react.default.cloneElement(this.tabBar, {
prefixCls: prefixCls,
navWrapper: navWrapper,
key: 'tabBar',
onKeyDown: this.onNavKeyDown,
tabBarPosition: tabBarPosition,
onTabClick: this.onTabClick,
panels: props.children,
activeKey: this.state.activeKey,
direction: this.props.direction,
id: id
});
var tabContent = _react.default.cloneElement(renderTabContent(), {
prefixCls: prefixCls,
tabBarPosition: tabBarPosition,
activeKey: this.state.activeKey,
destroyInactiveTabPane: destroyInactiveTabPane,
children: props.children,
onChange: this.setActiveKey,
key: 'tabContent',
direction: this.props.direction,
id: id
});
var contents = [];
if (tabBarPosition === 'bottom') {
contents.push(tabContent, tabBar);
} else {
contents.push(tabBar, tabContent);
}
return _react.default.createElement("div", _extends({
className: cls,
style: props.style
}, (0, _utils.getDataAttr)(restProps), {
onScroll: this.onScroll,
id: id
}), contents);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, state) {
var newState = {};
if ('activeKey' in props) {
newState.activeKey = props.activeKey;
} else if (!activeKeyIsValid(props, state.activeKey)) {
newState.activeKey = getDefaultActiveKey(props);
}
if (Object.keys(newState).length > 0) {
return newState;
}
return null;
}
}]);
return Tabs;
}(_react.default.Component);
Tabs.defaultProps = {
prefixCls: 'rc-tabs',
destroyInactiveTabPane: false,
onChange: noop,
keyboard: true,
navWrapper: function navWrapper(arg) {
return arg;
},
tabBarPosition: 'top',
children: null,
style: {},
direction: 'ltr'
};
Tabs.TabPane = _TabPane.default;
var _default = Tabs;
exports.default = _default;

29
web/node_modules/rc-tabs/lib/index.js generated vendored Executable file
View File

@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "TabPane", {
enumerable: true,
get: function get() {
return _TabPane.default;
}
});
Object.defineProperty(exports, "TabContent", {
enumerable: true,
get: function get() {
return _TabContent.default;
}
});
exports.default = void 0;
var _Tabs = _interopRequireDefault(require("./Tabs"));
var _TabPane = _interopRequireDefault(require("./TabPane"));
var _TabContent = _interopRequireDefault(require("./TabContent"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = _Tabs.default;
exports.default = _default;

168
web/node_modules/rc-tabs/lib/utils.js generated vendored Executable file
View File

@@ -0,0 +1,168 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.toArray = toArray;
exports.getActiveIndex = getActiveIndex;
exports.getActiveKey = getActiveKey;
exports.setTransform = setTransform;
exports.isTransform3dSupported = isTransform3dSupported;
exports.setTransition = setTransition;
exports.getTransformPropValue = getTransformPropValue;
exports.isVertical = isVertical;
exports.getTransformByIndex = getTransformByIndex;
exports.getMarginStyle = getMarginStyle;
exports.getStyle = getStyle;
exports.setPxStyle = setPxStyle;
exports.getDataAttr = getDataAttr;
exports.getLeft = getLeft;
exports.getTop = getTop;
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function toArray(children) {
// allow [c,[a,b]]
var c = [];
_react.default.Children.forEach(children, function (child) {
if (child) {
c.push(child);
}
});
return c;
}
function getActiveIndex(children, activeKey) {
var c = toArray(children);
for (var i = 0; i < c.length; i++) {
if (c[i].key === activeKey) {
return i;
}
}
return -1;
}
function getActiveKey(children, index) {
var c = toArray(children);
return c[index].key;
}
function setTransform(style, v) {
style.transform = v;
style.webkitTransform = v;
style.mozTransform = v;
}
function isTransform3dSupported(style) {
return ('transform' in style || 'webkitTransform' in style || 'MozTransform' in style) && window.atob;
}
function setTransition(style, v) {
style.transition = v;
style.webkitTransition = v;
style.MozTransition = v;
}
function getTransformPropValue(v) {
return {
transform: v,
WebkitTransform: v,
MozTransform: v
};
}
function isVertical(tabBarPosition) {
return tabBarPosition === 'left' || tabBarPosition === 'right';
}
function getTransformByIndex(index, tabBarPosition) {
var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr';
var translate = isVertical(tabBarPosition) ? 'translateY' : 'translateX';
if (!isVertical(tabBarPosition) && direction === 'rtl') {
return "".concat(translate, "(").concat(index * 100, "%) translateZ(0)");
}
return "".concat(translate, "(").concat(-index * 100, "%) translateZ(0)");
}
function getMarginStyle(index, tabBarPosition) {
var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr';
var marginDirection = isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft';
if (!isVertical(tabBarPosition) && direction === 'rtl') {
return _defineProperty({}, marginDirection, "".concat((index + 1) * 100, "%"));
}
return _defineProperty({}, marginDirection, "".concat(-index * 100, "%"));
}
function getStyle(el, property) {
return +window.getComputedStyle(el).getPropertyValue(property).replace('px', '');
}
function setPxStyle(el, value, vertical) {
value = vertical ? "0px, ".concat(value, "px, 0px") : "".concat(value, "px, 0px, 0px");
setTransform(el.style, "translate3d(".concat(value, ")"));
}
function getDataAttr(props) {
return Object.keys(props).reduce(function (prev, key) {
if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
prev[key] = props[key];
}
return prev;
}, {});
}
function toNum(style, property) {
return +style.getPropertyValue(property).replace('px', '');
}
function getTypeValue(start, current, end, tabNode, wrapperNode) {
var total = getStyle(wrapperNode, "padding-".concat(start));
if (!tabNode || !tabNode.parentNode) {
return total;
}
var childNodes = tabNode.parentNode.childNodes;
Array.prototype.some.call(childNodes, function (node) {
var style = window.getComputedStyle(node);
if (node !== tabNode) {
total += toNum(style, "margin-".concat(start));
total += node[current];
total += toNum(style, "margin-".concat(end));
if (style.boxSizing === 'content-box') {
total += toNum(style, "border-".concat(start, "-width")) + toNum(style, "border-".concat(end, "-width"));
}
return false;
} // We need count current node margin
// ref: https://github.com/react-component/tabs/pull/139#issuecomment-431005262
total += toNum(style, "margin-".concat(start));
return true;
});
return total;
}
function getLeft(tabNode, wrapperNode) {
return getTypeValue('left', 'offsetWidth', 'right', tabNode, wrapperNode);
}
function getTop(tabNode, wrapperNode) {
return getTypeValue('top', 'offsetHeight', 'bottom', tabNode, wrapperNode);
}

102
web/node_modules/rc-tabs/package.json generated vendored Normal file
View File

@@ -0,0 +1,102 @@
{
"_from": "rc-tabs@~10.1.1",
"_id": "rc-tabs@10.1.1",
"_inBundle": false,
"_integrity": "sha512-dOFeaYil3d6zV3ZtGZWfRf7zwyqUQ48cl67/Y/03SsBWEdYgfZzlgjfHqmUT+V7L7CvhQ5lIQyYpj4EthkgKCg==",
"_location": "/rc-tabs",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "rc-tabs@~10.1.1",
"name": "rc-tabs",
"escapedName": "rc-tabs",
"rawSpec": "~10.1.1",
"saveSpec": null,
"fetchSpec": "~10.1.1"
},
"_requiredBy": [
"/antd"
],
"_resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-10.1.1.tgz",
"_shasum": "847d8c2038842a3cb5f2e74935d0e38b85fce61e",
"_spec": "rc-tabs@~10.1.1",
"_where": "/Users/thilina/TestProjects/icehrm-pro/web/node_modules/antd",
"author": {
"name": "yiminghe@gmail.com"
},
"bugs": {
"url": "http://github.com/react-component/tabs/issues"
},
"bundleDependencies": false,
"dependencies": {
"classnames": "2.x",
"lodash": "^4.17.5",
"rc-hammerjs": "~0.6.0",
"resize-observer-polyfill": "^1.5.1",
"warning": "^4.0.3"
},
"deprecated": false,
"description": "tabs ui component for react",
"devDependencies": {
"@umijs/fabric": "^2.0.4",
"coveralls": "^3.0.6",
"cross-env": "^7.0.2",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.7.0",
"enzyme-to-json": "^3.3.4",
"eslint": "^6.8.0",
"fastclick": "~1.0.6",
"father": "^2.29.2",
"history": "^1.17.0",
"immutability-helper": "^3.0.1",
"less": "^3.11.1",
"less-loader": "^5.0.0",
"np": "^6.2.0",
"preact": "^8.2.1",
"preact-compat": "^3.16.0",
"react": "^16.0.0",
"react-dnd": "^7.0.2",
"react-dnd-html5-backend": "^7.0.2",
"react-dom": "^16.0.0",
"react-router": "^3.0.0",
"react-test-renderer": "^16.0.0",
"sortablejs": "^1.7.0"
},
"engines": {
"node": ">=8.x"
},
"files": [
"lib",
"es",
"dist",
"assets/index.css"
],
"homepage": "http://github.com/react-component/tabs",
"keywords": [
"react",
"react-component",
"react-tabs"
],
"license": "MIT",
"main": "./lib/index",
"module": "./es/index",
"name": "rc-tabs",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/react-component/tabs.git"
},
"scripts": {
"build": "father doc build --storybook",
"chrome-test": "rc-test run chrome-test",
"compile": "father build && npm run compile:style",
"compile:style": "lessc --js assets/index.less assets/index.css",
"coverage": "father test --coverage",
"lint": "eslint src/ examples/ --ext .tsx,.ts,.jsx,.js",
"now-build": "npm run build",
"prepublishOnly": "npm run lint && npm run test && npm run compile && np --no-cleanup --yolo --no-publish",
"start": "father doc dev --storybook",
"test": "father test"
},
"version": "10.1.1"
}