@workos-inc/widgets 1.16.1-next.1786641725098 → 1.16.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
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 1.16.1-next.1786641725098
3
+ ## 1.16.1
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -8,6 +8,8 @@
8
8
 
9
9
  - Render provider-declared config field defaults in the Pipes connect forms. A descriptor's `default` is used as the input placeholder and named in a hint below the input ("Defaults to X when left blank."), matching the dashboard's config form. Descriptor patterns are now anchored and honor `patternFlags`, so client-side validation matches the API.
10
10
 
11
+ - Support custom `api_key` providers in the Pipes widgets. Providers without a logo of their own — every custom provider, plus unknown integration types — now render the Pipes product mark instead of an OAuth mark naming a flow they never run, in both the connect list and the admin list. The API key dialog also shows the provider's description, which for a custom provider is the only thing telling the tenant which key to paste. Provider icons in the Pipes lists also render at `size="2"`, matching the other widgets, rather than inheriting a default larger than the panel containing them.
12
+
11
13
  ## 1.16.0
12
14
 
13
15
  ### Minor Changes
@@ -33,6 +33,7 @@ __export(data_integration_icon_exports, {
33
33
  module.exports = __toCommonJS(data_integration_icon_exports);
34
34
  var import_jsx_runtime = require("react/jsx-runtime");
35
35
  var import_clsx = __toESM(require("clsx"), 1);
36
+ var import_icons = require("./icons.js");
36
37
  var import_provider_icon = require("./provider-icon.js");
37
38
  var import_provider_icon_slugs = require("./provider-icon-slugs.js");
38
39
  const sanitizeIconUrl = (url) => {
@@ -71,7 +72,14 @@ const DataIntegrationIcon = ({
71
72
  if ((0, import_provider_icon_slugs.isKnownProviderIconSlug)(integrationType)) {
72
73
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider_icon.ProviderIcon, { provider: integrationType, size });
73
74
  }
74
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider_icon.ProviderIcon, { provider: "generic-oauth", size });
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ "div",
77
+ {
78
+ "data-fallback-icon": "",
79
+ className: (0, import_clsx.default)("woswidgets-provider-icon", `size-${size}`),
80
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ProductPipesIcon, { "aria-hidden": true })
81
+ }
82
+ );
75
83
  };
76
84
  // Annotate the CommonJS export names for ESM import in node:
77
85
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/data-integration-icon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport * as React from \"react\";\nimport type { DataIntegration } from \"../api/endpoint.js\";\nimport { ProviderIcon } from \"./provider-icon.js\";\nimport { isKnownProviderIconSlug } from \"./provider-icon-slugs.js\";\n\ninterface DataIntegrationIconProps {\n integration: DataIntegration;\n size?: \"1\" | \"2\" | \"3\" | \"4\";\n}\n\ntype CustomIconStyle = React.CSSProperties & {\n \"--woswidgets-provider-icon-light\": string;\n \"--woswidgets-provider-icon-dark\"?: string;\n};\n\nconst sanitizeIconUrl = (url: string): string | undefined => {\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.protocol === \"https:\" ? parsedUrl.href : undefined;\n } catch {\n return undefined;\n }\n};\n\nconst DataIntegrationIcon: React.FC<DataIntegrationIconProps> = ({\n integration,\n size = \"4\",\n}) => {\n const { iconSlug, iconUrl, iconDarkUrl, integrationType } = integration;\n\n if (iconSlug && isKnownProviderIconSlug(iconSlug)) {\n return <ProviderIcon provider={iconSlug} size={size} />;\n }\n\n const safeLight = iconUrl ? sanitizeIconUrl(iconUrl) : undefined;\n const safeDark = iconDarkUrl ? sanitizeIconUrl(iconDarkUrl) : undefined;\n\n if (safeLight || safeDark) {\n const lightUrl = safeLight ?? safeDark;\n const style: CustomIconStyle = {\n \"--woswidgets-provider-icon-light\": `url(\"${lightUrl}\")`,\n ...(safeDark\n ? { \"--woswidgets-provider-icon-dark\": `url(\"${safeDark}\")` }\n : {}),\n };\n return (\n <div\n data-custom-icon=\"\"\n className={clsx(\"woswidgets-provider-icon\", `size-${size}`)}\n style={style}\n />\n );\n }\n\n // Known integration types resolve to a CSS provider icon; custom/unknown\n // providers (e.g. `integrationType: \"custom\"`) fall back to the shared\n // generic-oauth icon instead of an empty box.\n if (isKnownProviderIconSlug(integrationType)) {\n return <ProviderIcon provider={integrationType} size={size} />;\n }\n\n return <ProviderIcon provider=\"generic-oauth\" size={size} />;\n};\n\nexport { DataIntegrationIcon };\nexport type { DataIntegrationIconProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCW;AAhCX,kBAAiB;AAGjB,2BAA6B;AAC7B,iCAAwC;AAYxC,MAAM,kBAAkB,CAAC,QAAoC;AAC3D,MAAI;AACF,UAAM,YAAY,IAAI,IAAI,GAAG;AAC7B,WAAO,UAAU,aAAa,WAAW,UAAU,OAAO;AAAA,EAC5D,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,MAAM,sBAA0D,CAAC;AAAA,EAC/D;AAAA,EACA,OAAO;AACT,MAAM;AACJ,QAAM,EAAE,UAAU,SAAS,aAAa,gBAAgB,IAAI;AAE5D,MAAI,gBAAY,oDAAwB,QAAQ,GAAG;AACjD,WAAO,4CAAC,qCAAa,UAAU,UAAU,MAAY;AAAA,EACvD;AAEA,QAAM,YAAY,UAAU,gBAAgB,OAAO,IAAI;AACvD,QAAM,WAAW,cAAc,gBAAgB,WAAW,IAAI;AAE9D,MAAI,aAAa,UAAU;AACzB,UAAM,WAAW,aAAa;AAC9B,UAAM,QAAyB;AAAA,MAC7B,oCAAoC,QAAQ,QAAQ;AAAA,MACpD,GAAI,WACA,EAAE,mCAAmC,QAAQ,QAAQ,KAAK,IAC1D,CAAC;AAAA,IACP;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,oBAAiB;AAAA,QACjB,eAAW,YAAAA,SAAK,4BAA4B,QAAQ,IAAI,EAAE;AAAA,QAC1D;AAAA;AAAA,IACF;AAAA,EAEJ;AAKA,UAAI,oDAAwB,eAAe,GAAG;AAC5C,WAAO,4CAAC,qCAAa,UAAU,iBAAiB,MAAY;AAAA,EAC9D;AAEA,SAAO,4CAAC,qCAAa,UAAS,iBAAgB,MAAY;AAC5D;","names":["clsx"]}
1
+ {"version":3,"sources":["../../../src/lib/data-integration-icon.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport * as React from \"react\";\nimport type { DataIntegration } from \"../api/endpoint.js\";\nimport { ProductPipesIcon } from \"./icons.js\";\nimport { ProviderIcon } from \"./provider-icon.js\";\nimport { isKnownProviderIconSlug } from \"./provider-icon-slugs.js\";\n\n/**\n * The icon-bearing subset of a provider, structural so both surfaces can share\n * one component: the connect list passes a `DataIntegration` (which carries\n * server-supplied icons), the admin list a `DataIntegrationConfiguration`\n * (which does not, so it resolves through the same fallbacks).\n */\ntype DataIntegrationIconSource = Pick<\n DataIntegration,\n \"integrationType\" | \"iconSlug\" | \"iconUrl\" | \"iconDarkUrl\"\n>;\n\ninterface DataIntegrationIconProps {\n integration: DataIntegrationIconSource;\n size?: \"1\" | \"2\" | \"3\" | \"4\";\n}\n\ntype CustomIconStyle = React.CSSProperties & {\n \"--woswidgets-provider-icon-light\": string;\n \"--woswidgets-provider-icon-dark\"?: string;\n};\n\nconst sanitizeIconUrl = (url: string): string | undefined => {\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.protocol === \"https:\" ? parsedUrl.href : undefined;\n } catch {\n return undefined;\n }\n};\n\nconst DataIntegrationIcon: React.FC<DataIntegrationIconProps> = ({\n integration,\n size = \"4\",\n}) => {\n const { iconSlug, iconUrl, iconDarkUrl, integrationType } = integration;\n\n if (iconSlug && isKnownProviderIconSlug(iconSlug)) {\n return <ProviderIcon provider={iconSlug} size={size} />;\n }\n\n const safeLight = iconUrl ? sanitizeIconUrl(iconUrl) : undefined;\n const safeDark = iconDarkUrl ? sanitizeIconUrl(iconDarkUrl) : undefined;\n\n if (safeLight || safeDark) {\n const lightUrl = safeLight ?? safeDark;\n const style: CustomIconStyle = {\n \"--woswidgets-provider-icon-light\": `url(\"${lightUrl}\")`,\n ...(safeDark\n ? { \"--woswidgets-provider-icon-dark\": `url(\"${safeDark}\")` }\n : {}),\n };\n return (\n <div\n data-custom-icon=\"\"\n className={clsx(\"woswidgets-provider-icon\", `size-${size}`)}\n style={style}\n />\n );\n }\n\n // Known integration types resolve to a CSS provider icon.\n if (isKnownProviderIconSlug(integrationType)) {\n return <ProviderIcon provider={integrationType} size={size} />;\n }\n\n // Everything else gets the Pipes product mark rather than an empty box.\n // Custom providers all share `integrationType: \"custom\"` and carry no logo of\n // their own, so every one of them lands here — as does any api_key provider,\n // for which the old generic-oauth mark named a flow that never runs.\n return (\n <div\n data-fallback-icon=\"\"\n className={clsx(\"woswidgets-provider-icon\", `size-${size}`)}\n >\n <ProductPipesIcon aria-hidden />\n </div>\n );\n};\n\nexport { DataIntegrationIcon };\nexport type { DataIntegrationIconProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CW;AA5CX,kBAAiB;AAGjB,mBAAiC;AACjC,2BAA6B;AAC7B,iCAAwC;AAuBxC,MAAM,kBAAkB,CAAC,QAAoC;AAC3D,MAAI;AACF,UAAM,YAAY,IAAI,IAAI,GAAG;AAC7B,WAAO,UAAU,aAAa,WAAW,UAAU,OAAO;AAAA,EAC5D,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,MAAM,sBAA0D,CAAC;AAAA,EAC/D;AAAA,EACA,OAAO;AACT,MAAM;AACJ,QAAM,EAAE,UAAU,SAAS,aAAa,gBAAgB,IAAI;AAE5D,MAAI,gBAAY,oDAAwB,QAAQ,GAAG;AACjD,WAAO,4CAAC,qCAAa,UAAU,UAAU,MAAY;AAAA,EACvD;AAEA,QAAM,YAAY,UAAU,gBAAgB,OAAO,IAAI;AACvD,QAAM,WAAW,cAAc,gBAAgB,WAAW,IAAI;AAE9D,MAAI,aAAa,UAAU;AACzB,UAAM,WAAW,aAAa;AAC9B,UAAM,QAAyB;AAAA,MAC7B,oCAAoC,QAAQ,QAAQ;AAAA,MACpD,GAAI,WACA,EAAE,mCAAmC,QAAQ,QAAQ,KAAK,IAC1D,CAAC;AAAA,IACP;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,oBAAiB;AAAA,QACjB,eAAW,YAAAA,SAAK,4BAA4B,QAAQ,IAAI,EAAE;AAAA,QAC1D;AAAA;AAAA,IACF;AAAA,EAEJ;AAGA,UAAI,oDAAwB,eAAe,GAAG;AAC5C,WAAO,4CAAC,qCAAa,UAAU,iBAAiB,MAAY;AAAA,EAC9D;AAMA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,sBAAmB;AAAA,MACnB,eAAW,YAAAA,SAAK,4BAA4B,QAAQ,IAAI,EAAE;AAAA,MAE1D,sDAAC,iCAAiB,eAAW,MAAC;AAAA;AAAA,EAChC;AAEJ;","names":["clsx"]}
@@ -3,8 +3,15 @@ import { DataIntegration } from '../api/endpoint.cjs';
3
3
  import '@tanstack/react-query';
4
4
  import '../api/widgets-api-client.cjs';
5
5
 
6
+ /**
7
+ * The icon-bearing subset of a provider, structural so both surfaces can share
8
+ * one component: the connect list passes a `DataIntegration` (which carries
9
+ * server-supplied icons), the admin list a `DataIntegrationConfiguration`
10
+ * (which does not, so it resolves through the same fallbacks).
11
+ */
12
+ type DataIntegrationIconSource = Pick<DataIntegration, "integrationType" | "iconSlug" | "iconUrl" | "iconDarkUrl">;
6
13
  interface DataIntegrationIconProps {
7
- integration: DataIntegration;
14
+ integration: DataIntegrationIconSource;
8
15
  size?: "1" | "2" | "3" | "4";
9
16
  }
10
17
  declare const DataIntegrationIcon: React.FC<DataIntegrationIconProps>;
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var icons_exports = {};
20
20
  __export(icons_exports, {
21
- PasskeyIcon: () => PasskeyIcon
21
+ PasskeyIcon: () => PasskeyIcon,
22
+ ProductPipesIcon: () => ProductPipesIcon
22
23
  });
23
24
  module.exports = __toCommonJS(icons_exports);
24
25
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -44,8 +45,29 @@ function PasskeyIcon(props) {
44
45
  }
45
46
  );
