@jumoo/processing 17.4.2

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.
Files changed (121) hide show
  1. package/dist/api/client/client.gen.d.ts +2 -0
  2. package/dist/api/client/client.gen.js +235 -0
  3. package/dist/api/client/index.d.ts +8 -0
  4. package/dist/api/client/index.js +6 -0
  5. package/dist/api/client/types.gen.d.ts +117 -0
  6. package/dist/api/client/types.gen.js +2 -0
  7. package/dist/api/client/utils.gen.d.ts +33 -0
  8. package/dist/api/client/utils.gen.js +230 -0
  9. package/dist/api/client.gen.d.ts +12 -0
  10. package/dist/api/client.gen.js +4 -0
  11. package/dist/api/core/auth.gen.d.ts +18 -0
  12. package/dist/api/core/auth.gen.js +14 -0
  13. package/dist/api/core/bodySerializer.gen.d.ts +25 -0
  14. package/dist/api/core/bodySerializer.gen.js +57 -0
  15. package/dist/api/core/params.gen.d.ts +43 -0
  16. package/dist/api/core/params.gen.js +100 -0
  17. package/dist/api/core/pathSerializer.gen.d.ts +33 -0
  18. package/dist/api/core/pathSerializer.gen.js +106 -0
  19. package/dist/api/core/queryKeySerializer.gen.d.ts +18 -0
  20. package/dist/api/core/queryKeySerializer.gen.js +92 -0
  21. package/dist/api/core/serverSentEvents.gen.d.ts +71 -0
  22. package/dist/api/core/serverSentEvents.gen.js +133 -0
  23. package/dist/api/core/types.gen.d.ts +78 -0
  24. package/dist/api/core/types.gen.js +2 -0
  25. package/dist/api/core/utils.gen.d.ts +19 -0
  26. package/dist/api/core/utils.gen.js +87 -0
  27. package/dist/api/index.d.ts +3 -0
  28. package/dist/api/index.js +4 -0
  29. package/dist/api/sdk.gen.d.ts +39 -0
  30. package/dist/api/sdk.gen.js +118 -0
  31. package/dist/api/types.gen.d.ts +547 -0
  32. package/dist/api/types.gen.js +18 -0
  33. package/dist/constants.d.ts +1 -0
  34. package/dist/constants.js +8 -0
  35. package/dist/exports.d.ts +6 -0
  36. package/dist/exports.js +6 -0
  37. package/dist/external/signalr/index.d.ts +4 -0
  38. package/dist/external/signalr/index.js +4 -0
  39. package/dist/hey-api.d.ts +11 -0
  40. package/dist/hey-api.js +14 -0
  41. package/dist/index.d.ts +8 -0
  42. package/dist/index.js +12 -0
  43. package/dist/lang/files/en.d.ts +22 -0
  44. package/dist/lang/files/en.js +21 -0
  45. package/dist/lang/manifest.d.ts +1 -0
  46. package/dist/lang/manifest.js +11 -0
  47. package/dist/pipeline/components/background.element.d.ts +23 -0
  48. package/dist/pipeline/components/background.element.js +88 -0
  49. package/dist/pipeline/components/index.d.ts +6 -0
  50. package/dist/pipeline/components/index.js +6 -0
  51. package/dist/pipeline/components/pipeline-list.element.d.ts +32 -0
  52. package/dist/pipeline/components/pipeline-list.element.js +178 -0
  53. package/dist/pipeline/components/pipeline-table.element.d.ts +19 -0
  54. package/dist/pipeline/components/pipeline-table.element.js +149 -0
  55. package/dist/pipeline/components/process-error.element.d.ts +16 -0
  56. package/dist/pipeline/components/process-error.element.js +93 -0
  57. package/dist/pipeline/components/progress.element.d.ts +14 -0
  58. package/dist/pipeline/components/progress.element.js +177 -0
  59. package/dist/pipeline/components/progress.step.element.d.ts +15 -0
  60. package/dist/pipeline/components/progress.step.element.js +48 -0
  61. package/dist/pipeline/index.d.ts +8 -0
  62. package/dist/pipeline/index.js +8 -0
  63. package/dist/pipeline/modal/errors/error-modal.element.d.ts +13 -0
  64. package/dist/pipeline/modal/errors/error-modal.element.js +129 -0
  65. package/dist/pipeline/modal/errors/error-modal.token.d.ts +10 -0
  66. package/dist/pipeline/modal/errors/error-modal.token.js +8 -0
  67. package/dist/pipeline/modal/errors/index.d.ts +1 -0
  68. package/dist/pipeline/modal/errors/index.js +2 -0
  69. package/dist/pipeline/modal/errors/manifest.d.ts +1 -0
  70. package/dist/pipeline/modal/errors/manifest.js +7 -0
  71. package/dist/pipeline/modal/index.d.ts +2 -0
  72. package/dist/pipeline/modal/index.js +3 -0
  73. package/dist/pipeline/modal/manifest.d.ts +1 -0
  74. package/dist/pipeline/modal/manifest.js +8 -0
  75. package/dist/pipeline/modal/pipeline-modal.element.d.ts +20 -0
  76. package/dist/pipeline/modal/pipeline-modal.element.js +151 -0
  77. package/dist/pipeline/modal/pipeline-modal.token.d.ts +39 -0
  78. package/dist/pipeline/modal/pipeline-modal.token.js +38 -0
  79. package/dist/pipeline/pipeline.context.d.ts +53 -0
  80. package/dist/pipeline/pipeline.context.js +260 -0
  81. package/dist/pipeline/pipeline.element.d.ts +74 -0
  82. package/dist/pipeline/pipeline.element.js +260 -0
  83. package/dist/pipeline/pipeline.repository.d.ts +20 -0
  84. package/dist/pipeline/pipeline.repository.js +41 -0
  85. package/dist/pipeline/pipeline.source.d.ts +76 -0
  86. package/dist/pipeline/pipeline.source.js +79 -0
  87. package/dist/pipeline/pipelines.context.d.ts +12 -0
  88. package/dist/pipeline/pipelines.context.js +33 -0
  89. package/dist/pipeline/steps/index.d.ts +2 -0
  90. package/dist/pipeline/steps/index.js +2 -0
  91. package/dist/pipeline/steps/interfaces.d.ts +10 -0
  92. package/dist/pipeline/steps/interfaces.js +1 -0
  93. package/dist/pipeline/steps/models.d.ts +14 -0
  94. package/dist/pipeline/steps/models.js +24 -0
  95. package/dist/pipeline/workspace/manifest.d.ts +1 -0
  96. package/dist/pipeline/workspace/manifest.js +33 -0
  97. package/dist/pipeline/workspace/pipeline-workspace.context.d.ts +17 -0
  98. package/dist/pipeline/workspace/pipeline-workspace.context.js +58 -0
  99. package/dist/pipeline/workspace/pipeline-workspace.element.d.ts +6 -0
  100. package/dist/pipeline/workspace/pipeline-workspace.element.js +21 -0
  101. package/dist/pipeline/workspace/types.d.ts +6 -0
  102. package/dist/pipeline/workspace/types.js +10 -0
  103. package/dist/pipeline/workspace/views/default-pipeline-view.d.ts +20 -0
  104. package/dist/pipeline/workspace/views/default-pipeline-view.js +140 -0
  105. package/dist/queue/components/queue-list.element.d.ts +21 -0
  106. package/dist/queue/components/queue-list.element.js +72 -0
  107. package/dist/queue/components/queue-table.element.d.ts +24 -0
  108. package/dist/queue/components/queue-table.element.js +156 -0
  109. package/dist/queue/index.d.ts +3 -0
  110. package/dist/queue/index.js +3 -0
  111. package/dist/queue/queue.context.d.ts +13 -0
  112. package/dist/queue/queue.context.js +37 -0
  113. package/dist/queue/queue.repository.d.ts +10 -0
  114. package/dist/queue/queue.repository.js +32 -0
  115. package/dist/signalr/index.d.ts +2 -0
  116. package/dist/signalr/index.js +2 -0
  117. package/dist/signalr/signalr.context.d.ts +24 -0
  118. package/dist/signalr/signalr.context.js +99 -0
  119. package/dist/signalr/types.d.ts +12 -0
  120. package/dist/signalr/types.js +1 -0
  121. package/package.json +51 -0
