@visns-studio/visns-components 4.10.8 → 4.10.10
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 +1 -1
- package/src/components/crm/DataGrid.jsx +0 -5
- package/src/components/crm/Field.jsx +10 -2
- package/src/components/crm/generic/GenericDetail.jsx +8 -1
- package/src/components/crm/generic/GenericDynamic.jsx +9 -4
- package/src/components/crm/generic/styles/GenericDetail.module.scss +51 -0
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
76
76
|
},
|
|
77
77
|
"name": "@visns-studio/visns-components",
|
|
78
|
-
"version": "4.10.
|
|
78
|
+
"version": "4.10.10",
|
|
79
79
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
80
80
|
"main": "src/index.js",
|
|
81
81
|
"files": [
|
|
@@ -628,7 +628,6 @@ const DataGrid = forwardRef(
|
|
|
628
628
|
break;
|
|
629
629
|
case 'view':
|
|
630
630
|
modalJsonOpen();
|
|
631
|
-
console.info(d[s.key], s.headers);
|
|
632
631
|
setJsonData((prevState) => ({
|
|
633
632
|
...prevState,
|
|
634
633
|
data: d[s.key],
|
|
@@ -2723,10 +2722,6 @@ const DataGrid = forwardRef(
|
|
|
2723
2722
|
style: style ? style : {},
|
|
2724
2723
|
};
|
|
2725
2724
|
|
|
2726
|
-
useEffect(() => {
|
|
2727
|
-
console.info(jsonData);
|
|
2728
|
-
}, [jsonData]);
|
|
2729
|
-
|
|
2730
2725
|
useEffect(() => {
|
|
2731
2726
|
const getMinimumHeight = () => {
|
|
2732
2727
|
if (gridHeight > 0) return gridHeight;
|
|
@@ -1433,7 +1433,9 @@ function Field({
|
|
|
1433
1433
|
<th></th>
|
|
1434
1434
|
{tableRadioColumns.map((column, columnKey) => (
|
|
1435
1435
|
<th
|
|
1436
|
-
key={`${settings.id}-${
|
|
1436
|
+
key={`${settings.id}-${
|
|
1437
|
+
column.id
|
|
1438
|
+
}-${Math.random()}`}
|
|
1437
1439
|
style={{
|
|
1438
1440
|
width: '250px',
|
|
1439
1441
|
whiteSpace: 'nowrap',
|
|
@@ -1467,7 +1469,13 @@ function Field({
|
|
|
1467
1469
|
</td>
|
|
1468
1470
|
{tableRadioColumns.map((cell, cellKey) => (
|
|
1469
1471
|
<td
|
|
1470
|
-
key={`table-radio-cell-${
|
|
1472
|
+
key={`table-radio-cell-${
|
|
1473
|
+
settings.id
|
|
1474
|
+
}-${row.id}-${
|
|
1475
|
+
cell.id
|
|
1476
|
+
}-${Math.random()
|
|
1477
|
+
.toString(36)
|
|
1478
|
+
.substr(2, 9)}`}
|
|
1471
1479
|
style={{
|
|
1472
1480
|
textAlign:
|
|
1473
1481
|
tableRadioColumns[cellKey]
|
|
@@ -38,6 +38,7 @@ function GenericDetail({
|
|
|
38
38
|
layout = 'full',
|
|
39
39
|
setting,
|
|
40
40
|
setActiveNav = null,
|
|
41
|
+
themeType,
|
|
41
42
|
urlParam,
|
|
42
43
|
userProfile,
|
|
43
44
|
}) {
|
|
@@ -1499,7 +1500,13 @@ function GenericDetail({
|
|
|
1499
1500
|
|
|
1500
1501
|
<div className={styles.grid}>
|
|
1501
1502
|
<div className={styles.grid__subrow}>
|
|
1502
|
-
<div
|
|
1503
|
+
<div
|
|
1504
|
+
className={
|
|
1505
|
+
themeType === 'alternate'
|
|
1506
|
+
? styles.grid__subnav__alternate
|
|
1507
|
+
: styles.grid__subnav
|
|
1508
|
+
}
|
|
1509
|
+
>
|
|
1503
1510
|
<TableFilter filters={subnav} setFilters={setSubnav} />
|
|
1504
1511
|
</div>
|
|
1505
1512
|
<div className={styles.grid__subcontent}>
|
|
@@ -631,17 +631,19 @@ const GenericDynamic = ({
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
} else {
|
|
634
|
-
|
|
634
|
+
let formData = data[type][0] ? data[type][0] : data[type];
|
|
635
|
+
|
|
636
|
+
if (formData.hasOwnProperty('id')) {
|
|
635
637
|
if (
|
|
636
638
|
Object.keys(activeForm).length === 0 &&
|
|
637
639
|
templateStatus &&
|
|
638
|
-
|
|
640
|
+
formData[0]
|
|
639
641
|
) {
|
|
640
|
-
setActiveForm(
|
|
642
|
+
setActiveForm(formData[0]);
|
|
641
643
|
setActiveFormKey(0);
|
|
642
644
|
}
|
|
643
645
|
} else {
|
|
644
|
-
setActiveForm(
|
|
646
|
+
setActiveForm(formData);
|
|
645
647
|
setActiveFormKey(0);
|
|
646
648
|
}
|
|
647
649
|
}
|
|
@@ -896,6 +898,9 @@ const GenericDynamic = ({
|
|
|
896
898
|
onChangeDate={
|
|
897
899
|
handleChangeDate
|
|
898
900
|
}
|
|
901
|
+
onChangeNumberFormat={
|
|
902
|
+
handleChangeNumberFormat
|
|
903
|
+
}
|
|
899
904
|
onChangeTableRadio={
|
|
900
905
|
handleChangeTableRadio
|
|
901
906
|
}
|
|
@@ -127,6 +127,57 @@
|
|
|
127
127
|
color: var(--background-color);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
.grid__subnav__alternate {
|
|
131
|
+
flex: 1;
|
|
132
|
+
background: rgba(var(--item-color-rgb), 0.05);
|
|
133
|
+
border-radius: var(--br);
|
|
134
|
+
border: 1px solid rgba(var(--item-color-rgb), 1.15);
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
padding: 5px;
|
|
137
|
+
margin: 8px 0;
|
|
138
|
+
height: auto;
|
|
139
|
+
box-shadow: 0 4px 0 rgba(var(--primary-color-rgb), 0.05);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.grid__subnav__alternate > ul {
|
|
143
|
+
width: 100%;
|
|
144
|
+
list-style: none;
|
|
145
|
+
padding: 0;
|
|
146
|
+
margin: 0;
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-wrap: wrap;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.grid__subnav__alternate > ul li {
|
|
152
|
+
width: 100%;
|
|
153
|
+
margin-bottom: 3px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.grid__subnav__alternate > ul li a {
|
|
157
|
+
width: 100%;
|
|
158
|
+
padding: 8px 20px;
|
|
159
|
+
box-sizing: border-box;
|
|
160
|
+
display: block;
|
|
161
|
+
text-decoration: none;
|
|
162
|
+
background: rgba(var(--item-color-rgb), 1.05);
|
|
163
|
+
color: var(--secondary-color);
|
|
164
|
+
border-radius: 5px;
|
|
165
|
+
transition: background 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
166
|
+
outline: none;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.grid__subnav__alternate > ul li:hover a {
|
|
171
|
+
background: var(--primary-color);
|
|
172
|
+
color: var(--secondary-color);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.grid__subnav__alternate > ul li .subactive {
|
|
176
|
+
font-weight: 700;
|
|
177
|
+
background: var(--primary-color);
|
|
178
|
+
color: var(--secondary-color);
|
|
179
|
+
}
|
|
180
|
+
|
|
130
181
|
.grid__minheight {
|
|
131
182
|
min-height: 300px;
|
|
132
183
|
}
|