@umbraco-cms/backoffice 14.2.0-rc3 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/packages/block/block-type/types.d.ts +1 -0
- package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/submit.action.d.ts +1 -0
- package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/submit.action.js +4 -0
- package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info.element.js +33 -7
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package.json +1 -1
- package/package.json +1 -1
|
@@ -7,3 +7,4 @@ export declare class UmbSubmitWorkspaceAction extends UmbWorkspaceActionBase<Umb
|
|
|
7
7
|
constructor(host: UmbControllerHost, args: UmbWorkspaceActionArgs<UmbSubmittableWorkspaceContext>);
|
|
8
8
|
execute(): Promise<void>;
|
|
9
9
|
}
|
|
10
|
+
export { UmbSubmitWorkspaceAction as UmbSaveWorkspaceAction };
|
package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info.element.js
CHANGED
|
@@ -63,6 +63,19 @@ let UmbMediaWorkspaceViewInfoElement = class UmbMediaWorkspaceViewInfoElement ex
|
|
|
63
63
|
this._updateDate = Array.isArray(variants) ? variants[0].updateDate || 'Unknown' : 'Unknown';
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
+
#openSvg(imagePath) {
|
|
67
|
+
const popup = window.open('', '_blank');
|
|
68
|
+
if (!popup)
|
|
69
|
+
return;
|
|
70
|
+
const html = `<!doctype html>
|
|
71
|
+
<body style="background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(135deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(135deg, transparent 75%, #ccc 75%); background-size:30px 30px; background-position:0 0, 15px 0, 15px -15px, 0px 15px;">
|
|
72
|
+
<img src="${imagePath}"/>
|
|
73
|
+
<script>history.pushState(null, null, "${window.location.href}");</script>
|
|
74
|
+
</body>`;
|
|
75
|
+
popup.document.open();
|
|
76
|
+
popup.document.write(html);
|
|
77
|
+
popup.document.close();
|
|
78
|
+
}
|
|
66
79
|
render() {
|
|
67
80
|
return html `
|
|
68
81
|
<div class="container">
|
|
@@ -84,15 +97,9 @@ let UmbMediaWorkspaceViewInfoElement = class UmbMediaWorkspaceViewInfoElement ex
|
|
|
84
97
|
`;
|
|
85
98
|
}
|
|
86
99
|
#renderLinksSection() {
|
|
87
|
-
/** TODO Make sure link section is completed */
|
|
88
100
|
if (this._urls && this._urls.length) {
|
|
89
101
|
return html `
|
|
90
|
-
${repeat(this._urls, (
|
|
91
|
-
<a href=${url.url} target="_blank" class="link-item with-href">
|
|
92
|
-
<span class="link-content">${url.url}</span>
|
|
93
|
-
<uui-icon name="icon-out"></uui-icon>
|
|
94
|
-
</a>
|
|
95
|
-
`)}
|
|
102
|
+
${repeat(this._urls, (item) => item.url, (item) => this.#renderLinkItem(item))}
|
|
96
103
|
`;
|
|
97
104
|
}
|
|
98
105
|
else {
|
|
@@ -103,6 +110,25 @@ let UmbMediaWorkspaceViewInfoElement = class UmbMediaWorkspaceViewInfoElement ex
|
|
|
103
110
|
`;
|
|
104
111
|
}
|
|
105
112
|
}
|
|
113
|
+
#renderLinkItem(item) {
|
|
114
|
+
const ext = item.url.split(/[#?]/)[0].split('.').pop()?.trim();
|
|
115
|
+
if (ext === 'svg') {
|
|
116
|
+
return html `
|
|
117
|
+
<a href="#" target="_blank" class="link-item with-href" @click=${() => this.#openSvg(item.url)}>
|
|
118
|
+
<span class="link-content">${item.url}</span>
|
|
119
|
+
<uui-icon name="icon-out"></uui-icon>
|
|
120
|
+
</a>
|
|
121
|
+
`;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return html `
|
|
125
|
+
<a href=${item.url} target="_blank" class="link-item with-href">
|
|
126
|
+
<span class="link-content">${item.url}</span>
|
|
127
|
+
<uui-icon name="icon-out"></uui-icon>
|
|
128
|
+
</a>
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
106
132
|
#renderGeneralSection() {
|
|
107
133
|
return html `
|
|
108
134
|
<div class="general-item">
|