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

14
web/node_modules/rmc-feedback/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,14 @@
# History
## 2.0.0
- remove props like `onTouchStart`, `onTouchMove`, `onTouchEnd`, `onTouchCancel`,`onMouseDown`, `onMouseUp`, `onMouseLeave` from `TouchFeedback`
- fix the problem that `TouchFeedback` component will cover the children's events
## 1.0.2
- support activeStyle=false to disabled `touchfeedback`
## 0.0.1
init project

71
web/node_modules/rmc-feedback/README.md generated vendored Normal file
View File

@@ -0,0 +1,71 @@
# rmc-feedback
---
:active pseudo-class with react/preact for mobile
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[npm-image]: http://img.shields.io/npm/v/rmc-feedback.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rmc-feedback
[travis-image]: https://img.shields.io/travis/react-component/m-feedback.svg?style=flat-square
[travis-url]: https://travis-ci.org/react-component/m-feedback
[coveralls-image]: https://img.shields.io/coveralls/react-component/m-feedback.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/react-component/m-feedback?branch=master
## Installation
`npm install --save rmc-feedback`
## Development
```
npm install
npm start
```
## Example
- local: http://localhost:8000/examples/
- online: http://react-component.github.io/m-feedback/
## Usage
```js
import TouchFeedback from 'rmc-feedback';
<TouchFeedback activeClassName="acitve" activeStyle={{ color: 'red'}} disabled={false}>
<div>click to active</div>
</TouchFeedback>
```
## API
### props
| name | description | type | default |
|-------------|------------------------|--------|------------|
| disabled | | boolean | false |
| activeClassName | className applied to child when active | string | |
| activeStyle | style applied to child when active (set to false to disable click feedback) | object | - |
## Test Case
```
npm test
npm run chrome-test
```
## Coverage
```
npm run coverage
```
open coverage/ dir
## License
rmc-feedback is released under the MIT license.

1950
web/node_modules/rmc-feedback/dist/rmc-feedback.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

9
web/node_modules/rmc-feedback/es/PropTypes.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export interface ITouchProps {
disabled?: boolean;
activeClassName?: string;
activeStyle?: any;
children?: any;
}
export interface ITouchState {
active: boolean;
}

0
web/node_modules/rmc-feedback/es/PropTypes.js generated vendored Normal file
View File

21
web/node_modules/rmc-feedback/es/TouchFeedback.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
/// <reference types="react" />
import React from 'react';
import { ITouchProps, ITouchState } from './PropTypes';
export default class TouchFeedback extends React.Component<ITouchProps, ITouchState> {
static defaultProps: {
disabled: boolean;
};
state: {
active: boolean;
};
componentDidUpdate(): void;
triggerEvent(type: any, isActive: any, ev: any): void;
onTouchStart: (e: any) => void;
onTouchMove: (e: any) => void;
onTouchEnd: (e: any) => void;
onTouchCancel: (e: any) => void;
onMouseDown: (e: any) => void;
onMouseUp: (e: any) => void;
onMouseLeave: (e: any) => void;
render(): React.ReactElement<any>;
}

113
web/node_modules/rmc-feedback/es/TouchFeedback.js generated vendored Normal file
View File

