neo.mjs 4.1.0 → 4.2.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.
- package/buildScripts/addConfig.mjs +398 -0
- package/buildScripts/createApp.mjs +3 -3
- package/buildScripts/createClass.mjs +7 -7
- package/examples/grid/covid/GridContainer.mjs +113 -0
- package/examples/grid/covid/GridContainerController.mjs +62 -0
- package/examples/grid/covid/MainContainer.mjs +36 -0
- package/examples/grid/covid/Model.mjs +65 -0
- package/examples/grid/covid/Store.mjs +35 -0
- package/examples/grid/covid/Util.mjs +165 -0
- package/examples/grid/covid/app.mjs +6 -0
- package/examples/grid/covid/index.html +11 -0
- package/examples/grid/covid/neo-config.json +8 -0
- package/package.json +5 -4
- package/resources/scss/src/examples/grid/covid/GridContainer.scss +21 -0
- package/resources/scss/src/grid/Container.scss +6 -34
- package/resources/scss/src/grid/View.scss +73 -1
- package/resources/scss/src/grid/header/Button.scss +67 -7
- package/resources/scss/src/grid/header/Toolbar.scss +6 -2
- package/resources/scss/src/table/View.scss +2 -2
- package/resources/scss/theme-dark/grid/Container.scss +17 -0
- package/resources/scss/theme-dark/grid/View.scss +29 -0
- package/resources/scss/theme-dark/grid/_all.scss +3 -0
- package/resources/scss/theme-dark/grid/header/Button.scss +15 -0
- package/resources/scss/theme-dark/grid/header/Toolbar.scss +0 -0
- package/resources/scss/theme-dark/grid/header/_all.scss +2 -0
- package/resources/scss/theme-light/grid/Container.scss +17 -0
- package/resources/scss/theme-light/grid/View.scss +29 -0
- package/resources/scss/theme-light/grid/_all.scss +3 -0
- package/resources/scss/theme-light/grid/header/Button.scss +15 -0
- package/resources/scss/theme-light/grid/header/Toolbar.scss +0 -0
- package/resources/scss/theme-light/grid/header/_all.scss +2 -0
- package/src/grid/Container.mjs +252 -83
- package/src/grid/View.mjs +206 -11
- package/src/grid/header/Button.mjs +127 -2
- package/src/grid/header/Toolbar.mjs +42 -54
- package/src/selection/grid/CellColumnModel.mjs +122 -0
- package/src/selection/grid/CellColumnRowModel.mjs +122 -0
- package/src/selection/grid/CellModel.mjs +184 -0
- package/src/selection/grid/CellRowModel.mjs +164 -0
- package/src/selection/grid/ColumnModel.mjs +185 -0
- package/src/selection/grid/RowModel.mjs +188 -0
- package/src/selection/table/RowModel.mjs +26 -32
- package/src/table/Container.mjs +9 -13
- package/src/table/header/Toolbar.mjs +1 -1
@@ -0,0 +1,65 @@
|
|
1
|
+
import BaseModel from '../../../src/data/Model.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Neo.examples.grid.covid.Model
|
5
|
+
* @extends Neo.data.Model
|
6
|
+
*/
|
7
|
+
class Model extends BaseModel {
|
8
|
+
static getConfig() {return {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Neo.examples.grid.covid.Model'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Neo.examples.grid.covid.Model',
|
14
|
+
/**
|
15
|
+
* @member {Object[]} fields
|
16
|
+
*/
|
17
|
+
fields: [{
|
18
|
+
name: 'active',
|
19
|
+
type: 'Integer'
|
20
|
+
}, {
|
21
|
+
name: 'cases',
|
22
|
+
type: 'Integer'
|
23
|
+
}, {
|
24
|
+
name: 'casesPerOneMillion',
|
25
|
+
type: 'Integer'
|
26
|
+
}, {
|
27
|
+
name: 'country',
|
28
|
+
type: 'String'
|
29
|
+
}, {
|
30
|
+
name: 'countryInfo',
|
31
|
+
type: 'Object' // _id, flag, iso2, iso3, lat, long
|
32
|
+
}, {
|
33
|
+
name: 'critical',
|
34
|
+
type: 'Integer'
|
35
|
+
}, {
|
36
|
+
name: 'deaths',
|
37
|
+
type: 'Integer'
|
38
|
+
}, {
|
39
|
+
name: 'index',
|
40
|
+
type: 'Integer'
|
41
|
+
}, {
|
42
|
+
name: 'infected', // renderer parses to % of population
|
43
|
+
type: 'Integer'
|
44
|
+
}, {
|
45
|
+
name: 'recovered',
|
46
|
+
type: 'Integer'
|
47
|
+
}, {
|
48
|
+
name: 'tests',
|
49
|
+
type: 'Integer'
|
50
|
+
}, {
|
51
|
+
name: 'testsPerOneMillion',
|
52
|
+
type: 'Integer'
|
53
|
+
}, {
|
54
|
+
name: 'todayCases',
|
55
|
+
type: 'Integer'
|
56
|
+
}, {
|
57
|
+
name: 'todayDeaths',
|
58
|
+
type: 'Integer'
|
59
|
+
}]
|
60
|
+
}}
|
61
|
+
}
|
62
|
+
|
63
|
+
Neo.applyClassConfig(Model);
|
64
|
+
|
65
|
+
export default Model;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import BaseStore from '../../../src/data/Store.mjs';
|
2
|
+
import Model from './Model.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Neo.examples.grid.covid.Store
|
6
|
+
* @extends Neo.data.Store
|
7
|
+
*/
|
8
|
+
class Store extends BaseStore {
|
9
|
+
static getConfig() {return {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Neo.examples.grid.covid.Store'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Neo.examples.grid.covid.Store',
|
15
|
+
/**
|
16
|
+
* @member {String} keyProperty='country'
|
17
|
+
*/
|
18
|
+
keyProperty: 'country',
|
19
|
+
/**
|
20
|
+
* @member {Neo.data.Model} model=Model
|
21
|
+
*/
|
22
|
+
model: Model,
|
23
|
+
/**
|
24
|
+
* @member {Object[]} sorters
|
25
|
+
*/
|
26
|
+
sorters: [{
|
27
|
+
property : 'active',
|
28
|
+
direction: 'DESC'
|
29
|
+
}]
|
30
|
+
}}
|
31
|
+
}
|
32
|
+
|
33
|
+
Neo.applyClassConfig(Store);
|
34
|
+
|
35
|
+
export default Store;
|
@@ -0,0 +1,165 @@
|
|
1
|
+
import Base from '../../../src/core/Base.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Static utility class
|
5
|
+
* @class Neo.examples.table.covid.Util
|
6
|
+
* @extends Neo.core.Base
|
7
|
+
*/
|
8
|
+
class Util extends Base {
|
9
|
+
static getStaticConfig() {return {
|
10
|
+
/**
|
11
|
+
* A regex to replace blank chars
|
12
|
+
* @member {RegExp} flagRegEx=/ /gi
|
13
|
+
* @protected
|
14
|
+
* @static
|
15
|
+
*/
|
16
|
+
flagRegEx: / /gi,
|
17
|
+
/**
|
18
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString
|
19
|
+
* Change this config to enforce a county specific formatting (e.g. 'de-DE')
|
20
|
+
* @member {String} locales='default'
|
21
|
+
* @protected
|
22
|
+
* @static
|
23
|
+
*/
|
24
|
+
locales: 'default'
|
25
|
+
}}
|
26
|
+
|
27
|
+
static getConfig() {return {
|
28
|
+
/**
|
29
|
+
* @member {String} className='Neo.examples.table.covid.Util'
|
30
|
+
* @protected
|
31
|
+
*/
|
32
|
+
className: 'Neo.examples.table.covid.Util'
|
33
|
+
}}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Used for the casesPerOneMillion column to show % of population
|
37
|
+
* @param {Object} data
|
38
|
+
* @param {Number} data.value
|
39
|
+
* @returns {String}
|
40
|
+
*/
|
41
|
+
static formatInfected(data) {
|
42
|
+
let value = data.value;
|
43
|
+
|
44
|
+
if (!Neo.isNumber(value)) {
|
45
|
+
return value || 'N/A';
|
46
|
+
}
|
47
|
+
|
48
|
+
value = Math.round(value / 100);
|
49
|
+
value /= 100;
|
50
|
+
|
51
|
+
value = value.toFixed(2) + ' %';
|
52
|
+
|
53
|
+
return value.toLocaleString(Util.locales);
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* This method will get used as a grid renderer, so the 2nd param is an overload (would be {Object} record)
|
58
|
+
* @param {Object} data
|
59
|
+
* @param {Number} data.value
|
60
|
+
* @param {String} [color]
|
61
|
+
* @returns {String}
|
62
|
+
*/
|
63
|
+
static formatNumber(data, color) {
|
64
|
+
let value = data.value;
|
65
|
+
|
66
|
+
if (!Neo.isNumber(value)) {
|
67
|
+
return value || 'N/A';
|
68
|
+
}
|
69
|
+
|
70
|
+
value = value.toLocaleString(Util.locales);
|
71
|
+
|
72
|
+
return typeof color !== 'string' ? value : `<span style="color:${color};">${value}</span>`;
|
73
|
+
}
|
74
|
+
|
75
|
+
/**
|
76
|
+
* @param {String} name
|
77
|
+
* @returns {String} url
|
78
|
+
*/
|
79
|
+
static getCountryFlagUrl(name) {
|
80
|
+
const map = {
|
81
|
+
'bosnia' : 'bosnia-and-herzegovina',
|
82
|
+
'cabo-verde' : 'cape-verde',
|
83
|
+
'car' : 'central-african-republic',
|
84
|
+
'caribbean-netherlands' : 'netherlands',
|
85
|
+
'channel-islands' : 'jersey',
|
86
|
+
'côte-d\'ivoire' : 'ivory-coast',
|
87
|
+
'congo' : 'republic-of-the-congo',
|
88
|
+
'congo,-the-democratic-republic-of-the': 'democratic-republic-of-congo',
|
89
|
+
'curaçao' : 'curacao',
|
90
|
+
'czechia' : 'czech-republic',
|
91
|
+
'diamond-princess' : 'japan', // cruise ship
|
92
|
+
'drc' : 'democratic-republic-of-congo',
|
93
|
+
'el-salvador' : 'salvador',
|
94
|
+
'eswatini' : 'swaziland',
|
95
|
+
'faeroe-islands' : 'faroe-islands',
|
96
|
+
'falkland-islands-(malvinas)' : 'falkland-islands',
|
97
|
+
'french-guiana' : 'france', // ?
|
98
|
+
'guadeloupe' : 'france', // ?
|
99
|
+
'holy-see-(vatican-city-state)' : 'vatican-city',
|
100
|
+
'iran,-islamic-republic-of' : 'iran',
|
101
|
+
'lao-people\'s-democratic-republic' : 'laos',
|
102
|
+
'libyan-arab-jamahiriya' : 'libya',
|
103
|
+
'macedonia' : 'republic-of-macedonia',
|
104
|
+
'marshall-islands' : 'marshall-island',
|
105
|
+
'mayotte' : 'france', // ?
|
106
|
+
'moldova,-republic-of' : 'moldova',
|
107
|
+
'ms-zaandam' : 'netherlands', // cruise ship
|
108
|
+
'new-caledonia' : 'france',
|
109
|
+
'palestinian-territory,-occupied' : 'palestine',
|
110
|
+
'poland' : 'republic-of-poland',
|
111
|
+
'réunion' : 'france',
|
112
|
+
's.-korea' : 'south-korea',
|
113
|
+
'st.-barth' : 'st-barts',
|
114
|
+
'saint-helena' : 'united-kingdom', // sorry, icon not included
|
115
|
+
'saint-lucia' : 'st-lucia',
|
116
|
+
'saint-martin' : 'sint-maarten',
|
117
|
+
'saint-pierre-miquelon' : 'france',
|
118
|
+
'saint-vincent-and-the-grenadines' : 'st-vincent-and-the-grenadines',
|
119
|
+
'syrian-arab-republic' : 'syria',
|
120
|
+
'tanzania,-united-republic-of' : 'tanzania',
|
121
|
+
'timor-leste' : 'east-timor',
|
122
|
+
'turks-and-caicos-islands' : 'turks-and-caicos',
|
123
|
+
'u.s.-virgin-islands' : 'virgin-islands',
|
124
|
+
'uae' : 'united-arab-emirates',
|
125
|
+
'uk' : 'united-kingdom',
|
126
|
+
'usa' : 'united-states-of-america',
|
127
|
+
'uzbekistan' : 'uzbekistn',
|
128
|
+
'venezuela,-bolivarian-republic-of' : 'venezuela',
|
129
|
+
'viet-nam' : 'vietnam',
|
130
|
+
'wallis-and-futuna' : 'france'
|
131
|
+
};
|
132
|
+
|
133
|
+
let imageName = name.toLowerCase().replace(Util.flagRegEx, '-');
|
134
|
+
|
135
|
+
imageName = map[imageName] || imageName;
|
136
|
+
|
137
|
+
if (Neo.config.isGitHubPages) {
|
138
|
+
let path = `../../../../resources/images/flaticon/country_flags/png/${imageName}.png`;
|
139
|
+
|
140
|
+
if (Neo.config.environment !== 'development') {
|
141
|
+
path = `../../${path}`;
|
142
|
+
}
|
143
|
+
|
144
|
+
return path;
|
145
|
+
}
|
146
|
+
|
147
|
+
return `https://raw.githubusercontent.com/neomjs/pages/master/resources/images/flaticon/country_flags/png/${imageName}.png`;
|
148
|
+
}
|
149
|
+
|
150
|
+
/**
|
151
|
+
* @param {Object} data
|
152
|
+
* @param {Number} data.index
|
153
|
+
* @returns {Object}
|
154
|
+
*/
|
155
|
+
static indexRenderer(data) {
|
156
|
+
return {
|
157
|
+
cls : ['neo-index-column', 'neo-grid-cell'],
|
158
|
+
html: data.index + 1
|
159
|
+
};
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
Neo.applyClassConfig(Util);
|
164
|
+
|
165
|
+
export default Util;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<title>Neo CovidGrid</title>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<script src="../../../src/MicroLoader.mjs" type="module"></script>
|
10
|
+
</body>
|
11
|
+
</html>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.2.0",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -11,6 +11,7 @@
|
|
11
11
|
"neo-cc": "./buildScripts/createClass.mjs"
|
12
12
|
},
|
13
13
|
"scripts": {
|
14
|
+
"add-config": "node ./buildScripts/addConfig.mjs",
|
14
15
|
"build-all": "node ./buildScripts/buildAll.mjs -f -n",
|
15
16
|
"build-all-questions": "node ./buildScripts/buildAll.mjs -f",
|
16
17
|
"build-my-apps": "node ./buildScripts/webpack/buildMyApps.mjs -f",
|
@@ -39,7 +40,7 @@
|
|
39
40
|
},
|
40
41
|
"homepage": "https://neomjs.github.io/pages/",
|
41
42
|
"dependencies": {
|
42
|
-
"@fortawesome/fontawesome-free": "^6.
|
43
|
+
"@fortawesome/fontawesome-free": "^6.2.0",
|
43
44
|
"@material/mwc-button": "^0.27.0",
|
44
45
|
"@material/mwc-textfield": "^0.27.0",
|
45
46
|
"autoprefixer": "^10.4.8",
|
@@ -50,11 +51,11 @@
|
|
50
51
|
"envinfo": "^7.8.1",
|
51
52
|
"fs-extra": "^10.1.0",
|
52
53
|
"highlightjs-line-numbers.js": "^2.8.0",
|
53
|
-
"inquirer": "^9.1.
|
54
|
+
"inquirer": "^9.1.1",
|
54
55
|
"neo-jsdoc": "^1.0.1",
|
55
56
|
"neo-jsdoc-x": "^1.0.4",
|
56
57
|
"postcss": "^8.4.16",
|
57
|
-
"sass": "^1.54.
|
58
|
+
"sass": "^1.54.8",
|
58
59
|
"webpack": "^5.74.0",
|
59
60
|
"webpack-cli": "^4.10.0",
|
60
61
|
"webpack-dev-server": "4.10.1",
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.neo-grid-wrapper {
|
2
|
+
width: 100%
|
3
|
+
}
|
4
|
+
|
5
|
+
.neo-grid-container.covid-country-grid {
|
6
|
+
.neo-country-column {
|
7
|
+
min-width: 200px;
|
8
|
+
width : initial;
|
9
|
+
}
|
10
|
+
|
11
|
+
.neo-grid-cell {
|
12
|
+
min-width: 100px;
|
13
|
+
width : 300px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.neo-index-column {
|
17
|
+
max-width: 40px;
|
18
|
+
min-width: 40px;
|
19
|
+
width : 40px;
|
20
|
+
}
|
21
|
+
}
|
@@ -1,22 +1,14 @@
|
|
1
1
|
.neo-grid-container {
|
2
|
-
border : 1px solid
|
2
|
+
border : 1px solid v(grid-container-border-color);
|
3
3
|
border-spacing: 0;
|
4
4
|
font-size : 13px;
|
5
5
|
font-weight : 400;
|
6
6
|
height : 100%;
|
7
7
|
line-height : 19px;
|
8
|
-
overflow :
|
9
|
-
//position : relative;
|
10
|
-
|
11
|
-
.neo-grid-header-toolbar {
|
12
|
-
//position: sticky;
|
13
|
-
//top : 0;
|
14
|
-
display : table;
|
15
|
-
width : 100%;
|
16
|
-
}
|
8
|
+
overflow : auto;
|
17
9
|
|
18
10
|
.neo-grid-row {
|
19
|
-
display :
|
11
|
+
display : flex;
|
20
12
|
height : 32px !important;
|
21
13
|
max-height: 32px !important;
|
22
14
|
width : 100%;
|
@@ -80,32 +72,12 @@
|
|
80
72
|
}
|
81
73
|
|
82
74
|
.neo-grid-cell {
|
75
|
+
align-items : center;
|
83
76
|
background-color: #3c3f41;
|
84
|
-
display :
|
77
|
+
display : flex;
|
85
78
|
height : 32px !important;
|
86
79
|
max-height : 32px !important;
|
87
80
|
padding : 2px 10px 2px;
|
88
|
-
|
89
|
-
|
90
|
-
.neo-grid-header-cell {
|
91
|
-
display: table-cell;
|
92
|
-
padding: 0;
|
93
|
-
}
|
94
|
-
|
95
|
-
/* Scrollbars */
|
96
|
-
/*&::-webkit-scrollbar {
|
97
|
-
display: none;
|
98
|
-
}*/
|
99
|
-
|
100
|
-
.neo-grid-y-scroller {
|
101
|
-
background-color: green;
|
102
|
-
height: 100%;
|
103
|
-
position: absolute;
|
104
|
-
right: 0;
|
105
|
-
top: 32px;
|
106
|
-
width: 17px;
|
107
|
-
overflow: auto;
|
108
|
-
transform: translateZ(0);
|
109
|
-
-webkit-transform: translateZ(0);
|
81
|
+
width : fit-content;
|
110
82
|
}
|
111
83
|
}
|
@@ -1,3 +1,75 @@
|
|
1
1
|
.neo-grid-view {
|
2
|
+
.neo-center {
|
3
|
+
justify-content: center;
|
4
|
+
}
|
2
5
|
|
3
|
-
|
6
|
+
.neo-right {
|
7
|
+
justify-content: right;
|
8
|
+
}
|
9
|
+
|
10
|
+
.neo-grid-row {
|
11
|
+
&:hover {
|
12
|
+
.neo-grid-cell {
|
13
|
+
background-color: v(grid-cell-background-color-hover);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
// selection.RowModel
|
18
|
+
&.neo-selected {
|
19
|
+
.neo-grid-cell {
|
20
|
+
background-color: v(grid-rowmodel-selected-cell-background-color);
|
21
|
+
color : v(grid-rowmodel-selected-cell-color);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
// selection.CellModel
|
26
|
+
.neo-grid-cell {
|
27
|
+
&.neo-selected {
|
28
|
+
background-color: v(grid-cellmodel-selected-cell-background-color) !important;
|
29
|
+
color : v(grid-cellmodel-selected-cell-color) !important;
|
30
|
+
}
|
31
|
+
|
32
|
+
&.selected-column-cell {
|
33
|
+
background-color: v(grid-cellmodel-selected-column-cell-background-color);
|
34
|
+
color : v(grid-cellmodel-selected-column-cell-color);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
.neo-selection-cellrowmodel,
|
41
|
+
.neo-selection-cellcolumnrowmodel{
|
42
|
+
.neo-grid-row {
|
43
|
+
&.neo-selected {
|
44
|
+
.neo-grid-cell {
|
45
|
+
background-color: v(grid-cellrowmodel-selected-row-cell-background-color);
|
46
|
+
color : v(grid-cellrowmodel-selected-row-cell-color);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
.neo-grid-cell {
|
51
|
+
&.neo-selected {
|
52
|
+
background-color: v(grid-cellrowmodel-selected-cell-background-color);
|
53
|
+
color : v(grid-cellrowmodel-selected-cell-color);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
.neo-selection-cellcolumnmodel,
|
60
|
+
.neo-selection-cellcolumnrowmodel,
|
61
|
+
.neo-selection-cellmodel,
|
62
|
+
.neo-selection-cellrowmodel,
|
63
|
+
.neo-selection-columnmodel,
|
64
|
+
.neo-selection-rowmodel {
|
65
|
+
.neo-grid-row {
|
66
|
+
&:focus {
|
67
|
+
outline: 0;
|
68
|
+
}
|
69
|
+
.neo-grid-cell {
|
70
|
+
&:focus {
|
71
|
+
outline: 0;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
@@ -1,16 +1,76 @@
|
|
1
1
|
.neo-grid-header-button {
|
2
|
-
|
2
|
+
align-items : center;
|
3
|
+
background-color: v(grid-header-button-background-color);
|
4
|
+
background-image: v(grid-header-button-background-image);
|
3
5
|
border-width : 0;
|
4
|
-
|
5
|
-
color : #bbb;
|
6
|
+
color : v(grid-header-button-color);
|
6
7
|
cursor : pointer;
|
8
|
+
display : flex;
|
9
|
+
flex-direction : row;
|
10
|
+
flex-shrink : 0;
|
7
11
|
font-size : 13px;
|
8
12
|
font-weight : 600;
|
13
|
+
height : 29px; // Webkit => Safari can not handle 100%
|
14
|
+
justify-content : flex-end;
|
9
15
|
margin : 0;
|
10
16
|
padding : 7px 10px 6px;
|
11
|
-
text-align : left;
|
12
17
|
white-space : nowrap;
|
13
|
-
width : 100%;
|
14
18
|
|
15
|
-
|
16
|
-
|
19
|
+
&:not(:last-child) {
|
20
|
+
border-right: 1px solid v(grid-container-border-color);
|
21
|
+
}
|
22
|
+
|
23
|
+
&.neo-locked { // todo: for testing, will get removed once the header toolbar is outside of the scroll region
|
24
|
+
position: sticky;
|
25
|
+
top : 0;
|
26
|
+
z-index : 5001;
|
27
|
+
}
|
28
|
+
|
29
|
+
&.neo-drag-over {
|
30
|
+
background-image: linear-gradient(green, darkgreen);;
|
31
|
+
}
|
32
|
+
|
33
|
+
&.neo-sort-asc, &.neo-sort-desc {
|
34
|
+
.neo-button-glyph {
|
35
|
+
opacity: 1;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
&.neo-sort-hidden {
|
40
|
+
.neo-button-glyph {
|
41
|
+
opacity: 0;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
&.neo-sort-desc {
|
46
|
+
.neo-button-glyph {
|
47
|
+
transform: rotate(180deg);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
&:focus {
|
52
|
+
outline : 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
&.icon-right {
|
56
|
+
flex-direction: row-reverse;
|
57
|
+
|
58
|
+
.neo-button-glyph {
|
59
|
+
margin: 0 0 0 6px;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.neo-button-glyph {
|
64
|
+
color : v(grid-header-button-glyph-color);
|
65
|
+
font-size : 12px;
|
66
|
+
margin : 0 6px 0 0;
|
67
|
+
opacity : 0;
|
68
|
+
pointer-events: none;
|
69
|
+
transition : opacity 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
|
70
|
+
will-change : opacity, transform;
|
71
|
+
}
|
72
|
+
|
73
|
+
.neo-button-text {
|
74
|
+
pointer-events: none;
|
75
|
+
}
|
76
|
+
}
|
@@ -59,8 +59,8 @@
|
|
59
59
|
.neo-selection-cellcolumnmodel,
|
60
60
|
.neo-selection-cellcolumnrowmodel,
|
61
61
|
.neo-selection-cellmodel,
|
62
|
-
.neo-selection-columnmodel,
|
63
62
|
.neo-selection-cellrowmodel,
|
63
|
+
.neo-selection-columnmodel,
|
64
64
|
.neo-selection-rowmodel {
|
65
65
|
.neo-table-row {
|
66
66
|
&:focus {
|
@@ -72,4 +72,4 @@
|
|
72
72
|
}
|
73
73
|
}
|
74
74
|
}
|
75
|
-
}
|
75
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
$neoMap: map-merge($neoMap, (
|
2
|
+
'grid-container-border-color' : #2b2b2b,
|
3
|
+
'grid-container-cell-background-color' : #3c3f41,
|
4
|
+
'grid-container-cell-background-color-even': #323232,
|
5
|
+
'grid-container-color' : #bbb,
|
6
|
+
'grid-container-header-cell-border-bottom' : 2px solid #2b2b2b
|
7
|
+
));
|
8
|
+
|
9
|
+
@if $useCssVars == true {
|
10
|
+
:root .neo-theme-dark { // .neo-grid-container
|
11
|
+
--grid-container-border-color : #{neo(grid-container-border-color)};
|
12
|
+
--grid-container-cell-background-color : #{neo(grid-container-cell-background-color)};
|
13
|
+
--grid-container-cell-background-color-even: #{neo(grid-container-cell-background-color-even)};
|
14
|
+
--grid-container-color : #{neo(grid-container-color)};
|
15
|
+
--grid-container-header-cell-border-bottom : #{neo(grid-container-header-cell-border-bottom)};
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
$neoMap: map-merge($neoMap, (
|
2
|
+
'grid-cell-background-color-hover' : #54595c,
|
3
|
+
'grid-cellmodel-selected-cell-background-color' : #64B5F6,
|
4
|
+
'grid-cellmodel-selected-cell-color' : #2b2b2b,
|
5
|
+
'grid-cellmodel-selected-column-cell-background-color': #4f558a,
|
6
|
+
'grid-cellmodel-selected-column-cell-color' : #bbb,
|
7
|
+
'grid-cellrowmodel-selected-cell-background-color' : #64B5F6,
|
8
|
+
'grid-cellrowmodel-selected-cell-color' : #2b2b2b,
|
9
|
+
'grid-cellrowmodel-selected-row-cell-background-color': #4f558a,
|
10
|
+
'grid-cellrowmodel-selected-row-cell-color' : #bbb,
|
11
|
+
'grid-rowmodel-selected-cell-background-color' : #64B5F6,
|
12
|
+
'grid-rowmodel-selected-cell-color' : #2b2b2b
|
13
|
+
));
|
14
|
+
|
15
|
+
@if $useCssVars == true {
|
16
|
+
:root .neo-theme-dark { // .neo-grid-view
|
17
|
+
--grid-cell-background-color-hover : #{neo(grid-cell-background-color-hover)};
|
18
|
+
--grid-cellmodel-selected-cell-background-color : #{neo(grid-cellmodel-selected-cell-background-color)};
|
19
|
+
--grid-cellmodel-selected-cell-color : #{neo(grid-cellmodel-selected-cell-color)};
|
20
|
+
--grid-cellmodel-selected-column-cell-background-color: #{neo(grid-cellmodel-selected-column-cell-background-color)};
|
21
|
+
--grid-cellmodel-selected-column-cell-color : #{neo(grid-cellmodel-selected-column-cell-color)};
|
22
|
+
--grid-cellrowmodel-selected-cell-background-color : #{neo(grid-cellrowmodel-selected-cell-background-color)};
|
23
|
+
--grid-cellrowmodel-selected-cell-color : #{neo(grid-cellrowmodel-selected-cell-color)};
|
24
|
+
--grid-cellrowmodel-selected-row-cell-background-color: #{neo(grid-cellrowmodel-selected-row-cell-background-color)};
|
25
|
+
--grid-cellrowmodel-selected-row-cell-color : #{neo(grid-cellrowmodel-selected-row-cell-color)};
|
26
|
+
--grid-rowmodel-selected-cell-background-color : #{neo(grid-rowmodel-selected-cell-background-color)};
|
27
|
+
--grid-rowmodel-selected-cell-color : #{neo(grid-rowmodel-selected-cell-color)};
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
$neoMap: map-merge($neoMap, (
|
2
|
+
'grid-header-button-background-color': #323232,
|
3
|
+
'grid-header-button-background-image': linear-gradient(#3c3f41, #323232),
|
4
|
+
'grid-header-button-color' : #bbb,
|
5
|
+
'grid-header-button-glyph-color' : #bbb
|
6
|
+
));
|
7
|
+
|
8
|
+
@if $useCssVars == true {
|
9
|
+
:root .neo-theme-dark { // .neo-grid-header
|
10
|
+
--grid-header-button-background-color: #{neo(grid-header-button-background-color)};
|
11
|
+
--grid-header-button-background-image: #{neo(grid-header-button-background-image)};
|
12
|
+
--grid-header-button-color : #{neo(grid-header-button-color)};
|
13
|
+
--grid-header-button-glyph-color : #{neo(grid-header-button-glyph-color)};
|
14
|
+
}
|
15
|
+
}
|
File without changes
|