@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,100 @@
|
|
|
1
|
+
/** name used for the tab that holds groups which aren't inside a tab */
|
|
2
|
+
export const USYNC_GENERIC_TAB = '';
|
|
3
|
+
/** the ids of the types this one is composed of (or inherits from). */
|
|
4
|
+
export function compositionIds(type) {
|
|
5
|
+
return type.compositions.map((composition) => {
|
|
6
|
+
if ('documentType' in composition)
|
|
7
|
+
return composition.documentType.id;
|
|
8
|
+
if ('mediaType' in composition)
|
|
9
|
+
return composition.mediaType.id;
|
|
10
|
+
return composition.memberType.id;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* build the tabs and groups an editor would see, merging in the containers
|
|
15
|
+
* and properties from compositions the way the backoffice does (by name).
|
|
16
|
+
*/
|
|
17
|
+
export function buildContentTypeLayout(type, compositions) {
|
|
18
|
+
const tabs = new Map();
|
|
19
|
+
const tabFor = (name, id, sortOrder, inherited) => {
|
|
20
|
+
let tab = tabs.get(name);
|
|
21
|
+
if (!tab) {
|
|
22
|
+
tab = { name, ids: [], inherited, sortOrder, properties: [], groups: [] };
|
|
23
|
+
tabs.set(name, tab);
|
|
24
|
+
}
|
|
25
|
+
if (id)
|
|
26
|
+
tab.ids.push(id);
|
|
27
|
+
tab.inherited && (tab.inherited = inherited);
|
|
28
|
+
return tab;
|
|
29
|
+
};
|
|
30
|
+
const groupFor = (tab, name, id, sortOrder, inherited) => {
|
|
31
|
+
let group = tab.groups.find((g) => g.name === name);
|
|
32
|
+
if (!group) {
|
|
33
|
+
group = { name, ids: [], inherited, sortOrder, properties: [] };
|
|
34
|
+
tab.groups.push(group);
|
|
35
|
+
}
|
|
36
|
+
group.ids.push(id);
|
|
37
|
+
group.inherited && (group.inherited = inherited);
|
|
38
|
+
return group;
|
|
39
|
+
};
|
|
40
|
+
for (const source of contributors(type, compositions)) {
|
|
41
|
+
const inherited = source !== type;
|
|
42
|
+
const containers = new Map(source.containers.map((c) => [c.id, c]));
|
|
43
|
+
// where each container (and so each property) lands in the merged layout.
|
|
44
|
+
const placed = new Map();
|
|
45
|
+
for (const container of [...source.containers].sort(bySortOrder)) {
|
|
46
|
+
if (container.type === 'Tab') {
|
|
47
|
+
placed.set(container.id, tabFor(container.name ?? '', container.id, container.sortOrder, inherited));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
for (const container of [...source.containers].sort(bySortOrder)) {
|
|
51
|
+
if (container.type !== 'Group')
|
|
52
|
+
continue;
|
|
53
|
+
const parent = container.parent ? containers.get(container.parent.id) : undefined;
|
|
54
|
+
const tab = parent
|
|
55
|
+
? tabFor(parent.name ?? '', undefined, parent.sortOrder, inherited)
|
|
56
|
+
: tabFor(USYNC_GENERIC_TAB, undefined, -1, inherited);
|
|
57
|
+
placed.set(container.id, groupFor(tab, container.name ?? '', container.id, container.sortOrder, inherited));
|
|
58
|
+
}
|
|
59
|
+
for (const property of [...source.properties].sort(bySortOrder)) {
|
|
60
|
+
const target = property.container ? placed.get(property.container.id) : undefined;
|
|
61
|
+
const entry = { property, inheritedFrom: inherited ? source.name : undefined };
|
|
62
|
+
if (target) {
|
|
63
|
+
target.properties.push(entry);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
tabFor(USYNC_GENERIC_TAB, undefined, -1, inherited).properties.push(entry);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const result = [...tabs.values()].sort(bySortOrder);
|
|
71
|
+
for (const tab of result) {
|
|
72
|
+
tab.groups.sort(bySortOrder);
|
|
73
|
+
tab.properties.sort((a, b) => a.property.sortOrder - b.property.sortOrder);
|
|
74
|
+
for (const group of tab.groups) {
|
|
75
|
+
group.properties.sort((a, b) => a.property.sortOrder - b.property.sortOrder);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return result.filter((tab) => tab.properties.length > 0 || tab.groups.length > 0);
|
|
79
|
+
}
|
|
80
|
+
/** the type itself first, then everything it is composed of (depth first, no repeats). */
|
|
81
|
+
function contributors(type, compositions) {
|
|
82
|
+
const seen = new Set();
|
|
83
|
+
const out = [];
|
|
84
|
+
const visit = (current) => {
|
|
85
|
+
if (seen.has(current.id))
|
|
86
|
+
return;
|
|
87
|
+
seen.add(current.id);
|
|
88
|
+
out.push(current);
|
|
89
|
+
for (const id of compositionIds(current)) {
|
|
90
|
+
const composition = compositions.get(id);
|
|
91
|
+
if (composition)
|
|
92
|
+
visit(composition);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
visit(type);
|
|
96
|
+
return out;
|
|
97
|
+
}
|
|
98
|
+
function bySortOrder(a, b) {
|
|
99
|
+
return a.sortOrder - b.sortOrder;
|
|
100
|
+
}
|
|
@@ -21,55 +21,55 @@ 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>
|
|
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
37
|
`;
|
|
38
38
|
}
|
|
39
39
|
renderDropdown(parent) {
|
|
40
40
|
if (!this.button?.children)
|
|
41
41
|
return nothing;
|
|
42
42
|
const buttons = this.button?.children.map((item) => {
|
|
43
|
-
return html ` <uui-menu-item
|
|
44
|
-
.disabled=${this.disabled}
|
|
45
|
-
.label=${this.localize.termOrDefault(`uSync_${item.label}`, item.label)}
|
|
43
|
+
return html ` <uui-menu-item
|
|
44
|
+
.disabled=${this.disabled}
|
|
45
|
+
.label=${this.localize.termOrDefault(`uSync_${item.label}`, item.label)}
|
|
46
46
|
@click-label=${() => __classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onClick).call(this, item)}></uui-menu-item>`;
|
|
47
47
|
});
|
|
48
48
|
if (buttons.length == 0)
|
|
49
49
|
return nothing;
|
|
50
50
|
const popoverId = `popover_${parent?.key}`;
|
|
51
|
-
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>
|
|
63
|
-
|
|
64
|
-
<uui-popover-container
|
|
65
|
-
id=${popoverId}
|
|
66
|
-
margin="6"
|
|
67
|
-
placement="bottom-end"
|
|
68
|
-
@toggle=${__classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onPopoverToggle)}>
|
|
69
|
-
<umb-popover-layout>
|
|
70
|
-
<uui-scroll-container> ${buttons} </uui-scroll-container>
|
|
71
|
-
</umb-popover-layout>
|
|
72
|
-
</uui-popover-container>
|
|
51
|
+
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>
|
|
63
|
+
|
|
64
|
+
<uui-popover-container
|
|
65
|
+
id=${popoverId}
|
|
66
|
+
margin="6"
|
|
67
|
+
placement="bottom-end"
|
|
68
|
+
@toggle=${__classPrivateFieldGet(this, _SyncActionButtonElement_instances, "m", _SyncActionButtonElement_onPopoverToggle)}>
|
|
69
|
+
<umb-popover-layout>
|
|
70
|
+
<uui-scroll-container> ${buttons} </uui-scroll-container>
|
|
71
|
+
</umb-popover-layout>
|
|
72
|
+
</uui-popover-container>
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
};
|
|
@@ -82,18 +82,18 @@ _SyncActionButtonElement_onClick = function _SyncActionButtonElement_onClick(ite
|
|
|
82
82
|
_SyncActionButtonElement_onPopoverToggle = function _SyncActionButtonElement_onPopoverToggle(e) {
|
|
83
83
|
this._popoverOpen = e.newState === 'open';
|
|
84
84
|
};
|
|
85
|
-
SyncActionButtonElement.styles = css `
|
|
86
|
-
.action-button {
|
|
87
|
-
min-width: 110px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.expand-symbol {
|
|
91
|
-
transform: rotate(90deg);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.expand-symbol[open] {
|
|
95
|
-
transform: rotate(180deg);
|
|
96
|
-
}
|
|
85
|
+
SyncActionButtonElement.styles = css `
|
|
86
|
+
.action-button {
|
|
87
|
+
min-width: 110px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.expand-symbol {
|
|
91
|
+
transform: rotate(90deg);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.expand-symbol[open] {
|
|
95
|
+
transform: rotate(180deg);
|
|
96
|
+
}
|
|
97
97
|
`;
|
|
98
98
|
__decorate([
|
|
99
99
|
property({ type: Object })
|
|
@@ -38,53 +38,53 @@ let uSyncFilePicker = class uSyncFilePicker extends UmbLitElement {
|
|
|
38
38
|
this.dispatchEvent(new uSyncFilePickerChangeEvent(this._file));
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return html `<input
|
|
42
|
-
@click=${(e) => e.stopPropagation()}
|
|
43
|
-
type="file"
|
|
44
|
-
id="file"
|
|
45
|
-
this.accept=${this.accept}
|
|
46
|
-
@change=${this._onFilePickerChange} />
|
|
41
|
+
return html `<input
|
|
42
|
+
@click=${(e) => e.stopPropagation()}
|
|
43
|
+
type="file"
|
|
44
|
+
id="file"
|
|
45
|
+
this.accept=${this.accept}
|
|
46
|
+
@change=${this._onFilePickerChange} />
|
|
47
47
|
${this._renderFile()} ${this._renderButton()}`;
|
|
48
48
|
}
|
|
49
49
|
_renderFile() {
|
|
50
50
|
if (!this._file)
|
|
51
51
|
return nothing;
|
|
52
|
-
return html ` <div class="file">
|
|
53
|
-
<div>${this._file.name}</div>
|
|
54
|
-
<uui-button
|
|
55
|
-
@click="${() => this._removeFile()}"
|
|
56
|
-
compact
|
|
57
|
-
color="danger"
|
|
58
|
-
label="Remove">
|
|
59
|
-
<umb-icon name="icon-trash"></umb-icon>
|
|
60
|
-
</uui-button>
|
|
52
|
+
return html ` <div class="file">
|
|
53
|
+
<div>${this._file.name}</div>
|
|
54
|
+
<uui-button
|
|
55
|
+
@click="${() => this._removeFile()}"
|
|
56
|
+
compact
|
|
57
|
+
color="danger"
|
|
58
|
+
label="Remove">
|
|
59
|
+
<umb-icon name="icon-trash"></umb-icon>
|
|
60
|
+
</uui-button>
|
|
61
61
|
</div>`;
|
|
62
62
|
}
|
|
63
63
|
_renderButton() {
|
|
64
64
|
return this._file
|
|
65
65
|
? nothing
|
|
66
|
-
: html ` <uui-button
|
|
67
|
-
id="add-button"
|
|
68
|
-
look="placeholder"
|
|
69
|
-
label=${this.label}
|
|
66
|
+
: html ` <uui-button
|
|
67
|
+
id="add-button"
|
|
68
|
+
look="placeholder"
|
|
69
|
+
label=${this.label}
|
|
70
70
|
@click="${this._onUpload}"></uui-button>`;
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
uSyncFilePicker.styles = [
|
|
74
|
-
css `
|
|
75
|
-
.file {
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
gap: var(--uui-size-space-2);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
#file {
|
|
82
|
-
display: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
#add-button {
|
|
86
|
-
width: 100%;
|
|
87
|
-
}
|
|
74
|
+
css `
|
|
75
|
+
.file {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
gap: var(--uui-size-space-2);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#file {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
#add-button {
|
|
86
|
+
width: 100%;
|
|
87
|
+
}
|
|
88
88
|
`,
|
|
89
89
|
];
|
|
90
90
|
__decorate([
|
|
@@ -46,22 +46,22 @@ let uSyncFileUploadElement = class uSyncFileUploadElement extends UmbLitElement
|
|
|
46
46
|
return html ` ${this.renderFile()} ${this.renderUploadButton()} `;
|
|
47
47
|
}
|
|
48
48
|
renderFile() {
|
|
49
|
-
return html `
|
|
50
|
-
<div class="upload-box">
|
|
51
|
-
<usync-upload-file-picker
|
|
52
|
-
label="Select uSync Zip file"
|
|
53
|
-
@change=${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onFileChange)}></usync-upload-file-picker>
|
|
54
|
-
</div>
|
|
49
|
+
return html `
|
|
50
|
+
<div class="upload-box">
|
|
51
|
+
<usync-upload-file-picker
|
|
52
|
+
label="Select uSync Zip file"
|
|
53
|
+
@change=${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onFileChange)}></usync-upload-file-picker>
|
|
54
|
+
</div>
|
|
55
55
|
`;
|
|
56
56
|
}
|
|
57
57
|
renderUploadButton() {
|
|
58
58
|
if (!this.selected)
|
|
59
59
|
return nothing;
|
|
60
|
-
return html `<uui-button
|
|
61
|
-
type="button"
|
|
62
|
-
look="primary"
|
|
63
|
-
@click="${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onUpload)}"
|
|
64
|
-
label="Upload"
|
|
60
|
+
return html `<uui-button
|
|
61
|
+
type="button"
|
|
62
|
+
look="primary"
|
|
63
|
+
@click="${__classPrivateFieldGet(this, _uSyncFileUploadElement_instances, "m", _uSyncFileUploadElement_onUpload)}"
|
|
64
|
+
label="Upload"
|
|
65
65
|
.state=${this.buttonState}></uui-button>`;
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -90,20 +90,20 @@ _uSyncFileUploadElement_uploadComplete = async function _uSyncFileUploadElement_
|
|
|
90
90
|
_uSyncFileUploadElement_onFileChange = function _uSyncFileUploadElement_onFileChange(e) {
|
|
91
91
|
this.selected = e.file;
|
|
92
92
|
};
|
|
93
|
-
uSyncFileUploadElement.styles = css `
|
|
94
|
-
:host {
|
|
95
|
-
display: flex;
|
|
96
|
-
justify-content: space-between;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.upload-box {
|
|
100
|
-
flex-grow: 2;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
usync-upload-file-picker {
|
|
104
|
-
width: 100%;
|
|
105
|
-
flex-grow: 2;
|
|
106
|
-
}
|
|
93
|
+
uSyncFileUploadElement.styles = css `
|
|
94
|
+
:host {
|
|
95
|
+
display: flex;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.upload-box {
|
|
100
|
+
flex-grow: 2;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
usync-upload-file-picker {
|
|
104
|
+
width: 100%;
|
|
105
|
+
flex-grow: 2;
|
|
106
|
+
}
|
|
107
107
|
`;
|
|
108
108
|
__decorate([
|
|
109
109
|
state()
|
|
@@ -18,30 +18,30 @@ let uSyncImportModalDialog = class uSyncImportModalDialog extends UmbModalBaseEl
|
|
|
18
18
|
_uSyncImportModalDialog_instances.add(this);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return html `
|
|
22
|
-
<umb-body-layout .headline=${this.localize.termOrDefault('uSync_importHeader', 'Import from file')}>
|
|
23
|
-
${this.renderForm()} ${this.renderResult()}
|
|
24
|
-
</umb-body-layout>
|
|
21
|
+
return html `
|
|
22
|
+
<umb-body-layout .headline=${this.localize.termOrDefault('uSync_importHeader', 'Import from file')}>
|
|
23
|
+
${this.renderForm()} ${this.renderResult()}
|
|
24
|
+
</umb-body-layout>
|
|
25
25
|
`;
|
|
26
26
|
}
|
|
27
27
|
renderForm() {
|
|
28
28
|
if (this.result !== undefined)
|
|
29
29
|
return;
|
|
30
|
-
return html ` ${this.localize.termOrDefault('uSync_uploadIntro', 'Select a zip file containing uSync files that you want to upload')}
|
|
31
|
-
<usync-file-upload @uploaded=${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onUploaded)}></usync-file-upload>
|
|
32
|
-
<div slot="actions">
|
|
33
|
-
<uui-button
|
|
34
|
-
id="cancel"
|
|
35
|
-
.label=${this.localize.term('general_close')}
|
|
36
|
-
@click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onClose)}"></uui-button>
|
|
30
|
+
return html ` ${this.localize.termOrDefault('uSync_uploadIntro', 'Select a zip file containing uSync files that you want to upload')}
|
|
31
|
+
<usync-file-upload @uploaded=${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onUploaded)}></usync-file-upload>
|
|
32
|
+
<div slot="actions">
|
|
33
|
+
<uui-button
|
|
34
|
+
id="cancel"
|
|
35
|
+
.label=${this.localize.term('general_close')}
|
|
36
|
+
@click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onClose)}"></uui-button>
|
|
37
37
|
</div>`;
|
|
38
38
|
}
|
|
39
39
|
renderResult() {
|
|
40
40
|
if (this.result == undefined)
|
|
41
41
|
return;
|
|
42
|
-
return html `${when(this.result.success, () => html `${this.localize.termOrDefault('uSync_uploadSuccess', 'The files have been uploaded and extracted to the uSync folder')}`, () => html `${this.localize.termOrDefault('uSync_uploadError', 'There was an error uploading the files')} ${this.result?.errors}`)}
|
|
43
|
-
<div slot="actions">
|
|
44
|
-
<uui-button id="continue" label="Import" @click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onImport)}"></uui-button>
|
|
42
|
+
return html `${when(this.result.success, () => html `${this.localize.termOrDefault('uSync_uploadSuccess', 'The files have been uploaded and extracted to the uSync folder')}`, () => html `${this.localize.termOrDefault('uSync_uploadError', 'There was an error uploading the files')} ${this.result?.errors}`)}
|
|
43
|
+
<div slot="actions">
|
|
44
|
+
<uui-button id="continue" label="Import" @click="${__classPrivateFieldGet(this, _uSyncImportModalDialog_instances, "m", _uSyncImportModalDialog_onImport)}"></uui-button>
|
|
45
45
|
</div>`;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -56,14 +56,14 @@ _uSyncImportModalDialog_onImport = function _uSyncImportModalDialog_onImport() {
|
|
|
56
56
|
_uSyncImportModalDialog_onUploaded = function _uSyncImportModalDialog_onUploaded(e) {
|
|
57
57
|
this.result = e.result;
|
|
58
58
|
};
|
|
59
|
-
uSyncImportModalDialog.styles = css `
|
|
60
|
-
umb-body-layout {
|
|
61
|
-
max-width: 450px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
usync-file-upload {
|
|
65
|
-
padding: 10px 0;
|
|
66
|
-
}
|
|
59
|
+
uSyncImportModalDialog.styles = css `
|
|
60
|
+
umb-body-layout {
|
|
61
|
+
max-width: 450px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
usync-file-upload {
|
|
65
|
+
padding: 10px 0;
|
|
66
|
+
}
|
|
67
67
|
`;
|
|
68
68
|
__decorate([
|
|
69
69
|
state()
|
|
@@ -9,106 +9,106 @@ import { LitElement, css, customElement, html, } from '@umbraco-cms/backoffice/e
|
|
|
9
9
|
const logo = '/App_Plugins/uSync/img/usync-complete.png';
|
|
10
10
|
let uSyncAddOnsElement = class uSyncAddOnsElement extends UmbElementMixin(LitElement) {
|
|
11
11
|
render() {
|
|
12
|
-
return html `
|
|
13
|
-
<umb-body-layout>
|
|
14
|
-
<div class="addon-view">
|
|
15
|
-
<div>
|
|
16
|
-
<div class="header">
|
|
17
|
-
<img src=${logo} />
|
|
18
|
-
<h1>uSync Complete</h1>
|
|
19
|
-
<p>
|
|
20
|
-
uSync Complete gives you total control over your Umbraco settings and
|
|
21
|
-
content.
|
|
22
|
-
</p>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div class="logos">
|
|
26
|
-
<div class="logo">
|
|
27
|
-
<uui-icon name="icon-shift"></uui-icon>
|
|
28
|
-
<h4>publish</h4>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="logo">
|
|
31
|
-
<uui-icon name="icon-compress"></uui-icon>
|
|
32
|
-
<h4>export</h4>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="logo">
|
|
35
|
-
<uui-icon name="icon-connection"></uui-icon>
|
|
36
|
-
<h4>snapshot</h4>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="logo">
|
|
39
|
-
<uui-icon name="icon-undo"></uui-icon>
|
|
40
|
-
<h4>restore</h4>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="logo">
|
|
43
|
-
<uui-icon name="icon-operator"></uui-icon>
|
|
44
|
-
<h4>people</h4>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<div class="cta">
|
|
49
|
-
<uui-button
|
|
50
|
-
href="https://jumoo.co.uk/uSync/complete/"
|
|
51
|
-
target="_blank"
|
|
52
|
-
color="positive"
|
|
53
|
-
look="primary"
|
|
54
|
-
label="Find out more"></uui-button>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</umb-body-layout>
|
|
12
|
+
return html `
|
|
13
|
+
<umb-body-layout>
|
|
14
|
+
<div class="addon-view">
|
|
15
|
+
<div>
|
|
16
|
+
<div class="header">
|
|
17
|
+
<img src=${logo} />
|
|
18
|
+
<h1>uSync Complete</h1>
|
|
19
|
+
<p>
|
|
20
|
+
uSync Complete gives you total control over your Umbraco settings and
|
|
21
|
+
content.
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="logos">
|
|
26
|
+
<div class="logo">
|
|
27
|
+
<uui-icon name="icon-shift"></uui-icon>
|
|
28
|
+
<h4>publish</h4>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="logo">
|
|
31
|
+
<uui-icon name="icon-compress"></uui-icon>
|
|
32
|
+
<h4>export</h4>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="logo">
|
|
35
|
+
<uui-icon name="icon-connection"></uui-icon>
|
|
36
|
+
<h4>snapshot</h4>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="logo">
|
|
39
|
+
<uui-icon name="icon-undo"></uui-icon>
|
|
40
|
+
<h4>restore</h4>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="logo">
|
|
43
|
+
<uui-icon name="icon-operator"></uui-icon>
|
|
44
|
+
<h4>people</h4>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="cta">
|
|
49
|
+
<uui-button
|
|
50
|
+
href="https://jumoo.co.uk/uSync/complete/"
|
|
51
|
+
target="_blank"
|
|
52
|
+
color="positive"
|
|
53
|
+
look="primary"
|
|
54
|
+
label="Find out more"></uui-button>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</umb-body-layout>
|
|
59
59
|
`;
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
-
uSyncAddOnsElement.styles = css `
|
|
63
|
-
umb-body-layout {
|
|
64
|
-
// background: linear-gradient(#e3e3f1,#f6f4f4);
|
|
65
|
-
background: linear-gradient(var(--uui-color-background), var(--uui-color-border));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.addon-view {
|
|
69
|
-
display: flex;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
align-items: center;
|
|
72
|
-
height: 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.addon-view > div {
|
|
76
|
-
margin-top: -15vh;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.header,
|
|
80
|
-
.cta {
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
align-items: center;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.header {
|
|
87
|
-
font-size: larger;
|
|
88
|
-
margin-bottom: var(--uui-size-space-6);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.logos {
|
|
92
|
-
display: flex;
|
|
93
|
-
justify-content: space-between;
|
|
94
|
-
font-size: var(--uui-type-h3-size);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.logo {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
align-items: center;
|
|
101
|
-
margin: var(--uui-size-space-2) var(--uui-size-space-6);
|
|
102
|
-
color: var(--uui-color-text-alt);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.cta {
|
|
106
|
-
margin: var(--uui-size-space-6) 0;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
uui-button {
|
|
110
|
-
font-size: var(--uui-type-h4-size);
|
|
111
|
-
}
|
|
62
|
+
uSyncAddOnsElement.styles = css `
|
|
63
|
+
umb-body-layout {
|
|
64
|
+
// background: linear-gradient(#e3e3f1,#f6f4f4);
|
|
65
|
+
background: linear-gradient(var(--uui-color-background), var(--uui-color-border));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.addon-view {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.addon-view > div {
|
|
76
|
+
margin-top: -15vh;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.header,
|
|
80
|
+
.cta {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
align-items: center;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.header {
|
|
87
|
+
font-size: larger;
|
|
88
|
+
margin-bottom: var(--uui-size-space-6);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.logos {
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
font-size: var(--uui-type-h3-size);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.logo {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
align-items: center;
|
|
101
|
+
margin: var(--uui-size-space-2) var(--uui-size-space-6);
|
|
102
|
+
color: var(--uui-color-text-alt);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.cta {
|
|
106
|
+
margin: var(--uui-size-space-6) 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
uui-button {
|
|
110
|
+
font-size: var(--uui-type-h4-size);
|
|
111
|
+
}
|
|
112
112
|
`;
|
|
113
113
|
uSyncAddOnsElement = __decorate([
|
|
114
114
|
customElement('usync-addons-view')
|