@jumoo/usync-expansions 0.0.0-stage → 18.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client/client.gen.d.ts +2 -0
- package/dist/api/client/client.gen.js +216 -0
- package/dist/api/client/index.d.ts +10 -0
- package/dist/api/client/index.js +6 -0
- package/dist/api/client/types.gen.d.ts +120 -0
- package/dist/api/client/types.gen.js +2 -0
- package/dist/api/client/utils.gen.d.ts +37 -0
- package/dist/api/client/utils.gen.js +230 -0
- package/dist/api/client.gen.d.ts +12 -0
- package/dist/api/client.gen.js +3 -0
- package/dist/api/core/auth.gen.d.ts +25 -0
- package/dist/api/core/auth.gen.js +14 -0
- package/dist/api/core/bodySerializer.gen.d.ts +25 -0
- package/dist/api/core/bodySerializer.gen.js +57 -0
- package/dist/api/core/params.gen.d.ts +43 -0
- package/dist/api/core/params.gen.js +109 -0
- package/dist/api/core/pathSerializer.gen.d.ts +33 -0
- package/dist/api/core/pathSerializer.gen.js +106 -0
- package/dist/api/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/api/core/queryKeySerializer.gen.js +92 -0
- package/dist/api/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/api/core/serverSentEvents.gen.js +132 -0
- package/dist/api/core/types.gen.d.ts +83 -0
- package/dist/api/core/types.gen.js +2 -0
- package/dist/api/core/utils.gen.d.ts +19 -0
- package/dist/api/core/utils.gen.js +87 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +3 -0
- package/dist/api/sdk.gen.d.ts +37 -0
- package/dist/api/sdk.gen.js +112 -0
- package/dist/api/types.gen.d.ts +520 -0
- package/dist/api/types.gen.js +74 -0
- package/dist/background/background-cancel.controller.d.ts +16 -0
- package/dist/background/background-cancel.controller.js +83 -0
- package/dist/background/background-pipeline.repository.d.ts +23 -0
- package/dist/background/background-pipeline.repository.js +33 -0
- package/dist/background/components/constants.d.ts +5 -0
- package/dist/background/components/constants.js +5 -0
- package/dist/background/components/index.d.ts +5 -0
- package/dist/background/components/index.js +5 -0
- package/dist/background/components/pending-list.element.d.ts +18 -0
- package/dist/background/components/pending-list.element.js +69 -0
- package/dist/background/components/pipelines-table.element.d.ts +15 -0
- package/dist/background/components/pipelines-table.element.js +60 -0
- package/dist/background/components/process-list.element.d.ts +10 -0
- package/dist/background/components/process-list.element.js +69 -0
- package/dist/background/components/queue-table.element.d.ts +15 -0
- package/dist/background/components/queue-table.element.js +50 -0
- package/dist/background/index.d.ts +1 -0
- package/dist/background/index.js +1 -0
- package/dist/background/manifest.d.ts +1 -0
- package/dist/background/manifest.js +24 -0
- package/dist/background/workspace/background-workspace-element.d.ts +11 -0
- package/dist/background/workspace/background-workspace-element.js +74 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/report-summary-view.d.ts +23 -0
- package/dist/components/report-summary-view.js +199 -0
- package/dist/components/usync-property-layout.d.ts +17 -0
- package/dist/components/usync-property-layout.js +159 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +27 -0
- package/dist/items/index.d.ts +2 -0
- package/dist/items/index.js +2 -0
- package/dist/items/manifests.d.ts +1 -0
- package/dist/items/manifests.js +7 -0
- package/dist/items/sync-item.context.d.ts +10 -0
- package/dist/items/sync-item.context.js +29 -0
- package/dist/items/sync-item.repository.d.ts +22 -0
- package/dist/items/sync-item.repository.js +37 -0
- package/dist/lang/en.d.ts +30 -0
- package/dist/lang/en.js +29 -0
- package/dist/lang/manifest.d.ts +1 -0
- package/dist/lang/manifest.js +11 -0
- package/dist/licence/components/index.d.ts +2 -0
- package/dist/licence/components/index.js +2 -0
- package/dist/licence/components/licence-notice.d.ts +10 -0
- package/dist/licence/components/licence-notice.js +55 -0
- package/dist/licence/components/licence-status.view.d.ts +14 -0
- package/dist/licence/components/licence-status.view.js +50 -0
- package/dist/licence/components/styles.d.ts +1 -0
- package/dist/licence/components/styles.js +41 -0
- package/dist/licence/lang/en.d.ts +17 -0
- package/dist/licence/lang/en.js +17 -0
- package/dist/licence/lang/manifests.d.ts +1 -0
- package/dist/licence/lang/manifests.js +13 -0
- package/dist/licence/licence.context.d.ts +17 -0
- package/dist/licence/licence.context.js +66 -0
- package/dist/licence/licence.element.d.ts +19 -0
- package/dist/licence/licence.element.js +270 -0
- package/dist/licence/licence.repository.d.ts +15 -0
- package/dist/licence/licence.repository.js +42 -0
- package/dist/licence/manifest.d.ts +1 -0
- package/dist/licence/manifest.js +30 -0
- package/dist/licence/source/licence.source.d.ts +15 -0
- package/dist/licence/source/licence.source.js +39 -0
- package/dist/menu/manifest.d.ts +1 -0
- package/dist/menu/manifest.js +12 -0
- package/dist/restore/components/index.d.ts +1 -0
- package/dist/restore/components/index.js +1 -0
- package/dist/restore/components/restore-point-table.element.d.ts +21 -0
- package/dist/restore/components/restore-point-table.element.js +126 -0
- package/dist/restore/constants.d.ts +23 -0
- package/dist/restore/constants.js +30 -0
- package/dist/restore/index.d.ts +1 -0
- package/dist/restore/index.js +8 -0
- package/dist/restore/lang/en.d.ts +23 -0
- package/dist/restore/lang/en.js +33 -0
- package/dist/restore/lang/manifest.d.ts +1 -0
- package/dist/restore/lang/manifest.js +11 -0
- package/dist/restore/manifest.d.ts +1 -0
- package/dist/restore/manifest.js +63 -0
- package/dist/restore/restore.context.d.ts +10 -0
- package/dist/restore/restore.context.js +29 -0
- package/dist/restore/restore.repository.d.ts +15 -0
- package/dist/restore/restore.repository.js +43 -0
- package/dist/restore/steps/manifest.d.ts +1 -0
- package/dist/restore/steps/manifest.js +36 -0
- package/dist/restore/steps/restore-create-complete.d.ts +6 -0
- package/dist/restore/steps/restore-create-complete.js +33 -0
- package/dist/restore/steps/restore-create-element.d.ts +9 -0
- package/dist/restore/steps/restore-create-element.js +97 -0
- package/dist/restore/steps/restore-report-config-element.d.ts +14 -0
- package/dist/restore/steps/restore-report-config-element.js +105 -0
- package/dist/restore/steps/restore-report-element.d.ts +6 -0
- package/dist/restore/steps/restore-report-element.js +39 -0
- package/dist/restore/workspace/restore.workspace-view.element.d.ts +24 -0
- package/dist/restore/workspace/restore.workspace-view.element.js +198 -0
- package/dist/restore/workspace/restore.workspace.context.d.ts +17 -0
- package/dist/restore/workspace/restore.workspace.context.js +52 -0
- package/dist/restore/workspace/restore.workspace.element.d.ts +12 -0
- package/dist/restore/workspace/restore.workspace.element.js +91 -0
- package/package.json +52 -6
- package/README.md +0 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
2
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
+
export declare class uSyncBackgroundPipelineRepository extends UmbControllerBase {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(host: UmbControllerHost);
|
|
6
|
+
/**
|
|
7
|
+
* @description asks a pipeline to stop. Scheduled and waiting pipelines are cancelled
|
|
8
|
+
* straight away (and taken off the queue); running/background ones stop before their next
|
|
9
|
+
* step. Errors come back without a notification so the caller can explain them.
|
|
10
|
+
* @param id the pipeline id (for a queued item, its key)
|
|
11
|
+
*/
|
|
12
|
+
cancelPipeline(id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
13
|
+
data: unknown;
|
|
14
|
+
error: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
data: undefined;
|
|
17
|
+
error: unknown;
|
|
18
|
+
}) & {
|
|
19
|
+
request?: Request;
|
|
20
|
+
response?: Response;
|
|
21
|
+
}>>;
|
|
22
|
+
}
|
|
23
|
+
export default uSyncBackgroundPipelineRepository;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 _uSyncBackgroundPipelineRepository_host;
|
|
13
|
+
import { postProcessingCancelPipelineById } from '@jumoo/processing';
|
|
14
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
15
|
+
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
16
|
+
export class uSyncBackgroundPipelineRepository extends UmbControllerBase {
|
|
17
|
+
constructor(host) {
|
|
18
|
+
super(host);
|
|
19
|
+
_uSyncBackgroundPipelineRepository_host.set(this, void 0);
|
|
20
|
+
__classPrivateFieldSet(this, _uSyncBackgroundPipelineRepository_host, host, "f");
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @description asks a pipeline to stop. Scheduled and waiting pipelines are cancelled
|
|
24
|
+
* straight away (and taken off the queue); running/background ones stop before their next
|
|
25
|
+
* step. Errors come back without a notification so the caller can explain them.
|
|
26
|
+
* @param id the pipeline id (for a queued item, its key)
|
|
27
|
+
*/
|
|
28
|
+
async cancelPipeline(id) {
|
|
29
|
+
return await tryExecute(__classPrivateFieldGet(this, _uSyncBackgroundPipelineRepository_host, "f"), postProcessingCancelPipelineById({ path: { id: id } }), { disableNotifications: true });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
_uSyncBackgroundPipelineRepository_host = new WeakMap();
|
|
33
|
+
export default uSyncBackgroundPipelineRepository;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JumooQueueListElement } from '@jumoo/processing';
|
|
2
|
+
export declare class uSyncBackgroundPendingListElement extends JumooQueueListElement {
|
|
3
|
+
#private;
|
|
4
|
+
_tableColumns: {
|
|
5
|
+
name: string;
|
|
6
|
+
alias: string;
|
|
7
|
+
}[];
|
|
8
|
+
renderTable(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
protected _onProcessQueueItem(e: CustomEvent): Promise<void>;
|
|
10
|
+
protected _onCancelQueueItem(e: CustomEvent): Promise<void>;
|
|
11
|
+
static styles: import("lit").CSSResult;
|
|
12
|
+
}
|
|
13
|
+
export default uSyncBackgroundPendingListElement;
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'usync-pending-list': uSyncBackgroundPendingListElement;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 _uSyncBackgroundPendingListElement_instances, _uSyncBackgroundPendingListElement_cancelController, _uSyncBackgroundPendingListElement_changed;
|
|
13
|
+
import { JumooQueueListElement } from '@jumoo/processing';
|
|
14
|
+
import { css, customElement, html, state } from '@umbraco-cms/backoffice/external/lit';
|
|
15
|
+
import { uSyncBackgroundCancelController } from '../background-cancel.controller.js';
|
|
16
|
+
import { USYNC_BACKGROUND_CHANGED_EVENT } from './constants.js';
|
|
17
|
+
let uSyncBackgroundPendingListElement = class uSyncBackgroundPendingListElement extends JumooQueueListElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
_uSyncBackgroundPendingListElement_instances.add(this);
|
|
21
|
+
_uSyncBackgroundPendingListElement_cancelController.set(this, new uSyncBackgroundCancelController(this));
|
|
22
|
+
this._tableColumns = [
|
|
23
|
+
{ name: 'Note', alias: 'note' },
|
|
24
|
+
{ name: 'Source', alias: 'processor' },
|
|
25
|
+
{ name: 'User', alias: 'user' },
|
|
26
|
+
{ name: 'Scheduled', alias: 'scheduled' },
|
|
27
|
+
{ name: 'Actions', alias: 'actions' },
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
renderTable() {
|
|
31
|
+
return !this.queue || this.queue.items.length === 0
|
|
32
|
+
? html `<div class="empty">No items in the queue</div>`
|
|
33
|
+
: html `<usync-queue-table
|
|
34
|
+
.items=${this.queue.items}
|
|
35
|
+
.tableColumns=${this._tableColumns}
|
|
36
|
+
@process-queue-item=${this._onProcessQueueItem}
|
|
37
|
+
@cancel-queue-item=${this._onCancelQueueItem}></usync-queue-table>`;
|
|
38
|
+
}
|
|
39
|
+
async _onProcessQueueItem(e) {
|
|
40
|
+
await super._onProcessQueueItem(e);
|
|
41
|
+
__classPrivateFieldGet(this, _uSyncBackgroundPendingListElement_instances, "m", _uSyncBackgroundPendingListElement_changed).call(this);
|
|
42
|
+
}
|
|
43
|
+
// a queued item's key is the id of the pipeline it runs.
|
|
44
|
+
async _onCancelQueueItem(e) {
|
|
45
|
+
if (await __classPrivateFieldGet(this, _uSyncBackgroundPendingListElement_cancelController, "f").cancel(e.detail.key, e.detail.name)) {
|
|
46
|
+
__classPrivateFieldGet(this, _uSyncBackgroundPendingListElement_instances, "m", _uSyncBackgroundPendingListElement_changed).call(this);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
_uSyncBackgroundPendingListElement_cancelController = new WeakMap();
|
|
51
|
+
_uSyncBackgroundPendingListElement_instances = new WeakSet();
|
|
52
|
+
_uSyncBackgroundPendingListElement_changed = function _uSyncBackgroundPendingListElement_changed() {
|
|
53
|
+
this.dispatchEvent(new CustomEvent(USYNC_BACKGROUND_CHANGED_EVENT, { bubbles: true, composed: true }));
|
|
54
|
+
};
|
|
55
|
+
uSyncBackgroundPendingListElement.styles = css `
|
|
56
|
+
.empty {
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
padding: 20px;
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
__decorate([
|
|
63
|
+
state()
|
|
64
|
+
], uSyncBackgroundPendingListElement.prototype, "_tableColumns", void 0);
|
|
65
|
+
uSyncBackgroundPendingListElement = __decorate([
|
|
66
|
+
customElement('usync-pending-list')
|
|
67
|
+
], uSyncBackgroundPendingListElement);
|
|
68
|
+
export { uSyncBackgroundPendingListElement };
|
|
69
|
+
export default uSyncBackgroundPendingListElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JumooPipelinesTableElement, Pipeline } from '@jumoo/processing';
|
|
2
|
+
/**
|
|
3
|
+
* @description the processing pipelines table, with a cancel button for anything that hasn't
|
|
4
|
+
* finished yet.
|
|
5
|
+
*/
|
|
6
|
+
export declare class uSyncPipelinesTableElement extends JumooPipelinesTableElement {
|
|
7
|
+
#private;
|
|
8
|
+
renderActions(pipeline: Pipeline): import("lit-html").TemplateResult<1>;
|
|
9
|
+
}
|
|
10
|
+
export default uSyncPipelinesTableElement;
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'usync-pipelines-table': uSyncPipelinesTableElement;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 _uSyncPipelinesTableElement_instances, _uSyncPipelinesTableElement_dispatch;
|
|
13
|
+
import { JumooPipelinesTableElement, PipelineStatus } from '@jumoo/processing';
|
|
14
|
+
import { customElement, html, when } from '@umbraco-cms/backoffice/external/lit';
|
|
15
|
+
const finishedStatuses = [
|
|
16
|
+
PipelineStatus.COMPLETED,
|
|
17
|
+
PipelineStatus.FAILED,
|
|
18
|
+
PipelineStatus.CANCELLED,
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* @description the processing pipelines table, with a cancel button for anything that hasn't
|
|
22
|
+
* finished yet.
|
|
23
|
+
*/
|
|
24
|
+
let uSyncPipelinesTableElement = class uSyncPipelinesTableElement extends JumooPipelinesTableElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
_uSyncPipelinesTableElement_instances.add(this);
|
|
28
|
+
}
|
|
29
|
+
renderActions(pipeline) {
|
|
30
|
+
return html `<uui-button-group>
|
|
31
|
+
<uui-button
|
|
32
|
+
label=${this.localize.term('uSyncBackground_view')}
|
|
33
|
+
color="positive"
|
|
34
|
+
look="outline"
|
|
35
|
+
@click=${() => __classPrivateFieldGet(this, _uSyncPipelinesTableElement_instances, "m", _uSyncPipelinesTableElement_dispatch).call(this, 'view-pipeline', pipeline)}></uui-button>
|
|
36
|
+
${when(!finishedStatuses.includes(pipeline.state.status), () => html `<uui-button
|
|
37
|
+
label=${this.localize.term('uSyncBackground_cancel')}
|
|
38
|
+
color="warning"
|
|
39
|
+
look="outline"
|
|
40
|
+
@click=${() => __classPrivateFieldGet(this, _uSyncPipelinesTableElement_instances, "m", _uSyncPipelinesTableElement_dispatch).call(this, 'cancel-pipeline', pipeline)}></uui-button>`)}
|
|
41
|
+
${when(!this.hideDelete, () => html `<uui-button
|
|
42
|
+
label=${this.localize.term('uSyncBackground_delete')}
|
|
43
|
+
color="danger"
|
|
44
|
+
look="outline"
|
|
45
|
+
@click=${() => __classPrivateFieldGet(this, _uSyncPipelinesTableElement_instances, "m", _uSyncPipelinesTableElement_dispatch).call(this, 'delete-pipeline', pipeline)}></uui-button>`)}
|
|
46
|
+
</uui-button-group>`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
_uSyncPipelinesTableElement_instances = new WeakSet();
|
|
50
|
+
_uSyncPipelinesTableElement_dispatch = function _uSyncPipelinesTableElement_dispatch(name, pipeline) {
|
|
51
|
+
this.dispatchEvent(new CustomEvent(name, {
|
|
52
|
+
composed: true,
|
|
53
|
+
detail: { piplineId: pipeline.id, alias: pipeline.alias },
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
uSyncPipelinesTableElement = __decorate([
|
|
57
|
+
customElement('usync-pipelines-table')
|
|
58
|
+
], uSyncPipelinesTableElement);
|
|
59
|
+
export { uSyncPipelinesTableElement };
|
|
60
|
+
export default uSyncPipelinesTableElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JumooProcessingPipelineList } from '@jumoo/processing';
|
|
2
|
+
import { UmbTableColumn } from '@umbraco-cms/backoffice/components';
|
|
3
|
+
export declare class uSyncProcessListElement extends JumooProcessingPipelineList {
|
|
4
|
+
#private;
|
|
5
|
+
tableColumns: UmbTableColumn[];
|
|
6
|
+
constructor();
|
|
7
|
+
onCancelPipeline(e: CustomEvent): Promise<void>;
|
|
8
|
+
renderListPipelines(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
}
|
|
10
|
+
export default uSyncProcessListElement;
|
|
@@ -0,0 +1,69 @@
|
|
|
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 _uSyncProcessListElement_cancelController;
|
|
13
|
+
import { JumooProcessingPipelineList, PipelineStatus } from '@jumoo/processing';
|
|
14
|
+
import { customElement, html, state } from '@umbraco-cms/backoffice/external/lit';
|
|
15
|
+
import { uSyncBackgroundCancelController } from '../background-cancel.controller.js';
|
|
16
|
+
import { USYNC_BACKGROUND_CHANGED_EVENT } from './constants.js';
|
|
17
|
+
let uSyncProcessListElement = class uSyncProcessListElement extends JumooProcessingPipelineList {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
_uSyncProcessListElement_cancelController.set(this, new uSyncBackgroundCancelController(this));
|
|
21
|
+
this.tableColumns = [
|
|
22
|
+
{ name: 'Alias', alias: 'alias' },
|
|
23
|
+
// { name: 'Strategy', alias: 'strategy' },
|
|
24
|
+
{ name: 'State', alias: 'state' },
|
|
25
|
+
{ name: 'Action', alias: 'action' },
|
|
26
|
+
{ name: 'Background', alias: 'background' },
|
|
27
|
+
{ name: 'Scheduled', alias: 'scheduled' },
|
|
28
|
+
{ name: 'Actions', alias: 'actions' },
|
|
29
|
+
];
|
|
30
|
+
// Background and Scheduled are where headless (Publisher/Start, Exporter/Start) runs sit.
|
|
31
|
+
this.statuses = [
|
|
32
|
+
PipelineStatus.WAITING,
|
|
33
|
+
PipelineStatus.BACKGROUND,
|
|
34
|
+
PipelineStatus.SCHEDULED,
|
|
35
|
+
PipelineStatus.RUNNING,
|
|
36
|
+
PipelineStatus.COMPLETED,
|
|
37
|
+
PipelineStatus.FAILED,
|
|
38
|
+
PipelineStatus.CANCELLED,
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
async onCancelPipeline(e) {
|
|
42
|
+
if (await __classPrivateFieldGet(this, _uSyncProcessListElement_cancelController, "f").cancel(e.detail.piplineId, e.detail.alias)) {
|
|
43
|
+
this.dispatchEvent(new CustomEvent(USYNC_BACKGROUND_CHANGED_EVENT, {
|
|
44
|
+
bubbles: true,
|
|
45
|
+
composed: true,
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
renderListPipelines() {
|
|
50
|
+
return !this.pipelines || this.pipelines.length === 0
|
|
51
|
+
? html `<div class="emtpy">Nothing with status ${this.status}</div>`
|
|
52
|
+
: html `<usync-pipelines-table
|
|
53
|
+
.pipelines=${this.pipelines}
|
|
54
|
+
.hideDelete=${this.hideDelete}
|
|
55
|
+
.tableColumns=${this.tableColumns}
|
|
56
|
+
@view-pipeline=${this.onViewPipeline}
|
|
57
|
+
@cancel-pipeline=${this.onCancelPipeline}
|
|
58
|
+
@delete-pipeline=${this.onDeletePipeline}></usync-pipelines-table>`;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
_uSyncProcessListElement_cancelController = new WeakMap();
|
|
62
|
+
__decorate([
|
|
63
|
+
state()
|
|
64
|
+
], uSyncProcessListElement.prototype, "tableColumns", void 0);
|
|
65
|
+
uSyncProcessListElement = __decorate([
|
|
66
|
+
customElement('usync-process-list')
|
|
67
|
+
], uSyncProcessListElement);
|
|
68
|
+
export { uSyncProcessListElement };
|
|
69
|
+
export default uSyncProcessListElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JumooQueueTableElement, QueuedItem } from '@jumoo/processing';
|
|
2
|
+
/**
|
|
3
|
+
* @description the processing queue table, with process and cancel buttons. A queued item's
|
|
4
|
+
* key is the id of the pipeline it runs.
|
|
5
|
+
*/
|
|
6
|
+
export declare class uSyncQueueTableElement extends JumooQueueTableElement {
|
|
7
|
+
#private;
|
|
8
|
+
renderActions(item: QueuedItem): import("lit-html").TemplateResult<1>;
|
|
9
|
+
}
|
|
10
|
+
export default uSyncQueueTableElement;
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'usync-queue-table': uSyncQueueTableElement;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 _uSyncQueueTableElement_instances, _uSyncQueueTableElement_dispatch;
|
|
13
|
+
import { JumooQueueTableElement } from '@jumoo/processing';
|
|
14
|
+
import { customElement, html } from '@umbraco-cms/backoffice/external/lit';
|
|
15
|
+
/**
|
|
16
|
+
* @description the processing queue table, with process and cancel buttons. A queued item's
|
|
17
|
+
* key is the id of the pipeline it runs.
|
|
18
|
+
*/
|
|
19
|
+
let uSyncQueueTableElement = class uSyncQueueTableElement extends JumooQueueTableElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
_uSyncQueueTableElement_instances.add(this);
|
|
23
|
+
}
|
|
24
|
+
renderActions(item) {
|
|
25
|
+
return html `<uui-button-group>
|
|
26
|
+
<uui-button
|
|
27
|
+
label=${this.localize.term('uSyncBackground_process')}
|
|
28
|
+
color="positive"
|
|
29
|
+
look="outline"
|
|
30
|
+
@click=${() => __classPrivateFieldGet(this, _uSyncQueueTableElement_instances, "m", _uSyncQueueTableElement_dispatch).call(this, 'process-queue-item', item)}></uui-button>
|
|
31
|
+
<uui-button
|
|
32
|
+
label=${this.localize.term('uSyncBackground_cancel')}
|
|
33
|
+
color="warning"
|
|
34
|
+
look="outline"
|
|
35
|
+
@click=${() => __classPrivateFieldGet(this, _uSyncQueueTableElement_instances, "m", _uSyncQueueTableElement_dispatch).call(this, 'cancel-queue-item', item)}></uui-button>
|
|
36
|
+
</uui-button-group>`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
_uSyncQueueTableElement_instances = new WeakSet();
|
|
40
|
+
_uSyncQueueTableElement_dispatch = function _uSyncQueueTableElement_dispatch(name, item) {
|
|
41
|
+
this.dispatchEvent(new CustomEvent(name, {
|
|
42
|
+
composed: true,
|
|
43
|
+
detail: { key: item.key, name: item.note || item.processor },
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
uSyncQueueTableElement = __decorate([
|
|
47
|
+
customElement('usync-queue-table')
|
|
48
|
+
], uSyncQueueTableElement);
|
|
49
|
+
export { uSyncQueueTableElement };
|
|
50
|
+
export default uSyncQueueTableElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: (import("@umbraco-cms/backoffice/workspace").ManifestWorkspace<import("@umbraco-cms/backoffice/workspace").MetaWorkspace, import("@umbraco-cms/backoffice/controller-api").UmbControllerHostElement, import("@umbraco-cms/backoffice/workspace").UmbWorkspaceContext> | import("@jumoo/usync").ManifestuSyncMenuItem)[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const workspaceAlias = 'usync-background-workspace';
|
|
2
|
+
const backgroundEntity = 'usync-background';
|
|
3
|
+
const menuItem = {
|
|
4
|
+
type: 'usync-menuItem',
|
|
5
|
+
alias: 'usync.background.menu.item',
|
|
6
|
+
name: 'background',
|
|
7
|
+
weight: 8,
|
|
8
|
+
meta: {
|
|
9
|
+
label: 'Background',
|
|
10
|
+
icon: 'icon-circuits',
|
|
11
|
+
entityType: backgroundEntity,
|
|
12
|
+
menus: ['usync.menu'],
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
const workspace = {
|
|
16
|
+
type: 'workspace',
|
|
17
|
+
alias: workspaceAlias,
|
|
18
|
+
name: 'uSync Background',
|
|
19
|
+
js: () => import('./workspace/background-workspace-element.js'),
|
|
20
|
+
meta: {
|
|
21
|
+
entityType: backgroundEntity,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export const manifests = [menuItem, workspace];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
2
|
+
import '../components/index.js';
|
|
3
|
+
export declare class uSyncBackgroundWorkspaceElement extends UmbLitElement {
|
|
4
|
+
#private;
|
|
5
|
+
private _processList?;
|
|
6
|
+
private _pendingList?;
|
|
7
|
+
constructor();
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
static styles: import("lit").CSSResult;
|
|
10
|
+
}
|
|
11
|
+
export default uSyncBackgroundWorkspaceElement;
|
|
@@ -0,0 +1,74 @@
|
|
|
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 _uSyncBackgroundWorkspaceElement_pipelinesContext;
|
|
19
|
+
import { PipelinesContext, PipelineStatus } from '@jumoo/processing';
|
|
20
|
+
import { css, customElement, html, query } from '@umbraco-cms/backoffice/external/lit';
|
|
21
|
+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
22
|
+
// the lists are defined here, not by the package entry point (v18's index.ts doesn't export
|
|
23
|
+
// background), so without this import the workspace renders them as unknown elements.
|
|
24
|
+
import '../components/index.js';
|
|
25
|
+
let uSyncBackgroundWorkspaceElement = class uSyncBackgroundWorkspaceElement extends UmbLitElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
_uSyncBackgroundWorkspaceElement_pipelinesContext.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _uSyncBackgroundWorkspaceElement_pipelinesContext, new PipelinesContext(this), "f");
|
|
30
|
+
console.debug('uSyncBackgroundWorkspaceElement', __classPrivateFieldGet(this, _uSyncBackgroundWorkspaceElement_pipelinesContext, "f"));
|
|
31
|
+
// a cancel (or process) in one list changes what's in both. The literal is
|
|
32
|
+
// USYNC_BACKGROUND_CHANGED_EVENT: importing the constant would pull the main bundle into
|
|
33
|
+
// this lazy chunk as a second copy (and define every element twice).
|
|
34
|
+
this.addEventListener('usync-background-changed', () => {
|
|
35
|
+
this._processList?.getPipelines();
|
|
36
|
+
this._pendingList?.onRefresh();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return html `<umb-body-layout
|
|
41
|
+
><div class="layout">
|
|
42
|
+
<uui-box .headline=${this.localize.term('uSyncBackground_title')}>
|
|
43
|
+
${this.localize.term('uSyncBackground_intro')}
|
|
44
|
+
</uui-box>
|
|
45
|
+
|
|
46
|
+
<usync-process-list
|
|
47
|
+
.defaultStatus=${PipelineStatus.WAITING}
|
|
48
|
+
.headline=${this.localize.term('uSyncBackground_processes')}></usync-process-list>
|
|
49
|
+
|
|
50
|
+
<usync-pending-list
|
|
51
|
+
.headline=${this.localize.term('uSyncBackground_queue')}></usync-pending-list>
|
|
52
|
+
</div>
|
|
53
|
+
</umb-body-layout>`;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
_uSyncBackgroundWorkspaceElement_pipelinesContext = new WeakMap();
|
|
57
|
+
uSyncBackgroundWorkspaceElement.styles = css `
|
|
58
|
+
.layout {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: var(--uui-size-space-4);
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
__decorate([
|
|
65
|
+
query('usync-process-list')
|
|
66
|
+
], uSyncBackgroundWorkspaceElement.prototype, "_processList", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
query('usync-pending-list')
|
|
69
|
+
], uSyncBackgroundWorkspaceElement.prototype, "_pendingList", void 0);
|
|
70
|
+
uSyncBackgroundWorkspaceElement = __decorate([
|
|
71
|
+
customElement('usync-background-workspace-element')
|
|
72
|
+
], uSyncBackgroundWorkspaceElement);
|
|
73
|
+
export { uSyncBackgroundWorkspaceElement };
|
|
74
|
+
export default uSyncBackgroundWorkspaceElement;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
2
|
+
import { USyncActionView } from '@jumoo/usync';
|
|
3
|
+
export declare class uSyncResportSummaryView extends UmbLitElement {
|
|
4
|
+
#private;
|
|
5
|
+
showAll: boolean;
|
|
6
|
+
headline: string;
|
|
7
|
+
results?: USyncActionView[];
|
|
8
|
+
/**
|
|
9
|
+
* @description is this being shown as part of a report (or false as results)
|
|
10
|
+
*/
|
|
11
|
+
isReport: boolean;
|
|
12
|
+
private countChanges;
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
renderToggle(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
renderChangeSummary(changes: number): import("lit-html").TemplateResult<1>;
|
|
16
|
+
renderReportSummary(changes: number): import("lit-html").TemplateResult<1>;
|
|
17
|
+
renderResultSummary(changes: number): import("lit-html").TemplateResult<1>;
|
|
18
|
+
renderTable(): import("lit-html").TemplateResult<1>;
|
|
19
|
+
renderTableHeader(): import("lit-html").TemplateResult<1>;
|
|
20
|
+
renderRows(): import("lit-html").TemplateResult<1>;
|
|
21
|
+
static styles: import("lit").CSSResult;
|
|
22
|
+
}
|
|
23
|
+
export default uSyncResportSummaryView;
|