@jumoo/usync 17.5.0 → 18.2.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.
@@ -27,20 +27,21 @@ let uSyncDetailsModalElement = class uSyncDetailsModalElement extends UmbModalBa
27
27
  <umb-body-layout headline="Changes : ${this.data?.item.name ?? ''}">
28
28
  <div class="layout">
29
29
  <uui-box style="--uui-box-default-padding: 0;">
30
- <div slot="header" id="header">
31
- <h3><umb-localize key="uSync_detailHeadline"></umb-localize></h3>
32
- <umb-localize key="uSync_detailHeader"></umb-localize>
30
+ <div class="headline">
31
+ <div>
32
+ <h3><umb-localize key="uSync_detailHeadline"></umb-localize></h3>
33
+ <umb-localize key="uSync_detailHeader"></umb-localize>
34
+ </div>
35
+ <div>${this.renderActions()}</div>
33
36
  </div>
34
- <div slot="header-actions">${this.renderActions()}</div>
35
- </uui-box>
36
- <uui-box style="--uui-box-default-padding: 0;">
37
- <usync-change-view .item=${this.data?.item}></usync-change-view>
38
37
  </uui-box>
38
+ <usync-change-view .item=${this.data?.item}></usync-change-view>
39
39
  </div>
40
40
  <div slot="actions">
41
41
  <uui-button
42
42
  id="cancel"
43
43
  .label=${this.localize.term('general_close')}
44
+ look="outline"
44
45
  @click="${__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_onClose)}"></uui-button>
45
46
  </div>
46
47
  </umb-body-layout>
@@ -84,7 +85,14 @@ uSyncDetailsModalElement.styles = css `
84
85
  gap: var(--uui-size-space-4);
85
86
  }
86
87
 
87
- #header h3 {
88
+ .headline {
89
+ display: flex;
90
+ justify-content: space-between;
91
+ padding: var(--uui-size-space-4);
92
+ align-items: center;
93
+ }
94
+
95
+ .headline h3 {
88
96
  margin: 0;
89
97
  }
90
98
  `;
@@ -27,6 +27,7 @@ let uSyncErrorModalElement = class uSyncErrorModalElement extends UmbModalBaseEl
27
27
  <div slot="actions">
28
28
  <uui-button
29
29
  id="cancel"
30
+ look="outline"
30
31
  .label=${this.localize.term('general_close')}
31
32
  @click="${__classPrivateFieldGet(this, _uSyncErrorModalElement_instances, "m", _uSyncErrorModalElement_onClose)}"></uui-button>
32
33
  </div>
@@ -39,6 +39,7 @@ let SyncImportSingleModalElement = class SyncImportSingleModalElement extends Um
39
39
  <div slot="actions">
40
40
  <uui-button
41
41
  id="cancel"
42
+ look="outline"
42
43
  .label=${this.localize.term('general_close')}
43
44
  @click="${__classPrivateFieldGet(this, _SyncImportSingleModalElement_instances, "m", _SyncImportSingleModalElement_onClose)}"></uui-button>
