@visns-studio/visns-components 4.10.9 → 4.10.11
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/Navigation.jsx +11 -7
- package/src/components/crm/generic/GenericDetail.jsx +8 -1
- package/src/components/crm/generic/GenericDynamic.jsx +6 -4
- package/src/components/crm/generic/styles/GenericDetail.module.scss +51 -0
- package/src/components/crm/styles/DataGrid.module.scss +0 -25
- package/src/components/crm/styles/Navigation.module.scss +10 -4
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.11",
|
|
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]
|
|
@@ -236,6 +236,10 @@ function Navigation({
|
|
|
236
236
|
};
|
|
237
237
|
|
|
238
238
|
const renderSetting = (n) => {
|
|
239
|
+
const isActive = location.pathname === n.url; // Check if current path matches setting URL
|
|
240
|
+
|
|
241
|
+
console.info(location.pathname, n);
|
|
242
|
+
|
|
239
243
|
const iconComponents = {
|
|
240
244
|
bug: Bug,
|
|
241
245
|
calendar: Calendar,
|
|
@@ -245,15 +249,18 @@ function Navigation({
|
|
|
245
249
|
signOut: SignOut,
|
|
246
250
|
};
|
|
247
251
|
|
|
252
|
+
const IconComponent = iconComponents[n.icon];
|
|
253
|
+
const settingClasses = isActive ? `${styles.active}` : ''; // Add active class if URLs match
|
|
254
|
+
|
|
248
255
|
if (n.id === 'notifications') {
|
|
249
256
|
return (
|
|
250
|
-
<li>
|
|
257
|
+
<li className={settingClasses}>
|
|
251
258
|
<Notification setSystemAuth={setSystemAuth} />
|
|
252
259
|
</li>
|
|
253
260
|
);
|
|
254
261
|
} else if (n.id === 'switchAccount') {
|
|
255
262
|
return (
|
|
256
|
-
<li>
|
|
263
|
+
<li className={settingClasses}>
|
|
257
264
|
<SwitchAccount
|
|
258
265
|
setSystemAuth={setSystemAuth}
|
|
259
266
|
setting={n}
|
|
@@ -262,9 +269,8 @@ function Navigation({
|
|
|
262
269
|
</li>
|
|
263
270
|
);
|
|
264
271
|
} else if (n.id === 'logout') {
|
|
265
|
-
const IconComponent = iconComponents[n.icon];
|
|
266
272
|
return (
|
|
267
|
-
<li>
|
|
273
|
+
<li className={settingClasses}>
|
|
268
274
|
<button
|
|
269
275
|
title={n.label}
|
|
270
276
|
data-tooltip-id="system-tooltip"
|
|
@@ -276,10 +282,8 @@ function Navigation({
|
|
|
276
282
|
</li>
|
|
277
283
|
);
|
|
278
284
|
} else {
|
|
279
|
-
const IconComponent = iconComponents[n.icon];
|
|
280
|
-
|
|
281
285
|
return (
|
|
282
|
-
<li>
|
|
286
|
+
<li className={settingClasses}>
|
|
283
287
|
<Link
|
|
284
288
|
to={n.url}
|
|
285
289
|
data-tooltip-id="system-tooltip"
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -22,31 +22,6 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.vs-datagrid--row:hover {
|
|
26
|
-
.InovuaReactDataGrid__row-cell-wrap {
|
|
27
|
-
background: rgb(240, 240, 240) !important;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.InovuaReactDataGrid {
|
|
33
|
-
letter-spacing: 0.015rem !important;
|
|
34
|
-
color: black !important;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.InovuaReactDataGrid__header {
|
|
38
|
-
color: var(--primary-color) !important;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.InovuaReactDataGrid__row-hover-target:hover {
|
|
42
|
-
color: black !important;
|
|
43
|
-
background: rgb(240, 240, 240) !important;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.InovuaReactDataGrid__row:hover {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
25
|
#smartTableSearchInput {
|
|
51
26
|
background: #eeeeee;
|
|
52
27
|
border: 1px solid rgba(var(--table-color-rgb), 1.1);
|
|
@@ -238,12 +238,15 @@
|
|
|
238
238
|
align-items: center;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
/* Hover and Active States for <a> */
|
|
242
|
+
> ul a:hover,
|
|
243
|
+
> ul a.active {
|
|
242
244
|
background: var(--primary-color-lighter);
|
|
243
245
|
transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
244
246
|
}
|
|
245
247
|
|
|
246
|
-
> ul a:hover svg
|
|
248
|
+
> ul a:hover svg,
|
|
249
|
+
> ul a.active svg {
|
|
247
250
|
color: var(--highlight-color);
|
|
248
251
|
transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
249
252
|
}
|
|
@@ -263,12 +266,15 @@
|
|
|
263
266
|
appearance: none;
|
|
264
267
|
}
|
|
265
268
|
|
|
266
|
-
button
|
|
269
|
+
/* Hover and Active States for button */
|
|
270
|
+
button:hover,
|
|
271
|
+
button.active {
|
|
267
272
|
background: var(--primary-color-lighter);
|
|
268
273
|
transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
269
274
|
}
|
|
270
275
|
|
|
271
|
-
button:hover svg
|
|
276
|
+
button:hover svg,
|
|
277
|
+
button.active svg {
|
|
272
278
|
color: var(--highlight-color);
|
|
273
279
|
transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
274
280
|
}
|