@jumoo/usync 18.2.0 → 19.0.0-beta01

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 (45) hide show
  1. package/LICENCE +372 -372
  2. package/README.md +10 -10
  3. package/dist/api/sdk.gen.js +5 -1
  4. package/dist/api/types.gen.d.ts +18 -1
  5. package/dist/components/usync-action-box.js +71 -71
  6. package/dist/components/usync-change-detail.js +409 -409
  7. package/dist/components/usync-change-view.js +49 -49
  8. package/dist/components/usync-progress-box.js +113 -113
  9. package/dist/components/usync-result-row.js +65 -65
  10. package/dist/components/usync-results-group-view.js +63 -63
  11. package/dist/components/usync-results-view.js +64 -64
  12. package/dist/components/usync-sync-file-info-view.js +10 -10
  13. package/dist/conditions/new-section.condition.js +16 -2
  14. package/dist/constants.js +1 -1
  15. package/dist/dialogs/details-modal-element.js +45 -45
  16. package/dist/dialogs/error-modal-element.js +22 -22
  17. package/dist/dialogs/legacy-modal-element.d.ts +11 -5
  18. package/dist/dialogs/legacy-modal-element.js +90 -38
  19. package/dist/dialogs/single-import-modal.element.js +31 -31
  20. package/dist/icons/svg/logo.js +20 -20
  21. package/dist/lang/files/da-dk.js +13 -13
  22. package/dist/lang/files/de-de.js +13 -13
  23. package/dist/lang/files/en-us.js +13 -13
  24. package/dist/lang/files/es-es.js +13 -13
  25. package/dist/lang/files/fr-fr.js +13 -13
  26. package/dist/lang/files/nl-nl.js +13 -13
  27. package/dist/repository/SyncAction.respositoy.d.ts +2 -1
  28. package/dist/repository/SyncAction.respositoy.js +3 -2
  29. package/dist/repository/sources/SyncMigration.source.d.ts +1 -1
  30. package/dist/repository/sources/SyncMigration.source.js +2 -2
  31. package/dist/signalr/signalr.context.js +5 -5
  32. package/dist/tree/usync.menu-element.js +8 -8
  33. package/dist/workspace/components/usync-action-button.js +53 -53
  34. package/dist/workspace/components/usync-file-picker.element.js +33 -33
  35. package/dist/workspace/components/usync-file-upload.element.js +25 -25
  36. package/dist/workspace/dialogs/import-modal.element.js +22 -22
  37. package/dist/workspace/views/addons/addons.element.js +97 -97
  38. package/dist/workspace/views/default/default.element.js +186 -186
  39. package/dist/workspace/views/legacy/legacy.element.js +87 -91
  40. package/dist/workspace/views/settings/components/usyncSettingItem.element.js +38 -38
  41. package/dist/workspace/views/settings/settings.element.js +124 -124
  42. package/dist/workspace/workspace.context.d.ts +1 -1
  43. package/dist/workspace/workspace.context.js +2 -2
  44. package/dist/workspace/workspace.element.js +16 -16
  45. package/package.json +77 -77
@@ -26,58 +26,58 @@ let SyncActionButtonElement = class SyncActionButtonElement extends UmbLitElemen
26
26
  : this.renderSingleAction();
27
27
  }
28
28
  renderSingleAction() {
29
- return html ` <uui-button
30
- class="action-button"
31
- .disabled=${this.disabled}
32
- label=${this.localize.termOrDefault(`uSync_${this.button?.label}`, this.button?.label ?? '')}
33
- color=${this.button?.color}
34
- look=${this.button?.look}
35
- state=${ifDefined(this.state)}
29
+ return html ` <uui-button
30
+ class="action-button"
31
+ .disabled=${this.disabled}
32
+ label=${this.localize.termOrDefault(`uSync_${this.button?.label}`, this.button?.label ?? '')}
33
+ color=${this.button?.color}
34
+ look=${this.button?.look}
35
+ state=${ifDefined(this.state)}
36
36
  @click=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, this.button)}></uui-button>`;
37
37
  }
38
38
  renderMultipleActions(parent) {
39
39
  if (!this.button?.children)
40
40
  return nothing;
41
41
  const buttons = this.button?.children.map((item) => {
42
- return html ` <uui-menu-item
43
- .disabled=${this.disabled}
44
- .label=${this.localize.termOrDefault(`uSync_${item.label}`, item.label)}
42
+ return html ` <uui-menu-item
43
+ .disabled=${this.disabled}
44
+ .label=${this.localize.termOrDefault(`uSync_${item.label}`, item.label)}
45
45
  @click-label=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, item)}></uui-menu-item>`;
