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