46
47
  }
48
+ function ProductPipesIcon(props) {
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ "svg",
51
+ {
52
+ xmlns: "http://www.w3.org/2000/svg",
53
+ width: 16,
54
+ height: 16,
55
+ viewBox: "0 0 16 16",
56
+ fill: "none",
57
+ ...props,
58
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ "path",
60
+ {
61
+ fill: "currentColor",
62
+ d: "M2.5 1C3.88071 1 5 2.11929 5 3.5C5 4.70943 4.14105 5.71753 3 5.94922V10.25C3 11.4926 4.00736 12.5 5.25 12.5C6.49264 12.5 7.5 11.4926 7.5 10.25V5.75C7.5 3.95507 8.95507 2.5 10.75 2.5C12.5449 2.5 14 3.95507 14 5.75V10.0498C15.1411 10.2814 16 11.2905 16 12.5C16 13.8807 14.8807 15 13.5 15C12.1193 15 11 13.8807 11 12.5C11 11.2905 11.8589 10.2814 13 10.0498V5.75C13 4.50736 11.9926 3.5 10.75 3.5C9.50736 3.5 8.5 4.50736 8.5 5.75V10.25C8.5 12.0449 7.04493 13.5 5.25 13.5C3.45507 13.5 2 12.0449 2 10.25V5.94922C0.858955 5.71753 0 4.70943 0 3.5C0 2.11929 1.11929 1 2.5 1ZM13.5 11C12.6716 11 12 11.6716 12 12.5C12 13.3284 12.6716 14 13.5 14C14.3284 14 15 13.3284 15 12.5C15 11.6716 14.3284 11 13.5 11ZM2.5 2C1.67157 2 1 2.67157 1 3.5C1 4.32843 1.67157 5 2.5 5C3.32843 5 4 4.32843 4 3.5C4 2.67157 3.32843 2 2.5 2Z"
63
+ }
64
+ )
65
+ }
66
+ );
67
+ }
47
68
  // Annotate the CommonJS export names for ESM import in node:
48
69
  0 && (module.exports = {
49
- PasskeyIcon
70
+ PasskeyIcon,
71
+ ProductPipesIcon
50
72
  });
51
73
  //# sourceMappingURL=icons.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/icons.tsx"],"sourcesContent":["import { SVGProps } from \"react\";\n\nexport function PasskeyIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M5.86 1.005a2.86 2.86 0 1 0 0 5.719 2.86 2.86 0 0 0 0-5.72ZM2 3.865a3.86 3.86 0 1 1 4.899 3.717c.974.166 1.699.58 2.368 1.196a.5.5 0 1 1-.678.735C7.882 8.862 7.136 8.5 5.859 8.5c-2.036 0-3.195.693-3.867 1.613-.602.824-.86 1.893-.917 2.986h8.618a.5.5 0 0 1 0 1H.563a.5.5 0 0 1-.5-.5c0-1.356.248-2.88 1.121-4.076.743-1.018 1.897-1.741 3.582-1.957A3.861 3.861 0 0 1 2 3.864Zm12.185 6.509a2.892 2.892 0 1 0-2.212-.024v4.428L13.197 16l2.036-2.037-1.271-1.27 1.271-1.272-1.046-1.047Zm-.212-3.423a.847.847 0 1 1-1.695 0 .847.847 0 0 1 1.695 0Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYM;AAVC,SAAS,YAAY,OAAgC;AAC1D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACJ,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAS;AAAA,UACT,GAAE;AAAA,UACF,UAAS;AAAA;AAAA,MACX;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/icons.tsx"],"sourcesContent":["import { SVGProps } from \"react\";\n\nexport function PasskeyIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M5.86 1.005a2.86 2.86 0 1 0 0 5.719 2.86 2.86 0 0 0 0-5.72ZM2 3.865a3.86 3.86 0 1 1 4.899 3.717c.974.166 1.699.58 2.368 1.196a.5.5 0 1 1-.678.735C7.882 8.862 7.136 8.5 5.859 8.5c-2.036 0-3.195.693-3.867 1.613-.602.824-.86 1.893-.917 2.986h8.618a.5.5 0 0 1 0 1H.563a.5.5 0 0 1-.5-.5c0-1.356.248-2.88 1.121-4.076.743-1.018 1.897-1.741 3.582-1.957A3.861 3.861 0 0 1 2 3.864Zm12.185 6.509a2.892 2.892 0 1 0-2.212-.024v4.428L13.197 16l2.036-2.037-1.271-1.27 1.271-1.272-1.046-1.047Zm-.212-3.423a.847.847 0 1 1-1.695 0 .847.847 0 0 1 1.695 0Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\n/**\n * The Pipes product mark, inlined from the design system's\n * `ProductPipesIcon` (@workos-inc/icons, 16px set). That package is private,\n * so a published package can't depend on it — keep this path in sync by hand\n * if the design system's mark changes.\n */\nexport function ProductPipesIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M2.5 1C3.88071 1 5 2.11929 5 3.5C5 4.70943 4.14105 5.71753 3 5.94922V10.25C3 11.4926 4.00736 12.5 5.25 12.5C6.49264 12.5 7.5 11.4926 7.5 10.25V5.75C7.5 3.95507 8.95507 2.5 10.75 2.5C12.5449 2.5 14 3.95507 14 5.75V10.0498C15.1411 10.2814 16 11.2905 16 12.5C16 13.8807 14.8807 15 13.5 15C12.1193 15 11 13.8807 11 12.5C11 11.2905 11.8589 10.2814 13 10.0498V5.75C13 4.50736 11.9926 3.5 10.75 3.5C9.50736 3.5 8.5 4.50736 8.5 5.75V10.25C8.5 12.0449 7.04493 13.5 5.25 13.5C3.45507 13.5 2 12.0449 2 10.25V5.94922C0.858955 5.71753 0 4.70943 0 3.5C0 2.11929 1.11929 1 2.5 1ZM13.5 11C12.6716 11 12 11.6716 12 12.5C12 13.3284 12.6716 14 13.5 14C14.3284 14 15 13.3284 15 12.5C15 11.6716 14.3284 11 13.5 11ZM2.5 2C1.67157 2 1 2.67157 1 3.5C1 4.32843 1.67157 5 2.5 5C3.32843 5 4 4.32843 4 3.5C4 2.67157 3.32843 2 2.5 2Z\"\n />\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYM;AAVC,SAAS,YAAY,OAAgC;AAC1D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACJ,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAS;AAAA,UACT,GAAE;AAAA,UACF,UAAS;AAAA;AAAA,MACX;AAAA;AAAA,EACF;AAEJ;AAQO,SAAS,iBAAiB,OAAgC;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MACJ,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -2,5 +2,12 @@ import * as React from 'react';
