@visns-studio/visns-components 5.11.1 → 5.11.2

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.
Files changed (48) hide show
  1. package/package.json +2 -2
  2. package/src/components/cms/DataGrid.jsx +8 -8
  3. package/src/components/cms/DropZone.jsx +1 -1
  4. package/src/components/cms/Form.jsx +1 -1
  5. package/src/components/cms/Gallery.jsx +1 -1
  6. package/src/components/cms/sorting/Item.jsx +1 -1
  7. package/src/components/crm/Autocomplete.jsx +3 -3
  8. package/src/components/crm/Breadcrumb.jsx +4 -4
  9. package/src/components/crm/BusinessCardOcr.jsx +681 -95
  10. package/src/components/crm/DataGrid.jsx +34 -32
  11. package/src/components/crm/Field.jsx +12 -12
  12. package/src/components/crm/Form.jsx +2 -2
  13. package/src/components/crm/Navigation.jsx +11 -11
  14. package/src/components/crm/Notification.jsx +2 -2
  15. package/src/components/crm/QuickAction.jsx +3 -3
  16. package/src/components/crm/SectionHeader.jsx +1 -1
  17. package/src/components/crm/SwitchAccount.jsx +4 -4
  18. package/src/components/crm/auth/ClientLogin.jsx +2 -2
  19. package/src/components/crm/auth/ClientOTPVerify.jsx +2 -2
  20. package/src/components/crm/auth/Login.jsx +3 -3
  21. package/src/components/crm/auth/Reset.jsx +2 -2
  22. package/src/components/crm/auth/TwoFactorAuth.jsx +2 -2
  23. package/src/components/crm/columns/ColumnRenderers.jsx +320 -259
  24. package/src/components/crm/controls/DataGridSearch.jsx +5 -5
  25. package/src/components/crm/generic/AlternativeActionModal.jsx +100 -0
  26. package/src/components/crm/generic/ContactSelectorModal.jsx +59 -16
  27. package/src/components/crm/generic/DateRangeSelectorModal.jsx +181 -0
  28. package/src/components/crm/generic/GenericClientPortal.jsx +1 -1
  29. package/src/components/crm/generic/GenericDashboard.jsx +4 -4
  30. package/src/components/crm/generic/GenericDetail.jsx +6 -6
  31. package/src/components/crm/generic/GenericDynamic.jsx +3 -3
  32. package/src/components/crm/generic/GenericEditableTable.jsx +4 -4
  33. package/src/components/crm/generic/GenericFormBuilder.jsx +6 -6
  34. package/src/components/crm/generic/GenericGrid.jsx +1622 -268
  35. package/src/components/crm/generic/GenericReport.jsx +966 -646
  36. package/src/components/crm/generic/GenericReportForm.jsx +1 -1
  37. package/src/components/crm/generic/NotificationList.jsx +1 -1
  38. package/src/components/crm/generic/ReasonCollectorModal.jsx +194 -0
  39. package/src/components/crm/generic/SortableQuoteItems.jsx +3 -3
  40. package/src/components/crm/generic/shared/formatters.js +107 -1
  41. package/src/components/crm/generic/styles/AlternativeActionModal.css +127 -0
  42. package/src/components/crm/generic/styles/DateRangeSelectorModal.css +115 -0
  43. package/src/components/crm/generic/styles/GenericIndex.module.scss +206 -0
  44. package/src/components/crm/generic/styles/GenericReport.module.scss +96 -0
  45. package/src/components/crm/generic/styles/ReasonCollectorModal.css +217 -0
  46. package/src/components/crm/modals/GalleryModal.jsx +2 -2
  47. package/src/components/crm/sorting/Item.jsx +3 -3
  48. package/src/components/crm/styles/BusinessCardOcr.module.scss +197 -4
@@ -42,30 +42,31 @@ import { toast } from 'react-toastify';
42
42
  import fetchUtil from '../../utils/fetchUtil';
43
43
  import { confirmDialog } from '../utils/ConfirmDialog';
