@jumoo/usync-expansions 0.0.0-stage → 17.6.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 +235 -0
- package/dist/api/client/index.d.ts +8 -0
- package/dist/api/client/index.js +6 -0
- package/dist/api/client/types.gen.d.ts +117 -0
- package/dist/api/client/types.gen.js +2 -0
- package/dist/api/client/utils.gen.d.ts +33 -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 +4 -0
- package/dist/api/core/auth.gen.d.ts +18 -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 +100 -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 +133 -0
- package/dist/api/core/types.gen.d.ts +78 -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 +3 -0
- package/dist/api/index.js +4 -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 +1251 -0
- package/dist/api/types.gen.js +255 -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 +18 -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 +10 -0
- package/dist/background/workspace/background-workspace-element.js +71 -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/exports.d.ts +6 -0
- package/dist/exports.js +6 -0
- package/dist/hey-api.d.ts +11 -0
- package/dist/hey-api.js +14 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +19 -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 +17 -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/index.d.ts +5 -0
- package/dist/licence/index.js +5 -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 +2 -0
- package/dist/licence/manifest.js +31 -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 +7 -0
- package/dist/restore/index.js +7 -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 +195 -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 +54 -6
- package/README.md +0 -3
package/dist/exports.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CreateClientConfig } from './api/client.gen';
|
|
2
|
+
/**
|
|
3
|
+
* Pre-configure the generated client by copying the Umbraco HTTP client's config.
|
|
4
|
+
*
|
|
5
|
+
* Called automatically by the generated client during initialization (via runtimeConfigPath).
|
|
6
|
+
* Inherits baseUrl, credentials, auth, and headers from umbHttpClient — which is already
|
|
7
|
+
* configured by the backoffice before extensions load.
|
|
8
|
+
*
|
|
9
|
+
* @see https://heyapi.dev/openapi-ts/clients/fetch#configuration
|
|
10
|
+
*/
|
|
11
|
+
export declare const createClientConfig: CreateClientConfig;
|
package/dist/hey-api.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { umbHttpClient } from '@umbraco-cms/backoffice/http-client';
|
|
2
|
+
/**
|
|
3
|
+
* Pre-configure the generated client by copying the Umbraco HTTP client's config.
|
|
4
|
+
*
|
|
5
|
+
* Called automatically by the generated client during initialization (via runtimeConfigPath).
|
|
6
|
+
* Inherits baseUrl, credentials, auth, and headers from umbHttpClient — which is already
|
|
7
|
+
* configured by the backoffice before extensions load.
|
|
8
|
+
*
|
|
9
|
+
* @see https://heyapi.dev/openapi-ts/clients/fetch#configuration
|
|
10
|
+
*/
|
|
11
|
+
export const createClientConfig = (config) => ({
|
|
12
|
+
...config,
|
|
13
|
+
...umbHttpClient.getConfig(),
|
|
14
|
+
});
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import './restore/index.js';
|
|
2
|
+
import './components/index.js';
|
|
3
|
+
import { manifests as localizations } from './lang/manifest';
|
|
4
|
+
import { manifests as licenceManifests } from './licence/manifest';
|
|
5
|
+
import { manifests as itemManifests } from './items/manifests';
|
|
6
|
+
import { manifests as restoreManifests } from './restore/manifest';
|
|
7
|
+
import { manifests as backgroundManifests } from './background/manifest';
|
|
8
|
+
export * from './exports.js';
|
|
9
|
+
export const onInit = (_host, extensionRegistry) => {
|
|
10
|
+
extensionRegistry.registerMany([
|
|
11
|
+
...licenceManifests,
|
|
12
|
+
...itemManifests,
|
|
13
|
+
...restoreManifests,
|
|
14
|
+
...localizations,
|
|
15
|
+
...backgroundManifests,
|
|
16
|
+
]);
|
|
17
|
+
// remove the add-ons dashboard workspace, complete is now installed.
|
|
18
|
+
extensionRegistry.exclude('usync.workspace.addons');
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: import("@umbraco-cms/backoffice/extension-registry").ManifestGlobalContext[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
2
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
4
|
+
export declare class SyncItemContext extends UmbControllerBase {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(host: UmbControllerHost);
|
|
7
|
+
getSyncItem(entityType: string, id: string): Promise<import("@jumoo/usync-expansions").SyncEntity>;
|
|
8
|
+
}
|
|
9
|
+
export default SyncItemContext;
|
|
10
|
+
export declare const SYNC_ITEM_CONTEXT_TOKEN: UmbContextToken<SyncItemContext, SyncItemContext>;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 _SyncItemContext_repository;
|
|
13
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
14
|
+
import { SyncItemRepository } from '@jumoo/usync-expansions';
|
|
15
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
16
|
+
export class SyncItemContext extends UmbControllerBase {
|
|
17
|
+
constructor(host) {
|
|
18
|
+
super(host);
|
|
19
|
+
_SyncItemContext_repository.set(this, void 0);
|
|
20
|
+
__classPrivateFieldSet(this, _SyncItemContext_repository, new SyncItemRepository(this), "f");
|
|
21
|
+
this.provideContext(SYNC_ITEM_CONTEXT_TOKEN, this);
|
|
22
|
+
}
|
|
23
|
+
async getSyncItem(entityType, id) {
|
|
24
|
+
return (await __classPrivateFieldGet(this, _SyncItemContext_repository, "f").GetSyncItem(entityType, id)).data;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
_SyncItemContext_repository = new WeakMap();
|
|
28
|
+
export default SyncItemContext;
|
|
29
|
+
export const SYNC_ITEM_CONTEXT_TOKEN = new UmbContextToken('SyncItemContext');
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
2
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
+
export declare class SyncItemRepository extends UmbControllerBase {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(host: UmbControllerHost);
|
|
6
|
+
/**
|
|
7
|
+
* @description get the sync item representation of an item
|
|
8
|
+
* @param entityType the entity type of the item
|
|
9
|
+
* @param id they "key" for the item
|
|
10
|
+
* @returns a SyncItem (which as the udi in it.)
|
|
11
|
+
*/
|
|
12
|
+
GetSyncItem(entityType: string, id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
13
|
+
data: import("@jumoo/usync-expansions").SyncEntity;
|
|
14
|
+
request: Request;
|
|
15
|
+
response: Response;
|
|
16
|
+
}>>;
|
|
17
|
+
}
|
|
@@ -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 _SyncItemRepository_host;
|
|
13
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
14
|
+
import { ItemsService } from '@jumoo/usync-expansions';
|
|
15
|
+
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
|
16
|
+
export class SyncItemRepository extends UmbControllerBase {
|
|
17
|
+
constructor(host) {
|
|
18
|
+
super(host);
|
|
19
|
+
_SyncItemRepository_host.set(this, void 0);
|
|
20
|
+
__classPrivateFieldSet(this, _SyncItemRepository_host, host, "f");
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @description get the sync item representation of an item
|
|
24
|
+
* @param entityType the entity type of the item
|
|
25
|
+
* @param id they "key" for the item
|
|
26
|
+
* @returns a SyncItem (which as the udi in it.)
|
|
27
|
+
*/
|
|
28
|
+
async GetSyncItem(entityType, id) {
|
|
29
|
+
return await tryExecute(__classPrivateFieldGet(this, _SyncItemRepository_host, "f"), ItemsService.getSyncItem({
|
|
30
|
+
query: {
|
|
31
|
+
entityType: entityType,
|
|
32
|
+
id: id,
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
_SyncItemRepository_host = new WeakMap();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
uSyncReport: {
|
|
3
|
+
noChanges: string;
|
|
4
|
+
noChangesDescription: string;
|
|
5
|
+
pendingChanges: string;
|
|
6
|
+
resultChanges: string;
|
|
7
|
+
resultNoChanges: string;
|
|
8
|
+
};
|
|
9
|
+
uSyncBackground: {
|
|
10
|
+
title: string;
|
|
11
|
+
intro: string;
|
|
12
|
+
processes: string;
|
|
13
|
+
queue: string;
|
|
14
|
+
view: string;
|
|
15
|
+
process: string;
|
|
16
|
+
delete: string;
|
|
17
|
+
cancel: string;
|
|
18
|
+
cancelRun: string;
|
|
19
|
+
keepRun: string;
|
|
20
|
+
cancelHeadline: string;
|
|
21
|
+
cancelConfirm: string;
|
|
22
|
+
cancelledHeadline: string;
|
|
23
|
+
cancelledMessage: string;
|
|
24
|
+
cancelFailedHeadline: string;
|
|
25
|
+
cancelForbidden: string;
|
|
26
|
+
cancelNotFound: string;
|
|
27
|
+
cancelFinished: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
package/dist/lang/en.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
uSyncReport: {
|
|
3
|
+
noChanges: 'No changes',
|
|
4
|
+
noChangesDescription: 'It looks like the server is up to date and there are no new changes to be made.',
|
|
5
|
+
pendingChanges: '%0% pending changes in %1% items.',
|
|
6
|
+
resultChanges: '%0% changes were made from %1% items.',
|
|
7
|
+
resultNoChanges: 'Nothing changed.',
|
|
8
|
+
},
|
|
9
|
+
uSyncBackground: {
|
|
10
|
+
title: 'Background tasks',
|
|
11
|
+
intro: `If you set up Publisher to run in the background, then you can view the processes and queue here.`,
|
|
12
|
+
processes: 'Processes',
|
|
13
|
+
queue: 'Queued items',
|
|
14
|
+
view: 'View',
|
|
15
|
+
process: 'Process',
|
|
16
|
+
delete: 'Delete',
|
|
17
|
+
cancel: 'Cancel',
|
|
18
|
+
cancelRun: 'Cancel run',
|
|
19
|
+
keepRun: 'Keep it',
|
|
20
|
+
cancelHeadline: 'Cancel this run?',
|
|
21
|
+
cancelConfirm: 'Cancel %0%? A scheduled or waiting run stops now; one that is already running stops before its next step.',
|
|
22
|
+
cancelledHeadline: 'Cancel requested',
|
|
23
|
+
cancelledMessage: 'Scheduled and waiting runs are cancelled straight away; running ones stop before their next step.',
|
|
24
|
+
cancelFailedHeadline: 'Could not cancel',
|
|
25
|
+
cancelForbidden: 'You can only cancel runs you started, unless you are an administrator.',
|
|
26
|
+
cancelNotFound: 'That run could not be found. It may already have been removed.',
|
|
27
|
+
cancelFinished: 'That run has already finished, so there is nothing to cancel.',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: UmbExtensionManifest[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LicenceStatusView } from '@jumoo/usync-expansions';
|
|
2
|
+
import { nothing } from '@umbraco-cms/backoffice/external/lit';
|
|
3
|
+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
4
|
+
export declare class uSyncLicenceNoticeElement extends UmbLitElement {
|
|
5
|
+
licenceStatus: LicenceStatusView | undefined;
|
|
6
|
+
constructor();
|
|
7
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
}
|
|
10
|
+
export default uSyncLicenceNoticeElement;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { USYNC_LICENCE_CONTEXT_TOKEN } from '@jumoo/usync-expansions';
|
|
8
|
+
import { css, customElement, html, nothing, state, } from '@umbraco-cms/backoffice/external/lit';
|
|
9
|
+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
10
|
+
import { JumooLicenceStyles } from './styles';
|
|
11
|
+
let uSyncLicenceNoticeElement = class uSyncLicenceNoticeElement extends UmbLitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.licenceStatus = undefined;
|
|
15
|
+
this.consumeContext(USYNC_LICENCE_CONTEXT_TOKEN, (_context) => {
|
|
16
|
+
if (!_context)
|
|
17
|
+
return;
|
|
18
|
+
this.observe(_context.licenceStatus, async (_status) => {
|
|
19
|
+
if (!this.licenceStatus)
|
|
20
|
+
await _context.getLicenceStatus();
|
|
21
|
+
this.licenceStatus = _status;
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
if (this.licenceStatus == undefined)
|
|
27
|
+
return nothing;
|
|
28
|
+
if (this.licenceStatus?.status == 'Valid')
|
|
29
|
+
return nothing;
|
|
30
|
+
const status = this.licenceStatus.status;
|
|
31
|
+
const messageString = `usynccomplete_licence${status}`;
|
|
32
|
+
const className = status.toLowerCase();
|
|
33
|
+
const icon = status === 'Invalid' ? 'icon-wrong' : 'icon-alert';
|
|
34
|
+
return html `<div class="licence-alert ${className}">
|
|
35
|
+
<uui-icon .name=${icon}></uui-icon>
|
|
36
|
+
<umb-localize key="${messageString}"></umb-localize>
|
|
37
|
+
</div>`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
uSyncLicenceNoticeElement.styles = [
|
|
41
|
+
JumooLicenceStyles,
|
|
42
|
+
css `
|
|
43
|
+
.licence-alert {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
`,
|
|
47
|
+
];
|
|
48
|
+
__decorate([
|
|
49
|
+
state()
|
|
50
|
+
], uSyncLicenceNoticeElement.prototype, "licenceStatus", void 0);
|
|
51
|
+
uSyncLicenceNoticeElement = __decorate([
|
|
52
|
+
customElement('usync-licence-notice')
|
|
53
|
+
], uSyncLicenceNoticeElement);
|
|
54
|
+
export { uSyncLicenceNoticeElement };
|
|
55
|
+
export default uSyncLicenceNoticeElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LitElement, nothing } from '@umbraco-cms/backoffice/external/lit';
|
|
2
|
+
import { LicenceStatusView } from '@jumoo/usync-expansions';
|
|
3
|
+
declare const uSyncLicenceStatusView_base: import("@umbraco-cms/backoffice/extension-api").HTMLElementConstructor<import("@umbraco-cms/backoffice/element-api").UmbElement> & typeof LitElement;
|
|
4
|
+
export declare class uSyncLicenceStatusView extends uSyncLicenceStatusView_base {
|
|
5
|
+
licenceStatus: LicenceStatusView | undefined;
|
|
6
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
}
|
|
9
|
+
export default uSyncLicenceStatusView;
|
|
10
|
+
declare global {
|
|
11
|
+
interface HtmlElementTagNameMap {
|
|
12
|
+
'usync-licence-status': uSyncLicenceStatusView;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -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
|
+
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
|
|
8
|
+
import { LitElement, css, customElement, html, nothing, property, when, } from '@umbraco-cms/backoffice/external/lit';
|
|
9
|
+
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
|
10
|
+
import { JumooLicenceStyles } from './styles';
|
|
11
|
+
let uSyncLicenceStatusView = class uSyncLicenceStatusView extends UmbElementMixin(LitElement) {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.licenceStatus = undefined;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
if (this.licenceStatus == undefined)
|
|
18
|
+
return nothing;
|
|
19
|
+
const className = this.licenceStatus?.status.toLocaleLowerCase();
|
|
20
|
+
const icon = this.licenceStatus?.status === 'Valid' ? 'icon-check' : 'icon-alert';
|
|
21
|
+
return html ` <div class="licence-alert ${className}">
|
|
22
|
+
<uui-icon .name=${icon}></uui-icon> ${this.licenceStatus?.message ??
|
|
23
|
+
'licenece is valid'}
|
|
24
|
+
${when(this.licenceStatus.link, () => html `<a
|
|
25
|
+
href="${this.licenceStatus?.link ?? '#'}"
|
|
26
|
+
target="_blank"
|
|
27
|
+
rel="noopener noreferrer"
|
|
28
|
+
>${this.licenceStatus?.linkTitle}</a
|
|
29
|
+
>`)}
|
|
30
|
+
</div>`;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
uSyncLicenceStatusView.styles = [
|
|
34
|
+
UmbTextStyles,
|
|
35
|
+
JumooLicenceStyles,
|
|
36
|
+
css `
|
|
37
|
+
:host {
|
|
38
|
+
display: block;
|
|
39
|
+
margin-bottom: 10px;
|
|
40
|
+
}
|
|
41
|
+
`,
|
|
42
|
+
];
|
|
43
|
+
__decorate([
|
|
44
|
+
property({ type: Object })
|
|
45
|
+
], uSyncLicenceStatusView.prototype, "licenceStatus", void 0);
|
|
46
|
+
uSyncLicenceStatusView = __decorate([
|
|
47
|
+
customElement('usync-licence-status')
|
|
48
|
+
], uSyncLicenceStatusView);
|
|
49
|
+
export { uSyncLicenceStatusView };
|
|
50
|
+
export default uSyncLicenceStatusView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const JumooLicenceStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { css } from '@umbraco-cms/backoffice/external/lit';
|
|
2
|
+
export const JumooLicenceStyles = css `
|
|
3
|
+
.licence-alert {
|
|
4
|
+
padding: 20px;
|
|
5
|
+
border-radius: var(--uui-button-border-radius, var(--uui-border-radius, 3px));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
uui-icon {
|
|
9
|
+
padding-right: 10px;
|
|
10
|
+
font-size: var(--uui-type-h4-size);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.valid {
|
|
14
|
+
background-color: var(--uui-color-positive);
|
|
15
|
+
color: var(--uui-color-positive-contrast);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.invalid,
|
|
19
|
+
.expired {
|
|
20
|
+
background-color: var(--uui-color-danger);
|
|
21
|
+
color: var(--uui-color-danger-contrast);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.trial {
|
|
25
|
+
background-color: var(--uui-color-warning);
|
|
26
|
+
color: var(--uui-color-warning-contrast);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.licence-alert a {
|
|
30
|
+
color: var(--uui-color-positive-contrast) !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.trial a {
|
|
34
|
+
color: var(--uui-color-warning-contrast) !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.invalid a,
|
|
38
|
+
.expired a {
|
|
39
|
+
color: var(--uui-color-danger-contrast) !important;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
usynccomplete: {
|
|
3
|
+
licenceValid: string;
|
|
4
|
+
licenceInvalid: string;
|
|
5
|
+
licenceTrial: string;
|
|
6
|
+
licenceExpired: string;
|
|
7
|
+
licenceExpires: string;
|
|
8
|
+
licenceDaysLeft: string;
|
|
9
|
+
licenceAutoRenews: string;
|
|
10
|
+
licenceNotAutoRenews: string;
|
|
11
|
+
licenceStatus: string;
|
|
12
|
+
licenceSubscriptionInfo: string;
|
|
13
|
+
licenceClearHeading: string;
|
|
14
|
+
licenceClearContent: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
usynccomplete: {
|
|
3
|
+
licenceValid: 'Your licence is valid',
|
|
4
|
+
licenceInvalid: `Your licence is currently invalid - <a href="/umbraco/section/settings/workspace/usync-root/view/licence">Check licence</a>`,
|
|
5
|
+
licenceTrial: 'You are running a trial version of uSync.Complete',
|
|
6
|
+
licenceExpired: 'Your uSync.Complete licence has expired.',
|
|
7
|
+
licenceExpires: 'Your uSync.Complete licence expires on {0}.',
|
|
8
|
+
licenceDaysLeft: 'You have {0} days left on your licence.',
|
|
9
|
+
licenceAutoRenews: 'This licence will auto-renew at the end of the period.',
|
|
10
|
+
licenceNotAutoRenews: 'This licence does not auto-renew, You will need to renew it manually.',
|
|
11
|
+
licenceStatus: 'uSync.Complete licence status',
|
|
12
|
+
licenceSubscriptionInfo: `<p>Your subscription licence can be managed via the link sent to you when you purchased licence</p>
|
|
13
|
+
<p>For security reasons we don't show you that information in the umbraco back office but you can request that we send the details again</p>`,
|
|
14
|
+
licenceClearHeading: 'Clear licence details?',
|
|
15
|
+
licenceClearContent: 'Do you want to remove this current licence details? Once cleared you will need to re-enter your licence details.',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: UmbExtensionManifest[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const localizations = [
|
|
2
|
+
{
|
|
3
|
+
type: 'localization',
|
|
4
|
+
alias: 'usync.complete.en',
|
|
5
|
+
name: 'uSyncComplete Localizations English',
|
|
6
|
+
weight: 0,
|
|
7
|
+
js: () => import('./en.js'),
|
|
8
|
+
meta: {
|
|
9
|
+
culture: 'en',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
];
|
|
13
|
+
export const manifests = [...localizations];
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { Licence, LicenceInfo, LicenceStatusView } from '@jumoo/usync-expansions';
|
|
5
|
+
import './components/licence-notice';
|
|
6
|
+
export declare class uSyncLicenceContext extends UmbControllerBase {
|
|
7
|
+
#private;
|
|
8
|
+
readonly licence: import("rxjs").Observable<Licence | undefined>;
|
|
9
|
+
readonly licenceStatus: import("rxjs").Observable<LicenceStatusView | undefined>;
|
|
10
|
+
constructor(host: UmbControllerHost);
|
|
11
|
+
refresh(): Promise<void>;
|
|
12
|
+
saveLicence(licence: LicenceInfo): Promise<void>;
|
|
13
|
+
loadLicence(): Promise<void>;
|
|
14
|
+
getLicenceStatus(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export default uSyncLicenceContext;
|
|
17
|
+
export declare const USYNC_LICENCE_CONTEXT_TOKEN: UmbContextToken<uSyncLicenceContext, uSyncLicenceContext>;
|
|
@@ -0,0 +1,66 @@
|
|
|
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 _uSyncLicenceContext_repository, _uSyncLicenceContext_notificationContext, _uSyncLicenceContext_licence, _uSyncLicenceContext_licenceStatus;
|
|
13
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
14
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
15
|
+
import { uSyncLicenceRepository } from '@jumoo/usync-expansions';
|
|
16
|
+
import { UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
|
|
17
|
+
import { UMB_NOTIFICATION_CONTEXT, } from '@umbraco-cms/backoffice/notification';
|
|
18
|
+
import './components/licence-notice';
|
|
19
|
+
export class uSyncLicenceContext extends UmbControllerBase {
|
|
20
|
+
constructor(host) {
|
|
21
|
+
super(host);
|
|
22
|
+
_uSyncLicenceContext_repository.set(this, void 0);
|
|
23
|
+
_uSyncLicenceContext_notificationContext.set(this, void 0);
|
|
24
|
+
_uSyncLicenceContext_licence.set(this, new UmbObjectState(undefined));
|
|
25
|
+
this.licence = __classPrivateFieldGet(this, _uSyncLicenceContext_licence, "f").asObservable();
|
|
26
|
+
_uSyncLicenceContext_licenceStatus.set(this, new UmbObjectState(undefined));
|
|
27
|
+
this.licenceStatus = __classPrivateFieldGet(this, _uSyncLicenceContext_licenceStatus, "f").asObservable();
|
|
28
|
+
this.consumeContext(UMB_NOTIFICATION_CONTEXT, (_instance) => {
|
|
29
|
+
__classPrivateFieldSet(this, _uSyncLicenceContext_notificationContext, _instance, "f");
|
|
30
|
+
});
|
|
31
|
+
__classPrivateFieldSet(this, _uSyncLicenceContext_repository, new uSyncLicenceRepository(this), "f");
|
|
32
|
+
this.provideContext(USYNC_LICENCE_CONTEXT_TOKEN, this);
|
|
33
|
+
}
|
|
34
|
+
async refresh() {
|
|
35
|
+
await this.loadLicence();
|
|
36
|
+
await this.getLicenceStatus();
|
|
37
|
+
}
|
|
38
|
+
async saveLicence(licence) {
|
|
39
|
+
const { data } = await __classPrivateFieldGet(this, _uSyncLicenceContext_repository, "f").saveLicence(licence);
|
|
40
|
+
if (data) {
|
|
41
|
+
await this.loadLicence();
|
|
42
|
+
await this.refresh();
|
|
43
|
+
__classPrivateFieldGet(this, _uSyncLicenceContext_notificationContext, "f")?.peek('positive', {
|
|
44
|
+
data: {
|
|
45
|
+
headline: 'Licence saved',
|
|
46
|
+
message: 'Licence has been saved',
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async loadLicence() {
|
|
52
|
+
const { data } = await __classPrivateFieldGet(this, _uSyncLicenceContext_repository, "f").getLicence();
|
|
53
|
+
if (data) {
|
|
54
|
+
__classPrivateFieldGet(this, _uSyncLicenceContext_licence, "f").setValue(data);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async getLicenceStatus() {
|
|
58
|
+
const { data } = await __classPrivateFieldGet(this, _uSyncLicenceContext_repository, "f").getLicenceStatus();
|
|
59
|
+
if (data) {
|
|
60
|
+
__classPrivateFieldGet(this, _uSyncLicenceContext_licenceStatus, "f").setValue(data);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
_uSyncLicenceContext_repository = new WeakMap(), _uSyncLicenceContext_notificationContext = new WeakMap(), _uSyncLicenceContext_licence = new WeakMap(), _uSyncLicenceContext_licenceStatus = new WeakMap();
|
|
65
|
+
export default uSyncLicenceContext;
|
|
66
|
+
export const USYNC_LICENCE_CONTEXT_TOKEN = new UmbContextToken('uSyncLicenceContext');
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LitElement, nothing } from '@umbraco-cms/backoffice/external/lit';
|
|
2
|
+
import { LicenceInfo, LicenceStatusView } from '@jumoo/usync-expansions';
|
|
3
|
+
import { UUIButtonState } from '@umbraco-cms/backoffice/external/uui';
|
|
4
|
+
declare const uSyncLicenceViewElement_base: import("@umbraco-cms/backoffice/extension-api").HTMLElementConstructor<import("@umbraco-cms/backoffice/element-api").UmbElement> & typeof LitElement;
|
|
5
|
+
export declare class uSyncLicenceViewElement extends uSyncLicenceViewElement_base {
|
|
6
|
+
#private;
|
|
7
|
+
saveState?: UUIButtonState;
|
|
8
|
+
constructor();
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
licence: LicenceInfo;
|
|
11
|
+
licenceStatus: LicenceStatusView | undefined;
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
renderStatus(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
renderDetails(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
15
|
+
renderSubscription(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
16
|
+
renderExpiration(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
17
|
+
static styles: import("lit").CSSResult[];
|
|
18
|
+
}
|
|
19
|
+
export default uSyncLicenceViewElement;
|