@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/export/utils/formatBytes.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
if (!Number.isFinite(e) || e <= 0) return "0 B";
|
|
4
|
+
let t = 1024, n = [
|
|
5
|
+
"B",
|
|
6
|
+
"KB",
|
|
7
|
+
"MB",
|
|
8
|
+
"GB",
|
|
9
|
+
"TB"
|
|
10
|
+
], r = Math.min(n.length - 1, Math.floor(Math.log(e) / Math.log(t)));
|
|
11
|
+
return `${parseFloat((e / t ** r).toFixed(2))} ${n[r]}`;
|
|
12
|
+
}
|
|
13
|
+
export { e as formatBytes };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=formatBytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatBytes.js","names":["formatBytes","bytes","k","sizes","i"],"sources":["../../../src/export/utils/formatBytes.ts"],"sourcesContent":["/** Bytes as a short human-readable size: 1536 → \"1.5 KB\". */\nexport function formatBytes(bytes: number): string {\n if (!Number.isFinite(bytes) || bytes <= 0) return \"0 B\";\n const k = 1024;\n const sizes = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\n const i = Math.min(\n sizes.length - 1,\n Math.floor(Math.log(bytes) / Math.log(k)),\n );\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;\n}\n"],"mappings":";AACA,SAAgBA,EAAY,GAAuB;CACjD,IAAI,CAAC,OAAO,SAASC,CAAK,KAAKA,KAAS,GAAG,OAAO;CAClD,IAAMC,IAAI,MACJC,IAAQ;EAAC;EAAK;EAAM;EAAM;EAAM;CAAI,GACpCC,IAAI,KAAK,IACbD,EAAM,SAAS,GACf,KAAK,MAAM,KAAK,IAAIF,CAAK,IAAI,KAAK,IAAIC,CAAC,CAAC,CAC1C;CACA,OAAO,GAAG,YAAYD,IAAiBC,KAAGE,EAAC,CAAG,QAAQ,CAAC,CAAC,EAAE,GAAGD,EAAMC;AACrE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { I18nContextValue } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';
|
|
2
|
-
|
|
3
2
|
export type TranslationParams = Record<string, string | number>;
|
|
4
3
|
/**
|
|
5
4
|
* Interpolate `{{key}}` placeholders in a fallback string.
|
|
@@ -19,4 +18,3 @@ export declare function interpolateFallback(fallback: string, params?: Translati
|
|
|
19
18
|
* already has access to `t`).
|
|
20
19
|
*/
|
|
21
20
|
export declare function tWithFallback(t: I18nContextValue["t"], key: string, fallback: string, params?: TranslationParams): string;
|
|
22
|
-
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// src/export/utils/i18n.ts
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
return t ? Object.entries(t).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${t}\\}\\}`, "g"), String(n)), e) : e;
|
|
4
4
|
}
|
|
5
|
-
//#endregion
|
|
6
5
|
export { e as interpolateFallback };
|
|
7
6
|
|
|
8
7
|
//# sourceMappingURL=i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":[],"sources":["../../../src/export/utils/i18n.ts"],"sourcesContent":["import type { I18nContextValue } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\n\nexport type TranslationParams = Record<string, string | number>;\n\n/**\n * Interpolate `{{key}}` placeholders in a fallback string.\n *\n * Matches the VibeControls `useTr` interpolation convention so call sites\n * across the platform stay consistent.\n */\nexport function interpolateFallback(\n fallback: string,\n params?: TranslationParams,\n): string {\n if (!params) {\n return fallback;\n }\n\n return Object.entries(params).reduce(\n (str, [key, value]) =>\n str.replace(new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, \"g\"), String(value)),\n fallback,\n );\n}\n\n/**\n * Translate a key using the provided `t` function, falling back to the\n * caller's English string when the key is missing.\n *\n * Supports optional interpolation with `{{key}}` placeholders.\n *\n * Prefer the `useTr()` hook in components; this helper is useful when a\n * translation is needed outside a hook context (e.g. inside a callback that\n * already has access to `t`).\n */\nexport function tWithFallback(\n t: I18nContextValue[\"t\"],\n key: string,\n fallback: string,\n params?: TranslationParams,\n): string {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n return interpolateFallback(raw, params);\n}\n"],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["interpolateFallback","params","key","value","str","fallback"],"sources":["../../../src/export/utils/i18n.ts"],"sourcesContent":["import type { I18nContextValue } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\n\nexport type TranslationParams = Record<string, string | number>;\n\n/**\n * Interpolate `{{key}}` placeholders in a fallback string.\n *\n * Matches the VibeControls `useTr` interpolation convention so call sites\n * across the platform stay consistent.\n */\nexport function interpolateFallback(\n fallback: string,\n params?: TranslationParams,\n): string {\n if (!params) {\n return fallback;\n }\n\n return Object.entries(params).reduce(\n (str, [key, value]) =>\n str.replace(new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, \"g\"), String(value)),\n fallback,\n );\n}\n\n/**\n * Translate a key using the provided `t` function, falling back to the\n * caller's English string when the key is missing.\n *\n * Supports optional interpolation with `{{key}}` placeholders.\n *\n * Prefer the `useTr()` hook in components; this helper is useful when a\n * translation is needed outside a hook context (e.g. inside a callback that\n * already has access to `t`).\n */\nexport function tWithFallback(\n t: I18nContextValue[\"t\"],\n key: string,\n fallback: string,\n params?: TranslationParams,\n): string {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n return interpolateFallback(raw, params);\n}\n"],"mappings":";AAUA,SAAgBA,EACd,GACA,GACQ;CAKR,OAJKC,IAIE,OAAO,QAAQA,CAAM,CAAC,CAAC,QAC3B,GAAK,CAACC,GAAKC,OACVC,EAAI,QAAY,OAAO,SAASF,EAAI,SAAS,GAAG,GAAG,OAAOC,CAAK,CAAC,GAClEE,CACF,IAPSA;AAQX"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CreateExportJobInput } from '../hooks/useExportQueries';
|
|
2
|
+
import { ExportFormat, ExportScope, ExportTemplate } from '../types';
|
|
3
|
+
/** Output formats the export service writes. */
|
|
4
|
+
export declare const SUPPORTED_FORMATS: readonly ExportFormat[];
|
|
5
|
+
/** Every download is packaged as this archive; there is no choice to make. */
|
|
6
|
+
export declare const DOWNLOAD_ARCHIVE_FORMAT = "ZIP";
|
|
7
|
+
/** Everything "New download" collects, before it becomes the service input. */
|
|
8
|
+
export interface NewDownloadForm {
|
|
9
|
+
entityTypes: string[];
|
|
10
|
+
name: string;
|
|
11
|
+
scope: ExportScope;
|
|
12
|
+
format: ExportFormat;
|
|
13
|
+
templateId?: string;
|
|
14
|
+
/** `yyyy-mm-dd` from a date input, or "" for no bound. */
|
|
15
|
+
dateFrom: string;
|
|
16
|
+
dateTo: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const DEFAULT_NEW_DOWNLOAD_FORM: NewDownloadForm;
|
|
19
|
+
/**
|
|
20
|
+
* The `createExportJob` input for a filled-in form: exactly what the legacy
|
|
21
|
+
* wizard sends for the same choices, so a download contains the same data.
|
|
22
|
+
* Values in a closed "More options" fold are part of the form and are sent.
|
|
23
|
+
*/
|
|
24
|
+
export declare function toCreateExportInput(form: NewDownloadForm, organizationId: string | undefined): CreateExportJobInput;
|
|
25
|
+
/**
|
|
26
|
+
* Apply a saved setup to the form: its data types (only the ones this shell
|
|
27
|
+
* offers), its format when the service supports it, and its id. The name is
|
|
28
|
+
* the setup's name unless the person already typed their own.
|
|
29
|
+
*/
|
|
30
|
+
export declare function applySavedSetup(form: NewDownloadForm, setup: ExportTemplate, isSelectable: (entityType: string) => boolean, nameTouched: boolean): NewDownloadForm;
|
|
31
|
+
/** "Workflows and runs — 13 Nov 2026": the prefilled download name. */
|
|
32
|
+
export declare function suggestedDownloadName(what: string, now?: Date, locale?: string): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/export/utils/newDownloadForm.ts
|
|
2
|
+
var e = ["CSV", "JSON"], t = {
|
|
3
|
+
entityTypes: [],
|
|
4
|
+
name: "",
|
|
5
|
+
scope: "INDIVIDUAL",
|
|
6
|
+
format: "CSV",
|
|
7
|
+
templateId: void 0,
|
|
8
|
+
dateFrom: "",
|
|
9
|
+
dateTo: ""
|
|
10
|
+
};
|
|
11
|
+
function n(e, t) {
|
|
12
|
+
return {
|
|
13
|
+
name: e.name.trim(),
|
|
14
|
+
entityTypes: e.entityTypes,
|
|
15
|
+
format: e.format,
|
|
16
|
+
exportScope: e.scope,
|
|
17
|
+
organizationId: e.scope === "ORG_ADMIN" ? t : void 0,
|
|
18
|
+
templateId: e.templateId,
|
|
19
|
+
dateRangeStart: e.dateFrom ? new Date(e.dateFrom).toISOString() : null,
|
|
20
|
+
dateRangeEnd: e.dateTo ? new Date(e.dateTo).toISOString() : null
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function r(t, n, r, i) {
|
|
24
|
+
let a = n.format?.toUpperCase();
|
|
25
|
+
return {
|
|
26
|
+
...t,
|
|
27
|
+
templateId: n.id,
|
|
28
|
+
entityTypes: (n.entityTypes ?? []).filter(r),
|
|
29
|
+
format: a && e.includes(a) ? a : t.format,
|
|
30
|
+
name: i ? t.name : n.name ?? t.name
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function i(e, t = /* @__PURE__ */ new Date(), n) {
|
|
34
|
+
return `${e} — ${t.toLocaleDateString(n, {
|
|
35
|
+
day: "numeric",
|
|
36
|
+
month: "short",
|
|
37
|
+
year: "numeric"
|
|
38
|
+
})}`;
|
|
39
|
+
}
|
|
40
|
+
export { t as DEFAULT_NEW_DOWNLOAD_FORM, e as SUPPORTED_FORMATS, r as applySavedSetup, i as suggestedDownloadName, n as toCreateExportInput };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=newDownloadForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"newDownloadForm.js","names":["SUPPORTED_FORMATS","DEFAULT_NEW_DOWNLOAD_FORM","toCreateExportInput","form","organizationId","applySavedSetup","format","setup","isSelectable","nameTouched","suggestedDownloadName","what","now","locale"],"sources":["../../../src/export/utils/newDownloadForm.ts"],"sourcesContent":["import type { CreateExportJobInput } from \"../hooks/useExportQueries\";\nimport type { ExportFormat, ExportScope, ExportTemplate } from \"../types\";\n\n/** Output formats the export service writes. */\nexport const SUPPORTED_FORMATS: readonly ExportFormat[] = [\"CSV\", \"JSON\"];\n\n/** Every download is packaged as this archive; there is no choice to make. */\nexport const DOWNLOAD_ARCHIVE_FORMAT = \"ZIP\";\n\n/** Everything \"New download\" collects, before it becomes the service input. */\nexport interface NewDownloadForm {\n entityTypes: string[];\n name: string;\n scope: ExportScope;\n format: ExportFormat;\n templateId?: string;\n /** `yyyy-mm-dd` from a date input, or \"\" for no bound. */\n dateFrom: string;\n dateTo: string;\n}\n\nexport const DEFAULT_NEW_DOWNLOAD_FORM: NewDownloadForm = {\n entityTypes: [],\n name: \"\",\n scope: \"INDIVIDUAL\",\n format: \"CSV\",\n templateId: undefined,\n dateFrom: \"\",\n dateTo: \"\",\n};\n\n/**\n * The `createExportJob` input for a filled-in form: exactly what the legacy\n * wizard sends for the same choices, so a download contains the same data.\n * Values in a closed \"More options\" fold are part of the form and are sent.\n */\nexport function toCreateExportInput(\n form: NewDownloadForm,\n organizationId: string | undefined,\n): CreateExportJobInput {\n return {\n name: form.name.trim(),\n entityTypes: form.entityTypes,\n format: form.format,\n exportScope: form.scope,\n organizationId: form.scope === \"ORG_ADMIN\" ? organizationId : undefined,\n templateId: form.templateId,\n dateRangeStart: form.dateFrom\n ? new Date(form.dateFrom).toISOString()\n : null,\n dateRangeEnd: form.dateTo ? new Date(form.dateTo).toISOString() : null,\n };\n}\n\n/**\n * Apply a saved setup to the form: its data types (only the ones this shell\n * offers), its format when the service supports it, and its id. The name is\n * the setup's name unless the person already typed their own.\n */\nexport function applySavedSetup(\n form: NewDownloadForm,\n setup: ExportTemplate,\n isSelectable: (entityType: string) => boolean,\n nameTouched: boolean,\n): NewDownloadForm {\n const format = setup.format?.toUpperCase() as ExportFormat | undefined;\n return {\n ...form,\n templateId: setup.id,\n entityTypes: (setup.entityTypes ?? []).filter(isSelectable),\n format: format && SUPPORTED_FORMATS.includes(format) ? format : form.format,\n name: nameTouched ? form.name : (setup.name ?? form.name),\n };\n}\n\n/** \"Workflows and runs — 13 Nov 2026\": the prefilled download name. */\nexport function suggestedDownloadName(\n what: string,\n now: Date = new Date(),\n locale?: string,\n): string {\n const date = now.toLocaleDateString(locale, {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n });\n return `${what} — ${date}`;\n}\n"],"mappings":";AAIA,IAAaA,IAA6C,CAAC,OAAO,MAAM,GAiB3DC,IAA6C;CACxD,aAAa,CAAC;CACd,MAAM;CACN,OAAO;CACP,QAAQ;CACR,YAAY,KAAA;CACZ,UAAU;CACV,QAAQ;AACV;AAOA,SAAgBC,EACd,GACA,GACsB;CACtB,OAAO;EACL,MAAMC,EAAK,KAAK,KAAK;EACrB,aAAaA,EAAK;EAClB,QAAQA,EAAK;EACb,aAAaA,EAAK;EAClB,gBAAgBA,EAAK,UAAU,cAAcC,IAAiB,KAAA;EAC9D,YAAYD,EAAK;EACjB,gBAAgBA,EAAK,WACjB,IAAI,KAAKA,EAAK,QAAQ,CAAC,CAAC,YAAY,IACpC;EACJ,cAAcA,EAAK,SAAS,IAAI,KAAKA,EAAK,MAAM,CAAC,CAAC,YAAY,IAAI;CACpE;AACF;AAOA,SAAgBE,EACd,GACA,GACA,GACA,GACiB;CACjB,IAAMC,IAASC,EAAM,QAAQ,YAAY;CACzC,OAAO;EACL,GAAGJ;EACH,YAAYI,EAAM;EAClB,cAAcA,EAAM,eAAe,CAAC,EAAA,CAAG,OAAOC,CAAY;EAC1D,QAAQF,KAAUN,EAAkB,SAASM,CAAM,IAAIA,IAASH,EAAK;EACrE,MAAMM,IAAcN,EAAK,OAAQI,EAAM,QAAQJ,EAAK;CACtD;AACF;AAGA,SAAgBO,EACd,GACA,oBAAY,IAAI,KAAK,GACrB,GACQ;CAMR,OAAO,GAAGC,EAAK,KALFC,EAAI,mBAAmBC,GAAQ;EAC1C,KAAK;EACL,OAAO;EACP,MAAM;CACR,CACoB;AACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","names":["joinPath","base","path"],"sources":["../../../src/export/utils/paths.ts"],"sourcesContent":["/** Join a base path and a sub path without doubling or dropping a slash. */\nexport function joinPath(base: string, path: string): string {\n const cleanBase = base.endsWith(\"/\") ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith(\"/\") ? path : `/${path}`;\n return cleanBase + cleanPath;\n}\n"],"mappings":";AACA,SAAgBA,EAAS,GAAc,GAAsB;CAG3D,QAFkBC,EAAK,SAAS,GAAG,IAAIA,EAAK,MAAM,GAAG,EAAE,IAAIA,MACzCC,EAAK,WAAW,GAAG,IAAIA,IAAO,IAAIA;AAEtD"}
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
export type Maybe<T> = T | null;
|
|
2
2
|
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
-
export type Exact<T extends {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}> = {
|
|
6
|
-
[K in keyof T]: T[K];
|
|
7
|
-
};
|
|
8
|
-
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
-
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
-
};
|
|
11
|
-
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
-
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
-
};
|
|
14
|
-
export type MakeEmpty<T extends {
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
}, K extends keyof T> = {
|
|
17
|
-
[_ in K]?: never;
|
|
18
|
-
};
|
|
19
|
-
export type Incremental<T> = T | {
|
|
20
|
-
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
-
};
|
|
22
3
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
4
|
export type Scalars = {
|
|
24
5
|
ID: {
|
|
@@ -68,8 +49,8 @@ export type Scalars = {
|
|
|
68
49
|
output: File;
|
|
69
50
|
};
|
|
70
51
|
_SubscriptionsPlaceholder: {
|
|
71
|
-
input:
|
|
72
|
-
output:
|
|
52
|
+
input: unknown;
|
|
53
|
+
output: unknown;
|
|
73
54
|
};
|
|
74
55
|
};
|
|
75
56
|
/** API Key for programmatic access */
|
|
@@ -23524,4 +23505,3 @@ export type UserRegisterInput = {
|
|
|
23524
23505
|
phoneNumber?: InputMaybe<Scalars['String']['input']>;
|
|
23525
23506
|
username: Scalars['String']['input'];
|
|
23526
23507
|
};
|
|
23527
|
-
//# sourceMappingURL=global-types.d.ts.map
|