@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,58 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ 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");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
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 _JumooProcessingPipelineWorkspaceContext_respository, _JumooProcessingPipelineWorkspaceContext_data;
13
+ import { UmbEditableWorkspaceContextBase, } from '@umbraco-cms/backoffice/workspace';
14
+ import { UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
15
+ import { PipelineRepository } from '@jumoo/processing';
16
+ import { JUMOO_PROCESSING_PIPELINE_ENTITY_TYPE, JUMOO_PROCESSING_PIPELINE_WORKSPACE_ALIAS, } from './types';
17
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
18
+ import JumppProcessingPipelineWorkspaceElement from './pipeline-workspace.element';
19
+ export class JumooProcessingPipelineWorkspaceContext extends UmbEditableWorkspaceContextBase {
20
+ constructor(host) {
21
+ super(host, JUMOO_PROCESSING_PIPELINE_WORKSPACE_ALIAS);
22
+ _JumooProcessingPipelineWorkspaceContext_respository.set(this, void 0);
23
+ _JumooProcessingPipelineWorkspaceContext_data.set(this, new UmbObjectState(undefined));
24
+ this.data = __classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceContext_data, "f").asObservable();
25
+ this.unique = __classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceContext_data, "f").asObservablePart((data) => data?.id);
26
+ __classPrivateFieldSet(this, _JumooProcessingPipelineWorkspaceContext_respository, new PipelineRepository(this), "f");
27
+ this.routes.setRoutes([
28
+ {
29
+ path: 'edit/:unique',
30
+ component: JumppProcessingPipelineWorkspaceElement,
31
+ setup: (_component, _info) => {
32
+ const unique = _info.match.params.unique;
33
+ this.load(unique);
34
+ },
35
+ },
36
+ ]);
37
+ this.provideContext(JUMOO_PROCESSING_PIPELINE_WORKSPACE, this);
38
+ }
39
+ async load(unique) {
40
+ const pipeline = await __classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceContext_respository, "f").Get(unique);
41
+ __classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceContext_data, "f").setValue(pipeline);
42
+ }
43
+ getUnique() {
44
+ return this.getData()?.id;
45
+ }
46
+ getEntityType() {
47
+ return JUMOO_PROCESSING_PIPELINE_ENTITY_TYPE;
48
+ }
49
+ getData() {
50
+ return __classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceContext_data, "f").getValue();
51
+ }
52
+ submit() {
53
+ throw new Error('Method not implemented.');
54
+ }
55
+ }
56
+ _JumooProcessingPipelineWorkspaceContext_respository = new WeakMap(), _JumooProcessingPipelineWorkspaceContext_data = new WeakMap();
57
+ export { JumooProcessingPipelineWorkspaceContext as api };
58
+ export const JUMOO_PROCESSING_PIPELINE_WORKSPACE = new UmbContextToken('jumoo-processing-pipelin-workspace-context');
@@ -0,0 +1,6 @@
1
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
2
+ export declare class JumppProcessingPipelineWorkspaceElement extends UmbLitElement {
3
+ constructor();
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
6
+ export default JumppProcessingPipelineWorkspaceElement;
@@ -0,0 +1,21 @@
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 { customElement, html } from '@umbraco-cms/backoffice/external/lit';
8
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
9
+ let JumppProcessingPipelineWorkspaceElement = class JumppProcessingPipelineWorkspaceElement extends UmbLitElement {
10
+ constructor() {
11
+ super();
12
+ }
13
+ render() {
14
+ return html `<umb-workspace-editor .enforceNoFooter=${true}></umb-workspace-editor>`;
15
+ }
16
+ };
17
+ JumppProcessingPipelineWorkspaceElement = __decorate([
18
+ customElement('jumpp-processing-pipeline-workspace-element')
19
+ ], JumppProcessingPipelineWorkspaceElement);
20
+ export { JumppProcessingPipelineWorkspaceElement };
21
+ export default JumppProcessingPipelineWorkspaceElement;
@@ -0,0 +1,6 @@
1
+ import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
2
+ import { UmbWorkspaceModalData, UmbWorkspaceModalValue } from '@umbraco-cms/backoffice/workspace';
3
+ export declare const JUMOO_PROCESSING_PIPELINE_WORKSPACE_ALIAS = "jumoo-processing-pipeline-workspace";
4
+ export declare const JUMOO_PROCESSING_PIPELINE_WORKSPACE_CONTEXT_ALIAS = "jumoo-processing-pipeline-workspace-context";
5
+ export declare const JUMOO_PROCESSING_PIPELINE_ENTITY_TYPE = "processing-pipeline";
6
+ export declare const JUMOO_PIPELINE_WORKSPACE_MODAL: UmbModalToken<UmbWorkspaceModalData<unknown>, UmbWorkspaceModalValue>;
@@ -0,0 +1,10 @@
1
+ import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
2
+ export const JUMOO_PROCESSING_PIPELINE_WORKSPACE_ALIAS = 'jumoo-processing-pipeline-workspace';
3
+ export const JUMOO_PROCESSING_PIPELINE_WORKSPACE_CONTEXT_ALIAS = 'jumoo-processing-pipeline-workspace-context';
4
+ export const JUMOO_PROCESSING_PIPELINE_ENTITY_TYPE = 'processing-pipeline';
5
+ export const JUMOO_PIPELINE_WORKSPACE_MODAL = new UmbModalToken('Umb.Modal.Workspace', {
6
+ modal: {
7
+ type: 'sidebar',
8
+ size: 'medium',
9
+ },
10
+ });
@@ -0,0 +1,20 @@
1
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
2
+ import { Pipeline } from '@jumoo/processing';
3
+ import { UmbModalContext } from '@umbraco-cms/backoffice/modal';
4
+ export declare class JumooProcessingPipelineWorkspaceDefaultViewElement extends UmbLitElement {
5
+ #private;
6
+ private readonly _pipelineContext;
7
+ pipeline?: Pipeline;
8
+ private _isLastAction;
9
+ private _status;
10
+ private _isValid;
11
+ private headline;
12
+ private progressLabel;
13
+ private closeLabel;
14
+ _modalContext?: UmbModalContext;
15
+ constructor();
16
+ connectedCallback(): void;
17
+ render(): import("lit-html").TemplateResult<1>;
18
+ private renderActions;
19
+ }
20
+ export default JumooProcessingPipelineWorkspaceDefaultViewElement;
@@ -0,0 +1,140 @@
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 _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange, _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid, _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose, _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete, _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess, _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal;
13
+ import { customElement, html, nothing, state, } from '@umbraco-cms/backoffice/external/lit';
14
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
15
+ import { JUMOO_PROCESSING_PIPELINE_WORKSPACE } from '../pipeline-workspace.context';
16
+ import { PipelineContext, PipelineStatus, } from '@jumoo/processing';
17
+ import { UMB_MODAL_CONTEXT } from '@umbraco-cms/backoffice/modal';
18
+ let JumooProcessingPipelineWorkspaceDefaultViewElement = class JumooProcessingPipelineWorkspaceDefaultViewElement extends UmbLitElement {
19
+ constructor() {
20
+ super();
21
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_instances.add(this);
22
+ this._isLastAction = false;
23
+ this._isValid = true;
24
+ this.headline = '';
25
+ this.progressLabel = '';
26
+ this.closeLabel = '';
27
+ this._pipelineContext = new PipelineContext(this);
28
+ this.consumeContext(JUMOO_PROCESSING_PIPELINE_WORKSPACE, (_context) => {
29
+ if (!_context)
30
+ return;
31
+ this.observe(_context.data, (data) => {
32
+ this.pipeline = data;
33
+ this.headline = this.pipeline?.alias ?? '';
34
+ });
35
+ });
36
+ this.consumeContext(UMB_MODAL_CONTEXT, (modalContext) => {
37
+ this._modalContext = modalContext;
38
+ });
39
+ this.observe(this._pipelineContext.finalized, async (finalized) => {
40
+ if (finalized) {
41
+ if (this._modalContext) {
42
+ this._modalContext.reject();
43
+ }
44
+ }
45
+ });
46
+ }
47
+ connectedCallback() {
48
+ super.connectedCallback();
49
+ this.closeLabel = this.localize.term('general_close');
50
+ this.progressLabel = this.localize.term('jumooProc_process');
51
+ }
52
+ render() {
53
+ return html `<umb-body-layout .headline=${this.headline}>
54
+ <jumoo-pipeline
55
+ .pipelineId=${this.pipeline?.id}
56
+ .setup=${this.pipeline?.options}
57
+ .debug=${false}
58
+ @pipeline-status=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange)}
59
+ @pipeline-valid=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid)}
60
+ @pipeline-complete=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete)}
61
+ @pipeline-modal-update=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal)}></jumoo-pipeline>
62
+ <div slot="actions">${this.renderActions()}</div>
63
+ </umb-body-layout>`;
64
+ }
65
+ renderActions() {
66
+ const actionButton = this._status === PipelineStatus.WAITING && this._isValid && !this._isLastAction
67
+ ? html `<uui-button
68
+ @click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess)}
69
+ color="positive"
70
+ look="primary"
71
+ .label=${this.progressLabel}></uui-button>`
72
+ : nothing;
73
+ const closeButton = html `<uui-button
74
+ @click=${__classPrivateFieldGet(this, _JumooProcessingPipelineWorkspaceDefaultViewElement_instances, "m", _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose)}
75
+ color="default"
76
+ look="default"
77
+ label=${this.closeLabel}></uui-button>`;
78
+ return html `${closeButton} ${actionButton}`;
79
+ }
80
+ };
81
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_instances = new WeakSet();
82
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange = function _JumooProcessingPipelineWorkspaceDefaultViewElement_onStatusChange(e) {
83
+ this._status = e.detail.status;
84
+ this._isLastAction = e.detail.isLastAction;
85
+ };
86
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid = function _JumooProcessingPipelineWorkspaceDefaultViewElement_onSetValid(e) {
87
+ this._isValid = e.detail.valid;
88
+ };
89
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose = async function _JumooProcessingPipelineWorkspaceDefaultViewElement_onClose() {
90
+ await this._pipelineContext.triggerClose();
91
+ };
92
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete = function _JumooProcessingPipelineWorkspaceDefaultViewElement_onComplete() {
93
+ // complete.
94
+ };
95
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess = function _JumooProcessingPipelineWorkspaceDefaultViewElement_onProcess() {
96
+ this._pipelineContext.triggerNext();
97
+ };
98
+ _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal = function _JumooProcessingPipelineWorkspaceDefaultViewElement_onUpdateModal(modalUpdate) {
99
+ console.debug('pipeline-modal-update', modalUpdate);
100
+ if (!modalUpdate.detail)
101
+ return;
102
+ if (modalUpdate.detail.headline) {
103
+ this.headline = modalUpdate.detail.headline;
104
+ }
105
+ if (modalUpdate.detail.progressLabel) {
106
+ this.progressLabel = modalUpdate.detail.progressLabel;
107
+ }
108
+ if (modalUpdate.detail.closeLabel) {
109
+ this.closeLabel = modalUpdate.detail.closeLabel;
110
+ }
111
+ };
112
+ __decorate([
113
+ state()
114
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "pipeline", void 0);
115
+ __decorate([
116
+ state()
117
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "_isLastAction", void 0);
118
+ __decorate([
119
+ state()
120
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "_status", void 0);
121
+ __decorate([
122
+ state()
123
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "_isValid", void 0);
124
+ __decorate([
125
+ state()
126
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "headline", void 0);
127
+ __decorate([
128
+ state()
129
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "progressLabel", void 0);
130
+ __decorate([
131
+ state()
132
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "closeLabel", void 0);
133
+ __decorate([
134
+ state()
135
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement.prototype, "_modalContext", void 0);
136
+ JumooProcessingPipelineWorkspaceDefaultViewElement = __decorate([
137
+ customElement('jumpp-processing-pipeline-workspace-default-view')
138
+ ], JumooProcessingPipelineWorkspaceDefaultViewElement);
139
+ export { JumooProcessingPipelineWorkspaceDefaultViewElement };
140
+ export default JumooProcessingPipelineWorkspaceDefaultViewElement;
@@ -0,0 +1,21 @@
1
+ import { PagedModelQueuedItemModel, QueueContext } from '@jumoo/processing';
2
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
3
+ export declare class JumooQueueListElement extends UmbLitElement {
4
+ protected readonly _queueContext: QueueContext;
5
+ headline: string;
6
+ queue: PagedModelQueuedItemModel | undefined;
7
+ loading: boolean;
8
+ constructor();
9
+ connectedCallback(): Promise<void>;
10
+ onRefresh(): Promise<void>;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ renderTable(): import("lit-html").TemplateResult<1>;
13
+ protected _onProcessQueueItem(e: CustomEvent): Promise<void>;
14
+ static styles: import("lit").CSSResult;
15
+ }
16
+ export default JumooQueueListElement;
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ 'jumoo-queue-list': JumooQueueListElement;
20
+ }
21
+ }
@@ -0,0 +1,72 @@
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 { QueueContext } from '@jumoo/processing';
8
+ import { css, customElement, html, property, state, when, } from '@umbraco-cms/backoffice/external/lit';
9
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
10
+ let JumooQueueListElement = class JumooQueueListElement extends UmbLitElement {
11
+ constructor() {
12
+ super();
13
+ this.headline = 'Processing Queue';
14
+ this.loading = true;
15
+ this._queueContext = new QueueContext(this);
16
+ this.observe(this._queueContext.queue, (queue) => {
17
+ this.queue = queue;
18
+ });
19
+ }
20
+ async connectedCallback() {
21
+ super.connectedCallback();
22
+ await this.onRefresh();
23
+ }
24
+ async onRefresh() {
25
+ this.loading = true;
26
+ await this._queueContext.loadQueue();
27
+ this.loading = false;
28
+ }
29
+ render() {
30
+ return html `<uui-box style="--uui-box-default-padding: 0;" .headline=${this.headline}>
31
+ <div slot="header-actions">
32
+ <uui-button label="refresh" @click=${this.onRefresh} compact
33
+ ><uui-icon name="icon-refresh"></uui-icon
34
+ ></uui-button>
35
+ </div>
36
+ ${when(this.loading, () => html `<uui-loader-bar
37
+ animationDuration="1.5"
38
+ style="color: black"></uui-loader-bar>`, () => this.renderTable())}
39
+ </uui-box>`;
40
+ }
41
+ renderTable() {
42
+ return !this.queue || !this.queue.items.length
43
+ ? html `<div class="emtpy">Nothing in the queue</div>`
44
+ : html `<jumoo-queue-table
45
+ .items=${this.queue.items}
46
+ @process-queue-item=${this._onProcessQueueItem}></jumoo-queue-table>`;
47
+ }
48
+ async _onProcessQueueItem(e) {
49
+ await this._queueContext.process(e.detail.key);
50
+ }
51
+ };
52
+ JumooQueueListElement.styles = css `
53
+ .emtpy {
54
+ display: flex;
55
+ justify-content: center;
56
+ padding: var(--uui-size-space-5);
57
+ }
58
+ `;
59
+ __decorate([
60
+ property({ type: String })
61
+ ], JumooQueueListElement.prototype, "headline", void 0);
62
+ __decorate([
63
+ state()
64
+ ], JumooQueueListElement.prototype, "queue", void 0);
65
+ __decorate([
66
+ state()
67
+ ], JumooQueueListElement.prototype, "loading", void 0);
68
+ JumooQueueListElement = __decorate([
69
+ customElement('jumoo-queue-list')
70
+ ], JumooQueueListElement);
71
+ export { JumooQueueListElement };
72
+ export default JumooQueueListElement;
@@ -0,0 +1,24 @@
1
+ import { nothing } from '@umbraco-cms/backoffice/external/lit';
2
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
3
+ import { QueuedItem } from '../../api';
4
+ import { UmbTableConfig } from '@umbraco-cms/backoffice/components';
5
+ export declare class JumooQueueTableElement extends UmbLitElement {
6
+ #private;
7
+ items?: QueuedItem[];
8
+ showViewDetails: boolean;
9
+ hideProcess: boolean;
10
+ tableConfig: UmbTableConfig;
11
+ tableColumns: {
12
+ name: string;
13
+ alias: string;
14
+ }[];
15
+ filter: any;
16
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
17
+ renderActions(item: QueuedItem): import("lit-html").TemplateResult<1>;
18
+ }
19
+ export default JumooQueueTableElement;
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ 'jumoo-queue-table': JumooQueueTableElement;
23
+ }
24
+ }
@@ -0,0 +1,156 @@
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 _JumooQueueTableElement_instances, _JumooQueueTableElement_onProcess, _JumooQueueTableElement_onViewDetails;
13
+ import { customElement, html, nothing, property, state, when, } from '@umbraco-cms/backoffice/external/lit';
14
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
15
+ import { ProcessingTimeOptions } from '../../constants';
16
+ let JumooQueueTableElement = class JumooQueueTableElement extends UmbLitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ _JumooQueueTableElement_instances.add(this);
20
+ this.showViewDetails = true;
21
+ this.hideProcess = false;
22
+ this.tableConfig = {
23
+ allowSelection: false,
24
+ hideIcon: false,
25
+ };
26
+ this.tableColumns = [
27
+ // { name: 'Key', alias: 'key' },
28
+ { name: 'Note', alias: 'note' },
29
+ { name: 'Processor', alias: 'processor' },
30
+ { name: 'Strategy', alias: 'strategy' },
31
+ { name: 'User', alias: 'user' },
32
+ { name: 'Submitted', alias: 'submitted' },
33
+ { name: 'Scheduled', alias: 'scheduled' },
34
+ { name: 'Attempts', alias: 'attempts' },
35
+ { name: 'Priority', alias: 'priority' },
36
+ { name: 'Actions', alias: 'actions' },
37
+ ];
38
+ }
39
+ render() {
40
+ if (!this.items)
41
+ return nothing;
42
+ const items = this.items
43
+ .map((item) => {
44
+ if (!item)
45
+ return undefined;
46
+ return {
47
+ id: item.key,
48
+ icon: 'icon-layers',
49
+ data: [
50
+ {
51
+ columnAlias: 'key',
52
+ value: item.key,
53
+ },
54
+ {
55
+ columnAlias: 'priority',
56
+ value: item.priority,
57
+ },
58
+ {
59
+ columnAlias: 'processor',
60
+ value: item.processor,
61
+ },
62
+ {
63
+ columnAlias: 'strategy',
64
+ value: item.strategy,
65
+ },
66
+ {
67
+ columnAlias: 'submitted',
68
+ value: this.localize.date(item.submitted, ProcessingTimeOptions),
69
+ },
70
+ {
71
+ columnAlias: 'scheduled',
72
+ value: !item.scheduled
73
+ ? ''
74
+ : this.localize.date(item.scheduled, ProcessingTimeOptions),
75
+ },
76
+ {
77
+ columnAlias: 'attempts',
78
+ value: item.attempts,
79
+ },
80
+ {
81
+ columnAlias: 'actions',
82
+ value: html `${this.renderActions(item)}`,
83
+ },
84
+ {
85
+ columnAlias: 'user',
86
+ value: item.userName ?? '',
87
+ },
88
+ {
89
+ columnAlias: 'note',
90
+ value: item.note,
91
+ },
92
+ ],
93
+ };
94
+ })
95
+ .filter((item) => item !== undefined);
96
+ return html ` <umb-table
97
+ .items=${items}
98
+ .config=${this.tableConfig}
99
+ .columns=${this.tableColumns}
100
+ .filter=${this.filter}></umb-table>`;
101
+ }
102
+ renderActions(item) {
103
+ return html ` <uui-button-group>
104
+ ${when(this.showViewDetails, () => html ` <uui-button
105
+ label="Details"
106
+ color="default"
107
+ look="primary"
108
+ @click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onViewDetails).call(this, item)}></uui-button>`)}
109
+ ${when(!this.hideProcess, () => html ` <uui-button
110
+ label="Process"
111
+ color="positive"
112
+ look="outline"
113
+ @click=${() => __classPrivateFieldGet(this, _JumooQueueTableElement_instances, "m", _JumooQueueTableElement_onProcess).call(this, item)}></uui-button>`)}
114
+ </uui-button-group>`;
115
+ }
116
+ };
117
+ _JumooQueueTableElement_instances = new WeakSet();
118
+ _JumooQueueTableElement_onProcess = function _JumooQueueTableElement_onProcess(item) {
119
+ this.dispatchEvent(new CustomEvent('process-queue-item', {
120
+ composed: true,
121
+ detail: {
122
+ key: item.key,
123
+ },
124
+ }));
125
+ };
126
+ _JumooQueueTableElement_onViewDetails = function _JumooQueueTableElement_onViewDetails(item) {
127
+ this.dispatchEvent(new CustomEvent('view-queue-item', {
128
+ composed: true,
129
+ detail: {
130
+ key: item.key,
131
+ },
132
+ }));
133
+ };
134
+ __decorate([
135
+ property({ type: Array })
136
+ ], JumooQueueTableElement.prototype, "items", void 0);
137
+ __decorate([
138
+ property({ type: Boolean })
139
+ ], JumooQueueTableElement.prototype, "showViewDetails", void 0);
140
+ __decorate([
141
+ property({ type: Boolean })
142
+ ], JumooQueueTableElement.prototype, "hideProcess", void 0);
143
+ __decorate([
144
+ property({ type: Object })
145
+ ], JumooQueueTableElement.prototype, "tableConfig", void 0);
146
+ __decorate([
147
+ property({ type: Array })
148
+ ], JumooQueueTableElement.prototype, "tableColumns", void 0);
149
+ __decorate([
150
+ state()
151
+ ], JumooQueueTableElement.prototype, "filter", void 0);
152
+ JumooQueueTableElement = __decorate([
153
+ customElement('jumoo-queue-table')
154
+ ], JumooQueueTableElement);
155
+ export { JumooQueueTableElement };
156
+ export default JumooQueueTableElement;
@@ -0,0 +1,3 @@
1
+ export * from './queue.context.js';
2
+ export * from './components/queue-table.element.js';
3
+ export * from './components/queue-list.element.js';
@@ -0,0 +1,3 @@
1
+ export * from './queue.context.js';
2
+ export * from './components/queue-table.element.js';
3
+ export * from './components/queue-list.element.js';
@@ -0,0 +1,13 @@
1
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
3
+ import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
4
+ import { PagedModelQueuedItemModel } from '../api';
5
+ export declare class QueueContext extends UmbControllerBase {
6
+ #private;
7
+ constructor(host: UmbControllerHost);
8
+ readonly queue: import("rxjs").Observable<PagedModelQueuedItemModel | undefined>;
9
+ loadQueue(): Promise<PagedModelQueuedItemModel>;
10
+ process(key: string): Promise<void>;
11
+ }
12
+ export default QueueContext;
13
+ export declare const JUMOO_QUEUE_CONTEXT: UmbContextToken<QueueContext, QueueContext>;
@@ -0,0 +1,37 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ 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");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
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 _QueueContext_repository, _QueueContext_queue;
13
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
14
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
15
+ import QueueRepository from './queue.repository';
16
+ import { UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
17
+ export class QueueContext extends UmbControllerBase {
18
+ constructor(host) {
19
+ super(host);
20
+ _QueueContext_repository.set(this, void 0);
21
+ _QueueContext_queue.set(this, new UmbObjectState(undefined));
22
+ this.queue = __classPrivateFieldGet(this, _QueueContext_queue, "f").asObservable();
23
+ __classPrivateFieldSet(this, _QueueContext_repository, new QueueRepository(host), "f");
24
+ }
25
+ async loadQueue() {
26
+ const queue = await __classPrivateFieldGet(this, _QueueContext_repository, "f").list();
27
+ __classPrivateFieldGet(this, _QueueContext_queue, "f").setValue(queue);
28
+ return queue;
29
+ }
30
+ async process(key) {
31
+ await __classPrivateFieldGet(this, _QueueContext_repository, "f").process(key);
32
+ await this.loadQueue();
33
+ }
34
+ }
35
+ _QueueContext_repository = new WeakMap(), _QueueContext_queue = new WeakMap();
36
+ export default QueueContext;
37
+ export const JUMOO_QUEUE_CONTEXT = new UmbContextToken('JUMOO_QUEUE_CONTEXT');
@@ -0,0 +1,10 @@
1
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
+ import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
3
+ export declare class QueueRepository extends UmbControllerBase {
4
+ constructor(host: UmbControllerHost);
5
+ list(): Promise<import("..").PagedModelQueuedItemModel>;
6
+ peek(key: string): Promise<import("..").PagedModelQueuedItemModel>;
7
+ delete(key: string): Promise<unknown>;
8
+ process(key: string): Promise<import("..").QueuedItem>;
9
+ }
10
+ export default QueueRepository;
@@ -0,0 +1,32 @@
1
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
+ import { QueuesService } from '../api';
3
+ export class QueueRepository extends UmbControllerBase {
4
+ constructor(host) {
5
+ super(host);
6
+ }
7
+ async list() {
8
+ return (await QueuesService.listQueue()).data;
9
+ }
10
+ async peek(key) {
11
+ return (await QueuesService.peekItem({
12
+ query: {
13
+ key: key,
14
+ },
15
+ })).data;
16
+ }
17
+ async delete(key) {
18
+ return (await QueuesService.delete({
19
+ path: {
20
+ key: key,
21
+ },
22
+ })).data;
23
+ }
24
+ async process(key) {
25
+ return (await QueuesService.process({
26
+ path: {
27
+ key: key,
28
+ },
29
+ })).data;
30
+ }
31
+ }
32
+ export default QueueRepository;
@@ -0,0 +1,2 @@
1
+ export * from './types.js';
2
+ export * from './signalr.context.js';