@fluid-topics/ft-wc-utils 1.1.117 → 1.1.119

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.
@@ -10,3 +10,4 @@ export declare function hasChanged(a: any, b: any): boolean;
10
10
  export declare function eventPathContainsMatchingElement(e: Event, matchers: string[], containerElement?: HTMLElement): boolean;
11
11
  export declare function minmax(min: number, value: number, max: number): number;
12
12
  export declare function last<T = any>(arr: T[]): T | undefined;
13
+ export declare function unslotText(node: any): string;
package/build/helpers.js CHANGED
@@ -142,3 +142,9 @@ export function minmax(min, value, max) {
142
142
  export function last(arr) {
143
143
  return arr[arr.length - 1];
144
144
  }
145
+ export function unslotText(node) {
146
+ if (node instanceof HTMLSlotElement) {
147
+ return node.assignedNodes().map(n => unslotText(n)).join("");
148
+ }
149
+ return (node === null || node === void 0 ? void 0 : node.textContent) || "";
150
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-wc-utils",
3
- "version": "1.1.117",
3
+ "version": "1.1.119",
4
4
  "description": "Internal web components tools",
5
5
  "author": "Fluid Topics <devtopics@antidot.net>",
6
6
  "license": "ISC",
@@ -24,5 +24,5 @@
24
24
  "mark.js": "8.11.1",
25
25
  "moment": "2.29.4"
26
26
  },
27
- "gitHead": "061a8cebc72403790111ca8292208f4213b84312"
27
+ "gitHead": "a772950c2efeb1e66a2cff476f0c363eb84b4c55"
28
28
  }