46
46
  });
47
47
  if (buttons.length == 0)
48
48
  return nothing;
49
49
  const popoverId = `popover_${parent?.key}`;
50
- return html `
51
- <uui-button-group class="action-button">
52
- <uui-button
53
- .disabled=${this.disabled}
54
- .label=${this.button.label}
55
- color=${parent?.color}
56
- look=${parent?.look}
57
- @click=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, this.button)}>
58
- ${this.localize.termOrDefault(`uSync_${this.button?.label}`, this.button?.label ?? '')}
59
- </uui-button>
60
- <uui-button
61
- .disabled=${this.disabled}
62
- popovertarget=${popoverId}
63
- .label=${this.button.label}
64
- color=${parent?.color}
65
- look=${parent?.look}
66
- compact>
67
- <uui-symbol-expand
68
- class="expand-symbol"
69
- .open=${this._popoverOpen}></uui-symbol-expand>
70
- </uui-button>
71
- </uui-button-group>
72
-
73
- <uui-popover-container
74
- id=${popoverId}
75
- placement="bottom-end"
76
- @toggle=${__classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onPopoverToggle)}>
77
- <umb-popover-layout>
78
- <uui-scroll-container> ${buttons} </uui-scroll-container>
79
- </umb-popover-layout>
80
- </uui-popover-container>
50
+ return html `
51
+ <uui-button-group class="action-button">
52
+ <uui-button
53
+ .disabled=${this.disabled}
54
+ .label=${this.button.label}
55
+ color=${parent?.color}
56
+ look=${parent?.look}
57
+ @click=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, this.button)}>
58
+ ${this.localize.termOrDefault(`uSync_${this.button?.label}`, this.button?.label ?? '')}
59
+ </uui-button>
60
+ <uui-button
61
+ .disabled=${this.disabled}
62
+ popovertarget=${popoverId}
63
+ .label=${this.button.label}
64
+ color=${parent?.color}
65
+ look=${parent?.look}
66
+ compact>
67
+ <uui-symbol-expand
68
+ class="expand-symbol"
69
+ .open=${this._popoverOpen}></uui-symbol-expand>
70
+ </uui-button>
71
+ </uui-button-group>
72
+
73
+ <uui-popover-container
74
+ id=${popoverId}
75
+ placement="bottom-end"
76
+ @toggle=${__classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onPopoverToggle)}>
77
+ <umb-popover-layout>
78
+ <uui-scroll-container> ${buttons} </uui-scroll-container>
79
+ </umb-popover-layout>
80
+ </uui-popover-container>
81
81
  `;
82
82
  }
83
83
  };
@@ -90,18 +90,18 @@ _SyncActionButtonElement_onClick = function _SyncActionButtonElement_onClick(ite
90
90
  _SyncActionButtonElement_onPopoverToggle = function _SyncActionButtonElement_onPopoverToggle(e) {
91
91
  this._popoverOpen = e.newState === 'open';
92
92
  };
93
- SyncActionButtonElement.styles = css `
94
- .action-button {
95
- min-width: 110px;
96
- }
97
-
98
- .expand-symbol {
99
- transform: rotate(90deg);
100
- }
101
-
102
- .expand-symbol[open] {
103
- transform: rotate(180deg);
104
- }
93
+ SyncActionButtonElement.styles = css `
94
+ .action-button {
95
+ min-width: 110px;
96
+ }
97
+
98
+ .expand-symbol {
99
+ transform: rotate(90deg);
100
+ }
101
+
102
+ .expand-symbol[open] {
103
+ transform: rotate(180deg);
104
+ }
105
105
  `;
