@telperion/elements 1.0.0 → 1.1.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 (115) hide show
  1. package/.build-manifest.json +58 -0
  2. package/README.md +14 -8
  3. package/drag-drop/drag-element.cjs +59 -60
  4. package/drag-drop/drag-element.cjs.map +1 -0
  5. package/drag-drop/drag-element.js +8 -8
  6. package/drag-drop/drag-element.js.map +1 -1
  7. package/drag-drop/drag-handle-element.cjs +19 -19
  8. package/drag-drop/drag-handle-element.cjs.map +1 -0
  9. package/drag-drop/drag-handle-element.js +8 -7
  10. package/drag-drop/drag-handle-element.js.map +1 -1
  11. package/drag-drop/dropzone-element.cjs +32 -32
  12. package/drag-drop/dropzone-element.cjs.map +1 -0
  13. package/drag-drop/dropzone-element.js +6 -5
  14. package/drag-drop/dropzone-element.js.map +1 -1
  15. package/drag-drop/index.cjs +23 -11
  16. package/drag-drop/index.cjs.map +1 -0
  17. package/drag-drop/{drag-element.d.ts → index.d.cts} +73 -5
  18. package/drag-drop/index.d.ts +172 -6
  19. package/drag-drop/index.js +4 -5
  20. package/drag-drop/index.js.map +1 -1
  21. package/drag-drop/private-props.cjs +10 -6
  22. package/drag-drop/private-props.cjs.map +1 -0
  23. package/drag-drop/private-props.js +4 -3
  24. package/drag-drop/private-props.js.map +1 -1
  25. package/drag-drop/tha-drag-event.cjs +8 -6
  26. package/drag-drop/tha-drag-event.cjs.map +1 -0
  27. package/drag-drop/tha-drag-event.js +4 -2
  28. package/drag-drop/tha-drag-event.js.map +1 -1
  29. package/fesm/elements.mjs +1939 -0
  30. package/fesm/elements.mjs.map +1 -0
  31. package/icon/icon-element.cjs +136 -37
  32. package/icon/icon-element.cjs.map +1 -0
  33. package/icon/icon-element.js +105 -5
  34. package/icon/icon-element.js.map +1 -1
  35. package/icon/index.cjs +16 -5
  36. package/icon/index.cjs.map +1 -0
  37. package/icon/index.d.cts +89 -0
  38. package/icon/index.d.ts +89 -1
  39. package/icon/index.js +2 -2
  40. package/icon/index.js.map +1 -1
  41. package/icon/simple-icons-sprite.cjs +129 -0
  42. package/icon/simple-icons-sprite.cjs.map +1 -0
  43. package/icon/simple-icons-sprite.js +124 -0
  44. package/icon/simple-icons-sprite.js.map +1 -0
  45. package/iife/elements.js +180 -0
  46. package/iife/elements.js.map +1 -0
  47. package/index.cjs +53 -11
  48. package/index.cjs.map +1 -0
  49. package/index.d.cts +6 -0
  50. package/index.d.ts +6 -6
  51. package/index.js +10 -9
  52. package/index.js.map +1 -1
  53. package/package.json +41 -83
  54. package/router/history-managed.cjs +22 -18
  55. package/router/history-managed.cjs.map +1 -0
  56. package/router/history-managed.js +9 -7
  57. package/router/history-managed.js.map +1 -1
  58. package/router/history.cjs +20 -16
  59. package/router/history.cjs.map +1 -0
  60. package/router/history.js +8 -6
  61. package/router/history.js.map +1 -1
  62. package/router/index.cjs +36 -15
  63. package/router/index.cjs.map +1 -0
  64. package/router/index.d.cts +895 -0
  65. package/router/index.d.ts +895 -6
  66. package/router/index.js +6 -7
  67. package/router/index.js.map +1 -1
  68. package/router/signal-watcher-lit-element.cjs +9 -6
  69. package/router/signal-watcher-lit-element.cjs.map +1 -0
  70. package/router/signal-watcher-lit-element.js +5 -3
  71. package/router/signal-watcher-lit-element.js.map +1 -1
  72. package/router/tha-route.cjs +25 -22
  73. package/router/tha-route.cjs.map +1 -0
  74. package/router/tha-route.js +8 -7
  75. package/router/tha-route.js.map +1 -1
  76. package/router/tha-router-config.cjs +17 -17
  77. package/router/tha-router-config.cjs.map +1 -0
  78. package/router/tha-router-config.js +8 -7
  79. package/router/tha-router-config.js.map +1 -1
  80. package/router/tha-router-link.cjs +36 -36
  81. package/router/tha-router-link.cjs.map +1 -0
  82. package/router/tha-router-link.js +9 -8
  83. package/router/tha-router-link.js.map +1 -1
  84. package/router/tha-router-outlet.cjs +51 -48
  85. package/router/tha-router-outlet.cjs.map +1 -0
  86. package/router/tha-router-outlet.js +12 -11
  87. package/router/tha-router-outlet.js.map +1 -1
  88. package/router/tha-router-param.cjs +21 -21
  89. package/router/tha-router-param.cjs.map +1 -0
  90. package/router/tha-router-param.js +7 -6
  91. package/router/tha-router-param.js.map +1 -1
  92. package/router/tha-router.cjs +33 -33
  93. package/router/tha-router.cjs.map +1 -0
  94. package/router/tha-router.js +11 -10
  95. package/router/tha-router.js.map +1 -1
  96. package/bundle.js +0 -164
  97. package/bundle.mjs +0 -2630
  98. package/drag-drop/drag-handle-element.d.ts +0 -12
  99. package/drag-drop/dropzone-element.d.ts +0 -17
  100. package/drag-drop/private-props.d.ts +0 -3
  101. package/drag-drop/tha-drag-event.d.ts +0 -19
  102. package/icon/icon-element.d.ts +0 -40
  103. package/router/history-managed.d.ts +0 -76
  104. package/router/history.d.ts +0 -48
  105. package/router/signal-watcher-lit-element.d.ts +0 -25
  106. package/router/tha-route.d.ts +0 -90
  107. package/router/tha-router-config.d.ts +0 -223
  108. package/router/tha-router-link.d.ts +0 -95
  109. package/router/tha-router-outlet.d.ts +0 -112
  110. package/router/tha-router-param.d.ts +0 -226
  111. package/router/tha-router.d.ts +0 -69
  112. package/tha-url-output.cjs +0 -79
  113. package/tha-url-output.d.ts +0 -41
  114. package/tha-url-output.js +0 -78
  115. package/tha-url-output.js.map +0 -1
