@burdenoff/fe-libs 2026.1118.13 → 2026.1119.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/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -127
- package/dist/chrome/notificationCenter/NotificationFilters.js +45 -44
- package/dist/connections/CredentialStorageSelector.js +135 -134
- package/dist/connections/SharePanels.js +70 -69
- package/dist/credentials/AuthMethodSelector.js +33 -32
- package/dist/credentials/SchemaForm.js +96 -95
- package/dist/shared/assistant/avatar/live/LiveAvatarSettingsFields.js +74 -73
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +2 -0
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +41 -40
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +26 -25
- package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.js +22 -21
- package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.d.ts +2 -1
- package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.js +17 -16
- package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.js +22 -21
- package/dist/shared/pages/searchPage/FiltersPanel.js +129 -128
- package/dist/shared/pages/searchPage/SearchToolbar.js +24 -23
- package/dist/shared/providers/AppShellProvider.d.ts +8 -0
- package/dist/shared/providers/AppShellProvider.js +199 -193
- package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -1
- package/dist/shared/providers/shell/ThemeProvider.js +65 -62
- package/dist/shared/providers/shell/themedNativeControls.d.ts +25 -0
- package/dist/shared/providers/shell/themedNativeControls.js +13 -0
- package/dist/sharing/ShareDialog.js +33 -32
- package/dist/storage/StorageFolderPicker.js +50 -49
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/themed-select-context.d.ts +9 -0
- package/dist/ui/themed-select-context.js +15 -0
- package/dist/ui/themed-select-options.d.ts +42 -0
- package/dist/ui/themed-select-options.js +88 -0
- package/dist/ui/themed-select.d.ts +7 -0
- package/dist/ui/themed-select.js +234 -0
- package/dist/ui.js +31 -29
- package/package.json +1 -1
- package/src/shared/tokens/tokens.css +100 -0
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
import { INPUT_CLASS as e } from "./frame.js";
|
|
2
2
|
import { principalKey as t } from "./resourceSharing.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ThemedSelect as n } from "../ui/themed-select.js";
|
|
4
|
+
import { useState as r } from "react";
|
|
5
|
+
import { Folder as i, Trash2 as a, User as o, Users as s } from "lucide-react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
7
|
// src/connections/SharePanels.tsx
|
|
7
|
-
var
|
|
8
|
-
USER:
|
|
9
|
-
GROUP:
|
|
10
|
-
PROJECT:
|
|
11
|
-
},
|
|
8
|
+
var u = 8, d = {
|
|
9
|
+
USER: o,
|
|
10
|
+
GROUP: s,
|
|
11
|
+
PROJECT: i
|
|
12
|
+
}, f = ({ id: t, ownerId: r, onChange: i, changeable: a, members: o, ownerLabel: s, copy: u, testIdPrefix: d }) => /* @__PURE__ */ l("div", {
|
|
12
13
|
className: "space-y-1",
|
|
13
|
-
children: [/* @__PURE__ */
|
|
14
|
+
children: [/* @__PURE__ */ c("label", {
|
|
14
15
|
htmlFor: t,
|
|
15
16
|
className: "block text-sm font-medium text-text-primary",
|
|
16
|
-
children:
|
|
17
|
-
}),
|
|
17
|
+
children: u.owner
|
|
18
|
+
}), a ? /* @__PURE__ */ l(n, {
|
|
18
19
|
id: t,
|
|
19
|
-
value:
|
|
20
|
-
onChange: (e) =>
|
|
20
|
+
value: r,
|
|
21
|
+
onChange: (e) => i(e.target.value),
|
|
21
22
|
className: e,
|
|
22
|
-
"data-testid": `${
|
|
23
|
-
children: [!
|
|
24
|
-
value:
|
|
25
|
-
children:
|
|
26
|
-
}),
|
|
23
|
+
"data-testid": `${d}-owner`,
|
|
24
|
+
children: [!o.some((e) => e.principalId === r) && /* @__PURE__ */ c("option", {
|
|
25
|
+
value: r,
|
|
26
|
+
children: s
|
|
27
|
+
}), o.map((e) => /* @__PURE__ */ c("option", {
|
|
27
28
|
value: e.principalId,
|
|
28
29
|
children: e.label
|
|
29
30
|
}, e.principalId))]
|
|
30
|
-
}) : /* @__PURE__ */
|
|
31
|
+
}) : /* @__PURE__ */ c("p", {
|
|
31
32
|
id: t,
|
|
32
33
|
className: "text-sm text-text-secondary",
|
|
33
|
-
children:
|
|
34
|
+
children: s
|
|
34
35
|
})]
|
|
35
|
-
}),
|
|
36
|
-
let [m, h] =
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
}), p = ({ id: n, principals: i, excluded: a, onAdd: o, disabled: s, copy: f, testIdPrefix: p }) => {
|
|
37
|
+
let [m, h] = r(""), g = m.trim().toLowerCase(), _ = g ? i.filter((e) => !a.has(t(e.principalType, e.principalId)) && `${e.label} ${e.detail ?? ""}`.toLowerCase().includes(g)).slice(0, u) : [];
|
|
38
|
+
return /* @__PURE__ */ l("div", {
|
|
38
39
|
className: "space-y-2",
|
|
39
40
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
htmlFor:
|
|
41
|
+
/* @__PURE__ */ c("label", {
|
|
42
|
+
htmlFor: n,
|
|
42
43
|
className: "block text-sm font-medium text-text-primary",
|
|
43
44
|
children: f.add
|
|
44
45
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
id:
|
|
46
|
+
/* @__PURE__ */ c("input", {
|
|
47
|
+
id: n,
|
|
47
48
|
type: "search",
|
|
48
49
|
value: m,
|
|
49
50
|
onChange: (e) => h(e.target.value),
|
|
50
51
|
placeholder: f.addPlaceholder,
|
|
51
52
|
className: e,
|
|
52
|
-
disabled:
|
|
53
|
+
disabled: s,
|
|
53
54
|
"data-testid": `${p}-search`
|
|
54
55
|
}),
|
|
55
|
-
_.length > 0 && /* @__PURE__ */
|
|
56
|
+
_.length > 0 && /* @__PURE__ */ c("ul", {
|
|
56
57
|
className: "divide-y divide-border-subtle rounded-md border border-border-subtle",
|
|
57
58
|
children: _.map((e) => {
|
|
58
|
-
let n =
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
let n = d[e.principalType];
|
|
60
|
+
return /* @__PURE__ */ c("li", { children: /* @__PURE__ */ l("button", {
|
|
60
61
|
type: "button",
|
|
61
62
|
onClick: () => {
|
|
62
63
|
o(e), h("");
|
|
@@ -64,16 +65,16 @@ var l = 8, u = {
|
|
|
64
65
|
className: "flex w-full items-center gap-2 px-3 py-2 text-start text-sm hover:bg-accent",
|
|
65
66
|
"data-testid": `${p}-match`,
|
|
66
67
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ c(n, {
|
|
68
69
|
size: 14,
|
|
69
70
|
className: "shrink-0 text-text-secondary",
|
|
70
71
|
"aria-hidden": !0
|
|
71
72
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ c("span", {
|
|
73
74
|
className: "flex-1 truncate text-text-primary",
|
|
74
75
|
children: e.label
|
|
75
76
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ c("span", {
|
|
77
78
|
className: "text-xs text-text-secondary",
|
|
78
79
|
children: e.detail ?? f.principalType[e.principalType]
|
|
79
80
|
})
|
|
@@ -84,70 +85,70 @@ var l = 8, u = {
|
|
|
84
85
|
]
|
|
85
86
|
});
|
|
86
87
|
};
|
|
87
|
-
function
|
|
88
|
-
let
|
|
89
|
-
return /* @__PURE__ */
|
|
88
|
+
function m({ idPrefix: e, grants: r, visibility: i, labelOf: o, roles: s, onRole: u, onRemove: f, disabled: p, copy: m, testIdPrefix: h }) {
|
|
89
|
+
let g = (e) => s.find((t) => t.value === e)?.value;
|
|
90
|
+
return /* @__PURE__ */ l("div", {
|
|
90
91
|
className: "space-y-2",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ c("h3", {
|
|
92
93
|
className: "text-sm font-medium text-text-primary",
|
|
93
|
-
children:
|
|
94
|
-
}),
|
|
94
|
+
children: m.sharedWith
|
|
95
|
+
}), r.length === 0 ? /* @__PURE__ */ c("p", {
|
|
95
96
|
className: "text-xs text-text-secondary",
|
|
96
|
-
children:
|
|
97
|
-
}) : /* @__PURE__ */
|
|
97
|
+
children: i === "RESTRICTED" ? m.onlyOwner : m.none
|
|
98
|
+
}) : /* @__PURE__ */ c("ul", {
|
|
98
99
|
className: "divide-y divide-border-subtle rounded-md border border-border-subtle",
|
|
99
|
-
children:
|
|
100
|
-
let
|
|
101
|
-
return /* @__PURE__ */
|
|
100
|
+
children: r.map((r, i) => {
|
|
101
|
+
let _ = d[r.principalType], v = `${e}-role-${i}`, y = o(r.principalType, r.principalId);
|
|
102
|
+
return /* @__PURE__ */ l("li", {
|
|
102
103
|
className: "flex items-center gap-2 px-3 py-2",
|
|
103
|
-
"data-testid": `${
|
|
104
|
+
"data-testid": `${h}-grant`,
|
|
104
105
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ c(_, {
|
|
106
107
|
size: 14,
|
|
107
108
|
className: "shrink-0 text-text-secondary",
|
|
108
109
|
"aria-hidden": !0
|
|
109
110
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ l("span", {
|
|
111
112
|
className: "min-w-0 flex-1",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ c("span", {
|
|
113
114
|
className: "block truncate text-sm text-text-primary",
|
|
114
|
-
children:
|
|
115
|
-
}), /* @__PURE__ */
|
|
115
|
+
children: y
|
|
116
|
+
}), /* @__PURE__ */ c("span", {
|
|
116
117
|
className: "block text-xs text-text-secondary",
|
|
117
|
-
children:
|
|
118
|
+
children: m.principalType[r.principalType]
|
|
118
119
|
})]
|
|
119
120
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
htmlFor:
|
|
121
|
+
/* @__PURE__ */ c("label", {
|
|
122
|
+
htmlFor: v,
|
|
122
123
|
className: "sr-only",
|
|
123
|
-
children:
|
|
124
|
+
children: m.roleFor(y)
|
|
124
125
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
id:
|
|
127
|
-
value:
|
|
126
|
+
/* @__PURE__ */ c(n, {
|
|
127
|
+
id: v,
|
|
128
|
+
value: r.role,
|
|
128
129
|
onChange: (e) => {
|
|
129
|
-
let t =
|
|
130
|
-
t &&
|
|
130
|
+
let t = g(e.target.value);
|
|
131
|
+
t && u(i, t);
|
|
131
132
|
},
|
|
132
|
-
disabled:
|
|
133
|
+
disabled: p,
|
|
133
134
|
className: "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs",
|
|
134
|
-
children:
|
|
135
|
+
children: s.map((e) => /* @__PURE__ */ c("option", {
|
|
135
136
|
value: e.value,
|
|
136
137
|
children: e.label
|
|
137
138
|
}, e.value))
|
|
138
139
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ c("button", {
|
|
140
141
|
type: "button",
|
|
141
|
-
onClick: () =>
|
|
142
|
-
disabled:
|
|
142
|
+
onClick: () => f(i),
|
|
143
|
+
disabled: p,
|
|
143
144
|
className: "rounded-md p-1 text-text-secondary hover:bg-accent disabled:opacity-50",
|
|
144
|
-
"aria-label":
|
|
145
|
-
children: /* @__PURE__ */
|
|
145
|
+
"aria-label": m.remove(y),
|
|
146
|
+
children: /* @__PURE__ */ c(a, { size: 14 })
|
|
146
147
|
})
|
|
147
148
|
]
|
|
148
|
-
}, t(
|
|
149
|
+
}, t(r.principalType, r.principalId));
|
|
149
150
|
})
|
|
150
151
|
})]
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
|
-
export {
|
|
154
|
+
export { m as GrantList, f as OwnerField, p as PrincipalSearch };
|
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
import { resolveSelectedMethod as e } from "./methods.js";
|
|
2
2
|
import { englishTranslator as t } from "./translate.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ThemedSelect as n } from "../ui/themed-select.js";
|
|
4
|
+
import { AlertCircle as r } from "lucide-react";
|
|
5
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
6
|
// src/credentials/AuthMethodSelector.tsx
|
|
6
|
-
var
|
|
7
|
+
var s = ({ method: e, translate: n = t }) => e ? /* @__PURE__ */ o(i, { children: [e.description && /* @__PURE__ */ a("p", {
|
|
7
8
|
className: "text-xs text-text-secondary",
|
|
8
9
|
children: e.description
|
|
9
|
-
}), !e.isConfigured && /* @__PURE__ */
|
|
10
|
+
}), !e.isConfigured && /* @__PURE__ */ o("div", {
|
|
10
11
|
className: "flex items-start gap-2 px-3 py-2 rounded-md bg-status-warning-bg-subtle border border-border-default",
|
|
11
|
-
children: [/* @__PURE__ */
|
|
12
|
+
children: [/* @__PURE__ */ a(r, {
|
|
12
13
|
size: 14,
|
|
13
14
|
className: "text-status-warning-text flex-shrink-0 mt-0.5"
|
|
14
|
-
}), /* @__PURE__ */
|
|
15
|
+
}), /* @__PURE__ */ a("span", {
|
|
15
16
|
className: "text-xs text-status-warning-text",
|
|
16
|
-
children:
|
|
17
|
+
children: n("integrations.addConnection.authentication.methodNotConfigured", "This authentication method is not configured in this environment. Ask an administrator to add its credentials, or pick another method.")
|
|
17
18
|
})]
|
|
18
|
-
})] }) : null,
|
|
19
|
-
let
|
|
20
|
-
if (
|
|
21
|
-
let
|
|
22
|
-
id:
|
|
23
|
-
"aria-label":
|
|
24
|
-
value:
|
|
25
|
-
onChange: (e) =>
|
|
26
|
-
disabled:
|
|
27
|
-
className:
|
|
28
|
-
children: [!
|
|
19
|
+
})] }) : null, c = ({ methods: r, selectedKey: i, onSelect: c, disabled: l, idPrefix: u = "auth-method", compact: d = !1, translate: f = t }) => {
|
|
20
|
+
let p = r.filter((e) => e.isEnabled);
|
|
21
|
+
if (p.length <= 1) return null;
|
|
22
|
+
let m = e(p, i), h = f("integrations.addConnection.fields.authMethod", "Authentication Method"), g = /* @__PURE__ */ o(n, {
|
|
23
|
+
id: u,
|
|
24
|
+
"aria-label": h,
|
|
25
|
+
value: m ? m.key : "",
|
|
26
|
+
onChange: (e) => c(e.target.value),
|
|
27
|
+
disabled: l,
|
|
28
|
+
className: d ? "max-w-[16rem] truncate rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary" : "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
29
|
+
children: [!m && /* @__PURE__ */ a("option", {
|
|
29
30
|
value: "",
|
|
30
31
|
disabled: !0,
|
|
31
|
-
children:
|
|
32
|
-
}),
|
|
32
|
+
children: f("integrations.addConnection.fields.authMethodPlaceholder", "Select an authentication method")
|
|
33
|
+
}), p.map((e) => /* @__PURE__ */ o("option", {
|
|
33
34
|
value: e.key,
|
|
34
35
|
disabled: !e.isConfigured,
|
|
35
|
-
children: [e.displayName, e.isConfigured ? "" : ` — ${
|
|
36
|
+
children: [e.displayName, e.isConfigured ? "" : ` — ${f("integrations.providerEditor.authMethods.notConfigured", "not configured")}`]
|
|
36
37
|
}, e.key))]
|
|
37
38
|
});
|
|
38
|
-
return
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
htmlFor:
|
|
39
|
+
return d ? g : /* @__PURE__ */ o("div", { children: [
|
|
40
|
+
/* @__PURE__ */ o("label", {
|
|
41
|
+
htmlFor: u,
|
|
41
42
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
42
43
|
children: [
|
|
43
|
-
|
|
44
|
+
h,
|
|
44
45
|
" ",
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ a("span", {
|
|
46
47
|
className: "text-status-error-text",
|
|
47
48
|
children: "*"
|
|
48
49
|
})
|
|
49
50
|
]
|
|
50
51
|
}),
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
g,
|
|
53
|
+
/* @__PURE__ */ a("div", {
|
|
53
54
|
className: "mt-1 space-y-2",
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
method:
|
|
56
|
-
translate:
|
|
55
|
+
children: /* @__PURE__ */ a(s, {
|
|
56
|
+
method: m,
|
|
57
|
+
translate: f
|
|
57
58
|
})
|
|
58
59
|
})
|
|
59
60
|
] });
|
|
60
61
|
};
|
|
61
|
-
export {
|
|
62
|
+
export { s as AuthMethodNotice, c as AuthMethodSelector };
|
|
@@ -1,187 +1,188 @@
|
|
|
1
1
|
import { isInFormPart as e, isVisible as t, normalizeOptions as n } from "./schema.js";
|
|
2
2
|
import { englishTranslator as r } from "./translate.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ThemedSelect as i } from "../ui/themed-select.js";
|
|
4
|
+
import { useState as a } from "react";
|
|
5
|
+
import { Eye as o, EyeOff as s, Info as c } from "lucide-react";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
7
|
// src/credentials/SchemaForm.tsx
|
|
7
|
-
var
|
|
8
|
+
var d = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("-webkit-text-security", "disc"), f = ({ schema: n, values: i, onChange: a, disabled: o, idPrefix: s = "schema", translate: c = r, part: u = "all" }) => {
|
|
8
9
|
let d = new Set(n.required);
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ l("div", {
|
|
10
11
|
className: "space-y-3",
|
|
11
|
-
children: Object.entries(n.properties).filter(([r, a]) => e(r, a, n, u) && t(a, i, n)).map(([e, t]) => /* @__PURE__ */
|
|
12
|
+
children: Object.entries(n.properties).filter(([r, a]) => e(r, a, n, u) && t(a, i, n)).map(([e, t]) => /* @__PURE__ */ l(p, {
|
|
12
13
|
id: `${s}-${e}`,
|
|
13
14
|
name: e,
|
|
14
15
|
property: t,
|
|
15
16
|
value: i[e],
|
|
16
17
|
required: d.has(e),
|
|
17
18
|
disabled: o,
|
|
18
|
-
translate:
|
|
19
|
+
translate: c,
|
|
19
20
|
onChange: (t) => a({
|
|
20
21
|
...i,
|
|
21
22
|
[e]: t
|
|
22
23
|
})
|
|
23
24
|
}, e))
|
|
24
25
|
});
|
|
25
|
-
},
|
|
26
|
-
let [
|
|
27
|
-
if (r.type === "notice") return /* @__PURE__ */
|
|
26
|
+
}, p = ({ id: e, name: t, property: r, value: f, required: p, disabled: m, translate: h, onChange: g }) => {
|
|
27
|
+
let [_, v] = a(!1), [y, b] = a(!1), x = r.title ?? t, S = r.placeholder ?? r.description ?? "";
|
|
28
|
+
if (r.type === "notice") return /* @__PURE__ */ u("div", {
|
|
28
29
|
className: "flex items-start gap-2 px-3 py-2 rounded-md bg-status-info-bg-subtle border border-border-default",
|
|
29
|
-
children: [/* @__PURE__ */ c
|
|
30
|
+
children: [/* @__PURE__ */ l(c, {
|
|
30
31
|
size: 14,
|
|
31
32
|
className: "text-status-info-text flex-shrink-0 mt-0.5"
|
|
32
|
-
}), /* @__PURE__ */
|
|
33
|
+
}), /* @__PURE__ */ l("span", {
|
|
33
34
|
className: "text-xs text-status-info-text",
|
|
34
|
-
children: r.description ??
|
|
35
|
+
children: r.description ?? x
|
|
35
36
|
})]
|
|
36
37
|
});
|
|
37
|
-
let
|
|
38
|
+
let C = r.description ? /* @__PURE__ */ l("p", {
|
|
38
39
|
className: "mt-1 text-xs text-text-secondary",
|
|
39
40
|
children: r.description
|
|
40
|
-
}) : null,
|
|
41
|
+
}) : null, w = /* @__PURE__ */ u("label", {
|
|
41
42
|
htmlFor: e,
|
|
42
43
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
43
44
|
children: [
|
|
44
|
-
|
|
45
|
+
x,
|
|
45
46
|
" ",
|
|
46
|
-
|
|
47
|
+
p && /* @__PURE__ */ l("span", {
|
|
47
48
|
className: "text-status-error-text",
|
|
48
49
|
children: "*"
|
|
49
50
|
})
|
|
50
51
|
]
|
|
51
|
-
}),
|
|
52
|
+
}), T = "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50";
|
|
52
53
|
if (r.type === "boolean") {
|
|
53
|
-
let t = !!(
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
let t = !!(f ?? r.default ?? !1);
|
|
55
|
+
return /* @__PURE__ */ u("div", {
|
|
55
56
|
className: "flex items-center gap-3",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ l("button", {
|
|
57
58
|
type: "button",
|
|
58
59
|
role: "switch",
|
|
59
60
|
id: e,
|
|
60
61
|
"aria-checked": t,
|
|
61
|
-
"aria-label":
|
|
62
|
-
onClick: () =>
|
|
63
|
-
disabled:
|
|
62
|
+
"aria-label": x,
|
|
63
|
+
onClick: () => g(!t),
|
|
64
|
+
disabled: m,
|
|
64
65
|
className: `relative inline-flex h-5 w-9 items-center rounded-full transition-colors disabled:opacity-50 ${t ? "bg-primary" : "bg-bg-muted"}`,
|
|
65
|
-
children: /* @__PURE__ */
|
|
66
|
-
}), /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ l("span", { className: `inline-block h-3.5 w-3.5 transform rounded-full bg-bg-surface transition-transform ${t ? "translate-x-4.5" : "translate-x-0.5"}` })
|
|
67
|
+
}), /* @__PURE__ */ u("span", {
|
|
67
68
|
className: "text-sm font-medium text-text-primary",
|
|
68
|
-
children: [
|
|
69
|
+
children: [x, r.description && /* @__PURE__ */ u("span", {
|
|
69
70
|
className: "text-text-secondary font-normal ms-1",
|
|
70
71
|
children: ["— ", r.description]
|
|
71
72
|
})]
|
|
72
73
|
})]
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
|
-
if (r.enum && r.enum.length > 0) return /* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */
|
|
76
|
+
if (r.enum && r.enum.length > 0) return /* @__PURE__ */ u("div", { children: [
|
|
77
|
+
w,
|
|
78
|
+
/* @__PURE__ */ u(i, {
|
|
78
79
|
id: e,
|
|
79
|
-
"aria-label":
|
|
80
|
-
value: String(
|
|
81
|
-
onChange: (e) =>
|
|
82
|
-
disabled:
|
|
83
|
-
className: `${
|
|
84
|
-
children: [/* @__PURE__ */
|
|
80
|
+
"aria-label": x,
|
|
81
|
+
value: String(f ?? r.default ?? ""),
|
|
82
|
+
onChange: (e) => g(e.target.value),
|
|
83
|
+
disabled: m,
|
|
84
|
+
className: `${T} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`,
|
|
85
|
+
children: [/* @__PURE__ */ l("option", {
|
|
85
86
|
value: "",
|
|
86
|
-
children:
|
|
87
|
-
}), n(r.enum).map((e) => /* @__PURE__ */
|
|
87
|
+
children: h("integrations.schemaForm.select", "Select {{label}}", { label: x.toLowerCase() })
|
|
88
|
+
}), n(r.enum).map((e) => /* @__PURE__ */ l("option", {
|
|
88
89
|
value: e.value,
|
|
89
90
|
children: e.label
|
|
90
91
|
}, e.value))]
|
|
91
92
|
}),
|
|
92
|
-
|
|
93
|
+
C
|
|
93
94
|
] });
|
|
94
|
-
if (r.type === "number") return /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */
|
|
95
|
+
if (r.type === "number") return /* @__PURE__ */ u("div", { children: [
|
|
96
|
+
w,
|
|
97
|
+
/* @__PURE__ */ l("input", {
|
|
97
98
|
id: e,
|
|
98
|
-
"aria-label":
|
|
99
|
+
"aria-label": x,
|
|
99
100
|
type: "number",
|
|
100
|
-
value:
|
|
101
|
-
onChange: (e) =>
|
|
102
|
-
placeholder:
|
|
103
|
-
disabled:
|
|
104
|
-
className:
|
|
101
|
+
value: f == null ? "" : String(f),
|
|
102
|
+
onChange: (e) => g(e.target.value === "" ? void 0 : Number(e.target.value)),
|
|
103
|
+
placeholder: S,
|
|
104
|
+
disabled: m,
|
|
105
|
+
className: T
|
|
105
106
|
}),
|
|
106
|
-
|
|
107
|
+
C
|
|
107
108
|
] });
|
|
108
109
|
if (r.format === "textarea" || r.format === "json") {
|
|
109
|
-
let t = !!r.secret && !
|
|
110
|
-
return t && !
|
|
111
|
-
|
|
112
|
-
/* @__PURE__ */
|
|
110
|
+
let t = !!r.secret && !_, n = typeof f == "string" && f.length > 0;
|
|
111
|
+
return t && !d && n && !y ? /* @__PURE__ */ u("div", { children: [
|
|
112
|
+
w,
|
|
113
|
+
/* @__PURE__ */ u("div", {
|
|
113
114
|
className: "flex items-center justify-between gap-2 px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ l("span", {
|
|
115
116
|
className: "text-sm font-mono text-text-secondary select-none",
|
|
116
117
|
children: "••••••••••••"
|
|
117
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ u("button", {
|
|
118
119
|
type: "button",
|
|
119
|
-
onClick: () =>
|
|
120
|
-
disabled:
|
|
121
|
-
"aria-label":
|
|
120
|
+
onClick: () => v(!0),
|
|
121
|
+
disabled: m,
|
|
122
|
+
"aria-label": h("integrations.schemaForm.reveal", "Show {{label}}", { label: x }),
|
|
122
123
|
className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50",
|
|
123
124
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ l(o, { size: 14 }),
|
|
125
126
|
" ",
|
|
126
|
-
|
|
127
|
+
h("integrations.schemaForm.revealToEdit", "Reveal to edit")
|
|
127
128
|
]
|
|
128
129
|
})]
|
|
129
130
|
}),
|
|
130
|
-
|
|
131
|
-
] }) : /* @__PURE__ */
|
|
132
|
-
|
|
133
|
-
/* @__PURE__ */
|
|
131
|
+
C
|
|
132
|
+
] }) : /* @__PURE__ */ u("div", { children: [
|
|
133
|
+
w,
|
|
134
|
+
/* @__PURE__ */ u("div", {
|
|
134
135
|
className: "relative",
|
|
135
136
|
...r.secret ? { "data-agent-sensitive": "" } : {},
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ l("textarea", {
|
|
137
138
|
id: e,
|
|
138
|
-
"aria-label":
|
|
139
|
-
value: String(
|
|
140
|
-
onChange: (e) =>
|
|
141
|
-
onFocus: () =>
|
|
142
|
-
onBlur: () =>
|
|
143
|
-
placeholder:
|
|
144
|
-
disabled:
|
|
139
|
+
"aria-label": x,
|
|
140
|
+
value: String(f ?? ""),
|
|
141
|
+
onChange: (e) => g(e.target.value),
|
|
142
|
+
onFocus: () => b(!0),
|
|
143
|
+
onBlur: () => b(!1),
|
|
144
|
+
placeholder: S,
|
|
145
|
+
disabled: m,
|
|
145
146
|
rows: 5,
|
|
146
147
|
autoComplete: "off",
|
|
147
148
|
spellCheck: !1,
|
|
148
149
|
style: t ? { WebkitTextSecurity: "disc" } : void 0,
|
|
149
|
-
className: `${
|
|
150
|
-
}), r.secret && /* @__PURE__ */
|
|
150
|
+
className: `${T} font-mono ${r.secret ? "pe-10" : ""}`
|
|
151
|
+
}), r.secret && /* @__PURE__ */ l("button", {
|
|
151
152
|
type: "button",
|
|
152
|
-
onClick: () =>
|
|
153
|
-
"aria-label":
|
|
153
|
+
onClick: () => v((e) => !e),
|
|
154
|
+
"aria-label": _ ? h("integrations.schemaForm.hide", "Hide {{label}}", { label: x }) : h("integrations.schemaForm.reveal", "Show {{label}}", { label: x }),
|
|
154
155
|
className: "absolute end-2 top-2 text-text-secondary hover:text-text-primary",
|
|
155
|
-
children:
|
|
156
|
+
children: l(_ ? s : o, { size: 16 })
|
|
156
157
|
})]
|
|
157
158
|
}),
|
|
158
|
-
|
|
159
|
+
C
|
|
159
160
|
] });
|
|
160
161
|
}
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
|
|
163
|
-
/* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
163
|
+
w,
|
|
164
|
+
/* @__PURE__ */ u("div", {
|
|
164
165
|
className: "relative",
|
|
165
166
|
...r.secret ? { "data-agent-sensitive": "" } : {},
|
|
166
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ l("input", {
|
|
167
168
|
id: e,
|
|
168
|
-
"aria-label":
|
|
169
|
-
type: r.secret && !
|
|
170
|
-
value: String(
|
|
171
|
-
onChange: (e) =>
|
|
172
|
-
placeholder:
|
|
173
|
-
disabled:
|
|
169
|
+
"aria-label": x,
|
|
170
|
+
type: r.secret && !_ ? "password" : "text",
|
|
171
|
+
value: String(f ?? ""),
|
|
172
|
+
onChange: (e) => g(e.target.value),
|
|
173
|
+
placeholder: S,
|
|
174
|
+
disabled: m,
|
|
174
175
|
autoComplete: "off",
|
|
175
|
-
className: `${
|
|
176
|
-
}), r.secret && /* @__PURE__ */
|
|
176
|
+
className: `${T} ${r.secret ? "font-mono pe-10" : ""}`
|
|
177
|
+
}), r.secret && /* @__PURE__ */ l("button", {
|
|
177
178
|
type: "button",
|
|
178
|
-
onClick: () =>
|
|
179
|
-
"aria-label":
|
|
179
|
+
onClick: () => v((e) => !e),
|
|
180
|
+
"aria-label": _ ? h("integrations.schemaForm.hide", "Hide {{label}}", { label: x }) : h("integrations.schemaForm.reveal", "Show {{label}}", { label: x }),
|
|
180
181
|
className: "absolute end-2 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
|
|
181
|
-
children:
|
|
182
|
+
children: l(_ ? s : o, { size: 16 })
|
|
182
183
|
})]
|
|
183
184
|
}),
|
|
184
|
-
|
|
185
|
+
C
|
|
185
186
|
] });
|
|
186
187
|
};
|
|
187
|
-
export {
|
|
188
|
+
export { f as SchemaForm };
|