@jumoo/usync-expansions 18.3.0 → 18.4.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.
Files changed (43) hide show
  1. package/dist/api/client.gen.js +1 -1
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/sdk.gen.d.ts +17 -15
  4. package/dist/api/sdk.gen.js +14 -0
  5. package/dist/api/types.gen.d.ts +72 -0
  6. package/dist/background/background-pipeline.repository.d.ts +3 -8
  7. package/dist/background/components/pending-list.element.js +10 -10
  8. package/dist/background/components/pipelines-table.element.js +16 -16
  9. package/dist/background/components/process-list.element.js +6 -6
  10. package/dist/background/components/queue-table.element.js +11 -11
  11. package/dist/background/workspace/background-workspace-element.js +19 -19
  12. package/dist/components/report-summary-view.js +90 -90
  13. package/dist/components/usync-property-layout.js +93 -93
  14. package/dist/items/sync-item.context.d.ts +1 -1
  15. package/dist/items/sync-item.repository.d.ts +3 -8
  16. package/dist/lang/en.d.ts +1 -0
  17. package/dist/lang/en.js +1 -0
  18. package/dist/licence/components/licence-notice.js +7 -7
  19. package/dist/licence/components/licence-status.view.js +13 -13
  20. package/dist/licence/components/styles.js +39 -39
  21. package/dist/licence/lang/en.d.ts +15 -0
  22. package/dist/licence/lang/en.js +16 -1
  23. package/dist/licence/licence.context.d.ts +6 -1
  24. package/dist/licence/licence.context.js +11 -0
  25. package/dist/licence/licence.element.d.ts +8 -1
  26. package/dist/licence/licence.element.js +269 -126
  27. package/dist/licence/licence.repository.d.ts +1 -0
  28. package/dist/licence/licence.repository.js +3 -0
  29. package/dist/licence/source/licence.source.d.ts +2 -1
  30. package/dist/licence/source/licence.source.js +3 -0
  31. package/dist/restore/components/restore-point-table.element.js +21 -21
  32. package/dist/restore/lang/en.js +11 -11
  33. package/dist/restore/restore.context.d.ts +1 -1
  34. package/dist/restore/restore.repository.d.ts +9 -4
  35. package/dist/restore/restore.repository.js +7 -0
  36. package/dist/restore/steps/restore-create-complete.js +9 -9
  37. package/dist/restore/steps/restore-create-element.js +31 -31
  38. package/dist/restore/steps/restore-report-config-element.js +44 -44
  39. package/dist/restore/steps/restore-report-element.d.ts +1 -0
  40. package/dist/restore/steps/restore-report-element.js +29 -1
  41. package/dist/restore/workspace/restore.workspace-view.element.js +42 -42
  42. package/dist/restore/workspace/restore.workspace.element.js +25 -25
  43. package/package.json +53 -52
@@ -24,23 +24,23 @@ let uSyncPropertyLayout = class uSyncPropertyLayout extends UmbLitElement {
24
24
  }
25
25
  render() {
26
26
  // TODO: Only show alias on label if user has access to DocumentType within settings:
27
- return html `
28
- <div id="headerColumn">
29
- <uui-label id="label" title=${this.alias} ?required=${this.mandatory}>
30
- ${this.localize.string(this.label)}
31
- ${when(this.invalid, () => html `<div id="invalid-badge">
32
- <uui-badge color="invalid" attention>!</uui-badge>
33
- </div>`)}
34
- </uui-label>
35
- <slot name="action-menu"></slot>
36
- ${__classPrivateFieldGet(this, _uSyncPropertyLayout_instances, "m", _uSyncPropertyLayout_renderDescription).call(this)}
37
- <slot name="description"></slot>
38
- </div>
39
- <div id="editorColumn">
40
- <umb-form-validation-message>
41
- <slot name="editor"></slot>
42
- </umb-form-validation-message>
43
- </div>
27
+ return html `
28
+ <div id="headerColumn">
29
+ <uui-label id="label" title=${this.alias} ?required=${this.mandatory}>
30
+ ${this.localize.string(this.label)}
31
+ ${when(this.invalid, () => html `<div id="invalid-badge">
32
+ <uui-badge color="invalid" attention>!</uui-badge>
33
+ </div>`)}
34
+ </uui-label>
35
+ <slot name="action-menu"></slot>
36
+ ${__classPrivateFieldGet(this, _uSyncPropertyLayout_instances, "m", _uSyncPropertyLayout_renderDescription).call(this)}
37
+ <slot name="description"></slot>
38
+ </div>
39
+ <div id="editorColumn">
40
+ <umb-form-validation-message>
41
+ <slot name="editor"></slot>
42
+ </umb-form-validation-message>
43
+ </div>
44
44
  `;
45
45
  }
46
46
  };
@@ -53,86 +53,86 @@ _uSyncPropertyLayout_renderDescription = function _uSyncPropertyLayout_renderDes
53
53
  label: this.label,
54
54
  description: this.description,
55
55
  };
56
- return html `<umb-ufm-render
57
- id="description"
58
- .markdown=${this.description}
56
+ return html `<umb-ufm-render
57
+ id="description"
58
+ .markdown=${this.description}
59
59
  .value=${ufmValue}></umb-ufm-render>`;
60
60
  };
