@schukai/monster 3.116.1 → 3.117.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,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.117.0] - 2025-04-23
6
+
7
+ ### Add Features
8
+
9
+ - **login:** send success event [#305](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/305)
10
+
11
+
12
+
5
13
  ## [3.116.1] - 2025-04-17
6
14
 
7
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8","buffer":"^6.0.3"},"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.116.1"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8","buffer":"^6.0.3"},"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.117.0"}
@@ -129,6 +129,9 @@ const digitsCollapseSymbol = Symbol("digitsCollapse");
129
129
  * @since 3.113.0
130
130
  * @copyright schukai GmbH
131
131
  * @summary A beautiful Login that can make your life easier and also looks good. It supports a lot of features.
132
+ *
133
+ * @fires login-success
134
+ * @fires redirect-to-first-success-url
132
135
  */
133
136
  class Login extends CustomElement {
134
137
  /**
@@ -352,10 +355,18 @@ class Login extends CustomElement {
352
355
  * @returns {Login}
353
356
  */
354
357
  openLoggedIn() {
355
- this[loggedInCollapseSymbol].open();
358
+
359
+ fireCustomEvent(self, "login-success", {
360
+ self,
361
+ });
356
362
 
357
363
  if (this.getOption("features.redirectToFirstSuccessUrl")) {
358
364
  setTimeout(() => {
365
+
366
+ fireCustomEvent(self, "redirect-to-first-success-url", {
367
+ self,
368
+ });
369
+
359
370
  const successUrl = this.getOption("successUrls");
360
371
  if (successUrl.length > 0) {
361
372
  const success = successUrl[0].url;
@@ -368,6 +379,8 @@ class Login extends CustomElement {
368
379
  return;
369
380
  }
370
381
 
382
+ this[loggedInCollapseSymbol].open();
383
+
371
384
  return this;
372
385
  }
373
386