@visns-studio/visns-components 1.6.11 → 1.6.13
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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;
|
|
@@ -151,28 +151,30 @@ function Notification(props) {
|
|
|
151
151
|
{items.length > 0 ? (
|
|
152
152
|
<div className={containerClass}>
|
|
153
153
|
{items.map((item, index) => (
|
|
154
|
-
<div className=
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
154
|
+
<div className="notiscrollwrap" key={item.id}>
|
|
155
|
+
<div className={divClass}>
|
|
156
|
+
<Bell
|
|
157
|
+
size={19}
|
|
158
|
+
strokeWidth={2}
|
|
159
|
+
className={iconBellClass}
|
|
160
|
+
/>{" "}
|
|
161
|
+
{parse(item.data.label)}{" "}
|
|
162
|
+
<span>
|
|
163
|
+
[
|
|
164
|
+
{moment(item.created_at).format(
|
|
165
|
+
"DD/MM - H:mma"
|
|
166
|
+
)}
|
|
167
|
+
]
|
|
168
|
+
</span>{" "}
|
|
169
|
+
<button onClick={markAsRead}>
|
|
170
|
+
<CircleX
|
|
171
|
+
size={24}
|
|
172
|
+
data-id={item.id}
|
|
173
|
+
data-index={index}
|
|
174
|
+
className={iconXClass}
|
|
175
|
+
/>
|
|
176
|
+
</button>
|
|
177
|
+
</div>
|
|
176
178
|
</div>
|
|
177
179
|
))}
|
|
178
180
|
<div className={actionClass}>
|
package/package.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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.13",
|
|
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
|
}
|