@descope/flow-components 3.9.0 → 3.9.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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.9.0",
8
+ "buildVersion": "3.9.1",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.9.0",
8
+ "buildVersion": "3.9.1",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -90031,6 +90031,15 @@ function requireIndex_cjs () {
90031
90031
 
90032
90032
  this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');
90033
90033
  this.tooltip = this.shadowRoot.querySelector('vaadin-tooltip');
90034
+
90035
+ this.anchored = this.shadowRoot.querySelector('descope-anchored');
90036
+ }
90037
+
90038
+ // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.
90039
+ // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.
90040
+ #syncComponentState() {
90041
+ const hasHidden = this.anchored?.classList?.contains('hidden');
90042
+ this.classList.toggle('hidden', hasHidden);
90034
90043
  }
90035
90044
 
90036
90045
  static get observedAttributes() {
@@ -90125,6 +90134,8 @@ function requireIndex_cjs () {
90125
90134
  );
90126
90135
  this.#setTooltipTarget();
90127
90136
 
90137
+ this.#syncComponentState();
90138
+
90128
90139
  setTimeout(() => this.#onOverlayReady());
90129
90140
  }
90130
90141
 
@@ -91433,6 +91444,8 @@ function requireIndex_cjs () {
91433
91444
  this.attachmentSlot = this.shadowRoot.querySelector(
91434
91445
  'slot[name="attachment"]',
91435
91446
  );
91447
+
91448
+ this.anchored = this.shadowRoot.querySelector('descope-anchored');
91436
91449
  }
91437
91450
 
91438
91451
  get #attachment() {
@@ -91453,6 +91466,8 @@ function requireIndex_cjs () {
91453
91466
  init() {
91454
91467
  super.init?.();
91455
91468
 
91469
+ this.#syncComponentState();
91470
+
91456
91471
  injectStyle(
91457
91472
  `
91458
91473
  :host {
@@ -91496,6 +91511,13 @@ function requireIndex_cjs () {
91496
91511
  window.requestAnimationFrame(() => this.#setVisibility());
91497
91512
  }
91498
91513
 
91514
+ // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.
91515
+ // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.
91516
+ #syncComponentState() {
91517
+ const hasHidden = this.anchored?.classList?.contains('hidden');
91518
+ this.classList.toggle('hidden', hasHidden);
91519
+ }
91520
+
91499
91521
  #syncAvailableSizeAttr() {
91500
91522
  const anchor = this.defaultSlot?.assignedElements()?.[0];
91501
91523
 
@@ -106459,6 +106481,8 @@ descope-enriched-text {
106459
106481
  `;
106460
106482
 
106461
106483
  this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');
106484
+
106485
+ this.#syncComponentState();
106462
106486
  }
106463
106487
 
106464
106488
  init() {
@@ -106513,6 +106537,13 @@ descope-enriched-text {
106513
106537
  this.#syncAnchor();
106514
106538
  }
106515
106539
 
106540
+ // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.
106541
+ // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.
106542
+ #syncComponentState() {
106543
+ const hasHidden = this.#anchor.classList.contains('hidden');
106544
+ this.classList.toggle('hidden', hasHidden);
106545
+ }
106546
+
106516
106547
  #syncAnchor() {
106517
106548
  this.#onAnchorChanged();
106518
106549
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -97,7 +97,7 @@
97
97
  "webpack-subresource-integrity": "5.2.0-rc.1"
98
98
  },
99
99
  "dependencies": {
100
- "@descope/web-components-ui": "3.9.0"
100
+ "@descope/web-components-ui": "3.9.1"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "react": ">= 18"