2
2
  import { SVGProps } from 'react';
3
3
 
4
4
  declare function PasskeyIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
5
+ /**
6
+ * The Pipes product mark, inlined from the design system's
7
+ * `ProductPipesIcon` (@workos-inc/icons, 16px set). That package is private,
8
+ * so a published package can't depend on it — keep this path in sync by hand
9
+ * if the design system's mark changes.
10
+ */
11
+ declare function ProductPipesIcon(props: SVGProps<SVGSVGElement>): React.JSX.Element;
5
12
 
6
- export { PasskeyIcon };
13
+ export { PasskeyIcon, ProductPipesIcon };
@@ -41,8 +41,8 @@ var import_react = require("react");
41
41
  var import_react_icons = require("@radix-ui/react-icons");
42
42
  var CardList = __toESM(require("./card-list.js"), 1);
43
43
  var import_copy_text = require("./copy-text.js");
44
+ var import_data_integration_icon = require("./data-integration-icon.js");
44
45
  var import_provider_icon = require("./provider-icon.js");
45
- var import_provider_icon_slugs = require("./provider-icon-slugs.js");
46
46
  var import_elements = require("./elements.js");
47
47
  var import_icon_panel = require("./icon-panel.js");
48
48
  var import_searchable_select_list = require("./searchable-select-list.js");
@@ -671,12 +671,7 @@ const PipesAdmin = ({
671
671
  const available = isIntegrationAvailable(integration);
672
672
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardList.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { direction: "row", justify: "between", align: "center", gap: "2", children: [
673
673
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { gap: "4", align: "center", children: [
674
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { color: "panel", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
675
- import_provider_icon.ProviderIcon,
676
- {
677
- provider: (0, import_provider_icon_slugs.isKnownProviderIconSlug)(integration.integrationType) ? integration.integrationType : "generic-oauth"
678
- }
679
- ) }),
674
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { color: "panel", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_data_integration_icon.DataIntegrationIcon, { integration, size: "2" }) }),
680
675
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Text, { size: "2", weight: "bold", children: integration.name })
681
676
  ] }),
