@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.
Files changed (71) hide show
  1. package/LICENCE +372 -372
  2. package/README.md +16 -10
  3. package/dist/api/index.d.ts +2 -2
  4. package/dist/api/index.js +1 -1
  5. package/dist/api/sdk.gen.d.ts +2 -1
  6. package/dist/api/sdk.gen.js +5 -0
  7. package/dist/api/types.gen.d.ts +37 -0
  8. package/dist/components/usync-action-box.js +71 -71
  9. package/dist/components/usync-change-detail.js +409 -409
  10. package/dist/components/usync-change-view.js +49 -49
  11. package/dist/components/usync-content-preview.d.ts +27 -0
  12. package/dist/components/usync-content-preview.js +532 -0
  13. package/dist/components/usync-content-type-preview.d.ts +25 -0
  14. package/dist/components/usync-content-type-preview.js +530 -0
  15. package/dist/components/usync-data-type-preview.d.ts +21 -0
  16. package/dist/components/usync-data-type-preview.js +295 -0
  17. package/dist/components/usync-progress-box.js +113 -113
  18. package/dist/components/usync-result-row.js +65 -65
  19. package/dist/components/usync-results-group-view.js +63 -63
  20. package/dist/components/usync-results-view.js +77 -69
  21. package/dist/components/usync-sync-file-info-view.js +10 -10
  22. package/dist/constants.js +1 -1
  23. package/dist/dialogs/details-modal-element.d.ts +15 -0
  24. package/dist/dialogs/details-modal-element.js +260 -50
  25. package/dist/dialogs/details-modal-token.d.ts +10 -1
  26. package/dist/dialogs/error-modal-element.js +22 -22
  27. package/dist/dialogs/legacy-modal-element.js +22 -22
  28. package/dist/dialogs/single-import-modal.element.js +31 -31
  29. package/dist/exports.d.ts +1 -0
  30. package/dist/exports.js +1 -0
  31. package/dist/icons/svg/logo.js +20 -20
  32. package/dist/lang/files/da-dk.d.ts +37 -0
  33. package/dist/lang/files/da-dk.js +49 -12
  34. package/dist/lang/files/de-de.d.ts +37 -0
  35. package/dist/lang/files/de-de.js +49 -12
  36. package/dist/lang/files/en-us.d.ts +50 -0
  37. package/dist/lang/files/en-us.js +62 -12
  38. package/dist/lang/files/es-es.d.ts +37 -0
  39. package/dist/lang/files/es-es.js +49 -12
  40. package/dist/lang/files/fr-fr.d.ts +37 -0
  41. package/dist/lang/files/fr-fr.js +49 -12
  42. package/dist/lang/files/nl-nl.d.ts +37 -0
  43. package/dist/lang/files/nl-nl.js +49 -12
  44. package/dist/manifests.js +2 -0
  45. package/dist/preview/index.d.ts +1 -0
  46. package/dist/preview/index.js +1 -0
  47. package/dist/preview/manifest.d.ts +2 -0
  48. package/dist/preview/manifest.js +22 -0
  49. package/dist/preview/types.d.ts +72 -0
  50. package/dist/preview/types.js +2 -0
  51. package/dist/repository/SyncAction.respositoy.d.ts +13 -0
  52. package/dist/repository/SyncAction.respositoy.js +6 -0
  53. package/dist/repository/sources/SyncAction.source.d.ts +10 -0
  54. package/dist/repository/sources/SyncAction.source.js +6 -1
  55. package/dist/signalr/signalr.context.js +73 -26
  56. package/dist/tree/usync.menu-element.js +8 -8
  57. package/dist/utils/preview/content-type-diff.d.ts +18 -0
  58. package/dist/utils/preview/content-type-diff.js +72 -0
  59. package/dist/utils/preview/content-type-layout.d.ts +39 -0
  60. package/dist/utils/preview/content-type-layout.js +100 -0
  61. package/dist/workspace/components/usync-action-button.js +53 -53
  62. package/dist/workspace/components/usync-file-picker.element.js +33 -33
  63. package/dist/workspace/components/usync-file-upload.element.js +25 -25
  64. package/dist/workspace/dialogs/import-modal.element.js +22 -22
  65. package/dist/workspace/views/addons/addons.element.js +97 -97
  66. package/dist/workspace/views/default/default.element.js +186 -186
  67. package/dist/workspace/views/legacy/legacy.element.js +81 -81
  68. package/dist/workspace/views/settings/components/usyncSettingItem.element.js +38 -38
  69. package/dist/workspace/views/settings/settings.element.js +124 -124
  70. package/dist/workspace/workspace.element.js +16 -16
  71. package/package.json +77 -77
@@ -9,66 +9,216 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
9
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
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
- var _uSyncDetailsModalElement_instances, _uSyncDetailsModalElement_onImport, _uSyncDetailsModalElement_onClose;
12
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13
+ if (kind === "m") throw new TypeError("Private method is not writable");
14
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
16
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
17
+ };
18
+ var _uSyncDetailsModalElement_instances, _uSyncDetailsModalElement_repository, _uSyncDetailsModalElement_previewFilter, _uSyncDetailsModalElement_previewProps, _uSyncDetailsModalElement_moveTo, _uSyncDetailsModalElement_loadPreview, _uSyncDetailsModalElement_hasPreview, _uSyncDetailsModalElement_showActions, _uSyncDetailsModalElement_onImport, _uSyncDetailsModalElement_onClose;
13
19
  import { UMB_MODAL_MANAGER_CONTEXT, UmbModalBaseElement, } from '@umbraco-cms/backoffice/modal';
14
20
  import { css, customElement, html, nothing, state, } from '@umbraco-cms/backoffice/external/lit';
