@jumoo/usync 17.5.0 → 17.5.2-prerelease.15
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.
- package/LICENCE +372 -372
- package/README.md +10 -10
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/sdk.gen.d.ts +2 -1
- package/dist/api/sdk.gen.js +7 -0
- package/dist/api/types.gen.d.ts +361 -0
- package/dist/api/types.gen.js +13 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/usync-action-box.js +61 -61
- package/dist/components/usync-change-detail.js +409 -409
- package/dist/components/usync-change-view.js +49 -49
- package/dist/components/usync-content-preview.d.ts +27 -0
- package/dist/components/usync-content-preview.js +540 -0
- package/dist/components/usync-content-type-preview.d.ts +25 -0
- package/dist/components/usync-content-type-preview.js +548 -0
- package/dist/components/usync-data-type-preview.d.ts +21 -0
- package/dist/components/usync-data-type-preview.js +293 -0
- package/dist/components/usync-progress-box.js +106 -106
- package/dist/components/usync-result-row.js +61 -61
- package/dist/components/usync-results-group-view.js +55 -55
- package/dist/components/usync-results-view.js +76 -68
- package/dist/components/usync-sync-file-info-view.js +10 -10
- package/dist/dialogs/details-modal-element.d.ts +12 -1
- package/dist/dialogs/details-modal-element.js +172 -42
- package/dist/dialogs/details-modal-token.d.ts +10 -1
- package/dist/dialogs/error-modal-element.js +21 -21
- package/dist/dialogs/legacy-modal-element.js +22 -22
- package/dist/dialogs/single-import-modal.element.js +30 -30
- package/dist/icons/svg/logo.js +20 -20
- package/dist/lang/files/da-dk.d.ts +37 -0
- package/dist/lang/files/da-dk.js +49 -12
- package/dist/lang/files/de-de.d.ts +37 -0
- package/dist/lang/files/de-de.js +49 -12
- package/dist/lang/files/en-us.d.ts +37 -0
- package/dist/lang/files/en-us.js +49 -12
- package/dist/lang/files/es-es.d.ts +37 -0
- package/dist/lang/files/es-es.js +49 -12
- package/dist/lang/files/fr-fr.d.ts +37 -0
- package/dist/lang/files/fr-fr.js +49 -12
- package/dist/lang/files/nl-nl.d.ts +37 -0
- package/dist/lang/files/nl-nl.js +49 -12
- package/dist/repository/SyncAction.respositoy.d.ts +8 -0
- package/dist/repository/SyncAction.respositoy.js +6 -0
- package/dist/repository/sources/SyncAction.source.d.ts +5 -0
- package/dist/repository/sources/SyncAction.source.js +5 -0
- package/dist/tree/usync.menu-element.js +8 -8
- package/dist/utils/preview/content-type-diff.d.ts +18 -0
- package/dist/utils/preview/content-type-diff.js +72 -0
- package/dist/utils/preview/content-type-layout.d.ts +39 -0
- package/dist/utils/preview/content-type-layout.js +100 -0
- package/dist/workspace/components/usync-action-button.js +50 -50
- package/dist/workspace/components/usync-file-picker.element.js +33 -33
- package/dist/workspace/components/usync-file-upload.element.js +25 -25
- package/dist/workspace/dialogs/import-modal.element.js +22 -22
- package/dist/workspace/views/addons/addons.element.js +97 -97
- package/dist/workspace/views/default/default.element.js +186 -186
- package/dist/workspace/views/legacy/legacy.element.js +81 -81
- package/dist/workspace/views/settings/components/usyncSettingItem.element.js +38 -38
- package/dist/workspace/views/settings/settings.element.js +124 -124
- package/dist/workspace/workspace.element.js +16 -16
- package/package.json +70 -70
|
@@ -0,0 +1,293 @@
|
|
|
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 _uSyncDataTypePreviewElement_instances, _uSyncDataTypePreviewElement_renderSide, _uSyncDataTypePreviewElement_renderMissing, _uSyncDataTypePreviewElement_renderInfo, _uSyncDataTypePreviewElement_renderEditor, _uSyncDataTypePreviewElement_renderConfig;
|
|
13
|
+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
14
|
+
import { classMap, css, customElement, html, nothing, property, } from '@umbraco-cms/backoffice/external/lit';
|
|
15
|
+
import '@umbraco-cms/backoffice/components';
|
|
16
|
+
import { deepEqual, prettyJson } from '../utils/diff/index.js';
|
|
17
|
+
/**
|
|
18
|
+
* Shows the current and incoming versions of a data type side by side,
|
|
19
|
+
* rendered with the real property editor, so you can see what an import
|
|
20
|
+
* will do before running it.
|
|
21
|
+
*/
|
|
22
|
+
let uSyncDataTypePreviewElement = class uSyncDataTypePreviewElement extends UmbLitElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
_uSyncDataTypePreviewElement_instances.add(this);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (!this.preview)
|
|
29
|
+
return nothing;
|
|
30
|
+
const current = this.preview.currentDataType ?? undefined;
|
|
31
|
+
const incoming = this.preview.incomingDataType ?? undefined;
|
|
32
|
+
return html `
|
|
33
|
+
<div class="sides">
|
|
34
|
+
${__classPrivateFieldGet(this, _uSyncDataTypePreviewElement_instances, "m", _uSyncDataTypePreviewElement_renderSide).call(this, 'current', current, incoming)}
|
|
35
|
+
${__classPrivateFieldGet(this, _uSyncDataTypePreviewElement_instances, "m", _uSyncDataTypePreviewElement_renderSide).call(this, 'incoming', incoming, current)}
|
|
36
|
+
</div>
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
_uSyncDataTypePreviewElement_instances = new WeakSet();
|
|
41
|
+
_uSyncDataTypePreviewElement_renderSide = function _uSyncDataTypePreviewElement_renderSide(side, dataType, other) {
|
|
42
|
+
const headline = side === 'current'
|
|
43
|
+
? this.localize.termOrDefault('uSync_previewCurrent', 'Current (this site)')
|
|
44
|
+
: this.localize.termOrDefault('uSync_previewIncoming', 'Incoming (uSync files)');
|
|
45
|
+
return html `
|
|
46
|
+
<div class="side">
|
|
47
|
+
<h4 class="side-headline">${headline}</h4>
|
|
48
|
+
${dataType
|
|
49
|
+
? html `
|
|
50
|
+
${__classPrivateFieldGet(this, _uSyncDataTypePreviewElement_instances, "m", _uSyncDataTypePreviewElement_renderInfo).call(this, dataType, other)} ${__classPrivateFieldGet(this, _uSyncDataTypePreviewElement_instances, "m", _uSyncDataTypePreviewElement_renderEditor).call(this, dataType)}
|
|
51
|
+
${__classPrivateFieldGet(this, _uSyncDataTypePreviewElement_instances, "m", _uSyncDataTypePreviewElement_renderConfig).call(this, dataType, other, side)}
|
|
52
|
+
`
|
|
53
|
+
: __classPrivateFieldGet(this, _uSyncDataTypePreviewElement_instances, "m", _uSyncDataTypePreviewElement_renderMissing).call(this, side)}
|
|
54
|
+
</div>
|
|
55
|
+
`;
|
|
56
|
+
};
|
|
57
|
+
_uSyncDataTypePreviewElement_renderMissing = function _uSyncDataTypePreviewElement_renderMissing(side) {
|
|
58
|
+
const message = side === 'current'
|
|
59
|
+
? this.localize.termOrDefault('uSync_previewNotInSite', 'This item does not exist in the site yet')
|
|
60
|
+
: this.preview?.isDelete
|
|
61
|
+
? this.localize.termOrDefault('uSync_previewDeleted', 'This item will be deleted or renamed by the import')
|
|
62
|
+
: this.localize.termOrDefault('uSync_previewFailed', 'The incoming item could not be built for the preview');
|
|
63
|
+
return html `<uui-box class="info"><p class="empty">${message}</p></uui-box>`;
|
|
64
|
+
};
|
|
65
|
+
_uSyncDataTypePreviewElement_renderInfo = function _uSyncDataTypePreviewElement_renderInfo(dataType, other) {
|
|
66
|
+
const changed = (field) => other !== undefined && other[field] !== dataType[field];
|
|
67
|
+
return html `
|
|
68
|
+
<uui-box class="info">
|
|
69
|
+
<div slot="headline" class="headline">
|
|
70
|
+
<umb-icon name="icon-autofill"></umb-icon>
|
|
71
|
+
<span class=${classMap({ changed: changed('name') })}>${dataType.name}</span>
|
|
72
|
+
</div>
|
|
73
|
+
<dl class="meta">
|
|
74
|
+
<dt>
|
|
75
|
+
${this.localize.termOrDefault('uSync_previewPropertyEditor', 'Property editor')}
|
|
76
|
+
</dt>
|
|
77
|
+
<dd class=${classMap({ changed: changed('editorAlias') })}>
|
|
78
|
+
<code>${dataType.editorAlias}</code>
|
|
79
|
+
</dd>
|
|
80
|
+
<dt>
|
|
81
|
+
${this.localize.termOrDefault('uSync_previewPropertyEditorUi', 'Property editor UI')}
|
|
82
|
+
</dt>
|
|
83
|
+
<dd class=${classMap({ changed: changed('editorUiAlias') })}>
|
|
84
|
+
<code>${dataType.editorUiAlias}</code>
|
|
85
|
+
</dd>
|
|
86
|
+
</dl>
|
|
87
|
+
</uui-box>
|
|
88
|
+
`;
|
|
89
|
+
};
|
|
90
|
+
_uSyncDataTypePreviewElement_renderEditor = function _uSyncDataTypePreviewElement_renderEditor(dataType) {
|
|
91
|
+
return html `
|
|
92
|
+
<uui-box
|
|
93
|
+
.headline=${this.localize.termOrDefault('uSync_previewEditor', 'Editor preview')}>
|
|
94
|
+
<!-- inert rather than readonly: most editors render only their value when
|
|
95
|
+
readonly, which is empty here, so you wouldn't see the editor at all. -->
|
|
96
|
+
<umb-property-dataset .value=${[]} inert>
|
|
97
|
+
<umb-property
|
|
98
|
+
alias="usyncPreview"
|
|
99
|
+
.label=${dataType.name}
|
|
100
|
+
.description=${this.localize.termOrDefault('uSync_previewEditorDesc', 'How this data type looks to editors')}
|
|
101
|
+
.propertyEditorUiAlias=${dataType.editorUiAlias}
|
|
102
|
+
.config=${dataType.values}></umb-property>
|
|
103
|
+
</umb-property-dataset>
|
|
104
|
+
</uui-box>
|
|
105
|
+
`;
|
|
106
|
+
};
|
|
107
|
+
_uSyncDataTypePreviewElement_renderConfig = function _uSyncDataTypePreviewElement_renderConfig(dataType, other, side) {
|
|
108
|
+
const values = [...dataType.values].sort((a, b) => a.alias.localeCompare(b.alias));
|
|
109
|
+
return html `
|
|
110
|
+
<uui-box
|
|
111
|
+
.headline=${this.localize.termOrDefault('uSync_previewConfiguration', 'Configuration')}>
|
|
112
|
+
${values.length === 0
|
|
113
|
+
? html `<p class="empty">
|
|
114
|
+
${this.localize.termOrDefault('uSync_previewNoConfiguration', 'No configuration')}
|
|
115
|
+
</p>`
|
|
116
|
+
: html `<table>
|
|
117
|
+
${values.map((value) => {
|
|
118
|
+
const status = configStatus(value.alias, value.value, other, side);
|
|
119
|
+
return html `<tr class="row-${status}">
|
|
120
|
+
<th><code>${value.alias}</code></th>
|
|
121
|
+
<td><pre>${formatConfigValue(value.value)}</pre></td>
|
|
122
|
+
</tr>`;
|
|
123
|
+
})}
|
|
124
|
+
</table>`}
|
|
125
|
+
</uui-box>
|
|
126
|
+
`;
|
|
127
|
+
};
|
|
128
|
+
uSyncDataTypePreviewElement.styles = css `
|
|
129
|
+
:host {
|
|
130
|
+
display: block;
|
|
131
|
+
container-type: inline-size;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* the two sides share rows (headline, info, editor, config), so the
|
|
135
|
+
boxes line up across the sides. */
|
|
136
|
+
.sides {
|
|
137
|
+
display: grid;
|
|
138
|
+
grid-template-columns: 1fr 1fr;
|
|
139
|
+
grid-template-rows: auto auto auto 1fr;
|
|
140
|
+
gap: var(--uui-size-space-4) var(--uui-size-space-5);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.side {
|
|
144
|
+
display: grid;
|
|
145
|
+
grid-row: span 4;
|
|
146
|
+
grid-template-rows: subgrid;
|
|
147
|
+
min-width: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.side > :last-child {
|
|
151
|
+
align-self: start;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@container (max-width: 760px) {
|
|
155
|
+
.sides {
|
|
156
|
+
grid-template-columns: 1fr;
|
|
157
|
+
grid-template-rows: none;
|
|
158
|
+
row-gap: var(--uui-size-layout-1);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.side {
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
gap: var(--uui-size-space-4);
|
|
165
|
+
grid-row: auto;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.side-headline {
|
|
170
|
+
margin: 0;
|
|
171
|
+
font-size: var(--uui-type-small-size);
|
|
172
|
+
text-transform: uppercase;
|
|
173
|
+
letter-spacing: 0.04em;
|
|
174
|
+
color: var(--uui-color-text-alt);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.headline {
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: var(--uui-size-space-3);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.meta {
|
|
184
|
+
display: grid;
|
|
185
|
+
grid-template-columns: max-content 1fr;
|
|
186
|
+
align-items: baseline;
|
|
187
|
+
gap: var(--uui-size-space-3) var(--uui-size-space-5);
|
|
188
|
+
margin: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.meta dt {
|
|
192
|
+
font-weight: 700;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.meta dd {
|
|
196
|
+
margin: 0;
|
|
197
|
+
overflow-wrap: anywhere;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* a changed field gets a soft highlight, spread with a shadow so the text doesn't move. */
|
|
201
|
+
.changed {
|
|
202
|
+
background: color-mix(in srgb, var(--uui-color-warning) 35%, transparent);
|
|
203
|
+
border-radius: var(--uui-border-radius);
|
|
204
|
+
box-shadow: 0 0 0 var(--uui-size-space-1)
|
|
205
|
+
color-mix(in srgb, var(--uui-color-warning) 35%, transparent);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* umb-property pads itself for a full workspace, tighten it up here. */
|
|
209
|
+
umb-property {
|
|
210
|
+
--uui-size-layout-1: var(--uui-size-space-2);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
table {
|
|
214
|
+
width: 100%;
|
|
215
|
+
border-collapse: collapse;
|
|
216
|
+
margin: calc(-1 * var(--uui-size-space-2)) 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
tr + tr {
|
|
220
|
+
border-top: 1px solid var(--uui-color-divider);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
th,
|
|
224
|
+
td {
|
|
225
|
+
text-align: left;
|
|
226
|
+
vertical-align: baseline;
|
|
227
|
+
padding: var(--uui-size-space-3) var(--uui-size-space-3);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* the alias column is as wide as the longest alias (up to 40%), so values sit beside their names. */
|
|
231
|
+
th {
|
|
232
|
+
width: 1%;
|
|
233
|
+
max-width: 40%;
|
|
234
|
+
white-space: nowrap;
|
|
235
|
+
font-weight: 700;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
th code,
|
|
239
|
+
td pre {
|
|
240
|
+
font-size: var(--uui-type-small-size);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
td pre {
|
|
244
|
+
margin: 0;
|
|
245
|
+
white-space: pre-wrap;
|
|
246
|
+
word-break: break-word;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* marked with an inset bar rather than a border, so the content doesn't shift. */
|
|
250
|
+
tr.row-changed {
|
|
251
|
+
box-shadow: inset 3px 0 0 var(--uui-color-warning);
|
|
252
|
+
background: color-mix(in srgb, var(--uui-color-warning) 10%, transparent);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
tr.row-added {
|
|
256
|
+
box-shadow: inset 3px 0 0 var(--uui-color-positive);
|
|
257
|
+
background: color-mix(in srgb, var(--uui-color-positive) 6%, transparent);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
tr.row-removed {
|
|
261
|
+
box-shadow: inset 3px 0 0 var(--uui-color-danger);
|
|
262
|
+
background: color-mix(in srgb, var(--uui-color-danger) 6%, transparent);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.empty {
|
|
266
|
+
margin: 0;
|
|
267
|
+
color: var(--uui-color-text-alt);
|
|
268
|
+
}
|
|
269
|
+
`;
|
|
270
|
+
__decorate([
|
|
271
|
+
property({ type: Object })
|
|
272
|
+
], uSyncDataTypePreviewElement.prototype, "preview", void 0);
|
|
273
|
+
uSyncDataTypePreviewElement = __decorate([
|
|
274
|
+
customElement('usync-data-type-preview')
|
|
275
|
+
], uSyncDataTypePreviewElement);
|
|
276
|
+
export { uSyncDataTypePreviewElement };
|
|
277
|
+
/**
|
|
278
|
+
* how a config value on this side compares to the other side. an alias
|
|
279
|
+
* missing from the current side is being added, one missing from the
|
|
280
|
+
* incoming side is being removed.
|
|
281
|
+
*/
|
|
282
|
+
function configStatus(alias, value, other, side) {
|
|
283
|
+
if (!other)
|
|
284
|
+
return 'unchanged';
|
|
285
|
+
const match = other.values.find((v) => v.alias === alias);
|
|
286
|
+
if (!match)
|
|
287
|
+
return side === 'incoming' ? 'added' : 'removed';
|
|
288
|
+
return deepEqual(value, match.value) ? 'unchanged' : 'changed';
|
|
289
|
+
}
|
|
290
|
+
function formatConfigValue(value) {
|
|
291
|
+
return typeof value === 'string' ? value : prettyJson(value);
|
|
292
|
+
}
|
|
293
|
+
export default uSyncDataTypePreviewElement;
|
|
@@ -49,17 +49,17 @@ let uSyncProcessBox = class uSyncProcessBox extends UmbElementMixin(LitElement)
|
|
|
49
49
|
if (action.status == HandlerStatus.COMPLETE)
|
|
50
50
|
progress++;
|
|
51
51
|
const actionName = __classPrivateFieldGet(this, _uSyncProcessBox_instances, "m", _uSyncProcessBox_camelize).call(this, action.name ?? 'unknown');
|
|
52
|
-
return html `
|
|
53
|
-
<div
|
|
54
|
-
class="action
|
|
55
|
-
${action.status == HandlerStatus.COMPLETE ? 'complete' : ''}
|
|
56
|
-
${action.status == HandlerStatus.PROCESSING ? 'working' : ''}">
|
|
57
|
-
<div class="icon-holder">
|
|
58
|
-
<uui-icon .name=${action.icon ?? 'icon-box'}></uui-icon>
|
|
59
|
-
${this.renderBadge(action)}
|
|
60
|
-
</div>
|
|
61
|
-
<h4>${this.localize.termOrDefault(`treeHeaders_${actionName}`, actionName)}</h4>
|
|
62
|
-
</div>
|
|
52
|
+
return html `
|
|
53
|
+
<div
|
|
54
|
+
class="action
|
|
55
|
+
${action.status == HandlerStatus.COMPLETE ? 'complete' : ''}
|
|
56
|
+
${action.status == HandlerStatus.PROCESSING ? 'working' : ''}">
|
|
57
|
+
<div class="icon-holder">
|
|
58
|
+
<uui-icon .name=${action.icon ?? 'icon-box'}></uui-icon>
|
|
59
|
+
${this.renderBadge(action)}
|
|
60
|
+
</div>
|
|
61
|
+
<h4>${this.localize.termOrDefault(`treeHeaders_${actionName}`, actionName)}</h4>
|
|
62
|
+
</div>
|
|
63
63
|
`;
|
|
64
64
|
});
|
|
65
65
|
let overall = this.showProgress
|
|
@@ -72,23 +72,23 @@ let uSyncProcessBox = class uSyncProcessBox extends UmbElementMixin(LitElement)
|
|
|
72
72
|
this.showProgress = true;
|
|
73
73
|
}
|
|
74
74
|
const progressClass = { hidden: !this.showProgress };
|
|
75
|
-
return html `
|
|
76
|
-
<uui-box>
|
|
77
|
-
<h2>${this.localize.termOrDefault(`uSync_group${this.title}`, this.title)}</h2>
|
|
78
|
-
<div class="action-list">${actionHtml}</div>
|
|
79
|
-
<div class="update-box">${this.updateMsg?.message}</div>
|
|
80
|
-
<uui-progress-bar
|
|
81
|
-
progress=${overall}
|
|
82
|
-
class=${classMap(progressClass)}></uui-progress-bar>
|
|
83
|
-
</uui-box>
|
|
75
|
+
return html `
|
|
76
|
+
<uui-box>
|
|
77
|
+
<h2>${this.localize.termOrDefault(`uSync_group${this.title}`, this.title)}</h2>
|
|
78
|
+
<div class="action-list">${actionHtml}</div>
|
|
79
|
+
<div class="update-box">${this.updateMsg?.message}</div>
|
|
80
|
+
<uui-progress-bar
|
|
81
|
+
progress=${overall}
|
|
82
|
+
class=${classMap(progressClass)}></uui-progress-bar>
|
|
83
|
+
</uui-box>
|
|
84
84
|
`;
|
|
85
85
|
}
|
|
86
86
|
renderBadge(action) {
|
|
87
87
|
if (action.status == HandlerStatus.PENDING)
|
|
88
88
|
return;
|
|
89
89
|
if (action.status == HandlerStatus.PROCESSING) {
|
|
90
|
-
return html `<uui-badge color="positive" look="default">
|
|
91
|
-
<uui-icon name="icon-circle-dotted" class="rotating"></uui-icon
|
|
90
|
+
return html `<uui-badge color="positive" look="default">
|
|
91
|
+
<uui-icon name="icon-circle-dotted" class="rotating"></uui-icon
|
|
92
92
|
></uui-badge>`;
|
|
93
93
|
}
|
|
94
94
|
const color = action.inError ? 'warning' : 'positive';
|
|
@@ -96,8 +96,8 @@ let uSyncProcessBox = class uSyncProcessBox extends UmbElementMixin(LitElement)
|
|
|
96
96
|
? 'Some errors occured duing import'
|
|
97
97
|
: 'Changes imported successfully';
|
|
98
98
|
if (!this.complete || action.changes == 0)
|
|
99
|
-
return html `<uui-badge .color=${color} look="default" title=${label}
|
|
100
|
-
><uui-icon name="icon-check"></uui-icon
|
|
99
|
+
return html `<uui-badge .color=${color} look="default" title=${label}
|
|
100
|
+
><uui-icon name="icon-check"></uui-icon
|
|
101
101
|
></uui-badge>`;
|
|
102
102
|
return html `<uui-badge .color=${color} title=${label}>${action.changes}</uui-badge>`;
|
|
103
103
|
}
|
|
@@ -115,88 +115,88 @@ _uSyncProcessBox_camelize = function _uSyncProcessBox_camelize(str) {
|
|
|
115
115
|
})
|
|
116
116
|
.replace(/\s+/g, '');
|
|
117
117
|
};
|
|
118
|
-
uSyncProcessBox.styles = css `
|
|
119
|
-
:host {
|
|
120
|
-
display: block;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
h2 {
|
|
124
|
-
text-align: center;
|
|
125
|
-
margin: 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.action-list {
|
|
129
|
-
margin-top: var(--uui-size-space-4);
|
|
130
|
-
padding: var(--uui-size-space-4) 0;
|
|
131
|
-
display: flex;
|
|
132
|
-
flex-wrap: wrap;
|
|
133
|
-
justify-content: center;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.action {
|
|
137
|
-
display: flex;
|
|
138
|
-
flex-direction: column;
|
|
139
|
-
align-items: center;
|
|
140
|
-
min-width: var(--uui-size-layout-5);
|
|
141
|
-
color: var(--uui-color-text-alt);
|
|
142
|
-
opacity: 0.67;
|
|
143
|
-
margin: var(--uui-size-space-4) 0 var(--uui-size-space-6);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.action h4 {
|
|
147
|
-
margin: var(--uui-size-space-4) 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.icon-holder {
|
|
151
|
-
position: relative;
|
|
152
|
-
padding: 0 var(--uui-size-7);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.rotating {
|
|
156
|
-
animation: spin-animation 2s infinite;
|
|
157
|
-
animation-timing-function: linear;
|
|
158
|
-
display: inline-block;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
@keyframes spin-animation {
|
|
162
|
-
0% {
|
|
163
|
-
transform: rotate(360deg);
|
|
164
|
-
}
|
|
165
|
-
100% {
|
|
166
|
-
transform: rotate(0deg);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.action uui-icon {
|
|
171
|
-
font-size: var(--uui-size-12);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.action uui-badge uui-icon {
|
|
175
|
-
font-size: var(--uui-type-h4-size);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.complete {
|
|
179
|
-
color: var(--uui-color-default-emphasis);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.working {
|
|
183
|
-
color: var(--uui-color-positive);
|
|
184
|
-
opacity: 1;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.update-box {
|
|
188
|
-
font-weight: bold;
|
|
189
|
-
text-align: center;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
uui-progress-bar {
|
|
193
|
-
padding: 0;
|
|
194
|
-
margin: 0;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.hidden {
|
|
198
|
-
opacity: 0;
|
|
199
|
-
}
|
|
118
|
+
uSyncProcessBox.styles = css `
|
|
119
|
+
:host {
|
|
120
|
+
display: block;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
h2 {
|
|
124
|
+
text-align: center;
|
|
125
|
+
margin: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.action-list {
|
|
129
|
+
margin-top: var(--uui-size-space-4);
|
|
130
|
+
padding: var(--uui-size-space-4) 0;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-wrap: wrap;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.action {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: column;
|
|
139
|
+
align-items: center;
|
|
140
|
+
min-width: var(--uui-size-layout-5);
|
|
141
|
+
color: var(--uui-color-text-alt);
|
|
142
|
+
opacity: 0.67;
|
|
143
|
+
margin: var(--uui-size-space-4) 0 var(--uui-size-space-6);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.action h4 {
|
|
147
|
+
margin: var(--uui-size-space-4) 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.icon-holder {
|
|
151
|
+
position: relative;
|
|
152
|
+
padding: 0 var(--uui-size-7);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.rotating {
|
|
156
|
+
animation: spin-animation 2s infinite;
|
|
157
|
+
animation-timing-function: linear;
|
|
158
|
+
display: inline-block;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@keyframes spin-animation {
|
|
162
|
+
0% {
|
|
163
|
+
transform: rotate(360deg);
|
|
164
|
+
}
|
|
165
|
+
100% {
|
|
166
|
+
transform: rotate(0deg);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.action uui-icon {
|
|
171
|
+
font-size: var(--uui-size-12);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.action uui-badge uui-icon {
|
|
175
|
+
font-size: var(--uui-type-h4-size);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.complete {
|
|
179
|
+
color: var(--uui-color-default-emphasis);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.working {
|
|
183
|
+
color: var(--uui-color-positive);
|
|
184
|
+
opacity: 1;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.update-box {
|
|
188
|
+
font-weight: bold;
|
|
189
|
+
text-align: center;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
uui-progress-bar {
|
|
193
|
+
padding: 0;
|
|
194
|
+
margin: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.hidden {
|
|
198
|
+
opacity: 0;
|
|
199
|
+
}
|
|
200
200
|
`;
|
|
201
201
|
__decorate([
|
|
202
202
|
state()
|
|
@@ -32,21 +32,21 @@ let uSyncResultRow = class uSyncResultRow extends UmbLitElement {
|
|
|
32
32
|
? 'icon-check color-green'
|
|
33
33
|
: 'icon-wrong color-red';
|
|
34
34
|
const noChange = result.change == ChangeType.NO_CHANGE || result.change == ChangeType.EXPORT;
|
|
35
|
-
return html `<div
|
|
36
|
-
class="${classMap({ no_change: noChange })} row"
|
|
37
|
-
@click=${() => __classPrivateFieldGet(this, _uSyncResultRow_instances, "m", _uSyncResultRow_showDetail).call(this, result)}>
|
|
38
|
-
<div class="icon-cell" .noPadding=${true}>
|
|
39
|
-
<umb-icon .name=${icon}></umb-icon>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="row-content" .clipText=${true}>
|
|
42
|
-
<div class="item-detail">
|
|
43
|
-
<div class="item-change">${result.change}</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="item-name">
|
|
46
|
-
<div>${result.name}</div>
|
|
47
|
-
<div>${this.renderMessage(result)}</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
35
|
+
return html `<div
|
|
36
|
+
class="${classMap({ no_change: noChange })} row"
|
|
37
|
+
@click=${() => __classPrivateFieldGet(this, _uSyncResultRow_instances, "m", _uSyncResultRow_showDetail).call(this, result)}>
|
|
38
|
+
<div class="icon-cell" .noPadding=${true}>
|
|
39
|
+
<umb-icon .name=${icon}></umb-icon>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="row-content" .clipText=${true}>
|
|
42
|
+
<div class="item-detail">
|
|
43
|
+
<div class="item-change">${result.change}</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="item-name">
|
|
46
|
+
<div>${result.name}</div>
|
|
47
|
+
<div>${this.renderMessage(result)}</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
50
|
</div>`;
|
|
51
51
|
}
|
|
52
52
|
renderMessage(result) {
|
|
@@ -54,11 +54,11 @@ let uSyncResultRow = class uSyncResultRow extends UmbLitElement {
|
|
|
54
54
|
result.change != ChangeType.IMPORT_FAIL) ||
|
|
55
55
|
!result.message
|
|
56
56
|
? html `<em>${result.message}</em>`
|
|
57
|
-
: html ` <uui-button
|
|
58
|
-
look="outline"
|
|
59
|
-
color="danger"
|
|
60
|
-
label="View error"
|
|
61
|
-
compact
|
|
57
|
+
: html ` <uui-button
|
|
58
|
+
look="outline"
|
|
59
|
+
color="danger"
|
|
60
|
+
label="View error"
|
|
61
|
+
compact
|
|
62
62
|
@click=${(e) => __classPrivateFieldGet(this, _uSyncResultRow_instances, "m", _uSyncResultRow_viewError).call(this, e, result)}></uui-button>`;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -81,47 +81,47 @@ _uSyncResultRow_viewError = async function _uSyncResultRow_viewError(e, result)
|
|
|
81
81
|
});
|
|
82
82
|
return data;
|
|
83
83
|
};
|
|
84
|
-
uSyncResultRow.styles = css `
|
|
85
|
-
.row {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
gap: var(--uui-size-space-5);
|
|
89
|
-
padding: var(--uui-size-space-5);
|
|
90
|
-
border-bottom: 1px solid var(--uui-color-border);
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.row:hover {
|
|
95
|
-
background-color: var(--uui-color-surface-alt);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.no_change {
|
|
99
|
-
color: var(--uui-color-disabled-contrast);
|
|
100
|
-
cursor: default;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.row-content {
|
|
104
|
-
gap: 10px;
|
|
105
|
-
flex-grow: 1;
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
justify-content: space-between;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.item-name {
|
|
112
|
-
display: flex;
|
|
113
|
-
font-weight: bold;
|
|
114
|
-
align-items: center;
|
|
115
|
-
flex-grow: 2;
|
|
116
|
-
justify-content: space-between;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.item-detail {
|
|
120
|
-
display: flex;
|
|
121
|
-
flex-direction: column;
|
|
122
|
-
font-size: smaller;
|
|
123
|
-
min-width: 60px;
|
|
124
|
-
}
|
|
84
|
+
uSyncResultRow.styles = css `
|
|
85
|
+
.row {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: var(--uui-size-space-5);
|
|
89
|
+
padding: var(--uui-size-space-5);
|
|
90
|
+
border-bottom: 1px solid var(--uui-color-border);
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.row:hover {
|
|
95
|
+
background-color: var(--uui-color-surface-alt);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.no_change {
|
|
99
|
+
color: var(--uui-color-disabled-contrast);
|
|
100
|
+
cursor: default;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.row-content {
|
|
104
|
+
gap: 10px;
|
|
105
|
+
flex-grow: 1;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: space-between;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.item-name {
|
|
112
|
+
display: flex;
|
|
113
|
+
font-weight: bold;
|
|
114
|
+
align-items: center;
|
|
115
|
+
flex-grow: 2;
|
|
116
|
+
justify-content: space-between;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.item-detail {
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
font-size: smaller;
|
|
123
|
+
min-width: 60px;
|
|
124
|
+
}
|
|
125
125
|
`;
|
|
126
126
|
__decorate([
|
|
127
127
|
property({ type: Object })
|