This commit is contained in:
Victor 2022-12-23 18:58:26 +03:00
parent 5ef6eddd88
commit 005f732424
6 changed files with 43 additions and 122 deletions

View File

@ -91,7 +91,7 @@ const dropdown = new DropDown({
Совместимость с приложениями | JS | React | Angular | Vue | Совместимость с приложениями | JS | React | Angular | Vue |
| -------------------------- | :--: | :-----: | :-----: | :--: | | -------------------------- | :--: | :-----: | :-----: | :--: |
| CG-SELECT | ![image](https://github.com/apuc/cg-select/blob/main/src/images/yes.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/yes.png) ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png)| | CG-SELECT | ![image](https://github.com/apuc/cg-select/blob/main/src/images/yes.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/yes.png) ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png) | ![image](https://github.com/apuc/cg-select/blob/main/src/images/no.png)|
| Комментарий | Протестированн в Js приложениях и работает успешно.|Работает только с костылем в виде `setTimeout()` | тесты не проведены| тесты не проведены | | Комментарий | Протестирован в Js приложениях и работает успешно.|Работает только с костылем в виде `setTimeout()` | тесты не проведены| тесты не проведены |
## History ## History

132
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "dropdown-list", "name": "cg-select",
"version": "0.0.1", "version": "0.1.14",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "dropdown-list", "name": "cg-select",
"version": "0.0.1", "version": "0.1.14",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@parcel/optimizer-css": "^2.8.0", "@parcel/optimizer-css": "^2.8.0",
@ -774,45 +774,6 @@
"url": "https://opencollective.com/parcel" "url": "https://opencollective.com/parcel"
} }
}, },
"node_modules/@parcel/optimizer-css/node_modules/@parcel/core": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.8.0.tgz",
"integrity": "sha512-udzbe3jjbpfKlRE9pdlROAa+lvAjS1L/AzN6r2j1y/Fsn7ze/NfvnCFw6o2YNIrXg002aQ7M1St/x1fdGfmVKA==",
"peer": true,
"dependencies": {
"@mischnic/json-sourcemap": "^0.1.0",
"@parcel/cache": "2.8.0",
"@parcel/diagnostic": "2.8.0",
"@parcel/events": "2.8.0",
"@parcel/fs": "2.8.0",
"@parcel/graph": "2.8.0",
"@parcel/hash": "2.8.0",
"@parcel/logger": "2.8.0",
"@parcel/package-manager": "2.8.0",
"@parcel/plugin": "2.8.0",
"@parcel/source-map": "^2.1.1",
"@parcel/types": "2.8.0",
"@parcel/utils": "2.8.0",
"@parcel/workers": "2.8.0",
"abortcontroller-polyfill": "^1.1.9",
"base-x": "^3.0.8",
"browserslist": "^4.6.6",
"clone": "^2.1.1",
"dotenv": "^7.0.0",
"dotenv-expand": "^5.1.0",
"json5": "^2.2.0",
"msgpackr": "^1.5.4",
"nullthrows": "^1.1.1",
"semver": "^5.7.1"
},
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/optimizer-css/node_modules/@parcel/diagnostic": { "node_modules/@parcel/optimizer-css/node_modules/@parcel/diagnostic": {
"version": "2.8.0", "version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.8.0.tgz", "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.8.0.tgz",
@ -878,23 +839,6 @@
"url": "https://opencollective.com/parcel" "url": "https://opencollective.com/parcel"
} }
}, },
"node_modules/@parcel/optimizer-css/node_modules/@parcel/graph": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.8.0.tgz",
"integrity": "sha512-JvAyvBpGmhZ30bi+hStQr52eu+InfJBoiN9Z/32byIWhXEl02EAOwfsPqAe+FGCsdgXnnCGg5F9ZCqwzZ9dwbw==",
"peer": true,
"dependencies": {
"@parcel/utils": "2.8.0",
"nullthrows": "^1.1.1"
},
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/optimizer-css/node_modules/@parcel/hash": { "node_modules/@parcel/optimizer-css/node_modules/@parcel/hash": {
"version": "2.8.0", "version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.8.0.tgz", "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.8.0.tgz",
@ -1778,7 +1722,8 @@
"node_modules/abortcontroller-polyfill": { "node_modules/abortcontroller-polyfill": {
"version": "1.7.3", "version": "1.7.3",
"resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz",
"integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==" "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==",
"dev": true
}, },
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.8.0", "version": "8.8.0",
@ -1855,6 +1800,7 @@
"version": "3.0.9", "version": "3.0.9",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",
"integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==",
"dev": true,
"dependencies": { "dependencies": {
"safe-buffer": "^5.0.1" "safe-buffer": "^5.0.1"
} }
@ -2006,6 +1952,7 @@
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true,
"engines": { "engines": {
"node": ">=0.8" "node": ">=0.8"
} }
@ -2193,6 +2140,7 @@
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz",
"integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==", "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==",
"dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -2200,7 +2148,8 @@
"node_modules/dotenv-expand": { "node_modules/dotenv-expand": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
"dev": true
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.251", "version": "1.4.251",
@ -3302,6 +3251,7 @@
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true,
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@ -4070,38 +4020,6 @@
"chalk": "^4.1.0" "chalk": "^4.1.0"
} }
}, },
"@parcel/core": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.8.0.tgz",
"integrity": "sha512-udzbe3jjbpfKlRE9pdlROAa+lvAjS1L/AzN6r2j1y/Fsn7ze/NfvnCFw6o2YNIrXg002aQ7M1St/x1fdGfmVKA==",
"peer": true,
"requires": {
"@mischnic/json-sourcemap": "^0.1.0",
"@parcel/cache": "2.8.0",
"@parcel/diagnostic": "2.8.0",
"@parcel/events": "2.8.0",
"@parcel/fs": "2.8.0",
"@parcel/graph": "2.8.0",
"@parcel/hash": "2.8.0",
"@parcel/logger": "2.8.0",
"@parcel/package-manager": "2.8.0",
"@parcel/plugin": "2.8.0",
"@parcel/source-map": "^2.1.1",
"@parcel/types": "2.8.0",
"@parcel/utils": "2.8.0",
"@parcel/workers": "2.8.0",
"abortcontroller-polyfill": "^1.1.9",
"base-x": "^3.0.8",
"browserslist": "^4.6.6",
"clone": "^2.1.1",
"dotenv": "^7.0.0",
"dotenv-expand": "^5.1.0",
"json5": "^2.2.0",
"msgpackr": "^1.5.4",
"nullthrows": "^1.1.1",
"semver": "^5.7.1"
}
},
"@parcel/diagnostic": { "@parcel/diagnostic": {
"version": "2.8.0", "version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.8.0.tgz", "resolved": "https://registry.npmjs.org/@parcel/diagnostic/-/diagnostic-2.8.0.tgz",
@ -4136,16 +4054,6 @@
"detect-libc": "^1.0.3" "detect-libc": "^1.0.3"
} }
}, },
"@parcel/graph": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/graph/-/graph-2.8.0.tgz",
"integrity": "sha512-JvAyvBpGmhZ30bi+hStQr52eu+InfJBoiN9Z/32byIWhXEl02EAOwfsPqAe+FGCsdgXnnCGg5F9ZCqwzZ9dwbw==",
"peer": true,
"requires": {
"@parcel/utils": "2.8.0",
"nullthrows": "^1.1.1"
}
},
"@parcel/hash": { "@parcel/hash": {
"version": "2.8.0", "version": "2.8.0",
"resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.8.0.tgz", "resolved": "https://registry.npmjs.org/@parcel/hash/-/hash-2.8.0.tgz",
@ -4702,7 +4610,8 @@
"abortcontroller-polyfill": { "abortcontroller-polyfill": {
"version": "1.7.3", "version": "1.7.3",
"resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz", "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz",
"integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==" "integrity": "sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q==",
"dev": true
}, },
"acorn": { "acorn": {
"version": "8.8.0", "version": "8.8.0",
@ -4758,6 +4667,7 @@
"version": "3.0.9", "version": "3.0.9",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",
"integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==",
"dev": true,
"requires": { "requires": {
"safe-buffer": "^5.0.1" "safe-buffer": "^5.0.1"
} }
@ -4853,7 +4763,8 @@
"clone": { "clone": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
"integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true
}, },
"color-convert": { "color-convert": {
"version": "2.0.1", "version": "2.0.1",
@ -4988,12 +4899,14 @@
"dotenv": { "dotenv": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz",
"integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==" "integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==",
"dev": true
}, },
"dotenv-expand": { "dotenv-expand": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==" "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
"dev": true
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.4.251", "version": "1.4.251",
@ -5717,7 +5630,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true
}, },
"sass": { "sass": {
"version": "1.54.9", "version": "1.54.9",

View File

@ -1,8 +1,12 @@
{ {
"name": "cg-select", "name": "cg-select",
"version": "0.1.14", "version": "0.1.15",
"description": "Select control created with JS for use in JS/React", "description": "Feature rich Select control for React/JS with multiselect, autocomplete and styling",
"author": "MaxOvs19", "author": {
"name": "CraftGroup",
"url": "https://github.com/apuc/"
},
"homepage": "https://cg-select.itguild.info",
"scripts": { "scripts": {
"start": "parcel src/page/index.html -p 4500 --open ", "start": "parcel src/page/index.html -p 4500 --open ",
"build": "parcel build ./src/page/index.html", "build": "parcel build ./src/page/index.html",
@ -11,14 +15,12 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/MaxOvs19/cg-select.git" "url": "git+https://github.com/apuc/cg-select.git"
}, },
"license": "ISC", "license": "ISC",
"bugs": { "bugs": {
"url": "https://github.com/MaxOvs19/cg-select/issues" "url": "https://github.com/apuc/cg-select/issues"
}, },
"homepage": "https://cg-select.itguild.info",
"devDependencies": { "devDependencies": {
"@parcel/transformer-sass": "^2.7.0", "@parcel/transformer-sass": "^2.7.0",
"parcel": "^2.7.0", "parcel": "^2.7.0",
@ -27,5 +29,12 @@
"dependencies": { "dependencies": {
"@parcel/optimizer-css": "^2.8.0", "@parcel/optimizer-css": "^2.8.0",
"gh-pages": "^4.0.0" "gh-pages": "^4.0.0"
} },
"keywords": [
"select",
"autocomplete",
"dropdown",
"multiselect",
"tag"
]
} }

View File

@ -16,12 +16,10 @@ import {
} from './components/create-element'; } from './components/create-element';
import { ru, en } from './language/language'; import { ru, en } from './language/language';
/** /**
* @class Описание класса DropDown * @class Описание класса DropDown
* @description Этот класс реализовывает функционал кастомного селекта, с возможностями кастомизации. * @description Этот класс реализовывает функционал кастомного селекта, с возможностями кастомизации.
*@author Овсяников Максим * @author Овсяников Максим
*/ */
export class DropDown { export class DropDown {
/** /**

View File

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cg-Select</title> <title>Cg-Select</title>
<link href="/src/page/ExemplePage.scss" rel="stylesheet" /> <link href="/src/page/example.scss" rel="stylesheet" />
</head> </head>
<body class="body-example"> <body class="body-example">
<div class="container"> <div class="container">