61
61
  uSyncPropertyLayout.styles = [
62
62
  UmbTextStyles,
63
- css `
64
- :host {
65
- display: grid;
66
- grid-template-columns: 100px minmax(0, 1fr);
67
- column-gap: var(--uui-size-layout-2);
68
- padding: var(--uui-size-4) 0;
69
- container-type: inline-size;
70
- }
71
-
72
- :host(:not([alignment='left'])) {
73
- grid-template-columns: 300px minmax(0, 1fr);
74
- }
75
-
76
- :host > div {
77
- grid-column: span 2;
78
- }
79
-
80
- :host(:not([orientation='vertical'])) > div {
81
- grid-column: span 1;
82
- }
83
-
84
- #headerColumn {
85
- position: relative;
86
- height: min-content;
87
- top: var(--umb-property-layout-header-top);
88
- }
89
-
90
- :host(:not([orientation='vertical'])) #headerColumn {
91
- position: sticky;
92
- top: var(--umb-property-layout-header-top, calc(var(--uui-size-space-2) * -1));
93
- }
94
-
95
- :host {
96
- /* TODO: Temp solution to not get a yellow asterisk when invalid. */
97
- --umb-temp-uui-color-invalid: var(--uui-color-invalid);
98
- }
99
-
100
- #label {
101
- position: relative;
102
- word-break: break-word;
103
- /* TODO: Temp solution to not get a yellow asterisk when invalid. */
104
- --uui-color-invalid: var(--uui-color-danger);
105
- }
106
- #invalid-badge {
107
- display: inline-block;
108
- position: relative;
109
- width: 18px;
110
- height: 1em;
111
- margin-right: 6px;
112
- }
113
- uui-badge {
114
- //height: var(--uui-color-invalid);
115
- background-color: var(--umb-temp-uui-color-invalid);
116
- color: var(--uui-color-invalid-contrast);
117
- }
118
-
119
- #description {
120
- color: var(--uui-color-text-alt);
121
- }
122
-
123
- #editorColumn {
124
- display: flex;
125
- align-items: center;
126
- margin-top: var(--uui-size-space-3);
127
- }
128
-
129
- :host(:not([alignment='left'])) #editorColumn {
130
- justify-content: flex-end;
131
- }
132
-
133
- :host(:not([orientation='vertical'])) #editorColumn {
134
- margin-top: 0;
135
- }
63
+ css `
64
+ :host {
65
+ display: grid;
66
+ grid-template-columns: 100px minmax(0, 1fr);
67
+ column-gap: var(--uui-size-layout-2);
68
+ padding: var(--uui-size-4) 0;
69
+ container-type: inline-size;
70
+ }
71
+
72
+ :host(:not([alignment='left'])) {
73
+ grid-template-columns: 300px minmax(0, 1fr);
74
+ }
75
+
76
+ :host > div {
77
+ grid-column: span 2;
78
+ }
79
+
80
+ :host(:not([orientation='vertical'])) > div {
81
+ grid-column: span 1;
82
+ }
83
+
84
+ #headerColumn {
85
+ position: relative;
86
+ height: min-content;
87
+ top: var(--umb-property-layout-header-top);
88
+ }
89
+
90
+ :host(:not([orientation='vertical'])) #headerColumn {
91
+ position: sticky;
92
+ top: var(--umb-property-layout-header-top, calc(var(--uui-size-space-2) * -1));
93
+ }
94
+
95
+ :host {
96
+ /* TODO: Temp solution to not get a yellow asterisk when invalid. */
97
+ --umb-temp-uui-color-invalid: var(--uui-color-invalid);
98
+ }
99
+
100
+ #label {
101
+ position: relative;
102
+ word-break: break-word;
103
+ /* TODO: Temp solution to not get a yellow asterisk when invalid. */
104
+ --uui-color-invalid: var(--uui-color-danger);
105
+ }
106
+ #invalid-badge {
107
+ display: inline-block;
108
+ position: relative;
109
+ width: 18px;
110
+ height: 1em;
111
+ margin-right: 6px;
112
+ }
113
+ uui-badge {
114
+ //height: var(--uui-color-invalid);
115
+ background-color: var(--umb-temp-uui-color-invalid);
116
+ color: var(--uui-color-invalid-contrast);
117
+ }
118
+
119
+ #description {
120
+ color: var(--uui-color-text-alt);
121
+ }
122
+
123
+ #editorColumn {
124
+ display: flex;
125
+ align-items: center;
126
+ margin-top: var(--uui-size-space-3);
127
+ }
128
+
129
+ :host(:not([alignment='left'])) #editorColumn {
130
+ justify-content: flex-end;
131
+ }
132
+
133
+ :host(:not([orientation='vertical'])) #editorColumn {
134
+ margin-top: 0;
135
+ }
136
136
  `,
137
137
  ];
138
138
  __decorate([
@@ -4,7 +4,7 @@ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
4
4
  export declare class SyncItemContext extends UmbControllerBase {
5
5
  #private;
6
6
  constructor(host: UmbControllerHost);
7
- getSyncItem(entityType: string, id: string): Promise<import("..").SyncEntity | undefined>;
7
+ getSyncItem(entityType: string, id: string): Promise<import("..").SyncEntity>;
8
8
  }
9
9
  export default SyncItemContext;
10
10
  export declare const SYNC_ITEM_CONTEXT_TOKEN: UmbContextToken<SyncItemContext, SyncItemContext>;
@@ -9,14 +9,9 @@ export declare class SyncItemRepository extends UmbControllerBase {
9
9
  * @param id they "key" for the item
10
10
  * @returns a SyncItem (which as the udi in it.)
11
11
  */
12
- GetSyncItem(entityType: string, id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
12
+ GetSyncItem(entityType: string, id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
13
13
  data: import("..").SyncEntity;
14
- error: undefined;
15
- } | {
16
- data: undefined;
17
- error: unknown;
18
- }) & {
19
- request?: Request;
20
- response?: Response;
14
+ request: Request;
15
+ response: Response;
21
16
  }>>;
22
17
  }
package/dist/lang/en.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare const _default: {
2
2
  uSyncReport: {
3
+ previewIncoming: string;
3
4
  noChanges: string;
4
5
  noChangesDescription: string;
5
6
  pendingChanges: string;
package/dist/lang/en.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  uSyncReport: {
3
+ previewIncoming: 'Incoming (restore point)',
3
4
  noChanges: 'No changes',
4
5
  noChangesDescription: 'It looks like the server is up to date and there are no new changes to be made.',
5
6
  pendingChanges: '%0% pending changes in %1% items.',
@@ -31,18 +31,18 @@ let uSyncLicenceNoticeElement = class uSyncLicenceNoticeElement extends UmbLitEl
31
31
  const messageString = `usynccomplete_licence${status}`;
32
32
  const className = status.toLowerCase();
33
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>
34
+ return html `<div class="licence-alert ${className}">
35
+ <uui-icon .name=${icon}></uui-icon>
36
+ <umb-localize key="${messageString}"></umb-localize>
37
37
  </div>`;
38
38
  }
39
39
  };
40
40
  uSyncLicenceNoticeElement.styles = [
41
41
  JumooLicenceStyles,
42
- css `
43
- .licence-alert {
44
- display: block;
45
- }
42
+ css `
43
+ .licence-alert {
44
+ display: block;
45
+ }
46
46
  `,