44
45
  ${when(!this.result, () => html ` <uui-button
@@ -82,7 +83,7 @@ _SyncImportSingleModalElement_doImport = async function _SyncImportSingleModalEl
82
83
  this.importState = 'waiting';
83
84
  const result = await __classPrivateFieldGet(this, _SyncImportSingleModalElement_actionContext, "f")?.importSingle(this.data.action);
84
85
  this.result = result?.data;
85
- if (result?.data.success)
86
+ if (result?.data?.success)
86
87
  this.importState = 'success';
87
88
  else
88
89
  this.importState = 'failed';
package/dist/index.js CHANGED
@@ -5,7 +5,15 @@ import './external/signalr/index.js';
5
5
  import './api/index.js';
6
6
  export * from './exports.js';
7
7
  import { manifests } from './manifests.js';
8
- export const onInit = (_host, extensionRegistry) => {
8
+ import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth';
9
+ import { client } from './api/client.gen.js';
10
+ export const onInit = async (host, extensionRegistry) => {
9
11
  // register the manifests
10
12
  extensionRegistry.registerMany(manifests);
13
+ const authContext = await host.getContext(UMB_AUTH_CONTEXT);
14
+ if (!authContext) {
15
+ console.warn('UMB_AUTH_CONTEXT not available — extension API client will not be authenticated');
16
+ return;
17
+ }
18
+ authContext.configureClient(client);
11
19
  };
@@ -98,6 +98,7 @@ declare const _default: {
98
98
  IContentType: string;
99
99
  IMediaType: string;
100
100
  IMemberType: string;
101
+ IElement: string;
101
102
  IContent: string;
102
103
  IMedia: string;
103
104
  IDomain: string;
@@ -110,6 +110,7 @@ export default {
110
110
  IContentType: 'Content Types',
111
111
  IMediaType: 'Media Types',
112
112
  IMemberType: 'Member Types',
113
+ IElement: 'Library',
113
114
  IContent: 'Content',
114
115
  IMedia: 'Media',
115
116
  IDomain: 'Domains',
@@ -45,10 +45,15 @@ export declare class uSyncActionRepository extends UmbControllerBase {
45
45
  * @returns the current uSync settings
46
46
  */
47
47
  getSettings(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<import("@jumoo/uSync").USyncSettings>>;
48
- getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
48
+ getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
49
49
  data: import("@jumoo/uSync").USyncAddonInfo;
50
- request: Request;
51
- response: Response;
50
+ error: undefined;
51
+ } | {
52
+ data: undefined;
53
+ error: unknown;
54
+ }) & {
55
+ request?: Request;
56
+ response?: Response;
52
57
  }>>;
53
58
  /**
54
59
  * Get the handler settings based on the set.
@@ -71,7 +76,7 @@ export declare class uSyncActionRepository extends UmbControllerBase {
71
76
  * @returns true if the legacy folder is copied to the new folder.
72
77
  */
73
78
  copyLegacy(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<boolean>>;
74
- downloadFile(): Promise<Blob | File>;
79
+ downloadFile(): Promise<import("@jumoo/uSync").FileContentResult | undefined>;
75
80
  /**
76
81
  * Poll the status of a background operation.
77
82
  * @param operationId the operation id returned from performAction when inBackground is true
@@ -82,20 +87,35 @@ export declare class uSyncActionRepository extends UmbControllerBase {
82
87
  * used to reattach to a run this client didn't itself start (e.g. after a reload).
83
88
  */
84
89
  getRunningOperation(): Promise<import("@umbraco-cms/backoffice/repository").UmbDataSourceResponse<import("@jumoo/uSync").SyncRunningOperationResponse>>;
85
- processUpload(fileId: string): Promise<import("@jumoo/uSync").UploadImportResult>;
86
- getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
90
+ processUpload(fileId: string): Promise<import("@jumoo/uSync").UploadImportResult | undefined>;
91
+ getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
87
92
  data: import("@jumoo/uSync").SyncSelectableSet[];
88
- request: Request;
89
- response: Response;
93
+ error: undefined;
94
+ } | {
95
+ data: undefined;
96
+ error: unknown;
97
+ }) & {
98
+ request?: Request;
99
+ response?: Response;
90
100
  }>>;
91
- importSingle(action: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
101
+ importSingle(action: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
92
102
  data: USyncActionView;
93
- request: Request;
94
- response: Response;
103
+ error: undefined;
104
+ } | {
105
+ data: undefined;
106
+ error: unknown;
107
+ }) & {
108
+ request?: Request;
109
+ response?: Response;
95
110
  }>>;
96
- getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
111
+ getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
97
112
  data: import("@jumoo/uSync").SyncFileVersionCheckResult;
98
- request: Request;
99
- response: Response;
113
+ error: undefined;
114
+ } | {
115
+ data: undefined;
116
+ error: unknown;
117
+ }) & {
118
+ request?: Request;
119
+ response?: Response;
100
120
  }>>;
101
121
  }
@@ -10,28 +10,48 @@ export interface SyncActionDataSource {
10
10
  export declare class uSyncActionDataSource implements SyncActionDataSource {
11
11
  #private;
12
12
  constructor(host: UmbControllerHost);
13
- getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
13
+ getSyncFileInfo(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
14
14
  data: import("@jumoo/uSync").SyncFileVersionCheckResult;
15
- request: Request;
16
- response: Response;
15
+ error: undefined;
16
+ } | {
17
+ data: undefined;
18
+ error: unknown;
19
+ }) & {
20
+ request?: Request;
21
+ response?: Response;
17
22
  }>>;
18
23
  getActionsBySet(setName: string): Promise<UmbDataSourceResponse<Array<SyncActionGroup>>>;
19
24
  performAction(request: PerformActionRequest): Promise<UmbDataSourceResponse<PerformActionResponse>>;
20
- downloadFile(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
21
- data: Blob | File;
22
- request: Request;
23
- response: Response;
25
+ downloadFile(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
26
+ data: import("@jumoo/uSync").FileContentResult;
27
+ error: undefined;
28
+ } | {
29
+ data: undefined;
30
+ error: unknown;
31
+ }) & {
32
+ request?: Request;
33
+ response?: Response;
24
34
  }>>;
25
35
  getOperationStatus(operationId: string): Promise<UmbDataSourceResponse<SyncOperationStatusResponse>>;
26
36
  getRunningOperation(): Promise<UmbDataSourceResponse<SyncRunningOperationResponse>>;
27
- processUpload(fileId: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
37
+ processUpload(fileId: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
28
38
  data: import("@jumoo/uSync").UploadImportResult;
29
- request: Request;
30
- response: Response;
39
+ error: undefined;
40
+ } | {
41
+ data: undefined;
42
+ error: unknown;
43
+ }) & {
44
+ request?: Request;
45
+ response?: Response;
31
46
  }>>;
32
- importSingle(view: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
47
+ importSingle(view: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
33
48
  data: USyncActionView;
34
- request: Request;
35
- response: Response;
49
+ error: undefined;
50
+ } | {
51
+ data: undefined;
52
+ error: unknown;
53
+ }) & {
54
+ request?: Request;
55
+ response?: Response;
36
56
  }>>;
37
57
  }
@@ -11,45 +11,45 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
11
11
  };
12
12
  var _uSyncActionDataSource_host;
13
13
  import { tryExecute } from '@umbraco-cms/backoffice/resources';
14
- import { ActionsService, } from '@jumoo/uSync';
14
+ import { getActionsBySet, getRunning, getStatus, getSyncFileInfo, postDownload, postImport, postPerform, postProcessUpload, } from '@jumoo/uSync';
15
15
  export class uSyncActionDataSource {
16
16
  constructor(host) {
17
17
  _uSyncActionDataSource_host.set(this, void 0);
18
18
  __classPrivateFieldSet(this, _uSyncActionDataSource_host, host, "f");
19
19
  }
20
20
  async getSyncFileInfo() {
21
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.getSyncFileInfo());
21
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getSyncFileInfo());
22
22
  }
23
23
  async getActionsBySet(setName) {
24
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.getActionsBySet({
24
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getActionsBySet({
25
25
  query: { setName: setName },
26
26
  }));
27
27
  }
28
28
  async performAction(request) {
29
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.performAction({
29
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postPerform({
30
30
  body: request,
31
31
  }));
32
32
  }
33
33
  async downloadFile() {
34
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.download());
34
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postDownload());
35
35
  }
36
36
  async getOperationStatus(operationId) {
37
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.status({
37
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getStatus({
38
38
  query: { operationId: operationId },
39
39
  }));
40
40
  }
41
41
  async getRunningOperation() {
42
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.running());
42
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), getRunning());
43
43
  }
44
44
  async processUpload(fileId) {
45
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.processUpload({
45
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postProcessUpload({
46
46
  query: {
47
47
  tempKey: fileId,
48
48
  },
49
49
  }));
50
50
  }
51
51
  async importSingle(view) {
52
- return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), ActionsService.importSingle({
52
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncActionDataSource_host, "f"), postImport({
53
53
  body: view,
54
54
  }));
55
55
  }
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _uSyncMigrationDataSource_host;
13
- import { MigrationsService } from '@jumoo/uSync';
13
+ import { getCheckLegacy, postCopyLegacy, postIgnoreLegacy, } from '@jumoo/uSync';
14
14
  import { tryExecute } from '@umbraco-cms/backoffice/resources';
15
15
  export class uSyncMigrationDataSource {
16
16
  constructor(host) {
@@ -18,13 +18,13 @@ export class uSyncMigrationDataSource {
18
18
  __classPrivateFieldSet(this, _uSyncMigrationDataSource_host, host, "f");
19
19
  }
20
20
  async checkLegacy() {
21
- return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), MigrationsService.checkLegacy());
21
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), getCheckLegacy());
22
22
  }
23
23
  async ignoreLegacy() {
24
- return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), MigrationsService.ignoreLegacy());
24
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), postIgnoreLegacy());
25
25
  }
26
26
  async copyLegacy() {
27
- return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), MigrationsService.copyLegacy());
27
+ return await tryExecute(__classPrivateFieldGet(this, _uSyncMigrationDataSource_host, "f"), postCopyLegacy());
28
28
  }
29
29
  }
30
30
  _uSyncMigrationDataSource_host = new WeakMap();
@@ -10,14 +10,24 @@ export declare class USyncSettingsDataSource implements SyncSettingsDataSource {
10
10
  constructor(host: UmbControllerHost);
11
11
  getSettings(): Promise<UmbDataSourceResponse<USyncSettings>>;
12
12
  getHandlerSettings(setName: string): Promise<UmbDataSourceResponse<USyncHandlerSetSettings>>;
13
- getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
13
+ getAddons(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
14
14
  data: import("@jumoo/uSync").USyncAddonInfo;
15
- request: Request;
16
- response: Response;
15
+ error: undefined;
16
+ } | {
17
+ data: undefined;
18
+ error: unknown;
19
+ }) & {
20
+ request?: Request;
21
+ response?: Response;
17
22
  }>>;
18
- getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
23
+ getSets(): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
19
24
  data: import("@jumoo/uSync").SyncSelectableSet[];
20
- request: Request;
21
- response: Response;
25
+ error: undefined;
26
+ } | {
27
+ data: undefined;
28
+ error: unknown;
29
+ }) & {
30
+ request?: Request;
31
+ response?: Response;
22
32
  }>>;
23
33
  }
@@ -11,23 +11,23 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
11
11
  };
12
12
  var _USyncSettingsDataSource_host;
13
13
  import { tryExecute } from '@umbraco-cms/backoffice/resources';
14
- import { SettingsService } from '@jumoo/uSync';
14
+ import { getAddOns, getHandlerSettings, getSets, getSettings, } from '@jumoo/uSync';
15
15
  export class USyncSettingsDataSource {
16
16
  constructor(host) {
17
17
  _USyncSettingsDataSource_host.set(this, void 0);
18
18
  __classPrivateFieldSet(this, _USyncSettingsDataSource_host, host, "f");
19
19
  }
20
20
  async getSettings() {
21
- return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getSettings());
21
+ return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getSettings());
22
22
  }
23
23
  async getHandlerSettings(setName) {
24
- return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getHandlerSetSettings({ query: { id: setName } }));
24
+ return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getHandlerSettings({ query: { id: setName } }));
25
25
  }
26
26
  async getAddons() {
27
- return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getAddOns());
27
+ return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getAddOns());
28
28
  }
29
29
  async getSets() {
30
- return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), SettingsService.getSets());
30
+ return await tryExecute(__classPrivateFieldGet(this, _USyncSettingsDataSource_host, "f"), getSets());
31
31
  }
32
32
  }
33
33
  _USyncSettingsDataSource_host = new WeakMap();
@@ -8,8 +8,9 @@ export declare class SyncActionButtonElement extends UmbLitElement {
8
8
  state?: UUIButtonState;
9
9
  disabled: boolean;
10
10
  _popoverOpen: boolean;
11
- render(): import("lit-html").TemplateResult<1>;
12
- renderDropdown(parent?: SyncActionButton): typeof nothing | import("lit-html").TemplateResult<1>;
11
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
12
+ renderSingleAction(): import("lit-html").TemplateResult<1>;
13
+ renderMultipleActions(parent?: SyncActionButton): typeof nothing | import("lit-html").TemplateResult<1>;
13
14
  static styles: import("lit").CSSResult;
14
15
  }
15
16
  declare global {
@@ -21,22 +21,21 @@ let SyncActionButtonElement = class SyncActionButtonElement extends UmbLitElemen
21
21
  this._popoverOpen = false;
22
22
  }
23
23
  render() {
24
- return html `
25
- <uui-button-group>
26
- <uui-button
27
- class="action-button"
28
- .disabled=${this.disabled}
29
- label=${this.localize.termOrDefault(`uSync_${this.button?.label}`, this.button?.label ?? '')}
30
- color=${this.button?.color}
31
- look=${this.button?.look}
32
- state=${ifDefined(this.state)}
33
- @click=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, this.button)}></uui-button>
34
-
35
- ${this.renderDropdown(this.button)}
36
- </uui-button-group>
37
- `;
24
+ return (this.button?.children?.length ?? 0) > 0
25
+ ? this.renderMultipleActions(this.button)
26
+ : this.renderSingleAction();
27
+ }
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)}
36
+ @click=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, this.button)}></uui-button>`;
38
37
  }
