@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.
@@ -1,4 +1,5 @@
1
1
  import type { UmbBlockTypeBaseModel } from '../../core/extension-registry/index.js';
2
+ export type { UmbBlockTypeBaseModel } from '../../core/extension-registry/index.js';
2
3
  export interface UmbBlockTypeGroup {
3
4
  name?: string;
4
5
  key: string;
@@ -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 };
@@ -26,3 +26,7 @@ export class UmbSubmitWorkspaceAction extends UmbWorkspaceActionBase {
26
26
  return await workspaceContext.requestSubmit();
27
27
  }
28
28
  }
29
+ /*
30
+ * @deprecated Use UmbSubmitWorkspaceAction instead
31
+ */
32
+ export { UmbSubmitWorkspaceAction as UmbSaveWorkspaceAction };
@@ -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, (url) => url.url, (url) => html `
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">