@parallelworks/tandem-web 0.151.0 → 0.152.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.
@@ -178,15 +178,15 @@ function F({ workspace: i, source: c, im: l }) {
178
178
  }
179
179
  var I = "__new__";
180
180
  function L({ workspace: n, again: a }) {
181
- let o = E("linearImport"), s = j(), { data: c } = M(i(n)), [l, d] = w(""), [m, v] = w(null), [y, S] = w({}), C = u(), T = c.filter((e) => !e.archivedAt), N = A({
181
+ let o = E("linearImport"), s = j(), { data: c } = M(i(n)), [l, d] = w(""), [m, v] = w(null), [y, S] = w({}), [C, T] = w(!0), N = u(), P = c.filter((e) => !e.archivedAt), F = A({
182
182
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/linear/teams", {
183
183
  params: { path: { workspace: n } },
184
184
  body: { apiKey: l }
185
185
  })),
186
- onMutate: C.clear,
186
+ onMutate: N.clear,
187
187
  onSuccess: (e) => {
188
188
  v(e), S(Object.fromEntries(e.teams.map((e) => {
189
- let t = T.find((t) => t.key === e.key);
189
+ let t = P.find((t) => t.key === e.key);
190
190
  return [e.id, {
191
191
  on: !0,
192
192
  target: t?.key ?? I,
@@ -195,12 +195,13 @@ function L({ workspace: n, again: a }) {
195
195
  }];
196
196
  })));
197
197
  },
198
- onError: C.set
199
- }), P = A({
198
+ onError: N.set
199
+ }), L = A({
200
200
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/linear/import", {
201
201
  params: { path: { workspace: n } },
202
202
  body: {
203
203
  apiKey: l,
204
+ updateExistingOnly: C,
204
205
  teams: Object.entries(y).filter(([, e]) => e.on).map(([e, t]) => t.target === I ? {
205
206
  sourceId: e,
206
207
  newKey: t.newKey,
@@ -211,12 +212,12 @@ function L({ workspace: n, again: a }) {
211
212
  })
212
213
  }
213
214
  })),
214
- onMutate: C.clear,
215
+ onMutate: N.clear,
215
216
  onSuccess: () => {
216
217
  d(""), v(null), s.invalidateQueries({ queryKey: r(n).queryKey }), s.invalidateQueries({ queryKey: i(n).queryKey });
217
218
  },
218
- onError: C.set
219
- }), F = Object.values(y).filter((e) => e.on).length, L = (e, t) => S((n) => ({
219
+ onError: N.set
220
+ }), R = Object.values(y).filter((e) => e.on).length, z = (e, t) => S((n) => ({
220
221
  ...n,
221
222
  [e]: {
222
223
  ...n[e],
@@ -226,7 +227,7 @@ function L({ workspace: n, again: a }) {
226
227
  return /* @__PURE__ */ O(x, { children: /* @__PURE__ */ k("form", {
227
228
  className: "space-y-4 px-3 py-3",
228
229
  onSubmit: (e) => {
229
- e.preventDefault(), m ? P.mutate() : N.mutate();
230
+ e.preventDefault(), m ? L.mutate() : F.mutate();
230
231
  },
231
232
  children: [
232
233
  /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h2", {
@@ -272,7 +273,7 @@ function L({ workspace: n, again: a }) {
272
273
  children: [
273
274
  /* @__PURE__ */ O(p, {
274
275
  checked: t.on,
275
- onCheckedChange: (t) => L(e.id, { on: t })
276
+ onCheckedChange: (t) => z(e.id, { on: t })
276
277
  }),
277
278
  /* @__PURE__ */ k("span", {
278
279
  className: "truncate",
@@ -299,11 +300,11 @@ function L({ workspace: n, again: a }) {
299
300
  children: [/* @__PURE__ */ O(b, {
300
301
  "aria-label": o("into", { team: e.name }),
301
302
  value: t.target,
302
- onValueChange: (t) => t && L(e.id, { target: t }),
303
+ onValueChange: (t) => t && z(e.id, { target: t }),
303
304
  items: [{
304
305
  value: I,
305
306
  label: o("newTeam")
306
- }, ...T.map((e) => ({
307
+ }, ...P.map((e) => ({
307
308
  value: e.key,
308
309
  label: `${e.name} (${e.key})`
309
310
  }))],
@@ -312,14 +313,14 @@ function L({ workspace: n, again: a }) {
312
313
  }), t.target === I && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(_, {
313
314
  "aria-label": o("newKey"),
314
315
  value: t.newKey,
315
- onChange: (t) => L(e.id, { newKey: t.target.value.toUpperCase() }),
316
+ onChange: (t) => z(e.id, { newKey: t.target.value.toUpperCase() }),
316
317
  className: "w-24",
317
318
  maxLength: 10,
318
319
  required: !0
319
320
  }), /* @__PURE__ */ O(_, {
320
321
  "aria-label": o("newName"),
321
322
  value: t.newName,
322
- onChange: (t) => L(e.id, { newName: t.target.value }),
323
+ onChange: (t) => z(e.id, { newName: t.target.value }),
323
324
  className: "w-44",
324
325
  required: !0
325
326
  })] })]
@@ -329,18 +330,29 @@ function L({ workspace: n, again: a }) {
329
330
  })
330
331
  ]
331
332
  }),
333
+ m && /* @__PURE__ */ k("label", {
334
+ className: "flex items-start gap-2 text-sm",
335
+ children: [/* @__PURE__ */ O(p, {
336
+ className: "mt-0.5",
337
+ checked: C,
338
+ onCheckedChange: T
339
+ }), /* @__PURE__ */ k("span", { children: [o("updateOnly"), /* @__PURE__ */ O("span", {
340
+ className: "block text-xs text-muted-foreground",
341
+ children: o("updateOnlyHelp")
342
+ })] })]
343
+ }),
332
344
  /* @__PURE__ */ k("div", {
333
345
  className: "flex flex-wrap items-center gap-3",
334
346
  children: [m ? /* @__PURE__ */ O(f, {
335
347
  type: "submit",
336
348
  variant: "primary",
337
- loading: P.isPending,
338
- disabled: F === 0,
339
- children: o("start", { count: F })
349
+ loading: L.isPending,
350
+ disabled: R === 0,
351
+ children: o("start", { count: R })
340
352
  }) : /* @__PURE__ */ O(f, {
341
353
  type: "submit",
342
354
  variant: "primary",
343
- loading: N.isPending,
355
+ loading: F.isPending,
344
356
  children: o("findTeams")
345
357
  }), m && /* @__PURE__ */ O("span", {
346
358
  className: "text-xs text-muted-foreground",
@@ -349,7 +361,7 @@ function L({ workspace: n, again: a }) {
349
361
  }),
350
362
  /* @__PURE__ */ O(h, {
351
363
  size: "md",
352
- children: C.error
364
+ children: N.error
353
365
  })
354
366
  ]
355
367
  }) });
@@ -1,6 +0,0 @@
1
- import { createFileRoute as e, lazyRouteComponent as t } from "@tanstack/react-router";
2
- var n = e("/sites/$workspace/$site")({
3
- validateSearch: (e) => typeof e.doc == "string" ? { doc: e.doc } : {},
4
- component: t(() => import("./sites2._workspace._site.js"), "component")
5
- });
6
- export { n as Route };
@@ -1,15 +0,0 @@
1
- import { Route as e } from "./sites._workspace._site.js";
2
- import { SharedViewer as t } from "../components/SharedViewer.js";
3
- import { jsx as n } from "react/jsx-runtime";
4
- // src/routes/sites.$workspace.$site.tsx?tsr-split=component
5
- function r() {
6
- let { workspace: r, site: i } = e.useParams(), { doc: a } = e.useSearch();
7
- return /* @__PURE__ */ n(t, {
8
- source: {
9
- workspace: r,
10
- site: i
11
- },
12
- ...a && { doc: a }
13
- });
14
- }
15
- export { r as component };