@schukai/monster 3.85.1 → 3.86.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -1
  3. package/source/components/content/copy.mjs +1 -3
  4. package/source/components/datatable/columnbar.mjs +15 -36
  5. package/source/components/datatable/datasource/dom.mjs +1 -0
  6. package/source/components/datatable/datatable/header.mjs +4 -2
  7. package/source/components/datatable/datatable.mjs +758 -765
  8. package/source/components/datatable/style/datatable.pcss +41 -9
  9. package/source/components/datatable/stylesheet/datatable.mjs +7 -14
  10. package/source/components/datatable/util.mjs +1 -0
  11. package/source/components/form/button-bar.mjs +3 -36
  12. package/source/components/form/button.mjs +0 -1
  13. package/source/components/form/style/button-bar.pcss +3 -2
  14. package/source/components/form/style/button.pcss +6 -1
  15. package/source/components/form/style/confirm-button.pcss +6 -1
  16. package/source/components/form/style/message-state-button.pcss +6 -2
  17. package/source/components/form/style/popper-button.pcss +7 -1
  18. package/source/components/form/style/select.pcss +2 -2
  19. package/source/components/form/style/state-button.pcss +4 -1
  20. package/source/components/form/stylesheet/button-bar.mjs +7 -14
  21. package/source/components/form/stylesheet/button.mjs +7 -14
  22. package/source/components/form/stylesheet/confirm-button.mjs +7 -14
  23. package/source/components/form/stylesheet/message-state-button.mjs +7 -14
  24. package/source/components/form/stylesheet/popper-button.mjs +7 -14
  25. package/source/components/form/stylesheet/select.mjs +7 -14
  26. package/source/components/form/stylesheet/state-button.mjs +7 -14
  27. package/source/components/layout/stylesheet/panel.mjs +7 -14
  28. package/source/dom/ready.mjs +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
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
+
16
+ ## [3.85.2] - 2024-11-12
17
+
18
+ ### Bug Fixes
19
+
20
+ - update some issues and documentaion [#260](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/260)
21
+ ### Changes
22
+
23
+ - code tidy
24
+
25
+
26
+
5
27
  ## [3.85.1] - 2024-11-12
6
28
 
7
29
  ### 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.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.86.0"}
@@ -21,14 +21,12 @@ import {
21
21
  ATTRIBUTE_ERRORMESSAGE,
22
22
  ATTRIBUTE_ROLE,
23
23
  } from "../../dom/constants.mjs";
24
- import {CustomElement, getSlottedElements} from "../../dom/customelement.mjs";
24
+ import {CustomElement} from "../../dom/customelement.mjs";
25
25
  import {
26
26
  assembleMethodSymbol,
27
27
  registerCustomElement,
28
28
  } from "../../dom/customelement.mjs";
29
29
  import {getDocument} from "../../dom/util.mjs";
30
- import {isString} from "../../types/is.mjs";
31
- import {validateString} from "../../types/validate.mjs";
32
30
  import {STYLE_DISPLAY_MODE_BLOCK} from "../form/constants.mjs";
33
31
  import {CopyStyleSheet} from "./stylesheet/copy.mjs";
34
32
  import {fireCustomEvent} from "../../dom/events.mjs";
@@ -55,43 +55,17 @@ const dotsContainerElementSymbol = Symbol("dotsContainerElement");
55
55
  */
56
56
  const popperInstanceSymbol = Symbol("popperInstance");
57
57
 
58
+
58
59
  /**
59
- * The ColumnBar component is used to show and configure the columns of a datatable.
60
- *
61
- * <img src="./images/column-bar.png">
62
- *
63
- * You can create this control either by specifying the HTML tag <monster-column-bar />` directly in the HTML or using
64
- * Javascript via the `document.createElement('monster-column-bar');` method.
65
- *
66
- * ```html
67
- * <monster-column-bar></monster-column-bar>
68
- * ```
60
+ * A column bar for a datatable
69
61
  *
70
- * Or you can create this CustomControl directly in Javascript:
62
+ * @fragments /fragments/components/datatable/datatable/
71
63
  *
72
- * ```js
73
- * import '@schukai/monster/components/datatable/column-bar.mjs';
74
- * document.createElement('monster-column-bar');
75
- * ```
76
- *
77
- * The Body should have a class "hidden" to ensure that the styles are applied correctly.
78
- *
79
- * ```css
80
- * body.hidden {
81
- * visibility: hidden;
82
- * }
83
- * ```
84
- *
85
- * @startuml column-bar.png
86
- * skinparam monochrome true
87
- * skinparam shadowing false
88
- * HTMLElement <|-- CustomElement
89
- * CustomElement <|-- ColumnBar
90
- * @enduml
64
+ * @example /examples/components/datatable/empty
91
65
  *
92
66
  * @copyright schukai GmbH
93
- * @summary A data set
94
- */
67
+ * @summary The ColumnBar component is used to show and configure the columns of a datatable.
68
+ **/
95
69
  class ColumnBar extends CustomElement {
96
70
  /**
97
71
  * This method is called by the `instanceof` operator.
@@ -137,7 +111,7 @@ class ColumnBar extends CustomElement {
137
111
 
138
112
  /**
139
113
  *
140
- * @return {Monster.Components.Form.Form}
114
+ * @return {void}
141
115
  */
142
116
  [assembleMethodSymbol]() {
143
117
  super[assembleMethodSymbol]();
@@ -147,7 +121,7 @@ class ColumnBar extends CustomElement {
147
121
  }
148
122
 
149
123
  /**
150
- * @return {Array<ColumnBarStyleSheet>}
124
+ * @return {CSSStyleSheet[]}
151
125
  */
152
126
  static getCSSStyleSheet() {
153
127
  return [ColumnBarStyleSheet];
@@ -156,7 +130,7 @@ class ColumnBar extends CustomElement {
156
130
 
157
131
  /**
158
132
  * @private
159
- * @return {Monster.Components.Datatable.Form}
133
+ * @return {ColumnBar}
160
134
  */
161
135
  function initControlReferences() {
162
136
  if (!this.shadowRoot) {
@@ -166,12 +140,15 @@ function initControlReferences() {
166
140
  this[settingsButtonElementSymbol] = this.shadowRoot.querySelector(
167
141
  "[data-monster-role=settings-button]",
168
142
  );
143
+
169
144
  this[settingsLayerElementSymbol] = this.shadowRoot.querySelector(
170
145
  "[data-monster-role=settings-layer]",
171
146
  );
147
+
172
148
  this[dotsContainerElementSymbol] = this.shadowRoot.querySelector(
173
149
  "[data-monster-role=dots]",
174
150
  );
151
+
175
152
  return this;
176
153
  }
177
154
 
@@ -199,6 +176,7 @@ function initEventHandler() {
199
176
  );
200
177
 
201
178
  self[dotsContainerElementSymbol].addEventListener("click", function (event) {
179
+
202
180
  const element = findTargetElementFromEvent(
203
181
  event,
204
182
  "data-monster-role",
@@ -220,6 +198,7 @@ function initEventHandler() {
220
198
  });
221
199
 
222
200
  self[settingsButtonEventHandlerSymbol] = (event) => {
201
+
223
202
  const clickTarget = event.composedPath()?.[0];
224
203
  if (
225
204
  self[settingsLayerElementSymbol] === clickTarget ||
@@ -227,7 +206,7 @@ function initEventHandler() {
227
206
  ) {
228
207
  return;
229
208
  }
230
- self[settingsLayerElementSymbol].classList.remove("visible");
209
+
231
210
  document.body.removeEventListener(
232
211
  "click",
233
212
  self[settingsButtonEventHandlerSymbol],
@@ -143,6 +143,7 @@ function initEventHandler() {
143
143
  function updateDataSource() {
144
144
  let data = null;
145
145
  getSlottedElements.call(this).forEach((element) => {
146
+
146
147
  if (!(element instanceof HTMLScriptElement)) {
147
148
  return;
148
149
  }
@@ -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);