@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
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- ## uSync ui library.
2
-
3
- The uSync UI library ,is used by other uSync packages, to
4
- show things like changes, and updates ,etc.
5
-
6
- > [!IMPORTANT]
7
- > Most packages do not need to export thier client library
8
- as a npm package, unless your client library is also going
9
- to be used by child packages.
10
-
1
+ ## uSync ui library.
2
+
3
+ The uSync UI library ,is used by other uSync packages, to
4
+ show things like changes, and updates ,etc.
5
+
6
+ > [!IMPORTANT]
7
+ > Most packages do not need to export thier client library
8
+ as a npm package, unless your client library is also going
9
+ to be used by child packages.
10
+
@@ -61,7 +61,11 @@ export const getCheckLegacy = (options) => (options?.client ?? client).get({
61
61
  export const postCopyLegacy = (options) => (options?.client ?? client).post({
62
62
  security: [{ scheme: 'bearer', type: 'http' }],
63
63
  url: '/umbraco/usync/api/v1/CopyLegacy',
64
- ...options
64
+ ...options,
65
+ headers: {
66
+ 'Content-Type': 'application/json',
67
+ ...options?.headers
68
+ }
65
69
  });
66
70
  export const postIgnoreLegacy = (options) => (options?.client ?? client).post({
67
71
  security: [{ scheme: 'bearer', type: 'http' }],
@@ -119,9 +119,26 @@ export type SyncLegacyCheckResponse = {
119
119
  hasLegacy: boolean;
120
120
  legacyFolder?: null | string;
121
121
  legacyTypes: Array<string>;
122
+ migrations: Array<SyncLegacyMigrationResponse>;
122
123
  latestFolder: string;
123
124
  latestVersion: string;
124
125
  };
126
+ export type SyncLegacyMigrationResponse = {
127
+ id: string;
128
+ name: string;
129
+ description: string;
130
+ notice?: null | string;
131
+ /**
132
+ * number of data types the migration will change.
133
+ */
134
+ count: number;
135
+ };
136
+ export type SyncLegacyCopyRequest = {
137
+ /**
138
+ * ids of the migrations to run as the folder is copied.
139
+ */
140
+ migrations: Array<string>;
141
+ };
125
142
  export type SyncOperationStatusResponse = {
126
143
  operationId: string;
127
144
  requestId?: null | string;
@@ -429,7 +446,7 @@ export type GetCheckLegacyResponses = {
429
446
  };
430
447
  export type GetCheckLegacyResponse = GetCheckLegacyResponses[keyof GetCheckLegacyResponses];
431
448
  export type PostCopyLegacyData = {
432
- body?: never;
449
+ body?: SyncLegacyCopyRequest;
433
450
  path?: never;
434
451
  query?: never;
435
452
  url: '/umbraco/usync/api/v1/CopyLegacy';
@@ -25,26 +25,26 @@ let uSyncActionBox = class uSyncActionBox extends UmbLitElement {
25
25
  }
26
26
  render() {
27
27
  const dropdownButtons = this.group.buttons.map((b) => {
28
- return html `
29
- <usync-action-button
30
- .button=${b}
31
- .disabled=${this.disabled}
32
- state=${ifDefined(this.state)}
33
- @usync-action-click=${(e) => __classPrivateFieldGet(this, _uSyncActionBox_instances, "m", _uSyncActionBox_onAction).call(this, e, this.group)}></usync-action-button>
28
+ return html `
29
+ <usync-action-button
30
+ .button=${b}
31
+ .disabled=${this.disabled}
32
+ state=${ifDefined(this.state)}
33
+ @usync-action-click=${(e) => __classPrivateFieldGet(this, _uSyncActionBox_instances, "m", _uSyncActionBox_onAction).call(this, e, this.group)}></usync-action-button>
34
34
  `;
35
35
  });
36
- return html `
37
- <uui-box class="action-box ${this.disabled ? 'disabled' : ''}">
38
- <div class="box-content">
39
- <div class="box-heading">
40
- <h2 class="box-heading" title=${this.getLastSyncDate()}>
41
- ${this.localize.termOrDefault(`uSync_group${this.group?.groupName}`, this.group?.groupName ?? '')}
42
- </h2>
43
- <umb-icon name=${this.group?.icon}></umb-icon>
44
- </div>
45
- <div class="box-buttons">${dropdownButtons}</div>
46
- </div>
47
- </uui-box>
36
+ return html `
37
+ <uui-box class="action-box ${this.disabled ? 'disabled' : ''}">
38
+ <div class="box-content">
39
+ <div class="box-heading">
40
+ <h2 class="box-heading" title=${this.getLastSyncDate()}>
41
+ ${this.localize.termOrDefault(`uSync_group${this.group?.groupName}`, this.group?.groupName ?? '')}
42
+ </h2>
43
+ <umb-icon name=${this.group?.icon}></umb-icon>
44
+ </div>
45
+ <div class="box-buttons">${dropdownButtons}</div>
46
+ </div>
47
+ </uui-box>
48
48
  `;
49
49
  }
50
50
  getLastSyncDate() {
@@ -59,59 +59,59 @@ _uSyncActionBox_onAction = function _uSyncActionBox_onAction(e, group) {
59
59
  return;
60
60
  this.dispatchEvent(new uSyncActionPerformEvent(group, e.button.key, e.button.force, e.button.clean, e.button.file));
61
61
  };
62
- uSyncActionBox.styles = css `
63
- :host {
64
- flex-grow: 1;
65
- }
66
-
67
- .action-box {
68
- transition: opacity 0.2s ease-in-out;
69
- --uui-box-default-padding: var(--uui-size-space-4) 0;
70
- }
71
-
72
- .box-content {
73
- display: flex;
74
- flex-direction: column;
75
- align-items: center;
76
- }
77
-
78
- .box-heading {
79
- font-size: var(--uui-type-h3-size);
80
- cursor: help;
81
- margin: var(--uui-size-space-3);
82
- }
83
-
84
- umb-icon {
85
- margin: var(--uui-size-4) 0 var(--uui-size-4);
86
- font-size: var(--uui-type-h2-size);
87
- color: var(--uui-color-text-alt);
88
- }
89
-
90
- uui-button {
91
- margin: 0 var(--uui-size-space-2);
92
- font-size: var(--uui-size-6);
93
- }
94
-
95
- .box-buttons {
96
- margin: var(--uui-size-space-2) 0;
97
- }
98
-
99
- .disabled {
100
- opacity: 0.4;
101
- }
102
-
103
- .last-sync {
104
- color: var(--uui-color-text-alt);
105
- font-style: italic;
106
- font-size: var(--uui-size-5);
107
- }
108
-
109
- .box-heading {
110
- display: flex;
111
- flex-direction: row-reverse;
112
- gap: var(--uui-size-2);
113
- align-items: center;
114
- }
62
+ uSyncActionBox.styles = css `
63
+ :host {
64
+ flex-grow: 1;
65
+ }
66
+
67
+ .action-box {
68
+ transition: opacity 0.2s ease-in-out;
69
+ --uui-box-default-padding: var(--uui-size-space-4) 0;
70
+ }
71
+
72
+ .box-content {
73
+ display: flex;
74
+ flex-direction: column;
75
+ align-items: center;
76
+ }
77
+
78
+ .box-heading {
79
+ font-size: var(--uui-type-h3-size);
80
+ cursor: help;
81
+ margin: var(--uui-size-space-3);
82
+ }
83
+
84
+ umb-icon {
85
+ margin: var(--uui-size-4) 0 var(--uui-size-4);
86
+ font-size: var(--uui-type-h2-size);
87
+ color: var(--uui-color-text-alt);
88
+ }
89
+
90
+ uui-button {
91
+ margin: 0 var(--uui-size-space-2);
92
+ font-size: var(--uui-size-6);
93
+ }
94
+
95
+ .box-buttons {
96
+ margin: var(--uui-size-space-2) 0;
97
+ }
98
+
99
+ .disabled {
100
+ opacity: 0.4;
101
+ }
102
+
103
+ .last-sync {
104
+ color: var(--uui-color-text-alt);
105
+ font-style: italic;
106
+ font-size: var(--uui-size-5);
107
+ }
108
+
109
+ .box-heading {
110
+ display: flex;
111
+ flex-direction: row-reverse;
112
+ gap: var(--uui-size-2);
113
+ align-items: center;
114
+ }
115
115
  `;
116
116
  __decorate([
117
117
  property({ type: Object })