39
- renderDropdown(parent) {
38
+ renderMultipleActions(parent) {
40
39
  if (!this.button?.children)
41
40
  return nothing;
42
41
  const buttons = this.button?.children.map((item) => {
@@ -49,21 +48,30 @@ let SyncActionButtonElement = class SyncActionButtonElement extends UmbLitElemen
49
48
  return nothing;
50
49
  const popoverId = `popover_${parent?.key}`;
51
50
  return html `
52
- <uui-button
53
- .disabled=${this.disabled}
54
- popovertarget=${popoverId}
55
- .label=${this.button.label}
56
- color=${parent?.color}
57
- look=${parent?.look}
58
- compact>
59
- <uui-symbol-expand
60
- class="expand-symbol"
61
- .open=${this._popoverOpen}></uui-symbol-expand>
62
- </uui-button>
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>
63
72
 
64
73
  <uui-popover-container
65
74
  id=${popoverId}
66
- margin="6"
67
75
  placement="bottom-end"
68
76
  @toggle=${__classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onPopoverToggle)}>
69
77
  <umb-popover-layout>
@@ -323,9 +323,9 @@ uSyncDefaultViewElement.styles = [
323
323
 
324
324
  .action-buttons-box {
325
325
  display: grid;
326
- grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
326
+ grid-template-columns: repeat(auto-fit, minmax(370px, 1fr));
327
327
  position: relative;
328
- gap: var(--uui-size-space-5);
328
+ gap: var(--uui-size-space-4);
329
329
  flex-wrap: wrap;
330
330
  align-content: stretch;
331
331
  z-index: 1;
@@ -33,8 +33,8 @@ export declare class uSyncWorkspaceContext extends UmbControllerBase implements
33
33
  * Get the current uSync settings
34
34
  */
35
35
  getSettings(): Promise<USyncSettings | undefined>;
36
- getAddons(): Promise<import("@jumoo/uSync").USyncAddonInfo>;
37
- getSyncFileInfo(): Promise<SyncFileVersionCheckResult>;
36
+ getAddons(): Promise<import("@jumoo/uSync").USyncAddonInfo | undefined>;
37
+ getSyncFileInfo(): Promise<SyncFileVersionCheckResult | undefined>;
38
38
  /**
39
39
  * Check to see if there is a legacy uSync folder on disk.
40
40
  */
@@ -64,10 +64,15 @@ export declare class uSyncWorkspaceContext extends UmbControllerBase implements
64
64
  dismissBackgroundRun(): void;
65
65
  uploadFile(): Promise<boolean | undefined>;
66
66
  downloadFile(): Promise<void>;
67
- importSingle(item: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
67
+ importSingle(item: USyncActionView): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
68
68
  data: USyncActionView;
69
- request: Request;
70
- response: Response;
69
+ error: undefined;
70
+ } | {
71
+ data: undefined;
72
+ error: unknown;
73
+ }) & {
74
+ request?: Request;
75
+ response?: Response;
71
76
  }> | undefined>;
72
77
  }
73
78
  export default uSyncWorkspaceContext;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "homepage": "https://jumoo.co.uk/uSync",
9
9
  "license": "MPL-2.0",
10
10
  "type": "module",
11
- "version": "17.5.0",
11
+ "version": "18.2.0",
12
12
  "main": "./dist/usync.js",
13
13
  "types": "./dist/index.d.ts",
14
14
  "module": "./dist/usync.js",
@@ -39,13 +39,17 @@
39
39
  "email": "info@jumoo.co.uk",
40
40
  "url": "https://jumoo.co.uk"
41
41
  },
42
+ "site": {
43
+ "port": "16903",
44
+ "api": "uSync"
45
+ },
42
46
  "scripts": {
43
47
  "client:build": "tsc --project ./tsconfig.dist.json",
44
48
  "client:pack": "npm pack --pack-destination ./pack",
45
49
  "client:publish": "npm publish --tag next",
46
50
  "client:make": "npm run client:build && npm run client:pack && npm run client:publish",
47
51
  "client:link": "npm link",
48
- "generate": "openapi-ts",
52
+ "generate-client": "node scripts/generate-openapi.js https://localhost:44304/umbraco/openapi/uSync.json",
49
53
  "format:fix": "npm run format -- --write",
50
54
  "format": "prettier \"src/**/*.ts\" --check",
51
55
  "build": "tsc && vite build",
@@ -56,9 +60,12 @@
56
60
  "devDependencies": {
57
61
  "@hey-api/openapi-ts": "^0.99.0",
58
62
  "@microsoft/signalr": "^10.0.11",
59
- "@umbraco-cms/backoffice": "^17.3.0",
63
+ "@umbraco-cms/backoffice": "^18.0.0-rc3",
64
+ "chalk": "^6.0.0",
65
+ "cross-env": "^10.1.0",
60
66
  "eslint": "^10.13.0",
61
67
  "lit": "^3.3.3",
68
+ "node-fetch": "^3.3.2",
62
69
  "prettier": "^3.9.10",
63
70
  "typescript": "^5.9.3",
64
71
  "vite": "^8.3.4",
package/dist/hey-api.d.ts DELETED
@@ -1,11 +0,0 @@
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 DELETED
@@ -1,14 +0,0 @@
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
- });