@pimcore/studio-ui-bundle 1.0.0-canary.20251121-085212-a3c953c → 1.0.0-canary.20251121-102646-131d77c

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.
@@ -42,4 +42,5 @@ export declare const selectAll: (state: Record<string, any>) => AbstractJob[], s
42
42
  topics: import("../../types/non-empty-array").NonEmptyArray<typeof import("./topics").topics[string]>;
43
43
  config: unknown;
44
44
  onRetry?: (() => void | Promise<void>) | undefined;
45
+ onCustomizeJobView?: ((context: import("./notification/job/job-view").JobViewCustomizationContext) => void) | undefined;
45
46
  };
@@ -9,6 +9,7 @@
9
9
  */
10
10
  import { type NonEmptyArray } from '@Pimcore/types/non-empty-array';
11
11
  import { type topics } from '../topics';
12
+ import { type JobViewCustomizationContext } from '../notification/job/job-view';
12
13
  export declare enum JobStatus {
13
14
  QUEUED = "queued",
14
15
  RUNNING = "running",
@@ -25,4 +26,5 @@ export interface AbstractJob {
25
26
  topics: NonEmptyArray<(typeof topics)[string]>;
26
27
  config: unknown;
27
28
  onRetry?: () => void | Promise<void>;
29
+ onCustomizeJobView?: (context: JobViewCustomizationContext) => void;
28
30
  }
@@ -0,0 +1,32 @@
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
+ import { type BaseJobConfig } from '../../message-handlers/default-job-handler';
12
+ export interface AbstractBatchEditJobConfig extends BaseJobConfig {
13
+ assetContextId: number;
14
+ }
15
+ export interface AbstractBatchEditJobOptions {
16
+ title: string;
17
+ assetContextId: number;
18
+ refreshGrid: () => Promise<void>;
19
+ onFinish?: () => Promise<void>;
20
+ }
21
+ export declare abstract class AbstractBatchEditJob implements JobInterface {
22
+ protected readonly title: string;
23
+ protected readonly assetContextId: number;
24
+ protected readonly onFinish?: () => Promise<void>;
25
+ protected readonly refreshGrid: () => Promise<void>;
26
+ constructor(options: AbstractBatchEditJobOptions);
27
+ run(options: JobRunOptions): Promise<void>;
28
+ protected abstract executeEditRequest(): Promise<string | number | null>;
29
+ protected getJobConfig(): AbstractBatchEditJobConfig;
30
+ protected handleCompletion(): Promise<void>;
31
+ protected handleJobFailure(error: any): Promise<void>;
32
+ }
@@ -0,0 +1,22 @@
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 { AbstractBatchEditJob, type AbstractBatchEditJobOptions } from './abstract-batch-edit-job';
11
+ export interface AssetBatchEditJobOptions extends AbstractBatchEditJobOptions {
12
+ patchAssets: (args: any) => Promise<any>;
13
+ selectedRowsIds: number[];
14
+ patches: any[];
15
+ }
16
+ export declare class AssetBatchEditJob extends AbstractBatchEditJob {
17
+ private readonly patchAssets;
18
+ private readonly selectedRowsIds;
19
+ private readonly patches;
20
+ constructor(options: AssetBatchEditJobOptions);
21
+ protected executeEditRequest(): Promise<string | number | null>;
22
+ }
@@ -0,0 +1,24 @@
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 { AbstractBatchEditJob, type AbstractBatchEditJobOptions } from './abstract-batch-edit-job';
11
+ export interface AssetFolderBatchEditJobOptions extends AbstractBatchEditJobOptions {
12
+ patchAssetsInFolder: (args: any) => Promise<any>;
13
+ folderId: number;
14
+ patches: any[];
15
+ filters: any;
16
+ }
17
+ export declare class AssetFolderBatchEditJob extends AbstractBatchEditJob {
18
+ private readonly patchAssetsInFolder;
19
+ private readonly folderId;
20
+ private readonly patches;
21
+ private readonly filters;
22
+ constructor(options: AssetFolderBatchEditJobOptions);
23
+ protected executeEditRequest(): Promise<string | number | null>;
24
+ }
@@ -0,0 +1,22 @@
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 { AbstractBatchEditJob, type AbstractBatchEditJobOptions } from './abstract-batch-edit-job';
11
+ export interface DataObjectBatchEditJobOptions extends AbstractBatchEditJobOptions {
12
+ patchObjectsByIds: (args: any) => Promise<any>;
13
+ selectedRowsIds: number[];
14
+ values: any;
15
+ }
16
+ export declare class DataObjectBatchEditJob extends AbstractBatchEditJob {
17
+ private readonly patchObjectsByIds;
18
+ private readonly selectedRowsIds;
19
+ private readonly values;
20
+ constructor(options: DataObjectBatchEditJobOptions);
21
+ protected executeEditRequest(): Promise<string | number | null>;
22
+ }
@@ -0,0 +1,26 @@
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 { AbstractBatchEditJob, type AbstractBatchEditJobOptions } from './abstract-batch-edit-job';
11
+ export interface DataObjectFolderBatchEditJobOptions extends AbstractBatchEditJobOptions {
12
+ patchObjectsInFolder: (args: any) => Promise<any>;
13
+ folderId: number;
14
+ values: any;
15
+ filters: any;
16
+ classId: string;
17
+ }
18
+ export declare class DataObjectFolderBatchEditJob extends AbstractBatchEditJob {
19
+ private readonly patchObjectsInFolder;
20
+ private readonly folderId;
21
+ private readonly values;
22
+ private readonly filters;
23
+ private readonly classId;
24
+ constructor(options: DataObjectFolderBatchEditJobOptions);
25
+ protected executeEditRequest(): Promise<string | number | null>;
26
+ }
@@ -10,6 +10,7 @@
10
10
  import { AbstractMessageHandler } from '../../../modules/global-message-bus/message-handlers/abstract-message-handler';
11
11
  import { type AbstractMercureMessage } from '../../../modules/background-processor/process/abstract-mercure-process';
12
12
  import { JobStatus, type AbstractJob } from '../../../modules/execution-engine/jobs/abstact-job';
13
+ import { type JobViewCustomizationContext } from '../../../modules/execution-engine/notification/job/job-view';
13
14
  /**
14
15
  * Default job handler that provides common functionality for job management, Redux integration, status mapping, and progress handling
15
16
  * Can be used directly or extended by specific job handlers
@@ -21,6 +22,7 @@ export declare class DefaultJobHandler<TConfig extends BaseJobConfig> extends Ab
21
22
  protected readonly jobType: string;
22
23
  protected readonly onJobCompletion?: (data: JobCompletionData) => void | Promise<void>;
23
24
  protected readonly onRetry?: () => void | Promise<void>;
25
+ protected readonly onCustomizeJobView?: (context: JobViewCustomizationContext) => void;
24
26
  private lastProgressValue;
25
27
  private readonly throttledProgressUpdate;
26
28
  constructor(options: DefaultJobHandlerOptions<TConfig>);
@@ -59,4 +61,5 @@ export interface DefaultJobHandlerOptions<TConfig extends BaseJobConfig> {
59
61
  jobType?: string;
60
62
  onJobCompletion?: (data: JobCompletionData) => void | Promise<void>;
61
63
  onRetry?: () => void | Promise<void>;
64
+ onCustomizeJobView?: (context: JobViewCustomizationContext) => void;
62
65
  }
@@ -13,6 +13,11 @@ 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
+ }
16
21
  export interface JobViewProps extends JobProps {
17
22
  successButtonActions?: ButtonAction[];
18
23
  failureButtonActions?: ButtonAction[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pimcore/studio-ui-bundle",
3
- "version": "1.0.0-canary.20251121-085212-a3c953c",
3
+ "version": "1.0.0-canary.20251121-102646-131d77c",
4
4
  "keywords": [
5
5
  "pimcore",
6
6
  "pimcore-studio-ui"
@@ -1,25 +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 BatchEditJob extends AbstractJob {
12
- type: 'batch-edit';
13
- config: {
14
- assetContextId: number;
15
- };
16
- refreshGrid: () => Promise<void>;
17
- }
18
- export interface BatchEditFactoryArgs {
19
- action: AbstractJob['action'];
20
- title: AbstractJob['title'];
21
- topics: AbstractJob['topics'];
22
- assetContextId: number;
23
- refreshGrid: () => Promise<void>;
24
- }
25
- export declare const createJob: (job: BatchEditFactoryArgs) => BatchEditJob;
@@ -1,17 +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 BatchEditJob } from '../../../../modules/execution-engine/jobs/batch-edit/factory';
13
- export interface BatchEditProps extends JobProps {
14
- config: BatchEditJob['config'];
15
- refreshGrid: () => Promise<void>;
16
- }
17
- export declare const NotificationJobContainer: (props: BatchEditProps) => React.JSX.Element;