neo.mjs 7.10.0 → 7.12.0

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.
Files changed (35) hide show
  1. package/apps/ServiceWorker.mjs +2 -2
  2. package/apps/portal/index.html +1 -1
  3. package/apps/portal/resources/data/examples_devmode.json +24 -17
  4. package/apps/portal/resources/data/examples_dist_dev.json +24 -17
  5. package/apps/portal/resources/data/examples_dist_prod.json +24 -17
  6. package/apps/portal/view/home/FooterContainer.mjs +1 -1
  7. package/apps/portal/view/home/parts/AfterMath.mjs +7 -10
  8. package/apps/portal/view/learn/ContentComponent.mjs +1 -1
  9. package/apps/portal/view/services/Component.mjs +4 -4
  10. package/examples/ServiceWorker.mjs +2 -2
  11. package/examples/component/multiWindowCoronaGallery/ViewportController.mjs +9 -2
  12. package/examples/component/multiWindowHelix/ViewportController.mjs +9 -2
  13. package/examples/dialog/DemoDialog.mjs +7 -0
  14. package/examples/dialog/MainContainer.mjs +40 -31
  15. package/examples/tablePerformance/MainContainer.mjs +48 -28
  16. package/examples/tablePerformance/MainContainer2.mjs +48 -27
  17. package/examples/tablePerformance/MainContainer3.mjs +48 -27
  18. package/examples/tablePerformance/Viewport.mjs +21 -0
  19. package/package.json +1 -1
  20. package/resources/scss/src/apps/portal/about/MemberContainer.scss +7 -5
  21. package/resources/scss/src/apps/portal/home/ContentBox.scss +74 -41
  22. package/resources/scss/src/apps/portal/home/parts/AfterMath.scss +16 -2
  23. package/resources/scss/src/apps/portal/home/parts/Features.scss +25 -3
  24. package/resources/scss/src/apps/portal/learn/ContentComponent.scss +19 -20
  25. package/resources/scss/src/apps/portal/services/Component.scss +23 -8
  26. package/src/DefaultConfig.mjs +2 -2
  27. package/src/filter/DateContainer.mjs +3 -3
  28. package/src/list/Circle.mjs +1 -0
  29. package/src/manager/_export.mjs +1 -2
  30. package/src/tab/Container.mjs +25 -36
  31. package/src/table/Container.mjs +9 -53
  32. package/src/table/View.mjs +2 -2
  33. package/src/table/header/Button.mjs +1 -0
  34. package/src/worker/Data.mjs +6 -7
  35. package/src/manager/Store.mjs +0 -84
