@visns-studio/visns-components 4.10.48 → 5.0.1-8.1
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 +29 -29
- package/src/components/cms/Field.jsx +39 -63
- package/src/components/crm/AsyncSelect.jsx +121 -15
- package/src/components/crm/Breadcrumb.jsx +2 -18
- package/src/components/crm/DataGrid.jsx +51 -424
- package/src/components/crm/Field.jsx +185 -358
- package/src/components/crm/Form.jsx +104 -92
- package/src/components/crm/MultiSelect.jsx +66 -45
- package/src/components/crm/Navigation.jsx +9 -92
- package/src/components/crm/QuickAction.jsx +1 -0
- package/src/components/crm/auth/Login.jsx +9 -1
- package/src/components/crm/auth/Profile.jsx +4 -2
- package/src/components/crm/auth/styles/Login.module.scss +52 -82
- package/src/components/crm/auth/styles/Profile.module.scss +150 -44
- package/src/components/crm/auth/styles/Reset.module.scss +55 -37
- package/src/components/crm/auth/styles/Verify.module.scss +55 -76
- package/src/components/crm/generic/GenericAuth.jsx +12 -5
- package/src/components/crm/generic/GenericDashboard.jsx +30 -340
- package/src/components/crm/generic/GenericDetail.jsx +534 -86
- package/src/components/crm/generic/GenericDynamic.jsx +76 -94
- package/src/components/crm/generic/GenericEditableTable.jsx +407 -0
- package/src/components/crm/generic/GenericFormBuilder.jsx +19 -79
- package/src/components/crm/generic/GenericIndex.jsx +1 -2
- package/src/components/crm/generic/styles/AuditLog.module.scss +4 -37
- package/src/components/crm/generic/styles/AuditLogs.module.scss +0 -51
- package/src/components/crm/generic/styles/GenericDetail.module.scss +263 -244
- package/src/components/crm/generic/styles/GenericDynamic.module.scss +100 -198
- package/src/components/crm/generic/styles/GenericEditableTable.module.scss +178 -0
- package/src/components/crm/generic/styles/GenericFormBuilder.module.scss +63 -101
- package/src/components/crm/generic/styles/GenericIndex.module.scss +46 -66
- package/src/components/crm/generic/styles/GenericMain.module.scss +7 -7
- package/src/components/crm/generic/styles/GenericSort.module.scss +0 -36
- package/src/components/crm/generic/styles/NotificationList.module.scss +1 -32
- package/src/components/crm/styles/Autocomplete.module.scss +12 -20
- package/src/components/crm/styles/DataGrid.module.scss +28 -86
- package/src/components/crm/styles/Field.module.scss +72 -252
- package/src/components/crm/styles/Form.module.scss +141 -450
- package/src/components/crm/styles/Navigation.module.scss +356 -507
- package/src/components/crm/styles/Notification.module.scss +1 -0
- package/src/components/crm/styles/QrCode.module.scss +4 -18
- package/src/components/crm/styles/SwitchAccount.module.scss +0 -1
- package/src/components/crm/styles/TableFilter.module.scss +2 -1
- package/src/components/styles/global.css +164 -34
- package/src/index.js +0 -8
- package/src/components/crm/generic/styles/GenericDashboard.module.scss +0 -325
- package/src/components/crm/sketch/SketchField.jsx +0 -395
- package/src/components/crm/sketch/arrow.jsx +0 -108
- package/src/components/crm/sketch/circle.jsx +0 -75
- package/src/components/crm/sketch/default-tool.jsx +0 -16
- package/src/components/crm/sketch/fabrictool.jsx +0 -22
- package/src/components/crm/sketch/history.jsx +0 -144
- package/src/components/crm/sketch/json/config.json +0 -14
- package/src/components/crm/sketch/line.jsx +0 -64
- package/src/components/crm/sketch/pan.jsx +0 -48
- package/src/components/crm/sketch/pencil.jsx +0 -36
- package/src/components/crm/sketch/rectangle-label-object.jsx +0 -69
- package/src/components/crm/sketch/rectangle-label.jsx +0 -93
- package/src/components/crm/sketch/rectangle.jsx +0 -76
- package/src/components/crm/sketch/select.jsx +0 -16
- package/src/components/crm/sketch/tools.jsx +0 -11
- package/src/components/crm/sketch/utils.jsx +0 -67
|
@@ -8,7 +8,7 @@ import Toggle from 'react-toggle';
|
|
|
8
8
|
import { toast } from 'react-toastify';
|
|
9
9
|
import { v4 as uuidv4 } from 'uuid';
|
|
10
10
|
import { Editor } from '@tinymce/tinymce-react';
|
|
11
|
-
import { CirclePlus, CircleX, TrashCan } from 'akar-icons';
|
|
11
|
+
import { CircleChevronRight, CirclePlus, CircleX, TrashCan } from 'akar-icons';
|
|
12
12
|
|
|
13
13
|
import 'react-toggle/style.css';
|
|
14
14
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
@@ -17,7 +17,6 @@ import 'react-confirm-alert/src/react-confirm-alert.css';
|
|
|
17
17
|
import Breadcrumb from '../Breadcrumb';
|
|
18
18
|
import CustomFetch from '../Fetch';
|
|
19
19
|
import SortableList from '../../../components/cms/sorting/List';
|
|
20
|
-
import SketchConfig from '../sketch/json/config.json';
|
|
21
20
|
|
|
22
21
|
import styles from './styles/GenericFormBuilder.module.scss'; // Import the CSS module
|
|
23
22
|
|
|
@@ -45,8 +44,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
|
|
|
45
44
|
label: '',
|
|
46
45
|
type: '',
|
|
47
46
|
});
|
|
48
|
-
const [fieldTypes] = useState([
|
|
49
|
-
{ value: 'canvas', label: 'Canvas' },
|
|
47
|
+
const [fieldTypes, setFieldTypes] = useState([
|
|
50
48
|
{ value: 'checkbox', label: 'Checkbox' },
|
|
51
49
|
{ value: 'html5_date', label: 'Date' },
|
|
52
50
|
{ value: 'html5_datetime', label: 'Date & Time' },
|
|
@@ -80,7 +78,6 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
|
|
|
80
78
|
});
|
|
81
79
|
const [modalFormShow, setModalFormShow] = useState(false);
|
|
82
80
|
const [roles, setRoles] = useState([]);
|
|
83
|
-
const canvasTypes = SketchConfig.canvasTypes;
|
|
84
81
|
|
|
85
82
|
/** Data Option Functionalities */
|
|
86
83
|
const handleDataOption = (e) => {
|
|
@@ -431,21 +428,6 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
|
|
|
431
428
|
|
|
432
429
|
const renderField = (field) => {
|
|
433
430
|
switch (field.type) {
|
|
434
|
-
case 'canvas':
|
|
435
|
-
const canvasType = canvasTypes.find(
|
|
436
|
-
(item) => item.id === field.canvasType
|
|
437
|
-
);
|
|
438
|
-
return (
|
|
439
|
-
<label className={`${styles.fi__label}`}>
|
|
440
|
-
<span
|
|
441
|
-
className={`${styles.fi__span} ${styles.prefocus}`}
|
|
442
|
-
>
|
|
443
|
-
{field.label}{' '}
|
|
444
|
-
{field.required === 'yes' ? '*' : null}
|
|
445
|
-
</span>
|
|
446
|
-
<img src={canvasType.url} width="200" />
|
|
447
|
-
</label>
|
|
448
|
-
);
|
|
449
431
|
case 'checkbox':
|
|
450
432
|
return (
|
|
451
433
|
<label className={styles.fi__label}>
|
|
@@ -839,19 +821,17 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
|
|
|
839
821
|
<div className={styles.grid__subrow}>
|
|
840
822
|
<div className={styles.grid__subnav}>
|
|
841
823
|
{data.detail && data.detail.length > 0 ? (
|
|
842
|
-
<
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
/>
|
|
854
|
-
</div>
|
|
824
|
+
<SortableList
|
|
825
|
+
handleClick={handleEdit}
|
|
826
|
+
handleDelete={handleDeleteField}
|
|
827
|
+
items={data.detail}
|
|
828
|
+
onSortEnd={onSortEnd}
|
|
829
|
+
axis="xy"
|
|
830
|
+
helperClass={styles.dragitem}
|
|
831
|
+
transitionDuration={250}
|
|
832
|
+
showImage={false}
|
|
833
|
+
useDragHandle
|
|
834
|
+
/>
|
|
855
835
|
) : null}
|
|
856
836
|
</div>
|
|
857
837
|
<div className={styles.grid__subcontent}>
|
|
@@ -1493,9 +1473,9 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
|
|
|
1493
1473
|
dataField.type ===
|
|
1494
1474
|
'table_text'
|
|
1495
1475
|
) {
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1476
|
+
excludedKeywords.push(
|
|
1477
|
+
'checkbox'
|
|
1478
|
+
);
|
|
1499
1479
|
}
|
|
1500
1480
|
return !excludedKeywords.some(
|
|
1501
1481
|
(
|
|
@@ -1630,9 +1610,9 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
|
|
|
1630
1610
|
dataField.type ===
|
|
1631
1611
|
'table_text'
|
|
1632
1612
|
) {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1613
|
+
excludedKeywords.push(
|
|
1614
|
+
'checkbox'
|
|
1615
|
+
);
|
|
1636
1616
|
}
|
|
1637
1617
|
return !excludedKeywords.some(
|
|
1638
1618
|
(
|
|
@@ -1699,46 +1679,6 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
|
|
|
1699
1679
|
</div>
|
|
1700
1680
|
) : null}
|
|
1701
1681
|
|
|
1702
|
-
{['canvas'].includes(dataField.type) ? (
|
|
1703
|
-
<div className={styles.formItem}>
|
|
1704
|
-
<label className={styles.fi__label}>
|
|
1705
|
-
<select
|
|
1706
|
-
name="canvasType"
|
|
1707
|
-
value={dataField.canvasType}
|
|
1708
|
-
onChange={handleChangeForm}
|
|
1709
|
-
>
|
|
1710
|
-
<option>
|
|
1711
|
-
Please select a type
|
|
1712
|
-
</option>
|
|
1713
|
-
{canvasTypes.map(
|
|
1714
|
-
(
|
|
1715
|
-
canvasType,
|
|
1716
|
-
canvasTypeKey
|
|
1717
|
-
) => (
|
|
1718
|
-
<option
|
|
1719
|
-
value={
|
|
1720
|
-
canvasType.id
|
|
1721
|
-
}
|
|
1722
|
-
key={
|
|
1723
|
-
canvasTypeKey
|
|
1724
|
-
}
|
|
1725
|
-
>
|
|
1726
|
-
{
|
|
1727
|
-
canvasType.label
|
|
1728
|
-
}
|
|
1729
|
-
</option>
|
|
1730
|
-
)
|
|
1731
|
-
)}
|
|
1732
|
-
</select>
|
|
1733
|
-
<span
|
|
1734
|
-
className={styles.fi__span}
|
|
1735
|
-
>
|
|
1736
|
-
Canvas Type
|
|
1737
|
-
</span>
|
|
1738
|
-
</label>
|
|
1739
|
-
</div>
|
|
1740
|
-
) : null}
|
|
1741
|
-
|
|
1742
1682
|
{['signature'].includes(dataField.type) ? (
|
|
1743
1683
|
<div className={styles.formItem}>
|
|
1744
1684
|
<label className={styles.fi__label}>
|
|
@@ -4,7 +4,6 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import { Outlet } from 'react-router-dom';
|
|
5
5
|
import { toast } from 'react-toastify';
|
|
6
6
|
import { saveAs } from 'file-saver';
|
|
7
|
-
import parse from 'html-react-parser';
|
|
8
7
|
import _ from 'lodash';
|
|
9
8
|
import moment from 'moment';
|
|
10
9
|
|
|
@@ -388,7 +387,7 @@ function GenericIndex({
|
|
|
388
387
|
: styles.crmtitleSimple
|
|
389
388
|
}`}
|
|
390
389
|
>
|
|
391
|
-
<h1>{
|
|
390
|
+
<h1>{setting.page?.title}</h1>
|
|
392
391
|
<div className={styles.titleInfo}>
|
|
393
392
|
<span>
|
|
394
393
|
[<strong>{total}</strong> Total{' '}
|
|
@@ -37,43 +37,6 @@
|
|
|
37
37
|
box-shadow: 0 4px 0 rgba(var(--primary-color-rgb), 0.05);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.crmtitle {
|
|
41
|
-
border: none;
|
|
42
|
-
min-height: auto;
|
|
43
|
-
padding: 5px 20px;
|
|
44
|
-
margin: 0;
|
|
45
|
-
background: var(--primary-color);
|
|
46
|
-
border-radius: var(--br);
|
|
47
|
-
border: 1px solid rgba(var(--item-color-rgb), 1.15);
|
|
48
|
-
position: relative;
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
|
|
52
|
-
h1 {
|
|
53
|
-
color: var(--background-color);
|
|
54
|
-
font-weight: 700;
|
|
55
|
-
font-size: 1.15em;
|
|
56
|
-
margin: 0;
|
|
57
|
-
padding: 0.65rem 0;
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
gap: 0.25rem;
|
|
61
|
-
|
|
62
|
-
a {
|
|
63
|
-
text-decoration: none;
|
|
64
|
-
color: var(--secondary-color);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
svg {
|
|
68
|
-
color: rgba(var(--tertiary-color-rgb), 0.5);
|
|
69
|
-
position: relative;
|
|
70
|
-
top: 0;
|
|
71
|
-
margin: 0 0.5rem;
|
|
72
|
-
max-width: 15px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
40
|
.gridtxt__header {
|
|
78
41
|
width: 100%;
|
|
79
42
|
display: block;
|
|
@@ -143,5 +106,9 @@
|
|
|
143
106
|
background: rgba(#f4f4f4, 0.65);
|
|
144
107
|
margin: 5px;
|
|
145
108
|
border-radius: 5px;
|
|
109
|
+
|
|
110
|
+
p {
|
|
111
|
+
font-size: 0.85rem;
|
|
112
|
+
}
|
|
146
113
|
}
|
|
147
114
|
}
|
|
@@ -29,57 +29,6 @@
|
|
|
29
29
|
box-shadow: 0 4px 0 rgba(var(--primary-color-rgb), 0.05);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.crmtitle {
|
|
33
|
-
border: none;
|
|
34
|
-
min-height: auto;
|
|
35
|
-
padding: 10px 20px;
|
|
36
|
-
margin: 0;
|
|
37
|
-
background: var(--tertiary-color);
|
|
38
|
-
border-radius: var(--br);
|
|
39
|
-
border: 1px solid rgba(var(--item-color-rgb), 1.15);
|
|
40
|
-
position: relative;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.crmtitle h1 {
|
|
44
|
-
font-weight: 700;
|
|
45
|
-
font-size: 1.45em;
|
|
46
|
-
margin: 0;
|
|
47
|
-
padding: 0.65rem 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.crmtitle h1 a {
|
|
51
|
-
text-decoration: none;
|
|
52
|
-
color: rgba(var(--secondary-color-rgb), 1.1);
|
|
53
|
-
font-weight: 300;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.crmtitle h1 svg {
|
|
57
|
-
color: rgba(var(--primary-color-rgb), 0.25);
|
|
58
|
-
position: relative;
|
|
59
|
-
top: 2px;
|
|
60
|
-
margin: 0 0.25rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.crmtitleSimple {
|
|
64
|
-
border: none;
|
|
65
|
-
min-height: auto;
|
|
66
|
-
padding: 0.65rem 1rem;
|
|
67
|
-
margin-bottom: 0.15rem;
|
|
68
|
-
background: var(--tertiary-color);
|
|
69
|
-
border-radius: var(--br);
|
|
70
|
-
box-sizing: border-box;
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-wrap: nowrap;
|
|
73
|
-
justify-content: space-between;
|
|
74
|
-
align-items: center;
|
|
75
|
-
|
|
76
|
-
h1 {
|
|
77
|
-
font-size: 1.25rem;
|
|
78
|
-
margin: 0;
|
|
79
|
-
padding: 0;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
32
|
.titleInfo {
|
|
84
33
|
position: absolute;
|
|
85
34
|
right: 2em;
|