@burdenoff/microfe-export 2026.1107.2 → 2026.1113.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/dev/main.d.ts +0 -2
- package/dist/export/ExportRoot.d.ts +0 -2
- package/dist/export/ExportRoot.js +50 -42
- package/dist/export/ExportRoot.js.map +1 -1
- package/dist/export/ExportRoutes.d.ts +8 -2
- package/dist/export/ExportRoutes.js +71 -53
- package/dist/export/ExportRoutes.js.map +1 -1
- package/dist/export/components/ConfirmDestructiveDialog.d.ts +21 -0
- package/dist/export/components/ConfirmDestructiveDialog.js +37 -0
- package/dist/export/components/ConfirmDestructiveDialog.js.map +1 -0
- package/dist/export/components/DownloadSections.d.ts +10 -0
- package/dist/export/components/DownloadSections.js +161 -0
- package/dist/export/components/DownloadSections.js.map +1 -0
- package/dist/export/components/DownloadStatus.d.ts +13 -0
- package/dist/export/components/DownloadStatus.js +36 -0
- package/dist/export/components/DownloadStatus.js.map +1 -0
- package/dist/export/components/DownloadsTabs.d.ts +5 -0
- package/dist/export/components/DownloadsTabs.js +25 -0
- package/dist/export/components/DownloadsTabs.js.map +1 -0
- package/dist/export/components/ExportProgressBar.d.ts +1 -2
- package/dist/export/components/ExportProgressBar.js +1 -2
- package/dist/export/components/ExportProgressBar.js.map +1 -1
- package/dist/export/components/ExportStatusBadge.d.ts +1 -3
- package/dist/export/components/ExportStatusBadge.js +7 -8
- package/dist/export/components/ExportStatusBadge.js.map +1 -1
- package/dist/export/components/PageLayout.d.ts +3 -5
- package/dist/export/components/PageLayout.js +1 -2
- package/dist/export/components/PageLayout.js.map +1 -1
- package/dist/export/constants/enums.d.ts +0 -2
- package/dist/export/constants/enums.js +1 -2
- package/dist/export/constants/enums.js.map +1 -1
- package/dist/export/constants/index.d.ts +0 -1
- package/dist/export/hooks/useEntityLabel.d.ts +7 -0
- package/dist/export/hooks/useEntityLabel.js +16 -0
- package/dist/export/hooks/useEntityLabel.js.map +1 -0
- package/dist/export/hooks/useExportQueries.d.ts +17 -32
- package/dist/export/hooks/useExportQueries.js +144 -145
- package/dist/export/hooks/useExportQueries.js.map +1 -1
- package/dist/export/hooks/useTr.d.ts +0 -2
- package/dist/export/hooks/useTr.js +1 -2
- package/dist/export/hooks/useTr.js.map +1 -1
- package/dist/export/index.d.ts +0 -1
- package/dist/export/index.js +5 -4
- package/dist/export/navigation-v2/NavigationV2.d.ts +7 -0
- package/dist/export/navigation-v2/NavigationV2.js +16 -0
- package/dist/export/navigation-v2/NavigationV2.js.map +1 -0
- package/dist/export/pages/CreateExportPage.d.ts +1 -2
- package/dist/export/pages/CreateExportPage.js +126 -125
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDashboardPage.d.ts +1 -2
- package/dist/export/pages/ExportDashboardPage.js +17 -18
- package/dist/export/pages/ExportDashboardPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.d.ts +1 -2
- package/dist/export/pages/ExportDetailPage.js +133 -127
- package/dist/export/pages/ExportDetailPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.d.ts +1 -2
- package/dist/export/pages/ExportHistoryPage.js +74 -69
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportLandingPage.d.ts +1 -2
- package/dist/export/pages/ExportLandingPage.js +1 -2
- package/dist/export/pages/ExportLandingPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.d.ts +1 -2
- package/dist/export/pages/ExportTemplatesPage.js +219 -192
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.d.ts +1 -2
- package/dist/export/pages/TemplateDetailPage.js +146 -125
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/dist/export/pages/v2/DownloadDetailPage.d.ts +8 -0
- package/dist/export/pages/v2/DownloadDetailPage.js +176 -0
- package/dist/export/pages/v2/DownloadDetailPage.js.map +1 -0
- package/dist/export/pages/v2/DownloadsPage.d.ts +10 -0
- package/dist/export/pages/v2/DownloadsPage.js +401 -0
- package/dist/export/pages/v2/DownloadsPage.js.map +1 -0
- package/dist/export/pages/v2/NewDownloadPage.d.ts +8 -0
- package/dist/export/pages/v2/NewDownloadPage.js +440 -0
- package/dist/export/pages/v2/NewDownloadPage.js.map +1 -0
- package/dist/export/providers/ExportProvider.d.ts +0 -2
- package/dist/export/providers/ExportProvider.js +12 -16
- package/dist/export/providers/ExportProvider.js.map +1 -1
- package/dist/export/store/exportStore.d.ts +0 -2
- package/dist/export/store/exportStore.js +1 -2
- package/dist/export/store/exportStore.js.map +1 -1
- package/dist/export/types/index.d.ts +7 -1
- package/dist/export/utils/billing.d.ts +6 -0
- package/dist/export/utils/billing.js +7 -0
- package/dist/export/utils/billing.js.map +1 -0
- package/dist/export/utils/cn.d.ts +0 -2
- package/dist/export/utils/cn.js +2 -3
- package/dist/export/utils/cn.js.map +1 -1
- package/dist/export/utils/disabledModules.d.ts +0 -1
- package/dist/export/utils/disabledModules.js +3 -4
- package/dist/export/utils/disabledModules.js.map +1 -1
- package/dist/export/utils/downloadStatus.d.ts +15 -0
- package/dist/export/utils/downloadStatus.js +48 -0
- package/dist/export/utils/downloadStatus.js.map +1 -0
- package/dist/export/utils/entityLabels.d.ts +47 -0
- package/dist/export/utils/entityLabels.js +150 -0
- package/dist/export/utils/entityLabels.js.map +1 -0
- package/dist/export/utils/events.d.ts +0 -2
- package/dist/export/utils/events.js +1 -2
- package/dist/export/utils/events.js.map +1 -1
- package/dist/export/utils/exportAuthority.d.ts +0 -2
- package/dist/export/utils/exportAuthority.js +1 -2
- package/dist/export/utils/exportAuthority.js.map +1 -1
- package/dist/export/utils/formatBytes.d.ts +2 -0
- package/dist/export/utils/formatBytes.js +15 -0
- package/dist/export/utils/formatBytes.js.map +1 -0
- package/dist/export/utils/i18n.d.ts +0 -2
- package/dist/export/utils/i18n.js +1 -2
- package/dist/export/utils/i18n.js.map +1 -1
- package/dist/export/utils/newDownloadForm.d.ts +32 -0
- package/dist/export/utils/newDownloadForm.js +42 -0
- package/dist/export/utils/newDownloadForm.js.map +1 -0
- package/dist/export/utils/paths.d.ts +2 -0
- package/dist/export/utils/paths.js +7 -0
- package/dist/export/utils/paths.js.map +1 -0
- package/dist/generated/global-operations.d.ts +4 -2
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/wspace-operations.d.ts +226 -181
- package/dist/generated/wspace-operations.js +1 -2
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/generated/wspace-types.js +1 -2
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
- package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
- package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js +15 -16
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/version.js +2 -3
- package/dist/node_modules/@apollo/client/version.js.map +1 -1
- package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
- package/dist/node_modules/@wry/trie/lib/index.js +2 -3
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/client.js +76 -69
- package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.d.ts +0 -1
- package/dist/translations/en.js +1 -2
- package/dist/translations/en.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +63 -47
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/export/ExportRoot.d.ts.map +0 -1
- package/dist/export/ExportRoutes.d.ts.map +0 -1
- package/dist/export/components/ExportProgressBar.d.ts.map +0 -1
- package/dist/export/components/ExportStatusBadge.d.ts.map +0 -1
- package/dist/export/components/PageLayout.d.ts.map +0 -1
- package/dist/export/constants/enums.d.ts.map +0 -1
- package/dist/export/constants/index.d.ts.map +0 -1
- package/dist/export/hooks/useExportQueries.d.ts.map +0 -1
- package/dist/export/hooks/useTr.d.ts.map +0 -1
- package/dist/export/index.d.ts.map +0 -1
- package/dist/export/pages/CreateExportPage.d.ts.map +0 -1
- package/dist/export/pages/ExportDashboardPage.d.ts.map +0 -1
- package/dist/export/pages/ExportDetailPage.d.ts.map +0 -1
- package/dist/export/pages/ExportHistoryPage.d.ts.map +0 -1
- package/dist/export/pages/ExportLandingPage.d.ts.map +0 -1
- package/dist/export/pages/ExportTemplatesPage.d.ts.map +0 -1
- package/dist/export/pages/TemplateDetailPage.d.ts.map +0 -1
- package/dist/export/providers/ExportProvider.d.ts.map +0 -1
- package/dist/export/store/exportStore.d.ts.map +0 -1
- package/dist/export/types/index.d.ts.map +0 -1
- package/dist/export/utils/cn.d.ts.map +0 -1
- package/dist/export/utils/disabledModules.d.ts.map +0 -1
- package/dist/export/utils/events.d.ts.map +0 -1
- package/dist/export/utils/exportAuthority.d.ts.map +0 -1
- package/dist/export/utils/i18n.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
- package/dist/translations/en.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportLandingPage.js","names":[],"sources":["../../../src/export/pages/ExportLandingPage.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useSearchParams } from \"react-router\";\nimport { Tabs, type TabItem } from \"@burdenoff/fe-libs/chrome\";\nimport { useTr } from \"../hooks/useTr\";\n\nimport { ExportDashboardPage } from \"./ExportDashboardPage\";\nimport { CreateExportPage } from \"./CreateExportPage\";\nimport { ExportHistoryPage } from \"./ExportHistoryPage\";\nimport { ExportTemplatesPage } from \"./ExportTemplatesPage\";\n\n/**\n * ExportLandingPage\n *\n * Tabbed landing page for the Export microfrontend. Renders the existing\n * sub-pages (dashboard, new, history, templates) inside a Tabs container.\n * The active tab is reflected in the `?tab=` URL search param.\n */\nexport function ExportLandingPage() {\n const [params, setParams] = useSearchParams();\n const tr = useTr();\n\n // No dedicated \"New Export\" tab — creating an export is a primary action\n // (the Create button / wizard), not a peer view. The wizard is still\n // reachable at ?tab=new (rendered below) but is not shown in the tab strip.\n const tabs: TabItem[] = useMemo(\n () => [\n { id: \"dashboard\", label: tr(\"export.nav.dashboard\", \"Dashboard\") },\n { id: \"history\", label: tr(\"export.nav.history\", \"History\") },\n { id: \"templates\", label: tr(\"export.nav.templates\", \"Templates\") },\n ],\n [tr],\n );\n\n const activeId = params.get(\"tab\") ?? tabs[0].id;\n\n const handleTabChange = (id: string) => {\n const next = new URLSearchParams(params);\n if (id === tabs[0].id) {\n next.delete(\"tab\");\n } else {\n next.set(\"tab\", id);\n }\n setParams(next, { replace: true });\n };\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"border-b border-border-subtle px-4 pt-3\">\n <Tabs\n items={tabs}\n activeTabId={activeId}\n onTabChange={handleTabChange}\n variant=\"underline\"\n />\n </div>\n <div className=\"flex-1 min-h-0 overflow-auto\">\n {activeId === \"dashboard\" && <ExportDashboardPage />}\n {activeId === \"new\" && <CreateExportPage />}\n {activeId === \"history\" && <ExportHistoryPage />}\n {activeId === \"templates\" && <ExportTemplatesPage />}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAiBA,
|
|
1
|
+
{"version":3,"file":"ExportLandingPage.js","names":["ExportLandingPage","params","setParams","useSearchParams","tr","useTr","tabs","useMemo","activeId","Tabs","next","id","ExportDashboardPage","CreateExportPage","ExportHistoryPage","ExportTemplatesPage"],"sources":["../../../src/export/pages/ExportLandingPage.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useSearchParams } from \"react-router\";\nimport { Tabs, type TabItem } from \"@burdenoff/fe-libs/chrome\";\nimport { useTr } from \"../hooks/useTr\";\n\nimport { ExportDashboardPage } from \"./ExportDashboardPage\";\nimport { CreateExportPage } from \"./CreateExportPage\";\nimport { ExportHistoryPage } from \"./ExportHistoryPage\";\nimport { ExportTemplatesPage } from \"./ExportTemplatesPage\";\n\n/**\n * ExportLandingPage\n *\n * Tabbed landing page for the Export microfrontend. Renders the existing\n * sub-pages (dashboard, new, history, templates) inside a Tabs container.\n * The active tab is reflected in the `?tab=` URL search param.\n */\nexport function ExportLandingPage() {\n const [params, setParams] = useSearchParams();\n const tr = useTr();\n\n // No dedicated \"New Export\" tab — creating an export is a primary action\n // (the Create button / wizard), not a peer view. The wizard is still\n // reachable at ?tab=new (rendered below) but is not shown in the tab strip.\n const tabs: TabItem[] = useMemo(\n () => [\n { id: \"dashboard\", label: tr(\"export.nav.dashboard\", \"Dashboard\") },\n { id: \"history\", label: tr(\"export.nav.history\", \"History\") },\n { id: \"templates\", label: tr(\"export.nav.templates\", \"Templates\") },\n ],\n [tr],\n );\n\n const activeId = params.get(\"tab\") ?? tabs[0].id;\n\n const handleTabChange = (id: string) => {\n const next = new URLSearchParams(params);\n if (id === tabs[0].id) {\n next.delete(\"tab\");\n } else {\n next.set(\"tab\", id);\n }\n setParams(next, { replace: true });\n };\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"border-b border-border-subtle px-4 pt-3\">\n <Tabs\n items={tabs}\n activeTabId={activeId}\n onTabChange={handleTabChange}\n variant=\"underline\"\n />\n </div>\n <div className=\"flex-1 min-h-0 overflow-auto\">\n {activeId === \"dashboard\" && <ExportDashboardPage />}\n {activeId === \"new\" && <CreateExportPage />}\n {activeId === \"history\" && <ExportHistoryPage />}\n {activeId === \"templates\" && <ExportTemplatesPage />}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAiBA,SAAgBA,IAAoB;CAClC,IAAM,CAACC,GAAQC,KAAaC,EAAgB,GACtCC,IAAKC,EAAM,GAKXC,IAAkBC,QAChB;EACJ;GAAE,IAAI;GAAa,OAAOH,EAAG,wBAAwB,WAAW;EAAE;EAClE;GAAE,IAAI;GAAW,OAAOA,EAAG,sBAAsB,SAAS;EAAE;EAC5D;GAAE,IAAI;GAAa,OAAOA,EAAG,wBAAwB,WAAW;EAAE;CACpE,GACA,CAACA,CAAE,CACL,GAEMI,IAAWP,EAAO,IAAI,KAAK,KAAKK,EAAK,EAAE,CAAC;CAY9C,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAACG,GAAD;IACE,OAAOH;IACP,aAAaE;IACb,cAhBiB,MAAe;KACtC,IAAME,IAAO,IAAI,gBAAgBT,CAAM;KAMvC,AALIU,MAAOL,EAAK,EAAE,CAAC,KACjBI,EAAK,OAAO,KAAK,IAEjBA,EAAK,IAAI,OAAOC,CAAE,GAEpBT,EAAUQ,GAAM,EAAE,SAAS,GAAK,CAAC;IACnC;IASQ,SAAQ;GACT,CAAA;EACE,CAAA,GACL,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACGF,MAAa,eAAe,kBAACI,GAAD,CAAsB,CAAA;IAClDJ,MAAa,SAAS,kBAACK,GAAD,CAAmB,CAAA;IACzCL,MAAa,aAAa,kBAACM,GAAD,CAAoB,CAAA;IAC9CN,MAAa,eAAe,kBAACO,GAAD,CAAsB,CAAA;GAChD;EACF,CAAA,CAAA;;AAET"}
|
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
* Export Templates Page
|
|
3
3
|
* Template management list for reusable export configurations
|
|
4
4
|
*/
|
|
5
|
-
export declare function ExportTemplatesPage(): import(
|
|
6
|
-
//# sourceMappingURL=ExportTemplatesPage.d.ts.map
|
|
5
|
+
export declare function ExportTemplatesPage(): import('react').JSX.Element;
|
|
@@ -1,348 +1,376 @@
|
|
|
1
1
|
import { useExport as e } from "../providers/ExportProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
2
|
+
import { useAvailableEntities as t, useCreateExportTemplate as ee, useDeleteExportTemplate as te, useExportTemplates as ne } from "../hooks/useExportQueries.js";
|
|
3
|
+
import { PageLayout as re } from "../components/PageLayout.js";
|
|
4
|
+
import { DownloadsTabs as n } from "../components/DownloadsTabs.js";
|
|
5
|
+
import { ConfirmDestructiveDialog as ie } from "../components/ConfirmDestructiveDialog.js";
|
|
6
|
+
import { useNavigationV2 as r } from "../navigation-v2/NavigationV2.js";
|
|
7
|
+
import { useEntityLabel as ae } from "../hooks/useEntityLabel.js";
|
|
8
|
+
import { isExportEntityDisabled as oe, isForeignProductEntity as se } from "../utils/disabledModules.js";
|
|
9
|
+
import { getFormatDisplayName as ce } from "../constants/enums.js";
|
|
10
|
+
import { useTr as i } from "../hooks/useTr.js";
|
|
11
|
+
import { cn as a } from "../utils/cn.js";
|
|
12
|
+
import { nativeImpact as o, nativeNotify as s } from "../../utils/nativeBridge.js";
|
|
13
|
+
import { useMemo as c, useState as l } from "react";
|
|
14
|
+
import { ChevronRight as le, FileBox as u, Loader2 as ue, Plus as d, Search as de, Sparkles as fe, X as f } from "lucide-react";
|
|
15
|
+
import { useAppShell as p } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
16
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
17
|
+
import { CTAOverflowMenu as pe, IllustratedEmptyState as me, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
// src/export/pages/ExportTemplatesPage.tsx
|
|
19
|
+
var _ = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
20
|
+
function v() {
|
|
21
|
+
let { basePath: v = "/", navigate: y } = e(), b = i(), { data: x, isLoading: S } = ne(), { deleteTemplate: he } = te(), { createTemplate: ge, isPending: C } = ee(), { data: _e } = t(), w = r(), T = ae(w), { productSlug: E } = p(), D = _e.filter((e) => e.enabled !== !1 && !oe(e.entityType) && !se(e.entityType, E)), [O, k] = l(null), [A, j] = l(!1), [M, N] = l(""), [P, F] = l(!1), [I, L] = l(""), [R, z] = l(""), [B, V] = l([]), [H, U] = l("CSV"), [W, G] = l(null), [K, q] = l(null), J = () => {
|
|
22
|
+
L(""), z(""), V([]), U("CSV"), G(null), F(!0);
|
|
23
|
+
}, Y = async () => {
|
|
24
|
+
if (!I.trim()) G(b("export.templates.form.errors.nameRequired", "Template name is required."));
|
|
25
|
+
else if (B.length === 0) G(b("export.templates.form.errors.entityRequired", "Select at least one entity type."));
|
|
26
|
+
else {
|
|
27
|
+
G(null);
|
|
28
|
+
try {
|
|
29
|
+
await ge({
|
|
30
|
+
name: I.trim(),
|
|
31
|
+
description: R.trim() || void 0,
|
|
32
|
+
entityTypes: B,
|
|
33
|
+
format: H
|
|
34
|
+
}), F(!1);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
G(e instanceof Error ? e.message : b("export.templates.form.errors.createFailed", "Failed to create template."));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
if (!
|
|
41
|
-
let e =
|
|
42
|
-
return
|
|
43
|
-
}, [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
}, ve = (e) => {
|
|
40
|
+
V((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
41
|
+
}, X = c(() => {
|
|
42
|
+
if (!M) return x;
|
|
43
|
+
let e = M.toLowerCase();
|
|
44
|
+
return x.filter((t) => t.name.toLowerCase().includes(e) || t.entityTypes.some((t) => t.toLowerCase().includes(e) || T(t).toLowerCase().includes(e)));
|
|
45
|
+
}, [
|
|
46
|
+
x,
|
|
47
|
+
M,
|
|
48
|
+
T
|
|
49
|
+
]), Z = (e) => {
|
|
50
|
+
y?.(_(v, `templates/${e}`));
|
|
51
|
+
}, ye = async (e, t) => {
|
|
52
|
+
e.stopPropagation(), o("medium"), q(t);
|
|
53
|
+
}, Q = () => {
|
|
54
|
+
q(null), k(null);
|
|
55
|
+
}, $ = async () => {
|
|
56
|
+
if (K) {
|
|
57
|
+
k(null), j(!0);
|
|
49
58
|
try {
|
|
50
|
-
await
|
|
51
|
-
} catch {
|
|
52
|
-
|
|
59
|
+
await he(K), s("success"), q(null);
|
|
60
|
+
} catch (e) {
|
|
61
|
+
s("error"), k(e instanceof Error && e.message ? e.message : b("export.templates.delete.failed", "Couldn't delete this template. Try again."));
|
|
62
|
+
} finally {
|
|
63
|
+
j(!1);
|
|
53
64
|
}
|
|
54
|
-
J(null);
|
|
55
65
|
}
|
|
56
|
-
};
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
title:
|
|
59
|
-
subtitle:
|
|
60
|
-
icon: /* @__PURE__ */
|
|
61
|
-
headerActions: /* @__PURE__ */
|
|
66
|
+
}, be = x.find((e) => e.id === K)?.name ?? "";
|
|
67
|
+
return /* @__PURE__ */ h(re, {
|
|
68
|
+
title: b("export.templates.title", "Export Templates"),
|
|
69
|
+
subtitle: b("export.templates.subtitle", "Reusable export configurations for common data exports"),
|
|
70
|
+
icon: /* @__PURE__ */ m(u, { size: 24 }),
|
|
71
|
+
headerActions: /* @__PURE__ */ m(pe, {
|
|
62
72
|
primary: {
|
|
63
|
-
label:
|
|
64
|
-
icon: /* @__PURE__ */
|
|
65
|
-
onSelect:
|
|
73
|
+
label: b("export.templates.actions.newTemplate", "New Template"),
|
|
74
|
+
icon: /* @__PURE__ */ m(d, { size: 16 }),
|
|
75
|
+
onSelect: J
|
|
66
76
|
},
|
|
67
77
|
actions: [{
|
|
68
|
-
label:
|
|
69
|
-
icon: /* @__PURE__ */
|
|
70
|
-
onSelect: () =>
|
|
78
|
+
label: b("export.templates.actions.newExport", "New Export"),
|
|
79
|
+
icon: /* @__PURE__ */ m(d, { size: 16 }),
|
|
80
|
+
onSelect: () => y?.(_(v, "new"))
|
|
71
81
|
}]
|
|
72
82
|
}),
|
|
73
|
-
headerContent: /* @__PURE__ */
|
|
83
|
+
headerContent: /* @__PURE__ */ h("span", {
|
|
74
84
|
className: "inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
-
count:
|
|
77
|
-
suffix:
|
|
85
|
+
children: [/* @__PURE__ */ m(fe, { size: 12 }), w ? X.length === 1 ? b("export.templates.summary.one", "1 setup") : b("export.templates.summary.other", "{{count}} setups", { count: X.length }) : b("export.templates.summary.available", "{{count}} template{{suffix}} available", {
|
|
86
|
+
count: X.length,
|
|
87
|
+
suffix: X.length === 1 ? "" : "s"
|
|
78
88
|
})]
|
|
79
89
|
}),
|
|
80
90
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
91
|
+
w && /* @__PURE__ */ m(n, {}),
|
|
92
|
+
/* @__PURE__ */ m(g, {
|
|
93
|
+
icon: /* @__PURE__ */ m(u, { size: 16 }),
|
|
94
|
+
children: b("export.templates.purpose", "Templates save an export setup — the entity types and format you regularly need — so you don't rebuild it each time. Create one here, then start a new export from it in a single click. Handy for recurring backups, periodic audits, or any export you run more than once.")
|
|
84
95
|
}),
|
|
85
|
-
|
|
96
|
+
P && /* @__PURE__ */ h("div", {
|
|
86
97
|
className: "border border-primary/30 rounded-xl p-6 bg-accent-wash space-y-4",
|
|
87
98
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ h("div", {
|
|
89
100
|
className: "flex items-center justify-between",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
91
102
|
className: "font-semibold text-lg",
|
|
92
|
-
children:
|
|
93
|
-
}), /* @__PURE__ */
|
|
103
|
+
children: b("export.templates.form.title", "New Template")
|
|
104
|
+
}), /* @__PURE__ */ m("button", {
|
|
94
105
|
type: "button",
|
|
95
|
-
onClick: () =>
|
|
106
|
+
onClick: () => F(!1),
|
|
96
107
|
className: "p-1.5 rounded-md hover:bg-accent",
|
|
97
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ m(f, { size: 16 })
|
|
98
109
|
})]
|
|
99
110
|
}),
|
|
100
|
-
|
|
111
|
+
W && /* @__PURE__ */ m("p", {
|
|
101
112
|
className: "text-sm text-status-error-text bg-status-error-bg/10 rounded-lg px-3 py-2",
|
|
102
|
-
children:
|
|
113
|
+
children: W
|
|
103
114
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ h("div", {
|
|
105
116
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ h("div", {
|
|
107
118
|
className: "space-y-1",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ h("label", {
|
|
109
120
|
className: "text-sm font-medium",
|
|
110
|
-
children: [
|
|
111
|
-
}), /* @__PURE__ */
|
|
121
|
+
children: [b("export.templates.form.fields.name", "Name"), " *"]
|
|
122
|
+
}), /* @__PURE__ */ m("input", {
|
|
112
123
|
type: "text",
|
|
113
|
-
"aria-label":
|
|
114
|
-
placeholder:
|
|
115
|
-
value:
|
|
116
|
-
onChange: (e) =>
|
|
124
|
+
"aria-label": b("export.templates.form.fields.name", "Name"),
|
|
125
|
+
placeholder: b("export.templates.form.fields.namePlaceholder", "e.g. Weekly Tags Export"),
|
|
126
|
+
value: I,
|
|
127
|
+
onChange: (e) => L(e.target.value),
|
|
117
128
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all"
|
|
118
129
|
})]
|
|
119
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ h("div", {
|
|
120
131
|
className: "space-y-1",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ h("label", {
|
|
122
133
|
className: "text-sm font-medium",
|
|
123
|
-
children: [
|
|
124
|
-
}), /* @__PURE__ */
|
|
125
|
-
value:
|
|
126
|
-
onChange: (e) =>
|
|
134
|
+
children: [b("export.templates.form.fields.format", "Format"), " *"]
|
|
135
|
+
}), /* @__PURE__ */ h("select", {
|
|
136
|
+
value: H,
|
|
137
|
+
onChange: (e) => U(e.target.value),
|
|
127
138
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ m("option", {
|
|
129
140
|
value: "CSV",
|
|
130
|
-
children:
|
|
131
|
-
}), /* @__PURE__ */
|
|
141
|
+
children: b("export.format.csv", "CSV")
|
|
142
|
+
}), /* @__PURE__ */ m("option", {
|
|
132
143
|
value: "JSON",
|
|
133
|
-
children:
|
|
144
|
+
children: b("export.format.json", "JSON")
|
|
134
145
|
})]
|
|
135
146
|
})]
|
|
136
147
|
})]
|
|
137
148
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ h("div", {
|
|
139
150
|
className: "space-y-1",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ m("label", {
|
|
141
152
|
className: "text-sm font-medium",
|
|
142
|
-
children:
|
|
143
|
-
}), /* @__PURE__ */
|
|
153
|
+
children: b("export.templates.form.fields.description", "Description")
|
|
154
|
+
}), /* @__PURE__ */ m("input", {
|
|
144
155
|
type: "text",
|
|
145
|
-
"aria-label":
|
|
146
|
-
placeholder:
|
|
147
|
-
value:
|
|
148
|
-
onChange: (e) =>
|
|
156
|
+
"aria-label": b("export.templates.form.fields.description", "Description"),
|
|
157
|
+
placeholder: b("export.templates.form.fields.descriptionPlaceholder", "Optional description"),
|
|
158
|
+
value: R,
|
|
159
|
+
onChange: (e) => z(e.target.value),
|
|
149
160
|
className: "w-full px-3 py-2 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all"
|
|
150
161
|
})]
|
|
151
162
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ h("div", {
|
|
153
164
|
className: "space-y-2",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ h("label", {
|
|
155
166
|
className: "text-sm font-medium",
|
|
156
167
|
children: [
|
|
157
|
-
|
|
168
|
+
b("export.templates.form.fields.entityTypes", "Entity Types"),
|
|
158
169
|
" *",
|
|
159
170
|
" ",
|
|
160
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ m("span", {
|
|
161
172
|
className: "text-text-secondary font-normal",
|
|
162
|
-
children:
|
|
173
|
+
children: b("export.templates.form.fields.entityTypesHint", "(select at least one)")
|
|
163
174
|
})
|
|
164
175
|
]
|
|
165
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ m("div", {
|
|
166
177
|
className: "flex flex-wrap gap-2",
|
|
167
|
-
children:
|
|
178
|
+
children: D.map((e) => /* @__PURE__ */ m("button", {
|
|
168
179
|
type: "button",
|
|
169
|
-
onClick: () =>
|
|
170
|
-
className:
|
|
171
|
-
children: e.displayName
|
|
180
|
+
onClick: () => ve(e.entityType),
|
|
181
|
+
className: a("px-3 py-1.5 rounded-lg text-sm font-medium border-2 transition-all", B.includes(e.entityType) ? "border-primary bg-action-primary-bg/10 text-primary" : "border-border-subtle bg-bg-surface hover:border-primary/50"),
|
|
182
|
+
children: w ? T(e.entityType) : e.displayName
|
|
172
183
|
}, e.entityType))
|
|
173
184
|
})]
|
|
174
185
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ h("div", {
|
|
176
187
|
className: "flex gap-3 pt-2",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ h("button", {
|
|
178
189
|
type: "button",
|
|
179
|
-
onClick:
|
|
180
|
-
disabled:
|
|
190
|
+
onClick: Y,
|
|
191
|
+
disabled: C,
|
|
181
192
|
className: "inline-flex items-center gap-2 px-5 py-2.5 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium disabled:opacity-50",
|
|
182
|
-
children: [
|
|
193
|
+
children: [C ? /* @__PURE__ */ m(ue, {
|
|
183
194
|
size: 16,
|
|
184
195
|
className: "animate-spin"
|
|
185
|
-
}) : /* @__PURE__ */
|
|
186
|
-
}), /* @__PURE__ */
|
|
196
|
+
}) : /* @__PURE__ */ m(d, { size: 16 }), b("export.templates.form.actions.create", "Create Template")]
|
|
197
|
+
}), /* @__PURE__ */ m("button", {
|
|
187
198
|
type: "button",
|
|
188
|
-
onClick: () =>
|
|
199
|
+
onClick: () => F(!1),
|
|
189
200
|
className: "px-5 py-2.5 border-2 border-border-subtle rounded-lg hover:bg-accent transition-colors font-medium",
|
|
190
|
-
children:
|
|
201
|
+
children: b("export.templates.form.actions.cancel", "Cancel")
|
|
191
202
|
})]
|
|
192
203
|
})
|
|
193
204
|
]
|
|
194
205
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ h("div", {
|
|
196
207
|
className: "relative group",
|
|
197
208
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ m(de, {
|
|
199
210
|
size: 18,
|
|
200
211
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
201
212
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ m("input", {
|
|
203
214
|
type: "text",
|
|
204
|
-
"aria-label":
|
|
205
|
-
placeholder:
|
|
206
|
-
value:
|
|
207
|
-
onChange: (e) =>
|
|
215
|
+
"aria-label": b("export.templates.search.placeholder", "Search templates"),
|
|
216
|
+
placeholder: b("export.templates.search.placeholder", "Search templates..."),
|
|
217
|
+
value: M,
|
|
218
|
+
onChange: (e) => N(e.target.value),
|
|
208
219
|
className: "w-full pl-[3.25rem] pr-4 py-2.5 border-2 border-border-subtle rounded-lg bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all duration-200"
|
|
209
220
|
}),
|
|
210
|
-
|
|
221
|
+
M && /* @__PURE__ */ m("button", {
|
|
211
222
|
type: "button",
|
|
212
|
-
onClick: () =>
|
|
223
|
+
onClick: () => N(""),
|
|
213
224
|
className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded-md text-text-secondary hover:text-text-primary hover:bg-accent",
|
|
214
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ m(f, { size: 16 })
|
|
215
226
|
})
|
|
216
227
|
]
|
|
217
228
|
}),
|
|
218
|
-
|
|
229
|
+
S && /* @__PURE__ */ m("div", {
|
|
219
230
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
220
231
|
children: [...[
|
|
221
232
|
,
|
|
222
233
|
,
|
|
223
234
|
,
|
|
224
235
|
,
|
|
225
|
-
]].map((e, t) => /* @__PURE__ */
|
|
236
|
+
]].map((e, t) => /* @__PURE__ */ h("div", {
|
|
226
237
|
className: "border border-border-seam rounded-xl p-5",
|
|
227
238
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ m("div", { className: "h-5 w-40 bg-bg-sunken rounded mb-3 animate-vc-shimmer" }),
|
|
240
|
+
/* @__PURE__ */ m("div", { className: "h-3 w-full bg-bg-sunken rounded mb-2 animate-vc-shimmer" }),
|
|
241
|
+
/* @__PURE__ */ h("div", {
|
|
231
242
|
className: "flex gap-2 mt-4",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ m("div", { className: "h-5 w-16 bg-bg-sunken rounded-full animate-vc-shimmer" }), /* @__PURE__ */ m("div", { className: "h-5 w-16 bg-bg-sunken rounded-full animate-vc-shimmer" })]
|
|
233
244
|
})
|
|
234
245
|
]
|
|
235
246
|
}, t))
|
|
236
247
|
}),
|
|
237
|
-
|
|
248
|
+
S ? null : X.length > 0 ? /* @__PURE__ */ m("div", {
|
|
238
249
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
239
|
-
children:
|
|
250
|
+
children: X.map((e, t) => /* @__PURE__ */ h("div", {
|
|
240
251
|
role: "button",
|
|
241
252
|
tabIndex: 0,
|
|
242
|
-
onClick: () =>
|
|
253
|
+
onClick: () => Z(e.id),
|
|
243
254
|
onKeyDown: (t) => {
|
|
244
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
255
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), Z(e.id));
|
|
245
256
|
},
|
|
246
|
-
className:
|
|
257
|
+
className: a("text-left group cursor-pointer border border-border-seam rounded-xl overflow-hidden bg-bg-surface", "hover:border-primary/40 shadow-[var(--shadow-pop)] transition-colors duration-200", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40", "animate-in fade-in-0"),
|
|
247
258
|
style: { animationDelay: `${t * 50}ms` },
|
|
248
|
-
children: [/* @__PURE__ */
|
|
259
|
+
children: [/* @__PURE__ */ m("div", {
|
|
249
260
|
className: "p-4 border-b bg-bg-sunken/30",
|
|
250
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ h("div", {
|
|
251
262
|
className: "flex items-start justify-between",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ h("div", {
|
|
253
264
|
className: "flex items-center gap-3",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ m("div", {
|
|
255
266
|
className: "p-2 rounded-lg bg-action-primary-bg/10",
|
|
256
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ m(u, {
|
|
257
268
|
size: 20,
|
|
258
269
|
className: "text-primary"
|
|
259
270
|
})
|
|
260
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
|
|
261
272
|
className: "font-semibold",
|
|
262
273
|
children: e.name
|
|
263
|
-
}), /* @__PURE__ */
|
|
274
|
+
}), /* @__PURE__ */ h("p", {
|
|
264
275
|
className: "text-xs text-text-secondary",
|
|
265
|
-
children: [
|
|
276
|
+
children: [ce(e.format), e.isDefault && /* @__PURE__ */ m("span", {
|
|
266
277
|
className: "ml-1.5 inline-flex items-center px-1.5 py-0.5 rounded text-xs bg-action-primary-bg/10 text-primary font-medium",
|
|
267
|
-
children:
|
|
278
|
+
children: b("export.templates.card.default", "Default")
|
|
268
279
|
})]
|
|
269
280
|
})] })]
|
|
270
|
-
}), /* @__PURE__ */
|
|
281
|
+
}), /* @__PURE__ */ h("div", {
|
|
271
282
|
className: "flex items-center gap-2",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ m("button", {
|
|
273
284
|
type: "button",
|
|
274
|
-
onClick: (t) =>
|
|
285
|
+
onClick: (t) => ye(t, e.id),
|
|
275
286
|
className: "p-1.5 rounded-md text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 transition-colors",
|
|
276
|
-
"aria-label":
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
-
}), /* @__PURE__ */
|
|
287
|
+
"aria-label": b("export.templates.card.deleteAriaLabel", "Delete {{name}}", { name: e.name }),
|
|
288
|
+
children: /* @__PURE__ */ m(f, { size: 14 })
|
|
289
|
+
}), /* @__PURE__ */ m(le, {
|
|
279
290
|
size: 18,
|
|
280
291
|
className: "text-text-secondary group-hover:text-primary transition-colors mt-1"
|
|
281
292
|
})]
|
|
282
293
|
})]
|
|
283
294
|
})
|
|
284
|
-
}), /* @__PURE__ */
|
|
295
|
+
}), /* @__PURE__ */ h("div", {
|
|
285
296
|
className: "p-4",
|
|
286
|
-
children: [e.description && /* @__PURE__ */
|
|
297
|
+
children: [e.description && /* @__PURE__ */ m("p", {
|
|
287
298
|
className: "text-sm text-text-secondary mb-3 line-clamp-2",
|
|
288
299
|
children: e.description
|
|
289
|
-
}), /* @__PURE__ */
|
|
300
|
+
}), /* @__PURE__ */ h("div", {
|
|
290
301
|
className: "flex flex-wrap gap-1.5 overflow-hidden",
|
|
291
|
-
children: [e.entityTypes.slice(0, 6).map((e) => /* @__PURE__ */
|
|
302
|
+
children: [e.entityTypes.slice(0, 6).map((e) => /* @__PURE__ */ m("span", {
|
|
292
303
|
className: "inline-flex px-2 py-0.5 rounded text-xs font-medium bg-bg-sunken text-text-secondary max-w-full truncate",
|
|
293
|
-
children: e
|
|
294
|
-
}, e)), e.entityTypes.length > 6 && /* @__PURE__ */
|
|
304
|
+
children: T(e)
|
|
305
|
+
}, e)), e.entityTypes.length > 6 && /* @__PURE__ */ m("span", {
|
|
295
306
|
className: "inline-flex px-2 py-0.5 rounded text-xs font-medium bg-bg-sunken text-text-secondary",
|
|
296
|
-
children:
|
|
307
|
+
children: b("export.templates.card.moreEntities", "+{{count}} more", { count: e.entityTypes.length - 6 })
|
|
297
308
|
})]
|
|
298
309
|
})]
|
|
299
310
|
})]
|
|
300
311
|
}, e.id))
|
|
301
|
-
}) : /* @__PURE__ */
|
|
302
|
-
illustration:
|
|
303
|
-
title:
|
|
304
|
-
description:
|
|
305
|
-
action:
|
|
312
|
+
}) : /* @__PURE__ */ m(me, {
|
|
313
|
+
illustration: M ? "empty-search" : "empty-data",
|
|
314
|
+
title: M ? b("export.templates.empty.filtered.title", "No matching templates") : b("export.templates.empty.title", "No templates yet"),
|
|
315
|
+
description: M ? b("export.templates.empty.filtered.description", "Try adjusting your search to find what you are looking for.") : b("export.templates.empty.description", "Create a template to save reusable export configurations."),
|
|
316
|
+
action: M ? /* @__PURE__ */ h("button", {
|
|
306
317
|
type: "button",
|
|
307
|
-
onClick: () =>
|
|
318
|
+
onClick: () => N(""),
|
|
308
319
|
className: "inline-flex items-center gap-2 px-4 py-2 border-2 border-border-subtle rounded-lg hover:bg-accent transition-colors font-medium",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
310
|
-
}) : /* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ m(f, { size: 16 }), b("export.templates.empty.filtered.actions.clear", "Clear Search")]
|
|
321
|
+
}) : /* @__PURE__ */ h("button", {
|
|
311
322
|
type: "button",
|
|
312
|
-
onClick:
|
|
323
|
+
onClick: J,
|
|
313
324
|
className: "inline-flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ m(d, { size: 16 }), b("export.templates.empty.actions.newTemplate", "New Template")]
|
|
315
326
|
})
|
|
316
327
|
}),
|
|
317
|
-
|
|
328
|
+
w ? /* @__PURE__ */ m(ie, {
|
|
329
|
+
open: K !== null,
|
|
330
|
+
onOpenChange: (e) => {
|
|
331
|
+
e || Q();
|
|
332
|
+
},
|
|
333
|
+
title: b("export.templates.delete.named", "Delete “{{name}}”?", { name: be }),
|
|
334
|
+
description: b("export.templates.delete.description", "This removes the saved export configuration. Existing export jobs are not deleted."),
|
|
335
|
+
confirmLabel: b("export.templates.delete.confirmAction", "Delete Template"),
|
|
336
|
+
keepLabel: b("export.templates.delete.cancel", "Keep Template"),
|
|
337
|
+
busy: A,
|
|
338
|
+
error: O,
|
|
339
|
+
onConfirm: () => void $()
|
|
340
|
+
}) : K && /* @__PURE__ */ m("div", {
|
|
318
341
|
role: "dialog",
|
|
319
342
|
"aria-modal": "true",
|
|
320
343
|
"aria-labelledby": "template-list-delete-title",
|
|
321
344
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-surface/80 backdrop-blur-sm p-4",
|
|
322
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ h("div", {
|
|
323
346
|
className: "w-full max-w-md rounded-xl border-2 border-border-subtle bg-bg-surface p-6 shadow-xl",
|
|
324
347
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ m("h2", {
|
|
326
349
|
id: "template-list-delete-title",
|
|
327
350
|
className: "text-lg font-bold",
|
|
328
|
-
children:
|
|
351
|
+
children: b("export.templates.delete.title", "Delete template?")
|
|
329
352
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ m("p", {
|
|
331
354
|
className: "mt-2 text-sm text-text-secondary",
|
|
332
|
-
children:
|
|
355
|
+
children: b("export.templates.delete.description", "This removes the saved export configuration. Existing export jobs are not deleted.")
|
|
356
|
+
}),
|
|
357
|
+
O && /* @__PURE__ */ m("p", {
|
|
358
|
+
role: "alert",
|
|
359
|
+
className: "mt-3 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
360
|
+
children: O
|
|
333
361
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ h("div", {
|
|
335
363
|
className: "mt-6 flex flex-col-reverse sm:flex-row sm:justify-end gap-3",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ m("button", {
|
|
337
365
|
type: "button",
|
|
338
|
-
onClick:
|
|
366
|
+
onClick: Q,
|
|
339
367
|
className: "px-4 py-2 rounded-lg border-2 border-border-subtle hover:bg-accent transition-colors font-medium",
|
|
340
|
-
children:
|
|
341
|
-
}), /* @__PURE__ */
|
|
368
|
+
children: b("export.templates.delete.cancel", "Keep Template")
|
|
369
|
+
}), /* @__PURE__ */ m("button", {
|
|
342
370
|
type: "button",
|
|
343
|
-
onClick:
|
|
371
|
+
onClick: $,
|
|
344
372
|
className: "px-4 py-2 rounded-lg bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors font-medium",
|
|
345
|
-
children:
|
|
373
|
+
children: b("export.templates.delete.confirmAction", "Delete Template")
|
|
346
374
|
})]
|
|
347
375
|
})
|
|
348
376
|
]
|
|
@@ -351,7 +379,6 @@ function w() {
|
|
|
351
379
|
]
|
|
352
380
|
});
|
|
353
381
|
}
|
|
354
|
-
|
|
355
|
-
export { w as ExportTemplatesPage };
|
|
382
|
+
export { v as ExportTemplatesPage };
|
|
356
383
|
|
|
357
384
|
//# sourceMappingURL=ExportTemplatesPage.js.map
|