@@ -9,7 +9,6 @@ import TableContainer from '../../src/table/Container.mjs';
9
9
  class MainContainer extends Container {
10
10
  static config = {
11
11
  className: 'Neo.examples.tablePerformance.MainContainer',
12
- autoMount: true,
13
12
 
14
13
  layout: {
15
14
  ntype: 'vbox',
@@ -44,57 +43,41 @@ class MainContainer extends Container {
44
43
  }, {
45
44
  ntype : 'numberfield',
46
45
  clearable : false,
47
- id : 'amountRows',
48
46
  labelText : 'Rows:',
49
47
  labelWidth: 50,
50
48
  maxValue : 1500,
51
49
  minValue : 1,
50
+ reference : 'amount-rows-field',
52
51
  value : 20,
53
52
  width : 120
54
53
  }, {
55
54
  ntype : 'numberfield',
56
55
  clearable : false,
57
- id : 'interval',
58
56
  labelText : 'Interval:',
59
57
  labelWidth: 62,
60
58
  maxValue : 5000,
61
59
  minValue : 10,
60
+ reference : 'interval-field',
62
61
  value : 20,
63
62
  width : 130
64
63
  }, {
64
+ handler: 'up.updateTableViewData',
65
65
  iconCls: 'fa fa-sync-alt',
66
- text : 'Refresh Data',
67
- handler: function () {
68
- let rows = Neo.getComponent('amountRows').value;
69
- Neo.getComponent('myTableContainer').createRandomViewData(rows);
70
- }
66
+ text : 'Refresh Data'
71
67
  }, {
68
+ handler: 'up.updateTableViewData100x',
72
69
  iconCls: 'fa fa-sync-alt',
73
70
  style : {margin: 0},
74
- text : 'Refresh 100x',
75
- handler: function () {
76
- let interval = Neo.getComponent('interval').value,
77
- rows = Neo.getComponent('amountRows').value,
78
- maxRefreshes = 100,
79
- intervalId = setInterval(function () {
80
- if (maxRefreshes < 1) {
81
- clearInterval(intervalId);
82
- }
83
-
84
- Neo.getComponent('myTableContainer').createRandomViewData(rows);
85
- maxRefreshes--;
86
- }, interval);
87
- }
71
+ text : 'Refresh 100x'
88
72
  }]
89
73
  }, {
90
- ntype : 'table-container',
91
- id : 'myTableContainer',
92
- amountRows : 20, // testing var
93
- createRandomData: true,
94
- width : '100%',
74
+ module : TableContainer,
75
+ reference : 'table',
76
+ viewConfig: {useRowRecordIds: false},
77
+ width : '100%',
95
78
 
96
79
  columnDefaults: {
97
- renderer: function(data) {
80
+ renderer(data) {
98
81
  return {
99
82
  html : data.value,
100
83
  style: {
@@ -141,6 +124,43 @@ class MainContainer extends Container {
141
124
  }]
142
125
  }]
143
126
  }
127
+
128
+ /**
129
+ *
130
+ */
131
+ onConstructed() {
132
+ super.onConstructed();
133
+ this.updateTableViewData()
134
+ }
135
+
136
+ /**
137
+ *
138
+ */
139
+ updateTableViewData() {
140
+ let me = this,
141
+ table = me.getReference('table'),
142
+ columns = table.headerToolbar.items.length,
143
+ rows = me.getReference('amount-rows-field').value,
144
+ inputData = me.up('viewport').createRandomData(columns, rows);
145
+
146
+ table.createViewData(inputData)
147
+ }
148
+
149
+ /**
150
+ *
151
+ */
152
+ updateTableViewData100x() {
153
+ let interval = this.getReference('interval-field').value,
154
+ maxRefreshes = 100,
155
+ intervalId = setInterval(() => {
156
+ if (maxRefreshes < 1) {
157
+ clearInterval(intervalId);
158
+ }
159
+
160
+ this.updateTableViewData();
161
+ maxRefreshes--
162
+ }, interval)
163
+ }
144
164
  }
145
165
 
146
166
  export default Neo.setupClass(MainContainer);
@@ -43,57 +43,41 @@ class MainContainer2 extends Container {
43
43
  }, {
44
44
  ntype : 'numberfield',
45
45
  clearable : false,
46
- id : 'amountRows2',
47
46
  labelText : 'Rows:',
48
47
  labelWidth: 50,
49
48
  maxValue : 1500,
50
49
  minValue : 1,
50
+ reference : 'amount-rows-field',
51
51
  value : 50,
52
52
  width : 120
53
53
  }, {
54
54
  ntype : 'numberfield',
55
55
  clearable : false,
56
- id : 'interval2',
57
56
  labelText : 'Interval:',
58
57
  labelWidth: 62,
59
58
  maxValue : 5000,
60
59
  minValue : 10,
60
+ reference : 'interval-field',
61
61
  value : 30,
62
62
  width : 130
63
63
  }, {
64
+ handler: 'up.updateTableViewData',
64
65
  iconCls: 'fa fa-sync-alt',
65
- text : 'Refresh Data',
66
- handler: function () {
67
- let rows = Neo.getComponent('amountRows2').value;
68
- Neo.getComponent('myTableContainer2').createRandomViewData(rows);
69
- }
66
+ text : 'Refresh Data'
70
67
  }, {
68
+ handler: 'up.updateTableViewData100x',
71
69
  iconCls: 'fa fa-sync-alt',
72
70
  style : {margin: 0},
73
- text : 'Refresh 100x',
74
- handler: function () {
75
- let interval = Neo.getComponent('interval2').value,
76
- rows = Neo.getComponent('amountRows2').value,
77
- maxRefreshes = 100,
78
- intervalId = setInterval(function(){
79
- if (maxRefreshes < 1) {
80
- clearInterval(intervalId);
81
- }
82
-
83
- Neo.getComponent('myTableContainer2').createRandomViewData(rows);
84
- maxRefreshes--;
85
- }, interval);
86
- }
71
+ text : 'Refresh 100x'
87
72
  }]
88
73
  }, {
89
- ntype : 'table-container',
90
- id : 'myTableContainer2',
91
- amountRows : 50, // testing var
92
- createRandomData: true,
93
- width : '100%',
74
+ module : TableContainer,
75
+ reference : 'table',
76
+ viewConfig: {useRowRecordIds: false},
77
+ width : '100%',
94
78
 
95
79
  columnDefaults: {
96
- renderer: function(data) {
80
+ renderer(data) {
97
81
  return {
98
82
  html : data.value,
99
83
  style: {
@@ -140,6 +124,43 @@ class MainContainer2 extends Container {
140
124
  }]
141
125
  }]
142
126
  }
127
+
128
+ /**
129
+ *
130
+ */
131
+ onConstructed() {
132
+ super.onConstructed();
133
+ this.updateTableViewData()
134
+ }
135
+
136
+ /**
137
+ *
138
+ */
139
+ updateTableViewData() {
140
+ let me = this,
141
+ table = me.getReference('table'),
142
+ columns = table.headerToolbar.items.length,
143
+ rows = me.getReference('amount-rows-field').value,
144
+ inputData = me.up('viewport').createRandomData(columns, rows);
145
+
146
+ table.createViewData(inputData)
147
+ }
148
+
149
+ /**
150
+ *
151
+ */
152
+ updateTableViewData100x() {
153
+ let interval = this.getReference('interval-field').value,
154
+ maxRefreshes = 100,
155
+ intervalId = setInterval(() => {
156
+ if (maxRefreshes < 1) {
157
+ clearInterval(intervalId);
158
+ }
159
+
160
+ this.updateTableViewData();
161
+ maxRefreshes--
162
+ }, interval)
163
+ }
143
164
  }
144
165
 
145
166
  export default Neo.setupClass(MainContainer2);
@@ -33,7 +33,7 @@ class MainContainer3 extends Container {
33
33
 
34
34
  items: [{
35
35
  ntype: 'label',
36
- text : 'TableContainer App3 (Default Scollbars)',
36
+ text : 'TableContainer App3 (Default Scrollbars)',
37
37
  style: {
38
38
  margin: '4px 10px 0 5px'
39
39
  }
@@ -43,58 +43,42 @@ class MainContainer3 extends Container {
43
43
  }, {
44
44
  ntype : 'numberfield',
45
45
  clearable : false,
46
- id : 'amountRows3',
47
46
  labelText : 'Rows:',
48
47
  labelWidth: 50,
49
48
  maxValue : 1500,
50
49
  minValue : 1,
50
+ reference : 'amount-rows-field',
51
51
  value : 100,
52
52
  width : 120
53
53
  }, {
54
54
  ntype : 'numberfield',
55
55
  clearable : false,
56
- id : 'interval3',
57
56
  labelText : 'Interval:',
58
57
  labelWidth: 62,
59
58
  maxValue : 5000,
60
59
  minValue : 10,
60
+ reference : 'interval-field',
61
61
  value : 50,
62
62
  width : 130
63
63
  }, {
64
+ handler: 'up.updateTableViewData',
64
65
  iconCls: 'fa fa-sync-alt',
65
- text : 'Refresh Data',
66
- handler: function () {
67
- let rows = Neo.getComponent('amountRows3').value;
68
- Neo.getComponent('myTableContainer3').createRandomViewData(rows);
69
- }
66
+ text : 'Refresh Data'
70
67
  }, {
68
+ handler: 'up.updateTableViewData100x',
71
69
  iconCls: 'fa fa-sync-alt',
72
70
  text : 'Refresh 100x',
73
- style : {margin: 0},
74
- handler: function () {
75
- let interval = Neo.getComponent('interval3').value,
76
- rows = Neo.getComponent('amountRows3').value,
77
- maxRefreshes = 100,
78
- intervalId = setInterval(function(){
79
- if (maxRefreshes < 1) {
80
- clearInterval(intervalId);
81
- }
82
-
83
- Neo.getComponent('myTableContainer3').createRandomViewData(rows);
84
- maxRefreshes--;
85
- }, interval);
86
- }
71
+ style : {margin: 0}
87
72
  }]
88
73
  }, {
89
- ntype : 'table-container',
90
- id : 'myTableContainer3',
91
- amountRows : 100, // testing var
92
- createRandomData : true,
74
+ module : TableContainer,
75
+ reference : 'table',
76
+ viewConfig : {useRowRecordIds: false},
93
77
  useCustomScrollbars: false,
94
78
  width : '100%',
95
79
 
96
80
  columnDefaults: {
97
- renderer: function(data) {
81
+ renderer(data) {
98
82
  return {
99
83
  html : data.value,
100
84
  style: {
@@ -143,6 +127,43 @@ class MainContainer3 extends Container {
143
127
  }]
144
128
  }]
145
129
  }
130
+
131
+ /**
132
+ *
133
+ */
134
+ onConstructed() {
135
+ super.onConstructed();
136
+ this.updateTableViewData()
137
+ }
138
+
139
+ /**
140
+ *
141
+ */
142
+ updateTableViewData() {
143
+ let me = this,
144
+ table = me.getReference('table'),
145
+ columns = table.headerToolbar.items.length,
146
+ rows = me.getReference('amount-rows-field').value,
147
+ inputData = me.up('viewport').createRandomData(columns, rows);
148
+
149
+ table.view.createViewData(inputData)
150
+ }
151
+
152
+ /**
153
+ *
154
+ */
155
+ updateTableViewData100x() {
156
+ let interval = this.getReference('interval-field').value,
157
+ maxRefreshes = 100,
158
+ intervalId = setInterval(() => {
159
+ if (maxRefreshes < 1) {
160
+ clearInterval(intervalId);
161
+ }
162
+
163
+ this.updateTableViewData();
164
+ maxRefreshes--
165
+ }, interval)
166
+ }
146
167
  }
147
168
 
148
169
  export default Neo.setupClass(MainContainer3);
@@ -27,6 +27,27 @@ class Viewport extends BaseViewport {
27
27
  style : {marginTop: '20px'}
28
28
  }]
29
29
  }
30
+
31
+ /**
32
+ * @param {Number} amountColumns
33
+ * @param {Number} amountRows
34
+ */
35
+ createRandomData(amountColumns, amountRows) {
36
+ let data = [],
37
+ i = 0,
38
+ j;
39
+
40
+ for (; i < amountRows; i++) {
41
+ data.push({});
42
+
43
+ for (j=0; j < amountColumns; j++) {
44
+ data[i]['column' + j] = 'Column' + (j + 1) + ' - ' + Math.round(Math.random() / 1.5);
45
+ data[i]['column' + j + 'style'] = Math.round(Math.random() / 1.7) > 0 ? 'brown' : i%2 ? '#3c3f41' : '#323232'
46
+ }
47
+ }
48
+
49
+ return data
50
+ }
30
51
  }
