@internetstiftelsen/styleguide 5.1.14-beta.0.6 → 5.1.14
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/dist/assets/js/youtube.js +3 -3
- package/dist/atoms/progress/progress.js +3 -7
- package/dist/atoms/textarea/rich-text.js +3 -3
- package/dist/components.js +0 -1
- package/dist/molecules/modal/modal.js +6 -6
- package/package.json +1 -2
- package/src/app.scss +0 -1
- package/src/atoms/progress/_progress.scss +0 -28
- package/src/atoms/progress/progress.config.js +1 -2
- package/src/atoms/progress/progress.js +4 -9
- package/src/components.js +0 -1
- package/src/molecules/table/_table.scss +1 -5
- package/src/organisms/header/_header.scss +0 -1
- package/src/organisms/selectable/_selectable.scss +7 -62
- package/dist/molecules/table-advanced/table-advanced.js +0 -195
- package/src/molecules/table-advanced/_table-advanced.scss +0 -87
- package/src/molecules/table-advanced/table-advanced.config.js +0 -18
- package/src/molecules/table-advanced/table-advanced.js +0 -300
- package/src/molecules/table-advanced/table-small.json +0 -72
- package/src/molecules/table-advanced/table.json +0 -2027
- package/src/molecules/table-advanced/test +0 -246
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get:
|
|
9
|
+
get: all[name]
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
|
|
13
|
+
destroyPlayer: function() {
|
|
14
14
|
return destroyPlayer;
|
|
15
15
|
},
|
|
16
|
-
|
|
16
|
+
setupPlayers: function() {
|
|
17
17
|
return setupPlayers;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const progressbars = document.querySelectorAll('[data-width-progress]');
|
|
3
|
-
if (progressbars
|
|
3
|
+
if (progressbars) {
|
|
4
4
|
function progressBarWidths() {
|
|
5
|
-
progressbars.forEach((container)=>{
|
|
5
|
+
progressbars.forEach((container, index)=>{
|
|
6
6
|
const width = container.offsetWidth;
|
|
7
|
-
|
|
8
|
-
const max = +container.getAttribute('max') || 100;
|
|
9
|
-
const percent = Math.round(value / max * 100 / 2) * 2;
|
|
10
|
-
document.documentElement.style.setProperty('--progressbar-width', width + 'px');
|
|
11
|
-
document.documentElement.style.setProperty('--progressbar-width-percent', percent + '%');
|
|
7
|
+
document.documentElement.style.setProperty(`--progressbar-width`, width + 'px');
|
|
12
8
|
});
|
|
13
9
|
}
|
|
14
10
|
window.addEventListener('DOMContentLoaded', progressBarWidths);
|
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get:
|
|
8
|
+
get: all[name]
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
12
|
+
init: function() {
|
|
13
13
|
return init;
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
setupTextArea: function() {
|
|
16
16
|
return setupTextArea;
|
|
17
17
|
}
|
|
18
18
|
});
|
package/dist/components.js
CHANGED
|
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get:
|
|
8
|
+
get: all[name]
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
12
|
+
clearQueue: function() {
|
|
13
13
|
return clearQueue;
|
|
14
14
|
},
|
|
15
|
-
|
|
15
|
+
close: function() {
|
|
16
16
|
return close;
|
|
17
17
|
},
|
|
18
|
-
|
|
18
|
+
onClose: function() {
|
|
19
19
|
return onClose;
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
onOpen: function() {
|
|
22
22
|
return onOpen;
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
open: function() {
|
|
25
25
|
return open;
|
|
26
26
|
}
|
|
27
27
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetstiftelsen/styleguide",
|
|
3
|
-
"version": "5.1.14
|
|
3
|
+
"version": "5.1.14",
|
|
4
4
|
"main": "dist/components.js",
|
|
5
5
|
"ports": {
|
|
6
6
|
"fractal": "3000"
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"@tiptap/extension-paragraph": "^3.4.4",
|
|
69
69
|
"@tiptap/extension-text": "^3.4.4",
|
|
70
70
|
"a11y-toggle": "^2.1.0",
|
|
71
|
-
"ag-grid-community": "^34.2.0",
|
|
72
71
|
"focus-trap": "^7.6.5",
|
|
73
72
|
"glider-js": "^1.7.9",
|
|
74
73
|
"lodash": "^4.17.21",
|
package/src/app.scss
CHANGED
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
@use 'molecules/form-control/form-control';
|
|
51
51
|
@use 'molecules/alert/alert';
|
|
52
52
|
@use 'molecules/table/table';
|
|
53
|
-
@use 'molecules/table-advanced/table-advanced';
|
|
54
53
|
@use 'molecules/system-error/system-error';
|
|
55
54
|
@use 'molecules/info-box/info-box';
|
|
56
55
|
@use 'molecules/share/share';
|
|
@@ -89,8 +89,6 @@
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
@include bem.m(heat) {
|
|
92
|
-
position: relative;
|
|
93
|
-
|
|
94
92
|
&[value]::-webkit-progress-value,
|
|
95
93
|
&[value]::-webkit-meter-optimum-value {
|
|
96
94
|
border-radius: 0;
|
|
@@ -106,21 +104,6 @@
|
|
|
106
104
|
background-size: var(--progressbar-width) 100%; /* The value is calculated by JS and set in the DOM */
|
|
107
105
|
background-repeat: no-repeat;
|
|
108
106
|
}
|
|
109
|
-
|
|
110
|
-
&::after {
|
|
111
|
-
position: absolute;
|
|
112
|
-
top: 50%;
|
|
113
|
-
left: var(--progressbar-width-percent);
|
|
114
|
-
content: attr(data-value) '%';
|
|
115
|
-
display: block;
|
|
116
|
-
color: colors.$color-cyberspace;
|
|
117
|
-
transform: translateX(-100%) translateY(-50%);
|
|
118
|
-
padding-right: func.rhythm(1);
|
|
119
|
-
color: colors.$color-snow;
|
|
120
|
-
text-shadow: 0 0 5px colors.$color-cyberspace;
|
|
121
|
-
font-size: var.$size-base * 1.2;
|
|
122
|
-
line-height: 1;
|
|
123
|
-
}
|
|
124
107
|
}
|
|
125
108
|
}
|
|
126
109
|
|
|
@@ -136,15 +119,4 @@
|
|
|
136
119
|
@include bem.m(large) {
|
|
137
120
|
font-size: var.$size-base * 1.5;
|
|
138
121
|
}
|
|
139
|
-
|
|
140
|
-
@include bem.m(hidden) {
|
|
141
|
-
span {
|
|
142
|
-
@include mixin.visuallyhidden;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
> progress,
|
|
146
|
-
> meter {
|
|
147
|
-
margin-left: 0;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
122
|
}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
const progressbars = document.querySelectorAll('[data-width-progress]')
|
|
1
|
+
const progressbars = document.querySelectorAll('[data-width-progress]')
|
|
2
2
|
|
|
3
|
-
if (progressbars
|
|
3
|
+
if (progressbars) {
|
|
4
4
|
function progressBarWidths() {
|
|
5
|
-
progressbars.forEach((container) => {
|
|
5
|
+
progressbars.forEach((container, index) => {
|
|
6
6
|
const width = container.offsetWidth;
|
|
7
|
-
|
|
8
|
-
const max = +container.getAttribute('max') || 100;
|
|
9
|
-
const percent = Math.round((value / max * 100) / 2) * 2;
|
|
10
|
-
|
|
11
|
-
document.documentElement.style.setProperty('--progressbar-width', width + 'px');
|
|
12
|
-
document.documentElement.style.setProperty('--progressbar-width-percent', percent + '%');
|
|
7
|
+
document.documentElement.style.setProperty(`--progressbar-width`, width + 'px');
|
|
13
8
|
});
|
|
14
9
|
}
|
|
15
10
|
|
package/src/components.js
CHANGED
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
border: 0;
|
|
15
15
|
counter-reset: table-counter;
|
|
16
16
|
|
|
17
|
-
&[aria-hidden="true"] {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
17
|
caption {
|
|
22
18
|
font-family: var.$font-family-headings;
|
|
23
19
|
padding-top: func.rhythm(1);
|
|
@@ -290,7 +286,7 @@
|
|
|
290
286
|
-webkit-overflow-scrolling: touch;
|
|
291
287
|
}
|
|
292
288
|
|
|
293
|
-
@include breakpoint.bp-up(
|
|
289
|
+
@include breakpoint.bp-up(sm) {
|
|
294
290
|
@include bem.b(scroll-indicator) {
|
|
295
291
|
display: none;
|
|
296
292
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
@use "sass:color";
|
|
3
|
-
@use "sass:math";
|
|
4
3
|
@use '../../configurations/mixins' as mixin;
|
|
5
4
|
@use '../../configurations/extends';
|
|
6
5
|
@use '../../configurations/bem' as bem;
|
|
@@ -10,41 +9,25 @@
|
|
|
10
9
|
@use '../../vendor/grid/breakpoints' as breakpoint;
|
|
11
10
|
|
|
12
11
|
@include mixin.organism(selectable) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@include breakpoint.bp-up(md) {
|
|
17
|
-
margin-bottom: 0;
|
|
18
|
-
}
|
|
12
|
+
[aria-hidden="true"] {
|
|
13
|
+
display: none;
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
@include bem.e(item) {
|
|
22
17
|
border-top: 1px solid colors.$color-concrete;
|
|
23
|
-
padding-top: func.rhythm(
|
|
24
|
-
margin-top: func.rhythm(
|
|
25
|
-
|
|
26
|
-
@include breakpoint.bp-up(lg) {
|
|
27
|
-
padding-top: func.rhythm(4);
|
|
28
|
-
margin-top: func.rhythm(3);
|
|
29
|
-
}
|
|
18
|
+
padding-top: func.rhythm(4);
|
|
19
|
+
margin-top: func.rhythm(3);
|
|
30
20
|
|
|
31
21
|
.js &:not(:first-child):not([aria-hidden]) {
|
|
32
22
|
display: none;
|
|
33
23
|
}
|
|
34
|
-
|
|
35
|
-
&[aria-hidden="true"] {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
24
|
}
|
|
39
25
|
|
|
40
26
|
@include bem.m(padded) {
|
|
41
|
-
padding: func.rhythm(
|
|
27
|
+
padding: func.rhythm(1);
|
|
42
28
|
|
|
43
|
-
@include
|
|
44
|
-
|
|
45
|
-
padding-left: 0;
|
|
46
|
-
padding-right: 0;
|
|
47
|
-
}
|
|
29
|
+
@include breakpoint.bp-up(md) {
|
|
30
|
+
padding: func.rhythm(2);
|
|
48
31
|
}
|
|
49
32
|
}
|
|
50
33
|
|
|
@@ -59,42 +42,4 @@
|
|
|
59
42
|
@include bem.m(shadow-large) {
|
|
60
43
|
@include mixin.card-shadow(colors.$color-cyberspace, 0.2);
|
|
61
44
|
}
|
|
62
|
-
|
|
63
|
-
@include bem.m(article-indent) {
|
|
64
|
-
@include breakpoint.bp-up(lg) {
|
|
65
|
-
@include bem.e(item) {
|
|
66
|
-
> p:not(.preamble),
|
|
67
|
-
> h2,
|
|
68
|
-
> h3,
|
|
69
|
-
> h4,
|
|
70
|
-
> h5,
|
|
71
|
-
> h6,
|
|
72
|
-
> ul,
|
|
73
|
-
> ol,
|
|
74
|
-
> .wp-block-image > figure,
|
|
75
|
-
> figure,
|
|
76
|
-
> blockquote {
|
|
77
|
-
&:not(.alignfull):not(.alignleft):not(.alignright):not(.alignwide):not(.wp-block-iis-hero) {
|
|
78
|
-
max-width: 46.364%;
|
|
79
|
-
margin-right: math.div(var.$grid-gutter-width, 2);
|
|
80
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
> [class*='meta'] {
|
|
85
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
> p.preamble {
|
|
89
|
-
max-width: 46.364%;
|
|
90
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.wp-block-iis-info {
|
|
94
|
-
max-width: calc(46.364% + #{(var.$indent * 2)});
|
|
95
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
45
|
}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
const _aggridcommunity = /*#__PURE__*/ _interop_require_wildcard(require("ag-grid-community"));
|
|
6
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
7
|
-
try {
|
|
8
|
-
var info = gen[key](arg);
|
|
9
|
-
var value = info.value;
|
|
10
|
-
} catch (error) {
|
|
11
|
-
reject(error);
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (info.done) {
|
|
15
|
-
resolve(value);
|
|
16
|
-
} else {
|
|
17
|
-
Promise.resolve(value).then(_next, _throw);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function _async_to_generator(fn) {
|
|
21
|
-
return function() {
|
|
22
|
-
var self = this, args = arguments;
|
|
23
|
-
return new Promise(function(resolve, reject) {
|
|
24
|
-
var gen = fn.apply(self, args);
|
|
25
|
-
function _next(value) {
|
|
26
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
27
|
-
}
|
|
28
|
-
function _throw(err) {
|
|
29
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
30
|
-
}
|
|
31
|
-
_next(undefined);
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
36
|
-
if (typeof WeakMap !== "function") return null;
|
|
37
|
-
var cacheBabelInterop = new WeakMap();
|
|
38
|
-
var cacheNodeInterop = new WeakMap();
|
|
39
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
40
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
41
|
-
})(nodeInterop);
|
|
42
|
-
}
|
|
43
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
44
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
45
|
-
return obj;
|
|
46
|
-
}
|
|
47
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
48
|
-
return {
|
|
49
|
-
default: obj
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
53
|
-
if (cache && cache.has(obj)) {
|
|
54
|
-
return cache.get(obj);
|
|
55
|
-
}
|
|
56
|
-
var newObj = {
|
|
57
|
-
__proto__: null
|
|
58
|
-
};
|
|
59
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
60
|
-
for(var key in obj){
|
|
61
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
62
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
63
|
-
if (desc && (desc.get || desc.set)) {
|
|
64
|
-
Object.defineProperty(newObj, key, desc);
|
|
65
|
-
} else {
|
|
66
|
-
newObj[key] = obj[key];
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
newObj.default = obj;
|
|
71
|
-
if (cache) {
|
|
72
|
-
cache.set(obj, newObj);
|
|
73
|
-
}
|
|
74
|
-
return newObj;
|
|
75
|
-
}
|
|
76
|
-
_aggridcommunity.ModuleRegistry.registerModules([
|
|
77
|
-
_aggridcommunity.AllCommunityModule
|
|
78
|
-
]);
|
|
79
|
-
// to use iisTheme in an application, pass it to the theme grid option
|
|
80
|
-
const iisTheme = _aggridcommunity.themeQuartz.withPart(_aggridcommunity.iconSetMaterial).withParams({
|
|
81
|
-
accentColor: "#0477CE",
|
|
82
|
-
backgroundColor: "#FFFFFF",
|
|
83
|
-
borderRadius: 3,
|
|
84
|
-
browserColorScheme: "light",
|
|
85
|
-
cellTextColor: "#1F2A36",
|
|
86
|
-
chromeBackgroundColor: {
|
|
87
|
-
ref: "foregroundColor",
|
|
88
|
-
mix: 0.07,
|
|
89
|
-
onto: "backgroundColor"
|
|
90
|
-
},
|
|
91
|
-
fontFamily: "inherit",
|
|
92
|
-
fontSize: 16,
|
|
93
|
-
foregroundColor: "#1F2A36",
|
|
94
|
-
headerBackgroundColor: "#D8D8D8",
|
|
95
|
-
headerFontFamily: "inherit",
|
|
96
|
-
headerFontSize: 16,
|
|
97
|
-
headerFontWeight: 400,
|
|
98
|
-
headerTextColor: "#1F2A36",
|
|
99
|
-
oddRowBackgroundColor: "#EDEDED",
|
|
100
|
-
wrapperBorderRadius: 3
|
|
101
|
-
});
|
|
102
|
-
let gridApi;
|
|
103
|
-
const gridOptions = {
|
|
104
|
-
theme: iisTheme,
|
|
105
|
-
sortable: true,
|
|
106
|
-
suppressAutoHideAllSortIcons: true,
|
|
107
|
-
columnDefs: [
|
|
108
|
-
{
|
|
109
|
-
headerName: 'Domain',
|
|
110
|
-
field: 'domain',
|
|
111
|
-
sortable: true,
|
|
112
|
-
filter: true
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
headerName: 'Score (%)',
|
|
116
|
-
field: 'score_percent',
|
|
117
|
-
sortable: true,
|
|
118
|
-
filter: 'agNumberColumnFilter',
|
|
119
|
-
width: 120
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
headerName: 'Report',
|
|
123
|
-
field: 'report_url',
|
|
124
|
-
cellRenderer: (params)=>{
|
|
125
|
-
return params.value ? `<a href="${params.value}" target="_blank" rel="noopener">View</a>` : '';
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
headerName: 'Results',
|
|
130
|
-
children: [
|
|
131
|
-
{
|
|
132
|
-
headerName: 'IPv6',
|
|
133
|
-
field: 'results.ipv6.status',
|
|
134
|
-
sortable: true,
|
|
135
|
-
filter: true,
|
|
136
|
-
cellClass: (params)=>`status-${params.value}`
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
headerName: 'DNSSEC',
|
|
140
|
-
field: 'results.dnssec.status',
|
|
141
|
-
sortable: true,
|
|
142
|
-
filter: true,
|
|
143
|
-
cellClass: (params)=>`status-${params.value}`
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
headerName: 'HTTPS',
|
|
147
|
-
field: 'results.https.status',
|
|
148
|
-
sortable: true,
|
|
149
|
-
filter: true,
|
|
150
|
-
cellClass: (params)=>`status-${params.value}`
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
headerName: 'Security Options',
|
|
154
|
-
field: 'results.security_options.status',
|
|
155
|
-
sortable: true,
|
|
156
|
-
filter: true,
|
|
157
|
-
cellClass: (params)=>`status-${params.value}`
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
headerName: 'RPKI',
|
|
161
|
-
field: 'results.rpki.status',
|
|
162
|
-
sortable: true,
|
|
163
|
-
filter: true,
|
|
164
|
-
cellClass: (params)=>`status-${params.value}`
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
};
|
|
170
|
-
(function fillLarge() {
|
|
171
|
-
setWidthAndHeight("100%");
|
|
172
|
-
})();
|
|
173
|
-
function setWidthAndHeight(size) {
|
|
174
|
-
const eGridDiv = document.querySelector("#myGrid");
|
|
175
|
-
eGridDiv.style.setProperty("width", size);
|
|
176
|
-
eGridDiv.style.setProperty("height", size);
|
|
177
|
-
}
|
|
178
|
-
const gridDiv = document.querySelector("#myGrid");
|
|
179
|
-
gridApi = _aggridcommunity.createGrid(gridDiv, gridOptions);
|
|
180
|
-
fetch('public/assets/json/table.json').then((res)=>_async_to_generator(function*() {
|
|
181
|
-
const ct = res.headers.get('content-type') || '';
|
|
182
|
-
if (!res.ok) {
|
|
183
|
-
const body = yield res.text();
|
|
184
|
-
throw new Error(`Fetch failed ${res.status} ${res.statusText}\n${body.slice(0, 200)}`);
|
|
185
|
-
}
|
|
186
|
-
if (!ct.includes('application/json')) {
|
|
187
|
-
const body = yield res.text();
|
|
188
|
-
throw new Error(`Expected JSON, got ${ct}. First 200 chars:\n${body.slice(0, 200)}`);
|
|
189
|
-
}
|
|
190
|
-
return res.json();
|
|
191
|
-
})()).then((data)=>{
|
|
192
|
-
console.log('Loaded JSON rows:', Array.isArray(data) ? data.length : data);
|
|
193
|
-
}).catch((e)=>{
|
|
194
|
-
console.error(e);
|
|
195
|
-
});
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
@use '../../configurations/variables' as var;
|
|
3
|
-
@use '../../configurations/extends';
|
|
4
|
-
@use '../../configurations/functions' as func;
|
|
5
|
-
@use '../../configurations/colors/colors' as colors;
|
|
6
|
-
|
|
7
|
-
body {
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:root {
|
|
12
|
-
--ag-header-font-family: 'Roboto Mono Regular', monospace;
|
|
13
|
-
--ag-font-family: 'HK Grotesk', sans-serif;
|
|
14
|
-
--ag-cell-font-family: 'HK Grotesk', sans-serif;
|
|
15
|
-
--ag-header-font-size: 15px;
|
|
16
|
-
--ag-font-size: 16px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.ag-header-cell,
|
|
20
|
-
.ag-header-cell-comp-wrapper {
|
|
21
|
-
text-shadow: 0 1px 0 colors.$color-snow;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* Always show sort icons in headers */
|
|
25
|
-
.ag-header-cell .ag-sort-ascending-icon {
|
|
26
|
-
opacity: 1 !important;
|
|
27
|
-
visibility: visible !important;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Ensure the "unsorted" chevrons render when nothing is sorted yet */
|
|
31
|
-
.ag-header-cell .ag-sort-none-icon {
|
|
32
|
-
display: inline-block !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.ag-grid {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ag-grid__wrapper {
|
|
41
|
-
flex: 1 1 0px;
|
|
42
|
-
width: 100%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.ag-grid__inner {
|
|
46
|
-
height: 100%;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/*.ag-cell,
|
|
50
|
-
.ag-header-cell,
|
|
51
|
-
.ag-header-group-cell,
|
|
52
|
-
.ag-row,
|
|
53
|
-
.ag-spanned-cell-wrapper {
|
|
54
|
-
visibility: visible;
|
|
55
|
-
}*/
|
|
56
|
-
|
|
57
|
-
.ag-cell {
|
|
58
|
-
display: inline-flex;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.ag-cell span {
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ag-cell span a {
|
|
67
|
-
@extend %link-styles;
|
|
68
|
-
|
|
69
|
-
line-height: initial;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.ag-cell svg {
|
|
73
|
-
margin-right: func.rhythm(1);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Vertically center any cells that render your icon+label markup */
|
|
77
|
-
.ag-cell .cell-center {
|
|
78
|
-
display: inline-flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
gap: 6px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* Optional: make sort icons always visible a bit stronger */
|
|
84
|
-
.ag-header-cell .ag-sort-indicator-icon { opacity: 1; }
|
|
85
|
-
|
|
86
|
-
.ag-header-group-cell-label.expand-header { cursor: pointer; }
|
|
87
|
-
.ag-header-group-cell-label.expand-header:hover { opacity: .9; }
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
status: 'wip',
|
|
3
|
-
default: 'Small table',
|
|
4
|
-
|
|
5
|
-
context: {
|
|
6
|
-
json: './table-small.json',
|
|
7
|
-
minHeight: '345px',
|
|
8
|
-
},
|
|
9
|
-
variants: [
|
|
10
|
-
{
|
|
11
|
-
name: 'Large table',
|
|
12
|
-
context: {
|
|
13
|
-
json: './table.json',
|
|
14
|
-
minHeight: '600px',
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
};
|