@pimcore/studio-ui-bundle 1.0.0-canary.20251121-163300-6565c10 → 1.0.0-canary.20251124-102916-b6b6d77
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/build/types/src/core/modules/execution-engine/execution-engine-slice.d.ts +0 -5
- package/dist/build/types/src/core/modules/execution-engine/jobs/abstact-job.d.ts +0 -8
- package/dist/build/types/src/core/modules/execution-engine/jobs/batch-delete/abstract-batch-delete-job.d.ts +0 -5
- package/dist/build/types/src/core/modules/execution-engine/jobs/batch-edit/abstract-batch-edit-job.d.ts +0 -5
- package/dist/build/types/src/core/modules/execution-engine/jobs/clone/abstract-clone-job.d.ts +0 -6
- package/dist/build/types/src/core/modules/execution-engine/jobs/clone/notification-job-container.d.ts +1 -5
- package/dist/build/types/src/core/modules/execution-engine/jobs/delete/element-delete-job.d.ts +0 -6
- package/dist/build/types/src/core/modules/execution-engine/jobs/recycle-bin/recycle-bin-delete-job.d.ts +0 -5
- package/dist/build/types/src/core/modules/execution-engine/jobs/recycle-bin/recycle-bin-restore-job.d.ts +0 -5
- package/dist/build/types/src/core/modules/execution-engine/jobs/search-replace-assignments/search-replace-assignments-job.d.ts +0 -6
- package/dist/build/types/src/core/modules/execution-engine/jobs/tag-assign/tag-assign-job.d.ts +0 -6
- package/dist/build/types/src/core/modules/execution-engine/jobs/zip-upload/zip-upload-job.d.ts +21 -0
- package/dist/build/types/src/core/modules/execution-engine/message-handlers/message-bus-job/message-bus-job-handler.d.ts +71 -0
- package/dist/build/types/src/core/modules/execution-engine/message-handlers/message-bus-job/message-bus-job-notification.d.ts +20 -0
- package/dist/build/types/src/core/modules/execution-engine/notification/job/job-view.d.ts +1 -6
- package/package.json +1 -1
- package/dist/build/types/src/core/modules/execution-engine/jobs/default/factory.d.ts +0 -20
- package/dist/build/types/src/core/modules/execution-engine/jobs/default/notification-job-container-message-bus.d.ts +0 -16
- package/dist/build/types/src/core/modules/execution-engine/jobs/default/notification-job-container.d.ts +0 -12
- package/dist/build/types/src/core/modules/execution-engine/jobs/zip-upload/factory.d.ts +0 -23
- package/dist/build/types/src/core/modules/execution-engine/jobs/zip-upload/notification-job-container.d.ts +0 -16
- package/dist/build/types/src/core/modules/execution-engine/message-handlers/default-job-handler.d.ts +0 -65
- package/dist/build/types/src/core/modules/execution-engine/message-handlers/step-based-progress-job-handler.d.ts +0 -16
|
@@ -35,12 +35,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<import("@reduxjs/to
|
|
|
35
35
|
export declare const jobReceived: import("@reduxjs/toolkit").ActionCreatorWithPayload<AbstractJob, "execution-engine/jobReceived">, jobUpdated: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("@reduxjs/toolkit").Update<AbstractJob, number>, "execution-engine/jobUpdated">, jobDeleted: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "execution-engine/jobDeleted">;
|
|
36
36
|
export declare const selectAll: (state: Record<string, any>) => AbstractJob[], selectById: (state: Record<string, any>, id: number) => {
|
|
37
37
|
id: number;
|
|
38
|
-
action: () => Promise<number>;
|
|
39
38
|
type: string;
|
|
40
39
|
title: string;
|
|
41
40
|
status: import("./jobs/abstact-job").JobStatus;
|
|
42
|
-
topics: import("../../types/non-empty-array").NonEmptyArray<typeof import("./topics").topics[string]>;
|
|
43
|
-
config: unknown;
|
|
44
|
-
onRetry?: (() => void | Promise<void>) | undefined;
|
|
45
|
-
onCustomizeJobView?: ((context: import("./notification/job/job-view").JobViewCustomizationContext) => void) | undefined;
|
|
46
41
|
};
|
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
8
|
* @license Pimcore Open Core License (POCL)
|
|
9
9
|
*/
|
|
10
|
-
import { type NonEmptyArray } from '@Pimcore/types/non-empty-array';
|
|
11
|
-
import { type topics } from '../topics';
|
|
12
|
-
import { type JobViewCustomizationContext } from '../notification/job/job-view';
|
|
13
10
|
export declare enum JobStatus {
|
|
14
11
|
QUEUED = "queued",
|
|
15
12
|
RUNNING = "running",
|
|
@@ -19,12 +16,7 @@ export declare enum JobStatus {
|
|
|
19
16
|
}
|
|
20
17
|
export interface AbstractJob {
|
|
21
18
|
id: number;
|
|
22
|
-
action: () => Promise<number>;
|
|
23
19
|
type: string;
|
|
24
20
|
title: string;
|
|
25
21
|
status: JobStatus;
|
|
26
|
-
topics: NonEmptyArray<(typeof topics)[string]>;
|
|
27
|
-
config: unknown;
|
|
28
|
-
onRetry?: () => void | Promise<void>;
|
|
29
|
-
onCustomizeJobView?: (context: JobViewCustomizationContext) => void;
|
|
30
22
|
}
|
|
@@ -8,10 +8,6 @@
|
|
|
8
8
|
* @license Pimcore Open Core License (POCL)
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
12
|
-
export interface AbstractBatchDeleteJobConfig extends BaseJobConfig {
|
|
13
|
-
itemIds: number[];
|
|
14
|
-
}
|
|
15
11
|
export interface AbstractBatchDeleteJobOptions {
|
|
16
12
|
itemIds: number[];
|
|
17
13
|
title: string;
|
|
@@ -24,7 +20,6 @@ export declare abstract class AbstractBatchDeleteJob implements JobInterface {
|
|
|
24
20
|
constructor(options: AbstractBatchDeleteJobOptions);
|
|
25
21
|
run(options: JobRunOptions): Promise<void>;
|
|
26
22
|
protected abstract executeDeleteRequest(): Promise<string | number | null>;
|
|
27
|
-
protected getJobConfig(): AbstractBatchDeleteJobConfig;
|
|
28
23
|
protected handleCompletion(): Promise<void>;
|
|
29
24
|
protected handleJobFailure(error: any): Promise<void>;
|
|
30
25
|
}
|
|
@@ -8,10 +8,6 @@
|
|
|
8
8
|
* @license Pimcore Open Core License (POCL)
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
12
|
-
export interface AbstractBatchEditJobConfig extends BaseJobConfig {
|
|
13
|
-
assetContextId: number;
|
|
14
|
-
}
|
|
15
11
|
export interface AbstractBatchEditJobOptions {
|
|
16
12
|
title: string;
|
|
17
13
|
assetContextId: number;
|
|
@@ -26,7 +22,6 @@ export declare abstract class AbstractBatchEditJob implements JobInterface {
|
|
|
26
22
|
constructor(options: AbstractBatchEditJobOptions);
|
|
27
23
|
run(options: JobRunOptions): Promise<void>;
|
|
28
24
|
protected abstract executeEditRequest(): Promise<string | number | null>;
|
|
29
|
-
protected getJobConfig(): AbstractBatchEditJobConfig;
|
|
30
25
|
protected handleCompletion(): Promise<void>;
|
|
31
26
|
protected handleJobFailure(error: any): Promise<void>;
|
|
32
27
|
}
|
package/dist/build/types/src/core/modules/execution-engine/jobs/clone/abstract-clone-job.d.ts
CHANGED
|
@@ -9,11 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
11
|
import { type ElementType } from '../../../../types/enums/element/element-type';
|
|
12
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
13
|
-
export interface AbstractCloneJobConfig extends BaseJobConfig {
|
|
14
|
-
parentFolderId: number;
|
|
15
|
-
parentFolderType: ElementType;
|
|
16
|
-
}
|
|
17
12
|
export interface AbstractCloneJobOptions {
|
|
18
13
|
sourceId: number;
|
|
19
14
|
targetId: number;
|
|
@@ -32,7 +27,6 @@ export declare abstract class AbstractCloneJob implements JobInterface {
|
|
|
32
27
|
constructor(options: AbstractCloneJobOptions);
|
|
33
28
|
run(options: JobRunOptions): Promise<void>;
|
|
34
29
|
protected abstract executeCloneRequest(): Promise<string | number | null>;
|
|
35
|
-
protected getJobConfig(): AbstractCloneJobConfig;
|
|
36
30
|
protected handleCompletion(): Promise<void>;
|
|
37
31
|
protected handleJobFailure(error: any): Promise<void>;
|
|
38
32
|
}
|
|
@@ -9,8 +9,4 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { type JobProps } from '../../../../modules/execution-engine/notification/job/job';
|
|
12
|
-
|
|
13
|
-
export interface CloneJobProps extends JobProps {
|
|
14
|
-
config: AbstractCloneJobConfig;
|
|
15
|
-
}
|
|
16
|
-
export declare const NotificationJobContainer: (props: CloneJobProps) => React.JSX.Element;
|
|
12
|
+
export declare const NotificationJobContainer: (props: JobProps) => React.JSX.Element;
|
package/dist/build/types/src/core/modules/execution-engine/jobs/delete/element-delete-job.d.ts
CHANGED
|
@@ -9,11 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
11
|
import { type ElementType } from '../../../../types/enums/element/element-type';
|
|
12
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
13
|
-
export interface DeleteJobConfig extends BaseJobConfig {
|
|
14
|
-
elementType: ElementType;
|
|
15
|
-
parentFolderId?: number;
|
|
16
|
-
}
|
|
17
12
|
export interface DeleteJobOptions {
|
|
18
13
|
elementId: number;
|
|
19
14
|
elementType: ElementType;
|
|
@@ -32,7 +27,6 @@ export declare class DeleteJob implements JobInterface {
|
|
|
32
27
|
constructor(options: DeleteJobOptions);
|
|
33
28
|
run(options: JobRunOptions): Promise<void>;
|
|
34
29
|
private executeDeleteRequest;
|
|
35
|
-
private getJobConfig;
|
|
36
30
|
private handleCompletion;
|
|
37
31
|
private handleJobFailure;
|
|
38
32
|
}
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
11
|
import { type ElementType } from '../../../../types/enums/element/element-type';
|
|
12
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
13
|
-
export interface RecycleBinDeleteJobConfig extends BaseJobConfig {
|
|
14
|
-
elementTypes: ElementType[];
|
|
15
|
-
}
|
|
16
12
|
export interface RecycleBinDeleteJobOptions {
|
|
17
13
|
itemIds: number[];
|
|
18
14
|
elementTypes: ElementType[];
|
|
@@ -27,7 +23,6 @@ export declare class RecycleBinDeleteJob implements JobInterface {
|
|
|
27
23
|
constructor(options: RecycleBinDeleteJobOptions);
|
|
28
24
|
run(options: JobRunOptions): Promise<void>;
|
|
29
25
|
private executeDeleteRequest;
|
|
30
|
-
private getJobConfig;
|
|
31
26
|
private handleCompletion;
|
|
32
27
|
private handleJobFailure;
|
|
33
28
|
}
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
11
|
import { type ElementType } from '../../../../types/enums/element/element-type';
|
|
12
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
13
|
-
export interface RecycleBinRestoreJobConfig extends BaseJobConfig {
|
|
14
|
-
elementTypes: ElementType[];
|
|
15
|
-
}
|
|
16
12
|
export interface RecycleBinRestoreJobOptions {
|
|
17
13
|
itemIds: number[];
|
|
18
14
|
elementTypes: ElementType[];
|
|
@@ -27,7 +23,6 @@ export declare class RecycleBinRestoreJob implements JobInterface {
|
|
|
27
23
|
constructor(options: RecycleBinRestoreJobOptions);
|
|
28
24
|
run(options: JobRunOptions): Promise<void>;
|
|
29
25
|
private executeRestoreRequest;
|
|
30
|
-
private getJobConfig;
|
|
31
26
|
private handleCompletion;
|
|
32
27
|
private handleJobFailure;
|
|
33
28
|
}
|
|
@@ -9,12 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
11
|
import { type ElementType } from '../../../../types/enums/element/element-type';
|
|
12
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
13
12
|
import { type ElementUsageBaseItem } from '../../../../modules/element/search-replace-assignments/usage-api-slice-enhanced';
|
|
14
|
-
export interface SearchReplaceAssignmentsJobConfig extends BaseJobConfig {
|
|
15
|
-
sourceElementType: ElementType;
|
|
16
|
-
sourceElementId: number;
|
|
17
|
-
}
|
|
18
13
|
export interface SearchReplaceAssignmentsJobOptions {
|
|
19
14
|
sourceElementType: ElementType;
|
|
20
15
|
sourceElementId: number;
|
|
@@ -35,7 +30,6 @@ export declare class SearchReplaceAssignmentsJob implements JobInterface {
|
|
|
35
30
|
constructor(options: SearchReplaceAssignmentsJobOptions);
|
|
36
31
|
run(options: JobRunOptions): Promise<void>;
|
|
37
32
|
private executeReplaceRequest;
|
|
38
|
-
private getJobConfig;
|
|
39
33
|
private handleCompletion;
|
|
40
34
|
private handleJobFailure;
|
|
41
35
|
}
|
package/dist/build/types/src/core/modules/execution-engine/jobs/tag-assign/tag-assign-job.d.ts
CHANGED
|
@@ -9,12 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
11
|
import { type ElementType } from '../../../../types/enums/element/element-type';
|
|
12
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
13
12
|
import { type TagBatchOperationToElementsByTypeAndIdApiArg } from '../../../../modules/element/editor/shared-tab-manager/tabs/tags/tags-api-slice-enhanced';
|
|
14
|
-
export interface TagAssignJobConfig extends BaseJobConfig {
|
|
15
|
-
elementType: ElementType;
|
|
16
|
-
elementId: number;
|
|
17
|
-
}
|
|
18
13
|
export interface TagAssignJobOptions {
|
|
19
14
|
elementType: ElementType;
|
|
20
15
|
elementId: number;
|
|
@@ -29,6 +24,5 @@ export declare class TagAssignJob implements JobInterface {
|
|
|
29
24
|
constructor(options: TagAssignJobOptions);
|
|
30
25
|
run(options: JobRunOptions): Promise<void>;
|
|
31
26
|
private executeRequest;
|
|
32
|
-
private getJobConfig;
|
|
33
27
|
private handleJobFailure;
|
|
34
28
|
}
|
package/dist/build/types/src/core/modules/execution-engine/jobs/zip-upload/zip-upload-job.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { type JobInterface, type JobRunOptions } from '../job-interface';
|
|
11
|
+
export interface ZipUploadJobOptions {
|
|
12
|
+
title: string;
|
|
13
|
+
triggerUpload: (options: any) => void;
|
|
14
|
+
parentFolder: string;
|
|
15
|
+
onJobCompletion?: () => void | Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare class ZipUploadJob implements JobInterface {
|
|
18
|
+
private readonly options;
|
|
19
|
+
constructor(options: ZipUploadJobOptions);
|
|
20
|
+
run(options: JobRunOptions): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import { AbstractMessageHandler } from '../../../../modules/global-message-bus/message-handlers/abstract-message-handler';
|
|
11
|
+
import { type AbstractMercureMessage } from '../../../../modules/background-processor/process/abstract-mercure-process';
|
|
12
|
+
import { JobStatus, type AbstractJob } from '../../../../modules/execution-engine/jobs/abstact-job';
|
|
13
|
+
import { type JobButtonCustomizationContext } from './message-bus-job-notification';
|
|
14
|
+
/**
|
|
15
|
+
* Default job handler that provides common functionality for job management, Redux integration, status mapping, and progress handling
|
|
16
|
+
* Can be used directly or extended by specific job handlers
|
|
17
|
+
*/
|
|
18
|
+
export declare class MessageBusJobHandler extends AbstractMessageHandler {
|
|
19
|
+
private jobRunId;
|
|
20
|
+
private job;
|
|
21
|
+
private readonly onJobCompletion?;
|
|
22
|
+
private readonly onRetry?;
|
|
23
|
+
private readonly onCustomizeButtons?;
|
|
24
|
+
private currentStep;
|
|
25
|
+
private readonly totalSteps?;
|
|
26
|
+
private lastProgressValue;
|
|
27
|
+
private readonly title;
|
|
28
|
+
private readonly throttledProgressUpdate;
|
|
29
|
+
constructor(options: MessageBusJobHandlerOptions);
|
|
30
|
+
shouldHandle(message: AbstractMercureMessage): boolean;
|
|
31
|
+
getId(): string | number;
|
|
32
|
+
onRegister(): void;
|
|
33
|
+
handleMessage(message: AbstractMercureMessage): Promise<void>;
|
|
34
|
+
onUnregister(): void;
|
|
35
|
+
private getTitle;
|
|
36
|
+
/**
|
|
37
|
+
* Calculate progress percent from message data
|
|
38
|
+
* Handles both step-based progress (if totalSteps > 1) and direct progress values (0-100)
|
|
39
|
+
*/
|
|
40
|
+
private calculateProgress;
|
|
41
|
+
private handleJobCompletion;
|
|
42
|
+
private getJob;
|
|
43
|
+
private createJob;
|
|
44
|
+
private updateJob;
|
|
45
|
+
private transitionToChildJob;
|
|
46
|
+
private handleStatusUpdate;
|
|
47
|
+
private handleProgressUpdate;
|
|
48
|
+
private performProgressUpdate;
|
|
49
|
+
}
|
|
50
|
+
export interface MessageBusJob extends AbstractJob {
|
|
51
|
+
progress?: number;
|
|
52
|
+
currentStep?: number;
|
|
53
|
+
totalSteps?: number;
|
|
54
|
+
onRetry?: () => void | Promise<void>;
|
|
55
|
+
onCustomizeButtons?: (context: JobButtonCustomizationContext) => void;
|
|
56
|
+
}
|
|
57
|
+
export interface JobCompletionData {
|
|
58
|
+
isSuccessful: boolean;
|
|
59
|
+
isFinished: boolean;
|
|
60
|
+
isFailed: boolean;
|
|
61
|
+
status: JobStatus;
|
|
62
|
+
payload: any;
|
|
63
|
+
}
|
|
64
|
+
export interface MessageBusJobHandlerOptions {
|
|
65
|
+
jobRunId: string | number;
|
|
66
|
+
title: string | ((job: MessageBusJob) => string);
|
|
67
|
+
totalSteps?: number;
|
|
68
|
+
onJobCompletion?: (data: JobCompletionData) => void | Promise<void>;
|
|
69
|
+
onRetry?: () => void | Promise<void>;
|
|
70
|
+
onCustomizeButtons?: (context: JobButtonCustomizationContext) => void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This source file is available under the terms of the
|
|
3
|
+
* Pimcore Open Core License (POCL)
|
|
4
|
+
* Full copyright and license information is available in
|
|
5
|
+
* LICENSE.md which is distributed with this source code.
|
|
6
|
+
*
|
|
7
|
+
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
+
* @license Pimcore Open Core License (POCL)
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { type ButtonAction } from '../../../../modules/execution-engine/notification/job/job-view';
|
|
12
|
+
import { type MessageBusJob } from './message-bus-job-handler';
|
|
13
|
+
export interface JobButtonCustomizationContext {
|
|
14
|
+
addSuccessButton: (action: ButtonAction, position?: 'start' | 'end') => void;
|
|
15
|
+
addFinishedWithErrorsButton: (action: ButtonAction, position?: 'start' | 'end') => void;
|
|
16
|
+
addFailureButton: (action: ButtonAction, position?: 'start' | 'end') => void;
|
|
17
|
+
}
|
|
18
|
+
export interface MessageBusJobProps extends MessageBusJob {
|
|
19
|
+
}
|
|
20
|
+
export declare const MessageBusJobNotification: (props: MessageBusJobProps) => React.JSX.Element;
|
|
@@ -13,17 +13,12 @@ export interface ButtonAction {
|
|
|
13
13
|
label: string;
|
|
14
14
|
handler: () => void | Promise<void>;
|
|
15
15
|
}
|
|
16
|
-
export interface JobViewCustomizationContext {
|
|
17
|
-
addSuccessButton: (action: ButtonAction, position?: 'start' | 'end') => void;
|
|
18
|
-
addFinishedWithErrorsButton: (action: ButtonAction, position?: 'start' | 'end') => void;
|
|
19
|
-
addFailureButton: (action: ButtonAction, position?: 'start' | 'end') => void;
|
|
20
|
-
}
|
|
21
16
|
export interface JobViewProps extends JobProps {
|
|
22
17
|
successButtonActions?: ButtonAction[];
|
|
23
18
|
failureButtonActions?: ButtonAction[];
|
|
24
19
|
finishedWithErrorsButtonActions?: ButtonAction[];
|
|
25
20
|
progress: number;
|
|
26
|
-
|
|
21
|
+
currentStep?: number;
|
|
27
22
|
totalSteps?: number;
|
|
28
23
|
}
|
|
29
24
|
export declare const JobView: (props: JobViewProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import { type AbstractJob } from '../abstact-job';
|
|
11
|
-
export interface DefaultJob extends AbstractJob {
|
|
12
|
-
type: 'default';
|
|
13
|
-
config: undefined;
|
|
14
|
-
}
|
|
15
|
-
export interface DefaultJobFactoryArgs {
|
|
16
|
-
action: AbstractJob['action'];
|
|
17
|
-
title: AbstractJob['title'];
|
|
18
|
-
topics: AbstractJob['topics'];
|
|
19
|
-
}
|
|
20
|
-
export declare const createJob: (job: DefaultJobFactoryArgs) => DefaultJob;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { type JobProps } from '../../../../modules/execution-engine/notification/job/job';
|
|
12
|
-
import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
|
|
13
|
-
export interface MessageBusJobProps extends JobProps {
|
|
14
|
-
config: BaseJobConfig;
|
|
15
|
-
}
|
|
16
|
-
export declare const NotificationJobContainer: (props: MessageBusJobProps) => React.JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { type JobProps } from '../../notification/job/job';
|
|
12
|
-
export declare const NotificationJobContainer: (props: JobProps) => React.JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import { type AbstractJob } from '../abstact-job';
|
|
11
|
-
export interface ZipUploadJob extends AbstractJob {
|
|
12
|
-
type: 'zip-upload';
|
|
13
|
-
config: {
|
|
14
|
-
parentFolder: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export interface ZipUploadFactoryArgs {
|
|
18
|
-
action: AbstractJob['action'];
|
|
19
|
-
title: AbstractJob['title'];
|
|
20
|
-
topics: AbstractJob['topics'];
|
|
21
|
-
parentFolder: string;
|
|
22
|
-
}
|
|
23
|
-
export declare const createJob: (job: ZipUploadFactoryArgs) => ZipUploadJob;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { type JobProps } from '../../notification/job/job';
|
|
12
|
-
import { type ZipUploadJob } from './factory';
|
|
13
|
-
export interface ZipUploadJobProps extends JobProps {
|
|
14
|
-
config: ZipUploadJob['config'];
|
|
15
|
-
}
|
|
16
|
-
export declare const NotificationJobContainer: (props: ZipUploadJobProps) => React.JSX.Element;
|
package/dist/build/types/src/core/modules/execution-engine/message-handlers/default-job-handler.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import { AbstractMessageHandler } from '../../../modules/global-message-bus/message-handlers/abstract-message-handler';
|
|
11
|
-
import { type AbstractMercureMessage } from '../../../modules/background-processor/process/abstract-mercure-process';
|
|
12
|
-
import { JobStatus, type AbstractJob } from '../../../modules/execution-engine/jobs/abstact-job';
|
|
13
|
-
import { type JobViewCustomizationContext } from '../../../modules/execution-engine/notification/job/job-view';
|
|
14
|
-
/**
|
|
15
|
-
* Default job handler that provides common functionality for job management, Redux integration, status mapping, and progress handling
|
|
16
|
-
* Can be used directly or extended by specific job handlers
|
|
17
|
-
*/
|
|
18
|
-
export declare class DefaultJobHandler<TConfig extends BaseJobConfig> extends AbstractMessageHandler {
|
|
19
|
-
protected readonly jobRunId: string | number;
|
|
20
|
-
protected job: AbstractJob | null;
|
|
21
|
-
protected readonly config: TConfig;
|
|
22
|
-
protected readonly jobType: string;
|
|
23
|
-
protected readonly onJobCompletion?: (data: JobCompletionData) => void | Promise<void>;
|
|
24
|
-
protected readonly onRetry?: () => void | Promise<void>;
|
|
25
|
-
protected readonly onCustomizeJobView?: (context: JobViewCustomizationContext) => void;
|
|
26
|
-
private lastProgressValue;
|
|
27
|
-
private readonly throttledProgressUpdate;
|
|
28
|
-
constructor(options: DefaultJobHandlerOptions<TConfig>);
|
|
29
|
-
/**
|
|
30
|
-
* Calculate progress from message data
|
|
31
|
-
* Default implementation handles direct progress values (0-100)
|
|
32
|
-
* Override in subclasses for different progress formats (e.g., step-based)
|
|
33
|
-
*/
|
|
34
|
-
protected calculateProgress(data: any): number | null;
|
|
35
|
-
protected handleJobCompletion(data: JobCompletionData): Promise<void>;
|
|
36
|
-
shouldHandle(message: AbstractMercureMessage): boolean;
|
|
37
|
-
getId(): string | number;
|
|
38
|
-
protected getJob(): AbstractJob;
|
|
39
|
-
protected createJob(): AbstractJob;
|
|
40
|
-
onRegister(): void;
|
|
41
|
-
handleMessage(message: AbstractMercureMessage): Promise<void>;
|
|
42
|
-
private handleStatusUpdate;
|
|
43
|
-
private handleProgressUpdate;
|
|
44
|
-
private performProgressUpdate;
|
|
45
|
-
onUnregister(): void;
|
|
46
|
-
}
|
|
47
|
-
export interface BaseJobConfig {
|
|
48
|
-
title: string;
|
|
49
|
-
progress?: number;
|
|
50
|
-
}
|
|
51
|
-
export interface JobCompletionData {
|
|
52
|
-
isSuccessful: boolean;
|
|
53
|
-
isFinished: boolean;
|
|
54
|
-
isFailed: boolean;
|
|
55
|
-
status: JobStatus;
|
|
56
|
-
payload: any;
|
|
57
|
-
}
|
|
58
|
-
export interface DefaultJobHandlerOptions<TConfig extends BaseJobConfig> {
|
|
59
|
-
jobRunId: string | number;
|
|
60
|
-
config: TConfig;
|
|
61
|
-
jobType?: string;
|
|
62
|
-
onJobCompletion?: (data: JobCompletionData) => void | Promise<void>;
|
|
63
|
-
onRetry?: () => void | Promise<void>;
|
|
64
|
-
onCustomizeJobView?: (context: JobViewCustomizationContext) => void;
|
|
65
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source file is available under the terms of the
|
|
3
|
-
* Pimcore Open Core License (POCL)
|
|
4
|
-
* Full copyright and license information is available in
|
|
5
|
-
* LICENSE.md which is distributed with this source code.
|
|
6
|
-
*
|
|
7
|
-
* @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)
|
|
8
|
-
* @license Pimcore Open Core License (POCL)
|
|
9
|
-
*/
|
|
10
|
-
import { DefaultJobHandler, type BaseJobConfig } from './default-job-handler';
|
|
11
|
-
/**
|
|
12
|
-
* Progress job handler that converts step-based progress (currentStep/totalSteps) to percentage
|
|
13
|
-
*/
|
|
14
|
-
export declare class StepBasedProgressJobHandler<TConfig extends BaseJobConfig> extends DefaultJobHandler<TConfig> {
|
|
15
|
-
protected calculateProgress(data: any): number | null;
|
|
16
|
-
}
|