31
52
 
32
53
  export default Neo.setupClass(Viewport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "7.10.0",
3
+ "version": "7.12.0",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,9 +1,10 @@
1
1
  .portal-about-member-container {
2
- border : 1px solid var(--sem-color-border-default);
3
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
4
- min-width : 600px;
5
- padding : 1em 1em 4em;
6
- position : relative;
2
+ border : 1px solid var(--sem-color-border-default);
3
+ border-radius: .7em;
4
+ box-shadow : 0 3px 6px rgba(0, 0, 0, 0.3);
5
+ min-width : 600px;
6
+ padding : 1em 1em 4em;
7
+ position : relative;
7
8
 
8
9
  &:not(:nth-child(2)) {
9
10
  margin-top: 1em;
@@ -13,6 +14,7 @@
13
14
  display: flex;
14
15
 
15
16
  h2.portal-profile-name {
17
+ color : #3E63DD;
16
18
  margin: .3em 0;
17
19
  }
18
20
 
@@ -1,65 +1,98 @@
1
1
  .portal-content-box {
2
- border-radius : 3px;
3
- box-shadow : 0 3px 6px rgba(0, 0, 0, 0.3);
4
- color : #000;
2
+ background : #ffffff;
3
+ border-radius : 12px;
4
+ box-shadow : 0 4px 16px rgba(0, 0, 0, 0.1);
5
+ color : #3e63dd;
5
6
  cursor : pointer;
6
- min-width : 300px;
7
- padding : 0 1em 1em 1em;
7
+ flex : 0 0 calc(33.33% - 1.5em);
8
+ max-width : 350px;
9
+ min-width : 280px;
10
+ padding : 1em;
8
11
  position : relative;
9
12
  text-decoration: none;
13
+ transition : transform 0.3s ease-out, box-shadow 0.3s ease-out;
14
+
15
+ &:hover {
16
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
17
+ transform : translateY(-8px) scale(1.02);
18
+ }
19
+
20
+ &:active {
21
+ transform: scale(0.98);
22
+ }
10
23
 
11
24
  .portal-content-box-content {
12
- margin-top : 0.75em;
13
- padding-left: 1.3em;
25
+ color : #555;
26
+ font-size : 0.95em;
27
+ list-style : none;
28
+ margin-top : 0.5em;
29
+ padding : 8px 8px 8px 0;
30
+ }
31
+
32
+ .portal-content-box-content li {
33
+ border-radius: 4px;
34
+ list-style : none;
35
+ margin-top : .4em;
36
+ padding : 8px;
37
+ transition : background-color 0.2s ease-out, color 0.2s ease-out;
38
+
39
+ &:hover {
40
+ background-color: rgba(62, 99, 221, 0.1);
41
+ color : #3e63dd;
42
+ }
14
43
  }
15
44
 
16
- .portal-content-box-headline {
17
- border-bottom : 1px solid #ececec;
18
- letter-spacing: 1.5px !important;
19
- margin : 1em auto 0 auto;
20
- max-width : 85%;
21
- padding-bottom: 0.75em;
45
+ h3.portal-content-box-headline {
46
+ border-bottom : 2px solid #3e63dd;
47
+ color : #3e63dd;
48
+ font-size : 1.18em;
49
+ font-weight : 500;
50
+ letter-spacing: 1.5px;
51
+ margin : 0 auto;
52
+ max-width : 90%;
53
+ padding-bottom: 0.4em;
22
54
  text-align : center;
23
- word-spacing : 1.5px;
24
55
  }
25
- }
26
56
 
27
- .neo-mouse {
28
- .portal-content-box {
29
- &:hover {
30
- background-color: var(--sem-color-surface-primary-background);
57
+ &:after {
58
+ align-items : center;
59
+ background-color: rgba(62, 99, 221, 0.05);
60
+ border-radius : 5px;
61
+ bottom : 10px;
62
+ color : #3e63dd;
63
+ content : "\2192";
64
+ display : flex;
65
+ font-size : 1.2em;
66
+ justify-content : center;
67
+ opacity : 0.8;
68
+ padding : 5px 8px;
69
+ position : absolute;
70
+ right : 10px;
71
+ transition : background-color 0.3s ease;
72
+ }
31
73
 
32
- &:after {
33
- background-color: var(--purple-200);
34
- border-radius : 2px;
35
- bottom : 10px;
36
- content : attr(href) ' \2192';
37
- font-size : 0.7em;
38
- left : -1px;
39
- opacity : 0.7;
40
- padding : 3px 20px;
41
- position : absolute;
42
- right : -1px;
43
- text-align : center;
44
- }
74
+ &:after:hover:after {
75
+ background-color: rgba(62, 99, 221, 0.25);
76
+ }
77
+
78
+ .neo-mouse {
79
+ &:hover {
80
+ background-color: rgba(62, 99, 221, 0.05);
45
81
 
46
82
  .portal-content-box-headline {
47
- border-bottom-color: #b7c0da;
83
+ border-bottom-color: #1a47b8;
48
84
  }
49
85
  }
50
86
  }
51
- }
52
87
 
53
- .neo-no-mouse {
54
- .portal-content-box {
88
+ .neo-no-mouse {
55
89
  &:after {
56
- bottom : .5em;
57
- color : var(--purple-200);
58
- content : '\f08e';
59
- font-family: var(--fa-style-family-classic);
90
+ bottom : 20px;
91
+ color : #3e63dd;
92
+ content : "\f08e";
60
93
  font-weight: 600;
61
94
  position : absolute;
62
- right : .5em;
95
+ right : 0.5em;
63
96
  }
64
97
  }
65
98
  }
@@ -1,7 +1,21 @@
1
1
  .portal-home-aftermath {
2
2
  height: 60em;
3
3
 
4
- p {
5
- text-align: center;
4
+ a {
5
+ color: #3E63DD;
6
+ }
7
+
8
+ li {
9
+ font-size: var(--core-fontsize-body);
10
+ font-weight: var(--core-fontweight-regular);
11
+ line-height: var(--core-lineheight-paragraph);
12
+
13
+ &::marker {
14
+ color: #3E63DD;
15
+ }
16
+ }
17
+
18
+ ul {
19
+ align-self: center;
6
20
  }
7
21
  }
@@ -1,17 +1,39 @@
1
1
  .portal-home-features {
2
- gap : 2em;
2
+ align-self : center;
3
+ gap : 1.5em;
3
4
  grid-template-columns: repeat(3, 1fr);
4
- overflow-x : auto;
5
- padding : 2em;
5
+ justify-content : center;
6
+ max-width : 1200px;
7
+ padding : 1.5em;
6
8
  place-content : start;
9
+ scrollbar-color : #3e63dd #f0f0f0;
10
+ scrollbar-width : thin;
11
+
12
+ &::-webkit-scrollbar {
13
+ height: 8px;
14
+ }
15
+
16
+ &::-webkit-scrollbar-track {
17
+ background : #f0f0f0;
18
+ border-radius: 10px;
19
+ }
20
+
21
+ &::-webkit-scrollbar-thumb {
22
+ background-color: #3e63dd;
23
+ border-radius : 10px;
24
+ }
7
25
 
8
26
  @media (max-width: 1000px) {
9
27
  grid-template-columns: repeat(2, 1fr);
10
28
  }
11
29
 
12
30
  @media (max-width: 700px) {
31
+ align-self : start;
13
32
  grid-template-columns: repeat(6, 1fr);
33
+ margin-bottom : 5em;
34
+ max-width : fill-available; // prefixed by postCSS
14
35
  min-height : 50%;
36
+ overflow-x : scroll;
15
37
  }
16
38
 
17
39
  @media (max-width: 500px) {