asab_webui_components 25.1.1
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/CHANGELOG.md +295 -0
- package/LICENSE +28 -0
- package/README.md +3 -0
- package/dist/abc/Module.js +20 -0
- package/dist/abc/Renderer.js +67 -0
- package/dist/abc/Service.js +24 -0
- package/dist/components/AdvancedCard/AdvancedCard.js +38 -0
- package/dist/components/AdvancedCard/AdvancedCard.jsx +34 -0
- package/dist/components/AttentionRequired/AttentionRequiredBadge.js +22 -0
- package/dist/components/AttentionRequired/AttentionRequiredBadge.jsx +17 -0
- package/dist/components/Authz/ButtonWithAuthz.js +81 -0
- package/dist/components/Authz/ControlledSwitchWithAuthz.js +78 -0
- package/dist/components/Authz/Credentials.js +217 -0
- package/dist/components/Authz/Credentials.scss +7 -0
- package/dist/components/Authz/LinkWithAuthz.js +56 -0
- package/dist/components/Authz/UncontrolledSwitchWithAuthz.js +79 -0
- package/dist/components/Authz/utils/authz.js +38 -0
- package/dist/components/Authz/utils/isAuthorized.js +31 -0
- package/dist/components/Console/ConsoleCard.js +98 -0
- package/dist/components/Console/ConsoleCard.jsx +70 -0
- package/dist/components/Console/ConsoleCard.scss +26 -0
- package/dist/components/Console/ConsoleContext.js +14 -0
- package/dist/components/Console/ConsoleContext.jsx +5 -0
- package/dist/components/Console/components/ConsoleModeButton.js +35 -0
- package/dist/components/Console/components/ConsoleModeButton.jsx +30 -0
- package/dist/components/ContentLoader.js +57 -0
- package/dist/components/Context/PubSubContext.js +51 -0
- package/dist/components/ControlledSwitch/index.js +33 -0
- package/dist/components/ControlledSwitch/switch.scss +82 -0
- package/dist/components/DataTable/ActionButton.js +63 -0
- package/dist/components/DataTable/Buttons.js +116 -0
- package/dist/components/DataTable/CustomDropdownButton.js +49 -0
- package/dist/components/DataTable/DataTable.scss +37 -0
- package/dist/components/DataTable/LimitDropdown.js +52 -0
- package/dist/components/DataTable/Pagination.js +204 -0
- package/dist/components/DataTable/Search.js +29 -0
- package/dist/components/DataTable/Sort.js +44 -0
- package/dist/components/DataTable/Table.js +310 -0
- package/dist/components/DataTable/index.js +180 -0
- package/dist/components/DataTable2/DataTable2.js +532 -0
- package/dist/components/DataTable2/DataTable2.jsx +446 -0
- package/dist/components/DataTable2/DataTable2.scss +38 -0
- package/dist/components/DataTable2/DataTableContext.js +401 -0
- package/dist/components/DataTable2/DataTableContext.jsx +338 -0
- package/dist/components/DataTable2/components/filters/DataTableAdvFilter2.scss +20 -0
- package/dist/components/DataTable2/components/filters/DataTableAdvFilterMultiValue2.js +80 -0
- package/dist/components/DataTable2/components/filters/DataTableAdvFilterMultiValue2.jsx +64 -0
- package/dist/components/DataTable2/components/filters/DataTableAdvFilterSingleValue2.js +61 -0
- package/dist/components/DataTable2/components/filters/DataTableAdvFilterSingleValue2.jsx +49 -0
- package/dist/components/DataTable2/components/filters/DataTableSimpleFilter2.js +38 -0
- package/dist/components/DataTable2/components/filters/DataTableSimpleFilter2.jsx +35 -0
- package/dist/components/DataTable2/components/filters/index.js +26 -0
- package/dist/components/DataTable2/components/filters/index.jsx +3 -0
- package/dist/components/DataTable2/components/utils/updateTableLimit.js +37 -0
- package/dist/components/DataTable2/components/utils/updateTableLimit.jsx +22 -0
- package/dist/components/DateTime/index.js +44 -0
- package/dist/components/DateTime/timeToString.js +88 -0
- package/dist/components/DateTime/useDateFNSLocale.js +48 -0
- package/dist/components/FullscreenButton.js +35 -0
- package/dist/components/FullscreenButton.jsx +26 -0
- package/dist/components/Humanize/humanizeToString.js +99 -0
- package/dist/components/Humanize/index.js +32 -0
- package/dist/components/ResultCard/ResultCard.js +24 -0
- package/dist/components/ResultCard/ResultCard.scss +9 -0
- package/dist/components/Spinner.js +25 -0
- package/dist/components/TreeMenu/TreeMenu.js +78 -0
- package/dist/components/TreeMenu/TreeMenu.jsx +63 -0
- package/dist/components/TreeMenu/TreeMenu.scss +32 -0
- package/dist/components/TreeMenu/TreeMenuCard.js +189 -0
- package/dist/components/TreeMenu/TreeMenuItem.js +135 -0
- package/dist/components/TreeMenu/index.js +41 -0
- package/dist/components/TreeMenu/utils/flattenTree.js +54 -0
- package/dist/components/TreeMenu/utils/flattenTree.jsx +44 -0
- package/dist/components/TreeMenu/utils/formatIntoLeafFolderTree.js +56 -0
- package/dist/components/TreeMenu/utils/formatIntoTree.js +67 -0
- package/dist/components/TreeMenu/utils/removeTreeContent.js +97 -0
- package/dist/components/UncontrolledSwitch/index.js +60 -0
- package/dist/index.js +372 -0
- package/dist/styles/components/alert.scss +53 -0
- package/dist/styles/components/button.scss +104 -0
- package/dist/styles/components/card.scss +174 -0
- package/dist/styles/components/form.scss +20 -0
- package/dist/styles/components/html.scss +16 -0
- package/dist/styles/constants/colors.scss +66 -0
- package/dist/styles/constants/index.scss +70 -0
- package/dist/styles/constants/theme-dark.scss +55 -0
- package/dist/styles/constants/theme-light.scss +46 -0
- package/dist/styles/constants/theme-print.scss +198 -0
- package/dist/styles/index.scss +15 -0
- package/dist/utils/ErrorHandler.js +27 -0
- package/dist/utils/deepMerge.js +47 -0
- package/dist/utils/deepMerge.jsx +33 -0
- package/dist/utils/hexToString.js +27 -0
- package/dist/utils/isPrivateIP.js +37 -0
- package/dist/utils/isValidIP.js +82 -0
- package/dist/utils/itemExtensionHandler.js +24 -0
- package/dist/utils/localStorage.js +65 -0
- package/dist/utils/lookups/isoCodeCountries.js +264 -0
- package/dist/utils/monaco/problemMarkers.js +78 -0
- package/dist/utils/monaco/problemMarkers.jsx +57 -0
- package/dist/utils/removeFileExtension.js +26 -0
- package/dist/utils/validateAccess.js +143 -0
- package/package.json +43 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
[data-bs-theme=dark] .card {
|
|
2
|
+
--bs-card-cap-bg: unset;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.card {
|
|
6
|
+
--bs-card-border-color: var(--bs-border-color);
|
|
7
|
+
--bs-card-cap-bg: var(--white);
|
|
8
|
+
--bs-card-cap-padding-y: 0.9rem;
|
|
9
|
+
|
|
10
|
+
> .card-header h3, > .card-header-flex h3 {
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
color: var(--bs-body-color);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
button[class*="btn-outline"],
|
|
16
|
+
button[class*="btn-outline"]:disabled {
|
|
17
|
+
--bs-btn-border-color: inherit;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$card-flex-height: 3.2rem;
|
|
22
|
+
|
|
23
|
+
// Extending `.card-header` class to accept flex sub-items
|
|
24
|
+
.card-header-flex {
|
|
25
|
+
// @extend .d-flex from bootstrap
|
|
26
|
+
display: flex !important;
|
|
27
|
+
|
|
28
|
+
// @extend .align-items-center from bootstrap
|
|
29
|
+
align-items: center !important;
|
|
30
|
+
|
|
31
|
+
min-height: $card-flex-height; // The height must be set for flex class
|
|
32
|
+
|
|
33
|
+
// @extend .card-header from bootstrap
|
|
34
|
+
color: var(--bs-card-cap-color);
|
|
35
|
+
background-color: var(--bs-card-cap-bg);
|
|
36
|
+
border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color);
|
|
37
|
+
|
|
38
|
+
padding: 0;
|
|
39
|
+
margin: 0;
|
|
40
|
+
|
|
41
|
+
> * {
|
|
42
|
+
padding: 0 var(--bs-card-cap-padding-x);
|
|
43
|
+
|
|
44
|
+
display: flex;
|
|
45
|
+
height: $card-flex-height;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
> .btn {
|
|
51
|
+
--bs-btn-border-color: transparent;
|
|
52
|
+
border-radius: 0;
|
|
53
|
+
|
|
54
|
+
&:first-child {
|
|
55
|
+
border-radius: var(--bs-border-radius) 0 0 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:last-child {
|
|
59
|
+
border-radius: 0 var(--bs-border-radius) 0 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
> .dropdown {
|
|
64
|
+
padding: 0;
|
|
65
|
+
|
|
66
|
+
&:first-child > .btn {
|
|
67
|
+
border-radius: var(--bs-border-radius) 0 0 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:last-child > .btn {
|
|
71
|
+
border-radius: 0 var(--bs-border-radius) 0 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dropdown-toggle {
|
|
75
|
+
--bs-btn-border-color: transparent;
|
|
76
|
+
border-radius: 0;
|
|
77
|
+
height: 100%;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> .nav {
|
|
82
|
+
padding: 0;
|
|
83
|
+
display: contents;
|
|
84
|
+
|
|
85
|
+
.nav-item a {
|
|
86
|
+
border: none;
|
|
87
|
+
background: inherit;
|
|
88
|
+
border-bottom: 2px solid transparent;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.nav-item a:hover {
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
border-bottom: 2px solid var(--bs-secondary);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.nav-item a.active {
|
|
97
|
+
border-bottom: 2px solid var(--bs-primary);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
h2, h3, h4, h5, h6 {
|
|
102
|
+
margin-bottom: 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
.card-footer-flex {
|
|
108
|
+
// @extend .d-flex from bootstrap
|
|
109
|
+
display: flex!important;
|
|
110
|
+
|
|
111
|
+
// @extend .align-items-center from bootstrap
|
|
112
|
+
align-items: center!important;
|
|
113
|
+
|
|
114
|
+
min-height: $card-flex-height; // The height must be set for flex class
|
|
115
|
+
|
|
116
|
+
// @extend .card-header from bootstrap
|
|
117
|
+
color: var(--bs-card-cap-color);
|
|
118
|
+
background-color: var(--bs-card-cap-bg);
|
|
119
|
+
border-top: var(--bs-card-border-width) solid var(--bs-card-border-color);
|
|
120
|
+
|
|
121
|
+
padding: 0;
|
|
122
|
+
margin: 0;
|
|
123
|
+
|
|
124
|
+
> * {
|
|
125
|
+
padding: 0 var(--bs-card-cap-padding-x);
|
|
126
|
+
|
|
127
|
+
display: flex;
|
|
128
|
+
height: $card-flex-height;
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
> .btn {
|
|
134
|
+
--bs-btn-border-color: transparent;
|
|
135
|
+
border-radius: 0;
|
|
136
|
+
|
|
137
|
+
&:first-child {
|
|
138
|
+
border-radius: 0 0 0 var(--bs-border-radius);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:last-child {
|
|
142
|
+
border-radius: 0 0 var(--bs-border-radius) 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
> .dropdown {
|
|
148
|
+
padding: 0;
|
|
149
|
+
|
|
150
|
+
&:first-child > .btn {
|
|
151
|
+
border-radius: 0 0 0 var(--bs-border-radius);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&:last-child > .btn {
|
|
155
|
+
border-radius: 0 0 var(--bs-border-radius) 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.dropdown-toggle {
|
|
159
|
+
--bs-btn-border-color: transparent;
|
|
160
|
+
border-radius: 0;
|
|
161
|
+
height: 100%;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Styles for enabling fullscreen mode covering header and sidebar
|
|
167
|
+
.card-fullscreen {
|
|
168
|
+
position: fixed;
|
|
169
|
+
top: 0;
|
|
170
|
+
left: 0;
|
|
171
|
+
width: 100vw;
|
|
172
|
+
height: 100vh;
|
|
173
|
+
z-index: 9999;
|
|
174
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.form-control, .form-select, .form-check-input {
|
|
2
|
+
font-size: var(--bs-body-font-size);
|
|
3
|
+
border-radius: 0px;
|
|
4
|
+
background-color: var(--bs-input-bg-color);
|
|
5
|
+
&:focus {
|
|
6
|
+
box-shadow: none;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.form-select, .form-check-input {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
&:disabled {
|
|
13
|
+
cursor: default;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.form-select option:checked {
|
|
18
|
+
color: white;
|
|
19
|
+
background-color: var(--bs-primary);
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
a {
|
|
2
|
+
text-decoration: none;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
hr {
|
|
6
|
+
border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
|
|
7
|
+
background-color: var(--bs-border-color);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
pre code {
|
|
11
|
+
color: var(--bs-code-color); // The colour of the pre-formatted code has to match <code>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
code {
|
|
15
|
+
font-size: var(--asab-monospace-font-size);
|
|
16
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Colors for themes
|
|
2
|
+
// IMPORTANT: Always enter two variants (hex and RGB)
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--soft-sky-blue: #7A9CFF; // The link color for a dark theme
|
|
6
|
+
--soft-sky-blue-rgb: 122, 156, 255;
|
|
7
|
+
|
|
8
|
+
--pastel-sky-blue: #DBEEFF; // The link-hover color and body-bg color for a dark theme
|
|
9
|
+
--pastel-sky-blue-rgb: 219, 238, 255;
|
|
10
|
+
|
|
11
|
+
--deep-space-blue: #0E1426; // The dark for a light, dark theme and dark for body bg, tertiary color for a light theme
|
|
12
|
+
--deep-space-blue-rgb: 14, 20, 38;
|
|
13
|
+
|
|
14
|
+
--nightfall-blue: #19223f; // The card-bg and table-bg color for a dark theme
|
|
15
|
+
|
|
16
|
+
--deep-ocean-blue: #24366D; // The border and card-border color for dark theme
|
|
17
|
+
--deep-ocean-blue-rgb: 36, 54, 109;
|
|
18
|
+
|
|
19
|
+
--polar-mist: #F3F4FA; // The light for a light and dark theme
|
|
20
|
+
--polar-mist-rgb: 243, 244, 250;
|
|
21
|
+
|
|
22
|
+
--white: #FFFFFF; // The card-bg, table-bg, input-bg color for light theme
|
|
23
|
+
--white-rgb: 255, 255, 255;
|
|
24
|
+
|
|
25
|
+
--royal-blue: #315EE3; // The link and primary color for a light theme
|
|
26
|
+
--royal-blue-rgb: 49, 94, 227;
|
|
27
|
+
|
|
28
|
+
--tropical-rainforest: #3DC9B0; // Corresponds with vs-dark color (from the Monaco editor)
|
|
29
|
+
--tropical-rainforest-rgb: 61, 201, 176;
|
|
30
|
+
|
|
31
|
+
--teal: #008080; // Corresponds with vs color (from the Monaco editor)
|
|
32
|
+
--teal-rgb: 0 128 128;
|
|
33
|
+
|
|
34
|
+
--lavender-mist: #DDE1F8; // The secondary for a light and dark theme, the border-color for light theme
|
|
35
|
+
--lavender-mist-rgb: 221, 225, 248;
|
|
36
|
+
|
|
37
|
+
--vibrant-magenta: #d63384; // The code color for light theme
|
|
38
|
+
--vibrant-magenta-rgb: 214, 51, 132;
|
|
39
|
+
|
|
40
|
+
--black: #000000; // The body-color for light theme
|
|
41
|
+
--black-rgb: 0, 0, 0;
|
|
42
|
+
|
|
43
|
+
--midnight-blue: #131C37; // The input-bg color for a dark theme
|
|
44
|
+
--midnight-blue-rgb: 19, 28, 55;
|
|
45
|
+
|
|
46
|
+
--slate-smoke: #6a6a6a8f; // The color of the disabled item text in the TreeMenu
|
|
47
|
+
--slate-smoke-rgb: 106, 106, 106;
|
|
48
|
+
|
|
49
|
+
--deep-red: #D1004A; // The color of the highest Alert severity
|
|
50
|
+
--deep-red-rgb: 209, 0, 74;
|
|
51
|
+
|
|
52
|
+
--deep-green: #0E6027; // The color of the lowest Alert severity
|
|
53
|
+
--deep-green-rgb: 14, 96, 39;
|
|
54
|
+
|
|
55
|
+
--charcoal: #494949; // Console background dark theme
|
|
56
|
+
--charcoal-rgb: 0, 43, 54;
|
|
57
|
+
|
|
58
|
+
--old-lace: #FDF6E3; // Console background light theme
|
|
59
|
+
--old-lace-rgb: 253, 246, 227;
|
|
60
|
+
|
|
61
|
+
--gainsboro: #E0E0E0; // Console font color for dark theme
|
|
62
|
+
--gainsboro-rgb: rgb(224, 224, 224);
|
|
63
|
+
|
|
64
|
+
--moody-blues: #586E75; // Console font color for light theme
|
|
65
|
+
--moody-blues-rgb: rgb(88, 110, 117);
|
|
66
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@use './colors.scss';
|
|
2
|
+
@use './theme-light.scss';
|
|
3
|
+
@use './theme-dark.scss';
|
|
4
|
+
@use './theme-print.scss';
|
|
5
|
+
|
|
6
|
+
// Universal styling goes here
|
|
7
|
+
// It means fonts, borders but no colors
|
|
8
|
+
// Set only `--bs-*` variables here.
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
// Font and typography
|
|
12
|
+
--bs-font-sans-serif: 'Verdana', sans-serif;
|
|
13
|
+
--bs-body-font-size: 14px;
|
|
14
|
+
|
|
15
|
+
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
16
|
+
--asab-monospace-font-size: 14px;
|
|
17
|
+
|
|
18
|
+
--bs-body-line-height: 1.5;
|
|
19
|
+
|
|
20
|
+
// Borders
|
|
21
|
+
--bs-border-radius: 8px;
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Specific components
|
|
26
|
+
|
|
27
|
+
.list-group {
|
|
28
|
+
--bs-list-group-bg: transparent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.dropdown-menu {
|
|
32
|
+
--bs-dropdown-border-radius: 0px; // No radius for dropdowns
|
|
33
|
+
--bs-dropdown-font-size: var(--bs-body-font-size);
|
|
34
|
+
|
|
35
|
+
--bs-dropdown-header-color: var(--bs-heading-color);
|
|
36
|
+
--bs-dropdown-link-color: var(--bs-link-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.progress-bar {
|
|
40
|
+
--bs-progress-height: 16px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.card {
|
|
44
|
+
--bs-card-bg: var(--bs-element-bg-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.table {
|
|
48
|
+
--bs-table-bg: var(--bs-body-bg);
|
|
49
|
+
thead th {
|
|
50
|
+
/*Setting table header background color*/
|
|
51
|
+
background-color: transparent;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dropdown-menu {
|
|
56
|
+
--bs-dropdown-bg: var(--bs-element-bg-color);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.input-group-text {
|
|
60
|
+
border-radius: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.react-json-view {
|
|
64
|
+
background-color: transparent !important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/*Fix the position of the monaco hover marker tooltip*/
|
|
68
|
+
.monaco-hover {
|
|
69
|
+
position: fixed;
|
|
70
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Set only `--bs-*-color` and `--bs-*-color-rgb` variables from Bootstrap 5
|
|
2
|
+
// https://getbootstrap.com/docs/5.3/customize/css-variables/
|
|
3
|
+
|
|
4
|
+
[data-bs-theme=dark] {
|
|
5
|
+
|
|
6
|
+
--bs-primary: var(--soft-sky-blue);
|
|
7
|
+
--bs-primary-rgb: var(--soft-sky-blue-rgb);
|
|
8
|
+
|
|
9
|
+
--bs-secondary: var(--lavender-mist);
|
|
10
|
+
--bs-secondary-rgb: var(--lavender-mist-rgb);
|
|
11
|
+
|
|
12
|
+
--bs-light: var(--polar-mist);
|
|
13
|
+
--bs-light-rgb: var(--polar-mist-rgb);
|
|
14
|
+
|
|
15
|
+
--bs-dark: var(--deep-space-blue);
|
|
16
|
+
--bs-dark-rgb: var(--deep-space-blue-rgb);
|
|
17
|
+
|
|
18
|
+
--bs-link-color: var(--soft-sky-blue);
|
|
19
|
+
--bs-link-color-rgb: var(--soft-sky-blue-rgb);
|
|
20
|
+
|
|
21
|
+
--bs-link-hover-color: var(--pastel-sky-blue);
|
|
22
|
+
--bs-link-hover-color-rgb: var(--pastel-sky-rgb);
|
|
23
|
+
|
|
24
|
+
--bs-code-color: var(--tropical-rainforest);
|
|
25
|
+
--bs-code-color-rgb: var(--tropical-rainforest-rgb);
|
|
26
|
+
|
|
27
|
+
--bs-body-bg: var(--deep-space-blue);
|
|
28
|
+
--bs-body-bg-rgb: var(--deep-space-blue-rgb);
|
|
29
|
+
|
|
30
|
+
--bs-body-color: var(--pastel-sky-blue);
|
|
31
|
+
--bs-body-color-rgb: var(--pastel-sky-blue-rgb);
|
|
32
|
+
|
|
33
|
+
--bs-border-color: var(--deep-ocean-blue);
|
|
34
|
+
--bs-border-color-rgb: var(--deep-ocean-blue-rgb);
|
|
35
|
+
|
|
36
|
+
--bs-input-bg-color: var(--midnight-blue);
|
|
37
|
+
--bs-input-bg-color-rgb: var(--midnight-blue);
|
|
38
|
+
|
|
39
|
+
--bs-element-bg-color: var(--nightfall-blue);
|
|
40
|
+
--bs-element-bg-color-rgb: var(--nightfall-blue);
|
|
41
|
+
|
|
42
|
+
--bs-alert-info-color: var(--deep-space-blue);
|
|
43
|
+
--bs-alert-info-color-rgb: var(--deep-space-blue-rgb);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-bs-theme=dark] {
|
|
47
|
+
.progress-bar {
|
|
48
|
+
--bs-progress-bar-color: var(--white);
|
|
49
|
+
--bs-progress-bar-bg: var(--soft-sky-blue);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.badge.bg-info {
|
|
53
|
+
--bs-badge-color: var(--deep-space-blue);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Set only `--bs-*-color` and `--bs-*-color-rgb` variables from Bootstrap 5
|
|
2
|
+
// https://getbootstrap.com/docs/5.3/customize/css-variables/
|
|
3
|
+
|
|
4
|
+
:root, [data-bs-theme=light] {
|
|
5
|
+
|
|
6
|
+
--bs-primary: var(--royal-blue);
|
|
7
|
+
--bs-primary-rgb: var(--royal-blue-rgb);
|
|
8
|
+
|
|
9
|
+
--bs-secondary: var(--lavender-mist);
|
|
10
|
+
--bs-secondary-rgb: var(--lavender-mist-rgb);
|
|
11
|
+
|
|
12
|
+
--bs-light: var(--polar-mist);
|
|
13
|
+
--bs-light-rgb: var(--polar-mist-rgb);
|
|
14
|
+
|
|
15
|
+
--bs-dark: var(--deep-space-blue);
|
|
16
|
+
--bs-dark-rgb: var(--deep-space-blue-rgb);
|
|
17
|
+
|
|
18
|
+
--bs-link-color: var(--royal-blue);
|
|
19
|
+
--bs-link-color-rgb: var(--royal-blue-rgb);
|
|
20
|
+
|
|
21
|
+
--bs-link-hover-color: var(--royal-blue);
|
|
22
|
+
--bs-link-hover-color-rgb: var(--royal-blue-rgb);
|
|
23
|
+
|
|
24
|
+
--bs-code-color: var(--teal);
|
|
25
|
+
--bs-code-color-rgb: var(--teal-rgb);
|
|
26
|
+
|
|
27
|
+
--bs-body-bg: var(--polar-mist);
|
|
28
|
+
--bs-body-bg-rgb: var(--polar-mist-rgb);
|
|
29
|
+
|
|
30
|
+
--bs-body-color: var(--black);
|
|
31
|
+
--bs-body-color-rgb: var(--black-rgb);
|
|
32
|
+
|
|
33
|
+
--bs-border-color: var(--lavender-mist);
|
|
34
|
+
--bs-border-color-rgb: var(--lavender-mist-rgb);
|
|
35
|
+
|
|
36
|
+
--bs-input-bg-color: var(--white);
|
|
37
|
+
--bs-input-bg-color-rgb: var(--white-rgb);
|
|
38
|
+
|
|
39
|
+
--bs-element-bg-color: var(--white);
|
|
40
|
+
--bs-element-bg-color-rgb: var(--white-rgb);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:root, [data-bs-theme=light] .progress-bar {
|
|
44
|
+
--bs-progress-bar-color: var(--white);
|
|
45
|
+
--bs-progress-bar-bg: var(--royal-blue);
|
|
46
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
@page print-portrait {
|
|
2
|
+
size: portrait;
|
|
3
|
+
}
|
|
4
|
+
@media print {
|
|
5
|
+
@page {
|
|
6
|
+
size: A4 landscape;
|
|
7
|
+
margin: 2cm 1cm 1.5cm;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.print-portrait {
|
|
11
|
+
page: print-portrait;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Dont display page scrollbar in chrome
|
|
15
|
+
::-webkit-scrollbar {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Needed for background color of status indicator widget */
|
|
20
|
+
html {
|
|
21
|
+
-webkit-print-color-adjust: exact;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body {
|
|
25
|
+
position: relative !important;
|
|
26
|
+
height: auto;
|
|
27
|
+
background: none !important;
|
|
28
|
+
|
|
29
|
+
--bs-primary: var(--royal-blue);
|
|
30
|
+
--bs-primary-rgb: var(--royal-blue-rgb);
|
|
31
|
+
|
|
32
|
+
--bs-secondary: var(--lavender-mist);
|
|
33
|
+
--bs-secondary-rgb: var(--lavender-mist-rgb);
|
|
34
|
+
|
|
35
|
+
--bs-light: var(--polar-mist);
|
|
36
|
+
--bs-light-rgb: var(--polar-mist-rgb);
|
|
37
|
+
|
|
38
|
+
--bs-dark: var(--deep-space-blue);
|
|
39
|
+
--bs-dark-rgb: var(--deep-space-blue-rgb);
|
|
40
|
+
|
|
41
|
+
--bs-link-color: var(--royal-blue);
|
|
42
|
+
--bs-link-color-rgb: var(--royal-blue-rgb);
|
|
43
|
+
|
|
44
|
+
--bs-link-hover-color: var(--royal-blue);
|
|
45
|
+
--bs-link-hover-color-rgb: var(--royal-blue-rgb);
|
|
46
|
+
|
|
47
|
+
--bs-code-color: var(--teal);
|
|
48
|
+
--bs-code-color-rgb: var(--teal-rgb);
|
|
49
|
+
|
|
50
|
+
--bs-body-bg: var(--polar-mist);
|
|
51
|
+
--bs-body-bg-rgb: var(--polar-mist-rgb);
|
|
52
|
+
|
|
53
|
+
--bs-body-color: var(--black);
|
|
54
|
+
--bs-body-color-rgb: var(--black-rgb);
|
|
55
|
+
|
|
56
|
+
--bs-border-color: var(--lavender-mist);
|
|
57
|
+
--bs-border-color-rgb: var(--lavender-mist-rgb);
|
|
58
|
+
|
|
59
|
+
--bs-input-bg-color: var(--white);
|
|
60
|
+
--bs-input-bg-color-rgb: var(--white-rgb);
|
|
61
|
+
|
|
62
|
+
--bs-element-bg-color: var(--white);
|
|
63
|
+
--bs-element-bg-color-rgb: var(--white-rgb);
|
|
64
|
+
|
|
65
|
+
--bs-table-color: var(--bs-dark);
|
|
66
|
+
|
|
67
|
+
&.print-portrait {
|
|
68
|
+
width: 900px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#app {
|
|
73
|
+
height: 100%;
|
|
74
|
+
overflow: visible;
|
|
75
|
+
display: block;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
button, .btn-sm, .btn .btn-primary, .btn-primary {
|
|
79
|
+
display: none !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.card {
|
|
83
|
+
box-shadow: none !important;
|
|
84
|
+
border: 0 !important;
|
|
85
|
+
.card-header {
|
|
86
|
+
background-color: var(--white);
|
|
87
|
+
&.print-card-header {
|
|
88
|
+
min-height: auto;
|
|
89
|
+
.flex-fill {
|
|
90
|
+
height: auto;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
i:not(.text-warning) {
|
|
95
|
+
display: none !important;
|
|
96
|
+
}
|
|
97
|
+
h3 {
|
|
98
|
+
font-size: 32px !important;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
.card-body {
|
|
102
|
+
color: inherit !important;
|
|
103
|
+
}
|
|
104
|
+
.card-footer, .card-footer-flex, .input-group {
|
|
105
|
+
display: none !important;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.datatable2 {
|
|
110
|
+
margin-bottom: 0;
|
|
111
|
+
table-layout: auto;
|
|
112
|
+
td, th {
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
padding: .25rem;
|
|
115
|
+
}
|
|
116
|
+
td {
|
|
117
|
+
white-space: normal;
|
|
118
|
+
& > * {
|
|
119
|
+
white-space: normal;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
tr {
|
|
123
|
+
page-break-inside: avoid;
|
|
124
|
+
}
|
|
125
|
+
tfoot {
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.text-muted {
|
|
131
|
+
color: var(--bs-gray-700) !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.container {
|
|
135
|
+
max-width: 100% !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.progress-bar {
|
|
139
|
+
display: none !important;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
table, .table {
|
|
143
|
+
--bs-table-color: var(--bs-dark);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.react-grid-item {
|
|
147
|
+
.recharts-tooltip-wrapper {
|
|
148
|
+
display: none !important;
|
|
149
|
+
}
|
|
150
|
+
.table-widget, .value-widget {
|
|
151
|
+
display: contents !important;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
.reports-container {
|
|
157
|
+
padding-top: 0 !important;
|
|
158
|
+
.react-grid-layout {
|
|
159
|
+
height: unset !important;
|
|
160
|
+
display: table;
|
|
161
|
+
text-align: center;
|
|
162
|
+
.react-grid-item {
|
|
163
|
+
display: inline-block;
|
|
164
|
+
position: unset !important;
|
|
165
|
+
transform: unset !important;
|
|
166
|
+
text-align: initial;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.dashboard-container {
|
|
172
|
+
&.display-print {
|
|
173
|
+
.react-grid-layout {
|
|
174
|
+
position: static !important;
|
|
175
|
+
height: initial !important;
|
|
176
|
+
.react-grid-item {
|
|
177
|
+
display: block !important; /*avoid widgets breaking on transition between pages*/
|
|
178
|
+
margin: 0 auto 20px;
|
|
179
|
+
position: static !important;
|
|
180
|
+
|
|
181
|
+
height: initial !important; /* Alternatively, set "height: initial !important;" */
|
|
182
|
+
width: initial !important; /* Alternatively, set "width: initial !important;" */
|
|
183
|
+
|
|
184
|
+
break-inside: avoid;
|
|
185
|
+
page-break-inside: avoid; /*avoid widgets breaking on transition between pages*/
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
.recharts-responsive-container {
|
|
189
|
+
.recharts-wrapper {
|
|
190
|
+
width: 100% !important;
|
|
191
|
+
.recharts-surface, .recharts-legend-wrapper {
|
|
192
|
+
width: 100% !important;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This is the styling entry point
|
|
2
|
+
|
|
3
|
+
@use './constants';
|
|
4
|
+
|
|
5
|
+
@use './components/html';
|
|
6
|
+
@use './components/card';
|
|
7
|
+
@use './components/alert';
|
|
8
|
+
@use './components/button.scss';
|
|
9
|
+
@use './components/form';
|
|
10
|
+
|
|
11
|
+
// Import default bootstrap styles
|
|
12
|
+
@import 'bootstrap/dist/css/bootstrap.min.css';
|
|
13
|
+
|
|
14
|
+
// Bootstrap icons import
|
|
15
|
+
@import 'bootstrap-icons/font/bootstrap-icons.min.css';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ErrorHandler = ErrorHandler;
|
|
7
|
+
var _reactI18next = require("react-i18next");
|
|
8
|
+
/*
|
|
9
|
+
- Component responsible for handling and displaying error messages.
|
|
10
|
+
- The 'error' prop is an object that contains the error message and any which contains a dictionary with variables, if any, in the error message.
|
|
11
|
+
- Using "escapeValue: false" leaves the characters which would be normally escaped by i18n library in original form.
|
|
12
|
+
In this case its mostly forward slashes provided within the error.
|
|
13
|
+
More info can be found: https://www.i18next.com/translation-function/interpolation.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function ErrorHandler(_ref) {
|
|
17
|
+
var _ref$error = _ref.error,
|
|
18
|
+
error = _ref$error === void 0 ? {} : _ref$error;
|
|
19
|
+
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
20
|
+
t = _useTranslation.t;
|
|
21
|
+
if (error.error_dict) {
|
|
22
|
+
error.error_dict['interpolation'] = {
|
|
23
|
+
escapeValue: false
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return t(error.error, error.error_dict);
|
|
27
|
+
}
|