@schukai/monster 3.104.0 → 3.104.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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.104.1] - 2025-02-04
6
+
7
+ ### Bug Fixes
8
+
9
+ - remove debug information and reset save button to state-button
10
+
11
+
12
+
5
13
  ## [3.104.0] - 2025-02-04
6
14
 
7
15
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@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.104.0"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@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.104.1"}
@@ -32,7 +32,7 @@ import { Datasource } from "./datasource.mjs";
32
32
  import { Rest as RestDatasource } from "./datasource/rest.mjs";
33
33
  import { BadgeStyleSheet } from "../stylesheet/badge.mjs";
34
34
  import { SaveButtonStyleSheet } from "./stylesheet/save-button.mjs";
35
- import "../form/message-state-button.mjs";
35
+ import "../form/state-button.mjs";
36
36
 
37
37
  import {
38
38
  handleDataSourceChanges,
@@ -315,13 +315,12 @@ function getTranslations() {
315
315
  * @throws {Error} the selector must match exactly one element
316
316
  */
317
317
  function initControlReferences() {
318
-
319
318
  if (!this.shadowRoot) {
320
319
  throw new Error("no shadow-root is defined");
321
320
  }
322
321
 
323
322
  this[stateButtonElementSymbol] = this.shadowRoot.querySelector(
324
- "[data-monster-role=save-button]",
323
+ "[data-monster-role=state-button]",
325
324
  );
326
325
 
327
326
  this[badgeElementSymbol] = this.shadowRoot.querySelector(
@@ -334,9 +333,9 @@ function initControlReferences() {
334
333
  changed: new State(
335
334
  "changed",
336
335
  '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-arrow-up" viewBox="0 0 16 16">' +
337
- '<path fill-rule="evenodd" d="M7.646 5.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 6.707V10.5a.5.5 0 0 1-1 0V6.707L6.354 7.854a.5.5 0 1 1-.708-.708z"/>' +
338
- '<path d="M4.406 3.342A5.53 5.53 0 0 1 8 2c2.69 0 4.923 2 5.166 4.579C14.758 6.804 16 8.137 16 9.773 16 11.569 14.502 13 12.687 13H3.781C1.708 13 0 11.366 0 9.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383m.653.757c-.757.653-1.153 1.44-1.153 2.056v.448l-.445.049C2.064 6.805 1 7.952 1 9.318 1 10.785 2.23 12 3.781 12h8.906C13.98 12 15 10.988 15 9.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 4.825 10.328 3 8 3a4.53 4.53 0 0 0-2.941 1.1z"/>' +
339
- "</svg>",
336
+ '<path fill-rule="evenodd" d="M7.646 5.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 6.707V10.5a.5.5 0 0 1-1 0V6.707L6.354 7.854a.5.5 0 1 1-.708-.708z"/>' +
337
+ '<path d="M4.406 3.342A5.53 5.53 0 0 1 8 2c2.69 0 4.923 2 5.166 4.579C14.758 6.804 16 8.137 16 9.773 16 11.569 14.502 13 12.687 13H3.781C1.708 13 0 11.366 0 9.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383m.653.757c-.757.653-1.153 1.44-1.153 2.056v.448l-.445.049C2.064 6.805 1 7.952 1 9.318 1 10.785 2.23 12 3.781 12h8.906C13.98 12 15 10.988 15 9.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 4.825 10.328 3 8 3a4.53 4.53 0 0 0-2.941 1.1z"/>' +
338
+ "</svg>",
340
339
  ),
341
340
  };
342
341
 
@@ -347,9 +346,6 @@ function initControlReferences() {
347
346
  "labels.button",
348
347
  this.getOption("labels.button"),
349
348
  );
350
-
351
- console.log(this[stateButtonElementSymbol])
352
-
353
349
  });
354
350
  }
355
351
 
@@ -401,16 +397,14 @@ function updateOptionsFromArguments(options) {
401
397
  function getTemplate() {
402
398
  // language=HTML
403
399
  return `
404
- <div data-monster-role="control" part="control"
405
- data-monster-attributes="disabled path:disabled | if:true">
406
- <monster-message-state-button part="button"
407
- data-monster-role="save-button"
408
- ></monster-message-state-button>
409
- <div data-monster-attributes="disabled path:disabled | if:true, class path:classes.badge"
410
- data-monster-role="badge"
411
- data-monster-replace="path:changes"></div>
412
- </div>
413
- `;
400
+ <div data-monster-role="control" part="control"
401
+ data-monster-attributes="disabled path:disabled | if:true">
402
+ <monster-state-button data-monster-role="state-button">save</monster-state-button>
403
+ <div data-monster-attributes="disabled path:disabled | if:true, class path:classes.badge"
404
+ data-monster-role="badge"
405
+ data-monster-replace="path:changes"></div>
406
+ </div>
407
+ `;
414
408
  }
415
409
 
416
- registerCustomElement(SaveButton);
410
+ registerCustomElement(SaveButton);
@@ -69,9 +69,6 @@ class MessageStateButton extends Popper {
69
69
  * @throws {TypeError} value is not an instance
70
70
  */
71
71
  setState(state, timeout) {
72
-
73
- console.log(this[buttonElementSymbol]);
74
-
75
72
  return this[buttonElementSymbol].setState(state, timeout);
76
73
  }
77
74