@@ -0,0 +1,58 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "elements",
4
+ "version": "0.0.0",
5
+ "formats": [
6
+ "esm",
7
+ "esmFlat",
8
+ "cjs",
9
+ "iife",
10
+ "dts",
11
+ "dcts"
12
+ ],
13
+ "entries": [
14
+ {
15
+ "name": "index",
16
+ "sourcePath": "src/index.ts",
17
+ "outputs": {
18
+ "esm": "index.js",
19
+ "esmFlat": "fesm/elements.mjs",
20
+ "cjs": "index.cjs",
21
+ "iife": "iife/elements.js",
22
+ "dts": "index.d.ts",
23
+ "dcts": "index.d.cts"
24
+ }
25
+ },
26
+ {
27
+ "name": "router/index",
28
+ "sourcePath": "src/router/index.ts",
29
+ "outputs": {
30
+ "esm": "router/index.js",
31
+ "cjs": "router/index.cjs",
32
+ "dts": "router/index.d.ts",
33
+ "dcts": "router/index.d.cts"
34
+ }
35
+ },
36
+ {
37
+ "name": "drag-drop/index",
38
+ "sourcePath": "src/drag-drop/index.ts",
39
+ "outputs": {
40
+ "esm": "drag-drop/index.js",
41
+ "cjs": "drag-drop/index.cjs",
42
+ "dts": "drag-drop/index.d.ts",
43
+ "dcts": "drag-drop/index.d.cts"
44
+ }
45
+ },
46
+ {
47
+ "name": "icon/index",
48
+ "sourcePath": "src/icon/index.ts",
49
+ "outputs": {
50
+ "esm": "icon/index.js",
51
+ "cjs": "icon/index.cjs",
52
+ "dts": "icon/index.d.ts",
53
+ "dcts": "icon/index.d.cts"
54
+ }
55
+ }
56
+ ],
57
+ "generatedAt": "2026-04-29T15:12:22.017Z"
58
+ }
package/README.md CHANGED
@@ -28,7 +28,7 @@ yarn add @telperion/elements
28
28
  pnpm add @telperion/elements
29
29
  ```
30
30
 
31
- > **Tailwind v4 consumers:** some elements (e.g. `<tp-icon>`) render Tailwind utility classes from inside the published package. Add `@source "../node_modules/@telperion/elements";` to your Tailwind entry CSS so the JIT scanner picks them up. See each module's README for details.
31
+ > **Tailwind v4 consumers:** some elements (e.g. `<tp-icon>`) render Tailwind utility classes from inside the published package. Add `@source "@telperion/elements";` to your Tailwind entry CSS so the JIT scanner picks them up. See each module's README for details.
32
32
 
33
33
  ## 🚀 Usage
34
34
 
@@ -42,26 +42,32 @@ import '@telperion/elements';
42
42
 
43
43
  ### Icon
44
44
 
45
- A framework-agnostic Material Symbols icon element.
45
+ A framework-agnostic icon element with two families: Material Symbols and Simple Icons (brand icons).
46
46
 
47
47
  **Includes:**
48
- - `<tp-icon>` &mdash; renders a single Material Symbols glyph
48
+ - `<tp-icon>` &mdash; renders a single glyph from the chosen family
49
49
 
50
50
  **Features:**
51
- - Three variants: `outlined` (default), `round`, `sharp`
52
- - All four Material variable-font axes exposed as attributes (`filled`, `grade`, `weight`, `optical-size`)
51
+ - **Material Symbols**: three variants (`outlined`, `round`, `sharp`) and all four variable-font axes exposed as attributes (`filled`, `grade`, `weight`, `optical-size`)
52
+ - **Simple Icons** (`family="simple-icons"`): brand icons (YouTube, LinkedIn, GitHub, …) loaded on demand from `cdn.simpleicons.org` into a single shared `<svg>` sprite &mdash; one HTTP request per slug, ever; auto `aria-label` from the brand title; `tp-icon-load` / `tp-icon-error` events; configurable base URL for self-hosting
53
53
  - Light-DOM rendering so consumer styling (Tailwind, CSS variables, color/size) "just works"
54
- - Loads fonts via the Google Fonts CSS API &mdash; no broken hash URLs when Google rotates them
55
- - Self-host friendly &mdash; swap one CSS file to ship the fonts yourself
54
+ - Material Symbols fonts loaded via the Google Fonts CSS API &mdash; no broken hash URLs when Google rotates them; self-host friendly
56
55
 
56
+ #### JS/TS
57
57
  ```ts
58
58
  import "@telperion/elements/icon";
59
- import "@telperion/elements/icon/material-symbols.css";
60
59
  ```
61
60
 
61
+ #### CSS
62
+ ```css
63
+ @import "@telperion/elements/icon/material-symbols.css";
64
+ ```
65
+
66
+ #### HTML
62
67
  ```html
63
68
  <tp-icon>home</tp-icon>
64
69
  <tp-icon variant="round" filled weight="700">favorite</tp-icon>
