@visns-studio/visns-components 1.6.11 → 1.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,60 +3,61 @@ import SelectList from "./visns-select-list";
3
3
  import Select, { createFilter } from "react-select";
4
4
 
5
5
  function MultiSelect(props) {
6
- const { inputValue, multi, onChange, options, settings, style } = props;
7
- const [selectOptions, setSelectOptions] = useState([]);
8
-
9
- useEffect(() => {
10
- let _options = [];
11
-
12
- if (options.length > 0) {
13
- options.forEach((a) => {
14
- let _optionItem = {
15
- value: a.id,
16
- label: a.label,
17
- };
18
-
19
- Object.keys(a).forEach((b) => {
20
- if (b !== "id") {
21
- _optionItem = {
22
- ..._optionItem,
23
- [b]: a[b],
24
- };
25
- }
26
- });
27
-
28
- _options.push(_optionItem);
29
- });
30
-
31
- setSelectOptions(_options);
32
- }
33
- }, [options]);
34
-
35
- return (
36
- <Select
37
- isClearable
38
- isSearchable
39
- isMulti={multi}
40
- filterOption={createFilter({ ignoreAccents: false })}
41
- components={{ SelectList }}
42
- options={selectOptions}
43
- onChange={(inputValue, action) => {
44
- onChange(inputValue, action, settings.id);
45
- }}
46
- className="visns__ms"
47
- styles={{
48
- menu: (provided) => ({ ...provided, zIndex: 9999 }),
49
- control: (base) => ({
50
- ...base,
51
- minHeight:
52
- style && style.multi_select_height
53
- ? style.multi_select_height
54
- : "52px",
55
- }),
56
- }}
57
- value={inputValue}
58
- />
59
- );
6
+ const { inputValue, multi, onChange, options, settings, style } = props;
7
+ const [selectOptions, setSelectOptions] = useState([]);
8
+
9
+ useEffect(() => {
10
+ let _options = [];
11
+
12
+ if (options.length > 0) {
13
+ options.forEach((a) => {
14
+ let _optionItem = {
15
+ value: a.id,
16
+ label: a.label,
17
+ };
18
+
19
+ Object.keys(a).forEach((b) => {
20
+ if (b !== "id") {
21
+ _optionItem = {
22
+ ..._optionItem,
23
+ [b]: a[b],
24
+ };
25
+ }
26
+ });
27
+
28
+ _options.push(_optionItem);
29
+ });
30
+
31
+ setSelectOptions(_options);
32
+ }
33
+ }, [options]);
34
+
35
+ return (
36
+ <Select
37
+ isClearable
38
+ isSearchable
39
+ isMulti={multi}
40
+ filterOption={createFilter({ ignoreAccents: false })}
41
+ components={{ SelectList }}
42
+ options={selectOptions}
43
+ onChange={(inputValue, action) => {
44
+ onChange(inputValue, action, settings.id);
45
+ }}
46
+ className="visns__ms"
47
+ classNamePrefix="visns-select"
48
+ styles={{
49
+ menu: (provided) => ({ ...provided, zIndex: 9999 }),
50
+ control: (base) => ({
51
+ ...base,
52
+ minHeight:
53
+ style && style.multi_select_height
54
+ ? style.multi_select_height
55
+ : "52px",
56
+ }),
57
+ }}
58
+ value={inputValue}
59
+ />
60
+ );
60
61
  }
61
62
 