682
677
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { align: "center", gap: "4", children: [
@@ -706,7 +701,7 @@ const PipesAdminLoading = ({
706
701
  }) => {
707
702
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardList.Root, { ...getWidgetRootDomProps("loading", domProps), children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardList.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { direction: "row", justify: "between", align: "center", gap: "2", children: [
708
703
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { gap: "4", align: "center", children: [
709
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_elements.Skeleton, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider_icon.ProviderIcon, { provider: "google" }) }) }),
704
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_elements.Skeleton, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider_icon.ProviderIcon, { provider: "google", size: "2" }) }) }),
710
705
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_elements.Skeleton, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Text, { size: "2", weight: "bold", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
711
706
  import_translation.Translation,
712
707
  {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/pipes-admin.tsx"],"sourcesContent":["\"use client\";\nimport { Callout, Card, Flex, Switch, Text, Tooltip } from \"@radix-ui/themes\";\nimport { useState } from \"react\";\nimport { InfoCircledIcon } from \"@radix-ui/react-icons\";\nimport * as CardList from \"./card-list.js\";\nimport { CopyText } from \"./copy-text.js\";\nimport { ProviderIcon } from \"./provider-icon.js\";\nimport { isKnownProviderIconSlug } from \"./provider-icon-slugs.js\";\nimport {\n Button,\n Dialog,\n Label,\n PasswordField,\n Skeleton,\n TextField,\n} from \"./elements.js\";\nimport { IconPanel } from \"./icon-panel.js\";\nimport { SearchableSelectList } from \"./searchable-select-list.js\";\nimport { Status } from \"./status.js\";\nimport {\n DataIntegrationConfiguration,\n getListDataIntegrationConfigurationsQueryKey,\n getMyDataIntegrationsQueryKey,\n useListDataIntegrationConfigurations,\n useUpsertDataIntegrationConfiguration,\n} from \"../api/endpoint.js\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { GenericError } from \"./generic-error.js\";\nimport { usePermissions } from \"./use-permissions.js\";\nimport { getDomProps, WidgetRootDomProps, WidgetRootState } from \"./utils.js\";\nimport { Translation } from \"./i18n/translation.js\";\nimport { useTranslation } from \"./i18n/use-translation.js\";\nimport { buildRedactedSecret, isRedactedSecret } from \"./redacted-secret.js\";\n\nfunction RedirectUriField({ value }: { value: string }) {\n const translate = useTranslation();\n\n const copyLabel = translate({\n defaultMessage: \"Copy redirect URI\",\n id: \"xqfxBC\",\n description: \"Accessible label for the copy redirect URI button\",\n });\n\n return (\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Redirect URI\"\n id=\"lgEaUA\"\n description=\"Label for the read-only OAuth redirect URI field\"\n />\n </Label>\n <CopyText value={value} label={copyLabel} />\n </Flex>\n );\n}\n\nfunction OrgCredentialsDialog({\n integration,\n open,\n onOpenChange,\n}: {\n integration: DataIntegrationConfiguration;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}) {\n const queryClient = useQueryClient();\n const credentials = integration.credentials;\n const hasCredentials = credentials.hasCredentials;\n const isOrgCredentials = credentials.credentialsType === \"organization\";\n\n // Seeded once on mount; the dialog is only mounted while open (see\n // OrgCredentialsButton), so each open starts from the current configuration.\n // `enabled`/`scopes` on the configuration are the effective values\n // (the org override when present, else the developer default).\n const redactedSecret = buildRedactedSecret(credentials.redactedClientSecret);\n const [clientId, setClientId] = useState(credentials.client_id ?? \"\");\n const [clientSecret, setClientSecret] = useState(redactedSecret);\n const [enabled, setEnabled] = useState(integration.enabled);\n const [scopes, setScopes] = useState<string[]>(integration.scopes ?? []);\n // Organization credentials are entered first, then scopes (two-step wizard);\n // shared/custom providers only narrow scopes, so they get a single view.\n const [step, setStep] = useState<\"credentials\" | \"scopes\">(\"credentials\");\n const [clientIdError, setClientIdError] = useState<string | null>(null);\n const [clientSecretError, setClientSecretError] = useState<string | null>(\n null,\n );\n\n // Provider-declared `integration`-scope config fields are configured here, but\n // only for `organization` credentials: the API rejects per-org config for\n // shared/custom creds (those are set on the root integration instead). The\n // `installation`-scope pins are deferred from this UI for now (they're\n // collected in the connect modal instead). `secret` fields are excluded: they\n // are rejected server-side, and seeding a masked secret can't be round-tripped\n // safely under the config-replace write.\n const configFields = isOrgCredentials\n ? (integration.configFields ?? [])\n .filter((field) => field.scope === \"integration\" && !field.secret)\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n : [];\n const [configValues, setConfigValues] = useState<Record<string, string>>(\n () => {\n const seed: Record<string, string> = {};\n for (const field of integration.configFields ?? []) {\n if (field.scope !== \"integration\") continue;\n // Never seed a `secret` field from the response: the value may be\n // redacted, and re-submitting the mask would clobber the stored secret.\n if (field.secret) continue;\n const value = integration.config?.[field.key];\n if (typeof value === \"string\") {\n seed[field.key] = value;\n }\n }\n return seed;\n },\n );\n const [configErrors, setConfigErrors] = useState<\n Record<string, string | null>\n >({});\n\n const {\n mutate: upsertOverride,\n error,\n isPending,\n } = useUpsertDataIntegrationConfiguration({\n mutation: {\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: getListDataIntegrationConfigurationsQueryKey(),\n });\n // Saving a configuration can change which providers/scopes are available\n // in the user connection list, so refresh that list too.\n queryClient.invalidateQueries({\n queryKey: getMyDataIntegrationsQueryKey(),\n });\n onOpenChange(false);\n },\n },\n });\n\n const translate = useTranslation();\n\n // Selectable scope pool: organization credentials can request the provider's\n // full catalog; shared/custom can only (re)select within the developer's\n // configured defaults. The current effective selection is always included so\n // it stays toggleable, and the defaults are included so a previously removed\n // default can be re-added.\n const defaultScopes = integration.defaultScopes;\n const effectiveScopes = integration.scopes ?? [];\n const scopePool = isOrgCredentials\n ? [\n ...new Set([\n ...effectiveScopes,\n ...defaultScopes,\n ...integration.availableScopes,\n ]),\n ]\n : [...new Set([...effectiveScopes, ...defaultScopes])];\n // Developer-configured scopes the admin has unselected — named in the warning.\n const removedDefaultScopes = defaultScopes.filter(\n (scope) => !scopes.includes(scope),\n );\n\n const enabledLabel = translate({\n defaultMessage: \"Enable\",\n id: \"hkhtrS\",\n description: \"Label for the enable toggle\",\n });\n const enableTooltip = translate({\n defaultMessage:\n \"Allow this integration to be connected in your organization.\",\n id: \"7ItyG3\",\n description: \"Tooltip explaining the enable toggle\",\n });\n\n const clientIdPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client ID\",\n id: \"pAUj4e\",\n description: \"Placeholder for the OAuth client ID input\",\n values: { providerName: integration.name },\n });\n const clientSecretPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client Secret\",\n id: \"WoFO8+\",\n description: \"Placeholder for the OAuth client secret input\",\n values: { providerName: integration.name },\n });\n const scopeSearchPlaceholder = translate({\n defaultMessage: \"Search scopes\",\n id: \"fjuuw1\",\n description: \"Placeholder for the scope override search input\",\n });\n const scopeEmptyLabel = translate({\n defaultMessage: \"No scopes found\",\n id: \"OSyQvz\",\n description: \"Empty state for the scope override search\",\n });\n const configRequiredMessage = translate({\n defaultMessage: \"This field is required\",\n id: \"B2HvfC\",\n description:\n \"Validation error shown when a required configuration field is left empty\",\n });\n const configPatternMessage = translate({\n defaultMessage: \"Enter a valid value.\",\n id: \"2XWaGz\",\n description:\n \"Validation error shown when a configuration field value does not match the expected format\",\n });\n const secretRequiredMessage = translate({\n defaultMessage: \"Enter a new Client Secret to change the Client ID.\",\n id: \"O+5rxK\",\n description:\n \"Validation error when changing client id without a new secret\",\n });\n\n // Validate the integration-scope config fields against their descriptors.\n const validateConfigFields = (): boolean => {\n const nextErrors: Record<string, string | null> = {};\n let valid = true;\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (field.required && !value) {\n nextErrors[field.key] = configRequiredMessage;\n valid = false;\n continue;\n }\n if (value && field.pattern) {\n let matches = true;\n try {\n matches = new RegExp(field.pattern).test(value);\n } catch {\n // Ignore invalid descriptor patterns client-side; the API validates.\n matches = true;\n }\n if (!matches) {\n nextErrors[field.key] = configPatternMessage;\n valid = false;\n continue;\n }\n }\n nextErrors[field.key] = null;\n }\n setConfigErrors(nextErrors);\n return valid;\n };\n\n // Secret descriptor keys are never round-tripped: if the API ever returned a\n // secret as a redacted mask, copying it into the replacement payload would\n // overwrite the stored value. (Secret config fields are rejected server-side\n // today, so this is defensive.)\n const secretConfigKeys = new Set(\n (integration.configFields ?? [])\n .filter((field) => field.secret)\n .map((field) => field.key),\n );\n\n const buildConfigPayload = () => {\n // Preserve existing config keys this UI doesn't render (e.g. installation\n // pins, deferred for now) so saving org settings never drops them.\n const config: Record<string, string> = {};\n for (const [key, value] of Object.entries(integration.config ?? {})) {\n if (typeof value === \"string\" && !secretConfigKeys.has(key)) {\n config[key] = value;\n }\n }\n // Overlay the edited integration-scope fields; an emptied field clears it.\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (value) {\n config[field.key] = value;\n } else {\n delete config[field.key];\n }\n }\n return config;\n };\n\n // Validate organization credentials before advancing to the scopes step. The\n // secret field is pre-filled with a redacted placeholder for an existing\n // secret; if untouched, keep the stored secret. Since client_id and\n // client_secret travel together, changing the id requires a new secret.\n const validateCredentials = (): boolean => {\n setClientIdError(null);\n setClientSecretError(null);\n const trimmedId = clientId.trim();\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n let valid = true;\n if (!trimmedId) {\n setClientIdError(configRequiredMessage);\n valid = false;\n }\n if (secretUnchanged) {\n // Existing secret kept: only re-entry is required when the id changes.\n if (trimmedId && trimmedId !== (credentials.client_id ?? \"\")) {\n setClientSecretError(secretRequiredMessage);\n valid = false;\n }\n } else if (!clientSecret.trim()) {\n setClientSecretError(configRequiredMessage);\n valid = false;\n }\n return valid;\n };\n\n // API-key integrations have no OAuth credentials or scopes to configure;\n // the only override is the enabled toggle.\n const isApiKeyOnly = !(integration.authMethods ?? [\"oauth\"]).includes(\n \"oauth\",\n );\n\n const handleSubmit = () => {\n // Org-cred config fields were validated on the way to the scopes step; the\n // other surfaces submit directly from this view, so validate here.\n if (!isOrgCredentials && !validateConfigFields()) {\n return;\n }\n const configPayload =\n configFields.length > 0 ? { config: buildConfigPayload() } : undefined;\n\n if (isApiKeyOnly) {\n upsertOverride({\n slug: integration.slug,\n data: { enabled, ...configPayload },\n });\n return;\n }\n if (!isOrgCredentials) {\n // shared/custom: enable + (possibly narrowed) scopes only.\n upsertOverride({\n slug: integration.slug,\n data: { enabled, scopes, ...configPayload },\n });\n return;\n }\n // Credentials were validated on the way to the scopes step.\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n if (secretUnchanged) {\n upsertOverride({\n slug: integration.slug,\n data: { enabled, scopes, ...configPayload },\n });\n return;\n }\n upsertOverride({\n slug: integration.slug,\n data: {\n enabled,\n client_id: clientId.trim(),\n client_secret: clientSecret.trim(),\n scopes,\n ...configPayload,\n },\n });\n };\n\n const showCredentialsStep =\n !isApiKeyOnly && isOrgCredentials && step === \"credentials\";\n const showScopesStep =\n !isApiKeyOnly && (!isOrgCredentials || step === \"scopes\");\n\n // Disable Save when nothing differs from the seeded override state. Same\n // length + one-way subset means equal scope sets. Credential fields only\n // exist for organization credentials; a \"changed\" secret is a freshly typed\n // value (not the redacted placeholder), so focusing the field doesn't count.\n const initialScopes = integration.scopes ?? [];\n const scopesChanged =\n scopes.length !== initialScopes.length ||\n scopes.some((scope) => !initialScopes.includes(scope));\n const enabledChanged = enabled !== integration.enabled;\n const credentialsChanged =\n isOrgCredentials &&\n (clientId.trim() !== (credentials.client_id ?? \"\") ||\n (clientSecret.trim() !== \"\" && !isRedactedSecret(clientSecret)));\n const configChanged = configFields.some((field) => {\n const current = (configValues[field.key] ?? \"\").trim();\n // Trim both sides so an existing value with incidental surrounding\n // whitespace doesn't read as a pending change on open.\n const original =\n typeof integration.config?.[field.key] === \"string\"\n ? (integration.config[field.key] as string).trim()\n : \"\";\n return current !== original;\n });\n const hasPendingChanges =\n enabledChanged || scopesChanged || credentialsChanged || configChanged;\n\n // Gate the primary button on required fields being populated (matches the\n // ApiKeyDialog / change-email patterns). A redacted secret placeholder counts\n // as populated, so editing an existing config isn't blocked.\n const requiredConfigMissing = configFields.some(\n (field) => field.required && !(configValues[field.key] ?? \"\").trim(),\n );\n const credentialsMissing =\n isOrgCredentials && (!clientId.trim() || !clientSecret.trim());\n const nextDisabled = credentialsMissing || requiredConfigMissing;\n\n const enableToggle = (\n <Flex align=\"center\" gap=\"2\">\n <Switch\n checked={enabled}\n onCheckedChange={setEnabled}\n aria-label={enabledLabel}\n />\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Enable\"\n id=\"hkhtrS\"\n description=\"Label for the enable toggle\"\n />\n </Text>\n <Tooltip content={enableTooltip}>\n <InfoCircledIcon aria-hidden style={{ color: \"var(--gray-9)\" }} />\n </Tooltip>\n </Flex>\n );\n\n const configFieldsSection =\n configFields.length > 0\n ? configFields.map((field) => {\n const fieldId = `pipes-admin-config-${field.key}`;\n const errorId = `${fieldId}-error`;\n const descriptionId = `${fieldId}-description`;\n const error = configErrors[field.key];\n const Control = field.secret ? PasswordField : TextField;\n const describedBy =\n [field.description ? descriptionId : null, error ? errorId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n return (\n <Flex key={field.key} direction=\"column\" gap=\"1\">\n <Label htmlFor={fieldId}>{field.label}</Label>\n {field.description ? (\n <Text color=\"gray\" size=\"2\" id={descriptionId} mb=\"1\">\n {field.description}\n </Text>\n ) : null}\n <Control\n id={fieldId}\n value={configValues[field.key] ?? \"\"}\n placeholder={field.example}\n autoComplete=\"off\"\n required={field.required || undefined}\n aria-invalid={!!error || undefined}\n aria-describedby={describedBy}\n onChange={(event) => {\n setConfigValues((prev) => ({\n ...prev,\n [field.key]: event.target.value,\n }));\n if (error) {\n setConfigErrors((prev) => ({\n ...prev,\n [field.key]: null,\n }));\n }\n }}\n />\n {error ? (\n <Text color=\"red\" size=\"2\" id={errorId}>\n {error}\n </Text>\n ) : null}\n </Flex>\n );\n })\n : null;\n\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content>\n <Dialog.Title size=\"3\" weight=\"bold\">\n <Translation\n defaultMessage=\"Configure {integrationName} for your organization\"\n id=\"ep4eY4\"\n description=\"Title of the organization credentials dialog\"\n values={{ integrationName: integration.name }}\n />\n </Dialog.Title>\n {integration.description && (\n <Text size=\"2\" color=\"gray\" mb=\"4\" as=\"p\">\n {integration.description}\n </Text>\n )}\n\n {error && (\n <Callout.Root my=\"3\" color=\"red\" role=\"alert\">\n <Callout.Text>\n <Translation\n defaultMessage=\"We couldn't save these settings. Please check the values and try again.\"\n id=\"zr1ZFZ\"\n description=\"Error message when saving organization settings fails\"\n />\n </Callout.Text>\n </Callout.Root>\n )}\n\n <Flex direction=\"column\" gap=\"4\" mt=\"2\">\n {isApiKeyOnly && (\n <>\n {enableToggle}\n {configFieldsSection}\n </>\n )}\n\n {showCredentialsStep && (\n <>\n {enableToggle}\n\n <RedirectUriField value={credentials.redirectUri} />\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client ID\"\n id=\"Ew2Xew\"\n description=\"Label for the OAuth client ID input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <TextField\n value={clientId}\n autoComplete=\"off\"\n placeholder={clientIdPlaceholder}\n aria-invalid={!!clientIdError || undefined}\n aria-describedby={\n clientIdError ? \"pipes-admin-client-id-error\" : undefined\n }\n onChange={(event) => {\n setClientId(event.target.value);\n setClientIdError(null);\n }}\n />\n {clientIdError ? (\n <Text color=\"red\" size=\"2\" id=\"pipes-admin-client-id-error\">\n {clientIdError}\n </Text>\n ) : null}\n </Flex>\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client Secret\"\n id=\"hZK/jR\"\n description=\"Label for the OAuth client secret input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <PasswordField\n value={clientSecret}\n autoComplete=\"off\"\n // The mask is what's shown, so render it as text: a password\n // input would re-bullet its last four digits away.\n type={isRedactedSecret(clientSecret) ? \"text\" : undefined}\n placeholder={clientSecretPlaceholder}\n aria-invalid={!!clientSecretError || undefined}\n aria-describedby={\n clientSecretError\n ? \"pipes-admin-client-secret-error\"\n : undefined\n }\n onChange={(event) => {\n setClientSecret(event.target.value);\n setClientSecretError(null);\n }}\n onFocus={() => {\n if (isRedactedSecret(clientSecret)) {\n setClientSecret(\"\");\n }\n }}\n onBlur={() => {\n if (clientSecret === \"\") {\n setClientSecret(redactedSecret);\n }\n }}\n />\n {clientSecretError ? (\n <Text\n color=\"red\"\n size=\"2\"\n id=\"pipes-admin-client-secret-error\"\n >\n {clientSecretError}\n </Text>\n ) : null}\n </Flex>\n\n {configFieldsSection}\n </>\n )}\n\n {showScopesStep && (\n <>\n {!isOrgCredentials && enableToggle}\n\n {!isOrgCredentials && configFieldsSection}\n\n {scopePool.length > 0 && (\n <Flex direction=\"column\" gap=\"2\">\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Allowed scopes\"\n id=\"kNy90T\"\n description=\"Label for the scope override picker\"\n />\n </Label>\n <Text size=\"1\" color=\"gray\">\n <Translation\n defaultMessage=\"Selected scopes may be requested by your app. Users still authorize access during their own OAuth flow.\"\n id=\"E2nzZd\"\n description=\"Helper text for the scope override picker\"\n />\n </Text>\n </Flex>\n <SearchableSelectList\n options={scopePool}\n selected={scopes}\n getKey={(scope) => scope}\n getLabel={(scope) => scope}\n onChange={setScopes}\n searchPlaceholder={scopeSearchPlaceholder}\n emptyLabel={scopeEmptyLabel}\n />\n {removedDefaultScopes.length > 0 && (\n <Callout.Root color=\"amber\" role=\"status\">\n <Callout.Icon>\n <InfoCircledIcon />\n </Callout.Icon>\n <Callout.Text>\n <Translation\n defaultMessage=\"You removed developer-configured scopes: {scopes}. This may break this integration.\"\n id=\"1nCuju\"\n description=\"Warning naming the developer-configured scopes the admin removed\"\n values={{ scopes: removedDefaultScopes.join(\", \") }}\n />\n </Callout.Text>\n </Callout.Root>\n )}\n </Flex>\n )}\n </>\n )}\n </Flex>\n\n <Flex justify=\"end\" gap=\"3\" mt=\"5\">\n <Dialog.Close>\n <Button variant=\"secondary\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Dialog.Close>\n {showCredentialsStep ? (\n <Button\n type=\"button\"\n disabled={nextDisabled}\n onClick={() => {\n // Run both so each surfaces its own errors before advancing.\n const credentialsValid = validateCredentials();\n const configValid = validateConfigFields();\n if (credentialsValid && configValid) {\n setStep(\"scopes\");\n }\n }}\n >\n <Translation\n defaultMessage=\"Next\"\n id=\"VlKGPx\"\n description=\"Button to advance to the scopes step\"\n />\n </Button>\n ) : (\n <>\n {isOrgCredentials && !isApiKeyOnly && (\n <Button\n variant=\"secondary\"\n type=\"button\"\n onClick={() => setStep(\"credentials\")}\n >\n <Translation\n defaultMessage=\"Back\"\n id=\"bnFIEs\"\n description=\"Button to return to the credentials step\"\n />\n </Button>\n )}\n <Button\n type=\"button\"\n disabled={\n isPending || !hasPendingChanges || requiredConfigMissing\n }\n loading={isPending}\n onClick={handleSubmit}\n >\n <Translation\n defaultMessage=\"Save\"\n id=\"MVKPfz\"\n description=\"Button to save organization settings\"\n />\n </Button>\n </>\n )}\n </Flex>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\nfunction OrgCredentialsButton({\n integration,\n}: {\n integration: DataIntegrationConfiguration;\n}) {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n {open && (\n <OrgCredentialsDialog\n integration={integration}\n open={open}\n onOpenChange={setOpen}\n />\n )}\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </>\n );\n}\n\n/**\n * Integrations the current viewer can manage at the organization level. Backed\n * by React Query, so calling it from multiple components doesn't trigger extra\n * fetches. Surfaces errors so the caller can render an error state rather than\n * a misleadingly empty list: a denied permission (`usePermissions` throws\n * `IncorrectPermissionsError`) and a failed `/configurations` fetch both flow\n * through `error`.\n */\nfunction useManageableIntegrations(): {\n data: DataIntegrationConfiguration[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n} {\n const permission = usePermissions(\"widgets:pipes:manage\");\n const configurations = useListDataIntegrationConfigurations({\n query: { enabled: permission.isSuccess },\n });\n\n if (permission.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: permission.error,\n };\n }\n if (configurations.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: configurations.error,\n };\n }\n\n if (!permission.isSuccess || !configurations.isSuccess) {\n return {\n data: [],\n isLoading: permission.isLoading || configurations.isLoading,\n isError: false,\n error: null,\n };\n }\n\n // All manageable providers (not just organization-credential ones): the\n // tabbed \"Organization settings\" list covers every available provider.\n return {\n data: configurations.data.data,\n isLoading: false,\n isError: false,\n error: null,\n };\n}\n\n/**\n * Returns whether an integration is currently available to members of the\n * organization. All credential types require the effective `enabled` state to\n * be on; organization credentials additionally require a stored credential\n * pair.\n */\nfunction isIntegrationAvailable(\n integration: DataIntegrationConfiguration,\n): boolean {\n // API-key integrations have no org-level OAuth credentials; availability is\n // governed solely by the enabled toggle.\n if (!(integration.authMethods ?? [\"oauth\"]).includes(\"oauth\")) {\n return integration.enabled;\n }\n const credentials = integration.credentials;\n // `enabled` is the effective state (org override when present, else the\n // developer default). Organization credentials additionally require a stored\n // credential pair before the provider can be connected.\n if (credentials.credentialsType === \"organization\") {\n return credentials.hasCredentials && integration.enabled;\n }\n return integration.enabled;\n}\n\nfunction getWidgetRootDomProps(\n state: WidgetRootState,\n domProps: WidgetRootDomProps,\n) {\n return getDomProps({\n ...domProps,\n isWidgetRoot: true,\n widgetId: \"pipes-admin\",\n widgetState: state,\n });\n}\n\ninterface PipesAdminProps extends WidgetRootDomProps {\n integrations: DataIntegrationConfiguration[];\n}\n\n/**\n * IT-admin organization configuration list: every manageable provider with its\n * availability status and a Configure action (credentials + scope overrides).\n * Presentational — the client wrapper fetches via `useManageableIntegrations`.\n */\nconst PipesAdmin: React.FC<PipesAdminProps> = ({\n integrations,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"resolved\", domProps)}>\n {integrations.map((integration) => {\n const available = isIntegrationAvailable(integration);\n\n return (\n <CardList.Item key={integration.id}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <IconPanel color=\"panel\">\n <ProviderIcon\n provider={\n isKnownProviderIconSlug(integration.integrationType)\n ? integration.integrationType\n : \"generic-oauth\"\n }\n />\n </IconPanel>\n <Text size=\"2\" weight=\"bold\">\n {integration.name}\n </Text>\n </Flex>\n <Flex align=\"center\" gap=\"4\">\n <Status state={available ? \"success\" : \"neutral\"}>\n {available ? (\n <Translation\n defaultMessage=\"Available\"\n id=\"SytbAY\"\n description=\"Status when an org connection is available to members\"\n />\n ) : (\n <Translation\n defaultMessage=\"Disabled\"\n id=\"O4SGtP\"\n description=\"Status when an org connection is disabled\"\n />\n )}\n </Status>\n <OrgCredentialsButton integration={integration} />\n </Flex>\n </Flex>\n </CardList.Item>\n );\n })}\n </CardList.Root>\n );\n};\n\ninterface PipesAdminLoadingProps extends WidgetRootDomProps {\n count: number;\n}\n\nconst PipesAdminLoading: React.FC<PipesAdminLoadingProps> = ({\n count,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"loading\", domProps)}>\n {Array.from({ length: count }).map((_, index) => (\n <CardList.Item key={index}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <Skeleton>\n <IconPanel>\n <ProviderIcon provider=\"google\" />\n </IconPanel>\n </Skeleton>\n <Skeleton>\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Google Drive\"\n id=\"g11OOu\"\n description=\"Placeholder text for loading state\"\n />\n </Text>\n </Skeleton>\n </Flex>\n <Skeleton>\n <Button variant=\"secondary\" disabled>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </Skeleton>\n </Flex>\n </CardList.Item>\n ))}\n </CardList.Root>\n );\n};\n\ninterface PipesAdminErrorProps extends WidgetRootDomProps {\n error: unknown;\n}\n\nconst PipesAdminError: React.FC<PipesAdminErrorProps> = ({\n error,\n ...domProps\n}) => {\n return (\n <Card size=\"2\" {...getWidgetRootDomProps(\"error\", domProps)}>\n <GenericError error={error} />\n </Card>\n );\n};\n\nexport type { PipesAdminProps, PipesAdminLoadingProps, PipesAdminErrorProps };\nexport {\n PipesAdmin,\n PipesAdminLoading,\n PipesAdminError,\n useManageableIntegrations,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CI;AA3CJ,oBAA2D;AAC3D,mBAAyB;AACzB,yBAAgC;AAChC,eAA0B;AAC1B,uBAAyB;AACzB,2BAA6B;AAC7B,iCAAwC;AACxC,sBAOO;AACP,wBAA0B;AAC1B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MAAM;AACJ,SACE,4CAAC,sBAAK,MAAK,KAAK,GAAG,sBAAsB,SAAS,QAAQ,GACxD,sDAAC,qCAAa,OAAc,GAC9B;AAEJ;","names":["error"]}
1
+ {"version":3,"sources":["../../../src/lib/pipes-admin.tsx"],"sourcesContent":["\"use client\";\nimport { Callout, Card, Flex, Switch, Text, Tooltip } from \"@radix-ui/themes\";\nimport { useState } from \"react\";\nimport { InfoCircledIcon } from \"@radix-ui/react-icons\";\nimport * as CardList from \"./card-list.js\";\nimport { CopyText } from \"./copy-text.js\";\nimport { DataIntegrationIcon } from \"./data-integration-icon.js\";\nimport { ProviderIcon } from \"./provider-icon.js\";\nimport {\n Button,\n Dialog,\n Label,\n PasswordField,\n Skeleton,\n TextField,\n} from \"./elements.js\";\nimport { IconPanel } from \"./icon-panel.js\";\nimport { SearchableSelectList } from \"./searchable-select-list.js\";\nimport { Status } from \"./status.js\";\nimport {\n DataIntegrationConfiguration,\n getListDataIntegrationConfigurationsQueryKey,\n getMyDataIntegrationsQueryKey,\n useListDataIntegrationConfigurations,\n useUpsertDataIntegrationConfiguration,\n} from \"../api/endpoint.js\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { GenericError } from \"./generic-error.js\";\nimport { usePermissions } from \"./use-permissions.js\";\nimport { getDomProps, WidgetRootDomProps, WidgetRootState } from \"./utils.js\";\nimport { Translation } from \"./i18n/translation.js\";\nimport { useTranslation } from \"./i18n/use-translation.js\";\nimport { buildRedactedSecret, isRedactedSecret } from \"./redacted-secret.js\";\n\nfunction RedirectUriField({ value }: { value: string }) {\n const translate = useTranslation();\n\n const copyLabel = translate({\n defaultMessage: \"Copy redirect URI\",\n id: \"xqfxBC\",\n description: \"Accessible label for the copy redirect URI button\",\n });\n\n return (\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Redirect URI\"\n id=\"lgEaUA\"\n description=\"Label for the read-only OAuth redirect URI field\"\n />\n </Label>\n <CopyText value={value} label={copyLabel} />\n </Flex>\n );\n}\n\nfunction OrgCredentialsDialog({\n integration,\n open,\n onOpenChange,\n}: {\n integration: DataIntegrationConfiguration;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}) {\n const queryClient = useQueryClient();\n const credentials = integration.credentials;\n const hasCredentials = credentials.hasCredentials;\n const isOrgCredentials = credentials.credentialsType === \"organization\";\n\n // Seeded once on mount; the dialog is only mounted while open (see\n // OrgCredentialsButton), so each open starts from the current configuration.\n // `enabled`/`scopes` on the configuration are the effective values\n // (the org override when present, else the developer default).\n const redactedSecret = buildRedactedSecret(credentials.redactedClientSecret);\n const [clientId, setClientId] = useState(credentials.client_id ?? \"\");\n const [clientSecret, setClientSecret] = useState(redactedSecret);\n const [enabled, setEnabled] = useState(integration.enabled);\n const [scopes, setScopes] = useState<string[]>(integration.scopes ?? []);\n // Organization credentials are entered first, then scopes (two-step wizard);\n // shared/custom providers only narrow scopes, so they get a single view.\n const [step, setStep] = useState<\"credentials\" | \"scopes\">(\"credentials\");\n const [clientIdError, setClientIdError] = useState<string | null>(null);\n const [clientSecretError, setClientSecretError] = useState<string | null>(\n null,\n );\n\n // Provider-declared `integration`-scope config fields are configured here, but\n // only for `organization` credentials: the API rejects per-org config for\n // shared/custom creds (those are set on the root integration instead). The\n // `installation`-scope pins are deferred from this UI for now (they're\n // collected in the connect modal instead). `secret` fields are excluded: they\n // are rejected server-side, and seeding a masked secret can't be round-tripped\n // safely under the config-replace write.\n const configFields = isOrgCredentials\n ? (integration.configFields ?? [])\n .filter((field) => field.scope === \"integration\" && !field.secret)\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n : [];\n const [configValues, setConfigValues] = useState<Record<string, string>>(\n () => {\n const seed: Record<string, string> = {};\n for (const field of integration.configFields ?? []) {\n if (field.scope !== \"integration\") continue;\n // Never seed a `secret` field from the response: the value may be\n // redacted, and re-submitting the mask would clobber the stored secret.\n if (field.secret) continue;\n const value = integration.config?.[field.key];\n if (typeof value === \"string\") {\n seed[field.key] = value;\n }\n }\n return seed;\n },\n );\n const [configErrors, setConfigErrors] = useState<\n Record<string, string | null>\n >({});\n\n const {\n mutate: upsertOverride,\n error,\n isPending,\n } = useUpsertDataIntegrationConfiguration({\n mutation: {\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: getListDataIntegrationConfigurationsQueryKey(),\n });\n // Saving a configuration can change which providers/scopes are available\n // in the user connection list, so refresh that list too.\n queryClient.invalidateQueries({\n queryKey: getMyDataIntegrationsQueryKey(),\n });\n onOpenChange(false);\n },\n },\n });\n\n const translate = useTranslation();\n\n // Selectable scope pool: organization credentials can request the provider's\n // full catalog; shared/custom can only (re)select within the developer's\n // configured defaults. The current effective selection is always included so\n // it stays toggleable, and the defaults are included so a previously removed\n // default can be re-added.\n const defaultScopes = integration.defaultScopes;\n const effectiveScopes = integration.scopes ?? [];\n const scopePool = isOrgCredentials\n ? [\n ...new Set([\n ...effectiveScopes,\n ...defaultScopes,\n ...integration.availableScopes,\n ]),\n ]\n : [...new Set([...effectiveScopes, ...defaultScopes])];\n // Developer-configured scopes the admin has unselected — named in the warning.\n const removedDefaultScopes = defaultScopes.filter(\n (scope) => !scopes.includes(scope),\n );\n\n const enabledLabel = translate({\n defaultMessage: \"Enable\",\n id: \"hkhtrS\",\n description: \"Label for the enable toggle\",\n });\n const enableTooltip = translate({\n defaultMessage:\n \"Allow this integration to be connected in your organization.\",\n id: \"7ItyG3\",\n description: \"Tooltip explaining the enable toggle\",\n });\n\n const clientIdPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client ID\",\n id: \"pAUj4e\",\n description: \"Placeholder for the OAuth client ID input\",\n values: { providerName: integration.name },\n });\n const clientSecretPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client Secret\",\n id: \"WoFO8+\",\n description: \"Placeholder for the OAuth client secret input\",\n values: { providerName: integration.name },\n });\n const scopeSearchPlaceholder = translate({\n defaultMessage: \"Search scopes\",\n id: \"fjuuw1\",\n description: \"Placeholder for the scope override search input\",\n });\n const scopeEmptyLabel = translate({\n defaultMessage: \"No scopes found\",\n id: \"OSyQvz\",\n description: \"Empty state for the scope override search\",\n });\n const configRequiredMessage = translate({\n defaultMessage: \"This field is required\",\n id: \"B2HvfC\",\n description:\n \"Validation error shown when a required configuration field is left empty\",\n });\n const configPatternMessage = translate({\n defaultMessage: \"Enter a valid value.\",\n id: \"2XWaGz\",\n description:\n \"Validation error shown when a configuration field value does not match the expected format\",\n });\n const secretRequiredMessage = translate({\n defaultMessage: \"Enter a new Client Secret to change the Client ID.\",\n id: \"O+5rxK\",\n description:\n \"Validation error when changing client id without a new secret\",\n });\n\n // Validate the integration-scope config fields against their descriptors.\n const validateConfigFields = (): boolean => {\n const nextErrors: Record<string, string | null> = {};\n let valid = true;\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (field.required && !value) {\n nextErrors[field.key] = configRequiredMessage;\n valid = false;\n continue;\n }\n if (value && field.pattern) {\n let matches = true;\n try {\n matches = new RegExp(field.pattern).test(value);\n } catch {\n // Ignore invalid descriptor patterns client-side; the API validates.\n matches = true;\n }\n if (!matches) {\n nextErrors[field.key] = configPatternMessage;\n valid = false;\n continue;\n }\n }\n nextErrors[field.key] = null;\n }\n setConfigErrors(nextErrors);\n return valid;\n };\n\n // Secret descriptor keys are never round-tripped: if the API ever returned a\n // secret as a redacted mask, copying it into the replacement payload would\n // overwrite the stored value. (Secret config fields are rejected server-side\n // today, so this is defensive.)\n const secretConfigKeys = new Set(\n (integration.configFields ?? [])\n .filter((field) => field.secret)\n .map((field) => field.key),\n );\n\n const buildConfigPayload = () => {\n // Preserve existing config keys this UI doesn't render (e.g. installation\n // pins, deferred for now) so saving org settings never drops them.\n const config: Record<string, string> = {};\n for (const [key, value] of Object.entries(integration.config ?? {})) {\n if (typeof value === \"string\" && !secretConfigKeys.has(key)) {\n config[key] = value;\n }\n }\n // Overlay the edited integration-scope fields; an emptied field clears it.\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (value) {\n config[field.key] = value;\n } else {\n delete config[field.key];\n }\n }\n return config;\n };\n\n // Validate organization credentials before advancing to the scopes step. The\n // secret field is pre-filled with a redacted placeholder for an existing\n // secret; if untouched, keep the stored secret. Since client_id and\n // client_secret travel together, changing the id requires a new secret.\n const validateCredentials = (): boolean => {\n setClientIdError(null);\n setClientSecretError(null);\n const trimmedId = clientId.trim();\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n let valid = true;\n if (!trimmedId) {\n setClientIdError(configRequiredMessage);\n valid = false;\n }\n if (secretUnchanged) {\n // Existing secret kept: only re-entry is required when the id changes.\n if (trimmedId && trimmedId !== (credentials.client_id ?? \"\")) {\n setClientSecretError(secretRequiredMessage);\n valid = false;\n }\n } else if (!clientSecret.trim()) {\n setClientSecretError(configRequiredMessage);\n valid = false;\n }\n return valid;\n };\n\n // API-key integrations have no OAuth credentials or scopes to configure;\n // the only override is the enabled toggle.\n const isApiKeyOnly = !(integration.authMethods ?? [\"oauth\"]).includes(\n \"oauth\",\n );\n\n const handleSubmit = () => {\n // Org-cred config fields were validated on the way to the scopes step; the\n // other surfaces submit directly from this view, so validate here.\n if (!isOrgCredentials && !validateConfigFields()) {\n return;\n }\n const configPayload =\n configFields.length > 0 ? { config: buildConfigPayload() } : undefined;\n\n if (isApiKeyOnly) {\n upsertOverride({\n slug: integration.slug,\n data: { enabled, ...configPayload },\n });\n return;\n }\n if (!isOrgCredentials) {\n // shared/custom: enable + (possibly narrowed) scopes only.\n upsertOverride({\n slug: integration.slug,\n data: { enabled, scopes, ...configPayload },\n });\n return;\n }\n // Credentials were validated on the way to the scopes step.\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n if (secretUnchanged) {\n upsertOverride({\n slug: integration.slug,\n data: { enabled, scopes, ...configPayload },\n });\n return;\n }\n upsertOverride({\n slug: integration.slug,\n data: {\n enabled,\n client_id: clientId.trim(),\n client_secret: clientSecret.trim(),\n scopes,\n ...configPayload,\n },\n });\n };\n\n const showCredentialsStep =\n !isApiKeyOnly && isOrgCredentials && step === \"credentials\";\n const showScopesStep =\n !isApiKeyOnly && (!isOrgCredentials || step === \"scopes\");\n\n // Disable Save when nothing differs from the seeded override state. Same\n // length + one-way subset means equal scope sets. Credential fields only\n // exist for organization credentials; a \"changed\" secret is a freshly typed\n // value (not the redacted placeholder), so focusing the field doesn't count.\n const initialScopes = integration.scopes ?? [];\n const scopesChanged =\n scopes.length !== initialScopes.length ||\n scopes.some((scope) => !initialScopes.includes(scope));\n const enabledChanged = enabled !== integration.enabled;\n const credentialsChanged =\n isOrgCredentials &&\n (clientId.trim() !== (credentials.client_id ?? \"\") ||\n (clientSecret.trim() !== \"\" && !isRedactedSecret(clientSecret)));\n const configChanged = configFields.some((field) => {\n const current = (configValues[field.key] ?? \"\").trim();\n // Trim both sides so an existing value with incidental surrounding\n // whitespace doesn't read as a pending change on open.\n const original =\n typeof integration.config?.[field.key] === \"string\"\n ? (integration.config[field.key] as string).trim()\n : \"\";\n return current !== original;\n });\n const hasPendingChanges =\n enabledChanged || scopesChanged || credentialsChanged || configChanged;\n\n // Gate the primary button on required fields being populated (matches the\n // ApiKeyDialog / change-email patterns). A redacted secret placeholder counts\n // as populated, so editing an existing config isn't blocked.\n const requiredConfigMissing = configFields.some(\n (field) => field.required && !(configValues[field.key] ?? \"\").trim(),\n );\n const credentialsMissing =\n isOrgCredentials && (!clientId.trim() || !clientSecret.trim());\n const nextDisabled = credentialsMissing || requiredConfigMissing;\n\n const enableToggle = (\n <Flex align=\"center\" gap=\"2\">\n <Switch\n checked={enabled}\n onCheckedChange={setEnabled}\n aria-label={enabledLabel}\n />\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Enable\"\n id=\"hkhtrS\"\n description=\"Label for the enable toggle\"\n />\n </Text>\n <Tooltip content={enableTooltip}>\n <InfoCircledIcon aria-hidden style={{ color: \"var(--gray-9)\" }} />\n </Tooltip>\n </Flex>\n );\n\n const configFieldsSection =\n configFields.length > 0\n ? configFields.map((field) => {\n const fieldId = `pipes-admin-config-${field.key}`;\n const errorId = `${fieldId}-error`;\n const descriptionId = `${fieldId}-description`;\n const error = configErrors[field.key];\n const Control = field.secret ? PasswordField : TextField;\n const describedBy =\n [field.description ? descriptionId : null, error ? errorId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n return (\n <Flex key={field.key} direction=\"column\" gap=\"1\">\n <Label htmlFor={fieldId}>{field.label}</Label>\n {field.description ? (\n <Text color=\"gray\" size=\"2\" id={descriptionId} mb=\"1\">\n {field.description}\n </Text>\n ) : null}\n <Control\n id={fieldId}\n value={configValues[field.key] ?? \"\"}\n placeholder={field.example}\n autoComplete=\"off\"\n required={field.required || undefined}\n aria-invalid={!!error || undefined}\n aria-describedby={describedBy}\n onChange={(event) => {\n setConfigValues((prev) => ({\n ...prev,\n [field.key]: event.target.value,\n }));\n if (error) {\n setConfigErrors((prev) => ({\n ...prev,\n [field.key]: null,\n }));\n }\n }}\n />\n {error ? (\n <Text color=\"red\" size=\"2\" id={errorId}>\n {error}\n </Text>\n ) : null}\n </Flex>\n );\n })\n : null;\n\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content>\n <Dialog.Title size=\"3\" weight=\"bold\">\n <Translation\n defaultMessage=\"Configure {integrationName} for your organization\"\n id=\"ep4eY4\"\n description=\"Title of the organization credentials dialog\"\n values={{ integrationName: integration.name }}\n />\n </Dialog.Title>\n {integration.description && (\n <Text size=\"2\" color=\"gray\" mb=\"4\" as=\"p\">\n {integration.description}\n </Text>\n )}\n\n {error && (\n <Callout.Root my=\"3\" color=\"red\" role=\"alert\">\n <Callout.Text>\n <Translation\n defaultMessage=\"We couldn't save these settings. Please check the values and try again.\"\n id=\"zr1ZFZ\"\n description=\"Error message when saving organization settings fails\"\n />\n </Callout.Text>\n </Callout.Root>\n )}\n\n <Flex direction=\"column\" gap=\"4\" mt=\"2\">\n {isApiKeyOnly && (\n <>\n {enableToggle}\n {configFieldsSection}\n </>\n )}\n\n {showCredentialsStep && (\n <>\n {enableToggle}\n\n <RedirectUriField value={credentials.redirectUri} />\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client ID\"\n id=\"Ew2Xew\"\n description=\"Label for the OAuth client ID input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <TextField\n value={clientId}\n autoComplete=\"off\"\n placeholder={clientIdPlaceholder}\n aria-invalid={!!clientIdError || undefined}\n aria-describedby={\n clientIdError ? \"pipes-admin-client-id-error\" : undefined\n }\n onChange={(event) => {\n setClientId(event.target.value);\n setClientIdError(null);\n }}\n />\n {clientIdError ? (\n <Text color=\"red\" size=\"2\" id=\"pipes-admin-client-id-error\">\n {clientIdError}\n </Text>\n ) : null}\n </Flex>\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client Secret\"\n id=\"hZK/jR\"\n description=\"Label for the OAuth client secret input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <PasswordField\n value={clientSecret}\n autoComplete=\"off\"\n // The mask is what's shown, so render it as text: a password\n // input would re-bullet its last four digits away.\n type={isRedactedSecret(clientSecret) ? \"text\" : undefined}\n placeholder={clientSecretPlaceholder}\n aria-invalid={!!clientSecretError || undefined}\n aria-describedby={\n clientSecretError\n ? \"pipes-admin-client-secret-error\"\n : undefined\n }\n onChange={(event) => {\n setClientSecret(event.target.value);\n setClientSecretError(null);\n }}\n onFocus={() => {\n if (isRedactedSecret(clientSecret)) {\n setClientSecret(\"\");\n }\n }}\n onBlur={() => {\n if (clientSecret === \"\") {\n setClientSecret(redactedSecret);\n }\n }}\n />\n {clientSecretError ? (\n <Text\n color=\"red\"\n size=\"2\"\n id=\"pipes-admin-client-secret-error\"\n >\n {clientSecretError}\n </Text>\n ) : null}\n </Flex>\n\n {configFieldsSection}\n </>\n )}\n\n {showScopesStep && (\n <>\n {!isOrgCredentials && enableToggle}\n\n {!isOrgCredentials && configFieldsSection}\n\n {scopePool.length > 0 && (\n <Flex direction=\"column\" gap=\"2\">\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Allowed scopes\"\n id=\"kNy90T\"\n description=\"Label for the scope override picker\"\n />\n </Label>\n <Text size=\"1\" color=\"gray\">\n <Translation\n defaultMessage=\"Selected scopes may be requested by your app. Users still authorize access during their own OAuth flow.\"\n id=\"E2nzZd\"\n description=\"Helper text for the scope override picker\"\n />\n </Text>\n </Flex>\n <SearchableSelectList\n options={scopePool}\n selected={scopes}\n getKey={(scope) => scope}\n getLabel={(scope) => scope}\n onChange={setScopes}\n searchPlaceholder={scopeSearchPlaceholder}\n emptyLabel={scopeEmptyLabel}\n />\n {removedDefaultScopes.length > 0 && (\n <Callout.Root color=\"amber\" role=\"status\">\n <Callout.Icon>\n <InfoCircledIcon />\n </Callout.Icon>\n <Callout.Text>\n <Translation\n defaultMessage=\"You removed developer-configured scopes: {scopes}. This may break this integration.\"\n id=\"1nCuju\"\n description=\"Warning naming the developer-configured scopes the admin removed\"\n values={{ scopes: removedDefaultScopes.join(\", \") }}\n />\n </Callout.Text>\n </Callout.Root>\n )}\n </Flex>\n )}\n </>\n )}\n </Flex>\n\n <Flex justify=\"end\" gap=\"3\" mt=\"5\">\n <Dialog.Close>\n <Button variant=\"secondary\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Dialog.Close>\n {showCredentialsStep ? (\n <Button\n type=\"button\"\n disabled={nextDisabled}\n onClick={() => {\n // Run both so each surfaces its own errors before advancing.\n const credentialsValid = validateCredentials();\n const configValid = validateConfigFields();\n if (credentialsValid && configValid) {\n setStep(\"scopes\");\n }\n }}\n >\n <Translation\n defaultMessage=\"Next\"\n id=\"VlKGPx\"\n description=\"Button to advance to the scopes step\"\n />\n </Button>\n ) : (\n <>\n {isOrgCredentials && !isApiKeyOnly && (\n <Button\n variant=\"secondary\"\n type=\"button\"\n onClick={() => setStep(\"credentials\")}\n >\n <Translation\n defaultMessage=\"Back\"\n id=\"bnFIEs\"\n description=\"Button to return to the credentials step\"\n />\n </Button>\n )}\n <Button\n type=\"button\"\n disabled={\n isPending || !hasPendingChanges || requiredConfigMissing\n }\n loading={isPending}\n onClick={handleSubmit}\n >\n <Translation\n defaultMessage=\"Save\"\n id=\"MVKPfz\"\n description=\"Button to save organization settings\"\n />\n </Button>\n </>\n )}\n </Flex>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\nfunction OrgCredentialsButton({\n integration,\n}: {\n integration: DataIntegrationConfiguration;\n}) {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n {open && (\n <OrgCredentialsDialog\n integration={integration}\n open={open}\n onOpenChange={setOpen}\n />\n )}\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </>\n );\n}\n\n/**\n * Integrations the current viewer can manage at the organization level. Backed\n * by React Query, so calling it from multiple components doesn't trigger extra\n * fetches. Surfaces errors so the caller can render an error state rather than\n * a misleadingly empty list: a denied permission (`usePermissions` throws\n * `IncorrectPermissionsError`) and a failed `/configurations` fetch both flow\n * through `error`.\n */\nfunction useManageableIntegrations(): {\n data: DataIntegrationConfiguration[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n} {\n const permission = usePermissions(\"widgets:pipes:manage\");\n const configurations = useListDataIntegrationConfigurations({\n query: { enabled: permission.isSuccess },\n });\n\n if (permission.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: permission.error,\n };\n }\n if (configurations.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: configurations.error,\n };\n }\n\n if (!permission.isSuccess || !configurations.isSuccess) {\n return {\n data: [],\n isLoading: permission.isLoading || configurations.isLoading,\n isError: false,\n error: null,\n };\n }\n\n // All manageable providers (not just organization-credential ones): the\n // tabbed \"Organization settings\" list covers every available provider.\n return {\n data: configurations.data.data,\n isLoading: false,\n isError: false,\n error: null,\n };\n}\n\n/**\n * Returns whether an integration is currently available to members of the\n * organization. All credential types require the effective `enabled` state to\n * be on; organization credentials additionally require a stored credential\n * pair.\n */\nfunction isIntegrationAvailable(\n integration: DataIntegrationConfiguration,\n): boolean {\n // API-key integrations have no org-level OAuth credentials; availability is\n // governed solely by the enabled toggle.\n if (!(integration.authMethods ?? [\"oauth\"]).includes(\"oauth\")) {\n return integration.enabled;\n }\n const credentials = integration.credentials;\n // `enabled` is the effective state (org override when present, else the\n // developer default). Organization credentials additionally require a stored\n // credential pair before the provider can be connected.\n if (credentials.credentialsType === \"organization\") {\n return credentials.hasCredentials && integration.enabled;\n }\n return integration.enabled;\n}\n\nfunction getWidgetRootDomProps(\n state: WidgetRootState,\n domProps: WidgetRootDomProps,\n) {\n return getDomProps({\n ...domProps,\n isWidgetRoot: true,\n widgetId: \"pipes-admin\",\n widgetState: state,\n });\n}\n\ninterface PipesAdminProps extends WidgetRootDomProps {\n integrations: DataIntegrationConfiguration[];\n}\n\n/**\n * IT-admin organization configuration list: every manageable provider with its\n * availability status and a Configure action (credentials + scope overrides).\n * Presentational — the client wrapper fetches via `useManageableIntegrations`.\n */\nconst PipesAdmin: React.FC<PipesAdminProps> = ({\n integrations,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"resolved\", domProps)}>\n {integrations.map((integration) => {\n const available = isIntegrationAvailable(integration);\n\n return (\n <CardList.Item key={integration.id}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <IconPanel color=\"panel\">\n <DataIntegrationIcon integration={integration} size=\"2\" />\n </IconPanel>\n <Text size=\"2\" weight=\"bold\">\n {integration.name}\n </Text>\n </Flex>\n <Flex align=\"center\" gap=\"4\">\n <Status state={available ? \"success\" : \"neutral\"}>\n {available ? (\n <Translation\n defaultMessage=\"Available\"\n id=\"SytbAY\"\n description=\"Status when an org connection is available to members\"\n />\n ) : (\n <Translation\n defaultMessage=\"Disabled\"\n id=\"O4SGtP\"\n description=\"Status when an org connection is disabled\"\n />\n )}\n </Status>\n <OrgCredentialsButton integration={integration} />\n </Flex>\n </Flex>\n </CardList.Item>\n );\n })}\n </CardList.Root>\n );\n};\n\ninterface PipesAdminLoadingProps extends WidgetRootDomProps {\n count: number;\n}\n\nconst PipesAdminLoading: React.FC<PipesAdminLoadingProps> = ({\n count,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"loading\", domProps)}>\n {Array.from({ length: count }).map((_, index) => (\n <CardList.Item key={index}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <Skeleton>\n <IconPanel>\n <ProviderIcon provider=\"google\" size=\"2\" />\n </IconPanel>\n </Skeleton>\n <Skeleton>\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Google Drive\"\n id=\"g11OOu\"\n description=\"Placeholder text for loading state\"\n />\n </Text>\n </Skeleton>\n </Flex>\n <Skeleton>\n <Button variant=\"secondary\" disabled>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </Skeleton>\n </Flex>\n </CardList.Item>\n ))}\n </CardList.Root>\n );\n};\n\ninterface PipesAdminErrorProps extends WidgetRootDomProps {\n error: unknown;\n}\n\nconst PipesAdminError: React.FC<PipesAdminErrorProps> = ({\n error,\n ...domProps\n}) => {\n return (\n <Card size=\"2\" {...getWidgetRootDomProps(\"error\", domProps)}>\n <GenericError error={error} />\n </Card>\n );\n};\n\nexport type { PipesAdminProps, PipesAdminLoadingProps, PipesAdminErrorProps };\nexport {\n PipesAdmin,\n PipesAdminLoading,\n PipesAdminError,\n useManageableIntegrations,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CI;AA3CJ,oBAA2D;A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pB,CACD,GACH;AAEJ;AAMA,MAAM,kBAAkD,CAAC;AAAA,EACvD;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,4CAAC,sBAAK,MAAK,KAAK,GAAG,sBAAsB,SAAS,QAAQ,GACxD,sDAAC,qCAAa,OAAc,GAC9B;AAEJ;","names":["error"]}
@@ -637,6 +637,7 @@ function ApiKeyDialog({
637
637
  values: { integrationName: integration.name }
638
638
  }
639
639
  ) }),