@@ -0,0 +1,11 @@
1
+ const localizations = [
2
+ {
3
+ type: 'localization',
4
+ alias: 'Jumoo.Processing.Localization.En',
5
+ name: 'Jumoo Processing translations(en)',
6
+ weight: 0,
7
+ meta: { culture: 'en' },
8
+ js: () => import('./files/en.js'),
9
+ },
10
+ ];
11
+ export const manifests = [...localizations];
@@ -0,0 +1,23 @@
1
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
2
+ import { ProcessingMessage } from '../../signalr';
3
+ import { PipelineBackgroundState, PipelineState, ProcessingOptions } from '@jumoo/processing';
4
+ export declare class JumooPipelineBackgroundElement extends UmbLitElement {
5
+ pipelineId: string | undefined;
6
+ message: ProcessingMessage | undefined;
7
+ state: PipelineState | undefined;
8
+ background: PipelineBackgroundState | null | undefined;
9
+ _options: ProcessingOptions | undefined;
10
+ render(): import("lit-html").TemplateResult<1>;
11
+ private renderBackgroundBanner;
12
+ private renderProgress;
13
+ private renderComplete;
14
+ private renderError;
15
+ private renderElement;
16
+ static styles: import("lit").CSSResult;
17
+ }
18
+ export default JumooPipelineBackgroundElement;
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ 'jumoo-pipeline-background': JumooPipelineBackgroundElement;
22
+ }
23
+ }
@@ -0,0 +1,88 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { css, customElement, html, property } from '@umbraco-cms/backoffice/external/lit';
8
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
9
+ import { PipelineStatus, } from '@jumoo/processing';
10
+ let JumooPipelineBackgroundElement = class JumooPipelineBackgroundElement extends UmbLitElement {
11
+ render() {
12
+ switch (this.state?.status) {
13
+ case PipelineStatus.COMPLETED:
14
+ return this.renderComplete();
15
+ case PipelineStatus.FAILED:
16
+ return this.renderError();
17
+ default:
18
+ return html `${this.renderBackgroundBanner()} ${this.renderProgress()}`;
19
+ }
20
+ }
21
+ renderBackgroundBanner() {
22
+ return html `<uui-box class="banner">
23
+ <umb-localize key="jumooProcBackground_running"></umb-localize>
24
+ </uui-box>`;
25
+ }
26
+ renderProgress() {
27
+ return html `<jumoo-pipeline-progress
28
+ .progress=${this.state?.progress}
29
+ .message=${this.message}></jumoo-pipeline-progress>`;
30
+ }
31
+ renderComplete() {
32
+ return !this.background?.completedElement
33
+ ? html `<uui-box
34
+ ><umb-localize key="jumooProcBackground_completed"></umb-localize
35
+ ></uui-box>
36
+ <pre>${JSON.stringify(this.state, null, 1)}</pre>`
37
+ : html `${this.renderElement(this.background.completedElement)}`;
38
+ }
39
+ renderError() {
40
+ return !this.background?.failedElement
41
+ ? html `<uui-box
42
+ ><umb-localize key="jumooProcBackground_error"></umb-localize
43
+ ></uui-box>
44
+ <pre>${JSON.stringify(this.state, null, 1)}</pre>`
45
+ : html `${this.renderElement(this.background.failedElement)}`;
46
+ }
47
+ renderElement(element) {
48
+ return html `<umb-extension-slot
49
+ type="jumoo-process-step"
50
+ .filter=${(ext) => ext.elementName === element}
51
+ .props=${{
52
+ pipelineId: this.pipelineId,
53
+ state: this.state,
54
+ options: this._options,
55
+ }}></umb-extension-slot>`;
56
+ }
57
+ };
58
+ JumooPipelineBackgroundElement.styles = css `
59
+ :host {
60
+ display: flex;
61
+ flex-direction: column;
62
+ height: 100%;
63
+ }
64
+
65
+ .banner {
66
+ background-color: var(--uui-color-current);
67
+ }
68
+ `;
69
+ __decorate([
70
+ property({ type: String })
71
+ ], JumooPipelineBackgroundElement.prototype, "pipelineId", void 0);
72
+ __decorate([
73
+ property({ type: Object })
74
+ ], JumooPipelineBackgroundElement.prototype, "message", void 0);
75
+ __decorate([
76
+ property({ type: Object })
77
+ ], JumooPipelineBackgroundElement.prototype, "state", void 0);
78
+ __decorate([
79
+ property({ type: Object })
80
+ ], JumooPipelineBackgroundElement.prototype, "background", void 0);
81
+ __decorate([
82
+ property({ type: Object })
83
+ ], JumooPipelineBackgroundElement.prototype, "_options", void 0);
84
+ JumooPipelineBackgroundElement = __decorate([
85
+ customElement('jumoo-pipeline-background')
86
+ ], JumooPipelineBackgroundElement);
87
+ export { JumooPipelineBackgroundElement };
88
+ export default JumooPipelineBackgroundElement;
@@ -0,0 +1,6 @@
1
+ export * from './progress.element.js';
2
+ export * from './background.element.js';
3
+ export * from './progress.step.element.js';
4
+ export * from './process-error.element.js';
5
+ export * from './pipeline-table.element.js';
6
+ export * from './pipeline-list.element.js';
@@ -0,0 +1,6 @@
1
+ export * from './progress.element.js';
2
+ export * from './background.element.js';
3
+ export * from './progress.step.element.js';
4
+ export * from './process-error.element.js';
5
+ export * from './pipeline-table.element.js';
6
+ export * from './pipeline-list.element.js';
@@ -0,0 +1,32 @@
1
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
2
+ import { Pipeline, PipelineStatus } from '../../api';
3
+ export declare class JumooProcessingPipelineList extends UmbLitElement {
4
+ #private;
5
+ headline: string;
6
+ hideDelete: boolean;
7
+ defaultStatus: PipelineStatus;
8
+ statuses: PipelineStatus[];
9
+ _modalPath: string;
10
+ status: PipelineStatus | undefined;
11
+ pipelines?: Pipeline[];
12
+ loading: boolean;
13
+ constructor();
14
+ connectedCallback(): void;
15
+ _setupModalController(): void;
16
+ getPipelines(): Promise<void>;
17
+ onViewPipeline(e: CustomEvent): void;
18
+ onDeletePipeline(e: CustomEvent): Promise<void>;
19
+ onStatusChange(e: Event): Promise<void>;
20
+ render(): import("lit-html").TemplateResult<1>;
21
+ renderRefresh(): import("lit-html").TemplateResult<1>;
22
+ renderDropdown(): import("lit-html").TemplateResult<1>;
23
+ renderListPipelines(): import("lit-html").TemplateResult<1>;
24
+ renderPipeline(pipeline: Pipeline): import("lit-html").TemplateResult<1>;
25
+ static styles: import("lit").CSSResult;
26
+ }
27
+ export default JumooProcessingPipelineList;
28
+ declare global {
29
+ interface HTMLElementTagNameMap {
30
+ 'jumoo-pipeline-list': JumooProcessingPipelineList;
31
+ }
32
+ }
@@ -0,0 +1,178 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8
+ if (kind === "m") throw new TypeError("Private method is not writable");
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12
+ };
13
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
16
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17
+ };
18
+ var _JumooProcessingPipelineList_pipelinesContext, _JumooProcessingPipelineList_modalController;
19
+ import { css, customElement, html, property, state, when, } from '@umbraco-cms/backoffice/external/lit';
20
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
21
+ import { UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/router';
22
+ import { JUMOO_PIPELINE_WORKSPACE_MODAL, JUMOO_PROCESSING_PIPELINE_ENTITY_TYPE, } from '../workspace/types';
23
+ import { JUMOO_PIPELINES_CONTEXT } from '../pipelines.context';
24
+ import { PipelineStatus } from '../../api';
25
+ let JumooProcessingPipelineList = class JumooProcessingPipelineList extends UmbLitElement {
26
+ constructor() {
27
+ super();
28
+ _JumooProcessingPipelineList_pipelinesContext.set(this, void 0);
29
+ _JumooProcessingPipelineList_modalController.set(this, void 0);
30
+ this.headline = 'Processing Pipelines';
31
+ this.hideDelete = false;
32
+ this.defaultStatus = PipelineStatus.WAITING;
33
+ this.statuses = [
34
+ PipelineStatus.WAITING,
35
+ PipelineStatus.RUNNING,
36
+ PipelineStatus.COMPLETED,
37
+ PipelineStatus.FAILED,
38
+ ];
39
+ this._modalPath = '';
40
+ this.status = PipelineStatus.WAITING;
41
+ this.loading = true;
42
+ this.consumeContext(JUMOO_PIPELINES_CONTEXT, (context) => {
43
+ __classPrivateFieldSet(this, _JumooProcessingPipelineList_pipelinesContext, context, "f");
44
+ });
45
+ this._setupModalController();
46
+ }
47
+ connectedCallback() {
48
+ super.connectedCallback();
49
+ this.status = this.defaultStatus;
50
+ this.getPipelines();
51
+ }
52
+ _setupModalController() {
53
+ __classPrivateFieldSet(this, _JumooProcessingPipelineList_modalController, new UmbModalRouteRegistrationController(this, JUMOO_PIPELINE_WORKSPACE_MODAL)
54
+ .addAdditionalPath(JUMOO_PROCESSING_PIPELINE_ENTITY_TYPE)
55
+ .onSetup(() => {
56
+ return {
57
+ data: {
58
+ entityType: JUMOO_PROCESSING_PIPELINE_ENTITY_TYPE,
59
+ preset: {},
60
+ },
61
+ };
62
+ })
63
+ .onSubmit(async () => {
64
+ await this.getPipelines();
65
+ })
66
+ .onReject(async () => {
67
+ await this.getPipelines();
68
+ })
69
+ .observeRouteBuilder((routeBuilder) => {
70
+ this._modalPath = routeBuilder({});
71
+ }), "f");
72
+ }
73
+ async getPipelines() {
74
+ this.loading = true;
75
+ this.pipelines = await __classPrivateFieldGet(this, _JumooProcessingPipelineList_pipelinesContext, "f")?.listPipelines(this.status ?? PipelineStatus.WAITING);
76
+ this.loading = false;
77
+ }
78
+ onViewPipeline(e) {
79
+ __classPrivateFieldGet(this, _JumooProcessingPipelineList_modalController, "f").open({ alias: e.detail.piplineId }, 'edit/' + e.detail.piplineId);
80
+ }
81
+ async onDeletePipeline(e) {
82
+ await __classPrivateFieldGet(this, _JumooProcessingPipelineList_pipelinesContext, "f")?.clear(e.detail.piplineId);
83
+ this.getPipelines();
84
+ }
85
+ async onStatusChange(e) {
86
+ const element = e.target;
87
+ if (!element)
88
+ return;
89
+ this.status = element.value;
90
+ await this.getPipelines();
91
+ }
92
+ render() {
93
+ return html `<uui-box style="--uui-box-default-padding: 0;" .headline=${this.headline}>
94
+ <div slot="header-actions">
95
+ Status: ${this.renderDropdown()} ${this.renderRefresh()}
96
+ </div>
97
+ ${when(this.loading, () => html `<uui-loader-bar
98
+ animationDuration="1.5"
99
+ style="color: black"></uui-loader-bar>`, () => this.renderListPipelines())}
100
+ </uui-box>`;
101
+ }
102
+ renderRefresh() {
103
+ return html `<uui-button @click=${this.getPipelines} label="refresh" compact
104
+ ><uui-icon name="icon-refresh"></uui-icon
105
+ ></uui-button>`;
106
+ }
107
+ renderDropdown() {
108
+ const options = this.statuses.map((status) => {
109
+ return {
110
+ name: status,
111
+ value: status,
112
+ selected: status === this.status,
113
+ };
114
+ });
115
+ return options.length <= 1
116
+ ? html `${this.status}`
117
+ : html `
118
+ <uui-select
119
+ .options=${options}
120
+ @change=${this.onStatusChange}
121
+ label="status"></uui-select>
122
+ `;
123
+ }
124
+ renderListPipelines() {
125
+ return !this.pipelines || this.pipelines.length === 0
126
+ ? html `<div class="emtpy">Nothing with status ${this.status}</div>`
127
+ : html `<jumoo-pipelines-table
128
+ .pipelines=${this.pipelines}
129
+ .hideDelete=${this.hideDelete}
130
+ @view-pipeline=${this.onViewPipeline}
131
+ @delete-pipeline=${this.onDeletePipeline}></jumoo-pipelines-table>`;
132
+ }
133
+ renderPipeline(pipeline) {
134
+ return html `
135
+ <div>${pipeline.alias}</div>
136
+ <div>${pipeline.state.status}</div>
137
+ <div>${pipeline.state.currentRequest?.action?.alias}</div>
138
+ `;
139
+ }
140
+ };
141
+ _JumooProcessingPipelineList_pipelinesContext = new WeakMap();
142
+ _JumooProcessingPipelineList_modalController = new WeakMap();
143
+ JumooProcessingPipelineList.styles = css `
144
+ .emtpy {
145
+ display: flex;
146
+ justify-content: center;
147
+ padding: var(--uui-size-space-5);
148
+ }
149
+ `;
150
+ __decorate([
151
+ property({ type: String })
152
+ ], JumooProcessingPipelineList.prototype, "headline", void 0);
153
+ __decorate([
154
+ property({ type: Boolean })
155
+ ], JumooProcessingPipelineList.prototype, "hideDelete", void 0);
156
+ __decorate([
157
+ property({ type: String })
158
+ ], JumooProcessingPipelineList.prototype, "defaultStatus", void 0);
159
+ __decorate([
160
+ property({ type: Array })
161
+ ], JumooProcessingPipelineList.prototype, "statuses", void 0);
162
+ __decorate([
163
+ state()
164
+ ], JumooProcessingPipelineList.prototype, "_modalPath", void 0);
165
+ __decorate([
166
+ state()
167
+ ], JumooProcessingPipelineList.prototype, "status", void 0);
168
+ __decorate([
169
+ state()
170
+ ], JumooProcessingPipelineList.prototype, "pipelines", void 0);
171
+ __decorate([
172
+ state()
173
+ ], JumooProcessingPipelineList.prototype, "loading", void 0);
174
+ JumooProcessingPipelineList = __decorate([
175
+ customElement('jumoo-pipeline-list')
176
+ ], JumooProcessingPipelineList);
177
+ export { JumooProcessingPipelineList };
178
+ export default JumooProcessingPipelineList;
@@ -0,0 +1,19 @@
1
+ import { Pipeline } from '@jumoo/processing';
2
+ import { UmbTableColumn, UmbTableConfig } from '@umbraco-cms/backoffice/components';
3
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
4
+ export declare class JumooPipelinesTableElement extends UmbLitElement {
5
+ #private;
6
+ pipelines: Pipeline[];
7
+ hideDelete: boolean;
8
+ _tableConfig: UmbTableConfig;
9
+ tableColumns: UmbTableColumn[];
10
+ filter: any;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ renderActions(pipeline: Pipeline): import("lit-html").TemplateResult<1>;
13
+ }
14
+ export default JumooPipelinesTableElement;
15
+ declare global {
16
+ interface HTMLElementTagNameMap {
17
+ 'jumoo-pipelines-table': JumooPipelinesTableElement;
18
+ }
19
+ }
@@ -0,0 +1,149 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _JumooPipelinesTableElement_instances, _JumooPipelinesTableElement_onViewPipeline, _JumooPipelinesTableElement_onDeletePipeline;
13
+ import { ProcessingTimeOptions } from '@jumoo/processing';
14
+ import { customElement, html, property, state, when, } from '@umbraco-cms/backoffice/external/lit';
15
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
16
+ let JumooPipelinesTableElement = class JumooPipelinesTableElement extends UmbLitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ _JumooPipelinesTableElement_instances.add(this);
20
+ this.pipelines = [];
21
+ this.hideDelete = false;
22
+ this._tableConfig = {
23
+ allowSelection: false,
24
+ hideIcon: false,
25
+ };
26
+ this.tableColumns = [
27
+ { name: 'Alias', alias: 'alias' },
28
+ { name: 'Strategy', alias: 'strategy' },
29
+ { name: 'State', alias: 'state' },
30
+ { name: 'Action', alias: 'action' },
31
+ { name: 'Background', alias: 'background' },
32
+ { name: 'Scheduled', alias: 'scheduled' },
33
+ { name: 'Actions', alias: 'actions' },
34
+ ];
35
+ }
36
+ render() {
37
+ const items = this.pipelines
38
+ .map((pipeline) => {
39
+ if (!pipeline)
40
+ return undefined;
41
+ return {
42
+ id: pipeline.id,
43
+ icon: 'icon-layers',
44
+ data: [
45
+ {
46
+ columnAlias: 'alias',
47
+ value: pipeline.alias,
48
+ },
49
+ {
50
+ columnAlias: 'strategy',
51
+ value: pipeline.strategy,
52
+ },
53
+ {
54
+ columnAlias: 'state',
55
+ value: pipeline.state.status,
56
+ },
57
+ {
58
+ columnAlias: 'action',
59
+ value: pipeline.state.currentRequest?.action?.alias ?? 'no action',
60
+ },
61
+ {
62
+ columnAlias: 'background',
63
+ value: html `<umb-icon
64
+ .name=${when((pipeline.state.backgroundState?.isBackgroundRequest ?? false) == true, () => 'icon-check', () => 'icon-close')}></umb-icon>`,
65
+ },
66
+ {
67
+ columnAlias: 'scheduled',
68
+ value: !pipeline.state.schedule
69
+ ? ''
70
+ : this.localize.date(pipeline.state.schedule, ProcessingTimeOptions),
71
+ },
72
+ {
73
+ columnAlias: 'actions',
74
+ value: html `${this.renderActions(pipeline)}`,
75
+ },
76
+ ],
77
+ };
78
+ })
79
+ .filter((item) => item !== undefined);
80
+ return html `
81
+ <umb-table
82
+ .config=${this._tableConfig}
83
+ .columns=${this.tableColumns}
84
+ .items=${items}
85
+ .filter=${this.filter}></umb-table>
86
+ `;
87
+ }
88
+ renderActions(pipeline) {
89
+ return html `<uui-button-group
90
+ ><uui-button
91
+ .id=${pipeline.id}
92
+ label="View"
93
+ color="positive"
94
+ look="outline"
95
+ @click=${__classPrivateFieldGet(this, _JumooPipelinesTableElement_instances, "m", _JumooPipelinesTableElement_onViewPipeline)}
96
+ >View</uui-button
97
+ >
98
+ ${this.hideDelete
99
+ ? ''
100
+ : html `<uui-button
101
+ label="Delete"
102
+ color="danger"
103
+ look="outline"
104
+ @click=${() => __classPrivateFieldGet(this, _JumooPipelinesTableElement_instances, "m", _JumooPipelinesTableElement_onDeletePipeline).call(this, pipeline.id)}
105
+ >Delete</uui-button
106
+ >`}</uui-button-group
107
+ >`;
108
+ }
109
+ };
110
+ _JumooPipelinesTableElement_instances = new WeakSet();
111
+ _JumooPipelinesTableElement_onViewPipeline = function _JumooPipelinesTableElement_onViewPipeline(e) {
112
+ const element = e.target;
113
+ if (!element)
114
+ return;
115
+ this.dispatchEvent(new CustomEvent('view-pipeline', {
116
+ composed: true,
117
+ detail: {
118
+ piplineId: element.id,
119
+ },
120
+ }));
121
+ };
122
+ _JumooPipelinesTableElement_onDeletePipeline = function _JumooPipelinesTableElement_onDeletePipeline(id) {
123
+ this.dispatchEvent(new CustomEvent('delete-pipeline', {
124
+ composed: true,
125
+ detail: {
126
+ piplineId: id,
127
+ },
128
+ }));
129
+ };
130
+ __decorate([
131
+ property({ type: Array })
132
+ ], JumooPipelinesTableElement.prototype, "pipelines", void 0);
133
+ __decorate([
134
+ property({ type: Boolean })
135
+ ], JumooPipelinesTableElement.prototype, "hideDelete", void 0);
136
+ __decorate([
137
+ state()
138
+ ], JumooPipelinesTableElement.prototype, "_tableConfig", void 0);
139
+ __decorate([
140
+ property({ type: Array })
141
+ ], JumooPipelinesTableElement.prototype, "tableColumns", void 0);
142
+ __decorate([
143
+ state()
144
+ ], JumooPipelinesTableElement.prototype, "filter", void 0);
145
+ JumooPipelinesTableElement = __decorate([
146
+ customElement('jumoo-pipelines-table')
147
+ ], JumooPipelinesTableElement);
148
+ export { JumooPipelinesTableElement };
149
+ export default JumooPipelinesTableElement;
@@ -0,0 +1,16 @@
1
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
2
+ import { ProcessingErrorDetails } from '@jumoo/processing';
3
+ import { nothing } from '@umbraco-cms/backoffice/external/lit';
4
+ export declare class JumooProcessingErrorElement extends UmbLitElement {
5
+ #private;
6
+ error: ProcessingErrorDetails | undefined | null;
7
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
8
+ renderError(error: ProcessingErrorDetails): import("lit-html").TemplateResult<1>;
9
+ static styles: import("lit").CSSResult;
10
+ }
11
+ export default JumooProcessingErrorElement;
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'jumoo-processing-error': JumooProcessingErrorElement;
15
+ }
16
+ }
@@ -0,0 +1,93 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _JumooProcessingErrorElement_instances, _JumooProcessingErrorElement_openErrorModal;
13
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
14
+ import { JUMOO_PROCESSING_ERROR_MODAL } from '@jumoo/processing';
15
+ import { css, customElement, html, nothing, property, } from '@umbraco-cms/backoffice/external/lit';
16
+ import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
17
+ let JumooProcessingErrorElement = class JumooProcessingErrorElement extends UmbLitElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ _JumooProcessingErrorElement_instances.add(this);
21
+ }
22
+ render() {
23
+ return !this.error ? nothing : this.renderError(this.error);
24
+ }
25
+ renderError(error) {
26
+ return html `<div class="error">
27
+ <div class="header">
28
+ <uui-icon name="icon-wrong"></uui-icon>
29
+ <h3>${error.message}</h3>
30
+ </div>
31
+ <div class="more">
32
+ <uui-button @click=${__classPrivateFieldGet(this, _JumooProcessingErrorElement_instances, "m", _JumooProcessingErrorElement_openErrorModal)} look="primary" color="danger"
33
+ ><umb-localize key="jumooProcError_details"></umb-localize
34
+ ></uui-button>
35
+ </div>
36
+ </div>`;
37
+ }
38
+ };
39
+ _JumooProcessingErrorElement_instances = new WeakSet();
40
+ _JumooProcessingErrorElement_openErrorModal = async function _JumooProcessingErrorElement_openErrorModal() {
41
+ if (!this.error)
42
+ return;
43
+ const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
44
+ if (!modalManager)
45
+ return;
46
+ const errorModal = modalManager.open(this, JUMOO_PROCESSING_ERROR_MODAL, {
47
+ data: {
48
+ error: this.error,
49
+ },
50
+ });
51
+ const result = await errorModal.onSubmit().catch(() => {
52
+ // ignore
53
+ });
54
+ return result;
55
+ };
56
+ JumooProcessingErrorElement.styles = css `
57
+ .error {
58
+ padding: 0;
59
+ background-color: var(--uui-color-danger);
60
+ color: var(--uui-color-default-contrast);
61
+ }
62
+
63
+ .error .header {
64
+ display: flex;
65
+ gap: var(--uui-size-space-2);
66
+ align-items: center;
67
+ padding: var(--uui-size-space-2);
68
+ border-bottom: 1px solid var(--uui-color-default-contrast);
69
+ }
70
+
71
+ h3 {
72
+ padding: 0;
73
+ margin: 0;
74
+ overflow: auto;
75
+ }
76
+
77
+ uui-icon {
78
+ font-size: var(--uui-type-h3-size);
79
+ }
80
+
81
+ .error .more {
82
+ padding: var(--uui-size-space-3);
83
+ text-align: right;
84
+ }
85
+ `;
86
+ __decorate([
87
+ property({ type: Object })
88
+ ], JumooProcessingErrorElement.prototype, "error", void 0);
89
+ JumooProcessingErrorElement = __decorate([
90
+ customElement('jumoo-processing-error')
91
+ ], JumooProcessingErrorElement);
92
+ export { JumooProcessingErrorElement };
93
+ export default JumooProcessingErrorElement;
@@ -0,0 +1,14 @@
1
+ import { nothing } from '@umbraco-cms/backoffice/external/lit';
2
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
3
+ import { ProcessingMessage, ProgressInformation } from '@jumoo/processing';
4
+ export declare class JumooPipelineProgressElement extends UmbLitElement {
5
+ progress: ProgressInformation | undefined;
6
+ message: ProcessingMessage | undefined;
7
+ showPercentage: boolean;
8
+ private _lastKnownProgress;
9
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
10
+ private getLastKnownProgress;
11
+ private renderMessages;
12
+ static styles: import("lit").CSSResult;
13
+ }
14
+ export default JumooPipelineProgressElement;