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

33
web/node_modules/copy-to-clipboard/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,33 @@
language: node_js
node_js:
- "4.2"
env:
- E2E_BROWSER_VENDOR="internet explorer" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="internet explorer" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="MicrosoftEdge" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest-1"
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest-1"
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest-1"
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest-1"
# TODO: add workaround for chromedriver issue
# - E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest"
# - E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest-1"
# TODO: look into execCommand(“copy”) support in Safari
# window.document.queryCommandSupported('copy') - false in 9.1.1
# - E2E_BROWSER_VENDOR="safari" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest"
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest-1"
addons:
sauce_connect:
username: "sudodoki"
access_key:
secure: "MBHn7+lxuJ0uNuFC8HjIZtosuOHICNW52fEhvtnJhXmaGOUXGLrQFUCvECJOoGrdOWmkiFaGgYINdF57HbYpyAICmv51UBlzHYftkTspYooH5+vni0ezPPpvxqNpUM/dlwfrdzC/ag97VYDeIxdYRKREwhRsNd5npE0Zrx1xmvzmnpdqdVhQ7Z/wQUDjv7talKC2fkaIYP+wEhVblnr18u0phFLqyADNsCV7D9QmILQWC4ieSz6ylTW9fb69B4rZElLj+D8qGvyvgmLnu+dK4Vlh0WuTdmVZ8TZS4OeBRIbjq/Mi2vMVuQLXz3DTiGWRZeDOBB5PYm/orgjgsnNg5hPx6t7yc4ypcBYf2gHxc31lV9VZRb10py33D8qPtcmPptwIWlsCQ4ANDyOwxck0FejMpjT+Ktkyme4nAvt9op289x8KKI0w8W7nHIB930lEookJCeMHWjyycPLJDTwYe60zBS24vNRF46ixhfpeO1zGw8nEj5qqSoEltunCOQ3Uvl25tNEuk9R649TyWbegjTuS4txqAsSjUnVMGvRBcZef4YyOQsggos1YbJMNnFSvDH9VaPYiJbg/qR7tb0YJ8gtAC9/6iqba6EZadkJQe9DHs6qu5zuoiwfSgBZTON2oWL6AGwySADm44SL7ikKJN8Zb8bLjQ1o15KinBVKLuOk="
script:
- REMOTE_SELENIUM=true npm test -- -e saucelabs

View File

@@ -0,0 +1,2 @@
{
}

21
web/node_modules/copy-to-clipboard/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 sudodoki <smd.deluzion@gmail.com>
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.

72
web/node_modules/copy-to-clipboard/README.md generated vendored Normal file
View File