70
+ <tp-icon family="simple-icons" slug="facebook" style="color:#1877F2"></tp-icon>
65
71
  ```
66
72
 
67
73
  [Icon Documentation →](./src/icon/README.md)
@@ -1,15 +1,14 @@
1
- "use strict";
2
- var _a;
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var defer = require('@telperion/js-utils/function/defer');
5
+ var lit = require('lit');
6
+ var decorators_js = require('lit/decorators.js');
7
+ var privateProps = require('./private-props.cjs');
8
+ var thaDragEvent = require('./tha-drag-event.cjs');
9
+
3
10
  var DragElement_1;
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.DragElement = void 0;
6
- const tslib_1 = require("tslib");
7
- const defer_1 = require("@telperion/js-utils/function/defer");
8
- const lit_1 = require("lit");
9
- const decorators_js_1 = require("lit/decorators.js");
10
- const private_props_1 = require("./private-props");
11
- const tha_drag_event_1 = require("./tha-drag-event");
12
- let DragElement = class DragElement extends lit_1.LitElement {
11
+ exports.DragElement = class DragElement extends lit.LitElement {
13
12
  constructor() {
14
13
  super(...arguments);
15
14
  /**
@@ -79,7 +78,7 @@ let DragElement = class DragElement extends lit_1.LitElement {
79
78
  // Prepare pre-drag data and styles.
80
79
  this.#preparePreDragData(event);
81
80
  this.#prepareDraggingStyles();
82
- (0, defer_1.defer)().then(() => {
81
+ defer.defer().then(() => {
83
82
  this.style.pointerEvents = 'none';
84
83
  this.dragging = true;
85
84
  if (this.replaceClone) {
@@ -87,7 +86,7 @@ let DragElement = class DragElement extends lit_1.LitElement {
87
86
  this.#clone = new WeakRef(clone);
88
87
  this.parentElement.insertBefore(clone, this.nextSibling);
89
88
  }
90
- this.dispatchEvent(new tha_drag_event_1.ThaDragEvent('thadragstart', { dragTarget: new WeakRef(this) }, event));
89
+ this.dispatchEvent(new thaDragEvent.ThaDragEvent('thadragstart', { dragTarget: new WeakRef(this) }, event));
91
90
  });
92
91
  };
93
92
  /**
@@ -116,9 +115,9 @@ let DragElement = class DragElement extends lit_1.LitElement {
116
115
  this.dropAccepted = false;
117
116
  this.#acceptedDropzone = null;
118
117
  if (dropAccepted && acceptedDropzone) {
119
- acceptedDropzone.deref()?.dispatchEvent(new tha_drag_event_1.ThaDragEvent('thadropend', { dragTarget: new WeakRef(this), dropzoneTarget: acceptedDropzone }, event));
118
+ acceptedDropzone.deref()?.dispatchEvent(new thaDragEvent.ThaDragEvent('thadropend', { dragTarget: new WeakRef(this), dropzoneTarget: acceptedDropzone }, event));
120
119
  }
121
- this.dispatchEvent(new tha_drag_event_1.ThaDragEvent('thadragend', { dragTarget: new WeakRef(this) }, event));
120
+ this.dispatchEvent(new thaDragEvent.ThaDragEvent('thadragend', { dragTarget: new WeakRef(this) }, event));
122
121
  };
123
122
  if (hasTransition)
124
123
  this.addEventListener('transitionend', clear, { once: true });
@@ -164,7 +163,7 @@ let DragElement = class DragElement extends lit_1.LitElement {
164
163
  element.dragData[attributeName.replace('data-drag-', '')] = element.getAttribute(attributeName);
165
164
  }
166
165
  }); }
167
- static { this.styles = (0, lit_1.css) `
166
+ static { this.styles = lit.css `
168
167
  :host {
169
168
  --tha-diff-x: calc(var(--tha-cx) - var(--tha-x));
170
169
  --tha-diff-y: calc(var(--tha-cy) - var(--tha-y));
@@ -264,7 +263,7 @@ let DragElement = class DragElement extends lit_1.LitElement {
264
263
  this.removeEventListener('thadropzoneleave', this.#handleDropZoneLeave);
265
264
  }
266
265
  render() {
267
- return (0, lit_1.html) `<slot></slot>`;
266
+ return lit.html `<slot></slot>`;
268
267
  }
269
268
  /**
270
269
  * Accepts a drop zone and an optional rectangle for the drop area.
@@ -272,7 +271,7 @@ let DragElement = class DragElement extends lit_1.LitElement {
272
271
  * @param rect The bounding rectangle of the drop area.
273
272
  * @returns
274
273
  */
275
- [private_props_1.ACCEPT_DROP_PROP](dropzone, rect) {
274
+ [privateProps.ACCEPT_DROP_PROP](dropzone, rect) {
276
275
  this.dropAccepted = true;
277
276
  this.#acceptedDropzone = dropzone;
278
277
  if (!rect)
@@ -286,14 +285,14 @@ let DragElement = class DragElement extends lit_1.LitElement {
286
285
  * Registers a drag handle element.
287
286
  * @param handle The drag handle element to register.
288
287
  */
289
- [private_props_1.REGISTER_HANDLE_PROP](handle) {
288
+ [privateProps.REGISTER_HANDLE_PROP](handle) {
290
289
  this.#handles.add(handle);
291
290
  }
292
291
  /**
293
292
  * Unregisters a drag handle element.
294
293
  * @param handle The drag handle element to unregister.
295
294
  */
296
- [private_props_1.UNREGISTER_HANDLE_PROP](handle) {
295
+ [privateProps.UNREGISTER_HANDLE_PROP](handle) {
297
296
  this.#handles.delete(handle);
298
297
  }
299
298
  /**
@@ -396,43 +395,43 @@ let DragElement = class DragElement extends lit_1.LitElement {
396
395
  return false;
397
396
  }
398
397
  };
399
- exports.DragElement = DragElement;
400
- tslib_1.__decorate([
401
- (0, decorators_js_1.property)({ type: String }),
402
- tslib_1.__metadata("design:type", String)
403
- ], DragElement.prototype, "name", void 0);
404
- tslib_1.__decorate([
405
- (0, decorators_js_1.property)({ type: String, reflect: true }),
406
- tslib_1.__metadata("design:type", String)
407
- ], DragElement.prototype, "draggingStrategy", void 0);
408
- tslib_1.__decorate([
409
- (0, decorators_js_1.property)({ type: String }),
410
- tslib_1.__metadata("design:type", String)
411
- ], DragElement.prototype, "dragGroup", void 0);
412
- tslib_1.__decorate([
413
- (0, decorators_js_1.property)({ type: Boolean }),
414
- tslib_1.__metadata("design:type", Boolean)
415
- ], DragElement.prototype, "replaceClone", void 0);
416
- tslib_1.__decorate([
417
- (0, decorators_js_1.property)({ type: Boolean, reflect: true }),
418
- tslib_1.__metadata("design:type", Object)
419
- ], DragElement.prototype, "dragging", void 0);
420
- tslib_1.__decorate([
421
- (0, decorators_js_1.property)({ type: Boolean, reflect: true }),
422
- tslib_1.__metadata("design:type", Object)
423
- ], DragElement.prototype, "dragend", void 0);
424
- tslib_1.__decorate([
425
- (0, decorators_js_1.property)({ type: String, reflect: true }),
426
- tslib_1.__metadata("design:type", Object)
427
- ], DragElement.prototype, "draggedOver", void 0);
428
- tslib_1.__decorate([
429
- (0, decorators_js_1.property)({ type: Boolean, reflect: true }),
430
- tslib_1.__metadata("design:type", Object)
431
- ], DragElement.prototype, "dropAccepted", void 0);
432
- tslib_1.__decorate([
433
- (0, decorators_js_1.property)({ type: Boolean, reflect: true }),
434
- tslib_1.__metadata("design:type", Boolean)
435
- ], DragElement.prototype, "disabled", void 0);
436
- exports.DragElement = DragElement = DragElement_1 = tslib_1.__decorate([
437
- (0, decorators_js_1.customElement)('tha-drag')
438
- ], DragElement);
398
+ tslib.__decorate([
399
+ decorators_js.property({ type: String }),
400
+ tslib.__metadata("design:type", String)
401
+ ], exports.DragElement.prototype, "name", void 0);
402
+ tslib.__decorate([
403
+ decorators_js.property({ type: String, reflect: true }),
404
+ tslib.__metadata("design:type", String)
405
+ ], exports.DragElement.prototype, "draggingStrategy", void 0);
406
+ tslib.__decorate([
407
+ decorators_js.property({ type: String }),
408
+ tslib.__metadata("design:type", String)
409
+ ], exports.DragElement.prototype, "dragGroup", void 0);
410
+ tslib.__decorate([
411
+ decorators_js.property({ type: Boolean }),
412
+ tslib.__metadata("design:type", Boolean)
413
+ ], exports.DragElement.prototype, "replaceClone", void 0);
414
+ tslib.__decorate([
415
+ decorators_js.property({ type: Boolean, reflect: true }),
416
+ tslib.__metadata("design:type", Object)
417
+ ], exports.DragElement.prototype, "dragging", void 0);
418
+ tslib.__decorate([
419
+ decorators_js.property({ type: Boolean, reflect: true }),
420
+ tslib.__metadata("design:type", Object)
421
+ ], exports.DragElement.prototype, "dragend", void 0);
422
+ tslib.__decorate([
423
+ decorators_js.property({ type: String, reflect: true }),
424
+ tslib.__metadata("design:type", Object)
425
+ ], exports.DragElement.prototype, "draggedOver", void 0);
426
+ tslib.__decorate([
427
+ decorators_js.property({ type: Boolean, reflect: true }),
428
+ tslib.__metadata("design:type", Object)
429
+ ], exports.DragElement.prototype, "dropAccepted", void 0);
430
+ tslib.__decorate([
431
+ decorators_js.property({ type: Boolean, reflect: true }),
432
+ tslib.__metadata("design:type", Boolean)
433
+ ], exports.DragElement.prototype, "disabled", void 0);
434
+ exports.DragElement = DragElement_1 = tslib.__decorate([
435
+ decorators_js.customElement('tha-drag')
436
+ ], exports.DragElement);
437
+ //# sourceMappingURL=drag-element.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag-element.cjs","sources":["../../../../libs/elements/src/drag-drop/drag-element.ts"],"sourcesContent":[null],"names":["DragElement","LitElement","defer","ThaDragEvent","css","html","ACCEPT_DROP_PROP","REGISTER_HANDLE_PROP","UNREGISTER_HANDLE_PROP","__decorate","property","customElement"],"mappings":";;;;;;;;;;AAwBaA,mBAAW,GAAjB,MAAM,WAAY,SAAQC,cAAU,CAAA;AAApC,IAAA,WAAA,GAAA;;AAwFL;;AAEG;QACM,IAAA,C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C;;AACjB,CAAA,EAAAV,mBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AA7LfA,mBAAW,GAAA,aAAA,GAAAS,gBAAA,CAAA;IADvBE,2BAAa,CAAC,UAAU;AACZ,CAAA,EAAAX,mBAAW,CAkcvB;;"}
@@ -1,11 +1,11 @@
1
- var _a;
1
+ import { __decorate, __metadata } from 'tslib';
2
+ import { defer } from '@telperion/js-utils/function/defer';
3
+ import { LitElement, css, html } from 'lit';
4
+ import { property, customElement } from 'lit/decorators.js';
5
+ import { ACCEPT_DROP_PROP, REGISTER_HANDLE_PROP, UNREGISTER_HANDLE_PROP } from './private-props.js';
6
+ import { ThaDragEvent } from './tha-drag-event.js';
7
+
2
8
  var DragElement_1;
3
- import { __decorate, __metadata } from "tslib";
4
- import { defer } from "@telperion/js-utils/function/defer";
5
- import { LitElement, css, html } from "lit";
6
- import { customElement, property } from "lit/decorators.js";
7
- import { ACCEPT_DROP_PROP, REGISTER_HANDLE_PROP, UNREGISTER_HANDLE_PROP } from "./private-props";
8
- import { ThaDragEvent } from "./tha-drag-event";
9
9
  let DragElement = class DragElement extends LitElement {
10
10
  constructor() {
11
11
  super(...arguments);
@@ -432,6 +432,6 @@ __decorate([
432
432
  DragElement = DragElement_1 = __decorate([
433
433
  customElement('tha-drag')
434
434
  ], DragElement);
435
- export { DragElement };
436
435
 
436
+ export { DragElement };
437
437
  //# sourceMappingURL=drag-element.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../libs/elements/src/drag-drop/drag-element.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,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AO,KAAK,CAAC;IACf,CAAC;;AA7TO;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACN;AAOrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;qDACK;AAUvC;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACD;AAOlB;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;iDACE;AAM9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CAC1B;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;4CAC3B;AAMhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDACR;AAOlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACtB;AAOb;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CACjB;AA7Lf,WAAW;IADvB,aAAa,CAAC,UAAU,CAAC;GACb,WAAW,CAkcvB","file":"drag-element.js","sourcesContent":["import { defer } from \"@telperion/js-utils/function/defer\";\r\nimport { LitElement, css, html, type CSSResultGroup, type TemplateResult } from \"lit\";\r\nimport { customElement, property } from \"lit/decorators.js\";\r\n\r\nimport type { DropZoneElement } from \"./dropzone-element\";\r\nimport { ACCEPT_DROP_PROP, REGISTER_HANDLE_PROP, UNREGISTER_HANDLE_PROP } from \"./private-props\";\r\nimport { ThaDragEvent } from \"./tha-drag-event\";\r\nimport type { DragHandleElement } from \"./drag-handle-element\";\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n /**\r\n * A draggable element that can be used to initiate drag-and-drop operations.\r\n * It can contain child elements and supports drag handles.\r\n * The `replaceclone` attribute indicates whether the element should be replaced with a clone during\r\n * the drag operation.\r\n * The `draggingstrategy` attribute defines the drag behavior, such as 'move' or 'copyMove'.\r\n *\r\n */\r\n \"tha-drag\": DragElement;\r\n }\r\n}\r\n\r\n@customElement('tha-drag')\r\nexport class DragElement extends LitElement {\r\n /**\r\n * A transparent image used as a drag image to prevent flickering during drag operations.\r\n * This image is used when the drag image is not set explicitly.\r\n * It is a 1x1 pixel transparent PNG.\r\n */\r\n declare private static TRANSPARENT_IMAGE: HTMLImageElement;\r\n\r\n /**\r\n * A global style element used to define custom properties for drag-and-drop.\r\n */\r\n declare private static GLOBAL_STYLE: HTMLStyleElement;\r\n\r\n /**\r\n * An observer for monitoring changes to drag-related attributes.\r\n */\r\n private static DRAG_DATA_OBSERVER = new MutationObserver(records => {\r\n for (const { attributeName, target } of records) {\r\n if (!attributeName?.startsWith('data-drag-')) continue;\r\n\r\n const element = <DragElement>target;\r\n\r\n element.dragData[attributeName.replace('data-drag-', '')] = element.getAttribute(attributeName)!;\r\n }\r\n });\r\n\r\n static override styles: CSSResultGroup = css`\r\n :host {\r\n --tha-diff-x: calc(var(--tha-cx) - var(--tha-x));\r\n --tha-diff-y: calc(var(--tha-cy) - var(--tha-y));\r\n }\r\n\r\n :host([draggingstrategy=\"move\"]),\r\n :host([draggingstrategy=\"copyMove\"]) {\r\n transition-duration: .2s;\r\n transition-timing-function: ease-out;\r\n transition-property: none;\r\n }\r\n\r\n :host([draggingstrategy=\"move\"][dragging]),\r\n :host([draggingstrategy=\"copyMove\"][dragging]) {\r\n position: fixed;\r\n width: var(--tha-width);\r\n height: var(--tha-height);\r\n left: calc(var(--tha-left) + var(--tha-diff-x) + var(--tha-offset-x));\r\n top: calc(var(--tha-top) + var(--tha-diff-y) + var(--tha-offset-y));\r\n transform-origin: calc(var(--tha-x) - var(--tha-left)) calc(var(--tha-y) - var(--tha-top));\r\n z-index: 100;\r\n }\r\n\r\n :host([draggingstrategy=\"move\"][dragend]),\r\n :host([draggingstrategy=\"copyMove\"][dragend]) {\r\n left: var(--tha-left);\r\n top: var(--tha-top);\r\n transition-property: all;\r\n }\r\n\r\n :host([draggingstrategy=\"move\"][dragend][dropaccepted]),\r\n :host([draggingstrategy=\"copyMove\"][dragend][dropaccepted]) {\r\n left: var(--tha-target-left);\r\n top: var(--tha-target-top);\r\n width: var(--tha-target-width);\r\n height: var(--tha-target-height);\r\n }\r\n `;\r\n\r\n static {\r\n this.TRANSPARENT_IMAGE = new Image(1, 1);\r\n this.TRANSPARENT_IMAGE.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==';\r\n\r\n const style = this.GLOBAL_STYLE = document.createElement('style');\r\n\r\n style.innerHTML = `\r\n @property --tha-offset-x {\r\n syntax: '<length>';\r\n initial-value: 0px;\r\n inherits: true;\r\n }\r\n\r\n @property --tha-offset-y {\r\n syntax: '<length>';\r\n initial-value: 0px;\r\n inherits: true;\r\n }\r\n `;\r\n document.head.appendChild(style);\r\n }\r\n\r\n /**\r\n * A record of drag-related data attributes.\r\n */\r\n readonly dragData: Record<string, string> = {};\r\n\r\n /**\r\n * Pre-drag data used to store the initial state of the element before dragging starts.\r\n */\r\n readonly preDragData = {\r\n boundingRect: null! as DOMRect,\r\n dragStartEvent: null! as DragEvent,\r\n styles: {\r\n pointerEvents: ''\r\n }\r\n };\r\n\r\n /**\r\n * A weak reference to the currently accepted drop zone.\r\n * This is used to track which drop zone the element is currently accepted in.\r\n */\r\n #acceptedDropzone: WeakRef<DropZoneElement> | null = null;\r\n\r\n /**\r\n * A weak reference to the clone of the element created during dragging.\r\n * This is used to manage the clone's lifecycle and properties.\r\n */\r\n #clone: WeakRef<HTMLElement> = null!;\r\n\r\n /**\r\n * A set of drag handles associated with the element.\r\n */\r\n #handles = new Set<DragHandleElement>();\r\n\r\n /**\r\n * Returns the clone of the element if it exists.\r\n * This is used to access the clone during drag operations.\r\n */\r\n get clone() { return this.#clone.deref(); }\r\n\r\n /**\r\n * The name of the element, used for identification in drag-and-drop operations.\r\n * This helps the dropzones to accept or reject the drag based on the name.\r\n */\r\n @property({ type: String })\r\n declare name: string;\r\n\r\n /**\r\n * The dragging strategy to use for the element.\r\n * This determines how the element is dragged (e.g., move or copy).\r\n */\r\n @property({ type: String, reflect: true })\r\n draggingStrategy: 'move' | 'copyMove' = 'move';\r\n\r\n /**\r\n * The group name for the drag element.\r\n * This is used to group elements together for drag-and-drop operations.\r\n * Elements with the same group name can interact with each other during drag-and-drop.\r\n *\r\n * !!! Not implemented yet !!!\r\n */\r\n @property({ type: String })\r\n declare dragGroup: string;\r\n\r\n /**\r\n * Indicates whether the element should replace its clone during drag operations.\r\n * If true , the original element is replaced with a clone during dragging.\r\n */\r\n @property({ type: Boolean })\r\n declare replaceClone: boolean;\r\n\r\n /**\r\n * Indicates whether the element is currently being dragged.\r\n */\r\n @property({ type: Boolean, reflect: true })\r\n dragging = false;\r\n\r\n /**\r\n * Indicates whether the drag operation has ended.\r\n * This is used to manage the state of the element after dragging.\r\n */\r\n @property({ type: Boolean, reflect: true })\r\n dragend = false;\r\n\r\n /**\r\n * The ID of the drop zone the element is currently over.\r\n */\r\n @property({ type: String, reflect: true })\r\n draggedOver: string | null = null;\r\n\r\n /**\r\n * Indicates whether the element has been accepted by a drop zone.\r\n * This is used to manage the state of the element during drag-and-drop operations.\r\n */\r\n @property({ type: Boolean, reflect: true })\r\n dropAccepted = false;\r\n\r\n /**\r\n * Indicates whether the drag element is disabled.\r\n * When disabled, the element cannot be dragged.\r\n */\r\n @property({ type: Boolean, reflect: true })\r\n declare disabled: boolean;\r\n\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n\r\n // Set the draggable attribute to true to enable dragging.\r\n this.draggable = true;\r\n\r\n // Set up the drag data attributes observer to monitor changes to drag-related attributes.\r\n this.#setUpDragDataAttrs();\r\n\r\n // Add event listeners for drag events.\r\n this.addEventListener('dragstart', this.#handleDragStart);\r\n this.addEventListener('dragend', this.#handleDragEnd);\r\n this.addEventListener('drag', this.#handleDrag);\r\n this.addEventListener('thadropzoneenter', this.#handleDropZoneEnter);\r\n this.addEventListener('thadropzoneleave', this.#handleDropZoneLeave);\r\n }\r\n\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n\r\n // Clean up the drag data attributes observer.\r\n this.removeEventListener('dragstart', this.#handleDragStart);\r\n this.removeEventListener('dragend', this.#handleDragEnd);\r\n this.removeEventListener('drag', this.#handleDrag);\r\n this.removeEventListener('thadropzoneenter', this.#handleDropZoneEnter);\r\n this.removeEventListener('thadropzoneleave', this.#handleDropZoneLeave);\r\n }\r\n\r\n protected override render(): TemplateResult {\r\n return html`<slot></slot>`;\r\n }\r\n\r\n /**\r\n * Accepts a drop zone and an optional rectangle for the drop area.\r\n * @param dropzone The drop zone element being accepted.\r\n * @param rect The bounding rectangle of the drop area.\r\n * @returns\r\n */\r\n [ACCEPT_DROP_PROP](dropzone: WeakRef<DropZoneElement>, rect?: DOMRect) {\r\n this.dropAccepted = true;\r\n this.#acceptedDropzone = dropzone;\r\n\r\n if (!rect) return;\r\n\r\n const { width, height, left, right, top, bottom } = rect;\r\n\r\n for (const prop in { width, height, left, right, top, bottom }) {\r\n this.style.setProperty(`--tha-target-${prop}`, `${rect[prop as keyof DOMRect]}px`);\r\n }\r\n }\r\n\r\n /**\r\n * Registers a drag handle element.\r\n * @param handle The drag handle element to register.\r\n */\r\n [REGISTER_HANDLE_PROP](handle: DragHandleElement) {\r\n this.#handles.add(handle);\r\n }\r\n\r\n /**\r\n * Unregisters a drag handle element.\r\n * @param handle The drag handle element to unregister.\r\n */\r\n [UNREGISTER_HANDLE_PROP](handle: DragHandleElement) {\r\n this.#handles.delete(handle);\r\n }\r\n\r\n /**\r\n * Sets up the drag data attributes observer to monitor changes to drag-related attributes.\r\n * This allows the element to transfer custom data during drag-and-drop operations.\r\n */\r\n #setUpDragDataAttrs() {\r\n DragElement.DRAG_DATA_OBSERVER.observe(this, { attributes: true });\r\n\r\n for (const { name, value } of Object.values(this.attributes).filter(attr => attr.name.startsWith('data-drag-'))) {\r\n this.dragData[name.replace('data-drag-', '')] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Handles the drag start event.\r\n * @param event The drag event.\r\n */\r\n #handleDragStart = (event: DragEvent) => {\r\n if (!this.#shouldHandleEvent(event)) return event.preventDefault();\r\n\r\n // Stop propagation to prevent parent draggable elements from interfering.\r\n event.stopPropagation();\r\n\r\n // Modify base event properties to prevent default behavior and set up drag image.\r\n event.dataTransfer?.setDragImage(DragElement.TRANSPARENT_IMAGE, 0, 0);\r\n event.dataTransfer!.effectAllowed = this.draggingStrategy;\r\n\r\n document.addEventListener('dragover', this.#preventDragOver);\r\n\r\n // Prepare pre-drag data and styles.\r\n this.#preparePreDragData(event);\r\n this.#prepareDraggingStyles();\r\n\r\n defer().then(() => {\r\n this.style.pointerEvents = 'none';\r\n this.dragging = true;\r\n\r\n if (this.replaceClone) {\r\n const clone = this.#createClone();\r\n\r\n this.#clone = new WeakRef(clone);\r\n this.parentElement!.insertBefore(clone, this.nextSibling);\r\n }\r\n\r\n this.dispatchEvent(new ThaDragEvent('thadragstart', { dragTarget: new WeakRef(this) }, event));\r\n });\r\n };\r\n\r\n /**\r\n * Handles the drag end event.\r\n * @param event The drag event.\r\n */\r\n #handleDragEnd = (event: DragEvent) => {\r\n document.removeEventListener('dragover', this.#preventDragOver);\r\n this.dragend = true;\r\n\r\n const hasTransition = getComputedStyle(this).transitionDuration.match(/\\d*\\.?\\d+/g)?.map(Number).some(num => num > 0);\r\n const clear = () => {\r\n if (this.replaceClone) this.clone?.remove();\r\n\r\n this.style.pointerEvents = this.preDragData.styles.pointerEvents;\r\n ['--tha-width', '--tha-height', '--tha-left', '--tha-top', '--tha-x', '--tha-y', '--tha-cx', '--tha-cy'].forEach(prop => {\r\n this.style.removeProperty(prop);\r\n });\r\n ['width', 'height', 'left', 'right', 'top', 'bottom'].forEach(prop => {\r\n this.style.removeProperty(`--tha-target-${prop}`);\r\n });\r\n\r\n const acceptedDropzone = this.#acceptedDropzone;\r\n const dropAccepted = this.dropAccepted;\r\n\r\n this.dragging = false;\r\n this.dragend = false;\r\n this.draggedOver = null;\r\n this.dropAccepted = false;\r\n this.#acceptedDropzone = null;\r\n\r\n if (dropAccepted && acceptedDropzone) {\r\n acceptedDropzone.deref()?.dispatchEvent(new ThaDragEvent(\r\n 'thadropend',\r\n { dragTarget: new WeakRef(this), dropzoneTarget: acceptedDropzone },\r\n event\r\n ));\r\n }\r\n\r\n this.dispatchEvent(new ThaDragEvent('thadragend', { dragTarget: new WeakRef(this) }, event));\r\n };\r\n\r\n if (hasTransition) this.addEventListener('transitionend', clear, { once: true });\r\n else clear();\r\n };\r\n\r\n /**\r\n * Handles the drag event.\r\n * This updates the position of the element during dragging.\r\n * @param event The drag event.\r\n */\r\n #handleDrag = (event: DragEvent) => {\r\n const { x, y } = event;\r\n\r\n this.style.setProperty('--tha-cx', `${x}px`);\r\n this.style.setProperty('--tha-cy', `${y}px`);\r\n };\r\n\r\n /**\r\n * Handles the drop zone enter event.\r\n * This updates the draggedOver property to indicate which drop zone the element is currently over.\r\n * @param event The ThaDragEvent for the drop zone enter.\r\n */\r\n #handleDropZoneEnter = (event: ThaDragEvent) => {\r\n this.draggedOver = event.dropzoneTarget?.deref()?.name ?? '';\r\n };\r\n\r\n /**\r\n * Handles the drop zone leave event.\r\n * This clears the draggedOver property when the element leaves a drop zone.\r\n * @param event The ThaDragEvent for the drop zone leave.\r\n */\r\n #handleDropZoneLeave = () => {\r\n this.draggedOver = null;\r\n };\r\n\r\n /**\r\n * Creates a clone of the element for dragging.\r\n * This clone is used to visually represent the element during drag operations.\r\n * @returns The cloned element.\r\n */\r\n #createClone() {\r\n const container = document.createElement('tha-drag-clone');\r\n\r\n Object.values(this.attributes)\r\n .filter(attr => !['dragging', 'replaceclone', 'draggable'].includes(attr.name))\r\n .forEach(attr => {\r\n container.attributes.setNamedItem(attr.cloneNode() as Attr);\r\n });\r\n\r\n this.childNodes.forEach(node => {\r\n container.appendChild(node.cloneNode(true));\r\n });\r\n\r\n return container;\r\n }\r\n\r\n /**\r\n * Prepares the pre-drag data, including the bounding rectangle and styles.\r\n * This data is used to restore the element's state after dragging.\r\n * @param event The drag event.\r\n */\r\n #preparePreDragData(event: DragEvent) {\r\n this.preDragData.boundingRect = this.getBoundingClientRect();\r\n this.preDragData.dragStartEvent = event;\r\n this.preDragData.styles.pointerEvents = this.style.pointerEvents;\r\n }\r\n\r\n /**\r\n * Prepares the styles for dragging, including the position and size of the element.\r\n * This is used to update the element's position during drag operations.\r\n */\r\n #prepareDraggingStyles() {\r\n const {\r\n boundingRect: { width, height, left, top },\r\n dragStartEvent: { x, y }\r\n } = this.preDragData;\r\n const props = { width, height, left, top, x, y };\r\n\r\n for (const prop in props) {\r\n this.style.setProperty(`--tha-${prop}`, `${props[prop as keyof typeof props]}px`);\r\n }\r\n }\r\n\r\n /**\r\n * Prevents the default dragover behavior to allow custom drag-and-drop handling.\r\n * @param event The drag event.\r\n */\r\n #preventDragOver(event: DragEvent) {\r\n event.preventDefault();\r\n }\r\n\r\n /**\r\n * Checks if the element should handle the drag event based on the target.\r\n * If there are no handles, it returns true to allow the event.\r\n * If there are handles, it checks if the event target is one of the handles.\r\n * @param event The drag event.\r\n * @returns True if the element should handle the event, false otherwise.\r\n */\r\n #shouldHandleEvent(event: DragEvent): boolean {\r\n if (this.disabled) return false;\r\n if (!this.#handles.size) return true;\r\n\r\n if (this.#handles.has(event.target as DragHandleElement)) return true;\r\n\r\n return false;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"drag-element.js","sources":["../../../../libs/elements/src/drag-drop/drag-element.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAwBO,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,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B,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AA7Lf,WAAW,GAAA,aAAA,GAAA,UAAA,CAAA;IADvB,aAAa,CAAC,UAAU;AACZ,CAAA,EAAA,WAAW,CAkcvB;;;;"}
@@ -1,16 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DragHandleElement = void 0;
4
- const tslib_1 = require("tslib");
5
- const get_parents_1 = require("@thalesrc/dom-utils/get-parents");
6
- const lit_1 = require("lit");
7
- const decorators_js_1 = require("lit/decorators.js");
8
- const drag_element_1 = require("./drag-element");
9
- const private_props_1 = require("./private-props");
10
- let DragHandleElement = class DragHandleElement extends lit_1.LitElement {
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var getParents = require('@thalesrc/dom-utils/get-parents');
5
+ var lit = require('lit');
6
+ var decorators_js = require('lit/decorators.js');
7
+ var dragElement = require('./drag-element.cjs');
8
+ var privateProps = require('./private-props.cjs');
9
+
10
+ exports.DragHandleElement = class DragHandleElement extends lit.LitElement {
11
11
  get #parent() {
12
- for (const parent of (0, get_parents_1.getParents)(this)) {
13
- if (parent instanceof drag_element_1.DragElement) {
12
+ for (const parent of getParents.getParents(this)) {
13
+ if (parent instanceof dragElement.DragElement) {
14
14
  return parent;
15
15
  }
16
16
  }
@@ -19,17 +19,17 @@ let DragHandleElement = class DragHandleElement extends lit_1.LitElement {
19
19
  connectedCallback() {
20
20
  super.connectedCallback();
21
21
  this.draggable = true;
22
- this.#parent?.[private_props_1.REGISTER_HANDLE_PROP](this);
22
+ this.#parent?.[privateProps.REGISTER_HANDLE_PROP](this);
23
23
  }
24
24
  disconnectedCallback() {
25
25
  super.disconnectedCallback();
26
- this.#parent?.[private_props_1.UNREGISTER_HANDLE_PROP](this);
26
+ this.#parent?.[privateProps.UNREGISTER_HANDLE_PROP](this);
27
27
  }
28
28
  render() {
29
- return (0, lit_1.html) `<slot></slot>`;
29
+ return lit.html `<slot></slot>`;
30
30
  }
31
31
  };
32
- exports.DragHandleElement = DragHandleElement;
33
- exports.DragHandleElement = DragHandleElement = tslib_1.__decorate([
34
- (0, decorators_js_1.customElement)("tha-drag-handle")
35
- ], DragHandleElement);
32
+ exports.DragHandleElement = tslib.__decorate([
33
+ decorators_js.customElement("tha-drag-handle")
34
+ ], exports.DragHandleElement);
35
+ //# sourceMappingURL=drag-handle-element.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag-handle-element.cjs","sources":["../../../../libs/elements/src/drag-drop/drag-handle-element.ts"],"sourcesContent":[null],"names":["DragHandleElement","LitElement","getParents","DragElement","REGISTER_HANDLE_PROP","UNREGISTER_HANDLE_PROP","html","__decorate","customElement"],"mappings":";;;;;;;;;AAcaA,yBAAiB,GAAvB,MAAM,iBAAkB,SAAQC,cAAU,CAAA;AAC/C,IAAA,IAAI,OAAO,GAAA;QACT,KAAK,MAAM,MAAM,IAAIC,qBAAU,CAAC,IAAI,CAAC,EAAE;AACrC,YAAA,IAAI,MAAM,YAAYC,uBAAW,EAAE;AACjC,gBAAA,OAAO,MAAM;YACf;QACF;AAEA,QAAA,OAAO,IAAI;IACb;IAES,iBAAiB,GAAA;QACxB,KAAK,CAAC,iBAAiB,EAAE;AAEzB,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;QACrB,IAAI,CAAC,OAAO,GAAGC,iCAAoB,CAAC,CAAC,IAAI,CAAC;IAC5C;IAES,oBAAoB,GAAA;QAC3B,KAAK,CAAC,oBAAoB,EAAE;QAE5B,IAAI,CAAC,OAAO,GAAGC,mCAAsB,CAAC,CAAC,IAAI,CAAC;IAC9C;IAEmB,MAAM,GAAA;QACvB,OAAOC,QAAI,CAAA,CAAA,aAAA,CAAe;IAC5B;;AA1BWN,yBAAiB,GAAAO,gBAAA,CAAA;IAD7BC,2BAAa,CAAC,iBAAiB;AACnB,CAAA,EAAAR,yBAAiB,CA2B7B;;"}
@@ -1,9 +1,10 @@
1
- import { __decorate } from "tslib";
2
- import { getParents } from "@thalesrc/dom-utils/get-parents";
3
- import { html, LitElement } from "lit";
4
- import { customElement } from "lit/decorators.js";
5
- import { DragElement } from "./drag-element";
6
- import { REGISTER_HANDLE_PROP, UNREGISTER_HANDLE_PROP } from "./private-props";
1
+ import { __decorate } from 'tslib';
2
+ import { getParents } from '@thalesrc/dom-utils/get-parents';
3
+ import { LitElement, html } from 'lit';
4
+ import { customElement } from 'lit/decorators.js';
5
+ import { DragElement } from './drag-element.js';
6
+ import { REGISTER_HANDLE_PROP, UNREGISTER_HANDLE_PROP } from './private-props.js';
7
+
7
8
  let DragHandleElement = class DragHandleElement extends LitElement {
8
9
  get #parent() {
9
10
  for (const parent of getParents(this)) {
@@ -29,6 +30,6 @@ let DragHandleElement = class DragHandleElement extends LitElement {
29
30
  DragHandleElement = __decorate([
30
31
  customElement("tha-drag-handle")
31
32
  ], DragHandleElement);
32
- export { DragHandleElement };
33
33
 
34
+ export { DragHandleElement };
34
35
  //# sourceMappingURL=drag-handle-element.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../libs/elements/src/drag-drop/drag-handle-element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AASxE,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAC/C,IAAI,OAAO;QACT,KAAK,MAAM,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,IAAI,MAAM,YAAY,WAAW,EAAE,CAAC;gBAClC,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,iBAAiB;QACxB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,EAAE,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEQ,oBAAoB;QAC3B,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAE7B,IAAI,CAAC,OAAO,EAAE,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;CACF,CAAA;AA3BY,iBAAiB;IAD7B,aAAa,CAAC,iBAAiB,CAAC;GACpB,iBAAiB,CA2B7B","file":"drag-handle-element.js","sourcesContent":["import { getParents } from \"@thalesrc/dom-utils/get-parents\";\r\nimport { html, LitElement, type TemplateResult } from \"lit\";\r\nimport { customElement } from \"lit/decorators.js\";\r\n\r\nimport { DragElement } from \"./drag-element\";\r\nimport { REGISTER_HANDLE_PROP, UNREGISTER_HANDLE_PROP } from \"./private-props\";\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n \"tha-drag-handle\": DragHandleElement;\r\n }\r\n}\r\n\r\n@customElement(\"tha-drag-handle\")\r\nexport class DragHandleElement extends LitElement {\r\n get #parent(): DragElement | null {\r\n for (const parent of getParents(this)) {\r\n if (parent instanceof DragElement) {\r\n return parent;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n override connectedCallback(): void {\r\n super.connectedCallback();\r\n\r\n this.draggable = true;\r\n this.#parent?.[REGISTER_HANDLE_PROP](this);\r\n }\r\n\r\n override disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n\r\n this.#parent?.[UNREGISTER_HANDLE_PROP](this);\r\n }\r\n\r\n protected override render(): TemplateResult {\r\n return html`<slot></slot>`;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"drag-handle-element.js","sources":["../../../../libs/elements/src/drag-drop/drag-handle-element.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAcO,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU,CAAA;AAC/C,IAAA,IAAI,OAAO,GAAA;QACT,KAAK,MAAM,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;AACrC,YAAA,IAAI,MAAM,YAAY,WAAW,EAAE;AACjC,gBAAA,OAAO,MAAM;YACf;QACF;AAEA,QAAA,OAAO,IAAI;IACb;IAES,iBAAiB,GAAA;QACxB,KAAK,CAAC,iBAAiB,EAAE;AAEzB,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;QACrB,IAAI,CAAC,OAAO,GAAG,oBAAoB,CAAC,CAAC,IAAI,CAAC;IAC5C;IAES,oBAAoB,GAAA;QAC3B,KAAK,CAAC,oBAAoB,EAAE;QAE5B,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC,CAAC,IAAI,CAAC;IAC9C;IAEmB,MAAM,GAAA;QACvB,OAAO,IAAI,CAAA,CAAA,aAAA,CAAe;IAC5B;;AA1BW,iBAAiB,GAAA,UAAA,CAAA;IAD7B,aAAa,CAAC,iBAAiB;AACnB,CAAA,EAAA,iBAAiB,CA2B7B;;;;"}
@@ -1,15 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DropZoneElement = void 0;
4
- const tslib_1 = require("tslib");
5
- const lit_1 = require("lit");
6
- const decorators_js_1 = require("lit/decorators.js");
7
- const tha_drag_event_1 = require("./tha-drag-event");
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var lit = require('lit');
5
+ var decorators_js = require('lit/decorators.js');
6
+ var thaDragEvent = require('./tha-drag-event.cjs');
7
+
8
8
  let LAST_DRAG_EVENT;
9
9
  document.addEventListener('thadragstart', event => {
10
10
  LAST_DRAG_EVENT = event;
11
11
  });
12
- let DropZoneElement = class DropZoneElement extends lit_1.LitElement {
12
+ exports.DropZoneElement = class DropZoneElement extends lit.LitElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.#enterCount = 0;
@@ -54,10 +54,10 @@ let DropZoneElement = class DropZoneElement extends lit_1.LitElement {
54
54
  this.#dispatchEventWithCounter('thadrop', 'thadropped', event);
55
55
  };
56
56
  }
57
- static { this.styles = (0, lit_1.css) ``; }
57
+ static { this.styles = lit.css ``; }
58
58
  #enterCount;
59
59
  render() {
60
- return (0, lit_1.html) `<slot></slot>`;
60
+ return lit.html `<slot></slot>`;
61
61
  }
62
62
  connectedCallback() {
63
63
  super.connectedCallback();
@@ -91,27 +91,27 @@ let DropZoneElement = class DropZoneElement extends lit_1.LitElement {
91
91
  #dispatchEventWithCounter(eventName, counterEventName, event) {
92
92
  const { dragTarget } = LAST_DRAG_EVENT;
93
93
  const dropzoneTarget = new WeakRef(this);
94
- this.dispatchEvent(new tha_drag_event_1.ThaDragEvent(eventName, { dragTarget, dropzoneTarget }, event));
95
- dragTarget.deref()?.dispatchEvent(new tha_drag_event_1.ThaDragEvent(counterEventName, { dragTarget, dropzoneTarget }, event));
94
+ this.dispatchEvent(new thaDragEvent.ThaDragEvent(eventName, { dragTarget, dropzoneTarget }, event));
95
+ dragTarget.deref()?.dispatchEvent(new thaDragEvent.ThaDragEvent(counterEventName, { dragTarget, dropzoneTarget }, event));
96
96
  }
97
97
  };
98
- exports.DropZoneElement = DropZoneElement;
99
- tslib_1.__decorate([
100
- (0, decorators_js_1.property)({ converter: value => (value ?? '').split(',').map(str => str.trim()) }),
101
- tslib_1.__metadata("design:type", Array)
102
- ], DropZoneElement.prototype, "accept", void 0);
103
- tslib_1.__decorate([
104
- (0, decorators_js_1.property)({ type: String }),
105
- tslib_1.__metadata("design:type", Object)
106
- ], DropZoneElement.prototype, "name", void 0);
107
- tslib_1.__decorate([
108
- (0, decorators_js_1.property)({ type: String, reflect: true }),
109
- tslib_1.__metadata("design:type", Object)
110
- ], DropZoneElement.prototype, "itemDragged", void 0);
111
- tslib_1.__decorate([
112
- (0, decorators_js_1.property)({ type: Boolean, reflect: true }),
113
- tslib_1.__metadata("design:type", Object)
114
- ], DropZoneElement.prototype, "acceptableDrag", void 0);
115
- exports.DropZoneElement = DropZoneElement = tslib_1.__decorate([
116
- (0, decorators_js_1.customElement)('tha-dropzone')
117
- ], DropZoneElement);
98
+ tslib.__decorate([
99
+ decorators_js.property({ converter: value => (value ?? '').split(',').map(str => str.trim()) }),
100
+ tslib.__metadata("design:type", Array)
101
+ ], exports.DropZoneElement.prototype, "accept", void 0);
102
+ tslib.__decorate([
103
+ decorators_js.property({ type: String }),
104
+ tslib.__metadata("design:type", Object)
105
+ ], exports.DropZoneElement.prototype, "name", void 0);
106
+ tslib.__decorate([
107
+ decorators_js.property({ type: String, reflect: true }),
108
+ tslib.__metadata("design:type", Object)
109
+ ], exports.DropZoneElement.prototype, "itemDragged", void 0);
110
+ tslib.__decorate([
111
+ decorators_js.property({ type: Boolean, reflect: true }),
112
+ tslib.__metadata("design:type", Object)
113
+ ], exports.DropZoneElement.prototype, "acceptableDrag", void 0);
114
+ exports.DropZoneElement = tslib.__decorate([
115
+ decorators_js.customElement('tha-dropzone')
116
+ ], exports.DropZoneElement);
117
+ //# sourceMappingURL=dropzone-element.cjs.map