@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.
Files changed (134) hide show
  1. package/dist/api/client/client.gen.d.ts +2 -0
  2. package/dist/api/client/client.gen.js +216 -0
  3. package/dist/api/client/index.d.ts +10 -0
  4. package/dist/api/client/index.js +6 -0
  5. package/dist/api/client/types.gen.d.ts +120 -0
  6. package/dist/api/client/types.gen.js +2 -0
  7. package/dist/api/client/utils.gen.d.ts +37 -0
  8. package/dist/api/client/utils.gen.js +230 -0
  9. package/dist/api/client.gen.d.ts +12 -0
  10. package/dist/api/client.gen.js +3 -0
  11. package/dist/api/core/auth.gen.d.ts +25 -0
  12. package/dist/api/core/auth.gen.js +14 -0
  13. package/dist/api/core/bodySerializer.gen.d.ts +25 -0
  14. package/dist/api/core/bodySerializer.gen.js +57 -0
  15. package/dist/api/core/params.gen.d.ts +43 -0
  16. package/dist/api/core/params.gen.js +109 -0
  17. package/dist/api/core/pathSerializer.gen.d.ts +33 -0
  18. package/dist/api/core/pathSerializer.gen.js +106 -0
  19. package/dist/api/core/queryKeySerializer.gen.d.ts +18 -0
  20. package/dist/api/core/queryKeySerializer.gen.js +92 -0
  21. package/dist/api/core/serverSentEvents.gen.d.ts +71 -0
  22. package/dist/api/core/serverSentEvents.gen.js +132 -0
  23. package/dist/api/core/types.gen.d.ts +83 -0
  24. package/dist/api/core/types.gen.js +2 -0
  25. package/dist/api/core/utils.gen.d.ts +19 -0
  26. package/dist/api/core/utils.gen.js +87 -0
  27. package/dist/api/index.d.ts +2 -0
  28. package/dist/api/index.js +3 -0
  29. package/dist/api/sdk.gen.d.ts +37 -0
  30. package/dist/api/sdk.gen.js +112 -0
  31. package/dist/api/types.gen.d.ts +520 -0
  32. package/dist/api/types.gen.js +74 -0
  33. package/dist/background/background-cancel.controller.d.ts +16 -0
  34. package/dist/background/background-cancel.controller.js +83 -0
  35. package/dist/background/background-pipeline.repository.d.ts +23 -0
  36. package/dist/background/background-pipeline.repository.js +33 -0
  37. package/dist/background/components/constants.d.ts +5 -0
  38. package/dist/background/components/constants.js +5 -0
  39. package/dist/background/components/index.d.ts +5 -0
  40. package/dist/background/components/index.js +5 -0
  41. package/dist/background/components/pending-list.element.d.ts +18 -0
  42. package/dist/background/components/pending-list.element.js +69 -0
  43. package/dist/background/components/pipelines-table.element.d.ts +15 -0
  44. package/dist/background/components/pipelines-table.element.js +60 -0
  45. package/dist/background/components/process-list.element.d.ts +10 -0
  46. package/dist/background/components/process-list.element.js +69 -0
  47. package/dist/background/components/queue-table.element.d.ts +15 -0
  48. package/dist/background/components/queue-table.element.js +50 -0
  49. package/dist/background/index.d.ts +1 -0
  50. package/dist/background/index.js +1 -0
  51. package/dist/background/manifest.d.ts +1 -0
  52. package/dist/background/manifest.js +24 -0
  53. package/dist/background/workspace/background-workspace-element.d.ts +11 -0
  54. package/dist/background/workspace/background-workspace-element.js +74 -0
  55. package/dist/components/index.d.ts +2 -0
  56. package/dist/components/index.js +2 -0
  57. package/dist/components/report-summary-view.d.ts +23 -0
  58. package/dist/components/report-summary-view.js +199 -0
  59. package/dist/components/usync-property-layout.d.ts +17 -0
  60. package/dist/components/usync-property-layout.js +159 -0
  61. package/dist/index.d.ts +5 -0
  62. package/dist/index.js +27 -0
  63. package/dist/items/index.d.ts +2 -0
  64. package/dist/items/index.js +2 -0
  65. package/dist/items/manifests.d.ts +1 -0
  66. package/dist/items/manifests.js +7 -0
  67. package/dist/items/sync-item.context.d.ts +10 -0
  68. package/dist/items/sync-item.context.js +29 -0
  69. package/dist/items/sync-item.repository.d.ts +22 -0
  70. package/dist/items/sync-item.repository.js +37 -0
  71. package/dist/lang/en.d.ts +30 -0
  72. package/dist/lang/en.js +29 -0
  73. package/dist/lang/manifest.d.ts +1 -0
  74. package/dist/lang/manifest.js +11 -0
  75. package/dist/licence/components/index.d.ts +2 -0
  76. package/dist/licence/components/index.js +2 -0
  77. package/dist/licence/components/licence-notice.d.ts +10 -0
  78. package/dist/licence/components/licence-notice.js +55 -0
  79. package/dist/licence/components/licence-status.view.d.ts +14 -0
  80. package/dist/licence/components/licence-status.view.js +50 -0
  81. package/dist/licence/components/styles.d.ts +1 -0
  82. package/dist/licence/components/styles.js +41 -0
  83. package/dist/licence/lang/en.d.ts +17 -0
  84. package/dist/licence/lang/en.js +17 -0
  85. package/dist/licence/lang/manifests.d.ts +1 -0
  86. package/dist/licence/lang/manifests.js +13 -0
  87. package/dist/licence/licence.context.d.ts +17 -0
  88. package/dist/licence/licence.context.js +66 -0
  89. package/dist/licence/licence.element.d.ts +19 -0
  90. package/dist/licence/licence.element.js +270 -0
  91. package/dist/licence/licence.repository.d.ts +15 -0
  92. package/dist/licence/licence.repository.js +42 -0
  93. package/dist/licence/manifest.d.ts +1 -0
  94. package/dist/licence/manifest.js +30 -0
  95. package/dist/licence/source/licence.source.d.ts +15 -0
  96. package/dist/licence/source/licence.source.js +39 -0
  97. package/dist/menu/manifest.d.ts +1 -0
  98. package/dist/menu/manifest.js +12 -0
  99. package/dist/restore/components/index.d.ts +1 -0
  100. package/dist/restore/components/index.js +1 -0
  101. package/dist/restore/components/restore-point-table.element.d.ts +21 -0
  102. package/dist/restore/components/restore-point-table.element.js +126 -0
  103. package/dist/restore/constants.d.ts +23 -0
  104. package/dist/restore/constants.js +30 -0
  105. package/dist/restore/index.d.ts +1 -0
  106. package/dist/restore/index.js +8 -0
  107. package/dist/restore/lang/en.d.ts +23 -0
  108. package/dist/restore/lang/en.js +33 -0
  109. package/dist/restore/lang/manifest.d.ts +1 -0
  110. package/dist/restore/lang/manifest.js +11 -0
  111. package/dist/restore/manifest.d.ts +1 -0
  112. package/dist/restore/manifest.js +63 -0
  113. package/dist/restore/restore.context.d.ts +10 -0
  114. package/dist/restore/restore.context.js +29 -0
  115. package/dist/restore/restore.repository.d.ts +15 -0
  116. package/dist/restore/restore.repository.js +43 -0
  117. package/dist/restore/steps/manifest.d.ts +1 -0
  118. package/dist/restore/steps/manifest.js +36 -0
  119. package/dist/restore/steps/restore-create-complete.d.ts +6 -0
  120. package/dist/restore/steps/restore-create-complete.js +33 -0
  121. package/dist/restore/steps/restore-create-element.d.ts +9 -0
  122. package/dist/restore/steps/restore-create-element.js +97 -0
  123. package/dist/restore/steps/restore-report-config-element.d.ts +14 -0
  124. package/dist/restore/steps/restore-report-config-element.js +105 -0
  125. package/dist/restore/steps/restore-report-element.d.ts +6 -0
  126. package/dist/restore/steps/restore-report-element.js +39 -0
  127. package/dist/restore/workspace/restore.workspace-view.element.d.ts +24 -0
  128. package/dist/restore/workspace/restore.workspace-view.element.js +198 -0
  129. package/dist/restore/workspace/restore.workspace.context.d.ts +17 -0
  130. package/dist/restore/workspace/restore.workspace.context.js +52 -0
  131. package/dist/restore/workspace/restore.workspace.element.d.ts +12 -0
  132. package/dist/restore/workspace/restore.workspace.element.js +91 -0
  133. package/package.json +52 -6
  134. package/README.md +0 -3
