@eifi1/ui-kit 0.26.0 → 0.27.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/README.md +15 -4
- package/dist/chart.d.ts +13 -9
- package/dist/components/account-chips.d.ts +1 -1
- package/dist/components/amount-input.d.ts +13 -9
- package/dist/components/button-group.d.ts +13 -9
- package/dist/components/calculator.d.ts +13 -9
- package/dist/components/confirm-dialog.d.ts +13 -9
- package/dist/components/copy-button.d.ts +10 -6
- package/dist/components/danger-confirm.d.ts +13 -9
- package/dist/components/data-table-cells.d.ts +1 -1
- package/dist/components/data-table-filter-popover.d.ts +1 -1
- package/dist/components/data-table-filters.d.ts +1 -1
- package/dist/components/data-table-labels.d.ts +1 -1
- package/dist/components/data-table-pagination.d.ts +1 -1
- package/dist/components/data-table.d.ts +1 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/facing-pair.d.ts +13 -9
- package/dist/components/file-button.d.ts +13 -9
- package/dist/components/file-dropzone.d.ts +13 -9
- package/dist/components/form-actions.d.ts +13 -9
- package/dist/components/iban-input.d.ts +13 -9
- package/dist/components/language-select.d.ts +13 -9
- package/dist/components/legal.d.ts +5 -2
- package/dist/components/legal.js +4 -10
- package/dist/components/legal.js.map +1 -1
- package/dist/components/money-field.d.ts +13 -9
- package/dist/components/number-field.d.ts +13 -9
- package/dist/components/number-input.d.ts +13 -9
- package/dist/components/numpad-sheet.d.ts +13 -9
- package/dist/components/phone-input.d.ts +13 -9
- package/dist/components/series-chart.d.ts +13 -9
- package/dist/components/settings-fields.d.ts +13 -9
- package/dist/components/share-card.d.ts +13 -9
- package/dist/components/text-link.d.ts +13 -9
- package/dist/components/time-input.d.ts +13 -9
- package/dist/components/ui.d.ts +10 -6
- package/dist/components/use-table-state.d.ts +1 -1
- package/dist/{data-table-labels-Cdn1QS2k.d.ts → data-table-labels-DUELeXpa.d.ts} +5 -0
- package/dist/data-table.d.ts +1 -1
- package/dist/feedback/feedback-attachment.d.ts +13 -9
- package/dist/feedback/feedback-attachment.js +3 -3
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-capture.d.ts +71 -0
- package/dist/feedback/feedback-capture.js +194 -0
- package/dist/feedback/feedback-capture.js.map +1 -0
- package/dist/feedback/feedback-context.d.ts +71 -0
- package/dist/feedback/feedback-context.js +96 -0
- package/dist/feedback/feedback-context.js.map +1 -0
- package/dist/feedback/feedback-crash.d.ts +276 -0
- package/dist/feedback/feedback-crash.js +225 -0
- package/dist/feedback/feedback-crash.js.map +1 -0
- package/dist/feedback/feedback-dialog.d.ts +13 -9
- package/dist/feedback/feedback-dialog.js +5 -3
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.d.ts +13 -9
- package/dist/feedback/feedback-inbox.js +89 -49
- package/dist/feedback/feedback-inbox.js.map +1 -1
- package/dist/feedback/feedback-labels.d.ts +71 -0
- package/dist/feedback/feedback-labels.js +48 -0
- package/dist/feedback/feedback-labels.js.map +1 -0
- package/dist/feedback/feedback-menu.d.ts +71 -0
- package/dist/feedback/feedback-menu.js +61 -0
- package/dist/feedback/feedback-menu.js.map +1 -0
- package/dist/feedback/feedback-record.d.ts +71 -0
- package/dist/feedback/feedback-record.js +104 -0
- package/dist/feedback/feedback-record.js.map +1 -0
- package/dist/feedback/feedback-row-detail.d.ts +71 -0
- package/dist/feedback/feedback-row-detail.js +437 -0
- package/dist/feedback/feedback-row-detail.js.map +1 -0
- package/dist/feedback/feedback-status-undo.d.ts +71 -0
- package/dist/feedback/feedback-status-undo.js +40 -0
- package/dist/feedback/feedback-status-undo.js.map +1 -0
- package/dist/feedback/feedback-submit.d.ts +182 -0
- package/dist/feedback/feedback-submit.js +101 -0
- package/dist/feedback/feedback-submit.js.map +1 -0
- package/dist/feedback/feedback-swipe.d.ts +152 -0
- package/dist/feedback/feedback-swipe.js +73 -0
- package/dist/feedback/feedback-swipe.js.map +1 -0
- package/dist/feedback/feedback-table.d.ts +71 -0
- package/dist/feedback/feedback-table.js +357 -0
- package/dist/feedback/feedback-table.js.map +1 -0
- package/dist/feedback/feedback-thread.d.ts +13 -9
- package/dist/feedback.d.ts +17 -9
- package/dist/feedback.js +11 -0
- package/dist/feedback.js.map +1 -1
- package/dist/hooks/use-file-drop.d.ts +13 -9
- package/dist/i18n/defaults.d.ts +13 -9
- package/dist/i18n/defaults.js +16 -0
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.d.ts +13 -9
- package/dist/i18n/german.js +91 -5
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +7 -3
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.d.ts +13 -9
- package/dist/i18n/locales/de-CH.d.ts +13 -9
- package/dist/i18n/locales/en.d.ts +13 -9
- package/dist/i18n/locales/en.js +10 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +13 -9
- package/dist/i18n/locales/es.js +89 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +13 -9
- package/dist/i18n/locales/fr.js +89 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +13 -9
- package/dist/i18n/locales/hu.js +90 -5
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +13 -9
- package/dist/i18n/locales/it.js +89 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +13 -9
- package/dist/i18n/locales/zh.js +89 -5
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.d.ts +16 -11
- package/dist/i18n/review.js +11 -0
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/swiss.js +3 -1
- package/dist/i18n/swiss.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/{feedback-BXKH-ToU.d.ts → kit-labels-DQg82eHB.d.ts} +1275 -25
- package/dist/rhf/fields.d.ts +13 -9
- package/dist/rhf/form.d.ts +13 -9
- package/dist/rhf.d.ts +13 -9
- package/dist/shell/app-shell.d.ts +13 -9
- package/dist/shell/top-bar-brand.d.ts +13 -9
- package/dist/shell.d.ts +11 -11
- package/dist/wizard/stepper-nav.d.ts +13 -9
- package/dist/wizard.d.ts +13 -9
- package/package.json +6 -1
- package/src/components/data-table.tsx +5 -0
- package/src/components/legal.tsx +8 -7
- package/src/feedback/feedback-attachment.tsx +19 -3
- package/src/feedback/feedback-capture.ts +285 -0
- package/src/feedback/feedback-context.tsx +217 -0
- package/src/feedback/feedback-crash.ts +547 -0
- package/src/feedback/feedback-dialog.tsx +29 -6
- package/src/feedback/feedback-inbox.tsx +131 -27
- package/src/feedback/feedback-labels.ts +127 -0
- package/src/feedback/feedback-menu.tsx +132 -0
- package/src/feedback/feedback-record.ts +345 -0
- package/src/feedback/feedback-row-detail.tsx +825 -0
- package/src/feedback/feedback-status-undo.ts +111 -0
- package/src/feedback/feedback-submit.tsx +224 -0
- package/src/feedback/feedback-swipe.tsx +170 -0
- package/src/feedback/feedback-table.tsx +757 -0
- package/src/feedback.ts +13 -0
- package/src/i18n/defaults.ts +16 -0
- package/src/i18n/german.ts +98 -5
- package/src/i18n/kit-labels.tsx +20 -0
- package/src/i18n/locales/en.ts +15 -1
- package/src/i18n/locales/es.ts +96 -5
- package/src/i18n/locales/fr.ts +95 -5
- package/src/i18n/locales/hu.ts +94 -5
- package/src/i18n/locales/it.ts +97 -5
- package/src/i18n/locales/zh.ts +90 -5
- package/src/i18n/review.ts +14 -2
- package/src/i18n/swiss.ts +5 -1
- package/src/index.ts +13 -0
- package/tokens.css +4 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Inbox, MessageSquare } from "lucide-react";
|
|
4
|
+
import { useKitLabels } from "../i18n/kit-labels.js";
|
|
5
|
+
import { TopBarActionMenu } from "../shell/topbar-action-menu.js";
|
|
6
|
+
import { FEEDBACK_CATEGORY_META } from "./feedback-inbox.js";
|
|
7
|
+
import { useFeedbackCategoryLabels } from "./feedback-labels.js";
|
|
8
|
+
import { FEEDBACK_PICKABLE_CATEGORIES } from "./feedback-record.js";
|
|
9
|
+
const DEFAULT_FEEDBACK_MENU_LABELS = {
|
|
10
|
+
trigger: "Send feedback",
|
|
11
|
+
myFeedback: "My feedback",
|
|
12
|
+
viewFeedback: "View feedback"
|
|
13
|
+
};
|
|
14
|
+
function FeedbackMenu({
|
|
15
|
+
onFile,
|
|
16
|
+
isAdmin = false,
|
|
17
|
+
extraEntries,
|
|
18
|
+
myFeedbackHref = "/my-feedback",
|
|
19
|
+
inboxHref = "/feedback",
|
|
20
|
+
iconBadge,
|
|
21
|
+
labels: labelsProp,
|
|
22
|
+
align
|
|
23
|
+
}) {
|
|
24
|
+
const labels = useKitLabels("feedbackMenu", DEFAULT_FEEDBACK_MENU_LABELS, labelsProp);
|
|
25
|
+
const categoryLabels = useFeedbackCategoryLabels();
|
|
26
|
+
const entries = [
|
|
27
|
+
...FEEDBACK_PICKABLE_CATEGORIES.map((category) => {
|
|
28
|
+
const Icon = FEEDBACK_CATEGORY_META[category].icon;
|
|
29
|
+
return {
|
|
30
|
+
key: category,
|
|
31
|
+
icon: /* @__PURE__ */ jsx(Icon, { className: "size-4" }),
|
|
32
|
+
label: categoryLabels[category],
|
|
33
|
+
onSelect: () => onFile(category)
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
36
|
+
{ kind: "divider", key: "feedback-divider" },
|
|
37
|
+
...extraEntries ?? [],
|
|
38
|
+
{
|
|
39
|
+
kind: "link",
|
|
40
|
+
key: isAdmin ? "view-feedback" : "my-feedback",
|
|
41
|
+
to: isAdmin ? inboxHref : myFeedbackHref,
|
|
42
|
+
icon: /* @__PURE__ */ jsx(Inbox, { className: "size-4" }),
|
|
43
|
+
label: isAdmin ? labels.viewFeedback : labels.myFeedback
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
TopBarActionMenu,
|
|
48
|
+
{
|
|
49
|
+
icon: /* @__PURE__ */ jsx(MessageSquare, { className: "size-5" }),
|
|
50
|
+
iconBadge,
|
|
51
|
+
ariaLabel: labels.trigger,
|
|
52
|
+
entries,
|
|
53
|
+
align
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
DEFAULT_FEEDBACK_MENU_LABELS,
|
|
59
|
+
FeedbackMenu
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=feedback-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-menu.tsx"],"sourcesContent":["import { Inbox, MessageSquare } from \"lucide-react\";\nimport type { UserAvatarBadge } from \"../components/user-avatar\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { TopBarActionMenu, type TopBarMenuEntry } from \"../shell/topbar-action-menu\";\nimport { FEEDBACK_CATEGORY_META, type FeedbackCategory } from \"./feedback-inbox\";\nimport { useFeedbackCategoryLabels } from \"./feedback-labels\";\nimport { FEEDBACK_PICKABLE_CATEGORIES } from \"./feedback-record\";\n\n/**\n * `feedbackMenu` — the top-bar feedback menu's own words (0.27.0). The four category rows\n * are `feedbackCategory`'s, shared with the badges and the dialog's picker. de-CH canon\n * (keksdose `de-CH.json`): `trigger` \"Feedback senden\", `myFeedback` \"Mein Feedback\",\n * `viewFeedback` \"Feedback ansehen\".\n */\nexport interface FeedbackMenuLabels {\n /** The trigger's accessible name, and the menu's. keksdose `feedback.send`. */\n trigger: string;\n /** The link to the reporter's own reports — everyone but an admin. keksdose\n * `feedback.my_title`. */\n myFeedback: string;\n /** The link to the inbox — an admin's one list link, in place of \"My feedback\".\n * keksdose `feedback.view_all`. */\n viewFeedback: string;\n}\n\nexport const DEFAULT_FEEDBACK_MENU_LABELS: FeedbackMenuLabels = {\n trigger: \"Send feedback\",\n myFeedback: \"My feedback\",\n viewFeedback: \"View feedback\",\n};\n\nexport interface FeedbackMenuProps {\n /** A category row was chosen — open the submit dialog on it (`useFeedbackSubmit`'s\n * `open`). Never called with `CRASH`: there is no row for it. */\n onFile: (category: FeedbackCategory) => void;\n /** The list link is \"View feedback\" → {@link inboxHref} INSTEAD of \"My feedback\" (§4.1,\n * keksdose `top-bar.tsx:205-214`). The admin check is the app's (kastlan's is\n * company-scoped). Default `false`. */\n isAdmin?: boolean;\n /**\n * Rows of the app's own, between the divider and the list link — keksdose's\n * `Sparkles` Help assistant → `/assistant` and `MessagesSquare` Support chat →\n * `/support` with its unread chip. Any {@link TopBarMenuEntry}; keep their `key`s clear\n * of the menu's own (`BUG`, `IDEA`, `QUESTION`, `OTHER`, `feedback-divider`,\n * `my-feedback`, `view-feedback`).\n */\n extraEntries?: TopBarMenuEntry[];\n /** The user's own reports, linked for everyone but an admin. Default `\"/my-feedback\"`\n * (§2.3). */\n myFeedbackHref?: string;\n /** The admin inbox, linked for an admin. Default `\"/feedback\"` (§2.3). */\n inboxHref?: string;\n /** A dot on the trigger — keksdose's unread support replies (`tone: \"danger\"`). Its\n * `label` joins the trigger's name (\"Send feedback 2 unread\"). The words are the app's. */\n iconBadge?: UserAvatarBadge | null;\n /** Prop > `<UiKitProvider labels={{ feedbackMenu }}>` > English. */\n labels?: Partial<FeedbackMenuLabels>;\n /** Which edge of the trigger the panel lines up with. Default `end`. */\n align?: \"start\" | \"end\" | \"left\" | \"right\";\n}\n\n/**\n * The top-bar feedback menu, the same in every app (0.27.0, docs/feedback-harmonization.md\n * §4.1) — keksdose `frontend/src/app/top-bar.tsx:156` on the kit's `TopBarActionMenu`:\n *\n * 1. a `MessageSquare` trigger named \"Send feedback\", with an optional `iconBadge`;\n * 2. Bug · Idea · Question · Other (`Bug`, `Lightbulb`, `HelpCircle`, `MoreHorizontal` —\n * the category badges' own glyphs), each calling `onFile(category)`;\n * 3. a divider, always;\n * 4. the app's `extraEntries`;\n * 5. ONE list link, `Inbox`: an admin's is \"View feedback\" → `/feedback`, everyone\n * else's \"My feedback\" → `/my-feedback` — keksdose's (`top-bar.tsx:205-214`, feedback\n * #331: admins get the management view, everyone else their own submissions).\n *\n * WHY A PRESET. Three apps had drawn three menus on the same primitive and they disagreed:\n * kastlan headed it \"New submission\", Kurvenschmiede \"Send feedback\" with a single link\n * that changed its words by role, keksdose had no heading and one link by role. keksdose\n * is the source (§2.4, §7.11): no heading, one link — the inbox for an admin, who reaches\n * their own reports there too — and the kit draws it, so the row order, the icons and the\n * words cannot drift again. Where the menu sits in the bar stays each app's.\n *\n * `CRASH` has no row and never will: crash reports are filed by the error boundary with\n * the stack and a fingerprint (keksdose feedback #160), and a hand-filed \"crash\" would sort\n * to the top like one with none of what makes it actionable. The server refuses it with a\n * 422 anyway (§3.4).\n *\n * The menu forwards nothing to its trigger, as `TopBarActionMenu` does not: keksdose's\n * tour anchor (`data-tour=\"feedback-menu\"`) stays on a wrapping `<span>`. Needs a router,\n * as every `TopBarActionMenu` with link rows does.\n */\nexport function FeedbackMenu({\n onFile,\n isAdmin = false,\n extraEntries,\n myFeedbackHref = \"/my-feedback\",\n inboxHref = \"/feedback\",\n iconBadge,\n labels: labelsProp,\n align,\n}: FeedbackMenuProps) {\n const labels = useKitLabels(\"feedbackMenu\", DEFAULT_FEEDBACK_MENU_LABELS, labelsProp);\n const categoryLabels = useFeedbackCategoryLabels();\n const entries: TopBarMenuEntry[] = [\n ...FEEDBACK_PICKABLE_CATEGORIES.map((category): TopBarMenuEntry => {\n const Icon = FEEDBACK_CATEGORY_META[category].icon;\n return {\n key: category,\n icon: <Icon className=\"size-4\" />,\n label: categoryLabels[category],\n onSelect: () => onFile(category),\n };\n }),\n { kind: \"divider\", key: \"feedback-divider\" },\n ...(extraEntries ?? []),\n {\n kind: \"link\",\n key: isAdmin ? \"view-feedback\" : \"my-feedback\",\n to: isAdmin ? inboxHref : myFeedbackHref,\n icon: <Inbox className=\"size-4\" />,\n label: isAdmin ? labels.viewFeedback : labels.myFeedback,\n },\n ];\n return (\n <TopBarActionMenu\n icon={<MessageSquare className=\"size-5\" />}\n iconBadge={iconBadge}\n ariaLabel={labels.trigger}\n entries={entries}\n align={align}\n />\n );\n}\n"],"mappings":";AA2Gc;AA3Gd,SAAS,OAAO,qBAAqB;AAErC,SAAS,oBAAoB;AAC7B,SAAS,wBAA8C;AACvD,SAAS,8BAAqD;AAC9D,SAAS,iCAAiC;AAC1C,SAAS,oCAAoC;AAmBtC,MAAM,+BAAmD;AAAA,EAC9D,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,cAAc;AAChB;AA6DO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,EACR;AACF,GAAsB;AACpB,QAAM,SAAS,aAAa,gBAAgB,8BAA8B,UAAU;AACpF,QAAM,iBAAiB,0BAA0B;AACjD,QAAM,UAA6B;AAAA,IACjC,GAAG,6BAA6B,IAAI,CAAC,aAA8B;AACjE,YAAM,OAAO,uBAAuB,QAAQ,EAAE;AAC9C,aAAO;AAAA,QACL,KAAK;AAAA,QACL,MAAM,oBAAC,QAAK,WAAU,UAAS;AAAA,QAC/B,OAAO,eAAe,QAAQ;AAAA,QAC9B,UAAU,MAAM,OAAO,QAAQ;AAAA,MACjC;AAAA,IACF,CAAC;AAAA,IACD,EAAE,MAAM,WAAW,KAAK,mBAAmB;AAAA,IAC3C,GAAI,gBAAgB,CAAC;AAAA,IACrB;AAAA,MACE,MAAM;AAAA,MACN,KAAK,UAAU,kBAAkB;AAAA,MACjC,IAAI,UAAU,YAAY;AAAA,MAC1B,MAAM,oBAAC,SAAM,WAAU,UAAS;AAAA,MAChC,OAAO,UAAU,OAAO,eAAe,OAAO;AAAA,IAChD;AAAA,EACF;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,oBAAC,iBAAc,WAAU,UAAS;AAAA,MACxC;AAAA,MACA,WAAW,OAAO;AAAA,MAClB;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export { F as FEEDBACK_ATTACHMENT_ACCEPT, r as FEEDBACK_AUTHOR_EDITABLE_STATUSES, s as FEEDBACK_AWAITING_STATUSES, v as FEEDBACK_PICKABLE_CATEGORIES, w as FEEDBACK_REWORKABLE_STATUSES, $ as FeedbackContext, ah as FeedbackEnvironment, as as FeedbackRecord, aY as appendRework, aZ as attachmentName, a_ as feedbackAttachmentLine, bc as isImageAttachment, bf as replaceDescription, bg as reworkCount, bi as splitBodyAttachments, bj as splitDescription } from '../kit-labels-DQg82eHB.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '../data-table-labels-DUELeXpa.js';
|
|
4
|
+
import '../components/data-table-sort.js';
|
|
5
|
+
import '../components/swipeable-row.js';
|
|
6
|
+
import '../components/mini-calendar.js';
|
|
7
|
+
import '../components/calendar-heatmap.js';
|
|
8
|
+
import '../components/popover.js';
|
|
9
|
+
import '../components/chip.js';
|
|
10
|
+
import 'lucide-react';
|
|
11
|
+
import '../components/field-sync.js';
|
|
12
|
+
import '../components/tooltip.js';
|
|
13
|
+
import '../hooks/use-anchored-rect.js';
|
|
14
|
+
import '../lib/clipping.js';
|
|
15
|
+
import '../wizard/types.js';
|
|
16
|
+
import '../tour/tour.js';
|
|
17
|
+
import '../search/command-palette.js';
|
|
18
|
+
import '../search/global-search.js';
|
|
19
|
+
import '../search/search-index.js';
|
|
20
|
+
import '../components/month-picker.js';
|
|
21
|
+
import '../components/page-contents.js';
|
|
22
|
+
import '../components/series-chart-labels.js';
|
|
23
|
+
import '../components/pie-chart-labels.js';
|
|
24
|
+
import '../components/sparkline.js';
|
|
25
|
+
import '../components/stat-tile.js';
|
|
26
|
+
import '../components/signature-pad.js';
|
|
27
|
+
import '../components/password-strength.js';
|
|
28
|
+
import '../components/swatch-picker.js';
|
|
29
|
+
import '../components/tile-radio.js';
|
|
30
|
+
import '../components/icon-picker.js';
|
|
31
|
+
import '../components/dialog-frame.js';
|
|
32
|
+
import '../components/modal.js';
|
|
33
|
+
import '../hooks/use-search-param-state.js';
|
|
34
|
+
import '../components/measured-grid.js';
|
|
35
|
+
import '../components/user-avatar.js';
|
|
36
|
+
import '../components/status-dot.js';
|
|
37
|
+
import '../components/progress-bar.js';
|
|
38
|
+
import '../components/signed-amount.js';
|
|
39
|
+
import '../shell/topbar-action-menu.js';
|
|
40
|
+
import '../components/menu-item.js';
|
|
41
|
+
import '../components/floating-panel.js';
|
|
42
|
+
import '../hooks/use-authed-src.js';
|
|
43
|
+
import '../components/account-settings-labels.js';
|
|
44
|
+
import '../components/bulk-action-bar.js';
|
|
45
|
+
import '../components/list.js';
|
|
46
|
+
import '../components/breadcrumbs.js';
|
|
47
|
+
import '../components/toast.js';
|
|
48
|
+
import '../components/description-list.js';
|
|
49
|
+
import '../components/line-items.js';
|
|
50
|
+
import '../components/error-boundary.js';
|
|
51
|
+
import '../components/authed-image.js';
|
|
52
|
+
import '../components/image-grid.js';
|
|
53
|
+
import '../components/lightbox.js';
|
|
54
|
+
import '../components/write-lock.js';
|
|
55
|
+
import '../components/legal.js';
|
|
56
|
+
import '../components/account-chips.js';
|
|
57
|
+
import '../lib/format.js';
|
|
58
|
+
import '../components/reauth-dialog.js';
|
|
59
|
+
import '../components/server-wake.js';
|
|
60
|
+
import '../lib/server-wake.js';
|
|
61
|
+
import '../components/translation-review-labels.js';
|
|
62
|
+
import '../lib/translation-review.js';
|
|
63
|
+
import '../components/country-select.js';
|
|
64
|
+
import '../components/inline-edit-field.js';
|
|
65
|
+
import '../lib/iban.js';
|
|
66
|
+
import '../lib/phone.js';
|
|
67
|
+
import '../components/sign-chip.js';
|
|
68
|
+
import '../components/column-mapper.js';
|
|
69
|
+
import '../lib/column-mapping.js';
|
|
70
|
+
import '../lib/table-text.js';
|
|
71
|
+
import '../components/field-parts.js';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { DEFAULT_ATTACHMENT_ACCEPT } from "./feedback-attachment.js";
|
|
3
|
+
import { FEEDBACK_CATEGORY_ORDER } from "./feedback-inbox.js";
|
|
4
|
+
const FEEDBACK_ATTACHMENT_ACCEPT = [
|
|
5
|
+
...DEFAULT_ATTACHMENT_ACCEPT,
|
|
6
|
+
"application/pdf",
|
|
7
|
+
"text/plain"
|
|
8
|
+
];
|
|
9
|
+
const FEEDBACK_PICKABLE_CATEGORIES = Object.freeze(
|
|
10
|
+
FEEDBACK_CATEGORY_ORDER.filter((category) => category !== "CRASH")
|
|
11
|
+
);
|
|
12
|
+
const FEEDBACK_REWORKABLE_STATUSES = Object.freeze([
|
|
13
|
+
"IN_EVALUATION",
|
|
14
|
+
"NEEDS_LIVE_TEST",
|
|
15
|
+
"POSTPONED",
|
|
16
|
+
"DONE",
|
|
17
|
+
"WONT_DO"
|
|
18
|
+
]);
|
|
19
|
+
const FEEDBACK_AUTHOR_EDITABLE_STATUSES = Object.freeze([
|
|
20
|
+
"OPEN",
|
|
21
|
+
"IN_PROGRESS"
|
|
22
|
+
]);
|
|
23
|
+
const FEEDBACK_AWAITING_STATUSES = Object.freeze([
|
|
24
|
+
"IN_EVALUATION",
|
|
25
|
+
"NEEDS_LIVE_TEST"
|
|
26
|
+
]);
|
|
27
|
+
const ATTACHMENT_URL = /^\/api\/v1\/feedback\/attachments\/[\w.-]+$/;
|
|
28
|
+
const ATTACHMENT_LINE = /^\[screenshot\]\s+(\/api\/v1\/feedback\/attachments\/[\w.-]+)\s*$/;
|
|
29
|
+
const REWORK_RULE = /^---\s*REWORK\b.*---$/;
|
|
30
|
+
const BLOCK_RULE = /^---\s*(?:REWORK|COMMENT)\b.*---$/;
|
|
31
|
+
function feedbackAttachmentLine(url) {
|
|
32
|
+
return `[screenshot] ${url}`;
|
|
33
|
+
}
|
|
34
|
+
function appendRework(body, note, url, now = /* @__PURE__ */ new Date()) {
|
|
35
|
+
const text = note.trim();
|
|
36
|
+
if (!text) return null;
|
|
37
|
+
if (url && !ATTACHMENT_URL.test(url)) {
|
|
38
|
+
throw new TypeError(`appendRework: not a feedback attachment URL: ${url}`);
|
|
39
|
+
}
|
|
40
|
+
const stamp = now.toISOString().slice(0, 16).replace("T", " ");
|
|
41
|
+
const block = `--- REWORK ${stamp} ---
|
|
42
|
+
${url ? `${text}
|
|
43
|
+
${feedbackAttachmentLine(url)}` : text}`;
|
|
44
|
+
return body ? `${body}
|
|
45
|
+
|
|
46
|
+
${block}` : block;
|
|
47
|
+
}
|
|
48
|
+
function reworkCount(body) {
|
|
49
|
+
let n = 0;
|
|
50
|
+
for (const line of body.split("\n")) if (REWORK_RULE.test(line.trim())) n += 1;
|
|
51
|
+
return n;
|
|
52
|
+
}
|
|
53
|
+
function splitBodyAttachments(body) {
|
|
54
|
+
const urls = [];
|
|
55
|
+
const kept = [];
|
|
56
|
+
for (const line of body.split("\n")) {
|
|
57
|
+
const match = ATTACHMENT_LINE.exec(line.trim());
|
|
58
|
+
if (match) urls.push(match[1]);
|
|
59
|
+
else kept.push(line);
|
|
60
|
+
}
|
|
61
|
+
return { text: kept.join("\n").replace(/\n+$/, ""), urls };
|
|
62
|
+
}
|
|
63
|
+
function cutAtFirstBlock(body) {
|
|
64
|
+
const lines = body.split("\n");
|
|
65
|
+
const at = lines.findIndex((line) => BLOCK_RULE.test(line.trim()));
|
|
66
|
+
if (at === -1) return { head: body, appended: "" };
|
|
67
|
+
return { head: lines.slice(0, at).join("\n"), appended: lines.slice(at).join("\n") };
|
|
68
|
+
}
|
|
69
|
+
function splitDescription(body) {
|
|
70
|
+
const { head, appended } = cutAtFirstBlock(body);
|
|
71
|
+
return { description: splitBodyAttachments(head).text, appended };
|
|
72
|
+
}
|
|
73
|
+
function replaceDescription(body, description) {
|
|
74
|
+
const { head, appended } = cutAtFirstBlock(body);
|
|
75
|
+
const files = splitBodyAttachments(head).urls.map(feedbackAttachmentLine);
|
|
76
|
+
const text = description.trim();
|
|
77
|
+
const top = [...text ? [text] : [], ...files].join("\n");
|
|
78
|
+
if (!appended) return top;
|
|
79
|
+
return top ? `${top}
|
|
80
|
+
|
|
81
|
+
${appended}` : appended;
|
|
82
|
+
}
|
|
83
|
+
function isImageAttachment(url) {
|
|
84
|
+
return /\.(png|jpe?g|webp|gif)$/i.test(url);
|
|
85
|
+
}
|
|
86
|
+
function attachmentName(url) {
|
|
87
|
+
return url.slice(url.lastIndexOf("/") + 1);
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
FEEDBACK_ATTACHMENT_ACCEPT,
|
|
91
|
+
FEEDBACK_AUTHOR_EDITABLE_STATUSES,
|
|
92
|
+
FEEDBACK_AWAITING_STATUSES,
|
|
93
|
+
FEEDBACK_PICKABLE_CATEGORIES,
|
|
94
|
+
FEEDBACK_REWORKABLE_STATUSES,
|
|
95
|
+
appendRework,
|
|
96
|
+
attachmentName,
|
|
97
|
+
feedbackAttachmentLine,
|
|
98
|
+
isImageAttachment,
|
|
99
|
+
replaceDescription,
|
|
100
|
+
reworkCount,
|
|
101
|
+
splitBodyAttachments,
|
|
102
|
+
splitDescription
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=feedback-record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-record.ts"],"sourcesContent":["import { DEFAULT_ATTACHMENT_ACCEPT } from \"./feedback-attachment\";\nimport { FEEDBACK_CATEGORY_ORDER } from \"./feedback-inbox\";\nimport type { FeedbackCategory, FeedbackStatus } from \"./feedback-inbox\";\n\n/**\n * One feedback report as the three apps send it, and the facts the kit reads off it.\n *\n * Until 0.27 the inbox parts took no report at all (\"no `Feedback` type in this file\",\n * feedback-inbox.tsx): keksdose kept its reporter context in a JSON column, kastlan a\n * thinner copy of it, Kurvenschmiede a `page_path` and the bytes in the row. Marcel's\n * feedback round (2026-10-04, docs/feedback-harmonization.md) settled one API contract\n * for all three — keksdose's, read off its code — so the apps now share one shape and the\n * kit can take a row instead of a dozen loose values. This file is that shape (§3.1,\n * §3.2), the contract's constants (§3.4, §3.5, §4.3) and the readers and writers of the\n * one field whose format is itself contract: the body, which carries the rework rounds\n * (§3.4) — lifted from keksdose `frontend/src/features/feedback/body-attachments.ts`.\n *\n * Plain functions and data, no components: everything here is as usable from a loop\n * script's helper or a test as from a page.\n */\n\n/* ── The resource (§3.1, §3.2) ────────────────────────────────────────────── */\n\n/** Which copy of an app a report came from — keksdose `app/deploy-environment.ts`.\n * Any other string is read as \"not prod\" (the admin list shows it upper-cased as a\n * chip, §4.3), so an app with a `staging` loses nothing. */\nexport type FeedbackEnvironment = \"prod\" | \"dev\" | \"local\";\n\n/**\n * The reporter's context, written by the submit dialog (keksdose\n * `use-feedback-dialog.tsx:105`) — §3.2 of the contract.\n *\n * **Every key is optional on read**, and a reader treats a missing one as \"unknown\":\n * kastlan's client sends six of them (no email, no version), Kurvenschmiede's old rows are\n * backfilled from two columns with a path-only `url`, crash rows add their own (and\n * `origin` / `environment` from the crash payload, §3.6 — older crash rows have neither),\n * and an erased account's row keeps only an allow-list (§3.2: `environment` stays,\n * `origin` goes). Extra keys are allowed — a server may add its own — hence the index\n * signature.\n */\nexport interface FeedbackContext {\n /** The full `location.href` at open time; `\"\"` when \"Attach current page URL\" was off.\n * Readers also accept a path-only value (Kurvenschmiede's backfilled rows). */\n url?: string;\n /** Its pathname; `\"\"` when the URL was withheld. */\n route?: string;\n /** `location.origin` — which copy of the app, not personal; never withheld. */\n origin?: string;\n /** {@link FeedbackEnvironment}, or whatever the app calls its other copies. */\n environment?: FeedbackEnvironment | (string & {});\n /** The submitter, as a snapshot. The server should overwrite the three `user_*` keys\n * from the session (Kurvenschmiede does), so nobody files in someone else's name. */\n user_id?: number | null;\n user_email?: string | null;\n user_display_name?: string | null;\n /** `\"406x816\"`. */\n viewport?: string;\n /** `navigator.userAgent`. */\n ua?: string;\n /** The app build (`__APP_VERSION__`). */\n version?: string;\n // Crash rows (server-written, keksdose `feedback_service.py:346`).\n fingerprint?: string;\n /** Which error boundary caught it. */\n boundary?: \"app\" | \"page\" | (string & {});\n online?: boolean;\n occurrences?: number;\n first_seen_at?: string;\n last_seen_at?: string;\n auto_reported?: boolean;\n [key: string]: unknown;\n}\n\n/**\n * One report — `FeedbackResponse`, keksdose `schemas/feedback.py:117`, §3.1 of the\n * contract. What `GET /feedback`, `GET /feedback/my`, `POST /feedback` and\n * `PATCH /feedback/{id}` answer in all three apps.\n *\n * Extra fields are allowed and ignored (kastlan's `company_id`, `user_name`): an app's\n * own row type with more fields is assignable to this one as it stands.\n *\n * There is **no rework counter field** — {@link reworkCount} reads it off the body, so\n * nothing can forget to set it.\n */\nexport interface FeedbackRecord {\n id: number;\n /** `null`: the author's account was erased (keksdose live #275). */\n user_id: number | null;\n /** The admin list only (joined); `null` — or absent — on `/my`, create and update. */\n user_email?: string | null;\n /** 1–255 characters, never blank. */\n title: string;\n /** `\"\"` when none. Rework rounds are appended here (§3.4) — read it with\n * {@link splitDescription} / {@link splitBodyAttachments}, write it with\n * {@link appendRework} / {@link replaceDescription}. */\n body: string;\n category: FeedbackCategory;\n status: FeedbackStatus;\n /** §3.2; `null` on rows that have none. */\n context: FeedbackContext | null;\n /** The ONE captured screenshot's attachment URL, or `null`. */\n screenshot_url: string | null;\n /** Up to 5 other files; `null` = none. Optional because a server older than the\n * column sends no key at all (keksdose dev #578 met exactly that). */\n attachment_urls?: string[] | null;\n /** The team's answer; `null` = none written. */\n outcome: string | null;\n /** Set on ENTERING `DONE` / `WONT_DO`, cleared on leaving them. ISO 8601. */\n resolved_at: string | null;\n /** ISO 8601. */\n created_at: string;\n /** ISO 8601. */\n updated_at: string;\n}\n\n/* ── Constants (§3.4, §3.5, §4.3) ─────────────────────────────────────────── */\n\n/**\n * What a report may carry (§3.5, keksdose `upload_guards.py:197` and its\n * `attachment-options.ts`): the kit's four image types plus a PDF and a plain-text log\n * (keksdose feedback #87). SVG and HTML stay out — both are script-carrying documents in\n * an image's clothing. For `FeedbackAttachmentField` / `FeedbackDialog`'s `accept`, with\n * `DEFAULT_MAX_ATTACHMENTS` (5) and `DEFAULT_MAX_ATTACHMENT_BYTES` (10 MB) from\n * feedback-attachment.tsx, which already are the contract's limits.\n *\n * A plain array (not frozen) because `accept` takes `string[]`, as\n * `DEFAULT_ATTACHMENT_ACCEPT` does — copy it before changing it.\n */\nexport const FEEDBACK_ATTACHMENT_ACCEPT: string[] = [\n ...DEFAULT_ATTACHMENT_ACCEPT,\n \"application/pdf\",\n \"text/plain\",\n];\n\n/**\n * The categories a person can pick — every one but `CRASH`, in triage order (Bug, Idea,\n * Question, Other: the feedback menu's rows, §4.1). `CRASH` is filed by an error boundary\n * and the server refuses it by hand with a 422 (keksdose `_reject_manual_crash`), so no\n * picker may offer it.\n */\nexport const FEEDBACK_PICKABLE_CATEGORIES: readonly FeedbackCategory[] = Object.freeze(\n FEEDBACK_CATEGORY_ORDER.filter((category) => category !== \"CRASH\"),\n);\n\n/**\n * The statuses a report can be sent back for **rework** from (§3.4): everything the team\n * has answered — `IN_EVALUATION`, `NEEDS_LIVE_TEST`, `POSTPONED`, `DONE`, `WONT_DO`. On\n * these the server reopens the row when the body grows by a rework block; on `OPEN` /\n * `IN_PROGRESS` there is nothing to send back yet.\n */\nexport const FEEDBACK_REWORKABLE_STATUSES: readonly FeedbackStatus[] = Object.freeze([\n \"IN_EVALUATION\",\n \"NEEDS_LIVE_TEST\",\n \"POSTPONED\",\n \"DONE\",\n \"WONT_DO\",\n] as const);\n\n/**\n * The statuses in which the AUTHOR may still edit title, body and category (§3.4,\n * keksdose `canAuthorEdit`, `feedback-page.tsx:398`): `OPEN` and `IN_PROGRESS`. Once the\n * team has answered, the description is what they answered and stays as it was; a\n * correction goes in as a rework.\n */\nexport const FEEDBACK_AUTHOR_EDITABLE_STATUSES: readonly FeedbackStatus[] = Object.freeze([\n \"OPEN\",\n \"IN_PROGRESS\",\n] as const);\n\n/**\n * The two statuses that wait on the person triaging: answered and handed back for a\n * verdict, or answered and only checkable on a deployed build (keksdose\n * `AWAITING_VERDICT`, live #330). The phone's \"Only what is waiting for you\" toggle\n * narrows the inbox to exactly these (§4.3).\n */\nexport const FEEDBACK_AWAITING_STATUSES: readonly FeedbackStatus[] = Object.freeze([\n \"IN_EVALUATION\",\n \"NEEDS_LIVE_TEST\",\n] as const);\n\n/* ── The body (§3.4) ──────────────────────────────────────────────────────── */\n\n/**\n * The path every app serves attachments under (§3.3), and a key after it. Keys are\n * OPAQUE (§3.5): keksdose and Kurvenschmiede content-address (`<sha12>.<ext>`), kastlan's\n * storage keys are `<uuid32>_<sha12>.<ext>` — so `[\\w.-]+`, never a fixed hex shape.\n */\nconst ATTACHMENT_URL = /^\\/api\\/v1\\/feedback\\/attachments\\/[\\w.-]+$/;\n\n/**\n * One file line in a body. The marker is deliberately narrow — this path and nothing\n * else, alone on its line — so no sentence a user writes can be mistaken for one\n * (keksdose live #291). It says `[screenshot]` for a PDF or a text log too: the name is\n * history, the format is contract.\n */\nconst ATTACHMENT_LINE = /^\\[screenshot\\]\\s+(\\/api\\/v1\\/feedback\\/attachments\\/[\\w.-]+)\\s*$/;\n\n/**\n * The `--- REWORK <stamp> ---` rule a rework opens with. Anchored and whole-line for the\n * same reason as the file marker: \"I did a REWORK --- honestly\" is a sentence, not a\n * round. kastlan's folded `--- COMMENT <stamp> · <name> ---` blocks (§7.7) never match.\n */\nconst REWORK_RULE = /^---\\s*REWORK\\b.*---$/;\n\n/** Any appended block's opening rule: a rework round, or a kastlan comment folded into\n * the body by its one-time migration (§7.7). */\nconst BLOCK_RULE = /^---\\s*(?:REWORK|COMMENT)\\b.*---$/;\n\n/** The body line for one uploaded attachment — what {@link appendRework} writes under\n * the note. */\nexport function feedbackAttachmentLine(url: string): string {\n return `[screenshot] ${url}`;\n}\n\n/**\n * A rework round appended to a body — the exact text `PATCH /feedback/{id}` takes as the\n * new `body` (§3.4; keksdose `submitRework`, `feedback-page.tsx:350`):\n *\n * ```text\n * <old body>\\n\\n--- REWORK 2026-10-04 09:12 ---\\n<note>\\n[screenshot] /api/v1/feedback/attachments/<key>\n * ```\n *\n * - The stamp is UTC, `YYYY-MM-DD HH:MM` (`toISOString().slice(0, 16)`), from `now`.\n * - The old body is kept byte for byte, so the result STRICTLY EXTENDS it — which is\n * how the server recognises an append and reopens an answered row (keksdose\n * `_is_rework_append`, live #331). `\\n\\n` is left out when the old body is `\"\"`.\n * - ONE file per round (`url`), uploaded first by the caller: a body appended without\n * it would be a rework whose evidence never arrived.\n *\n * **Returns `null` when the trimmed note is empty** — a file alone cannot be sent\n * (keksdose `:577`). Null rather than a throw because an empty note is something a\n * person does, not a bug, and the type then makes every caller decide what an empty\n * box means before anything can reach the PATCH.\n *\n * **Throws a `TypeError` when `url` is not an attachment URL** of the contract's shape\n * (`/api/v1/feedback/attachments/<key>`): that one IS a bug — the upload handed back\n * something foreign — and written anyway it would sit in the body as prose that no\n * reader recognises as a file.\n */\nexport function appendRework(\n body: string,\n note: string,\n url?: string | null,\n now: Date = new Date(),\n): string | null {\n const text = note.trim();\n if (!text) return null;\n if (url && !ATTACHMENT_URL.test(url)) {\n throw new TypeError(`appendRework: not a feedback attachment URL: ${url}`);\n }\n const stamp = now.toISOString().slice(0, 16).replace(\"T\", \" \");\n const block = `--- REWORK ${stamp} ---\\n${url ? `${text}\\n${feedbackAttachmentLine(url)}` : text}`;\n return body ? `${body}\\n\\n${block}` : block;\n}\n\n/**\n * How many times a report has been sent back — the count of `--- REWORK … ---` rule\n * lines in its body (keksdose live #331: the \"category for items in rework\", derived\n * rather than stored, so nothing can forget to set it or leave it set). Folded kastlan\n * comments do not count.\n */\nexport function reworkCount(body: string): number {\n let n = 0;\n for (const line of body.split(\"\\n\")) if (REWORK_RULE.test(line.trim())) n += 1;\n return n;\n}\n\n/**\n * A body split into the prose to render and the files to show beside it, in body order.\n *\n * The file lines are stripped from the text: they are a location, not something anybody\n * wrote, and left in they would put a raw URL in the middle of a sentence. Trailing blank\n * lines go (what a stripped marker leaves at the end of a note); every blank line between\n * paragraphs stays.\n */\nexport function splitBodyAttachments(body: string): { text: string; urls: string[] } {\n const urls: string[] = [];\n const kept: string[] = [];\n for (const line of body.split(\"\\n\")) {\n const match = ATTACHMENT_LINE.exec(line.trim());\n if (match) urls.push(match[1]);\n else kept.push(line);\n }\n return { text: kept.join(\"\\n\").replace(/\\n+$/, \"\"), urls };\n}\n\n/** A body cut where its first appended block begins. */\nfunction cutAtFirstBlock(body: string): { head: string; appended: string } {\n const lines = body.split(\"\\n\");\n const at = lines.findIndex((line) => BLOCK_RULE.test(line.trim()));\n if (at === -1) return { head: body, appended: \"\" };\n return { head: lines.slice(0, at).join(\"\\n\"), appended: lines.slice(at).join(\"\\n\") };\n}\n\n/**\n * The ORIGINAL description, apart from everything appended to it since (§4.4.1).\n *\n * - `description` — what the author wrote when filing, without its file lines and\n * trailing blank lines: the text the \"Edit description\" editor holds.\n * - `appended` — every `--- REWORK … ---` round and folded `--- COMMENT … ---` block,\n * from the first one's rule line to the end, verbatim (`\"\"` when there are none).\n *\n * keksdose's editor edits the raw body (`initial={fb.body}`, `feedback-page.tsx:420`), so\n * an author tidying a typo could delete the rework history and the file lines with it.\n * The kit's editor holds `description` only and saves through\n * {@link replaceDescription}, which puts the rest back unchanged.\n */\nexport function splitDescription(body: string): { description: string; appended: string } {\n const { head, appended } = cutAtFirstBlock(body);\n return { description: splitBodyAttachments(head).text, appended };\n}\n\n/**\n * The body with its original description replaced and everything else kept — the file\n * lines of the original part (after the new text, in their order) and the appended\n * blocks (verbatim, after a blank line). The new text is trimmed; clearing it saves the\n * rest alone (`\"\"` when there is no rest).\n *\n * `replaceDescription(body, splitDescription(body).description)` gives back a canonical\n * body unchanged — a trimmed description, then each block after one blank line, as the\n * dialog and {@link appendRework} write them.\n */\nexport function replaceDescription(body: string, description: string): string {\n const { head, appended } = cutAtFirstBlock(body);\n const files = splitBodyAttachments(head).urls.map(feedbackAttachmentLine);\n const text = description.trim();\n const top = [...(text ? [text] : []), ...files].join(\"\\n\");\n if (!appended) return top;\n return top ? `${top}\\n\\n${appended}` : appended;\n}\n\n/**\n * Whether an attachment URL is a picture (keksdose dev #578). The upload route takes\n * PDFs and text logs too and serves them as downloads, never inline, so an `<img>` on\n * one shows a broken icon. The key's extension is the server's own statement of the\n * type (minted from the sniffed content), so it is the thing to read.\n */\nexport function isImageAttachment(url: string): boolean {\n return /\\.(png|jpe?g|webp|gif)$/i.test(url);\n}\n\n/** The file name an attachment downloads as — its key, the last segment of the URL. */\nexport function attachmentName(url: string): string {\n return url.slice(url.lastIndexOf(\"/\") + 1);\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import '../hooks/use-authed-src.js';
|
|
3
|
+
export { i as DEFAULT_FEEDBACK_DETAIL_LABELS, a5 as FeedbackDetailLabels, a6 as FeedbackDetailPatch, a8 as FeedbackDetailUpdate, au as FeedbackReworkSection, av as FeedbackReworkSectionProps, aw as FeedbackRowAccess, ax as FeedbackRowDetail, ay as FeedbackRowDetailProps, aW as FeedbackUpload, a$ as feedbackAttachmentUrls, b5 as feedbackPageHref, b6 as feedbackPagePath, b7 as feedbackPageUrl, b8 as feedbackRowAccess, bm as useFeedbackDetailLabels } from '../kit-labels-DQg82eHB.js';
|
|
4
|
+
import '../data-table-labels-DUELeXpa.js';
|
|
5
|
+
import '../components/data-table-sort.js';
|
|
6
|
+
import '../components/swipeable-row.js';
|
|
7
|
+
import '../components/mini-calendar.js';
|
|
8
|
+
import '../components/calendar-heatmap.js';
|
|
9
|
+
import '../components/popover.js';
|
|
10
|
+
import '../components/chip.js';
|
|
11
|
+
import 'lucide-react';
|
|
12
|
+
import '../components/field-sync.js';
|
|
13
|
+
import '../components/tooltip.js';
|
|
14
|
+
import '../hooks/use-anchored-rect.js';
|
|
15
|
+
import '../lib/clipping.js';
|
|
16
|
+
import '../wizard/types.js';
|
|
17
|
+
import '../tour/tour.js';
|
|
18
|
+
import '../search/command-palette.js';
|
|
19
|
+
import '../search/global-search.js';
|
|
20
|
+
import '../search/search-index.js';
|
|
21
|
+
import '../components/month-picker.js';
|
|
22
|
+
import '../components/page-contents.js';
|
|
23
|
+
import '../components/series-chart-labels.js';
|
|
24
|
+
import '../components/pie-chart-labels.js';
|
|
25
|
+
import '../components/sparkline.js';
|
|
26
|
+
import '../components/stat-tile.js';
|
|
27
|
+
import '../components/signature-pad.js';
|
|
28
|
+
import '../components/password-strength.js';
|
|
29
|
+
import '../components/swatch-picker.js';
|
|
30
|
+
import '../components/tile-radio.js';
|
|
31
|
+
import '../components/icon-picker.js';
|
|
32
|
+
import '../components/dialog-frame.js';
|
|
33
|
+
import '../components/modal.js';
|
|
34
|
+
import '../hooks/use-search-param-state.js';
|
|
35
|
+
import '../components/measured-grid.js';
|
|
36
|
+
import '../components/user-avatar.js';
|
|
37
|
+
import '../components/status-dot.js';
|
|
38
|
+
import '../components/progress-bar.js';
|
|
39
|
+
import '../components/signed-amount.js';
|
|
40
|
+
import '../shell/topbar-action-menu.js';
|
|
41
|
+
import '../components/menu-item.js';
|
|
42
|
+
import '../components/floating-panel.js';
|
|
43
|
+
import '../components/account-settings-labels.js';
|
|
44
|
+
import '../components/bulk-action-bar.js';
|
|
45
|
+
import '../components/list.js';
|
|
46
|
+
import '../components/breadcrumbs.js';
|
|
47
|
+
import '../components/toast.js';
|
|
48
|
+
import '../components/description-list.js';
|
|
49
|
+
import '../components/line-items.js';
|
|
50
|
+
import '../components/error-boundary.js';
|
|
51
|
+
import '../components/authed-image.js';
|
|
52
|
+
import '../components/image-grid.js';
|
|
53
|
+
import '../components/lightbox.js';
|
|
54
|
+
import '../components/write-lock.js';
|
|
55
|
+
import '../components/legal.js';
|
|
56
|
+
import '../components/account-chips.js';
|
|
57
|
+
import '../lib/format.js';
|
|
58
|
+
import '../components/reauth-dialog.js';
|
|
59
|
+
import '../components/server-wake.js';
|
|
60
|
+
import '../lib/server-wake.js';
|
|
61
|
+
import '../components/translation-review-labels.js';
|
|
62
|
+
import '../lib/translation-review.js';
|
|
63
|
+
import '../components/country-select.js';
|
|
64
|
+
import '../components/inline-edit-field.js';
|
|
65
|
+
import '../lib/iban.js';
|
|
66
|
+
import '../lib/phone.js';
|
|
67
|
+
import '../components/sign-chip.js';
|
|
68
|
+
import '../components/column-mapper.js';
|
|
69
|
+
import '../lib/column-mapping.js';
|
|
70
|
+
import '../lib/table-text.js';
|
|
71
|
+
import '../components/field-parts.js';
|