@@ -0,0 +1,113 @@
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import classNames from 'classnames';
var TouchFeedback = function (_React$Component) {
_inherits(TouchFeedback, _React$Component);
function TouchFeedback() {
_classCallCheck(this, TouchFeedback);
var _this = _possibleConstructorReturn(this, (TouchFeedback.__proto__ || Object.getPrototypeOf(TouchFeedback)).apply(this, arguments));
_this.state = {
active: false
};
_this.onTouchStart = function (e) {
_this.triggerEvent('TouchStart', true, e);
};
_this.onTouchMove = function (e) {
_this.triggerEvent('TouchMove', false, e);
};
_this.onTouchEnd = function (e) {
_this.triggerEvent('TouchEnd', false, e);
};
_this.onTouchCancel = function (e) {
_this.triggerEvent('TouchCancel', false, e);
};
_this.onMouseDown = function (e) {
// pc simulate mobile
_this.triggerEvent('MouseDown', true, e);
};
_this.onMouseUp = function (e) {
_this.triggerEvent('MouseUp', false, e);
};
_this.onMouseLeave = function (e) {
_this.triggerEvent('MouseLeave', false, e);
};
return _this;
}
_createClass(TouchFeedback, [{
key: 'componentDidUpdate',
value: function componentDidUpdate() {
if (this.props.disabled && this.state.active) {
this.setState({
active: false
});
}
}
}, {
key: 'triggerEvent',
value: function triggerEvent(type, isActive, ev) {
var eventType = 'on' + type;
var children = this.props.children;
if (children.props[eventType]) {
children.props[eventType](ev);
}
if (isActive !== this.state.active) {
this.setState({
active: isActive
});
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
disabled = _props.disabled,
activeClassName = _props.activeClassName,
activeStyle = _props.activeStyle;
var events = disabled ? undefined : {
onTouchStart: this.onTouchStart,
onTouchMove: this.onTouchMove,
onTouchEnd: this.onTouchEnd,
onTouchCancel: this.onTouchCancel,
onMouseDown: this.onMouseDown,
onMouseUp: this.onMouseUp,
onMouseLeave: this.onMouseLeave
};
var child = React.Children.only(children);
if (!disabled && this.state.active) {
var _child$props = child.props,
style = _child$props.style,
className = _child$props.className;
if (activeStyle !== false) {
if (activeStyle) {
style = _extends({}, style, activeStyle);
}
className = classNames(className, activeClassName);
}
return React.cloneElement(child, _extends({ className: className,
style: style }, events));
}
return React.cloneElement(child, events);
}
}]);
return TouchFeedback;
}(React.Component);
export default TouchFeedback;
TouchFeedback.defaultProps = {
disabled: false
};

1
web/node_modules/rmc-feedback/es/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from './TouchFeedback';

1
web/node_modules/rmc-feedback/es/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from './TouchFeedback';

9
web/node_modules/rmc-feedback/lib/PropTypes.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export interface ITouchProps {
disabled?: boolean;
activeClassName?: string;
activeStyle?: any;
children?: any;
}
export interface ITouchState {
active: boolean;
}

1
web/node_modules/rmc-feedback/lib/PropTypes.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";

21
web/node_modules/rmc-feedback/lib/TouchFeedback.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
/// <reference types="react" />
import React from 'react';
import { ITouchProps, ITouchState } from './PropTypes';
export default class TouchFeedback extends React.Component<ITouchProps, ITouchState> {
static defaultProps: {
disabled: boolean;
};
state: {
active: boolean;
};
componentDidUpdate(): void;
triggerEvent(type: any, isActive: any, ev: any): void;
onTouchStart: (e: any) => void;
onTouchMove: (e: any) => void;
onTouchEnd: (e: any) => void;
onTouchCancel: (e: any) => void;
onMouseDown: (e: any) => void;
onMouseUp: (e: any) => void;
onMouseLeave: (e: any) => void;
render(): React.ReactElement<any>;
}

141
web/node_modules/rmc-feedback/lib/TouchFeedback.js generated vendored Normal file
View File

@@ -0,0 +1,141 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require('babel-runtime/helpers/createClass');
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = require('babel-runtime/helpers/inherits');
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var TouchFeedback = function (_React$Component) {
(0, _inherits3['default'])(TouchFeedback, _React$Component);
function TouchFeedback() {
(0, _classCallCheck3['default'])(this, TouchFeedback);
var _this = (0, _possibleConstructorReturn3['default'])(this, (TouchFeedback.__proto__ || Object.getPrototypeOf(TouchFeedback)).apply(this, arguments));
_this.state = {
active: false
};
_this.onTouchStart = function (e) {
_this.triggerEvent('TouchStart', true, e);
};
_this.onTouchMove = function (e) {
_this.triggerEvent('TouchMove', false, e);
};
_this.onTouchEnd = function (e) {
_this.triggerEvent('TouchEnd', false, e);
};
_this.onTouchCancel = function (e) {
_this.triggerEvent('TouchCancel', false, e);
};
_this.onMouseDown = function (e) {
// pc simulate mobile
_this.triggerEvent('MouseDown', true, e);
};
_this.onMouseUp = function (e) {
_this.triggerEvent('MouseUp', false, e);
};
_this.onMouseLeave = function (e) {
_this.triggerEvent('MouseLeave', false, e);
};
return _this;
}
(0, _createClass3['default'])(TouchFeedback, [{
key: 'componentDidUpdate',
value: function componentDidUpdate() {
if (this.props.disabled && this.state.active) {
this.setState({
active: false
});
}
}
}, {
key: 'triggerEvent',
value: function triggerEvent(type, isActive, ev) {
var eventType = 'on' + type;
var children = this.props.children;
if (children.props[eventType]) {
children.props[eventType](ev);
}
if (isActive !== this.state.active) {
this.setState({
active: isActive
});
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
disabled = _props.disabled,
activeClassName = _props.activeClassName,
activeStyle = _props.activeStyle;
var events = disabled ? undefined : {
onTouchStart: this.onTouchStart,
onTouchMove: this.onTouchMove,
onTouchEnd: this.onTouchEnd,
onTouchCancel: this.onTouchCancel,
onMouseDown: this.onMouseDown,
onMouseUp: this.onMouseUp,
onMouseLeave: this.onMouseLeave
};
var child = _react2['default'].Children.only(children);
if (!disabled && this.state.active) {
var _child$props = child.props,
style = _child$props.style,
className = _child$props.className;
if (activeStyle !== false) {
if (activeStyle) {
style = (0, _extends3['default'])({}, style, activeStyle);
}
className = (0, _classnames2['default'])(className, activeClassName);
}
return _react2['default'].cloneElement(child, (0, _extends3['default'])({ className: className,
style: style }, events));
}
return _react2['default'].cloneElement(child, events);
}
}]);
return TouchFeedback;
}(_react2['default'].Component);
exports['default'] = TouchFeedback;
TouchFeedback.defaultProps = {
disabled: false
};
module.exports = exports['default'];

1
web/node_modules/rmc-feedback/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export { default } from './TouchFeedback';

18
web/node_modules/rmc-feedback/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _TouchFeedback = require('./TouchFeedback');
Object.defineProperty(exports, 'default', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_TouchFeedback)['default'];
}
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
module.exports = exports['default'];

97
web/node_modules/rmc-feedback/package.json generated vendored Normal file
View File

@@ -0,0 +1,97 @@
{
"_from": "rmc-feedback@^2.0.0",
"_id": "rmc-feedback@2.0.0",
"_inBundle": false,
"_integrity": "sha512-5PWOGOW7VXks/l3JzlOU9NIxRpuaSS8d9zA3UULUCuTKnpwBHNvv1jSJzxgbbCQeYzROWUpgKI4za3X4C/mKmQ==",
"_location": "/rmc-feedback",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "rmc-feedback@^2.0.0",
"name": "rmc-feedback",
"escapedName": "rmc-feedback",
"rawSpec": "^2.0.0",
"saveSpec": null,
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/rc-input-number"
],
"_resolved": "https://registry.npmjs.org/rmc-feedback/-/rmc-feedback-2.0.0.tgz",
"_shasum": "cbc6cb3ae63c7a635eef0e25e4fbaf5ac366eeaa",
"_spec": "rmc-feedback@^2.0.0",
"_where": "/Users/thilina/TestProjects/icehrm-pro/web/node_modules/rc-input-number",
"author": {
"name": "rjmuqiang@gmail.com"
},
"bugs": {
"url": "https://github.com/react-component/m-feedback/issues"
},
"bundleDependencies": false,
"config": {
"port": 8000,
"entry": {
"rmc-feedback": [
"./index.js"
]
}
},
"dependencies": {
"babel-runtime": "6.x",
"classnames": "^2.2.5"
},
"deprecated": false,
"description": ":active pseudo-class with react for mobile",
"devDependencies": {
"@types/mocha": "~2.2.32",
"@types/react": "~16.0.2",
"@types/react-dom": "15.5.1",
"expect.js": "0.3.x",
"pre-commit": "1.x",
"rc-test": "~6.0.3",
"rc-tools": "6.x",
"react": "^15.0.0",
"react-dom": "^15.0.0"
},
"files": [
"lib",
"es",
"dist"
],
"homepage": "https://github.com/react-component/m-feedback",
"keywords": [
"react",
"react-component",
"touch feeedback",
"rc-swipeout",
"active pseudo"
],
"licenses": "MIT",
"main": "./lib/index",
"module": "./es/index",
"name": "rmc-feedback",
"pre-commit": [
"lint"
],
"repository": {
"type": "git",
"url": "git+https://github.com/react-component/m-feedback.git"
},
"scripts": {
"build": "rc-tools run build",
"chrome-test": "rc-test run chrome-test",
"compile": "rc-tools run compile --babel-runtime",
"coverage": "rc-test run coverage",
"dist": "rc-tools run dist",
"gh-pages": "rc-tools run gh-pages",
"karma": "rc-test run karma",
"lint": "rc-tools run lint",
"pub": "rc-tools run pub --babel-runtime",
"start": "rc-tools run server",
"test": "rc-test run test",
"watch-tsc": "rc-tools run watch-tsc"
},
"typings": "./lib/index.d.ts",
"version": "2.0.0"
}