@@ -0,0 +1,199 @@
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 __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 _uSyncResportSummaryView_instances, _uSyncResportSummaryView_showDetail;
13
+ import { classMap, css, customElement, html, nothing, property, state, when, } from '@umbraco-cms/backoffice/external/lit';
14
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
15
+ import { ChangeType } from '../api/index.js';
16
+ let uSyncResportSummaryView = class uSyncResportSummaryView extends UmbLitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ _uSyncResportSummaryView_instances.add(this);
20
+ this.showAll = false;
21
+ this.headline = 'Change report';
22
+ /**
23
+ * @description is this being shown as part of a report (or false as results)
24
+ */
25
+ this.isReport = true;
26
+ }
27
+ countChanges() {
28
+ let changes = 0;
29
+ this.results?.forEach((result) => {
30
+ if (result.change !== ChangeType.NO_CHANGE) {
31
+ changes++;
32
+ }
33
+ });
34
+ return changes;
35
+ }
36
+ render() {
37
+ const changes = this.countChanges();
38
+ return html ` ${this.renderChangeSummary(changes)}
39
+ <uui-box .headline=${this.headline}>
40
+ <div slot="header-actions">${this.renderToggle()}</div>
41
+ ${when(this.showAll || changes > 0, () => this.renderTable())}
42
+ </uui-box>`;
43
+ }
44
+ renderToggle() {
45
+ return html `
46
+ <uui-toggle
47
+ .label=${this.localize.term('uSync_showAll')}
48
+ labelPosition="left"
49
+ ?checked=${this.showAll}
50
+ @change=${() => {
51
+ this.showAll = !this.showAll;
52
+ }}></uui-toggle>
53
+ `;
54
+ }
55
+ renderChangeSummary(changes) {
56
+ return this.isReport
57
+ ? this.renderReportSummary(changes)
58
+ : this.renderResultSummary(changes);
59
+ }
60
+ renderReportSummary(changes) {
61
+ return changes > 0
62
+ ? html `<div class="change-msg">
63
+ <h4>
64
+ ${this.localize.term('uSyncReport_pendingChanges', [
65
+ changes,
66
+ this.results?.length ?? 0,
67
+ ])}
68
+ </h4>
69
+ </div>`
70
+ : html `<div class="change-msg positive">
71
+ <h4>${this.localize.term('uSyncReport_noChanges')}</h4>
72
+ <p>${this.localize.term('uSyncReport_noChangesDescription')}</p>
73
+ </div>`;
74
+ }
75
+ renderResultSummary(changes) {
76
+ return changes > 0
77
+ ? html `<div class="change-msg">
78
+ <h4>
79
+ ${this.localize.term('uSyncReport_resultChanges', [
80
+ changes,
81
+ this.results?.length ?? 0,
82
+ ])}
83
+ </h4>
84
+ </div>`
85
+ : html `<div class="change-msg positive">
86
+ <h4>${this.localize.term('uSyncReport_noChanges')}</h4>
87
+ <p>${this.localize.term('uSyncReport_resultNoChange')}</p>
88
+ </div>`;
89
+ }
90
+ renderTable() {
91
+ return html `
92
+ <uui-table> ${this.renderTableHeader()} ${this.renderRows()} </uui-table>
93
+ `;
94
+ }
95
+ renderTableHeader() {
96
+ return html `
97
+ <uui-table-head>
98
+ <uui-table-head-cell class="icon-cell" .noPadding=${true}>
99
+ <!-- <umb-icon name="icon-checkbox-dotted"></umb-icon> -->
100
+ </uui-table-head-cell>
101
+ <uui-table-head-cell style="--uui-table-cell-padding: var(--uui-size-space-2);">
102
+ <umb-localize key="uSync_changeName">Name</umb-localize>
103
+ </uui-table-head-cell>
104
+ </uui-table-head>
105
+ `;
106
+ }
107
+ renderRows() {
108
+ const rowsHtml = this.results?.map((result) => {
109
+ if (!this.showAll && result.change == ChangeType.NO_CHANGE)
110
+ return nothing;
111
+ const icon = result.change == ChangeType.NO_CHANGE
112
+ ? 'icon-trafic'
113
+ : result.success
114
+ ? 'icon-check color-green'
115
+ : 'icon-wrong color-red';
116
+ return html `
117
+ <uui-table-row
118
+ class=${classMap({ changerow: result.change != ChangeType.NO_CHANGE })}>
119
+ <uui-table-cell class="icon-cell" .noPadding=${true}>
120
+ <umb-icon .name=${icon}></umb-icon>
121
+ </uui-table-cell>
122
+ <uui-table-cell
123
+ @click=${() => __classPrivateFieldGet(this, _uSyncResportSummaryView_instances, "m", _uSyncResportSummaryView_showDetail).call(this, result)}
124
+ .clipText=${true}
125
+ style="--uui-table-cell-padding: var(--uui-size-space-2);">
126
+ <div>${result.name}</div>
127
+ <div class="item-detail">
128
+ <div>${result.itemType}</div>
129
+ <div>${result.change}</div>
130
+ </div>
131
+ </uui-table-cell>
132
+ </uui-table-row>
133
+ `;
134
+ });
135
+ return html `${rowsHtml}`;
136
+ }
137
+ };
138
+ _uSyncResportSummaryView_instances = new WeakSet();
139
+ _uSyncResportSummaryView_showDetail = async function _uSyncResportSummaryView_showDetail(action) {
140
+ if (action.change == ChangeType.NO_CHANGE)
141
+ return;
142
+ // TODO . Open the shared details modal
143
+ };
144
+ uSyncResportSummaryView.styles = css `
145
+ .changerow {
146
+ cursor: pointer;
147
+ }
148
+
149
+ .icon-cell {
150
+ width: var(--uui-size-8);
151
+ }
152
+
153
+ .item-detail {
154
+ display: flex;
155
+ justify-content: space-between;
156
+ font-size: smaller;
157
+ color: var(--uui-color-disabled-contrast);
158
+ }
159
+
160
+ .change-msg {
161
+ padding: var(--uui-size-3);
162
+ margin-bottom: var(--uui-size-3);
163
+ }
164
+
165
+ .change-msg.positive {
166
+ background-color: var(--uui-color-positive);
167
+ color: #fff;
168
+ box-shadow: var(--uui-shadow-depth-1);
169
+ }
170
+
171
+ .change-msg > * {
172
+ margin: var(--uui-size-4) 0;
173
+ }
174
+
175
+ uui-box {
176
+ margin-bottom: var(--uui-size-3);
177
+ }
178
+
179
+ uui-table-row:hover {
180
+ background-color: var(--uui-color-disabled);
181
+ }
182
+ `;
183
+ __decorate([
184
+ state()
185
+ ], uSyncResportSummaryView.prototype, "showAll", void 0);
186
+ __decorate([
187
+ property({ type: String })
188
+ ], uSyncResportSummaryView.prototype, "headline", void 0);
189
+ __decorate([
190
+ property({ type: Array })
191
+ ], uSyncResportSummaryView.prototype, "results", void 0);
192
+ __decorate([
193
+ property({ type: Boolean })
194
+ ], uSyncResportSummaryView.prototype, "isReport", void 0);
195
+ uSyncResportSummaryView = __decorate([
196
+ customElement('usync-report-summary-view')
197
+ ], uSyncResportSummaryView);
198
+ export { uSyncResportSummaryView };
199
+ export default uSyncResportSummaryView;
@@ -0,0 +1,17 @@
1
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
2
+ export declare class uSyncPropertyLayout extends UmbLitElement {
3
+ #private;
4
+ alias: string;
5
+ label: string;
6
+ description: string;
7
+ invalid?: boolean;
8
+ mandatory?: boolean;
9
+ alignment: 'left' | 'right';
10
+ render(): import("lit-html").TemplateResult<1>;
11
+ static styles: import("lit").CSSResult[];
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'usync-property-layout': uSyncPropertyLayout;
16
+ }
17
+ }
@@ -0,0 +1,159 @@
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 __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 _uSyncPropertyLayout_instances, _uSyncPropertyLayout_renderDescription;
13
+ import { css, customElement, html, property, when, } from '@umbraco-cms/backoffice/external/lit';
14
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
15
+ import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
16
+ let uSyncPropertyLayout = class uSyncPropertyLayout extends UmbLitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ _uSyncPropertyLayout_instances.add(this);
20
+ this.alias = '';
21
+ this.label = '';
22
+ this.description = '';
23
+ this.alignment = 'right';
24
+ }
25
+ render() {
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>
44
+ `;
45
+ }
46
+ };
47
+ _uSyncPropertyLayout_instances = new WeakSet();
48
+ _uSyncPropertyLayout_renderDescription = function _uSyncPropertyLayout_renderDescription() {
49
+ if (!this.description)
50
+ return;
51
+ const ufmValue = {
52
+ alias: this.alias,
53
+ label: this.label,
54
+ description: this.description,
55
+ };
56
+ return html `<umb-ufm-render
57
+ id="description"
58
+ .markdown=${this.description}
59
+ .value=${ufmValue}></umb-ufm-render>`;
60
+ };
61
+ uSyncPropertyLayout.styles = [
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
+ }
136
+ `,
137
+ ];
138
+ __decorate([
139
+ property({ type: String })
140
+ ], uSyncPropertyLayout.prototype, "alias", void 0);
141
+ __decorate([
142
+ property({ type: String })
143
+ ], uSyncPropertyLayout.prototype, "label", void 0);
144
+ __decorate([
145
+ property({ type: String })
146
+ ], uSyncPropertyLayout.prototype, "description", void 0);
147
+ __decorate([
148
+ property({ type: Boolean })
149
+ ], uSyncPropertyLayout.prototype, "invalid", void 0);
150
+ __decorate([
151
+ property({ type: Boolean })
152
+ ], uSyncPropertyLayout.prototype, "mandatory", void 0);
153
+ __decorate([
154
+ property({ type: String })
155
+ ], uSyncPropertyLayout.prototype, "alignment", void 0);
156
+ uSyncPropertyLayout = __decorate([
157
+ customElement('usync-property-layout')
158
+ ], uSyncPropertyLayout);
159
+ export { uSyncPropertyLayout };
@@ -0,0 +1,5 @@
1
+ import { UmbEntryPointOnInit } from '@umbraco-cms/backoffice/extension-api';
2
+ export * from './components/usync-property-layout.js';
3
+ export * from './licence/components/index.js';
4
+ export * from './api/index.js';
5
+ export declare const onInit: UmbEntryPointOnInit;
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ import { manifests as localizations } from './lang/manifest';
2
+ import { manifests as licenceManifests } from './licence/manifest';
3
+ import { manifests as itemManifests } from './items/manifests';
4
+ import { manifests as restoreManifests } from './restore/manifest';
5
+ import { manifests as backgroundManifests } from './background/manifest';
6
+ import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth';
7
+ import { client } from './api/client.gen.js';
8
+ export * from './components/usync-property-layout.js';
9
+ export * from './licence/components/index.js';
10
+ export * from './api/index.js';
11
+ export const onInit = async (host, extensionRegistry) => {
12
+ extensionRegistry.registerMany([
13
+ ...licenceManifests,
14
+ ...itemManifests,
15
+ ...restoreManifests,
16
+ ...localizations,
17
+ ...backgroundManifests,
18
+ ]);
19
+ const authContext = await host.getContext(UMB_AUTH_CONTEXT);
20
+ if (!authContext) {
21
+ console.warn('UMB_AUTH_CONTEXT not available — extension API client will not be authenticated');
22
+ return;
23
+ }
24
+ authContext.configureClient(client);
25
+ // remove the add-ons dashboard workspace, complete is now installed.
26
+ extensionRegistry.exclude('usync.workspace.addons');
27
+ };
@@ -0,0 +1,2 @@
1
+ export * from './sync-item.context.js';
2
+ export * from './sync-item.repository.js';
@@ -0,0 +1,2 @@
1
+ export * from './sync-item.context.js';
2
+ export * from './sync-item.repository.js';
@@ -0,0 +1 @@
1
+ export declare const manifests: import("@umbraco-cms/backoffice/extension-registry").ManifestGlobalContext[];
@@ -0,0 +1,7 @@
1
+ const itemManifest = {
2
+ type: 'globalContext',
3
+ alias: 'usync.items.context',
4
+ name: 'uSync Items Context',
5
+ js: () => import('./sync-item.context'),
6
+ };
7
+ export const manifests = [itemManifest];
@@ -0,0 +1,10 @@
1
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
+ import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
3
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
4
+ export declare class SyncItemContext extends UmbControllerBase {
5
+ #private;
6
+ constructor(host: UmbControllerHost);
7
+ getSyncItem(entityType: string, id: string): Promise<import("..").SyncEntity | undefined>;
8
+ }
9
+ export default SyncItemContext;
10
+ export declare const SYNC_ITEM_CONTEXT_TOKEN: UmbContextToken<SyncItemContext, SyncItemContext>;
@@ -0,0 +1,29 @@
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 _SyncItemContext_repository;
13
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
14
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
15
+ import { SyncItemRepository } from './sync-item.repository';
16
+ export class SyncItemContext extends UmbControllerBase {
17
+ constructor(host) {
18
+ super(host);
19
+ _SyncItemContext_repository.set(this, void 0);
20
+ __classPrivateFieldSet(this, _SyncItemContext_repository, new SyncItemRepository(this), "f");
21
+ this.provideContext(SYNC_ITEM_CONTEXT_TOKEN, this);
22
+ }
23
+ async getSyncItem(entityType, id) {
24
+ return (await __classPrivateFieldGet(this, _SyncItemContext_repository, "f").GetSyncItem(entityType, id)).data;
25
+ }
26
+ }
27
+ _SyncItemContext_repository = new WeakMap();
28
+ export default SyncItemContext;
29
+ export const SYNC_ITEM_CONTEXT_TOKEN = new UmbContextToken('SyncItemContext');
@@ -0,0 +1,22 @@
1
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
2
+ import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
3
+ export declare class SyncItemRepository extends UmbControllerBase {
4
+ #private;
5
+ constructor(host: UmbControllerHost);
6
+ /**
7
+ * @description get the sync item representation of an item
8
+ * @param entityType the entity type of the item
9
+ * @param id they "key" for the item
10
+ * @returns a SyncItem (which as the udi in it.)
11
+ */
12
+ GetSyncItem(entityType: string, id: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
13
+ data: import("..").SyncEntity;
14
+ error: undefined;
15
+ } | {
16
+ data: undefined;
17
+ error: unknown;
18
+ }) & {
19
+ request?: Request;
20
+ response?: Response;
21
+ }>>;
22
+ }
@@ -0,0 +1,37 @@
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 _SyncItemRepository_host;
13
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
14
+ import { tryExecute } from '@umbraco-cms/backoffice/resources';
15
+ import { ItemsService } from '../api';
16
+ export class SyncItemRepository extends UmbControllerBase {
17
+ constructor(host) {
18
+ super(host);
19
+ _SyncItemRepository_host.set(this, void 0);
20
+ __classPrivateFieldSet(this, _SyncItemRepository_host, host, "f");
21
+ }
22
+ /**
23
+ * @description get the sync item representation of an item
24
+ * @param entityType the entity type of the item
25
+ * @param id they "key" for the item
26
+ * @returns a SyncItem (which as the udi in it.)
27
+ */
28
+ async GetSyncItem(entityType, id) {
29
+ return await tryExecute(__classPrivateFieldGet(this, _SyncItemRepository_host, "f"), ItemsService.getSyncItem({
30
+ query: {
31
+ entityType: entityType,
32
+ id: id,
33
+ },
34
+ }));
35
+ }
36
+ }
37
+ _SyncItemRepository_host = new WeakMap();
@@ -0,0 +1,30 @@
1
+ declare const _default: {
2
+ uSyncReport: {
3
+ noChanges: string;
4
+ noChangesDescription: string;
5
+ pendingChanges: string;
6
+ resultChanges: string;
7
+ resultNoChanges: string;
8
+ };
9
+ uSyncBackground: {
10
+ title: string;
11
+ intro: string;
12
+ processes: string;
13
+ queue: string;
14
+ view: string;
15
+ process: string;
16
+ delete: string;
17
+ cancel: string;
18
+ cancelRun: string;
19
+ keepRun: string;
20
+ cancelHeadline: string;
21
+ cancelConfirm: string;
22
+ cancelledHeadline: string;
23
+ cancelledMessage: string;
24
+ cancelFailedHeadline: string;
25
+ cancelForbidden: string;
26
+ cancelNotFound: string;
27
+ cancelFinished: string;
28
+ };
29
+ };
30
+ export default _default;
@@ -0,0 +1,29 @@
1
+ export default {
2
+ uSyncReport: {
3
+ noChanges: 'No changes',
4
+ noChangesDescription: 'It looks like the server is up to date and there are no new changes to be made.',
5
+ pendingChanges: '%0% pending changes in %1% items.',
6
+ resultChanges: '%0% changes were made from %1% items.',
7
+ resultNoChanges: 'Nothing changed.',
8
+ },
9
+ uSyncBackground: {
10
+ title: 'Background tasks',
11
+ intro: `If you set up Publisher to run in the background, then you can view the processes and queue here.`,
12
+ processes: 'Processes',
13
+ queue: 'Queued items',
14
+ view: 'View',
15
+ process: 'Process',
16
+ delete: 'Delete',
17
+ cancel: 'Cancel',
18
+ cancelRun: 'Cancel run',
19
+ keepRun: 'Keep it',
20
+ cancelHeadline: 'Cancel this run?',
21
+ cancelConfirm: 'Cancel %0%? A scheduled or waiting run stops now; one that is already running stops before its next step.',
22
+ cancelledHeadline: 'Cancel requested',
23
+ cancelledMessage: 'Scheduled and waiting runs are cancelled straight away; running ones stop before their next step.',
24
+ cancelFailedHeadline: 'Could not cancel',
25
+ cancelForbidden: 'You can only cancel runs you started, unless you are an administrator.',
26
+ cancelNotFound: 'That run could not be found. It may already have been removed.',
27
+ cancelFinished: 'That run has already finished, so there is nothing to cancel.',
28
+ },
29
+ };
@@ -0,0 +1 @@
1
+ export declare const manifests: UmbExtensionManifest[];
@@ -0,0 +1,11 @@
1
+ const localizations = [
2
+ {
3
+ type: 'localization',
4
+ alias: 'usync-expansions-enus',
5
+ name: 'uSync Expansins English',
6
+ weight: 0,
7
+ meta: { culture: 'en' },
8
+ js: () => import('./en'),
9
+ },
10
+ ];
11
+ export const manifests = [...localizations];
@@ -0,0 +1,2 @@
1
+ export * from './licence-status.view';
2
+ export * from './licence-notice';
@@ -0,0 +1,2 @@
1
+ export * from './licence-status.view';
2
+ export * from './licence-notice';
@@ -0,0 +1,10 @@
1
+ import { nothing } from '@umbraco-cms/backoffice/external/lit';
2
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
3
+ import { LicenceStatusView } from '../../api';
4
+ export declare class uSyncLicenceNoticeElement extends UmbLitElement {
5
+ licenceStatus: LicenceStatusView | undefined;
6
+ constructor();
7
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
8
+ static styles: import("lit").CSSResult[];
9
+ }
10
+ export default uSyncLicenceNoticeElement;