15
- import { USYNC_IMPORT_SINGLE_MODAL, } from '@jumoo/uSync';
21
+ import { USYNC_IMPORT_SINGLE_MODAL, uSyncActionRepository, } from '@jumoo/uSync';
22
+ import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
16
23
  let uSyncDetailsModalElement = class uSyncDetailsModalElement extends UmbModalBaseElement {
17
24
  constructor() {
18
25
  super();
19
26
  _uSyncDetailsModalElement_instances.add(this);
27
+ this._tab = 'changes';
28
+ this._loading = false;
29
+ this._index = -1;
30
+ /** the entity types there is a 'usync-item-preview' element for */
31
+ this._previewTypes = new Set();
32
+ _uSyncDetailsModalElement_repository.set(this, new uSyncActionRepository(this));
33
+ // kept between renders, so the extension slot doesn't rebuild the preview each time.
34
+ _uSyncDetailsModalElement_previewFilter.set(this, (_manifest) => false);
35
+ _uSyncDetailsModalElement_previewProps.set(this, {});
36
+ this.observe(umbExtensionsRegistry.byType('usync-item-preview'), (manifests) => {
37
+ this._previewTypes = new Set(manifests.flatMap((m) => m.forEntityTypes));
38
+ });
20
39
  // this.consumeContext(USYNC_CORE_CONTEXT_TOKEN, (_instance) => {
21
40
  // if (!_instance) return;
22
41
  // this.#actionContext = _instance;
23
42
  // });
24
43
  }
44
+ connectedCallback() {
45
+ super.connectedCallback();
46
+ this._item = this.data?.item;
47
+ this._index = this.data?.items?.indexOf(this.data.item) ?? -1;
48
+ __classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_loadPreview).call(this);
49
+ }
25
50
  render() {
26
- return html `
27
- <umb-body-layout headline="Changes : ${this.data?.item.name ?? ''}">
28
- <div class="layout">
29
- <uui-box style="--uui-box-default-padding: 0;">
30
- <div class="headline">
31
- <div>
32
- <h3><umb-localize key="uSync_detailHeadline"></umb-localize></h3>
33
- <umb-localize key="uSync_detailHeader"></umb-localize>
34
- </div>
35
- <div>${this.renderActions()}</div>
36
- </div>
37
- </uui-box>
38
- <usync-change-view .item=${this.data?.item}></usync-change-view>
39
- </div>
40
- <div slot="actions">
41
- <uui-button
42
- id="cancel"
43
- .label=${this.localize.term('general_close')}
44
- look="outline"
45
- @click="${__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_onClose)}"></uui-button>
46
- </div>
47
- </umb-body-layout>
51
+ return html `
52
+ <umb-body-layout>
53
+ ${this.renderHeadline()}
54
+ <div class="layout">
55
+ <uui-box style="--uui-box-default-padding: 0;">
56
+ <div class="headline">
57
+ <div>
58
+ <h3><umb-localize key="uSync_detailHeadline"></umb-localize></h3>
59
+ <umb-localize key="uSync_detailHeader"></umb-localize>
60
+ </div>
61
+ <div>${this.renderActions()}</div>
62
+ </div>
63
+ </uui-box>
64
+ ${this.renderTabs()}
65
+ ${this.renderTabContent()}
66
+ </div>
67
+ ${this.renderNavigation()}
68
+ <div slot="actions">
69
+ <uui-button
70
+ id="cancel"
71
+ .label=${this.localize.term('general_close')}
72
+ look="outline"
73
+ @click="${__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_onClose)}"></uui-button>
74
+ </div>
75
+ </umb-body-layout>
48
76
  `;
49
77
  }
78
+ renderHeadline() {
79
+ const item = this._item;
80
+ if (!item)
81
+ return nothing;
82
+ // singular names first (Content type), then the plural group
83
+ // names the results use (Content Types), then the raw type.
84
+ const itemType = this.localize.termOrDefault(`uSync_itemType${item.itemType}`, this.localize.termOrDefault(`uSync_${item.itemType}`, item.itemType));
85
+ return html `<div slot="header" id="headline">
86
+ <h3 title=${item.name}>Changes : ${item.name}</h3>
87
+ <span class="item-info">${itemType} · ${item.change}</span>
88
+ </div>`;
89
+ }
90
+ renderNavigation() {
91
+ const count = this.data?.items?.length ?? 0;
92
+ if (count < 2 || this._index < 0)
93
+ return nothing;
94
+ return html `<div slot="footer-info" id="navigation">
95
+ <uui-button
96
+ compact
97
+ look="secondary"
98
+ .label=${this.localize.term('general_previous')}
99
+ ?disabled=${this._index === 0}
100
+ @click=${() => __classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_moveTo).call(this, this._index - 1)}>
101
+ <uui-icon name="icon-arrow-left"></uui-icon>
102
+ </uui-button>
103
+ <span>
104
+ ${this.localize.termOrDefault('uSync_detailPosition', `${this._index + 1} of ${count}`, this.localize.number(this._index + 1), this.localize.number(count))}
105
+ </span>
106
+ <uui-button
107
+ compact
108
+ look="secondary"
109
+ .label=${this.localize.term('general_next')}
110
+ ?disabled=${this._index === count - 1}
111
+ @click=${() => __classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_moveTo).call(this, this._index + 1)}>
112
+ <uui-icon name="icon-arrow-right"></uui-icon>
113
+ </uui-button>
114
+ </div>`;
115
+ }
116
+ renderTabs() {
117
+ if (!__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_hasPreview).call(this))
118
+ return nothing;
119
+ return html `<uui-tab-group>
120
+ ${this.renderTab('changes', 'uSync_changesTab', 'Changes', 'icon-eye')}
121
+ ${this.renderTab('diff', 'uSync_diffTab', 'Diff', 'icon-code')}
122
+ </uui-tab-group>`;
123
+ }
124
+ renderTab(tab, key, fallback, icon) {
125
+ const label = this.localize.termOrDefault(key, fallback);
126
+ return html `<uui-tab
127
+ .label=${label}
128
+ ?active=${this._tab === tab}
129
+ @click=${() => (this._tab = tab)}>
130
+ <!-- uui-tab stacks its icon slot above the label, so the icon
131
+ goes in the label to keep them on one line. -->
132
+ <span class="tab-label"><umb-icon name=${icon}></umb-icon>${label}</span>
133
+ </uui-tab>`;
134
+ }
135
+ renderTabContent() {
136
+ // the visual changes view is the default, the raw diff is there
137
+ // for anything that doesn't have a preview (or if you ask for it).
138
+ if (this._tab === 'changes') {
139
+ if (this._loading)
140
+ return html `<uui-loader-bar></uui-loader-bar>`;
141
+ if (__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_hasPreview).call(this))
142
+ return this.renderPreview();
143
+ }
144
+ return html `<uui-box style="--uui-box-default-padding: 0;">
145
+ <usync-change-view .item=${this._item}></usync-change-view>
146
+ </uui-box>`;
147
+ }
148
+ renderPreview() {
149
+ // packages can show previews for their own items by registering a
150
+ // 'usync-item-preview' element for the entity type their preview mapper returns.
151
+ return html `<umb-extension-slot
152
+ type="usync-item-preview"
153
+ single
154
+ .filter=${__classPrivateFieldGet(this, _uSyncDetailsModalElement_previewFilter, "f")}
155
+ .props=${__classPrivateFieldGet(this, _uSyncDetailsModalElement_previewProps, "f")}></umb-extension-slot>`;
156
+ }
50
157
  renderActions() {
51
- if (!this.data?.showActions)
158
+ if (!__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_showActions).call(this))
52
159
  return nothing;
53
- return html ` <uui-button
54
- id="import"
55
- type="button"
56
- look="outline"
57
- .state=${this.importState}
58
- .label=${this.localize.termOrDefault('uSync_importSingle', 'Import')}
160
+ return html ` <uui-button
161
+ id="import"
162
+ type="button"
163
+ look="outline"
164
+ .state=${this.importState}
165
+ .label=${this.localize.termOrDefault('uSync_importSingle', 'Import')}
59
166
  @click="${__classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_onImport)}"></uui-button>`;