106
106
  __decorate([
107
107
  property({ type: Object })
@@ -38,53 +38,53 @@ let uSyncFilePicker = class uSyncFilePicker extends UmbLitElement {
38
38
  this.dispatchEvent(new uSyncFilePickerChangeEvent(this._file));
39
39
  }
40
40
  render() {
41
- return html `<input
42
- @click=${(e) => e.stopPropagation()}
43
- type="file"
44
- id="file"
45
- this.accept=${this.accept}
46
- @change=${this._onFilePickerChange} />
41
+ return html `<input
42
+ @click=${(e) => e.stopPropagation()}
43
+ type="file"
44
+ id="file"
45
+ this.accept=${this.accept}
46
+ @change=${this._onFilePickerChange} />
47
47
  ${this._renderFile()} ${this._renderButton()}`;
48
48
  }
49
49
  _renderFile() {
50
50
  if (!this._file)
51
51
  return nothing;
52
- return html ` <div class="file">
53
- <div>${this._file.name}</div>
54
- <uui-button
55
- @click="${() => this._removeFile()}"
56
- compact
57
- color="danger"
58
- label="Remove">
59
- <umb-icon name="icon-trash"></umb-icon>
60
- </uui-button>
52
+ return html ` <div class="file">
53
+ <div>${this._file.name}</div>
54
+ <uui-button
55
+ @click="${() => this._removeFile()}"
56
+ compact
57
+ color="danger"
58
+ label="Remove">
59
+ <umb-icon name="icon-trash"></umb-icon>
60
+ </uui-button>
61
61
  </div>`;
62
62
  }
63
63
  _renderButton() {
64
64
  return this._file
65
65
  ? nothing
66
- : html ` <uui-button
67
- id="add-button"
68
- look="placeholder"
69
- label=${this.label}
66
+ : html ` <uui-button
67
+ id="add-button"
68
+ look="placeholder"
69
+ label=${this.label}
70
70
  @click="${this._onUpload}"></uui-button>`;
71
71
  }
72
72
  };
73
73
  uSyncFilePicker.styles = [
74
- css `
75
- .file {
76
- display: flex;
77
- align-items: center;
78
- gap: var(--uui-size-space-2);
79
- }
80
-
81
- #file {
82
- display: none;
83
- }
84
-
85
- #add-button {
86
- width: 100%;
87
- }
74
+ css `
75
+ .file {
76
+ display: flex;
77
+ align-items: center;
78
+ gap: var(--uui-size-space-2);
79
+ }
80
+
81
+ #file {
82
+ display: none;
83
+ }
84
+
85
+ #add-button {
86
+ width: 100%;
87
+ }
88
88
  `,
89
89
  ];
90
90
  __decorate([
@@ -46,22 +46,22 @@ let uSyncFileUploadElement = class uSyncFileUploadElement extends UmbLitElement
46
46
  return html ` ${this.renderFile()} ${this.renderUploadButton()} `;
47
47
  }
48
48
  renderFile() {
49
- return html `
50
- <div class="upload-box">
51
- <usync-upload-file-picker
52
- label="Select uSync Zip file"
53
- @change=${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onFileChange)}></usync-upload-file-picker>
54
- </div>
49
+ return html `
50
+ <div class="upload-box">
51
+ <usync-upload-file-picker
52
+ label="Select uSync Zip file"
53
+ @change=${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onFileChange)}></usync-upload-file-picker>
54
+ </div>
55
55
  `;
56
56
  }
57
57
  renderUploadButton() {
58
58
  if (!this.selected)
59
59
  return nothing;
60
- return html `<uui-button
61
- type="button"
62
- look="primary"
63
- @click="${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onUpload)}"
64
- label="Upload"
60
+ return html `<uui-button
61
+ type="button"
62
+ look="primary"
63
+ @click="${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onUpload)}"
64
+ label="Upload"
65
65
  .state=${this.buttonState}></uui-button>`;
66
66
  }
67
67
  };
@@ -90,20 +90,20 @@ _uSyncFileUploadElement_uploadComplete = async function _uSyncFileUploadElement_
90
90
  _uSyncFileUploadElement_onFileChange = function _uSyncFileUploadElement_onFileChange(e) {
91
91
  this.selected = e.file;
92
92
  };
93
- uSyncFileUploadElement.styles = css `
94
- :host {
95
- display: flex;
96
- justify-content: space-between;
97
- }
98
-
99
- .upload-box {
100
- flex-grow: 2;
101
- }
102
-
103
- usync-upload-file-picker {
104
- width: 100%;
105
- flex-grow: 2;
106
- }
93
+ uSyncFileUploadElement.styles = css `
94
+ :host {
95
+ display: flex;
96
+ justify-content: space-between;
97
+ }
98
+
99
+ .upload-box {
100
+ flex-grow: 2;
101
+ }
102
+
103
+ usync-upload-file-picker {
104
+ width: 100%;
105
+ flex-grow: 2;
106
+ }
107
107
  `;
108
108
  __decorate([
109
109
  state()
@@ -18,30 +18,30 @@ let uSyncImportModalDialog = class uSyncImportModalDialog extends UmbModalBaseEl
18
18
  _uSyncImportModalDialog_instances.add(this);
19
19
  }
20
20
  render() {
21
- return html `
22
- <umb-body-layout .headline=${this.localize.termOrDefault('uSync_importHeader', 'Import from file')}>
23
- ${this.renderForm()} ${this.renderResult()}
24
- </umb-body-layout>
21
+ return html `
22
+ <umb-body-layout .headline=${this.localize.termOrDefault('uSync_importHeader', 'Import from file')}>
23
+ ${this.renderForm()} ${this.renderResult()}
24
+ </umb-body-layout>
25
25
  `;
