@descope/flow-components 3.14.6 → 3.14.7

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.14.6",
8
+ "buildVersion": "3.14.7",
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.14.6",
8
+ "buildVersion": "3.14.7",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -90343,6 +90343,12 @@ function requireIndex_cjs () {
90343
90343
  `;
90344
90344
 
90345
90345
  this.listEl = this.shadowRoot.querySelector('descope-list');
90346
+ this.deleteIconSlot = this.shadowRoot.querySelector(
90347
+ 'slot[name="delete-icon"]',
90348
+ );
90349
+ this.externalLinkIconSlot = this.shadowRoot.querySelector(
90350
+ 'slot[name="external-link-icon"]',
90351
+ );
90346
90352
 
90347
90353
  injectStyle(
90348
90354
  `
@@ -90477,6 +90483,12 @@ function requireIndex_cjs () {
90477
90483
  this.listEl.addEventListener('click', this.onItemClick.bind(this));
90478
90484
 
90479
90485
  forwardAttrs(this.listEl, this, { includeAttrs: ['empty'] });
90486
+
90487
+ const rerender = () => {
90488
+ if (this.data) this.data = [...this.data];
90489
+ };
90490
+ this.deleteIconSlot.addEventListener('slotchange', rerender);
90491
+ this.externalLinkIconSlot.addEventListener('slotchange', rerender);
90480
90492
  }
90481
90493
 
90482
90494
  onCreateClick() {
@@ -110695,11 +110707,23 @@ const MultiLineMappings = React__default.default.forwardRef(({ data, ...props },
110695
110707
  return (React__default.default.createElement("descope-multi-line-mappings", { data: serializedData, ...props, ref: ref }));
110696
110708
  });
110697
110709
 
110698
- const MultiSso = React__default.default.forwardRef(({ data, titleIconLight, titleIconDark, createButtonIconLight, createButtonIconDark, deleteIconLight, deleteIconDark, externalLinkIconLight, externalLinkIconDark, ...props }, ref) => (React__default.default.createElement("descope-multi-sso", { data: data, ...props, ref: ref },
110710
+ // djb2 hash — fast non-cryptographic hash used to produce short stable keys from strings
110711
+ const djb2Hash = (s) => {
110712
+ if (typeof s !== 'string')
110713
+ return 0;
110714
+ let h = 5381;
110715
+ /* eslint-disable no-bitwise */
110716
+ for (let i = 0; i < s.length; i += 1)
110717
+ h = (h * 33) ^ s.charCodeAt(i);
110718
+ return h >>> 0;
110719
+ /* eslint-enable no-bitwise */
110720
+ };
110721
+
110722
+ const MultiSso = React__default.default.forwardRef(({ data, titleIconLight, titleIconDark, createButtonIconLight, createButtonIconDark, deleteIconLight, deleteIconDark, externalLinkIconLight, externalLinkIconDark, 'allow-delete': allowDelete, 'allow-configure': allowConfigure, ...props }, ref) => (React__default.default.createElement("descope-multi-sso", { data: data, ...props, ref: ref },
110699
110723
  titleIconLight && titleIconDark && (React__default.default.createElement(Icon, { icon: titleIconLight, "src-dark": titleIconDark, slot: "title-icon", "st-fill": "currentcolor" })),
110700
110724
  createButtonIconLight && createButtonIconDark && (React__default.default.createElement(Icon, { icon: createButtonIconLight, "src-dark": createButtonIconDark, slot: "create-button-icon", "st-fill": "currentcolor" })),
110701
- deleteIconLight && deleteIconDark && (React__default.default.createElement(Icon, { icon: deleteIconLight, "src-dark": deleteIconDark, slot: "delete-icon", "st-fill": "currentcolor" })),
110702
- externalLinkIconLight && externalLinkIconDark && (React__default.default.createElement(Icon, { icon: externalLinkIconLight, "src-dark": externalLinkIconDark, slot: "external-link-icon", "st-fill": "currentcolor" })))));
110725
+ allowDelete && deleteIconLight && deleteIconDark && (React__default.default.createElement(Icon, { key: djb2Hash(`delete-icon${deleteIconLight}${deleteIconDark}`), icon: deleteIconLight, "src-dark": deleteIconDark, slot: "delete-icon", "st-fill": "currentcolor" })),
110726
+ allowConfigure && externalLinkIconLight && externalLinkIconDark && (React__default.default.createElement(Icon, { key: djb2Hash(`external-link-icon${externalLinkIconLight}${externalLinkIconDark}`), icon: externalLinkIconLight, "src-dark": externalLinkIconDark, slot: "external-link-icon", "st-fill": "currentcolor" })))));
110703
110727
 
110704
110728
  const UserAuthMethod = React__default.default.forwardRef(({ methodIcon, methodIconDark, buttonIcon, buttonIconDark, fulfilledButtonIcon, fulfilledButtonIconDark, ...props }, ref) => (React__default.default.createElement("descope-user-auth-method", { ...props, ref: ref },
110705
110729
  methodIcon && methodIconDark && React__default.default.createElement(Icon, { icon: methodIcon, "src-dark": methodIconDark, slot: "method-icon", noColor: true }),
@@ -110811,7 +110835,7 @@ const LastAuthBadge = React__default.default.forwardRef(({ children, offsetX, of
110811
110835
  const UserPasskeys = React__default.default.forwardRef(({ allowRemove, createdAtLabel, addButtonLabel, removeButtonLabel, methodIcon, methodIconDark, buttonIcon, buttonIconDark, removeIcon, removeIconDark, ...props }, ref) => (React__default.default.createElement("descope-user-passkeys", { "allow-remove": allowRemove, "created-at-label": createdAtLabel, "add-passkey-button-label": addButtonLabel, ...props, ref: ref },
110812
110836
  methodIcon && methodIconDark && (React__default.default.createElement(Icon, { icon: methodIcon, "src-dark": methodIconDark, slot: "method-icon", "st-fill": "currentcolor", "st-height": "1.5em" })),
110813
110837
  buttonIcon && buttonIconDark && (React__default.default.createElement(Icon, { icon: buttonIcon, "src-dark": buttonIconDark, slot: "button-icon", "st-fill": "currentcolor", "st-height": "1.5em" })),
110814
- allowRemove && removeIcon && removeIconDark && (React__default.default.createElement(Icon, { icon: removeIcon, "src-dark": removeIconDark, slot: "remove-button", "st-fill": "currentcolor", "st-height": "1.5em" })),
110838
+ allowRemove && removeIcon && removeIconDark && (React__default.default.createElement(Icon, { key: djb2Hash(removeIcon + removeIconDark), icon: removeIcon, "src-dark": removeIconDark, slot: "remove-button", "st-fill": "currentcolor", "st-height": "1.5em" })),
110815
110839
  allowRemove && React__default.default.createElement("span", { slot: "remove-button" }, removeButtonLabel))));
110816
110840
 
110817
110841
  const globalsThemeToStyle = index_cjsExports.globalsThemeToStyle;
package/dist/index.esm.js CHANGED
@@ -576,11 +576,23 @@ const MultiLineMappings = React.forwardRef(({ data, ...props }, ref) => {
576
576
  return (React.createElement("descope-multi-line-mappings", { data: serializedData, ...props, ref: ref }));
577
577
  });
578
578
 
579
- const MultiSso = React.forwardRef(({ data, titleIconLight, titleIconDark, createButtonIconLight, createButtonIconDark, deleteIconLight, deleteIconDark, externalLinkIconLight, externalLinkIconDark, ...props }, ref) => (React.createElement("descope-multi-sso", { data: data, ...props, ref: ref },
579
+ // djb2 hash — fast non-cryptographic hash used to produce short stable keys from strings
580
+ const djb2Hash = (s) => {
581
+ if (typeof s !== 'string')
582
+ return 0;
583
+ let h = 5381;
584
+ /* eslint-disable no-bitwise */
585
+ for (let i = 0; i < s.length; i += 1)
586
+ h = (h * 33) ^ s.charCodeAt(i);
587
+ return h >>> 0;
588
+ /* eslint-enable no-bitwise */
589
+ };
590
+
591
+ const MultiSso = React.forwardRef(({ data, titleIconLight, titleIconDark, createButtonIconLight, createButtonIconDark, deleteIconLight, deleteIconDark, externalLinkIconLight, externalLinkIconDark, 'allow-delete': allowDelete, 'allow-configure': allowConfigure, ...props }, ref) => (React.createElement("descope-multi-sso", { data: data, ...props, ref: ref },
580
592
  titleIconLight && titleIconDark && (React.createElement(Icon, { icon: titleIconLight, "src-dark": titleIconDark, slot: "title-icon", "st-fill": "currentcolor" })),
581
593
  createButtonIconLight && createButtonIconDark && (React.createElement(Icon, { icon: createButtonIconLight, "src-dark": createButtonIconDark, slot: "create-button-icon", "st-fill": "currentcolor" })),
582
- deleteIconLight && deleteIconDark && (React.createElement(Icon, { icon: deleteIconLight, "src-dark": deleteIconDark, slot: "delete-icon", "st-fill": "currentcolor" })),
583
- externalLinkIconLight && externalLinkIconDark && (React.createElement(Icon, { icon: externalLinkIconLight, "src-dark": externalLinkIconDark, slot: "external-link-icon", "st-fill": "currentcolor" })))));
594
+ allowDelete && deleteIconLight && deleteIconDark && (React.createElement(Icon, { key: djb2Hash(`delete-icon${deleteIconLight}${deleteIconDark}`), icon: deleteIconLight, "src-dark": deleteIconDark, slot: "delete-icon", "st-fill": "currentcolor" })),
595
+ allowConfigure && externalLinkIconLight && externalLinkIconDark && (React.createElement(Icon, { key: djb2Hash(`external-link-icon${externalLinkIconLight}${externalLinkIconDark}`), icon: externalLinkIconLight, "src-dark": externalLinkIconDark, slot: "external-link-icon", "st-fill": "currentcolor" })))));
584
596
 
585
597
  const UserAuthMethod = React.forwardRef(({ methodIcon, methodIconDark, buttonIcon, buttonIconDark, fulfilledButtonIcon, fulfilledButtonIconDark, ...props }, ref) => (React.createElement("descope-user-auth-method", { ...props, ref: ref },
586
598
  methodIcon && methodIconDark && React.createElement(Icon, { icon: methodIcon, "src-dark": methodIconDark, slot: "method-icon", noColor: true }),
@@ -692,7 +704,7 @@ const LastAuthBadge = React.forwardRef(({ children, offsetX, offsetY, badgeLabel
692
704
  const UserPasskeys = React.forwardRef(({ allowRemove, createdAtLabel, addButtonLabel, removeButtonLabel, methodIcon, methodIconDark, buttonIcon, buttonIconDark, removeIcon, removeIconDark, ...props }, ref) => (React.createElement("descope-user-passkeys", { "allow-remove": allowRemove, "created-at-label": createdAtLabel, "add-passkey-button-label": addButtonLabel, ...props, ref: ref },
693
705
  methodIcon && methodIconDark && (React.createElement(Icon, { icon: methodIcon, "src-dark": methodIconDark, slot: "method-icon", "st-fill": "currentcolor", "st-height": "1.5em" })),
694
706
  buttonIcon && buttonIconDark && (React.createElement(Icon, { icon: buttonIcon, "src-dark": buttonIconDark, slot: "button-icon", "st-fill": "currentcolor", "st-height": "1.5em" })),
695
- allowRemove && removeIcon && removeIconDark && (React.createElement(Icon, { icon: removeIcon, "src-dark": removeIconDark, slot: "remove-button", "st-fill": "currentcolor", "st-height": "1.5em" })),
707
+ allowRemove && removeIcon && removeIconDark && (React.createElement(Icon, { key: djb2Hash(removeIcon + removeIconDark), icon: removeIcon, "src-dark": removeIconDark, slot: "remove-button", "st-fill": "currentcolor", "st-height": "1.5em" })),
696
708
  allowRemove && React.createElement("span", { slot: "remove-button" }, removeButtonLabel))));
697
709
 
698
710
  const globalsThemeToStyle = globalsThemeToStyle$1;
@@ -0,0 +1 @@
1
+ export declare const djb2Hash: (s: string | null | undefined) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.14.6",
3
+ "version": "3.14.7",
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.14.6"
100
+ "@descope/web-components-ui": "3.14.7"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "react": ">= 18"