60
167
  }
61
168
  };
169
+ _uSyncDetailsModalElement_repository = new WeakMap();
170
+ _uSyncDetailsModalElement_previewFilter = new WeakMap();
171
+ _uSyncDetailsModalElement_previewProps = new WeakMap();
62
172
  _uSyncDetailsModalElement_instances = new WeakSet();
173
+ _uSyncDetailsModalElement_moveTo = function _uSyncDetailsModalElement_moveTo(index) {
174
+ const item = this.data?.items?.[index];
175
+ if (!item)
176
+ return;
177
+ this._index = index;
178
+ this._item = item;
179
+ this._preview = undefined;
180
+ __classPrivateFieldGet(this, _uSyncDetailsModalElement_instances, "m", _uSyncDetailsModalElement_loadPreview).call(this);
181
+ };
182
+ _uSyncDetailsModalElement_loadPreview = async function _uSyncDetailsModalElement_loadPreview() {
183
+ const item = this._item;
184
+ if (!item?.handler || !item.key)
185
+ return;
186
+ // only some handlers support previews, the rest return a 404
187
+ // and the modal shows the diff on its own. we leave _tab alone
188
+ // so a user who picked the diff stays on it as they move through.
189
+ this._loading = true;
190
+ const { data } = await __classPrivateFieldGet(this, _uSyncDetailsModalElement_repository, "f").getPreview(item.handler, item.key);
191
+ // moving through the list quickly can return previews out of order,
192
+ // so drop anything that isn't for the item we are now showing.
193
+ if (item !== this._item)
194
+ return;
195
+ this._loading = false;
196
+ if (data?.entityType) {
197
+ const entityType = data.entityType;
198
+ __classPrivateFieldSet(this, _uSyncDetailsModalElement_previewFilter, (manifest) => manifest.forEntityTypes.includes(entityType), "f");
199
+ __classPrivateFieldSet(this, _uSyncDetailsModalElement_previewProps, { preview: data }, "f");
200
+ this._preview = data;
201
+ }
202
+ };
203
+ _uSyncDetailsModalElement_hasPreview = function _uSyncDetailsModalElement_hasPreview() {
204
+ return !!this._preview && this._previewTypes.has(this._preview.entityType);
205
+ };
206
+ _uSyncDetailsModalElement_showActions = function _uSyncDetailsModalElement_showActions() {
207
+ const showActions = this.data?.showActions;
208
+ if (typeof showActions === 'function') {
209
+ return this._item ? showActions(this._item) : false;
210
+ }
211
+ return showActions ?? false;
212
+ };
63
213
  _uSyncDetailsModalElement_onImport = async function _uSyncDetailsModalElement_onImport(e) {
64
214
  e.stopPropagation();
65
- if (!this.data?.item)
215
+ if (!this._item)
66
216
  return;
67
217
  const modalContext = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
68
218
  if (!modalContext)
69
219
  return;
70
220
  const modal = modalContext.open(this, USYNC_IMPORT_SINGLE_MODAL, {
71
- data: { action: this.data?.item },
221
+ data: { action: this._item },
72
222
  });
73
223
  const data = await modal?.onSubmit().catch(() => {
74
224
  return;
@@ -78,27 +228,87 @@ _uSyncDetailsModalElement_onImport = async function _uSyncDetailsModalElement_on
78
228
  _uSyncDetailsModalElement_onClose = function _uSyncDetailsModalElement_onClose() {
79
229
  this.modalContext?.reject();
80
230
  };
81
- uSyncDetailsModalElement.styles = css `
82
- .layout {
83
- display: flex;
84
- flex-direction: column;
85
- gap: var(--uui-size-space-4);
86
- }
87
-
88
- .headline {
89
- display: flex;
90
- justify-content: space-between;
91
- padding: var(--uui-size-space-4);
92
- align-items: center;
93
- }
94
-
95
- .headline h3 {
96
- margin: 0;
97
- }
231
+ uSyncDetailsModalElement.styles = css `
232
+ .layout {
233
+ display: flex;
234
+ flex-direction: column;
235
+ gap: var(--uui-size-space-4);
236
+ }
237
+
238
+ .headline {
239
+ display: flex;
240
+ justify-content: space-between;
241
+ padding: var(--uui-size-space-4);
242
+ align-items: center;
243
+ }
244
+
245
+ .headline h3 {
246
+ margin: 0;
247
+ }
248
+
249
+ #headline {
250
+ display: flex;
251
+ flex-direction: column;
252
+ min-width: 0;
253
+ }
254
+
255
+ #headline h3 {
256
+ margin: 0;
257
+ white-space: nowrap;
258
+ overflow: hidden;
259
+ text-overflow: ellipsis;
260
+ }
261
+
262
+ #headline .item-info {
263
+ font-size: var(--uui-type-small-size);
264
+ color: var(--uui-color-text-alt);
265
+ }
266
+
267
+ uui-tab-group {
268
+ background-color: var(--uui-color-surface);
269
+ border-radius: var(--uui-border-radius);
270
+ box-shadow: var(--uui-shadow-depth-1);
271
+ padding: 0 var(--uui-size-space-2);
272
+ }
273
+
274
+ .tab-label {
275
+ display: inline-flex;
276
+ align-items: center;
277
+ gap: var(--uui-size-space-2);
278
+ }
279
+
280
+ .tab-label umb-icon {
281
+ font-size: 16px;
282
+ }
283
+
284
+ #navigation {
285
+ display: flex;
286
+ align-items: center;
287
+ gap: var(--uui-size-space-3);
288
+ padding-left: var(--uui-size-space-4);
289
+ }
98
290
  `;
99
291
  __decorate([
100
292
  state()
101
293
  ], uSyncDetailsModalElement.prototype, "importState", void 0);
294
+ __decorate([
295
+ state()
296
+ ], uSyncDetailsModalElement.prototype, "_preview", void 0);
297
+ __decorate([
298
+ state()
299
+ ], uSyncDetailsModalElement.prototype, "_tab", void 0);
300
+ __decorate([
301
+ state()
302
+ ], uSyncDetailsModalElement.prototype, "_loading", void 0);
303
+ __decorate([
304
+ state()
305
+ ], uSyncDetailsModalElement.prototype, "_item", void 0);
306
+ __decorate([
307
+ state()
308
+ ], uSyncDetailsModalElement.prototype, "_index", void 0);
309
+ __decorate([
310
+ state()
311
+ ], uSyncDetailsModalElement.prototype, "_previewTypes", void 0);
102
312
  uSyncDetailsModalElement = __decorate([
103
313
  customElement('usync-details-modal')
104
314
  ], uSyncDetailsModalElement);
@@ -2,7 +2,16 @@ import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
2
2
  import { USyncActionView } from '@jumoo/uSync';
3
3
  export interface uSyncDetailsModalData {
4
4
  item: USyncActionView;
5
- showActions?: boolean;
5
+ /**
6
+ * show the import button, either for every item or decided per item
7
+ * (when moving through `items` the answer can change from item to item).
8
+ */
9
+ showActions?: boolean | ((item: USyncActionView) => boolean);
10
+ /**
11
+ * the full list the item came from, when set the dialog can move
12
+ * to the previous / next item in the list.
13
+ */
14
+ items?: Array<USyncActionView>;
6
15
  }
7
16
  export interface uSyncDetailsModalValue {
8
17
  result: boolean;
@@ -19,18 +19,18 @@ let uSyncErrorModalElement = class uSyncErrorModalElement extends UmbModalBaseEl
19
19
  }
20
20
  render() {
21
21
  const headline = `Error: ${this.data?.action.name ?? ''} [${this.data?.action.itemType}]`;
22
- return html `<umb-body-layout .headline=${headline}>
23
- <strong>
24
- <umb-localize key="uSync_errorHeader"></umb-localize>
25
- </strong>
26
- <div class="error">${this.data?.action.message}</div>
27
- <div slot="actions">
28
- <uui-button
29
- id="cancel"
30
- look="outline"
31
- .label=${this.localize.term('general_close')}
32
- @click="${__classPrivateFieldGet(this, _uSyncErrorModalElement_instances, "m", _uSyncErrorModalElement_onClose)}"></uui-button>
33
- </div>
22
+ return html `<umb-body-layout .headline=${headline}>
23
+ <strong>
24
+ <umb-localize key="uSync_errorHeader"></umb-localize>
25
+ </strong>
26
+ <div class="error">${this.data?.action.message}</div>
27
+ <div slot="actions">
28
+ <uui-button
29
+ id="cancel"
30
+ look="outline"
31
+ .label=${this.localize.term('general_close')}
32
+ @click="${__classPrivateFieldGet(this, _uSyncErrorModalElement_instances, "m", _uSyncErrorModalElement_onClose)}"></uui-button>
33
+ </div>
34
34
  </umb-body-layout>`;