26
26
  }
27
27
  renderForm() {
28
28
  if (this.result !== undefined)
29
29
  return;
30
- return html ` ${this.localize.termOrDefault('uSync_uploadIntro', 'Select a zip file containing uSync files that you want to upload')}
31
- <usync-file-upload @uploaded=${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onUploaded)}></usync-file-upload>
32
- <div slot="actions">
33
- <uui-button
34
- id="cancel"
35
- .label=${this.localize.term('general_close')}
36
- @click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onClose)}"></uui-button>
30
+ return html ` ${this.localize.termOrDefault('uSync_uploadIntro', 'Select a zip file containing uSync files that you want to upload')}
31
+ <usync-file-upload @uploaded=${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onUploaded)}></usync-file-upload>
32
+ <div slot="actions">
33
+ <uui-button
34
+ id="cancel"
35
+ .label=${this.localize.term('general_close')}
36
+ @click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onClose)}"></uui-button>
37
37
  </div>`;
38
38
  }
39
39
  renderResult() {
40
40
  if (this.result == undefined)
41
41
  return;
42
- return html `${when(this.result.success, () => html `${this.localize.termOrDefault('uSync_uploadSuccess', 'The files have been uploaded and extracted to the uSync folder')}`, () => html `${this.localize.termOrDefault('uSync_uploadError', 'There was an error uploading the files')} ${this.result?.errors}`)}
43
- <div slot="actions">
44
- <uui-button id="continue" label="Import" @click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onImport)}"></uui-button>
42
+ return html `${when(this.result.success, () => html `${this.localize.termOrDefault('uSync_uploadSuccess', 'The files have been uploaded and extracted to the uSync folder')}`, () => html `${this.localize.termOrDefault('uSync_uploadError', 'There was an error uploading the files')} ${this.result?.errors}`)}
43
+ <div slot="actions">
44
+ <uui-button id="continue" label="Import" @click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onImport)}"></uui-button>
45
45
  </div>`;
46
46
  }
47
47
  };
@@ -56,14 +56,14 @@ _uSyncImportModalDialog_onImport = function _uSyncImportModalDialog_onImport() {
56
56
  _uSyncImportModalDialog_onUploaded = function _uSyncImportModalDialog_onUploaded(e) {
57
57
  this.result = e.result;
58
58
  };
59
- uSyncImportModalDialog.styles = css `
60
- umb-body-layout {
61
- max-width: 450px;
62
- }
63
-
64
- usync-file-upload {
65
- padding: 10px 0;
66
- }
59
+ uSyncImportModalDialog.styles = css `
60
+ umb-body-layout {
61
+ max-width: 450px;
62
+ }
63
+
64
+ usync-file-upload {
65
+ padding: 10px 0;
66
+ }
67
67
  `;
68
68
  __decorate([
69
69
  state()
@@ -9,106 +9,106 @@ import { LitElement, css, customElement, html, } from '@umbraco-cms/backoffice/e
9
9
  const logo = '/App_Plugins/uSync/img/usync-complete.png';
10
10
  let uSyncAddOnsElement = class uSyncAddOnsElement extends UmbElementMixin(LitElement) {
11
11
  render() {
12
- return html `
13
- <umb-body-layout>
14
- <div class="addon-view">
15
- <div>
16
- <div class="header">
17
- <img src=${logo} />
18
- <h1>uSync Complete</h1>
19
- <p>
20
- uSync Complete gives you total control over your Umbraco settings and
21
- content.
22
- </p>
23
- </div>
24
-
25
- <div class="logos">
26
- <div class="logo">
27
- <uui-icon name="icon-shift"></uui-icon>
28
- <h4>publish</h4>
29
- </div>
30
- <div class="logo">
31
- <uui-icon name="icon-compress"></uui-icon>
32
- <h4>export</h4>
33
- </div>
34
- <div class="logo">
35
- <uui-icon name="icon-connection"></uui-icon>
36
- <h4>snapshot</h4>
37
- </div>
38
- <div class="logo">
39
- <uui-icon name="icon-undo"></uui-icon>
40
- <h4>restore</h4>
41
- </div>
42
- <div class="logo">
43
- <uui-icon name="icon-operator"></uui-icon>
44
- <h4>people</h4>
45
- </div>
46
- </div>
47
-
48
- <div class="cta">
49
- <uui-button
50
- href="https://jumoo.co.uk/uSync/complete/"
51
- target="_blank"
52
- color="positive"
53
- look="primary"
54
- label="Find out more"></uui-button>
55
- </div>
56
- </div>
57
- </div>
58
- </umb-body-layout>
12
+ return html `
13
+ <umb-body-layout>
14
+ <div class="addon-view">
15
+ <div>
16
+ <div class="header">
17
+ <img src=${logo} />
18
+ <h1>uSync Complete</h1>
19
+ <p>
20
+ uSync Complete gives you total control over your Umbraco settings and
21
+ content.
22
+ </p>
23
+ </div>
24
+
25
+ <div class="logos">
26
+ <div class="logo">
27
+ <uui-icon name="icon-shift"></uui-icon>
28
+ <h4>publish</h4>
29
+ </div>
30
+ <div class="logo">
31
+ <uui-icon name="icon-compress"></uui-icon>
32
+ <h4>export</h4>
33
+ </div>
34
+ <div class="logo">
35
+ <uui-icon name="icon-connection"></uui-icon>
36
+ <h4>snapshot</h4>
37
+ </div>
38
+ <div class="logo">
39
+ <uui-icon name="icon-undo"></uui-icon>
40
+ <h4>restore</h4>
41
+ </div>
42
+ <div class="logo">
43
+ <uui-icon name="icon-operator"></uui-icon>
44
+ <h4>people</h4>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="cta">
49
+ <uui-button
50
+ href="https://jumoo.co.uk/uSync/complete/"
51
+ target="_blank"
52
+ color="positive"
53
+ look="primary"
54
+ label="Find out more"></uui-button>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </umb-body-layout>
59
59
  `;
60
60
  }
