@descope/flow-components 3.21.1 → 3.22.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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.21.1",
8
+ "buildVersion": "3.22.0",
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.21.1",
8
+ "buildVersion": "3.22.0",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -90614,7 +90614,11 @@ function requireIndex_cjs () {
90614
90614
  return { label: authType.toUpperCase(), configured: true };
90615
90615
  };
90616
90616
 
90617
- const itemRenderer$2 = ({ id, name, isDefault, link, authType }, _, ref) => {
90617
+ const itemRenderer$2 = (
90618
+ { id, name, isDefault, link, authType, authOnly },
90619
+ _,
90620
+ ref,
90621
+ ) => {
90618
90622
  const deleteAction =
90619
90623
  !isDefault && ref?.allowDelete
90620
90624
  ? `<span
@@ -90637,9 +90641,14 @@ function requireIndex_cjs () {
90637
90641
  : '';
90638
90642
 
90639
90643
  const { label: authTypeLabel, configured } = resolveAuthType(authType);
90644
+ // Sits next to the auth type because it says what the connection is FOR, the same kind of fact.
90645
+ const authOnlyBadge = authOnly
90646
+ ? `<descope-badge class="auth-only-badge" size="xs"><span class="auth-only-text"></span></descope-badge>`
90647
+ : '';
90640
90648
  const authTypeRow = configured
90641
90649
  ? `<div class="auth-type-row">
90642
90650
  <descope-badge class="auth-type-badge" size="xs"></descope-badge>
90651
+ ${authOnlyBadge}
90643
90652
  </div>`
90644
90653
  : `<div class="auth-type-row">
90645
90654
  <descope-text
@@ -90647,6 +90656,7 @@ function requireIndex_cjs () {
90647
90656
  variant="body2"
90648
90657
  mode="secondary"
90649
90658
  >${ref?.notConfiguredLabel}</descope-text>
90659
+ ${authOnlyBadge}
90650
90660
  </div>`;
90651
90661
 
90652
90662
  const template = document.createElement('template');
@@ -90691,6 +90701,9 @@ function requireIndex_cjs () {
90691
90701
 
90692
90702
  const authTypeBadge = template.content.querySelector('.auth-type-badge');
90693
90703
  if (authTypeBadge) authTypeBadge.textContent = authTypeLabel;
90704
+
90705
+ const authOnlyEl = template.content.querySelector('.auth-only-text');
90706
+ if (authOnlyEl) authOnlyEl.textContent = ref?.authOnlyLabel;
90694
90707
  return template;
90695
90708
  };
90696
90709
 
@@ -90815,6 +90828,28 @@ function requireIndex_cjs () {
90815
90828
  .auth-type-row {
90816
90829
  display: flex;
90817
90830
  align-items: center;
90831
+ min-width: 0;
90832
+ }
90833
+
90834
+ /* The auth type is short and fixed, so it keeps its size and the consumer-supplied label is
90835
+ the one that gives way. */
90836
+ .auth-type-badge {
90837
+ flex-shrink: 0;
90838
+ }
90839
+
90840
+ /* The label is consumer-supplied and localized, so it can be far longer than the row. It
90841
+ shrinks to whatever the row leaves it and ellipsises only then, rather than being held to a
90842
+ fixed width that would truncate it while space is still going spare. */
90843
+ .auth-only-badge {
90844
+ min-width: 0;
90845
+ flex-shrink: 1;
90846
+ }
90847
+
90848
+ .auth-only-text {
90849
+ display: block;
90850
+ overflow: hidden;
90851
+ text-overflow: ellipsis;
90852
+ white-space: nowrap;
90818
90853
  }
90819
90854
 
90820
90855
  .action {
@@ -90862,6 +90897,10 @@ function requireIndex_cjs () {
90862
90897
  return this.getAttribute('configure-tooltip-label') ?? '';
90863
90898
  }
90864
90899
 
90900
+ get authOnlyLabel() {
90901
+ return this.getAttribute('auth-only-label') || 'Authentication only';
90902
+ }
90903
+
90865
90904
  init() {
90866
90905
  super.init?.();
90867
90906
 
@@ -90983,6 +91022,10 @@ function requireIndex_cjs () {
90983
91022
  selector: () => '.action',
90984
91023
  property: 'gap',
90985
91024
  },
91025
+ authTypeRowGap: {
91026
+ selector: () => '.auth-type-row',
91027
+ property: 'gap',
91028
+ },
90986
91029
  unconfiguredAuthTypeTextColor: {
90987
91030
  selector: () => '[not-configured]',
90988
91031
  property: TextClass.cssVarList.textColor,
@@ -91114,6 +91157,7 @@ function requireIndex_cjs () {
91114
91157
  'not-configured-label',
91115
91158
  'delete-tooltip-label',
91116
91159
  'configure-tooltip-label',
91160
+ 'auth-only-label',
91117
91161
  ],
91118
91162
  }),
91119
91163
  componentNameValidationMixin$1,
@@ -91129,6 +91173,8 @@ function requireIndex_cjs () {
91129
91173
  [vars$P.headerListGap]: globalRefs$s.spacing.md,
91130
91174
  [vars$P.itemContentGap]: globalRefs$s.spacing.md,
91131
91175
  [vars$P.actionGap]: globalRefs$s.spacing.sm,
91176
+ // keeps the authentication-only badge off the auth-type badge beside it
91177
+ [vars$P.authTypeRowGap]: globalRefs$s.spacing.sm,
91132
91178
  [vars$P.unconfiguredAuthTypeTextColor]: globalRefs$s.colors.surface.dark,
91133
91179
  [vars$P.unconfiguredAuthTypeTextFontStyle]: 'italic',
91134
91180
  [vars$P.buttonMaxWidth]: '50%',
package/dist/index.d.ts CHANGED
@@ -844,6 +844,7 @@ type SsoConfiguration = {
844
844
  isDefault?: boolean;
845
845
  link?: string;
846
846
  authType?: string;
847
+ authOnly?: boolean;
847
848
  };
848
849
  type Props$n = {
849
850
  label?: string;
@@ -854,6 +855,7 @@ type Props$n = {
854
855
  'allow-configure'?: boolean;
855
856
  'delete-tooltip-label'?: string;
856
857
  'configure-tooltip-label'?: string;
858
+ 'auth-only-label'?: string;
857
859
  data?: SsoConfiguration[];
858
860
  'data-create-flow-id'?: string;
859
861
  'data-delete-flow-id'?: string;
@@ -6,6 +6,7 @@ type SsoConfiguration = {
6
6
  isDefault?: boolean;
7
7
  link?: string;
8
8
  authType?: string;
9
+ authOnly?: boolean;
9
10
  };
10
11
  type Props = {
11
12
  label?: string;
@@ -16,6 +17,7 @@ type Props = {
16
17
  'allow-configure'?: boolean;
17
18
  'delete-tooltip-label'?: string;
18
19
  'configure-tooltip-label'?: string;
20
+ 'auth-only-label'?: string;
19
21
  data?: SsoConfiguration[];
20
22
  'data-create-flow-id'?: string;
21
23
  'data-delete-flow-id'?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.21.1",
3
+ "version": "3.22.0",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -98,7 +98,7 @@
98
98
  "webpack-subresource-integrity": "5.2.0-rc.1"
99
99
  },
100
100
  "dependencies": {
101
- "@descope/web-components-ui": "3.21.1"
101
+ "@descope/web-components-ui": "3.22.0"
102
102
  },
103
103
  "peerDependencies": {
104
104
  "react": ">= 18"