35
35
  }
36
36
  };
@@ -38,16 +38,16 @@ _uSyncErrorModalElement_instances = new WeakSet();
38
38
  _uSyncErrorModalElement_onClose = function _uSyncErrorModalElement_onClose() {
39
39
  this.modalContext?.reject();
40
40
  };
41
- uSyncErrorModalElement.styles = css `
42
- umb-body-layout {
43
- max-width: 450px;
44
- }
45
-
46
- .error {
47
- padding: 10px;
48
- font-family: monospace;
49
- color: red;
50
- }
41
+ uSyncErrorModalElement.styles = css `
42
+ umb-body-layout {
43
+ max-width: 450px;
44
+ }
45
+
46
+ .error {
47
+ padding: 10px;
48
+ font-family: monospace;
49
+ color: red;
50
+ }
51
51
  `;
52
52
  uSyncErrorModalElement = __decorate([
53
53
  customElement('usync-error-modal')
@@ -18,18 +18,18 @@ let uSyncLegacyModalElement = class uSyncLegacyModalElement extends UmbModalBase
18
18
  _uSyncLegacyModalElement_instances.add(this);
19
19
  }
20
20
  render() {
21
- return html `
22
- <umb-body-layout headline="Legacy uSync folder detected">
23
- <div class="content">
24
- ${this.renderLegacyFolder(this.data?.legacyFolder)}
25
- ${this.renderLegacyTypes(this.data?.legacyTypes)} ${this.renderCopy()}
26
- </div>
27
- <div slot="actions">
28
- <uui-button id="cancel" label="close" @click=${__classPrivateFieldGet(this, _uSyncLegacyModalElement_instances, "m", _uSyncLegacyModalElement_onClose)}>
29
- ${this.localize.term('general_close')}
30
- </uui-button>
31
- </div>
32
- </umb-body-layout>
21
+ return html `
22
+ <umb-body-layout headline="Legacy uSync folder detected">
23
+ <div class="content">
24
+ ${this.renderLegacyFolder(this.data?.legacyFolder)}
25
+ ${this.renderLegacyTypes(this.data?.legacyTypes)} ${this.renderCopy()}
26
+ </div>
27
+ <div slot="actions">
28
+ <uui-button id="cancel" label="close" @click=${__classPrivateFieldGet(this, _uSyncLegacyModalElement_instances, "m", _uSyncLegacyModalElement_onClose)}>
29
+ ${this.localize.term('general_close')}
30
+ </uui-button>
31
+ </div>
32
+ </umb-body-layout>
33
33
  `;
