Latest updates from IceHrmPro
This commit is contained in:
4
web/node_modules/component-classes/.npmignore
generated
vendored
Normal file
4
web/node_modules/component-classes/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
support
|
||||
test
|
||||
examples
|
||||
*.sock
|
||||
74
web/node_modules/component-classes/History.md
generated
vendored
Normal file
74
web/node_modules/component-classes/History.md
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
1.2.6 / 2016-04-01
|
||||
==================
|
||||
|
||||
* fix: properly fix `component-indexof` require (#29, @ockham)
|
||||
|
||||
1.2.5 / 2016-02-28
|
||||
==================
|
||||
|
||||
* package: don't use browser alias for component-indexof dependency (#27, @ockham)
|
||||
|
||||
1.2.4 / 2015-03-17
|
||||
==================
|
||||
|
||||
* fix: classes(el).array() when el is an svg element.
|
||||
|
||||
1.2.3 / 2014-11-19
|
||||
==================
|
||||
|
||||
* index: Improve HTMLElement duck typing
|
||||
* Readme: Display new test command
|
||||
* Makefile: Install and use local component binaries
|
||||
* package: Add component dev deps
|
||||
* test: Use component/assert
|
||||
|
||||
1.2.2 / 2014-10-27
|
||||
==================
|
||||
|
||||
* bump version to 1.2.2
|
||||
* pin component-indexof to 0.0.3 in package.json
|
||||
* package: add "license" field
|
||||
|
||||
1.2.1 / 2014-02-10
|
||||
==================
|
||||
|
||||
* package: use "component-indexof"
|
||||
|
||||
1.2.0 / 2014-01-16
|
||||
==================
|
||||
|
||||
* add `.toggle()` force parameter
|
||||
* change npm package name to `component-classes`
|
||||
|
||||
1.1.4 / 2013-11-14
|
||||
==================
|
||||
|
||||
* package: allow any "indexof-component" version
|
||||
* add repository field to `package.json`
|
||||
|
||||
1.1.3 / 2013-08-02
|
||||
==================
|
||||
|
||||
* add browser field to map indexof -> indexof-component
|
||||
* throw an Error if no DOM element is given
|
||||
|
||||
1.1.2 / 2013-06-10
|
||||
==================
|
||||
|
||||
* fix leading / trailing whitespace leading to empty string in .array() retval
|
||||
|
||||
1.1.0 / 2013-01-30
|
||||
==================
|
||||
|
||||
* add .remove(regexp) support
|
||||
|
||||
0.0.2 / 2012-08-01
|
||||
==================
|
||||
|
||||
* add support for <body> tags. Closes #1 [domenic]
|
||||
|
||||
0.0.1 / 2010-01-03
|
||||
==================
|
||||
|
||||
* Initial release
|
||||
22
web/node_modules/component-classes/Makefile
generated
vendored
Normal file
22
web/node_modules/component-classes/Makefile
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
BIN := node_modules/.bin
|
||||
|
||||
build: node_modules build/build.js
|
||||
build/build.js: index.js components
|
||||
@mkdir -p $(dir $@)
|
||||
@$(BIN)/component-build --dev
|
||||
|
||||
components: node_modules component.json
|
||||
@$(BIN)/component-install --dev
|
||||
|
||||
test: build/build.js
|
||||
$(BIN)/component-test browser
|
||||
|
||||
clean:
|
||||
rm -fr build components
|
||||
|
||||
node_modules: package.json
|
||||
@npm install
|
||||
@touch $@
|
||||
|
||||
.PHONY: clean test
|
||||
52
web/node_modules/component-classes/Readme.md
generated
vendored
Normal file
52
web/node_modules/component-classes/Readme.md
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
# classes
|
||||
|
||||
Cross-browser element class manipulation, utilizing the native `.classList` when possible. This is not designed to be a `.classList` polyfill.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ component install component/classes
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var classes = require('classes');
|
||||
classes(el)
|
||||
.add('foo')
|
||||
.toggle('bar')
|
||||
.remove(/^item-\d+/);
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### .add(class)
|
||||
|
||||
Add `class`.
|
||||
|
||||
### .remove(class)
|
||||
|
||||
Remove `class` name or all classes matching the given regular expression.
|
||||
|
||||
### .toggle(class)
|
||||
|
||||
Toggle `class`.
|
||||
|
||||
### .has(class)
|
||||
|
||||
Check if `class` is present.
|
||||
|
||||
### .array()
|
||||
|
||||
Return an array of classes.
|
||||
|
||||
## Test
|
||||
|
||||
```sh
|
||||
$ make test
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
21
web/node_modules/component-classes/component.json
generated
vendored
Normal file
21
web/node_modules/component-classes/component.json
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "classes",
|
||||
"version": "1.2.6",
|
||||
"description": "Cross-browser element class list",
|
||||
"keywords": [
|
||||
"dom",
|
||||
"html",
|
||||
"classList",
|
||||
"class",
|
||||
"ui"
|
||||
],
|
||||
"scripts": [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"component/indexof": "*"
|
||||
},
|
||||
"development": {
|
||||
"component/assert": "*"
|
||||
}
|
||||
}
|
||||
191
web/node_modules/component-classes/index.js
generated
vendored
Normal file
191
web/node_modules/component-classes/index.js
generated
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
try {
|
||||
var index = require('indexof');
|
||||
} catch (err) {
|
||||
var index = require('component-indexof');
|
||||
}
|
||||
|
||||
/**
|
||||
* Whitespace regexp.
|
||||
*/
|
||||
|
||||
var re = /\s+/;
|
||||
|
||||
/**
|
||||
* toString reference.
|
||||
*/
|
||||
|
||||
var toString = Object.prototype.toString;
|
||||
|
||||
/**
|
||||
* Wrap `el` in a `ClassList`.
|
||||
*
|
||||
* @param {Element} el
|
||||
* @return {ClassList}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function(el){
|
||||
return new ClassList(el);
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize a new ClassList for `el`.
|
||||
*
|
||||
* @param {Element} el
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function ClassList(el) {
|
||||
if (!el || !el.nodeType) {
|
||||
throw new Error('A DOM element reference is required');
|
||||
}
|
||||
this.el = el;
|
||||
this.list = el.classList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add class `name` if not already present.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {ClassList}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
ClassList.prototype.add = function(name){
|
||||
// classList
|
||||
if (this.list) {
|
||||
this.list.add(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
// fallback
|
||||
var arr = this.array();
|
||||
var i = index(arr, name);
|
||||
if (!~i) arr.push(name);
|
||||
this.el.className = arr.join(' ');
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove class `name` when present, or
|
||||
* pass a regular expression to remove
|
||||
* any which match.
|
||||
*
|
||||
* @param {String|RegExp} name
|
||||
* @return {ClassList}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
ClassList.prototype.remove = function(name){
|
||||
if ('[object RegExp]' == toString.call(name)) {
|
||||
return this.removeMatching(name);
|
||||
}
|
||||
|
||||
// classList
|
||||
if (this.list) {
|
||||
this.list.remove(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
// fallback
|
||||
var arr = this.array();
|
||||
var i = index(arr, name);
|
||||
if (~i) arr.splice(i, 1);
|
||||
this.el.className = arr.join(' ');
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove all classes matching `re`.
|
||||
*
|
||||
* @param {RegExp} re
|
||||
* @return {ClassList}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
ClassList.prototype.removeMatching = function(re){
|
||||
var arr = this.array();
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (re.test(arr[i])) {
|
||||
this.remove(arr[i]);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggle class `name`, can force state via `force`.
|
||||
*
|
||||
* For browsers that support classList, but do not support `force` yet,
|
||||
* the mistake will be detected and corrected.
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {Boolean} force
|
||||
* @return {ClassList}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
ClassList.prototype.toggle = function(name, force){
|
||||
// classList
|
||||
if (this.list) {
|
||||
if ("undefined" !== typeof force) {
|
||||
if (force !== this.list.toggle(name, force)) {
|
||||
this.list.toggle(name); // toggle again to correct
|
||||
}
|
||||
} else {
|
||||
this.list.toggle(name);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
// fallback
|
||||
if ("undefined" !== typeof force) {
|
||||
if (!force) {
|
||||
this.remove(name);
|
||||
} else {
|
||||
this.add(name);
|
||||
}
|
||||
} else {
|
||||
if (this.has(name)) {
|
||||
this.remove(name);
|
||||
} else {
|
||||
this.add(name);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return an array of classes.
|
||||
*
|
||||
* @return {Array}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
ClassList.prototype.array = function(){
|
||||
var className = this.el.getAttribute('class') || '';
|
||||
var str = className.replace(/^\s+|\s+$/g, '');
|
||||
var arr = str.split(re);
|
||||
if ('' === arr[0]) arr.shift();
|
||||
return arr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if class `name` is present.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {ClassList}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
ClassList.prototype.has =
|
||||
ClassList.prototype.contains = function(name){
|
||||
return this.list
|
||||
? this.list.contains(name)
|
||||
: !! ~index(this.array(), name);
|
||||
};
|
||||
62
web/node_modules/component-classes/package.json
generated
vendored
Normal file
62
web/node_modules/component-classes/package.json
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"_from": "component-classes@^1.2.5",
|
||||
"_id": "component-classes@1.2.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-xkI5TDYYpNiwuJGe/Mu9kw5c1pE=",
|
||||
"_location": "/component-classes",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "component-classes@^1.2.5",
|
||||
"name": "component-classes",
|
||||
"escapedName": "component-classes",
|
||||
"rawSpec": "^1.2.5",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.2.5"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/css-animation",
|
||||
"/rc-table"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/component-classes/-/component-classes-1.2.6.tgz",
|
||||
"_shasum": "c642394c3618a4d8b0b8919efccbbd930e5cd691",
|
||||
"_spec": "component-classes@^1.2.5",
|
||||
"_where": "/Users/thilina/TestProjects/icehrm-pro/web/node_modules/css-animation",
|
||||
"browser": {
|
||||
"indexof": "component-indexof"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/component/classes/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"component": {
|
||||
"scripts": {
|
||||
"classes/index.js": "index.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"component-indexof": "0.0.3"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Cross-browser element class list",
|
||||
"devDependencies": {
|
||||
"component": "^0.19.9",
|
||||
"component-test": "^0.1.4"
|
||||
},
|
||||
"homepage": "https://github.com/component/classes#readme",
|
||||
"keywords": [
|
||||
"dom",
|
||||
"html",
|
||||
"classList",
|
||||
"class",
|
||||
"ui"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "component-classes",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/component/classes.git"
|
||||
},
|
||||
"version": "1.2.6"
|
||||
}
|
||||
Reference in New Issue
Block a user