react-graph-grid 0.0.2 → 0.0.5

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/README.md CHANGED
@@ -1,3 +1,135 @@
1
1
  # react-graph-grid
2
2
 
3
- A React package containing a grid that can communicate with other grids through a connection graph
3
+ A React package containing a grid that can communicate with other grids through a connection graph
4
+
5
+ For all questions, please contact rmb@mail.ru
6
+
7
+ Installation
8
+
9
+ npm install react-grpah-grid
10
+
11
+
12
+ Example
13
+
14
+ import { GridFE } from '../../node_modules/react-graph-grid/src/GridFE';
15
+ import TestData from '../../node_modules/react-graph-grid/src/Tests/TestData';
16
+
17
+ ...
18
+
19
+ /*
20
+ * assuming the API returns something like this:
21
+ * const rows = [
22
+ * {
23
+ * Id: 1,
24
+ * Name: 'Mikle',
25
+ * SecondName: 'Razumtsev',
26
+ * Date: '26/01/1979'
27
+ * Comment: 'Me',
28
+ * Hometown: 'Voronezh',
29
+ * HometownId: 1,
30
+ * },
31
+ * {
32
+ * Id: 2,
33
+ * Name: 'Boris',
34
+ * SecondName: 'Razumtsev',
35
+ * Date: '14/06/1953'
36
+ * Comment: 'Father',
37
+ * Hometown: 'Grafskaya',
38
+ * HometownId: 2,
39
+ * },
40
+ * {
41
+ * Id: 3,
42
+ * Name: 'Ilia',
43
+ * SecondName: 'Razumtsev',
44
+ * Date: '16/09/1980'
45
+ * Comment: 'Brother',
46
+ * Hometown: 'Pskov',
47
+ * HometownId: 4,
48
+ * },
49
+ * ]
50
+ *
51
+ *
52
+ * e.params = [
53
+ * { key: 'pageSize', value: 10 },
54
+ * { key: 'pageNumber', value: 1 }
55
+ * ]
56
+ *
57
+ */
58
+
59
+ function loadRows(e) {
60
+ return new Promise(function (resolve, reject) {
61
+ const fetchParams = {
62
+ mode: 'cors',
63
+ method: 'post',
64
+ headers: {
65
+ 'Content-Type': 'application/json'
66
+ },
67
+ body: JSON.stringify(e.params)
68
+ };
69
+
70
+ fetch(`/awesome-api-url/`, fetchParams).then(
71
+ (response) => {
72
+ resolve(response.json());
73
+ }
74
+ )
75
+ .catch(error => {
76
+ reject(error);
77
+ });
78
+ });
79
+ };
80
+
81
+ function loadColumns() {
82
+ return [
83
+ { name: 'Id', sortable: true, filtrable: true },
84
+ { name: 'Name', sortable: true, filtrable: true },
85
+ { name: 'SecondName', sortable: true, filtrable: true },
86
+ { name: 'Date', sortable: true },
87
+ { name: 'Comment', sortable: true, filtrable: true },
88
+ { name: 'HometownId', visible: false },
89
+ {
90
+ name: 'Hometown',
91
+ sortable: true,
92
+ filtrable: true,
93
+ type: 'lookup',
94
+ keyField: 'HometownId',
95
+ refKeyField: 'Id',
96
+ refNameField: 'City',
97
+ getRows: (e) => {
98
+ return new Promise(function (resolve, reject) {
99
+
100
+ const rows = new TestData().getCity(e);
101
+
102
+ if (rows != null) {
103
+ resolve(rows);
104
+ } else {
105
+ reject(Error("Error getting rows"));
106
+ }
107
+ });
108
+ }
109
+ },
110
+ ]
111
+ };
112
+
113
+
114
+ <GridFE
115
+ getRows={loadRows}
116
+ getColumns={loadColumns}
117
+ allowEditGrid={true}
118
+ />
119
+
120
+ Some grid properties
121
+
122
+ uid - grid uid
123
+ parentGrids - parent grids uids
124
+ buttons - buttons array [{ id: 1, name: 'commit', title: 'Commit changes', label: 'Commit', img: Images.commit, click: (e) => grid.commitChanges(e), getDisabled: (e) => grid.commitChangesDisabled(e) }, ... ]
125
+ multi - rows multiselect through a pocket
126
+ renderCell - custom render grid cell
127
+ getDefaultLinkContent - returns an object containing a data using when child grid responds to the parent grid active record
128
+ pageSize - grid page size
129
+
130
+
131
+ For more examples see DebugApp.jsx
132
+
133
+ 0.0.5 version
134
+
135
+ "Adjust column visibility" option added to GridFE.jsx module
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Mikhail Razumtsev",
4
4
  "description": "A React package containing a grid that can communicate with other grids through a connection graph",
