@nar-bus/ui-shared 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/queryKeys.d.ts +12 -0
- package/dist/api/queryKeys.d.ts.map +1 -1
- package/dist/components/OrderCreateSheet.d.ts +37 -1
- package/dist/components/OrderCreateSheet.d.ts.map +1 -1
- package/dist/components/export/ExportButton.d.ts +47 -0
- package/dist/components/export/ExportButton.d.ts.map +1 -0
- package/dist/components/export/ExportHistoryTable.d.ts +38 -0
- package/dist/components/export/ExportHistoryTable.d.ts.map +1 -0
- package/dist/components/export/ExportJobStatusBadge.d.ts +10 -0
- package/dist/components/export/ExportJobStatusBadge.d.ts.map +1 -0
- package/dist/components/export/exportJobApi.d.ts +54 -0
- package/dist/components/export/exportJobApi.d.ts.map +1 -0
- package/dist/components/export/exportJobFormat.d.ts +19 -0
- package/dist/components/export/exportJobFormat.d.ts.map +1 -0
- package/dist/components/export/exportJobText.d.ts +26 -0
- package/dist/components/export/exportJobText.d.ts.map +1 -0
- package/dist/components/export/index.d.ts +11 -0
- package/dist/components/export/index.d.ts.map +1 -0
- package/dist/components/export/useExportJob.d.ts +71 -0
- package/dist/components/export/useExportJob.d.ts.map +1 -0
- package/dist/components/order-forms/AstroConfigForm.d.ts.map +1 -1
- package/dist/components/order-forms/DirectiveForms.d.ts +15 -2
- package/dist/components/order-forms/DirectiveForms.d.ts.map +1 -1
- package/dist/components/order-forms/FirmwareUpdateForm.d.ts +10 -2
- package/dist/components/order-forms/FirmwareUpdateForm.d.ts.map +1 -1
- package/dist/components/order-forms/modemDetailQuery.d.ts +17 -0
- package/dist/components/order-forms/modemDetailQuery.d.ts.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16487 -15769
- package/dist/types/exportJob.types.d.ts +115 -0
- package/dist/types/exportJob.types.d.ts.map +1 -0
- package/dist/types/firmware.types.d.ts +11 -0
- package/dist/types/firmware.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/activeLocale.d.ts +1 -2
- package/dist/utils/activeLocale.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/api/queryKeys.d.ts
CHANGED
|
@@ -152,6 +152,18 @@ export declare const queryKeys: {
|
|
|
152
152
|
readonly details: () => readonly ["firmwares", "detail"];
|
|
153
153
|
readonly detail: (id: number) => readonly ["firmwares", "detail", number];
|
|
154
154
|
readonly kpi: () => readonly ["firmwares", "kpi"];
|
|
155
|
+
readonly options: (gatewayBrand: string, gatewayModel: string) => readonly ["firmwares", "options", {
|
|
156
|
+
readonly gatewayBrand: string;
|
|
157
|
+
readonly gatewayModel: string;
|
|
158
|
+
}];
|
|
159
|
+
};
|
|
160
|
+
readonly exportJobs: {
|
|
161
|
+
readonly all: readonly ["export-jobs"];
|
|
162
|
+
readonly list: (scope: string, page: number, size: number) => readonly ["export-jobs", "list", {
|
|
163
|
+
readonly scope: string;
|
|
164
|
+
readonly page: number;
|
|
165
|
+
readonly size: number;
|
|
166
|
+
}];
|
|
155
167
|
};
|
|
156
168
|
readonly directives: {
|
|
157
169
|
readonly all: readonly ["directives"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryKeys.d.ts","sourceRoot":"","sources":["../../src/api/queryKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,eAAO,MAAM,SAAS;;;;iCAIF,aAAa;;8BAEhB,MAAM;;gCAEJ,MAAM;+BACP,MAAM,UAAU,MAAM;mCAClB,MAAM;8BACX,MAAM;8BACN,MAAM;8BACN,MAAM;+BACL,MAAM;oCACD,MAAM;8BACZ,MAAM;8BACN,MAAM;iCACH,MAAM;oCACH,MAAM;iCACT,MAAM;6BACV,MAAM;;;;;iCAKF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;mCACrB,MAAM,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Ob,MAAM;;;;;oCAKZ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;iCAK1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;8BAE1B,MAAM;;;;;;yCAMK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;sCAC1B,MAAM;;;;mCAIT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;iCAKzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;8BAE1B,MAAM;;;;;iCAKH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;CAMjC,CAAC"}
|
|
@@ -82,6 +82,42 @@ export interface OrderCreateSheetProps {
|
|
|
82
82
|
value: string;
|
|
83
83
|
label: string;
|
|
84
84
|
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Options for the firmware picker (`GATEWAY_FIRMWARE_UPDATE`). NB-ORDER-OPTIONS-01
|
|
87
|
+
* (LHA-871): the picker used to be permanently EMPTY because nothing filled it.
|
|
88
|
+
*
|
|
89
|
+
* - **single mode — omit it.** The form loads the packages that fit the modem's
|
|
90
|
+
* brand and model itself (modem detail → `/api/firmwares/options`).
|
|
91
|
+
* - **bulk mode — REQUIRED.** N target modems may differ in brand/model, so
|
|
92
|
+
* there is no single list to load; the consumer decides which packages apply.
|
|
93
|
+
*
|
|
94
|
+
* `value` becomes the order's `versionName` param — pass the firmware's
|
|
95
|
+
* `versionName`, not its id.
|
|
96
|
+
*
|
|
97
|
+
* Passing an array (even an empty one) is treated as a deliberate override and
|
|
98
|
+
* suppresses the fetch.
|
|
99
|
+
*/
|
|
100
|
+
firmwareOptions?: Array<{
|
|
101
|
+
value: string;
|
|
102
|
+
label: string;
|
|
103
|
+
}>;
|
|
104
|
+
/**
|
|
105
|
+
* Options for the directive pickers (`GATEWAY_DIRECTIVE_QUERY` /
|
|
106
|
+
* `GATEWAY_DIRECTIVE_EXECUTE`). NB-ORDER-OPTIONS-01 (LHA-871): both pickers were
|
|
107
|
+
* EMPTY for the same reason as the firmware one.
|
|
108
|
+
*
|
|
109
|
+
* Omit it in both modes: the directive catalogue does not depend on the target
|
|
110
|
+
* modem, so the forms load it themselves (`/api/directives/search`). Supply it
|
|
111
|
+
* only to narrow or reorder the list.
|
|
112
|
+
*
|
|
113
|
+
* `value` MUST be the directive's `name` — the id the gateway knows it by. It
|
|
114
|
+
* becomes `directive` (execute) or `filter.id` (query) on the wire
|
|
115
|
+
* (NB-DIRECTIVE-WIRE-01). An array (even an empty one) suppresses the fetch.
|
|
116
|
+
*/
|
|
117
|
+
directiveOptions?: Array<{
|
|
118
|
+
value: string;
|
|
119
|
+
label: string;
|
|
120
|
+
}>;
|
|
85
121
|
/**
|
|
86
122
|
* Single-mode only — fired once after a submit in which at least one order
|
|
87
123
|
* was created (never on total failure). `order` is the first successful
|
|
@@ -193,5 +229,5 @@ export interface OrderCreateSheetProps {
|
|
|
193
229
|
cancel?: string;
|
|
194
230
|
};
|
|
195
231
|
}
|
|
196
|
-
export declare function OrderCreateSheet({ open, onClose, mode, modemId, modemSlug, meterId, meterSlug, modemOptions, meterOptions, relayOptions, onOrderCreated, bulkTargetModemIds, bulkTargetEntity, onBulkSubmit, bulkCopy, singleSubmitCopy, onOrderCreateError, errorMessage, translationNamespace, confirmOnDiscard, discardConfirmCopy, }: OrderCreateSheetProps): import("react").JSX.Element;
|
|
232
|
+
export declare function OrderCreateSheet({ open, onClose, mode, modemId, modemSlug, meterId, meterSlug, modemOptions, meterOptions, relayOptions, firmwareOptions, directiveOptions, onOrderCreated, bulkTargetModemIds, bulkTargetEntity, onBulkSubmit, bulkCopy, singleSubmitCopy, onOrderCreateError, errorMessage, translationNamespace, confirmOnDiscard, discardConfirmCopy, }: OrderCreateSheetProps): import("react").JSX.Element;
|
|
197
233
|
//# sourceMappingURL=OrderCreateSheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderCreateSheet.d.ts","sourceRoot":"","sources":["../../src/components/OrderCreateSheet.tsx"],"names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GACnB,EAAE,qBAAqB,+BAgYvB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ExportFormat, ExportJob, ExportJobCreateRequest } from '../../types/exportJob.types';
|
|
2
|
+
import { ExportJobState } from './useExportJob';
|
|
3
|
+
export interface ExportButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Builds the job for the chosen format AT CLICK TIME, so the export carries the
|
|
6
|
+
* list's current search, filters and sort. `source` is the screen's own list
|
|
7
|
+
* request (the one its table query sends).
|
|
8
|
+
*/
|
|
9
|
+
getRequest: (format: ExportFormat) => ExportJobCreateRequest;
|
|
10
|
+
/** Offered formats, in menu order. One format skips the menu. @default ["XLSX", "CSV", "PDF"] */
|
|
11
|
+
formats?: ExportFormat[];
|
|
12
|
+
/**
|
|
13
|
+
* The list's current total. PDF is rendered in memory server-side and fails
|
|
14
|
+
* (EXPORT_014) above `pdfMaxRows`, so the option is disabled up front.
|
|
15
|
+
*/
|
|
16
|
+
totalRows?: number;
|
|
17
|
+
/** Server's `export.pdf.max_rows`. @default 10000 */
|
|
18
|
+
pdfMaxRows?: number;
|
|
19
|
+
/** Button text. @default "Dışa Aktar" / "Export" */
|
|
20
|
+
label?: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Poll period. @default 2000 */
|
|
23
|
+
pollIntervalMs?: number;
|
|
24
|
+
/** How long to wait for the file before leaving it to the download history. @default 30000 */
|
|
25
|
+
waitMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Still running after `waitMs`. The button has already told the user to take
|
|
28
|
+
* the file from Download History; use this to link or navigate there.
|
|
29
|
+
*/
|
|
30
|
+
onBackground?: (job: ExportJob | undefined) => void;
|
|
31
|
+
/** The download has started. */
|
|
32
|
+
onComplete?: (job: ExportJob) => void;
|
|
33
|
+
/** Refused or failed; `message` is the sentence already shown in the toast. */
|
|
34
|
+
onError?: (message: string, state: ExportJobState) => void;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* "Dışa Aktar" for a list screen, on the export platform (LHA-817). Seat it in
|
|
39
|
+
* `ListPageLayout.beforeFilterActions`.
|
|
40
|
+
*
|
|
41
|
+
* Click → format → the job starts with the screen's own request → the button
|
|
42
|
+
* shows progress while it polls → the file downloads by itself if it is ready
|
|
43
|
+
* within `waitMs`; otherwise a toast points to Download History. Refusals
|
|
44
|
+
* (duplicate, limits, invalid source) and failures are worded from their code.
|
|
45
|
+
*/
|
|
46
|
+
export declare function ExportButton({ getRequest, formats, totalRows, pdfMaxRows, label, disabled, pollIntervalMs, waitMs, onBackground, onComplete, onError, className, }: ExportButtonProps): import("react").JSX.Element;
|
|
47
|
+
//# sourceMappingURL=ExportButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportButton.d.ts","sourceRoot":"","sources":["../../../src/components/export/ExportButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAInG,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,sBAAsB,CAAC;IAC7D,iGAAiG;IACjG,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,gCAAgC;IAChC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,OAAyB,EACzB,SAAS,EACT,UAAkB,EAClB,KAAK,EACL,QAAQ,EACR,cAAc,EACd,MAAM,EACN,YAAY,EACZ,UAAU,EACV,OAAO,EACP,SAAS,GACV,EAAE,iBAAiB,+BA6LnB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ExportJobScope } from '../../types/exportJob.types';
|
|
3
|
+
export interface ExportHistoryTableProps {
|
|
4
|
+
/**
|
|
5
|
+
* `own` — the user's exports (Kullanıcı Profili → İndirme Geçmişi).
|
|
6
|
+
* `all` — everyone's (yönetim görünümü); needs the `export.jobs.read.ALL`
|
|
7
|
+
* operation (`usePermissions().hasOperation("export.jobs.read.ALL")`), the API
|
|
8
|
+
* answers AUTH_030 otherwise. @default "own"
|
|
9
|
+
*/
|
|
10
|
+
scope?: ExportJobScope;
|
|
11
|
+
/**
|
|
12
|
+
* Rows per page, snapped to the page-size picker's options (25 / 50 / 100):
|
|
13
|
+
* the API caps a page at 100, and a size the picker does not offer would show
|
|
14
|
+
* an empty picker. @default 25
|
|
15
|
+
*/
|
|
16
|
+
pageSize?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Shows a "Oluşturan" column. The API only returns `ownerUserId`, so the app
|
|
19
|
+
* resolves the name (typically for `scope="all"`).
|
|
20
|
+
*/
|
|
21
|
+
renderOwner?: (ownerUserId: number) => ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Refresh period while a listed job is QUEUED/RUNNING; idle lists are not
|
|
24
|
+
* polled. The platform's guidance is ~5 s. @default 5000
|
|
25
|
+
*/
|
|
26
|
+
activePollIntervalMs?: number;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Download History on the export platform (LHA-817): the user's own jobs, or
|
|
31
|
+
* everyone's for an admin. Columns follow the business analysis: report name ·
|
|
32
|
+
* (owner) · requested · finished · status · progress (%37,5) · rows · size
|
|
33
|
+
* (2,3 MB) · download / cancel · error ("Kod: …, Hata: …").
|
|
34
|
+
*
|
|
35
|
+
* Paging and sort are the server's (newest first, 1-based pages).
|
|
36
|
+
*/
|
|
37
|
+
export declare function ExportHistoryTable({ scope, pageSize: initialPageSize, renderOwner, activePollIntervalMs, className, }: ExportHistoryTableProps): import("react").JSX.Element;
|
|
38
|
+
//# sourceMappingURL=ExportHistoryTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportHistoryTable.d.ts","sourceRoot":"","sources":["../../../src/components/export/ExportHistoryTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlE,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAO7E,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,SAAS,CAAC;IACjD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAWD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAa,EACb,QAAQ,EAAE,eAAoB,EAC9B,WAAW,EACX,oBAA2B,EAC3B,SAAS,GACV,EAAE,uBAAuB,+BAsNzB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExportJobStatus } from '../../types/exportJob.types';
|
|
2
|
+
export interface ExportJobStatusBadgeProps {
|
|
3
|
+
status: ExportJobStatus;
|
|
4
|
+
/** Overrides the package's label (e.g. the app's own wording). */
|
|
5
|
+
label?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Export job status with the package's TR/EN label and tone (running pulses). */
|
|
9
|
+
export declare function ExportJobStatusBadge({ status, label, className }: ExportJobStatusBadgeProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ExportJobStatusBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportJobStatusBadge.d.ts","sourceRoot":"","sources":["../../../src/components/export/ExportJobStatusBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAInE,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,eAAe,CAAC;IACxB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kFAAkF;AAClF,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,yBAAyB,+BAO3F"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ApiError, ApiResponse } from '../../adapters/types';
|
|
2
|
+
import { ExportJob, ExportJobCreateRequest, ExportJobCreated, ExportJobScope } from '../../types/exportJob.types';
|
|
3
|
+
/**
|
|
4
|
+
* Thin calls for the export platform (`/api/exports/jobs`, lena-management,
|
|
5
|
+
* LHA-817). Each one RESOLVES to the API envelope — an `error` envelope is a
|
|
6
|
+
* value, not an exception, like every apiGet/apiPost caller in this package.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EXPORT_JOBS_PATH = "/api/exports/jobs";
|
|
9
|
+
export declare function createExportJob(request: ExportJobCreateRequest): Promise<ApiResponse<ExportJobCreated>>;
|
|
10
|
+
/** `signal` aborts the request (it then resolves to `REQUEST_CANCELED`). */
|
|
11
|
+
export declare function getExportJob(id: number, signal?: AbortSignal): Promise<ApiResponse<ExportJob>>;
|
|
12
|
+
export declare function listExportJobs(scope: ExportJobScope, page: number, size: number): Promise<ApiResponse<ExportJob[]>>;
|
|
13
|
+
export declare function cancelExportJob(id: number): Promise<ApiResponse<ExportJob>>;
|
|
14
|
+
/** Outcome of a download attempt: started, or the API's refusal. */
|
|
15
|
+
export type ExportDownloadResult = {
|
|
16
|
+
ok: true;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
error: ApiError;
|
|
20
|
+
};
|
|
21
|
+
/** A fetched download, not yet handed to the browser. */
|
|
22
|
+
export type ExportDownload = {
|
|
23
|
+
kind: "link";
|
|
24
|
+
url: string;
|
|
25
|
+
fileName?: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "file";
|
|
28
|
+
blob: Blob;
|
|
29
|
+
fileName: string;
|
|
30
|
+
};
|
|
31
|
+
export type ExportDownloadFetchResult = {
|
|
32
|
+
ok: true;
|
|
33
|
+
download: ExportDownload;
|
|
34
|
+
} | {
|
|
35
|
+
ok: false;
|
|
36
|
+
error: ApiError;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Fetches a COMPLETED job's download WITHOUT starting it — the caller decides,
|
|
40
|
+
* after the await, whether the result still matters (L-F05: a reset or unmount
|
|
41
|
+
* while this was in flight must not make the browser download anything).
|
|
42
|
+
*
|
|
43
|
+
* The endpoint answers in one of two shapes, decided by the server's config,
|
|
44
|
+
* not by the request: `{url, expiresAt}` (a signed object-storage URL, the
|
|
45
|
+
* normal case) or the file itself, streamed. Asked as a Blob, both arrive here;
|
|
46
|
+
* a JSON body is the link envelope, anything else is the file. `signal` aborts
|
|
47
|
+
* the request (it then resolves to `REQUEST_CANCELED`).
|
|
48
|
+
*/
|
|
49
|
+
export declare function fetchExportDownload(job: Pick<ExportJob, "id" | "fileName">, signal?: AbortSignal): Promise<ExportDownloadFetchResult>;
|
|
50
|
+
/** Hands a fetched download to the browser (the only browser side effect). */
|
|
51
|
+
export declare function saveExportDownload(download: ExportDownload): void;
|
|
52
|
+
/** Fetches and starts a COMPLETED job's download in one step (history rows). */
|
|
53
|
+
export declare function downloadExportJob(job: Pick<ExportJob, "id" | "fileName">, signal?: AbortSignal): Promise<ExportDownloadResult>;
|
|
54
|
+
//# sourceMappingURL=exportJobApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportJobApi.d.ts","sourceRoot":"","sources":["../../../src/components/export/exportJobApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAEV,SAAS,EACT,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACf,MAAM,6BAA6B,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAEvG;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAE9F;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAEnH;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAE3E;AAED,oEAAoE;AACpE,MAAM,MAAM,oBAAoB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEjF,yDAAyD;AACzD,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,MAAM,MAAM,yBAAyB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEhH;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,GAAG,UAAU,CAAC,EACvC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,yBAAyB,CAAC,CAmBpC;AAED,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAYjE;AAED,gFAAgF;AAChF,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,GAAG,UAAU,CAAC,EACvC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAK/B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ExportJob, ExportJobStatus } from '../../types/exportJob.types';
|
|
2
|
+
import { LanguageSource } from '../../utils/activeLocale';
|
|
3
|
+
/** Jobs the worker still owns — the history keeps polling while any is listed. */
|
|
4
|
+
export declare const ACTIVE_EXPORT_STATUSES: readonly ExportJobStatus[];
|
|
5
|
+
export declare const isActiveExportJob: (job: Pick<ExportJob, "status">) => boolean;
|
|
6
|
+
/** Badge tone per status (ui-kit Badge variants). */
|
|
7
|
+
export declare const EXPORT_STATUS_VARIANT: Record<ExportJobStatus, "info" | "success" | "error" | "warning" | "default">;
|
|
8
|
+
/**
|
|
9
|
+
* Progress as the business analysis writes it — one decimal, locale sign
|
|
10
|
+
* position ("%37,5" / "37.5%"). `null` while the total is unknown (before the
|
|
11
|
+
* first page, or a cursor API that reports no total): a guessed percentage
|
|
12
|
+
* would be a lie.
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatExportProgress(i18n: LanguageSource, job: Pick<ExportJob, "status" | "processedRows" | "totalRows">): string | null;
|
|
15
|
+
/** File size in the active locale, 1 decimal above bytes ("2,3 MB"). */
|
|
16
|
+
export declare function formatExportSize(i18n: LanguageSource, bytes: number | null | undefined): string | null;
|
|
17
|
+
/** Row counts: "1.234 / 5.000", or just the processed count while the total is unknown. */
|
|
18
|
+
export declare function formatExportRows(i18n: LanguageSource, job: Pick<ExportJob, "processedRows" | "totalRows">): string;
|
|
19
|
+
//# sourceMappingURL=exportJobFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportJobFormat.d.ts","sourceRoot":"","sources":["../../../src/components/export/exportJobFormat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAA4C,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEzG,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAA0B,CAAC;AAExF,eAAO,MAAM,iBAAiB,GAAI,KAAK,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,YAAgD,CAAC;AAEjH,qDAAqD;AACrD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAO/G,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,eAAe,GAAG,WAAW,CAAC,GAAG,MAAM,GAAG,IAAI,CAKxI;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAYtG;AAED,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,WAAW,CAAC,GAAG,MAAM,CAIlH"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
2
|
+
import { ApiError } from '../../adapters/types';
|
|
3
|
+
import { ExportJob, ExportJobStatus } from '../../types/exportJob.types';
|
|
4
|
+
/**
|
|
5
|
+
* Every export_job string, through STATIC `t("key", { defaultValue })` calls.
|
|
6
|
+
* Template-built keys would escape ui-kit's bundle-contract scan, so the
|
|
7
|
+
* status and error families are spelled out one by one on purpose.
|
|
8
|
+
*/
|
|
9
|
+
export declare function exportStatusLabel(t: TFunction, status: ExportJobStatus): string;
|
|
10
|
+
/**
|
|
11
|
+
* The user-facing sentence for an export error code. The API sends no message
|
|
12
|
+
* text (only `code` + `params`), and a FAILED job's `errorMessage` is technical
|
|
13
|
+
* English — so the wording lives here. Unknown codes get the generic sentence.
|
|
14
|
+
*/
|
|
15
|
+
export declare function exportErrorText(t: TFunction, code: string | null | undefined, params?: Record<string, string>): string;
|
|
16
|
+
export declare function apiErrorText(t: TFunction, error: ApiError | undefined): string;
|
|
17
|
+
/**
|
|
18
|
+
* A FAILED job carries its params only inside the technical `errorMessage`
|
|
19
|
+
* (a Java map's toString: `{limit=10000, total=25000}`). Best effort: read the
|
|
20
|
+
* simple `key=value` pairs back so "{{limit}}" can be filled; anything else
|
|
21
|
+
* yields no params.
|
|
22
|
+
*/
|
|
23
|
+
export declare function jobErrorParams(errorMessage: string | null): Record<string, string>;
|
|
24
|
+
/** "Kod: EXPORT_007, Hata: …" — only for a FAILED job (a retried job keeps its last code). */
|
|
25
|
+
export declare function jobErrorLine(t: TFunction, job: Pick<ExportJob, "status" | "errorCode" | "errorMessage">): string | null;
|
|
26
|
+
//# sourceMappingURL=exportJobText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportJobText.d.ts","sourceRoot":"","sources":["../../../src/components/export/exportJobText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9E;;;;GAIG;AAEH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,CAU/E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CAqB1H;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlF;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,WAAW,GAAG,cAAc,CAAC,GAAG,MAAM,GAAG,IAAI,CAIvH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ExportButton } from './ExportButton';
|
|
2
|
+
export type { ExportButtonProps } from './ExportButton';
|
|
3
|
+
export { ExportHistoryTable } from './ExportHistoryTable';
|
|
4
|
+
export type { ExportHistoryTableProps } from './ExportHistoryTable';
|
|
5
|
+
export { ExportJobStatusBadge } from './ExportJobStatusBadge';
|
|
6
|
+
export type { ExportJobStatusBadgeProps } from './ExportJobStatusBadge';
|
|
7
|
+
export { useExportJob } from './useExportJob';
|
|
8
|
+
export type { ExportJobPhase, ExportJobState, UseExportJobOptions, UseExportJobReturn } from './useExportJob';
|
|
9
|
+
export { EXPORT_JOBS_PATH, createExportJob, getExportJob, listExportJobs, cancelExportJob, downloadExportJob, fetchExportDownload, saveExportDownload, } from './exportJobApi';
|
|
10
|
+
export type { ExportDownload, ExportDownloadFetchResult, ExportDownloadResult } from './exportJobApi';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/export/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ApiError } from '../../adapters/types';
|
|
2
|
+
import { ExportJob, ExportJobCreateRequest } from '../../types/exportJob.types';
|
|
3
|
+
/**
|
|
4
|
+
* Where a started export stands.
|
|
5
|
+
*
|
|
6
|
+
* - `starting` — POST sent, no job yet.
|
|
7
|
+
* - `running` — job accepted, polled every `pollIntervalMs`.
|
|
8
|
+
* - `downloading` — COMPLETED, the file is being handed to the browser.
|
|
9
|
+
* - `done` — download started.
|
|
10
|
+
* - `background` — not finished by `waitMs`: the user takes it from the
|
|
11
|
+
* download history (and, later, the e-mail).
|
|
12
|
+
* - `failed` — refused at creation (`error`), or the job FAILED / EXPIRED
|
|
13
|
+
* (`job.errorCode` / `job.errorMessage`).
|
|
14
|
+
* - `cancelled` — cancelled by the user or by someone with `export.jobs.read.all`.
|
|
15
|
+
*/
|
|
16
|
+
export type ExportJobPhase = "idle" | "starting" | "running" | "downloading" | "done" | "background" | "failed" | "cancelled";
|
|
17
|
+
export interface ExportJobState {
|
|
18
|
+
phase: ExportJobPhase;
|
|
19
|
+
job?: ExportJob;
|
|
20
|
+
/** API refusal (creation, polling or download), when the job itself carries no reason. */
|
|
21
|
+
error?: ApiError;
|
|
22
|
+
}
|
|
23
|
+
export interface UseExportJobOptions {
|
|
24
|
+
/** Poll period. The platform's guidance is ~2 s; progress is not pushed. @default 2000 */
|
|
25
|
+
pollIntervalMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* How long the screen waits for the file before handing it to the download
|
|
28
|
+
* history. The platform's guidance is ~30 s. A HARD deadline: a poll answer
|
|
29
|
+
* that arrives later never starts a download — checked against the clock too,
|
|
30
|
+
* so a throttled (background-tab) timer cannot stretch it. @default 30000
|
|
31
|
+
*/
|
|
32
|
+
waitMs?: number;
|
|
33
|
+
/** Called on every phase change, after the state is set. */
|
|
34
|
+
onPhaseChange?: (state: ExportJobState) => void;
|
|
35
|
+
}
|
|
36
|
+
export interface UseExportJobReturn {
|
|
37
|
+
state: ExportJobState;
|
|
38
|
+
/** Starts an export. Ignored while one is in flight (`starting` / `running` / `downloading`). */
|
|
39
|
+
start: (request: ExportJobCreateRequest) => Promise<void>;
|
|
40
|
+
/** Asks the server to cancel the running job; the next poll reports the outcome. */
|
|
41
|
+
cancel: () => Promise<ApiError | undefined>;
|
|
42
|
+
/** Back to `idle` (stops polling and any pending download; the server-side job is NOT cancelled). */
|
|
43
|
+
reset: () => void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* One export from a list screen: create the job, poll it, download the file
|
|
47
|
+
* when it completes within `waitMs`, otherwise leave it to the download history.
|
|
48
|
+
*
|
|
49
|
+
* The flow is imperative on purpose (one job per click, a deadline, a single
|
|
50
|
+
* download side effect), so it lives in refs + timers rather than React Query —
|
|
51
|
+
* a query would refetch, retry and re-run the download on remount.
|
|
52
|
+
*
|
|
53
|
+
* Every async step re-checks its run before touching state or the browser, and
|
|
54
|
+
* the browser download is the very last step after that check (L-F05). The
|
|
55
|
+
* deadline is its own timer (L-F04); any unexpected throw ends the run as
|
|
56
|
+
* `failed` (L-F06). Unmount stops everything; the job keeps running on the
|
|
57
|
+
* server and shows up in the history.
|
|
58
|
+
*
|
|
59
|
+
* StrictMode's effect replay (cleanup + setup again in the same task) keeps
|
|
60
|
+
* the run instead of killing it: the replayed effect's `start()` is ignored
|
|
61
|
+
* while busy, so a killed run would leave the hook in `starting` for good
|
|
62
|
+
* (L-F15), and restarting would POST a second job.
|
|
63
|
+
*
|
|
64
|
+
* Anything slower counts as an unmount — including an `<Activity>` hidden for
|
|
65
|
+
* longer than a tick: the run ends (requests aborted, no download), the hook is
|
|
66
|
+
* back in `idle` and the job carries on in the history. Shown again it does not
|
|
67
|
+
* resume; a consumer that starts the export from an effect starts a NEW job
|
|
68
|
+
* then, exactly as on a real remount (L-F18).
|
|
69
|
+
*/
|
|
70
|
+
export declare function useExportJob({ pollIntervalMs, waitMs, onPhaseChange, }?: UseExportJobOptions): UseExportJobReturn;
|
|
71
|
+
//# sourceMappingURL=useExportJob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExportJob.d.ts","sourceRoot":"","sources":["../../../src/components/export/useExportJob.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE9H,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,cAAc,CAAC;IACtB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,CAAC;IACtB,iGAAiG;IACjG,KAAK,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,oFAAoF;IACpF,MAAM,EAAE,MAAM,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IAC5C,qGAAqG;IACrG,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAoCD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,cAAqB,EACrB,MAAc,EACd,aAAa,GACd,GAAE,mBAAwB,GAAG,kBAAkB,CAuK/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AstroConfigForm.d.ts","sourceRoot":"","sources":["../../../src/components/order-forms/AstroConfigForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AstroConfigForm.d.ts","sourceRoot":"","sources":["../../../src/components/order-forms/AstroConfigForm.tsx"],"names":[],"mappings":"AAyCA,UAAU,SAAS;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,SAAS,+BAuK/D"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
interface FormProps {
|
|
2
2
|
params: Record<string, string>;
|
|
3
|
-
|
|
3
|
+
/** `undefined` removes the key from the payload (see OrderCreateSheet `handleParamChange`). */
|
|
4
|
+
onChange: (key: string, value: string | undefined) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Directive picker options. OPTIONAL override — when omitted the form loads
|
|
7
|
+
* the directive catalogue itself (see `useDirectiveOptions`). `value` is the
|
|
8
|
+
* directive's `name` — the id the gateway knows it by.
|
|
9
|
+
*/
|
|
4
10
|
directiveOptions?: Array<{
|
|
5
11
|
value: string;
|
|
6
12
|
label: string;
|
|
7
13
|
}>;
|
|
8
14
|
}
|
|
9
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* DirectiveQueryForm — list the directives on the gateway, all or one.
|
|
17
|
+
*
|
|
18
|
+
* Wire: `{operation: "list"}` for "Tümü" (no `filter` — an empty filter's
|
|
19
|
+
* meaning is not specified), `{operation: "list", filter: {"id": name}}` for one
|
|
20
|
+
* directive. `operation` is what the handler sends anyway; it is also what makes
|
|
21
|
+
* "Tümü" a filled form (the sheet enables submit on a non-empty param).
|
|
22
|
+
*/
|
|
10
23
|
export declare function DirectiveQueryForm({ params, onChange, directiveOptions }: FormProps): import("react").JSX.Element;
|
|
11
24
|
/** DirectiveChangeForm — multi-select directives to push to modem (FIX-166/FIX-168) */
|
|
12
25
|
export declare function DirectiveChangeForm({ params, onChange }: FormProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DirectiveForms.d.ts","sourceRoot":"","sources":["../../../src/components/order-forms/DirectiveForms.tsx"],"names":[],"mappings":"AAQA,UAAU,SAAS;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"DirectiveForms.d.ts","sourceRoot":"","sources":["../../../src/components/order-forms/DirectiveForms.tsx"],"names":[],"mappings":"AAQA,UAAU,SAAS;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,+FAA+F;IAC/F,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3D;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5D;AAgGD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,SAAS,+BAqBnF;AAED,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,SAAS,+BA2ElE;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,SAAS,+BAmCrF"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
interface FormProps {
|
|
2
2
|
params: Record<string, string>;
|
|
3
|
-
|
|
3
|
+
/** `undefined` removes the key from the payload (see OrderCreateSheet `handleParamChange`). */
|
|
4
|
+
onChange: (key: string, value: string | undefined) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Firmware picker options. OPTIONAL override — when omitted the form loads the
|
|
7
|
+
* packages for the modem's brand/model itself (see `useFirmwareOptions`).
|
|
8
|
+
* `value` is the firmware's `versionName`; it becomes the `versionName` param.
|
|
9
|
+
*/
|
|
4
10
|
firmwareOptions?: Array<{
|
|
5
11
|
value: string;
|
|
6
12
|
label: string;
|
|
7
13
|
}>;
|
|
14
|
+
/** Modem whose brand/model selects the packages. Ignored when `firmwareOptions` is supplied. */
|
|
15
|
+
modemId?: number;
|
|
8
16
|
}
|
|
9
|
-
export declare function FirmwareUpdateForm({ params, onChange, firmwareOptions }: FormProps): import("react").JSX.Element;
|
|
17
|
+
export declare function FirmwareUpdateForm({ params, onChange, firmwareOptions, modemId }: FormProps): import("react").JSX.Element;
|
|
10
18
|
export {};
|
|
11
19
|
//# sourceMappingURL=FirmwareUpdateForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirmwareUpdateForm.d.ts","sourceRoot":"","sources":["../../../src/components/order-forms/FirmwareUpdateForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FirmwareUpdateForm.d.ts","sourceRoot":"","sources":["../../../src/components/order-forms/FirmwareUpdateForm.tsx"],"names":[],"mappings":"AASA,UAAU,SAAS;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,+FAA+F;IAC/F,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3D;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1D,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAiFD,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,EAAE,SAAS,+BA6C3F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ModemDetail } from '../../types/modem.types';
|
|
2
|
+
/**
|
|
3
|
+
* The modem detail query the order forms share (Astro: location + astroDefaults;
|
|
4
|
+
* Firmware: brand/model for the package list).
|
|
5
|
+
*
|
|
6
|
+
* ONE definition on purpose: both forms read the same cache entry
|
|
7
|
+
* (`queryKeys.modems.detail`), so they must agree on the cached shape — a
|
|
8
|
+
* second, slightly different queryFn under the same key would hand one form the
|
|
9
|
+
* other's data.
|
|
10
|
+
*/
|
|
11
|
+
export declare function modemDetailQuery(modemId: number | undefined): {
|
|
12
|
+
queryKey: readonly ["modems", "detail", number];
|
|
13
|
+
queryFn: () => Promise<ModemDetail | null>;
|
|
14
|
+
staleTime: number;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=modemDetailQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modemDetailQuery.d.ts","sourceRoot":"","sources":["../../../src/components/order-forms/modemDetailQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;;mBAGrC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;;;EAOjD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { api, MockAdapter, RealAdapter, setTokenProvider, configureApi } from './adapters';
|
|
2
2
|
export type { ApiConfig, ApiAdapter, ApiRequestOptions, ApiResponse, ApiError, FieldError, PageMeta, PageRequest, SearchRequest, FilterItem, } from './adapters';
|
|
3
|
-
export type { PermissionType, Permission, Role, Group, User, Session, LoginRequest, LoginResponse, RefreshResponse, LifecycleStatus, NetworkStatus, PowerStatus, TransportType, Modem, ModemDetail, ModemDetailBrandInfo, ModemDetailModelInfo, ModemDetailProtocolInfo, ModemDetailSimInfo, ModemDetailFirmwareInfo, ModemDetailLocationInfo, ModemAstroDefaultsInfo, OrderSuitabilityStatus, ModemOrderSuitability, ActiveOrdersByPriority, FirmwareHistoryEntry, ModemOutage, DigitalInput, RelayAssignment, IoStateHistory, RelayStateHistory, ModemCalendar, FieldIssue, FieldIssueType, FieldIssueSeverity, FieldIssueStatus, FieldIssueDetectedBy, RawData, RawDataContent, ModemStats, SignalTrendPoint, ModemHeatmapDay, EnergyStatus, ModemTimelineEvent, MeterStatus, MeterConnectionStatus, PhaseType, LpReadPeriod, Meter, MeterDetail, MeterDetailModelInfo, MeterDisconnectionInfo, AppliedReadingSetting, AppliedReadingSettingSource, ReadingSettingMissReason, MeterCommissioning, MeterCommissioningMissReason, MeterReading, MeterConsumptionPoint, MeterModemAssignment, MeterConnHistory, MeterLoadLimitHistory, MeterDisconnectionHistoryEntry, EnergyHistoryEvent, MeterStats, OrderStatus, OrderPriority, OrderCategory, OrderType, OrderStatusLog, Order, OrderCreateRequest, AlarmSeverity, AlarmCode, Alarm, TimelineSource, TimelineEventType, TimelineEvent, DashboardKpis, PipelineStats, HourlyThroughput, Notification, NotificationList, HeatmapDayStatus, HeatmapDay, HeatmapMonth, MapGroupHealth, CronExpression, SSEEvent, PipelineFunnelStage, ParseErrorEntry, SimOperator, SimOperatorRankingRow, IntegrationHealthRow, IntegrationMetricCode, OutageTrendHourBucket, SlaCityRow, SlaCitiesSlice, MapLayer, MapLayerValue, MapLayersSlice, SimcardStatus, GsmType, SimcardHistory, Simcard, SimcardKpi, SimcardSearchParams, Firmware, FirmwareKpi, FirmwareSearchParams, ProtocolType, Protocol, ProtocolSearchParams, DirectiveCategory, Directive, DirectiveSearchParams, ReadingSetting, ReadingSettingSearchParams, LocationLevel, GroupEntityType, GroupEntityCounts, LocationGroupNode, LocationGroupDetail, LocationGroupTree, LocationGroupCreateRequest, LocationGroupUpdateRequest, LocationGroupMoveRequest, GroupMember, VoltageType, ConnectionType, MeasureType, PhysicalInterface, PhysicalProperties, GatewayModel, MeterModel, GatewayModelSearchParams, MeterModelSearchParams, ObisMapping, ReadTemplate, LpTemplate, ReadTemplateSearchParams, LpTemplateSearchParams, ServerConfig, ApnConfig, WhitelistConfig, ServerConfigSearchParams, ApnConfigSearchParams, WhitelistConfigSearchParams, CalendarType, CalendarPriority, CalendarModemStatus, CalendarExecution, Calendar, CalendarKpi, CalendarSearchParams, UserStatus, UserListItem, UserSearchParams, UserCreateRequest, UserUpdateRequest, UserKpi, RoleListItem, RoleDetail, RolePermission, RoleCreateRequest, RolePermissionInput, Tag, TagCreateRequest, TagAssignRequest, TagAssignResponse, TagAssignEntityType, TagAssignAction, EnumValueType, ProductCode, EnumKeyPolicy, EnumValue, EnumListItem, EnumDetail, EnumCreateRequest, EnumUpdateRequest, ConfigValueType, ConfigValidationRule, ConfigOrigin, ConfigValue, ConfigListItem, ConfigDetail, ConfigResolveResult, ConfigCreateRequest, ConfigUpdateValueInput, ConfigUpdateRequest, MisfirePolicy, JobExecutionStatus, TriggerType, PeriodicJob, JobHistory, PeriodicJobDetail, PeriodicJobKpi, JobCreateRequest, JobUpdateRequest, JobSearchParams, NotificationSeverity, NotificationType, NotificationItem, NotificationSearchParams, NotificationListEnvelope, ActorType, AuditLogItem, AuditLogDetail, AuditLogSearchParams, BulkOperationStatus, BulkOperationItem, BulkOperationDetail, BulkOperationSearchParams, ImportEntityType, ImportRowStatus, ImportStep, ImportValidationResult, ImportPreviewRow, ImportExecuteRequest, ImportProgress, ImportResult, ExportItem, ExportSearchParams, DlqTopic, DlqMessage, DlqMessageDetail, DlqSearchParams, DlqReprocessRequest, DlqDeleteRequest, ServiceStatus, ConsumerGroupState, ServiceHealth, KafkaConsumerGroup, KafkaPartitionDetail, JvmMetrics, StorageMetrics, SystemMonitoringData, ApiStatsSummary, ApiStatsSummaryEnvelope, ApiStatsSearchParams, ApiLogItem, ApiLogDetail, ApiLogSearchParams, IntegrationType, IntegrationChannel, DeliveryStatus, IntegrationStatus, IntegrationDelivery, IntegrationDeliveryDetail, IntegrationDeliverySearchParams, LogLevel, LogEntry, LogSearchParams, } from './types';
|
|
3
|
+
export type { PermissionType, Permission, Role, Group, User, Session, LoginRequest, LoginResponse, RefreshResponse, LifecycleStatus, NetworkStatus, PowerStatus, TransportType, Modem, ModemDetail, ModemDetailBrandInfo, ModemDetailModelInfo, ModemDetailProtocolInfo, ModemDetailSimInfo, ModemDetailFirmwareInfo, ModemDetailLocationInfo, ModemAstroDefaultsInfo, OrderSuitabilityStatus, ModemOrderSuitability, ActiveOrdersByPriority, FirmwareHistoryEntry, ModemOutage, DigitalInput, RelayAssignment, IoStateHistory, RelayStateHistory, ModemCalendar, FieldIssue, FieldIssueType, FieldIssueSeverity, FieldIssueStatus, FieldIssueDetectedBy, RawData, RawDataContent, ModemStats, SignalTrendPoint, ModemHeatmapDay, EnergyStatus, ModemTimelineEvent, MeterStatus, MeterConnectionStatus, PhaseType, LpReadPeriod, Meter, MeterDetail, MeterDetailModelInfo, MeterDisconnectionInfo, AppliedReadingSetting, AppliedReadingSettingSource, ReadingSettingMissReason, MeterCommissioning, MeterCommissioningMissReason, MeterReading, MeterConsumptionPoint, MeterModemAssignment, MeterConnHistory, MeterLoadLimitHistory, MeterDisconnectionHistoryEntry, EnergyHistoryEvent, MeterStats, OrderStatus, OrderPriority, OrderCategory, OrderType, OrderStatusLog, Order, OrderCreateRequest, AlarmSeverity, AlarmCode, Alarm, TimelineSource, TimelineEventType, TimelineEvent, DashboardKpis, PipelineStats, HourlyThroughput, Notification, NotificationList, HeatmapDayStatus, HeatmapDay, HeatmapMonth, MapGroupHealth, CronExpression, SSEEvent, PipelineFunnelStage, ParseErrorEntry, SimOperator, SimOperatorRankingRow, IntegrationHealthRow, IntegrationMetricCode, OutageTrendHourBucket, SlaCityRow, SlaCitiesSlice, MapLayer, MapLayerValue, MapLayersSlice, SimcardStatus, GsmType, SimcardHistory, Simcard, SimcardKpi, SimcardSearchParams, Firmware, FirmwareOption, FirmwareKpi, FirmwareSearchParams, ProtocolType, Protocol, ProtocolSearchParams, DirectiveCategory, Directive, DirectiveSearchParams, ReadingSetting, ReadingSettingSearchParams, LocationLevel, GroupEntityType, GroupEntityCounts, LocationGroupNode, LocationGroupDetail, LocationGroupTree, LocationGroupCreateRequest, LocationGroupUpdateRequest, LocationGroupMoveRequest, GroupMember, VoltageType, ConnectionType, MeasureType, PhysicalInterface, PhysicalProperties, GatewayModel, MeterModel, GatewayModelSearchParams, MeterModelSearchParams, ObisMapping, ReadTemplate, LpTemplate, ReadTemplateSearchParams, LpTemplateSearchParams, ServerConfig, ApnConfig, WhitelistConfig, ServerConfigSearchParams, ApnConfigSearchParams, WhitelistConfigSearchParams, CalendarType, CalendarPriority, CalendarModemStatus, CalendarExecution, Calendar, CalendarKpi, CalendarSearchParams, UserStatus, UserListItem, UserSearchParams, UserCreateRequest, UserUpdateRequest, UserKpi, RoleListItem, RoleDetail, RolePermission, RoleCreateRequest, RolePermissionInput, Tag, TagCreateRequest, TagAssignRequest, TagAssignResponse, TagAssignEntityType, TagAssignAction, EnumValueType, ProductCode, EnumKeyPolicy, EnumValue, EnumListItem, EnumDetail, EnumCreateRequest, EnumUpdateRequest, ConfigValueType, ConfigValidationRule, ConfigOrigin, ConfigValue, ConfigListItem, ConfigDetail, ConfigResolveResult, ConfigCreateRequest, ConfigUpdateValueInput, ConfigUpdateRequest, MisfirePolicy, JobExecutionStatus, TriggerType, PeriodicJob, JobHistory, PeriodicJobDetail, PeriodicJobKpi, JobCreateRequest, JobUpdateRequest, JobSearchParams, NotificationSeverity, NotificationType, NotificationItem, NotificationSearchParams, NotificationListEnvelope, ActorType, AuditLogItem, AuditLogDetail, AuditLogSearchParams, BulkOperationStatus, BulkOperationItem, BulkOperationDetail, BulkOperationSearchParams, ImportEntityType, ImportRowStatus, ImportStep, ImportValidationResult, ImportPreviewRow, ImportExecuteRequest, ImportProgress, ImportResult, ExportItem, ExportSearchParams, DlqTopic, DlqMessage, DlqMessageDetail, DlqSearchParams, DlqReprocessRequest, DlqDeleteRequest, ServiceStatus, ConsumerGroupState, ServiceHealth, KafkaConsumerGroup, KafkaPartitionDetail, JvmMetrics, StorageMetrics, SystemMonitoringData, ApiStatsSummary, ApiStatsSummaryEnvelope, ApiStatsSearchParams, ApiLogItem, ApiLogDetail, ApiLogSearchParams, IntegrationType, IntegrationChannel, DeliveryStatus, IntegrationStatus, IntegrationDelivery, IntegrationDeliveryDetail, IntegrationDeliverySearchParams, LogLevel, LogEntry, LogSearchParams, } from './types';
|
|
4
4
|
export { ORDER_CATEGORY_MAP, ORDER_TYPE_LABELS, ORDER_CATEGORY_LABELS, METER_ORDER_CATEGORIES, MODEM_ORDER_CATEGORIES, TERMINAL_STATUSES, } from './types';
|
|
5
5
|
export type { AuditUserSummary, AuditOwnerId } from './types';
|
|
6
6
|
export type { UserAuthType, PermissionOrigin } from './types';
|
|
@@ -103,4 +103,7 @@ export { FormSection, FormFieldStack, FormFieldRow, FormSectionGroup, } from './
|
|
|
103
103
|
export type { FormSectionProps, FormFieldStackProps, FormFieldRowProps, FormSectionGroupProps, } from './components';
|
|
104
104
|
export { HourlyMonthGrid, HourStrip, HourlyGridLegend, } from './components';
|
|
105
105
|
export type { HourlyMonthGridProps, HourlyGridCell, HourlyGridRow, HourlyGridStatusColor, HourlyGridMarker, HourlyGridMarkerTone, HourStripProps, HourlyGridLegendProps, HourlyGridLegendItem, } from './components';
|
|
106
|
+
export { ExportButton, ExportHistoryTable, ExportJobStatusBadge, useExportJob, EXPORT_JOBS_PATH, createExportJob, getExportJob, listExportJobs, cancelExportJob, downloadExportJob, fetchExportDownload, saveExportDownload, } from './components/export';
|
|
107
|
+
export type { ExportButtonProps, ExportHistoryTableProps, ExportJobStatusBadgeProps, ExportJobPhase, ExportJobState, UseExportJobOptions, UseExportJobReturn, ExportDownload, ExportDownloadFetchResult, ExportDownloadResult, } from './components/export';
|
|
108
|
+
export type { ExportFormat, ExportColumn, ExportColumnType, ExportJobSource, ExportJobCreateRequest, ExportJobCreated, ExportJobStatus, ExportJob, ExportDownloadLink, ExportJobScope, } from './types/exportJob.types';
|
|
106
109
|
//# sourceMappingURL=index.d.ts.map
|