@schukai/monster 3.85.2 → 3.86.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/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.86.0] - 2024-11-13
6
+
7
+ ### Add Features
8
+
9
+ - new classes for datatables and some css updates [#260](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/260)
10
+ ### Bug Fixes
11
+
12
+ - some layout issues and add labels to small datatable [#260](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/260)
13
+
14
+
15
+
5
16
  ## [3.85.2] - 2024-11-12
6
17
 
7
18
  ### Bug Fixes
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.12","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.85.2"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.12","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.86.0"}
@@ -56,7 +56,7 @@ const DIRECTION_NONE = "";
56
56
  * The Header component is a basic class for the datatable component.
57
57
  *
58
58
  * @copyright schukai GmbH
59
- * @summary A datatable
59
+ * @summary The Header component is a basic class for the datatable component.
60
60
  */
61
61
  class Header extends Base {
62
62
  constructor() {
@@ -106,6 +106,8 @@ class Header extends Base {
106
106
  };
107
107
  }
108
108
 
109
+ /**
110
+ */
109
111
  changeDirection() {
110
112
  let direction = this.getInternal("direction");
111
113
  if (direction === DIRECTION_ASC) {
@@ -120,7 +122,7 @@ class Header extends Base {
120
122
 
121
123
  /**
122
124
  *
123
- * @param direction
125
+ * @param {string} direction
124
126
  */
125
127
  setDirection(direction) {
126
128
  this.setInternal("direction", direction);
@@ -118,6 +118,7 @@ const columnBarElementSymbol = Symbol("columnBarElement");
118
118
  * @example /examples/components/datatable/alignment
119
119
  * @example /examples/components/datatable/row-mode
120
120
  * @example /examples/components/datatable/grid-template
121
+ * @example /examples/components/datatable/overview-class
121
122
  *
122
123
  * @copyright schukai GmbH
123
124
  * @summary A beautiful and highly customizable data table. It can be used to display data from a data source.
@@ -536,7 +537,7 @@ function updateColumnBar() {
536
537
 
537
538
  const columns = [];
538
539
  for (const header of this.getOption("headers")) {
539
- const mode = header.getInternal("mode");
540
+ const mode = header.getInternal("mode");
540
541
 
541
542
  if (mode === ATTRIBUTE_DATATABLE_MODE_FIXED) {
542
543
  continue;
@@ -12,6 +12,7 @@
12
12
 
13
13
  @import "../../style/mixin/button.pcss";
14
14
  @import "../../style/mixin/typography.pcss";
15
+ @import "../../style/typography.pcss";
15
16
  @import "../../style/mixin/hover.pcss";
16
17
  @import "../../style/mixin/media.pcss";
17
18
  @import "../../style/theme.pcss";
@@ -33,9 +34,11 @@
33
34
  }
34
35
 
35
36
  [data-monster-role="table-container"] {
36
- display: block;
37
+ display: flex;
38
+ flex-direction: column;
37
39
  width: 100%;
38
40
  overflow-x: auto;
41
+ overflow-y: visible;
39
42
  padding: 20px;
40
43
  box-sizing: border-box;
41
44
  min-width: fit-content;
@@ -95,10 +98,32 @@
95
98
  &.center {
96
99
  justify-content: center;
97
100
  }
101
+
102
+ &.monospace {
103
+ font-family: var(--monster-font-family-monospace);
104
+ }
105
+
106
+ &.ellipsis {
107
+ overflow: hidden;
108
+ white-space: nowrap;
109
+ text-overflow: ellipsis;
110
+ }
111
+
112
+ &.wrap {
113
+ white-space: normal;
114
+ word-wrap: break-word;
115
+ }
98
116
 
99
- /* &.hidden, &[data-monster-mode=hidden] {
100
- display: none;
101
- }*/
117
+ &.auto {
118
+ overflow: auto;
119
+ white-space: nowrap;
120
+ scrollbar-width: thin;
121
+ scrollbar-color: var(--monster-color-primary-1) var(--monster-bg-color-primary-1);
122
+ }
123
+
124
+ &.visible {
125
+ overflow: visible;
126
+ }
102
127
 
103
128
  & input[type=checkbox] {
104
129
  accent-color: var(--monster-bg-color-primary-1);
@@ -107,6 +132,7 @@
107
132
 
108
133
  @for $i from 0 to 500 {
109
134
  &:has([data-monster-insert-reference$=row-$(i)]:hover) [data-monster-insert-reference$=row-$(i)
135
+
110
136
  ] {
111
137
  color: var(--monster-theme-control-hover-color);
112
138
  background-color: var(--monster-theme-control-hover-bg-color);
@@ -204,6 +230,11 @@ monster-state[data-monster-role=empty-without-action]::part(action) {
204
230
 
205
231
  @mixin viewport-7 {
206
232
 
233
+
234
+ [data-monster-role="datatable-headers"] {
235
+ display: none;
236
+ }
237
+
207
238
  [data-monster-role="table-container"] {
208
239
 
209
240
  & .bar {
@@ -213,6 +244,12 @@ monster-state[data-monster-role=empty-without-action]::part(action) {
213
244
  gap: 0.1rem;
214
245
  }
215
246
 
247
+ & [data-monster-head]:before {
248
+ font-weight: bold;
249
+ margin-right: 10px;
250
+ content: attr(data-monster-head);
251
+ }
252
+
216
253
  @for $i from 0 to 500 {
217
254
  &:has([data-monster-insert-reference=row-$(i)]:hover) [data-monster-insert-reference=row-$(i)
218
255
 
@@ -221,17 +258,13 @@ monster-state[data-monster-role=empty-without-action]::part(action) {
221
258
  box-sizing: border-box;
222
259
  }
223
260
  }
224
-
225
-
226
261
  }
227
262
 
228
-
229
263
  ::slotted(.monster-button-group) {
230
264
  display: flex;
231
265
  flex-direction: column !important;
232
266
  }
233
267
 
234
-
235
268
  }
236
269
 
237
270
 
@@ -241,4 +274,3 @@ monster-state[data-monster-role=empty-without-action]::part(action) {
241
274
 
242
275
 
243
276
 
244
-