62
63
  export default MultiSelect;
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
1
  {
2
- "dependencies": {
3
- "@inovua/reactdatagrid-community": "^5.9.4",
4
- "akar-icons": "^1.9.28",
5
- "awesome-debounce-promise": "^2.1.0",
6
- "axios": "^1.4.0",
7
- "framer-motion": "^10.12.16",
8
- "html-react-parser": "^4.0.0",
9
- "lodash": "^4.17.21",
10
- "moment": "^2.29.4",
11
- "numeral": "^2.0.6",
12
- "quill-image-uploader": "^1.3.0",
13
- "react-confirm-alert": "^3.0.6",
14
- "react-datepicker": "^4.14.0",
15
- "react-dropzone": "^14.2.3",
16
- "react-number-format": "^5.2.2",
17
- "react-promise-tracker": "^2.1.1",
18
- "react-quill": "^2.0.0",
19
- "react-select": "^5.7.3",
20
- "react-slugify": "^3.0.2",
21
- "react-sortable-hoc": "^2.0.0",
22
- "react-toastify": "^9.1.3",
23
- "react-toggle": "^4.1.3",
24
- "react-tooltip": "^5.14.0",
25
- "react-window": "^1.8.9",
26
- "reactjs-popup": "^2.0.5"
27
- },
28
- "devDependecies": {
29
- "react": "^18.2.0",
30
- "react-dom": "^18.2.0"
31
- },
32
- "peerDependencies": {
33
- "react": "^17.0.1",
34
- "react-dom": "^17.0.1"
35
- },
36
- "name": "@visns-studio/visns-components",
37
- "version": "1.6.11",
38
- "description": "Various packages to assist in the development of our Custom Applications.",
39
- "main": "index.js",
40
- "devDependencies": {},
41
- "scripts": {
42
- "test": "echo \"Error: no test specified\" && exit 1"
43
- },
44
- "repository": {
45
- "type": "git",
46
- "url": "git+https://github.com/visnsstudio/visns-components.git"
47
- },
48
- "author": "Visns Studio",
49
- "license": "ISC",
50
- "bugs": {
51
- "url": "https://github.com/visnsstudio/visns-components/issues"
52
- },
53
- "homepage": "https://github.com/visnsstudio/visns-components#readme"
2
+ "dependencies": {
3
+ "@inovua/reactdatagrid-community": "^5.9.4",
4
+ "akar-icons": "^1.9.28",
5
+ "awesome-debounce-promise": "^2.1.0",
6
+ "axios": "^1.4.0",
7
+ "framer-motion": "^10.12.16",
8
+ "html-react-parser": "^4.0.0",
9
+ "lodash": "^4.17.21",
10
+ "moment": "^2.29.4",
11
+ "numeral": "^2.0.6",
12
+ "quill-image-uploader": "^1.3.0",
13
+ "react-confirm-alert": "^3.0.6",
14
+ "react-datepicker": "^4.14.0",
15
+ "react-dropzone": "^14.2.3",
16
+ "react-number-format": "^5.2.2",
17
+ "react-promise-tracker": "^2.1.1",
18
+ "react-quill": "^2.0.0",
19
+ "react-select": "^5.7.3",
20
+ "react-slugify": "^3.0.2",
21
+ "react-sortable-hoc": "^2.0.0",
22
+ "react-toastify": "^9.1.3",
23
+ "react-toggle": "^4.1.3",
24
+ "react-tooltip": "^5.14.0",
25
+ "react-window": "^1.8.9",
26
+ "reactjs-popup": "^2.0.5"
27
+ },
28
+ "devDependecies": {
29
+ "react": "^18.2.0",
30
+ "react-dom": "^18.2.0"
31
+ },
32
+ "peerDependencies": {
33
+ "react": "^17.0.1",
34
+ "react-dom": "^17.0.1"
35
+ },
36
+ "name": "@visns-studio/visns-components",
37
+ "version": "1.6.12",
38
+ "description": "Various packages to assist in the development of our Custom Applications.",
39
+ "main": "index.js",
40
+ "devDependencies": {},
41
+ "scripts": {
42
+ "test": "echo \"Error: no test specified\" && exit 1"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/visnsstudio/visns-components.git"
47
+ },
48
+ "author": "Visns Studio",
49
+ "license": "ISC",
50
+ "bugs": {
51
+ "url": "https://github.com/visnsstudio/visns-components/issues"
52
+ },
53
+ "homepage": "https://github.com/visnsstudio/visns-components#readme"
54
54
  }