@@ -0,0 +1,72 @@
# Copy to clipboard [![Build Status](https://travis-ci.org/sudodoki/copy-to-clipboard.svg?branch=master)](https://travis-ci.org/sudodoki/copy-to-clipboard)
Simple module exposing `copy` function that will try to use [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#) with fallback to IE-specific `clipboardData` interface and finally, resort to usual `prompt` with proper text content and message.
# Example
```js
import copy from 'copy-to-clipboard';
copy('Text');
// Copy with options
copy('Text', {
debug: true,
message: 'Press #{key} to copy',
});
```
# API
`copy(text: string, options: object): boolean` &mdash; tries to copy text to clipboard. Returns `true` if no additional keystrokes were required from user (so, `execCommand`, IE's `clipboardData` worked) or `false`.
|Value |Default |Notes|
|------|--------|-----|
|options.debug |false| `Boolean`. Optional. Enable output to console. |
|options.message|Copy to clipboard: `#{key}`, Enter| `String`. Optional. Prompt message. `*` |
|options.format|"text/html"| `String`. Optional. Set the MIME type of what you want to copy as. Use `text/html` to copy as HTML, `text/plain` to avoid inherited styles showing when pasted into rich text editor. |
|options.onCopy|null| `function onCopy(clipboardData: object): void`. Optional. Receives the clipboardData element for adding custom behavior such as additional formats |
`*` all occurrences of `#{key}` are replaced with `⌘+C` for macOS/iOS users, and `Ctrl+C` otherwise.
# [Browser support](http://caniuse.com/#feat=document-execcommand)
Works everywhere where `prompt`* is available. Works best (i.e. without additional keystrokes) in Chrome, FF, Safari 10+, and, supposedly, IE/Edge.
Note: **does not work on some older iOS devices.**
`*` even though **Safari 8** has `prompt`, you cannot specify prefilled content for prompt modal thus it **doesn't work** as expected.
# Installation
+ Can be used as npm package and then leveraged using commonjs bundler/loader:
```
npm i --save copy-to-clipboard
```
+ Can be utilized using [wzrd.in](https://wzrd.in/). Add following script to your page:
```html
<script src="https://wzrd.in/standalone/copy-to-clipboard@latest" async></script>
```
You will have `window.copyToClipboard` exposed for you to use.
# UI components based on this package:
+ [react-copy-to-clipboard](https://github.com/nkbt/react-copy-to-clipboard)
+ [copy-button](https://github.com/sudodoki/copy-button)
# See also:
+ [clipboard-copy](https://github.com/feross/clipboard-copy) by [@feross](https://github.com/feross)
+ [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#Browser_Compatibility)
+ [April 2015 update on Cut and Copy Commands](http://updates.html5rocks.com/2015/04/cut-and-copy-commands)
# Running Tests
This project has some automated tests, that will run using [nightwatch](nightwatchjs.org) on top of [selenium](http://www.seleniumhq.org/).
```
npm i
npm test
```
# Typescript
This library has built-in Typescript definitions.
```
import * as copy from 'copy-to-clipboard';
```

35
web/node_modules/copy-to-clipboard/example/example.css generated vendored Normal file
View File

@@ -0,0 +1,35 @@
html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, dl,
dt, dd, blockquote, address {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}
.container {
overflow: hidden;
}
.half:first-child {
padding-left: 20px;
}
.half:last-child {
padding-right: 20px;
}
@media screen and (max-width: 568px) {
.half {
width: 100% !important;
padding-left: 20px;
padding-right: 20px;
}
}
.half {
width: 50%;
float: left;
padding: 10px;
}
.code {
font-size: 18px;
min-height: 150px;
}

1
web/node_modules/copy-to-clipboard/example/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).copyToClipboard=e()}}(function(){return function a(i,c,l){function s(t,e){if(!c[t]){if(!i[t]){var o="function"==typeof require&&require;if(!e&&o)return o(t,!0);if(u)return u(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var r=c[t]={exports:{}};i[t][0].call(r.exports,function(e){return s(i[t][1][e]||e)},r,r.exports,a,i,c,l)}return c[t].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)s(l[e]);return s}({1:[function(e,t,o){"use strict";var s=e("toggle-selection"),u={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(o,n){var r,t,e,a,i,c,l=!1;n||(n={}),r=n.debug||!1;try{if(e=s(),a=document.createRange(),i=document.getSelection(),(c=document.createElement("span")).textContent=o,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(e){if(e.stopPropagation(),n.format)if(e.preventDefault(),void 0===e.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var t=u[n.format]||u.default;window.clipboardData.setData(t,o)}else e.clipboardData.clearData(),e.clipboardData.setData(n.format,o);n.onCopy&&(e.preventDefault(),n.onCopy(e.clipboardData))}),document.body.appendChild(c),a.selectNodeContents(c),i.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(e){r&&console.error("unable to copy using execCommand: ",e),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",o),n.onCopy&&n.onCopy(window.clipboardData),l=!0}catch(e){r&&console.error("unable to copy using clipboardData: ",e),r&&console.error("falling back to prompt"),t=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(t,o)}}finally{i&&("function"==typeof i.removeRange?i.removeRange(a):i.removeAllRanges()),c&&document.body.removeChild(c),e()}return l}},{"toggle-selection":2}],2:[function(e,t,o){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,o=[],n=0;n<t.rangeCount;n++)o.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||o.forEach(function(e){t.addRange(e)}),e&&e.focus()}}},{}]},{},[1])(1)});

14
web/node_modules/copy-to-clipboard/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
// Type definitions for copy-to-clipboard 3.0
// Project: https://github.com/sudodoki/copy-to-clipboard
// Definitions by: Denis Carriere <https://github.com/DenisCarriere>, MartynasZilinskas <https://github.com/MartynasZilinskas>
interface Options {
debug?: boolean;
message?: string;
format?: string; // MIME type
onCopy?: (clipboardData: object) => void;
}
declare function copy(text: string, options?: Options): boolean;
declare namespace copy { }
export = copy;

113
web/node_modules/copy-to-clipboard/index.js generated vendored Executable file
View File

@@ -0,0 +1,113 @@
"use strict";
var deselectCurrent = require("toggle-selection");
var clipboardToIE11Formatting = {
"text/plain": "Text",
"text/html": "Url",
"default": "Text"
}
var defaultMessage = "Copy to clipboard: #{key}, Enter";
function format(message) {
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
return message.replace(/#{\s*key\s*}/g, copyKey);
}
function copy(text, options) {
var debug,
message,
reselectPrevious,
range,
selection,
mark,
success = false;
if (!options) {
options = {};
}
debug = options.debug || false;
try {
reselectPrevious = deselectCurrent();
range = document.createRange();
selection = document.getSelection();
mark = document.createElement("span");
mark.textContent = text;
// reset user styles for span element
mark.style.all = "unset";
// prevents scrolling to the end of the page
mark.style.position = "fixed";
mark.style.top = 0;
mark.style.clip = "rect(0, 0, 0, 0)";
// used to preserve spaces and line breaks
mark.style.whiteSpace = "pre";
// do not inherit user-select (it may be `none`)
mark.style.webkitUserSelect = "text";
mark.style.MozUserSelect = "text";
mark.style.msUserSelect = "text";
mark.style.userSelect = "text";
mark.addEventListener("copy", function(e) {
e.stopPropagation();
if (options.format) {
e.preventDefault();
if (typeof e.clipboardData === "undefined") { // IE 11
debug && console.warn("unable to use e.clipboardData");
debug && console.warn("trying IE specific stuff");
window.clipboardData.clearData();
var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
window.clipboardData.setData(format, text);
} else { // all other browsers
e.clipboardData.clearData();
e.clipboardData.setData(options.format, text);
}
}
if (options.onCopy) {
e.preventDefault();
options.onCopy(e.clipboardData);
}
});
document.body.appendChild(mark);
range.selectNodeContents(mark);
selection.addRange(range);
var successful = document.execCommand("copy");
if (!successful) {
throw new Error("copy command was unsuccessful");
}
success = true;
} catch (err) {
debug && console.error("unable to copy using execCommand: ", err);
debug && console.warn("trying IE specific stuff");
try {
window.clipboardData.setData(options.format || "text", text);
options.onCopy && options.onCopy(window.clipboardData);
success = true;
} catch (err) {
debug && console.error("unable to copy using clipboardData: ", err);
debug && console.error("falling back to prompt");
message = format("message" in options ? options.message : defaultMessage);
window.prompt(message, text);
}
} finally {
if (selection) {
if (typeof selection.removeRange == "function") {
selection.removeRange(range);
} else {
selection.removeAllRanges();
}
}
if (mark) {
document.body.removeChild(mark);
}
reselectPrevious();
}
return success;
}
module.exports = copy;

73
web/node_modules/copy-to-clipboard/package.json generated vendored Normal file
View File

@@ -0,0 +1,73 @@
{
"_from": "copy-to-clipboard@^3.2.0",
"_id": "copy-to-clipboard@3.3.1",
"_inBundle": false,
"_integrity": "sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==",
"_location": "/copy-to-clipboard",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "copy-to-clipboard@^3.2.0",
"name": "copy-to-clipboard",
"escapedName": "copy-to-clipboard",
"rawSpec": "^3.2.0",
"saveSpec": null,
"fetchSpec": "^3.2.0"
},
"_requiredBy": [
"/antd"
],
"_resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz",
"_shasum": "115aa1a9998ffab6196f93076ad6da3b913662ae",
"_spec": "copy-to-clipboard@^3.2.0",
"_where": "/Users/thilina/TestProjects/icehrm-pro/web/node_modules/antd",
"author": {
"name": "sudodoki",
"email": "smd.deluzion@gmail.com"
},
"bugs": {
"url": "https://github.com/sudodoki/copy-to-clipboard/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Aleksej Shvajka",
"url": "https://github.com/shvaikalesh"
}
],
"dependencies": {
"toggle-selection": "^1.0.6"
},
"deprecated": false,
"description": "Copy stuff into clipboard using JS with fallbacks",
"devDependencies": {
"browserify": "^13.0.1",
"nightwatch": "^0.9.1",
"node-static": "^0.7.7",
"selenium-server-standalone-jar": "2.53.0",
"uglify-js": "^3.5.3"
},
"directories": {
"example": "example"
},
"homepage": "https://github.com/sudodoki/copy-to-clipboard#readme",
"keywords": [
"clipboard",
"copy",
"browser"
],
"license": "MIT",
"main": "index.js",
"name": "copy-to-clipboard",
"repository": {
"type": "git",
"url": "git+https://github.com/sudodoki/copy-to-clipboard.git"
},
"scripts": {
"pretest": "browserify ./index.js --standalone copyToClipboard | uglifyjs -cm > example/index.js",
"test": "nightwatch"
},
"types": "index.d.ts",
"version": "3.3.1"
}

1803
web/node_modules/copy-to-clipboard/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load Diff