@visns-studio/visns-components 5.11.1 → 5.11.3
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.
- package/package.json +2 -2
- package/src/components/cms/DataGrid.jsx +8 -8
- package/src/components/cms/DropZone.jsx +1 -1
- package/src/components/cms/Form.jsx +1 -1
- package/src/components/cms/Gallery.jsx +1 -1
- package/src/components/cms/sorting/Item.jsx +1 -1
- package/src/components/crm/AssociationManager.jsx +431 -0
- package/src/components/crm/Autocomplete.jsx +3 -3
- package/src/components/crm/Breadcrumb.jsx +4 -4
- package/src/components/crm/BusinessCardOcr.jsx +681 -95
- package/src/components/crm/ClientAssociationManager.jsx +362 -0
- package/src/components/crm/DataGrid.jsx +34 -32
- package/src/components/crm/Field.jsx +12 -12
- package/src/components/crm/Form.jsx +2 -2
- package/src/components/crm/MergeEntity.jsx +1049 -0
- package/src/components/crm/MultiSelect.jsx +14 -3
- package/src/components/crm/Navigation.jsx +14 -15
- package/src/components/crm/Notification.jsx +2 -2
- package/src/components/crm/QuickAction.jsx +3 -3
- package/src/components/crm/SectionHeader.jsx +1 -1
- package/src/components/crm/SwitchAccount.jsx +4 -4
- package/src/components/crm/auth/ClientLogin.jsx +2 -2
- package/src/components/crm/auth/ClientOTPVerify.jsx +2 -2
- package/src/components/crm/auth/Login.jsx +3 -3
- package/src/components/crm/auth/Reset.jsx +2 -2
- package/src/components/crm/auth/TwoFactorAuth.jsx +2 -2
- package/src/components/crm/cells/CellWithTooltip.jsx +35 -28
- package/src/components/crm/columns/ColumnRenderers.jsx +320 -259
- package/src/components/crm/controls/DataGridSearch.jsx +5 -5
- package/src/components/crm/generic/AlternativeActionModal.jsx +100 -0
- package/src/components/crm/generic/ContactSelectorModal.jsx +59 -16
- package/src/components/crm/generic/DateRangeSelectorModal.jsx +181 -0
- package/src/components/crm/generic/GenericClientPortal.jsx +1 -1
- package/src/components/crm/generic/GenericDashboard.jsx +4 -4
- package/src/components/crm/generic/GenericDetail.jsx +31 -6
- package/src/components/crm/generic/GenericDynamic.jsx +3 -3
- package/src/components/crm/generic/GenericEditableTable.jsx +4 -4
- package/src/components/crm/generic/GenericFormBuilder.jsx +6 -6
- package/src/components/crm/generic/GenericGrid.jsx +1622 -268
- package/src/components/crm/generic/GenericReport.jsx +966 -646
- package/src/components/crm/generic/GenericReportForm.jsx +1 -1
- package/src/components/crm/generic/NotificationList.jsx +1 -1
- package/src/components/crm/generic/ReasonCollectorModal.jsx +194 -0
- package/src/components/crm/generic/SortableQuoteItems.jsx +3 -3
- package/src/components/crm/generic/shared/formatters.js +107 -1
- package/src/components/crm/generic/styles/AlternativeActionModal.css +127 -0
- package/src/components/crm/generic/styles/DateRangeSelectorModal.css +115 -0
- package/src/components/crm/generic/styles/GenericIndex.module.scss +206 -0
- package/src/components/crm/generic/styles/GenericReport.module.scss +96 -0
- package/src/components/crm/generic/styles/ReasonCollectorModal.css +217 -0
- package/src/components/crm/modals/GalleryModal.jsx +2 -2
- package/src/components/crm/sorting/Item.jsx +3 -3
- package/src/components/crm/styles/AssociationManager.module.scss +364 -0
- package/src/components/crm/styles/BusinessCardOcr.module.scss +197 -4
- package/src/components/crm/styles/ClientAssociationManager.module.scss +290 -0
- package/src/components/crm/styles/MergeEntity.module.scss +690 -0
- package/src/components/crm/styles/MultiSelect.module.scss +18 -0
- package/src/components/crm/styles/Navigation.module.scss +68 -8
- package/src/components/crm/styles/global-datagrid.css +9 -0
- package/src/index.js +6 -0
|
@@ -36,16 +36,27 @@ const CustomOption = (props) => {
|
|
|
36
36
|
|
|
37
37
|
// Custom MultiValue component to display description for selected values
|
|
38
38
|
const CustomMultiValue = (props) => {
|
|
39
|
-
const { children, data, ...rest } = props;
|
|
39
|
+
const { children, data, removeProps, settings, ...rest } = props;
|
|
40
|
+
|
|
40
41
|
return (
|
|
41
42
|
<components.MultiValue {...rest}>
|
|
42
43
|
<div className={styles.multiValue}>
|
|
43
|
-
<div className={styles.multiValueLabel}>
|
|
44
|
+
<div className={styles.multiValueLabel}>
|
|
45
|
+
{children}
|
|
46
|
+
{data.is_primary && settings?.primaryField && (
|
|
47
|
+
<span className={styles.primaryIndicator}>Primary</span>
|
|
48
|
+
)}
|
|
49
|
+
</div>
|
|
44
50
|
{data.description && (
|
|
45
51
|
<div className={styles.multiValueDescription}>
|
|
46
52
|
{data.description}
|
|
47
53
|
</div>
|
|
48
54
|
)}
|
|
55
|
+
{data.relationship_type && settings?.relationshipTypes && (
|
|
56
|
+
<div className={styles.relationshipType}>
|
|
57
|
+
{data.relationship_type}
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
49
60
|
</div>
|
|
50
61
|
</components.MultiValue>
|
|
51
62
|
);
|
|
@@ -218,7 +229,7 @@ function MultiSelect({
|
|
|
218
229
|
components={{
|
|
219
230
|
SelectList,
|
|
220
231
|
Option: CustomOption,
|
|
221
|
-
MultiValue: CustomMultiValue
|
|
232
|
+
MultiValue: (props) => <CustomMultiValue {...props} settings={settings} />,
|
|
222
233
|
}}
|
|
223
234
|
options={selectOptions}
|
|
224
235
|
menuPortalTarget={document.body}
|
|
@@ -3,15 +3,15 @@ import { Link, useLocation, useNavigate } from 'react-router-dom';
|
|
|
3
3
|
import {
|
|
4
4
|
Bug,
|
|
5
5
|
Calendar,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
CreditCard,
|
|
7
|
+
FileText,
|
|
8
|
+
Users,
|
|
9
|
+
User,
|
|
10
10
|
Search,
|
|
11
|
-
|
|
11
|
+
LogOut,
|
|
12
12
|
Shield,
|
|
13
13
|
Image,
|
|
14
|
-
} from '
|
|
14
|
+
} from 'lucide-react';
|
|
15
15
|
import CustomFetch from './Fetch';
|
|
16
16
|
import Notification from './Notification';
|
|
17
17
|
import SwitchAccount from './SwitchAccount';
|
|
@@ -226,12 +226,12 @@ function Navigation({
|
|
|
226
226
|
const iconComponents = {
|
|
227
227
|
bug: Bug,
|
|
228
228
|
calendar: Calendar,
|
|
229
|
-
draft:
|
|
229
|
+
draft: FileText,
|
|
230
230
|
image: Image,
|
|
231
|
-
peopleGroup:
|
|
232
|
-
person:
|
|
231
|
+
peopleGroup: Users,
|
|
232
|
+
person: User,
|
|
233
233
|
shield: Shield,
|
|
234
|
-
signOut:
|
|
234
|
+
signOut: LogOut,
|
|
235
235
|
};
|
|
236
236
|
|
|
237
237
|
// Check if the setting's URL matches the current page
|
|
@@ -256,7 +256,7 @@ function Navigation({
|
|
|
256
256
|
onClick={() => setShowBusinessCardOcr(true)}
|
|
257
257
|
className={activeClass}
|
|
258
258
|
>
|
|
259
|
-
<
|
|
259
|
+
<CreditCard size={20} />
|
|
260
260
|
</button>
|
|
261
261
|
</li>
|
|
262
262
|
);
|
|
@@ -289,15 +289,14 @@ function Navigation({
|
|
|
289
289
|
const IconComponent = iconComponents[n.icon];
|
|
290
290
|
|
|
291
291
|
return (
|
|
292
|
-
<li
|
|
293
|
-
{' '}
|
|
294
|
-
{/* Apply active class to the list item */}
|
|
292
|
+
<li>
|
|
295
293
|
<Link
|
|
296
294
|
to={n.url}
|
|
297
295
|
data-tooltip-id="system-tooltip"
|
|
298
296
|
data-tooltip-content={n.label}
|
|
299
|
-
className={`tooltip ${activeClass}`}
|
|
297
|
+
className={`tooltip ${activeClass}`}
|
|
300
298
|
target={n.target ? n.target : '_self'}
|
|
299
|
+
title={n.label}
|
|
301
300
|
>
|
|
302
301
|
<IconComponent size={19} strokeWidth={2} />
|
|
303
302
|
</Link>
|
|
@@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom';
|
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import parse from 'html-react-parser';
|
|
5
5
|
import { toast } from 'react-toastify';
|
|
6
|
-
import { Bell,
|
|
6
|
+
import { Bell, X, Check } from 'lucide-react';
|
|
7
7
|
import CustomFetch from './Fetch';
|
|
8
8
|
import styles from './styles/Notification.module.scss';
|
|
9
9
|
|
|
@@ -351,7 +351,7 @@ function Notification(props) {
|
|
|
351
351
|
data-index={index}
|
|
352
352
|
aria-label="Dismiss notification"
|
|
353
353
|
>
|
|
354
|
-
<
|
|
354
|
+
<X
|
|
355
355
|
size={18}
|
|
356
356
|
strokeWidth={2}
|
|
357
357
|
/>
|
|
@@ -7,7 +7,7 @@ import React, {
|
|
|
7
7
|
} from 'react';
|
|
8
8
|
import { useNavigate } from 'react-router-dom';
|
|
9
9
|
import Popup from 'reactjs-popup';
|
|
10
|
-
import { Search,
|
|
10
|
+
import { Search, X, Zap } from 'lucide-react';
|
|
11
11
|
|
|
12
12
|
import CustomFetch from './Fetch';
|
|
13
13
|
import Form from './Form';
|
|
@@ -307,7 +307,7 @@ const QuickAction = ({ setting }) => {
|
|
|
307
307
|
data-tooltip-id="system-tooltip"
|
|
308
308
|
data-tooltip-content="Quick Actions"
|
|
309
309
|
>
|
|
310
|
-
<
|
|
310
|
+
<Zap strokeWidth={2} size={18} />
|
|
311
311
|
</span>
|
|
312
312
|
{setting.buttons.map((b) => (
|
|
313
313
|
<button
|
|
@@ -341,7 +341,7 @@ const QuickAction = ({ setting }) => {
|
|
|
341
341
|
/>
|
|
342
342
|
<div className={styles.iconContainer}>
|
|
343
343
|
{search ? (
|
|
344
|
-
<
|
|
344
|
+
<X
|
|
345
345
|
strokeWidth={2}
|
|
346
346
|
size={16}
|
|
347
347
|
className={styles.searchIcon}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
2
2
|
import { useNavigate } from 'react-router-dom';
|
|
3
|
-
import {
|
|
3
|
+
import { RotateCcw, ChevronUp } from 'lucide-react';
|
|
4
4
|
import CustomFetch from './Fetch';
|
|
5
5
|
import styles from './styles/SwitchAccount.module.scss';
|
|
6
6
|
|
|
@@ -83,7 +83,7 @@ function SwitchAccount({ setSystemAuth, setting, userProfile }) {
|
|
|
83
83
|
data-tooltip-id="system-tooltip"
|
|
84
84
|
data-tooltip-content={setting.label}
|
|
85
85
|
>
|
|
86
|
-
<
|
|
86
|
+
<RotateCcw size={16} style={{ verticalAlign: 'middle' }} />
|
|
87
87
|
</a>
|
|
88
88
|
|
|
89
89
|
{show && (
|
|
@@ -113,9 +113,9 @@ function SwitchAccount({ setSystemAuth, setting, userProfile }) {
|
|
|
113
113
|
>
|
|
114
114
|
Select{' '}
|
|
115
115
|
{`${ucfirst(setting.model)} `}
|
|
116
|
-
<
|
|
116
|
+
<ChevronUp
|
|
117
117
|
size={16}
|
|
118
|
-
|
|
118
|
+
color="#20004d"
|
|
119
119
|
/>
|
|
120
120
|
</span>
|
|
121
121
|
)}
|
|
@@ -3,7 +3,7 @@ import '../../styles/global.css';
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
5
5
|
import { toast } from 'react-toastify';
|
|
6
|
-
import {
|
|
6
|
+
import { User } from 'lucide-react';
|
|
7
7
|
|
|
8
8
|
import CustomFetch from '../Fetch';
|
|
9
9
|
|
|
@@ -106,7 +106,7 @@ const ClientLogin = ({ logo, setSystemAuth, urls = {} }) => {
|
|
|
106
106
|
autoComplete="email"
|
|
107
107
|
/>
|
|
108
108
|
<span className={styles.inputIcon}>
|
|
109
|
-
<
|
|
109
|
+
<User strokeWidth={2} size={18} />
|
|
110
110
|
</span>
|
|
111
111
|
</div>
|
|
112
112
|
|
|
@@ -3,7 +3,7 @@ import '../../styles/global.css';
|
|
|
3
3
|
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import { useNavigate, useLocation } from 'react-router-dom';
|
|
5
5
|
import { toast } from 'react-toastify';
|
|
6
|
-
import {
|
|
6
|
+
import { Lock, ArrowLeft } from 'lucide-react';
|
|
7
7
|
|
|
8
8
|
import CustomFetch from '../Fetch';
|
|
9
9
|
|
|
@@ -203,7 +203,7 @@ const ClientOTPVerify = ({
|
|
|
203
203
|
maxLength="6"
|
|
204
204
|
/>
|
|
205
205
|
<span className={styles.inputIcon}>
|
|
206
|
-
<
|
|
206
|
+
<Lock strokeWidth={2} size={18} />
|
|
207
207
|
</span>
|
|
208
208
|
</div>
|
|
209
209
|
|
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import { Link, useLocation, useNavigate } from 'react-router-dom';
|
|
5
5
|
import Reveal from 'react-reveal/Reveal';
|
|
6
6
|
import { toast } from 'react-toastify';
|
|
7
|
-
import {
|
|
7
|
+
import { User, Lock } from 'lucide-react';
|
|
8
8
|
|
|
9
9
|
import CustomFetch from '../Fetch';
|
|
10
10
|
|
|
@@ -201,7 +201,7 @@ const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
|
|
|
201
201
|
Email
|
|
202
202
|
</span>
|
|
203
203
|
<small>
|
|
204
|
-
<
|
|
204
|
+
<User strokeWidth={2} size={18} />
|
|
205
205
|
</small>
|
|
206
206
|
</label>
|
|
207
207
|
</div>
|
|
@@ -222,7 +222,7 @@ const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
|
|
|
222
222
|
Password
|
|
223
223
|
</span>
|
|
224
224
|
<small>
|
|
225
|
-
<
|
|
225
|
+
<Lock
|
|
226
226
|
strokeWidth={2}
|
|
227
227
|
size={18}
|
|
228
228
|
/>
|
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import Reveal from 'react-reveal/Reveal';
|
|
5
5
|
import { toast } from 'react-toastify';
|
|
6
6
|
import parse from 'html-react-parser';
|
|
7
|
-
import {
|
|
7
|
+
import { User } from 'lucide-react';
|
|
8
8
|
|
|
9
9
|
import CustomFetch from '../Fetch';
|
|
10
10
|
|
|
@@ -83,7 +83,7 @@ const Reset = ({ logo }) => {
|
|
|
83
83
|
Email
|
|
84
84
|
</span>
|
|
85
85
|
<small>
|
|
86
|
-
<
|
|
86
|
+
<User strokeWidth={2} size={18} />
|
|
87
87
|
</small>
|
|
88
88
|
</label>
|
|
89
89
|
</div>
|
|
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
4
4
|
import { useNavigate, useLocation } from 'react-router-dom';
|
|
5
5
|
import Reveal from 'react-reveal/Reveal';
|
|
6
6
|
import { toast } from 'react-toastify';
|
|
7
|
-
import {
|
|
7
|
+
import { Lock } from 'lucide-react';
|
|
8
8
|
|
|
9
9
|
import CustomFetch from '../Fetch';
|
|
10
10
|
|
|
@@ -290,7 +290,7 @@ const TwoFactorAuth = ({ logo, setSystemAuth, setUserProfile }) => {
|
|
|
290
290
|
Verification Code
|
|
291
291
|
</span>
|
|
292
292
|
<small>
|
|
293
|
-
<
|
|
293
|
+
<Lock
|
|
294
294
|
strokeWidth={2}
|
|
295
295
|
size={18}
|
|
296
296
|
/>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
2
3
|
import { Tooltip } from 'react-tooltip';
|
|
3
4
|
import moment from 'moment';
|
|
4
5
|
import numeral from 'numeral';
|
|
@@ -103,35 +104,41 @@ const CellWithTooltip = ({
|
|
|
103
104
|
width: '100%',
|
|
104
105
|
};
|
|
105
106
|
|
|
107
|
+
// Render tooltip using createPortal to escape stacking contexts
|
|
108
|
+
const tooltipPortal = shouldShowTooltip && createPortal(
|
|
109
|
+
<Tooltip
|
|
110
|
+
id={tooltipId}
|
|
111
|
+
style={{
|
|
112
|
+
backgroundColor: 'rgba(0, 0, 0, 0.9)',
|
|
113
|
+
color: 'white',
|
|
114
|
+
borderRadius: '6px',
|
|
115
|
+
padding: '8px 12px',
|
|
116
|
+
fontSize: '13px',
|
|
117
|
+
maxWidth: '500px',
|
|
118
|
+
wordWrap: 'break-word',
|
|
119
|
+
zIndex: 9999, // Slightly lower since we're now at document.body level
|
|
120
|
+
}}
|
|
121
|
+
place="top"
|
|
122
|
+
offset={5}
|
|
123
|
+
/>,
|
|
124
|
+
document.body
|
|
125
|
+
);
|
|
126
|
+
|
|
106
127
|
return (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
backgroundColor: 'rgba(0, 0, 0, 0.9)',
|
|
122
|
-
color: 'white',
|
|
123
|
-
borderRadius: '6px',
|
|
124
|
-
padding: '8px 12px',
|
|
125
|
-
fontSize: '13px',
|
|
126
|
-
maxWidth: '500px',
|
|
127
|
-
wordWrap: 'break-word',
|
|
128
|
-
zIndex: 1000,
|
|
129
|
-
}}
|
|
130
|
-
place="top"
|
|
131
|
-
offset={5}
|
|
132
|
-
/>
|
|
133
|
-
)}
|
|
134
|
-
</div>
|
|
128
|
+
<>
|
|
129
|
+
<div
|
|
130
|
+
ref={cellRef}
|
|
131
|
+
className={className}
|
|
132
|
+
style={cellStyles}
|
|
133
|
+
{...(shouldShowTooltip && {
|
|
134
|
+
'data-tooltip-id': tooltipId,
|
|
135
|
+
'data-tooltip-html': tooltipContent,
|
|
136
|
+
})}
|
|
137
|
+
>
|
|
138
|
+
{children}
|
|
139
|
+
</div>
|
|
140
|
+
{tooltipPortal}
|
|
141
|
+
</>
|
|
135
142
|
);
|
|
136
143
|
};
|
|
137
144
|
|