44
44
  import {
45
- Alarm,
46
- ArrowCounterClockwise,
47
- ArrowCycle,
48
- Backspace,
45
+ AlarmClock,
46
+ RotateCcw,
47
+ RefreshCw,
48
+ Trash2,
49
49
  BookOpen,
50
50
  Check,
51
- CircleCheck,
51
+ CheckCircle,
52
52
  Clock,
53
- CloudDownload,
53
+ Download as DownloadIcon,
54
+ Upload,
54
55
  Copy,
55
56
  Edit,
56
- Envelope,
57
+ Mail,
57
58
  File,
58
59
  Folder,
59
60
  Image,
60
61
  Inbox,
61
- LinkOut,
62
- LockOn,
62
+ ExternalLink,
63
+ Lock,
63
64
  Network,
64
- Ribbon,
65
- ShippingBoxV1,
66
- SoundOn,
67
- TriangleAlert,
68
- } from 'akar-icons';
65
+ Award,
66
+ Archive,
67
+ Volume2,
68
+ AlertTriangle,
69
+ } from 'lucide-react';
69
70
  import styles from './styles/DataGrid.module.scss';
70
71
 
71
72
  import '@visns-studio/visns-datagrid-enterprise/index.css';
@@ -1710,7 +1711,7 @@ const DataGrid = forwardRef(
1710
1711
  let IconComponent = null;
1711
1712
 
1712
1713
  if (icon === 'archive') {
1713
- IconComponent = ShippingBoxV1;
1714
+ IconComponent = Archive;
1714
1715
  } else if (icon === 'bookOpen') {
1715
1716
  IconComponent = BookOpen;
1716
1717
  } else if (icon === 'folder') {
@@ -1720,7 +1721,7 @@ const DataGrid = forwardRef(
1720
1721
  } else if (icon === 'network') {
1721
1722
  IconComponent = Network;
1722
1723
  } else if (icon === 'urgent') {
1723
- IconComponent = TriangleAlert;
1724
+ IconComponent = AlertTriangle;
1724
1725
  }
1725
1726
 
1726
1727
  if (IconComponent) {
@@ -2185,15 +2186,15 @@ const DataGrid = forwardRef(
2185
2186
  if (allow) {
2186
2187
  switch (s.id) {
2187
2188
  case 'activate':
2188
- return getIconComponent(CircleCheck);
2189
+ return getIconComponent(CheckCircle);
2189
2190
  case 'archive':
2190
- return getIconComponent(ShippingBoxV1);
2191
+ return getIconComponent(Archive);
2191
2192
  case 'arrowCycle':
2192
- return getIconComponent(ArrowCycle);
2193
+ return getIconComponent(RefreshCw);
2193
2194
  case 'cloudUpload':
2194
- return getIconComponent(CloudUpload);
2195
+ return getIconComponent(Upload);
2195
2196
  case 'oauth2':
2196
- return getIconComponent(LockOn);
2197
+ return getIconComponent(Lock);
2197
2198
  case 'clone':
2198
2199
  return getIconComponent(Copy);
2199
2200
  case 'complete':
@@ -2201,9 +2202,9 @@ const DataGrid = forwardRef(
2201
2202
  case 'copy':
2202
2203
  return getIconComponent(Copy);
2203
2204
  case 'delete':
2204
- return getIconComponent(Backspace);
2205
+ return getIconComponent(Trash2);
2205
2206
  case 'envelope':
2206
- return getIconComponent(Envelope);
2207
+ return getIconComponent(Mail);
2207
2208
  case 'family':
2208
2209
  return getIconComponent(Network);
2209
2210
  case 'file':
@@ -2213,17 +2214,17 @@ const DataGrid = forwardRef(
2213
2214
  case 'image':
2214
2215
  return getIconComponent(Image);
2215
2216
  case 'link':
2216
- return getIconComponent(LinkOut);
2217
+ return getIconComponent(ExternalLink);
2217
2218
  case 'primary':
2218
- return getIconComponent(Ribbon);
2219
+ return getIconComponent(Award);
2219
2220
  case 'restore':
2220
- return getIconComponent(ArrowCounterClockwise);
2221
+ return getIconComponent(RotateCcw);
2221
2222
  case 'sound':
2222
- return getIconComponent(SoundOn);
2223
+ return getIconComponent(Volume2);
2223
2224
  case 'ssa':
2224
2225
  return getIconComponent(Clock);
2225
2226
  case 'undo':
2226
- return getIconComponent(ArrowCounterClockwise);
2227
+ return getIconComponent(RotateCcw);
2227
2228
  case 'update':
2228
2229
  return getIconComponent(Edit);
2229
2230
  default:
@@ -3078,6 +3079,7 @@ const DataGrid = forwardRef(
3078
3079
  {...tableSetting}
3079
3080
  columns={gridColumns}
3080
3081
  dataSource={dataSource}
3082
+ defaultFilterValue={filterValue}
3081
3083
  {...(ajaxSetting && ajaxSetting.groupBy
3082
3084
  ? {
3083
3085
  defaultGroupBy: ajaxSetting.groupBy,
@@ -3258,13 +3260,13 @@ const DataGrid = forwardRef(
3258
3260
  case 'clock':
3259
3261
  return Clock;
3260
3262
  case 'alarm':
3261
- return Alarm;
3263
+ return AlarmClock;
3262
3264
  case 'check':
3263
3265
  return Check;
3264
3266
  case 'edit':
3265
3267
  return Edit;
3266
3268
  case 'envelope':
3267
- return Envelope;
3269
+ return Mail;
3268
3270
  case 'file':
3269
3271
  return File;
3270
3272
  case 'image':
@@ -3272,9 +3274,9 @@ const DataGrid = forwardRef(
3272
3274
  case 'copy':
3273
3275
  return Copy;
3274
3276
  case 'cloudUpload':
3275
- return CloudDownload;
3277
+ return Upload;
3276
3278
  case 'cloudDownload':
3277
- return CloudDownload;
3279
+ return DownloadIcon;
3278
3280
  default:
3279
3281
  return Clock; // Default fallback
3280
3282
  }
@@ -15,15 +15,15 @@ import {
15
15
  Edit,
16
16
  ChevronRight,
17
17
  Circle,
18
- CircleFill,
18
+ Dot,
19
19
  CirclePlus,
20
- CloudDownload,
20
+ Download,
21
21
  Copy,
22
22
  Minus,
23
- ArrowBack,
24
- TrashCan,
25
- CircleX,
26
- } from 'akar-icons';
23
+ ArrowLeft,
24
+ Trash2,
25
+ X,
26
+ } from 'lucide-react';
27
27
  import { toast } from 'react-toastify';
28
28
  import styles from './styles/Field.module.scss';
29
29
 
@@ -835,7 +835,7 @@ function Field({
835
835
  );
836
836
  }}
837
837
  >
838
- <TrashCan
838
+ <Trash2
839
839
  strokeWidth={2}
840
840
  size={20}
841
841
  />
@@ -903,7 +903,7 @@ function Field({
903
903
  onFileDownload(inputValue);
904
904
  }}
905
905
  >
906
- <CloudDownload size={24} />
906
+ <Download size={24} />
907
907
  </div>
908
908
  )}
909
909
  </div>
@@ -2142,7 +2142,7 @@ function Field({
2142
2142
  className={styles.modal__close}
2143
2143
  onClick={() => setCanvasPopupOpen(false)}
2144
2144
  >
2145
- <CircleX size={24} color="#FFF" />
2145
+ <X size={24} color="#FFF" />
2146
2146
  </button>
2147
2147
  </div>
2148
2148
  <div
@@ -2157,7 +2157,7 @@ function Field({
2157
2157
  }}
2158
2158
  className={styles['drawactions--save']}
2159
2159
  >
2160
- <CloudDownload size={16} /> Save
2160
+ <Download size={16} /> Save
2161
2161
  </button>
2162
2162
  </li>
2163
2163
  <li>
@@ -2218,7 +2218,7 @@ function Field({
2218
2218
  onClick={() => sketchRef.current.undo()}
2219
2219
  className={styles['drawaction-undo']}
2220
2220
  >
2221
- <ArrowBack size={16} /> Undo
2221
+ <ArrowLeft size={16} /> Undo
2222
2222
  </button>
2223
2223
  </li>
2224
2224
  <li>
@@ -2228,7 +2228,7 @@ function Field({
2228
2228
  }
2229
2229
  className={styles['drawactions--clear']}
2230
2230
  >
2231
- <TrashCan size={16} /> Clear
2231
+ <Trash2 size={16} /> Clear
2232
2232
  </button>
2233
2233
  </li>
2234
2234
  </ul>
@@ -9,7 +9,7 @@ import moment from 'moment';
9
9
  import parse from 'html-react-parser';
10
10
  import _ from 'lodash';
11
11
  import ReactDataGrid from '@visns-studio/visns-datagrid-enterprise';
12
- import { CircleX } from 'akar-icons';
12
+ import { X } from 'lucide-react';
13
13
  import imageCompression from 'browser-image-compression';
14
14
  import { confirmDialog } from '../utils/ConfirmDialog';
15
15
 
@@ -2231,7 +2231,7 @@ function Form({
2231
2231
  className={styles.modal__close}
2232
2232
  onClick={closeModal}
2233
2233
  >
2234
- <CircleX strokeWidth={2} size={24} />
2234
+ <X strokeWidth={2} size={24} />
2235
2235
  </button>
2236
2236
  </div>
2237
2237
  <div className={styles.modal__content}>
@@ -3,15 +3,15 @@ import { Link, useLocation, useNavigate } from 'react-router-dom';
3
3
  import {
4
4
  Bug,
5
5
  Calendar,
6
- CreditCardAlt1,
7
- Draft,
8
- PeopleGroup,
9
- Person,
6
+ CreditCard,
7
+ FileText,
8
+ Users,
9
+ User,
10
10
  Search,
11
- SignOut,
11
+ LogOut,
12
12
  Shield,
13
13
  Image,
14
- } from 'akar-icons';
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: Draft,
229
+ draft: FileText,
230
230
  image: Image,
231
- peopleGroup: PeopleGroup,
232
- person: Person,
231
+ peopleGroup: Users,
232
+ person: User,
233
233
  shield: Shield,
234
- signOut: 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
- <CreditCardAlt1 size={20} />
259
+ <CreditCard size={20} />
260
260
  </button>
261
261
  </li>
262
262
  );
@@ -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, CircleX, Check } from 'akar-icons';
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
- <CircleX
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, Cross, Thunder } from 'akar-icons';
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
- <Thunder strokeWidth={2} size={18} />
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
- <Cross
344
+ <X
345
345
  strokeWidth={2}
346
346
  size={16}
347
347
  className={styles.searchIcon}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ChevronRight } from 'akar-icons';
2
+ import { ChevronRight } from 'lucide-react';
3
3
  import styles from './styles/Field.module.scss';
4
4
 
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect, useRef, useCallback } from 'react';
2
2
  import { useNavigate } from 'react-router-dom';
3
- import { ArrowCycle, ChevronVertical } from 'akar-icons';
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
- <ArrowCycle size={16} verticalAlign="middle" />
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
- <ChevronVertical
116
+ <ChevronUp
117
117
  size={16}
118
- fill="#20004d"
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 { Person } from 'akar-icons';
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
- <Person strokeWidth={2} size={18} />
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 { LockOff, ArrowLeft } from 'akar-icons';
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
- <LockOff strokeWidth={2} size={18} />
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 { Person, LockOff } from 'akar-icons';
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
- <Person strokeWidth={2} size={18} />
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
- <LockOff
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 { Person } from 'akar-icons';
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
- <Person strokeWidth={2} size={18} />
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 { LockOff } from 'akar-icons';
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
- <LockOff
293
+ <Lock
294
294
  strokeWidth={2}
295
295
  size={18}
296
296
  />