34
34
  }
35
35
  renderLegacyFolder(folder) {
@@ -44,8 +44,8 @@ let uSyncLegacyModalElement = class uSyncLegacyModalElement extends UmbModalBase
44
44
  const legacyTypeHtml = this.data?.legacyTypes.map((datatype) => {
45
45
  return html `<li>${datatype}</li>`;
46
46
  });
47
- return html `<div>
48
- ${this.localize.termOrDefault('uSync.legacyObsolete', 'Obsolete DataTypes', legacyTypeHtml)}
47
+ return html `<div>
48
+ ${this.localize.termOrDefault('uSync.legacyObsolete', 'Obsolete DataTypes', legacyTypeHtml)}
49
49
  </div>`;
50
50
  }
51
51
  renderCopy() {
@@ -56,14 +56,14 @@ _uSyncLegacyModalElement_instances = new WeakSet();
56
56
  _uSyncLegacyModalElement_onClose = function _uSyncLegacyModalElement_onClose() {
57
57
  this.modalContext?.reject();
58
58
  };
59
- uSyncLegacyModalElement.styles = css `
60
- .content {
61
- margin: -10px 0;
62
- }
63
-
64
- em {
65
- color: var(--uui-color-positive);
66
- }
59
+ uSyncLegacyModalElement.styles = css `
60
+ .content {
61
+ margin: -10px 0;
62
+ }
63
+
64
+ em {
65
+ color: var(--uui-color-positive);
66
+ }
67
67
  `;
68
68
  uSyncLegacyModalElement = __decorate([
69
69
  customElement('usync-legacy-modal')
@@ -33,41 +33,41 @@ let SyncImportSingleModalElement = class SyncImportSingleModalElement extends Um
33
33
  });
34
34
  }
35
35
  render() {
36
- return html `<umb-body-layout
37
- .headline=${`Import : ${this.data?.action.name ?? ''} [${this.data?.action.itemType}]`}>
38
- ${this.renderResult()}
39
- <div slot="actions">
40
- <uui-button
41
- id="cancel"
42
- look="outline"
43
- .label=${this.localize.term('general_close')}
44
- @click="${__classPrivateFieldGet(this, _SyncImportSingleModalElement_instances, "m", _SyncImportSingleModalElement_onClose)}"></uui-button>
45
- ${when(!this.result, () => html ` <uui-button
46
- id="import"
47
- look="primary"
48
- color="positive"
49
- type="button"
50
- .state=${this.importState}
51
- .label=${this.localize.termOrDefault('uSync_importSingle', 'Import')}
52
- @click="${__classPrivateFieldGet(this, _SyncImportSingleModalElement_instances, "m", _SyncImportSingleModalElement_doImport)}"></uui-button>`)}
53
- </div>
36
+ return html `<umb-body-layout
37
+ .headline=${`Import : ${this.data?.action.name ?? ''} [${this.data?.action.itemType}]`}>
38
+ ${this.renderResult()}
39
+ <div slot="actions">
40
+ <uui-button
41
+ id="cancel"
42
+ look="outline"
43
+ .label=${this.localize.term('general_close')}
44
+ @click="${__classPrivateFieldGet(this, _SyncImportSingleModalElement_instances, "m", _SyncImportSingleModalElement_onClose)}"></uui-button>
45
+ ${when(!this.result, () => html ` <uui-button
46
+ id="import"
47
+ look="primary"
48
+ color="positive"
49
+ type="button"
50
+ .state=${this.importState}
51
+ .label=${this.localize.termOrDefault('uSync_importSingle', 'Import')}
52
+ @click="${__classPrivateFieldGet(this, _SyncImportSingleModalElement_instances, "m", _SyncImportSingleModalElement_doImport)}"></uui-button>`)}
53
+ </div>
54
54
  </umb-body-layout>`;
55
55
  }
56
56
  renderResult() {
57
57
  if (!this.result)
58
- return html ` <strong>
59
- <umb-localize key="uSync_importSingleWarning"></umb-localize>
58
+ return html ` <strong>
59
+ <umb-localize key="uSync_importSingleWarning"></umb-localize>
60
60
  </strong>`;
61
61
  if (this.result.success) {
62
- return html `<div>
63
- <umb-localize key="uSync_importSingleSuccess"></umb-localize>
62
+ return html `<div>
63
+ <umb-localize key="uSync_importSingleSuccess"></umb-localize>
64
64
  </div>`;
65
65
  }
66
66
  else {
67
- return html `<div>
68
- <umb-localize
69
- key="uSync_importSingleFailed"
70
- .args=${[this.result.message]}></umb-localize>
67
+ return html `<div>
68
+ <umb-localize
69
+ key="uSync_importSingleFailed"
70
+ .args=${[this.result.message]}></umb-localize>
71
71
  </div>`;
72
72
  }
73
73
  }
