@gurpreetmahi/easy.ui 0.2.0 → 0.2.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/index.js CHANGED
@@ -1,436 +1,242 @@
1
- import { createContext as e, useCallback as t, useContext as n, useEffect as r, useId as i, useMemo as a, useRef as o, useState as s } from "react";
2
- import { createPortal as c } from "react-dom";
3
- // \0rolldown/runtime.js
4
- var l = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
5
- if (typeof require < "u") return require.apply(this, arguments);
6
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
7
- }), d = /* @__PURE__ */ l(((e) => {
8
- var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
9
- function r(e, n, r) {
10
- var i = null;
11
- if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
12
- else r = n;
13
- return n = r.ref, {
14
- $$typeof: t,
15
- type: e,
16
- key: i,
17
- ref: n === void 0 ? null : n,
18
- props: r
19
- };
20
- }
21
- e.Fragment = n, e.jsx = r, e.jsxs = r;
22
- })), f = /* @__PURE__ */ l(((e) => {
23
- process.env.NODE_ENV !== "production" && (function() {
24
- function t(e) {
25
- if (e == null) return null;
26
- if (typeof e == "function") return e.$$typeof === A ? null : e.displayName || e.name || null;
27
- if (typeof e == "string") return e;
28
- switch (e) {
29
- case v: return "Fragment";
30
- case b: return "Profiler";
31
- case y: return "StrictMode";
32
- case w: return "Suspense";
33
- case T: return "SuspenseList";
34
- case O: return "Activity";
35
- case k: return "ViewTransition";
36
- }
37
- if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
38
- case _: return "Portal";
39
- case S: return e.displayName || "Context";
40
- case x: return (e._context.displayName || "Context") + ".Consumer";
41
- case C:
42
- var n = e.render;
43
- return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
44
- case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
45
- case D:
46
- n = e._payload, e = e._init;
47
- try {
48
- return t(e(n));
49
- } catch {}
50
- }
51
- return null;
52
- }
53
- function n(e) {
54
- return "" + e;
55
- }
56
- function r(e) {
57
- try {
58
- n(e);
59
- var t = !1;
60
- } catch {
61
- t = !0;
62
- }
63
- if (t) {
64
- t = console;
65
- var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
66
- return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
67
- }
68
- }
69
- function i(e) {
70
- if (e === v) return "<>";
71
- if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
72
- try {
73
- var n = t(e);
74
- return n ? "<" + n + ">" : "<...>";
75
- } catch {
76
- return "<...>";
77
- }
78
- }
79
- function a() {
80
- var e = j.A;
81
- return e === null ? null : e.getOwner();
82
- }
83
- function o() {
84
- return Error("react-stack-top-frame");
85
- }
86
- function s(e) {
87
- if (M.call(e, "key")) {
88
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
89
- if (t && t.isReactWarning) return !1;
90
- }
91
- return e.key !== void 0;
92
- }
93
- function c(e, t) {
94
- function n() {
95
- F || (F = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
96
- }
97
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
98
- get: n,
99
- configurable: !0
100
- });
101
- }
102
- function l() {
103
- var e = t(this.type);
104
- return I[e] || (I[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
105
- }
106
- function d(e, t, n, r, i, a) {
107
- var o = n.ref;
108
- return e = {
109
- $$typeof: g,
110
- type: e,
111
- key: t,
112
- props: n,
113
- _owner: r
114
- }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
115
- enumerable: !1,
116
- value: null
117
- }) : Object.defineProperty(e, "ref", {
118
- enumerable: !1,
119
- get: l
120
- }), e._store = {}, Object.defineProperty(e._store, "validated", {
121
- configurable: !1,
122
- enumerable: !1,
123
- writable: !0,
124
- value: 0
125
- }), Object.defineProperty(e, "_debugInfo", {
126
- configurable: !1,
127
- enumerable: !1,
128
- writable: !0,
129
- value: null
130
- }), Object.defineProperty(e, "_debugStack", {
131
- configurable: !1,
132
- enumerable: !1,
133
- writable: !0,
134
- value: i
135
- }), Object.defineProperty(e, "_debugTask", {
136
- configurable: !1,
137
- enumerable: !1,
138
- writable: !0,
139
- value: a
140
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
141
- }
142
- function f(e, n, i, o, l, u) {
143
- var f = n.children;
144
- if (f !== void 0) {
145
- if (o) {
146
- if (N(f)) {
147
- for (o = 0; o < f.length; o++) p(f[o]);
148
- Object.freeze && Object.freeze(f);
149
- } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
150
- } else p(f);
151
- }
152
- if (M.call(n, "key")) {
153
- f = t(e);
154
- var m = Object.keys(n).filter(function(e) {
155
- return e !== "key";
156
- });
157
- o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", z[f + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, f, m, f), z[f + o] = !0);
158
- }
159
- if (f = null, i !== void 0 && (r(i), f = "" + i), s(n) && (r(n.key), f = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
160
- else i = n;
161
- return f && c(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, i, a(), l, u);
162
- }
163
- function p(e) {
164
- m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
165
- }
166
- function m(e) {
167
- return typeof e == "object" && !!e && e.$$typeof === g;
168
- }
169
- var h = u("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.view_transition"), A = Symbol.for("react.client.reference"), j = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, N = Array.isArray, P = console.createTask ? console.createTask : function() {
170
- return null;
171
- };
172
- h = { react_stack_bottom_frame: function(e) {
173
- return e();
174
- } };
175
- var F, I = {}, L = h.react_stack_bottom_frame.bind(h, o)(), R = P(i(o)), z = {};
176
- e.Fragment = v, e.jsx = function(e, t, n) {
177
- var r = 1e4 > j.recentlyCreatedOwnerStacks++;
178
- if (r) {
179
- var a = Error.stackTraceLimit;
180
- Error.stackTraceLimit = 10;
181
- var o = Error("react-stack-top-frame");
182
- Error.stackTraceLimit = a;
183
- } else o = L;
184
- return f(e, t, n, !1, o, r ? P(i(e)) : R);
185
- }, e.jsxs = function(e, t, n) {
186
- var r = 1e4 > j.recentlyCreatedOwnerStacks++;
187
- if (r) {
188
- var a = Error.stackTraceLimit;
189
- Error.stackTraceLimit = 10;
190
- var o = Error("react-stack-top-frame");
191
- Error.stackTraceLimit = a;
192
- } else o = L;
193
- return f(e, t, n, !0, o, r ? P(i(e)) : R);
194
- };
195
- })();
196
- })), p = (/* @__PURE__ */ l(((e, t) => {
197
- t.exports = process.env.NODE_ENV === "production" ? d() : f();
198
- })))();
199
- function m({ label: e, icon: t, size: n = "regular", className: r, ...i }) {
200
- return /* @__PURE__ */ (0, p.jsxs)("button", {
1
+ import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ import { createContext as r, useCallback as i, useContext as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
3
+ import { createPortal as d } from "react-dom";
4
+ // src/ribbon/RibbonButton.tsx
5
+ function f({ label: e, icon: r, size: i = "regular", className: a, ...o }) {
6
+ return /* @__PURE__ */ n("button", {
201
7
  type: "button",
202
8
  className: [
203
9
  "ribbon-button",
204
- `ribbon-button--${n}`,
205
- r
10
+ `ribbon-button--${i}`,
11
+ a
206
12
  ].filter(Boolean).join(" "),
207
- ...i,
208
- children: [t ? /* @__PURE__ */ (0, p.jsx)("span", {
13
+ ...o,
14
+ children: [r ? /* @__PURE__ */ t("span", {
209
15
  className: "ribbon-button__icon",
210
16
  "aria-hidden": "true",
211
- children: t
212
- }) : null, /* @__PURE__ */ (0, p.jsx)("span", {
17
+ children: r
18
+ }) : null, /* @__PURE__ */ t("span", {
213
19
  className: "ribbon-button__label",
214
20
  children: e
215
21
  })]
216
22
  });
217
23
  }
218
24
  // src/ribbon/RibbonCarousel.tsx
219
- function h({ parents: e, activeParentId: t, defaultParentId: n, visibleItems: r = 3, onParentChange: i, onItemClick: a }) {
220
- let o = Math.max(1, Math.floor(r)), c = e.filter((e) => !e.disabled), l = e.find((e) => !e.disabled), u = e.some((e) => e.id === n && !e.disabled) ? n : l?.id, [d, f] = s(u), [h, g] = s({
221
- parentId: u,
25
+ function p({ parents: e, activeParentId: r, defaultParentId: i, visibleItems: a = 3, onParentChange: o, onItemClick: s }) {
26
+ let c = Math.max(1, Math.floor(a)), l = e.filter((e) => !e.disabled), d = e.find((e) => !e.disabled), p = e.some((e) => e.id === i && !e.disabled) ? i : d?.id, [m, h] = u(p), [g, _] = u({
27
+ parentId: p,
222
28
  index: 0
223
- }), _ = t ?? d, v = e.find((e) => e.id === _ && !e.disabled) ?? l, y = c.findIndex((e) => e.id === v?.id), b = c.length > 1, x = v?.children ?? [], S = Math.max(1, Math.ceil(x.length / o)), C = h.parentId === v?.id ? Math.min(h.index, S - 1) : 0, w = x.slice(C * o, (C + 1) * o);
224
- function T(e) {
225
- t === void 0 && f(e.id), g({
29
+ }), v = r ?? m, y = e.find((e) => e.id === v && !e.disabled) ?? d, b = l.findIndex((e) => e.id === y?.id), x = l.length > 1, S = y?.children ?? [], C = Math.max(1, Math.ceil(S.length / c)), w = g.parentId === y?.id ? Math.min(g.index, C - 1) : 0, T = S.slice(w * c, (w + 1) * c);
30
+ function E(e) {
31
+ r === void 0 && h(e.id), _({
226
32
  parentId: e.id,
227
33
  index: 0
228
- }), i?.(e.id);
34
+ }), o?.(e.id);
229
35
  }
230
- function E(e) {
231
- if (!b || y < 0) return;
232
- let t = Math.min(c.length - 1, Math.max(0, y + e)), n = c[t];
233
- n && n.id !== v?.id && T(n);
36
+ function D(e) {
37
+ if (!x || b < 0) return;
38
+ let t = Math.min(l.length - 1, Math.max(0, b + e)), n = l[t];
39
+ n && n.id !== y?.id && E(n);
234
40
  }
235
- return e.length === 0 ? /* @__PURE__ */ (0, p.jsx)("p", {
41
+ return e.length === 0 ? /* @__PURE__ */ t("p", {
236
42
  className: "ribbon-carousel__empty",
237
43
  children: "No carousel parents available."
238
- }) : /* @__PURE__ */ (0, p.jsxs)("div", {
44
+ }) : /* @__PURE__ */ n("div", {
239
45
  className: "ribbon-carousel",
240
46
  children: [
241
- /* @__PURE__ */ (0, p.jsxs)("div", {
47
+ /* @__PURE__ */ n("div", {
242
48
  className: "ribbon-carousel__parent-nav",
243
49
  children: [
244
- /* @__PURE__ */ (0, p.jsx)("button", {
50
+ /* @__PURE__ */ t("button", {
245
51
  type: "button",
246
52
  className: "ribbon-carousel__parent-arrow",
247
- disabled: !b || y <= 0,
53
+ disabled: !x || b <= 0,
248
54
  "aria-label": "Previous parent group",
249
- onClick: () => E(-1),
55
+ onClick: () => D(-1),
250
56
  children: "‹"
251
57
  }),
252
- /* @__PURE__ */ (0, p.jsx)("div", {
58
+ /* @__PURE__ */ t("div", {
253
59
  className: "ribbon-carousel__parents",
254
60
  role: "tablist",
255
61
  "aria-label": "Carousel parents",
256
- children: e.map((e) => /* @__PURE__ */ (0, p.jsxs)("button", {
62
+ children: e.map((e) => /* @__PURE__ */ n("button", {
257
63
  type: "button",
258
64
  role: "tab",
259
- className: ["ribbon-carousel__parent", e.id === v?.id ? "is-active" : ""].filter(Boolean).join(" "),
65
+ className: ["ribbon-carousel__parent", e.id === y?.id ? "is-active" : ""].filter(Boolean).join(" "),
260
66
  disabled: e.disabled,
261
- "aria-selected": e.id === v?.id,
262
- onClick: () => T(e),
263
- children: [e.icon ? /* @__PURE__ */ (0, p.jsx)("span", {
67
+ "aria-selected": e.id === y?.id,
68
+ onClick: () => E(e),
69
+ children: [e.icon ? /* @__PURE__ */ t("span", {
264
70
  "aria-hidden": "true",
265
71
  children: e.icon
266
- }) : null, /* @__PURE__ */ (0, p.jsx)("span", { children: e.label })]
72
+ }) : null, /* @__PURE__ */ t("span", { children: e.label })]
267
73
  }, e.id))
268
74
  }),
269
- /* @__PURE__ */ (0, p.jsx)("button", {
75
+ /* @__PURE__ */ t("button", {
270
76
  type: "button",
271
77
  className: "ribbon-carousel__parent-arrow",
272
- disabled: !b || y < 0 || y >= c.length - 1,
78
+ disabled: !x || b < 0 || b >= l.length - 1,
273
79
  "aria-label": "Next parent group",
274
- onClick: () => E(1),
80
+ onClick: () => D(1),
275
81
  children: "›"
276
82
  })
277
83
  ]
278
84
  }),
279
- /* @__PURE__ */ (0, p.jsxs)("div", {
85
+ /* @__PURE__ */ n("div", {
280
86
  className: "ribbon-carousel__items-row",
281
87
  children: [
282
- /* @__PURE__ */ (0, p.jsx)("button", {
88
+ /* @__PURE__ */ t("button", {
283
89
  type: "button",
284
90
  className: "ribbon-carousel__arrow",
285
- disabled: C === 0,
91
+ disabled: w === 0,
286
92
  "aria-label": "Previous carousel items",
287
- onClick: () => g({
288
- parentId: v?.id,
289
- index: Math.max(0, C - 1)
93
+ onClick: () => _({
94
+ parentId: y?.id,
95
+ index: Math.max(0, w - 1)
290
96
  }),
291
97
  children: "‹"
292
98
  }),
293
- /* @__PURE__ */ (0, p.jsxs)("div", {
99
+ /* @__PURE__ */ n("div", {
294
100
  className: "ribbon-carousel__items",
295
101
  role: "tabpanel",
296
102
  "aria-live": "polite",
297
- children: [w.map((e) => /* @__PURE__ */ (0, p.jsx)(m, {
103
+ children: [T.map((e) => /* @__PURE__ */ t(f, {
298
104
  className: "ribbon-carousel__item",
299
105
  label: e.label,
300
106
  icon: e.icon,
301
107
  size: e.size ?? "compact",
302
108
  disabled: e.disabled,
303
109
  onClick: () => {
304
- e.onClick?.(e.id), v && a?.(e, v.id);
110
+ e.onClick?.(e.id), y && s?.(e, y.id);
305
111
  }
306
- }, `${v?.id ?? "parent"}-${e.id}`)), w.length === 0 ? /* @__PURE__ */ (0, p.jsx)("span", {
112
+ }, `${y?.id ?? "parent"}-${e.id}`)), T.length === 0 ? /* @__PURE__ */ t("span", {
307
113
  className: "ribbon-carousel__empty",
308
114
  children: "No items for this parent."
309
115
  }) : null]
310
116
  }),
311
- /* @__PURE__ */ (0, p.jsx)("button", {
117
+ /* @__PURE__ */ t("button", {
312
118
  type: "button",
313
119
  className: "ribbon-carousel__arrow",
314
- disabled: C >= S - 1,
120
+ disabled: w >= C - 1,
315
121
  "aria-label": "Next carousel items",
316
- onClick: () => g({
317
- parentId: v?.id,
318
- index: Math.min(S - 1, C + 1)
122
+ onClick: () => _({
123
+ parentId: y?.id,
124
+ index: Math.min(C - 1, w + 1)
319
125
  }),
320
126
  children: "›"
321
127
  })
322
128
  ]
323
129
  }),
324
- /* @__PURE__ */ (0, p.jsxs)("div", {
130
+ /* @__PURE__ */ n("div", {
325
131
  className: "ribbon-carousel__status",
326
132
  "aria-hidden": "true",
327
133
  children: [
328
- C + 1,
134
+ w + 1,
329
135
  " / ",
330
- S
136
+ C
331
137
  ]
332
138
  })
333
139
  ]
334
140
  });
335
141
  }
336
142
  // src/ribbon/RibbonDropdown.tsx
337
- function g({ label: e, icon: t, size: n = "regular", disabled: a, options: l, onSelect: u }) {
338
- let [d, f] = s(!1), m = o(null), h = o(null), g = o(null), [_, v] = s({
143
+ function m({ label: e, icon: r, size: i = "regular", disabled: a, options: c, onSelect: f }) {
144
+ let [p, m] = u(!1), h = l(null), g = l(null), _ = l(null), [v, y] = u({
339
145
  top: 0,
340
146
  left: 0,
341
147
  width: 170
342
- }), y = i();
343
- function b() {
344
- if (!h.current) return;
345
- let e = h.current.getBoundingClientRect(), t = Math.max(e.width, 170), n = Math.max(44, l.length * 38 + 12), r = window.innerHeight - e.bottom < n && e.top > n ? e.top - n - 4 : e.bottom + 4;
346
- v({
148
+ }), b = s();
149
+ function x() {
150
+ if (!g.current) return;
151
+ let e = g.current.getBoundingClientRect(), t = Math.max(e.width, 170), n = Math.max(44, c.length * 38 + 12), r = window.innerHeight - e.bottom < n && e.top > n ? e.top - n - 4 : e.bottom + 4;
152
+ y({
347
153
  top: Math.max(8, r),
348
154
  left: Math.max(8, Math.min(e.left, window.innerWidth - t - 8)),
349
155
  width: t
350
156
  });
351
157
  }
352
- return r(() => {
158
+ return o(() => {
353
159
  function e(e) {
354
- if (!m.current) return;
355
- let t = e.target, n = m.current.contains(t), r = g.current?.contains(t);
356
- !n && !r && f(!1);
160
+ if (!h.current) return;
161
+ let t = e.target, n = h.current.contains(t), r = _.current?.contains(t);
162
+ !n && !r && m(!1);
357
163
  }
358
164
  function t(e) {
359
- e.key === "Escape" && f(!1);
165
+ e.key === "Escape" && m(!1);
360
166
  }
361
167
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
362
168
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
363
169
  };
364
- }, []), r(() => {
365
- if (!d) return;
366
- b();
170
+ }, []), o(() => {
171
+ if (!p) return;
172
+ x();
367
173
  function e() {
368
- b();
174
+ x();
369
175
  }
370
176
  return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
371
177
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
372
178
  };
373
- }, [d, l.length]), /* @__PURE__ */ (0, p.jsxs)("div", {
374
- ref: m,
179
+ }, [p, c.length]), /* @__PURE__ */ n("div", {
180
+ ref: h,
375
181
  className: [
376
182
  "ribbon-dropdown",
377
- `ribbon-dropdown--${n}`,
378
- d ? "is-open" : ""
183
+ `ribbon-dropdown--${i}`,
184
+ p ? "is-open" : ""
379
185
  ].filter(Boolean).join(" "),
380
- children: [/* @__PURE__ */ (0, p.jsxs)("button", {
381
- ref: h,
186
+ children: [/* @__PURE__ */ n("button", {
187
+ ref: g,
382
188
  type: "button",
383
189
  className: [
384
190
  "ribbon-button",
385
- `ribbon-button--${n}`,
191
+ `ribbon-button--${i}`,
386
192
  "ribbon-dropdown__trigger"
387
193
  ].filter(Boolean).join(" "),
388
194
  disabled: a,
389
195
  "aria-haspopup": "menu",
390
- "aria-expanded": d,
391
- "aria-controls": y,
392
- onClick: () => f((e) => !e),
393
- children: [/* @__PURE__ */ (0, p.jsxs)("span", {
196
+ "aria-expanded": p,
197
+ "aria-controls": b,
198
+ onClick: () => m((e) => !e),
199
+ children: [/* @__PURE__ */ n("span", {
394
200
  className: "ribbon-dropdown__head",
395
- children: [t ? /* @__PURE__ */ (0, p.jsx)("span", {
201
+ children: [r ? /* @__PURE__ */ t("span", {
396
202
  className: "ribbon-button__icon",
397
203
  "aria-hidden": "true",
398
- children: t
399
- }) : null, /* @__PURE__ */ (0, p.jsx)("span", {
204
+ children: r
205
+ }) : null, /* @__PURE__ */ t("span", {
400
206
  className: "ribbon-button__label",
401
207
  children: e
402
208
  })]
403
- }), /* @__PURE__ */ (0, p.jsx)("span", {
209
+ }), /* @__PURE__ */ t("span", {
404
210
  className: "ribbon-dropdown__caret",
405
211
  "aria-hidden": "true",
406
212
  children: "▾"
407
213
  })]
408
- }), d ? c(/* @__PURE__ */ (0, p.jsx)("ul", {
409
- id: y,
410
- ref: g,
214
+ }), p ? d(/* @__PURE__ */ t("ul", {
215
+ id: b,
216
+ ref: _,
411
217
  role: "menu",
412
218
  className: "ribbon-dropdown__menu ribbon-dropdown__menu--portal",
413
219
  "aria-label": `${e} options`,
414
220
  style: {
415
- top: `${_.top}px`,
416
- left: `${_.left}px`,
417
- width: `${_.width}px`
221
+ top: `${v.top}px`,
222
+ left: `${v.left}px`,
223
+ width: `${v.width}px`
418
224
  },
419
- children: l.map((e) => /* @__PURE__ */ (0, p.jsx)("li", {
225
+ children: c.map((e) => /* @__PURE__ */ t("li", {
420
226
  role: "none",
421
227
  className: "ribbon-dropdown__menu-item",
422
- children: /* @__PURE__ */ (0, p.jsxs)("button", {
228
+ children: /* @__PURE__ */ n("button", {
423
229
  type: "button",
424
230
  role: "menuitem",
425
231
  className: "ribbon-dropdown__option-button",
426
232
  onClick: () => {
427
- u(e.id), f(!1);
233
+ f(e.id), m(!1);
428
234
  },
429
- children: [/* @__PURE__ */ (0, p.jsx)("span", {
235
+ children: [/* @__PURE__ */ t("span", {
430
236
  className: "ribbon-dropdown__option-icon",
431
237
  "aria-hidden": "true",
432
238
  children: e.icon ?? "•"
433
- }), /* @__PURE__ */ (0, p.jsx)("span", {
239
+ }), /* @__PURE__ */ t("span", {
434
240
  className: "ribbon-dropdown__option-label",
435
241
  children: e.label
436
242
  })]
@@ -440,55 +246,55 @@ function g({ label: e, icon: t, size: n = "regular", disabled: a, options: l, on
440
246
  });
441
247
  }
442
248
  // src/ribbon/Ribbon.tsx
443
- function _({ tabs: e, groups: t, activeTabId: n, onTabChange: r, onItemClick: i, className: a, ariaLabel: o = "Application ribbon" }) {
444
- return /* @__PURE__ */ (0, p.jsxs)("section", {
445
- className: ["ribbon", a].filter(Boolean).join(" "),
446
- "aria-label": o,
447
- children: [/* @__PURE__ */ (0, p.jsx)("nav", {
249
+ function h({ tabs: e, groups: r, activeTabId: i, onTabChange: a, onItemClick: o, className: s, ariaLabel: c = "Application ribbon" }) {
250
+ return /* @__PURE__ */ n("section", {
251
+ className: ["ribbon", s].filter(Boolean).join(" "),
252
+ "aria-label": c,
253
+ children: [/* @__PURE__ */ t("nav", {
448
254
  className: "ribbon__tabbar",
449
255
  "aria-label": "Ribbon tabs",
450
- children: e.map((e) => /* @__PURE__ */ (0, p.jsx)("button", {
256
+ children: e.map((e) => /* @__PURE__ */ t("button", {
451
257
  type: "button",
452
- className: e.id === n ? "ribbon__tab is-active" : "ribbon__tab",
453
- onClick: () => r(e.id),
454
- "aria-selected": e.id === n,
258
+ className: e.id === i ? "ribbon__tab is-active" : "ribbon__tab",
259
+ onClick: () => a(e.id),
260
+ "aria-selected": e.id === i,
455
261
  role: "tab",
456
262
  children: e.label
457
263
  }, e.id))
458
- }), /* @__PURE__ */ (0, p.jsx)("div", {
264
+ }), /* @__PURE__ */ t("div", {
459
265
  className: "ribbon__surface",
460
266
  role: "tabpanel",
461
- "aria-label": `${n} commands`,
462
- children: t.map((e) => /* @__PURE__ */ (0, p.jsxs)("section", {
267
+ "aria-label": `${i} commands`,
268
+ children: r.map((e) => /* @__PURE__ */ n("section", {
463
269
  className: "ribbon__group",
464
270
  "aria-label": e.title,
465
271
  children: [
466
- /* @__PURE__ */ (0, p.jsx)("div", {
272
+ /* @__PURE__ */ t("div", {
467
273
  className: "ribbon__group-items",
468
- children: (e.items ?? []).map((e) => e.options && e.options.length > 0 ? /* @__PURE__ */ (0, p.jsx)(g, {
274
+ children: (e.items ?? []).map((e) => e.options && e.options.length > 0 ? /* @__PURE__ */ t(m, {
469
275
  label: e.label,
470
276
  icon: e.icon,
471
277
  size: e.size,
472
278
  disabled: e.disabled,
473
279
  options: e.options,
474
280
  onSelect: (t) => {
475
- e.onClick?.(e.id), i?.(e, t);
281
+ e.onClick?.(e.id), o?.(e, t);
476
282
  }
477
- }, e.id) : /* @__PURE__ */ (0, p.jsx)(m, {
283
+ }, e.id) : /* @__PURE__ */ t(f, {
478
284
  label: e.label,
479
285
  icon: e.icon,
480
286
  size: e.size,
481
287
  disabled: e.disabled,
482
288
  onClick: () => {
483
- e.onClick?.(e.id), i?.(e);
289
+ e.onClick?.(e.id), o?.(e);
484
290
  }
485
291
  }, e.id))
486
292
  }),
487
- e.carousel ? /* @__PURE__ */ (0, p.jsx)(h, {
293
+ e.carousel ? /* @__PURE__ */ t(p, {
488
294
  ...e.carousel,
489
- onItemClick: (e, t) => i?.(e, void 0, t)
295
+ onItemClick: (e, t) => o?.(e, void 0, t)
490
296
  }) : null,
491
- /* @__PURE__ */ (0, p.jsx)("h3", {
297
+ /* @__PURE__ */ t("h3", {
492
298
  className: "ribbon__group-title",
493
299
  children: e.title
494
300
  })
@@ -498,44 +304,44 @@ function _({ tabs: e, groups: t, activeTabId: n, onTabChange: r, onItemClick: i,
498
304
  });
499
305
  }
500
306
  // src/ribbon/RibbonSplitButton.tsx
501
- function v({ size: e = "regular", className: t, upperLabel: n, upperIcon: r, upperButtonProps: i, lowerLabel: a, lowerIcon: o, lowerButtonProps: s }) {
502
- return /* @__PURE__ */ (0, p.jsxs)("div", {
307
+ function g({ size: e = "regular", className: r, upperLabel: i, upperIcon: a, upperButtonProps: o, lowerLabel: s, lowerIcon: c, lowerButtonProps: l }) {
308
+ return /* @__PURE__ */ n("div", {
503
309
  className: [
504
310
  "ribbon-split-button",
505
311
  `ribbon-split-button--${e}`,
506
- t
312
+ r
507
313
  ].filter(Boolean).join(" "),
508
314
  role: "group",
509
- "aria-label": `${n} and ${a}`,
510
- children: [/* @__PURE__ */ (0, p.jsxs)("button", {
315
+ "aria-label": `${i} and ${s}`,
316
+ children: [/* @__PURE__ */ n("button", {
511
317
  type: "button",
512
318
  className: "ribbon-split-button__half ribbon-split-button__half--upper",
513
- ...i,
514
- children: [r ? /* @__PURE__ */ (0, p.jsx)("span", {
319
+ ...o,
320
+ children: [a ? /* @__PURE__ */ t("span", {
515
321
  className: "ribbon-split-button__icon",
516
322
  "aria-hidden": "true",
517
- children: r
518
- }) : null, /* @__PURE__ */ (0, p.jsx)("span", {
323
+ children: a
324
+ }) : null, /* @__PURE__ */ t("span", {
519
325
  className: "ribbon-split-button__label",
520
- children: n
326
+ children: i
521
327
  })]
522
- }), /* @__PURE__ */ (0, p.jsxs)("button", {
328
+ }), /* @__PURE__ */ n("button", {
523
329
  type: "button",
524
330
  className: "ribbon-split-button__half ribbon-split-button__half--lower",
525
- ...s,
526
- children: [o ? /* @__PURE__ */ (0, p.jsx)("span", {
331
+ ...l,
332
+ children: [c ? /* @__PURE__ */ t("span", {
527
333
  className: "ribbon-split-button__icon",
528
334
  "aria-hidden": "true",
529
- children: o
530
- }) : null, /* @__PURE__ */ (0, p.jsx)("span", {
335
+ children: c
336
+ }) : null, /* @__PURE__ */ t("span", {
531
337
  className: "ribbon-split-button__label",
532
- children: a
338
+ children: s
533
339
  })]
534
340
  })]
535
341
  });
536
342
  }
537
343
  // src/easy-connectors/client.ts
538
- var y = class {
344
+ var _ = class {
539
345
  baseUrl;
540
346
  apiKey;
541
347
  constructor(e, t) {
@@ -591,26 +397,26 @@ var y = class {
591
397
  }
592
398
  if (r.status !== 204) return await r.json();
593
399
  }
594
- }, b = e(null);
595
- function x({ baseUrl: e = "http://localhost:5088", apiKey: t, client: n, children: r }) {
596
- let i = a(() => ({ client: n ?? new y(e, t) }), [
597
- t,
400
+ }, v = r(null);
401
+ function y({ baseUrl: e = "http://localhost:5088", apiKey: n, client: r, children: i }) {
402
+ let a = c(() => ({ client: r ?? new _(e, n) }), [
403
+ n,
598
404
  e,
599
- n
405
+ r
600
406
  ]);
601
- return /* @__PURE__ */ (0, p.jsx)(b.Provider, {
602
- value: i,
603
- children: r
407
+ return /* @__PURE__ */ t(v.Provider, {
408
+ value: a,
409
+ children: i
604
410
  });
605
411
  }
606
- function S() {
607
- let e = n(b);
412
+ function b() {
413
+ let e = a(v);
608
414
  if (!e) throw Error("useEasyConnectors must be used within EasyConnectorsProvider.");
609
415
  return e;
610
416
  }
611
417
  // src/easy-connectors/ConnectorKindIcon.tsx
612
- function C(e) {
613
- return /* @__PURE__ */ (0, p.jsx)("svg", {
418
+ function x(e) {
419
+ return /* @__PURE__ */ t("svg", {
614
420
  viewBox: "0 0 24 24",
615
421
  fill: "none",
616
422
  stroke: "currentColor",
@@ -621,65 +427,65 @@ function C(e) {
621
427
  ...e
622
428
  });
623
429
  }
624
- function w() {
625
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsx)("path", { d: "M3.5 8.2h6.1l1.5 1.8h9.4" }), /* @__PURE__ */ (0, p.jsx)("path", { d: "M3.5 8.2v8.8a1.5 1.5 0 0 0 1.5 1.5h14a1.5 1.5 0 0 0 1.5-1.5V10a1.8 1.8 0 0 0-1.8-1.8H3.5Z" })] });
430
+ function S() {
431
+ return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("path", { d: "M3.5 8.2h6.1l1.5 1.8h9.4" }), /* @__PURE__ */ t("path", { d: "M3.5 8.2v8.8a1.5 1.5 0 0 0 1.5 1.5h14a1.5 1.5 0 0 0 1.5-1.5V10a1.8 1.8 0 0 0-1.8-1.8H3.5Z" })] });
626
432
  }
627
- function T() {
628
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsx)("rect", {
433
+ function C() {
434
+ return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("rect", {
629
435
  x: "4",
630
436
  y: "5",
631
437
  width: "16",
632
438
  height: "14",
633
439
  rx: "1.5"
634
- }), /* @__PURE__ */ (0, p.jsx)("path", { d: "M4 10h16M9.5 5v14M14.5 5v14" })] });
440
+ }), /* @__PURE__ */ t("path", { d: "M4 10h16M9.5 5v14M14.5 5v14" })] });
635
441
  }
636
- function E() {
637
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsx)("path", { d: "M9 12h6" }), /* @__PURE__ */ (0, p.jsx)("path", { d: "m13 9 3 3-3 3" })] });
442
+ function w() {
443
+ return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("path", { d: "M9 12h6" }), /* @__PURE__ */ t("path", { d: "m13 9 3 3-3 3" })] });
638
444
  }
639
- function D() {
640
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsx)("rect", {
445
+ function T() {
446
+ return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("rect", {
641
447
  x: "8",
642
448
  y: "11",
643
449
  width: "8",
644
450
  height: "7",
645
451
  rx: "1.2"
646
- }), /* @__PURE__ */ (0, p.jsx)("path", { d: "M10 11V9a2 2 0 1 1 4 0v2" })] });
452
+ }), /* @__PURE__ */ t("path", { d: "M10 11V9a2 2 0 1 1 4 0v2" })] });
647
453
  }
648
- function O({ kind: e, className: t, ...n }) {
649
- return /* @__PURE__ */ (0, p.jsxs)(C, {
650
- className: ["ec-kind-icon", t].filter(Boolean).join(" "),
651
- ...n,
454
+ function E({ kind: r, className: i, ...a }) {
455
+ return /* @__PURE__ */ n(x, {
456
+ className: ["ec-kind-icon", i].filter(Boolean).join(" "),
457
+ ...a,
652
458
  children: [
653
- e === "FolderToFolder" ? /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsx)(w, {}), /* @__PURE__ */ (0, p.jsx)(E, {})] }) : null,
654
- e === "FolderToTable" ? /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
655
- /* @__PURE__ */ (0, p.jsx)(w, {}),
656
- /* @__PURE__ */ (0, p.jsx)(E, {}),
657
- /* @__PURE__ */ (0, p.jsx)("path", { d: "M17 6.5h3" }),
658
- /* @__PURE__ */ (0, p.jsx)("path", { d: "M18.5 5v3" })
459
+ r === "FolderToFolder" ? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(S, {}), /* @__PURE__ */ t(w, {})] }) : null,
460
+ r === "FolderToTable" ? /* @__PURE__ */ n(e, { children: [
461
+ /* @__PURE__ */ t(S, {}),
462
+ /* @__PURE__ */ t(w, {}),
463
+ /* @__PURE__ */ t("path", { d: "M17 6.5h3" }),
464
+ /* @__PURE__ */ t("path", { d: "M18.5 5v3" })
659
465
  ] }) : null,
660
- e === "TableToFolder" ? /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
661
- /* @__PURE__ */ (0, p.jsx)(T, {}),
662
- /* @__PURE__ */ (0, p.jsx)("path", { d: "M7 12h10" }),
663
- /* @__PURE__ */ (0, p.jsx)("path", { d: "m11 9-3 3 3 3" }),
664
- /* @__PURE__ */ (0, p.jsx)(w, {})
466
+ r === "TableToFolder" ? /* @__PURE__ */ n(e, { children: [
467
+ /* @__PURE__ */ t(C, {}),
468
+ /* @__PURE__ */ t("path", { d: "M7 12h10" }),
469
+ /* @__PURE__ */ t("path", { d: "m11 9-3 3 3 3" }),
470
+ /* @__PURE__ */ t(S, {})
665
471
  ] }) : null,
666
- e === "FolderToSftp" ? /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
667
- /* @__PURE__ */ (0, p.jsx)(w, {}),
668
- /* @__PURE__ */ (0, p.jsx)(E, {}),
669
- /* @__PURE__ */ (0, p.jsx)(D, {})
472
+ r === "FolderToSftp" ? /* @__PURE__ */ n(e, { children: [
473
+ /* @__PURE__ */ t(S, {}),
474
+ /* @__PURE__ */ t(w, {}),
475
+ /* @__PURE__ */ t(T, {})
670
476
  ] }) : null,
671
- e === "SftpToFolder" ? /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
672
- /* @__PURE__ */ (0, p.jsx)(D, {}),
673
- /* @__PURE__ */ (0, p.jsx)("path", { d: "M8 12h6" }),
674
- /* @__PURE__ */ (0, p.jsx)("path", { d: "m11 9-3 3 3 3" }),
675
- /* @__PURE__ */ (0, p.jsx)(w, {})
477
+ r === "SftpToFolder" ? /* @__PURE__ */ n(e, { children: [
478
+ /* @__PURE__ */ t(T, {}),
479
+ /* @__PURE__ */ t("path", { d: "M8 12h6" }),
480
+ /* @__PURE__ */ t("path", { d: "m11 9-3 3 3 3" }),
481
+ /* @__PURE__ */ t(S, {})
676
482
  ] }) : null
677
483
  ]
678
484
  });
679
485
  }
680
486
  // src/easy-connectors/EndpointKindIcon.tsx
681
- function k(e) {
682
- return /* @__PURE__ */ (0, p.jsx)("svg", {
487
+ function D(e) {
488
+ return /* @__PURE__ */ t("svg", {
683
489
  viewBox: "0 0 24 24",
684
490
  fill: "none",
685
491
  stroke: "currentColor",
@@ -690,45 +496,45 @@ function k(e) {
690
496
  ...e
691
497
  });
692
498
  }
693
- function A() {
694
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsx)("path", { d: "M3.5 8.2h6.1l1.5 1.8h9.4" }), /* @__PURE__ */ (0, p.jsx)("path", { d: "M3.5 8.2v8.8a1.5 1.5 0 0 0 1.5 1.5h14a1.5 1.5 0 0 0 1.5-1.5V10a1.8 1.8 0 0 0-1.8-1.8H3.5Z" })] });
499
+ function O() {
500
+ return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("path", { d: "M3.5 8.2h6.1l1.5 1.8h9.4" }), /* @__PURE__ */ t("path", { d: "M3.5 8.2v8.8a1.5 1.5 0 0 0 1.5 1.5h14a1.5 1.5 0 0 0 1.5-1.5V10a1.8 1.8 0 0 0-1.8-1.8H3.5Z" })] });
695
501
  }
696
- function j() {
697
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsx)("rect", {
502
+ function k() {
503
+ return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("rect", {
698
504
  x: "4",
699
505
  y: "5",
700
506
  width: "16",
701
507
  height: "14",
702
508
  rx: "1.5"
703
- }), /* @__PURE__ */ (0, p.jsx)("path", { d: "M4 10h16M9.5 5v14M14.5 5v14" })] });
509
+ }), /* @__PURE__ */ t("path", { d: "M4 10h16M9.5 5v14M14.5 5v14" })] });
704
510
  }
705
- function M() {
706
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
707
- /* @__PURE__ */ (0, p.jsx)("rect", {
511
+ function A() {
512
+ return /* @__PURE__ */ n(e, { children: [
513
+ /* @__PURE__ */ t("rect", {
708
514
  x: "8",
709
515
  y: "11",
710
516
  width: "8",
711
517
  height: "7",
712
518
  rx: "1.2"
713
519
  }),
714
- /* @__PURE__ */ (0, p.jsx)("path", { d: "M10 11V9a2 2 0 1 1 4 0v2" }),
715
- /* @__PURE__ */ (0, p.jsx)("path", { d: "M3 17h3" }),
716
- /* @__PURE__ */ (0, p.jsx)("path", { d: "M18 17h3" })
520
+ /* @__PURE__ */ t("path", { d: "M10 11V9a2 2 0 1 1 4 0v2" }),
521
+ /* @__PURE__ */ t("path", { d: "M3 17h3" }),
522
+ /* @__PURE__ */ t("path", { d: "M18 17h3" })
717
523
  ] });
718
524
  }
719
- function N({ endpoint: e, className: t, ...n }) {
720
- return /* @__PURE__ */ (0, p.jsxs)(k, {
721
- className: ["ec-endpoint-icon", t].filter(Boolean).join(" "),
722
- ...n,
525
+ function j({ endpoint: e, className: r, ...i }) {
526
+ return /* @__PURE__ */ n(D, {
527
+ className: ["ec-endpoint-icon", r].filter(Boolean).join(" "),
528
+ ...i,
723
529
  children: [
724
- e === "Folder" ? /* @__PURE__ */ (0, p.jsx)(A, {}) : null,
725
- e === "Table" ? /* @__PURE__ */ (0, p.jsx)(j, {}) : null,
726
- e === "Sftp" ? /* @__PURE__ */ (0, p.jsx)(M, {}) : null
530
+ e === "Folder" ? /* @__PURE__ */ t(O, {}) : null,
531
+ e === "Table" ? /* @__PURE__ */ t(k, {}) : null,
532
+ e === "Sftp" ? /* @__PURE__ */ t(A, {}) : null
727
533
  ]
728
534
  });
729
535
  }
730
536
  // src/easy-connectors/connector-flow.ts
731
- function P(e) {
537
+ function M(e) {
732
538
  switch (e) {
733
539
  case "FolderToFolder": return {
734
540
  source: "Folder",
@@ -757,125 +563,125 @@ function P(e) {
757
563
  }
758
564
  }
759
565
  // src/easy-connectors/ConnectorBoard.tsx
760
- function F({ selectedConnectorId: e, refreshToken: n, onSelect: i, onCreate: a }) {
761
- let { client: o } = S(), [c, l] = s([]), [u, d] = s(!1), [f, m] = s(null), h = t(async () => {
762
- d(!0), m(null);
566
+ function N({ selectedConnectorId: e, refreshToken: r, onSelect: a, onCreate: s }) {
567
+ let { client: c } = b(), [l, d] = u([]), [f, p] = u(!1), [m, h] = u(null), g = i(async () => {
568
+ p(!0), h(null);
763
569
  try {
764
- l(await o.listConnectors());
570
+ d(await c.listConnectors());
765
571
  } catch (e) {
766
- m(e instanceof Error ? e.message : "Failed to load connectors.");
572
+ h(e instanceof Error ? e.message : "Failed to load connectors.");
767
573
  } finally {
768
- d(!1);
574
+ p(!1);
769
575
  }
770
- }, [o]);
771
- r(() => {
772
- h();
773
- }, [h, n]);
774
- async function g(e) {
775
- m(null);
576
+ }, [c]);
577
+ o(() => {
578
+ g();
579
+ }, [g, r]);
580
+ async function _(e) {
581
+ h(null);
776
582
  try {
777
- await e(), await h();
583
+ await e(), await g();
778
584
  } catch (e) {
779
- m(e instanceof Error ? e.message : "Action failed.");
585
+ h(e instanceof Error ? e.message : "Action failed.");
780
586
  }
781
587
  }
782
- return /* @__PURE__ */ (0, p.jsxs)("section", {
588
+ return /* @__PURE__ */ n("section", {
783
589
  className: "ec-board",
784
590
  children: [
785
- /* @__PURE__ */ (0, p.jsxs)("header", {
591
+ /* @__PURE__ */ n("header", {
786
592
  className: "ec-board__header",
787
- children: [/* @__PURE__ */ (0, p.jsx)("h2", { children: "Connectors" }), /* @__PURE__ */ (0, p.jsxs)("div", {
593
+ children: [/* @__PURE__ */ t("h2", { children: "Connectors" }), /* @__PURE__ */ n("div", {
788
594
  className: "ec-board__header-actions",
789
- children: [/* @__PURE__ */ (0, p.jsx)("button", {
595
+ children: [/* @__PURE__ */ t("button", {
790
596
  type: "button",
791
- onClick: h,
597
+ onClick: g,
792
598
  children: "Refresh"
793
- }), /* @__PURE__ */ (0, p.jsx)("button", {
599
+ }), /* @__PURE__ */ t("button", {
794
600
  type: "button",
795
601
  className: "ec-primary",
796
- onClick: a,
602
+ onClick: s,
797
603
  children: "New"
798
604
  })]
799
605
  })]
800
606
  }),
801
- f ? /* @__PURE__ */ (0, p.jsx)("p", {
607
+ m ? /* @__PURE__ */ t("p", {
802
608
  className: "ec-error",
803
- children: f
609
+ children: m
804
610
  }) : null,
805
- u ? /* @__PURE__ */ (0, p.jsx)("p", {
611
+ f ? /* @__PURE__ */ t("p", {
806
612
  className: "ec-muted",
807
613
  children: "Loading..."
808
614
  }) : null,
809
- /* @__PURE__ */ (0, p.jsx)("ul", {
615
+ /* @__PURE__ */ t("ul", {
810
616
  className: "ec-board__list",
811
- children: c.map((t) => (() => {
812
- let n = P(t.kind);
813
- return /* @__PURE__ */ (0, p.jsxs)("li", {
814
- className: ["ec-board__item", e === t.id ? "is-selected" : ""].filter(Boolean).join(" "),
815
- children: [/* @__PURE__ */ (0, p.jsxs)("button", {
617
+ children: l.map((r) => (() => {
618
+ let i = M(r.kind);
619
+ return /* @__PURE__ */ n("li", {
620
+ className: ["ec-board__item", e === r.id ? "is-selected" : ""].filter(Boolean).join(" "),
621
+ children: [/* @__PURE__ */ n("button", {
816
622
  type: "button",
817
623
  className: "ec-board__item-main",
818
- onClick: () => t.id && i?.(t.id),
624
+ onClick: () => r.id && a?.(r.id),
819
625
  children: [
820
- /* @__PURE__ */ (0, p.jsxs)("span", {
626
+ /* @__PURE__ */ n("span", {
821
627
  className: "ec-board__name-row",
822
- children: [/* @__PURE__ */ (0, p.jsx)(O, { kind: t.kind }), /* @__PURE__ */ (0, p.jsx)("span", {
628
+ children: [/* @__PURE__ */ t(E, { kind: r.kind }), /* @__PURE__ */ t("span", {
823
629
  className: "ec-board__name",
824
- children: t.name
630
+ children: r.name
825
631
  })]
826
632
  }),
827
- /* @__PURE__ */ (0, p.jsxs)("span", {
633
+ /* @__PURE__ */ n("span", {
828
634
  className: "ec-flow",
829
- "aria-label": `Flow ${n.source} to ${n.destination}`,
635
+ "aria-label": `Flow ${i.source} to ${i.destination}`,
830
636
  children: [
831
- /* @__PURE__ */ (0, p.jsxs)("span", {
637
+ /* @__PURE__ */ n("span", {
832
638
  className: "ec-flow__node",
833
- children: [/* @__PURE__ */ (0, p.jsx)(N, { endpoint: n.source }), /* @__PURE__ */ (0, p.jsx)("span", { children: n.source })]
639
+ children: [/* @__PURE__ */ t(j, { endpoint: i.source }), /* @__PURE__ */ t("span", { children: i.source })]
834
640
  }),
835
- /* @__PURE__ */ (0, p.jsx)("span", {
641
+ /* @__PURE__ */ t("span", {
836
642
  className: "ec-flow__arrow",
837
643
  "aria-hidden": "true",
838
644
  children: "->"
839
645
  }),
840
- /* @__PURE__ */ (0, p.jsxs)("span", {
646
+ /* @__PURE__ */ n("span", {
841
647
  className: "ec-flow__connector",
842
- children: [/* @__PURE__ */ (0, p.jsx)(O, {
843
- kind: t.kind,
648
+ children: [/* @__PURE__ */ t(E, {
649
+ kind: r.kind,
844
650
  className: "ec-kind-icon--chip"
845
- }), /* @__PURE__ */ (0, p.jsx)("span", { children: "Connector" })]
651
+ }), /* @__PURE__ */ t("span", { children: "Connector" })]
846
652
  }),
847
- /* @__PURE__ */ (0, p.jsx)("span", {
653
+ /* @__PURE__ */ t("span", {
848
654
  className: "ec-flow__arrow",
849
655
  "aria-hidden": "true",
850
656
  children: "->"
851
657
  }),
852
- /* @__PURE__ */ (0, p.jsxs)("span", {
658
+ /* @__PURE__ */ n("span", {
853
659
  className: "ec-flow__node",
854
- children: [/* @__PURE__ */ (0, p.jsx)(N, { endpoint: n.destination }), /* @__PURE__ */ (0, p.jsx)("span", { children: n.destination })]
660
+ children: [/* @__PURE__ */ t(j, { endpoint: i.destination }), /* @__PURE__ */ t("span", { children: i.destination })]
855
661
  })
856
662
  ]
857
663
  }),
858
- /* @__PURE__ */ (0, p.jsx)("span", {
859
- className: `ec-status ec-status--${(t.status ?? "Idle").toLowerCase()}`,
860
- children: t.status ?? "Idle"
664
+ /* @__PURE__ */ t("span", {
665
+ className: `ec-status ec-status--${(r.status ?? "Idle").toLowerCase()}`,
666
+ children: r.status ?? "Idle"
861
667
  })
862
668
  ]
863
- }), /* @__PURE__ */ (0, p.jsxs)("div", {
669
+ }), /* @__PURE__ */ n("div", {
864
670
  className: "ec-board__item-actions",
865
- children: [/* @__PURE__ */ (0, p.jsx)("button", {
671
+ children: [/* @__PURE__ */ t("button", {
866
672
  type: "button",
867
- onClick: () => t.id && g(() => o.runConnector(t.id)),
673
+ onClick: () => r.id && _(() => c.runConnector(r.id)),
868
674
  children: "Run now"
869
- }), /* @__PURE__ */ (0, p.jsx)("button", {
675
+ }), /* @__PURE__ */ t("button", {
870
676
  type: "button",
871
- onClick: () => t.id && g(() => t.status === "Disabled" ? o.enableConnector(t.id) : o.disableConnector(t.id)),
872
- children: t.status === "Disabled" ? "Enable" : "Disable"
677
+ onClick: () => r.id && _(() => r.status === "Disabled" ? c.enableConnector(r.id) : c.disableConnector(r.id)),
678
+ children: r.status === "Disabled" ? "Enable" : "Disable"
873
679
  })]
874
680
  })]
875
- }, t.id);
681
+ }, r.id);
876
682
  })())
877
683
  }),
878
- c.length === 0 && !u ? /* @__PURE__ */ (0, p.jsx)("p", {
684
+ l.length === 0 && !f ? /* @__PURE__ */ t("p", {
879
685
  className: "ec-muted",
880
686
  children: "No connectors yet. Create one to start transferring."
881
687
  }) : null
@@ -883,20 +689,20 @@ function F({ selectedConnectorId: e, refreshToken: n, onSelect: i, onCreate: a }
883
689
  });
884
690
  }
885
691
  // src/easy-connectors/ConnectorForm.tsx
886
- var I = [
692
+ var P = [
887
693
  "FolderToFolder",
888
694
  "FolderToTable",
889
695
  "TableToFolder",
890
696
  "FolderToSftp",
891
697
  "SftpToFolder"
892
- ], L = ["Copy", "Move"], R = [
698
+ ], F = ["Copy", "Move"], I = [
893
699
  "Manual",
894
700
  "Interval",
895
701
  "Daily",
896
702
  "OnCreated",
897
703
  "OnUpdated"
898
- ], z = ["Sqlite", "SqlServer"];
899
- function B() {
704
+ ], L = ["Sqlite", "SqlServer"];
705
+ function R() {
900
706
  return {
901
707
  name: "New connector",
902
708
  kind: "FolderToFolder",
@@ -913,33 +719,33 @@ function B() {
913
719
  tableName: ""
914
720
  };
915
721
  }
916
- function V({ connectorId: e, onSaved: t }) {
917
- let { client: n } = S(), [i, o] = s(B()), [c, l] = s(""), [u, d] = s(!1), [f, m] = s(!1), [h, g] = s(null), [_, v] = s(null);
918
- r(() => {
919
- if (!e) {
920
- o(B()), l(""), g(null), v(null);
722
+ function z({ connectorId: r, onSaved: i }) {
723
+ let { client: a } = b(), [s, l] = u(R()), [d, f] = u(""), [p, m] = u(!1), [h, g] = u(!1), [_, v] = u(null), [y, x] = u(null);
724
+ o(() => {
725
+ if (!r) {
726
+ l(R()), f(""), v(null), x(null);
921
727
  return;
922
728
  }
923
- let t = !1;
924
- return d(!0), g(null), n.getConnector(e).then((e) => {
925
- t || (o(e), l((e.keyColumns ?? []).join(", ")));
926
- }).catch((e) => {
927
- t || g(e instanceof Error ? e.message : "Failed to load connector.");
729
+ let e = !1;
730
+ return m(!0), v(null), a.getConnector(r).then((t) => {
731
+ e || (l(t), f((t.keyColumns ?? []).join(", ")));
732
+ }).catch((t) => {
733
+ e || v(t instanceof Error ? t.message : "Failed to load connector.");
928
734
  }).finally(() => {
929
- t || d(!1);
735
+ e || m(!1);
930
736
  }), () => {
931
- t = !0;
737
+ e = !0;
932
738
  };
933
- }, [n, e]);
934
- let y = a(() => P(i.kind), [i.kind]);
935
- function b(e, t) {
936
- o((n) => ({
739
+ }, [a, r]);
740
+ let S = c(() => M(s.kind), [s.kind]);
741
+ function C(e, t) {
742
+ l((n) => ({
937
743
  ...n,
938
744
  [e]: t
939
745
  }));
940
746
  }
941
- function x(e) {
942
- o((t) => {
747
+ function w(e) {
748
+ l((t) => {
943
749
  let n = t.triggers.includes(e) ? t.triggers.filter((t) => t !== e) : [...t.triggers, e];
944
750
  return {
945
751
  ...t,
@@ -947,359 +753,359 @@ function V({ connectorId: e, onSaved: t }) {
947
753
  };
948
754
  });
949
755
  }
950
- async function C() {
951
- m(!0), g(null), v(null);
952
- let r = {
953
- ...i,
954
- keyColumns: c.split(",").map((e) => e.trim()).filter(Boolean)
756
+ async function T() {
757
+ g(!0), v(null), x(null);
758
+ let e = {
759
+ ...s,
760
+ keyColumns: d.split(",").map((e) => e.trim()).filter(Boolean)
955
761
  };
956
762
  try {
957
- let i = e ? await n.updateConnector(e, r) : await n.createConnector(r);
958
- o(i), l((i.keyColumns ?? []).join(", ")), v("Connector saved."), t?.(i);
763
+ let t = r ? await a.updateConnector(r, e) : await a.createConnector(e);
764
+ l(t), f((t.keyColumns ?? []).join(", ")), x("Connector saved."), i?.(t);
959
765
  } catch (e) {
960
- g(e instanceof Error ? e.message : "Save failed.");
766
+ v(e instanceof Error ? e.message : "Save failed.");
961
767
  } finally {
962
- m(!1);
768
+ g(!1);
963
769
  }
964
770
  }
965
- function w(e) {
966
- return e === "source" ? /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
967
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Source path", /* @__PURE__ */ (0, p.jsx)("input", {
968
- value: i.sourcePath ?? "",
969
- onChange: (e) => b("sourcePath", e.target.value)
771
+ function D(r) {
772
+ return r === "source" ? /* @__PURE__ */ n(e, { children: [
773
+ /* @__PURE__ */ n("label", { children: ["Source path", /* @__PURE__ */ t("input", {
774
+ value: s.sourcePath ?? "",
775
+ onChange: (e) => C("sourcePath", e.target.value)
970
776
  })] }),
971
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Pattern", /* @__PURE__ */ (0, p.jsx)("input", {
972
- value: i.pattern ?? "",
973
- onChange: (e) => b("pattern", e.target.value)
777
+ /* @__PURE__ */ n("label", { children: ["Pattern", /* @__PURE__ */ t("input", {
778
+ value: s.pattern ?? "",
779
+ onChange: (e) => C("pattern", e.target.value)
974
780
  })] }),
975
- /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("span", { children: "Recursive" }), /* @__PURE__ */ (0, p.jsx)("input", {
781
+ /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Recursive" }), /* @__PURE__ */ t("input", {
976
782
  type: "checkbox",
977
- checked: i.recursive ?? !1,
978
- onChange: (e) => b("recursive", e.target.checked)
783
+ checked: s.recursive ?? !1,
784
+ onChange: (e) => C("recursive", e.target.checked)
979
785
  })] })
980
- ] }) : /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [/* @__PURE__ */ (0, p.jsxs)("label", { children: ["Destination path", /* @__PURE__ */ (0, p.jsx)("input", {
981
- value: i.destinationPath ?? "",
982
- onChange: (e) => b("destinationPath", e.target.value)
983
- })] }), /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("span", { children: "Overwrite" }), /* @__PURE__ */ (0, p.jsx)("input", {
786
+ ] }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", { children: ["Destination path", /* @__PURE__ */ t("input", {
787
+ value: s.destinationPath ?? "",
788
+ onChange: (e) => C("destinationPath", e.target.value)
789
+ })] }), /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Overwrite" }), /* @__PURE__ */ t("input", {
984
790
  type: "checkbox",
985
- checked: i.overwrite ?? !1,
986
- onChange: (e) => b("overwrite", e.target.checked)
791
+ checked: s.overwrite ?? !1,
792
+ onChange: (e) => C("overwrite", e.target.checked)
987
793
  })] })] });
988
794
  }
989
- function T() {
990
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
991
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Provider", /* @__PURE__ */ (0, p.jsx)("select", {
992
- value: i.provider ?? "SqlServer",
993
- onChange: (e) => b("provider", e.target.value),
994
- children: z.map((e) => /* @__PURE__ */ (0, p.jsx)("option", {
795
+ function O() {
796
+ return /* @__PURE__ */ n(e, { children: [
797
+ /* @__PURE__ */ n("label", { children: ["Provider", /* @__PURE__ */ t("select", {
798
+ value: s.provider ?? "SqlServer",
799
+ onChange: (e) => C("provider", e.target.value),
800
+ children: L.map((e) => /* @__PURE__ */ t("option", {
995
801
  value: e,
996
802
  children: e
997
803
  }, e))
998
804
  })] }),
999
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Table name", /* @__PURE__ */ (0, p.jsx)("input", {
1000
- value: i.tableName ?? "",
1001
- onChange: (e) => b("tableName", e.target.value)
805
+ /* @__PURE__ */ n("label", { children: ["Table name", /* @__PURE__ */ t("input", {
806
+ value: s.tableName ?? "",
807
+ onChange: (e) => C("tableName", e.target.value)
1002
808
  })] }),
1003
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Schema", /* @__PURE__ */ (0, p.jsx)("input", {
1004
- value: i.schema ?? "",
1005
- onChange: (e) => b("schema", e.target.value)
809
+ /* @__PURE__ */ n("label", { children: ["Schema", /* @__PURE__ */ t("input", {
810
+ value: s.schema ?? "",
811
+ onChange: (e) => C("schema", e.target.value)
1006
812
  })] }),
1007
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Key columns (comma separated)", /* @__PURE__ */ (0, p.jsx)("input", {
1008
- value: c,
1009
- onChange: (e) => l(e.target.value)
813
+ /* @__PURE__ */ n("label", { children: ["Key columns (comma separated)", /* @__PURE__ */ t("input", {
814
+ value: d,
815
+ onChange: (e) => f(e.target.value)
1010
816
  })] }),
1011
- /* @__PURE__ */ (0, p.jsxs)("label", {
817
+ /* @__PURE__ */ n("label", {
1012
818
  className: "ec-grid__wide",
1013
- children: ["Connection string", /* @__PURE__ */ (0, p.jsx)("input", {
1014
- value: i.connectionString ?? "",
1015
- onChange: (e) => b("connectionString", e.target.value)
819
+ children: ["Connection string", /* @__PURE__ */ t("input", {
820
+ value: s.connectionString ?? "",
821
+ onChange: (e) => C("connectionString", e.target.value)
1016
822
  })]
1017
823
  }),
1018
- /* @__PURE__ */ (0, p.jsxs)("label", {
824
+ /* @__PURE__ */ n("label", {
1019
825
  className: "ec-grid__wide",
1020
- children: ["Where clause", /* @__PURE__ */ (0, p.jsx)("input", {
1021
- value: i.whereClause ?? "",
1022
- onChange: (e) => b("whereClause", e.target.value)
826
+ children: ["Where clause", /* @__PURE__ */ t("input", {
827
+ value: s.whereClause ?? "",
828
+ onChange: (e) => C("whereClause", e.target.value)
1023
829
  })]
1024
830
  })
1025
831
  ] });
1026
832
  }
1027
- function E(e) {
1028
- return /* @__PURE__ */ (0, p.jsxs)(p.Fragment, { children: [
1029
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["SFTP host", /* @__PURE__ */ (0, p.jsx)("input", {
1030
- value: i.sftpHost ?? "",
1031
- onChange: (e) => b("sftpHost", e.target.value)
833
+ function k(r) {
834
+ return /* @__PURE__ */ n(e, { children: [
835
+ /* @__PURE__ */ n("label", { children: ["SFTP host", /* @__PURE__ */ t("input", {
836
+ value: s.sftpHost ?? "",
837
+ onChange: (e) => C("sftpHost", e.target.value)
1032
838
  })] }),
1033
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Port", /* @__PURE__ */ (0, p.jsx)("input", {
839
+ /* @__PURE__ */ n("label", { children: ["Port", /* @__PURE__ */ t("input", {
1034
840
  type: "number",
1035
841
  min: 1,
1036
- value: i.sftpPort ?? 22,
1037
- onChange: (e) => b("sftpPort", Number(e.target.value) || 22)
842
+ value: s.sftpPort ?? 22,
843
+ onChange: (e) => C("sftpPort", Number(e.target.value) || 22)
1038
844
  })] }),
1039
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Remote path", /* @__PURE__ */ (0, p.jsx)("input", {
1040
- value: i.remotePath ?? "",
1041
- onChange: (e) => b("remotePath", e.target.value)
845
+ /* @__PURE__ */ n("label", { children: ["Remote path", /* @__PURE__ */ t("input", {
846
+ value: s.remotePath ?? "",
847
+ onChange: (e) => C("remotePath", e.target.value)
1042
848
  })] }),
1043
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Username", /* @__PURE__ */ (0, p.jsx)("input", {
1044
- value: i.sftpUsername ?? "",
1045
- onChange: (e) => b("sftpUsername", e.target.value)
849
+ /* @__PURE__ */ n("label", { children: ["Username", /* @__PURE__ */ t("input", {
850
+ value: s.sftpUsername ?? "",
851
+ onChange: (e) => C("sftpUsername", e.target.value)
1046
852
  })] }),
1047
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Password", /* @__PURE__ */ (0, p.jsx)("input", {
853
+ /* @__PURE__ */ n("label", { children: ["Password", /* @__PURE__ */ t("input", {
1048
854
  type: "password",
1049
- value: i.sftpPassword ?? "",
1050
- onChange: (e) => b("sftpPassword", e.target.value)
855
+ value: s.sftpPassword ?? "",
856
+ onChange: (e) => C("sftpPassword", e.target.value)
1051
857
  })] }),
1052
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Private key path", /* @__PURE__ */ (0, p.jsx)("input", {
1053
- value: i.privateKeyPath ?? "",
1054
- onChange: (e) => b("privateKeyPath", e.target.value)
858
+ /* @__PURE__ */ n("label", { children: ["Private key path", /* @__PURE__ */ t("input", {
859
+ value: s.privateKeyPath ?? "",
860
+ onChange: (e) => C("privateKeyPath", e.target.value)
1055
861
  })] }),
1056
- /* @__PURE__ */ (0, p.jsxs)("label", {
862
+ /* @__PURE__ */ n("label", {
1057
863
  className: "ec-grid__wide",
1058
- children: ["Host key SHA256", /* @__PURE__ */ (0, p.jsx)("input", {
1059
- value: i.hostKeySha256 ?? "",
1060
- onChange: (e) => b("hostKeySha256", e.target.value)
864
+ children: ["Host key SHA256", /* @__PURE__ */ t("input", {
865
+ value: s.hostKeySha256 ?? "",
866
+ onChange: (e) => C("hostKeySha256", e.target.value)
1061
867
  })]
1062
868
  }),
1063
- /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("span", { children: "Accept any host key" }), /* @__PURE__ */ (0, p.jsx)("input", {
869
+ /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Accept any host key" }), /* @__PURE__ */ t("input", {
1064
870
  type: "checkbox",
1065
- checked: i.acceptAnyHostKey ?? !1,
1066
- onChange: (e) => b("acceptAnyHostKey", e.target.checked)
871
+ checked: s.acceptAnyHostKey ?? !1,
872
+ onChange: (e) => C("acceptAnyHostKey", e.target.checked)
1067
873
  })] }),
1068
- e === "destination" ? /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("span", { children: "Overwrite" }), /* @__PURE__ */ (0, p.jsx)("input", {
874
+ r === "destination" ? /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Overwrite" }), /* @__PURE__ */ t("input", {
1069
875
  type: "checkbox",
1070
- checked: i.overwrite ?? !1,
1071
- onChange: (e) => b("overwrite", e.target.checked)
876
+ checked: s.overwrite ?? !1,
877
+ onChange: (e) => C("overwrite", e.target.checked)
1072
878
  })] }) : null
1073
879
  ] });
1074
880
  }
1075
- function D(e, t) {
1076
- return e === "Folder" ? w(t) : e === "Table" ? T() : E(t);
881
+ function A(e, t) {
882
+ return e === "Folder" ? D(t) : e === "Table" ? O() : k(t);
1077
883
  }
1078
- function k(e) {
884
+ function N(e) {
1079
885
  return e === "Sftp" ? "SFTP" : e;
1080
886
  }
1081
- return /* @__PURE__ */ (0, p.jsxs)("section", {
887
+ return /* @__PURE__ */ n("section", {
1082
888
  className: "ec-form",
1083
889
  children: [
1084
- /* @__PURE__ */ (0, p.jsx)("header", {
890
+ /* @__PURE__ */ t("header", {
1085
891
  className: "ec-form__header",
1086
- children: /* @__PURE__ */ (0, p.jsx)("h3", { children: e ? "Edit connector" : "Create connector" })
892
+ children: /* @__PURE__ */ t("h3", { children: r ? "Edit connector" : "Create connector" })
1087
893
  }),
1088
- u ? /* @__PURE__ */ (0, p.jsx)("p", {
894
+ p ? /* @__PURE__ */ t("p", {
1089
895
  className: "ec-muted",
1090
896
  children: "Loading connector..."
1091
897
  }) : null,
1092
- h ? /* @__PURE__ */ (0, p.jsx)("p", {
898
+ _ ? /* @__PURE__ */ t("p", {
1093
899
  className: "ec-error",
1094
- children: h
900
+ children: _
1095
901
  }) : null,
1096
- _ ? /* @__PURE__ */ (0, p.jsx)("p", {
902
+ y ? /* @__PURE__ */ t("p", {
1097
903
  className: "ec-success",
1098
- children: _
904
+ children: y
1099
905
  }) : null,
1100
- /* @__PURE__ */ (0, p.jsxs)("div", {
906
+ /* @__PURE__ */ n("div", {
1101
907
  className: "ec-grid ec-grid--meta",
1102
908
  children: [
1103
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Name", /* @__PURE__ */ (0, p.jsx)("input", {
1104
- value: i.name,
1105
- onChange: (e) => b("name", e.target.value)
909
+ /* @__PURE__ */ n("label", { children: ["Name", /* @__PURE__ */ t("input", {
910
+ value: s.name,
911
+ onChange: (e) => C("name", e.target.value)
1106
912
  })] }),
1107
- /* @__PURE__ */ (0, p.jsxs)("label", { children: [
913
+ /* @__PURE__ */ n("label", { children: [
1108
914
  "Kind",
1109
- /* @__PURE__ */ (0, p.jsx)("select", {
1110
- value: i.kind,
1111
- onChange: (e) => b("kind", e.target.value),
1112
- children: I.map((e) => /* @__PURE__ */ (0, p.jsx)("option", {
915
+ /* @__PURE__ */ t("select", {
916
+ value: s.kind,
917
+ onChange: (e) => C("kind", e.target.value),
918
+ children: P.map((e) => /* @__PURE__ */ t("option", {
1113
919
  value: e,
1114
920
  children: e
1115
921
  }, e))
1116
922
  }),
1117
- /* @__PURE__ */ (0, p.jsxs)("span", {
923
+ /* @__PURE__ */ n("span", {
1118
924
  className: "ec-kind-preview",
1119
- children: [/* @__PURE__ */ (0, p.jsx)(O, { kind: i.kind }), i.kind]
925
+ children: [/* @__PURE__ */ t(E, { kind: s.kind }), s.kind]
1120
926
  }),
1121
- /* @__PURE__ */ (0, p.jsxs)("span", {
927
+ /* @__PURE__ */ n("span", {
1122
928
  className: "ec-flow ec-flow--compact",
1123
- "aria-label": `Flow ${y.source} to ${y.destination}`,
929
+ "aria-label": `Flow ${S.source} to ${S.destination}`,
1124
930
  children: [
1125
- /* @__PURE__ */ (0, p.jsxs)("span", {
931
+ /* @__PURE__ */ n("span", {
1126
932
  className: "ec-flow__node",
1127
- children: [/* @__PURE__ */ (0, p.jsx)(N, { endpoint: y.source }), /* @__PURE__ */ (0, p.jsx)("span", { children: y.source })]
933
+ children: [/* @__PURE__ */ t(j, { endpoint: S.source }), /* @__PURE__ */ t("span", { children: S.source })]
1128
934
  }),
1129
- /* @__PURE__ */ (0, p.jsx)("span", {
935
+ /* @__PURE__ */ t("span", {
1130
936
  className: "ec-flow__arrow",
1131
937
  "aria-hidden": "true",
1132
938
  children: "->"
1133
939
  }),
1134
- /* @__PURE__ */ (0, p.jsxs)("span", {
940
+ /* @__PURE__ */ n("span", {
1135
941
  className: "ec-flow__connector",
1136
- children: [/* @__PURE__ */ (0, p.jsx)(O, {
1137
- kind: i.kind,
942
+ children: [/* @__PURE__ */ t(E, {
943
+ kind: s.kind,
1138
944
  className: "ec-kind-icon--chip"
1139
- }), /* @__PURE__ */ (0, p.jsx)("span", { children: "Connector" })]
945
+ }), /* @__PURE__ */ t("span", { children: "Connector" })]
1140
946
  }),
1141
- /* @__PURE__ */ (0, p.jsx)("span", {
947
+ /* @__PURE__ */ t("span", {
1142
948
  className: "ec-flow__arrow",
1143
949
  "aria-hidden": "true",
1144
950
  children: "->"
1145
951
  }),
1146
- /* @__PURE__ */ (0, p.jsxs)("span", {
952
+ /* @__PURE__ */ n("span", {
1147
953
  className: "ec-flow__node",
1148
- children: [/* @__PURE__ */ (0, p.jsx)(N, { endpoint: y.destination }), /* @__PURE__ */ (0, p.jsx)("span", { children: y.destination })]
954
+ children: [/* @__PURE__ */ t(j, { endpoint: S.destination }), /* @__PURE__ */ t("span", { children: S.destination })]
1149
955
  })
1150
956
  ]
1151
957
  })
1152
958
  ] }),
1153
- /* @__PURE__ */ (0, p.jsxs)("label", { children: ["Mode", /* @__PURE__ */ (0, p.jsx)("select", {
1154
- value: i.mode,
1155
- onChange: (e) => b("mode", e.target.value),
1156
- children: L.map((e) => /* @__PURE__ */ (0, p.jsx)("option", {
959
+ /* @__PURE__ */ n("label", { children: ["Mode", /* @__PURE__ */ t("select", {
960
+ value: s.mode,
961
+ onChange: (e) => C("mode", e.target.value),
962
+ children: F.map((e) => /* @__PURE__ */ t("option", {
1157
963
  value: e,
1158
964
  children: e
1159
965
  }, e))
1160
966
  })] })
1161
967
  ]
1162
968
  }),
1163
- /* @__PURE__ */ (0, p.jsxs)("div", {
969
+ /* @__PURE__ */ n("div", {
1164
970
  className: "ec-endpoint-grid",
1165
- children: [/* @__PURE__ */ (0, p.jsxs)("section", {
971
+ children: [/* @__PURE__ */ n("section", {
1166
972
  className: "ec-endpoint-panel",
1167
- children: [/* @__PURE__ */ (0, p.jsxs)("header", {
973
+ children: [/* @__PURE__ */ n("header", {
1168
974
  className: "ec-endpoint-panel__header",
1169
- children: [/* @__PURE__ */ (0, p.jsx)(N, { endpoint: y.source }), /* @__PURE__ */ (0, p.jsxs)("h4", { children: [
975
+ children: [/* @__PURE__ */ t(j, { endpoint: S.source }), /* @__PURE__ */ n("h4", { children: [
1170
976
  "Source config (",
1171
- k(y.source),
977
+ N(S.source),
1172
978
  ")"
1173
979
  ] })]
1174
- }), /* @__PURE__ */ (0, p.jsx)("div", {
980
+ }), /* @__PURE__ */ t("div", {
1175
981
  className: "ec-grid ec-grid--endpoint",
1176
- children: D(y.source, "source")
982
+ children: A(S.source, "source")
1177
983
  })]
1178
- }), /* @__PURE__ */ (0, p.jsxs)("section", {
984
+ }), /* @__PURE__ */ n("section", {
1179
985
  className: "ec-endpoint-panel",
1180
- children: [/* @__PURE__ */ (0, p.jsxs)("header", {
986
+ children: [/* @__PURE__ */ n("header", {
1181
987
  className: "ec-endpoint-panel__header",
1182
- children: [/* @__PURE__ */ (0, p.jsx)(N, { endpoint: y.destination }), /* @__PURE__ */ (0, p.jsxs)("h4", { children: [
988
+ children: [/* @__PURE__ */ t(j, { endpoint: S.destination }), /* @__PURE__ */ n("h4", { children: [
1183
989
  "Destination config (",
1184
- k(y.destination),
990
+ N(S.destination),
1185
991
  ")"
1186
992
  ] })]
1187
- }), /* @__PURE__ */ (0, p.jsx)("div", {
993
+ }), /* @__PURE__ */ t("div", {
1188
994
  className: "ec-grid ec-grid--endpoint",
1189
- children: D(y.destination, "destination")
995
+ children: A(S.destination, "destination")
1190
996
  })]
1191
997
  })]
1192
998
  }),
1193
- /* @__PURE__ */ (0, p.jsxs)("fieldset", {
999
+ /* @__PURE__ */ n("fieldset", {
1194
1000
  className: "ec-form__fieldset",
1195
- children: [/* @__PURE__ */ (0, p.jsx)("legend", { children: "Triggers" }), /* @__PURE__ */ (0, p.jsx)("div", {
1001
+ children: [/* @__PURE__ */ t("legend", { children: "Triggers" }), /* @__PURE__ */ t("div", {
1196
1002
  className: "ec-check-row",
1197
- children: R.map((e) => /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("input", {
1003
+ children: I.map((e) => /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("input", {
1198
1004
  type: "checkbox",
1199
- checked: i.triggers.includes(e),
1200
- onChange: () => x(e)
1005
+ checked: s.triggers.includes(e),
1006
+ onChange: () => w(e)
1201
1007
  }), e] }, e))
1202
1008
  })]
1203
1009
  }),
1204
- /* @__PURE__ */ (0, p.jsxs)("fieldset", {
1010
+ /* @__PURE__ */ n("fieldset", {
1205
1011
  className: "ec-form__fieldset",
1206
- children: [/* @__PURE__ */ (0, p.jsx)("legend", { children: "Options" }), /* @__PURE__ */ (0, p.jsxs)("div", {
1012
+ children: [/* @__PURE__ */ t("legend", { children: "Options" }), /* @__PURE__ */ n("div", {
1207
1013
  className: "ec-check-row",
1208
1014
  children: [
1209
- /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("input", {
1015
+ /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("input", {
1210
1016
  type: "checkbox",
1211
- checked: i.skipEmptyFiles ?? !1,
1212
- onChange: (e) => b("skipEmptyFiles", e.target.checked)
1017
+ checked: s.skipEmptyFiles ?? !1,
1018
+ onChange: (e) => C("skipEmptyFiles", e.target.checked)
1213
1019
  }), "Skip empty files"] }),
1214
- /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("input", {
1020
+ /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("input", {
1215
1021
  type: "checkbox",
1216
- checked: i.continueOnError ?? !1,
1217
- onChange: (e) => b("continueOnError", e.target.checked)
1022
+ checked: s.continueOnError ?? !1,
1023
+ onChange: (e) => C("continueOnError", e.target.checked)
1218
1024
  }), "Continue on error"] }),
1219
- /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("input", {
1025
+ /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("input", {
1220
1026
  type: "number",
1221
1027
  min: 1,
1222
- value: i.intervalMinutes ?? 15,
1223
- onChange: (e) => b("intervalMinutes", Number(e.target.value) || 1)
1028
+ value: s.intervalMinutes ?? 15,
1029
+ onChange: (e) => C("intervalMinutes", Number(e.target.value) || 1)
1224
1030
  }), "Interval minutes"] }),
1225
- /* @__PURE__ */ (0, p.jsxs)("label", { children: [/* @__PURE__ */ (0, p.jsx)("input", {
1031
+ /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("input", {
1226
1032
  type: "time",
1227
- value: i.dailyTimeLocal ?? "",
1228
- onChange: (e) => b("dailyTimeLocal", e.target.value)
1033
+ value: s.dailyTimeLocal ?? "",
1034
+ onChange: (e) => C("dailyTimeLocal", e.target.value)
1229
1035
  }), "Daily time (local)"] })
1230
1036
  ]
1231
1037
  })]
1232
1038
  }),
1233
- /* @__PURE__ */ (0, p.jsx)("footer", {
1039
+ /* @__PURE__ */ t("footer", {
1234
1040
  className: "ec-form__footer",
1235
- children: /* @__PURE__ */ (0, p.jsx)("button", {
1041
+ children: /* @__PURE__ */ t("button", {
1236
1042
  type: "button",
1237
1043
  className: "ec-primary",
1238
- onClick: C,
1239
- disabled: f,
1240
- children: f ? "Saving..." : "Save connector"
1044
+ onClick: T,
1045
+ disabled: h,
1046
+ children: h ? "Saving..." : "Save connector"
1241
1047
  })
1242
1048
  })
1243
1049
  ]
1244
1050
  });
1245
1051
  }
1246
1052
  // src/easy-connectors/ConnectorRuns.tsx
1247
- function H({ connectorId: e, take: t = 20 }) {
1248
- let { client: n } = S(), [i, a] = s([]), [o, c] = s(null), [l, u] = s(!1);
1249
- return r(() => {
1053
+ function B({ connectorId: e, take: r = 20 }) {
1054
+ let { client: i } = b(), [a, s] = u([]), [c, l] = u(null), [d, f] = u(!1);
1055
+ return o(() => {
1250
1056
  if (!e) {
1251
- a([]);
1057
+ s([]);
1252
1058
  return;
1253
1059
  }
1254
- let r = !1;
1255
- return u(!0), c(null), n.getRuns(e, t).then((e) => {
1256
- r || a(e);
1060
+ let t = !1;
1061
+ return f(!0), l(null), i.getRuns(e, r).then((e) => {
1062
+ t || s(e);
1257
1063
  }).catch((e) => {
1258
- r || c(e instanceof Error ? e.message : "Failed to load runs.");
1064
+ t || l(e instanceof Error ? e.message : "Failed to load runs.");
1259
1065
  }).finally(() => {
1260
- r || u(!1);
1066
+ t || f(!1);
1261
1067
  }), () => {
1262
- r = !0;
1068
+ t = !0;
1263
1069
  };
1264
1070
  }, [
1265
- n,
1071
+ i,
1266
1072
  e,
1267
- t
1268
- ]), /* @__PURE__ */ (0, p.jsxs)("section", {
1073
+ r
1074
+ ]), /* @__PURE__ */ n("section", {
1269
1075
  className: "ec-runs",
1270
1076
  children: [
1271
- /* @__PURE__ */ (0, p.jsx)("header", {
1077
+ /* @__PURE__ */ t("header", {
1272
1078
  className: "ec-runs__header",
1273
- children: /* @__PURE__ */ (0, p.jsx)("h3", { children: "Recent runs" })
1079
+ children: /* @__PURE__ */ t("h3", { children: "Recent runs" })
1274
1080
  }),
1275
- e ? null : /* @__PURE__ */ (0, p.jsx)("p", {
1081
+ e ? null : /* @__PURE__ */ t("p", {
1276
1082
  className: "ec-muted",
1277
1083
  children: "Select a connector to view run history."
1278
1084
  }),
1279
- l ? /* @__PURE__ */ (0, p.jsx)("p", {
1085
+ d ? /* @__PURE__ */ t("p", {
1280
1086
  className: "ec-muted",
1281
1087
  children: "Loading runs..."
1282
1088
  }) : null,
1283
- o ? /* @__PURE__ */ (0, p.jsx)("p", {
1089
+ c ? /* @__PURE__ */ t("p", {
1284
1090
  className: "ec-error",
1285
- children: o
1091
+ children: c
1286
1092
  }) : null,
1287
- e && i.length > 0 ? /* @__PURE__ */ (0, p.jsx)("div", {
1093
+ e && a.length > 0 ? /* @__PURE__ */ t("div", {
1288
1094
  className: "ec-table-wrap",
1289
- children: /* @__PURE__ */ (0, p.jsxs)("table", {
1095
+ children: /* @__PURE__ */ n("table", {
1290
1096
  className: "ec-table",
1291
- children: [/* @__PURE__ */ (0, p.jsx)("thead", { children: /* @__PURE__ */ (0, p.jsxs)("tr", { children: [
1292
- /* @__PURE__ */ (0, p.jsx)("th", { children: "Status" }),
1293
- /* @__PURE__ */ (0, p.jsx)("th", { children: "Started" }),
1294
- /* @__PURE__ */ (0, p.jsx)("th", { children: "Transferred" }),
1295
- /* @__PURE__ */ (0, p.jsx)("th", { children: "Skipped" }),
1296
- /* @__PURE__ */ (0, p.jsx)("th", { children: "Failed" })
1297
- ] }) }), /* @__PURE__ */ (0, p.jsx)("tbody", { children: i.map((e) => /* @__PURE__ */ (0, p.jsxs)("tr", { children: [
1298
- /* @__PURE__ */ (0, p.jsx)("td", { children: e.status }),
1299
- /* @__PURE__ */ (0, p.jsx)("td", { children: new Date(e.startedUtc).toLocaleString() }),
1300
- /* @__PURE__ */ (0, p.jsx)("td", { children: e.transferred }),
1301
- /* @__PURE__ */ (0, p.jsx)("td", { children: e.skipped }),
1302
- /* @__PURE__ */ (0, p.jsx)("td", { children: e.failed })
1097
+ children: [/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", { children: [
1098
+ /* @__PURE__ */ t("th", { children: "Status" }),
1099
+ /* @__PURE__ */ t("th", { children: "Started" }),
1100
+ /* @__PURE__ */ t("th", { children: "Transferred" }),
1101
+ /* @__PURE__ */ t("th", { children: "Skipped" }),
1102
+ /* @__PURE__ */ t("th", { children: "Failed" })
1103
+ ] }) }), /* @__PURE__ */ t("tbody", { children: a.map((e) => /* @__PURE__ */ n("tr", { children: [
1104
+ /* @__PURE__ */ t("td", { children: e.status }),
1105
+ /* @__PURE__ */ t("td", { children: new Date(e.startedUtc).toLocaleString() }),
1106
+ /* @__PURE__ */ t("td", { children: e.transferred }),
1107
+ /* @__PURE__ */ t("td", { children: e.skipped }),
1108
+ /* @__PURE__ */ t("td", { children: e.failed })
1303
1109
  ] }, e.id)) })]
1304
1110
  })
1305
1111
  }) : null
@@ -1307,27 +1113,27 @@ function H({ connectorId: e, take: t = 20 }) {
1307
1113
  });
1308
1114
  }
1309
1115
  // src/easy-connectors/EasyConnectorsApp.tsx
1310
- function U({ className: e }) {
1311
- let [t, n] = s(void 0), [r, i] = s(0);
1312
- return /* @__PURE__ */ (0, p.jsxs)("section", {
1116
+ function V({ className: e }) {
1117
+ let [r, i] = u(void 0), [a, o] = u(0);
1118
+ return /* @__PURE__ */ n("section", {
1313
1119
  className: ["ec-app", e].filter(Boolean).join(" "),
1314
- children: [/* @__PURE__ */ (0, p.jsx)("div", {
1120
+ children: [/* @__PURE__ */ t("div", {
1315
1121
  className: "ec-app__left",
1316
- children: /* @__PURE__ */ (0, p.jsx)(F, {
1317
- selectedConnectorId: t,
1318
- onSelect: n,
1319
- onCreate: () => n(void 0),
1320
- refreshToken: r
1122
+ children: /* @__PURE__ */ t(N, {
1123
+ selectedConnectorId: r,
1124
+ onSelect: i,
1125
+ onCreate: () => i(void 0),
1126
+ refreshToken: a
1321
1127
  })
1322
- }), /* @__PURE__ */ (0, p.jsxs)("div", {
1128
+ }), /* @__PURE__ */ n("div", {
1323
1129
  className: "ec-app__right",
1324
- children: [/* @__PURE__ */ (0, p.jsx)(V, {
1325
- connectorId: t,
1130
+ children: [/* @__PURE__ */ t(z, {
1131
+ connectorId: r,
1326
1132
  onSaved: (e) => {
1327
- n(e.id), i((e) => e + 1);
1133
+ i(e.id), o((e) => e + 1);
1328
1134
  }
1329
- }), /* @__PURE__ */ (0, p.jsx)(H, { connectorId: t })]
1135
+ }), /* @__PURE__ */ t(B, { connectorId: r })]
1330
1136
  })]
1331
1137
  });
1332
1138
  }
1333
- export { F as ConnectorBoard, V as ConnectorForm, O as ConnectorKindIcon, H as ConnectorRuns, U as EasyConnectorsApp, y as EasyConnectorsClient, x as EasyConnectorsProvider, N as EndpointKindIcon, _ as Ribbon, m as RibbonButton, h as RibbonCarousel, g as RibbonDropdown, v as RibbonSplitButton, P as getConnectorFlow, S as useEasyConnectors };
1139
+ export { N as ConnectorBoard, z as ConnectorForm, E as ConnectorKindIcon, B as ConnectorRuns, V as EasyConnectorsApp, _ as EasyConnectorsClient, y as EasyConnectorsProvider, j as EndpointKindIcon, h as Ribbon, f as RibbonButton, p as RibbonCarousel, m as RibbonDropdown, g as RibbonSplitButton, M as getConnectorFlow, b as useEasyConnectors };