@burdenoff/microfe-export 2026.1117.1 → 2026.1119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/export/pages/CreateExportPage.js +269 -269
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.js +93 -93
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.js +137 -137
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/v2/DownloadsPage.js +151 -151
- package/dist/export/pages/v2/DownloadsPage.js.map +1 -1
- package/dist/export/pages/v2/NewDownloadPage.js +71 -71
- package/dist/export/pages/v2/NewDownloadPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewDownloadPage.js","names":["_Fragment","SCOPE_COPY","FORMAT_COPY","fieldClass","ChoiceCard","checked","onToggle","cn","Check","Minus","title","description","NewDownloadPage","useExport","tr","useTr","useCreateExportJob","availableEntities","useAvailableEntities","templates","useExportTemplates","searchParams","useSearchParams","hostProductSlug","useAppShell","canWorkspaceAdmin","usePermission","canOrgAdmin","useOrganizationExportPermission","organizationId","scopes","isSelectable","useCallback","isExportEntityDisabled","entityType","isForeignProductEntity","offered","useMemo","groups","offeredGroups","label","entityLabel","step","setStep","useState","form","setForm","DEFAULT_NEW_DOWNLOAD_FORM","nameTouchedRef","useRef","showAll","setShowAll","error","setError","showQuotaDialog","setShowQuotaDialog","appliedTemplateRef","paramId","setup","applySavedSetup","f","selected","setEntities","next","toggleEntity","e","toggleGroup","all","types","t","group","suggestedName","whole","entityTypes","covered","g","loose","what","suggestedDownloadName","goNext","submit","job","createJob","toCreateExportInput","joinPath","basePath","err","isQuotaExhaustedError","scopeLabel","scope","formatLabel","format","kinds","PageLayout","Download","Stepper","i","IllustratedEmptyState","Fragment","count","Button","entity","OptionalFields","SUPPORTED_FORMATS","navigate","ArrowRight","isPending","Loader2","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","openBilling"],"sources":["../../../../src/export/pages/v2/NewDownloadPage.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useSearchParams } from \"react-router\";\nimport { isQuotaExhaustedError } from \"@burdenoff/fe-libs/shared/utils\";\nimport {\n useAppShell,\n usePermission,\n} from \"@burdenoff/fe-libs/shared/providers/shell\";\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Button,\n IllustratedEmptyState,\n OptionalFields,\n Stepper,\n} from \"@burdenoff/fe-libs/ui\";\nimport { ArrowRight, Check, Download, Loader2, Minus } from \"lucide-react\";\nimport { useExport } from \"../../providers/ExportProvider\";\nimport {\n useAvailableEntities,\n useCreateExportJob,\n useExportTemplates,\n useOrganizationExportPermission,\n} from \"../../hooks/useExportQueries\";\nimport { useTr } from \"../../hooks/useTr\";\nimport { PageLayout } from \"../../components/PageLayout\";\nimport { entityLabel, offeredGroups } from \"../../utils/entityLabels\";\nimport {\n isExportEntityDisabled,\n isForeignProductEntity,\n} from \"../../utils/disabledModules\";\nimport {\n applySavedSetup,\n DEFAULT_NEW_DOWNLOAD_FORM,\n suggestedDownloadName,\n SUPPORTED_FORMATS,\n toCreateExportInput,\n type NewDownloadForm,\n} from \"../../utils/newDownloadForm\";\nimport { joinPath } from \"../../utils/paths\";\nimport { openBilling } from \"../../utils/billing\";\nimport { cn } from \"../../utils/cn\";\nimport type { ExportFormat, ExportScope } from \"../../types\";\n\ntype Step = 0 | 1;\n\nconst SCOPE_COPY: Record<\n ExportScope,\n { labelKey: string; label: string; descKey: string; desc: string }\n> = {\n INDIVIDUAL: {\n labelKey: \"export.create.scope.individual.label\",\n label: \"My Data Only\",\n descKey: \"export.create.scope.individual.description\",\n desc: \"Export data you personally created across selected modules.\",\n },\n WORKSPACE_ADMIN: {\n labelKey: \"export.create.scope.workspaceAdmin.label\",\n label: \"All Workspace Data\",\n descKey: \"export.create.scope.workspaceAdmin.description\",\n desc: \"Export all data in this workspace regardless of who created it. Requires workspace admin access.\",\n },\n ORG_ADMIN: {\n labelKey: \"export.create.scope.orgAdmin.label\",\n label: \"All Organization Data\",\n descKey: \"export.create.scope.orgAdmin.description\",\n desc: \"Export data from every workspace in your organization. Requires org-admin access.\",\n },\n};\n\nconst FORMAT_COPY: Record<ExportFormat, [string, string]> = {\n CSV: [\"export.format.csv\", \"CSV\"],\n JSON: [\"export.format.json\", \"JSON\"],\n};\n\nconst fieldClass =\n \"w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\";\n\n/** A card that toggles: a checkbox for the screen reader, a card for the eye. */\nfunction ChoiceCard({\n checked,\n onToggle,\n title,\n description,\n}: {\n checked: boolean | \"mixed\";\n onToggle: () => void;\n title: string;\n description?: string;\n}) {\n return (\n <button\n type=\"button\"\n role=\"checkbox\"\n aria-checked={checked}\n onClick={onToggle}\n className={cn(\n \"flex w-full items-start gap-3 rounded-xl border p-4 text-left transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40\",\n checked === true\n ? \"border-primary bg-action-primary-bg/5\"\n : \"border-border-subtle hover:border-primary/40\",\n )}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n \"mt-0.5 flex size-5 shrink-0 items-center justify-center rounded border\",\n checked\n ? \"border-primary bg-action-primary-bg text-action-primary-text\"\n : \"border-border-default\",\n )}\n >\n {checked === true ? <Check size={14} /> : null}\n {checked === \"mixed\" ? <Minus size={14} /> : null}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block font-medium text-text-primary\">{title}</span>\n {description ? (\n <span className=\"block text-sm text-text-secondary\">\n {description}\n </span>\n ) : null}\n </span>\n </button>\n );\n}\n\n/**\n * \"New download\" (Navigation v2, BOFF-11870): two short steps in place of the\n * three-tab wizard. Step 1 picks what to download from plain groups (\"Show all\n * data types\" lists the rest). Step 2 is a one-line summary, the prefilled\n * name and \"Start download\"; whose data, the format, a date range and a saved\n * setup sit in one \"More options\" fold. The service call is the wizard's.\n */\nexport function NewDownloadPage() {\n const { basePath = \"/\", navigate, organizationId } = useExport();\n const tr = useTr();\n const { createJob, isPending } = useCreateExportJob();\n const { data: availableEntities } = useAvailableEntities();\n const { data: templates } = useExportTemplates();\n const [searchParams] = useSearchParams();\n const { productSlug: hostProductSlug } = useAppShell();\n\n const canWorkspaceAdmin = usePermission(\"export:workspace_admin\");\n const canOrgAdmin = useOrganizationExportPermission(organizationId);\n // Scopes the person can't use are hidden, not shown locked.\n const scopes: ExportScope[] = [\n \"INDIVIDUAL\",\n ...(canWorkspaceAdmin ? ([\"WORKSPACE_ADMIN\"] as const) : []),\n ...(canOrgAdmin ? ([\"ORG_ADMIN\"] as const) : []),\n ];\n\n const isSelectable = useCallback(\n (entityType: string) =>\n !isExportEntityDisabled(entityType) &&\n !isForeignProductEntity(entityType, hostProductSlug),\n [hostProductSlug],\n );\n\n // Only what this person can download in this shell. Products whose\n // download isn't available yet are not listed at all.\n const offered = useMemo(\n () =>\n availableEntities.filter(\n (e) => e.enabled !== false && isSelectable(e.entityType),\n ),\n [availableEntities, isSelectable],\n );\n const groups = offeredGroups(offered.map((e) => e.entityType));\n const label = (entityType: string) =>\n entityLabel(entityType, tr, availableEntities);\n\n const [step, setStep] = useState<Step>(0);\n const [form, setForm] = useState<NewDownloadForm>(() => ({\n ...DEFAULT_NEW_DOWNLOAD_FORM,\n templateId: searchParams.get(\"templateId\") ?? undefined,\n }));\n // Only read in handlers: whether the person typed their own name.\n const nameTouchedRef = useRef(false);\n const [showAll, setShowAll] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [showQuotaDialog, setShowQuotaDialog] = useState(false);\n\n // Arriving from \"Use this setup\" (?templateId=): apply it once.\n const appliedTemplateRef = useRef<string | null>(null);\n useEffect(() => {\n const paramId = searchParams.get(\"templateId\");\n if (!paramId || !templates.length) return;\n if (appliedTemplateRef.current === paramId) return;\n const setup = templates.find((t) => t.id === paramId);\n if (!setup) return;\n appliedTemplateRef.current = paramId;\n setForm((f) => applySavedSetup(f, setup, isSelectable, false));\n }, [isSelectable, searchParams, templates]);\n\n const selected = new Set(form.entityTypes);\n const setEntities = (next: string[]) =>\n setForm((f) => ({ ...f, entityTypes: next }));\n const toggleEntity = (entityType: string) =>\n setEntities(\n selected.has(entityType)\n ? form.entityTypes.filter((e) => e !== entityType)\n : [...form.entityTypes, entityType],\n );\n const toggleGroup = (types: string[]) => {\n const all = types.every((t) => selected.has(t));\n const group = new Set(types);\n setEntities(\n all\n ? form.entityTypes.filter((e) => !group.has(e))\n : [...form.entityTypes, ...types.filter((t) => !selected.has(t))],\n );\n };\n\n // The name a download gets unless the person types one: the one group (or\n // data type) it covers, else \"My data\", with today's date.\n const suggestedName = () => {\n const whole = groups.filter(({ entityTypes }) =>\n entityTypes.every((t) => selected.has(t)),\n );\n const covered = new Set(whole.flatMap((g) => g.entityTypes));\n const loose = form.entityTypes.filter((t) => !covered.has(t));\n const what =\n whole.length === 1 && loose.length === 0\n ? tr(whole[0]!.group.labelKey, whole[0]!.group.label)\n : whole.length === 0 && loose.length === 1\n ? label(loose[0]!)\n : tr(\"export.create.name.myData\", \"My data\");\n return suggestedDownloadName(what);\n };\n\n const goNext = () => {\n if (form.entityTypes.length === 0) {\n setError(\n tr(\n \"export.create.errors.selectEntity\",\n \"Please select at least one entity type to export\",\n ),\n );\n return;\n }\n setError(null);\n if (!nameTouchedRef.current)\n setForm((f) => ({ ...f, name: suggestedName() }));\n setStep(1);\n };\n\n const submit = async () => {\n if (!form.name.trim()) {\n setError(\n tr(\n \"export.create.errors.exportNameRequired\",\n \"Please provide a name for this export\",\n ),\n );\n return;\n }\n setError(null);\n try {\n const job = await createJob(toCreateExportInput(form, organizationId));\n // Land on the new download's own page to watch it prepare.\n navigate?.(job?.id ? joinPath(basePath, job.id) : basePath);\n } catch (err) {\n if (isQuotaExhaustedError(err)) {\n setShowQuotaDialog(true);\n setError(\n tr(\n \"export.create.errors.quotaReached\",\n \"You have reached your export limit for this month.\",\n ),\n );\n return;\n }\n setError(\n err instanceof Error\n ? err.message\n : tr(\"export.create.errors.createFailed\", \"Failed to create export\"),\n );\n }\n };\n\n const scopeLabel = (scope: ExportScope) =>\n tr(SCOPE_COPY[scope].labelKey, SCOPE_COPY[scope].label);\n const formatLabel = (format: ExportFormat) =>\n tr(FORMAT_COPY[format][0], FORMAT_COPY[format][1]);\n const kinds = form.entityTypes.map(label);\n\n return (\n <PageLayout\n title={tr(\"export.create.title\", \"New Export\")}\n icon={<Download size={24} />}\n maxWidth=\"3xl\"\n >\n <Stepper\n steps={[\n {\n key: \"what\",\n label: tr(\n \"export.create.steps.what\",\n \"What do you want to download?\",\n ),\n },\n { key: \"review\", label: tr(\"export.create.steps.review\", \"Review\") },\n ]}\n active={step}\n onStepClick={(i) => {\n if (i === 0) setStep(0);\n }}\n />\n\n {error && (\n <p\n role=\"alert\"\n className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-4 text-sm text-status-error-text\"\n >\n {error}\n </p>\n )}\n\n {step === 0 && (\n <section aria-labelledby=\"new-download-what\" className=\"space-y-4\">\n <h2 id=\"new-download-what\" className=\"text-lg font-semibold\">\n {tr(\n \"export.create.select.question\",\n \"What do you want to download?\",\n )}\n </h2>\n {offered.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr(\n \"export.create.select.emptyTitle\",\n \"Nothing to export yet\",\n )}\n description={tr(\n \"export.create.select.empty\",\n \"No exportable entity types are configured for this workspace yet. Once your workspace has data in supported modules, they'll show up here to select.\",\n )}\n />\n ) : (\n <>\n {groups.length > 0 && (\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n {groups.map(({ group, entityTypes }) => {\n const count = entityTypes.filter((t) =>\n selected.has(t),\n ).length;\n return (\n <ChoiceCard\n key={group.id}\n checked={\n count === entityTypes.length\n ? true\n : count > 0\n ? \"mixed\"\n : false\n }\n onToggle={() => toggleGroup(entityTypes)}\n title={tr(group.labelKey, group.label)}\n description={tr(\n group.descriptionKey,\n group.description,\n )}\n />\n );\n })}\n </div>\n )}\n <div className=\"space-y-3\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-expanded={showAll || groups.length === 0}\n aria-controls=\"new-download-all-types\"\n onClick={() => setShowAll(!showAll)}\n hidden={groups.length === 0}\n >\n {showAll\n ? tr(\"export.create.select.hideAll\", \"Hide the full list\")\n : tr(\"export.create.select.showAll\", \"Show all data types\")}\n </Button>\n <div\n id=\"new-download-all-types\"\n hidden={!showAll && groups.length > 0}\n className=\"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3\"\n >\n {offered.map((entity) => (\n <ChoiceCard\n key={entity.entityType}\n checked={selected.has(entity.entityType)}\n onToggle={() => toggleEntity(entity.entityType)}\n title={label(entity.entityType)}\n />\n ))}\n </div>\n </div>\n </>\n )}\n </section>\n )}\n\n {step === 1 && (\n <section aria-labelledby=\"new-download-review\" className=\"space-y-4\">\n <h2 id=\"new-download-review\" className=\"sr-only\">\n {tr(\"export.create.steps.review\", \"Review\")}\n </h2>\n <div className=\"space-y-4 rounded-xl border border-border-subtle bg-bg-surface p-4 sm:p-6\">\n <p\n className=\"text-sm text-text-primary\"\n data-testid=\"new-download-summary\"\n >\n {tr(\n \"export.create.summary\",\n \"{{kinds}} · {{whose}} · {{format}}\",\n {\n kinds: kinds.join(\", \"),\n whose: scopeLabel(form.scope),\n format: formatLabel(form.format),\n },\n )}\n </p>\n <div className=\"space-y-1\">\n <label\n htmlFor=\"new-download-name\"\n className=\"block text-sm font-medium\"\n >\n {tr(\"export.create.options.name\", \"Export Name\")}{\" \"}\n <span aria-hidden=\"true\" className=\"text-status-error-text\">\n *\n </span>\n </label>\n <input\n id=\"new-download-name\"\n type=\"text\"\n required\n aria-required=\"true\"\n value={form.name}\n onChange={(e) => {\n nameTouchedRef.current = true;\n setForm((f) => ({ ...f, name: e.target.value }));\n }}\n className={fieldClass}\n />\n </div>\n <p className=\"text-sm text-text-secondary\">\n {tr(\"export.create.zipNote\", \"You'll get a ZIP file.\")}\n </p>\n </div>\n\n <OptionalFields storageKey=\"export.new.moreOptions\">\n {scopes.length > 1 ? (\n <fieldset className=\"space-y-2\">\n <legend className=\"text-sm font-medium\">\n {tr(\"export.create.options.scope\", \"Export Scope\")}\n </legend>\n <div className=\"grid grid-cols-1 gap-2 sm:grid-cols-3\">\n {scopes.map((scope) => (\n <label\n key={scope}\n className={cn(\n \"flex cursor-pointer items-start gap-2 rounded-lg border p-3 text-sm\",\n form.scope === scope\n ? \"border-primary bg-action-primary-bg/5\"\n : \"border-border-subtle\",\n )}\n >\n <input\n type=\"radio\"\n name=\"new-download-scope\"\n value={scope}\n checked={form.scope === scope}\n onChange={() => setForm((f) => ({ ...f, scope }))}\n className=\"mt-1\"\n />\n <span>\n <span className=\"block font-medium\">\n {scopeLabel(scope)}\n </span>\n <span className=\"block text-xs text-text-secondary\">\n {tr(\n SCOPE_COPY[scope].descKey,\n SCOPE_COPY[scope].desc,\n )}\n </span>\n </span>\n </label>\n ))}\n </div>\n </fieldset>\n ) : null}\n\n <fieldset className=\"space-y-2\">\n <legend className=\"text-sm font-medium\">\n {tr(\"export.create.options.outputFormat\", \"Output Format\")}\n </legend>\n <div className=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n {SUPPORTED_FORMATS.map((format) => (\n <label\n key={format}\n className={cn(\n \"flex cursor-pointer items-center gap-2 rounded-lg border p-3 text-sm\",\n form.format === format\n ? \"border-primary bg-action-primary-bg/5\"\n : \"border-border-subtle\",\n )}\n >\n <input\n type=\"radio\"\n name=\"new-download-format\"\n value={format}\n checked={form.format === format}\n onChange={() => setForm((f) => ({ ...f, format }))}\n />\n {formatLabel(format)}\n </label>\n ))}\n </div>\n </fieldset>\n\n <fieldset className=\"space-y-2\">\n <legend className=\"text-sm font-medium\">\n {tr(\"export.create.options.dateRange\", \"Date Range\")}{\" \"}\n <span className=\"font-normal text-text-secondary\">\n {tr(\"export.create.shared.optional\", \"(optional)\")}\n </span>\n </legend>\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n <label className=\"space-y-1 text-xs text-text-secondary\">\n <span>{tr(\"export.create.options.dateFrom\", \"From\")}</span>\n <input\n type=\"date\"\n value={form.dateFrom}\n onChange={(e) =>\n setForm((f) => ({ ...f, dateFrom: e.target.value }))\n }\n className={fieldClass}\n />\n </label>\n <label className=\"space-y-1 text-xs text-text-secondary\">\n <span>{tr(\"export.create.options.dateTo\", \"To\")}</span>\n <input\n type=\"date\"\n value={form.dateTo}\n min={form.dateFrom || undefined}\n onChange={(e) =>\n setForm((f) => ({ ...f, dateTo: e.target.value }))\n }\n className={fieldClass}\n />\n </label>\n </div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\n \"export.create.options.dateRangeDescription\",\n \"Leave blank to export all data regardless of date.\",\n )}\n </p>\n </fieldset>\n\n <div className=\"space-y-1\">\n <label\n htmlFor=\"new-download-setup\"\n className=\"block text-sm font-medium\"\n >\n {tr(\n \"export.create.options.basedOnTemplate\",\n \"Based on Template\",\n )}{\" \"}\n <span className=\"font-normal text-text-secondary\">\n {tr(\"export.create.shared.optional\", \"(optional)\")}\n </span>\n </label>\n {templates.length > 0 ? (\n <select\n id=\"new-download-setup\"\n value={form.templateId ?? \"\"}\n onChange={(e) => {\n const setup = templates.find(\n (t) => t.id === e.target.value,\n );\n setForm((f) =>\n setup\n ? applySavedSetup(\n f,\n setup,\n isSelectable,\n nameTouchedRef.current,\n )\n : { ...f, templateId: undefined },\n );\n }}\n className={fieldClass}\n >\n <option value=\"\">\n {tr(\"export.create.options.noTemplate\", \"No template\")}\n </option>\n {templates.map((t) => (\n <option key={t.id} value={t.id}>\n {t.name}\n </option>\n ))}\n </select>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr(\"export.create.options.noTemplates\", \"No templates yet.\")}{\" \"}\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n className=\"text-primary underline-offset-2 hover:underline\"\n >\n {tr(\n \"export.create.options.createTemplateLink\",\n \"Create one\",\n )}\n </button>{\" \"}\n {tr(\n \"export.create.options.reuseTemplateHint\",\n \"to reuse export configurations.\",\n )}\n </p>\n )}\n </div>\n </OptionalFields>\n </section>\n )}\n\n <div className=\"flex flex-col-reverse gap-3 pt-2 sm:flex-row sm:justify-end\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => navigate?.(basePath)}\n >\n {tr(\"export.create.actions.cancel\", \"Cancel\")}\n </Button>\n {step === 1 && (\n <Button type=\"button\" variant=\"outline\" onClick={() => setStep(0)}>\n {tr(\"export.create.actions.back\", \"Back\")}\n </Button>\n )}\n {step === 0 ? (\n <Button type=\"button\" onClick={goNext}>\n {tr(\"export.create.actions.next\", \"Next\")}\n <ArrowRight size={16} aria-hidden=\"true\" />\n </Button>\n ) : (\n <Button\n type=\"button\"\n onClick={() => void submit()}\n disabled={isPending}\n >\n {isPending ? (\n <Loader2 size={16} className=\"animate-spin\" aria-hidden=\"true\" />\n ) : (\n <Download size={16} aria-hidden=\"true\" />\n )}\n {tr(\"export.create.actions.startExport\", \"Start Export\")}\n </Button>\n )}\n </div>\n\n <AlertDialog open={showQuotaDialog} onOpenChange={setShowQuotaDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr(\"export.create.quotaDialog.title\", \"Export Limit Reached\")}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {tr(\n \"export.create.quotaDialog.description\",\n \"You have reached your export limit for this month.\",\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>\n {tr(\"export.create.quotaDialog.dismiss\", \"Dismiss\")}\n </AlertDialogCancel>\n <AlertDialogAction onClick={() => openBilling(navigate)}>\n {tr(\"export.create.quotaDialog.viewBilling\", \"View Billing\")}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmDA,IAAMC,IAGF;CACF,YAAY;EACV,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;CACR;CACA,iBAAiB;EACf,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;CACR;CACA,WAAW;EACT,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,GAEMC,IAAsD;CAC1D,KAAK,CAAC,qBAAqB,KAAK;CAChC,MAAM,CAAC,sBAAsB,MAAM;AACrC,GAEMC,IACJ;AAGF,SAASC,EAAW,EAClB,YACA,aACA,UACA,kBAMC;CACD,OACE,kBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,gBAAcC;EACd,SAASC;EACT,WAAWC,EACT,mFACA,iFACAF,MAAY,KACR,0CACA,8CACN;EAXF,UAAA,CAaE,kBAAC,QAAD;GACE,eAAY;GACZ,WAAWE,EACT,0EACAF,IACI,iEACA,uBACN;GAPF,UAAA,CASGA,MAAY,KAAO,kBAACG,GAAD,EAAO,MAAM,GAAK,CAAA,IAAI,MACzCH,MAAY,UAAU,kBAACI,GAAD,EAAO,MAAM,GAAK,CAAA,IAAI,IACzC;EACN,CAAA,GAAA,kBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACE,kBAAC,QAAD;IAAM,WAAU;IAAuC,UAAAC;GAAY,CAAA,GAClEC,IACC,kBAAC,QAAD;IAAM,WAAU;IACb,UAAAA;GACG,CAAA,IACJ,IACA;EACA,CAAA,CAAA;;AAEZ;AASA,SAAgBC,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,aAAU,sBAAmBC,EAAU,GACzDC,IAAKC,EAAM,GAC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,MAAM;OAAI,eAAY;MAAQ,CAAA,GAEzChF,EAAG,qCAAqC,cAAc,CACjD;;IAEP;;GAEL,kBAAC8F,IAAD;IAAa,MAAMtD;IAAiB,cAAcC;IAChD,UAAA,kBAACsD,IAAD,EAAA,UAAA,CACE,kBAACC,IAAD,EAAA,UAAA,CACE,kBAACC,IAAD,EAAA,UACGjG,EAAG,mCAAmC,sBAAsB,EAC7C,CAAA,GAClB,kBAACkG,IAAD,EAAA,UACGlG,EACC,yCACA,oDACF,EACsB,CAAA,CACP,EAAA,CAAA,GACnB,kBAACmG,IAAD,EAAA,UAAA,CACE,kBAACC,IAAD,EAAA,UACGpG,EAAG,qCAAqC,SAAS,EACjC,CAAA,GACnB,kBAACqG,IAAD;KAAmB,eAAeC,EAAYZ,CAAQ;KACnD,UAAA1F,EAAG,yCAAyC,cAAc;IAC1C,CAAA,CACF,EAAA,CAAA,CACD,EAAA,CAAA;GACT,CAAA;EACH;;AAEhB"}
|
|
1
|
+
{"version":3,"file":"NewDownloadPage.js","names":["_Fragment","SCOPE_COPY","FORMAT_COPY","fieldClass","ChoiceCard","checked","onToggle","cn","Check","Minus","title","description","NewDownloadPage","useExport","tr","useTr","useCreateExportJob","availableEntities","useAvailableEntities","templates","useExportTemplates","searchParams","useSearchParams","hostProductSlug","useAppShell","canWorkspaceAdmin","usePermission","canOrgAdmin","useOrganizationExportPermission","organizationId","scopes","isSelectable","useCallback","isExportEntityDisabled","entityType","isForeignProductEntity","offered","useMemo","groups","offeredGroups","label","entityLabel","step","setStep","useState","form","setForm","DEFAULT_NEW_DOWNLOAD_FORM","nameTouchedRef","useRef","showAll","setShowAll","error","setError","showQuotaDialog","setShowQuotaDialog","appliedTemplateRef","paramId","setup","applySavedSetup","f","selected","setEntities","next","toggleEntity","e","toggleGroup","all","types","t","group","suggestedName","whole","entityTypes","covered","g","loose","what","suggestedDownloadName","goNext","submit","job","createJob","toCreateExportInput","joinPath","basePath","err","isQuotaExhaustedError","scopeLabel","scope","formatLabel","format","kinds","PageLayout","Download","Stepper","i","IllustratedEmptyState","Fragment","count","Button","entity","OptionalFields","SUPPORTED_FORMATS","ThemedSelect","navigate","ArrowRight","isPending","Loader2","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","openBilling"],"sources":["../../../../src/export/pages/v2/NewDownloadPage.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useSearchParams } from \"react-router\";\nimport { isQuotaExhaustedError } from \"@burdenoff/fe-libs/shared/utils\";\nimport {\n useAppShell,\n usePermission,\n} from \"@burdenoff/fe-libs/shared/providers/shell\";\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Button,\n IllustratedEmptyState,\n OptionalFields,\n Stepper,\n ThemedSelect,\n} from \"@burdenoff/fe-libs/ui\";\nimport { ArrowRight, Check, Download, Loader2, Minus } from \"lucide-react\";\nimport { useExport } from \"../../providers/ExportProvider\";\nimport {\n useAvailableEntities,\n useCreateExportJob,\n useExportTemplates,\n useOrganizationExportPermission,\n} from \"../../hooks/useExportQueries\";\nimport { useTr } from \"../../hooks/useTr\";\nimport { PageLayout } from \"../../components/PageLayout\";\nimport { entityLabel, offeredGroups } from \"../../utils/entityLabels\";\nimport {\n isExportEntityDisabled,\n isForeignProductEntity,\n} from \"../../utils/disabledModules\";\nimport {\n applySavedSetup,\n DEFAULT_NEW_DOWNLOAD_FORM,\n suggestedDownloadName,\n SUPPORTED_FORMATS,\n toCreateExportInput,\n type NewDownloadForm,\n} from \"../../utils/newDownloadForm\";\nimport { joinPath } from \"../../utils/paths\";\nimport { openBilling } from \"../../utils/billing\";\nimport { cn } from \"../../utils/cn\";\nimport type { ExportFormat, ExportScope } from \"../../types\";\n\ntype Step = 0 | 1;\n\nconst SCOPE_COPY: Record<\n ExportScope,\n { labelKey: string; label: string; descKey: string; desc: string }\n> = {\n INDIVIDUAL: {\n labelKey: \"export.create.scope.individual.label\",\n label: \"My Data Only\",\n descKey: \"export.create.scope.individual.description\",\n desc: \"Export data you personally created across selected modules.\",\n },\n WORKSPACE_ADMIN: {\n labelKey: \"export.create.scope.workspaceAdmin.label\",\n label: \"All Workspace Data\",\n descKey: \"export.create.scope.workspaceAdmin.description\",\n desc: \"Export all data in this workspace regardless of who created it. Requires workspace admin access.\",\n },\n ORG_ADMIN: {\n labelKey: \"export.create.scope.orgAdmin.label\",\n label: \"All Organization Data\",\n descKey: \"export.create.scope.orgAdmin.description\",\n desc: \"Export data from every workspace in your organization. Requires org-admin access.\",\n },\n};\n\nconst FORMAT_COPY: Record<ExportFormat, [string, string]> = {\n CSV: [\"export.format.csv\", \"CSV\"],\n JSON: [\"export.format.json\", \"JSON\"],\n};\n\nconst fieldClass =\n \"w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\";\n\n/** A card that toggles: a checkbox for the screen reader, a card for the eye. */\nfunction ChoiceCard({\n checked,\n onToggle,\n title,\n description,\n}: {\n checked: boolean | \"mixed\";\n onToggle: () => void;\n title: string;\n description?: string;\n}) {\n return (\n <button\n type=\"button\"\n role=\"checkbox\"\n aria-checked={checked}\n onClick={onToggle}\n className={cn(\n \"flex w-full items-start gap-3 rounded-xl border p-4 text-left transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40\",\n checked === true\n ? \"border-primary bg-action-primary-bg/5\"\n : \"border-border-subtle hover:border-primary/40\",\n )}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n \"mt-0.5 flex size-5 shrink-0 items-center justify-center rounded border\",\n checked\n ? \"border-primary bg-action-primary-bg text-action-primary-text\"\n : \"border-border-default\",\n )}\n >\n {checked === true ? <Check size={14} /> : null}\n {checked === \"mixed\" ? <Minus size={14} /> : null}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block font-medium text-text-primary\">{title}</span>\n {description ? (\n <span className=\"block text-sm text-text-secondary\">\n {description}\n </span>\n ) : null}\n </span>\n </button>\n );\n}\n\n/**\n * \"New download\" (Navigation v2, BOFF-11870): two short steps in place of the\n * three-tab wizard. Step 1 picks what to download from plain groups (\"Show all\n * data types\" lists the rest). Step 2 is a one-line summary, the prefilled\n * name and \"Start download\"; whose data, the format, a date range and a saved\n * setup sit in one \"More options\" fold. The service call is the wizard's.\n */\nexport function NewDownloadPage() {\n const { basePath = \"/\", navigate, organizationId } = useExport();\n const tr = useTr();\n const { createJob, isPending } = useCreateExportJob();\n const { data: availableEntities } = useAvailableEntities();\n const { data: templates } = useExportTemplates();\n const [searchParams] = useSearchParams();\n const { productSlug: hostProductSlug } = useAppShell();\n\n const canWorkspaceAdmin = usePermission(\"export:workspace_admin\");\n const canOrgAdmin = useOrganizationExportPermission(organizationId);\n // Scopes the person can't use are hidden, not shown locked.\n const scopes: ExportScope[] = [\n \"INDIVIDUAL\",\n ...(canWorkspaceAdmin ? ([\"WORKSPACE_ADMIN\"] as const) : []),\n ...(canOrgAdmin ? ([\"ORG_ADMIN\"] as const) : []),\n ];\n\n const isSelectable = useCallback(\n (entityType: string) =>\n !isExportEntityDisabled(entityType) &&\n !isForeignProductEntity(entityType, hostProductSlug),\n [hostProductSlug],\n );\n\n // Only what this person can download in this shell. Products whose\n // download isn't available yet are not listed at all.\n const offered = useMemo(\n () =>\n availableEntities.filter(\n (e) => e.enabled !== false && isSelectable(e.entityType),\n ),\n [availableEntities, isSelectable],\n );\n const groups = offeredGroups(offered.map((e) => e.entityType));\n const label = (entityType: string) =>\n entityLabel(entityType, tr, availableEntities);\n\n const [step, setStep] = useState<Step>(0);\n const [form, setForm] = useState<NewDownloadForm>(() => ({\n ...DEFAULT_NEW_DOWNLOAD_FORM,\n templateId: searchParams.get(\"templateId\") ?? undefined,\n }));\n // Only read in handlers: whether the person typed their own name.\n const nameTouchedRef = useRef(false);\n const [showAll, setShowAll] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [showQuotaDialog, setShowQuotaDialog] = useState(false);\n\n // Arriving from \"Use this setup\" (?templateId=): apply it once.\n const appliedTemplateRef = useRef<string | null>(null);\n useEffect(() => {\n const paramId = searchParams.get(\"templateId\");\n if (!paramId || !templates.length) return;\n if (appliedTemplateRef.current === paramId) return;\n const setup = templates.find((t) => t.id === paramId);\n if (!setup) return;\n appliedTemplateRef.current = paramId;\n setForm((f) => applySavedSetup(f, setup, isSelectable, false));\n }, [isSelectable, searchParams, templates]);\n\n const selected = new Set(form.entityTypes);\n const setEntities = (next: string[]) =>\n setForm((f) => ({ ...f, entityTypes: next }));\n const toggleEntity = (entityType: string) =>\n setEntities(\n selected.has(entityType)\n ? form.entityTypes.filter((e) => e !== entityType)\n : [...form.entityTypes, entityType],\n );\n const toggleGroup = (types: string[]) => {\n const all = types.every((t) => selected.has(t));\n const group = new Set(types);\n setEntities(\n all\n ? form.entityTypes.filter((e) => !group.has(e))\n : [...form.entityTypes, ...types.filter((t) => !selected.has(t))],\n );\n };\n\n // The name a download gets unless the person types one: the one group (or\n // data type) it covers, else \"My data\", with today's date.\n const suggestedName = () => {\n const whole = groups.filter(({ entityTypes }) =>\n entityTypes.every((t) => selected.has(t)),\n );\n const covered = new Set(whole.flatMap((g) => g.entityTypes));\n const loose = form.entityTypes.filter((t) => !covered.has(t));\n const what =\n whole.length === 1 && loose.length === 0\n ? tr(whole[0]!.group.labelKey, whole[0]!.group.label)\n : whole.length === 0 && loose.length === 1\n ? label(loose[0]!)\n : tr(\"export.create.name.myData\", \"My data\");\n return suggestedDownloadName(what);\n };\n\n const goNext = () => {\n if (form.entityTypes.length === 0) {\n setError(\n tr(\n \"export.create.errors.selectEntity\",\n \"Please select at least one entity type to export\",\n ),\n );\n return;\n }\n setError(null);\n if (!nameTouchedRef.current)\n setForm((f) => ({ ...f, name: suggestedName() }));\n setStep(1);\n };\n\n const submit = async () => {\n if (!form.name.trim()) {\n setError(\n tr(\n \"export.create.errors.exportNameRequired\",\n \"Please provide a name for this export\",\n ),\n );\n return;\n }\n setError(null);\n try {\n const job = await createJob(toCreateExportInput(form, organizationId));\n // Land on the new download's own page to watch it prepare.\n navigate?.(job?.id ? joinPath(basePath, job.id) : basePath);\n } catch (err) {\n if (isQuotaExhaustedError(err)) {\n setShowQuotaDialog(true);\n setError(\n tr(\n \"export.create.errors.quotaReached\",\n \"You have reached your export limit for this month.\",\n ),\n );\n return;\n }\n setError(\n err instanceof Error\n ? err.message\n : tr(\"export.create.errors.createFailed\", \"Failed to create export\"),\n );\n }\n };\n\n const scopeLabel = (scope: ExportScope) =>\n tr(SCOPE_COPY[scope].labelKey, SCOPE_COPY[scope].label);\n const formatLabel = (format: ExportFormat) =>\n tr(FORMAT_COPY[format][0], FORMAT_COPY[format][1]);\n const kinds = form.entityTypes.map(label);\n\n return (\n <PageLayout\n title={tr(\"export.create.title\", \"New Export\")}\n icon={<Download size={24} />}\n maxWidth=\"3xl\"\n >\n <Stepper\n steps={[\n {\n key: \"what\",\n label: tr(\n \"export.create.steps.what\",\n \"What do you want to download?\",\n ),\n },\n { key: \"review\", label: tr(\"export.create.steps.review\", \"Review\") },\n ]}\n active={step}\n onStepClick={(i) => {\n if (i === 0) setStep(0);\n }}\n />\n\n {error && (\n <p\n role=\"alert\"\n className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-4 text-sm text-status-error-text\"\n >\n {error}\n </p>\n )}\n\n {step === 0 && (\n <section aria-labelledby=\"new-download-what\" className=\"space-y-4\">\n <h2 id=\"new-download-what\" className=\"text-lg font-semibold\">\n {tr(\n \"export.create.select.question\",\n \"What do you want to download?\",\n )}\n </h2>\n {offered.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr(\n \"export.create.select.emptyTitle\",\n \"Nothing to export yet\",\n )}\n description={tr(\n \"export.create.select.empty\",\n \"No exportable entity types are configured for this workspace yet. Once your workspace has data in supported modules, they'll show up here to select.\",\n )}\n />\n ) : (\n <>\n {groups.length > 0 && (\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n {groups.map(({ group, entityTypes }) => {\n const count = entityTypes.filter((t) =>\n selected.has(t),\n ).length;\n return (\n <ChoiceCard\n key={group.id}\n checked={\n count === entityTypes.length\n ? true\n : count > 0\n ? \"mixed\"\n : false\n }\n onToggle={() => toggleGroup(entityTypes)}\n title={tr(group.labelKey, group.label)}\n description={tr(\n group.descriptionKey,\n group.description,\n )}\n />\n );\n })}\n </div>\n )}\n <div className=\"space-y-3\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-expanded={showAll || groups.length === 0}\n aria-controls=\"new-download-all-types\"\n onClick={() => setShowAll(!showAll)}\n hidden={groups.length === 0}\n >\n {showAll\n ? tr(\"export.create.select.hideAll\", \"Hide the full list\")\n : tr(\"export.create.select.showAll\", \"Show all data types\")}\n </Button>\n <div\n id=\"new-download-all-types\"\n hidden={!showAll && groups.length > 0}\n className=\"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3\"\n >\n {offered.map((entity) => (\n <ChoiceCard\n key={entity.entityType}\n checked={selected.has(entity.entityType)}\n onToggle={() => toggleEntity(entity.entityType)}\n title={label(entity.entityType)}\n />\n ))}\n </div>\n </div>\n </>\n )}\n </section>\n )}\n\n {step === 1 && (\n <section aria-labelledby=\"new-download-review\" className=\"space-y-4\">\n <h2 id=\"new-download-review\" className=\"sr-only\">\n {tr(\"export.create.steps.review\", \"Review\")}\n </h2>\n <div className=\"space-y-4 rounded-xl border border-border-subtle bg-bg-surface p-4 sm:p-6\">\n <p\n className=\"text-sm text-text-primary\"\n data-testid=\"new-download-summary\"\n >\n {tr(\n \"export.create.summary\",\n \"{{kinds}} · {{whose}} · {{format}}\",\n {\n kinds: kinds.join(\", \"),\n whose: scopeLabel(form.scope),\n format: formatLabel(form.format),\n },\n )}\n </p>\n <div className=\"space-y-1\">\n <label\n htmlFor=\"new-download-name\"\n className=\"block text-sm font-medium\"\n >\n {tr(\"export.create.options.name\", \"Export Name\")}{\" \"}\n <span aria-hidden=\"true\" className=\"text-status-error-text\">\n *\n </span>\n </label>\n <input\n id=\"new-download-name\"\n type=\"text\"\n required\n aria-required=\"true\"\n value={form.name}\n onChange={(e) => {\n nameTouchedRef.current = true;\n setForm((f) => ({ ...f, name: e.target.value }));\n }}\n className={fieldClass}\n />\n </div>\n <p className=\"text-sm text-text-secondary\">\n {tr(\"export.create.zipNote\", \"You'll get a ZIP file.\")}\n </p>\n </div>\n\n <OptionalFields storageKey=\"export.new.moreOptions\">\n {scopes.length > 1 ? (\n <fieldset className=\"space-y-2\">\n <legend className=\"text-sm font-medium\">\n {tr(\"export.create.options.scope\", \"Export Scope\")}\n </legend>\n <div className=\"grid grid-cols-1 gap-2 sm:grid-cols-3\">\n {scopes.map((scope) => (\n <label\n key={scope}\n className={cn(\n \"flex cursor-pointer items-start gap-2 rounded-lg border p-3 text-sm\",\n form.scope === scope\n ? \"border-primary bg-action-primary-bg/5\"\n : \"border-border-subtle\",\n )}\n >\n <input\n type=\"radio\"\n name=\"new-download-scope\"\n value={scope}\n checked={form.scope === scope}\n onChange={() => setForm((f) => ({ ...f, scope }))}\n className=\"mt-1\"\n />\n <span>\n <span className=\"block font-medium\">\n {scopeLabel(scope)}\n </span>\n <span className=\"block text-xs text-text-secondary\">\n {tr(\n SCOPE_COPY[scope].descKey,\n SCOPE_COPY[scope].desc,\n )}\n </span>\n </span>\n </label>\n ))}\n </div>\n </fieldset>\n ) : null}\n\n <fieldset className=\"space-y-2\">\n <legend className=\"text-sm font-medium\">\n {tr(\"export.create.options.outputFormat\", \"Output Format\")}\n </legend>\n <div className=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n {SUPPORTED_FORMATS.map((format) => (\n <label\n key={format}\n className={cn(\n \"flex cursor-pointer items-center gap-2 rounded-lg border p-3 text-sm\",\n form.format === format\n ? \"border-primary bg-action-primary-bg/5\"\n : \"border-border-subtle\",\n )}\n >\n <input\n type=\"radio\"\n name=\"new-download-format\"\n value={format}\n checked={form.format === format}\n onChange={() => setForm((f) => ({ ...f, format }))}\n />\n {formatLabel(format)}\n </label>\n ))}\n </div>\n </fieldset>\n\n <fieldset className=\"space-y-2\">\n <legend className=\"text-sm font-medium\">\n {tr(\"export.create.options.dateRange\", \"Date Range\")}{\" \"}\n <span className=\"font-normal text-text-secondary\">\n {tr(\"export.create.shared.optional\", \"(optional)\")}\n </span>\n </legend>\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n <label className=\"space-y-1 text-xs text-text-secondary\">\n <span>{tr(\"export.create.options.dateFrom\", \"From\")}</span>\n <input\n type=\"date\"\n value={form.dateFrom}\n onChange={(e) =>\n setForm((f) => ({ ...f, dateFrom: e.target.value }))\n }\n className={fieldClass}\n />\n </label>\n <label className=\"space-y-1 text-xs text-text-secondary\">\n <span>{tr(\"export.create.options.dateTo\", \"To\")}</span>\n <input\n type=\"date\"\n value={form.dateTo}\n min={form.dateFrom || undefined}\n onChange={(e) =>\n setForm((f) => ({ ...f, dateTo: e.target.value }))\n }\n className={fieldClass}\n />\n </label>\n </div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\n \"export.create.options.dateRangeDescription\",\n \"Leave blank to export all data regardless of date.\",\n )}\n </p>\n </fieldset>\n\n <div className=\"space-y-1\">\n <label\n htmlFor=\"new-download-setup\"\n className=\"block text-sm font-medium\"\n >\n {tr(\n \"export.create.options.basedOnTemplate\",\n \"Based on Template\",\n )}{\" \"}\n <span className=\"font-normal text-text-secondary\">\n {tr(\"export.create.shared.optional\", \"(optional)\")}\n </span>\n </label>\n {templates.length > 0 ? (\n <ThemedSelect\n id=\"new-download-setup\"\n value={form.templateId ?? \"\"}\n onChange={(e) => {\n const setup = templates.find(\n (t) => t.id === e.target.value,\n );\n setForm((f) =>\n setup\n ? applySavedSetup(\n f,\n setup,\n isSelectable,\n nameTouchedRef.current,\n )\n : { ...f, templateId: undefined },\n );\n }}\n className={fieldClass}\n >\n <option value=\"\">\n {tr(\"export.create.options.noTemplate\", \"No template\")}\n </option>\n {templates.map((t) => (\n <option key={t.id} value={t.id}>\n {t.name}\n </option>\n ))}\n </ThemedSelect>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr(\"export.create.options.noTemplates\", \"No templates yet.\")}{\" \"}\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n className=\"text-primary underline-offset-2 hover:underline\"\n >\n {tr(\n \"export.create.options.createTemplateLink\",\n \"Create one\",\n )}\n </button>{\" \"}\n {tr(\n \"export.create.options.reuseTemplateHint\",\n \"to reuse export configurations.\",\n )}\n </p>\n )}\n </div>\n </OptionalFields>\n </section>\n )}\n\n <div className=\"flex flex-col-reverse gap-3 pt-2 sm:flex-row sm:justify-end\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => navigate?.(basePath)}\n >\n {tr(\"export.create.actions.cancel\", \"Cancel\")}\n </Button>\n {step === 1 && (\n <Button type=\"button\" variant=\"outline\" onClick={() => setStep(0)}>\n {tr(\"export.create.actions.back\", \"Back\")}\n </Button>\n )}\n {step === 0 ? (\n <Button type=\"button\" onClick={goNext}>\n {tr(\"export.create.actions.next\", \"Next\")}\n <ArrowRight size={16} aria-hidden=\"true\" />\n </Button>\n ) : (\n <Button\n type=\"button\"\n onClick={() => void submit()}\n disabled={isPending}\n >\n {isPending ? (\n <Loader2 size={16} className=\"animate-spin\" aria-hidden=\"true\" />\n ) : (\n <Download size={16} aria-hidden=\"true\" />\n )}\n {tr(\"export.create.actions.startExport\", \"Start Export\")}\n </Button>\n )}\n </div>\n\n <AlertDialog open={showQuotaDialog} onOpenChange={setShowQuotaDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr(\"export.create.quotaDialog.title\", \"Export Limit Reached\")}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {tr(\n \"export.create.quotaDialog.description\",\n \"You have reached your export limit for this month.\",\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>\n {tr(\"export.create.quotaDialog.dismiss\", \"Dismiss\")}\n </AlertDialogCancel>\n <AlertDialogAction onClick={() => openBilling(navigate)}>\n {tr(\"export.create.quotaDialog.viewBilling\", \"View Billing\")}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoDA,IAAMC,IAGF;CACF,YAAY;EACV,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;CACR;CACA,iBAAiB;EACf,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;CACR;CACA,WAAW;EACT,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,GAEMC,IAAsD;CAC1D,KAAK,CAAC,qBAAqB,KAAK;CAChC,MAAM,CAAC,sBAAsB,MAAM;AACrC,GAEMC,IACJ;AAGF,SAASC,EAAW,EAClB,YACA,aACA,UACA,kBAMC;CACD,OACE,kBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,gBAAcC;EACd,SAASC;EACT,WAAWC,EACT,mFACA,iFACAF,MAAY,KACR,0CACA,8CACN;EAXF,UAAA,CAaE,kBAAC,QAAD;GACE,eAAY;GACZ,WAAWE,EACT,0EACAF,IACI,iEACA,uBACN;GAPF,UAAA,CASGA,MAAY,KAAO,kBAACG,GAAD,EAAO,MAAM,GAAK,CAAA,IAAI,MACzCH,MAAY,UAAU,kBAACI,GAAD,EAAO,MAAM,GAAK,CAAA,IAAI,IACzC;EACN,CAAA,GAAA,kBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACE,kBAAC,QAAD;IAAM,WAAU;IAAuC,UAAAC;GAAY,CAAA,GAClEC,IACC,kBAAC,QAAD;IAAM,WAAU;IACb,UAAAA;GACG,CAAA,IACJ,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AC3B,UAAU2B;MAHZ,UAAA,CAKGA,IACC,kBAACC,IAAD;OAAS,MAAM;OAAI,WAAU;OAAe,eAAY;MAAQ,CAAA,IAEhE,kBAACd,GAAD;OAAU,MAAM;OAAI,eAAY;MAAQ,CAAA,GAEzChF,EAAG,qCAAqC,cAAc,CACjD;;IAEP;;GAEL,kBAAC+F,IAAD;IAAa,MAAMvD;IAAiB,cAAcC;IAChD,UAAA,kBAACuD,IAAD,EAAA,UAAA,CACE,kBAACC,IAAD,EAAA,UAAA,CACE,kBAACC,IAAD,EAAA,UACGlG,EAAG,mCAAmC,sBAAsB,EAC7C,CAAA,GAClB,kBAACmG,IAAD,EAAA,UACGnG,EACC,yCACA,oDACF,EACsB,CAAA,CACP,EAAA,CAAA,GACnB,kBAACoG,IAAD,EAAA,UAAA,CACE,kBAACC,IAAD,EAAA,UACGrG,EAAG,qCAAqC,SAAS,EACjC,CAAA,GACnB,kBAACsG,IAAD;KAAmB,eAAeC,EAAYZ,CAAQ;KACnD,UAAA3F,EAAG,yCAAyC,cAAc;IAC1C,CAAA,CACF,EAAA,CAAA,CACD,EAAA,CAAA;GACT,CAAA;EACH;;AAEhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-export",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1119.1",
|
|
4
4
|
"description": "Burdenoff Export Microfrontend - Data export management interface",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@apollo/client": "^4.3.7",
|
|
49
|
-
"@burdenoff/fe-libs": "2026.
|
|
49
|
+
"@burdenoff/fe-libs": "2026.1119.2",
|
|
50
50
|
"@tanstack/react-query": "^5.106.1",
|
|
51
51
|
"clsx": "^2.1.1",
|
|
52
52
|
"graphql": "^16.15.0",
|