47
47
  ];
48
48
  __decorate([
@@ -18,26 +18,26 @@ let uSyncLicenceStatusView = class uSyncLicenceStatusView extends UmbElementMixi
18
18
  return nothing;
19
19
  const className = this.licenceStatus?.status.toLocaleLowerCase();
20
20
  const icon = this.licenceStatus?.status === 'Valid' ? 'icon-check' : 'icon-alert';
21
- return html ` <div class="licence-alert ${className}">
21
+ return html ` <div class="licence-alert ${className}">
22
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
- >`)}
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
30
  </div>`;
31
31
  }
32
32
  };
33
33
  uSyncLicenceStatusView.styles = [
34
34
  UmbTextStyles,
35
35
  JumooLicenceStyles,
36
- css `
37
- :host {
38
- display: block;
39
- margin-bottom: 10px;
40
- }
36
+ css `
37
+ :host {
38
+ display: block;
39
+ margin-bottom: 10px;
40
+ }
41
41
  `,
42
42
  ];
43
43
  __decorate([
@@ -1,41 +1,41 @@
1
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
- }
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
41
  `;
@@ -12,6 +12,21 @@ declare const _default: {
12
12
  licenceSubscriptionInfo: string;
13
13
  licenceClearHeading: string;
14
14
  licenceClearContent: string;
15
+ temporaryHeadline: string;
16
+ temporaryDescription: string;
17
+ temporaryButton: string;
18
+ temporaryConfirmHeadline: string;
19
+ temporaryConfirmContent: string;
20
+ temporaryConfirmBuy: string;
21
+ temporaryConfirmLabel: string;
22
+ temporarySaved: string;
23
+ temporarySavedExpires: string;
24
+ temporaryUpgrade: string;
25
+ temporaryInConfigHeadline: string;
26
+ temporaryInConfig: string;
27
+ temporaryKey: string;
28
+ temporaryDomains: string;
29
+ temporaryFailed: string;
15
30
  };
16
31
  };
