@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,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 { css, customElement, html, nothing, state, } from '@umbraco-cms/backoffice/external/lit';
|
|
8
|
+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
9
|
+
import { JumooLicenceStyles } from './styles';
|
|
10
|
+
import { USYNC_LICENCE_CONTEXT_TOKEN } from '../licence.context';
|
|
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 { UmbObjectState } from '@umbraco-cms/backoffice/observable-api';
|
|
16
|
+
import { UMB_NOTIFICATION_CONTEXT, } from '@umbraco-cms/backoffice/notification';
|
|
17
|
+
import { uSyncLicenceRepository } from './licence.repository';
|
|
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;
|
|
@@ -0,0 +1,270 @@
|
|
|
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 _uSyncLicenceViewElement_instances, _uSyncLicenceViewElement_licenceContext, _uSyncLicenceViewElement_saveLicence, _uSyncLicenceViewElement_updateDomains, _uSyncLicenceViewElement_updateKey, _uSyncLicenceViewElement_clearLicence;
|
|
19
|
+
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
|
|
20
|
+
import { LitElement, css, customElement, html, nothing, state, when, } from '@umbraco-cms/backoffice/external/lit';
|
|
21
|
+
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
|
22
|
+
import { UMB_CONFIRM_MODAL, UMB_MODAL_MANAGER_CONTEXT, } from '@umbraco-cms/backoffice/modal';
|
|
23
|
+
import { USYNC_LICENCE_CONTEXT_TOKEN } from './licence.context';
|
|
24
|
+
let uSyncLicenceViewElement = class uSyncLicenceViewElement extends UmbElementMixin(LitElement) {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
_uSyncLicenceViewElement_instances.add(this);
|
|
28
|
+
_uSyncLicenceViewElement_licenceContext.set(this, void 0);
|
|
29
|
+
this.licence = {
|
|
30
|
+
key: 'key',
|
|
31
|
+
domains: 'domains',
|
|
32
|
+
};
|
|
33
|
+
this.licenceStatus = undefined;
|
|
34
|
+
this.consumeContext(USYNC_LICENCE_CONTEXT_TOKEN, (_context) => {
|
|
35
|
+
if (!_context)
|
|
36
|
+
return;
|
|
37
|
+
__classPrivateFieldSet(this, _uSyncLicenceViewElement_licenceContext, _context, "f");
|
|
38
|
+
_context.refresh();
|
|
39
|
+
this.observe(_context.licence, (_licence) => {
|
|
40
|
+
this.licence = {
|
|
41
|
+
key: _licence?.key ?? '',
|
|
42
|
+
domains: _licence?.domains ?? '',
|
|
43
|
+
};
|
|
44
|
+
this.requestUpdate('licence');
|
|
45
|
+
});
|
|
46
|
+
this.observe(_context.licenceStatus, (_status) => {
|
|
47
|
+
this.licenceStatus = _status;
|
|
48
|
+
this.requestUpdate('licenceStatus');
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
connectedCallback() {
|
|
53
|
+
super.connectedCallback();
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return html `
|
|
57
|
+
<umb-body-layout>
|
|
58
|
+
<div class="layout">
|
|
59
|
+
${this.renderStatus()} ${this.renderDetails()} ${this.renderSubscription()}
|
|
60
|
+
${this.renderExpiration()}
|
|
61
|
+
</div></umb-body-layout
|
|
62
|
+
>
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
renderStatus() {
|
|
66
|
+
return html `
|
|
67
|
+
<usync-licence-status .licenceStatus=${this.licenceStatus}></usync-licence-status>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
renderDetails() {
|
|
71
|
+
return this.licenceStatus
|
|
72
|
+
? html `
|
|
73
|
+
<uui-box headline="uSync.Complete.Licence">
|
|
74
|
+
<div slot="header-actions">
|
|
75
|
+
<uui-button
|
|
76
|
+
type="button"
|
|
77
|
+
look="outline"
|
|
78
|
+
color="danger"
|
|
79
|
+
label="Clear"
|
|
80
|
+
@click=${__classPrivateFieldGet(this, _uSyncLicenceViewElement_instances, "m", _uSyncLicenceViewElement_clearLicence)}></uui-button>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="details">
|
|
83
|
+
<umb-property-layout
|
|
84
|
+
label="Domains"
|
|
85
|
+
alias="domains"
|
|
86
|
+
description="Domains licence applys to">
|
|
87
|
+
<div slot="editor">
|
|
88
|
+
<uui-input
|
|
89
|
+
label="domains"
|
|
90
|
+
@input=${__classPrivateFieldGet(this, _uSyncLicenceViewElement_instances, "m", _uSyncLicenceViewElement_updateDomains)}
|
|
91
|
+
.value=${this.licence.domains}
|
|
92
|
+
.readonly=${this.licenceStatus?.licenceType ===
|
|
93
|
+
'Subscription'}></uui-input>
|
|
94
|
+
</div>
|
|
95
|
+
</umb-property-layout>
|
|
96
|
+
|
|
97
|
+
<umb-property-layout
|
|
98
|
+
label="Licence Key"
|
|
99
|
+
alias="key"
|
|
100
|
+
description="Key for licence">
|
|
101
|
+
<div slot="editor">
|
|
102
|
+
<uui-input
|
|
103
|
+
label="key"
|
|
104
|
+
@input=${__classPrivateFieldGet(this, _uSyncLicenceViewElement_instances, "m", _uSyncLicenceViewElement_updateKey)}
|
|
105
|
+
.value=${this.licence.key}></uui-input>
|
|
106
|
+
</div>
|
|
107
|
+
</umb-property-layout>
|
|
108
|
+
|
|
109
|
+
<div class="actions">
|
|
110
|
+
<uui-button
|
|
111
|
+
look="primary"
|
|
112
|
+
color="positive"
|
|
113
|
+
label="Save"
|
|
114
|
+
.state=${this.saveState}
|
|
115
|
+
@click=${__classPrivateFieldGet(this, _uSyncLicenceViewElement_instances, "m", _uSyncLicenceViewElement_saveLicence)}></uui-button>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</uui-box>
|
|
119
|
+
`
|
|
120
|
+
: nothing;
|
|
121
|
+
}
|
|
122
|
+
renderSubscription() {
|
|
123
|
+
if (this.licenceStatus?.licenceType !== 'Subscription')
|
|
124
|
+
return nothing;
|
|
125
|
+
if (!this.licenceStatus?.expires)
|
|
126
|
+
return nothing;
|
|
127
|
+
const expiresDate = new Date(this.licenceStatus.expires);
|
|
128
|
+
if (expiresDate >= new Date('9999-12-30'))
|
|
129
|
+
return nothing;
|
|
130
|
+
return html `<uui-box headline="uSync.Complete.Subscription">
|
|
131
|
+
<umb-localize key="usynccomplete_licenceSubscriptionInfo"></umb-localize>
|
|
132
|
+
<uui-button
|
|
133
|
+
look="secondary"
|
|
134
|
+
color="positive"
|
|
135
|
+
href="https://jumoo.co.uk/resend?sub=${this.licence.key}"
|
|
136
|
+
target="_blank"
|
|
137
|
+
rel="noopener noreferrer"
|
|
138
|
+
>Request subscription details</uui-button
|
|
139
|
+
>
|
|
140
|
+
</uui-box>`;
|
|
141
|
+
}
|
|
142
|
+
renderExpiration() {
|
|
143
|
+
if (!this.licenceStatus?.expires)
|
|
144
|
+
return nothing;
|
|
145
|
+
const expiresDate = new Date(this.licenceStatus.expires);
|
|
146
|
+
if (expiresDate >= new Date('9999-12-30'))
|
|
147
|
+
return nothing;
|
|
148
|
+
const today = new Date();
|
|
149
|
+
const remainingDays = Math.ceil((expiresDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24));
|
|
150
|
+
if (expiresDate < today) {
|
|
151
|
+
return html `<uui-box class="alert alert-danger">
|
|
152
|
+
<umb-localize key="usynccomplete_licenceExpired"></umb-localize>
|
|
153
|
+
</uui-box>`;
|
|
154
|
+
}
|
|
155
|
+
return html `<uui-box
|
|
156
|
+
class="alert ${remainingDays <= 60 && !this.licenceStatus.autoRenews ? 'alert-warning' : 'alert-default'}"
|
|
157
|
+
">
|
|
158
|
+
<div class="alert-content">
|
|
159
|
+
<div>
|
|
160
|
+
<umb-localize
|
|
161
|
+
key="usynccomplete_licenceExpires"
|
|
162
|
+
.args=${[expiresDate.toDateString()]}></umb-localize>
|
|
163
|
+
<umb-localize
|
|
164
|
+
key="usynccomplete_licenceDaysLeft"
|
|
165
|
+
.args=${[remainingDays]}></umb-localize>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<div>
|
|
169
|
+
${when(this.licenceStatus.autoRenews, () => html `<umb-icon name="icon-check"></umb-icon
|
|
170
|
+
><umb-localize key="usynccomplete_licenceAutoRenews"></umb-localize>`, () => html `<umb-icon name="icon-alarm-clock"></umb-icon
|
|
171
|
+
><umb-localize key="usynccomplete_licenceNotAutoRenews"></umb-localize>`)}</div>
|
|
172
|
+
</div>
|
|
173
|
+
</uui-box>`;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
_uSyncLicenceViewElement_licenceContext = new WeakMap();
|
|
177
|
+
_uSyncLicenceViewElement_instances = new WeakSet();
|
|
178
|
+
_uSyncLicenceViewElement_saveLicence = async function _uSyncLicenceViewElement_saveLicence() {
|
|
179
|
+
this.saveState = 'waiting';
|
|
180
|
+
await __classPrivateFieldGet(this, _uSyncLicenceViewElement_licenceContext, "f")?.saveLicence(this.licence);
|
|
181
|
+
this.saveState = 'success';
|
|
182
|
+
};
|
|
183
|
+
_uSyncLicenceViewElement_updateDomains = function _uSyncLicenceViewElement_updateDomains(e) {
|
|
184
|
+
const value = e.target.value;
|
|
185
|
+
this.licence.domains = value;
|
|
186
|
+
this.requestUpdate('licence');
|
|
187
|
+
};
|
|
188
|
+
_uSyncLicenceViewElement_updateKey = function _uSyncLicenceViewElement_updateKey(e) {
|
|
189
|
+
const value = e.target.value;
|
|
190
|
+
this.licence.key = value;
|
|
191
|
+
};
|
|
192
|
+
_uSyncLicenceViewElement_clearLicence = async function _uSyncLicenceViewElement_clearLicence() {
|
|
193
|
+
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
|
194
|
+
if (!modalManager)
|
|
195
|
+
return;
|
|
196
|
+
const confirmModal = modalManager.open(this, UMB_CONFIRM_MODAL, {
|
|
197
|
+
data: {
|
|
198
|
+
headline: this.localize.term('usynccomplete_licenceClearHeading'),
|
|
199
|
+
content: this.localize.term('usynccomplete_licenceClearContent'),
|
|
200
|
+
confirmLabel: this.localize.term('general_clear'),
|
|
201
|
+
color: 'danger',
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
confirmModal
|
|
205
|
+
.onSubmit()
|
|
206
|
+
.then(async () => {
|
|
207
|
+
await __classPrivateFieldGet(this, _uSyncLicenceViewElement_licenceContext, "f")?.saveLicence({ key: '', domains: '' });
|
|
208
|
+
this.requestUpdate('licence');
|
|
209
|
+
})
|
|
210
|
+
.catch(() => {
|
|
211
|
+
// console.log('cancel');
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
uSyncLicenceViewElement.styles = [
|
|
215
|
+
UmbTextStyles,
|
|
216
|
+
css `
|
|
217
|
+
.layout {
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
gap: var(--uui-size-space-4);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
uui-input {
|
|
224
|
+
width: 100%;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.actions {
|
|
228
|
+
padding-left: calc(200px + var(--uui-size-layout-2));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.alert-content {
|
|
232
|
+
display: flex;
|
|
233
|
+
justify-content: space-between;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.alert-content > div {
|
|
237
|
+
display: flex;
|
|
238
|
+
gap: 10px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.alert-danger {
|
|
242
|
+
background-color: var(--uui-color-danger);
|
|
243
|
+
color: var(--uui-color-danger-contrast);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.alert-default {
|
|
247
|
+
background-color: var(--uui-color-default);
|
|
248
|
+
color: var(--uui-color-default-contrast);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.alert-warning {
|
|
252
|
+
background-color: var(--uui-color-warning);
|
|
253
|
+
color: var(--uui-color-warning-contrast);
|
|
254
|
+
}
|
|
255
|
+
`,
|
|
256
|
+
];
|
|
257
|
+
__decorate([
|
|
258
|
+
state()
|
|
259
|
+
], uSyncLicenceViewElement.prototype, "saveState", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
state()
|
|
262
|
+
], uSyncLicenceViewElement.prototype, "licence", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
state()
|
|
265
|
+
], uSyncLicenceViewElement.prototype, "licenceStatus", void 0);
|
|
266
|
+
uSyncLicenceViewElement = __decorate([
|
|
267
|
+
customElement('usync-licence-view')
|
|
268
|
+
], uSyncLicenceViewElement);
|
|
269
|
+
export { uSyncLicenceViewElement };
|
|
270
|
+
export default uSyncLicenceViewElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
2
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
+
import { LicenceInfo } from '../api';
|
|
4
|
+
export declare class uSyncLicenceRepository extends UmbControllerBase {
|
|
5
|
+
#private;
|
|
6
|
+
product: string;
|
|
7
|
+
version: string;
|
|
8
|
+
constructor(host: UmbControllerHost);
|
|
9
|
+
checkLegacy(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<string>>;
|
|
10
|
+
getLicence(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<import("..").Licence>>;
|
|
11
|
+
getLicenceInfo(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<LicenceInfo>>;
|
|
12
|
+
getLicenceStatus(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<import("..").LicenceStatusView>>;
|
|
13
|
+
isLicenced(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<boolean>>;
|
|
14
|
+
saveLicence(licence: LicenceInfo): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<boolean>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 _uSyncLicenceRepository_licenceDataSource;
|
|
13
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
14
|
+
import { uSyncLicenceSource } from './source/licence.source';
|
|
15
|
+
export class uSyncLicenceRepository extends UmbControllerBase {
|
|
16
|
+
constructor(host) {
|
|
17
|
+
super(host);
|
|
18
|
+
_uSyncLicenceRepository_licenceDataSource.set(this, void 0);
|
|
19
|
+
this.product = 'uSync.Complete';
|
|
20
|
+
this.version = '15.0.0';
|
|
21
|
+
__classPrivateFieldSet(this, _uSyncLicenceRepository_licenceDataSource, new uSyncLicenceSource(this), "f");
|
|
22
|
+
}
|
|
23
|
+
async checkLegacy() {
|
|
24
|
+
return __classPrivateFieldGet(this, _uSyncLicenceRepository_licenceDataSource, "f").checkLegacy(this.product, this.version);
|
|
25
|
+
}
|
|
26
|
+
async getLicence() {
|
|
27
|
+
return __classPrivateFieldGet(this, _uSyncLicenceRepository_licenceDataSource, "f").getLicence(this.product, this.version);
|
|
28
|
+
}
|
|
29
|
+
async getLicenceInfo() {
|
|
30
|
+
return __classPrivateFieldGet(this, _uSyncLicenceRepository_licenceDataSource, "f").getLicenceInfo(this.product, this.version);
|
|
31
|
+
}
|
|
32
|
+
async getLicenceStatus() {
|
|
33
|
+
return __classPrivateFieldGet(this, _uSyncLicenceRepository_licenceDataSource, "f").getLicenceStatus(this.product, this.version);
|
|
34
|
+
}
|
|
35
|
+
async isLicenced() {
|
|
36
|
+
return __classPrivateFieldGet(this, _uSyncLicenceRepository_licenceDataSource, "f").isLicenced(this.product, this.version);
|
|
37
|
+
}
|
|
38
|
+
async saveLicence(licence) {
|
|
39
|
+
return __classPrivateFieldGet(this, _uSyncLicenceRepository_licenceDataSource, "f").saveLicence(licence);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
_uSyncLicenceRepository_licenceDataSource = new WeakMap();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: import("@umbraco-cms/backoffice/extension-api").ManifestBase[];
|