@@ -88,11 +88,11 @@ _SyncImportSingleModalElement_doImport = async function _SyncImportSingleModalEl
88
88
  else
89
89
  this.importState = 'failed';
90
90
  };
91
- SyncImportSingleModalElement.styles = css `
92
- umb-body-layout {
93
- min-width: 450px;
94
- max-width: 450px;
95
- }
91
+ SyncImportSingleModalElement.styles = css `
92
+ umb-body-layout {
93
+ min-width: 450px;
94
+ max-width: 450px;
95
+ }
96
96
  `;
97
97
  __decorate([
98
98
  state()
package/dist/exports.d.ts CHANGED
@@ -8,3 +8,4 @@ export * from './constants.js';
8
8
  export * from './conditions/index.js';
9
9
  export * from './signalr/index.js';
10
10
  export * from './tree/index.js';
11
+ export * from './preview/index.js';
package/dist/exports.js CHANGED
@@ -8,3 +8,4 @@ export * from './constants.js';
8
8
  export * from './conditions/index.js';
9
9
  export * from './signalr/index.js';
10
10
  export * from './tree/index.js';
11
+ export * from './preview/index.js';
@@ -1,21 +1,21 @@
1
- export default `<svg
2
- fill="currentColor"
3
- stroke="currentColor"
4
- viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
5
- <g transform="translate(108.42 -1.9279)">
6
- <g transform="matrix(-.16453 0 0 -.16453 -63.894 49.007)">
7
- <path d="m-19.355 15.107c-19.456 0-38.912 7.3909-53.695 22.174-29.566 29.566-29.566 77.823 0 107.39 29.566 29.566 77.823 29.566 107.39 0l46.211-46.211a10.584 10.584 0 0 0 0-14.967l-46.211-46.211c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107l38.727 38.729-38.727 38.727c-21.477 21.477-55.978 21.477-77.455 0s-21.477-55.978 0-77.455c10.739-10.739 24.734-16.107 38.729-16.107z"/>
8
- <path d="m-19.355 1.8789c-22.806 0-45.721 8.7209-63.049 26.049-34.655 34.655-34.655 91.44 0 126.1 34.655 34.655 91.44 34.655 126.1 0l46.211-46.211a13.23 13.23 0 0 0 2e-3 0c9.1864-9.1886 9.1864-24.485 0-33.674a13.23 13.23 0 0 0-2e-3 0l-46.211-46.211c-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232l29.373 29.375-29.373 29.373c-16.468 16.468-42.28 16.468-58.748 0s-16.468-42.28 0-58.748c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
9
- <path d="m165.49 15.107c-19.456 0-38.912 7.3908-53.695 22.174l-46.211 46.211a10.584 10.584 0 0 0 0 14.967s33.45 33.45 46.211 46.211c29.566 29.566 77.823 29.566 107.39 0s29.566-77.823 0-107.39c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107 21.477 21.477 21.477 55.978 0 77.455s-55.978 21.477-77.455 0c-10.694-10.694-30.839-30.837-38.729-38.727l38.729-38.729c10.739-10.739 24.734-16.107 38.729-16.107z"/>
10
- <path d="m165.49 1.8789c-22.806 0-45.721 8.7209-63.049 26.049l-46.211 46.211a13.23 13.23 0 0 0-2e-3 0c-9.1864 9.1886-9.1864 24.485 0 33.674a13.23 13.23 0 0 0 2e-3 0l46.211 46.211c34.655 34.655 91.44 34.655 126.1 0 34.655-34.655 34.655-91.44 0-126.1-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232 16.468 16.468 16.468 42.28 0 58.748s-42.28 16.468-58.748 0c-8.1118-8.1118-19.862-19.86-29.375-29.373l29.375-29.375c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
11
- </g>
12
- <path d="m-60.71 46.522c3.201 0 6.4021-1.216 8.8343-3.6482 4.8643-4.8643 4.8643-12.804 0-17.668-4.8643-4.8643-12.804-4.8643-17.668 0l-6.3716 6.3716c-1.298-1.298-4.6122-4.6121-6.3717-6.3716-4.8643-4.8643-12.804-4.8643-17.668 0-4.8643 4.8643-4.8643 12.804 0 17.668 2.4322 2.4322 5.633 3.6482 8.8339 3.6482 3.201 0 6.402-1.216 8.8342-3.6482 1.7595-1.7595 5.0737-5.0736 6.3717-6.3716l6.3716 6.3716c2.4322 2.4322 5.633 3.6482 8.8339 3.6482zm0-3.4604c-2.3024 0-4.6047-0.88333-6.3715-2.6501l-6.3715-6.3718 6.3715-6.3715c3.5335-3.5335 9.2097-3.5335 12.743 0 3.5335 3.5335 3.5335 9.2098 0 12.743-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501zm-30.411 2e-6c-2.3024 0-4.6048-0.88333-6.3715-2.6501-3.5335-3.5335-3.5335-9.2098 0-12.743 3.5335-3.5335 9.2098-3.5335 12.743 0 1.7595 1.7595 5.0738 5.0735 6.3718 6.3715l-6.3718 6.3718c-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501z"/>
13
- <g transform="matrix(-.16453 0 0 -.16453 -63.894 49.007)">
14
- <path d="m-19.355 15.107c-19.456 0-38.912 7.3909-53.695 22.174-29.566 29.566-29.566 77.823 0 107.39 29.566 29.566 77.823 29.566 107.39 0l46.211-46.211a10.584 10.584 0 0 0 0-14.967l-46.211-46.211c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107l38.727 38.729-38.727 38.727c-21.477 21.477-55.978 21.477-77.455 0s-21.477-55.978 0-77.455c10.739-10.739 24.734-16.107 38.729-16.107z"/>
15
- <path d="m-19.355 1.8789c-22.806 0-45.721 8.7209-63.049 26.049-34.655 34.655-34.655 91.44 0 126.1 34.655 34.655 91.44 34.655 126.1 0l46.211-46.211a13.23 13.23 0 0 0 2e-3 0c9.1864-9.1886 9.1864-24.485 0-33.674a13.23 13.23 0 0 0-2e-3 0l-46.211-46.211c-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232l29.373 29.375-29.373 29.373c-16.468 16.468-42.28 16.468-58.748 0s-16.468-42.28 0-58.748c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
16
- <path d="m165.49 15.107c-19.456 0-38.912 7.3908-53.695 22.174l-46.211 46.211a10.584 10.584 0 0 0 0 14.967s33.45 33.45 46.211 46.211c29.566 29.566 77.823 29.566 107.39 0s29.566-77.823 0-107.39c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107 21.477 21.477 21.477 55.978 0 77.455s-55.978 21.477-77.455 0c-10.694-10.694-30.839-30.837-38.729-38.727l38.729-38.729c10.739-10.739 24.734-16.107 38.729-16.107z"/>
17
- <path d="m165.49 1.8789c-22.806 0-45.721 8.7209-63.049 26.049l-46.211 46.211a13.23 13.23 0 0 0-2e-3 0c-9.1864 9.1886-9.1864 24.485 0 33.674a13.23 13.23 0 0 0 2e-3 0l46.211 46.211c34.655 34.655 91.44 34.655 126.1 0 34.655-34.655 34.655-91.44 0-126.1-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232 16.468 16.468 16.468 42.28 0 58.748s-42.28 16.468-58.748 0c-8.1118-8.1118-19.862-19.86-29.375-29.373l29.375-29.375c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
18
- </g>
19
- <path d="m-51.876 42.874c4.8643-4.8643 4.8644-12.804 5.9e-5 -17.668-4.8643-4.8643-12.804-4.8643-17.668 1e-6l-15.206 15.206c-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501s-4.6047-0.88327-6.3715-2.65c-3.5335-3.5335-3.5335-9.2098 0-12.743 3.5335-3.5335 9.2098-3.5335 12.743 0 1.3345 1.3345 3.2676 3.2675 4.8329 4.8326l2.4623-2.4623c-1.5652-1.5652-3.4983-3.4982-4.8328-4.8327-4.8643-4.8643-12.804-4.8644-17.668-6e-5 -4.8643 4.8643-4.8643 12.804 6e-5 17.668 2.4322 2.4322 5.6329 3.6481 8.8338 3.6481 3.201-1e-6 6.402-1.216 8.8342-3.6481 1.7595-1.7595 5.0737-5.0736 6.3717-6.3716l4.77e-4 4.93e-4v-8.22e-4l2.4621-2.4621-6e-5 -6e-5 6.3715-6.3715c3.5335-3.5335 9.2097-3.5335 12.743 0 3.5335 3.5335 3.5335 9.2097 0 12.743-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501s-4.6047-0.88333-6.3714-2.6501l-4.8325-4.8328-2.4625 2.4625 4.8326 4.8326c2.4322 2.4322 5.6329 3.6481 8.8338 3.6481 3.201 0 6.402-1.216 8.8342-3.6481z" fill="#fff"/>
20
- </g>
1
+ export default `<svg
2
+ fill="currentColor"
3
+ stroke="currentColor"
4
+ viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
5
+ <g transform="translate(108.42 -1.9279)">
6
+ <g transform="matrix(-.16453 0 0 -.16453 -63.894 49.007)">
7
+ <path d="m-19.355 15.107c-19.456 0-38.912 7.3909-53.695 22.174-29.566 29.566-29.566 77.823 0 107.39 29.566 29.566 77.823 29.566 107.39 0l46.211-46.211a10.584 10.584 0 0 0 0-14.967l-46.211-46.211c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107l38.727 38.729-38.727 38.727c-21.477 21.477-55.978 21.477-77.455 0s-21.477-55.978 0-77.455c10.739-10.739 24.734-16.107 38.729-16.107z"/>
8
+ <path d="m-19.355 1.8789c-22.806 0-45.721 8.7209-63.049 26.049-34.655 34.655-34.655 91.44 0 126.1 34.655 34.655 91.44 34.655 126.1 0l46.211-46.211a13.23 13.23 0 0 0 2e-3 0c9.1864-9.1886 9.1864-24.485 0-33.674a13.23 13.23 0 0 0-2e-3 0l-46.211-46.211c-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232l29.373 29.375-29.373 29.373c-16.468 16.468-42.28 16.468-58.748 0s-16.468-42.28 0-58.748c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
9
+ <path d="m165.49 15.107c-19.456 0-38.912 7.3908-53.695 22.174l-46.211 46.211a10.584 10.584 0 0 0 0 14.967s33.45 33.45 46.211 46.211c29.566 29.566 77.823 29.566 107.39 0s29.566-77.823 0-107.39c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107 21.477 21.477 21.477 55.978 0 77.455s-55.978 21.477-77.455 0c-10.694-10.694-30.839-30.837-38.729-38.727l38.729-38.729c10.739-10.739 24.734-16.107 38.729-16.107z"/>
10
+ <path d="m165.49 1.8789c-22.806 0-45.721 8.7209-63.049 26.049l-46.211 46.211a13.23 13.23 0 0 0-2e-3 0c-9.1864 9.1886-9.1864 24.485 0 33.674a13.23 13.23 0 0 0 2e-3 0l46.211 46.211c34.655 34.655 91.44 34.655 126.1 0 34.655-34.655 34.655-91.44 0-126.1-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232 16.468 16.468 16.468 42.28 0 58.748s-42.28 16.468-58.748 0c-8.1118-8.1118-19.862-19.86-29.375-29.373l29.375-29.375c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
11
+ </g>
12
+ <path d="m-60.71 46.522c3.201 0 6.4021-1.216 8.8343-3.6482 4.8643-4.8643 4.8643-12.804 0-17.668-4.8643-4.8643-12.804-4.8643-17.668 0l-6.3716 6.3716c-1.298-1.298-4.6122-4.6121-6.3717-6.3716-4.8643-4.8643-12.804-4.8643-17.668 0-4.8643 4.8643-4.8643 12.804 0 17.668 2.4322 2.4322 5.633 3.6482 8.8339 3.6482 3.201 0 6.402-1.216 8.8342-3.6482 1.7595-1.7595 5.0737-5.0736 6.3717-6.3716l6.3716 6.3716c2.4322 2.4322 5.633 3.6482 8.8339 3.6482zm0-3.4604c-2.3024 0-4.6047-0.88333-6.3715-2.6501l-6.3715-6.3718 6.3715-6.3715c3.5335-3.5335 9.2097-3.5335 12.743 0 3.5335 3.5335 3.5335 9.2098 0 12.743-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501zm-30.411 2e-6c-2.3024 0-4.6048-0.88333-6.3715-2.6501-3.5335-3.5335-3.5335-9.2098 0-12.743 3.5335-3.5335 9.2098-3.5335 12.743 0 1.7595 1.7595 5.0738 5.0735 6.3718 6.3715l-6.3718 6.3718c-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501z"/>
13
+ <g transform="matrix(-.16453 0 0 -.16453 -63.894 49.007)">
14
+ <path d="m-19.355 15.107c-19.456 0-38.912 7.3909-53.695 22.174-29.566 29.566-29.566 77.823 0 107.39 29.566 29.566 77.823 29.566 107.39 0l46.211-46.211a10.584 10.584 0 0 0 0-14.967l-46.211-46.211c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107l38.727 38.729-38.727 38.727c-21.477 21.477-55.978 21.477-77.455 0s-21.477-55.978 0-77.455c10.739-10.739 24.734-16.107 38.729-16.107z"/>
15
+ <path d="m-19.355 1.8789c-22.806 0-45.721 8.7209-63.049 26.049-34.655 34.655-34.655 91.44 0 126.1 34.655 34.655 91.44 34.655 126.1 0l46.211-46.211a13.23 13.23 0 0 0 2e-3 0c9.1864-9.1886 9.1864-24.485 0-33.674a13.23 13.23 0 0 0-2e-3 0l-46.211-46.211c-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232l29.373 29.375-29.373 29.373c-16.468 16.468-42.28 16.468-58.748 0s-16.468-42.28 0-58.748c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
16
+ <path d="m165.49 15.107c-19.456 0-38.912 7.3908-53.695 22.174l-46.211 46.211a10.584 10.584 0 0 0 0 14.967s33.45 33.45 46.211 46.211c29.566 29.566 77.823 29.566 107.39 0s29.566-77.823 0-107.39c-14.783-14.783-34.238-22.174-53.693-22.174zm0 21.033c13.994 0 27.988 5.3688 38.727 16.107 21.477 21.477 21.477 55.978 0 77.455s-55.978 21.477-77.455 0c-10.694-10.694-30.839-30.837-38.729-38.727l38.729-38.729c10.739-10.739 24.734-16.107 38.729-16.107z"/>
17
+ <path d="m165.49 1.8789c-22.806 0-45.721 8.7209-63.049 26.049l-46.211 46.211a13.23 13.23 0 0 0-2e-3 0c-9.1864 9.1886-9.1864 24.485 0 33.674a13.23 13.23 0 0 0 2e-3 0l46.211 46.211c34.655 34.655 91.44 34.655 126.1 0 34.655-34.655 34.655-91.44 0-126.1-17.328-17.328-40.241-26.049-63.047-26.049zm0 47.49c10.611 0 21.139 3.9982 29.373 12.232 16.468 16.468 16.468 42.28 0 58.748s-42.28 16.468-58.748 0c-8.1118-8.1118-19.862-19.86-29.375-29.373l29.375-29.375c8.2336-8.2336 18.764-12.232 29.375-12.232z"/>
18
+ </g>
19
+ <path d="m-51.876 42.874c4.8643-4.8643 4.8644-12.804 5.9e-5 -17.668-4.8643-4.8643-12.804-4.8643-17.668 1e-6l-15.206 15.206c-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501s-4.6047-0.88327-6.3715-2.65c-3.5335-3.5335-3.5335-9.2098 0-12.743 3.5335-3.5335 9.2098-3.5335 12.743 0 1.3345 1.3345 3.2676 3.2675 4.8329 4.8326l2.4623-2.4623c-1.5652-1.5652-3.4983-3.4982-4.8328-4.8327-4.8643-4.8643-12.804-4.8644-17.668-6e-5 -4.8643 4.8643-4.8643 12.804 6e-5 17.668 2.4322 2.4322 5.6329 3.6481 8.8338 3.6481 3.201-1e-6 6.402-1.216 8.8342-3.6481 1.7595-1.7595 5.0737-5.0736 6.3717-6.3716l4.77e-4 4.93e-4v-8.22e-4l2.4621-2.4621-6e-5 -6e-5 6.3715-6.3715c3.5335-3.5335 9.2097-3.5335 12.743 0 3.5335 3.5335 3.5335 9.2097 0 12.743-1.7668 1.7668-4.0694 2.6501-6.3718 2.6501s-4.6047-0.88333-6.3714-2.6501l-4.8325-4.8328-2.4625 2.4625 4.8326 4.8326c2.4322 2.4322 5.6329 3.6481 8.8338 3.6481 3.201 0 6.402-1.216 8.8342-3.6481z" fill="#fff"/>
20
+ </g>
21
21
  </svg>`;