5
5
  "private": false,
6
- "version": "0.0.2",
6
+ "version": "0.0.5",
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "dev": "vite --port 4000",
package/src/Grid.jsx CHANGED
@@ -90,7 +90,7 @@ export class GridClass extends BaseComponent {
90
90
  grid.renderCell = props.renderCell;
91
91
  }
92
92
 
93
- grid.dateFormat = props.dateFormat || 'dd.MM.yyyy';//'DD.MM.YYYY';
93
+ grid.dateFormat = props.dateFormat || 'dd.MM.yyyy';
94
94
  grid.dateTimeFormat = props.dateTimeFormat || 'dd.MM.yyyy HH:mm:ss';
95
95
 
96
96
  grid.rows = [];
@@ -289,6 +289,7 @@ export class GridClass extends BaseComponent {
289
289
  gridTemplateRows: '1.5em auto',
290
290
  gridAutoFlow: 'row',
291
291
  width: 'calc(100% + 8px)',
292
+ justifyContent: 'space-between',
292
293
  }}
293
294
  >
294
295
  {grid.renderHeaderCell(col, context)}
@@ -498,7 +499,8 @@ export class GridClass extends BaseComponent {
498
499
  for (let col of grid.columns) {
499
500
  col.id = id++;
500
501
  col.title = col.title || col.name;
501
- col.w = col.initW = col.w || 100;
502
+ col.w = col.w || 100;
503
+ col.initW = col.initW || 100;
502
504
  col.minW = col.minW || 50;
503
505
  col.grid = grid;
504
506
  grid.colDict[col.id] = grid.colDict[col.name] = grid.colDict[col.name.toLowerCase()] = col;
package/src/GridDB.jsx CHANGED
@@ -151,7 +151,12 @@ export class GridDBClass extends GridPKClass {
151
151
  {grid.renderPager()}
152
152
  {super.render()}
153
153
  {grid.renderPager(true)}
154
- <Dropdown init={(dd) => { grid.menuDropdown = dd; }} getItems={(e) => { return grid.getGridSettings(e); }} onItemClick={(e) => { grid.onSettingsItemClick(e.itemId); }}></Dropdown>
154
+ <Dropdown
155
+ init={(dd) => { grid.menuDropdown = dd; }}
156
+ closeWhenMiss={true}
157
+ getItems={(e) => { return grid.getGridSettings(e); }}
158
+ onItemClick={(e) => { grid.onSettingsItemClick(e.itemId); }}>
159
+ </Dropdown>
155
160
  </>
156
161
  )
157
162
  }
@@ -607,7 +612,7 @@ export class GridDBClass extends GridPKClass {
607
612
  }
608
613
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
609
614
  getHeaderGridTemplateColumns(col) {
610
- return col.sortInd == null ? 'auto 8px' : 'auto 22px';
615
+ return col.sortInd == null ? 'auto 12px' : 'auto 22px';
611
616
  }
612
617
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
613
618
  renderHeaderCell(col, context) {
@@ -774,12 +779,20 @@ export class GridDBClass extends GridPKClass {
774
779
  resetColumnsSort() {
775
780
  const grid = this;
776
781
  grid._sortString = '';
782
+ let needRefresh = false;
777
783
  for (let col of grid.columns) {
784
+ needRefresh = needRefresh || col.asc != false || col.desc != false;
785
+
778
786
  delete col.asc;
779
787
  delete col.desc;
780
788
  delete col.sortInd;
781
789
  }
782
- grid.refresh();
790
+ if (needRefresh) {
791
+ grid.refresh();
792
+ }
793
+ else {
794
+ grid.refreshState();
795
+ }
783
796
  }
784
797
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
785
798
  changeColumnSortOrder(column, e) {
package/src/GridFE.jsx CHANGED
@@ -111,6 +111,7 @@ export class GridFEClass extends GridFLClass {
111
111
  grid.onClosePopup(e);
112
112
  grid.refreshState();
113
113
  }}
114
+ footerButtons={grid._popupButtons ? grid._popupButtons : null}
114
115
  >
115
116
  </Modal>
116
117
  :
@@ -123,10 +124,12 @@ export class GridFEClass extends GridFLClass {
123
124
  grid.popupIsShowing = false;
124
125
  grid.popupCloseWhenEscape = false;
125
126
  grid.popupTitle = '';
127
+ delete grid._popupButtons;
126
128
  }
127
129
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
128
130
  renderPopupContent() {
129
- return <></>;
131
+ const grid = this;
132
+ return grid.columnsSettingsIsShowing ? grid.renderColumnsSettings() : <></>;
130
133
  }
131
134
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
132
135
  renderCell(grid, col, row, selected) {
@@ -506,4 +509,212 @@ export class GridFEClass extends GridFLClass {
506
509
  });
507
510
  }
508
511
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
512
+ getGridSettingsList() {
513
+ const res = super.getGridSettingsList();
514
+
515
+ const grid = this;
516
+
517
+ res.push({ id: 4, text: grid.translate('Adjust column visibility', 'grid-menu') });
518
+
519
+ if (!grid.exportDisabled) {
520
+ res.push({ id: 5, text: grid.translate('Export to CSV', 'grid-menu') });
521
+ }
522
+
523
+ return res;
524
+ }
525
+ // -------------------------------------------------------------------------------------------------------------------------------------------------------------
526
+ onSettingsItemClick(itemId) {
527
+ super.onSettingsItemClick(itemId);
528
+ const grid = this;
529
+
530
+ switch (String(itemId)) {
531
+ case '4':
532
+ grid.showColumnsSettings();
533
+ grid.refreshState();
534
+ break;
535
+ case '5':
536
+ grid.exportToCSV();
537
+ grid.refreshState();
538
+ break;
539
+ default:
540
+ }
541
+ }
542
+ // -------------------------------------------------------------------------------------------------------------------------------------------------------------
543
+ showColumnsSettings() {
544
+ const grid = this;
545
+ grid.popupIsShowing = true;
546
+ grid.columnsSettingsIsShowing = true;
547
+ grid.popupTitle = grid.translate('Adjust column visibility');
548
+
549
+ grid._visibleColumnsCount = 0;
550
+ for (let col of grid.columns) {
551
+ col._newVisible = col.visible;
552
+ if (col._newVisible != false) grid._visibleColumnsCount++;
553
+ }
554
+
555
+ grid._popupButtons = [
556
+ {
557
+ title: grid.translate('OK'),
558
+ onClick: (e) => {
559
+ for (let col of grid.columns) {
560
+ col.visible = col._newVisible;
561
+ }
562
+ grid.columnsSettingsIsShowing = false;
563
+ grid.onClosePopup();
564
+ grid.refreshState();
565
+ }
566
+ },
567
+ {
568
+ title: grid.translate('Cancel'),
569
+ onClick: (e) => {
570
+ grid.columnsSettingsIsShowing = false;
571
+ grid.onClosePopup();
572
+ grid.refreshState();
573
+ }
574
+ },
575
+ ];
576
+ }
577
+ // -------------------------------------------------------------------------------------------------------------------------------------------------------------
578
+ hideAllColumns(preview) {
579
+ const grid = this;
580
+ let first = true;
581
+ for (let col of grid.columns) {
582
+ if (col._newVisible == false || !preview && col.visible == false) continue;
583
+
584
+ if (first) {
585
+ first = false;
586
+ continue;
587
+ }
588
+
589
+ if (preview) {
590
+ col._newVisible = false;
591
+ grid._visibleColumnsCount--;
592
+ }
593
+ else {
594
+ col.visible = false;
595
+ }
596
+ }
597
+ }
598
+ // -------------------------------------------------------------------------------------------------------------------------------------------------------------
599
+ showAllColumns(preview) {
600
+ const grid = this;
601
+ for (let col of grid.columns) {
602
+ if (col._newVisible != false || !preview && col.visible != false) continue;
603
+
604
+ if (preview) {
605
+ col._newVisible = true;
606
+ grid._visibleColumnsCount++;
607
+ }
608
+ else {
609
+ col.visible = true;
610
+ }
611
+ }
612
+ }
613
+ // -------------------------------------------------------------------------------------------------------------------------------------------------------------
614
+ renderColumnsSettings() {
615
+ const grid = this;
616
+ return (
617
+ <div className='grid-columns-settings-div'>
618
+ <div>
619
+ <ul className='dropdown-ul grid-columns-settings-div-ul'>
620
+ <li className="dropdown-item" onClick={(e) => { grid.hideAllColumns(true); grid.refreshState(); }}>
621
+ <div className="dropdown-item-div">
622
+ <span className='grid-columns-settings-label'>{grid.translate('Visible columns')}</span>
623
+ {Images.images.last()}
624
+ </div>
625
+ </li>
626
+ {
627
+ grid.columns.map((column) => {
628
+ if (column._newVisible == false) return <></>;
629
+
630
+ return (
631
+ <li className="dropdown-item" onClick={(e) => { if (grid._visibleColumnsCount > 1) { column._newVisible = false; grid._visibleColumnsCount--; grid.refreshState(); } }}>
632
+ <div className="dropdown-item-div">
633
+ <span>{column.title}</span>
634
+ {Images.images.next()}
635
+ </div>
636
+ </li>
637
+ );
638
+ })
639
+ }
640
+ </ul>
641
+ </div>
642
+ <div></div>
643
+ <div>
644
+ <ul className='dropdown-ul grid-columns-settings-div-ul'>
645
+ <li className="dropdown-item" onClick={(e) => { grid.showAllColumns(true); grid.refreshState(); }}>
646
+ <div className="dropdown-item-div">
647
+ {Images.images.first()}
648
+ <span className='grid-columns-settings-label'>{grid.translate('Invisible columns')}</span>
649
+ </div>
650
+ </li>
651
+ {
652
+ grid.columns.map((column) => {
653
+ if (column._newVisible != false) return <></>;
654
+
655
+ return (
656
+ <li className="dropdown-item" onClick={(e) => { column._newVisible = true; grid._visibleColumnsCount++; grid.refreshState(); }}>
657
+ <div className="dropdown-item-div">
658
+ {Images.images.prev()}
659
+ <span>{column.title}</span>
660
+ </div>
661
+ </li>
662
+ );
663
+ })
664
+ }
665
+ </ul>
666
+ </div>
667
+ </div>
668
+ );
669
+ }
670
+ // -------------------------------------------------------------------------------------------------------------------------------------------------------------
671
+ exportToCSV(filename, delimeter) {
672
+ const grid = this;
673
+
674
+ if (filename == null || filename == '') {
675
+ const date = new Date();
676
+ filename = `exportCSV_${date.getDate()}_${date.getMonth()}_${date.getFullYear()}_${date.getTime()}_`;
677
+ };
678
+
679
+ delimeter = delimeter || ';';
680
+
681
+ let titles = [];
682
+ for (let col of grid.columns) {
683
+ if (col.visible == false) continue;
684
+ titles.push(col.title || col.name);
685
+ }
686
+
687
+ // 1. Преобразование данных в CSV строку
688
+ const csvContent = "\uFEFF" + // Добавляем BOM для корректного отображения кириллицы в Excel
689
+ [
690
+ titles.join(delimeter), // Заголовки
691
+ ...grid.rows.map(item => {
692
+
693
+ let values = [];
694
+ for (let col of grid.columns) {
695
+ if (col.visible == false) continue;
696
+ values.push(item[col.name]);
697
+ }
698
+ return values.join(delimeter);
699
+
700
+ //return Object.values(item).join(delimeter);
701
+ }) // Строки данных
702
+ ].join("\n");
703
+
704
+ // 2. Создание Blob
705
+ const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
706
+
707
+ // 3. Создание ссылки и скачивание
708
+ const link = document.createElement("a");
709
+ if (link.download !== undefined) {
710
+ const url = URL.createObjectURL(blob);
711
+ link.setAttribute("href", url);
712
+ link.setAttribute("download", filename);
713
+ link.style.visibility = 'hidden';
714
+ document.body.appendChild(link);
715
+ link.click();
716
+ document.body.removeChild(link);
717
+ }
718
+ }
719
+ // -------------------------------------------------------------------------------------------------------------------------------------------------------------
509
720
  }
package/src/GridFL.jsx CHANGED
@@ -79,6 +79,7 @@ export class GridFLClass extends GridDBClass {
79
79
  <Dropdown
80
80
  getItems={(e) => { return grid.getAutocomleteItems(e); }}
81
81
  onItemClick={(e) => { grid.onAutocomleteItemClick(e); }}
82
+ closeWhenMiss={true}
82
83
  init={(dd) => {
83
84
  if (grid._autocompleteDropdown) {
84
85
  dd.visible = grid._autocompleteDropdown.visible;
@@ -411,7 +412,7 @@ export class GridFLClass extends GridDBClass {
411
412
  }
412
413
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
413
414
  getHeaderGridTemplateColumns(col) {
414
- return col.sortInd == null /*&& (col.filter == null || col.filter === '')*/ ? 'auto 18px' : 'auto 22px';
415
+ return col.sortInd == null ? 'auto 12px' : 'auto 22px';
415
416
  }
416
417
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
417
418
  getGridSettingsList() {
package/src/Modal.jsx CHANGED
@@ -54,7 +54,8 @@ export class ModalClass extends BaseComponent {
54
54
 
55
55
  wnd.opt.closeWhenClick = props.closeWhenClick;
56
56
  wnd.opt.closeWhenEscape = props.closeWhenEscape;
57
- wnd.opt.closeWhenMiss = (props.closeWhenMiss || !props.closeWhenMouseLeave) && wnd.opt.isModal;
57
+ wnd.opt.closeWhenMiss = props.closeWhenMiss && wnd.opt.isModal;
58
+ //wnd.opt.closeWhenMiss = (props.closeWhenMiss || props.closeWhenMouseLeave == false) && wnd.opt.isModal;
58
59
  wnd.opt.closeWhenMouseLeave = props.closeWhenMouseLeave;
59
60
 
60
61
  wnd.opt.onMouseEnter = props.onMouseEnter;
@@ -235,7 +236,7 @@ export class ModalClass extends BaseComponent {
235
236
  wnd-btn={`button_${wnd.id}_${btn._ind}_`}
236
237
  className={wnd.opt.footerButtonClass}
237
238
  title={btn.title}
238
- onClick={btn.onclick ? (e) => btn.onclick(e) : null}
239
+ onClick={btn.onClick ? (e) => btn.onClick(e) : null}
239
240
  disabled={btn.getDisabled ? btn.getDisabled() : false}
240
241
  >
241
242
  <i className={btn.imageClass}></i>
@@ -306,12 +307,14 @@ export class ModalClass extends BaseComponent {
306
307
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
307
308
  close() {
308
309
  const wnd = this;
309
- wnd.visible = false;
310
310
 
311
311
  if (wnd.onClose) {
312
- wnd.onClose();
312
+ const ev = {};
313
+ wnd.onClose(ev);
314
+ if (ev.cancel) return;
313
315
  }
314
316
 
317
+ wnd.visible = false;
315
318
  wnd.refreshState();
316
319
  }
317
320
  // -------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -10,7 +10,7 @@ export default class TestData {
10
10
 
11
11
  const family = [
12
12
  { Id: 1, ParentId: [3, 4], Name: 'Mikle', SecondName: 'Razumtsev', Date: '26/01/1979', Comment: 'Good boy', Hometown: 'Voronezh', HometownId: 1 },
13
- { Id: 2, ParentId: [0], Name: 'Nataly', SecondName: 'Sche..', Date: '15/01/1999', Comment: 'Good girl', Hometown: 'Hanty-Mansiysk', HometownId: 12 },
13
+ { Id: 2, ParentId: [0], Name: 'Nataly', SecondName: 'Sche..', Date: '14/01/1999', Comment: 'Good girl', Hometown: 'Hanty-Mansiysk', HometownId: 12 },
14
14
  { Id: 3, ParentId: [11, 23], Name: 'Lyuda', SecondName: 'Razumtseva', Date: '03/07/1953', Comment: 'Mommy', Hometown: 'Novosibirsk', HometownId: 8 },
15
15
  { Id: 4, ParentId: [5, 22], Name: 'Borya', SecondName: 'Razumtsev', Date: '14/06/1953', Comment: 'Papa', Hometown: 'Grafskaya', HometownId: 2 },
16
16
  { Id: 5, ParentId: [0], Name: 'Nina', SecondName: 'Razumtseva', Date: '17/06/1917', Comment: 'Babushka', Hometown: 'Ustyuzhna', HometownId: 9 },
@@ -25,22 +25,22 @@ export default class TestData {
25
25
  { Id: 14, ParentId: [6, 31], Name: 'Tuyanka', SecondName: 'Batyreva', Date: '15/11/2010', Comment: 'Plemyannica 3', Hometown: 'Elista', HometownId: 5 },
26
26
  { Id: 15, ParentId: [0], Name: 'Shura', SecondName: 'Pelushskaya', Date: '22/04/1919', Comment: 'Dv. Babushka', Hometown: 'Ustyuzhna', HometownId: 9 },
27
27
  { Id: 16, ParentId: [15], Name: 'Ira', SecondName: 'Pelushskaya', Date: '11/06/1947', Comment: 'Dv. Tetya', Hometown: 'Pskov', HometownId: 4 },
28
- { Id: 17, ParentId: [11, 23], Name: 'Sveta', SecondName: 'Dolginova', Date: '10/11/195?', Comment: 'Tetya', Hometown: 'Novosibirsk', HometownId: 8 },
29
- { Id: 18, ParentId: [11, 23], Name: 'Rita', SecondName: 'Dolginova', Date: '23/10/195?', Comment: 'Tetya', Hometown: 'Novosibirsk', HometownId: 8 },
30
- { Id: 19, ParentId: [11, 23], Name: 'Nadya', SecondName: 'Shaula', Date: '11/11/196?', Comment: 'Tetya', Hometown: 'Novosibirsk', HometownId: 8 },
31
- { Id: 20, ParentId: [11, 23], Name: 'Vitia', SecondName: 'Dolginov', Date: '11/11/196?', Comment: 'Dadya', Hometown: 'Novosibirsk', HometownId: 8 },
28
+ { Id: 17, ParentId: [11, 23], Name: 'Sveta', SecondName: 'Dolginova', Date: '10/11/1954', Comment: 'Tetya', Hometown: 'Novosibirsk', HometownId: 8 },
29
+ { Id: 18, ParentId: [11, 23], Name: 'Rita', SecondName: 'Dolginova', Date: '23/10/1956', Comment: 'Tetya', Hometown: 'Novosibirsk', HometownId: 8 },
30
+ { Id: 19, ParentId: [11, 23], Name: 'Nadya', SecondName: 'Shaula', Date: '11/11/1958', Comment: 'Tetya', Hometown: 'Novosibirsk', HometownId: 8 },
31
+ { Id: 20, ParentId: [11, 23], Name: 'Vitia', SecondName: 'Dolginov', Date: '11/11/1958', Comment: 'Dadya', Hometown: 'Novosibirsk', HometownId: 8 },
32
32
  { Id: 21, ParentId: [11, 23], Name: 'Tanya', SecondName: 'Dolginova', Date: '07/01/1963', Comment: 'Tetya', Hometown: 'Elista', HometownId: 5 },
33
- { Id: 22, ParentId: [0], Name: 'Misha', SecondName: 'Razumtsev', Date: '??/??/19??', Comment: 'Ded', Hometown: 'Grafskaya', HometownId: 2 },
34
- { Id: 23, ParentId: [0], Name: 'Zambo', SecondName: 'Dolginov', Date: '??/??/19??', Comment: 'Ded 2', Hometown: 'Elista', HometownId: 5 },
33
+ { Id: 22, ParentId: [0], Name: 'Misha', SecondName: 'Razumtsev', Date: '05/11/1918', Comment: 'Ded', Hometown: 'Grafskaya', HometownId: 2 },
34
+ { Id: 23, ParentId: [0], Name: 'Zambo', SecondName: 'Dolginov', Date: '24/04/1926', Comment: 'Ded 2', Hometown: 'Elista', HometownId: 5 },
35
35
 
36
36
  { Id: 24, ParentId: [18, 34], Name: 'Alina', SecondName: 'Ushakova', Date: '??/??/????', Comment: 'Dv. Sister', Hometown: 'Elista', HometownId: 5 },
37
37
  { Id: 25, ParentId: [19, 33], Name: 'Igor', SecondName: 'Shaula', Date: '??/??/????', Comment: 'Dv. Brother', Hometown: 'Energodar', HometownId: 14 },
38
38
  { Id: 26, ParentId: [19, 33], Name: 'Dima', SecondName: 'Shaula', Date: '??/??/????', Comment: 'Dv. Brother', Hometown: 'Energodar', HometownId: 14 },
39
39
  { Id: 27, ParentId: [20, 35], Name: 'Olga', SecondName: 'Dolginova', Date: '??/??/????', Comment: 'Dv. Sister', Hometown: 'Elista', HometownId: 5 },
40
40
  { Id: 28, ParentId: [20, 35], Name: 'Venia', SecondName: 'Dolginov', Date: '??/??/????', Comment: 'Dv. Brother', Hometown: 'Elista', HometownId: 5 },
41
- { Id: 29, ParentId: [20, 36], Name: 'Oleg', SecondName: 'Dolginov', Date: '??/??/????', Comment: 'Dv. Brother', Hometown: 'Elista', HometownId: 5 },
41
+ { Id: 29, ParentId: [20, 36], Name: 'Oleg', SecondName: 'Dolginov', Date: '10/11/????', Comment: 'Dv. Brother', Hometown: 'Elista', HometownId: 5 },
42
42
 
43
- { Id: 30, ParentId: [0], Name: 'Yura', SecondName: 'Pelushskiy', Date: '??/??/????', Comment: 'Dv. Ded', Hometown: 'Ustyuzhna', HometownId: 9 },
43
+ { Id: 30, ParentId: [0], Name: 'Yura', SecondName: 'Pelushskiy', Date: '??/??/1921', Comment: 'Dv. Ded', Hometown: 'Ustyuzhna', HometownId: 9 },
44
44
  { Id: 31, ParentId: [0], Name: 'Sanal', SecondName: 'Batyrev', Date: '11/06/????', Comment: 'Muzh Sestry 3', Hometown: 'Elista', HometownId: 5 },
45
45
  { Id: 32, ParentId: [0], Name: 'Dima', SecondName: 'Markelov', Date: '??/??/????', Comment: 'Muzh Sestry 2', Hometown: 'Elista', HometownId: 5 },
46
46
  { Id: 33, ParentId: [0], Name: 'Slava', SecondName: 'Shaula', Date: '??/??/????', Comment: 'Muzh Teti', Hometown: 'Energodar', HometownId: 14 },
@@ -11,6 +11,7 @@
11
11
  const dict = {
12
12
  'ADD': 'Добавить',
13
13
  'ADD NEW RECORD': 'Добавить новую строку',
14
+ 'ADJUST COLUMN VISIBILITY': 'Настроить видимость колонок',
14
15
  'BUTTONS SIZE': 'Размер кнопок',
15
16
  'CANCEL': 'Отмена',
16
17
  'COLLAPSE': 'Свернуть',
@@ -29,6 +30,7 @@
29
30
  'EXPAND': 'Развернуть',
30
31
  'EXIT': 'Выход',
31
32
  'FIRST': 'К началу',
33
+ 'INVISIBLE COLUMNS': 'Невидимые колонки',
32
34
  'LARGE BUTTONS': 'Большие',
33
35
  'LAST': 'В конец',
34
36
  'LOAD MORE RECORDS': 'Загрузить еще строк',
@@ -62,6 +64,7 @@
62
64
  'VALUE': 'Значение',
63
65
  'VIEW': 'Просмотр',
64
66
  'VIEW RECORD': 'Карточка',
67
+ 'VISIBLE COLUMNS': 'Видимые колонки',
65
68
  'USER': 'Пользователь',
66
69
  };
67
70
  return dict[text.toUpperCase()] || text;
@@ -423,6 +423,14 @@
423
423
  background-color: lightgray;
424
424
  }
425
425
 
426
+ .dropdown-item-div {
427
+ display: flex;
428
+ justify-content: space-between;
429
+ flex-wrap: nowrap;
430
+ align-items: center;
431
+ width: 100%;
432
+ }
433
+
426
434
  .grid-header-content-grid {
427
435
  display: grid;
428
436
  grid-template-columns: auto 16px;
@@ -496,6 +504,22 @@
496
504
  background-color: lightgray;
497
505
  }
498
506
 
507
+
508
+ .grid-columns-settings-div {
509
+ display: grid;
510
+ grid-template-columns: calc(50% - 4px) 8px calc(50% - 4px);
511
+ margin: 10px;
512
+ }
513
+
514
+ .grid-columns-settings-div-ul {
515
+ margin: 5px;
516
+ }
517
+
518
+ .grid-columns-settings-label {
519
+ font-weight: 600;
520
+ /*margin: 5px;*/
521
+ }
522
+
499
523
  .graph-tabcontrol-buttons {
500
524
  margin: 0 1em;
501
525
  display: flex