17
32
  export default _default;
@@ -9,9 +9,24 @@ export default {
9
9
  licenceAutoRenews: 'This licence will auto-renew at the end of the period.',
10
10
  licenceNotAutoRenews: 'This licence does not auto-renew, You will need to renew it manually.',
11
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>
12
+ licenceSubscriptionInfo: `<p>Your subscription licence can be managed via the link sent to you when you purchased licence</p>
13
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
14
  licenceClearHeading: 'Clear licence details?',
15
15
  licenceClearContent: 'Do you want to remove this current licence details? Once cleared you will need to re-enter your licence details.',
16
+ temporaryHeadline: 'This key is for an older version',
17
+ temporaryDescription: 'You can get a one-off 60 day licence while you upgrade.',
18
+ temporaryButton: 'Get a temporary licence',
19
+ temporaryConfirmHeadline: 'Get a temporary licence?',
20
+ temporaryConfirmContent: 'This gives you a licence that lasts 60 days, so you can keep working while you upgrade your licence. Each key can only get one temporary licence.',
21
+ temporaryConfirmBuy: 'You will need to buy an upgraded licence before the temporary one runs out.',
22
+ temporaryConfirmLabel: 'Get licence',
23
+ temporarySaved: 'Your temporary licence has been saved.',
24
+ temporarySavedExpires: 'Your temporary licence has been saved. It expires on {0}.',
25
+ temporaryUpgrade: 'Upgrade your licence',
26
+ temporaryInConfigHeadline: 'Your temporary licence',
27
+ temporaryInConfig: 'Your licence is set in appsettings, so it can not be saved here. Replace the key and domains in the <code>uSync:Complete:Licence</code> section of your appsettings with these values, then restart the site.',
28
+ temporaryKey: 'Key',
29
+ temporaryDomains: 'Domains',
30
+ temporaryFailed: 'Unable to get a temporary licence',
16
31
  },
17
32
  };
@@ -1,7 +1,7 @@
1
1
  import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
2
  import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
3
3
  import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
4
- import { Licence, LicenceInfo, LicenceStatusView } from '@jumoo/usync-expansions';
4
+ import { Licence, LicenceInfo, LicenceStatusView, TemporaryLicenceResult } from '@jumoo/usync-expansions';
5
5
  import './components/licence-notice';
6
6
  export declare class uSyncLicenceContext extends UmbControllerBase {
7
7
  #private;
@@ -10,6 +10,11 @@ export declare class uSyncLicenceContext extends UmbControllerBase {
10
10
  constructor(host: UmbControllerHost);
11
11
  refresh(): Promise<void>;
12
12
  saveLicence(licence: LicenceInfo): Promise<void>;
13
+ /**
14
+ * Ask the jumoo site for a one-off 60 day licence for a key from an older version.
15
+ * When the key is saved we refresh, so the page shows the new expiry.
16
+ */
17
+ requestTemporaryLicence(): Promise<TemporaryLicenceResult | undefined>;
13
18
  loadLicence(): Promise<void>;
14
19
  getLicenceStatus(): Promise<void>;
15
20
  }
@@ -48,6 +48,17 @@ export class uSyncLicenceContext extends UmbControllerBase {
48
48
  });
49
49
  }
50
50
  }
51
+ /**
52
+ * Ask the jumoo site for a one-off 60 day licence for a key from an older version.
53
+ * When the key is saved we refresh, so the page shows the new expiry.
54
+ */
55
+ async requestTemporaryLicence() {
56
+ const { data } = await __classPrivateFieldGet(this, _uSyncLicenceContext_repository, "f").requestTemporaryLicence();
57
+ if (data?.saved) {
58
+ await this.refresh();
59
+ }
60
+ return data;
61
+ }
51
62
  async loadLicence() {
52
63
  const { data } = await __classPrivateFieldGet(this, _uSyncLicenceContext_repository, "f").getLicence();
53
64
  if (data) {
@@ -1,16 +1,23 @@
1
1
  import { LitElement, nothing } from '@umbraco-cms/backoffice/external/lit';
2
- import { LicenceInfo, LicenceStatusView } from '@jumoo/usync-expansions';
2
+ import { LicenceInfo, LicenceStatusView, TemporaryLicenceResult } from '@jumoo/usync-expansions';
3
3
  import { UUIButtonState } from '@umbraco-cms/backoffice/external/uui';
4
4
  declare const uSyncLicenceViewElement_base: import("@umbraco-cms/backoffice/extension-api").HTMLElementConstructor<import("@umbraco-cms/backoffice/element-api").UmbElement> & typeof LitElement;
5
5
  export declare class uSyncLicenceViewElement extends uSyncLicenceViewElement_base {
6
6
  #private;
7
7
  saveState?: UUIButtonState;
8
+ private _temporaryResult?;
9
+ private _requestingTemporary;
8
10
  constructor();
9
11
  connectedCallback(): void;
10
12
  licence: LicenceInfo;
11
13
  licenceStatus: LicenceStatusView | undefined;
12
14
  render(): import("lit-html").TemplateResult<1>;
13
15
  renderStatus(): import("lit-html").TemplateResult<1>;
16
+ renderTemporary(): typeof nothing | import("lit-html").TemplateResult<1>;
17
+ renderTemporarySaved(result: TemporaryLicenceResult): import("lit-html").TemplateResult<1>;
18
+ renderTemporaryInConfig(result: TemporaryLicenceResult): import("lit-html").TemplateResult<1>;
19
+ renderCopyValue(labelKey: string, value: string): import("lit-html").TemplateResult<1>;
20
+ renderUpgradeButton(): import("lit-html").TemplateResult<1>;
14
21
  renderDetails(): typeof nothing | import("lit-html").TemplateResult<1>;
15
22
  renderSubscription(): typeof nothing | import("lit-html").TemplateResult<1>;
16
23
  renderExpiration(): typeof nothing | import("lit-html").TemplateResult<1>;