640
+ integration.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_elements.Dialog.Description, { color: "gray", mt: "1", children: integration.description }),
640
641
  error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Callout.Root, { my: "3", color: "red", role: "alert", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Callout.Text, { children: errorMessage ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
641
642
  import_translation.Translation,
642
643
  {
@@ -1373,7 +1374,7 @@ function DisconnectAccountDialog({
1373
1374
  const PipesLoading = ({ count, ...domProps }) => {
1374
1375
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardList.Root, { ...getWidgetRootDomProps("loading", domProps), children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardList.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { direction: "row", justify: "between", align: "center", gap: "2", children: [
1375
1376
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { gap: "4", align: "center", children: [
1376
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_elements.Skeleton, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider_icon.ProviderIcon, { provider: "google" }) }) }),
1377
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_elements.Skeleton, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider_icon.ProviderIcon, { provider: "google", size: "2" }) }) }),
1377
1378
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_elements.Skeleton, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Text, { size: "2", weight: "bold", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1378
1379
  import_translation.Translation,
1379
1380
  {
@@ -1396,7 +1397,7 @@ const PipesLoading = ({ count, ...domProps }) => {
1396
1397
  const Pipes = ({ integrations, ...domProps }) => {
1397
1398
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardList.Root, { ...getWidgetRootDomProps("resolved", domProps), children: integrations.map((integration) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardList.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { direction: "row", justify: "between", align: "center", gap: "2", children: [
1398
1399
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_themes.Flex, { gap: "4", align: "center", children: [
1399
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { color: "panel", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_data_integration_icon.DataIntegrationIcon, { integration }) }),
1400
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_panel.IconPanel, { color: "panel", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_data_integration_icon.DataIntegrationIcon, { integration, size: "2" }) }),
1400
1401
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Text, { size: "2", weight: "bold", children: integration.name })
1401
1402
  ] }),
1402
1403
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProviderStatus, { integration })