@umbraco-cms/backoffice 14.0.0--preview008-718fa687 → 14.0.0--preview008-21f71002

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Umbraco HQ
3
+ Copyright (c) 2024 Umbraco HQ
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,18 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
+
23
+ ---
24
+
25
+ Third-party licenses
26
+
27
+ ---
28
+
29
+ Lucide License
30
+ ISC License
31
+
32
+ Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
33
+
34
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -8210,6 +8210,17 @@
8210
8210
  }
8211
8211
  ]
8212
8212
  },
8213
+ {
8214
+ "name": "umb-media-collection-toolbar",
8215
+ "path": "./../src/packages/media/media/collection/media-collection-toolbar.element.ts",
8216
+ "properties": [
8217
+ {
8218
+ "name": "styles",
8219
+ "type": "array",
8220
+ "default": "[null]"
8221
+ }
8222
+ ]
8223
+ },
8213
8224
  {
8214
8225
  "name": "umb-media-collection",
8215
8226
  "path": "./../src/packages/media/media/collection/media-collection.element.ts",
@@ -0,0 +1,13 @@
1
+ import { UmbLitElement } from '../../../core/lit-element/index.js';
2
+ export declare class UmbMediaCollectionToolbarElement extends UmbLitElement {
3
+ #private;
4
+ constructor();
5
+ render(): import("lit-html").TemplateResult<1>;
6
+ static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
7
+ }
8
+ export default UmbMediaCollectionToolbarElement;
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'umb-media-collection-toolbar': UmbMediaCollectionToolbarElement;
12
+ }
13
+ }
@@ -0,0 +1,72 @@
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 __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
8
+ if (kind === "m") throw new TypeError("Private method is not writable");
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10
+ 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");
11
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12
+ };
13
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
14
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15
+ 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");
16
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17
+ };
18
+ var _UmbMediaCollectionToolbarElement_instances, _UmbMediaCollectionToolbarElement_collectionContext, _UmbMediaCollectionToolbarElement_inputTimer, _UmbMediaCollectionToolbarElement_inputTimerAmount, _UmbMediaCollectionToolbarElement_updateSearch;
19
+ import { css, html, customElement } from '../../../../external/lit/index.js';
20
+ import { UmbLitElement } from '../../../core/lit-element/index.js';
21
+ import { UMB_DEFAULT_COLLECTION_CONTEXT } from '../../../core/collection/index.js';
22
+ let UmbMediaCollectionToolbarElement = class UmbMediaCollectionToolbarElement extends UmbLitElement {
23
+ constructor() {
24
+ super();
25
+ _UmbMediaCollectionToolbarElement_instances.add(this);
26
+ _UmbMediaCollectionToolbarElement_collectionContext.set(this, void 0);
27
+ _UmbMediaCollectionToolbarElement_inputTimer.set(this, void 0);
28
+ _UmbMediaCollectionToolbarElement_inputTimerAmount.set(this, 500);
29
+ this.consumeContext(UMB_DEFAULT_COLLECTION_CONTEXT, (instance) => {
30
+ __classPrivateFieldSet(this, _UmbMediaCollectionToolbarElement_collectionContext, instance, "f");
31
+ });
32
+ }
33
+ render() {
34
+ return html `
35
+ <umb-collection-action-bundle></umb-collection-action-bundle>
36
+ <uui-input @input=${__classPrivateFieldGet(this, _UmbMediaCollectionToolbarElement_instances, "m", _UmbMediaCollectionToolbarElement_updateSearch)} label="Search" placeholder="Search..." id="input-search"></uui-input>
37
+ <umb-collection-view-bundle></umb-collection-view-bundle>
38
+ `;
39
+ }
40
+ };
41
+ _UmbMediaCollectionToolbarElement_collectionContext = new WeakMap();
42
+ _UmbMediaCollectionToolbarElement_inputTimer = new WeakMap();
43
+ _UmbMediaCollectionToolbarElement_inputTimerAmount = new WeakMap();
44
+ _UmbMediaCollectionToolbarElement_instances = new WeakSet();
45
+ _UmbMediaCollectionToolbarElement_updateSearch = function _UmbMediaCollectionToolbarElement_updateSearch(event) {
46
+ const target = event.target;
47
+ const filter = target.value || '';
48
+ clearTimeout(__classPrivateFieldGet(this, _UmbMediaCollectionToolbarElement_inputTimer, "f"));
49
+ __classPrivateFieldSet(this, _UmbMediaCollectionToolbarElement_inputTimer, setTimeout(() => __classPrivateFieldGet(this, _UmbMediaCollectionToolbarElement_collectionContext, "f")?.setFilter({ filter }), __classPrivateFieldGet(this, _UmbMediaCollectionToolbarElement_inputTimerAmount, "f")), "f");
50
+ };
51
+ UmbMediaCollectionToolbarElement.styles = [
52
+ css `
53
+ :host {
54
+ height: 100%;
55
+ width: 100%;
56
+ display: flex;
57
+ justify-content: space-between;
58
+ white-space: nowrap;
59
+ gap: var(--uui-size-space-5);
60
+ align-items: center;
61
+ }
62
+
63
+ #input-search {
64
+ width: 100%;
65
+ }
66
+ `,
67
+ ];
68
+ UmbMediaCollectionToolbarElement = __decorate([
69
+ customElement('umb-media-collection-toolbar')
70
+ ], UmbMediaCollectionToolbarElement);
71
+ export { UmbMediaCollectionToolbarElement };
72
+ export default UmbMediaCollectionToolbarElement;
@@ -1,4 +1,5 @@
1
1
  import { UmbCollectionDefaultElement } from '../../../core/collection/index.js';
2
+ import './media-collection-toolbar.element.js';
2
3
  export declare class UmbMediaCollectionElement extends UmbCollectionDefaultElement {
3
4
  #private;
4
5
  constructor();
@@ -12,6 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
12
12
  var _UmbMediaCollectionElement_instances, _UmbMediaCollectionElement_handleDragEnter, _UmbMediaCollectionElement_handleDragLeave, _UmbMediaCollectionElement_handleDrop, _UmbMediaCollectionElement_onFileChange;
13
13
  import { css, customElement, html } from '../../../../external/lit/index.js';
14
14
  import { UmbCollectionDefaultElement } from '../../../core/collection/index.js';
15
+ import './media-collection-toolbar.element.js';
15
16
  let UmbMediaCollectionElement = class UmbMediaCollectionElement extends UmbCollectionDefaultElement {
16
17
  constructor() {
17
18
  super();
@@ -28,7 +29,7 @@ let UmbMediaCollectionElement = class UmbMediaCollectionElement extends UmbColle
28
29
  }
29
30
  renderToolbar() {
30
31
  return html `
31
- <umb-collection-toolbar slot="header"></umb-collection-toolbar>
32
+ <umb-media-collection-toolbar slot="header"></umb-media-collection-toolbar>
32
33
  <!-- TODO: Add the Media Upload dropzone component in here. [LK] -->
33
34
  <uui-file-dropzone
34
35
  id="dropzone"