61
61
  };
62
- uSyncAddOnsElement.styles = css `
63
- umb-body-layout {
64
- // background: linear-gradient(#e3e3f1,#f6f4f4);
65
- background: linear-gradient(var(--uui-color-background), var(--uui-color-border));
66
- }
67
-
68
- .addon-view {
69
- display: flex;
70
- justify-content: center;
71
- align-items: center;
72
- height: 100%;
73
- }
74
-
75
- .addon-view > div {
76
- margin-top: -15vh;
77
- }
78
-
79
- .header,
80
- .cta {
81
- display: flex;
82
- flex-direction: column;
83
- align-items: center;
84
- }
85
-
86
- .header {
87
- font-size: larger;
88
- margin-bottom: var(--uui-size-space-6);
89
- }
90
-
91
- .logos {
92
- display: flex;
93
- justify-content: space-between;
94
- font-size: var(--uui-type-h3-size);
95
- }
96
-
97
- .logo {
98
- display: flex;
99
- flex-direction: column;
100
- align-items: center;
101
- margin: var(--uui-size-space-2) var(--uui-size-space-6);
102
- color: var(--uui-color-text-alt);
103
- }
104
-
105
- .cta {
106
- margin: var(--uui-size-space-6) 0;
107
- }
108
-
109
- uui-button {
110
- font-size: var(--uui-type-h4-size);
111
- }
62
+ uSyncAddOnsElement.styles = css `
63
+ umb-body-layout {
64
+ // background: linear-gradient(#e3e3f1,#f6f4f4);
65
+ background: linear-gradient(var(--uui-color-background), var(--uui-color-border));
66
+ }
67
+
68
+ .addon-view {
69
+ display: flex;
70
+ justify-content: center;
71
+ align-items: center;
72
+ height: 100%;
73
+ }
74
+
75
+ .addon-view > div {
76
+ margin-top: -15vh;
77
+ }
78
+
79
+ .header,
80
+ .cta {
81
+ display: flex;
82
+ flex-direction: column;
83
+ align-items: center;
84
+ }
85
+
86
+ .header {
87
+ font-size: larger;
88
+ margin-bottom: var(--uui-size-space-6);
89
+ }
90
+
91
+ .logos {
92
+ display: flex;
93
+ justify-content: space-between;
94
+ font-size: var(--uui-type-h3-size);
95
+ }
96
+
97
+ .logo {
98
+ display: flex;
99
+ flex-direction: column;
100
+ align-items: center;
101
+ margin: var(--uui-size-space-2) var(--uui-size-space-6);
102
+ color: var(--uui-color-text-alt);
103
+ }
104
+
105
+ .cta {
106
+ margin: var(--uui-size-space-6) 0;
107
+ }
108
+
109
+ uui-button {
110
+ font-size: var(--uui-type-h4-size);
111
+ }
112
112
  `;
113
113
  uSyncAddOnsElement = __decorate([
114
114
  customElement('usync-addons-view')