Add yet-another-react-lightbox package and update .gitignore to exclude node_modules
This commit is contained in:
22
frontend/node_modules/attr-accept/LICENSE
generated
vendored
22
frontend/node_modules/attr-accept/LICENSE
generated
vendored
@@ -1,22 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Andrey Okonetchnikov
|
||||
|
||||
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.
|
||||
|
||||
48
frontend/node_modules/attr-accept/README.md
generated
vendored
48
frontend/node_modules/attr-accept/README.md
generated
vendored
@@ -1,48 +0,0 @@
|
||||
# attr-accept
|
||||
> JavaScript implementation of the "accept" attribute for HTML5 `<input type="file">`
|
||||
|
||||
[](https://www.npmjs.com/package/attr-accept)
|
||||

|
||||
|
||||
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept for more information.
|
||||
|
||||
## Installation
|
||||
```sh
|
||||
npm install --save attr-accept
|
||||
```
|
||||
|
||||
## Usage
|
||||
```javascript
|
||||
var accept = require('attr-accept');
|
||||
accept({
|
||||
name: 'my file.png',
|
||||
type: 'image/png'
|
||||
}, 'image/*') // => true
|
||||
|
||||
accept({
|
||||
name: 'my file.json',
|
||||
type: 'application/json'
|
||||
}, 'image/*') // => false
|
||||
|
||||
accept({
|
||||
name: 'my file.srt',
|
||||
type: ''
|
||||
}, '.srt') // => true
|
||||
```
|
||||
|
||||
You can also pass multiple mime types as a comma delimited string or array.
|
||||
```javascript
|
||||
accept({
|
||||
name: 'my file.json',
|
||||
type: 'application/json'
|
||||
}, 'application/json,video/*') // => true
|
||||
|
||||
accept({
|
||||
name: 'my file.json',
|
||||
type: 'application/json'
|
||||
}, ['application/json', 'video/*']) // => true
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Checkout the organization [CONTRIBUTING.md](https://github.com/react-dropzone/.github/blob/main/CONTRIBUTING.md).
|
||||
31
frontend/node_modules/attr-accept/dist/es/index.js
generated
vendored
31
frontend/node_modules/attr-accept/dist/es/index.js
generated
vendored
@@ -1,31 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
exports.default = function (file, acceptedFiles) {
|
||||
if (file && acceptedFiles) {
|
||||
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
|
||||
|
||||
if (acceptedFilesArray.length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var fileName = file.name || '';
|
||||
var mimeType = (file.type || '').toLowerCase();
|
||||
var baseMimeType = mimeType.replace(/\/.*$/, '');
|
||||
return acceptedFilesArray.some(function (type) {
|
||||
var validType = type.trim().toLowerCase();
|
||||
|
||||
if (validType.charAt(0) === '.') {
|
||||
return fileName.toLowerCase().endsWith(validType);
|
||||
} else if (validType.endsWith('/*')) {
|
||||
// This is something like a image/* mime type
|
||||
return baseMimeType === validType.replace(/\/.*$/, '');
|
||||
}
|
||||
|
||||
return mimeType === validType;
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
1
frontend/node_modules/attr-accept/dist/index.js
generated
vendored
1
frontend/node_modules/attr-accept/dist/index.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";r.__esModule=!0,r.default=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(",");if(0===t.length)return!0;var n=e.name||"",o=(e.type||"").toLowerCase(),u=o.replace(/\/.*$/,"");return t.some((function(e){var r=e.trim().toLowerCase();return"."===r.charAt(0)?n.toLowerCase().endsWith(r):r.endsWith("/*")?u===r.replace(/\/.*$/,""):o===r}))}return!0}}]);
|
||||
1
frontend/node_modules/attr-accept/index.d.ts
generated
vendored
1
frontend/node_modules/attr-accept/index.d.ts
generated
vendored
@@ -1 +0,0 @@
|
||||
export default function accept(file: { name?: string, type?: string }, acceptedFiles: string | string[]): boolean;
|
||||
115
frontend/node_modules/attr-accept/package.json
generated
vendored
115
frontend/node_modules/attr-accept/package.json
generated
vendored
@@ -1,115 +0,0 @@
|
||||
{
|
||||
"name": "attr-accept",
|
||||
"description": "JavaScript implementation of the \"accept\" attribute for HTML5 <input type=\"file\">",
|
||||
"version": "2.2.5",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/es/index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
"index.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "rimraf ./dist",
|
||||
"build": "npm run clean && npm run build:cjs && npm run build:es",
|
||||
"build:cjs": "webpack -p",
|
||||
"build:es": "cross-env BABEL_ENV=es babel ./src --out-dir ./dist/es --ignore '**/*.spec.js'",
|
||||
"prepublish": "npm test && npm run build",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --require @babel/register --recursive",
|
||||
"test:watch": "npm test -- --watch",
|
||||
"test:cov": "nyc --reporter=lcov --reporter=text mocha --require @babel/register --recursive",
|
||||
"lint": "eslint src/ test/",
|
||||
"precommit": "lint-staged",
|
||||
"size": "size-limit",
|
||||
"size:why": "size-limit --why"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/react-dropzone/attr-accept.git"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"html5",
|
||||
"input",
|
||||
"tag",
|
||||
"attribute",
|
||||
"attr",
|
||||
"accept",
|
||||
"file"
|
||||
],
|
||||
"author": "Andrey Okonetchnikov @okonetchnikov",
|
||||
"contributors": [
|
||||
"Andrey Okonetchnikov <andrey@okonet.ru> (http://okonet.ru)",
|
||||
"Roland Groza <rolandjitsu@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/react-dropzone/attr-accept/issues"
|
||||
},
|
||||
"homepage": "https://github.com/react-dropzone/attr-accept#readme",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.6.4",
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/plugin-external-helpers": "^7.2.0",
|
||||
"@babel/plugin-proposal-do-expressions": "^7.6.0",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.5.2",
|
||||
"@babel/plugin-proposal-logical-assignment-operators": "^7.2.0",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
|
||||
"@babel/plugin-proposal-pipeline-operator": "^7.5.0",
|
||||
"@babel/plugin-transform-runtime": "^7.6.2",
|
||||
"@babel/preset-env": "^7.6.3",
|
||||
"@babel/preset-react": "^7.6.3",
|
||||
"@babel/register": "^7.6.2",
|
||||
"@commitlint/cli": "^8.2.0",
|
||||
"@size-limit/preset-small-lib": "^2.1.6",
|
||||
"babel-eslint": "^8.0.0",
|
||||
"babel-loader": "^8.0.0",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"core-js": "^3.1.4",
|
||||
"cross-env": "^6.0.3",
|
||||
"cz-conventional-changelog": "^1.2.0",
|
||||
"eslint": "^4.6.1",
|
||||
"eslint-config-airbnb": "^15.1.0",
|
||||
"eslint-config-okonet": "^6.1.3",
|
||||
"eslint-config-prettier": "^2.4.0",
|
||||
"eslint-plugin-flowtype": "^2.35.1",
|
||||
"eslint-plugin-import": "^2.7.0",
|
||||
"eslint-plugin-jsx-a11y": "^5.1.1",
|
||||
"eslint-plugin-node": "^5.1.1",
|
||||
"eslint-plugin-prettier": "^2.2.0",
|
||||
"eslint-plugin-react": "^7.3.0",
|
||||
"expect": "^1.20.2",
|
||||
"husky": "^0.14.3",
|
||||
"lint-staged": "^4.1.3",
|
||||
"mocha": "^9.2.2",
|
||||
"nyc": "^15.1.0",
|
||||
"prettier": "^1.6.1",
|
||||
"rimraf": "^3.0.0",
|
||||
"webpack": "^4.0.0",
|
||||
"webpack-cli": "^3.3.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "dist/index.js",
|
||||
"limit": "2 KB"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user