@visns-studio/visns-components 4.4.10 → 4.4.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.
@@ -1,3 +1,5 @@
1
+ import '../styles/global.css';
2
+
1
3
  import React, {
2
4
  forwardRef,
3
5
  useCallback,
@@ -1181,7 +1181,6 @@ function Field({
1181
1181
  <td
1182
1182
  key={`table-radio-cell-${settings.id}-${row.id}-${column.id}`}
1183
1183
  >
1184
- {console.info(column, row)}
1185
1184
  <input
1186
1185
  type="checkbox"
1187
1186
  name={row.id}
@@ -336,19 +336,21 @@ function Navigation({
336
336
  }, []);
337
337
 
338
338
  return layout === 'simple' || layout === 'cms' ? (
339
- <div className="cwrap">
339
+ <div className={styles.cwrap}>
340
340
  <aside
341
341
  className={
342
- isOpen ? 'aside--cms' : 'aside--cms aside--cms--open'
342
+ isOpen
343
+ ? `${styles['aside--cms']}`
344
+ : `${styles['aside--cms']} ${styles['aside--cms--open']}`
343
345
  }
344
346
  >
345
- <div className="logo">
347
+ <div className={styles.logo}>
346
348
  <Link to="/">
347
349
  <img src={logo} alt="System Logo" />
348
350
  </Link>
349
351
  </div>
350
- <div className="awrap">
351
- <nav className="navwrap">
352
+ <div className={styles.awrap}>
353
+ <nav className={styles.navwrap}>
352
354
  <ul className={appNavClasses}>
353
355
  {navData.navigations.map((nav, navKey) =>
354
356
  nav.permission === true ||
@@ -362,13 +364,15 @@ function Navigation({
362
364
  </nav>
363
365
  </div>
364
366
  </aside>
365
- <main className="content">
366
- <div className="content-header">
367
+ <main className={styles.content}>
368
+ <div className={styles['content-header']}>
367
369
  {searchComponent}
368
- <div className="content-title">
370
+ <div className={styles['content-title']}>
369
371
  <button
370
372
  className={
371
- isOpen ? 'mobmenu' : 'mobmenu mobmenu--open'
373
+ isOpen
374
+ ? `${styles.mobmenu}`
375
+ : `${styles.mobmenu} ${styles['mobmenu--open']}`
372
376
  }
373
377
  onClick={() => setOpen(!isOpen)}
374
378
  >
@@ -380,7 +384,7 @@ function Navigation({
380
384
  <span></span>
381
385
  </button>
382
386
  </div>
383
- <div className="hactions">
387
+ <div className={styles['hactions-alternate']}>
384
388
  <ul>
385
389
  {navData.settings.map((setting, settingKey) =>
386
390
  setting.permission === true ? (
@@ -135,10 +135,6 @@ const Login = ({ loginBg, logo, providers, setSystemAuth, setUserProfile }) => {
135
135
  }
136
136
  };
137
137
 
138
- useEffect(() => {
139
- console.info(loginBg, 'test111');
140
- }, [loginBg]);
141
-
142
138
  return (
143
139
  <div className={styles.lcontainer}>
144
140
  <div className={styles.lwrap}>
@@ -71,7 +71,6 @@ const GenericAuth = ({
71
71
 
72
72
  useEffect(() => {
73
73
  updateAuthStatus();
74
- console.info(loginBg, 'test222');
75
74
  }, [isAuthenticated]);
76
75
 
77
76
  return (
@@ -25,7 +25,13 @@ import TableFilter from '../TableFilter';
25
25
 
26
26
  import styles from './styles/GenericDetail.module.css';
27
27
 
28
- function GenericDetail({ extraUrlParam, setting, urlParam, userProfile }) {
28
+ function GenericDetail({
29
+ extraUrlParam,
30
+ layout = 'full',
31
+ setting,
32
+ urlParam,
33
+ userProfile,
34
+ }) {
29
35
  const gridRef = useRef(null);
30
36
  const currentConfigRef = useRef(null);
31
37
  const routeParams = useParams();
@@ -39,7 +45,6 @@ function GenericDetail({ extraUrlParam, setting, urlParam, userProfile }) {
39
45
  /** General States */
40
46
  const [activeStage, setActiveStage] = useState('');
41
47
  const [config, setConfig] = useState({});
42
- const [currentConfig, setCurrentConfig] = useState({});
43
48
  const [data, setData] = useState({});
44
49
  const [dataReload, setDataReload] = useState(0);
45
50
  const [rowsSelected, setRowsSelected] = useState({});
@@ -1343,7 +1348,13 @@ function GenericDetail({ extraUrlParam, setting, urlParam, userProfile }) {
1343
1348
  <>
1344
1349
  <div className={styles.grid}>
1345
1350
  <div className={styles.grid__row}>
1346
- <div className={`${styles.grid__full} ${styles.crmtitle}`}>
1351
+ <div
1352
+ className={`${styles.grid__full} ${
1353
+ layout === 'full'
1354
+ ? styles.crmtitle
1355
+ : styles['crmtitle--alternate']
1356
+ }`}
1357
+ >
1347
1358
  <Breadcrumb data={data} page={page} />
1348
1359
  {total > 0 && (
1349
1360
  <div className={styles.titleInfo}>
@@ -275,7 +275,9 @@ function GenericIndex({ layout = 'full', setting, userProfile }) {
275
275
  );
276
276
  } else {
277
277
  return (
278
- <div className="grid__full">{renderContentBasedOnType()}</div>
278
+ <div className={styles.grid__full}>
279
+ {renderContentBasedOnType()}
280
+ </div>
279
281
  );
280
282
  }
281
283
  }, [layout, subnav, setSubnav, setConfig, renderTable]);
@@ -284,9 +286,15 @@ function GenericIndex({ layout = 'full', setting, userProfile }) {
284
286
  <>
285
287
  <div className={styles.grid}>
286
288
  <div className={styles.grid__row}>
287
- <div className={`${styles.grid__full} ${styles.crmtitle}`}>
289
+ <div
290
+ className={`${styles.grid__full} ${
291
+ layout === 'full'
292
+ ? styles.crmtitle
293
+ : styles.crmtitleSimple
294
+ }`}
295
+ >
288
296
  <h1>{setting.page?.title}</h1>
289
- <div className="titleInfo">
297
+ <div className={styles.titleInfo}>
290
298
  <span>
291
299
  [<strong>{total}</strong> Total{' '}
292
300
  {setting.page?.title}]
@@ -1,3 +1,5 @@
1
+ import '../../styles/global.css';
2
+
1
3
  import React, { useState } from 'react';
2
4
  import { Routes, Route, Navigate } from 'react-router-dom';
3
5
 
@@ -65,7 +67,7 @@ const GenericMain = ({
65
67
  });
66
68
  };
67
69
 
68
- return (
70
+ return layout === 'full' ? (
69
71
  <div>
70
72
  <header
71
73
  className={
@@ -100,6 +102,27 @@ const GenericMain = ({
100
102
  </div>
101
103
  </main>
102
104
  </div>
105
+ ) : (
106
+ <Navigation
107
+ layout={layout}
108
+ logo={logo}
109
+ navConfig={navigation}
110
+ setSystemAuth={setSystemAuth}
111
+ themeType={themeType}
112
+ userProfile={userProfile}
113
+ >
114
+ <div className={styles['content-main']} id="app">
115
+ <div className={styles.paddingSimple}>
116
+ <Routes>
117
+ {renderRoutes(routeConfig)}
118
+ {/* Add a wildcard route for handling unknown paths */}
119
+ <Route path="*" element={<Navigate to="/" replace />} />
120
+ </Routes>
121
+ </div>
122
+ <Call incomingCallData={incomingCallData} />
123
+ <Loader />
124
+ </div>
125
+ </Navigation>
103
126
  );
104
127
  };
105
128
 
@@ -241,6 +241,42 @@
241
241
  }
242
242
  }
243
243
 
244
+ .crmtitle--alternate {
245
+ border: none;
246
+ min-height: auto;
247
+ padding: 5px 20px;
248
+ margin: 0;
249
+ background: var(--tertiary-color);
250
+ border-radius: var(--br);
251
+ border: 1px solid rgba(var(--item-color-rgb), 1.15);
252
+ position: relative;
253
+ display: flex;
254
+ align-items: center;
255
+
256
+ h1 {
257
+ color: var(--paragraph-color);
258
+ font-weight: 700;
259
+ font-size: 1.15em;
260
+ margin: 0;
261
+ padding: 0.65rem 0;
262
+ display: flex;
263
+ align-items: center;
264
+ gap: 0.25rem;
265
+
266
+ a {
267
+ text-decoration: none;
268
+ color: var(--primary-color);
269
+ }
270
+
271
+ svg {
272
+ position: relative;
273
+ top: 0;
274
+ margin: 0 0.5rem;
275
+ max-width: 15px;
276
+ }
277
+ }
278
+ }
279
+
244
280
  .titleInfo {
245
281
  position: absolute;
246
282
  right: 2em;
@@ -576,3 +612,27 @@
576
612
  .oppdets {
577
613
  line-height: 1.475em;
578
614
  }
615
+
616
+ .btn {
617
+ width: max-content;
618
+ display: inline-block;
619
+ position: relative;
620
+ padding: 0.65rem 1rem;
621
+ cursor: pointer;
622
+ font-size: 1rem;
623
+ color: var(--tertiary-color);
624
+ text-decoration: none;
625
+ overflow: hidden;
626
+ background: var(--primary-color);
627
+ border: 1px solid rgba(var(--primary-color--rgb), 1.1);
628
+ border-radius: var(--br);
629
+ outline: none;
630
+ transition: all 0.2s cubic-bezier(0.85, 0, 0.15, 1) 0s;
631
+ font-size: 1.25em;
632
+ }
633
+
634
+ .btn:hover {
635
+ color: var(--primary-color);
636
+ background: var(--highlight-color);
637
+ border: 1px solid rgba(var(--highlight-color-rgb), 1.05);
638
+ }
@@ -177,6 +177,26 @@
177
177
  margin: 0 0.25rem;
178
178
  }
179
179
 
180
+ .crmtitleSimple {
181
+ border: none;
182
+ min-height: auto;
183
+ padding: 0.65rem 1rem;
184
+ margin-bottom: 0.15rem;
185
+ background: var(--tertiary-color);
186
+ border-radius: var(--br);
187
+ box-sizing: border-box;
188
+ display: flex;
189
+ flex-wrap: nowrap;
190
+ justify-content: space-between;
191
+ align-items: center;
192
+
193
+ h1 {
194
+ font-size: 1.25rem;
195
+ margin: 0;
196
+ padding: 0;
197
+ }
198
+ }
199
+
180
200
  .titleInfo {
181
201
  position: absolute;
182
202
  right: 2em;
@@ -85,3 +85,7 @@
85
85
  .padding {
86
86
  padding: 5em 1em 1em 1em;
87
87
  }
88
+
89
+ .paddingSimple {
90
+ padding: 1rem;
91
+ }
@@ -14,19 +14,18 @@
14
14
  outline: none;
15
15
  transition: all 0.2s cubic-bezier(0.85, 0, 0.15, 1) 0s;
16
16
  font-size: 1.25em;
17
+ }
17
18
 
18
- &:hover {
19
- color: var(--primary-color);
20
- background: var(--highlight-color);
21
- border: 1px solid rgba(var(--highlight-color-rgb), 1.05);
22
- }
19
+ .btn:hover {
20
+ color: var(--primary-color);
21
+ background: var(--highlight-color);
22
+ border: 1px solid rgba(var(--highlight-color-rgb), 1.05);
23
23
  }
24
- .vs-datagrid--row {
25
- &:hover {
26
- .InovuaReactDataGrid__row-cell-wrap {
27
- background: rgb(240, 240, 240) !important;
28
- cursor: pointer;
29
- }
24
+
25
+ .vs-datagrid--row:hover {
26
+ .InovuaReactDataGrid__row-cell-wrap {
27
+ background: rgb(240, 240, 240) !important;
28
+ cursor: pointer;
30
29
  }
31
30
  }
32
31
 
@@ -39,17 +38,13 @@
39
38
  color: var(--primary-color) !important;
40
39
  }
41
40
 
42
- .InovuaReactDataGrid__row-hover-target {
43
- &:hover {
44
- color: black !important;
45
- background: rgb(240, 240, 240) !important;
46
- }
41
+ .InovuaReactDataGrid__row-hover-target:hover {
42
+ color: black !important;
43
+ background: rgb(240, 240, 240) !important;
47
44
  }
48
45
 
49
- .InovuaReactDataGrid__row {
50
- &:hover {
51
- cursor: pointer;
52
- }
46
+ .InovuaReactDataGrid__row:hover {
47
+ cursor: pointer;
53
48
  }
54
49
 
55
50
  #smartTableSearchInput {
@@ -58,17 +53,17 @@
58
53
  border-radius: var(--br);
59
54
  color: var(--paragraph-color);
60
55
  padding: 10px 10px 10px 35px;
56
+ }
61
57
 
62
- &:focus {
63
- border: 1px solid lighten(#474747, 10%);
64
- box-shadow: none;
65
- transform: translateY(0);
66
- }
58
+ #smartTableSearchInput:focus {
59
+ border: 1px solid lighten(#474747, 10%);
60
+ box-shadow: none;
61
+ transform: translateY(0);
62
+ }
67
63
 
68
- &:hover {
69
- box-shadow: none;
70
- transform: translateY(0);
71
- }
64
+ #smartTableSearchInput:hover {
65
+ box-shadow: none;
66
+ transform: translateY(0);
72
67
  }
73
68
 
74
69
  .filterInput--alt {
@@ -337,3 +337,240 @@
337
337
  transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
338
338
  }
339
339
  }
340
+
341
+ /** Simple Layout */
342
+ .cwrap {
343
+ display: flex;
344
+ }
345
+
346
+ .aside--cms {
347
+ background: var(--nav-bg);
348
+ position: fixed;
349
+ overflow: hidden;
350
+ height: 100%;
351
+ width: var(--sidebar-width);
352
+ }
353
+
354
+ .aside--cms--open {
355
+ transform: translateX(0);
356
+ transition: all 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
357
+ }
358
+
359
+ .aside--cms .logo {
360
+ width: 100%;
361
+ position: relative;
362
+ background: rgba(var(--tertiary-color-rgb), 0.95);
363
+ height: 50px;
364
+ display: flex;
365
+ flex-wrap: nowrap;
366
+ justify-content: center;
367
+ align-items: center;
368
+ }
369
+
370
+ .cwrap .logo img {
371
+ width: 100%;
372
+ max-width: 90px;
373
+ height: auto;
374
+ display: block;
375
+ margin: 0 auto;
376
+ }
377
+
378
+ .awrap {
379
+ width: 100%;
380
+ position: relative;
381
+ padding: 1rem 0;
382
+ }
383
+
384
+ .navwrap {
385
+ width: 100%;
386
+ position: relative;
387
+ }
388
+
389
+ .aside--cms .awrap .navwrap .app-nav {
390
+ width: 100%;
391
+ display: flex;
392
+ flex-wrap: wrap;
393
+ flex-direction: column;
394
+ padding: 0;
395
+ margin: 0;
396
+ list-style: none;
397
+ }
398
+
399
+ .aside--cms .awrap .navwrap .app-nav .nav-item {
400
+ width: 100%;
401
+ cursor: pointer;
402
+ box-sizing: border-box;
403
+ position: relative;
404
+ border-radius: var(--br);
405
+ overflow: hidden;
406
+ padding: 0.15rem 0.45rem;
407
+ }
408
+
409
+ .aside--cms .awrap .navwrap .app-nav .nav-item a {
410
+ display: flex;
411
+ flex-wrap: nowrap;
412
+ align-items: center;
413
+ color: var(--tertiary-color);
414
+ box-sizing: border-box;
415
+ padding: 0.5rem 1rem;
416
+ line-height: 1.25;
417
+ text-decoration: none;
418
+ background: var(--nav-bg);
419
+ outline: none;
420
+ border-radius: var(--br);
421
+ transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
422
+ }
423
+
424
+ .aside--cms .awrap .navwrap .app-nav .nav-item a > svg {
425
+ position: relative;
426
+ right: 8px;
427
+ opacity: 1;
428
+ transition: opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
429
+ color: var(--highlight-color);
430
+ }
431
+
432
+ .aside--cms .awrap .navwrap .app-nav .nav-item:hover a,
433
+ .aside--cms .awrap .navwrap .app-nav .nav-item.active a {
434
+ transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
435
+ background: rgba(var(--tertiary-color-rgb), 0.05);
436
+ color: var(--highlight-color);
437
+ }
438
+
439
+ .aside--cms .awrap .navwrap .app-nav .nav-item:hover a > svg,
440
+ .aside--cms .awrap .navwrap .app-nav .nav-item.active a > svg {
441
+ opacity: 1;
442
+ transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
443
+ }
444
+
445
+ .aside--cms .awrap .navwrap .app-nav .nav-item:hover ul {
446
+ display: block;
447
+ opacity: 1;
448
+ }
449
+
450
+ .aside--cms .awrap .navwrap .app-nav .nav-item.active a {
451
+ background: rgba(var(--tertiary-color-rgb), 0.075);
452
+ color: var(--highlight-color);
453
+ }
454
+
455
+ .aside--cms .awrap .navwrap .app-nav .nav-item span {
456
+ display: block;
457
+ color: rgba(var(--paragraph-color-rgb), 0.3);
458
+ box-sizing: border-box;
459
+ padding: 1.25em 0.85em;
460
+ line-height: 1.25;
461
+ text-decoration: none;
462
+ background: var(--primary-color);
463
+ }
464
+
465
+ .aside--cms .awrap .navwrap .app-nav .nav-item span:hover {
466
+ transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
467
+ background: rgba(var(--primary-color-rgb), 1.05);
468
+ }
469
+
470
+ .aside--cms .awrap .navwrap .app-nav .nav-item > ul {
471
+ width: 200px;
472
+ position: absolute;
473
+ height: auto;
474
+ margin: 0;
475
+ padding: 0.25em;
476
+ list-style: none;
477
+ display: none;
478
+ opacity: 0;
479
+ background: var(---primary-color);
480
+ border-radius: 5px;
481
+ }
482
+
483
+ .aside--cms .awrap .navwrap .app-nav .nav-item > ul li {
484
+ display: block;
485
+ position: relative;
486
+ margin-bottom: 2px;
487
+ }
488
+
489
+ .aside--cms .awrap .navwrap .app-nav .nav-item > ul li:last-of-type {
490
+ margin-bottom: 0;
491
+ }
492
+
493
+ .aside--cms .awrap .navwrap .app-nav .nav-item > ul li a {
494
+ width: 100%;
495
+ padding: 8px 20px;
496
+ box-sizing: border-box;
497
+ display: block;
498
+ text-decoration: none;
499
+ background: rgba(var(--primary-color-rgb), 0.92);
500
+ color: var(---tertiary-color);
501
+ border-radius: 3px;
502
+ transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
503
+ outline: none;
504
+ }
505
+
506
+ .aside--cms .awrap .navwrap .app-nav .nav-item > ul li:hover a {
507
+ background: rgba(var(--secondary-color-rgb), 0.75);
508
+ color: var(---primary-color);
509
+ transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
510
+ }
511
+
512
+ .content {
513
+ margin-left: var(--sidebar-width);
514
+ flex-grow: 1;
515
+
516
+ .content-header {
517
+ background: var(--tertiary-color);
518
+ box-sizing: border-box;
519
+ padding: 0.15rem;
520
+ height: 50px;
521
+ box-shadow: 1px 0px 0px rgba(255, 255, 255, 1);
522
+ display: flex;
523
+ flex-wrap: nowrap;
524
+ justify-content: space-between;
525
+ align-items: center;
526
+ }
527
+
528
+ .content-title {
529
+ width: max-content;
530
+ padding: 0 1rem;
531
+
532
+ h1 {
533
+ padding: 0;
534
+ margin: 0;
535
+ font-size: 1em;
536
+ line-height: 1.25;
537
+ color: var(--paragraph-color);
538
+ font-weight: 300;
539
+ }
540
+
541
+ .mobmenu {
542
+ display: none;
543
+ visibility: hidden;
544
+ }
545
+ }
546
+
547
+ .content-actions {
548
+ width: max-content;
549
+
550
+ ul {
551
+ display: flex;
552
+ padding: 0;
553
+ margin: 0;
554
+ list-style: none;
555
+ justify-content: flex-end;
556
+
557
+ li {
558
+ padding: 0 10px;
559
+ text-align: center;
560
+
561
+ i {
562
+ font-size: 1.25em;
563
+ }
564
+
565
+ a {
566
+ text-decoration: none;
567
+ color: var(--paragraph-color);
568
+ }
569
+ }
570
+ }
571
+ }
572
+
573
+ .content-main {
574
+ background: rgba(var(--tertiary-color-rgb), 1.05);
575
+ }
576
+ }
@@ -13,7 +13,7 @@
13
13
 
14
14
  body {
15
15
  font-size: 100%;
16
- background: var(--tertiary-color);
16
+ background: var(--tertiary-color-dark, var(--tertiary-color));
17
17
  font-family: 'Barlow', sans-serif;
18
18
  font-weight: 300;
19
19
  font-style: normal;
package/package.json CHANGED
@@ -58,7 +58,7 @@
58
58
  "react-dom": "^17.0.1"
59
59
  },
60
60
  "name": "@visns-studio/visns-components",
61
- "version": "4.4.10",
61
+ "version": "4.4.11",
62
62
  "description": "Various packages to assist in the development of our Custom Applications.",
63
63
  "main": "index.js",
64
64
  "scripts": {