@parallelworks/tandem-web 0.193.0 → 0.194.0

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.
@@ -3588,12 +3588,14 @@ var e = {
3588
3588
  units: {
3589
3589
  issues: "Issues",
3590
3590
  points: "Points",
3591
- days: "Days"
3591
+ days: "Days",
3592
+ people: "People"
3592
3593
  },
3593
3594
  group: "Group",
3594
3595
  series: {
3595
3596
  created: "Created",
3596
- completed: "Completed"
3597
+ completed: "Completed",
3598
+ total: "Total"
3597
3599
  },
3598
3600
  empty: "No issues match.",
3599
3601
  priorities: {
@@ -3617,13 +3619,16 @@ var e = {
3617
3619
  other: "Other",
3618
3620
  pie: "Share of each group",
3619
3621
  overTime: "By week",
3622
+ overTimeDaily: "By day",
3620
3623
  week: "Week",
3624
+ day: "Day",
3621
3625
  issuesCount: "Issues",
3622
3626
  measures: {
3623
3627
  count: "Issues",
3624
3628
  created_completed: "Created vs completed",
3625
3629
  open: "Open issues over time",
3626
3630
  throughput: "Completed per week",
3631
+ active_users: "Daily active users",
3627
3632
  cycle_time: "Cycle time (median)",
3628
3633
  lead_time: "Lead time (median)",
3629
3634
  estimate: "Estimate (points)",
@@ -3662,6 +3667,7 @@ var e = {
3662
3667
  },
3663
3668
  weeks: "Over",
3664
3669
  weeksValue: "{count, plural, one {# week} other {# weeks}}",
3670
+ daysCount: "{count, plural, one {# day} other {# days}}",
3665
3671
  issuesFrom: "Issues",
3666
3672
  filtersBelow: "These filters",
3667
3673
  team: "Team",
@@ -3588,12 +3588,14 @@ var e = {
3588
3588
  units: {
3589
3589
  issues: "Incidencias",
3590
3590
  points: "Puntos",
3591
- days: "Días"
3591
+ days: "Días",
3592
+ people: "Personas"
3592
3593
  },
3593
3594
  group: "Grupo",
3594
3595
  series: {
3595
3596
  created: "Creadas",
3596
- completed: "Completadas"
3597
+ completed: "Completadas",
3598
+ total: "Total"
3597
3599
  },
3598
3600
  empty: "Ninguna incidencia coincide.",
3599
3601
  priorities: {
@@ -3617,13 +3619,16 @@ var e = {
3617
3619
  other: "Otros",
3618
3620
  pie: "Parte de cada grupo",
3619
3621
  overTime: "Por semana",
3622
+ overTimeDaily: "Por día",
3620
3623
  week: "Semana",
3624
+ day: "Día",
3621
3625
  issuesCount: "Incidencias",
3622
3626
  measures: {
3623
3627
  count: "Incidencias",
3624
3628
  created_completed: "Creadas frente a completadas",
3625
3629
  open: "Incidencias abiertas en el tiempo",
3626
3630
  throughput: "Completadas por semana",
3631
+ active_users: "Usuarios activos diarios",
3627
3632
  cycle_time: "Tiempo de ciclo (mediana)",
3628
3633
  lead_time: "Tiempo de entrega (mediana)",
3629
3634
  estimate: "Estimación (puntos)",
@@ -3662,6 +3667,7 @@ var e = {
3662
3667
  },
3663
3668
  weeks: "Durante",
3664
3669
  weeksValue: "{count, plural, one {# semana} other {# semanas}}",
3670
+ daysCount: "{count, plural, one {# día} other {# días}}",
3665
3671
  issuesFrom: "Incidencias",
3666
3672
  filtersBelow: "Estos filtros",
3667
3673
  team: "Equipo",
@@ -3588,12 +3588,14 @@ var e = {
3588
3588
  units: {
3589
3589
  issues: "課題",
3590
3590
  points: "ポイント",
3591
- days: "日"
3591
+ days: "日",
3592
+ people: "人"
3592
3593
  },
3593
3594
  group: "グループ",
3594
3595
  series: {
3595
3596
  created: "作成",
3596
- completed: "完了"
3597
+ completed: "完了",
3598
+ total: "合計"
3597
3599
  },
3598
3600
  empty: "一致する課題はありません。",
3599
3601
  priorities: {
@@ -3617,13 +3619,16 @@ var e = {
3617
3619
  other: "その他",
3618
3620
  pie: "グループごとの割合",
3619
3621
  overTime: "週ごと",
3622
+ overTimeDaily: "日別",
3620
3623
  week: "週",
3624
+ day: "日",
3621
3625
  issuesCount: "課題",
3622
3626
  measures: {
3623
3627
  count: "課題数",
3624
3628
  created_completed: "作成と完了",
3625
3629
  open: "未完了課題の推移",
3626
3630
  throughput: "週ごとの完了数",
3631
+ active_users: "日次アクティブユーザー",
3627
3632
  cycle_time: "サイクルタイム(中央値)",
3628
3633
  lead_time: "リードタイム(中央値)",
3629
3634
  estimate: "見積もり(ポイント)",
@@ -3662,6 +3667,7 @@ var e = {
3662
3667
  },
3663
3668
  weeks: "期間",
3664
3669
  weeksValue: "{count, plural, other {# 週間}}",
3670
+ daysCount: "{count, plural, other {#日間}}",
3665
3671
  issuesFrom: "対象の課題",
3666
3672
  filtersBelow: "以下のフィルター",
3667
3673
  team: "チーム",
@@ -3588,12 +3588,14 @@ var e = {
3588
3588
  units: {
3589
3589
  issues: "이슈",
3590
3590
  points: "포인트",
3591
- days: "일"
3591
+ days: "일",
3592
+ people: "명"
3592
3593
  },
3593
3594
  group: "그룹",
3594
3595
  series: {
3595
3596
  created: "생성",
3596
- completed: "완료"
3597
+ completed: "완료",
3598
+ total: "합계"
3597
3599
  },
3598
3600
  empty: "일치하는 이슈가 없습니다.",
3599
3601
  priorities: {
@@ -3617,13 +3619,16 @@ var e = {
3617
3619
  other: "기타",
3618
3620
  pie: "그룹별 비율",
3619
3621
  overTime: "주별",
3622
+ overTimeDaily: "일별",
3620
3623
  week: "주",
3624
+ day: "일",
3621
3625
  issuesCount: "이슈",
3622
3626
  measures: {
3623
3627
  count: "이슈 수",
3624
3628
  created_completed: "생성 대비 완료",
3625
3629
  open: "열린 이슈 추이",
3626
3630
  throughput: "주별 완료 수",
3631
+ active_users: "일일 활성 사용자",
3627
3632
  cycle_time: "사이클 타임(중앙값)",
3628
3633
  lead_time: "리드 타임(중앙값)",
3629
3634
  estimate: "추정치(포인트)",
@@ -3662,6 +3667,7 @@ var e = {
3662
3667
  },
3663
3668
  weeks: "기간",
3664
3669
  weeksValue: "{count, plural, other {#주}}",
3670
+ daysCount: "{count, plural, other {#일}}",
3665
3671
  issuesFrom: "이슈",
3666
3672
  filtersBelow: "아래 필터",
3667
3673
  team: "팀",
@@ -3588,12 +3588,14 @@ var e = {
3588
3588
  units: {
3589
3589
  issues: "问题",
3590
3590
  points: "点数",
3591
- days: "天"
3591
+ days: "天",
3592
+ people: "人"
3592
3593
  },
3593
3594
  group: "分组",
3594
3595
  series: {
3595
3596
  created: "已创建",
3596
- completed: "已完成"
3597
+ completed: "已完成",
3598
+ total: "总计"
3597
3599
  },
3598
3600
  empty: "没有匹配的问题。",
3599
3601
  priorities: {
@@ -3617,13 +3619,16 @@ var e = {
3617
3619
  other: "其他",
3618
3620
  pie: "各组占比",
3619
3621
  overTime: "按周",
3622
+ overTimeDaily: "按天",
3620
3623
  week: "周",
3624
+ day: "日期",
3621
3625
  issuesCount: "问题",
3622
3626
  measures: {
3623
3627
  count: "问题数",
3624
3628
  created_completed: "创建与完成",
3625
3629
  open: "未完成问题趋势",
3626
3630
  throughput: "每周完成数",
3631
+ active_users: "每日活跃用户",
3627
3632
  cycle_time: "周期时间(中位数)",
3628
3633
  lead_time: "交付时间(中位数)",
3629
3634
  estimate: "估算(点数)",
@@ -3662,6 +3667,7 @@ var e = {
3662
3667
  },
3663
3668
  weeks: "范围",
3664
3669
  weeksValue: "{count, plural, other {# 周}}",
3670
+ daysCount: "{count, plural, other {#天}}",
3665
3671
  issuesFrom: "问题",
3666
3672
  filtersBelow: "以下筛选",
3667
3673
  team: "团队",
package/api/queries.js CHANGED
@@ -486,7 +486,8 @@ var a = i({
486
486
  params: s(e),
487
487
  body: {
488
488
  chart: r,
489
- spec: a
489
+ spec: a,
490
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
490
491
  },
491
492
  signal: i
492
493
  })),
@@ -17,9 +17,10 @@ function b(e) {
17
17
  var x = /* @__PURE__ */ new Set([
18
18
  "created_completed",
19
19
  "open",
20
- "throughput"
21
- ]);
22
- function S(e) {
20
+ "throughput",
21
+ "active_users"
22
+ ]), S = "total", C = (e) => e.days.length > 0 ? e.days : e.weeks;
23
+ function w(e) {
23
24
  return [
24
25
  {
25
26
  title: e("starter.createdCompleted"),
@@ -59,7 +60,7 @@ function S(e) {
59
60
  }
60
61
  ];
61
62
  }
62
- function C(e, t) {
63
+ function T(e, t) {
63
64
  return [
64
65
  {
65
66
  value: "private",
@@ -75,7 +76,7 @@ function C(e, t) {
75
76
  }))
76
77
  ];
77
78
  }
78
- function w(e) {
79
+ function E(e) {
79
80
  return e === "private" ? {
80
81
  shared: !1,
81
82
  team: ""
@@ -87,7 +88,7 @@ function w(e) {
87
88
  team: e.slice(5)
88
89
  };
89
90
  }
90
- function T({ workspace: t, panel: o, onEdit: s, onDelete: c }) {
91
+ function D({ workspace: t, panel: o, onEdit: s, onDelete: c }) {
91
92
  let u = g("dashboards"), { data: d, isPending: f, isError: p } = y({
92
93
  ...e(t, o.chart, o.spec),
93
94
  refetchInterval: 6e4
@@ -108,7 +109,7 @@ function T({ workspace: t, panel: o, onEdit: s, onDelete: c }) {
108
109
  size: "sm",
109
110
  icon: /* @__PURE__ */ _(n, {}),
110
111
  label: u("csv"),
111
- onClick: () => N(o.title || o.spec.measure, d, u)
112
+ onClick: () => F(o.title || o.spec.measure, d, u)
112
113
  }),
113
114
  s && /* @__PURE__ */ _(l, {
114
115
  variant: "ghost",
@@ -133,7 +134,7 @@ function T({ workspace: t, panel: o, onEdit: s, onDelete: c }) {
133
134
  }) : p || !d ? /* @__PURE__ */ _("p", {
134
135
  className: "text-sm text-danger",
135
136
  children: u("failed")
136
- }) : /* @__PURE__ */ _(D, {
137
+ }) : /* @__PURE__ */ _(k, {
137
138
  workspace: t,
138
139
  panel: o,
139
140
  data: d
@@ -141,12 +142,12 @@ function T({ workspace: t, panel: o, onEdit: s, onDelete: c }) {
141
142
  })]
142
143
  });
143
144
  }
144
- function E(e) {
145
+ function O(e) {
145
146
  let t = h(), n = g("dashboards");
146
147
  return (r) => e === "days" ? n("daysValue", { days: t.number(r, { maximumFractionDigits: 1 }) }) : t.number(r, { maximumFractionDigits: +(e === "points") });
147
148
  }
148
- function D({ workspace: e, panel: n, data: r }) {
149
- let i = g("dashboards"), a = E(r.unit), o = r.series.length > 0 && r.weeks.length > 0, s = n.chart;
149
+ function k({ workspace: e, panel: n, data: r }) {
150
+ let i = g("dashboards"), a = O(r.unit), o = r.series.length > 0 && C(r).length > 0, s = n.chart;
150
151
  return s === "number" ? /* @__PURE__ */ v(t, {
151
152
  to: "/$workspace/issues",
152
153
  params: { workspace: e },
@@ -159,7 +160,7 @@ function D({ workspace: e, panel: n, data: r }) {
159
160
  className: "text-xs text-muted-foreground",
160
161
  children: i(`units.${r.unit}`)
161
162
  })]
162
- }) : s === "list" ? r.issues.length === 0 ? /* @__PURE__ */ _(O, {}) : /* @__PURE__ */ _("ul", {
163
+ }) : s === "list" ? r.issues.length === 0 ? /* @__PURE__ */ _(A, {}) : /* @__PURE__ */ _("ul", {
163
164
  className: "divide-y divide-border text-sm",
164
165
  children: r.issues.map((n) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(t, {
165
166
  to: "/$workspace/issues/$identifier",
@@ -183,7 +184,7 @@ function D({ workspace: e, panel: n, data: r }) {
183
184
  })
184
185
  ]
185
186
  }) }, n.identifier))
186
- }) : s === "table" ? r.rows.length === 0 ? /* @__PURE__ */ _(O, {}) : /* @__PURE__ */ v("table", {
187
+ }) : s === "table" ? r.rows.length === 0 ? /* @__PURE__ */ _(A, {}) : /* @__PURE__ */ v("table", {
187
188
  className: "w-full text-sm",
188
189
  children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ v("tr", {
189
190
  className: "text-left text-xs text-muted-foreground",
@@ -203,37 +204,37 @@ function D({ workspace: e, panel: n, data: r }) {
203
204
  params: { workspace: e },
204
205
  search: b(r.filter),
205
206
  className: "hover:underline",
206
- children: k(r.name, n.spec.groupBy, i)
207
+ children: j(r.name, n.spec.groupBy, i)
207
208
  })
208
209
  }), /* @__PURE__ */ _("td", {
209
210
  className: "py-1.5 text-right tabular-nums",
210
211
  children: a(r.value)
211
212
  })] }, r.key || "-"))
212
213
  })]
213
- }) : o && (s === "line" || s === "stacked" || x.has(n.spec.measure)) ? /* @__PURE__ */ _(M, {
214
+ }) : o && (s === "line" || s === "stacked" || x.has(n.spec.measure)) ? /* @__PURE__ */ _(P, {
214
215
  workspace: e,
215
216
  data: r,
216
217
  stacked: s !== "line",
217
- names: (e) => e.key === "created" || e.key === "completed" ? i(`series.${e.key}`) : k(e.name, n.spec.groupBy, i),
218
+ names: (e) => e.key === "created" || e.key === "completed" || e.key === S ? i(`series.${e.key}`) : j(e.name, n.spec.groupBy, i),
218
219
  value: a
219
- }) : r.rows.length === 0 || r.rows.every((e) => e.value === 0) ? /* @__PURE__ */ _(O, {}) : _(s === "pie" ? j : A, {
220
+ }) : r.rows.length === 0 || r.rows.every((e) => e.value === 0) ? /* @__PURE__ */ _(A, {}) : _(s === "pie" ? N : M, {
220
221
  workspace: e,
221
222
  data: r,
222
223
  groupBy: n.spec.groupBy,
223
224
  value: a
224
225
  });
225
226
  }
226
- function O() {
227
+ function A() {
227
228
  let e = g("dashboards");
228
229
  return /* @__PURE__ */ _("p", {
229
230
  className: "text-sm text-muted-foreground",
230
231
  children: e("empty")
231
232
  });
232
233
  }
233
- function k(e, t, n) {
234
+ function j(e, t, n) {
234
235
  return t === "priority" ? n(`priorities.${e}`) : t === "status" && e ? n(`categories.${e}`) : t ? e || n("none") : n("all");
235
236
  }
236
- function A({ workspace: e, data: n, groupBy: r, value: i }) {
237
+ function M({ workspace: e, data: n, groupBy: r, value: i }) {
237
238
  let a = g("dashboards"), o = Math.max(...n.rows.map((e) => e.value), 1);
238
239
  return /* @__PURE__ */ _("ul", {
239
240
  className: "space-y-1.5",
@@ -245,7 +246,7 @@ function A({ workspace: e, data: n, groupBy: r, value: i }) {
245
246
  children: [
246
247
  /* @__PURE__ */ _("span", {
247
248
  className: "truncate text-muted-foreground group-hover:text-foreground",
248
- children: k(n.name, r, a)
249
+ children: j(n.name, r, a)
249
250
  }),
250
251
  /* @__PURE__ */ _("span", {
251
252
  className: "h-4 rounded-sm bg-muted",
@@ -262,7 +263,7 @@ function A({ workspace: e, data: n, groupBy: r, value: i }) {
262
263
  }) }, n.key))
263
264
  });
264
265
  }
265
- function j({ workspace: e, data: n, groupBy: r, value: i }) {
266
+ function N({ workspace: e, data: n, groupBy: r, value: i }) {
266
267
  let a = g("dashboards"), o = n.rows.filter((e) => e.value > 0), { keys: s, folded: c } = f(o.map((e) => e.key)), l = p(s), m = s.map((e) => {
267
268
  if (e === u) return {
268
269
  key: e,
@@ -273,7 +274,7 @@ function j({ workspace: e, data: n, groupBy: r, value: i }) {
273
274
  let t = o.find((t) => t.key === e);
274
275
  return {
275
276
  key: e,
276
- name: k(t.name, r, a),
277
+ name: j(t.name, r, a),
277
278
  value: t.value,
278
279
  filter: t.filter
279
280
  };
@@ -325,23 +326,30 @@ function j({ workspace: e, data: n, groupBy: r, value: i }) {
325
326
  })]
326
327
  });
327
328
  }
328
- function M({ workspace: e, data: n, stacked: r, names: i, value: a }) {
329
- let l = g("dashboards"), d = h(), [y, x] = m(null), { keys: S, folded: C } = f(n.series.map((e) => e.key)), w = p(S), T = S.map((e) => {
329
+ function P({ workspace: e, data: n, stacked: r, names: i, value: a }) {
330
+ let l = g("dashboards"), d = h(), [y, x] = m(null), w = C(n), T = n.days.length > 0, E = n.series.find((e) => e.key === S), D = E ? n.series.filter((e) => e !== E) : n.series, { keys: O, folded: k } = f(D.map((e) => e.key)), A = {
331
+ ...p(O),
332
+ [S]: "var(--color-muted-foreground)"
333
+ }, j = O.map((e) => {
330
334
  if (e === u) {
331
- let t = n.series.filter((e) => C.includes(e.key));
335
+ let t = D.filter((e) => k.includes(e.key));
332
336
  return {
333
337
  key: e,
334
338
  name: l("other"),
335
- values: n.weeks.map((e, n) => t.reduce((e, t) => e + (t.values[n] ?? 0), 0))
339
+ values: w.map((e, n) => t.reduce((e, t) => e + (t.values[n] ?? 0), 0))
336
340
  };
337
341
  }
338
- let t = n.series.find((t) => t.key === e);
342
+ let t = D.find((t) => t.key === e);
339
343
  return {
340
344
  key: e,
341
345
  name: i(t),
342
346
  values: t.values
343
347
  };
344
- }), E = n.weeks.length, D = n.weeks.map((e, t) => T.reduce((e, n) => e + (n.values[t] ?? 0), 0)), O = Math.max(1, ...r ? D : T.flatMap((e) => e.values)), k = 300 / E, A = (e) => 120 - e / O * 120, j = (e) => d.dateTime(/* @__PURE__ */ new Date(`${n.weeks[e]}T00:00:00Z`), {
348
+ }), M = E ? [{
349
+ key: S,
350
+ name: i(E),
351
+ values: E.values
352
+ }] : [], N = [...j, ...M], P = w.length, F = w.map((e, t) => j.reduce((e, n) => e + (n.values[t] ?? 0), 0)), I = Math.max(1, ...r ? F : j.flatMap((e) => e.values), ...M.flatMap((e) => e.values)), L = 300 / P, R = (e) => 120 - e / I * 120, z = (e) => d.dateTime(/* @__PURE__ */ new Date(`${w[e]}T00:00:00Z`), {
345
353
  month: "short",
346
354
  day: "numeric",
347
355
  timeZone: "UTC"
@@ -357,23 +365,23 @@ function M({ workspace: e, data: n, stacked: r, names: i, value: a }) {
357
365
  viewBox: "0 0 300 134",
358
366
  className: "h-40 w-full overflow-visible",
359
367
  role: "img",
360
- "aria-label": l("overTime"),
368
+ "aria-label": l(T ? "overTimeDaily" : "overTime"),
361
369
  onPointerMove: (e) => {
362
370
  let t = e.currentTarget, n = t.getScreenCTM();
363
371
  if (!n) return;
364
- let r = Math.floor((e.clientX - n.e) / n.a / k);
365
- if (r < 0 || r >= E) return x(null);
372
+ let r = Math.floor((e.clientX - n.e) / n.a / L);
373
+ if (r < 0 || r >= P) return x(null);
366
374
  let i = t.getBoundingClientRect().left;
367
375
  x({
368
376
  i: r,
369
- x: n.a * (r + .5) * k + n.e - i
377
+ x: n.a * (r + .5) * L + n.e - i
370
378
  });
371
379
  },
372
380
  onPointerLeave: () => x(null),
373
381
  children: [
374
382
  y && /* @__PURE__ */ _("rect", {
375
- x: y.i * k,
376
- width: k,
383
+ x: y.i * L,
384
+ width: L,
377
385
  y: 0,
378
386
  height: 120,
379
387
  rx: 3,
@@ -390,65 +398,70 @@ function M({ workspace: e, data: n, stacked: r, names: i, value: a }) {
390
398
  x: 0,
391
399
  y: 8,
392
400
  className: "fill-muted-foreground text-[8px]",
393
- children: a(O)
401
+ children: a(I)
394
402
  }),
395
- r ? n.weeks.map((e, t) => {
403
+ r ? w.map((e, t) => {
396
404
  let n = 120;
397
- return /* @__PURE__ */ _("g", { children: T.map((e) => {
398
- let r = (e.values[t] ?? 0) / O * 120;
405
+ return /* @__PURE__ */ _("g", { children: j.map((e) => {
406
+ let r = (e.values[t] ?? 0) / I * 120;
399
407
  return n -= r, /* @__PURE__ */ _("rect", {
400
- x: t * k + k * .15,
401
- width: k * .7,
408
+ x: t * L + L * .15,
409
+ width: L * .7,
402
410
  y: n,
403
411
  height: r,
404
- fill: w[e.key]
412
+ fill: A[e.key]
405
413
  }, e.key);
406
414
  }) }, t);
407
- }) : T.map((e) => /* @__PURE__ */ _("polyline", {
415
+ }) : null,
416
+ (r ? M : N).map((e) => /* @__PURE__ */ _("polyline", {
408
417
  fill: "none",
409
- stroke: w[e.key],
418
+ stroke: A[e.key],
410
419
  strokeWidth: 2,
420
+ ...e.key === S && {
421
+ strokeDasharray: "0 5",
422
+ strokeLinecap: "round"
423
+ },
411
424
  vectorEffect: "non-scaling-stroke",
412
- points: e.values.map((e, t) => `${t * k + k / 2},${A(e)}`).join(" ")
425
+ points: e.values.map((e, t) => `${t * L + L / 2},${R(e)}`).join(" ")
413
426
  }, e.key)),
414
427
  [
415
428
  0,
416
- Math.floor((E - 1) / 2),
417
- E - 1
429
+ Math.floor((P - 1) / 2),
430
+ P - 1
418
431
  ].filter((e, t, n) => n.indexOf(e) === t).map((e) => /* @__PURE__ */ _("text", {
419
- x: e * k + k / 2,
432
+ x: e * L + L / 2,
420
433
  y: 132,
421
434
  textAnchor: "middle",
422
435
  className: "fill-muted-foreground text-[8px]",
423
- children: j(e)
436
+ children: z(e)
424
437
  }, e))
425
438
  ]
426
439
  }), y && /* @__PURE__ */ _(s, {
427
440
  x: y.x,
428
441
  children: /* @__PURE__ */ _(c, { ...((e) => ({
429
- label: j(e),
442
+ label: z(e),
430
443
  total: !1,
431
444
  formatValue: a,
432
- items: T.map((t) => ({
445
+ items: N.map((t) => ({
433
446
  key: t.key,
434
447
  name: t.name,
435
448
  value: t.values[e] ?? 0,
436
- color: w[t.key] ?? ""
449
+ color: A[t.key] ?? ""
437
450
  }))
438
451
  }))(y.i) })
439
452
  })]
440
- }), T.length > 1 && /* @__PURE__ */ _(o, { items: T.map((e) => ({
453
+ }), N.length > 1 && /* @__PURE__ */ _(o, { items: N.map((e) => ({
441
454
  key: e.key,
442
455
  label: e.name,
443
- color: w[e.key] ?? ""
456
+ color: A[e.key] ?? ""
444
457
  })) })]
445
458
  });
446
459
  }
447
- function N(e, t, n) {
460
+ function F(e, t, n) {
448
461
  let r = (e) => {
449
462
  let t = String(e);
450
463
  return /[",\n]/.test(t) ? `"${t.replaceAll("\"", "\"\"")}"` : t;
451
- }, i = t.series.length > 0 && t.weeks.length > 0 ? [[n("week"), ...t.series.map((e) => e.name || e.key)], ...t.weeks.map((e, n) => [e, ...t.series.map((e) => e.values[n] ?? 0)])] : t.issues.length > 0 ? [[
464
+ }, i = t.series.length > 0 && C(t).length > 0 ? [[n(t.days.length > 0 ? "day" : "week"), ...t.series.map((e) => e.key === S ? n("series.total") : e.name || e.key)], ...C(t).map((e, n) => [e, ...t.series.map((e) => e.values[n] ?? 0)])] : t.issues.length > 0 ? [[
452
465
  "identifier",
453
466
  "title",
454
467
  "status"
@@ -467,4 +480,4 @@ function N(e, t, n) {
467
480
  ])], a = new Blob([i.map((e) => e.map(r).join(",")).join("\n")], { type: "text/csv" }), o = document.createElement("a");
468
481
  o.href = URL.createObjectURL(a), o.download = `${e.replace(/[^\w.-]+/g, "-")}.csv`, o.click(), URL.revokeObjectURL(o.href);
469
482
  }
470
- export { T as DashboardPanel, D as PanelChart, b as issuesSearch, C as sharingItems, w as sharingOf, S as starterPanels };
483
+ export { D as DashboardPanel, k as PanelChart, b as issuesSearch, T as sharingItems, E as sharingOf, w as starterPanels };
@@ -66,7 +66,7 @@ function w(e) {
66
66
  let t = S.flatMap((t) => (e[t] ?? []).map((e) => `${t}:${e}`));
67
67
  return t.length > 0 ? t.join(",") : void 0;
68
68
  }
69
- var T = (e) => Object.values(e).reduce((e, t) => e + t.length, 0), E = (e) => e === "priority";
69
+ var T = (e) => Object.values(e).reduce((e, t) => e + t.length, 0), E = (e) => e !== "cycles";
70
70
  function D(e, t, n) {
71
71
  let r = e[t] ?? [], i = r.includes(n) ? r.filter((e) => e !== n) : E(t) ? [...r, n] : [n], { [t]: a, ...o } = e;
72
72
  return i.length > 0 ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.193.0",
3
+ "version": "0.194.0",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -144,6 +144,7 @@ var P = [
144
144
  "created_completed",
145
145
  "open",
146
146
  "throughput",
147
+ "active_users",
147
148
  "cycle_time",
148
149
  "lead_time",
149
150
  "estimate",
@@ -226,14 +227,19 @@ function z({ workspace: e, initial: t, onClose: n, onSave: r }) {
226
227
  label: c("measure"),
227
228
  children: /* @__PURE__ */ D(S, {
228
229
  value: g.measure,
229
- onValueChange: (e) => e && C({ measure: e }),
230
+ onValueChange: (e) => {
231
+ e && (C({ measure: e }), e === "active_users" && d((e) => ({
232
+ ...e,
233
+ chart: "line"
234
+ })));
235
+ },
230
236
  items: P.map((e) => ({
231
237
  value: e,
232
238
  label: c(`measures.${e}`)
233
239
  }))
234
240
  })
235
241
  }),
236
- g.measure !== "created_completed" && /* @__PURE__ */ D(y, {
242
+ g.measure !== "created_completed" && g.measure !== "active_users" && /* @__PURE__ */ D(y, {
237
243
  label: c("groupBy"),
238
244
  children: /* @__PURE__ */ D(S, {
239
245
  value: g.groupBy ?? "",
@@ -275,6 +281,24 @@ function z({ workspace: e, initial: t, onClose: n, onSave: r }) {
275
281
  }))
276
282
  })
277
283
  }),
284
+ g.measure === "active_users" && /* @__PURE__ */ D(y, {
285
+ label: c("weeks"),
286
+ children: /* @__PURE__ */ D(S, {
287
+ value: String(g.days ?? 30),
288
+ onValueChange: (e) => e && C({ days: Number(e) }),
289
+ items: [
290
+ 7,
291
+ 14,
292
+ 30,
293
+ 90,
294
+ 180,
295
+ 365
296
+ ].map((e) => ({
297
+ value: String(e),
298
+ label: c("daysCount", { count: e })
299
+ }))
300
+ })
301
+ }),
278
302
  /* @__PURE__ */ D(y, {
279
303
  label: c("issuesFrom"),
280
304
  children: /* @__PURE__ */ D(S, {